MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / normalizeArea

Function normalizeArea

packages/shell/src/api/skeleton.ts:225–257  ·  view source on GitHub ↗
(area: IPublicTypeWidgetConfigArea | undefined)

Source from the content-addressed store, hash-verified

223}
224
225function normalizeArea(area: IPublicTypeWidgetConfigArea | undefined): 'leftArea' | 'rightArea' | 'topArea' | 'toolbar' | 'mainArea' | 'bottomArea' | 'leftFixedArea' | 'leftFloatArea' | 'stages' | 'subTopArea' {
226 switch (area) {
227 case 'leftArea':
228 case 'left':
229 return 'leftArea';
230 case 'rightArea':
231 case 'right':
232 return 'rightArea';
233 case 'topArea':
234 case 'top':
235 return 'topArea';
236 case 'toolbar':
237 return 'toolbar';
238 case 'mainArea':
239 case 'main':
240 case 'center':
241 case 'centerArea':
242 return 'mainArea';
243 case 'bottomArea':
244 case 'bottom':
245 return 'bottomArea';
246 case 'leftFixedArea':
247 return 'leftFixedArea';
248 case 'leftFloatArea':
249 return 'leftFloatArea';
250 case 'stages':
251 return 'stages';
252 case 'subTopArea':
253 return 'subTopArea';
254 default:
255 throw new Error(`${area} not supported`);
256 }
257}

Callers 2

removeMethod · 0.85
getAreaItemsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…