@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,418 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "sap/ui/core/IconPool", "sap/base/i18n/ResourceBundle", "../adp/api-handler", "../utils/error", "./initCdm", "./initConnectors", "../utils/version", "../utils/info-center-message"], function (Log, ___sap_ux_private_control_property_editor_common, IconPool, ResourceBundle, ___adp_api_handler, ___utils_error, __initCdm, __initConnectors, ___utils_version, ___utils_info_center_message) {
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
function _interopRequireDefault(obj) {
|
|
7
|
+
return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
|
|
8
|
+
}
|
|
9
|
+
function __ui5_require_async(path) {
|
|
10
|
+
return new Promise(function (resolve, reject) {
|
|
11
|
+
sap.ui.require([path], function (module) {
|
|
12
|
+
if (!(module && module.__esModule)) {
|
|
13
|
+
module = module === null || !(typeof module === "object" && path.endsWith("/library")) ? {
|
|
14
|
+
default: module
|
|
15
|
+
} : module;
|
|
16
|
+
Object.defineProperty(module, "__esModule", {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
resolve(module);
|
|
21
|
+
}, function (err) {
|
|
22
|
+
reject(err);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const MessageBarType = ___sap_ux_private_control_property_editor_common["MessageBarType"];
|
|
27
|
+
const SCENARIO = ___sap_ux_private_control_property_editor_common["SCENARIO"];
|
|
28
|
+
const getManifestAppdescr = ___adp_api_handler["getManifestAppdescr"];
|
|
29
|
+
const getError = ___utils_error["getError"];
|
|
30
|
+
const initCdm = _interopRequireDefault(__initCdm);
|
|
31
|
+
const initConnectors = _interopRequireDefault(__initConnectors);
|
|
32
|
+
const getUi5Version = ___utils_version["getUi5Version"];
|
|
33
|
+
const isLowerThanMinimalUi5Version = ___utils_version["isLowerThanMinimalUi5Version"];
|
|
34
|
+
const sendInfoCenterMessage = ___utils_info_center_message["sendInfoCenterMessage"];
|
|
35
|
+
/**
|
|
36
|
+
* SAPUI5 delivered namespaces from https://ui5.sap.com/#/api/sap
|
|
37
|
+
*/
|
|
38
|
+
const UI5_LIBS = ['sap.apf', 'sap.base', 'sap.chart', 'sap.collaboration', 'sap.f', 'sap.fe', 'sap.fileviewer', 'sap.gantt', 'sap.landvisz', 'sap.m', 'sap.ndc', 'sap.ovp', 'sap.rules', 'sap.suite', 'sap.tnt', 'sap.ui', 'sap.uiext', 'sap.ushell', 'sap.uxap', 'sap.viz', 'sap.webanalytics', 'sap.zen'];
|
|
39
|
+
/**
|
|
40
|
+
* Check whether a specific dependency is a custom library, and if yes, add it to the map.
|
|
41
|
+
*
|
|
42
|
+
* @param dependency dependency from the manifest
|
|
43
|
+
* @param customLibs map containing the required custom libraries
|
|
44
|
+
*/
|
|
45
|
+
function addKeys(dependency, customLibs) {
|
|
46
|
+
Object.keys(dependency).forEach(function (key) {
|
|
47
|
+
// ignore libs or Components that start with SAPUI5 delivered namespaces
|
|
48
|
+
if (!UI5_LIBS.some(function (substring) {
|
|
49
|
+
return key === substring || key.startsWith(substring + '.');
|
|
50
|
+
})) {
|
|
51
|
+
customLibs[key] = true;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check whether a specific ComponentUsage is a custom component, and if yes, add it to the map.
|
|
58
|
+
*
|
|
59
|
+
* @param compUsages ComponentUsage from the manifest
|
|
60
|
+
* @param customLibs map containing the required custom libraries
|
|
61
|
+
*/
|
|
62
|
+
function getComponentUsageNames(compUsages, customLibs) {
|
|
63
|
+
const compNames = Object.keys(compUsages).map(function (compUsageKey) {
|
|
64
|
+
return compUsages[compUsageKey].name;
|
|
65
|
+
});
|
|
66
|
+
compNames.forEach(function (key) {
|
|
67
|
+
// ignore libs or Components that start with SAPUI5 delivered namespaces
|
|
68
|
+
if (!UI5_LIBS.some(function (substring) {
|
|
69
|
+
return key === substring || key.startsWith(substring + '.');
|
|
70
|
+
})) {
|
|
71
|
+
customLibs[key] = true;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Fetch the manifest for all the given application urls and generate a string containing all required custom library ids.
|
|
78
|
+
*
|
|
79
|
+
* @param appUrls urls pointing to included applications
|
|
80
|
+
* @returns Promise of a comma separated list of all required libraries.
|
|
81
|
+
*/
|
|
82
|
+
async function getManifestLibs(appUrls) {
|
|
83
|
+
const result = {};
|
|
84
|
+
const promises = [];
|
|
85
|
+
for (const url of appUrls) {
|
|
86
|
+
promises.push(fetch(`${url}/manifest.json`).then(async resp => {
|
|
87
|
+
const manifest = await resp.json();
|
|
88
|
+
if (manifest) {
|
|
89
|
+
if (manifest['sap.ui5']?.dependencies) {
|
|
90
|
+
if (manifest['sap.ui5'].dependencies.libs) {
|
|
91
|
+
addKeys(manifest['sap.ui5'].dependencies.libs, result);
|
|
92
|
+
}
|
|
93
|
+
if (manifest['sap.ui5'].dependencies.components) {
|
|
94
|
+
addKeys(manifest['sap.ui5'].dependencies.components, result);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (manifest['sap.ui5']?.componentUsages) {
|
|
98
|
+
getComponentUsageNames(manifest['sap.ui5'].componentUsages, result);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
return Promise.all(promises).then(() => Object.keys(result).join(','));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Register the custom libraries and their url with the UI5 loader.
|
|
108
|
+
*
|
|
109
|
+
* @param dataFromAppIndex data returned from the app index service
|
|
110
|
+
*/
|
|
111
|
+
function registerModules(dataFromAppIndex) {
|
|
112
|
+
Object.keys(dataFromAppIndex).forEach(function (moduleDefinitionKey) {
|
|
113
|
+
const moduleDefinition = dataFromAppIndex[moduleDefinitionKey];
|
|
114
|
+
if (moduleDefinition?.dependencies) {
|
|
115
|
+
moduleDefinition.dependencies.forEach(function (dependency) {
|
|
116
|
+
if (dependency.url && dependency.url.length > 0 && dependency.type === 'UI5LIB') {
|
|
117
|
+
Log.info('Registering Library ' + dependency.componentId + ' from server ' + dependency.url);
|
|
118
|
+
const compId = dependency.componentId.replace(/\./g, '/');
|
|
119
|
+
const config = {
|
|
120
|
+
paths: {}
|
|
121
|
+
};
|
|
122
|
+
config.paths[compId] = dependency.url;
|
|
123
|
+
sap.ui.loader.config(config);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Fetch the app state from the given application urls, then reset the app state.
|
|
132
|
+
*
|
|
133
|
+
* @param container the UShell container
|
|
134
|
+
*/
|
|
135
|
+
async function resetAppState(container) {
|
|
136
|
+
const urlParams = new URLSearchParams(window.location.hash);
|
|
137
|
+
const appStateValue = urlParams.get('sap-iapp-state') ?? urlParams.get('/?sap-iapp-state');
|
|
138
|
+
if (appStateValue) {
|
|
139
|
+
const appStateService = await container.getServiceAsync('AppState');
|
|
140
|
+
appStateService.deleteAppState(appStateValue);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Fetch the manifest from the given application urls, then parse them for custom libs, and finally request their urls.
|
|
146
|
+
*
|
|
147
|
+
* @param appUrls application urls
|
|
148
|
+
* @param urlParams URLSearchParams object
|
|
149
|
+
* @returns returns a promise when the registration is completed.
|
|
150
|
+
*/
|
|
151
|
+
async function registerComponentDependencyPaths(appUrls, urlParams) {
|
|
152
|
+
const libs = await getManifestLibs(appUrls);
|
|
153
|
+
if (libs && libs.length > 0) {
|
|
154
|
+
let url = '/sap/bc/ui2/app_index/ui5_app_info?id=' + libs;
|
|
155
|
+
const sapClient = urlParams.get('sap-client');
|
|
156
|
+
if (sapClient?.length === 3) {
|
|
157
|
+
url = url + '&sap-client=' + sapClient;
|
|
158
|
+
}
|
|
159
|
+
const response = await fetch(url);
|
|
160
|
+
try {
|
|
161
|
+
registerModules(await response.json());
|
|
162
|
+
} catch (error) {
|
|
163
|
+
Log.error(`Registering of reuse libs failed. Error:${error}`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Register SAP fonts that are also registered in a productive Fiori launchpad.
|
|
170
|
+
*/
|
|
171
|
+
function registerSAPFonts() {
|
|
172
|
+
//Fiori Theme font family and URI
|
|
173
|
+
const fioriTheme = {
|
|
174
|
+
fontFamily: 'SAP-icons-TNT',
|
|
175
|
+
fontURI: sap.ui.require.toUrl('sap/tnt/themes/base/fonts/')
|
|
176
|
+
};
|
|
177
|
+
//Registering to the icon pool
|
|
178
|
+
IconPool.registerFont(fioriTheme);
|
|
179
|
+
//SAP Business Suite Theme font family and URI
|
|
180
|
+
const suiteTheme = {
|
|
181
|
+
fontFamily: 'BusinessSuiteInAppSymbols',
|
|
182
|
+
fontURI: sap.ui.require.toUrl('sap/ushell/themes/base/fonts/')
|
|
183
|
+
};
|
|
184
|
+
//Registering to the icon pool
|
|
185
|
+
IconPool.registerFont(suiteTheme);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Create Resource Bundle based on the scenario.
|
|
190
|
+
*
|
|
191
|
+
* @param scenario to be used for the resource bundle.
|
|
192
|
+
*/
|
|
193
|
+
async function loadI18nResourceBundle(scenario) {
|
|
194
|
+
if (scenario === SCENARIO.AdaptationProject) {
|
|
195
|
+
const manifest = await getManifestAppdescr();
|
|
196
|
+
const enhanceWith = manifest.content.filter(content => content.texts?.i18n).map(content => ({
|
|
197
|
+
bundleUrl: `../${content.texts.i18n}`
|
|
198
|
+
}));
|
|
199
|
+
return ResourceBundle.create({
|
|
200
|
+
url: '../i18n/i18n.properties',
|
|
201
|
+
enhanceWith
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
return ResourceBundle.create({
|
|
205
|
+
url: 'i18n/i18n.properties'
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Read the application title from the resource bundle and set it as document title.
|
|
211
|
+
*
|
|
212
|
+
* @param resourceBundle resource bundle to read the title from.
|
|
213
|
+
* @param i18nKey optional parameter to define the i18n key to be used for the title.
|
|
214
|
+
*/
|
|
215
|
+
function setI18nTitle(resourceBundle, i18nKey = 'appTitle') {
|
|
216
|
+
if (resourceBundle.hasText(i18nKey)) {
|
|
217
|
+
document.title = resourceBundle.getText(i18nKey) ?? document.title;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* This function dynamically adds a "Generate Card" action to the SAP Fiori Launchpad for the given component instance.
|
|
223
|
+
*
|
|
224
|
+
* @param componentInstance - The instance of the component for which the card generation action is being added.
|
|
225
|
+
* @param container - The SAP Fiori Launchpad container instance used to access services.
|
|
226
|
+
*/
|
|
227
|
+
function addCardGenerationUserAction(componentInstance, container) {
|
|
228
|
+
sap.ui.require(['sap/cards/ap/generator/CardGenerator'], async CardGenerator => {
|
|
229
|
+
const extensionService = await container.getServiceAsync('Extension');
|
|
230
|
+
const controlProperties = {
|
|
231
|
+
icon: 'sap-icon://add',
|
|
232
|
+
id: 'generate_card',
|
|
233
|
+
text: 'Generate Card',
|
|
234
|
+
tooltip: 'Generate Card',
|
|
235
|
+
press: () => {
|
|
236
|
+
CardGenerator.initializeAsync(componentInstance);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const parameters = {
|
|
240
|
+
controlType: 'sap.ushell.ui.launchpad.ActionItem'
|
|
241
|
+
};
|
|
242
|
+
const generateCardAction = await extensionService.createUserAction(controlProperties, parameters);
|
|
243
|
+
generateCardAction.showForCurrentApp();
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Apply additional configuration and initialize sandbox.
|
|
249
|
+
*
|
|
250
|
+
* @param params init parameters read from the script tag
|
|
251
|
+
* @param params.appUrls JSON containing a string array of application urls
|
|
252
|
+
* @param params.flex JSON containing the flex configuration
|
|
253
|
+
* @param params.customInit path to the custom init module to be called
|
|
254
|
+
* @param params.enhancedHomePage boolean indicating if enhanced homepage is enabled
|
|
255
|
+
* @returns promise
|
|
256
|
+
*/
|
|
257
|
+
async function init({
|
|
258
|
+
appUrls,
|
|
259
|
+
flex,
|
|
260
|
+
customInit,
|
|
261
|
+
enhancedHomePage,
|
|
262
|
+
enableCardGenerator
|
|
263
|
+
}) {
|
|
264
|
+
// Set CDM configuration before importing ushell container
|
|
265
|
+
// to ensure proper configuration pickup during bootstrap
|
|
266
|
+
if (enhancedHomePage) {
|
|
267
|
+
initCdm();
|
|
268
|
+
}
|
|
269
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
270
|
+
const container = sap?.ushell?.Container ?? (await __ui5_require_async('sap/ushell/Container')).default;
|
|
271
|
+
let scenario = '';
|
|
272
|
+
const ui5VersionInfo = await getUi5Version();
|
|
273
|
+
// Register RTA if configured
|
|
274
|
+
if (flex) {
|
|
275
|
+
const flexSettings = JSON.parse(flex);
|
|
276
|
+
scenario = flexSettings.scenario;
|
|
277
|
+
container.attachRendererCreatedEvent(async function () {
|
|
278
|
+
const lifecycleService = await container.getServiceAsync('AppLifeCycle');
|
|
279
|
+
lifecycleService.attachAppLoaded(event => {
|
|
280
|
+
const view = event.getParameter('componentInstance');
|
|
281
|
+
const pluginScript = flexSettings.pluginScript ?? '';
|
|
282
|
+
const libs = [];
|
|
283
|
+
if (isLowerThanMinimalUi5Version(ui5VersionInfo, {
|
|
284
|
+
major: 1,
|
|
285
|
+
minor: 72
|
|
286
|
+
})) {
|
|
287
|
+
libs.push('open/ux/preview/client/flp/initRta');
|
|
288
|
+
} else {
|
|
289
|
+
libs.push('sap/ui/rta/api/startAdaptation');
|
|
290
|
+
}
|
|
291
|
+
if (flexSettings.pluginScript) {
|
|
292
|
+
libs.push(pluginScript);
|
|
293
|
+
delete flexSettings.pluginScript;
|
|
294
|
+
}
|
|
295
|
+
const options = {
|
|
296
|
+
rootControl: view,
|
|
297
|
+
validateAppVersion: false,
|
|
298
|
+
flexSettings
|
|
299
|
+
};
|
|
300
|
+
sap.ui.require(libs, async function (startAdaptation, pluginScript) {
|
|
301
|
+
try {
|
|
302
|
+
await startAdaptation(options, pluginScript);
|
|
303
|
+
} catch (error) {
|
|
304
|
+
await sendInfoCenterMessage({
|
|
305
|
+
title: {
|
|
306
|
+
key: 'FLP_ADAPTATION_START_FAILED_TITLE'
|
|
307
|
+
},
|
|
308
|
+
description: getError(error).message,
|
|
309
|
+
type: MessageBarType.error
|
|
310
|
+
});
|
|
311
|
+
await handleHigherLayerChanges(error, ui5VersionInfo);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
if (enableCardGenerator && !isLowerThanMinimalUi5Version(ui5VersionInfo, {
|
|
318
|
+
major: 1,
|
|
319
|
+
minor: 121
|
|
320
|
+
})) {
|
|
321
|
+
container.attachRendererCreatedEvent(async function () {
|
|
322
|
+
const lifecycleService = await container.getServiceAsync('AppLifeCycle');
|
|
323
|
+
lifecycleService.attachAppLoaded(event => {
|
|
324
|
+
const componentInstance = event.getParameter('componentInstance');
|
|
325
|
+
addCardGenerationUserAction(componentInstance, container);
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
} else {
|
|
329
|
+
Log.warning('Card generator is not supported for the current UI5 version.');
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// reset app state if requested
|
|
333
|
+
if (urlParams.get('fiori-tools-iapp-state')?.toLocaleLowerCase() !== 'true') {
|
|
334
|
+
await resetAppState(container);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Load custom library paths if configured
|
|
338
|
+
if (appUrls) {
|
|
339
|
+
await registerComponentDependencyPaths(JSON.parse(appUrls) ?? [], urlParams);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// Load rta connector
|
|
343
|
+
await initConnectors();
|
|
344
|
+
|
|
345
|
+
// Load custom initialization module
|
|
346
|
+
if (customInit) {
|
|
347
|
+
sap.ui.require([customInit]);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// init
|
|
351
|
+
const resourceBundle = await loadI18nResourceBundle(scenario);
|
|
352
|
+
setI18nTitle(resourceBundle);
|
|
353
|
+
registerSAPFonts();
|
|
354
|
+
if (enhancedHomePage) {
|
|
355
|
+
await container.init('cdm');
|
|
356
|
+
}
|
|
357
|
+
const renderer = ui5VersionInfo.major < 2 && !ui5VersionInfo.label?.includes('legacy-free') ? await container.createRenderer(undefined, true) : await container.createRendererInternal(undefined, true);
|
|
358
|
+
renderer.placeAt('content');
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// eslint-disable-next-line @sap-ux/fiori-tools/sap-no-dom-access,@sap-ux/fiori-tools/sap-browser-api-warning
|
|
362
|
+
const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
|
|
363
|
+
if (bootstrapConfig) {
|
|
364
|
+
init({
|
|
365
|
+
appUrls: bootstrapConfig.dataset.openUxPreviewLibsManifests,
|
|
366
|
+
flex: bootstrapConfig.dataset.openUxPreviewFlexSettings,
|
|
367
|
+
customInit: bootstrapConfig.dataset.openUxPreviewCustomInit,
|
|
368
|
+
enhancedHomePage: !!bootstrapConfig.dataset.openUxPreviewEnhancedHomepage,
|
|
369
|
+
enableCardGenerator: !!bootstrapConfig.dataset.openUxPreviewEnableCardGenerator
|
|
370
|
+
}).catch(e => {
|
|
371
|
+
const error = getError(e);
|
|
372
|
+
Log.error('Sandbox initialization failed: ' + error.message);
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Handle higher layer changes when starting UI Adaptation.
|
|
378
|
+
* When RTA detects higher layer changes an error with Reload triggered text is thrown, the RTA instance is destroyed and the application is reloaded.
|
|
379
|
+
* For UI5 version lower than 1.84.0 RTA is showing a popup with notification text about the detection of higher layer changes.
|
|
380
|
+
*
|
|
381
|
+
* @param error the error thrown when there are higher layer changes when starting UI Adaptation.
|
|
382
|
+
* @param ui5VersionInfo ui5 version info
|
|
383
|
+
*/
|
|
384
|
+
async function handleHigherLayerChanges(error, ui5VersionInfo) {
|
|
385
|
+
const err = getError(error);
|
|
386
|
+
if (err.message.includes('Reload triggered')) {
|
|
387
|
+
if (!isLowerThanMinimalUi5Version(ui5VersionInfo, {
|
|
388
|
+
major: 1,
|
|
389
|
+
minor: 84
|
|
390
|
+
})) {
|
|
391
|
+
await sendInfoCenterMessage({
|
|
392
|
+
title: {
|
|
393
|
+
key: 'HIGHER_LAYER_CHANGES_TITLE'
|
|
394
|
+
},
|
|
395
|
+
description: {
|
|
396
|
+
key: 'HIGHER_LAYER_CHANGES_INFO_MESSAGE'
|
|
397
|
+
},
|
|
398
|
+
type: MessageBarType.warning
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// eslint-disable-next-line @sap-ux/fiori-tools/sap-no-location-reload
|
|
403
|
+
window.location.reload();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
var __exports = {
|
|
407
|
+
__esModule: true
|
|
408
|
+
};
|
|
409
|
+
__exports.resetAppState = resetAppState;
|
|
410
|
+
__exports.registerComponentDependencyPaths = registerComponentDependencyPaths;
|
|
411
|
+
__exports.registerSAPFonts = registerSAPFonts;
|
|
412
|
+
__exports.loadI18nResourceBundle = loadI18nResourceBundle;
|
|
413
|
+
__exports.setI18nTitle = setI18nTitle;
|
|
414
|
+
__exports.init = init;
|
|
415
|
+
__exports.handleHigherLayerChanges = handleHigherLayerChanges;
|
|
416
|
+
return __exports;
|
|
417
|
+
});
|
|
418
|
+
//# sourceMappingURL=init.js.map
|