@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.
Files changed (289) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/adp-tooling/templates/cf/_gitignore +6 -0
  3. package/dist/adp-tooling/templates/cf/approuter/package.json +13 -0
  4. package/dist/adp-tooling/templates/cf/approuter/xs-app.json +15 -0
  5. package/dist/adp-tooling/templates/cf/i18n/i18n.properties +3 -0
  6. package/dist/adp-tooling/templates/cf/package.json +35 -0
  7. package/dist/adp-tooling/templates/cf/ui5.yaml +5 -0
  8. package/dist/adp-tooling/templates/cf/xs-security.json +7 -0
  9. package/dist/adp-tooling/templates/changes/annotation.xml +18 -0
  10. package/dist/adp-tooling/templates/project/gitignore.tmpl +5 -0
  11. package/dist/adp-tooling/templates/project/package.json +31 -0
  12. package/dist/adp-tooling/templates/project/ui5.yaml +6 -0
  13. package/dist/adp-tooling/templates/project/webapp/i18n/i18n.properties +6 -0
  14. package/dist/adp-tooling/templates/project/webapp/manifest.appdescr_variant +10 -0
  15. package/dist/adp-tooling/templates/rta/common/analytical-custom-column.xml +25 -0
  16. package/dist/adp-tooling/templates/rta/common/custom-action.xml +8 -0
  17. package/dist/adp-tooling/templates/rta/common/grid-tree-custom-column.xml +22 -0
  18. package/dist/adp-tooling/templates/rta/common/header-field.xml +13 -0
  19. package/dist/adp-tooling/templates/rta/common/op-custom-section.xml +20 -0
  20. package/dist/adp-tooling/templates/rta/common/v4-table-action.xml +8 -0
  21. package/dist/adp-tooling/templates/rta/controller.ejs +80 -0
  22. package/dist/adp-tooling/templates/rta/fragment.xml +7 -0
  23. package/dist/adp-tooling/templates/rta/ts-controller.ejs +18 -0
  24. package/dist/adp-tooling/templates/rta/v2/m-table-custom-column-cell.xml +7 -0
  25. package/dist/adp-tooling/templates/rta/v2/m-table-custom-column.xml +18 -0
  26. package/dist/adp-tooling/templates/rta/v4/custom-section.xml +12 -0
  27. package/dist/adp-tooling/templates/rta/v4/mdc-custom-column-config.xml +6 -0
  28. package/dist/adp-tooling/templates/rta/v4/mdc-custom-column.xml +11 -0
  29. package/dist/adp-tooling/templates/typescript/tsconfig.json +19 -0
  30. package/dist/cli/index.js +17761 -11603
  31. package/dist/control-property-editor/app.css +2 -0
  32. package/dist/control-property-editor/app.js +175 -0
  33. package/dist/livereload-js/livereload.js +3795 -0
  34. package/dist/middlewares/fiori-tools-appreload.js +44007 -41669
  35. package/dist/middlewares/fiori-tools-preview.js +66889 -4176
  36. package/dist/middlewares/fiori-tools-proxy.js +38049 -5767
  37. package/dist/middlewares/fiori-tools-servestatic.js +32893 -347
  38. package/dist/preview-middleware/dist/client/adp/add-fragment.js +48 -0
  39. package/dist/preview-middleware/dist/client/adp/add-fragment.ts +51 -0
  40. package/dist/preview-middleware/dist/client/adp/api-handler.js +165 -0
  41. package/dist/preview-middleware/dist/client/adp/api-handler.ts +191 -0
  42. package/dist/preview-middleware/dist/client/adp/command-executor.js +100 -0
  43. package/dist/preview-middleware/dist/client/adp/command-executor.ts +105 -0
  44. package/dist/preview-middleware/dist/client/adp/control-utils.js +46 -0
  45. package/dist/preview-middleware/dist/client/adp/control-utils.ts +48 -0
  46. package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.js +198 -0
  47. package/dist/preview-middleware/dist/client/adp/controllers/AddActionFragment.controller.ts +232 -0
  48. package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.js +223 -0
  49. package/dist/preview-middleware/dist/client/adp/controllers/AddCustomFragment.controller.ts +257 -0
  50. package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.js +195 -0
  51. package/dist/preview-middleware/dist/client/adp/controllers/AddFragment.controller.ts +264 -0
  52. package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.js +146 -0
  53. package/dist/preview-middleware/dist/client/adp/controllers/AddSubpage.controller.ts +209 -0
  54. package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.js +232 -0
  55. package/dist/preview-middleware/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +306 -0
  56. package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.js +187 -0
  57. package/dist/preview-middleware/dist/client/adp/controllers/BaseDialog.controller.ts +254 -0
  58. package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.js +330 -0
  59. package/dist/preview-middleware/dist/client/adp/controllers/ControllerExtension.controller.ts +408 -0
  60. package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.js +160 -0
  61. package/dist/preview-middleware/dist/client/adp/controllers/ExtensionPoint.controller.ts +195 -0
  62. package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.js +68 -0
  63. package/dist/preview-middleware/dist/client/adp/controllers/FileExistsDialog.controller.ts +86 -0
  64. package/dist/preview-middleware/dist/client/adp/controllers/types.js +2 -0
  65. package/dist/preview-middleware/dist/client/adp/controllers/types.ts +10 -0
  66. package/dist/preview-middleware/dist/client/adp/dialog-factory.js +151 -0
  67. package/dist/preview-middleware/dist/client/adp/dialog-factory.ts +210 -0
  68. package/dist/preview-middleware/dist/client/adp/extend-controller.js +48 -0
  69. package/dist/preview-middleware/dist/client/adp/extend-controller.ts +49 -0
  70. package/dist/preview-middleware/dist/client/adp/extension-point.js +83 -0
  71. package/dist/preview-middleware/dist/client/adp/extension-point.ts +116 -0
  72. package/dist/preview-middleware/dist/client/adp/init-dialogs.js +142 -0
  73. package/dist/preview-middleware/dist/client/adp/init-dialogs.ts +178 -0
  74. package/dist/preview-middleware/dist/client/adp/init.js +111 -0
  75. package/dist/preview-middleware/dist/client/adp/init.ts +92 -0
  76. package/dist/preview-middleware/dist/client/adp/ovp-window-functions.js +130 -0
  77. package/dist/preview-middleware/dist/client/adp/ovp-window-functions.ts +171 -0
  78. package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +97 -0
  79. package/dist/preview-middleware/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.ts +140 -0
  80. package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.js +74 -0
  81. package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-controller-to-page.ts +92 -0
  82. package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.js +171 -0
  83. package/dist/preview-middleware/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +174 -0
  84. package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.js +56 -0
  85. package/dist/preview-middleware/dist/client/adp/quick-actions/common/create-page-action.ts +56 -0
  86. package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.js +41 -0
  87. package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-custom-section.ts +51 -0
  88. package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.js +69 -0
  89. package/dist/preview-middleware/dist/client/adp/quick-actions/common/op-add-header-field.ts +81 -0
  90. package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.js +20 -0
  91. package/dist/preview-middleware/dist/client/adp/quick-actions/common/utils.ts +7 -0
  92. package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.js +25 -0
  93. package/dist/preview-middleware/dist/client/adp/quick-actions/control-types.ts +7 -0
  94. package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.js +26 -0
  95. package/dist/preview-middleware/dist/client/adp/quick-actions/dialog-enablement-validator.ts +18 -0
  96. package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.js +2 -0
  97. package/dist/preview-middleware/dist/client/adp/quick-actions/enablement-validator.ts +19 -0
  98. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +82 -0
  99. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/add-new-subpage.ts +87 -0
  100. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +69 -0
  101. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-actions.ts +71 -0
  102. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +103 -0
  103. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +105 -0
  104. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.js +111 -0
  105. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +110 -0
  106. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +108 -0
  107. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +141 -0
  108. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +80 -0
  109. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +93 -0
  110. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +79 -0
  111. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +102 -0
  112. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +71 -0
  113. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.ts +98 -0
  114. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +61 -0
  115. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +77 -0
  116. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +95 -0
  117. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +102 -0
  118. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +86 -0
  119. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts +116 -0
  120. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.js +79 -0
  121. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/registry.ts +121 -0
  122. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.js +138 -0
  123. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v2/utils.ts +134 -0
  124. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +140 -0
  125. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/add-new-subpage.ts +181 -0
  126. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +81 -0
  127. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-actions.ts +81 -0
  128. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +90 -0
  129. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +97 -0
  130. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.js +81 -0
  131. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-page-action.ts +98 -0
  132. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.js +129 -0
  133. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.ts +149 -0
  134. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.js +142 -0
  135. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.ts +178 -0
  136. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +83 -0
  137. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts +96 -0
  138. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +58 -0
  139. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +70 -0
  140. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +86 -0
  141. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +96 -0
  142. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +55 -0
  143. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.ts +61 -0
  144. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.js +73 -0
  145. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.ts +91 -0
  146. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +91 -0
  147. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +88 -0
  148. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.js +62 -0
  149. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/registry.ts +86 -0
  150. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.js +158 -0
  151. package/dist/preview-middleware/dist/client/adp/quick-actions/fe-v4/utils.ts +175 -0
  152. package/dist/preview-middleware/dist/client/adp/quick-actions/load.js +46 -0
  153. package/dist/preview-middleware/dist/client/adp/quick-actions/load.ts +23 -0
  154. package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.js +64 -0
  155. package/dist/preview-middleware/dist/client/adp/quick-actions/quick-action-base.ts +71 -0
  156. package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.js +44 -0
  157. package/dist/preview-middleware/dist/client/adp/quick-actions/simple-quick-action-base.ts +51 -0
  158. package/dist/preview-middleware/dist/client/adp/quick-actions/supported-ui5versions.md +40 -0
  159. package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.js +372 -0
  160. package/dist/preview-middleware/dist/client/adp/quick-actions/table-quick-action-base.ts +433 -0
  161. package/dist/preview-middleware/dist/client/adp/sync-views-utils.js +123 -0
  162. package/dist/preview-middleware/dist/client/adp/sync-views-utils.ts +90 -0
  163. package/dist/preview-middleware/dist/client/adp/ui/AddAction.fragment.xml +49 -0
  164. package/dist/preview-middleware/dist/client/adp/ui/AddCustomFragment.fragment.xml +48 -0
  165. package/dist/preview-middleware/dist/client/adp/ui/AddFragment.fragment.xml +83 -0
  166. package/dist/preview-middleware/dist/client/adp/ui/AddSubpage.fragment.xml +73 -0
  167. package/dist/preview-middleware/dist/client/adp/ui/AddTableColumnFragments.fragment.xml +63 -0
  168. package/dist/preview-middleware/dist/client/adp/ui/ControllerExtension.fragment.xml +63 -0
  169. package/dist/preview-middleware/dist/client/adp/ui/ExtensionPoint.fragment.xml +61 -0
  170. package/dist/preview-middleware/dist/client/adp/ui/FileExistsDialog.fragment.xml +43 -0
  171. package/dist/preview-middleware/dist/client/adp/utils.js +199 -0
  172. package/dist/preview-middleware/dist/client/adp/utils.ts +200 -0
  173. package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.js +85 -0
  174. package/dist/preview-middleware/dist/client/cpe/additional-change-info/add-xml-additional-info.ts +107 -0
  175. package/dist/preview-middleware/dist/client/cpe/changes/flex-change.js +66 -0
  176. package/dist/preview-middleware/dist/client/cpe/changes/flex-change.ts +66 -0
  177. package/dist/preview-middleware/dist/client/cpe/changes/generic-change.js +321 -0
  178. package/dist/preview-middleware/dist/client/cpe/changes/generic-change.ts +462 -0
  179. package/dist/preview-middleware/dist/client/cpe/changes/index.js +12 -0
  180. package/dist/preview-middleware/dist/client/cpe/changes/index.ts +1 -0
  181. package/dist/preview-middleware/dist/client/cpe/changes/service.js +527 -0
  182. package/dist/preview-middleware/dist/client/cpe/changes/service.ts +595 -0
  183. package/dist/preview-middleware/dist/client/cpe/changes/validator.js +41 -0
  184. package/dist/preview-middleware/dist/client/cpe/changes/validator.ts +35 -0
  185. package/dist/preview-middleware/dist/client/cpe/communication-service.js +44 -0
  186. package/dist/preview-middleware/dist/client/cpe/communication-service.ts +41 -0
  187. package/dist/preview-middleware/dist/client/cpe/connector-service.js +88 -0
  188. package/dist/preview-middleware/dist/client/cpe/connector-service.ts +74 -0
  189. package/dist/preview-middleware/dist/client/cpe/context-menu-service.js +90 -0
  190. package/dist/preview-middleware/dist/client/cpe/context-menu-service.ts +77 -0
  191. package/dist/preview-middleware/dist/client/cpe/control-data.js +366 -0
  192. package/dist/preview-middleware/dist/client/cpe/control-data.ts +400 -0
  193. package/dist/preview-middleware/dist/client/cpe/documentation.js +191 -0
  194. package/dist/preview-middleware/dist/client/cpe/documentation.ts +187 -0
  195. package/dist/preview-middleware/dist/client/cpe/feature-service.js +39 -0
  196. package/dist/preview-middleware/dist/client/cpe/feature-service.ts +25 -0
  197. package/dist/preview-middleware/dist/client/cpe/init.js +92 -0
  198. package/dist/preview-middleware/dist/client/cpe/init.ts +114 -0
  199. package/dist/preview-middleware/dist/client/cpe/logger.js +32 -0
  200. package/dist/preview-middleware/dist/client/cpe/logger.ts +24 -0
  201. package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.js +136 -0
  202. package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-checker.ts +160 -0
  203. package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.js +63 -0
  204. package/dist/preview-middleware/dist/client/cpe/odata-health/odata-health-status.ts +52 -0
  205. package/dist/preview-middleware/dist/client/cpe/outline/editable.js +38 -0
  206. package/dist/preview-middleware/dist/client/cpe/outline/editable.ts +30 -0
  207. package/dist/preview-middleware/dist/client/cpe/outline/nodes.js +212 -0
  208. package/dist/preview-middleware/dist/client/cpe/outline/nodes.ts +236 -0
  209. package/dist/preview-middleware/dist/client/cpe/outline/service.js +62 -0
  210. package/dist/preview-middleware/dist/client/cpe/outline/service.ts +66 -0
  211. package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.js +161 -0
  212. package/dist/preview-middleware/dist/client/cpe/quick-actions/quick-action-service.ts +184 -0
  213. package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.js +145 -0
  214. package/dist/preview-middleware/dist/client/cpe/quick-actions/registry.ts +157 -0
  215. package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.js +94 -0
  216. package/dist/preview-middleware/dist/client/cpe/quick-actions/utils.ts +113 -0
  217. package/dist/preview-middleware/dist/client/cpe/rta-service.js +94 -0
  218. package/dist/preview-middleware/dist/client/cpe/rta-service.ts +86 -0
  219. package/dist/preview-middleware/dist/client/cpe/selection.js +249 -0
  220. package/dist/preview-middleware/dist/client/cpe/selection.ts +267 -0
  221. package/dist/preview-middleware/dist/client/cpe/ui5-utils.js +35 -0
  222. package/dist/preview-middleware/dist/client/cpe/ui5-utils.ts +28 -0
  223. package/dist/preview-middleware/dist/client/cpe/utils.js +113 -0
  224. package/dist/preview-middleware/dist/client/cpe/utils.ts +162 -0
  225. package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.js +97 -0
  226. package/dist/preview-middleware/dist/client/flp/WorkspaceConnector.ts +101 -0
  227. package/dist/preview-middleware/dist/client/flp/common.js +30 -0
  228. package/dist/preview-middleware/dist/client/flp/common.ts +28 -0
  229. package/dist/preview-middleware/dist/client/flp/enableFakeConnector.js +92 -0
  230. package/dist/preview-middleware/dist/client/flp/enableFakeConnector.ts +113 -0
  231. package/dist/preview-middleware/dist/client/flp/homepage/Component.js +16 -0
  232. package/dist/preview-middleware/dist/client/flp/homepage/Component.ts +10 -0
  233. package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.js +54 -0
  234. package/dist/preview-middleware/dist/client/flp/homepage/controller/MyHome.controller.ts +41 -0
  235. package/dist/preview-middleware/dist/client/flp/homepage/css/style.css +3 -0
  236. package/dist/preview-middleware/dist/client/flp/homepage/manifest.json +41 -0
  237. package/dist/preview-middleware/dist/client/flp/homepage/view/MyHome.view.xml +18 -0
  238. package/dist/preview-middleware/dist/client/flp/init.js +418 -0
  239. package/dist/preview-middleware/dist/client/flp/init.ts +448 -0
  240. package/dist/preview-middleware/dist/client/flp/initCdm.js +117 -0
  241. package/dist/preview-middleware/dist/client/flp/initCdm.ts +111 -0
  242. package/dist/preview-middleware/dist/client/flp/initConnectors.js +31 -0
  243. package/dist/preview-middleware/dist/client/flp/initConnectors.ts +20 -0
  244. package/dist/preview-middleware/dist/client/flp/initRta.js +180 -0
  245. package/dist/preview-middleware/dist/client/flp/initRta.ts +194 -0
  246. package/dist/preview-middleware/dist/client/i18n.js +56 -0
  247. package/dist/preview-middleware/dist/client/i18n.ts +49 -0
  248. package/dist/preview-middleware/dist/client/manifest.json +8 -0
  249. package/dist/preview-middleware/dist/client/messagebundle.properties +143 -0
  250. package/dist/preview-middleware/dist/client/thirdparty/@sap-ux-private/control-property-editor-common.js +486 -0
  251. package/dist/preview-middleware/dist/client/utils/additional-change-info.js +69 -0
  252. package/dist/preview-middleware/dist/client/utils/additional-change-info.ts +73 -0
  253. package/dist/preview-middleware/dist/client/utils/application.js +34 -0
  254. package/dist/preview-middleware/dist/client/utils/application.ts +27 -0
  255. package/dist/preview-middleware/dist/client/utils/core.js +144 -0
  256. package/dist/preview-middleware/dist/client/utils/core.ts +145 -0
  257. package/dist/preview-middleware/dist/client/utils/error.js +28 -0
  258. package/dist/preview-middleware/dist/client/utils/error.ts +18 -0
  259. package/dist/preview-middleware/dist/client/utils/fe-v2.js +58 -0
  260. package/dist/preview-middleware/dist/client/utils/fe-v2.ts +61 -0
  261. package/dist/preview-middleware/dist/client/utils/fe-v4.js +168 -0
  262. package/dist/preview-middleware/dist/client/utils/fe-v4.ts +186 -0
  263. package/dist/preview-middleware/dist/client/utils/info-center-message.js +60 -0
  264. package/dist/preview-middleware/dist/client/utils/info-center-message.ts +60 -0
  265. package/dist/preview-middleware/dist/client/utils/version.js +126 -0
  266. package/dist/preview-middleware/dist/client/utils/version.ts +138 -0
  267. package/dist/preview-middleware/templates/flp/cdm.base.json +47 -0
  268. package/dist/preview-middleware/templates/flp/cdm.ejs +72 -0
  269. package/dist/preview-middleware/templates/flp/editor.ejs +28 -0
  270. package/dist/preview-middleware/templates/flp/sandbox.ejs +88 -0
  271. package/dist/preview-middleware/templates/flp/sandbox2.ejs +86 -0
  272. package/dist/preview-middleware/templates/test/qunit.ejs +26 -0
  273. package/dist/preview-middleware/templates/test/qunit.js +29 -0
  274. package/dist/preview-middleware/templates/test/testsuite.qunit.ejs +10 -0
  275. package/dist/preview-middleware/templates/test/testsuite.qunit.js +8 -0
  276. package/dist/tasks/cf-deploy/index.js +3916 -3521
  277. package/dist/tasks/deploy/index.js +17204 -11133
  278. package/package.json +36 -39
  279. package/prebuilds/keyring.darwin-arm64.node +0 -0
  280. package/prebuilds/keyring.darwin-x64.node +0 -0
  281. package/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
  282. package/prebuilds/keyring.linux-arm64-gnu.node +0 -0
  283. package/prebuilds/keyring.linux-arm64-musl.node +0 -0
  284. package/prebuilds/keyring.linux-ia32-gnu.node +0 -0
  285. package/prebuilds/keyring.linux-x64-gnu.node +0 -0
  286. package/prebuilds/keyring.linux-x64-musl.node +0 -0
  287. package/prebuilds/keyring.win32-arm64-msvc.node +0 -0
  288. package/prebuilds/keyring.win32-ia32-msvc.node +0 -0
  289. package/prebuilds/keyring.win32-x64-msvc.node +0 -0
@@ -0,0 +1,448 @@
1
+ import Log from 'sap/base/Log';
2
+ import type AppLifeCycle from 'sap/ushell/services/AppLifeCycle';
3
+ import type { InitRtaScript, RTAPlugin, StartAdaptation } from 'sap/ui/rta/api/startAdaptation';
4
+ import { MessageBarType, SCENARIO, type Scenario } from '@sap-ux-private/control-property-editor-common';
5
+ import type { FlexSettings, RTAOptions } from 'sap/ui/rta/RuntimeAuthoring';
6
+ import IconPool from 'sap/ui/core/IconPool';
7
+ import ResourceBundle from 'sap/base/i18n/ResourceBundle';
8
+ import type AppState from 'sap/ushell/services/AppState';
9
+ import { getManifestAppdescr } from '../adp/api-handler';
10
+ import { getError } from '../utils/error';
11
+ import initCdm from './initCdm';
12
+ import initConnectors from './initConnectors';
13
+ import { getUi5Version, isLowerThanMinimalUi5Version, Ui5VersionInfo } from '../utils/version';
14
+ import type Component from 'sap/ui/core/Component';
15
+ import type Extension from 'sap/ushell/services/Extension';
16
+ import type { CardGeneratorType } from 'sap/cards/ap/generator';
17
+ import { sendInfoCenterMessage } from '../utils/info-center-message';
18
+
19
+ /**
20
+ * SAPUI5 delivered namespaces from https://ui5.sap.com/#/api/sap
21
+ */
22
+ const UI5_LIBS = [
23
+ 'sap.apf',
24
+ 'sap.base',
25
+ 'sap.chart',
26
+ 'sap.collaboration',
27
+ 'sap.f',
28
+ 'sap.fe',
29
+ 'sap.fileviewer',
30
+ 'sap.gantt',
31
+ 'sap.landvisz',
32
+ 'sap.m',
33
+ 'sap.ndc',
34
+ 'sap.ovp',
35
+ 'sap.rules',
36
+ 'sap.suite',
37
+ 'sap.tnt',
38
+ 'sap.ui',
39
+ 'sap.uiext',
40
+ 'sap.ushell',
41
+ 'sap.uxap',
42
+ 'sap.viz',
43
+ 'sap.webanalytics',
44
+ 'sap.zen'
45
+ ];
46
+
47
+ interface Manifest {
48
+ ['sap.ui5']?: {
49
+ dependencies?: {
50
+ libs: Record<string, unknown>;
51
+ components: Record<string, unknown>;
52
+ };
53
+ componentUsages?: Record<string, { name: string }>;
54
+ };
55
+ }
56
+
57
+ type AppIndexData = Record<
58
+ string,
59
+ {
60
+ dependencies?: {
61
+ url?: string;
62
+ type?: string;
63
+ componentId: string;
64
+ }[];
65
+ }
66
+ >;
67
+
68
+ /**
69
+ * Check whether a specific dependency is a custom library, and if yes, add it to the map.
70
+ *
71
+ * @param dependency dependency from the manifest
72
+ * @param customLibs map containing the required custom libraries
73
+ */
74
+ function addKeys(dependency: Record<string, unknown>, customLibs: Record<string, true>): void {
75
+ Object.keys(dependency).forEach(function (key) {
76
+ // ignore libs or Components that start with SAPUI5 delivered namespaces
77
+ if (
78
+ !UI5_LIBS.some(function (substring) {
79
+ return key === substring || key.startsWith(substring + '.');
80
+ })
81
+ ) {
82
+ customLibs[key] = true;
83
+ }
84
+ });
85
+ }
86
+
87
+ /**
88
+ * Check whether a specific ComponentUsage is a custom component, and if yes, add it to the map.
89
+ *
90
+ * @param compUsages ComponentUsage from the manifest
91
+ * @param customLibs map containing the required custom libraries
92
+ */
93
+ function getComponentUsageNames(compUsages: Record<string, { name: string }>, customLibs: Record<string, true>): void {
94
+ const compNames = Object.keys(compUsages).map(function (compUsageKey: string) {
95
+ return compUsages[compUsageKey].name;
96
+ });
97
+ compNames.forEach(function (key) {
98
+ // ignore libs or Components that start with SAPUI5 delivered namespaces
99
+ if (
100
+ !UI5_LIBS.some(function (substring) {
101
+ return key === substring || key.startsWith(substring + '.');
102
+ })
103
+ ) {
104
+ customLibs[key] = true;
105
+ }
106
+ });
107
+ }
108
+
109
+ /**
110
+ * Fetch the manifest for all the given application urls and generate a string containing all required custom library ids.
111
+ *
112
+ * @param appUrls urls pointing to included applications
113
+ * @returns Promise of a comma separated list of all required libraries.
114
+ */
115
+ async function getManifestLibs(appUrls: string[]): Promise<string> {
116
+ const result = {} as Record<string, true>;
117
+ const promises = [];
118
+ for (const url of appUrls) {
119
+ promises.push(
120
+ fetch(`${url}/manifest.json`).then(async (resp) => {
121
+ const manifest = (await resp.json()) as Manifest;
122
+ if (manifest) {
123
+ if (manifest['sap.ui5']?.dependencies) {
124
+ if (manifest['sap.ui5'].dependencies.libs) {
125
+ addKeys(manifest['sap.ui5'].dependencies.libs, result);
126
+ }
127
+ if (manifest['sap.ui5'].dependencies.components) {
128
+ addKeys(manifest['sap.ui5'].dependencies.components, result);
129
+ }
130
+ }
131
+ if (manifest['sap.ui5']?.componentUsages) {
132
+ getComponentUsageNames(manifest['sap.ui5'].componentUsages, result);
133
+ }
134
+ }
135
+ })
136
+ );
137
+ }
138
+ return Promise.all(promises).then(() => Object.keys(result).join(','));
139
+ }
140
+
141
+ /**
142
+ * Register the custom libraries and their url with the UI5 loader.
143
+ *
144
+ * @param dataFromAppIndex data returned from the app index service
145
+ */
146
+ function registerModules(dataFromAppIndex: AppIndexData) {
147
+ Object.keys(dataFromAppIndex).forEach(function (moduleDefinitionKey) {
148
+ const moduleDefinition = dataFromAppIndex[moduleDefinitionKey];
149
+ if (moduleDefinition?.dependencies) {
150
+ moduleDefinition.dependencies.forEach(function (dependency) {
151
+ if (dependency.url && dependency.url.length > 0 && dependency.type === 'UI5LIB') {
152
+ Log.info('Registering Library ' + dependency.componentId + ' from server ' + dependency.url);
153
+ const compId = dependency.componentId.replace(/\./g, '/');
154
+ const config = {
155
+ paths: {} as Record<string, string>
156
+ };
157
+ config.paths[compId] = dependency.url;
158
+ sap.ui.loader.config(config);
159
+ }
160
+ });
161
+ }
162
+ });
163
+ }
164
+
165
+ /**
166
+ * Fetch the app state from the given application urls, then reset the app state.
167
+ *
168
+ * @param container the UShell container
169
+ */
170
+ export async function resetAppState(container: typeof sap.ushell.Container): Promise<void> {
171
+ const urlParams = new URLSearchParams(window.location.hash);
172
+ const appStateValue = urlParams.get('sap-iapp-state') ?? urlParams.get('/?sap-iapp-state');
173
+ if (appStateValue) {
174
+ const appStateService = await container.getServiceAsync<AppState>('AppState');
175
+ appStateService.deleteAppState(appStateValue);
176
+ }
177
+ }
178
+
179
+ /**
180
+ * Fetch the manifest from the given application urls, then parse them for custom libs, and finally request their urls.
181
+ *
182
+ * @param appUrls application urls
183
+ * @param urlParams URLSearchParams object
184
+ * @returns returns a promise when the registration is completed.
185
+ */
186
+ export async function registerComponentDependencyPaths(appUrls: string[], urlParams: URLSearchParams): Promise<void> {
187
+ const libs = await getManifestLibs(appUrls);
188
+ if (libs && libs.length > 0) {
189
+ let url = '/sap/bc/ui2/app_index/ui5_app_info?id=' + libs;
190
+ const sapClient = urlParams.get('sap-client');
191
+ if (sapClient?.length === 3) {
192
+ url = url + '&sap-client=' + sapClient;
193
+ }
194
+ const response = await fetch(url);
195
+ try {
196
+ registerModules((await response.json()) as AppIndexData);
197
+ } catch (error) {
198
+ Log.error(`Registering of reuse libs failed. Error:${error}`);
199
+ }
200
+ }
201
+ }
202
+
203
+ /**
204
+ * Register SAP fonts that are also registered in a productive Fiori launchpad.
205
+ */
206
+ export function registerSAPFonts() {
207
+ //Fiori Theme font family and URI
208
+ const fioriTheme = {
209
+ fontFamily: 'SAP-icons-TNT',
210
+ fontURI: sap.ui.require.toUrl('sap/tnt/themes/base/fonts/')
211
+ };
212
+ //Registering to the icon pool
213
+ IconPool.registerFont(fioriTheme);
214
+ //SAP Business Suite Theme font family and URI
215
+ const suiteTheme = {
216
+ fontFamily: 'BusinessSuiteInAppSymbols',
217
+ fontURI: sap.ui.require.toUrl('sap/ushell/themes/base/fonts/')
218
+ };
219
+ //Registering to the icon pool
220
+ IconPool.registerFont(suiteTheme);
221
+ }
222
+
223
+ /**
224
+ * Create Resource Bundle based on the scenario.
225
+ *
226
+ * @param scenario to be used for the resource bundle.
227
+ */
228
+ export async function loadI18nResourceBundle(scenario: Scenario): Promise<ResourceBundle> {
229
+ if (scenario === SCENARIO.AdaptationProject) {
230
+ const manifest = await getManifestAppdescr();
231
+ const enhanceWith = (manifest.content as { texts: { i18n: string } }[])
232
+ .filter((content) => content.texts?.i18n)
233
+ .map((content) => ({ bundleUrl: `../${content.texts.i18n}` }));
234
+ return ResourceBundle.create({
235
+ url: '../i18n/i18n.properties',
236
+ enhanceWith
237
+ });
238
+ }
239
+ return ResourceBundle.create({
240
+ url: 'i18n/i18n.properties'
241
+ });
242
+ }
243
+
244
+ /**
245
+ * Read the application title from the resource bundle and set it as document title.
246
+ *
247
+ * @param resourceBundle resource bundle to read the title from.
248
+ * @param i18nKey optional parameter to define the i18n key to be used for the title.
249
+ */
250
+ export function setI18nTitle(resourceBundle: ResourceBundle, i18nKey = 'appTitle') {
251
+ if (resourceBundle.hasText(i18nKey)) {
252
+ document.title = resourceBundle.getText(i18nKey) ?? document.title;
253
+ }
254
+ }
255
+
256
+ /**
257
+ * This function dynamically adds a "Generate Card" action to the SAP Fiori Launchpad for the given component instance.
258
+ *
259
+ * @param componentInstance - The instance of the component for which the card generation action is being added.
260
+ * @param container - The SAP Fiori Launchpad container instance used to access services.
261
+ */
262
+ function addCardGenerationUserAction(componentInstance: Component, container: typeof sap.ushell.Container) {
263
+ sap.ui.require(['sap/cards/ap/generator/CardGenerator'], async (CardGenerator: CardGeneratorType) => {
264
+ const extensionService = await container.getServiceAsync<Extension>('Extension');
265
+ const controlProperties = {
266
+ icon: 'sap-icon://add',
267
+ id: 'generate_card',
268
+ text: 'Generate Card',
269
+ tooltip: 'Generate Card',
270
+ press: () => {
271
+ CardGenerator.initializeAsync(componentInstance);
272
+ }
273
+ };
274
+ const parameters = {
275
+ controlType: 'sap.ushell.ui.launchpad.ActionItem'
276
+ };
277
+ const generateCardAction = await extensionService.createUserAction(controlProperties, parameters);
278
+ generateCardAction.showForCurrentApp();
279
+ });
280
+ }
281
+
282
+ /**
283
+ * Apply additional configuration and initialize sandbox.
284
+ *
285
+ * @param params init parameters read from the script tag
286
+ * @param params.appUrls JSON containing a string array of application urls
287
+ * @param params.flex JSON containing the flex configuration
288
+ * @param params.customInit path to the custom init module to be called
289
+ * @param params.enhancedHomePage boolean indicating if enhanced homepage is enabled
290
+ * @returns promise
291
+ */
292
+ export async function init({
293
+ appUrls,
294
+ flex,
295
+ customInit,
296
+ enhancedHomePage,
297
+ enableCardGenerator
298
+ }: {
299
+ appUrls?: string | null;
300
+ flex?: string | null;
301
+ customInit?: string | null;
302
+ enhancedHomePage?: boolean | null;
303
+ enableCardGenerator?: boolean;
304
+ }): Promise<void> {
305
+ // Set CDM configuration before importing ushell container
306
+ // to ensure proper configuration pickup during bootstrap
307
+ if (enhancedHomePage) {
308
+ initCdm();
309
+ }
310
+
311
+ const urlParams = new URLSearchParams(window.location.search);
312
+ const container =
313
+ sap?.ushell?.Container ??
314
+ ((await import('sap/ushell/Container')).default as unknown as typeof sap.ushell.Container);
315
+ let scenario: string = '';
316
+ const ui5VersionInfo = await getUi5Version();
317
+ // Register RTA if configured
318
+ if (flex) {
319
+ const flexSettings = JSON.parse(flex) as FlexSettings;
320
+ scenario = flexSettings.scenario;
321
+ container.attachRendererCreatedEvent(async function () {
322
+ const lifecycleService = await container.getServiceAsync<AppLifeCycle>('AppLifeCycle');
323
+ lifecycleService.attachAppLoaded((event) => {
324
+ const view = event.getParameter('componentInstance');
325
+ const pluginScript = flexSettings.pluginScript ?? '';
326
+
327
+ const libs: string[] = [];
328
+
329
+ if (isLowerThanMinimalUi5Version(ui5VersionInfo, { major: 1, minor: 72 })) {
330
+ libs.push('open/ux/preview/client/flp/initRta');
331
+ } else {
332
+ libs.push('sap/ui/rta/api/startAdaptation');
333
+ }
334
+
335
+ if (flexSettings.pluginScript) {
336
+ libs.push(pluginScript as string);
337
+ delete flexSettings.pluginScript;
338
+ }
339
+
340
+ const options: RTAOptions = {
341
+ rootControl: view,
342
+ validateAppVersion: false,
343
+ flexSettings
344
+ };
345
+
346
+ sap.ui.require(
347
+ libs,
348
+
349
+ async function (startAdaptation: StartAdaptation | InitRtaScript, pluginScript: RTAPlugin) {
350
+ try {
351
+ await startAdaptation(options, pluginScript);
352
+ } catch (error) {
353
+ await sendInfoCenterMessage({
354
+ title: { key: 'FLP_ADAPTATION_START_FAILED_TITLE' },
355
+ description: getError(error).message,
356
+ type: MessageBarType.error
357
+ });
358
+ await handleHigherLayerChanges(error, ui5VersionInfo);
359
+ }
360
+ }
361
+ );
362
+ });
363
+ });
364
+ }
365
+ if (enableCardGenerator && !isLowerThanMinimalUi5Version(ui5VersionInfo, { major: 1, minor: 121 })) {
366
+ container.attachRendererCreatedEvent(async function () {
367
+ const lifecycleService = await container.getServiceAsync<AppLifeCycle>('AppLifeCycle');
368
+ lifecycleService.attachAppLoaded((event) => {
369
+ const componentInstance = event.getParameter('componentInstance');
370
+ addCardGenerationUserAction(componentInstance as unknown as Component, container);
371
+ });
372
+ });
373
+ } else {
374
+ Log.warning('Card generator is not supported for the current UI5 version.');
375
+ }
376
+
377
+ // reset app state if requested
378
+ if (urlParams.get('fiori-tools-iapp-state')?.toLocaleLowerCase() !== 'true') {
379
+ await resetAppState(container);
380
+ }
381
+
382
+ // Load custom library paths if configured
383
+ if (appUrls) {
384
+ await registerComponentDependencyPaths((JSON.parse(appUrls) as string[]) ?? [], urlParams);
385
+ }
386
+
387
+ // Load rta connector
388
+ await initConnectors();
389
+
390
+ // Load custom initialization module
391
+ if (customInit) {
392
+ sap.ui.require([customInit]);
393
+ }
394
+
395
+ // init
396
+ const resourceBundle = await loadI18nResourceBundle(scenario as Scenario);
397
+ setI18nTitle(resourceBundle);
398
+ registerSAPFonts();
399
+
400
+ if (enhancedHomePage) {
401
+ await container.init('cdm');
402
+ }
403
+
404
+ const renderer =
405
+ ui5VersionInfo.major < 2 && !ui5VersionInfo.label?.includes('legacy-free')
406
+ ? await container.createRenderer(undefined, true)
407
+ : await container.createRendererInternal(undefined, true);
408
+ renderer.placeAt('content');
409
+ }
410
+
411
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-dom-access,@sap-ux/fiori-tools/sap-browser-api-warning
412
+ const bootstrapConfig = document.getElementById('sap-ui-bootstrap');
413
+ if (bootstrapConfig) {
414
+ init({
415
+ appUrls: bootstrapConfig.dataset.openUxPreviewLibsManifests,
416
+ flex: bootstrapConfig.dataset.openUxPreviewFlexSettings,
417
+ customInit: bootstrapConfig.dataset.openUxPreviewCustomInit,
418
+ enhancedHomePage: !!bootstrapConfig.dataset.openUxPreviewEnhancedHomepage,
419
+ enableCardGenerator: !!bootstrapConfig.dataset.openUxPreviewEnableCardGenerator
420
+ }).catch((e) => {
421
+ const error = getError(e);
422
+ Log.error('Sandbox initialization failed: ' + error.message);
423
+ });
424
+ }
425
+
426
+ /**
427
+ * Handle higher layer changes when starting UI Adaptation.
428
+ * When RTA detects higher layer changes an error with Reload triggered text is thrown, the RTA instance is destroyed and the application is reloaded.
429
+ * For UI5 version lower than 1.84.0 RTA is showing a popup with notification text about the detection of higher layer changes.
430
+ *
431
+ * @param error the error thrown when there are higher layer changes when starting UI Adaptation.
432
+ * @param ui5VersionInfo ui5 version info
433
+ */
434
+ export async function handleHigherLayerChanges(error: unknown, ui5VersionInfo: Ui5VersionInfo): Promise<void> {
435
+ const err = getError(error);
436
+ if (err.message.includes('Reload triggered')) {
437
+ if (!isLowerThanMinimalUi5Version(ui5VersionInfo, { major: 1, minor: 84 })) {
438
+ await sendInfoCenterMessage({
439
+ title: { key: 'HIGHER_LAYER_CHANGES_TITLE' },
440
+ description: { key: 'HIGHER_LAYER_CHANGES_INFO_MESSAGE' },
441
+ type: MessageBarType.warning
442
+ });
443
+ }
444
+
445
+ // eslint-disable-next-line @sap-ux/fiori-tools/sap-no-location-reload
446
+ window.location.reload();
447
+ }
448
+ }
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ sap.ui.define([], function () {
4
+ "use strict";
5
+
6
+ /**
7
+ * Initializes the CDM (Common Data Model) configuration for the SAP Fiori Launchpad.
8
+ *
9
+ * @returns {void}
10
+ */
11
+ function initCdm() {
12
+ window['sap-ushell-config'] = {
13
+ defaultRenderer: 'fiori2',
14
+ renderers: {
15
+ fiori2: {
16
+ componentData: {
17
+ config: {
18
+ enableSearch: false,
19
+ enableRecentActivity: true,
20
+ rootIntent: 'Shell-home'
21
+ }
22
+ }
23
+ }
24
+ },
25
+ ushell: {
26
+ customPreload: {
27
+ enabled: false
28
+ },
29
+ spaces: {
30
+ enabled: true,
31
+ myHome: {
32
+ enabled: true
33
+ }
34
+ },
35
+ homeApp: {
36
+ component: {
37
+ name: 'open.ux.preview.client.flp.homepage',
38
+ url: '/preview/client/flp/homepage'
39
+ }
40
+ }
41
+ },
42
+ services: {
43
+ Container: {
44
+ adapter: {
45
+ config: {
46
+ userProfile: {
47
+ metadata: {
48
+ editablePropterties: ['accessibility', 'contentDensity', 'theme']
49
+ },
50
+ defaults: {
51
+ email: 'john.doe@sap.com',
52
+ firstName: 'John',
53
+ lastName: 'Doe',
54
+ fullName: 'John Doe',
55
+ id: 'DOEJ'
56
+ }
57
+ }
58
+ }
59
+ }
60
+ },
61
+ CommonDataModel: {
62
+ adapter: {
63
+ config: {
64
+ ignoreSiteDataPersonalization: true,
65
+ siteDataUrl: '/cdm.json'
66
+ }
67
+ }
68
+ },
69
+ Personalization: {
70
+ adapter: {
71
+ module: 'sap.ushell.adapters.local.PersonalizationAdapter',
72
+ config: {
73
+ storageType: 'MEMORY'
74
+ }
75
+ }
76
+ },
77
+ PersonalizationV2: {
78
+ adapter: {
79
+ module: 'sap.ushell.adapters.local.PersonalizationAdapter',
80
+ config: {
81
+ storageType: 'MEMORY'
82
+ }
83
+ }
84
+ },
85
+ AppState: {
86
+ adapter: {
87
+ module: 'sap.ushell.adapters.local.AppStateAdapter'
88
+ },
89
+ config: {
90
+ transient: true
91
+ }
92
+ },
93
+ NavTargetResolutionInternal: {
94
+ config: {
95
+ allowTestUrlComponentConfig: false,
96
+ enableClientSideTargetResolution: true
97
+ },
98
+ adapter: {
99
+ module: 'sap.ushell.adapters.local.NavTargetResolutionInternalAdapter'
100
+ }
101
+ },
102
+ UserInfo: {
103
+ adapter: {
104
+ module: 'sap.ushell.adapters.local.UserInfoAdapter'
105
+ }
106
+ },
107
+ FlpLaunchPage: {
108
+ adapter: {
109
+ module: 'sap.ushell.adapters.cdm.v3.FlpLaunchPageAdapter'
110
+ }
111
+ }
112
+ }
113
+ };
114
+ }
115
+ return initCdm;
116
+ });
117
+ //# sourceMappingURL=initCdm.js.map
@@ -0,0 +1,111 @@
1
+ import type { Window } from 'types/global';
2
+
3
+ /**
4
+ * Initializes the CDM (Common Data Model) configuration for the SAP Fiori Launchpad.
5
+ *
6
+ * @returns {void}
7
+ */
8
+ export default function initCdm(): void {
9
+ (window as unknown as Window)['sap-ushell-config'] = {
10
+ defaultRenderer: 'fiori2',
11
+ renderers: {
12
+ fiori2: {
13
+ componentData: {
14
+ config: {
15
+ enableSearch: false,
16
+ enableRecentActivity: true,
17
+ rootIntent: 'Shell-home'
18
+ }
19
+ }
20
+ }
21
+ },
22
+ ushell: {
23
+ customPreload: {
24
+ enabled: false
25
+ },
26
+ spaces: {
27
+ enabled: true,
28
+ myHome: {
29
+ enabled: true
30
+ }
31
+ },
32
+ homeApp: {
33
+ component: {
34
+ name: 'open.ux.preview.client.flp.homepage',
35
+ url: '/preview/client/flp/homepage'
36
+ }
37
+ }
38
+ },
39
+ services: {
40
+ Container: {
41
+ adapter: {
42
+ config: {
43
+ userProfile: {
44
+ metadata: {
45
+ editablePropterties: ['accessibility', 'contentDensity', 'theme']
46
+ },
47
+ defaults: {
48
+ email: 'john.doe@sap.com',
49
+ firstName: 'John',
50
+ lastName: 'Doe',
51
+ fullName: 'John Doe',
52
+ id: 'DOEJ'
53
+ }
54
+ }
55
+ }
56
+ }
57
+ },
58
+ CommonDataModel: {
59
+ adapter: {
60
+ config: {
61
+ ignoreSiteDataPersonalization: true,
62
+ siteDataUrl: '/cdm.json'
63
+ }
64
+ }
65
+ },
66
+ Personalization: {
67
+ adapter: {
68
+ module: 'sap.ushell.adapters.local.PersonalizationAdapter',
69
+ config: {
70
+ storageType: 'MEMORY'
71
+ }
72
+ }
73
+ },
74
+ PersonalizationV2: {
75
+ adapter: {
76
+ module: 'sap.ushell.adapters.local.PersonalizationAdapter',
77
+ config: {
78
+ storageType: 'MEMORY'
79
+ }
80
+ }
81
+ },
82
+ AppState: {
83
+ adapter: {
84
+ module: 'sap.ushell.adapters.local.AppStateAdapter'
85
+ },
86
+ config: {
87
+ transient: true
88
+ }
89
+ },
90
+ NavTargetResolutionInternal: {
91
+ config: {
92
+ allowTestUrlComponentConfig: false,
93
+ enableClientSideTargetResolution: true
94
+ },
95
+ adapter: {
96
+ module: 'sap.ushell.adapters.local.NavTargetResolutionInternalAdapter'
97
+ }
98
+ },
99
+ UserInfo: {
100
+ adapter: {
101
+ module: 'sap.ushell.adapters.local.UserInfoAdapter'
102
+ }
103
+ },
104
+ FlpLaunchPage: {
105
+ adapter: {
106
+ module: 'sap.ushell.adapters.cdm.v3.FlpLaunchPageAdapter'
107
+ }
108
+ }
109
+ }
110
+ };
111
+ }