@sap/ux-specification 1.136.13 → 1.136.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -1
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +260 -261
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +28 -3
- package/dist/schemas/v2/ListReportNewConfig.json +45 -0
- package/dist/schemas/v2/ObjectPageConfig.json +11 -5
- package/dist/schemas/v4/ApplicationV4.json +18 -12
- package/dist/schemas/v4/BuildingBlocksConfig.json +72 -35
- package/dist/schemas/v4/ListReportConfig.json +299 -28
- package/dist/schemas/v4/ObjectPageConfig.json +409 -130
- package/dist/specification/package.json +17 -17
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +17 -1
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +10 -1
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/macros/types.d.ts +1 -0
- package/dist/specification/scripts/macros/types.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +23 -13
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +2 -1
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts +38 -8
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts.map +1 -1
- package/dist/specification/src/sync/common/DataFieldStrategy.js +64 -11
- package/dist/specification/src/sync/common/DataFieldStrategy.js.map +1 -1
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.d.ts +0 -4
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.d.ts.map +1 -1
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js +0 -3
- package/dist/specification/src/sync/common/ManifestDrivenSchemaProcessor.js.map +1 -1
- package/dist/specification/src/sync/common/appProvider.d.ts +0 -1
- package/dist/specification/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/common/appProvider.js +0 -1
- package/dist/specification/src/sync/common/appProvider.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +65 -4
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +138 -8
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts +10 -3
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +14 -4
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts +0 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +0 -3
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +12 -6
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +33 -22
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +6 -4
- package/dist/specification/src/sync/common/import/utils.d.ts +0 -1
- package/dist/specification/src/sync/common/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/import/utils.js +0 -1
- package/dist/specification/src/sync/common/import/utils.js.map +1 -1
- package/dist/specification/src/sync/common/rules.d.ts.map +1 -1
- package/dist/specification/src/sync/common/rules.js +18 -13
- package/dist/specification/src/sync/common/rules.js.map +1 -1
- package/dist/specification/src/sync/common/utils.d.ts +52 -2
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +176 -5
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/application.d.ts +1 -0
- package/dist/specification/src/sync/v2/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/application.js +18 -0
- package/dist/specification/src/sync/v2/application.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +15 -4
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +8 -15
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.d.ts +26 -0
- package/dist/specification/src/sync/v2/export/factory.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.js +3 -3
- package/dist/specification/src/sync/v2/export/factory.js.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts +1 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js +11 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js +46 -0
- package/dist/specification/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +46 -1
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +63 -13
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +28 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts +22 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js +124 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +4 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.js +5 -6
- package/dist/specification/src/sync/v2/import/importPage.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js +4 -0
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +17 -1
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +57 -0
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +1 -1
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +1 -1
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/actions.d.ts +39 -0
- package/dist/specification/src/sync/v4/export/actions.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/export/actions.js +99 -0
- package/dist/specification/src/sync/v4/export/actions.js.map +1 -0
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts +3 -2
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.js +14 -2
- package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +7 -2
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +2 -4
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js +2 -21
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts +2 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +14 -3
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js +52 -9
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +4 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js +30 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +15 -3
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js +53 -10
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts +0 -3
- package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Table.js +0 -3
- package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts +7 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js +60 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts +9 -2
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.js +39 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +17 -4
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +76 -19
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/export.d.ts +7 -0
- package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/export.js +100 -11
- package/dist/specification/src/sync/v4/export/export.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +2 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/export/types.d.ts +2 -0
- package/dist/specification/src/sync/v4/export/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +107 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +394 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/actions.d.ts +35 -0
- package/dist/specification/src/sync/v4/generate/actions.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/actions.js +112 -0
- package/dist/specification/src/sync/v4/generate/actions.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +3 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +10 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +3 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +9 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +2 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.d.ts +129 -4
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.js +196 -353
- package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +0 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +15 -21
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.js +16 -3
- package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.d.ts +0 -1
- package/dist/specification/src/sync/v4/import/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/utils.js +0 -1
- package/dist/specification/src/sync/v4/import/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +141 -0
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js +208 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +193 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +384 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +172 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +410 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +70 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js +73 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts +9 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js +43 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -0
- package/dist/specification/src/sync/v4/utils/utils.d.ts +105 -49
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +363 -97
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/apiTypes.d.ts +3 -2
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +1 -0
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +152 -3
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +47 -2
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
- package/dist/types/src/v2/application.d.ts +18 -0
- package/dist/types/src/v2/application.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +4 -4
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts +10 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v4/application.d.ts +6 -6
- package/dist/types/src/v4/controls/CustomAction.d.ts +133 -19
- package/dist/types/src/v4/controls/CustomAction.d.ts.map +1 -1
- package/dist/types/src/v4/controls/CustomAction.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts +2 -2
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +22 -3
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +2 -2
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +3 -3
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +59 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.js.map +1 -1
- package/package.json +17 -17
|
@@ -19,7 +19,7 @@ exports.LR_CREATION_MODE_FOR_ANALYTICAL_TABLE = {
|
|
|
19
19
|
const tableSettings = getTableSettings(context);
|
|
20
20
|
if (tableSettings.creationMode) {
|
|
21
21
|
for (const prop of Object.keys(schema.properties)) {
|
|
22
|
-
processNotAllowedProperty(context, '
|
|
22
|
+
processNotAllowedProperty(context, 'PROPERTY_NOT_ALLOWED_FOR_TABLE_TYPE', prop, ux_specification_types_1.PropertyName.creationMode, true);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
@@ -33,8 +33,8 @@ exports.LR_CREATION_MODE_FOR_NON_TREE_TABLE = {
|
|
|
33
33
|
return getTableType(context) !== v4_1.TableTypeV4.TreeTable;
|
|
34
34
|
},
|
|
35
35
|
process: (context) => {
|
|
36
|
-
processNotAllowedProperty(context, '
|
|
37
|
-
processNotAllowedProperty(context, '
|
|
36
|
+
processNotAllowedProperty(context, 'PROPERTY_NOT_ALLOWED_FOR_NON_TREE_TABLE_TYPE', ux_specification_types_1.PropertyName.createInPlace, ux_specification_types_1.PropertyName.createInPlace, true);
|
|
37
|
+
processNotAllowedProperty(context, 'PROPERTY_NOT_ALLOWED_FOR_NON_TREE_TABLE_TYPE', ux_specification_types_1.PropertyName.isCreateEnabled, ux_specification_types_1.PropertyName.isCreateEnabled, true);
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
exports.LR_CREATION_MODE_FOR_NON_CREATION_DIALOG_MODE = {
|
|
@@ -96,26 +96,31 @@ function getTableType(context) {
|
|
|
96
96
|
* @param {string | PropertyName} [propertyName] - The name of the property being processed.
|
|
97
97
|
* @param {string | PropertyName} [propertyToDisplay] - The name of the property to display in messages. Defaults to `propertyName` if not provided.
|
|
98
98
|
* @param {boolean} [usePropertyName] - Whether to use propertyName for i18n message resolution.
|
|
99
|
-
* @returns {void} Does not return a value.
|
|
100
99
|
*/
|
|
101
100
|
function processNotAllowedProperty(context, message, propertyName, propertyToDisplay, usePropertyName = false) {
|
|
102
101
|
const { schema } = context;
|
|
103
102
|
const tableSettings = getTableSettings(context);
|
|
104
103
|
if (tableSettings?.creationMode?.[propertyName] !== undefined ||
|
|
105
104
|
tableSettings?.analyticalConfiguration?.[propertyName] !== undefined) {
|
|
106
|
-
const def = schema?.properties?.[propertyName];
|
|
105
|
+
const def = (schema.properties && Object.keys(schema.properties).length > 0 ? schema?.properties?.[propertyName] : schema);
|
|
107
106
|
if (def) {
|
|
108
107
|
if (usePropertyName) {
|
|
109
|
-
(0, generate_1.addMessageToSchema)(def,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
(0, generate_1.addMessageToSchema)(def, {
|
|
109
|
+
text: i18next_1.default.t(message, {
|
|
110
|
+
propertyName: propertyToDisplay ?? propertyName,
|
|
111
|
+
tableType: getTableType(context)
|
|
112
|
+
}),
|
|
113
|
+
deletable: true
|
|
114
|
+
});
|
|
113
115
|
}
|
|
114
116
|
else {
|
|
115
|
-
(0, generate_1.addMessageToSchema)(def,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
(0, generate_1.addMessageToSchema)(def, {
|
|
118
|
+
text: i18next_1.default.t(message, {
|
|
119
|
+
entityName: propertyToDisplay ?? propertyName,
|
|
120
|
+
tableType: getTableType(context)
|
|
121
|
+
}),
|
|
122
|
+
deletable: true
|
|
123
|
+
});
|
|
119
124
|
}
|
|
120
125
|
}
|
|
121
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../../src/sync/common/rules.ts"],"names":[],"mappings":";;;;;;AACA,wEAAyE;AACzE,2DAAiE;AACjE,yCAAgD;AAEhD,sDAA8B;AAE9B,MAAM,kBAAkB,GAAG,gBAAW,CAAC,eAAe,CAAC;AAE1C,QAAA,qCAAqC,GAAc;IAC5D,IAAI,EAAE,iCAAQ,CAAC,gCAAgC;IAC/C,KAAK,EAAE,CAAC,OAAoB,EAAE,EAAE;QAC5B,OAAO,YAAY,CAAC,OAAO,CAAC,KAAK,gBAAW,CAAC,eAAe,CAAC;IACjE,CAAC;IACD,OAAO,EAAE,CAAC,OAAoB,EAAE,EAAE;QAC9B,MAAM,EACF,MAAM,EACN,UAAU,EAAE,EAAE,eAAe,EAAE,EAClC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YAAY,CAAC,KAAK,SAAS,EACtE,CAAC;QACC,MAAM,GAAG,GAAG,CACR,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,CACrF,CAAC;QAC5B,IAAI,GAAG,EAAE,CAAC;YACN,IAAI,eAAe,EAAE,CAAC;gBAClB,IAAA,6BAAkB,EAAC,GAAG,EAAE;oBACpB,IAAI,EAAE,iBAAO,CAAC,CAAC,CAAC,OAAO,EAAE;wBACrB,YAAY,EAAE,iBAAiB,IAAI,YAAY;wBAC/C,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC;qBACnC,CAAC;oBACF,SAAS,EAAE,IAAI;iBAClB,CAAC,CAAC;YACP,CAAC;iBAAM,CAAC;gBACJ,IAAA,6BAAkB,EAAC,GAAG,EAAE;oBACpB,IAAI,EAAE,iBAAO,CAAC,CAAC,CAAC,OAAO,EAAE;wBACrB,UAAU,EAAE,iBAAiB,IAAI,YAAY;wBAC7C,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC;qBACnC,CAAC;oBACF,SAAS,EAAE,IAAI;iBAClB,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,OAAO,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Definition } from 'typescript-json-schema';
|
|
2
2
|
import type { MetadataInstanceInterface } from './decoration/factory';
|
|
3
|
-
import type { Manifest, ExtensionLogger, FacetConfig, FacetConfigs, FacetSection, FileData, SchemaFilePath, FeatureToggle } from '@sap/ux-specification-types';
|
|
3
|
+
import type { Manifest, ExtensionLogger, FacetConfig, FacetConfigs, FacetSection, FileData, SchemaFilePath, FeatureToggle, AccessorPath } from '@sap/ux-specification-types';
|
|
4
4
|
import { TemplateType, v4, FioriElementsVersion, OdataVersion, PageTypeV2, PageTypeV4, SchemaType } from '@sap/ux-specification-types';
|
|
5
5
|
import type { DataField, DataFieldAbstractTypes, DataFieldForActionAbstractTypes, FacetTypes } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
6
6
|
import type { ConvertedMetadata, EntityType, PropertyPath, PropertyAnnotationValue } from '@sap-ux/vocabularies-types';
|
|
@@ -428,7 +428,6 @@ export declare function isFeatureSupported(featureToggles?: FeatureToggle[], fea
|
|
|
428
428
|
*
|
|
429
429
|
* @param {Definition} [schema] App-specific JSON schema.
|
|
430
430
|
* @param {string[]} [order] Order of properties.
|
|
431
|
-
* @returns {void} Updates app-specific JSON schema properties with indices.
|
|
432
431
|
*/
|
|
433
432
|
export declare function updatePropertyIndices(schema: Definition, order: string[]): void;
|
|
434
433
|
/**
|
|
@@ -493,4 +492,55 @@ export declare function convertSyncRulePathToJsonPath(syncRulePath: string, targ
|
|
|
493
492
|
* @returns A new JSONPath string with the segment appended
|
|
494
493
|
*/
|
|
495
494
|
export declare function appendJsonPathSegment(basePath: string, segment: string, prevSegment?: string): string;
|
|
495
|
+
export interface ManifestPathParams {
|
|
496
|
+
pageName: string | string[];
|
|
497
|
+
manifest: Manifest;
|
|
498
|
+
pathsParts?: unknown[];
|
|
499
|
+
targetAnnotation?: string;
|
|
500
|
+
targetAnnotationEncoded?: string;
|
|
501
|
+
sectionId?: string;
|
|
502
|
+
viewConfig?: {
|
|
503
|
+
key?: string;
|
|
504
|
+
entitySet?: string;
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Internal helper interface used while traversing a schema to resolve `manifestPath`.
|
|
509
|
+
*/
|
|
510
|
+
interface ManifestPropertyResolution {
|
|
511
|
+
/**
|
|
512
|
+
* Name of the parent property in the schema.
|
|
513
|
+
*/
|
|
514
|
+
name: string;
|
|
515
|
+
/**
|
|
516
|
+
* Manifest path derived from the sync rule.
|
|
517
|
+
*/
|
|
518
|
+
rulePath?: string;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Adds 'manifestPath' to each property in a definition based on metadata sync rules.
|
|
522
|
+
*
|
|
523
|
+
* @param controls - Array of control classes which contains sync rules.
|
|
524
|
+
* @param appSchema - Full schema.
|
|
525
|
+
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
526
|
+
* If `undefined`, the function attempts to resolve the definition name from the `$ref` property of the provided definition.
|
|
527
|
+
* @param definition - The definition object containing property schemas.
|
|
528
|
+
* @param pathParams - Additional context required to compute manifest paths.
|
|
529
|
+
* @param parentProperty - Information about the parent property used when resolving
|
|
530
|
+
* nested or inherited manifest paths (e.g. parent property name and resolved rule path).
|
|
531
|
+
*/
|
|
532
|
+
export declare function addManifestPathsToProperties(controls: Array<{
|
|
533
|
+
[key: string]: {
|
|
534
|
+
prototype: object;
|
|
535
|
+
};
|
|
536
|
+
}>, appSchema: Definition, definitionName: string | undefined, definition: Definition, pathParams: ManifestPathParams, parentProperty?: ManifestPropertyResolution): void;
|
|
537
|
+
/**
|
|
538
|
+
* Converts a JSONPath string into an array of accessors.
|
|
539
|
+
* Note: This is a copy of a similar implementation in tools-suite. In future we should find a way to use one single implementation of this function.
|
|
540
|
+
*
|
|
541
|
+
* @param path - The JSONPath string to convert.
|
|
542
|
+
* @returns An array of accessors representing the path.
|
|
543
|
+
*/
|
|
544
|
+
export declare function jsonPathToArray(path: string): AccessorPath;
|
|
545
|
+
export {};
|
|
496
546
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/sync/common/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EACR,QAAQ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B;AA8CD;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CACxC,QAAQ,EAAE,KAAK,CAAC;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,EACzD,SAAS,EAAE,UAAU,EACrB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,kBAAkB,EAC9B,cAAc,CAAC,EAAE,0BAA0B,GAC5C,IAAI,CAmDN;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CA2E1D"}
|
|
@@ -51,12 +51,15 @@ exports.getRefType = getRefType;
|
|
|
51
51
|
exports.compareTemplateNames = compareTemplateNames;
|
|
52
52
|
exports.convertSyncRulePathToJsonPath = convertSyncRulePathToJsonPath;
|
|
53
53
|
exports.appendJsonPathSegment = appendJsonPathSegment;
|
|
54
|
+
exports.addManifestPathsToProperties = addManifestPathsToProperties;
|
|
55
|
+
exports.jsonPathToArray = jsonPathToArray;
|
|
54
56
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
55
57
|
const i18next_1 = __importDefault(require("i18next"));
|
|
56
58
|
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
57
59
|
const annotation_converter_1 = require("@sap-ux/annotation-converter");
|
|
58
60
|
const edmx_parser_1 = require("@sap-ux/edmx-parser");
|
|
59
61
|
const extensionLogger_1 = require("../../extensionLogger");
|
|
62
|
+
const decoration_1 = require("./decoration");
|
|
60
63
|
exports.DEFINITION_LINK_PREFIX = '#/definitions/';
|
|
61
64
|
exports.V4_TEMPLATES = [
|
|
62
65
|
ux_specification_types_1.v4.FE_TEMPLATE_V4_LIST_REPORT,
|
|
@@ -950,7 +953,7 @@ function getODataVersionFromManifest(manifest) {
|
|
|
950
953
|
return ux_specification_types_1.OdataVersion.v2;
|
|
951
954
|
}
|
|
952
955
|
const dataSource = manifest[ux_specification_types_1.ManifestSection.app].dataSources?.[mainService];
|
|
953
|
-
return dataSource?.settings?.odataVersion
|
|
956
|
+
return dataSource?.settings?.odataVersion?.startsWith('4') ? ux_specification_types_1.OdataVersion.v4 : ux_specification_types_1.OdataVersion.v2;
|
|
954
957
|
}
|
|
955
958
|
/**
|
|
956
959
|
* Determines the template type of a V2 app.
|
|
@@ -1669,7 +1672,6 @@ function isFeatureSupported(featureToggles, feature) {
|
|
|
1669
1672
|
*
|
|
1670
1673
|
* @param {Definition} [schema] App-specific JSON schema.
|
|
1671
1674
|
* @param {string[]} [order] Order of properties.
|
|
1672
|
-
* @returns {void} Updates app-specific JSON schema properties with indices.
|
|
1673
1675
|
*/
|
|
1674
1676
|
function updatePropertyIndices(schema, order) {
|
|
1675
1677
|
order.forEach((propertyName, index) => {
|
|
@@ -1787,13 +1789,14 @@ function convertSyncRulePathToJsonPath(syncRulePath, targetAnnotation, targetAnn
|
|
|
1787
1789
|
let jsonPath = '$';
|
|
1788
1790
|
let prevSegment = undefined;
|
|
1789
1791
|
for (const segment of pathParts) {
|
|
1790
|
-
// Replace encoded annotation(like '::' -> '/')
|
|
1791
|
-
const resolvedSegment = segment
|
|
1792
|
+
// Replace encoded annotation(like '::' -> '/') and '??' -> '/'
|
|
1793
|
+
const resolvedSegment = getDecodedPathElement(segment, targetAnnotation, targetAnnotationEncoded);
|
|
1792
1794
|
jsonPath = appendJsonPathSegment(jsonPath, resolvedSegment, prevSegment);
|
|
1793
1795
|
prevSegment = resolvedSegment;
|
|
1794
1796
|
}
|
|
1795
1797
|
return jsonPath;
|
|
1796
1798
|
}
|
|
1799
|
+
const ESCAPE_CHAR = '\\';
|
|
1797
1800
|
/**
|
|
1798
1801
|
* Appends a single segment to an existing JSONPath string.
|
|
1799
1802
|
*
|
|
@@ -1818,6 +1821,174 @@ function appendJsonPathSegment(basePath, segment, prevSegment) {
|
|
|
1818
1821
|
return `${basePath}.${segment}`;
|
|
1819
1822
|
}
|
|
1820
1823
|
// Otherwise, use bracket notation with quotes
|
|
1821
|
-
|
|
1824
|
+
const escapedSegment = segment.includes('"') || segment.includes(ESCAPE_CHAR)
|
|
1825
|
+
? segment.replaceAll(ESCAPE_CHAR, ESCAPE_CHAR + ESCAPE_CHAR).replaceAll('"', ESCAPE_CHAR + '"')
|
|
1826
|
+
: segment;
|
|
1827
|
+
return `${basePath}["${escapedSegment}"]`;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Finds the control class object for a given definition name from an array of control objects.
|
|
1831
|
+
*
|
|
1832
|
+
* @param controls - Array of control objects, each mapping definition names to class objects.
|
|
1833
|
+
* @param definitionName - The name of the definition/class to look for.
|
|
1834
|
+
* @returns The control class object, or undefined if not found.
|
|
1835
|
+
*/
|
|
1836
|
+
function findClassControl(controls, definitionName) {
|
|
1837
|
+
if (definitionName) {
|
|
1838
|
+
for (const control of controls) {
|
|
1839
|
+
if (control[definitionName]) {
|
|
1840
|
+
return control[definitionName];
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Resolves the manifest rule path for a property, handling parent property chaining.
|
|
1847
|
+
*
|
|
1848
|
+
* @param rule - The sync rule object containing the manifest path function.
|
|
1849
|
+
* @param pathParams - Parameters for manifest path resolution.
|
|
1850
|
+
* @param parentProperty - Optional parent property resolution info.
|
|
1851
|
+
* @returns The resolved manifest rule path as a string.
|
|
1852
|
+
*/
|
|
1853
|
+
function resolveManifestRulePath(rule, pathParams, parentProperty) {
|
|
1854
|
+
let rulePath = rule?.manifest?.path(Array.isArray(pathParams.pageName) ? pathParams.pageName : [pathParams.pageName], pathParams.manifest, ...(pathParams.pathsParts ?? []));
|
|
1855
|
+
if (rulePath === parentProperty?.rulePath) {
|
|
1856
|
+
rulePath = `${rulePath}/${parentProperty.name}`;
|
|
1857
|
+
}
|
|
1858
|
+
return rulePath;
|
|
1859
|
+
}
|
|
1860
|
+
/**
|
|
1861
|
+
* Adds 'manifestPath' to each property in a definition based on metadata sync rules.
|
|
1862
|
+
*
|
|
1863
|
+
* @param controls - Array of control classes which contains sync rules.
|
|
1864
|
+
* @param appSchema - Full schema.
|
|
1865
|
+
* @param definitionName - The name of the definition/class whose properties are being processed.
|
|
1866
|
+
* If `undefined`, the function attempts to resolve the definition name from the `$ref` property of the provided definition.
|
|
1867
|
+
* @param definition - The definition object containing property schemas.
|
|
1868
|
+
* @param pathParams - Additional context required to compute manifest paths.
|
|
1869
|
+
* @param parentProperty - Information about the parent property used when resolving
|
|
1870
|
+
* nested or inherited manifest paths (e.g. parent property name and resolved rule path).
|
|
1871
|
+
*/
|
|
1872
|
+
function addManifestPathsToProperties(controls, appSchema, definitionName, definition, pathParams, parentProperty) {
|
|
1873
|
+
// If `definitionName` is undefined, attempt to resolve it from the definition's `$ref`
|
|
1874
|
+
if (definitionName === undefined && definition.$ref) {
|
|
1875
|
+
const innerDefinitionKey = getDefinitionKey(definition.$ref);
|
|
1876
|
+
const innerDefinition = appSchema.definitions[innerDefinitionKey];
|
|
1877
|
+
if (innerDefinition && (!innerDefinition.isViewNode || !parentProperty)) {
|
|
1878
|
+
definition = innerDefinition;
|
|
1879
|
+
definitionName = innerDefinitionKey;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
// Resolve root definition name in case if reference has syntax like `definitionName<annotation>`
|
|
1883
|
+
if (definitionName?.includes('<')) {
|
|
1884
|
+
definitionName = definitionName.split('<')[0];
|
|
1885
|
+
}
|
|
1886
|
+
if (!definition.properties && definition.$ref) {
|
|
1887
|
+
const innerDefinition = getDefinitionKey(definition.$ref);
|
|
1888
|
+
definition = appSchema.definitions?.[innerDefinition] ?? definition;
|
|
1889
|
+
}
|
|
1890
|
+
const classControl = findClassControl(controls, definitionName);
|
|
1891
|
+
if (classControl) {
|
|
1892
|
+
for (const property in definition.properties ?? {}) {
|
|
1893
|
+
const rule = (0, decoration_1.getReflectMetadata)(classControl.prototype, property);
|
|
1894
|
+
const propertySchema = definition.properties[property];
|
|
1895
|
+
if (propertySchema.isViewNode) {
|
|
1896
|
+
continue;
|
|
1897
|
+
}
|
|
1898
|
+
const propertyPath = {
|
|
1899
|
+
name: property
|
|
1900
|
+
};
|
|
1901
|
+
if (rule?.manifest?.path) {
|
|
1902
|
+
const rulePath = resolveManifestRulePath(rule, pathParams, parentProperty);
|
|
1903
|
+
const manifestPath = `${rulePath}/${property}`;
|
|
1904
|
+
propertySchema.manifestPath = convertSyncRulePathToJsonPath(manifestPath, pathParams.targetAnnotation, pathParams.targetAnnotationEncoded);
|
|
1905
|
+
propertyPath.rulePath = rulePath;
|
|
1906
|
+
}
|
|
1907
|
+
// Recursively apply manifest paths to inner properties
|
|
1908
|
+
addManifestPathsToProperties(controls, appSchema, undefined, propertySchema, pathParams, propertyPath);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
// Recursively apply manifest paths to properties inside `anyOf` variants
|
|
1912
|
+
if (definition.anyOf) {
|
|
1913
|
+
for (const schemaVariant of definition.anyOf) {
|
|
1914
|
+
if (typeof schemaVariant === 'object') {
|
|
1915
|
+
addManifestPathsToProperties(controls, appSchema, undefined, schemaVariant, pathParams, parentProperty);
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Converts a JSONPath string into an array of accessors.
|
|
1922
|
+
* Note: This is a copy of a similar implementation in tools-suite. In future we should find a way to use one single implementation of this function.
|
|
1923
|
+
*
|
|
1924
|
+
* @param path - The JSONPath string to convert.
|
|
1925
|
+
* @returns An array of accessors representing the path.
|
|
1926
|
+
*/
|
|
1927
|
+
function jsonPathToArray(path) {
|
|
1928
|
+
if (!path.startsWith('$')) {
|
|
1929
|
+
throw new Error('Invalid JSONPath: must start with $');
|
|
1930
|
+
}
|
|
1931
|
+
const result = [];
|
|
1932
|
+
let i = 1; // skip '$'
|
|
1933
|
+
while (i < path.length) {
|
|
1934
|
+
const char = path[i];
|
|
1935
|
+
// Dot notation: .key
|
|
1936
|
+
if (char === '.') {
|
|
1937
|
+
i++;
|
|
1938
|
+
const start = i;
|
|
1939
|
+
while (i < path.length && /[A-Za-z0-9_$]/.test(path[i])) {
|
|
1940
|
+
i++;
|
|
1941
|
+
}
|
|
1942
|
+
result.push(path.slice(start, i));
|
|
1943
|
+
continue;
|
|
1944
|
+
}
|
|
1945
|
+
// Bracket notation: ['key'] or [0]
|
|
1946
|
+
if (char === '[') {
|
|
1947
|
+
i++;
|
|
1948
|
+
// Quoted key
|
|
1949
|
+
if (path[i] === '"' || path[i] === "'") {
|
|
1950
|
+
const quote = path[i++];
|
|
1951
|
+
const start = i;
|
|
1952
|
+
// Collect positions of escape characters within the quoted key
|
|
1953
|
+
const escapeCharPositions = [];
|
|
1954
|
+
while (i < path.length) {
|
|
1955
|
+
if (path[i] === ESCAPE_CHAR) {
|
|
1956
|
+
escapeCharPositions.push(i - start);
|
|
1957
|
+
i++; // skip escaped character
|
|
1958
|
+
}
|
|
1959
|
+
else if (path[i] === quote) {
|
|
1960
|
+
break; // end of quoted key
|
|
1961
|
+
}
|
|
1962
|
+
i++;
|
|
1963
|
+
}
|
|
1964
|
+
// Cut out the string representing of the quoted key
|
|
1965
|
+
const segment = path.slice(start, i);
|
|
1966
|
+
// segment may still contain escape characters, need to remove them.
|
|
1967
|
+
let currentStart = 0;
|
|
1968
|
+
let segmentReduced = '';
|
|
1969
|
+
for (const pos of escapeCharPositions) {
|
|
1970
|
+
segmentReduced += segment.slice(currentStart, pos);
|
|
1971
|
+
currentStart = pos + 1;
|
|
1972
|
+
}
|
|
1973
|
+
segmentReduced += segment.slice(currentStart);
|
|
1974
|
+
result.push(segmentReduced);
|
|
1975
|
+
i += 2; // skip closing quote + ]
|
|
1976
|
+
continue;
|
|
1977
|
+
}
|
|
1978
|
+
// Numeric index
|
|
1979
|
+
const start = i;
|
|
1980
|
+
while (i < path.length && path[i] !== ']') {
|
|
1981
|
+
i++;
|
|
1982
|
+
}
|
|
1983
|
+
const index = Number(path.slice(start, i));
|
|
1984
|
+
if (!Number.isNaN(index)) {
|
|
1985
|
+
result.push(index);
|
|
1986
|
+
}
|
|
1987
|
+
i++; // skip ]
|
|
1988
|
+
continue;
|
|
1989
|
+
}
|
|
1990
|
+
i++;
|
|
1991
|
+
}
|
|
1992
|
+
return result;
|
|
1822
1993
|
}
|
|
1823
1994
|
//# sourceMappingURL=utils.js.map
|