@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
package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../table-quick-action-base", "../control-types", "./utils", "./create-table-custom-column"], function (___table_quick_action_base, ___control_types, ___utils, ___create_table_custom_column) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
7
|
+
const SMART_TABLE_TYPE = ___control_types["SMART_TABLE_TYPE"];
|
|
8
|
+
const areManifestChangesSupported = ___utils["areManifestChangesSupported"];
|
|
9
|
+
const prepareManifestChange = ___utils["prepareManifestChange"];
|
|
10
|
+
const preprocessActionExecution = ___create_table_custom_column["preprocessActionExecution"];
|
|
11
|
+
const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
|
|
12
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
13
|
+
const OBJECT_PAGE_COMPONENT_NAME = 'sap.suite.ui.generic.template.ObjectPage';
|
|
14
|
+
class EnableObjectPageVariantManagementQuickAction extends TableQuickActionDefinitionBase {
|
|
15
|
+
forceRefreshAfterExecution = true;
|
|
16
|
+
constructor(context) {
|
|
17
|
+
super(ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLES_AND_VARIANT_MANAGEMENT', context);
|
|
18
|
+
}
|
|
19
|
+
async initialize() {
|
|
20
|
+
if (!(await areManifestChangesSupported(this.context.manifest))) {
|
|
21
|
+
this.isApplicable = false;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
await super.initialize();
|
|
25
|
+
const processChild = (child, mapKey) => {
|
|
26
|
+
const alreadyEnabledTooltip = this.context.resourceBundle.getText('VARIANT_MANAGEMENT_FOR_TABLE_CONTROLS_IS_ALREADY_ENABLED', [child.label]);
|
|
27
|
+
const vmSetupNotSupported = this.context.resourceBundle.getText('VARIANT_MANAGEMENT_FOR_CUSTOM_TABLES_NOT_SUPPORTED', [child.label]);
|
|
28
|
+
const table = this.tableMap[mapKey]?.table;
|
|
29
|
+
if (table) {
|
|
30
|
+
const id = table.getId();
|
|
31
|
+
if (typeof id !== 'string') {
|
|
32
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
33
|
+
}
|
|
34
|
+
let value = this.context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
|
|
35
|
+
if (value === undefined) {
|
|
36
|
+
value = !!table.getVariantManagement();
|
|
37
|
+
}
|
|
38
|
+
const sectionId = table.data('sectionId');
|
|
39
|
+
let tooltip;
|
|
40
|
+
if (!sectionId) {
|
|
41
|
+
tooltip = vmSetupNotSupported;
|
|
42
|
+
} else if (value) {
|
|
43
|
+
tooltip = alreadyEnabledTooltip;
|
|
44
|
+
}
|
|
45
|
+
if (value || !sectionId) {
|
|
46
|
+
child.enabled = false;
|
|
47
|
+
child.tooltip = tooltip;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
|
|
51
|
+
};
|
|
52
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
|
|
53
|
+
}
|
|
54
|
+
async execute(path) {
|
|
55
|
+
const {
|
|
56
|
+
table,
|
|
57
|
+
sectionInfo,
|
|
58
|
+
iconTabBarFilterKey
|
|
59
|
+
} = this.tableMap[path];
|
|
60
|
+
if (!table) {
|
|
61
|
+
throw Error('Internal error. Table element not found');
|
|
62
|
+
}
|
|
63
|
+
const entitySet = this.context.view.getParent()?.getProperty('entitySet');
|
|
64
|
+
if (!entitySet) {
|
|
65
|
+
throw Error('Internal error. Object Page entity set not found');
|
|
66
|
+
}
|
|
67
|
+
const sectionId = table.data('sectionId');
|
|
68
|
+
if (!sectionId) {
|
|
69
|
+
throw Error('Internal error. Table sectionId property not found');
|
|
70
|
+
}
|
|
71
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
72
|
+
this.selectOverlay(table);
|
|
73
|
+
const commands = await prepareManifestChange(this.context, `component/settings/sections/${sectionId}/tableSettings`, table, OBJECT_PAGE_COMPONENT_NAME, entitySet, {
|
|
74
|
+
'variantManagement': true
|
|
75
|
+
});
|
|
76
|
+
return commands ?? [];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
var __exports = {
|
|
80
|
+
__esModule: true
|
|
81
|
+
};
|
|
82
|
+
__exports.ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS;
|
|
83
|
+
__exports.EnableObjectPageVariantManagementQuickAction = EnableObjectPageVariantManagementQuickAction;
|
|
84
|
+
return __exports;
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=op-enable-variant-management.js.map
|
package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
QuickActionContext,
|
|
5
|
+
NestedQuickActionDefinition
|
|
6
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
7
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
8
|
+
import { SMART_TABLE_TYPE } from '../control-types';
|
|
9
|
+
|
|
10
|
+
import type { NestedQuickActionChild } from '@sap-ux-private/control-property-editor-common';
|
|
11
|
+
import { areManifestChangesSupported, prepareManifestChange } from './utils';
|
|
12
|
+
import { preprocessActionExecution } from './create-table-custom-column';
|
|
13
|
+
import type SmartTableExtended from 'sap/ui/comp/smarttable';
|
|
14
|
+
|
|
15
|
+
export const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
|
|
16
|
+
|
|
17
|
+
const CONTROL_TYPES = [SMART_TABLE_TYPE];
|
|
18
|
+
|
|
19
|
+
const OBJECT_PAGE_COMPONENT_NAME = 'sap.suite.ui.generic.template.ObjectPage';
|
|
20
|
+
|
|
21
|
+
export class EnableObjectPageVariantManagementQuickAction
|
|
22
|
+
extends TableQuickActionDefinitionBase
|
|
23
|
+
implements NestedQuickActionDefinition
|
|
24
|
+
{
|
|
25
|
+
readonly forceRefreshAfterExecution = true;
|
|
26
|
+
|
|
27
|
+
constructor(context: QuickActionContext) {
|
|
28
|
+
super(
|
|
29
|
+
ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS,
|
|
30
|
+
CONTROL_TYPES,
|
|
31
|
+
'QUICK_ACTION_ENABLE_TABLES_AND_VARIANT_MANAGEMENT',
|
|
32
|
+
context
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async initialize(): Promise<void> {
|
|
37
|
+
if (!(await areManifestChangesSupported(this.context.manifest))) {
|
|
38
|
+
this.isApplicable = false;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
await super.initialize();
|
|
43
|
+
|
|
44
|
+
const processChild = (child: NestedQuickActionChild, mapKey: string) => {
|
|
45
|
+
const alreadyEnabledTooltip = this.context.resourceBundle.getText(
|
|
46
|
+
'VARIANT_MANAGEMENT_FOR_TABLE_CONTROLS_IS_ALREADY_ENABLED',
|
|
47
|
+
[child.label]
|
|
48
|
+
);
|
|
49
|
+
const vmSetupNotSupported = this.context.resourceBundle.getText(
|
|
50
|
+
'VARIANT_MANAGEMENT_FOR_CUSTOM_TABLES_NOT_SUPPORTED',
|
|
51
|
+
[child.label]
|
|
52
|
+
);
|
|
53
|
+
const table = this.tableMap[mapKey]?.table;
|
|
54
|
+
|
|
55
|
+
if (table) {
|
|
56
|
+
const id = table.getId();
|
|
57
|
+
if (typeof id !== 'string') {
|
|
58
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
59
|
+
}
|
|
60
|
+
let value = this.context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
|
|
61
|
+
if (value === undefined) {
|
|
62
|
+
value = !!(table as SmartTableExtended).getVariantManagement();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const sectionId = table.data('sectionId') as string | undefined | null;
|
|
66
|
+
|
|
67
|
+
let tooltip: string | undefined;
|
|
68
|
+
if (!sectionId) {
|
|
69
|
+
tooltip = vmSetupNotSupported;
|
|
70
|
+
} else if (value) {
|
|
71
|
+
tooltip = alreadyEnabledTooltip;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (value || !sectionId) {
|
|
75
|
+
child.enabled = false;
|
|
76
|
+
child.tooltip = tooltip;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
child.children.forEach((nestedChild, idx) => processChild(nestedChild, `${mapKey}/${idx.toFixed(0)}`));
|
|
80
|
+
};
|
|
81
|
+
this.children.forEach((nestedChild, idx) => processChild(nestedChild, `${idx.toFixed(0)}`));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
85
|
+
const { table, sectionInfo, iconTabBarFilterKey } = this.tableMap[path];
|
|
86
|
+
if (!table) {
|
|
87
|
+
throw Error('Internal error. Table element not found');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const entitySet = this.context.view.getParent()?.getProperty('entitySet') as string | undefined;
|
|
91
|
+
if (!entitySet) {
|
|
92
|
+
throw Error('Internal error. Object Page entity set not found');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const sectionId = table.data('sectionId') as string | undefined | null;
|
|
96
|
+
if (!sectionId) {
|
|
97
|
+
throw Error('Internal error. Table sectionId property not found');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
preprocessActionExecution(table, sectionInfo, this.iconTabBar, iconTabBarFilterKey);
|
|
101
|
+
this.selectOverlay(table);
|
|
102
|
+
|
|
103
|
+
const commands = await prepareManifestChange(
|
|
104
|
+
this.context,
|
|
105
|
+
`component/settings/sections/${sectionId}/tableSettings`,
|
|
106
|
+
table,
|
|
107
|
+
OBJECT_PAGE_COMPONENT_NAME,
|
|
108
|
+
entitySet,
|
|
109
|
+
{
|
|
110
|
+
'variantManagement': true
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
return commands ?? [];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/core/mvc/XMLView", "sap/ui/core/ComponentContainer", "../../../cpe/quick-actions/registry", "../common/add-controller-to-page", "./lr-toggle-clear-filter-bar", "./change-table-columns", "../common/op-add-header-field", "../common/op-add-custom-section", "../fe-v2/create-table-action", "./create-table-custom-column", "../common/create-page-action", "./lr-enable-table-filtering", "./lr-enable-semantic-date-range-filter-bar", "./op-enable-empty-row-mode", "../common/add-new-annotation-file", "./op-enable-variant-management", "./lr-enable-variant-management", "../fe-v2/add-new-subpage", "./change-table-actions"], function (XMLView, ComponentContainer, _____cpe_quick_actions_registry, ___common_add_controller_to_page, ___lr_toggle_clear_filter_bar, ___change_table_columns, ___common_op_add_header_field, ___common_op_add_custom_section, ___fe_v2_create_table_action, ___create_table_custom_column, ___common_create_page_action, ___lr_enable_table_filtering, ___lr_enable_semantic_date_range_filter_bar, ___op_enable_empty_row_mode, ___common_add_new_annotation_file, ___op_enable_variant_management, ___lr_enable_variant_management, ___fe_v2_add_new_subpage, ___change_table_actions) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const QuickActionDefinitionRegistry = _____cpe_quick_actions_registry["QuickActionDefinitionRegistry"];
|
|
7
|
+
const AddControllerToPageQuickAction = ___common_add_controller_to_page["AddControllerToPageQuickAction"];
|
|
8
|
+
const ToggleClearFilterBarQuickAction = ___lr_toggle_clear_filter_bar["ToggleClearFilterBarQuickAction"];
|
|
9
|
+
const ChangeTableColumnsQuickAction = ___change_table_columns["ChangeTableColumnsQuickAction"];
|
|
10
|
+
const AddHeaderFieldQuickAction = ___common_op_add_header_field["AddHeaderFieldQuickAction"];
|
|
11
|
+
const AddCustomSectionQuickAction = ___common_op_add_custom_section["AddCustomSectionQuickAction"];
|
|
12
|
+
const AddTableActionQuickAction = ___fe_v2_create_table_action["AddTableActionQuickAction"];
|
|
13
|
+
const AddTableCustomColumnQuickAction = ___create_table_custom_column["AddTableCustomColumnQuickAction"];
|
|
14
|
+
const AddPageActionQuickAction = ___common_create_page_action["AddPageActionQuickAction"];
|
|
15
|
+
const EnableTableFilteringQuickAction = ___lr_enable_table_filtering["EnableTableFilteringQuickAction"];
|
|
16
|
+
const ToggleSemanticDateRangeFilterBar = ___lr_enable_semantic_date_range_filter_bar["ToggleSemanticDateRangeFilterBar"];
|
|
17
|
+
const EnableTableEmptyRowModeQuickAction = ___op_enable_empty_row_mode["EnableTableEmptyRowModeQuickAction"];
|
|
18
|
+
const AddNewAnnotationFile = ___common_add_new_annotation_file["AddNewAnnotationFile"];
|
|
19
|
+
const EnableObjectPageVariantManagementQuickAction = ___op_enable_variant_management["EnableObjectPageVariantManagementQuickAction"];
|
|
20
|
+
const EnableListReportVariantManagementQuickAction = ___lr_enable_variant_management["EnableListReportVariantManagementQuickAction"];
|
|
21
|
+
const AddNewSubpage = ___fe_v2_add_new_subpage["AddNewSubpage"];
|
|
22
|
+
const ChangeTableActionsQuickAction = ___change_table_actions["ChangeTableActionsQuickAction"];
|
|
23
|
+
const OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
|
|
24
|
+
const LIST_REPORT_TYPE = 'sap.suite.ui.generic.template.ListReport.view.ListReport';
|
|
25
|
+
const ANALYTICAL_LIST_PAGE_TYPE = 'sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage';
|
|
26
|
+
/**
|
|
27
|
+
* Quick Action provider for SAP Fiori Elements V2 applications.
|
|
28
|
+
*/
|
|
29
|
+
class FEV2QuickActionRegistry extends QuickActionDefinitionRegistry {
|
|
30
|
+
PAGE_NAME_MAP = {
|
|
31
|
+
[LIST_REPORT_TYPE]: 'listReport',
|
|
32
|
+
[OBJECT_PAGE_TYPE]: 'objectPage',
|
|
33
|
+
[ANALYTICAL_LIST_PAGE_TYPE]: 'analyticalListPage'
|
|
34
|
+
};
|
|
35
|
+
getDefinitions(context) {
|
|
36
|
+
const activePages = this.getActivePageContent(context.controlIndex);
|
|
37
|
+
const definitionGroups = [];
|
|
38
|
+
for (let index = 0; index < activePages.length; index++) {
|
|
39
|
+
const {
|
|
40
|
+
name,
|
|
41
|
+
view
|
|
42
|
+
} = activePages[index];
|
|
43
|
+
if (name === 'listReport') {
|
|
44
|
+
definitionGroups.push({
|
|
45
|
+
title: 'LIST REPORT',
|
|
46
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, EnableListReportVariantManagementQuickAction, ChangeTableActionsQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile, AddNewSubpage],
|
|
47
|
+
view,
|
|
48
|
+
key: name + index
|
|
49
|
+
});
|
|
50
|
+
} else if (name === 'objectPage') {
|
|
51
|
+
definitionGroups.push({
|
|
52
|
+
title: 'OBJECT PAGE',
|
|
53
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, AddHeaderFieldQuickAction, AddCustomSectionQuickAction, EnableObjectPageVariantManagementQuickAction, ChangeTableActionsQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableEmptyRowModeQuickAction, AddNewAnnotationFile, AddNewSubpage],
|
|
54
|
+
view,
|
|
55
|
+
key: name + index
|
|
56
|
+
});
|
|
57
|
+
} else if (name === 'analyticalListPage') {
|
|
58
|
+
definitionGroups.push({
|
|
59
|
+
title: 'ANALYTICAL LIST PAGE',
|
|
60
|
+
definitions: [AddControllerToPageQuickAction, AddPageActionQuickAction, ToggleClearFilterBarQuickAction, ToggleSemanticDateRangeFilterBar, EnableListReportVariantManagementQuickAction, ChangeTableActionsQuickAction, ChangeTableColumnsQuickAction, AddTableActionQuickAction, AddTableCustomColumnQuickAction, EnableTableFilteringQuickAction, AddNewAnnotationFile, AddNewSubpage],
|
|
61
|
+
view,
|
|
62
|
+
key: name + index
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return definitionGroups;
|
|
67
|
+
}
|
|
68
|
+
getComponentContainerFromPage(page) {
|
|
69
|
+
// in ui5 version 1.71 there is no XMLView wrapper around ComponentContainer
|
|
70
|
+
const componentContainer = page instanceof XMLView ? page.getContent()[0] : page;
|
|
71
|
+
if (componentContainer instanceof ComponentContainer) {
|
|
72
|
+
return componentContainer;
|
|
73
|
+
}
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return FEV2QuickActionRegistry;
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import XMLView from 'sap/ui/core/mvc/XMLView';
|
|
2
|
+
import type Control from 'sap/ui/core/Control';
|
|
3
|
+
import ComponentContainer from 'sap/ui/core/ComponentContainer';
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
QuickActionActivationContext,
|
|
7
|
+
QuickActionDefinitionGroup
|
|
8
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
9
|
+
import { QuickActionDefinitionRegistry } from '../../../cpe/quick-actions/registry';
|
|
10
|
+
|
|
11
|
+
import { AddControllerToPageQuickAction } from '../common/add-controller-to-page';
|
|
12
|
+
|
|
13
|
+
import { ToggleClearFilterBarQuickAction } from './lr-toggle-clear-filter-bar';
|
|
14
|
+
import { ChangeTableColumnsQuickAction } from './change-table-columns';
|
|
15
|
+
import { AddHeaderFieldQuickAction } from '../common/op-add-header-field';
|
|
16
|
+
import { AddCustomSectionQuickAction } from '../common/op-add-custom-section';
|
|
17
|
+
import { AddTableActionQuickAction } from '../fe-v2/create-table-action';
|
|
18
|
+
import { AddTableCustomColumnQuickAction } from './create-table-custom-column';
|
|
19
|
+
import { AddPageActionQuickAction } from '../common/create-page-action';
|
|
20
|
+
import { EnableTableFilteringQuickAction } from './lr-enable-table-filtering';
|
|
21
|
+
import { ToggleSemanticDateRangeFilterBar } from './lr-enable-semantic-date-range-filter-bar';
|
|
22
|
+
import { EnableTableEmptyRowModeQuickAction } from './op-enable-empty-row-mode';
|
|
23
|
+
import { AddNewAnnotationFile } from '../common/add-new-annotation-file';
|
|
24
|
+
import { EnableObjectPageVariantManagementQuickAction } from './op-enable-variant-management';
|
|
25
|
+
import { EnableListReportVariantManagementQuickAction } from './lr-enable-variant-management';
|
|
26
|
+
import { AddNewSubpage } from '../fe-v2/add-new-subpage';
|
|
27
|
+
import { ChangeTableActionsQuickAction } from './change-table-actions';
|
|
28
|
+
type PageName = 'listReport' | 'objectPage' | 'analyticalListPage';
|
|
29
|
+
|
|
30
|
+
const OBJECT_PAGE_TYPE = 'sap.suite.ui.generic.template.ObjectPage.view.Details';
|
|
31
|
+
const LIST_REPORT_TYPE = 'sap.suite.ui.generic.template.ListReport.view.ListReport';
|
|
32
|
+
const ANALYTICAL_LIST_PAGE_TYPE = 'sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage';
|
|
33
|
+
/**
|
|
34
|
+
* Quick Action provider for SAP Fiori Elements V2 applications.
|
|
35
|
+
*/
|
|
36
|
+
export default class FEV2QuickActionRegistry extends QuickActionDefinitionRegistry<PageName> {
|
|
37
|
+
PAGE_NAME_MAP: Record<string, PageName> = {
|
|
38
|
+
[LIST_REPORT_TYPE]: 'listReport',
|
|
39
|
+
[OBJECT_PAGE_TYPE]: 'objectPage',
|
|
40
|
+
[ANALYTICAL_LIST_PAGE_TYPE]: 'analyticalListPage'
|
|
41
|
+
};
|
|
42
|
+
getDefinitions(context: QuickActionActivationContext): QuickActionDefinitionGroup[] {
|
|
43
|
+
const activePages = this.getActivePageContent(context.controlIndex);
|
|
44
|
+
|
|
45
|
+
const definitionGroups: QuickActionDefinitionGroup[] = [];
|
|
46
|
+
for (let index = 0; index < activePages.length; index++) {
|
|
47
|
+
const { name, view } = activePages[index];
|
|
48
|
+
if (name === 'listReport') {
|
|
49
|
+
definitionGroups.push({
|
|
50
|
+
title: 'LIST REPORT',
|
|
51
|
+
definitions: [
|
|
52
|
+
AddControllerToPageQuickAction,
|
|
53
|
+
AddPageActionQuickAction,
|
|
54
|
+
ToggleClearFilterBarQuickAction,
|
|
55
|
+
ToggleSemanticDateRangeFilterBar,
|
|
56
|
+
EnableListReportVariantManagementQuickAction,
|
|
57
|
+
ChangeTableActionsQuickAction,
|
|
58
|
+
ChangeTableColumnsQuickAction,
|
|
59
|
+
AddTableActionQuickAction,
|
|
60
|
+
AddTableCustomColumnQuickAction,
|
|
61
|
+
EnableTableFilteringQuickAction,
|
|
62
|
+
AddNewAnnotationFile,
|
|
63
|
+
AddNewSubpage
|
|
64
|
+
],
|
|
65
|
+
view,
|
|
66
|
+
key: name + index
|
|
67
|
+
});
|
|
68
|
+
} else if (name === 'objectPage') {
|
|
69
|
+
definitionGroups.push({
|
|
70
|
+
title: 'OBJECT PAGE',
|
|
71
|
+
definitions: [
|
|
72
|
+
AddControllerToPageQuickAction,
|
|
73
|
+
AddPageActionQuickAction,
|
|
74
|
+
AddHeaderFieldQuickAction,
|
|
75
|
+
AddCustomSectionQuickAction,
|
|
76
|
+
EnableObjectPageVariantManagementQuickAction,
|
|
77
|
+
ChangeTableActionsQuickAction,
|
|
78
|
+
ChangeTableColumnsQuickAction,
|
|
79
|
+
AddTableActionQuickAction,
|
|
80
|
+
AddTableCustomColumnQuickAction,
|
|
81
|
+
EnableTableEmptyRowModeQuickAction,
|
|
82
|
+
AddNewAnnotationFile,
|
|
83
|
+
AddNewSubpage
|
|
84
|
+
],
|
|
85
|
+
view,
|
|
86
|
+
key: name + index
|
|
87
|
+
});
|
|
88
|
+
} else if (name === 'analyticalListPage') {
|
|
89
|
+
definitionGroups.push({
|
|
90
|
+
title: 'ANALYTICAL LIST PAGE',
|
|
91
|
+
definitions: [
|
|
92
|
+
AddControllerToPageQuickAction,
|
|
93
|
+
AddPageActionQuickAction,
|
|
94
|
+
ToggleClearFilterBarQuickAction,
|
|
95
|
+
ToggleSemanticDateRangeFilterBar,
|
|
96
|
+
EnableListReportVariantManagementQuickAction,
|
|
97
|
+
ChangeTableActionsQuickAction,
|
|
98
|
+
ChangeTableColumnsQuickAction,
|
|
99
|
+
AddTableActionQuickAction,
|
|
100
|
+
AddTableCustomColumnQuickAction,
|
|
101
|
+
EnableTableFilteringQuickAction,
|
|
102
|
+
AddNewAnnotationFile,
|
|
103
|
+
AddNewSubpage
|
|
104
|
+
],
|
|
105
|
+
view,
|
|
106
|
+
key: name + index
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return definitionGroups;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
protected getComponentContainerFromPage(page: Control): ComponentContainer | undefined {
|
|
114
|
+
// in ui5 version 1.71 there is no XMLView wrapper around ComponentContainer
|
|
115
|
+
const componentContainer = page instanceof XMLView ? page.getContent()[0] : page;
|
|
116
|
+
if (componentContainer instanceof ComponentContainer) {
|
|
117
|
+
return componentContainer;
|
|
118
|
+
}
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/ui/rta/command/CommandFactory", "../../../utils/version", "sap/ui/core/Component"], function (CommandFactory, _____utils_version, Component) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
7
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
8
|
+
const isVersionEqualOrHasNewerPatch = _____utils_version["isVersionEqualOrHasNewerPatch"];
|
|
9
|
+
/**
|
|
10
|
+
* Gets app component of a v2 project.
|
|
11
|
+
*
|
|
12
|
+
* @param control - ManagedObject.
|
|
13
|
+
* @returns AppComponent.
|
|
14
|
+
*/
|
|
15
|
+
function getV2AppComponent(control) {
|
|
16
|
+
const ownerComponent = Component.getOwnerComponentFor(control);
|
|
17
|
+
let result;
|
|
18
|
+
if (ownerComponent?.isA('sap.suite.ui.generic.template.lib.TemplateComponent')) {
|
|
19
|
+
result = ownerComponent.getAppComponent();
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Prepares the change for the manifest setting.
|
|
26
|
+
*
|
|
27
|
+
* @param context - The context object containing flexSettings.
|
|
28
|
+
* @param propertyPath - The path of the property in the manifest.
|
|
29
|
+
* @param control - The UI5 element representing the control.
|
|
30
|
+
* @param component - component name e.g list report or object page.
|
|
31
|
+
* @param entitySet - Entity Set name.
|
|
32
|
+
* @param propertyValue - The value to be set for the property.
|
|
33
|
+
*
|
|
34
|
+
* @returns A Promise resolving to an array of FlexCommand objects.
|
|
35
|
+
*/
|
|
36
|
+
async function prepareManifestChange(context, propertyPath, control, component, entitySet, propertyValue) {
|
|
37
|
+
const {
|
|
38
|
+
flexSettings
|
|
39
|
+
} = context;
|
|
40
|
+
const appComponent = getV2AppComponent(control);
|
|
41
|
+
const modifiedValue = {
|
|
42
|
+
changeType: 'appdescr_ui_generic_app_changePageConfiguration',
|
|
43
|
+
reference: flexSettings.projectId,
|
|
44
|
+
appComponent,
|
|
45
|
+
parameters: {
|
|
46
|
+
parentPage: {
|
|
47
|
+
component,
|
|
48
|
+
entitySet
|
|
49
|
+
},
|
|
50
|
+
entityPropertyChange: {
|
|
51
|
+
propertyPath: propertyPath,
|
|
52
|
+
operation: 'UPSERT',
|
|
53
|
+
propertyValue: propertyValue
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const command = await CommandFactory.getCommandFor(control, 'appDescriptor', modifiedValue, null, flexSettings);
|
|
58
|
+
return [command];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Checks whether the manifest has array structured page definitions
|
|
63
|
+
* @param manifest - manifest object
|
|
64
|
+
* @returns true if pages are defined as array, false if defined as object
|
|
65
|
+
*/
|
|
66
|
+
function isManifestArrayStructured(manifest) {
|
|
67
|
+
return Array.isArray(manifest['sap.ui.generic.app']?.pages);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Checks if the current UI5 version and manifest structure is supported in v2 applications.
|
|
72
|
+
*
|
|
73
|
+
* @param manifest - manifest changes of the current application.
|
|
74
|
+
*
|
|
75
|
+
* Returns `false`
|
|
76
|
+
*
|
|
77
|
+
* - If the manifest is structured is an array and is below version 1.134
|
|
78
|
+
* - If the UI5 version is not supported
|
|
79
|
+
* Otherwise, returns `true`.
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
async function areManifestChangesSupported(manifest) {
|
|
83
|
+
const version = await getUi5Version();
|
|
84
|
+
if (isLowerThanMinimalUi5Version(version, {
|
|
85
|
+
major: 1,
|
|
86
|
+
minor: 134
|
|
87
|
+
}) && isManifestArrayStructured(manifest)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
const isAboveOrEqualMinimalVersion = !isLowerThanMinimalUi5Version(version, {
|
|
91
|
+
major: 1,
|
|
92
|
+
minor: 128
|
|
93
|
+
});
|
|
94
|
+
const isSupportedPatchVersion = isVersionEqualOrHasNewerPatch(version, {
|
|
95
|
+
major: 1,
|
|
96
|
+
minor: 96,
|
|
97
|
+
patch: 35
|
|
98
|
+
}) || isVersionEqualOrHasNewerPatch(version, {
|
|
99
|
+
major: 1,
|
|
100
|
+
minor: 108,
|
|
101
|
+
patch: 38
|
|
102
|
+
}) || isVersionEqualOrHasNewerPatch(version, {
|
|
103
|
+
major: 1,
|
|
104
|
+
minor: 120,
|
|
105
|
+
patch: 23
|
|
106
|
+
});
|
|
107
|
+
return isAboveOrEqualMinimalVersion || isSupportedPatchVersion;
|
|
108
|
+
}
|
|
109
|
+
function isVariantManagementEnabledOPPage(context, control) {
|
|
110
|
+
const ownerComponent = Component.getOwnerComponentFor(control);
|
|
111
|
+
if (ownerComponent?.isA('sap.suite.ui.generic.template.ObjectPage.Component')) {
|
|
112
|
+
const id = control.getId();
|
|
113
|
+
if (typeof id !== 'string') {
|
|
114
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
115
|
+
}
|
|
116
|
+
if (!control.isA('sap.ui.comp.smarttable.SmartTable')) {
|
|
117
|
+
// variant management is only supported by SmartTable
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
let value = context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
|
|
121
|
+
if (value === undefined) {
|
|
122
|
+
value = !!control.getVariantManagement();
|
|
123
|
+
}
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
var __exports = {
|
|
129
|
+
__esModule: true
|
|
130
|
+
};
|
|
131
|
+
__exports.getV2AppComponent = getV2AppComponent;
|
|
132
|
+
__exports.prepareManifestChange = prepareManifestChange;
|
|
133
|
+
__exports.isManifestArrayStructured = isManifestArrayStructured;
|
|
134
|
+
__exports.areManifestChangesSupported = areManifestChangesSupported;
|
|
135
|
+
__exports.isVariantManagementEnabledOPPage = isVariantManagementEnabledOPPage;
|
|
136
|
+
return __exports;
|
|
137
|
+
});
|
|
138
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type UI5Element from 'sap/ui/core/Element';
|
|
2
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
3
|
+
import CommandFactory from 'sap/ui/rta/command/CommandFactory';
|
|
4
|
+
|
|
5
|
+
import type { QuickActionContext } from '../../../cpe/quick-actions/quick-action-definition';
|
|
6
|
+
import { getUi5Version, isLowerThanMinimalUi5Version, isVersionEqualOrHasNewerPatch } from '../../../utils/version';
|
|
7
|
+
import type { Manifest } from 'sap/ui/rta/RuntimeAuthoring';
|
|
8
|
+
import Component from 'sap/ui/core/Component';
|
|
9
|
+
import type AppComponent from 'sap/suite/ui/generic/template/lib/AppComponent';
|
|
10
|
+
import type ManagedObject from 'sap/ui/base/ManagedObject';
|
|
11
|
+
import type TemplateComponent from 'sap/suite/ui/generic/template/lib/TemplateComponent';
|
|
12
|
+
import SmartTableExtended from 'sap/ui/comp/smarttable';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Gets app component of a v2 project.
|
|
16
|
+
*
|
|
17
|
+
* @param control - ManagedObject.
|
|
18
|
+
* @returns AppComponent.
|
|
19
|
+
*/
|
|
20
|
+
export function getV2AppComponent(control: ManagedObject): AppComponent | undefined {
|
|
21
|
+
const ownerComponent = Component.getOwnerComponentFor(control);
|
|
22
|
+
let result;
|
|
23
|
+
if (ownerComponent?.isA<TemplateComponent>('sap.suite.ui.generic.template.lib.TemplateComponent')) {
|
|
24
|
+
result = ownerComponent.getAppComponent();
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Prepares the change for the manifest setting.
|
|
31
|
+
*
|
|
32
|
+
* @param context - The context object containing flexSettings.
|
|
33
|
+
* @param propertyPath - The path of the property in the manifest.
|
|
34
|
+
* @param control - The UI5 element representing the control.
|
|
35
|
+
* @param component - component name e.g list report or object page.
|
|
36
|
+
* @param entitySet - Entity Set name.
|
|
37
|
+
* @param propertyValue - The value to be set for the property.
|
|
38
|
+
*
|
|
39
|
+
* @returns A Promise resolving to an array of FlexCommand objects.
|
|
40
|
+
*/
|
|
41
|
+
export async function prepareManifestChange(
|
|
42
|
+
context: QuickActionContext,
|
|
43
|
+
propertyPath: string,
|
|
44
|
+
control: UI5Element,
|
|
45
|
+
component: string,
|
|
46
|
+
entitySet: string | undefined,
|
|
47
|
+
propertyValue: object | string
|
|
48
|
+
): Promise<FlexCommand[]> {
|
|
49
|
+
const { flexSettings } = context;
|
|
50
|
+
const appComponent = getV2AppComponent(control);
|
|
51
|
+
const modifiedValue = {
|
|
52
|
+
changeType: 'appdescr_ui_generic_app_changePageConfiguration',
|
|
53
|
+
reference: flexSettings.projectId,
|
|
54
|
+
appComponent,
|
|
55
|
+
parameters: {
|
|
56
|
+
parentPage: {
|
|
57
|
+
component,
|
|
58
|
+
entitySet
|
|
59
|
+
},
|
|
60
|
+
entityPropertyChange: {
|
|
61
|
+
propertyPath: propertyPath,
|
|
62
|
+
operation: 'UPSERT',
|
|
63
|
+
propertyValue: propertyValue
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const command = await CommandFactory.getCommandFor<FlexCommand>(
|
|
68
|
+
control,
|
|
69
|
+
'appDescriptor',
|
|
70
|
+
modifiedValue,
|
|
71
|
+
null,
|
|
72
|
+
flexSettings
|
|
73
|
+
);
|
|
74
|
+
return [command];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Checks whether the manifest has array structured page definitions
|
|
79
|
+
* @param manifest - manifest object
|
|
80
|
+
* @returns true if pages are defined as array, false if defined as object
|
|
81
|
+
*/
|
|
82
|
+
export function isManifestArrayStructured(manifest: Manifest): boolean {
|
|
83
|
+
return Array.isArray(manifest['sap.ui.generic.app']?.pages);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Checks if the current UI5 version and manifest structure is supported in v2 applications.
|
|
88
|
+
*
|
|
89
|
+
* @param manifest - manifest changes of the current application.
|
|
90
|
+
*
|
|
91
|
+
* Returns `false`
|
|
92
|
+
*
|
|
93
|
+
* - If the manifest is structured is an array and is below version 1.134
|
|
94
|
+
* - If the UI5 version is not supported
|
|
95
|
+
* Otherwise, returns `true`.
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
98
|
+
export async function areManifestChangesSupported(manifest: Manifest): Promise<boolean> {
|
|
99
|
+
const version = await getUi5Version();
|
|
100
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 134 }) && isManifestArrayStructured(manifest)) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const isAboveOrEqualMinimalVersion = !isLowerThanMinimalUi5Version(version, { major: 1, minor: 128 });
|
|
105
|
+
const isSupportedPatchVersion =
|
|
106
|
+
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 96, patch: 35 }) ||
|
|
107
|
+
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 108, patch: 38 }) ||
|
|
108
|
+
isVersionEqualOrHasNewerPatch(version, { major: 1, minor: 120, patch: 23 });
|
|
109
|
+
|
|
110
|
+
return isAboveOrEqualMinimalVersion || isSupportedPatchVersion;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function isVariantManagementEnabledOPPage(
|
|
114
|
+
context: QuickActionContext,
|
|
115
|
+
control: UI5Element
|
|
116
|
+
): boolean | undefined {
|
|
117
|
+
const ownerComponent = Component.getOwnerComponentFor(control);
|
|
118
|
+
if (ownerComponent?.isA('sap.suite.ui.generic.template.ObjectPage.Component')) {
|
|
119
|
+
const id = control.getId();
|
|
120
|
+
if (typeof id !== 'string') {
|
|
121
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
122
|
+
}
|
|
123
|
+
if (!control.isA<SmartTableExtended>('sap.ui.comp.smarttable.SmartTable')) {
|
|
124
|
+
// variant management is only supported by SmartTable
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
let value = context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
|
|
128
|
+
if (value === undefined) {
|
|
129
|
+
value = !!control.getVariantManagement();
|
|
130
|
+
}
|
|
131
|
+
return value as boolean;
|
|
132
|
+
}
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|