@sap/ux-ui5-tooling 1.20.3 → 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 +15601 -9530
- 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 +43608 -41594
- package/dist/middlewares/fiori-tools-preview.js +57009 -3089
- package/dist/middlewares/fiori-tools-proxy.js +54866 -31843
- package/dist/middlewares/fiori-tools-servestatic.js +31657 -57
- 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 +1836 -1496
- package/dist/tasks/deploy/index.js +14679 -8695
- 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
package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
2
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
|
+
|
|
4
|
+
import { getUi5Version } from '../../../utils/version';
|
|
5
|
+
import { getControllerInfoForControl, getReuseComponentChecker, checkForExistingChange } from '../../utils';
|
|
6
|
+
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
7
|
+
import type {
|
|
8
|
+
QuickActionContext,
|
|
9
|
+
SimpleQuickActionDefinition
|
|
10
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
11
|
+
import { getTextBundle } from '../../../i18n';
|
|
12
|
+
import { getExistingController } from '../../api-handler';
|
|
13
|
+
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
14
|
+
import { isControllerExtensionEnabledForControl } from '../../init-dialogs';
|
|
15
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
16
|
+
import type { EnablementValidatorResult } from '../enablement-validator';
|
|
17
|
+
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
18
|
+
|
|
19
|
+
export const ADD_CONTROLLER_TO_PAGE_TYPE = 'add-controller-to-page';
|
|
20
|
+
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Quick Action for adding controller to a page.
|
|
24
|
+
*/
|
|
25
|
+
export class AddControllerToPageQuickAction
|
|
26
|
+
extends SimpleQuickActionDefinitionBase
|
|
27
|
+
implements SimpleQuickActionDefinition
|
|
28
|
+
{
|
|
29
|
+
constructor(context: QuickActionContext) {
|
|
30
|
+
super(ADD_CONTROLLER_TO_PAGE_TYPE, CONTROL_TYPES, '', context, [
|
|
31
|
+
DIALOG_ENABLEMENT_VALIDATOR,
|
|
32
|
+
{
|
|
33
|
+
run: async (): Promise<EnablementValidatorResult> => {
|
|
34
|
+
const controllerName = getControllerInfoForControl(this.context.view).controllerName;
|
|
35
|
+
const i18n = await getTextBundle();
|
|
36
|
+
if (
|
|
37
|
+
checkForExistingChange(this.context.rta, 'codeExt', 'selector.controllerName', controllerName)
|
|
38
|
+
) {
|
|
39
|
+
return {
|
|
40
|
+
type: 'error',
|
|
41
|
+
message: i18n.getText('ADP_QUICK_ACTION_CONTROLLER_PENDING_CHANGE_EXISTS')
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private controllerExists = false;
|
|
50
|
+
forceRefreshAfterExecution = true;
|
|
51
|
+
|
|
52
|
+
async initialize(): Promise<void> {
|
|
53
|
+
const version = await getUi5Version();
|
|
54
|
+
const isReuseComponent = await getReuseComponentChecker(version);
|
|
55
|
+
|
|
56
|
+
const control = getRelevantControlFromActivePage(
|
|
57
|
+
this.context.controlIndex,
|
|
58
|
+
this.context.view,
|
|
59
|
+
CONTROL_TYPES
|
|
60
|
+
)[0];
|
|
61
|
+
if (control) {
|
|
62
|
+
const controlInfo = getControllerInfoForControl(control);
|
|
63
|
+
const data = await getExistingController(controlInfo.controllerName);
|
|
64
|
+
this.controllerExists = data?.controllerExists;
|
|
65
|
+
const isActiveAction = isControllerExtensionEnabledForControl(
|
|
66
|
+
control,
|
|
67
|
+
isReuseComponent,
|
|
68
|
+
this.context.flexSettings.isCloud
|
|
69
|
+
);
|
|
70
|
+
this.control = isActiveAction ? control : undefined;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
protected get textKey() {
|
|
75
|
+
return this.controllerExists ? 'QUICK_ACTION_SHOW_PAGE_CONTROLLER' : 'QUICK_ACTION_ADD_PAGE_CONTROLLER';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async execute(): Promise<FlexCommand[]> {
|
|
79
|
+
if (this.control) {
|
|
80
|
+
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
81
|
+
await DialogFactory.createDialog(
|
|
82
|
+
overlay,
|
|
83
|
+
this.context.rta,
|
|
84
|
+
DialogNames.CONTROLLER_EXTENSION,
|
|
85
|
+
undefined,
|
|
86
|
+
{},
|
|
87
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
}
|
package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "sap/ui/dt/OverlayRegistry", "sap/ui/rta/command/CommandFactory", "../../../utils/application", "../../../utils/fe-v4", "../../../utils/version", "../../api-handler", "../../dialog-factory", "../dialog-enablement-validator", "../fe-v2/utils", "../quick-action-base"], function (___sap_ux_private_control_property_editor_common, OverlayRegistry, CommandFactory, _____utils_application, _____utils_fe_v4, _____utils_version, ____api_handler, ____dialog_factory, ___dialog_enablement_validator, ___fe_v2_utils, ___quick_action_base) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const NESTED_QUICK_ACTION_KIND = ___sap_ux_private_control_property_editor_common["NESTED_QUICK_ACTION_KIND"];
|
|
7
|
+
const getApplicationType = _____utils_application["getApplicationType"];
|
|
8
|
+
const getV4AppComponent = _____utils_fe_v4["getV4AppComponent"];
|
|
9
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
10
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
11
|
+
const getDataSourceAnnotationFileMap = ____api_handler["getDataSourceAnnotationFileMap"];
|
|
12
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
13
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
14
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
15
|
+
const getV2AppComponent = ___fe_v2_utils["getV2AppComponent"];
|
|
16
|
+
const QuickActionDefinitionBase = ___quick_action_base["QuickActionDefinitionBase"];
|
|
17
|
+
const ADD_NEW_ANNOTATION_FILE = 'add-new-annotation-file';
|
|
18
|
+
const ADD_NEW_ANNOTATION_FILE_TITLE = 'QUICK_ACTION_ADD_NEW_ANNOTATION_FILE';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Add New Annotation File.
|
|
22
|
+
*/
|
|
23
|
+
class AddNewAnnotationFile extends QuickActionDefinitionBase {
|
|
24
|
+
children = [];
|
|
25
|
+
get quickActionSteps() {
|
|
26
|
+
return 1;
|
|
27
|
+
}
|
|
28
|
+
kind = NESTED_QUICK_ACTION_KIND;
|
|
29
|
+
type = ADD_NEW_ANNOTATION_FILE;
|
|
30
|
+
forceRefreshAfterExecution = true;
|
|
31
|
+
isApplicable = true;
|
|
32
|
+
get id() {
|
|
33
|
+
return `${this.context.key}-${this.type}`;
|
|
34
|
+
}
|
|
35
|
+
constructor(context) {
|
|
36
|
+
super(ADD_NEW_ANNOTATION_FILE, NESTED_QUICK_ACTION_KIND, '', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
37
|
+
this.context = context;
|
|
38
|
+
}
|
|
39
|
+
async initialize() {
|
|
40
|
+
const version = await getUi5Version();
|
|
41
|
+
if (isLowerThanMinimalUi5Version(version, {
|
|
42
|
+
major: 1,
|
|
43
|
+
minor: 108,
|
|
44
|
+
patch: 27
|
|
45
|
+
})) {
|
|
46
|
+
this.isApplicable = false;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.annotationDataSourceData = await getDataSourceAnnotationFileMap();
|
|
50
|
+
const {
|
|
51
|
+
annotationDataSourceMap
|
|
52
|
+
} = this.annotationDataSourceData;
|
|
53
|
+
if (!Object.keys(this.annotationDataSourceData.annotationDataSourceMap).length) {
|
|
54
|
+
throw new Error('No data sources found in the manifest');
|
|
55
|
+
}
|
|
56
|
+
for (const key in annotationDataSourceMap) {
|
|
57
|
+
if (Object.prototype.hasOwnProperty.call(annotationDataSourceMap, key)) {
|
|
58
|
+
const source = annotationDataSourceMap[key];
|
|
59
|
+
const {
|
|
60
|
+
annotationExistsInWS
|
|
61
|
+
} = source.annotationDetails;
|
|
62
|
+
if (source.metadataReadErrorMsg) {
|
|
63
|
+
this.children.push({
|
|
64
|
+
path: this.children.length.toString(),
|
|
65
|
+
enabled: false,
|
|
66
|
+
tooltip: source.metadataReadErrorMsg,
|
|
67
|
+
label: this.context.resourceBundle.getText('ADD_ANNOTATION_FILE', [key]),
|
|
68
|
+
children: []
|
|
69
|
+
});
|
|
70
|
+
} else {
|
|
71
|
+
this.children.push({
|
|
72
|
+
path: this.children.length.toString(),
|
|
73
|
+
enabled: true,
|
|
74
|
+
label: annotationExistsInWS ? this.context.resourceBundle.getText('SHOW_ANNOTATION_FILE', [key]) : this.context.resourceBundle.getText('ADD_ANNOTATION_FILE', [key]),
|
|
75
|
+
children: []
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
get textKey() {
|
|
82
|
+
let result = ADD_NEW_ANNOTATION_FILE_TITLE;
|
|
83
|
+
const dataSourceIds = Object.keys(this.annotationDataSourceData.annotationDataSourceMap);
|
|
84
|
+
if (dataSourceIds.length === 1) {
|
|
85
|
+
const details = this.annotationDataSourceData.annotationDataSourceMap[dataSourceIds[0]];
|
|
86
|
+
if (details.annotationDetails.annotationExistsInWS) {
|
|
87
|
+
result = 'QUICK_ACTION_SHOW_ANNOTATION_FILE';
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
async execute(path) {
|
|
93
|
+
const {
|
|
94
|
+
annotationDataSourceMap,
|
|
95
|
+
isRunningInBAS
|
|
96
|
+
} = this.annotationDataSourceData;
|
|
97
|
+
const appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
98
|
+
const index = Number(path);
|
|
99
|
+
if (index >= 0) {
|
|
100
|
+
const dataSourceId = Object.keys(annotationDataSourceMap)[index];
|
|
101
|
+
const dataSource = annotationDataSourceMap[dataSourceId];
|
|
102
|
+
if (dataSource?.annotationDetails.annotationExistsInWS) {
|
|
103
|
+
const annotationFileDetails = dataSource.annotationDetails;
|
|
104
|
+
const {
|
|
105
|
+
annotationPath,
|
|
106
|
+
annotationPathFromRoot
|
|
107
|
+
} = annotationFileDetails;
|
|
108
|
+
await DialogFactory.createDialog(OverlayRegistry.getOverlay(this.context.view),
|
|
109
|
+
// this passed only because, for method param is required.
|
|
110
|
+
this.context.rta,
|
|
111
|
+
// same as above
|
|
112
|
+
DialogNames.FILE_EXISTS, undefined, {
|
|
113
|
+
fileName: annotationPathFromRoot,
|
|
114
|
+
filePath: annotationPath,
|
|
115
|
+
isRunningInBAS: isRunningInBAS
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
// Create annotation file only, if no file exists already for datasource id or if the change file exist and but no annotation file exists in file system.
|
|
119
|
+
else if (dataSource) {
|
|
120
|
+
const timestamp = Date.now();
|
|
121
|
+
const annotationFileNameWithoutExtension = `annotation_${timestamp}`;
|
|
122
|
+
const annotationFileName = `${annotationFileNameWithoutExtension}.xml`;
|
|
123
|
+
const annotationNameSpace = this.context.flexSettings.layer === 'CUSTOMER_BASE' ? `customer.annotation.${annotationFileNameWithoutExtension}` : `annotation.${annotationFileNameWithoutExtension}`;
|
|
124
|
+
const parameters = {
|
|
125
|
+
dataSourceId: dataSourceId,
|
|
126
|
+
annotations: [annotationNameSpace],
|
|
127
|
+
annotationsInsertPosition: 'END',
|
|
128
|
+
dataSource: {
|
|
129
|
+
[annotationNameSpace]: {
|
|
130
|
+
uri: `annotations/${annotationFileName}`,
|
|
131
|
+
type: 'ODataAnnotation'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const modifiedValue = {
|
|
136
|
+
changeType: 'appdescr_app_addAnnotationsToOData',
|
|
137
|
+
appComponent: appType === 'fe-v4' ? getV4AppComponent(this.context.view) : getV2AppComponent(this.context.view),
|
|
138
|
+
generator: this.context.flexSettings.generator,
|
|
139
|
+
reference: this.context.flexSettings.projectId,
|
|
140
|
+
parameters,
|
|
141
|
+
serviceUrl: dataSource.serviceUrl
|
|
142
|
+
};
|
|
143
|
+
const command = await CommandFactory.getCommandFor(this.context.view, 'appDescriptor', modifiedValue, null, this.context.flexSettings);
|
|
144
|
+
return [command];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Prepares nested quick action object
|
|
152
|
+
* @returns action instance
|
|
153
|
+
*/
|
|
154
|
+
getActionObject() {
|
|
155
|
+
return {
|
|
156
|
+
kind: NESTED_QUICK_ACTION_KIND,
|
|
157
|
+
id: this.id,
|
|
158
|
+
enabled: this.isApplicable,
|
|
159
|
+
title: this.context.resourceBundle.getText(this.textKey),
|
|
160
|
+
children: this.children
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
var __exports = {
|
|
165
|
+
__esModule: true
|
|
166
|
+
};
|
|
167
|
+
__exports.ADD_NEW_ANNOTATION_FILE = ADD_NEW_ANNOTATION_FILE;
|
|
168
|
+
__exports.AddNewAnnotationFile = AddNewAnnotationFile;
|
|
169
|
+
return __exports;
|
|
170
|
+
});
|
|
171
|
+
//# sourceMappingURL=add-new-annotation-file.js.map
|
package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
NESTED_QUICK_ACTION_KIND,
|
|
5
|
+
NestedQuickAction,
|
|
6
|
+
NestedQuickActionChild
|
|
7
|
+
} from '@sap-ux-private/control-property-editor-common';
|
|
8
|
+
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
9
|
+
import CommandFactory from 'sap/ui/rta/command/CommandFactory';
|
|
10
|
+
import { NestedQuickActionDefinition, QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition';
|
|
11
|
+
import { getApplicationType } from '../../../utils/application';
|
|
12
|
+
import { getV4AppComponent } from '../../../utils/fe-v4';
|
|
13
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
|
|
14
|
+
import type { AnnotationDataSourceResponse } from '../../api-handler';
|
|
15
|
+
import { getDataSourceAnnotationFileMap } from '../../api-handler';
|
|
16
|
+
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
17
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
18
|
+
import { getV2AppComponent } from '../fe-v2/utils';
|
|
19
|
+
import { QuickActionDefinitionBase } from '../quick-action-base';
|
|
20
|
+
|
|
21
|
+
export const ADD_NEW_ANNOTATION_FILE = 'add-new-annotation-file';
|
|
22
|
+
const ADD_NEW_ANNOTATION_FILE_TITLE = 'QUICK_ACTION_ADD_NEW_ANNOTATION_FILE';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Add New Annotation File.
|
|
26
|
+
*/
|
|
27
|
+
export class AddNewAnnotationFile
|
|
28
|
+
extends QuickActionDefinitionBase<typeof NESTED_QUICK_ACTION_KIND>
|
|
29
|
+
implements NestedQuickActionDefinition
|
|
30
|
+
{
|
|
31
|
+
public children: NestedQuickActionChild[] = [];
|
|
32
|
+
public get quickActionSteps(): number {
|
|
33
|
+
return 1;
|
|
34
|
+
}
|
|
35
|
+
readonly kind = NESTED_QUICK_ACTION_KIND;
|
|
36
|
+
readonly type = ADD_NEW_ANNOTATION_FILE;
|
|
37
|
+
readonly forceRefreshAfterExecution = true;
|
|
38
|
+
public isApplicable = true;
|
|
39
|
+
public get id(): string {
|
|
40
|
+
return `${this.context.key}-${this.type}`;
|
|
41
|
+
}
|
|
42
|
+
private annotationDataSourceData: AnnotationDataSourceResponse;
|
|
43
|
+
constructor(protected readonly context: QuickActionContext) {
|
|
44
|
+
super(ADD_NEW_ANNOTATION_FILE, NESTED_QUICK_ACTION_KIND, '', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async initialize(): Promise<void> {
|
|
48
|
+
const version = await getUi5Version();
|
|
49
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 108, patch: 27 })) {
|
|
50
|
+
this.isApplicable = false;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
this.annotationDataSourceData = await getDataSourceAnnotationFileMap();
|
|
54
|
+
const { annotationDataSourceMap } = this.annotationDataSourceData;
|
|
55
|
+
if (!Object.keys(this.annotationDataSourceData.annotationDataSourceMap).length) {
|
|
56
|
+
throw new Error('No data sources found in the manifest');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
for (const key in annotationDataSourceMap) {
|
|
60
|
+
if (Object.prototype.hasOwnProperty.call(annotationDataSourceMap, key)) {
|
|
61
|
+
const source = annotationDataSourceMap[key];
|
|
62
|
+
const { annotationExistsInWS } = source.annotationDetails;
|
|
63
|
+
if (source.metadataReadErrorMsg) {
|
|
64
|
+
this.children.push({
|
|
65
|
+
path: this.children.length.toString(),
|
|
66
|
+
enabled: false,
|
|
67
|
+
tooltip: source.metadataReadErrorMsg,
|
|
68
|
+
label: this.context.resourceBundle.getText('ADD_ANNOTATION_FILE', [key]),
|
|
69
|
+
children: []
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
this.children.push({
|
|
73
|
+
path: this.children.length.toString(),
|
|
74
|
+
enabled: true,
|
|
75
|
+
label: annotationExistsInWS
|
|
76
|
+
? this.context.resourceBundle.getText('SHOW_ANNOTATION_FILE', [key])
|
|
77
|
+
: this.context.resourceBundle.getText('ADD_ANNOTATION_FILE', [key]),
|
|
78
|
+
children: []
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
protected get textKey() {
|
|
85
|
+
let result = ADD_NEW_ANNOTATION_FILE_TITLE;
|
|
86
|
+
const dataSourceIds = Object.keys(this.annotationDataSourceData.annotationDataSourceMap);
|
|
87
|
+
if (dataSourceIds.length === 1) {
|
|
88
|
+
const details = this.annotationDataSourceData.annotationDataSourceMap[dataSourceIds[0]];
|
|
89
|
+
if (details.annotationDetails.annotationExistsInWS) {
|
|
90
|
+
result = 'QUICK_ACTION_SHOW_ANNOTATION_FILE';
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
96
|
+
const { annotationDataSourceMap, isRunningInBAS } = this.annotationDataSourceData;
|
|
97
|
+
const appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
98
|
+
const index = Number(path);
|
|
99
|
+
if (index >= 0) {
|
|
100
|
+
const dataSourceId = Object.keys(annotationDataSourceMap)[index];
|
|
101
|
+
const dataSource = annotationDataSourceMap[dataSourceId];
|
|
102
|
+
if (dataSource?.annotationDetails.annotationExistsInWS) {
|
|
103
|
+
const annotationFileDetails = dataSource.annotationDetails;
|
|
104
|
+
const { annotationPath, annotationPathFromRoot } = annotationFileDetails;
|
|
105
|
+
await DialogFactory.createDialog(
|
|
106
|
+
OverlayRegistry.getOverlay(this.context.view), // this passed only because, for method param is required.
|
|
107
|
+
this.context.rta, // same as above
|
|
108
|
+
DialogNames.FILE_EXISTS,
|
|
109
|
+
undefined,
|
|
110
|
+
{
|
|
111
|
+
fileName: annotationPathFromRoot,
|
|
112
|
+
filePath: annotationPath,
|
|
113
|
+
isRunningInBAS: isRunningInBAS
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
// Create annotation file only, if no file exists already for datasource id or if the change file exist and but no annotation file exists in file system.
|
|
118
|
+
else if (dataSource) {
|
|
119
|
+
const timestamp = Date.now();
|
|
120
|
+
const annotationFileNameWithoutExtension = `annotation_${timestamp}`;
|
|
121
|
+
const annotationFileName = `${annotationFileNameWithoutExtension}.xml`;
|
|
122
|
+
const annotationNameSpace =
|
|
123
|
+
this.context.flexSettings.layer === 'CUSTOMER_BASE'
|
|
124
|
+
? `customer.annotation.${annotationFileNameWithoutExtension}`
|
|
125
|
+
: `annotation.${annotationFileNameWithoutExtension}`;
|
|
126
|
+
const parameters = {
|
|
127
|
+
dataSourceId: dataSourceId,
|
|
128
|
+
annotations: [annotationNameSpace],
|
|
129
|
+
annotationsInsertPosition: 'END',
|
|
130
|
+
dataSource: {
|
|
131
|
+
[annotationNameSpace]: {
|
|
132
|
+
uri: `annotations/${annotationFileName}`,
|
|
133
|
+
type: 'ODataAnnotation'
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const modifiedValue = {
|
|
138
|
+
changeType: 'appdescr_app_addAnnotationsToOData',
|
|
139
|
+
appComponent:
|
|
140
|
+
appType === 'fe-v4'
|
|
141
|
+
? getV4AppComponent(this.context.view)
|
|
142
|
+
: getV2AppComponent(this.context.view),
|
|
143
|
+
generator: this.context.flexSettings.generator,
|
|
144
|
+
reference: this.context.flexSettings.projectId,
|
|
145
|
+
parameters,
|
|
146
|
+
serviceUrl: dataSource.serviceUrl
|
|
147
|
+
};
|
|
148
|
+
const command = await CommandFactory.getCommandFor<FlexCommand>(
|
|
149
|
+
this.context.view,
|
|
150
|
+
'appDescriptor',
|
|
151
|
+
modifiedValue,
|
|
152
|
+
null,
|
|
153
|
+
this.context.flexSettings
|
|
154
|
+
);
|
|
155
|
+
return [command];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return [];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Prepares nested quick action object
|
|
163
|
+
* @returns action instance
|
|
164
|
+
*/
|
|
165
|
+
getActionObject(): NestedQuickAction {
|
|
166
|
+
return {
|
|
167
|
+
kind: NESTED_QUICK_ACTION_KIND,
|
|
168
|
+
id: this.id,
|
|
169
|
+
enabled: this.isApplicable,
|
|
170
|
+
title: this.context.resourceBundle.getText(this.textKey),
|
|
171
|
+
children: this.children
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../simple-quick-action-base", "../../../utils/application", "../../../utils/version", "../dialog-enablement-validator"], function (OverlayRegistry, ____dialog_factory, ___simple_quick_action_base, _____utils_application, _____utils_version, ___dialog_enablement_validator) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
9
|
+
const getApplicationType = _____utils_application["getApplicationType"];
|
|
10
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
11
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
12
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
13
|
+
const ADD_PAGE_ACTION = 'add-page-action';
|
|
14
|
+
const CONTROL_TYPES = ['sap.f.DynamicPageTitle', 'sap.uxap.ObjectPageHeader', 'sap.uxap.ObjectPageDynamicHeaderTitle'];
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Quick Action for adding a custom page action.
|
|
18
|
+
*/
|
|
19
|
+
class AddPageActionQuickAction extends SimpleQuickActionDefinitionBase {
|
|
20
|
+
constructor(context) {
|
|
21
|
+
super(ADD_PAGE_ACTION, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
22
|
+
this.appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
23
|
+
}
|
|
24
|
+
async initialize() {
|
|
25
|
+
const version = await getUi5Version();
|
|
26
|
+
if (this.appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, {
|
|
27
|
+
major: 1,
|
|
28
|
+
minor: 130
|
|
29
|
+
})) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
await super.initialize();
|
|
33
|
+
}
|
|
34
|
+
async execute() {
|
|
35
|
+
if (this.control) {
|
|
36
|
+
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
37
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
38
|
+
aggregation: 'actions',
|
|
39
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION',
|
|
40
|
+
defaultAggregationArrayIndex: 1
|
|
41
|
+
}, {
|
|
42
|
+
actionName: this.type,
|
|
43
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
var __exports = {
|
|
50
|
+
__esModule: true
|
|
51
|
+
};
|
|
52
|
+
__exports.ADD_PAGE_ACTION = ADD_PAGE_ACTION;
|
|
53
|
+
__exports.AddPageActionQuickAction = AddPageActionQuickAction;
|
|
54
|
+
return __exports;
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=create-page-action.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
2
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
|
+
|
|
4
|
+
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
5
|
+
import type {
|
|
6
|
+
QuickActionContext,
|
|
7
|
+
SimpleQuickActionDefinition
|
|
8
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
9
|
+
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
10
|
+
import type { ApplicationType } from '../../../utils/application';
|
|
11
|
+
import { getApplicationType } from '../../../utils/application';
|
|
12
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
|
|
13
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
14
|
+
|
|
15
|
+
export const ADD_PAGE_ACTION = 'add-page-action';
|
|
16
|
+
const CONTROL_TYPES = ['sap.f.DynamicPageTitle', 'sap.uxap.ObjectPageHeader', 'sap.uxap.ObjectPageDynamicHeaderTitle'];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Quick Action for adding a custom page action.
|
|
20
|
+
*/
|
|
21
|
+
export class AddPageActionQuickAction extends SimpleQuickActionDefinitionBase implements SimpleQuickActionDefinition {
|
|
22
|
+
private readonly appType: ApplicationType;
|
|
23
|
+
constructor(context: QuickActionContext) {
|
|
24
|
+
super(ADD_PAGE_ACTION, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION', context, [
|
|
25
|
+
DIALOG_ENABLEMENT_VALIDATOR
|
|
26
|
+
]);
|
|
27
|
+
this.appType = getApplicationType(this.context.rta.getRootControlInstance().getManifest());
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async initialize(): Promise<void> {
|
|
31
|
+
const version = await getUi5Version();
|
|
32
|
+
if (this.appType === 'fe-v4' && isLowerThanMinimalUi5Version(version, { major: 1, minor: 130 })) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
await super.initialize();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async execute(): Promise<FlexCommand[]> {
|
|
39
|
+
if (this.control) {
|
|
40
|
+
const overlay = OverlayRegistry.getOverlay(this.control) || [];
|
|
41
|
+
await DialogFactory.createDialog(
|
|
42
|
+
overlay,
|
|
43
|
+
this.context.rta,
|
|
44
|
+
DialogNames.ADD_FRAGMENT,
|
|
45
|
+
undefined,
|
|
46
|
+
{
|
|
47
|
+
aggregation: 'actions',
|
|
48
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_PAGE_ACTION',
|
|
49
|
+
defaultAggregationArrayIndex: 1
|
|
50
|
+
},
|
|
51
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../dialog-factory", "../../../cpe/quick-actions/utils", "../simple-quick-action-base", "../dialog-enablement-validator"], function (OverlayRegistry, ____dialog_factory, _____cpe_quick_actions_utils, ___simple_quick_action_base, ___dialog_enablement_validator) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
7
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
8
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
9
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
10
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
11
|
+
const OP_ADD_CUSTOM_SECTION = 'op-add-custom-section';
|
|
12
|
+
const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Quick Action for adding a Header Field to an Object Page.
|
|
16
|
+
*/
|
|
17
|
+
class AddCustomSectionQuickAction extends SimpleQuickActionDefinitionBase {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super(OP_ADD_CUSTOM_SECTION, CONTROL_TYPES, 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION', context, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
20
|
+
}
|
|
21
|
+
async execute() {
|
|
22
|
+
const objectPageLayout = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, CONTROL_TYPES)[0];
|
|
23
|
+
const overlay = OverlayRegistry.getOverlay(objectPageLayout) || [];
|
|
24
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
25
|
+
aggregation: 'sections',
|
|
26
|
+
title: 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION'
|
|
27
|
+
}, {
|
|
28
|
+
actionName: this.type,
|
|
29
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
30
|
+
});
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
var __exports = {
|
|
35
|
+
__esModule: true
|
|
36
|
+
};
|
|
37
|
+
__exports.OP_ADD_CUSTOM_SECTION = OP_ADD_CUSTOM_SECTION;
|
|
38
|
+
__exports.AddCustomSectionQuickAction = AddCustomSectionQuickAction;
|
|
39
|
+
return __exports;
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=op-add-custom-section.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
2
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
|
+
import type ObjectPageLayout from 'sap/uxap/ObjectPageLayout';
|
|
4
|
+
|
|
5
|
+
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
6
|
+
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
7
|
+
import type {
|
|
8
|
+
QuickActionContext,
|
|
9
|
+
SimpleQuickActionDefinition
|
|
10
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
11
|
+
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
12
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
13
|
+
|
|
14
|
+
export const OP_ADD_CUSTOM_SECTION = 'op-add-custom-section';
|
|
15
|
+
const CONTROL_TYPES = ['sap.uxap.ObjectPageLayout'];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Quick Action for adding a Header Field to an Object Page.
|
|
19
|
+
*/
|
|
20
|
+
export class AddCustomSectionQuickAction
|
|
21
|
+
extends SimpleQuickActionDefinitionBase
|
|
22
|
+
implements SimpleQuickActionDefinition
|
|
23
|
+
{
|
|
24
|
+
constructor(context: QuickActionContext) {
|
|
25
|
+
super(OP_ADD_CUSTOM_SECTION, CONTROL_TYPES, 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION', context, [
|
|
26
|
+
DIALOG_ENABLEMENT_VALIDATOR
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async execute(): Promise<FlexCommand[]> {
|
|
31
|
+
const objectPageLayout = getRelevantControlFromActivePage(
|
|
32
|
+
this.context.controlIndex,
|
|
33
|
+
this.context.view,
|
|
34
|
+
CONTROL_TYPES
|
|
35
|
+
)[0] as ObjectPageLayout;
|
|
36
|
+
|
|
37
|
+
const overlay = OverlayRegistry.getOverlay(objectPageLayout) || [];
|
|
38
|
+
await DialogFactory.createDialog(
|
|
39
|
+
overlay,
|
|
40
|
+
this.context.rta,
|
|
41
|
+
DialogNames.ADD_FRAGMENT,
|
|
42
|
+
undefined,
|
|
43
|
+
{
|
|
44
|
+
aggregation: 'sections',
|
|
45
|
+
title: 'QUICK_ACTION_OP_ADD_CUSTOM_SECTION'
|
|
46
|
+
},
|
|
47
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
48
|
+
);
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
}
|