@sap/ux-ui5-tooling 1.20.4 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/dist/adp-tooling/templates/cf/_gitignore +6 -0
- package/dist/adp-tooling/templates/cf/approuter/package.json +13 -0
- package/dist/adp-tooling/templates/cf/approuter/xs-app.json +15 -0
- package/dist/adp-tooling/templates/cf/i18n/i18n.properties +3 -0
- package/dist/adp-tooling/templates/cf/package.json +35 -0
- package/dist/adp-tooling/templates/cf/ui5.yaml +5 -0
- package/dist/adp-tooling/templates/cf/xs-security.json +7 -0
- package/dist/adp-tooling/templates/changes/annotation.xml +18 -0
- package/dist/adp-tooling/templates/project/gitignore.tmpl +5 -0
- package/dist/adp-tooling/templates/project/package.json +31 -0
- package/dist/adp-tooling/templates/project/ui5.yaml +6 -0
- package/dist/adp-tooling/templates/project/webapp/i18n/i18n.properties +6 -0
- package/dist/adp-tooling/templates/project/webapp/manifest.appdescr_variant +10 -0
- package/dist/adp-tooling/templates/rta/common/analytical-custom-column.xml +25 -0
- package/dist/adp-tooling/templates/rta/common/custom-action.xml +8 -0
- package/dist/adp-tooling/templates/rta/common/grid-tree-custom-column.xml +22 -0
- package/dist/adp-tooling/templates/rta/common/header-field.xml +13 -0
- package/dist/adp-tooling/templates/rta/common/op-custom-section.xml +20 -0
- package/dist/adp-tooling/templates/rta/common/v4-table-action.xml +8 -0
- package/dist/adp-tooling/templates/rta/controller.ejs +80 -0
- package/dist/adp-tooling/templates/rta/fragment.xml +7 -0
- package/dist/adp-tooling/templates/rta/ts-controller.ejs +18 -0
- package/dist/adp-tooling/templates/rta/v2/m-table-custom-column-cell.xml +7 -0
- package/dist/adp-tooling/templates/rta/v2/m-table-custom-column.xml +18 -0
- package/dist/adp-tooling/templates/rta/v4/custom-section.xml +12 -0
- package/dist/adp-tooling/templates/rta/v4/mdc-custom-column-config.xml +6 -0
- package/dist/adp-tooling/templates/rta/v4/mdc-custom-column.xml +11 -0
- package/dist/adp-tooling/templates/typescript/tsconfig.json +19 -0
- package/dist/cli/index.js +17761 -11603
- package/dist/control-property-editor/app.css +2 -0
- package/dist/control-property-editor/app.js +175 -0
- package/dist/livereload-js/livereload.js +3795 -0
- package/dist/middlewares/fiori-tools-appreload.js +44007 -41669
- package/dist/middlewares/fiori-tools-preview.js +66889 -4176
- package/dist/middlewares/fiori-tools-proxy.js +38049 -5767
- package/dist/middlewares/fiori-tools-servestatic.js +32893 -347
- package/dist/preview-middleware/dist/client/adp/add-fragment.js +48 -0
- package/dist/preview-middleware/dist/client/adp/add-fragment.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/api-handler.js +165 -0
- package/dist/preview-middleware/dist/client/adp/api-handler.ts +191 -0
- package/dist/preview-middleware/dist/client/adp/command-executor.js +100 -0
- package/dist/preview-middleware/dist/client/adp/command-executor.ts +105 -0
- package/dist/preview-middleware/dist/client/adp/control-utils.js +46 -0
- package/dist/preview-middleware/dist/client/adp/control-utils.ts +48 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.js +198 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.ts +232 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.js +223 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.ts +257 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.js +195 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.ts +264 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.js +146 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.ts +209 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.js +232 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +306 -0
- package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.js +187 -0
- package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.ts +254 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.js +330 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.ts +408 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.js +160 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.ts +195 -0
- package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.js +68 -0
- package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.ts +86 -0
- package/dist/preview-middleware/dist/client/adp/controllers/types.js +2 -0
- package/dist/preview-middleware/dist/client/adp/controllers/types.ts +10 -0
- package/dist/preview-middleware/dist/client/adp/dialog-factory.js +151 -0
- package/dist/preview-middleware/dist/client/adp/dialog-factory.ts +210 -0
- package/dist/preview-middleware/dist/client/adp/extend-controller.js +48 -0
- package/dist/preview-middleware/dist/client/adp/extend-controller.ts +49 -0
- package/dist/preview-middleware/dist/client/adp/extension-point.js +83 -0
- package/dist/preview-middleware/dist/client/adp/extension-point.ts +116 -0
- package/dist/preview-middleware/dist/client/adp/init-dialogs.js +142 -0
- package/dist/preview-middleware/dist/client/adp/init-dialogs.ts +178 -0
- package/dist/preview-middleware/dist/client/adp/init.js +111 -0
- package/dist/preview-middleware/dist/client/adp/init.ts +92 -0
- package/dist/preview-middleware/dist/client/adp/ovp-window-functions.js +130 -0
- package/dist/preview-middleware/dist/client/adp/ovp-window-functions.ts +171 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +97 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.ts +140 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.js +74 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.ts +92 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.js +171 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +174 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.js +56 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.ts +56 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.js +41 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.js +69 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.ts +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.js +20 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.ts +7 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.js +25 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.ts +7 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.js +26 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.ts +18 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.js +2 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.ts +19 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +82 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.ts +87 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +69 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.ts +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +103 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +105 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.js +111 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +110 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +108 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +141 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +80 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +93 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +79 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +102 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.ts +98 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +61 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +77 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +95 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +102 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts +116 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.js +79 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.ts +121 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.js +138 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.ts +134 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +140 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.ts +181 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.ts +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +90 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +97 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.js +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.ts +98 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.js +129 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.ts +149 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.js +142 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.ts +178 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +83 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts +96 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +58 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +70 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +96 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +55 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.ts +61 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.js +73 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.ts +91 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +91 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +88 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.js +62 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.ts +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.js +158 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.ts +175 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/load.js +46 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/load.ts +23 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.js +64 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.ts +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.js +44 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/supported-ui5versions.md +40 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.js +372 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.ts +433 -0
- package/dist/preview-middleware/dist/client/adp/sync-views-utils.js +123 -0
- package/dist/preview-middleware/dist/client/adp/sync-views-utils.ts +90 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddAction.fragment.xml +49 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddCustomFragment.fragment.xml +48 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddFragment.fragment.xml +83 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddSubpage.fragment.xml +73 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddTableColumnFragments.fragment.xml +63 -0
- package/dist/preview-middleware/dist/client/adp/ui/ControllerExtension.fragment.xml +63 -0
- package/dist/preview-middleware/dist/client/adp/ui/ExtensionPoint.fragment.xml +61 -0
- package/dist/preview-middleware/dist/client/adp/ui/FileExistsDialog.fragment.xml +43 -0
- package/dist/preview-middleware/dist/client/adp/utils.js +199 -0
- package/dist/preview-middleware/dist/client/adp/utils.ts +200 -0
- package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.js +85 -0
- package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.ts +107 -0
- package/dist/preview-middleware/dist/client/cpe/changes/flex-change.js +66 -0
- package/dist/preview-middleware/dist/client/cpe/changes/flex-change.ts +66 -0
- package/dist/preview-middleware/dist/client/cpe/changes/generic-change.js +321 -0
- package/dist/preview-middleware/dist/client/cpe/changes/generic-change.ts +462 -0
- package/dist/preview-middleware/dist/client/cpe/changes/index.js +12 -0
- package/dist/preview-middleware/dist/client/cpe/changes/index.ts +1 -0
- package/dist/preview-middleware/dist/client/cpe/changes/service.js +527 -0
- package/dist/preview-middleware/dist/client/cpe/changes/service.ts +595 -0
- package/dist/preview-middleware/dist/client/cpe/changes/validator.js +41 -0
- package/dist/preview-middleware/dist/client/cpe/changes/validator.ts +35 -0
- package/dist/preview-middleware/dist/client/cpe/communication-service.js +44 -0
- package/dist/preview-middleware/dist/client/cpe/communication-service.ts +41 -0
- package/dist/preview-middleware/dist/client/cpe/connector-service.js +88 -0
- package/dist/preview-middleware/dist/client/cpe/connector-service.ts +74 -0
- package/dist/preview-middleware/dist/client/cpe/context-menu-service.js +90 -0
- package/dist/preview-middleware/dist/client/cpe/context-menu-service.ts +77 -0
- package/dist/preview-middleware/dist/client/cpe/control-data.js +366 -0
- package/dist/preview-middleware/dist/client/cpe/control-data.ts +400 -0
- package/dist/preview-middleware/dist/client/cpe/documentation.js +191 -0
- package/dist/preview-middleware/dist/client/cpe/documentation.ts +187 -0
- package/dist/preview-middleware/dist/client/cpe/feature-service.js +39 -0
- package/dist/preview-middleware/dist/client/cpe/feature-service.ts +25 -0
- package/dist/preview-middleware/dist/client/cpe/init.js +92 -0
- package/dist/preview-middleware/dist/client/cpe/init.ts +114 -0
- package/dist/preview-middleware/dist/client/cpe/logger.js +32 -0
- package/dist/preview-middleware/dist/client/cpe/logger.ts +24 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.js +136 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.ts +160 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.js +63 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.ts +52 -0
- package/dist/preview-middleware/dist/client/cpe/outline/editable.js +38 -0
- package/dist/preview-middleware/dist/client/cpe/outline/editable.ts +30 -0
- package/dist/preview-middleware/dist/client/cpe/outline/nodes.js +212 -0
- package/dist/preview-middleware/dist/client/cpe/outline/nodes.ts +236 -0
- package/dist/preview-middleware/dist/client/cpe/outline/service.js +62 -0
- package/dist/preview-middleware/dist/client/cpe/outline/service.ts +66 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.js +161 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.ts +184 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.js +145 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.ts +157 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.js +94 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.ts +113 -0
- package/dist/preview-middleware/dist/client/cpe/rta-service.js +94 -0
- package/dist/preview-middleware/dist/client/cpe/rta-service.ts +86 -0
- package/dist/preview-middleware/dist/client/cpe/selection.js +249 -0
- package/dist/preview-middleware/dist/client/cpe/selection.ts +267 -0
- package/dist/preview-middleware/dist/client/cpe/ui5-utils.js +35 -0
- package/dist/preview-middleware/dist/client/cpe/ui5-utils.ts +28 -0
- package/dist/preview-middleware/dist/client/cpe/utils.js +113 -0
- package/dist/preview-middleware/dist/client/cpe/utils.ts +162 -0
- package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.js +97 -0
- package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.ts +101 -0
- package/dist/preview-middleware/dist/client/flp/common.js +30 -0
- package/dist/preview-middleware/dist/client/flp/common.ts +28 -0
- package/dist/preview-middleware/dist/client/flp/enableFakeConnector.js +92 -0
- package/dist/preview-middleware/dist/client/flp/enableFakeConnector.ts +113 -0
- package/dist/preview-middleware/dist/client/flp/homepage/Component.js +16 -0
- package/dist/preview-middleware/dist/client/flp/homepage/Component.ts +10 -0
- package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.js +54 -0
- package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.ts +41 -0
- package/dist/preview-middleware/dist/client/flp/homepage/css/style.css +3 -0
- package/dist/preview-middleware/dist/client/flp/homepage/manifest.json +41 -0
- package/dist/preview-middleware/dist/client/flp/homepage/view/MyHome.view.xml +18 -0
- package/dist/preview-middleware/dist/client/flp/init.js +418 -0
- package/dist/preview-middleware/dist/client/flp/init.ts +448 -0
- package/dist/preview-middleware/dist/client/flp/initCdm.js +117 -0
- package/dist/preview-middleware/dist/client/flp/initCdm.ts +111 -0
- package/dist/preview-middleware/dist/client/flp/initConnectors.js +31 -0
- package/dist/preview-middleware/dist/client/flp/initConnectors.ts +20 -0
- package/dist/preview-middleware/dist/client/flp/initRta.js +180 -0
- package/dist/preview-middleware/dist/client/flp/initRta.ts +194 -0
- package/dist/preview-middleware/dist/client/i18n.js +56 -0
- package/dist/preview-middleware/dist/client/i18n.ts +49 -0
- package/dist/preview-middleware/dist/client/manifest.json +8 -0
- package/dist/preview-middleware/dist/client/messagebundle.properties +143 -0
- package/dist/preview-middleware/dist/client/thirdparty/@sap-ux-private/control-property-editor-common.js +486 -0
- package/dist/preview-middleware/dist/client/utils/additional-change-info.js +69 -0
- package/dist/preview-middleware/dist/client/utils/additional-change-info.ts +73 -0
- package/dist/preview-middleware/dist/client/utils/application.js +34 -0
- package/dist/preview-middleware/dist/client/utils/application.ts +27 -0
- package/dist/preview-middleware/dist/client/utils/core.js +144 -0
- package/dist/preview-middleware/dist/client/utils/core.ts +145 -0
- package/dist/preview-middleware/dist/client/utils/error.js +28 -0
- package/dist/preview-middleware/dist/client/utils/error.ts +18 -0
- package/dist/preview-middleware/dist/client/utils/fe-v2.js +58 -0
- package/dist/preview-middleware/dist/client/utils/fe-v2.ts +61 -0
- package/dist/preview-middleware/dist/client/utils/fe-v4.js +168 -0
- package/dist/preview-middleware/dist/client/utils/fe-v4.ts +186 -0
- package/dist/preview-middleware/dist/client/utils/info-center-message.js +60 -0
- package/dist/preview-middleware/dist/client/utils/info-center-message.ts +60 -0
- package/dist/preview-middleware/dist/client/utils/version.js +126 -0
- package/dist/preview-middleware/dist/client/utils/version.ts +138 -0
- package/dist/preview-middleware/templates/flp/cdm.base.json +47 -0
- package/dist/preview-middleware/templates/flp/cdm.ejs +72 -0
- package/dist/preview-middleware/templates/flp/editor.ejs +28 -0
- package/dist/preview-middleware/templates/flp/sandbox.ejs +88 -0
- package/dist/preview-middleware/templates/flp/sandbox2.ejs +86 -0
- package/dist/preview-middleware/templates/test/qunit.ejs +26 -0
- package/dist/preview-middleware/templates/test/qunit.js +29 -0
- package/dist/preview-middleware/templates/test/testsuite.qunit.ejs +10 -0
- package/dist/preview-middleware/templates/test/testsuite.qunit.js +8 -0
- package/dist/tasks/cf-deploy/index.js +3916 -3521
- package/dist/tasks/deploy/index.js +17204 -11133
- package/package.json +36 -39
- package/prebuilds/keyring.darwin-arm64.node +0 -0
- package/prebuilds/keyring.darwin-x64.node +0 -0
- package/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
- package/prebuilds/keyring.linux-arm64-gnu.node +0 -0
- package/prebuilds/keyring.linux-arm64-musl.node +0 -0
- package/prebuilds/keyring.linux-ia32-gnu.node +0 -0
- package/prebuilds/keyring.linux-x64-gnu.node +0 -0
- package/prebuilds/keyring.linux-x64-musl.node +0 -0
- package/prebuilds/keyring.win32-arm64-msvc.node +0 -0
- package/prebuilds/keyring.win32-ia32-msvc.node +0 -0
- package/prebuilds/keyring.win32-x64-msvc.node +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../utils/fe-v4", "../add-new-subpage-quick-action-base", "../../../utils/core", "../../../utils/version"], function (_____utils_fe_v4, ___add_new_subpage_quick_action_base, _____utils_core, _____utils_version) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getV4AppComponent = _____utils_fe_v4["getV4AppComponent"];
|
|
7
|
+
const getV4ApplicationPages = _____utils_fe_v4["getV4ApplicationPages"];
|
|
8
|
+
const AddNewSubpageBase = ___add_new_subpage_quick_action_base["AddNewSubpageBase"];
|
|
9
|
+
const isA = _____utils_core["isA"];
|
|
10
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
11
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
12
|
+
const OBJECT_PAGE_COMPONENT_NAME_V4 = 'sap.fe.templates.ObjectPage.ObjectPage';
|
|
13
|
+
/**
|
|
14
|
+
* Quick Action for adding a custom page action.
|
|
15
|
+
*/
|
|
16
|
+
class AddNewSubpage extends AddNewSubpageBase {
|
|
17
|
+
get currentPageDescriptor() {
|
|
18
|
+
if (!this.pageId) {
|
|
19
|
+
throw new Error('pageId is not defined');
|
|
20
|
+
}
|
|
21
|
+
if (!this.routePattern) {
|
|
22
|
+
throw new Error('routePattern is not defined');
|
|
23
|
+
}
|
|
24
|
+
if (!this.appComponent) {
|
|
25
|
+
throw new Error('appComponent is not defined');
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
appType: 'fe-v4',
|
|
29
|
+
appComponent: this.appComponent,
|
|
30
|
+
pageId: this.pageId,
|
|
31
|
+
routePattern: this.routePattern
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
getApplicationPages() {
|
|
35
|
+
return getV4ApplicationPages(this.context.manifest);
|
|
36
|
+
}
|
|
37
|
+
async resolveContextPathTargetName(contextPath, metaModel) {
|
|
38
|
+
let result;
|
|
39
|
+
const segments = contextPath.split('/').filter(s => !!s);
|
|
40
|
+
if (segments.length === 1) {
|
|
41
|
+
// one segment - assumed it is the direct name of entitySet
|
|
42
|
+
result = segments[0];
|
|
43
|
+
} else {
|
|
44
|
+
// resolve segment by segment
|
|
45
|
+
let targetObject = await metaModel.requestObject(`/${segments[0]}`); // NO SONAR;
|
|
46
|
+
|
|
47
|
+
let idx = 1;
|
|
48
|
+
let targetSetName = '';
|
|
49
|
+
while (targetObject && idx < segments.length) {
|
|
50
|
+
const navProp = segments[idx];
|
|
51
|
+
targetSetName = targetObject.$NavigationPropertyBinding[navProp];
|
|
52
|
+
if (!targetSetName) {
|
|
53
|
+
targetObject = undefined;
|
|
54
|
+
} else {
|
|
55
|
+
targetObject = await metaModel.requestObject(`/${targetSetName}`); // NO SONAR;
|
|
56
|
+
idx++;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (targetObject) {
|
|
60
|
+
result = targetSetName;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
async isPageExists(targetEntitySet, metaModel) {
|
|
66
|
+
let pageFound = false;
|
|
67
|
+
let entitySetName;
|
|
68
|
+
for (const page of this.existingPages) {
|
|
69
|
+
if (page.contextPath) {
|
|
70
|
+
// resolve contextPath to target entitySet
|
|
71
|
+
entitySetName = await this.resolveContextPathTargetName(page.contextPath, metaModel);
|
|
72
|
+
} else {
|
|
73
|
+
entitySetName = page.entitySet;
|
|
74
|
+
}
|
|
75
|
+
if (entitySetName === targetEntitySet) {
|
|
76
|
+
pageFound = true;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return pageFound;
|
|
81
|
+
}
|
|
82
|
+
isCurrentObjectPage() {
|
|
83
|
+
return this.pageType === OBJECT_PAGE_COMPONENT_NAME_V4;
|
|
84
|
+
}
|
|
85
|
+
getODataMetaModel() {
|
|
86
|
+
return this.context.rta.getRootControlInstance().getModel()?.getMetaModel();
|
|
87
|
+
}
|
|
88
|
+
async getEntitySetNameFromPageComponent(component, metaModel) {
|
|
89
|
+
if (!isA('sap.fe.templates.ListReport.Component', component) && !isA('sap.fe.templates.ObjectPage.Component', component)) {
|
|
90
|
+
throw new Error('Unexpected type of page owner component');
|
|
91
|
+
}
|
|
92
|
+
let entitySet = component.getEntitySet();
|
|
93
|
+
const contextPath = component.getContextPath();
|
|
94
|
+
if (contextPath) {
|
|
95
|
+
entitySet = await this.resolveContextPathTargetName(contextPath, metaModel);
|
|
96
|
+
}
|
|
97
|
+
return entitySet;
|
|
98
|
+
}
|
|
99
|
+
async prepareNavigationData(metaModel) {
|
|
100
|
+
const entitySet = await metaModel.requestObject(`/${this.entitySet}`); // NO SONAR;
|
|
101
|
+
if (!entitySet) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const entityTypePath = entitySet.$Type;
|
|
105
|
+
const entitySetNavigationKeys = Object.keys(entitySet.$NavigationPropertyBinding);
|
|
106
|
+
for (const navigationProperty of entitySetNavigationKeys) {
|
|
107
|
+
const associationEnd = await metaModel.requestObject(`/${entityTypePath}/${navigationProperty}`);
|
|
108
|
+
if (associationEnd?.$isCollection) {
|
|
109
|
+
const targetEntitySet = entitySet.$NavigationPropertyBinding[navigationProperty];
|
|
110
|
+
await this.addNavigationOptionIfAvailable(metaModel, targetEntitySet, navigationProperty);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async initialize() {
|
|
115
|
+
const version = await getUi5Version();
|
|
116
|
+
if (isLowerThanMinimalUi5Version(version, {
|
|
117
|
+
major: 1,
|
|
118
|
+
minor: 135
|
|
119
|
+
})) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
await super.initialize();
|
|
123
|
+
this.appComponent = getV4AppComponent(this.context.view);
|
|
124
|
+
this.pageId = this.context.view.getViewData()?.stableId.split('::').pop();
|
|
125
|
+
// remember current page route pattern (used in dialog controller for new page change)
|
|
126
|
+
const currentPageRoute = (this.context.manifest['sap.ui5'].routing?.routes ?? []).find(r => r.name === this.pageId);
|
|
127
|
+
if (!currentPageRoute) {
|
|
128
|
+
throw new Error('Current page navigation route not found in manifest');
|
|
129
|
+
}
|
|
130
|
+
this.routePattern = currentPageRoute.pattern;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
var __exports = {
|
|
134
|
+
__esModule: true
|
|
135
|
+
};
|
|
136
|
+
__exports.OBJECT_PAGE_COMPONENT_NAME_V4 = OBJECT_PAGE_COMPONENT_NAME_V4;
|
|
137
|
+
__exports.AddNewSubpage = AddNewSubpage;
|
|
138
|
+
return __exports;
|
|
139
|
+
});
|
|
140
|
+
//# sourceMappingURL=add-new-subpage.js.map
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import ODataModelV4 from 'sap/ui/model/odata/v4/ODataModel';
|
|
2
|
+
import ODataMetaModelV4 from 'sap/ui/model/odata/v4/ODataMetaModel';
|
|
3
|
+
import Component from 'sap/ui/core/Component';
|
|
4
|
+
import AppComponent from 'sap/fe/core/AppComponent';
|
|
5
|
+
|
|
6
|
+
import { getV4AppComponent, getV4ApplicationPages } from '../../../utils/fe-v4';
|
|
7
|
+
import { AddNewSubpageBase, ApplicationPageData } from '../add-new-subpage-quick-action-base';
|
|
8
|
+
import { isA } from '../../../utils/core';
|
|
9
|
+
import FEObjectPageComponent from 'sap/fe/templates/ObjectPage/Component';
|
|
10
|
+
import FEListReportComponent from 'sap/fe/templates/ListReport/Component';
|
|
11
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
|
|
12
|
+
import { PageDescriptorV4 } from '../../controllers/types';
|
|
13
|
+
|
|
14
|
+
export const OBJECT_PAGE_COMPONENT_NAME_V4 = 'sap.fe.templates.ObjectPage.ObjectPage';
|
|
15
|
+
|
|
16
|
+
interface ViewDataType {
|
|
17
|
+
stableId: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Quick Action for adding a custom page action.
|
|
22
|
+
*/
|
|
23
|
+
export class AddNewSubpage extends AddNewSubpageBase<ODataMetaModelV4> {
|
|
24
|
+
protected pageId: string | undefined;
|
|
25
|
+
protected routePattern: string | undefined;
|
|
26
|
+
protected appComponent: AppComponent | undefined;
|
|
27
|
+
|
|
28
|
+
protected get currentPageDescriptor(): PageDescriptorV4 {
|
|
29
|
+
if (!this.pageId) {
|
|
30
|
+
throw new Error('pageId is not defined');
|
|
31
|
+
}
|
|
32
|
+
if (!this.routePattern) {
|
|
33
|
+
throw new Error('routePattern is not defined');
|
|
34
|
+
}
|
|
35
|
+
if (!this.appComponent) {
|
|
36
|
+
throw new Error('appComponent is not defined');
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
appType: 'fe-v4',
|
|
40
|
+
appComponent: this.appComponent,
|
|
41
|
+
pageId: this.pageId,
|
|
42
|
+
routePattern: this.routePattern
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected getApplicationPages(): ApplicationPageData[] {
|
|
47
|
+
return getV4ApplicationPages(this.context.manifest);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
private async resolveContextPathTargetName(
|
|
51
|
+
contextPath: string,
|
|
52
|
+
metaModel: ODataMetaModelV4
|
|
53
|
+
): Promise<string | undefined> {
|
|
54
|
+
let result: string | undefined;
|
|
55
|
+
const segments = contextPath.split('/').filter((s) => !!s);
|
|
56
|
+
if (segments.length === 1) {
|
|
57
|
+
// one segment - assumed it is the direct name of entitySet
|
|
58
|
+
result = segments[0];
|
|
59
|
+
} else {
|
|
60
|
+
// resolve segment by segment
|
|
61
|
+
let targetObject = (await metaModel.requestObject(`/${segments[0]}`)) as
|
|
62
|
+
| {
|
|
63
|
+
$Type: string;
|
|
64
|
+
$NavigationPropertyBinding: { [key: string]: string };
|
|
65
|
+
}
|
|
66
|
+
| undefined; // NO SONAR;
|
|
67
|
+
|
|
68
|
+
let idx = 1;
|
|
69
|
+
let targetSetName = '';
|
|
70
|
+
while (targetObject && idx < segments.length) {
|
|
71
|
+
const navProp = segments[idx];
|
|
72
|
+
targetSetName = targetObject.$NavigationPropertyBinding[navProp];
|
|
73
|
+
if (!targetSetName) {
|
|
74
|
+
targetObject = undefined;
|
|
75
|
+
} else {
|
|
76
|
+
targetObject = (await metaModel.requestObject(`/${targetSetName}`)) as
|
|
77
|
+
| {
|
|
78
|
+
$Type: string;
|
|
79
|
+
$NavigationPropertyBinding: { [key: string]: string };
|
|
80
|
+
}
|
|
81
|
+
| undefined; // NO SONAR;
|
|
82
|
+
idx++;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (targetObject) {
|
|
86
|
+
result = targetSetName;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
protected async isPageExists(targetEntitySet: string, metaModel: ODataMetaModelV4): Promise<boolean> {
|
|
93
|
+
let pageFound = false;
|
|
94
|
+
let entitySetName: string | undefined;
|
|
95
|
+
for (const page of this.existingPages) {
|
|
96
|
+
if (page.contextPath) {
|
|
97
|
+
// resolve contextPath to target entitySet
|
|
98
|
+
entitySetName = await this.resolveContextPathTargetName(page.contextPath, metaModel);
|
|
99
|
+
} else {
|
|
100
|
+
entitySetName = page.entitySet;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (entitySetName === targetEntitySet) {
|
|
104
|
+
pageFound = true;
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return pageFound;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
protected isCurrentObjectPage(): boolean {
|
|
113
|
+
return this.pageType === OBJECT_PAGE_COMPONENT_NAME_V4;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
protected getODataMetaModel(): ODataMetaModelV4 | undefined {
|
|
117
|
+
return (this.context.rta.getRootControlInstance().getModel() as ODataModelV4)?.getMetaModel();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
protected async getEntitySetNameFromPageComponent(
|
|
121
|
+
component: Component | undefined,
|
|
122
|
+
metaModel: ODataMetaModelV4
|
|
123
|
+
): Promise<string | undefined> {
|
|
124
|
+
if (
|
|
125
|
+
!isA<FEObjectPageComponent>('sap.fe.templates.ListReport.Component', component) &&
|
|
126
|
+
!isA<FEListReportComponent>('sap.fe.templates.ObjectPage.Component', component)
|
|
127
|
+
) {
|
|
128
|
+
throw new Error('Unexpected type of page owner component');
|
|
129
|
+
}
|
|
130
|
+
let entitySet: string | undefined = component.getEntitySet();
|
|
131
|
+
const contextPath = component.getContextPath();
|
|
132
|
+
if (contextPath) {
|
|
133
|
+
entitySet = await this.resolveContextPathTargetName(contextPath, metaModel);
|
|
134
|
+
}
|
|
135
|
+
return entitySet;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
protected async prepareNavigationData(metaModel: ODataMetaModelV4) {
|
|
139
|
+
const entitySet = (await metaModel.requestObject(`/${this.entitySet}`)) as {
|
|
140
|
+
$Type: string;
|
|
141
|
+
$NavigationPropertyBinding: { [key: string]: string };
|
|
142
|
+
}; // NO SONAR;
|
|
143
|
+
if (!entitySet) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const entityTypePath = entitySet.$Type;
|
|
147
|
+
const entitySetNavigationKeys = Object.keys(entitySet.$NavigationPropertyBinding);
|
|
148
|
+
|
|
149
|
+
for (const navigationProperty of entitySetNavigationKeys) {
|
|
150
|
+
const associationEnd = (await metaModel.requestObject(`/${entityTypePath}/${navigationProperty}`)) as {
|
|
151
|
+
$Type: string;
|
|
152
|
+
$isCollection: boolean;
|
|
153
|
+
$kind: 'NavigationProperty';
|
|
154
|
+
};
|
|
155
|
+
if (associationEnd?.$isCollection) {
|
|
156
|
+
const targetEntitySet = entitySet.$NavigationPropertyBinding[navigationProperty];
|
|
157
|
+
await this.addNavigationOptionIfAvailable(metaModel, targetEntitySet, navigationProperty);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
async initialize(): Promise<void> {
|
|
163
|
+
const version = await getUi5Version();
|
|
164
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 135 })) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
await super.initialize();
|
|
168
|
+
|
|
169
|
+
this.appComponent = getV4AppComponent(this.context.view);
|
|
170
|
+
|
|
171
|
+
this.pageId = (this.context.view.getViewData() as ViewDataType)?.stableId.split('::').pop() as string;
|
|
172
|
+
// remember current page route pattern (used in dialog controller for new page change)
|
|
173
|
+
const currentPageRoute = (this.context.manifest['sap.ui5'].routing?.routes ?? []).find(
|
|
174
|
+
(r) => r.name === this.pageId
|
|
175
|
+
);
|
|
176
|
+
if (!currentPageRoute) {
|
|
177
|
+
throw new Error('Current page navigation route not found in manifest');
|
|
178
|
+
}
|
|
179
|
+
this.routePattern = currentPageRoute.pattern;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayUtil", "../../../utils/core", "../table-quick-action-base", "../control-types", "../../../cpe/quick-actions/utils", "../fe-v2/create-table-custom-column", "../dialog-enablement-validator"], function (OverlayUtil, _____utils_core, ___table_quick_action_base, ___control_types, _____cpe_quick_actions_utils, ___fe_v2_create_table_custom_column, ___dialog_enablement_validator) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getControlById = _____utils_core["getControlById"];
|
|
7
|
+
const findNestedElements = _____utils_core["findNestedElements"];
|
|
8
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
9
|
+
const MDC_ACTION_TOOLBAR_TYPE = ___control_types["MDC_ACTION_TOOLBAR_TYPE"];
|
|
10
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
11
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
12
|
+
const preprocessActionExecution = ___fe_v2_create_table_custom_column["preprocessActionExecution"];
|
|
13
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
14
|
+
const CHANGE_TABLE_ACTIONS = 'change-table-actions';
|
|
15
|
+
const ACTION_ID = 'CTX_SETTINGS';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Quick Action for changing table columns.
|
|
19
|
+
*/
|
|
20
|
+
class ChangeTableActionsQuickAction extends TableQuickActionDefinitionBase {
|
|
21
|
+
toolbarsMap = {};
|
|
22
|
+
constructor(context) {
|
|
23
|
+
super(CHANGE_TABLE_ACTIONS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_ACTIONS', context, undefined, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
24
|
+
}
|
|
25
|
+
async initialize() {
|
|
26
|
+
const toolbars = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [MDC_ACTION_TOOLBAR_TYPE]);
|
|
27
|
+
const processChild = async (child, mapKey) => {
|
|
28
|
+
const mapEntry = this.tableMap[mapKey];
|
|
29
|
+
if (mapEntry) {
|
|
30
|
+
const tableToolbar = findNestedElements(mapEntry.table, toolbars)[0];
|
|
31
|
+
this.toolbarsMap[mapKey] = tableToolbar;
|
|
32
|
+
const actions = tableToolbar ? await this.context.actionService.get(tableToolbar.getId()) : [];
|
|
33
|
+
const changeToolbarContentAction = actions.find(action => action.id === ACTION_ID);
|
|
34
|
+
child.enabled = !!changeToolbarContentAction?.enabled;
|
|
35
|
+
let tooltip;
|
|
36
|
+
if (!tableToolbar) {
|
|
37
|
+
tooltip = this.context.resourceBundle.getText('TABLE_HEADER_TOOLBAR_NOT_AVAILABLE');
|
|
38
|
+
} else if (!child.enabled) {
|
|
39
|
+
tooltip = this.context.resourceBundle.getText('TABLE_HEADER_TOOLBAR_NOT_CHANGEABLE');
|
|
40
|
+
}
|
|
41
|
+
child.tooltip = tooltip ?? child.tooltip;
|
|
42
|
+
}
|
|
43
|
+
for (let idx = 0; idx < child.children.length; idx++) {
|
|
44
|
+
await processChild(child.children[idx], `${mapKey}/${idx}`);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
await super.initialize();
|
|
48
|
+
|
|
49
|
+
// disable nested actions based on conditions
|
|
50
|
+
for (let idx = 0; idx < this.children.length; idx++) {
|
|
51
|
+
await processChild(this.children[idx], `${idx}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async execute(path) {
|
|
55
|
+
const {
|
|
56
|
+
table,
|
|
57
|
+
sectionInfo,
|
|
58
|
+
iconTabBarFilterKey
|
|
59
|
+
} = this.tableMap[path];
|
|
60
|
+
const toolbar = this.toolbarsMap[path];
|
|
61
|
+
if (!table || !toolbar) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
65
|
+
const toolbarControl = getControlById(toolbar.getId());
|
|
66
|
+
const controlOverlay = OverlayUtil.getClosestOverlayFor(toolbarControl);
|
|
67
|
+
if (controlOverlay) {
|
|
68
|
+
controlOverlay.setSelected(true);
|
|
69
|
+
await this.context.actionService.execute(toolbar.getId(), ACTION_ID);
|
|
70
|
+
}
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
var __exports = {
|
|
75
|
+
__esModule: true
|
|
76
|
+
};
|
|
77
|
+
__exports.CHANGE_TABLE_ACTIONS = CHANGE_TABLE_ACTIONS;
|
|
78
|
+
__exports.ChangeTableActionsQuickAction = ChangeTableActionsQuickAction;
|
|
79
|
+
return __exports;
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=change-table-actions.js.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import OverlayUtil from 'sap/ui/dt/OverlayUtil';
|
|
2
|
+
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
|
+
import UI5Element from 'sap/ui/core/Element';
|
|
4
|
+
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
5
|
+
import { getControlById, findNestedElements } from '../../../utils/core';
|
|
6
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
7
|
+
import { MDC_ACTION_TOOLBAR_TYPE, MDC_TABLE_TYPE } from '../control-types';
|
|
8
|
+
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
9
|
+
import { NestedQuickActionChild } from '@sap-ux-private/control-property-editor-common';
|
|
10
|
+
import { preprocessActionExecution } from '../fe-v2/create-table-custom-column';
|
|
11
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
12
|
+
|
|
13
|
+
export const CHANGE_TABLE_ACTIONS = 'change-table-actions';
|
|
14
|
+
const ACTION_ID = 'CTX_SETTINGS';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Quick Action for changing table columns.
|
|
18
|
+
*/
|
|
19
|
+
export class ChangeTableActionsQuickAction
|
|
20
|
+
extends TableQuickActionDefinitionBase
|
|
21
|
+
implements NestedQuickActionDefinition
|
|
22
|
+
{
|
|
23
|
+
public toolbarsMap: Record<string, UI5Element | undefined> = {};
|
|
24
|
+
|
|
25
|
+
constructor(context: QuickActionContext) {
|
|
26
|
+
super(CHANGE_TABLE_ACTIONS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_ACTIONS', context, undefined, [
|
|
27
|
+
DIALOG_ENABLEMENT_VALIDATOR
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async initialize(): Promise<void> {
|
|
32
|
+
const toolbars = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [
|
|
33
|
+
MDC_ACTION_TOOLBAR_TYPE
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
const processChild = async (child: NestedQuickActionChild, mapKey: string) => {
|
|
37
|
+
const mapEntry = this.tableMap[mapKey];
|
|
38
|
+
if (mapEntry) {
|
|
39
|
+
const tableToolbar = findNestedElements(mapEntry.table, toolbars)[0];
|
|
40
|
+
this.toolbarsMap[mapKey] = tableToolbar;
|
|
41
|
+
const actions = tableToolbar ? await this.context.actionService.get(tableToolbar.getId()) : [];
|
|
42
|
+
const changeToolbarContentAction = actions.find((action) => action.id === ACTION_ID);
|
|
43
|
+
|
|
44
|
+
child.enabled = !!changeToolbarContentAction?.enabled;
|
|
45
|
+
let tooltip: string | undefined;
|
|
46
|
+
if (!tableToolbar) {
|
|
47
|
+
tooltip = this.context.resourceBundle.getText('TABLE_HEADER_TOOLBAR_NOT_AVAILABLE');
|
|
48
|
+
} else if (!child.enabled) {
|
|
49
|
+
tooltip = this.context.resourceBundle.getText('TABLE_HEADER_TOOLBAR_NOT_CHANGEABLE');
|
|
50
|
+
}
|
|
51
|
+
child.tooltip = tooltip ?? child.tooltip;
|
|
52
|
+
}
|
|
53
|
+
for (let idx = 0; idx < child.children.length; idx++) {
|
|
54
|
+
await processChild(child.children[idx], `${mapKey}/${idx}`);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
await super.initialize();
|
|
59
|
+
|
|
60
|
+
// disable nested actions based on conditions
|
|
61
|
+
for (let idx = 0; idx < this.children.length; idx++) {
|
|
62
|
+
await processChild(this.children[idx], `${idx}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
67
|
+
const { table, sectionInfo, iconTabBarFilterKey } = this.tableMap[path];
|
|
68
|
+
const toolbar = this.toolbarsMap[path];
|
|
69
|
+
if (!table || !toolbar) {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
73
|
+
const toolbarControl = getControlById(toolbar.getId());
|
|
74
|
+
const controlOverlay = OverlayUtil.getClosestOverlayFor(toolbarControl);
|
|
75
|
+
if (controlOverlay) {
|
|
76
|
+
controlOverlay.setSelected(true);
|
|
77
|
+
await this.context.actionService.execute(toolbar.getId(), ACTION_ID);
|
|
78
|
+
}
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayUtil", "sap/ui/fl/apply/api/FlexRuntimeInfoAPI", "../../../utils/core", "../table-quick-action-base", "../control-types", "../dialog-enablement-validator", "../../../cpe/quick-actions/utils"], function (OverlayUtil, FlexRuntimeInfoAPI, _____utils_core, ___table_quick_action_base, ___control_types, ___dialog_enablement_validator, _____cpe_quick_actions_utils) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getControlById = _____utils_core["getControlById"];
|
|
7
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
8
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
9
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
10
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
11
|
+
const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
12
|
+
const ACTION_ID = 'CTX_SETTINGS0';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Quick Action for changing table columns.
|
|
16
|
+
*/
|
|
17
|
+
class ChangeTableColumnsQuickAction extends TableQuickActionDefinitionBase {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super(CHANGE_TABLE_COLUMNS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context, undefined, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
20
|
+
}
|
|
21
|
+
async initialize() {
|
|
22
|
+
for (const smartTable of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, this.controlTypes)) {
|
|
23
|
+
const hasVariantManagement = FlexRuntimeInfoAPI.hasVariantManagement({
|
|
24
|
+
element: smartTable
|
|
25
|
+
});
|
|
26
|
+
const path = this.children.length.toString();
|
|
27
|
+
const tableHeader = smartTable.getHeader() || 'Unnamed';
|
|
28
|
+
const tableLabel = `'${tableHeader}' table`;
|
|
29
|
+
if (!hasVariantManagement) {
|
|
30
|
+
this.children.push({
|
|
31
|
+
path,
|
|
32
|
+
label: tableLabel,
|
|
33
|
+
enabled: false,
|
|
34
|
+
tooltip: this.context.resourceBundle.getText('TABLE_ACTION_DISABLED_VARIANT_MANAGEMENT_NOT_AVAILABLE'),
|
|
35
|
+
children: []
|
|
36
|
+
});
|
|
37
|
+
this.tableMap[path] = {
|
|
38
|
+
table: smartTable,
|
|
39
|
+
tableUpdateEventAttachedOnce: false
|
|
40
|
+
};
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
const actions = await this.context.actionService.get(smartTable.getId());
|
|
44
|
+
const changeColumnAction = actions.find(action => action.id === ACTION_ID);
|
|
45
|
+
if (changeColumnAction) {
|
|
46
|
+
this.children.push({
|
|
47
|
+
path,
|
|
48
|
+
label: tableLabel,
|
|
49
|
+
enabled: true,
|
|
50
|
+
children: []
|
|
51
|
+
});
|
|
52
|
+
this.tableMap[path] = {
|
|
53
|
+
table: smartTable,
|
|
54
|
+
tableUpdateEventAttachedOnce: false
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (this.children.length > 0) {
|
|
59
|
+
this.isApplicable = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async execute(path) {
|
|
63
|
+
const {
|
|
64
|
+
table
|
|
65
|
+
} = this.tableMap[path];
|
|
66
|
+
if (!table) {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
const tableControl = getControlById(table.getId());
|
|
70
|
+
const controlOverlay = OverlayUtil.getClosestOverlayFor(tableControl);
|
|
71
|
+
if (controlOverlay) {
|
|
72
|
+
controlOverlay.setSelected(true);
|
|
73
|
+
}
|
|
74
|
+
const hasVariantManagement = FlexRuntimeInfoAPI.hasVariantManagement({
|
|
75
|
+
element: table
|
|
76
|
+
});
|
|
77
|
+
if (hasVariantManagement) {
|
|
78
|
+
await this.context.actionService.execute(table.getId(), ACTION_ID);
|
|
79
|
+
}
|
|
80
|
+
return [];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
var __exports = {
|
|
84
|
+
__esModule: true
|
|
85
|
+
};
|
|
86
|
+
__exports.CHANGE_TABLE_COLUMNS = CHANGE_TABLE_COLUMNS;
|
|
87
|
+
__exports.ChangeTableColumnsQuickAction = ChangeTableColumnsQuickAction;
|
|
88
|
+
return __exports;
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=change-table-columns.js.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import OverlayUtil from 'sap/ui/dt/OverlayUtil';
|
|
2
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
|
+
import FlexRuntimeInfoAPI from 'sap/ui/fl/apply/api/FlexRuntimeInfoAPI';
|
|
4
|
+
import type {
|
|
5
|
+
QuickActionContext,
|
|
6
|
+
NestedQuickActionDefinition
|
|
7
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
8
|
+
import { getControlById } from '../../../utils/core';
|
|
9
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
10
|
+
import { MDC_TABLE_TYPE } from '../control-types';
|
|
11
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
12
|
+
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
13
|
+
import type Table from 'sap/ui/mdc/Table';
|
|
14
|
+
|
|
15
|
+
export const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
16
|
+
const ACTION_ID = 'CTX_SETTINGS0';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Quick Action for changing table columns.
|
|
20
|
+
*/
|
|
21
|
+
export class ChangeTableColumnsQuickAction
|
|
22
|
+
extends TableQuickActionDefinitionBase
|
|
23
|
+
implements NestedQuickActionDefinition
|
|
24
|
+
{
|
|
25
|
+
constructor(context: QuickActionContext) {
|
|
26
|
+
super(CHANGE_TABLE_COLUMNS, [MDC_TABLE_TYPE], 'V4_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context, undefined, [
|
|
27
|
+
DIALOG_ENABLEMENT_VALIDATOR
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async initialize(): Promise<void> {
|
|
32
|
+
for (const smartTable of getRelevantControlFromActivePage(
|
|
33
|
+
this.context.controlIndex,
|
|
34
|
+
this.context.view,
|
|
35
|
+
this.controlTypes
|
|
36
|
+
)) {
|
|
37
|
+
const hasVariantManagement = FlexRuntimeInfoAPI.hasVariantManagement({ element: smartTable });
|
|
38
|
+
const path = this.children.length.toString();
|
|
39
|
+
const tableHeader = (smartTable as Table).getHeader() || 'Unnamed';
|
|
40
|
+
const tableLabel = `'${tableHeader}' table`;
|
|
41
|
+
|
|
42
|
+
if (!hasVariantManagement) {
|
|
43
|
+
this.children.push({
|
|
44
|
+
path,
|
|
45
|
+
label: tableLabel,
|
|
46
|
+
enabled: false,
|
|
47
|
+
tooltip: this.context.resourceBundle.getText(
|
|
48
|
+
'TABLE_ACTION_DISABLED_VARIANT_MANAGEMENT_NOT_AVAILABLE'
|
|
49
|
+
),
|
|
50
|
+
children: []
|
|
51
|
+
});
|
|
52
|
+
this.tableMap[path] = {
|
|
53
|
+
table: smartTable,
|
|
54
|
+
tableUpdateEventAttachedOnce: false
|
|
55
|
+
};
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const actions = await this.context.actionService.get(smartTable.getId());
|
|
60
|
+
const changeColumnAction = actions.find((action) => action.id === ACTION_ID);
|
|
61
|
+
if (changeColumnAction) {
|
|
62
|
+
this.children.push({
|
|
63
|
+
path,
|
|
64
|
+
label: tableLabel,
|
|
65
|
+
enabled: true,
|
|
66
|
+
children: []
|
|
67
|
+
});
|
|
68
|
+
this.tableMap[path] = {
|
|
69
|
+
table: smartTable,
|
|
70
|
+
tableUpdateEventAttachedOnce: false
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (this.children.length > 0) {
|
|
76
|
+
this.isApplicable = true;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
81
|
+
const { table } = this.tableMap[path];
|
|
82
|
+
if (!table) {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
const tableControl = getControlById(table.getId());
|
|
86
|
+
const controlOverlay = OverlayUtil.getClosestOverlayFor(tableControl);
|
|
87
|
+
if (controlOverlay) {
|
|
88
|
+
controlOverlay.setSelected(true);
|
|
89
|
+
}
|
|
90
|
+
const hasVariantManagement = FlexRuntimeInfoAPI.hasVariantManagement({ element: table });
|
|
91
|
+
if (hasVariantManagement) {
|
|
92
|
+
await this.context.actionService.execute(table.getId(), ACTION_ID);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
}
|