@sap/ux-ui5-tooling 1.20.4 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/adp-tooling/templates/cf/_gitignore +6 -0
- package/dist/adp-tooling/templates/cf/approuter/package.json +13 -0
- package/dist/adp-tooling/templates/cf/approuter/xs-app.json +15 -0
- package/dist/adp-tooling/templates/cf/i18n/i18n.properties +3 -0
- package/dist/adp-tooling/templates/cf/package.json +35 -0
- package/dist/adp-tooling/templates/cf/ui5.yaml +5 -0
- package/dist/adp-tooling/templates/cf/xs-security.json +7 -0
- package/dist/adp-tooling/templates/changes/annotation.xml +18 -0
- package/dist/adp-tooling/templates/project/gitignore.tmpl +5 -0
- package/dist/adp-tooling/templates/project/package.json +31 -0
- package/dist/adp-tooling/templates/project/ui5.yaml +6 -0
- package/dist/adp-tooling/templates/project/webapp/i18n/i18n.properties +6 -0
- package/dist/adp-tooling/templates/project/webapp/manifest.appdescr_variant +10 -0
- package/dist/adp-tooling/templates/rta/common/analytical-custom-column.xml +25 -0
- package/dist/adp-tooling/templates/rta/common/custom-action.xml +8 -0
- package/dist/adp-tooling/templates/rta/common/grid-tree-custom-column.xml +22 -0
- package/dist/adp-tooling/templates/rta/common/header-field.xml +13 -0
- package/dist/adp-tooling/templates/rta/common/op-custom-section.xml +20 -0
- package/dist/adp-tooling/templates/rta/common/v4-table-action.xml +8 -0
- package/dist/adp-tooling/templates/rta/controller.ejs +80 -0
- package/dist/adp-tooling/templates/rta/fragment.xml +7 -0
- package/dist/adp-tooling/templates/rta/ts-controller.ejs +18 -0
- package/dist/adp-tooling/templates/rta/v2/m-table-custom-column-cell.xml +7 -0
- package/dist/adp-tooling/templates/rta/v2/m-table-custom-column.xml +18 -0
- package/dist/adp-tooling/templates/rta/v4/custom-section.xml +12 -0
- package/dist/adp-tooling/templates/rta/v4/mdc-custom-column-config.xml +6 -0
- package/dist/adp-tooling/templates/rta/v4/mdc-custom-column.xml +11 -0
- package/dist/adp-tooling/templates/typescript/tsconfig.json +19 -0
- package/dist/cli/index.js +15811 -9929
- 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 +43486 -41472
- package/dist/middlewares/fiori-tools-preview.js +56962 -3066
- package/dist/middlewares/fiori-tools-proxy.js +55281 -32282
- package/dist/middlewares/fiori-tools-servestatic.js +31629 -29
- package/dist/preview-middleware/dist/client/adp/add-fragment.js +48 -0
- package/dist/preview-middleware/dist/client/adp/add-fragment.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/api-handler.js +162 -0
- package/dist/preview-middleware/dist/client/adp/api-handler.ts +188 -0
- package/dist/preview-middleware/dist/client/adp/command-executor.js +100 -0
- package/dist/preview-middleware/dist/client/adp/command-executor.ts +105 -0
- package/dist/preview-middleware/dist/client/adp/control-utils.js +46 -0
- package/dist/preview-middleware/dist/client/adp/control-utils.ts +48 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.js +198 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.ts +232 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.js +223 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.ts +257 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.js +195 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.ts +264 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.js +146 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.ts +209 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.js +232 -0
- package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +306 -0
- package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.js +187 -0
- package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.ts +254 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.js +330 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.ts +408 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.js +160 -0
- package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.ts +195 -0
- package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.js +68 -0
- package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.ts +86 -0
- package/dist/preview-middleware/dist/client/adp/controllers/types.js +2 -0
- package/dist/preview-middleware/dist/client/adp/controllers/types.ts +10 -0
- package/dist/preview-middleware/dist/client/adp/dialog-factory.js +151 -0
- package/dist/preview-middleware/dist/client/adp/dialog-factory.ts +210 -0
- package/dist/preview-middleware/dist/client/adp/extend-controller.js +48 -0
- package/dist/preview-middleware/dist/client/adp/extend-controller.ts +49 -0
- package/dist/preview-middleware/dist/client/adp/extension-point.js +83 -0
- package/dist/preview-middleware/dist/client/adp/extension-point.ts +116 -0
- package/dist/preview-middleware/dist/client/adp/init-dialogs.js +142 -0
- package/dist/preview-middleware/dist/client/adp/init-dialogs.ts +178 -0
- package/dist/preview-middleware/dist/client/adp/init.js +102 -0
- package/dist/preview-middleware/dist/client/adp/init.ts +85 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +97 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.ts +140 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.js +74 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.ts +92 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.js +171 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +174 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.js +56 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.ts +56 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.js +41 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.js +69 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.ts +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.js +20 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.ts +7 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.js +25 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.ts +7 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.js +26 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.ts +18 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.js +2 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.ts +19 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +82 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.ts +87 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +69 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.ts +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +103 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +105 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.js +111 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +110 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +108 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +141 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +80 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +93 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +79 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +102 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.ts +98 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +61 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +77 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +95 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +102 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts +116 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.js +79 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.ts +121 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.js +138 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.ts +134 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +140 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.ts +181 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.ts +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +90 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +97 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.js +81 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.ts +98 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.js +129 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.ts +149 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.js +142 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.ts +178 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +83 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts +96 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +58 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +70 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +96 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +55 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.ts +61 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.js +73 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.ts +91 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +91 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +88 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.js +62 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.ts +86 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.js +158 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.ts +175 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/load.js +46 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/load.ts +23 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.js +64 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.ts +71 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.js +44 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.ts +51 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/supported-ui5versions.md +40 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.js +372 -0
- package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.ts +433 -0
- package/dist/preview-middleware/dist/client/adp/sync-views-utils.js +123 -0
- package/dist/preview-middleware/dist/client/adp/sync-views-utils.ts +90 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddAction.fragment.xml +49 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddCustomFragment.fragment.xml +48 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddFragment.fragment.xml +83 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddSubpage.fragment.xml +73 -0
- package/dist/preview-middleware/dist/client/adp/ui/AddTableColumnFragments.fragment.xml +63 -0
- package/dist/preview-middleware/dist/client/adp/ui/ControllerExtension.fragment.xml +63 -0
- package/dist/preview-middleware/dist/client/adp/ui/ExtensionPoint.fragment.xml +61 -0
- package/dist/preview-middleware/dist/client/adp/ui/FileExistsDialog.fragment.xml +43 -0
- package/dist/preview-middleware/dist/client/adp/utils.js +199 -0
- package/dist/preview-middleware/dist/client/adp/utils.ts +200 -0
- package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.js +85 -0
- package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.ts +107 -0
- package/dist/preview-middleware/dist/client/cpe/changes/flex-change.js +66 -0
- package/dist/preview-middleware/dist/client/cpe/changes/flex-change.ts +66 -0
- package/dist/preview-middleware/dist/client/cpe/changes/generic-change.js +321 -0
- package/dist/preview-middleware/dist/client/cpe/changes/generic-change.ts +462 -0
- package/dist/preview-middleware/dist/client/cpe/changes/index.js +12 -0
- package/dist/preview-middleware/dist/client/cpe/changes/index.ts +1 -0
- package/dist/preview-middleware/dist/client/cpe/changes/service.js +527 -0
- package/dist/preview-middleware/dist/client/cpe/changes/service.ts +595 -0
- package/dist/preview-middleware/dist/client/cpe/changes/validator.js +41 -0
- package/dist/preview-middleware/dist/client/cpe/changes/validator.ts +35 -0
- package/dist/preview-middleware/dist/client/cpe/communication-service.js +44 -0
- package/dist/preview-middleware/dist/client/cpe/communication-service.ts +41 -0
- package/dist/preview-middleware/dist/client/cpe/connector-service.js +88 -0
- package/dist/preview-middleware/dist/client/cpe/connector-service.ts +74 -0
- package/dist/preview-middleware/dist/client/cpe/context-menu-service.js +90 -0
- package/dist/preview-middleware/dist/client/cpe/context-menu-service.ts +77 -0
- package/dist/preview-middleware/dist/client/cpe/control-data.js +366 -0
- package/dist/preview-middleware/dist/client/cpe/control-data.ts +400 -0
- package/dist/preview-middleware/dist/client/cpe/documentation.js +191 -0
- package/dist/preview-middleware/dist/client/cpe/documentation.ts +187 -0
- package/dist/preview-middleware/dist/client/cpe/feature-service.js +39 -0
- package/dist/preview-middleware/dist/client/cpe/feature-service.ts +25 -0
- package/dist/preview-middleware/dist/client/cpe/init.js +92 -0
- package/dist/preview-middleware/dist/client/cpe/init.ts +114 -0
- package/dist/preview-middleware/dist/client/cpe/logger.js +32 -0
- package/dist/preview-middleware/dist/client/cpe/logger.ts +24 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.js +126 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.ts +150 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.js +63 -0
- package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.ts +52 -0
- package/dist/preview-middleware/dist/client/cpe/outline/editable.js +38 -0
- package/dist/preview-middleware/dist/client/cpe/outline/editable.ts +30 -0
- package/dist/preview-middleware/dist/client/cpe/outline/nodes.js +212 -0
- package/dist/preview-middleware/dist/client/cpe/outline/nodes.ts +236 -0
- package/dist/preview-middleware/dist/client/cpe/outline/service.js +62 -0
- package/dist/preview-middleware/dist/client/cpe/outline/service.ts +66 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.js +161 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.ts +184 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.js +145 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.ts +157 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.js +94 -0
- package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.ts +113 -0
- package/dist/preview-middleware/dist/client/cpe/rta-service.js +94 -0
- package/dist/preview-middleware/dist/client/cpe/rta-service.ts +86 -0
- package/dist/preview-middleware/dist/client/cpe/selection.js +249 -0
- package/dist/preview-middleware/dist/client/cpe/selection.ts +267 -0
- package/dist/preview-middleware/dist/client/cpe/ui5-utils.js +35 -0
- package/dist/preview-middleware/dist/client/cpe/ui5-utils.ts +28 -0
- package/dist/preview-middleware/dist/client/cpe/utils.js +113 -0
- package/dist/preview-middleware/dist/client/cpe/utils.ts +162 -0
- package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.js +96 -0
- package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.ts +99 -0
- package/dist/preview-middleware/dist/client/flp/common.js +30 -0
- package/dist/preview-middleware/dist/client/flp/common.ts +28 -0
- package/dist/preview-middleware/dist/client/flp/enableFakeConnector.js +92 -0
- package/dist/preview-middleware/dist/client/flp/enableFakeConnector.ts +113 -0
- package/dist/preview-middleware/dist/client/flp/homepage/Component.js +16 -0
- package/dist/preview-middleware/dist/client/flp/homepage/Component.ts +10 -0
- package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.js +54 -0
- package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.ts +41 -0
- package/dist/preview-middleware/dist/client/flp/homepage/css/style.css +3 -0
- package/dist/preview-middleware/dist/client/flp/homepage/manifest.json +41 -0
- package/dist/preview-middleware/dist/client/flp/homepage/view/MyHome.view.xml +18 -0
- package/dist/preview-middleware/dist/client/flp/init.js +418 -0
- package/dist/preview-middleware/dist/client/flp/init.ts +448 -0
- package/dist/preview-middleware/dist/client/flp/initCdm.js +117 -0
- package/dist/preview-middleware/dist/client/flp/initCdm.ts +111 -0
- package/dist/preview-middleware/dist/client/flp/initConnectors.js +31 -0
- package/dist/preview-middleware/dist/client/flp/initConnectors.ts +20 -0
- package/dist/preview-middleware/dist/client/flp/initRta.js +180 -0
- package/dist/preview-middleware/dist/client/flp/initRta.ts +194 -0
- package/dist/preview-middleware/dist/client/i18n.js +56 -0
- package/dist/preview-middleware/dist/client/i18n.ts +49 -0
- package/dist/preview-middleware/dist/client/manifest.json +8 -0
- package/dist/preview-middleware/dist/client/messagebundle.properties +143 -0
- package/dist/preview-middleware/dist/client/thirdparty/@sap-ux-private/control-property-editor-common.js +486 -0
- package/dist/preview-middleware/dist/client/utils/additional-change-info.js +69 -0
- package/dist/preview-middleware/dist/client/utils/additional-change-info.ts +73 -0
- package/dist/preview-middleware/dist/client/utils/application.js +34 -0
- package/dist/preview-middleware/dist/client/utils/application.ts +27 -0
- package/dist/preview-middleware/dist/client/utils/core.js +144 -0
- package/dist/preview-middleware/dist/client/utils/core.ts +145 -0
- package/dist/preview-middleware/dist/client/utils/error.js +28 -0
- package/dist/preview-middleware/dist/client/utils/error.ts +18 -0
- package/dist/preview-middleware/dist/client/utils/fe-v2.js +58 -0
- package/dist/preview-middleware/dist/client/utils/fe-v2.ts +61 -0
- package/dist/preview-middleware/dist/client/utils/fe-v4.js +168 -0
- package/dist/preview-middleware/dist/client/utils/fe-v4.ts +186 -0
- package/dist/preview-middleware/dist/client/utils/info-center-message.js +60 -0
- package/dist/preview-middleware/dist/client/utils/info-center-message.ts +60 -0
- package/dist/preview-middleware/dist/client/utils/version.js +126 -0
- package/dist/preview-middleware/dist/client/utils/version.ts +138 -0
- package/dist/preview-middleware/templates/flp/cdm.base.json +47 -0
- package/dist/preview-middleware/templates/flp/cdm.ejs +72 -0
- package/dist/preview-middleware/templates/flp/editor.ejs +28 -0
- package/dist/preview-middleware/templates/flp/sandbox.ejs +88 -0
- package/dist/preview-middleware/templates/flp/sandbox2.ejs +86 -0
- package/dist/preview-middleware/templates/test/qunit.ejs +26 -0
- package/dist/preview-middleware/templates/test/qunit.js +29 -0
- package/dist/preview-middleware/templates/test/testsuite.qunit.ejs +10 -0
- package/dist/preview-middleware/templates/test/testsuite.qunit.js +8 -0
- package/dist/tasks/cf-deploy/index.js +1780 -1464
- package/dist/tasks/deploy/index.js +14857 -9062
- package/package.json +31 -34
- package/prebuilds/keyring.darwin-arm64.node +0 -0
- package/prebuilds/keyring.darwin-x64.node +0 -0
- package/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
- package/prebuilds/keyring.linux-arm64-gnu.node +0 -0
- package/prebuilds/keyring.linux-arm64-musl.node +0 -0
- package/prebuilds/keyring.linux-ia32-gnu.node +0 -0
- package/prebuilds/keyring.linux-x64-gnu.node +0 -0
- package/prebuilds/keyring.linux-x64-musl.node +0 -0
- package/prebuilds/keyring.win32-arm64-msvc.node +0 -0
- package/prebuilds/keyring.win32-ia32-msvc.node +0 -0
- package/prebuilds/keyring.win32-x64-msvc.node +0 -0
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import type UI5Element from 'sap/ui/core/Element';
|
|
2
|
+
import { NESTED_QUICK_ACTION_KIND } from '@sap-ux-private/control-property-editor-common';
|
|
3
|
+
import type IconTabBar from 'sap/m/IconTabBar';
|
|
4
|
+
import type IconTabFilter from 'sap/m/IconTabFilter';
|
|
5
|
+
import type Table from 'sap/m/Table';
|
|
6
|
+
import type MdcTable from 'sap/ui/mdc/Table';
|
|
7
|
+
import type SmartTable from 'sap/ui/comp/smarttable/SmartTable';
|
|
8
|
+
import type { QuickActionContext } from '../../cpe/quick-actions/quick-action-definition';
|
|
9
|
+
import OverlayUtil from 'sap/ui/dt/OverlayUtil';
|
|
10
|
+
import type { NestedQuickActionChild, NestedQuickAction } from '@sap-ux-private/control-property-editor-common';
|
|
11
|
+
import { getParentContainer, getRelevantControlFromActivePage } from '../../cpe/quick-actions/utils';
|
|
12
|
+
import { getControlById, isA, isManagedObject } from '../../utils/core';
|
|
13
|
+
import { getUi5Version, isLowerThanMinimalUi5Version } from '../../utils/version';
|
|
14
|
+
import type ObjectPageSection from 'sap/uxap/ObjectPageSection';
|
|
15
|
+
import type ObjectPageSubSection from 'sap/uxap/ObjectPageSubSection';
|
|
16
|
+
import type ObjectPageLayout from 'sap/uxap/ObjectPageLayout';
|
|
17
|
+
import type ManagedObject from 'sap/ui/base/ManagedObject';
|
|
18
|
+
import type { EnablementValidator } from './enablement-validator';
|
|
19
|
+
import { QuickActionDefinitionBase } from './quick-action-base';
|
|
20
|
+
import {
|
|
21
|
+
ANALYTICAL_TABLE_TYPE,
|
|
22
|
+
GRID_TABLE_TYPE,
|
|
23
|
+
M_TABLE_TYPE,
|
|
24
|
+
MDC_TABLE_TYPE,
|
|
25
|
+
SMART_TABLE_TYPE,
|
|
26
|
+
TREE_TABLE_TYPE
|
|
27
|
+
} from './control-types';
|
|
28
|
+
import { isVariantManagementEnabledOPPage } from './fe-v2/utils';
|
|
29
|
+
import { isMacroTable } from '../../utils/fe-v4';
|
|
30
|
+
|
|
31
|
+
const SMART_TABLE_ACTION_ID = 'CTX_COMP_VARIANT_CONTENT';
|
|
32
|
+
const M_TABLE_ACTION_ID = 'CTX_ADD_ELEMENTS_AS_CHILD';
|
|
33
|
+
const SETTINGS_ID = 'CTX_SETTINGS';
|
|
34
|
+
const REARRANGE_TOOLBAR_SETTINGS_ID = 'CTX_SETTINGS0';
|
|
35
|
+
const ICON_TAB_BAR_TYPE = 'sap.m.IconTabBar';
|
|
36
|
+
|
|
37
|
+
async function getActionId(table: UI5Element): Promise<string[]> {
|
|
38
|
+
const { major, minor } = await getUi5Version();
|
|
39
|
+
|
|
40
|
+
if (isA(SMART_TABLE_TYPE, table)) {
|
|
41
|
+
if (major === 1 && minor === 96) {
|
|
42
|
+
return [SETTINGS_ID];
|
|
43
|
+
} else {
|
|
44
|
+
return [SMART_TABLE_ACTION_ID];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return [M_TABLE_ACTION_ID, SETTINGS_ID];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function getRearrangeToolbarContentActionId(): Promise<string> {
|
|
52
|
+
const { major, minor } = await getUi5Version();
|
|
53
|
+
if (major === 1 && minor <= 127) {
|
|
54
|
+
return SETTINGS_ID;
|
|
55
|
+
}
|
|
56
|
+
return REARRANGE_TOOLBAR_SETTINGS_ID;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type TableQuickActionsOptions = {
|
|
60
|
+
includeServiceAction?: boolean;
|
|
61
|
+
areTableRowsRequired?: boolean;
|
|
62
|
+
validatePageVariantManagement?: boolean;
|
|
63
|
+
validateTableColumns?: boolean;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Base class for table quick actions.
|
|
68
|
+
*/
|
|
69
|
+
export abstract class TableQuickActionDefinitionBase extends QuickActionDefinitionBase<
|
|
70
|
+
typeof NESTED_QUICK_ACTION_KIND
|
|
71
|
+
> {
|
|
72
|
+
public isApplicable = false;
|
|
73
|
+
|
|
74
|
+
public children: NestedQuickActionChild[] = [];
|
|
75
|
+
public tableMap: Record<
|
|
76
|
+
string,
|
|
77
|
+
{
|
|
78
|
+
table: UI5Element;
|
|
79
|
+
tableUpdateEventAttachedOnce: boolean;
|
|
80
|
+
iconTabBarFilterKey?: string;
|
|
81
|
+
changeColumnActionId?: string;
|
|
82
|
+
changeToolbarContentAction?: { id: string; enabled: boolean };
|
|
83
|
+
sectionInfo?: {
|
|
84
|
+
section: ObjectPageSection;
|
|
85
|
+
subSection: ObjectPageSubSection;
|
|
86
|
+
layout?: ObjectPageLayout;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
> = {};
|
|
90
|
+
public iconTabBar: IconTabBar | undefined;
|
|
91
|
+
|
|
92
|
+
protected get textKey(): string {
|
|
93
|
+
return this.defaultTextKey;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
protected control: UI5Element | undefined;
|
|
97
|
+
|
|
98
|
+
constructor(
|
|
99
|
+
public readonly type: string,
|
|
100
|
+
protected readonly controlTypes: string[],
|
|
101
|
+
protected readonly defaultTextKey: string,
|
|
102
|
+
protected readonly context: QuickActionContext,
|
|
103
|
+
protected options: TableQuickActionsOptions = {},
|
|
104
|
+
protected readonly enablementValidators: EnablementValidator[] = []
|
|
105
|
+
) {
|
|
106
|
+
super(type, NESTED_QUICK_ACTION_KIND, defaultTextKey, context, enablementValidators);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Adds action id to the table map entry, if the service actions are needed.
|
|
111
|
+
*
|
|
112
|
+
* @param table - table element
|
|
113
|
+
* @param tableMapKey - map key
|
|
114
|
+
*/
|
|
115
|
+
protected async addSettingsActionId(table: UI5Element, tableMapKey: string): Promise<void> {
|
|
116
|
+
if (this.options.includeServiceAction) {
|
|
117
|
+
const actions = await this.context.actionService.get(table.getId());
|
|
118
|
+
const actionsIds = await getActionId(table);
|
|
119
|
+
const changeColumnActionId = actionsIds.find(
|
|
120
|
+
(actionId) => actions.findIndex((action) => action.id === actionId) > -1
|
|
121
|
+
);
|
|
122
|
+
this.tableMap[tableMapKey].changeColumnActionId = changeColumnActionId;
|
|
123
|
+
const changeToolbarContentActionId = await getRearrangeToolbarContentActionId();
|
|
124
|
+
const changeToolbarContentAction = actions.find((action) => action.id === changeToolbarContentActionId);
|
|
125
|
+
this.tableMap[tableMapKey].changeToolbarContentAction = changeToolbarContentAction
|
|
126
|
+
? {
|
|
127
|
+
id: changeToolbarContentAction.id,
|
|
128
|
+
enabled: changeToolbarContentAction.enabled
|
|
129
|
+
}
|
|
130
|
+
: undefined;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Builds a map of custom tab keys to their associated table building blocks.
|
|
136
|
+
*
|
|
137
|
+
* @param iconTabBarFilterMap - A map of icon tab bar filter keys to their labels.
|
|
138
|
+
* @returns A map where each key is a combination of contextPath and metaPath, and the value is the corresponding custom tab key.
|
|
139
|
+
*/
|
|
140
|
+
private getCustomViewTableBuildingBlocksMap(iconTabBarFilterMap: { [key: string]: string }): {
|
|
141
|
+
[key: string]: string;
|
|
142
|
+
} {
|
|
143
|
+
const customTabTableBuildingBlockMap: { [key: string]: string } = {};
|
|
144
|
+
|
|
145
|
+
const customTabs = Object.keys(iconTabBarFilterMap).filter((key) => /^fe::CustomTab::\d+$/.test(key));
|
|
146
|
+
for (const key of customTabs) {
|
|
147
|
+
const items = (this.iconTabBar?.getItems() ?? []) as unknown as ManagedObject[];
|
|
148
|
+
const filterItem = items.find(
|
|
149
|
+
(item) => isA<IconTabFilter>('sap.m.IconTabFilter', item) && item.getKey() === key
|
|
150
|
+
);
|
|
151
|
+
if (filterItem && isA<IconTabFilter>('sap.m.IconTabFilter', filterItem)) {
|
|
152
|
+
filterItem.getContent().forEach((content) => {
|
|
153
|
+
if (isMacroTable(content)) {
|
|
154
|
+
const { metaPath, contextPath } = content;
|
|
155
|
+
const path = metaPath.startsWith(contextPath) ? metaPath : `${contextPath}${metaPath}`;
|
|
156
|
+
customTabTableBuildingBlockMap[path] = key;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return customTabTableBuildingBlockMap;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Initializes action object instance
|
|
166
|
+
*/
|
|
167
|
+
async initialize(): Promise<void> {
|
|
168
|
+
// No action found in control design time for version < 1.96
|
|
169
|
+
const version = await getUi5Version();
|
|
170
|
+
if (isLowerThanMinimalUi5Version(version, { major: 1, minor: 96 })) {
|
|
171
|
+
this.isApplicable = false;
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const iconTabBarFilterMap = this.buildIconTabBarFilterMap();
|
|
175
|
+
const customViewTableBuildingBlockMap = this.getCustomViewTableBuildingBlocksMap(iconTabBarFilterMap);
|
|
176
|
+
for (const table of getRelevantControlFromActivePage(
|
|
177
|
+
this.context.controlIndex,
|
|
178
|
+
this.context.view,
|
|
179
|
+
this.controlTypes
|
|
180
|
+
)) {
|
|
181
|
+
const tabKey = Object.keys(iconTabBarFilterMap).find((key) => table.getId().endsWith(key));
|
|
182
|
+
const section = getParentContainer<ObjectPageSection>(table, 'sap.uxap.ObjectPageSection');
|
|
183
|
+
if (section) {
|
|
184
|
+
await this.collectChildrenInSection(section, table);
|
|
185
|
+
} else if (this.iconTabBar && tabKey) {
|
|
186
|
+
const label = `'${iconTabBarFilterMap[tabKey]}' table`;
|
|
187
|
+
const tableMapKey = this.children.length.toString();
|
|
188
|
+
const child = this.createChild(label, table, tableMapKey, customViewTableBuildingBlockMap);
|
|
189
|
+
this.children.push(child);
|
|
190
|
+
this.tableMap[tableMapKey] = {
|
|
191
|
+
table,
|
|
192
|
+
iconTabBarFilterKey: tabKey,
|
|
193
|
+
tableUpdateEventAttachedOnce: false
|
|
194
|
+
};
|
|
195
|
+
await this.addSettingsActionId(table, tableMapKey);
|
|
196
|
+
} else {
|
|
197
|
+
await this.processTable(table);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (this.children.length > 0) {
|
|
201
|
+
this.isApplicable = true;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Retrieves the internal table control from a UI5Element.
|
|
207
|
+
*
|
|
208
|
+
* @param table - The UI5Element instance to analyze.
|
|
209
|
+
* @returns The internal table otherwise undefined.
|
|
210
|
+
*/
|
|
211
|
+
protected getInternalTable(table: UI5Element): UI5Element | undefined {
|
|
212
|
+
try {
|
|
213
|
+
let tableInternal: ManagedObject | undefined;
|
|
214
|
+
|
|
215
|
+
if (isA<SmartTable>(SMART_TABLE_TYPE, table)) {
|
|
216
|
+
const itemsAggregation = table.getAggregation('items') as ManagedObject[];
|
|
217
|
+
tableInternal = itemsAggregation.find((item) =>
|
|
218
|
+
[M_TABLE_TYPE, TREE_TABLE_TYPE, ANALYTICAL_TABLE_TYPE, GRID_TABLE_TYPE].some((tType) =>
|
|
219
|
+
isA(tType, item)
|
|
220
|
+
)
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
return tableInternal as UI5Element | undefined;
|
|
224
|
+
} catch {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Determines table label for the given table element
|
|
231
|
+
*
|
|
232
|
+
* @param table - table element
|
|
233
|
+
* @returns table label if found or 'Unnamed table'
|
|
234
|
+
*/
|
|
235
|
+
private getTableLabel(table: UI5Element): string {
|
|
236
|
+
if (isA<SmartTable>(SMART_TABLE_TYPE, table) || isA<MdcTable>(MDC_TABLE_TYPE, table)) {
|
|
237
|
+
const header = table.getHeader();
|
|
238
|
+
if (header) {
|
|
239
|
+
return `'${header}' table`;
|
|
240
|
+
}
|
|
241
|
+
} else if (isA<Table>(M_TABLE_TYPE, table)) {
|
|
242
|
+
const title = table?.getHeaderToolbar()?.getTitleControl()?.getText();
|
|
243
|
+
if (title) {
|
|
244
|
+
return `'${title}' table`;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return 'Unnamed table';
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Builds a map kay/tab_name for ICON_TAB_BAR control of the active page, if such exists
|
|
253
|
+
*
|
|
254
|
+
* @returns built map
|
|
255
|
+
*/
|
|
256
|
+
protected buildIconTabBarFilterMap(): { [key: string]: string } {
|
|
257
|
+
const iconTabBarFilterMap: { [key: string]: string } = {};
|
|
258
|
+
|
|
259
|
+
// Assumption only a tab bar control per page.
|
|
260
|
+
const tabBar = getRelevantControlFromActivePage(this.context.controlIndex, this.context.view, [
|
|
261
|
+
ICON_TAB_BAR_TYPE
|
|
262
|
+
])[0];
|
|
263
|
+
if (tabBar) {
|
|
264
|
+
const control = getControlById(tabBar.getId());
|
|
265
|
+
if (isA<IconTabBar>(ICON_TAB_BAR_TYPE, control)) {
|
|
266
|
+
this.iconTabBar = control;
|
|
267
|
+
for (const item of control.getItems()) {
|
|
268
|
+
if (isManagedObject(item) && isA<IconTabFilter>('sap.m.IconTabFilter', item)) {
|
|
269
|
+
iconTabBarFilterMap[item.getKey()] = item.getText();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return iconTabBarFilterMap;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Collects subsection data in the table map for the given section and table
|
|
280
|
+
*
|
|
281
|
+
* @param section - object page section
|
|
282
|
+
* @param table - table element
|
|
283
|
+
*/
|
|
284
|
+
private async collectChildrenInSection(section: ObjectPageSection, table: UI5Element): Promise<void> {
|
|
285
|
+
const layout = getParentContainer<ObjectPageLayout>(table, 'sap.uxap.ObjectPageLayout');
|
|
286
|
+
const subSections = section.getSubSections();
|
|
287
|
+
const subSection = getParentContainer<ObjectPageSubSection>(table, 'sap.uxap.ObjectPageSubSection');
|
|
288
|
+
if (subSection) {
|
|
289
|
+
if (subSections?.length === 1) {
|
|
290
|
+
await this.processTable(table, { section, subSection: subSections[0], layout });
|
|
291
|
+
} else if (subSections.length > 1) {
|
|
292
|
+
const existingChildIdx = this.children.findIndex(
|
|
293
|
+
(val) => val.label === `'${section.getTitle()}' section`
|
|
294
|
+
);
|
|
295
|
+
let tableMapIndex;
|
|
296
|
+
const label = this.getTableLabel(table);
|
|
297
|
+
if (existingChildIdx < 0) {
|
|
298
|
+
tableMapIndex = `${this.children.length}/0`;
|
|
299
|
+
const child = this.createChild(label, table, tableMapIndex);
|
|
300
|
+
this.children.push({
|
|
301
|
+
path: this.children.length.toString(),
|
|
302
|
+
label: `'${section?.getTitle()}' section`,
|
|
303
|
+
enabled: true,
|
|
304
|
+
children: [child]
|
|
305
|
+
});
|
|
306
|
+
} else {
|
|
307
|
+
tableMapIndex = `${existingChildIdx}/${this.children[existingChildIdx].children.length}`;
|
|
308
|
+
const child = this.createChild(label, table, tableMapIndex);
|
|
309
|
+
this.children[existingChildIdx].children.push(child);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
this.tableMap[tableMapIndex] = {
|
|
313
|
+
table,
|
|
314
|
+
sectionInfo: { section, subSection, layout },
|
|
315
|
+
tableUpdateEventAttachedOnce: false
|
|
316
|
+
};
|
|
317
|
+
await this.addSettingsActionId(table, tableMapIndex);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Processes table element and pushes table data to the children array
|
|
324
|
+
*
|
|
325
|
+
* @param table - table element
|
|
326
|
+
* @param sectionInfo - section info object
|
|
327
|
+
* @param sectionInfo.section
|
|
328
|
+
* @param sectionInfo.subSection
|
|
329
|
+
* @param sectionInfo.layout
|
|
330
|
+
*/
|
|
331
|
+
private async processTable(
|
|
332
|
+
table: UI5Element,
|
|
333
|
+
sectionInfo?: { section: ObjectPageSection; subSection: ObjectPageSubSection; layout?: ObjectPageLayout }
|
|
334
|
+
): Promise<void> {
|
|
335
|
+
const tableMapKey = this.children.length.toString();
|
|
336
|
+
if (
|
|
337
|
+
[
|
|
338
|
+
SMART_TABLE_TYPE,
|
|
339
|
+
M_TABLE_TYPE,
|
|
340
|
+
MDC_TABLE_TYPE,
|
|
341
|
+
TREE_TABLE_TYPE,
|
|
342
|
+
GRID_TABLE_TYPE,
|
|
343
|
+
ANALYTICAL_TABLE_TYPE
|
|
344
|
+
].some((type) => isA(type, table))
|
|
345
|
+
) {
|
|
346
|
+
const label = this.getTableLabel(table);
|
|
347
|
+
const child = this.createChild(label, table, tableMapKey);
|
|
348
|
+
this.children.push(child);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
this.tableMap[tableMapKey] = {
|
|
352
|
+
table,
|
|
353
|
+
sectionInfo: sectionInfo,
|
|
354
|
+
tableUpdateEventAttachedOnce: false
|
|
355
|
+
};
|
|
356
|
+
await this.addSettingsActionId(table, tableMapKey);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Selects closest overlay for the given table element
|
|
361
|
+
*
|
|
362
|
+
* @param table - table element
|
|
363
|
+
*/
|
|
364
|
+
protected selectOverlay(table: UI5Element): void {
|
|
365
|
+
const controlOverlay = OverlayUtil.getClosestOverlayFor(table);
|
|
366
|
+
if (controlOverlay) {
|
|
367
|
+
controlOverlay.setSelected(true);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Prepares nested quick action object
|
|
373
|
+
*
|
|
374
|
+
* @returns action instance
|
|
375
|
+
*/
|
|
376
|
+
getActionObject(): NestedQuickAction {
|
|
377
|
+
return {
|
|
378
|
+
kind: NESTED_QUICK_ACTION_KIND,
|
|
379
|
+
id: this.id,
|
|
380
|
+
enabled: !this.isDisabled,
|
|
381
|
+
tooltip: this.tooltip,
|
|
382
|
+
title: this.context.resourceBundle.getText(this.textKey),
|
|
383
|
+
children: this.children
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
createChild(
|
|
388
|
+
label: string,
|
|
389
|
+
table: UI5Element,
|
|
390
|
+
path: string,
|
|
391
|
+
customViewTableBuildingBlockMap?: {
|
|
392
|
+
[key: string]: string;
|
|
393
|
+
}
|
|
394
|
+
): NestedQuickActionChild {
|
|
395
|
+
const child: NestedQuickActionChild = {
|
|
396
|
+
path,
|
|
397
|
+
label,
|
|
398
|
+
enabled: true,
|
|
399
|
+
children: []
|
|
400
|
+
};
|
|
401
|
+
const parent = table.getParent();
|
|
402
|
+
const macroTable = isMacroTable(parent) ? parent : undefined;
|
|
403
|
+
if (this.options.validateTableColumns && macroTable) {
|
|
404
|
+
const { metaPath, contextPath } = macroTable;
|
|
405
|
+
const finalPath = metaPath.startsWith(contextPath) ? metaPath : `${contextPath}${metaPath}`;
|
|
406
|
+
if (customViewTableBuildingBlockMap?.[finalPath]) {
|
|
407
|
+
child.enabled = false;
|
|
408
|
+
child.tooltip = this.context.resourceBundle.getText('CUSTOM_COLUMNS_NOT_SUPPORTED');
|
|
409
|
+
return child;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
if (this.options.validatePageVariantManagement) {
|
|
413
|
+
const variantEnabledV2 = isVariantManagementEnabledOPPage(this.context, table);
|
|
414
|
+
if (variantEnabledV2 === false) {
|
|
415
|
+
child.enabled = false;
|
|
416
|
+
child.tooltip = this.context.resourceBundle.getText(
|
|
417
|
+
'TABLE_ACTION_DISABLED_VARIANT_MANAGEMENT_NOT_AVAILABLE'
|
|
418
|
+
);
|
|
419
|
+
return child;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (!this.options.areTableRowsRequired) {
|
|
423
|
+
return child;
|
|
424
|
+
}
|
|
425
|
+
const innerTable = this.getInternalTable(table);
|
|
426
|
+
const tableRows = innerTable?.getAggregation('items') ?? [];
|
|
427
|
+
if (isA(M_TABLE_TYPE, innerTable) && Array.isArray(tableRows) && tableRows.length === 0) {
|
|
428
|
+
child.enabled = false;
|
|
429
|
+
child.tooltip = this.context.resourceBundle.getText('TABLE_ACTION_DISABLED_ROWS_NOT_AVAILABLE');
|
|
430
|
+
}
|
|
431
|
+
return child;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/base/Log", "sap/ui/core/Element", "open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "../utils/error", "../utils/info-center-message", "../utils/version"], function (Log, Element, ___sap_ux_private_control_property_editor_common, ___utils_error, ___utils_info_center_message, ___utils_version) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
function __ui5_require_async(path) {
|
|
7
|
+
return new Promise(function (resolve, reject) {
|
|
8
|
+
sap.ui.require([path], function (module) {
|
|
9
|
+
if (!(module && module.__esModule)) {
|
|
10
|
+
module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
|
|
11
|
+
default: module
|
|
12
|
+
} : module;
|
|
13
|
+
Object.defineProperty(module, "__esModule", {
|
|
14
|
+
value: true
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
resolve(module);
|
|
18
|
+
}, function (err) {
|
|
19
|
+
reject(err);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const MessageBarType = ___sap_ux_private_control_property_editor_common["MessageBarType"];
|
|
24
|
+
const getError = ___utils_error["getError"];
|
|
25
|
+
const sendInfoCenterMessage = ___utils_info_center_message["sendInfoCenterMessage"];
|
|
26
|
+
const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
|
|
27
|
+
const syncViews = new Set();
|
|
28
|
+
let warningShown = false;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get Ids for all sync views
|
|
32
|
+
*
|
|
33
|
+
* @param ui5VersionInfo UI5 Version Information
|
|
34
|
+
*
|
|
35
|
+
* @returns array of Ids for application sync views
|
|
36
|
+
*/
|
|
37
|
+
async function updateSyncViewsIds(ui5VersionInfo) {
|
|
38
|
+
try {
|
|
39
|
+
if (isLowerThanMinimalUi5Version(ui5VersionInfo, {
|
|
40
|
+
major: 1,
|
|
41
|
+
minor: 120,
|
|
42
|
+
patch: 2
|
|
43
|
+
})) {
|
|
44
|
+
const elements = Element.registry.filter(() => true);
|
|
45
|
+
elements.forEach(ui5Element => {
|
|
46
|
+
if (isSyncView(ui5Element)) {
|
|
47
|
+
syncViews.add(ui5Element.getId());
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
const ElementRegistry = (await __ui5_require_async('sap/ui/core/ElementRegistry')).default;
|
|
52
|
+
const elements = ElementRegistry.all();
|
|
53
|
+
Object.entries(elements).forEach(([key, ui5Element]) => {
|
|
54
|
+
if (isSyncView(ui5Element)) {
|
|
55
|
+
syncViews.add(key);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
} catch (error) {
|
|
60
|
+
Log.error('Could not get application sync views', getError(error));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Show warning message if there are sync views in the application and the warning has not been shown yet.
|
|
66
|
+
*/
|
|
67
|
+
async function showSyncViewsWarning() {
|
|
68
|
+
if (warningShown) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (!syncViews.size) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
warningShown = true;
|
|
75
|
+
await sendInfoCenterMessage({
|
|
76
|
+
title: {
|
|
77
|
+
key: 'ADP_SYNC_VIEWS_TITLE'
|
|
78
|
+
},
|
|
79
|
+
description: {
|
|
80
|
+
key: 'ADP_SYNC_VIEWS_MESSAGE'
|
|
81
|
+
},
|
|
82
|
+
type: MessageBarType.warning
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Check if element is sync view
|
|
88
|
+
*
|
|
89
|
+
* @param element Design time Element
|
|
90
|
+
* @returns boolean if element is sync view or not
|
|
91
|
+
*/
|
|
92
|
+
function isSyncView(element) {
|
|
93
|
+
return element?.getMetadata()?.getName()?.includes('XMLView') && element?.oAsyncState === undefined;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Retrieves the set of synchronious view IDs.
|
|
98
|
+
*
|
|
99
|
+
* @returns Cached set containing the IDs of all synchronious views.
|
|
100
|
+
*/
|
|
101
|
+
function getSyncViewIds() {
|
|
102
|
+
return syncViews;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Resets the cached synchronious views and warning state.
|
|
107
|
+
* Needed for testing purposes to ensure a clean state.
|
|
108
|
+
*/
|
|
109
|
+
function resetSyncViews() {
|
|
110
|
+
syncViews.clear();
|
|
111
|
+
warningShown = false;
|
|
112
|
+
}
|
|
113
|
+
var __exports = {
|
|
114
|
+
__esModule: true
|
|
115
|
+
};
|
|
116
|
+
__exports.updateSyncViewsIds = updateSyncViewsIds;
|
|
117
|
+
__exports.showSyncViewsWarning = showSyncViewsWarning;
|
|
118
|
+
__exports.isSyncView = isSyncView;
|
|
119
|
+
__exports.getSyncViewIds = getSyncViewIds;
|
|
120
|
+
__exports.resetSyncViews = resetSyncViews;
|
|
121
|
+
return __exports;
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=sync-views-utils.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import Log from 'sap/base/Log';
|
|
2
|
+
import Element from 'sap/ui/core/Element';
|
|
3
|
+
import type DTElement from 'sap/ui/dt/Element';
|
|
4
|
+
|
|
5
|
+
import { MessageBarType } from '@sap-ux-private/control-property-editor-common';
|
|
6
|
+
import { getError } from '../utils/error';
|
|
7
|
+
import { sendInfoCenterMessage } from '../utils/info-center-message';
|
|
8
|
+
import { isLowerThanMinimalUi5Version, Ui5VersionInfo } from '../utils/version';
|
|
9
|
+
|
|
10
|
+
const syncViews = new Set<string>();
|
|
11
|
+
let warningShown = false;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Get Ids for all sync views
|
|
15
|
+
*
|
|
16
|
+
* @param ui5VersionInfo UI5 Version Information
|
|
17
|
+
*
|
|
18
|
+
* @returns array of Ids for application sync views
|
|
19
|
+
*/
|
|
20
|
+
export async function updateSyncViewsIds(ui5VersionInfo: Ui5VersionInfo): Promise<void> {
|
|
21
|
+
try {
|
|
22
|
+
if (isLowerThanMinimalUi5Version(ui5VersionInfo, { major: 1, minor: 120, patch: 2 })) {
|
|
23
|
+
const elements = Element.registry.filter(() => true) as DTElement[];
|
|
24
|
+
elements.forEach((ui5Element) => {
|
|
25
|
+
if (isSyncView(ui5Element)) {
|
|
26
|
+
syncViews.add(ui5Element.getId());
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
} else {
|
|
30
|
+
const ElementRegistry = (await import('sap/ui/core/ElementRegistry')).default;
|
|
31
|
+
const elements = ElementRegistry.all() as Record<string, DTElement>;
|
|
32
|
+
Object.entries(elements).forEach(([key, ui5Element]) => {
|
|
33
|
+
if (isSyncView(ui5Element)) {
|
|
34
|
+
syncViews.add(key);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
} catch (error) {
|
|
39
|
+
Log.error('Could not get application sync views', getError(error));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Show warning message if there are sync views in the application and the warning has not been shown yet.
|
|
45
|
+
*/
|
|
46
|
+
export async function showSyncViewsWarning(): Promise<void> {
|
|
47
|
+
if (warningShown) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (!syncViews.size) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
warningShown = true;
|
|
56
|
+
|
|
57
|
+
await sendInfoCenterMessage({
|
|
58
|
+
title: { key: 'ADP_SYNC_VIEWS_TITLE' },
|
|
59
|
+
description: { key: 'ADP_SYNC_VIEWS_MESSAGE' },
|
|
60
|
+
type: MessageBarType.warning
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Check if element is sync view
|
|
66
|
+
*
|
|
67
|
+
* @param element Design time Element
|
|
68
|
+
* @returns boolean if element is sync view or not
|
|
69
|
+
*/
|
|
70
|
+
export function isSyncView(element: DTElement): boolean {
|
|
71
|
+
return element?.getMetadata()?.getName()?.includes('XMLView') && element?.oAsyncState === undefined;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves the set of synchronious view IDs.
|
|
76
|
+
*
|
|
77
|
+
* @returns Cached set containing the IDs of all synchronious views.
|
|
78
|
+
*/
|
|
79
|
+
export function getSyncViewIds(): Set<string> {
|
|
80
|
+
return syncViews;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Resets the cached synchronious views and warning state.
|
|
85
|
+
* Needed for testing purposes to ensure a clean state.
|
|
86
|
+
*/
|
|
87
|
+
export function resetSyncViews(): void {
|
|
88
|
+
syncViews.clear();
|
|
89
|
+
warningShown = false;
|
|
90
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<Dialog id="addActionFragmentsDialog"
|
|
2
|
+
xmlns="sap.m"
|
|
3
|
+
xmlns:core="sap.ui.core"
|
|
4
|
+
xmlns:f="sap.ui.layout.form"
|
|
5
|
+
title="{/title}"
|
|
6
|
+
contentWidth="500px"
|
|
7
|
+
class="sapUiRTABorder">
|
|
8
|
+
<content>
|
|
9
|
+
<f:SimpleForm id="addActionFragmentsDialog_Form"
|
|
10
|
+
editable="true"
|
|
11
|
+
layout="ResponsiveGridLayout"
|
|
12
|
+
labelSpanS="4"
|
|
13
|
+
singleContainerFullSize="false">
|
|
14
|
+
<f:content>
|
|
15
|
+
<Label text="{i18n>ADP_ADD_ACTION_DIALOG_ACTION_ID_LABEL}" required="true" />
|
|
16
|
+
<Input
|
|
17
|
+
value="{/actionId}"
|
|
18
|
+
liveChange="onActionIdInputChange">
|
|
19
|
+
</Input>
|
|
20
|
+
<Label text="{i18n>ADP_ADD_ACTION_DIALOG_BUTTON_TEXT_LABEL}" required="true" />
|
|
21
|
+
<Input
|
|
22
|
+
value="{/buttonText}"
|
|
23
|
+
liveChange="onButtonTextInputChange">
|
|
24
|
+
</Input>
|
|
25
|
+
<Label text="{i18n>ADP_ADD_ACTION_DIALOG_HANDLER_METHOD_LABEL}" />
|
|
26
|
+
<Input
|
|
27
|
+
value="{/handlerReference}"
|
|
28
|
+
visible="{/hasController}"
|
|
29
|
+
editable="false"><!--Subjected to change, when handler can be provided by user -->
|
|
30
|
+
</Input>
|
|
31
|
+
</f:content>
|
|
32
|
+
</f:SimpleForm>
|
|
33
|
+
</content>
|
|
34
|
+
<beginButton>
|
|
35
|
+
<Button
|
|
36
|
+
id="createDialogBtn"
|
|
37
|
+
text="Create"
|
|
38
|
+
press="onCreateBtnPress"
|
|
39
|
+
enabled="false"
|
|
40
|
+
type="Emphasized" />
|
|
41
|
+
</beginButton>
|
|
42
|
+
<endButton>
|
|
43
|
+
<Button
|
|
44
|
+
id="closeDialogBtn"
|
|
45
|
+
text="Cancel"
|
|
46
|
+
press="handleDialogClose"
|
|
47
|
+
type="Reject" />
|
|
48
|
+
</endButton>
|
|
49
|
+
</Dialog>
|