@sap/ux-ui5-tooling 1.20.4 → 1.21.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 +39 -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 +15811 -9929
- 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 +43486 -41472
- package/dist/middlewares/fiori-tools-preview.js +56962 -3066
- package/dist/middlewares/fiori-tools-proxy.js +55281 -32282
- package/dist/middlewares/fiori-tools-servestatic.js +31629 -29
- 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 +162 -0
- package/dist/preview-middleware/dist/client/adp/api-handler.ts +188 -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 +102 -0
- package/dist/preview-middleware/dist/client/adp/init.ts +85 -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 +126 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.ts +150 -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 +96 -0
- package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.ts +99 -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 +1780 -1464
- package/dist/tasks/deploy/index.js +14857 -9062
- package/package.json +31 -34
- 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,178 @@
|
|
|
1
|
+
/** sap.ui.core */
|
|
2
|
+
import type UI5Element from 'sap/ui/core/Element';
|
|
3
|
+
|
|
4
|
+
/** sap.ui.rta */
|
|
5
|
+
import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
|
|
6
|
+
import hasStableId from 'sap/ui/rta/util/hasStableId';
|
|
7
|
+
|
|
8
|
+
/** sap.ui.fl */
|
|
9
|
+
import FlUtils from 'sap/ui/fl/Utils';
|
|
10
|
+
|
|
11
|
+
/** sap.ui.dt */
|
|
12
|
+
import type ElementOverlay from 'sap/ui/dt/ElementOverlay';
|
|
13
|
+
|
|
14
|
+
import ManagedObject from 'sap/ui/base/ManagedObject';
|
|
15
|
+
import { DialogFactory, DialogNames } from './dialog-factory';
|
|
16
|
+
import type { IsReuseComponentApi } from '../cpe/types';
|
|
17
|
+
import { getTextBundle, type TextBundle } from '../i18n';
|
|
18
|
+
import { getReuseComponentChecker } from './utils';
|
|
19
|
+
import type { Ui5VersionInfo } from '../utils/version';
|
|
20
|
+
import { getSyncViewIds } from './sync-views-utils';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Handler for enablement of Extend With Controller context menu entry
|
|
24
|
+
*
|
|
25
|
+
* @param control UI5 control.
|
|
26
|
+
* @param isReuseComponent Function to check if the control is a reuse component.
|
|
27
|
+
* @param isCloud Whether the application is running in the cloud
|
|
28
|
+
* @returns boolean whether menu item is enabled or not
|
|
29
|
+
*/
|
|
30
|
+
export function isControllerExtensionEnabledForControl(
|
|
31
|
+
control: ManagedObject,
|
|
32
|
+
isReuseComponent: IsReuseComponentApi,
|
|
33
|
+
isCloud: boolean
|
|
34
|
+
): boolean {
|
|
35
|
+
const viewId = FlUtils.getViewForControl(control).getId();
|
|
36
|
+
const syncViewsIds = getSyncViewIds();
|
|
37
|
+
const isControlInSyncView = syncViewsIds.has(viewId);
|
|
38
|
+
|
|
39
|
+
if (isCloud) {
|
|
40
|
+
const isClickedControlReuseComponent = isReuseComponent(control.getId());
|
|
41
|
+
return !isControlInSyncView && !isClickedControlReuseComponent;
|
|
42
|
+
}
|
|
43
|
+
return !isControlInSyncView;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Handler for enablement of Extend With Controller context menu entry
|
|
48
|
+
*
|
|
49
|
+
* @param overlays Control overlays
|
|
50
|
+
* @param isReuseComponent Function to check if the control is a reuse component.
|
|
51
|
+
* @param isCloud Whether the application is running in the cloud
|
|
52
|
+
* @returns boolean whether menu item is enabled or not
|
|
53
|
+
*/
|
|
54
|
+
export const isControllerExtensionEnabled = (
|
|
55
|
+
overlays: ElementOverlay[],
|
|
56
|
+
isReuseComponent: IsReuseComponentApi,
|
|
57
|
+
isCloud: boolean
|
|
58
|
+
): boolean => {
|
|
59
|
+
if (overlays.length === 0 || overlays.length > 1) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return isControllerExtensionEnabledForControl(overlays[0].getElement(), isReuseComponent, isCloud);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Determines whether the fragment command should be enabled based on the provided overlays.
|
|
67
|
+
*
|
|
68
|
+
* @param {ElementOverlay[]} overlays - An array of ElementOverlay objects representing the UI overlays.
|
|
69
|
+
* @param {isReuseComponentApi} isReuseComponent - Function to check if the control is a reuse component.
|
|
70
|
+
* @param {boolean} isCloud - Whether the application is running in the cloud.
|
|
71
|
+
* @returns {boolean} True if the fragment command is enabled, false otherwise.
|
|
72
|
+
*/
|
|
73
|
+
export const isFragmentCommandEnabled = (
|
|
74
|
+
overlays: ElementOverlay[],
|
|
75
|
+
isReuseComponent: IsReuseComponentApi,
|
|
76
|
+
isCloud: boolean
|
|
77
|
+
): boolean => {
|
|
78
|
+
if (overlays.length === 0 || overlays.length > 1) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const control = overlays[0].getElement();
|
|
83
|
+
const stableId = hasStableId(overlays[0]);
|
|
84
|
+
if (isCloud) {
|
|
85
|
+
return stableId && !isReuseComponent(control.getId());
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return stableId;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Determines the text that should be displayed for the Add Fragment context menu item.
|
|
93
|
+
*
|
|
94
|
+
* @param {ElementOverlay} overlay - An ElementOverlay object representing the UI overlay.
|
|
95
|
+
* @param {isReuseComponentApi} isReuseComponentChecker - Function to check if the control is a reuse component.
|
|
96
|
+
* @param {boolean} isCloud - Whether the application is running in the cloud.
|
|
97
|
+
* @param {TextBundle} resources - The text bundle.
|
|
98
|
+
* @returns {string} The text of the Add Fragment context menu item.
|
|
99
|
+
*/
|
|
100
|
+
export const getAddFragmentItemText = (
|
|
101
|
+
overlay: ElementOverlay,
|
|
102
|
+
isReuseComponentChecker: IsReuseComponentApi,
|
|
103
|
+
isCloud: boolean,
|
|
104
|
+
resources: TextBundle
|
|
105
|
+
) => {
|
|
106
|
+
if (isCloud && isReuseComponentChecker(overlay.getElement().getId())) {
|
|
107
|
+
return resources.getText('ADP_ADD_FRAGMENT_MENU_ITEM_REUSE_COMPONENT');
|
|
108
|
+
}
|
|
109
|
+
if (!hasStableId(overlay)) {
|
|
110
|
+
return resources.getText('ADP_ADD_FRAGMENT_MENU_ITEM_UNSTABLE_ID');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return resources.getText('ADP_ADD_FRAGMENT_MENU_ITEM');
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Determines the text that should be displayed for Controller Extension context menu item.
|
|
118
|
+
*
|
|
119
|
+
* @param {ElementOverlay} overlay - An ElementOverlay object representing the UI overlay.
|
|
120
|
+
* @param {isReuseComponentApi} isReuseComponentChecker - Function to check if the control is a reuse component.
|
|
121
|
+
* @param {boolean} isCloud - Whether the application is running in the cloud.
|
|
122
|
+
* @param {TextBundle} resources - The text bundle.
|
|
123
|
+
* @returns {string} The text of the Add Fragment context menu item.
|
|
124
|
+
*/
|
|
125
|
+
export const getExtendControllerItemText = (
|
|
126
|
+
overlay: ElementOverlay,
|
|
127
|
+
isReuseComponentChecker: IsReuseComponentApi,
|
|
128
|
+
isCloud: boolean,
|
|
129
|
+
resources: TextBundle
|
|
130
|
+
) => {
|
|
131
|
+
const viewId = FlUtils.getViewForControl(overlay.getElement()).getId();
|
|
132
|
+
const syncViewsIds = getSyncViewIds();
|
|
133
|
+
if (syncViewsIds.has(viewId)) {
|
|
134
|
+
return resources.getText('ADP_ADD_CONTROLLER_EXTENSION_MENU_ITEM_SYNC_VIEW');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (isCloud && isReuseComponentChecker(overlay.getElement().getId())) {
|
|
138
|
+
return resources.getText('ADP_ADD_CONTROLLER_EXTENSION_MENU_ITEM_REUSE_COMPONENT');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return resources.getText('ADP_ADD_CONTROLLER_EXTENSION_MENU_ITEM');
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Adds a new item to the context menu
|
|
146
|
+
*
|
|
147
|
+
* @param rta Runtime Authoring
|
|
148
|
+
* @param ui5VersionInfo UI5 version information
|
|
149
|
+
*/
|
|
150
|
+
export const initDialogs = async (
|
|
151
|
+
rta: RuntimeAuthoring,
|
|
152
|
+
ui5VersionInfo: Ui5VersionInfo
|
|
153
|
+
): Promise<void> => {
|
|
154
|
+
const contextMenu = rta.getDefaultPlugins().contextMenu;
|
|
155
|
+
const isCloud = rta.getFlexSettings().isCloud;
|
|
156
|
+
const resources = await getTextBundle();
|
|
157
|
+
const isReuseComponentChecker = await getReuseComponentChecker(ui5VersionInfo);
|
|
158
|
+
|
|
159
|
+
contextMenu.addMenuItem({
|
|
160
|
+
id: 'ADD_FRAGMENT',
|
|
161
|
+
text: (overlay: ElementOverlay) => getAddFragmentItemText(overlay, isReuseComponentChecker, isCloud, resources),
|
|
162
|
+
handler: async (overlays: UI5Element[]) =>
|
|
163
|
+
await DialogFactory.createDialog(overlays[0], rta, DialogNames.ADD_FRAGMENT),
|
|
164
|
+
icon: 'sap-icon://attachment-html',
|
|
165
|
+
enabled: (overlays: ElementOverlay[]) => isFragmentCommandEnabled(overlays, isReuseComponentChecker, isCloud)
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
contextMenu.addMenuItem({
|
|
169
|
+
id: 'EXTEND_CONTROLLER',
|
|
170
|
+
text: (overlay: ElementOverlay) =>
|
|
171
|
+
getExtendControllerItemText(overlay, isReuseComponentChecker, isCloud, resources),
|
|
172
|
+
handler: async (overlays: UI5Element[]) =>
|
|
173
|
+
await DialogFactory.createDialog(overlays[0], rta, DialogNames.CONTROLLER_EXTENSION),
|
|
174
|
+
icon: 'sap-icon://create-form',
|
|
175
|
+
enabled: (overlays: ElementOverlay[]) =>
|
|
176
|
+
isControllerExtensionEnabled(overlays, isReuseComponentChecker, isCloud)
|
|
177
|
+
});
|
|
178
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "../utils/version", "../cpe/init", "./sync-views-utils", "../utils/application", "./quick-actions/load", "./init-dialogs", "../utils/info-center-message", "../cpe/communication-service"], function (log, ___sap_ux_private_control_property_editor_common, ___utils_version, __init, ___sync_views_utils, ___utils_application, ___quick_actions_load, ___init_dialogs, ___utils_info_center_message, ___cpe_communication_service) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
function _interopRequireDefault(obj) {
|
|
7
|
+
return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
|
|
8
|
+
}
|
|
9
|
+
function __ui5_require_async(path) {
|
|
10
|
+
return new Promise(function (resolve, reject) {
|
|
11
|
+
sap.ui.require([path], function (module) {
|
|
12
|
+
if (!(module && module.__esModule)) {
|
|
13
|
+
module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
|
|
14
|
+
default: module
|
|
15
|
+
} : module;
|
|
16
|
+
Object.defineProperty(module, "__esModule", {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
resolve(module);
|
|
21
|
+
}, function (err) {
|
|
22
|
+
reject(err);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const enableTelemetry = ___sap_ux_private_control_property_editor_common["enableTelemetry"];
|
|
27
|
+
const MessageBarType = ___sap_ux_private_control_property_editor_common["MessageBarType"];
|
|
28
|
+
const toggleAppPreviewVisibility = ___sap_ux_private_control_property_editor_common["toggleAppPreviewVisibility"];
|
|
29
|
+
const getFullyQualifiedUi5Version = ___utils_version["getFullyQualifiedUi5Version"];
|
|
30
|
+
const getUi5Version = ___utils_version["getUi5Version"];
|
|
31
|
+
const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
|
|
32
|
+
const minVersionInfo = ___utils_version["minVersionInfo"];
|
|
33
|
+
const init = _interopRequireDefault(__init);
|
|
34
|
+
const updateSyncViewsIds = ___sync_views_utils["updateSyncViewsIds"];
|
|
35
|
+
const showSyncViewsWarning = ___sync_views_utils["showSyncViewsWarning"];
|
|
36
|
+
const getApplicationType = ___utils_application["getApplicationType"];
|
|
37
|
+
const loadDefinitions = ___quick_actions_load["loadDefinitions"];
|
|
38
|
+
const initDialogs = ___init_dialogs["initDialogs"];
|
|
39
|
+
const sendInfoCenterMessage = ___utils_info_center_message["sendInfoCenterMessage"];
|
|
40
|
+
const CommunicationService = ___cpe_communication_service["CommunicationService"];
|
|
41
|
+
var __exports = async function (rta) {
|
|
42
|
+
const flexSettings = rta.getFlexSettings();
|
|
43
|
+
if (flexSettings.telemetry === true) {
|
|
44
|
+
enableTelemetry();
|
|
45
|
+
}
|
|
46
|
+
const ui5VersionInfo = await getUi5Version();
|
|
47
|
+
|
|
48
|
+
// Plugins need to be set before adding additional plugins to prevent overriding with the default
|
|
49
|
+
// and allow usage of getPlugins later in the flow
|
|
50
|
+
const defaultPlugins = rta.getDefaultPlugins();
|
|
51
|
+
rta.setPlugins(defaultPlugins);
|
|
52
|
+
if (isLowerThanMinimalUi5Version(ui5VersionInfo, {
|
|
53
|
+
major: 1,
|
|
54
|
+
minor: 136,
|
|
55
|
+
patch: 2
|
|
56
|
+
})) {
|
|
57
|
+
await initDialogs(rta, ui5VersionInfo);
|
|
58
|
+
} else {
|
|
59
|
+
(await __ui5_require_async('open/ux/preview/client/adp/add-fragment')).initAddXMLPlugin(rta);
|
|
60
|
+
(await __ui5_require_async('open/ux/preview/client/adp/extend-controller')).initExtendControllerPlugin(rta);
|
|
61
|
+
}
|
|
62
|
+
if (!isLowerThanMinimalUi5Version(ui5VersionInfo, {
|
|
63
|
+
major: 1,
|
|
64
|
+
minor: 78
|
|
65
|
+
})) {
|
|
66
|
+
const ExtensionPointService = (await __ui5_require_async('open/ux/preview/client/adp/extension-point')).default;
|
|
67
|
+
const extPointService = new ExtensionPointService(rta);
|
|
68
|
+
extPointService.init();
|
|
69
|
+
}
|
|
70
|
+
const applicationType = getApplicationType(rta.getRootControlInstance().getManifest());
|
|
71
|
+
const quickActionRegistries = await loadDefinitions(applicationType);
|
|
72
|
+
await init(rta, quickActionRegistries);
|
|
73
|
+
|
|
74
|
+
// Register synchronious views detection and warning
|
|
75
|
+
// This is not awaited to prevent deadlock in the initialization
|
|
76
|
+
rta.getService('outline').then(outlineService => {
|
|
77
|
+
outlineService.attachEvent('update', async () => {
|
|
78
|
+
await updateSyncViewsIds(ui5VersionInfo);
|
|
79
|
+
await showSyncViewsWarning();
|
|
80
|
+
});
|
|
81
|
+
}).catch(error => {
|
|
82
|
+
log.error('Failed to attach update event to outline service', error);
|
|
83
|
+
});
|
|
84
|
+
if (isLowerThanMinimalUi5Version(ui5VersionInfo)) {
|
|
85
|
+
await sendInfoCenterMessage({
|
|
86
|
+
title: {
|
|
87
|
+
key: 'FLP_UI5_VERSION_WARNING_TITLE'
|
|
88
|
+
},
|
|
89
|
+
description: {
|
|
90
|
+
key: 'FLP_UI5_VERSION_WARNING_DESCRIPTION',
|
|
91
|
+
params: [getFullyQualifiedUi5Version(ui5VersionInfo), getFullyQualifiedUi5Version(minVersionInfo)]
|
|
92
|
+
},
|
|
93
|
+
type: MessageBarType.error
|
|
94
|
+
});
|
|
95
|
+
CommunicationService.sendAction(toggleAppPreviewVisibility(false));
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
log.debug('ADP init executed.');
|
|
99
|
+
};
|
|
100
|
+
return __exports;
|
|
101
|
+
});
|
|
102
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
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 {
|
|
6
|
+
enableTelemetry,
|
|
7
|
+
MessageBarType,
|
|
8
|
+
toggleAppPreviewVisibility
|
|
9
|
+
} from '@sap-ux-private/control-property-editor-common';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
getFullyQualifiedUi5Version,
|
|
13
|
+
getUi5Version,
|
|
14
|
+
isLowerThanMinimalUi5Version,
|
|
15
|
+
minVersionInfo
|
|
16
|
+
} from '../utils/version';
|
|
17
|
+
|
|
18
|
+
import init from '../cpe/init';
|
|
19
|
+
import { updateSyncViewsIds, showSyncViewsWarning } from './sync-views-utils';
|
|
20
|
+
import { getApplicationType } from '../utils/application';
|
|
21
|
+
|
|
22
|
+
import { loadDefinitions } from './quick-actions/load';
|
|
23
|
+
import { initDialogs } from './init-dialogs';
|
|
24
|
+
import { sendInfoCenterMessage } from '../utils/info-center-message';
|
|
25
|
+
import { CommunicationService } from '../cpe/communication-service';
|
|
26
|
+
|
|
27
|
+
export default async function (rta: RuntimeAuthoring) {
|
|
28
|
+
const flexSettings = rta.getFlexSettings();
|
|
29
|
+
if (flexSettings.telemetry === true) {
|
|
30
|
+
enableTelemetry();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const ui5VersionInfo = await getUi5Version();
|
|
34
|
+
|
|
35
|
+
// Plugins need to be set before adding additional plugins to prevent overriding with the default
|
|
36
|
+
// and allow usage of getPlugins later in the flow
|
|
37
|
+
const defaultPlugins = rta.getDefaultPlugins();
|
|
38
|
+
rta.setPlugins(defaultPlugins);
|
|
39
|
+
|
|
40
|
+
if (isLowerThanMinimalUi5Version(ui5VersionInfo, { major: 1, minor: 136, patch: 2 })) {
|
|
41
|
+
await initDialogs(rta, ui5VersionInfo);
|
|
42
|
+
} else {
|
|
43
|
+
(await import('open/ux/preview/client/adp/add-fragment')).initAddXMLPlugin(rta);
|
|
44
|
+
(await import('open/ux/preview/client/adp/extend-controller')).initExtendControllerPlugin(rta);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!isLowerThanMinimalUi5Version(ui5VersionInfo, { major: 1, minor: 78 })) {
|
|
48
|
+
const ExtensionPointService = (await import('open/ux/preview/client/adp/extension-point')).default;
|
|
49
|
+
const extPointService = new ExtensionPointService(rta);
|
|
50
|
+
extPointService.init();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const applicationType = getApplicationType(rta.getRootControlInstance().getManifest());
|
|
54
|
+
const quickActionRegistries = await loadDefinitions(applicationType);
|
|
55
|
+
|
|
56
|
+
await init(rta, quickActionRegistries);
|
|
57
|
+
|
|
58
|
+
// Register synchronious views detection and warning
|
|
59
|
+
// This is not awaited to prevent deadlock in the initialization
|
|
60
|
+
rta.getService<RTAOutlineService>('outline')
|
|
61
|
+
.then((outlineService) => {
|
|
62
|
+
outlineService.attachEvent('update', async () => {
|
|
63
|
+
await updateSyncViewsIds(ui5VersionInfo);
|
|
64
|
+
await showSyncViewsWarning();
|
|
65
|
+
});
|
|
66
|
+
})
|
|
67
|
+
.catch((error) => {
|
|
68
|
+
log.error('Failed to attach update event to outline service', error);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
if (isLowerThanMinimalUi5Version(ui5VersionInfo)) {
|
|
72
|
+
await sendInfoCenterMessage({
|
|
73
|
+
title: { key: 'FLP_UI5_VERSION_WARNING_TITLE' },
|
|
74
|
+
description: {
|
|
75
|
+
key: 'FLP_UI5_VERSION_WARNING_DESCRIPTION',
|
|
76
|
+
params: [getFullyQualifiedUi5Version(ui5VersionInfo), getFullyQualifiedUi5Version(minVersionInfo)]
|
|
77
|
+
},
|
|
78
|
+
type: MessageBarType.error
|
|
79
|
+
});
|
|
80
|
+
CommunicationService.sendAction(toggleAppPreviewVisibility(false));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
log.debug('ADP init executed.');
|
|
85
|
+
}
|
package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/core/Component", "sap/ui/dt/OverlayRegistry", "../../cpe/quick-actions/utils", "../../utils/core", "../dialog-factory", "../../i18n", "./simple-quick-action-base", "./dialog-enablement-validator"], function (Component, OverlayRegistry, ____cpe_quick_actions_utils, ____utils_core, ___dialog_factory, ____i18n, ___simple_quick_action_base, ___dialog_enablement_validator) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const pageHasControlId = ____cpe_quick_actions_utils["pageHasControlId"];
|
|
7
|
+
const getControlById = ____utils_core["getControlById"];
|
|
8
|
+
const DialogFactory = ___dialog_factory["DialogFactory"];
|
|
9
|
+
const DialogNames = ___dialog_factory["DialogNames"];
|
|
10
|
+
const getTextBundle = ____i18n["getTextBundle"];
|
|
11
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
12
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
13
|
+
const ADD_NEW_OBJECT_PAGE_ACTION = 'add-new-subpage';
|
|
14
|
+
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
15
|
+
/**
|
|
16
|
+
* Base Quick Action class for adding a custom page action.
|
|
17
|
+
*/
|
|
18
|
+
class AddNewSubpageBase extends SimpleQuickActionDefinitionBase {
|
|
19
|
+
constructor(context) {
|
|
20
|
+
super(ADD_NEW_OBJECT_PAGE_ACTION, [], 'QUICK_ACTION_ADD_NEW_SUB_PAGE', context, [{
|
|
21
|
+
run: async () => {
|
|
22
|
+
const i18n = await getTextBundle();
|
|
23
|
+
if (this.navProperties.length === 0) {
|
|
24
|
+
return {
|
|
25
|
+
type: 'error',
|
|
26
|
+
message: i18n.getText('NO_SUB_PAGES_TO_ADD')
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}, DIALOG_ENABLEMENT_VALIDATOR]);
|
|
32
|
+
this.appReference = context.flexSettings.projectId ?? '';
|
|
33
|
+
this.existingPages = this.getApplicationPages();
|
|
34
|
+
}
|
|
35
|
+
async addNavigationOptionIfAvailable(metaModel, targetEntitySet, navProperty) {
|
|
36
|
+
if (!targetEntitySet) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const pageExists = await this.isPageExists(targetEntitySet, metaModel);
|
|
40
|
+
if (!pageExists) {
|
|
41
|
+
this.navProperties.push({
|
|
42
|
+
entitySet: targetEntitySet,
|
|
43
|
+
navProperty: navProperty ?? targetEntitySet
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async initialize() {
|
|
48
|
+
if (!this.appReference) {
|
|
49
|
+
throw new Error('App reference not defined');
|
|
50
|
+
}
|
|
51
|
+
const allControls = CONTROL_TYPES.flatMap(item => this.context.controlIndex[item] ?? []);
|
|
52
|
+
const control = allControls.find(c => pageHasControlId(this.context.view, c.controlId));
|
|
53
|
+
this.pageType = this.context.view.getViewName().split('.view.')[0];
|
|
54
|
+
const metaModel = this.getODataMetaModel();
|
|
55
|
+
if (!metaModel || !control) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const modifiedControl = getControlById(control.controlId);
|
|
59
|
+
if (!modifiedControl) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const component = Component.getOwnerComponentFor(modifiedControl);
|
|
63
|
+
const entitySetName = await this.getEntitySetNameFromPageComponent(component, metaModel);
|
|
64
|
+
if (!entitySetName) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.entitySet = entitySetName;
|
|
68
|
+
this.navProperties = [];
|
|
69
|
+
if (!this.isCurrentObjectPage()) {
|
|
70
|
+
await this.addNavigationOptionIfAvailable(metaModel, this.entitySet);
|
|
71
|
+
} else {
|
|
72
|
+
await this.prepareNavigationData(metaModel);
|
|
73
|
+
}
|
|
74
|
+
this.control = modifiedControl;
|
|
75
|
+
}
|
|
76
|
+
async execute() {
|
|
77
|
+
const overlay = OverlayRegistry.getOverlay(this.control);
|
|
78
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_SUBPAGE, undefined, {
|
|
79
|
+
appReference: this.appReference,
|
|
80
|
+
navProperties: this.navProperties,
|
|
81
|
+
title: 'ADD_SUB_PAGE_DIALOG_TITLE',
|
|
82
|
+
pageDescriptor: this.currentPageDescriptor
|
|
83
|
+
}, {
|
|
84
|
+
actionName: this.type,
|
|
85
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
86
|
+
});
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
var __exports = {
|
|
91
|
+
__esModule: true
|
|
92
|
+
};
|
|
93
|
+
__exports.ADD_NEW_OBJECT_PAGE_ACTION = ADD_NEW_OBJECT_PAGE_ACTION;
|
|
94
|
+
__exports.AddNewSubpageBase = AddNewSubpageBase;
|
|
95
|
+
return __exports;
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=add-new-subpage-quick-action-base.js.map
|
package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.ts
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import Component from 'sap/ui/core/Component';
|
|
2
|
+
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
|
+
import ObjectPageLayout from 'sap/uxap/ObjectPageLayout';
|
|
4
|
+
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
5
|
+
|
|
6
|
+
import { QuickActionContext, SimpleQuickActionDefinition } from '../../cpe/quick-actions/quick-action-definition';
|
|
7
|
+
import { pageHasControlId } from '../../cpe/quick-actions/utils';
|
|
8
|
+
import { getControlById } from '../../utils/core';
|
|
9
|
+
import { DialogFactory, DialogNames } from '../dialog-factory';
|
|
10
|
+
import { EnablementValidatorResult } from './enablement-validator';
|
|
11
|
+
import { getTextBundle } from '../../i18n';
|
|
12
|
+
import { SimpleQuickActionDefinitionBase } from './simple-quick-action-base';
|
|
13
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from './dialog-enablement-validator';
|
|
14
|
+
import { PageDescriptorV2 } from '../controllers/AddSubpage.controller';
|
|
15
|
+
import { PageDescriptorV4 } from '../controllers/types';
|
|
16
|
+
|
|
17
|
+
export const ADD_NEW_OBJECT_PAGE_ACTION = 'add-new-subpage';
|
|
18
|
+
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
19
|
+
|
|
20
|
+
export interface ApplicationPageData {
|
|
21
|
+
id: string;
|
|
22
|
+
entitySet?: string;
|
|
23
|
+
contextPath?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Base Quick Action class for adding a custom page action.
|
|
28
|
+
*/
|
|
29
|
+
export abstract class AddNewSubpageBase<ODataMetaModelType>
|
|
30
|
+
extends SimpleQuickActionDefinitionBase
|
|
31
|
+
implements SimpleQuickActionDefinition
|
|
32
|
+
{
|
|
33
|
+
protected appReference: string;
|
|
34
|
+
protected abstract readonly currentPageDescriptor: PageDescriptorV2 | PageDescriptorV4;
|
|
35
|
+
protected entitySet: string | undefined;
|
|
36
|
+
protected navProperties: { navProperty: string; entitySet: string }[];
|
|
37
|
+
protected existingPages: ApplicationPageData[];
|
|
38
|
+
protected pageType: string | undefined;
|
|
39
|
+
|
|
40
|
+
constructor(context: QuickActionContext) {
|
|
41
|
+
super(ADD_NEW_OBJECT_PAGE_ACTION, [], 'QUICK_ACTION_ADD_NEW_SUB_PAGE', context, [
|
|
42
|
+
{
|
|
43
|
+
run: async (): Promise<EnablementValidatorResult> => {
|
|
44
|
+
const i18n = await getTextBundle();
|
|
45
|
+
if (this.navProperties.length === 0) {
|
|
46
|
+
return {
|
|
47
|
+
type: 'error',
|
|
48
|
+
message: i18n.getText('NO_SUB_PAGES_TO_ADD')
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
DIALOG_ENABLEMENT_VALIDATOR
|
|
55
|
+
]);
|
|
56
|
+
|
|
57
|
+
this.appReference = context.flexSettings.projectId ?? '';
|
|
58
|
+
this.existingPages = this.getApplicationPages();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
protected abstract getApplicationPages(): ApplicationPageData[];
|
|
62
|
+
protected abstract isPageExists(targetEntitySet: string, metaModel: ODataMetaModelType): boolean | Promise<boolean>;
|
|
63
|
+
protected abstract isCurrentObjectPage(): boolean;
|
|
64
|
+
protected abstract getEntitySetNameFromPageComponent(
|
|
65
|
+
component: Component | undefined,
|
|
66
|
+
metaModel: ODataMetaModelType
|
|
67
|
+
): Promise<string | undefined>;
|
|
68
|
+
protected abstract prepareNavigationData(metaModel: ODataMetaModelType): Promise<void>;
|
|
69
|
+
protected abstract getODataMetaModel(): ODataMetaModelType | undefined;
|
|
70
|
+
|
|
71
|
+
protected async addNavigationOptionIfAvailable(
|
|
72
|
+
metaModel: ODataMetaModelType,
|
|
73
|
+
targetEntitySet?: string,
|
|
74
|
+
navProperty?: string
|
|
75
|
+
) {
|
|
76
|
+
if (!targetEntitySet) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const pageExists = await this.isPageExists(targetEntitySet, metaModel);
|
|
80
|
+
if (!pageExists) {
|
|
81
|
+
this.navProperties.push({
|
|
82
|
+
entitySet: targetEntitySet,
|
|
83
|
+
navProperty: navProperty ?? targetEntitySet
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async initialize(): Promise<void> {
|
|
89
|
+
if (!this.appReference) {
|
|
90
|
+
throw new Error('App reference not defined');
|
|
91
|
+
}
|
|
92
|
+
const allControls = CONTROL_TYPES.flatMap((item) => this.context.controlIndex[item] ?? []);
|
|
93
|
+
const control = allControls.find((c) => pageHasControlId(this.context.view, c.controlId));
|
|
94
|
+
|
|
95
|
+
this.pageType = this.context.view.getViewName().split('.view.')[0];
|
|
96
|
+
|
|
97
|
+
const metaModel = this.getODataMetaModel();
|
|
98
|
+
if (!metaModel || !control) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const modifiedControl = getControlById<ObjectPageLayout>(control.controlId);
|
|
103
|
+
if (!modifiedControl) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const component = Component.getOwnerComponentFor(modifiedControl);
|
|
108
|
+
const entitySetName = await this.getEntitySetNameFromPageComponent(component, metaModel);
|
|
109
|
+
if (!entitySetName) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
this.entitySet = entitySetName;
|
|
113
|
+
|
|
114
|
+
this.navProperties = [];
|
|
115
|
+
if (!this.isCurrentObjectPage()) {
|
|
116
|
+
await this.addNavigationOptionIfAvailable(metaModel, this.entitySet);
|
|
117
|
+
} else {
|
|
118
|
+
await this.prepareNavigationData(metaModel);
|
|
119
|
+
}
|
|
120
|
+
this.control = modifiedControl;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async execute(): Promise<FlexCommand[]> {
|
|
124
|
+
const overlay = OverlayRegistry.getOverlay(this.control!);
|
|
125
|
+
await DialogFactory.createDialog(
|
|
126
|
+
overlay,
|
|
127
|
+
this.context.rta,
|
|
128
|
+
DialogNames.ADD_SUBPAGE,
|
|
129
|
+
undefined,
|
|
130
|
+
{
|
|
131
|
+
appReference: this.appReference,
|
|
132
|
+
navProperties: this.navProperties,
|
|
133
|
+
title: 'ADD_SUB_PAGE_DIALOG_TITLE',
|
|
134
|
+
pageDescriptor: this.currentPageDescriptor
|
|
135
|
+
},
|
|
136
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
137
|
+
);
|
|
138
|
+
return [];
|
|
139
|
+
}
|
|
140
|
+
}
|
package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/version", "../../utils", "../../../cpe/quick-actions/utils", "../../../i18n", "../../api-handler", "../../dialog-factory", "../../init-dialogs", "../dialog-enablement-validator", "../simple-quick-action-base"], function (OverlayRegistry, _____utils_version, ____utils, _____cpe_quick_actions_utils, _____i18n, ____api_handler, ____dialog_factory, ____init_dialogs, ___dialog_enablement_validator, ___simple_quick_action_base) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
7
|
+
const getControllerInfoForControl = ____utils["getControllerInfoForControl"];
|
|
8
|
+
const getReuseComponentChecker = ____utils["getReuseComponentChecker"];
|
|
9
|
+
const checkForExistingChange = ____utils["checkForExistingChange"];
|
|
10
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
11
|
+
const getTextBundle = _____i18n["getTextBundle"];
|
|
12
|
+
const getExistingController = ____api_handler["getExistingController"];
|
|
13
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
14
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
15
|
+
const isControllerExtensionEnabledForControl = ____init_dialogs["isControllerExtensionEnabledForControl"];
|
|
16
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
17
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
18
|
+
const ADD_CONTROLLER_TO_PAGE_TYPE = 'add-controller-to-page';
|
|
19
|
+
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Quick Action for adding controller to a page.
|
|
23
|
+
*/
|
|
24
|
+
class AddControllerToPageQuickAction extends SimpleQuickActionDefinitionBase {
|
|
25
|
+
constructor(context) {
|
|
26
|
+
super(ADD_CONTROLLER_TO_PAGE_TYPE, CONTROL_TYPES, '', context, [DIALOG_ENABLEMENT_VALIDATOR, {
|
|
27
|
+
run: async () => {
|
|
28
|
+
const controllerName = getControllerInfoForControl(this.context.view).controllerName;
|
|
29
|
+
const i18n = await getTextBundle();
|
|
30
|
+
if (checkForExistingChange(this.context.rta, 'codeExt', 'selector.controllerName', controllerName)) {
|
|
31
|
+
return {
|
|
32
|
+
type: 'error',
|
|
33
|
+
message: i18n.getText('ADP_QUICK_ACTION_CONTROLLER_PENDING_CHANGE_EXISTS')
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}]);
|
|
38
|
+
}
|
|
39
|
+
controllerExists = false;
|
|
40
|
+
forceRefreshAfterExecution = true;
|
|
41
|
+
async initialize() {
|
|
42
|
+
const version = await getUi5Version();
|
|
43
|
+
const isReuseComponent = await getReuseComponentChecker(version);
|
|
44
|
+
const control = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)[0];
|
|
45
|
+
if (control) {
|
|
46
|
+
const controlInfo = getControllerInfoForControl(control);
|
|
47
|
+
const data = await getExistingController(controlInfo.controllerName);
|
|
48
|
+
this.controllerExists = data?.controllerExists;
|
|
49
|
+
const isActiveAction = isControllerExtensionEnabledForControl(control, isReuseComponent, this.context.flexSettings.isCloud);
|
|
50
|
+
this.control = isActiveAction ? control : undefined;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
get textKey() {
|
|
54
|
+
return this.controllerExists ? 'QUICK_ACTION_SHOW_PAGE_CONTROLLER' : 'QUICK_ACTION_ADD_PAGE_CONTROLLER';
|
|
55
|
+
}
|
|
56
|
+
async execute() {
|
|
57
|
+
if (this.control) {
|
|
58
|
+
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
59
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.CONTROLLER_EXTENSION, undefined, {}, {
|
|
60
|
+
actionName: this.type,
|
|
61
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
var __exports = {
|
|
68
|
+
__esModule: true
|
|
69
|
+
};
|
|
70
|
+
__exports.ADD_CONTROLLER_TO_PAGE_TYPE = ADD_CONTROLLER_TO_PAGE_TYPE;
|
|
71
|
+
__exports.AddControllerToPageQuickAction = AddControllerToPageQuickAction;
|
|
72
|
+
return __exports;
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=add-controller-to-page.js.map
|