@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,178 @@
|
|
|
1
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
import OverlayRegistry from 'sap/ui/dt/OverlayRegistry';
|
|
3
|
+
|
|
4
|
+
import { QuickActionContext, NestedQuickActionDefinition } from '../../../cpe/quick-actions/quick-action-definition';
|
|
5
|
+
import { DialogFactory, DialogNames } from '../../dialog-factory';
|
|
6
|
+
import { SMART_TABLE_TYPE, GRID_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE } from '../control-types';
|
|
7
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
8
|
+
|
|
9
|
+
import { DIALOG_ENABLEMENT_VALIDATOR } from '../dialog-enablement-validator';
|
|
10
|
+
import Table from 'sap/ui/mdc/Table';
|
|
11
|
+
import { getV4AppComponent, isMacroTable } from '../../../utils/fe-v4';
|
|
12
|
+
import { getLineItemAnnotation, getPropertyPath } from './utils';
|
|
13
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
|
|
14
|
+
import { isA } from '../../../utils/core';
|
|
15
|
+
import UI5Element from 'sap/ui/core/Element';
|
|
16
|
+
|
|
17
|
+
interface ViewDataType {
|
|
18
|
+
stableId: string;
|
|
19
|
+
}
|
|
20
|
+
export const CREATE_TABLE_CUSTOM_COLUMN = 'create-table-custom-column';
|
|
21
|
+
const regexForAnnotationPath =
|
|
22
|
+
/controlConfiguration\/(?:entity\/)?@com\.sap\.vocabularies\.UI\.v1\.LineItem(?:#[^/]+)?\/columns\//;
|
|
23
|
+
|
|
24
|
+
export const CONTROL_TYPES = [SMART_TABLE_TYPE, MDC_TABLE_TYPE, TREE_TABLE_TYPE, GRID_TABLE_TYPE];
|
|
25
|
+
|
|
26
|
+
export class AddTableCustomColumnQuickAction
|
|
27
|
+
extends TableQuickActionDefinitionBase
|
|
28
|
+
implements NestedQuickActionDefinition
|
|
29
|
+
{
|
|
30
|
+
protected pageId: string | undefined;
|
|
31
|
+
constructor(context: QuickActionContext) {
|
|
32
|
+
super(
|
|
33
|
+
CREATE_TABLE_CUSTOM_COLUMN,
|
|
34
|
+
CONTROL_TYPES,
|
|
35
|
+
'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN',
|
|
36
|
+
context,
|
|
37
|
+
{
|
|
38
|
+
validateTableColumns: true
|
|
39
|
+
},
|
|
40
|
+
[DIALOG_ENABLEMENT_VALIDATOR]
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
async initialize(): Promise<void> {
|
|
44
|
+
this.pageId = (this.context.view.getViewData() as ViewDataType)?.stableId.split('::').pop() as string;
|
|
45
|
+
const version = await getUi5Version();
|
|
46
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 120 })) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
await super.initialize();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
53
|
+
const { table } = this.tableMap[path];
|
|
54
|
+
if (!table) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
if (table) {
|
|
58
|
+
const overlay = OverlayRegistry.getOverlay(table) || [];
|
|
59
|
+
const propertyPath = `${getPropertyPath(table, 'columns')}`;
|
|
60
|
+
const anchor = findAnchor(table);
|
|
61
|
+
await DialogFactory.createDialog(
|
|
62
|
+
overlay,
|
|
63
|
+
this.context.rta,
|
|
64
|
+
DialogNames.ADD_CUSTOM_FRAGMENT,
|
|
65
|
+
undefined,
|
|
66
|
+
{
|
|
67
|
+
title: 'QUICK_ACTION_ADD_CUSTOM_TABLE_COLUMN',
|
|
68
|
+
type: 'tableColumn',
|
|
69
|
+
appDescriptor: {
|
|
70
|
+
appComponent: getV4AppComponent(this.context.view)!,
|
|
71
|
+
appType: 'fe-v4',
|
|
72
|
+
pageId: this.pageId!,
|
|
73
|
+
projectId: this.context.flexSettings.projectId,
|
|
74
|
+
anchor
|
|
75
|
+
},
|
|
76
|
+
validateId: (columnId) => {
|
|
77
|
+
const customColumnInPending = [
|
|
78
|
+
...this.context.changeService.getAllPendingConfigPropertyPath()
|
|
79
|
+
].filter((path) => regexForAnnotationPath.test(path));
|
|
80
|
+
const idInPendingChanges = customColumnInPending.includes(`${propertyPath}${columnId}`);
|
|
81
|
+
if (idInPendingChanges) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
if (
|
|
85
|
+
isA(MDC_TABLE_TYPE, table) &&
|
|
86
|
+
(table as Table)
|
|
87
|
+
.getColumns()
|
|
88
|
+
.every((col) => !col.getId().endsWith(`CustomColumn::${columnId}`))
|
|
89
|
+
) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
},
|
|
94
|
+
propertyPath
|
|
95
|
+
},
|
|
96
|
+
{ actionName: this.type, telemetryEventIdentifier: this.getTelemetryIdentifier() }
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function findAnchor(table: UI5Element): string {
|
|
103
|
+
const macroTable = table.getParent();
|
|
104
|
+
let anchor: string = '';
|
|
105
|
+
if (isMacroTable(macroTable)) {
|
|
106
|
+
let metaPath = '';
|
|
107
|
+
if (macroTable.metaPath.includes('LineItem')) {
|
|
108
|
+
metaPath = macroTable.metaPath;
|
|
109
|
+
} else {
|
|
110
|
+
const segments = macroTable.metaPath.split('/');
|
|
111
|
+
segments.pop();
|
|
112
|
+
const path = segments.join('/');
|
|
113
|
+
metaPath = `${path}/${getLineItemAnnotation(macroTable)}`;
|
|
114
|
+
}
|
|
115
|
+
if (!metaPath) {
|
|
116
|
+
return '';
|
|
117
|
+
}
|
|
118
|
+
const columns = macroTable.getModel()?.getMetaModel()?.getObject(metaPath);
|
|
119
|
+
const filteredColumns = columns.filter(
|
|
120
|
+
(col: { $Type: string; Inline?: boolean; SemanticObject?: string; Action?: string }) =>
|
|
121
|
+
[
|
|
122
|
+
'com.sap.vocabularies.UI.v1.DataField',
|
|
123
|
+
'com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation',
|
|
124
|
+
'com.sap.vocabularies.UI.v1.DataFieldForAnnotation'
|
|
125
|
+
].includes(col.$Type) ||
|
|
126
|
+
('com.sap.vocabularies.UI.v1.DataFieldForAction' === col.$Type && col.Inline)
|
|
127
|
+
) as {
|
|
128
|
+
$Type: string;
|
|
129
|
+
Inline?: boolean;
|
|
130
|
+
Value: { $Path: string };
|
|
131
|
+
Action: string;
|
|
132
|
+
SemanticObject?: string;
|
|
133
|
+
Target?: { $AnnotationPath: string };
|
|
134
|
+
}[];
|
|
135
|
+
const lastColumn = filteredColumns.at(-1);
|
|
136
|
+
if (!lastColumn) {
|
|
137
|
+
return '';
|
|
138
|
+
}
|
|
139
|
+
anchor = buildColumnAnchor(lastColumn);
|
|
140
|
+
}
|
|
141
|
+
return anchor;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Builds anchor string for different column types
|
|
146
|
+
* @param column - The column object from metadata
|
|
147
|
+
* @returns The anchor string for the column
|
|
148
|
+
*/
|
|
149
|
+
function buildColumnAnchor(column: {
|
|
150
|
+
$Type: string;
|
|
151
|
+
Value?: { $Path: string };
|
|
152
|
+
Action?: string;
|
|
153
|
+
SemanticObject?: string;
|
|
154
|
+
Target?: { $AnnotationPath: string };
|
|
155
|
+
}): string {
|
|
156
|
+
if (column.$Type === 'com.sap.vocabularies.UI.v1.DataFieldForAction') {
|
|
157
|
+
return `DataFieldForAction::${column.Action}`;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (column.$Type === 'com.sap.vocabularies.UI.v1.DataField') {
|
|
161
|
+
return `DataField::${column.Value?.$Path}`;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (column.$Type === 'com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation') {
|
|
165
|
+
return `DataFieldForIntentBasedNavigation::${column.SemanticObject}::${column.Action}`;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (column.$Type === 'com.sap.vocabularies.UI.v1.DataFieldForAnnotation') {
|
|
169
|
+
const annotationPath = column.Target?.$AnnotationPath;
|
|
170
|
+
if (!annotationPath) {
|
|
171
|
+
return '';
|
|
172
|
+
}
|
|
173
|
+
const annotation = annotationPath.split('.').pop();
|
|
174
|
+
return `DataFieldForAnnotation::${annotation?.split('#').join('::')}`;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return '';
|
|
178
|
+
}
|
package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../simple-quick-action-base", "sap/ui/core/Component", "../../../utils/version", "../../../utils/fe-v4"], function (___simple_quick_action_base, Component, _____utils_version, _____utils_fe_v4) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
7
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
8
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
9
|
+
const createManifestPropertyChange = _____utils_fe_v4["createManifestPropertyChange"];
|
|
10
|
+
const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
|
|
11
|
+
|
|
12
|
+
// sap.f.DynamicPage for list report and sap.uxap.ObjectPageLayout for object page.
|
|
13
|
+
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Quick Action for enabling table filtering using table personalization settings.
|
|
17
|
+
*/
|
|
18
|
+
class EnableVariantManagementQuickAction extends SimpleQuickActionDefinitionBase {
|
|
19
|
+
pageSmartVariantManagementMode = '';
|
|
20
|
+
constructor(context) {
|
|
21
|
+
super(ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS, CONTROL_TYPES, 'QUICK_ACTION_ENABLE_TABLES_AND_CHARTS_VARIANT_MANAGEMENT', context, [{
|
|
22
|
+
run: () => {
|
|
23
|
+
if (this.control) {
|
|
24
|
+
if (this.pageSmartVariantManagementMode === 'Control') {
|
|
25
|
+
return {
|
|
26
|
+
type: 'error',
|
|
27
|
+
message: this.context.resourceBundle.getText('VARIANT_MANAGEMENT_FOR_PAGE_CONTROLS_IS_ALREADY_ENABLED')
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
}]);
|
|
34
|
+
}
|
|
35
|
+
forceRefreshAfterExecution = true;
|
|
36
|
+
async initialize() {
|
|
37
|
+
const version = await getUi5Version();
|
|
38
|
+
if (isLowerThanMinimalUi5Version(version, {
|
|
39
|
+
major: 1,
|
|
40
|
+
minor: 131
|
|
41
|
+
})) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
await super.initialize();
|
|
45
|
+
if (this.control) {
|
|
46
|
+
this.ownerComponent = Component.getOwnerComponentFor(this.control);
|
|
47
|
+
if (!this.ownerComponent?.isA('sap.fe.templates.ListReport.Component') && !this.ownerComponent?.isA('sap.fe.templates.ObjectPage.Component') && !this.ownerComponent?.isA('sap.fe.templates.AnalyticalListPage.Component')) {
|
|
48
|
+
this.control = undefined;
|
|
49
|
+
} else {
|
|
50
|
+
const id = this.control.getId();
|
|
51
|
+
if (typeof id !== 'string') {
|
|
52
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
53
|
+
}
|
|
54
|
+
const value = this.context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
|
|
55
|
+
this.pageSmartVariantManagementMode = value === undefined ? this.ownerComponent.getVariantManagement() : value;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async execute() {
|
|
60
|
+
if (!this.control) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
const {
|
|
64
|
+
flexSettings
|
|
65
|
+
} = this.context;
|
|
66
|
+
const command = await createManifestPropertyChange(this.control, flexSettings, {
|
|
67
|
+
variantManagement: 'Control'
|
|
68
|
+
});
|
|
69
|
+
if (command) {
|
|
70
|
+
return [command];
|
|
71
|
+
} else {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
var __exports = {
|
|
77
|
+
__esModule: true
|
|
78
|
+
};
|
|
79
|
+
__exports.ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS;
|
|
80
|
+
__exports.EnableVariantManagementQuickAction = EnableVariantManagementQuickAction;
|
|
81
|
+
return __exports;
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=enable-variant-management.js.map
|
package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
QuickActionContext,
|
|
5
|
+
SimpleQuickActionDefinition
|
|
6
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
7
|
+
|
|
8
|
+
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
9
|
+
import Component from 'sap/ui/core/Component';
|
|
10
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
|
|
11
|
+
import { createManifestPropertyChange } from '../../../utils/fe-v4';
|
|
12
|
+
import type ListReportComponent from 'sap/suite/ui/generic/template/ListReport';
|
|
13
|
+
|
|
14
|
+
export const ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS = 'enable-variant-management-in-tables-charts';
|
|
15
|
+
|
|
16
|
+
// sap.f.DynamicPage for list report and sap.uxap.ObjectPageLayout for object page.
|
|
17
|
+
const CONTROL_TYPES = ['sap.f.DynamicPage', 'sap.uxap.ObjectPageLayout'];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Quick Action for enabling table filtering using table personalization settings.
|
|
21
|
+
*/
|
|
22
|
+
export class EnableVariantManagementQuickAction
|
|
23
|
+
extends SimpleQuickActionDefinitionBase
|
|
24
|
+
implements SimpleQuickActionDefinition
|
|
25
|
+
{
|
|
26
|
+
private pageSmartVariantManagementMode = '';
|
|
27
|
+
private ownerComponent: ListReportComponent;
|
|
28
|
+
constructor(context: QuickActionContext) {
|
|
29
|
+
super(
|
|
30
|
+
ENABLE_VARIANT_MANAGEMENT_IN_TABLES_CHARTS,
|
|
31
|
+
CONTROL_TYPES,
|
|
32
|
+
'QUICK_ACTION_ENABLE_TABLES_AND_CHARTS_VARIANT_MANAGEMENT',
|
|
33
|
+
context,
|
|
34
|
+
[
|
|
35
|
+
{
|
|
36
|
+
run: () => {
|
|
37
|
+
if (this.control) {
|
|
38
|
+
if (this.pageSmartVariantManagementMode === 'Control') {
|
|
39
|
+
return {
|
|
40
|
+
type: 'error',
|
|
41
|
+
message: this.context.resourceBundle.getText(
|
|
42
|
+
'VARIANT_MANAGEMENT_FOR_PAGE_CONTROLS_IS_ALREADY_ENABLED'
|
|
43
|
+
)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
readonly forceRefreshAfterExecution = true;
|
|
55
|
+
async initialize(): Promise<void> {
|
|
56
|
+
const version = await getUi5Version();
|
|
57
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 131 })) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
await super.initialize();
|
|
61
|
+
if (this.control) {
|
|
62
|
+
this.ownerComponent = Component.getOwnerComponentFor(this.control) as unknown as ListReportComponent;
|
|
63
|
+
if (
|
|
64
|
+
!this.ownerComponent?.isA('sap.fe.templates.ListReport.Component') &&
|
|
65
|
+
!this.ownerComponent?.isA('sap.fe.templates.ObjectPage.Component') &&
|
|
66
|
+
!this.ownerComponent?.isA('sap.fe.templates.AnalyticalListPage.Component')
|
|
67
|
+
) {
|
|
68
|
+
this.control = undefined;
|
|
69
|
+
} else {
|
|
70
|
+
const id = this.control.getId();
|
|
71
|
+
if (typeof id !== 'string') {
|
|
72
|
+
throw new Error('Could not retrieve configuration property because control id is not valid!');
|
|
73
|
+
}
|
|
74
|
+
const value = this.context.changeService.getConfigurationPropertyValue(id, 'variantManagement');
|
|
75
|
+
this.pageSmartVariantManagementMode =
|
|
76
|
+
value === undefined ? this.ownerComponent.getVariantManagement() : (value as string);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async execute(): Promise<FlexCommand[]> {
|
|
82
|
+
if (!this.control) {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
const { flexSettings } = this.context;
|
|
86
|
+
|
|
87
|
+
const command = await createManifestPropertyChange(this.control, flexSettings, {
|
|
88
|
+
variantManagement: 'Control'
|
|
89
|
+
});
|
|
90
|
+
if (command) {
|
|
91
|
+
return [command];
|
|
92
|
+
} else {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../../../cpe/quick-actions/utils", "../../../utils/core", "./utils", "../simple-quick-action-base"], function (_____cpe_quick_actions_utils, _____utils_core, ___utils, ___simple_quick_action_base) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const pageHasControlId = _____cpe_quick_actions_utils["pageHasControlId"];
|
|
7
|
+
const getControlById = _____utils_core["getControlById"];
|
|
8
|
+
const executeToggleAction = ___utils["executeToggleAction"];
|
|
9
|
+
const SimpleQuickActionDefinitionBase = ___simple_quick_action_base["SimpleQuickActionDefinitionBase"];
|
|
10
|
+
const ENABLE_SEMANTIC_DATE_RANGE = 'enable-semantic-date-range';
|
|
11
|
+
const PROPERTY_NAME = 'useSemanticDateRange';
|
|
12
|
+
const PROPERTY_PATH = `controlConfiguration/@com.sap.vocabularies.UI.v1.SelectionFields/${PROPERTY_NAME}`;
|
|
13
|
+
const CONTROL_TYPE = 'sap.fe.macros.controls.FilterBar';
|
|
14
|
+
const boolMap = {
|
|
15
|
+
'true': true,
|
|
16
|
+
'false': false
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Quick Action for toggling the visibility of "Semantic date range" for filter bar fields in LR.
|
|
20
|
+
*/
|
|
21
|
+
class ToggleSemanticDateRangeFilterBar extends SimpleQuickActionDefinitionBase {
|
|
22
|
+
constructor(context) {
|
|
23
|
+
super(ENABLE_SEMANTIC_DATE_RANGE, [], '', context);
|
|
24
|
+
}
|
|
25
|
+
forceRefreshAfterExecution = true;
|
|
26
|
+
isUseDateRangeTypeEnabled = false;
|
|
27
|
+
initialize() {
|
|
28
|
+
const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
|
|
29
|
+
for (const control of controls) {
|
|
30
|
+
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
31
|
+
const filterBar = getControlById(control.controlId);
|
|
32
|
+
if (isActionApplicable && filterBar) {
|
|
33
|
+
this.control = filterBar;
|
|
34
|
+
const value = this.context.changeService.getConfigurationPropertyValue(control.controlId, PROPERTY_NAME);
|
|
35
|
+
this.isUseDateRangeTypeEnabled = value === undefined ? boolMap[this.control.data('useSemanticDateRange')] : value;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return Promise.resolve();
|
|
39
|
+
}
|
|
40
|
+
get textKey() {
|
|
41
|
+
return this.isUseDateRangeTypeEnabled ? 'QUICK_ACTION_LR_DISABLE_SEMANTIC_DATE_RANGE_FILTER_BAR' : 'QUICK_ACTION_LR_ENABLE_SEMANTIC_DATE_RANGE_FILTER_BAR';
|
|
42
|
+
}
|
|
43
|
+
async execute() {
|
|
44
|
+
const command = await executeToggleAction(this.context, this.isUseDateRangeTypeEnabled, CONTROL_TYPE, PROPERTY_PATH);
|
|
45
|
+
if (command.length) {
|
|
46
|
+
this.isUseDateRangeTypeEnabled = !this.isUseDateRangeTypeEnabled;
|
|
47
|
+
}
|
|
48
|
+
return command;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
var __exports = {
|
|
52
|
+
__esModule: true
|
|
53
|
+
};
|
|
54
|
+
__exports.ENABLE_SEMANTIC_DATE_RANGE = ENABLE_SEMANTIC_DATE_RANGE;
|
|
55
|
+
__exports.ToggleSemanticDateRangeFilterBar = ToggleSemanticDateRangeFilterBar;
|
|
56
|
+
return __exports;
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=lr-enable-semantic-date-range-filter-bar.js.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
import type FilterBar from 'sap/ui/mdc/FilterBar';
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
QuickActionContext,
|
|
6
|
+
SimpleQuickActionDefinition
|
|
7
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
8
|
+
import { pageHasControlId } from '../../../cpe/quick-actions/utils';
|
|
9
|
+
import { getControlById } from '../../../utils/core';
|
|
10
|
+
import { executeToggleAction } from './utils';
|
|
11
|
+
import { SimpleQuickActionDefinitionBase } from '../simple-quick-action-base';
|
|
12
|
+
|
|
13
|
+
export const ENABLE_SEMANTIC_DATE_RANGE = 'enable-semantic-date-range';
|
|
14
|
+
const PROPERTY_NAME = 'useSemanticDateRange';
|
|
15
|
+
const PROPERTY_PATH = `controlConfiguration/@com.sap.vocabularies.UI.v1.SelectionFields/${PROPERTY_NAME}`;
|
|
16
|
+
const CONTROL_TYPE = 'sap.fe.macros.controls.FilterBar';
|
|
17
|
+
const boolMap: { [key: string]: boolean } = {
|
|
18
|
+
'true': true,
|
|
19
|
+
'false': false
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Quick Action for toggling the visibility of "Semantic date range" for filter bar fields in LR.
|
|
23
|
+
*/
|
|
24
|
+
export class ToggleSemanticDateRangeFilterBar
|
|
25
|
+
extends SimpleQuickActionDefinitionBase
|
|
26
|
+
implements SimpleQuickActionDefinition
|
|
27
|
+
{
|
|
28
|
+
constructor(context: QuickActionContext) {
|
|
29
|
+
super(ENABLE_SEMANTIC_DATE_RANGE, [], '', context);
|
|
30
|
+
}
|
|
31
|
+
readonly forceRefreshAfterExecution = true;
|
|
32
|
+
private isUseDateRangeTypeEnabled = false;
|
|
33
|
+
|
|
34
|
+
initialize(): Promise<void> {
|
|
35
|
+
const controls = this.context.controlIndex[CONTROL_TYPE] ?? [];
|
|
36
|
+
for (const control of controls) {
|
|
37
|
+
const isActionApplicable = pageHasControlId(this.context.view, control.controlId);
|
|
38
|
+
const filterBar = getControlById<FilterBar>(control.controlId);
|
|
39
|
+
if (isActionApplicable && filterBar) {
|
|
40
|
+
this.control = filterBar;
|
|
41
|
+
const value = this.context.changeService.getConfigurationPropertyValue(
|
|
42
|
+
control.controlId,
|
|
43
|
+
PROPERTY_NAME
|
|
44
|
+
);
|
|
45
|
+
this.isUseDateRangeTypeEnabled =
|
|
46
|
+
value === undefined ? boolMap[this.control.data('useSemanticDateRange')] : (value as boolean);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return Promise.resolve();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
protected get textKey() {
|
|
53
|
+
return this.isUseDateRangeTypeEnabled
|
|
54
|
+
? 'QUICK_ACTION_LR_DISABLE_SEMANTIC_DATE_RANGE_FILTER_BAR'
|
|
55
|
+
: 'QUICK_ACTION_LR_ENABLE_SEMANTIC_DATE_RANGE_FILTER_BAR';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async execute(): Promise<FlexCommand[]> {
|
|
59
|
+
const command = await executeToggleAction(
|
|
60
|
+
this.context,
|
|
61
|
+
this.isUseDateRangeTypeEnabled,
|
|
62
|
+
CONTROL_TYPE,
|
|
63
|
+
PROPERTY_PATH
|
|
64
|
+
);
|
|
65
|
+
if (command.length) {
|
|
66
|
+
this.isUseDateRangeTypeEnabled = !this.isUseDateRangeTypeEnabled;
|
|
67
|
+
}
|
|
68
|
+
return command;
|
|
69
|
+
}
|
|
70
|
+
}
|
package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["../table-quick-action-base", "../../../cpe/quick-actions/utils", "../../../utils/fe-v4", "../../../utils/version", "../control-types"], function (___table_quick_action_base, _____cpe_quick_actions_utils, _____utils_fe_v4, _____utils_version, ___control_types) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
const TableQuickActionDefinitionBase = ___table_quick_action_base["TableQuickActionDefinitionBase"];
|
|
7
|
+
const getRelevantControlFromActivePage = _____cpe_quick_actions_utils["getRelevantControlFromActivePage"];
|
|
8
|
+
const createManifestPropertyChange = _____utils_fe_v4["createManifestPropertyChange"];
|
|
9
|
+
const getUi5Version = _____utils_version["getUi5Version"];
|
|
10
|
+
const isLowerThanMinimalUi5Version = _____utils_version["isLowerThanMinimalUi5Version"];
|
|
11
|
+
const MDC_TABLE_TYPE = ___control_types["MDC_TABLE_TYPE"];
|
|
12
|
+
const ENABLE_TABLE_FILTERING = 'enable-table-filtering';
|
|
13
|
+
/**
|
|
14
|
+
* Quick Action for enabling table filtering using table personalization settings.
|
|
15
|
+
*/
|
|
16
|
+
class EnableTableFilteringQuickAction extends TableQuickActionDefinitionBase {
|
|
17
|
+
constructor(context) {
|
|
18
|
+
super(ENABLE_TABLE_FILTERING, [MDC_TABLE_TYPE], 'QUICK_ACTION_ENABLE_TABLE_FILTERING', context);
|
|
19
|
+
}
|
|
20
|
+
forceRefreshAfterExecution = true;
|
|
21
|
+
async initialize() {
|
|
22
|
+
const version = await getUi5Version();
|
|
23
|
+
if (isLowerThanMinimalUi5Version(version, {
|
|
24
|
+
major: 1,
|
|
25
|
+
minor: 131
|
|
26
|
+
})) {
|
|
27
|
+
this.isApplicable = false;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const tooltipText = this.context.resourceBundle.getText('TABLE_FILTERING_CHANGE_HAS_ALREADY_BEEN_MADE');
|
|
31
|
+
for (const smartTable of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [MDC_TABLE_TYPE])) {
|
|
32
|
+
const personalizationData = smartTable.getP13nMode();
|
|
33
|
+
const value = this.context.changeService.getConfigurationPropertyValue(smartTable.getId(), 'personalization');
|
|
34
|
+
const isFilterEnabled = value?.filter === undefined ? personalizationData.includes('Filter') : value.filter;
|
|
35
|
+
const path = this.children.length.toString();
|
|
36
|
+
this.children.push({
|
|
37
|
+
path,
|
|
38
|
+
label: `'${smartTable.getHeader()}' table`,
|
|
39
|
+
enabled: !isFilterEnabled,
|
|
40
|
+
tooltip: isFilterEnabled ? tooltipText : undefined,
|
|
41
|
+
children: []
|
|
42
|
+
});
|
|
43
|
+
this.tableMap[path] = {
|
|
44
|
+
table: smartTable,
|
|
45
|
+
tableUpdateEventAttachedOnce: false
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (this.children.length > 0) {
|
|
49
|
+
this.isApplicable = true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async execute(path) {
|
|
53
|
+
const {
|
|
54
|
+
flexSettings
|
|
55
|
+
} = this.context;
|
|
56
|
+
const {
|
|
57
|
+
table
|
|
58
|
+
} = this.tableMap[path];
|
|
59
|
+
if (!table) {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
const propertyChange = {
|
|
63
|
+
personalization: {
|
|
64
|
+
sort: true,
|
|
65
|
+
column: true,
|
|
66
|
+
filter: true,
|
|
67
|
+
group: true,
|
|
68
|
+
aggregate: true
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const command = await createManifestPropertyChange(table, flexSettings, propertyChange);
|
|
72
|
+
if (command) {
|
|
73
|
+
return [command];
|
|
74
|
+
} else {
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
var __exports = {
|
|
80
|
+
__esModule: true
|
|
81
|
+
};
|
|
82
|
+
__exports.ENABLE_TABLE_FILTERING = ENABLE_TABLE_FILTERING;
|
|
83
|
+
__exports.EnableTableFilteringQuickAction = EnableTableFilteringQuickAction;
|
|
84
|
+
return __exports;
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=lr-enable-table-filtering.js.map
|
package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
NestedQuickActionDefinition,
|
|
5
|
+
QuickActionContext
|
|
6
|
+
} from '../../../cpe/quick-actions/quick-action-definition';
|
|
7
|
+
import type Table from 'sap/ui/mdc/Table';
|
|
8
|
+
import { TableQuickActionDefinitionBase } from '../table-quick-action-base';
|
|
9
|
+
import { getRelevantControlFromActivePage } from '../../../cpe/quick-actions/utils';
|
|
10
|
+
import { createManifestPropertyChange } from '../../../utils/fe-v4';
|
|
11
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../../utils/version';
|
|
12
|
+
import { MDC_TABLE_TYPE } from '../control-types';
|
|
13
|
+
|
|
14
|
+
export const ENABLE_TABLE_FILTERING = 'enable-table-filtering';
|
|
15
|
+
|
|
16
|
+
type Personalization = {
|
|
17
|
+
sort: boolean;
|
|
18
|
+
column: boolean;
|
|
19
|
+
filter: boolean;
|
|
20
|
+
group: boolean;
|
|
21
|
+
aggregate: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Quick Action for enabling table filtering using table personalization settings.
|
|
26
|
+
*/
|
|
27
|
+
export class EnableTableFilteringQuickAction
|
|
28
|
+
extends TableQuickActionDefinitionBase
|
|
29
|
+
implements NestedQuickActionDefinition
|
|
30
|
+
{
|
|
31
|
+
constructor(context: QuickActionContext) {
|
|
32
|
+
super(ENABLE_TABLE_FILTERING, [MDC_TABLE_TYPE], 'QUICK_ACTION_ENABLE_TABLE_FILTERING', context);
|
|
33
|
+
}
|
|
34
|
+
readonly forceRefreshAfterExecution = true;
|
|
35
|
+
|
|
36
|
+
async initialize(): Promise<void> {
|
|
37
|
+
const version = await getUi5Version();
|
|
38
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 131 })) {
|
|
39
|
+
this.isApplicable = false;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const tooltipText = this.context.resourceBundle.getText('TABLE_FILTERING_CHANGE_HAS_ALREADY_BEEN_MADE');
|
|
44
|
+
|
|
45
|
+
for (const smartTable of getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [
|
|
46
|
+
MDC_TABLE_TYPE
|
|
47
|
+
])) {
|
|
48
|
+
const personalizationData = (smartTable as Table).getP13nMode();
|
|
49
|
+
const value = this.context.changeService.getConfigurationPropertyValue(
|
|
50
|
+
smartTable.getId(),
|
|
51
|
+
'personalization'
|
|
52
|
+
) as Personalization;
|
|
53
|
+
const isFilterEnabled = value?.filter === undefined ? personalizationData.includes('Filter') : value.filter;
|
|
54
|
+
const path = this.children.length.toString();
|
|
55
|
+
this.children.push({
|
|
56
|
+
path,
|
|
57
|
+
label: `'${(smartTable as Table).getHeader()}' table`,
|
|
58
|
+
enabled: !isFilterEnabled,
|
|
59
|
+
tooltip: isFilterEnabled ? tooltipText : undefined,
|
|
60
|
+
children: []
|
|
61
|
+
});
|
|
62
|
+
this.tableMap[path] = {
|
|
63
|
+
table: smartTable,
|
|
64
|
+
tableUpdateEventAttachedOnce: false
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (this.children.length > 0) {
|
|
69
|
+
this.isApplicable = true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async execute(path: string): Promise<FlexCommand[]> {
|
|
74
|
+
const { flexSettings } = this.context;
|
|
75
|
+
const { table } = this.tableMap[path];
|
|
76
|
+
|
|
77
|
+
if (!table) {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
80
|
+
const propertyChange = {
|
|
81
|
+
personalization: {
|
|
82
|
+
sort: true,
|
|
83
|
+
column: true,
|
|
84
|
+
filter: true,
|
|
85
|
+
group: true,
|
|
86
|
+
aggregate: true
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const command = await createManifestPropertyChange(table, flexSettings, propertyChange);
|
|
90
|
+
if (command) {
|
|
91
|
+
return [command];
|
|
92
|
+
} else {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|