@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,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../utils/fe-v2", "../add-new-subpage-quick-action-base", "../../../utils/core", "./utils"], function (_____utils_fe_v2, ___add_new_subpage_quick_action_base, _____utils_core, ___utils) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getV2ApplicationPages = _____utils_fe_v2["getV2ApplicationPages"];
|
|
7
|
+
const AddNewSubpageBase = ___add_new_subpage_quick_action_base["AddNewSubpageBase"];
|
|
8
|
+
const isA = _____utils_core["isA"];
|
|
9
|
+
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
10
|
+
const getV2AppComponent = ___utils["getV2AppComponent"];
|
|
11
|
+
const OBJECT_PAGE_COMPONENT_NAME_V2 = 'sap.suite.ui.generic.template.ObjectPage';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Quick Action for adding a custom page action.
|
|
15
|
+
*/
|
|
16
|
+
class AddNewSubpage extends AddNewSubpageBase {
|
|
17
|
+
get currentPageDescriptor() {
|
|
18
|
+
if (!this.entitySet) {
|
|
19
|
+
throw new Error('entitySet is not defined');
|
|
20
|
+
}
|
|
21
|
+
if (!this.pageType) {
|
|
22
|
+
throw new Error('pageType is not defined');
|
|
23
|
+
}
|
|
24
|
+
if (!this.appComponent) {
|
|
25
|
+
throw new Error('appComponent is not defined');
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
appType: 'fe-v2',
|
|
29
|
+
appComponent: this.appComponent,
|
|
30
|
+
entitySet: this.entitySet,
|
|
31
|
+
pageType: this.pageType
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
getApplicationPages() {
|
|
35
|
+
return getV2ApplicationPages(this.context.manifest);
|
|
36
|
+
}
|
|
37
|
+
isPageExists(targetEntitySet) {
|
|
38
|
+
return this.existingPages.some(page => page.entitySet === targetEntitySet);
|
|
39
|
+
}
|
|
40
|
+
isCurrentObjectPage() {
|
|
41
|
+
return this.pageType === OBJECT_PAGE_COMPONENT_NAME_V2;
|
|
42
|
+
}
|
|
43
|
+
getODataMetaModel() {
|
|
44
|
+
return this.context.rta.getRootControlInstance().getModel()?.getMetaModel();
|
|
45
|
+
}
|
|
46
|
+
getEntitySetNameFromPageComponent(component) {
|
|
47
|
+
if (!isA('sap.suite.ui.generic.template.lib.TemplateComponent', component)) {
|
|
48
|
+
throw new Error('Unexpected type of page owner component');
|
|
49
|
+
}
|
|
50
|
+
return Promise.resolve(component.getEntitySet());
|
|
51
|
+
}
|
|
52
|
+
async prepareNavigationData(metaModel) {
|
|
53
|
+
const entitySet = metaModel.getODataEntitySet(this.entitySet);
|
|
54
|
+
const entityType = metaModel.getODataEntityType(entitySet.entityType);
|
|
55
|
+
for (const navProp of entityType?.navigationProperty ?? []) {
|
|
56
|
+
const associationEnd = metaModel.getODataAssociationEnd(entityType, navProp.name);
|
|
57
|
+
if (associationEnd?.multiplicity !== '*') {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const entityContainer = metaModel.getODataEntityContainer();
|
|
61
|
+
if (!entityContainer?.entitySet?.length) {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
const targetEntitySet = entityContainer.entitySet.find(item => item.entityType === associationEnd.type);
|
|
65
|
+
await this.addNavigationOptionIfAvailable(metaModel, targetEntitySet?.name, navProp.name);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async initialize() {
|
|
69
|
+
if (!(await areManifestChangesSupported(this.context.manifest))) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this.appComponent = getV2AppComponent(this.context.view);
|
|
73
|
+
return super.initialize();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
var __exports = {
|
|
77
|
+
__esModule: true
|
|
78
|
+
};
|
|
79
|
+
__exports.AddNewSubpage = AddNewSubpage;
|
|
80
|
+
return __exports;
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=add-new-subpage.js.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import ODataModelV2 from 'sap/ui/model/odata/v2/ODataModel';
|
|
2
|
+
import ODataMetaModelV2, { EntityContainer, EntitySet, EntityType } from 'sap/ui/model/odata/ODataMetaModel';
|
|
3
|
+
import TemplateComponent from 'sap/suite/ui/generic/template/lib/TemplateComponent';
|
|
4
|
+
import type AppComponent from 'sap/suite/ui/generic/template/lib/AppComponent';
|
|
5
|
+
|
|
6
|
+
import { getV2ApplicationPages } from '../../../utils/fe-v2';
|
|
7
|
+
import { AddNewSubpageBase, ApplicationPageData } from '../add-new-subpage-quick-action-base';
|
|
8
|
+
import Component from 'sap/ui/core/Component';
|
|
9
|
+
import { isA } from '../../../utils/core';
|
|
10
|
+
import { areManifestChangesSupported, getV2AppComponent } from './utils';
|
|
11
|
+
import { PageDescriptorV2 } from '../../controllers/AddSubpage.controller';
|
|
12
|
+
|
|
13
|
+
const OBJECT_PAGE_COMPONENT_NAME_V2 = 'sap.suite.ui.generic.template.ObjectPage';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Quick Action for adding a custom page action.
|
|
17
|
+
*/
|
|
18
|
+
export class AddNewSubpage extends AddNewSubpageBase<ODataMetaModelV2> {
|
|
19
|
+
protected appComponent: AppComponent | undefined;
|
|
20
|
+
|
|
21
|
+
protected get currentPageDescriptor(): PageDescriptorV2 {
|
|
22
|
+
if (!this.entitySet) {
|
|
23
|
+
throw new Error('entitySet is not defined');
|
|
24
|
+
}
|
|
25
|
+
if (!this.pageType) {
|
|
26
|
+
throw new Error('pageType is not defined');
|
|
27
|
+
}
|
|
28
|
+
if (!this.appComponent) {
|
|
29
|
+
throw new Error('appComponent is not defined');
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
appType: 'fe-v2',
|
|
33
|
+
appComponent: this.appComponent,
|
|
34
|
+
entitySet: this.entitySet,
|
|
35
|
+
pageType: this.pageType
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
protected getApplicationPages(): ApplicationPageData[] {
|
|
40
|
+
return getV2ApplicationPages(this.context.manifest);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
protected isPageExists(targetEntitySet: string): boolean {
|
|
44
|
+
return this.existingPages.some((page) => page.entitySet === targetEntitySet);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
protected isCurrentObjectPage(): boolean {
|
|
48
|
+
return this.pageType === OBJECT_PAGE_COMPONENT_NAME_V2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
protected getODataMetaModel(): ODataMetaModelV2 | undefined {
|
|
52
|
+
return (this.context.rta.getRootControlInstance().getModel() as ODataModelV2)?.getMetaModel();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
protected getEntitySetNameFromPageComponent(component: Component | undefined): Promise<string> {
|
|
56
|
+
if (!isA<TemplateComponent>('sap.suite.ui.generic.template.lib.TemplateComponent', component)) {
|
|
57
|
+
throw new Error('Unexpected type of page owner component');
|
|
58
|
+
}
|
|
59
|
+
return Promise.resolve(component.getEntitySet());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
protected async prepareNavigationData(metaModel: ODataMetaModelV2): Promise<void> {
|
|
63
|
+
const entitySet = metaModel.getODataEntitySet(this.entitySet!) as EntitySet;
|
|
64
|
+
const entityType = metaModel.getODataEntityType(entitySet.entityType) as EntityType;
|
|
65
|
+
|
|
66
|
+
for (const navProp of entityType?.navigationProperty ?? []) {
|
|
67
|
+
const associationEnd = metaModel.getODataAssociationEnd(entityType, navProp.name);
|
|
68
|
+
if (associationEnd?.multiplicity !== '*') {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const entityContainer = metaModel.getODataEntityContainer() as EntityContainer;
|
|
72
|
+
if (!entityContainer?.entitySet?.length) {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const targetEntitySet = entityContainer.entitySet.find((item) => item.entityType === associationEnd.type);
|
|
76
|
+
await this.addNavigationOptionIfAvailable(metaModel, targetEntitySet?.name, navProp.name);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async initialize(): Promise<void> {
|
|
81
|
+
if (!(await areManifestChangesSupported(this.context.manifest))) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.appComponent = getV2AppComponent(this.context.view);
|
|
85
|
+
return super.initialize();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../utils/core", "../table-quick-action-base", "../control-types", "../dialog-enablement-validator"], function (_____utils_core, ___table_quick_action_base, ___control_types, ___dialog_enablement_validator) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getControlById = _____utils_core["getControlById"];
|
|
7
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
8
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
9
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
10
|
+
const CHANGE_TABLE_ACTIONS = 'change-table-actions';
|
|
11
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
12
|
+
class ChangeTableActionsQuickAction extends TableQuickActionDefinitionBase {
|
|
13
|
+
constructor(context) {
|
|
14
|
+
super(CHANGE_TABLE_ACTIONS, CONTROL_TYPES, 'V2_QUICK_ACTION_CHANGE_TABLE_ACTIONS', context, {
|
|
15
|
+
includeServiceAction: true
|
|
16
|
+
}, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
17
|
+
}
|
|
18
|
+
async initialize() {
|
|
19
|
+
const processChild = (child, mapKey) => {
|
|
20
|
+
const tableAction = this.tableMap[mapKey]?.changeToolbarContentAction;
|
|
21
|
+
child.enabled = !!tableAction?.enabled;
|
|
22
|
+
child.tooltip = child.enabled ? undefined : this.context.resourceBundle.getText('TABLE_HEADER_TOOLBAR_NOT_CHANGEABLE');
|
|
23
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx}`));
|
|
24
|
+
};
|
|
25
|
+
await super.initialize();
|
|
26
|
+
|
|
27
|
+
// disable nested actions based on conditions
|
|
28
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx}`));
|
|
29
|
+
}
|
|
30
|
+
async execute(path) {
|
|
31
|
+
const {
|
|
32
|
+
table,
|
|
33
|
+
iconTabBarFilterKey,
|
|
34
|
+
changeToolbarContentAction,
|
|
35
|
+
sectionInfo
|
|
36
|
+
} = this.tableMap[path];
|
|
37
|
+
if (!table) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
if (sectionInfo) {
|
|
41
|
+
const {
|
|
42
|
+
layout,
|
|
43
|
+
section,
|
|
44
|
+
subSection
|
|
45
|
+
} = sectionInfo;
|
|
46
|
+
layout?.setSelectedSection(section);
|
|
47
|
+
section.setSelectedSubSection(subSection);
|
|
48
|
+
this.selectOverlay(table);
|
|
49
|
+
} else {
|
|
50
|
+
getControlById(table.getId())?.getDomRef()?.scrollIntoView();
|
|
51
|
+
this.selectOverlay(table);
|
|
52
|
+
}
|
|
53
|
+
if (this.iconTabBar && iconTabBarFilterKey) {
|
|
54
|
+
this.iconTabBar.setSelectedKey(iconTabBarFilterKey);
|
|
55
|
+
}
|
|
56
|
+
if (changeToolbarContentAction) {
|
|
57
|
+
await this.context.actionService.execute(table.getId(), changeToolbarContentAction.id);
|
|
58
|
+
}
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
var __exports = {
|
|
63
|
+
__esModule: true
|
|
64
|
+
};
|
|
65
|
+
__exports.CHANGE_TABLE_ACTIONS = CHANGE_TABLE_ACTIONS;
|
|
66
|
+
__exports.ChangeTableActionsQuickAction = ChangeTableActionsQuickAction;
|
|
67
|
+
return __exports;
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=change-table-actions.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
|
|
3
|
+
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
4
|
+
import { getControlById } from '../../../utils/core';
|
|
5
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
6
|
+
import { NestedQuickActionChild } from '@sap-ux-private/control-property-editor-common';
|
|
7
|
+
import { SMART_TABLE_TYPE } from '../control-types';
|
|
8
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
9
|
+
|
|
10
|
+
export const CHANGE_TABLE_ACTIONS = 'change-table-actions';
|
|
11
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
12
|
+
|
|
13
|
+
export class ChangeTableActionsQuickAction
|
|
14
|
+
extends TableQuickActionDefinitionBase
|
|
15
|
+
implements NestedQuickActionDefinition
|
|
16
|
+
{
|
|
17
|
+
constructor(context: QuickActionContext) {
|
|
18
|
+
super(
|
|
19
|
+
CHANGE_TABLE_ACTIONS,
|
|
20
|
+
CONTROL_TYPES,
|
|
21
|
+
'V2_QUICK_ACTION_CHANGE_TABLE_ACTIONS',
|
|
22
|
+
context,
|
|
23
|
+
{
|
|
24
|
+
includeServiceAction: true
|
|
25
|
+
},
|
|
26
|
+
[DIALOG_ENABLEMENT_VALIDATOR]
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async initialize(): Promise<void> {
|
|
31
|
+
const processChild = (child: NestedQuickActionChild, mapKey: string) => {
|
|
32
|
+
const tableAction = this.tableMap[mapKey]?.changeToolbarContentAction;
|
|
33
|
+
child.enabled = !!tableAction?.enabled;
|
|
34
|
+
child.tooltip = child.enabled
|
|
35
|
+
? undefined
|
|
36
|
+
: this.context.resourceBundle.getText('TABLE_HEADER_TOOLBAR_NOT_CHANGEABLE');
|
|
37
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx}`));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
await super.initialize();
|
|
41
|
+
|
|
42
|
+
// disable nested actions based on conditions
|
|
43
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx}`));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
47
|
+
const { table, iconTabBarFilterKey, changeToolbarContentAction, sectionInfo } = this.tableMap[path];
|
|
48
|
+
if (!table) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (sectionInfo) {
|
|
53
|
+
const { layout, section, subSection } = sectionInfo;
|
|
54
|
+
layout?.setSelectedSection(section);
|
|
55
|
+
section.setSelectedSubSection(subSection);
|
|
56
|
+
this.selectOverlay(table);
|
|
57
|
+
} else {
|
|
58
|
+
getControlById(table.getId())?.getDomRef()?.scrollIntoView();
|
|
59
|
+
this.selectOverlay(table);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (this.iconTabBar && iconTabBarFilterKey) {
|
|
63
|
+
this.iconTabBar.setSelectedKey(iconTabBarFilterKey);
|
|
64
|
+
}
|
|
65
|
+
if (changeToolbarContentAction) {
|
|
66
|
+
await this.context.actionService.execute(table.getId(), changeToolbarContentAction.id);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../utils/core", "../table-quick-action-base", "../dialog-enablement-validator", "../control-types"], function (_____utils_core, ___table_quick_action_base, ___dialog_enablement_validator, ___control_types) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getControlById = _____utils_core["getControlById"];
|
|
7
|
+
const isA = _____utils_core["isA"];
|
|
8
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
9
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
10
|
+
const M_TABLE_TYPE = ___control_types["M_TABLE_TYPE"];
|
|
11
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
12
|
+
const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
13
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
14
|
+
class ChangeTableColumnsQuickAction extends TableQuickActionDefinitionBase {
|
|
15
|
+
constructor(context) {
|
|
16
|
+
super(CHANGE_TABLE_COLUMNS, CONTROL_TYPES, 'V2_QUICK_ACTION_CHANGE_TABLE_COLUMNS', context, {
|
|
17
|
+
includeServiceAction: true,
|
|
18
|
+
validatePageVariantManagement: true
|
|
19
|
+
}, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
20
|
+
}
|
|
21
|
+
async execute(path) {
|
|
22
|
+
const {
|
|
23
|
+
table,
|
|
24
|
+
iconTabBarFilterKey,
|
|
25
|
+
changeColumnActionId,
|
|
26
|
+
sectionInfo
|
|
27
|
+
} = this.tableMap[path];
|
|
28
|
+
if (!table) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
if (sectionInfo) {
|
|
32
|
+
const {
|
|
33
|
+
layout,
|
|
34
|
+
section,
|
|
35
|
+
subSection
|
|
36
|
+
} = sectionInfo;
|
|
37
|
+
layout?.setSelectedSection(section);
|
|
38
|
+
section.setSelectedSubSection(subSection);
|
|
39
|
+
this.selectOverlay(table);
|
|
40
|
+
} else {
|
|
41
|
+
getControlById(table.getId())?.getDomRef()?.scrollIntoView();
|
|
42
|
+
this.selectOverlay(table);
|
|
43
|
+
}
|
|
44
|
+
if (this.iconTabBar && iconTabBarFilterKey) {
|
|
45
|
+
this.iconTabBar.setSelectedKey(iconTabBarFilterKey);
|
|
46
|
+
}
|
|
47
|
+
if (changeColumnActionId) {
|
|
48
|
+
const executeAction = async () => await this.context.actionService.execute(table.getId(), changeColumnActionId);
|
|
49
|
+
if (isA(SMART_TABLE_TYPE, table)) {
|
|
50
|
+
await executeAction();
|
|
51
|
+
} else if (isA(M_TABLE_TYPE, table)) {
|
|
52
|
+
// if table is busy, i.e. lazy loading, then we subscribe to 'updateFinished' event and call action service when loading is done
|
|
53
|
+
// to avoid reopening the dialog after close
|
|
54
|
+
if (this.isTableLoaded(table)) {
|
|
55
|
+
await executeAction();
|
|
56
|
+
} else {
|
|
57
|
+
table.attachEventOnce('updateFinished', executeAction, this);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
isAbsoluteAggregationBinding(element, aggregationName) {
|
|
64
|
+
const mBindingInfo = element.getBindingInfo(aggregationName);
|
|
65
|
+
const path = mBindingInfo?.path;
|
|
66
|
+
if (!path) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return path.indexOf('/') === 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Checks if table is loaded and has binding context available.
|
|
74
|
+
* This is needed to properly render change columns dialog.
|
|
75
|
+
* Based on {@link https://github.com/SAP/openui5/blob/rel-1.127/src/sap.ui.fl/src/sap/ui/fl/write/_internal/delegates/ODataV2ReadDelegate.js#L269-L271| ODataV2ReadDelegate.getPropertyInfo}.
|
|
76
|
+
*
|
|
77
|
+
* @param element - Table control.
|
|
78
|
+
* @returns True if binding context is available.
|
|
79
|
+
*/
|
|
80
|
+
isTableLoaded(element) {
|
|
81
|
+
const aggregationName = 'items';
|
|
82
|
+
if (this.isAbsoluteAggregationBinding(element, aggregationName)) {
|
|
83
|
+
const bindingInfo = element.getBindingInfo(aggregationName);
|
|
84
|
+
// check to be default model binding otherwise return undefined
|
|
85
|
+
if (typeof bindingInfo.model === 'string' && bindingInfo.model !== '') {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return bindingInfo.path !== undefined;
|
|
89
|
+
} else {
|
|
90
|
+
// here we explicitly request the default models binding context
|
|
91
|
+
const bindingContext = element.getBindingContext();
|
|
92
|
+
return !!bindingContext;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
var __exports = {
|
|
97
|
+
__esModule: true
|
|
98
|
+
};
|
|
99
|
+
__exports.CHANGE_TABLE_COLUMNS = CHANGE_TABLE_COLUMNS;
|
|
100
|
+
__exports.ChangeTableColumnsQuickAction = ChangeTableColumnsQuickAction;
|
|
101
|
+
return __exports;
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=change-table-columns.js.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
import type Table from 'sap/m/Table';
|
|
3
|
+
import type SmartTable from 'sap/ui/comp/smarttable/SmartTable';
|
|
4
|
+
import type ManagedObject from 'sap/ui/base/ManagedObject';
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
QuickActionContext,
|
|
8
|
+
NestedQuickActionDefinition
|
|
9
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
10
|
+
import { getControlById, isA } from '../../../utils/core';
|
|
11
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
12
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
13
|
+
import { M_TABLE_TYPE, SMART_TABLE_TYPE } from '../control-types';
|
|
14
|
+
|
|
15
|
+
export const CHANGE_TABLE_COLUMNS = 'change-table-columns';
|
|
16
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
17
|
+
|
|
18
|
+
export class ChangeTableColumnsQuickAction
|
|
19
|
+
extends TableQuickActionDefinitionBase
|
|
20
|
+
implements NestedQuickActionDefinition
|
|
21
|
+
{
|
|
22
|
+
constructor(context: QuickActionContext) {
|
|
23
|
+
super(
|
|
24
|
+
CHANGE_TABLE_COLUMNS,
|
|
25
|
+
CONTROL_TYPES,
|
|
26
|
+
'V2_QUICK_ACTION_CHANGE_TABLE_COLUMNS',
|
|
27
|
+
context,
|
|
28
|
+
{
|
|
29
|
+
includeServiceAction: true,
|
|
30
|
+
validatePageVariantManagement: true
|
|
31
|
+
},
|
|
32
|
+
[DIALOG_ENABLEMENT_VALIDATOR]
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
36
|
+
const { table, iconTabBarFilterKey, changeColumnActionId, sectionInfo } = this.tableMap[path];
|
|
37
|
+
if (!table) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (sectionInfo) {
|
|
42
|
+
const { layout, section, subSection } = sectionInfo;
|
|
43
|
+
layout?.setSelectedSection(section);
|
|
44
|
+
section.setSelectedSubSection(subSection);
|
|
45
|
+
this.selectOverlay(table);
|
|
46
|
+
} else {
|
|
47
|
+
getControlById(table.getId())?.getDomRef()?.scrollIntoView();
|
|
48
|
+
this.selectOverlay(table);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (this.iconTabBar && iconTabBarFilterKey) {
|
|
52
|
+
this.iconTabBar.setSelectedKey(iconTabBarFilterKey);
|
|
53
|
+
}
|
|
54
|
+
if (changeColumnActionId) {
|
|
55
|
+
const executeAction = async () =>
|
|
56
|
+
await this.context.actionService.execute(table.getId(), changeColumnActionId);
|
|
57
|
+
if (isA<SmartTable>(SMART_TABLE_TYPE, table)) {
|
|
58
|
+
await executeAction();
|
|
59
|
+
} else if (isA<Table>(M_TABLE_TYPE, table)) {
|
|
60
|
+
// if table is busy, i.e. lazy loading, then we subscribe to 'updateFinished' event and call action service when loading is done
|
|
61
|
+
// to avoid reopening the dialog after close
|
|
62
|
+
if (this.isTableLoaded(table)) {
|
|
63
|
+
await executeAction();
|
|
64
|
+
} else {
|
|
65
|
+
table.attachEventOnce('updateFinished', executeAction, this);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private isAbsoluteAggregationBinding(element: ManagedObject, aggregationName: string): boolean {
|
|
74
|
+
const mBindingInfo = element.getBindingInfo(aggregationName);
|
|
75
|
+
const path = mBindingInfo?.path;
|
|
76
|
+
if (!path) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
return path.indexOf('/') === 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Checks if table is loaded and has binding context available.
|
|
84
|
+
* This is needed to properly render change columns dialog.
|
|
85
|
+
* Based on {@link https://github.com/SAP/openui5/blob/rel-1.127/src/sap.ui.fl/src/sap/ui/fl/write/_internal/delegates/ODataV2ReadDelegate.js#L269-L271| ODataV2ReadDelegate.getPropertyInfo}.
|
|
86
|
+
*
|
|
87
|
+
* @param element - Table control.
|
|
88
|
+
* @returns True if binding context is available.
|
|
89
|
+
*/
|
|
90
|
+
private isTableLoaded(element: ManagedObject): boolean {
|
|
91
|
+
const aggregationName = 'items';
|
|
92
|
+
if (this.isAbsoluteAggregationBinding(element, aggregationName)) {
|
|
93
|
+
const bindingInfo = element.getBindingInfo(aggregationName);
|
|
94
|
+
// check to be default model binding otherwise return undefined
|
|
95
|
+
if (typeof bindingInfo.model === 'string' && bindingInfo.model !== '') {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
return bindingInfo.path !== undefined;
|
|
99
|
+
} else {
|
|
100
|
+
// here we explicitly request the default models binding context
|
|
101
|
+
const bindingContext = element.getBindingContext();
|
|
102
|
+
return !!bindingContext;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/dt/OverlayRegistry", "../../../utils/core", "../../dialog-factory", "../table-quick-action-base", "../dialog-enablement-validator", "../control-types"], function (OverlayRegistry, _____utils_core, ____dialog_factory, ___table_quick_action_base, ___dialog_enablement_validator, ___control_types) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getControlById = _____utils_core["getControlById"];
|
|
7
|
+
const isA = _____utils_core["isA"];
|
|
8
|
+
const DialogFactory = ____dialog_factory["DialogFactory"];
|
|
9
|
+
const DialogNames = ____dialog_factory["DialogNames"];
|
|
10
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
11
|
+
const DIALOG_ENABLEMENT_VALIDATOR = ___dialog_enablement_validator["DIALOG_ENABLEMENT_VALIDATOR"];
|
|
12
|
+
const GRID_TABLE_TYPE = ___control_types["GRID_TABLE_TYPE"];
|
|
13
|
+
const M_TABLE_TYPE = ___control_types["M_TABLE_TYPE"];
|
|
14
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
15
|
+
const TREE_TABLE_TYPE = ___control_types["TREE_TABLE_TYPE"];
|
|
16
|
+
const CREATE_TABLE_ACTION = 'create-table-action';
|
|
17
|
+
// maintain order if action id
|
|
18
|
+
|
|
19
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE, M_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
20
|
+
class AddTableActionQuickAction extends TableQuickActionDefinitionBase {
|
|
21
|
+
constructor(context) {
|
|
22
|
+
super(CREATE_TABLE_ACTION, CONTROL_TYPES, 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION', context, undefined, [DIALOG_ENABLEMENT_VALIDATOR]);
|
|
23
|
+
}
|
|
24
|
+
async initialize() {
|
|
25
|
+
const processChild = (child, mapKey) => {
|
|
26
|
+
const table = this.tableMap[mapKey]?.table;
|
|
27
|
+
if (table) {
|
|
28
|
+
const headerToolbar = this.getHeaderToolbar(table);
|
|
29
|
+
if (!headerToolbar) {
|
|
30
|
+
child.enabled = false;
|
|
31
|
+
child.tooltip = this.context.resourceBundle.getText('NO_TABLE_HEADER_TOOLBAR');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
|
|
35
|
+
};
|
|
36
|
+
await super.initialize();
|
|
37
|
+
|
|
38
|
+
// disable nested actions based on conditions
|
|
39
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
|
|
40
|
+
}
|
|
41
|
+
async execute(path) {
|
|
42
|
+
const {
|
|
43
|
+
table,
|
|
44
|
+
iconTabBarFilterKey,
|
|
45
|
+
sectionInfo
|
|
46
|
+
} = this.tableMap[path];
|
|
47
|
+
if (!table) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
if (sectionInfo) {
|
|
51
|
+
const {
|
|
52
|
+
layout,
|
|
53
|
+
section,
|
|
54
|
+
subSection
|
|
55
|
+
} = sectionInfo;
|
|
56
|
+
layout?.setSelectedSection(section);
|
|
57
|
+
section.setSelectedSubSection(subSection);
|
|
58
|
+
this.selectOverlay(table);
|
|
59
|
+
} else {
|
|
60
|
+
getControlById(table.getId())?.getDomRef()?.scrollIntoView();
|
|
61
|
+
this.selectOverlay(table);
|
|
62
|
+
}
|
|
63
|
+
if (this.iconTabBar && iconTabBarFilterKey) {
|
|
64
|
+
this.iconTabBar.setSelectedKey(iconTabBarFilterKey);
|
|
65
|
+
}
|
|
66
|
+
const headerToolbar = this.getHeaderToolbar(table);
|
|
67
|
+
|
|
68
|
+
// open dialogBox to add, and content is selected ByDefault
|
|
69
|
+
if (headerToolbar) {
|
|
70
|
+
const overlay = OverlayRegistry.getOverlay(headerToolbar) || [];
|
|
71
|
+
await DialogFactory.createDialog(overlay, this.context.rta, DialogNames.ADD_FRAGMENT, undefined, {
|
|
72
|
+
aggregation: 'content',
|
|
73
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_ACTION',
|
|
74
|
+
defaultAggregationArrayIndex: 1
|
|
75
|
+
}, {
|
|
76
|
+
actionName: this.type,
|
|
77
|
+
telemetryEventIdentifier: this.getTelemetryIdentifier()
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return [];
|
|
81
|
+
}
|
|
82
|
+
getHeaderToolbar(table) {
|
|
83
|
+
let headerToolbar;
|
|
84
|
+
if (isA(SMART_TABLE_TYPE, table)) {
|
|
85
|
+
for (const item of table.getAggregation('items')) {
|
|
86
|
+
if (item.getAggregation('headerToolbar')) {
|
|
87
|
+
headerToolbar = item.getAggregation('headerToolbar');
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
if (isA('sap.m.OverflowToolbar', item)) {
|
|
91
|
+
headerToolbar = item;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (!headerToolbar) {
|
|
96
|
+
headerToolbar = table.getToolbar();
|
|
97
|
+
}
|
|
98
|
+
} else if (isA(M_TABLE_TYPE, table)) {
|
|
99
|
+
headerToolbar = table.getAggregation('headerToolbar');
|
|
100
|
+
}
|
|
101
|
+
return headerToolbar;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
var __exports = {
|
|
105
|
+
__esModule: true
|
|
106
|
+
};
|
|
107
|
+
__exports.CREATE_TABLE_ACTION = CREATE_TABLE_ACTION;
|
|
108
|
+
__exports.AddTableActionQuickAction = AddTableActionQuickAction;
|
|
109
|
+
return __exports;
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=create-table-action.js.map
|