@sap/ux-ui5-tooling 1.20.4 → 1.22.0
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 +60 -0
- package/dist/adp-tooling/templates/cf/_gitignore +6 -0
- package/dist/adp-tooling/templates/cf/approuter/package.json +13 -0
- package/dist/adp-tooling/templates/cf/approuter/xs-app.json +15 -0
- package/dist/adp-tooling/templates/cf/i18n/i18n.properties +3 -0
- package/dist/adp-tooling/templates/cf/package.json +35 -0
- package/dist/adp-tooling/templates/cf/ui5.yaml +5 -0
- package/dist/adp-tooling/templates/cf/xs-security.json +7 -0
- package/dist/adp-tooling/templates/changes/annotation.xml +18 -0
- package/dist/adp-tooling/templates/project/gitignore.tmpl +5 -0
- package/dist/adp-tooling/templates/project/package.json +31 -0
- package/dist/adp-tooling/templates/project/ui5.yaml +6 -0
- package/dist/adp-tooling/templates/project/webapp/i18n/i18n.properties +6 -0
- package/dist/adp-tooling/templates/project/webapp/manifest.appdescr_variant +10 -0
- package/dist/adp-tooling/templates/rta/common/analytical-custom-column.xml +25 -0
- package/dist/adp-tooling/templates/rta/common/custom-action.xml +8 -0
- package/dist/adp-tooling/templates/rta/common/grid-tree-custom-column.xml +22 -0
- package/dist/adp-tooling/templates/rta/common/header-field.xml +13 -0
- package/dist/adp-tooling/templates/rta/common/op-custom-section.xml +20 -0
- package/dist/adp-tooling/templates/rta/common/v4-table-action.xml +8 -0
- package/dist/adp-tooling/templates/rta/controller.ejs +80 -0
- package/dist/adp-tooling/templates/rta/fragment.xml +7 -0
- package/dist/adp-tooling/templates/rta/ts-controller.ejs +18 -0
- package/dist/adp-tooling/templates/rta/v2/m-table-custom-column-cell.xml +7 -0
- package/dist/adp-tooling/templates/rta/v2/m-table-custom-column.xml +18 -0
- package/dist/adp-tooling/templates/rta/v4/custom-section.xml +12 -0
- package/dist/adp-tooling/templates/rta/v4/mdc-custom-column-config.xml +6 -0
- package/dist/adp-tooling/templates/rta/v4/mdc-custom-column.xml +11 -0
- package/dist/adp-tooling/templates/typescript/tsconfig.json +19 -0
- package/dist/cli/index.js +17761 -11603
- package/dist/control-property-editor/app.css +2 -0
- package/dist/control-property-editor/app.js +175 -0
- package/dist/livereload-js/livereload.js +3795 -0
- package/dist/middlewares/fiori-tools-appreload.js +44007 -41669
- package/dist/middlewares/fiori-tools-preview.js +66889 -4176
- package/dist/middlewares/fiori-tools-proxy.js +38049 -5767
- package/dist/middlewares/fiori-tools-servestatic.js +32893 -347
- package/dist/preview-middleware/dist/client/adp/add-fragment.js +48 -0
- package/dist/preview-middleware/dist/client/adp/add-fragment.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/api-handler.js +165 -0
- package/dist/preview-middleware/dist/client/adp/api-handler.ts +191 -0
- package/dist/preview-middleware/dist/client/adp/command-executor.js +100 -0
- package/dist/preview-middleware/dist/client/adp/command-executor.ts +105 -0
- package/dist/preview-middleware/dist/client/adp/control-utils.js +46 -0
- package/dist/preview-middleware/dist/client/adp/control-utils.ts +48 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.js +198 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.ts +232 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.js +223 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.ts +257 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.js +195 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.ts +264 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.js +146 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.ts +209 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.js +232 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +306 -0
- package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.js +187 -0
- package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.ts +254 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.js +330 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.ts +408 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.js +160 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.ts +195 -0
- package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.js +68 -0
- package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.ts +86 -0
- package/dist/preview-middleware/dist/client/adp/controllers/types.js +2 -0
- package/dist/preview-middleware/dist/client/adp/controllers/types.ts +10 -0
- package/dist/preview-middleware/dist/client/adp/dialog-factory.js +151 -0
- package/dist/preview-middleware/dist/client/adp/dialog-factory.ts +210 -0
- package/dist/preview-middleware/dist/client/adp/extend-controller.js +48 -0
- package/dist/preview-middleware/dist/client/adp/extend-controller.ts +49 -0
- package/dist/preview-middleware/dist/client/adp/extension-point.js +83 -0
- package/dist/preview-middleware/dist/client/adp/extension-point.ts +116 -0
- package/dist/preview-middleware/dist/client/adp/init-dialogs.js +142 -0
- package/dist/preview-middleware/dist/client/adp/init-dialogs.ts +178 -0
- package/dist/preview-middleware/dist/client/adp/init.js +111 -0
- package/dist/preview-middleware/dist/client/adp/init.ts +92 -0
- package/dist/preview-middleware/dist/client/adp/ovp-window-functions.js +130 -0
- package/dist/preview-middleware/dist/client/adp/ovp-window-functions.ts +171 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +97 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.ts +140 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.js +74 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.ts +92 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.js +171 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +174 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.js +56 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.ts +56 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.js +41 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.js +69 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.ts +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.js +20 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.ts +7 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.js +25 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.ts +7 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.js +26 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.ts +18 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.js +2 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.ts +19 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +82 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.ts +87 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +69 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.ts +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +103 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +105 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.js +111 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +110 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +108 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +141 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +80 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +93 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +79 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +102 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.ts +98 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +61 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +77 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +95 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +102 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts +116 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.js +79 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.ts +121 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.js +138 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.ts +134 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +140 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.ts +181 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.ts +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +90 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +97 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.js +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.ts +98 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.js +129 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.ts +149 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.js +142 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.ts +178 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +83 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts +96 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +58 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +70 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +96 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +55 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.ts +61 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.js +73 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.ts +91 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +91 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +88 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.js +62 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.ts +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.js +158 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.ts +175 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/load.js +46 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/load.ts +23 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.js +64 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.ts +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.js +44 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/supported-ui5versions.md +40 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.js +372 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.ts +433 -0
- package/dist/preview-middleware/dist/client/adp/sync-views-utils.js +123 -0
- package/dist/preview-middleware/dist/client/adp/sync-views-utils.ts +90 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddAction.fragment.xml +49 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddCustomFragment.fragment.xml +48 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddFragment.fragment.xml +83 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddSubpage.fragment.xml +73 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddTableColumnFragments.fragment.xml +63 -0
- package/dist/preview-middleware/dist/client/adp/ui/ControllerExtension.fragment.xml +63 -0
- package/dist/preview-middleware/dist/client/adp/ui/ExtensionPoint.fragment.xml +61 -0
- package/dist/preview-middleware/dist/client/adp/ui/FileExistsDialog.fragment.xml +43 -0
- package/dist/preview-middleware/dist/client/adp/utils.js +199 -0
- package/dist/preview-middleware/dist/client/adp/utils.ts +200 -0
- package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.js +85 -0
- package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.ts +107 -0
- package/dist/preview-middleware/dist/client/cpe/changes/flex-change.js +66 -0
- package/dist/preview-middleware/dist/client/cpe/changes/flex-change.ts +66 -0
- package/dist/preview-middleware/dist/client/cpe/changes/generic-change.js +321 -0
- package/dist/preview-middleware/dist/client/cpe/changes/generic-change.ts +462 -0
- package/dist/preview-middleware/dist/client/cpe/changes/index.js +12 -0
- package/dist/preview-middleware/dist/client/cpe/changes/index.ts +1 -0
- package/dist/preview-middleware/dist/client/cpe/changes/service.js +527 -0
- package/dist/preview-middleware/dist/client/cpe/changes/service.ts +595 -0
- package/dist/preview-middleware/dist/client/cpe/changes/validator.js +41 -0
- package/dist/preview-middleware/dist/client/cpe/changes/validator.ts +35 -0
- package/dist/preview-middleware/dist/client/cpe/communication-service.js +44 -0
- package/dist/preview-middleware/dist/client/cpe/communication-service.ts +41 -0
- package/dist/preview-middleware/dist/client/cpe/connector-service.js +88 -0
- package/dist/preview-middleware/dist/client/cpe/connector-service.ts +74 -0
- package/dist/preview-middleware/dist/client/cpe/context-menu-service.js +90 -0
- package/dist/preview-middleware/dist/client/cpe/context-menu-service.ts +77 -0
- package/dist/preview-middleware/dist/client/cpe/control-data.js +366 -0
- package/dist/preview-middleware/dist/client/cpe/control-data.ts +400 -0
- package/dist/preview-middleware/dist/client/cpe/documentation.js +191 -0
- package/dist/preview-middleware/dist/client/cpe/documentation.ts +187 -0
- package/dist/preview-middleware/dist/client/cpe/feature-service.js +39 -0
- package/dist/preview-middleware/dist/client/cpe/feature-service.ts +25 -0
- package/dist/preview-middleware/dist/client/cpe/init.js +92 -0
- package/dist/preview-middleware/dist/client/cpe/init.ts +114 -0
- package/dist/preview-middleware/dist/client/cpe/logger.js +32 -0
- package/dist/preview-middleware/dist/client/cpe/logger.ts +24 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.js +136 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.ts +160 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.js +63 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.ts +52 -0
- package/dist/preview-middleware/dist/client/cpe/outline/editable.js +38 -0
- package/dist/preview-middleware/dist/client/cpe/outline/editable.ts +30 -0
- package/dist/preview-middleware/dist/client/cpe/outline/nodes.js +212 -0
- package/dist/preview-middleware/dist/client/cpe/outline/nodes.ts +236 -0
- package/dist/preview-middleware/dist/client/cpe/outline/service.js +62 -0
- package/dist/preview-middleware/dist/client/cpe/outline/service.ts +66 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.js +161 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.ts +184 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.js +145 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.ts +157 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.js +94 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.ts +113 -0
- package/dist/preview-middleware/dist/client/cpe/rta-service.js +94 -0
- package/dist/preview-middleware/dist/client/cpe/rta-service.ts +86 -0
- package/dist/preview-middleware/dist/client/cpe/selection.js +249 -0
- package/dist/preview-middleware/dist/client/cpe/selection.ts +267 -0
- package/dist/preview-middleware/dist/client/cpe/ui5-utils.js +35 -0
- package/dist/preview-middleware/dist/client/cpe/ui5-utils.ts +28 -0
- package/dist/preview-middleware/dist/client/cpe/utils.js +113 -0
- package/dist/preview-middleware/dist/client/cpe/utils.ts +162 -0
- package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.js +97 -0
- package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.ts +101 -0
- package/dist/preview-middleware/dist/client/flp/common.js +30 -0
- package/dist/preview-middleware/dist/client/flp/common.ts +28 -0
- package/dist/preview-middleware/dist/client/flp/enableFakeConnector.js +92 -0
- package/dist/preview-middleware/dist/client/flp/enableFakeConnector.ts +113 -0
- package/dist/preview-middleware/dist/client/flp/homepage/Component.js +16 -0
- package/dist/preview-middleware/dist/client/flp/homepage/Component.ts +10 -0
- package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.js +54 -0
- package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.ts +41 -0
- package/dist/preview-middleware/dist/client/flp/homepage/css/style.css +3 -0
- package/dist/preview-middleware/dist/client/flp/homepage/manifest.json +41 -0
- package/dist/preview-middleware/dist/client/flp/homepage/view/MyHome.view.xml +18 -0
- package/dist/preview-middleware/dist/client/flp/init.js +418 -0
- package/dist/preview-middleware/dist/client/flp/init.ts +448 -0
- package/dist/preview-middleware/dist/client/flp/initCdm.js +117 -0
- package/dist/preview-middleware/dist/client/flp/initCdm.ts +111 -0
- package/dist/preview-middleware/dist/client/flp/initConnectors.js +31 -0
- package/dist/preview-middleware/dist/client/flp/initConnectors.ts +20 -0
- package/dist/preview-middleware/dist/client/flp/initRta.js +180 -0
- package/dist/preview-middleware/dist/client/flp/initRta.ts +194 -0
- package/dist/preview-middleware/dist/client/i18n.js +56 -0
- package/dist/preview-middleware/dist/client/i18n.ts +49 -0
- package/dist/preview-middleware/dist/client/manifest.json +8 -0
- package/dist/preview-middleware/dist/client/messagebundle.properties +143 -0
- package/dist/preview-middleware/dist/client/thirdparty/@sap-ux-private/control-property-editor-common.js +486 -0
- package/dist/preview-middleware/dist/client/utils/additional-change-info.js +69 -0
- package/dist/preview-middleware/dist/client/utils/additional-change-info.ts +73 -0
- package/dist/preview-middleware/dist/client/utils/application.js +34 -0
- package/dist/preview-middleware/dist/client/utils/application.ts +27 -0
- package/dist/preview-middleware/dist/client/utils/core.js +144 -0
- package/dist/preview-middleware/dist/client/utils/core.ts +145 -0
- package/dist/preview-middleware/dist/client/utils/error.js +28 -0
- package/dist/preview-middleware/dist/client/utils/error.ts +18 -0
- package/dist/preview-middleware/dist/client/utils/fe-v2.js +58 -0
- package/dist/preview-middleware/dist/client/utils/fe-v2.ts +61 -0
- package/dist/preview-middleware/dist/client/utils/fe-v4.js +168 -0
- package/dist/preview-middleware/dist/client/utils/fe-v4.ts +186 -0
- package/dist/preview-middleware/dist/client/utils/info-center-message.js +60 -0
- package/dist/preview-middleware/dist/client/utils/info-center-message.ts +60 -0
- package/dist/preview-middleware/dist/client/utils/version.js +126 -0
- package/dist/preview-middleware/dist/client/utils/version.ts +138 -0
- package/dist/preview-middleware/templates/flp/cdm.base.json +47 -0
- package/dist/preview-middleware/templates/flp/cdm.ejs +72 -0
- package/dist/preview-middleware/templates/flp/editor.ejs +28 -0
- package/dist/preview-middleware/templates/flp/sandbox.ejs +88 -0
- package/dist/preview-middleware/templates/flp/sandbox2.ejs +86 -0
- package/dist/preview-middleware/templates/test/qunit.ejs +26 -0
- package/dist/preview-middleware/templates/test/qunit.js +29 -0
- package/dist/preview-middleware/templates/test/testsuite.qunit.ejs +10 -0
- package/dist/preview-middleware/templates/test/testsuite.qunit.js +8 -0
- package/dist/tasks/cf-deploy/index.js +3916 -3521
- package/dist/tasks/deploy/index.js +17204 -11133
- package/package.json +36 -39
- package/prebuilds/keyring.darwin-arm64.node +0 -0
- package/prebuilds/keyring.darwin-x64.node +0 -0
- package/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
- package/prebuilds/keyring.linux-arm64-gnu.node +0 -0
- package/prebuilds/keyring.linux-arm64-musl.node +0 -0
- package/prebuilds/keyring.linux-ia32-gnu.node +0 -0
- package/prebuilds/keyring.linux-x64-gnu.node +0 -0
- package/prebuilds/keyring.linux-x64-musl.node +0 -0
- package/prebuilds/keyring.win32-arm64-msvc.node +0 -0
- package/prebuilds/keyring.win32-ia32-msvc.node +0 -0
- package/prebuilds/keyring.win32-x64-msvc.node +0 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { OutlineNode } from '@sap-ux-private/control-property-editor-common';
|
|
2
|
+
import type { OutlineViewNode } from 'sap/ui/rta/command/OutlineService';
|
|
3
|
+
import type { Scenario } from 'sap/ui/fl/Scenario';
|
|
4
|
+
import Log from 'sap/base/Log';
|
|
5
|
+
|
|
6
|
+
import { getControlById } from '../../utils/core';
|
|
7
|
+
import { getError } from '../../utils/error';
|
|
8
|
+
|
|
9
|
+
import type { ControlTreeIndex } from '../types';
|
|
10
|
+
import { getOverlay } from '../utils';
|
|
11
|
+
|
|
12
|
+
import { isEditable } from './editable';
|
|
13
|
+
import type { ChangeService } from '../changes';
|
|
14
|
+
import { getConfigMapControlIdMap, getPageName } from '../../utils/fe-v4';
|
|
15
|
+
|
|
16
|
+
interface AdditionalData {
|
|
17
|
+
text?: string;
|
|
18
|
+
technicalName?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves additional data for a given control ID.
|
|
23
|
+
*
|
|
24
|
+
* @param id The unique identifier of the control.
|
|
25
|
+
* @returns An object containing the text and the technical name of the control.
|
|
26
|
+
*/
|
|
27
|
+
function getAdditionalData(id: string): AdditionalData {
|
|
28
|
+
const control = getControlById(id);
|
|
29
|
+
if (!control) {
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const metadata = control.getMetadata();
|
|
34
|
+
const details: AdditionalData = {};
|
|
35
|
+
|
|
36
|
+
const technicalName = metadata.getElementName();
|
|
37
|
+
if (technicalName) {
|
|
38
|
+
details.technicalName = technicalName;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (metadata.getProperty('text')) {
|
|
42
|
+
const text = control.getProperty('text');
|
|
43
|
+
if (typeof text === 'string' && text.trim() !== '') {
|
|
44
|
+
details.text = text;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return details;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Gets the children nodes of an aggregation type node.
|
|
53
|
+
*
|
|
54
|
+
* @param current The current node to retrieve children from
|
|
55
|
+
* @returns An array of children nodes, or an empty array if none are found
|
|
56
|
+
*/
|
|
57
|
+
function getChildren(current: OutlineViewNode): OutlineViewNode[] {
|
|
58
|
+
return (current.elements ?? []).flatMap((element: OutlineViewNode) => {
|
|
59
|
+
if (element.type === 'aggregation') {
|
|
60
|
+
return element.elements ?? [];
|
|
61
|
+
} else if (element.type === 'extensionPoint') {
|
|
62
|
+
return [element];
|
|
63
|
+
}
|
|
64
|
+
return [];
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Adds a new child node to the extension point's children array based on the given control ID.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} id - The unique identifier of the control to be added as a child node.
|
|
72
|
+
* @param {OutlineNode[]} children - The array of children nodes to which the new node will be added.
|
|
73
|
+
* @param {ChangeService} changeService - Change service for change stack event handling.
|
|
74
|
+
*/
|
|
75
|
+
function addChildToExtensionPoint(id: string, children: OutlineNode[], changeService: ChangeService) {
|
|
76
|
+
const { text, technicalName } = getAdditionalData(id);
|
|
77
|
+
const editable = isEditable(changeService, id);
|
|
78
|
+
|
|
79
|
+
children.push({
|
|
80
|
+
controlId: id,
|
|
81
|
+
controlType: technicalName ?? 'sap.ui.extensionpoint.child',
|
|
82
|
+
name: text ?? id,
|
|
83
|
+
visible: true,
|
|
84
|
+
editable,
|
|
85
|
+
children: [],
|
|
86
|
+
hasDefaultContent: false
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Creates control index for all controls in the app.
|
|
91
|
+
*
|
|
92
|
+
* @param {ControlTreeIndex} controlIndex - Control index for the ui5 app.
|
|
93
|
+
* @param {OutlineNode} node - control node added to the outline.
|
|
94
|
+
*/
|
|
95
|
+
function indexNode(controlIndex: ControlTreeIndex, node: OutlineNode): void {
|
|
96
|
+
const indexedControls = controlIndex[node.controlType];
|
|
97
|
+
if (indexedControls) {
|
|
98
|
+
indexedControls.push(node);
|
|
99
|
+
} else {
|
|
100
|
+
controlIndex[node.controlType] = [node];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function addToPropertyIdMap(node: OutlineNode, propertyIdMap: Map<string, string[]>): void {
|
|
105
|
+
const control = getControlById(node.controlId);
|
|
106
|
+
if (control) {
|
|
107
|
+
const overlay = getOverlay(control);
|
|
108
|
+
const overlayData = overlay?.getDesignTimeMetadata().getData();
|
|
109
|
+
if (!overlayData?.manifestPropertyPath) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (overlayData) {
|
|
113
|
+
const path = overlayData?.manifestPropertyPath?.(control);
|
|
114
|
+
const pageName = getPageName(control);
|
|
115
|
+
const key = getConfigMapControlIdMap(
|
|
116
|
+
pageName,
|
|
117
|
+
path.split('/').filter((item) => item)
|
|
118
|
+
);
|
|
119
|
+
if (key) {
|
|
120
|
+
if (!propertyIdMap.get(key)) {
|
|
121
|
+
propertyIdMap.set(key, []);
|
|
122
|
+
}
|
|
123
|
+
propertyIdMap.get(key)?.push(node.controlId);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Transform node.
|
|
131
|
+
*
|
|
132
|
+
* @param input outline view node
|
|
133
|
+
* @param scenario type of project
|
|
134
|
+
* @param controlIndex Control tree index
|
|
135
|
+
* @param changeService ChangeService for change stack event handling.
|
|
136
|
+
* @param propertyIdMap ChangeService for change stack event handling.
|
|
137
|
+
* @returns transformed outline tree nodes
|
|
138
|
+
*/
|
|
139
|
+
export async function transformNodes(
|
|
140
|
+
input: OutlineViewNode[],
|
|
141
|
+
scenario: Scenario,
|
|
142
|
+
controlIndex: ControlTreeIndex,
|
|
143
|
+
changeService: ChangeService,
|
|
144
|
+
propertyIdMap: Map<string, string[]>
|
|
145
|
+
): Promise<OutlineNode[]> {
|
|
146
|
+
const stack = [...input];
|
|
147
|
+
const items: OutlineNode[] = [];
|
|
148
|
+
while (stack.length) {
|
|
149
|
+
try {
|
|
150
|
+
const current = stack.shift();
|
|
151
|
+
const editable = isEditable(changeService, current?.id);
|
|
152
|
+
const isAdp = scenario === 'ADAPTATION_PROJECT';
|
|
153
|
+
const isExtPoint = current?.type === 'extensionPoint';
|
|
154
|
+
|
|
155
|
+
if (current?.type === 'element') {
|
|
156
|
+
const children = getChildren(current);
|
|
157
|
+
const { text } = getAdditionalData(current.id);
|
|
158
|
+
const technicalName = current.technicalName.split('.').slice(-1)[0];
|
|
159
|
+
|
|
160
|
+
const transformedChildren = isAdp
|
|
161
|
+
? await handleDuplicateNodes(children, scenario, controlIndex, changeService, propertyIdMap)
|
|
162
|
+
: await transformNodes(children, scenario, controlIndex, changeService, propertyIdMap);
|
|
163
|
+
const node: OutlineNode = {
|
|
164
|
+
controlId: current.id,
|
|
165
|
+
controlType: current.technicalName,
|
|
166
|
+
name: text ?? technicalName,
|
|
167
|
+
editable,
|
|
168
|
+
visible: current.visible ?? true,
|
|
169
|
+
children: transformedChildren
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
indexNode(controlIndex, node);
|
|
173
|
+
addToPropertyIdMap(node, propertyIdMap);
|
|
174
|
+
|
|
175
|
+
items.push(node);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (isAdp && isExtPoint) {
|
|
179
|
+
const { defaultContent = [], createdControls = [] } = current.extensionPointInfo;
|
|
180
|
+
|
|
181
|
+
const children: OutlineNode[] = [];
|
|
182
|
+
// We can combine both because there can only be either defaultContent or createdControls for one extension point node.
|
|
183
|
+
[...defaultContent, ...createdControls].forEach((id: string) => {
|
|
184
|
+
addChildToExtensionPoint(id, children, changeService);
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
const node: OutlineNode = {
|
|
188
|
+
controlId: `${current.id}--${current.name ?? ''}`,
|
|
189
|
+
controlType: current.technicalName,
|
|
190
|
+
name: current.name ?? '',
|
|
191
|
+
editable,
|
|
192
|
+
visible: current.visible ?? true,
|
|
193
|
+
children,
|
|
194
|
+
hasDefaultContent: defaultContent.length > 0
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
items.push(node);
|
|
198
|
+
}
|
|
199
|
+
} catch (error) {
|
|
200
|
+
Log.error('Failed to transform outline node!', getError(error));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return items;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Handles duplicate nodes that are retrieved from extension point default content and created controls,
|
|
208
|
+
* if they exist under an extension point these controls are removed from the children array
|
|
209
|
+
*
|
|
210
|
+
* @param children outline view node children
|
|
211
|
+
* @param scenario type of project
|
|
212
|
+
* @param controlIndex Control tree index
|
|
213
|
+
* @param changeService ChangeService for change stack event handling.
|
|
214
|
+
* @param propertyIdMap Map<string, string[]>.
|
|
215
|
+
* @returns transformed outline tree nodes
|
|
216
|
+
*/
|
|
217
|
+
export async function handleDuplicateNodes(
|
|
218
|
+
children: OutlineViewNode[],
|
|
219
|
+
scenario: Scenario,
|
|
220
|
+
controlIndex: ControlTreeIndex,
|
|
221
|
+
changeService: ChangeService,
|
|
222
|
+
propertyIdMap: Map<string, string[]>
|
|
223
|
+
): Promise<OutlineNode[]> {
|
|
224
|
+
const extPointIDs = new Set<string>();
|
|
225
|
+
|
|
226
|
+
children.forEach((child: OutlineViewNode) => {
|
|
227
|
+
if (child.type === 'extensionPoint') {
|
|
228
|
+
const { defaultContent = [], createdControls = [] } = child.extensionPointInfo;
|
|
229
|
+
[...defaultContent, ...createdControls].forEach((id) => extPointIDs.add(id));
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
const uniqueChildren = children.filter((child) => !extPointIDs.has(child.id));
|
|
234
|
+
|
|
235
|
+
return transformNodes(uniqueChildren, scenario, controlIndex, changeService, propertyIdMap);
|
|
236
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "../../utils/error", "./nodes"], function (Log, ___sap_ux_private_control_property_editor_common, ____utils_error, ___nodes) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const outlineChanged = ___sap_ux_private_control_property_editor_common["outlineChanged"];
|
|
7
|
+
const getError = ____utils_error["getError"];
|
|
8
|
+
const transformNodes = ___nodes["transformNodes"];
|
|
9
|
+
const OUTLINE_CHANGE_EVENT = 'OUTLINE_CHANGED';
|
|
10
|
+
/**
|
|
11
|
+
* A Class of WorkspaceConnectorService
|
|
12
|
+
*/
|
|
13
|
+
class OutlineService extends EventTarget {
|
|
14
|
+
constructor(rta, changeService) {
|
|
15
|
+
super();
|
|
16
|
+
this.rta = rta;
|
|
17
|
+
this.changeService = changeService;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Initializes connector service.
|
|
22
|
+
*
|
|
23
|
+
* @param sendAction action sender function
|
|
24
|
+
*/
|
|
25
|
+
async init(sendAction) {
|
|
26
|
+
const outline = await this.rta.getService('outline');
|
|
27
|
+
const {
|
|
28
|
+
scenario
|
|
29
|
+
} = this.rta.getFlexSettings();
|
|
30
|
+
const syncOutline = async () => {
|
|
31
|
+
try {
|
|
32
|
+
const viewNodes = await outline.get();
|
|
33
|
+
const controlIndex = {};
|
|
34
|
+
const configPropertyIdMap = new Map();
|
|
35
|
+
const outlineNodes = await transformNodes(viewNodes, scenario, controlIndex, this.changeService, configPropertyIdMap);
|
|
36
|
+
const event = new CustomEvent(OUTLINE_CHANGE_EVENT, {
|
|
37
|
+
detail: {
|
|
38
|
+
controlIndex
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
this.dispatchEvent(event);
|
|
42
|
+
sendAction(outlineChanged(outlineNodes));
|
|
43
|
+
await this.changeService.updateConfigurationProps(configPropertyIdMap);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
Log.error('Outline sync failed!', getError(error));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
await syncOutline();
|
|
49
|
+
outline.attachEvent('update', syncOutline);
|
|
50
|
+
}
|
|
51
|
+
onOutlineChange(handler) {
|
|
52
|
+
this.addEventListener(OUTLINE_CHANGE_EVENT, handler);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
var __exports = {
|
|
56
|
+
__esModule: true
|
|
57
|
+
};
|
|
58
|
+
__exports.OUTLINE_CHANGE_EVENT = OUTLINE_CHANGE_EVENT;
|
|
59
|
+
__exports.OutlineService = OutlineService;
|
|
60
|
+
return __exports;
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Log from 'sap/base/Log';
|
|
2
|
+
import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
|
|
3
|
+
import type RTAOutlineService from 'sap/ui/rta/command/OutlineService';
|
|
4
|
+
|
|
5
|
+
import type { ExternalAction } from '@sap-ux-private/control-property-editor-common';
|
|
6
|
+
import { outlineChanged } from '@sap-ux-private/control-property-editor-common';
|
|
7
|
+
|
|
8
|
+
import { getError } from '../../utils/error';
|
|
9
|
+
import { ChangeService } from '../changes';
|
|
10
|
+
import { ControlTreeIndex } from '../types';
|
|
11
|
+
import { transformNodes } from './nodes';
|
|
12
|
+
|
|
13
|
+
export const OUTLINE_CHANGE_EVENT = 'OUTLINE_CHANGED';
|
|
14
|
+
|
|
15
|
+
export interface OutlineChangedEventDetail {
|
|
16
|
+
controlIndex: ControlTreeIndex;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A Class of WorkspaceConnectorService
|
|
20
|
+
*/
|
|
21
|
+
export class OutlineService extends EventTarget {
|
|
22
|
+
constructor(private readonly rta: RuntimeAuthoring, private readonly changeService: ChangeService) {
|
|
23
|
+
super();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Initializes connector service.
|
|
28
|
+
*
|
|
29
|
+
* @param sendAction action sender function
|
|
30
|
+
*/
|
|
31
|
+
public async init(sendAction: (action: ExternalAction) => void): Promise<void> {
|
|
32
|
+
const outline = await this.rta.getService<RTAOutlineService>('outline');
|
|
33
|
+
const { scenario } = this.rta.getFlexSettings();
|
|
34
|
+
const syncOutline = async () => {
|
|
35
|
+
try {
|
|
36
|
+
const viewNodes = await outline.get();
|
|
37
|
+
const controlIndex: ControlTreeIndex = {};
|
|
38
|
+
const configPropertyIdMap = new Map<string, string[]>();
|
|
39
|
+
const outlineNodes = await transformNodes(
|
|
40
|
+
viewNodes,
|
|
41
|
+
scenario,
|
|
42
|
+
controlIndex,
|
|
43
|
+
this.changeService,
|
|
44
|
+
configPropertyIdMap
|
|
45
|
+
);
|
|
46
|
+
const event = new CustomEvent(OUTLINE_CHANGE_EVENT, {
|
|
47
|
+
detail: {
|
|
48
|
+
controlIndex
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
this.dispatchEvent(event);
|
|
53
|
+
sendAction(outlineChanged(outlineNodes));
|
|
54
|
+
await this.changeService.updateConfigurationProps(configPropertyIdMap);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
Log.error('Outline sync failed!', getError(error));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
await syncOutline();
|
|
60
|
+
outline.attachEvent('update', syncOutline);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public onOutlineChange(handler: (event: CustomEvent<OutlineChangedEventDetail>) => void | Promise<void>): void {
|
|
64
|
+
this.addEventListener(OUTLINE_CHANGE_EVENT, handler as EventListener);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "../../i18n", "../../adp/dialog-factory", "../../utils/application", "../../utils/version"], function (Log, ___sap_ux_private_control_property_editor_common, ____i18n, ____adp_dialog_factory, ____utils_application, ____utils_version) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const executeQuickAction = ___sap_ux_private_control_property_editor_common["executeQuickAction"];
|
|
7
|
+
const quickActionListChanged = ___sap_ux_private_control_property_editor_common["quickActionListChanged"];
|
|
8
|
+
const SIMPLE_QUICK_ACTION_KIND = ___sap_ux_private_control_property_editor_common["SIMPLE_QUICK_ACTION_KIND"];
|
|
9
|
+
const NESTED_QUICK_ACTION_KIND = ___sap_ux_private_control_property_editor_common["NESTED_QUICK_ACTION_KIND"];
|
|
10
|
+
const updateQuickAction = ___sap_ux_private_control_property_editor_common["updateQuickAction"];
|
|
11
|
+
const externalFileChange = ___sap_ux_private_control_property_editor_common["externalFileChange"];
|
|
12
|
+
const reportTelemetry = ___sap_ux_private_control_property_editor_common["reportTelemetry"];
|
|
13
|
+
const getTextBundle = ____i18n["getTextBundle"];
|
|
14
|
+
const DialogFactory = ____adp_dialog_factory["DialogFactory"];
|
|
15
|
+
const getApplicationType = ____utils_application["getApplicationType"];
|
|
16
|
+
const getUi5Version = ____utils_version["getUi5Version"];
|
|
17
|
+
/**
|
|
18
|
+
* Service providing Quick Actions.
|
|
19
|
+
*/
|
|
20
|
+
class QuickActionService {
|
|
21
|
+
sendAction = () => {};
|
|
22
|
+
actions = [];
|
|
23
|
+
/**
|
|
24
|
+
* Quick action service constructor.
|
|
25
|
+
*
|
|
26
|
+
* @param rta - RTA object.
|
|
27
|
+
* @param outlineService - Outline service instance.
|
|
28
|
+
* @param registries - Quick action registries.
|
|
29
|
+
* @param changeService
|
|
30
|
+
*/
|
|
31
|
+
constructor(rta, outlineService, registries, changeService) {
|
|
32
|
+
this.rta = rta;
|
|
33
|
+
this.outlineService = outlineService;
|
|
34
|
+
this.registries = registries;
|
|
35
|
+
this.changeService = changeService;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initialize selection service.
|
|
40
|
+
*
|
|
41
|
+
* @param sendAction - Action sender function.
|
|
42
|
+
* @param subscribe - Subscriber function.
|
|
43
|
+
*/
|
|
44
|
+
async init(sendAction, subscribe) {
|
|
45
|
+
this.sendAction = sendAction;
|
|
46
|
+
this.actionService = await this.rta.getService('action');
|
|
47
|
+
this.texts = await getTextBundle();
|
|
48
|
+
subscribe(async action => {
|
|
49
|
+
if (executeQuickAction.match(action)) {
|
|
50
|
+
const actionInstance = this.actions.findLast(quickActionDefinition => quickActionDefinition.id === action.payload.id);
|
|
51
|
+
if (!actionInstance) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const commands = await this.executeAction(actionInstance, action.payload);
|
|
55
|
+
for (const command of commands) {
|
|
56
|
+
await this.rta.getCommandStack().pushAndExecute(command);
|
|
57
|
+
}
|
|
58
|
+
if (actionInstance.forceRefreshAfterExecution) {
|
|
59
|
+
this.sendAction(updateQuickAction(actionInstance.getActionObject()));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (externalFileChange.match(action)) {
|
|
63
|
+
await this.reloadQuickActions(this.controlTreeIndex);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
this.outlineService.onOutlineChange(async event => {
|
|
67
|
+
this.controlTreeIndex = event.detail.controlIndex;
|
|
68
|
+
await this.reloadQuickActions(event.detail.controlIndex);
|
|
69
|
+
});
|
|
70
|
+
this.changeService.onStackChange(async () => {
|
|
71
|
+
await this.reloadQuickActions(this.controlTreeIndex);
|
|
72
|
+
});
|
|
73
|
+
DialogFactory.onOpenDialogStatusChange(async () => {
|
|
74
|
+
await this.reloadQuickActions(this.controlTreeIndex);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Prepares a list of currently applicable Quick Actions and sends them to the UI.
|
|
80
|
+
*
|
|
81
|
+
* @param controlIndex - Control tree index.
|
|
82
|
+
*/
|
|
83
|
+
async reloadQuickActions(controlIndex) {
|
|
84
|
+
const context = {
|
|
85
|
+
controlIndex,
|
|
86
|
+
manifest: this.rta.getRootControlInstance().getManifest(),
|
|
87
|
+
actionService: this.actionService
|
|
88
|
+
};
|
|
89
|
+
const groups = [];
|
|
90
|
+
for (const registry of this.registries) {
|
|
91
|
+
for (const {
|
|
92
|
+
title,
|
|
93
|
+
definitions,
|
|
94
|
+
view,
|
|
95
|
+
key
|
|
96
|
+
} of registry.getDefinitions(context)) {
|
|
97
|
+
const group = {
|
|
98
|
+
title,
|
|
99
|
+
actions: []
|
|
100
|
+
};
|
|
101
|
+
const actionContext = {
|
|
102
|
+
...context,
|
|
103
|
+
view,
|
|
104
|
+
key,
|
|
105
|
+
rta: this.rta,
|
|
106
|
+
flexSettings: this.rta.getFlexSettings(),
|
|
107
|
+
resourceBundle: this.texts,
|
|
108
|
+
changeService: this.changeService
|
|
109
|
+
};
|
|
110
|
+
for (const Definition of definitions) {
|
|
111
|
+
try {
|
|
112
|
+
const instance = new Definition(actionContext);
|
|
113
|
+
await instance.initialize();
|
|
114
|
+
await this.addAction(group, instance);
|
|
115
|
+
} catch {
|
|
116
|
+
Log.warning(`Failed to initialize ${Definition.name} quick action.`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
groups.push(group);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
this.sendAction(quickActionListChanged(groups));
|
|
123
|
+
}
|
|
124
|
+
async addAction(group, instance) {
|
|
125
|
+
if (instance.isApplicable) {
|
|
126
|
+
await instance.runEnablementValidators();
|
|
127
|
+
const quickAction = instance.getActionObject();
|
|
128
|
+
group.actions.push(quickAction);
|
|
129
|
+
this.actions.push(instance);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async executeAction(actionInstance, payload) {
|
|
133
|
+
try {
|
|
134
|
+
const versionInfo = await getUi5Version();
|
|
135
|
+
await reportTelemetry({
|
|
136
|
+
category: 'QuickAction',
|
|
137
|
+
actionName: actionInstance.type,
|
|
138
|
+
telemetryEventIdentifier: actionInstance.getTelemetryIdentifier(true),
|
|
139
|
+
quickActionSteps: actionInstance.quickActionSteps,
|
|
140
|
+
appType: getApplicationType(this.rta.getRootControlInstance().getManifest()),
|
|
141
|
+
ui5Version: `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}`
|
|
142
|
+
});
|
|
143
|
+
} catch (error) {
|
|
144
|
+
Log.error('Error in reporting Telemetry:', error);
|
|
145
|
+
}
|
|
146
|
+
if (payload.kind === SIMPLE_QUICK_ACTION_KIND && actionInstance.kind === SIMPLE_QUICK_ACTION_KIND) {
|
|
147
|
+
return actionInstance.execute();
|
|
148
|
+
}
|
|
149
|
+
if (payload.kind === NESTED_QUICK_ACTION_KIND && actionInstance.kind === NESTED_QUICK_ACTION_KIND) {
|
|
150
|
+
return actionInstance.execute(payload.path);
|
|
151
|
+
}
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
var __exports = {
|
|
156
|
+
__esModule: true
|
|
157
|
+
};
|
|
158
|
+
__exports.QuickActionService = QuickActionService;
|
|
159
|
+
return __exports;
|
|
160
|
+
});
|
|
161
|
+
//# sourceMappingURL=quick-action-service.js.map
|