@crystaldesign/diva-backoffice 24.12.0-beta.2 → 24.12.0-beta.21

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 (234) hide show
  1. package/build/esm/index.js +572 -525
  2. package/build/types/backoffice/src/Configuration.d.ts +1 -0
  3. package/build/types/backoffice/src/Configuration.d.ts.map +1 -1
  4. package/build/types/backoffice/src/layout/Content/index.d.ts +3 -2
  5. package/build/types/backoffice/src/layout/Content/index.d.ts.map +1 -1
  6. package/build/types/backoffice/src/layout/Detail.d.ts +1 -1
  7. package/build/types/backoffice/src/layout/Detail.d.ts.map +1 -1
  8. package/build/types/backoffice/src/layout/ErrorBoundary.d.ts +2 -2
  9. package/build/types/backoffice/src/layout/ErrorBoundary.d.ts.map +1 -1
  10. package/build/types/backoffice/src/layout/IconRain/index.d.ts +2 -1
  11. package/build/types/backoffice/src/layout/IconRain/index.d.ts.map +1 -1
  12. package/build/types/backoffice/src/layout/MainLayout.d.ts +2 -1
  13. package/build/types/backoffice/src/layout/MainLayout.d.ts.map +1 -1
  14. package/build/types/backoffice/src/layout/Modal.d.ts +2 -1
  15. package/build/types/backoffice/src/layout/Modal.d.ts.map +1 -1
  16. package/build/types/backoffice/src/layout/Navigation/MenuElement.d.ts +1 -1
  17. package/build/types/backoffice/src/layout/Navigation/MenuElement.d.ts.map +1 -1
  18. package/build/types/backoffice/src/layout/Navigation/MenuLabel.d.ts +2 -1
  19. package/build/types/backoffice/src/layout/Navigation/MenuLabel.d.ts.map +1 -1
  20. package/build/types/backoffice/src/layout/Navigation/index.d.ts +2 -1
  21. package/build/types/backoffice/src/layout/Navigation/index.d.ts.map +1 -1
  22. package/build/types/backoffice/src/layout/Navigation/types.d.ts +2 -1
  23. package/build/types/backoffice/src/layout/Navigation/types.d.ts.map +1 -1
  24. package/build/types/backoffice/src/layout/Router.d.ts +2 -1
  25. package/build/types/backoffice/src/layout/Router.d.ts.map +1 -1
  26. package/build/types/backoffice/src/layout/Toolbar/Spinner/index.d.ts +2 -1
  27. package/build/types/backoffice/src/layout/Toolbar/Spinner/index.d.ts.map +1 -1
  28. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts +2 -1
  29. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/ArticleSelection/index.d.ts.map +1 -1
  30. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts +2 -1
  31. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_Configurator/index.d.ts.map +1 -1
  32. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/index.d.ts +2 -1
  33. package/build/types/backoffice/src/layout/Toolbar/Tools/WYSIWYG_ContentItem/index.d.ts.map +1 -1
  34. package/build/types/backoffice/src/layout/Toolbar/index.d.ts +2 -1
  35. package/build/types/backoffice/src/layout/Toolbar/index.d.ts.map +1 -1
  36. package/build/types/backoffice/src/store/ConfigurationStore.d.ts +1 -1
  37. package/build/types/backoffice/src/store/ConfigurationStore.d.ts.map +1 -1
  38. package/build/types/backoffice/src/store/ContentStore.d.ts +1 -1
  39. package/build/types/backoffice/src/store/ContentStore.d.ts.map +1 -1
  40. package/build/types/backoffice/src/store/DownloadStore.d.ts.map +1 -1
  41. package/build/types/backoffice/src/store/ModalStore.d.ts.map +1 -1
  42. package/build/types/backoffice/src/store/RootStore.d.ts +1 -1
  43. package/build/types/backoffice/src/store/RootStore.d.ts.map +1 -1
  44. package/build/types/backoffice/src/store/index.d.ts +1 -1
  45. package/build/types/backoffice/src/store/index.d.ts.map +1 -1
  46. package/build/types/backoffice/src/ui/AGChart/index.d.ts +2 -1
  47. package/build/types/backoffice/src/ui/AGChart/index.d.ts.map +1 -1
  48. package/build/types/backoffice/src/ui/AGGrid/index.d.ts +3 -3
  49. package/build/types/backoffice/src/ui/AGGrid/index.d.ts.map +1 -1
  50. package/build/types/backoffice/src/ui/AGHistogram/index.d.ts +2 -1
  51. package/build/types/backoffice/src/ui/AGHistogram/index.d.ts.map +1 -1
  52. package/build/types/backoffice/src/ui/ActionButton.d.ts +1 -1
  53. package/build/types/backoffice/src/ui/ActionButton.d.ts.map +1 -1
  54. package/build/types/backoffice/src/ui/AssetMananger/MediaItem.d.ts +9 -2
  55. package/build/types/backoffice/src/ui/AssetMananger/MediaItem.d.ts.map +1 -1
  56. package/build/types/backoffice/src/ui/AssetMananger/Upload/FileFromWeb.d.ts +3 -2
  57. package/build/types/backoffice/src/ui/AssetMananger/Upload/FileFromWeb.d.ts.map +1 -1
  58. package/build/types/backoffice/src/ui/AssetMananger/Upload/index.d.ts +2 -1
  59. package/build/types/backoffice/src/ui/AssetMananger/Upload/index.d.ts.map +1 -1
  60. package/build/types/backoffice/src/ui/CatalogEditor/DragDropUpload/index.d.ts +2 -1
  61. package/build/types/backoffice/src/ui/CatalogEditor/DragDropUpload/index.d.ts.map +1 -1
  62. package/build/types/backoffice/src/ui/CatalogEditor/index.d.ts +2 -1
  63. package/build/types/backoffice/src/ui/CatalogEditor/index.d.ts.map +1 -1
  64. package/build/types/backoffice/src/ui/ConfirmationPopup.d.ts +2 -1
  65. package/build/types/backoffice/src/ui/ConfirmationPopup.d.ts.map +1 -1
  66. package/build/types/backoffice/src/ui/CustomButton/Result/index.d.ts +2 -1
  67. package/build/types/backoffice/src/ui/CustomButton/Result/index.d.ts.map +1 -1
  68. package/build/types/backoffice/src/ui/CustomButton/index.d.ts +6 -24
  69. package/build/types/backoffice/src/ui/CustomButton/index.d.ts.map +1 -1
  70. package/build/types/backoffice/src/ui/CustomInput/index.d.ts +3 -17
  71. package/build/types/backoffice/src/ui/CustomInput/index.d.ts.map +1 -1
  72. package/build/types/backoffice/src/ui/CustomInput/useInputData.d.ts +0 -1
  73. package/build/types/backoffice/src/ui/CustomInput/useInputData.d.ts.map +1 -1
  74. package/build/types/backoffice/src/ui/CustomText/index.d.ts +2 -6
  75. package/build/types/backoffice/src/ui/CustomText/index.d.ts.map +1 -1
  76. package/build/types/backoffice/src/ui/Description/index.d.ts +2 -1
  77. package/build/types/backoffice/src/ui/Description/index.d.ts.map +1 -1
  78. package/build/types/backoffice/src/ui/FileUploadBeta/index.d.ts +2 -1
  79. package/build/types/backoffice/src/ui/FileUploadBeta/index.d.ts.map +1 -1
  80. package/build/types/backoffice/src/ui/FilterBox/index.d.ts +2 -2
  81. package/build/types/backoffice/src/ui/FilterBox/index.d.ts.map +1 -1
  82. package/build/types/backoffice/src/ui/FilterBox/useFilterBoxData.d.ts +0 -1
  83. package/build/types/backoffice/src/ui/FilterBox/useFilterBoxData.d.ts.map +1 -1
  84. package/build/types/backoffice/src/ui/Form/Fields/ApiKey/index.d.ts +3 -2
  85. package/build/types/backoffice/src/ui/Form/Fields/ApiKey/index.d.ts.map +1 -1
  86. package/build/types/backoffice/src/ui/Form/Fields/FormList/index.d.ts +5 -25
  87. package/build/types/backoffice/src/ui/Form/Fields/FormList/index.d.ts.map +1 -1
  88. package/build/types/backoffice/src/ui/Form/Fields/Input/index.d.ts +2 -3
  89. package/build/types/backoffice/src/ui/Form/Fields/Input/index.d.ts.map +1 -1
  90. package/build/types/backoffice/src/ui/Form/Fields/Media/index.d.ts +2 -1
  91. package/build/types/backoffice/src/ui/Form/Fields/Media/index.d.ts.map +1 -1
  92. package/build/types/backoffice/src/ui/Form/Fields/Object/index.d.ts +5 -4
  93. package/build/types/backoffice/src/ui/Form/Fields/Object/index.d.ts.map +1 -1
  94. package/build/types/backoffice/src/ui/Form/Fields/SubTitle/index.d.ts +2 -1
  95. package/build/types/backoffice/src/ui/Form/Fields/SubTitle/index.d.ts.map +1 -1
  96. package/build/types/backoffice/src/ui/Form/Fields/Translation/index.d.ts +4 -22
  97. package/build/types/backoffice/src/ui/Form/Fields/Translation/index.d.ts.map +1 -1
  98. package/build/types/backoffice/src/ui/Form/Presets/index.d.ts +2 -1
  99. package/build/types/backoffice/src/ui/Form/Presets/index.d.ts.map +1 -1
  100. package/build/types/backoffice/src/ui/Form/elements.d.ts +2 -1
  101. package/build/types/backoffice/src/ui/Form/elements.d.ts.map +1 -1
  102. package/build/types/backoffice/src/ui/Form/index.d.ts +3 -7
  103. package/build/types/backoffice/src/ui/Form/index.d.ts.map +1 -1
  104. package/build/types/backoffice/src/ui/Form/types.d.ts +1 -0
  105. package/build/types/backoffice/src/ui/Form/types.d.ts.map +1 -1
  106. package/build/types/backoffice/src/ui/Form/useFormData.d.ts +0 -1
  107. package/build/types/backoffice/src/ui/Form/useFormData.d.ts.map +1 -1
  108. package/build/types/backoffice/src/ui/FormList/index.d.ts +3 -7
  109. package/build/types/backoffice/src/ui/FormList/index.d.ts.map +1 -1
  110. package/build/types/backoffice/src/ui/Grid/TooltipInfo/index.d.ts +2 -1
  111. package/build/types/backoffice/src/ui/Grid/TooltipInfo/index.d.ts.map +1 -1
  112. package/build/types/backoffice/src/ui/Grid/index.d.ts +2 -1
  113. package/build/types/backoffice/src/ui/Grid/index.d.ts.map +1 -1
  114. package/build/types/backoffice/src/ui/Grid/useGridData.d.ts +1 -2
  115. package/build/types/backoffice/src/ui/Grid/useGridData.d.ts.map +1 -1
  116. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PackageSelector/index.d.ts +2 -1
  117. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PackageSelector/index.d.ts.map +1 -1
  118. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelector/index.d.ts +2 -1
  119. package/build/types/backoffice/src/ui/IDMEnricherEditor/components/PrefilterSelector/index.d.ts.map +1 -1
  120. package/build/types/backoffice/src/ui/IDMEnricherEditor/index.d.ts +2 -1
  121. package/build/types/backoffice/src/ui/IDMEnricherEditor/index.d.ts.map +1 -1
  122. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableExclusivity/index.d.ts +7 -6
  123. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableExclusivity/index.d.ts.map +1 -1
  124. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts +2 -1
  125. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TablePackages/index.d.ts.map +1 -1
  126. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableProperties/index.d.ts +2 -1
  127. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableProperties/index.d.ts.map +1 -1
  128. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/index.d.ts +8 -7
  129. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableRenaming/index.d.ts.map +1 -1
  130. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableTabGroups/index.d.ts +2 -1
  131. package/build/types/backoffice/src/ui/IDMEnricherEditor/modules/TableTabGroups/index.d.ts.map +1 -1
  132. package/build/types/backoffice/src/ui/IDMEnricherEditor/useModule.d.ts.map +1 -1
  133. package/build/types/backoffice/src/ui/IFrame/index.d.ts +2 -1
  134. package/build/types/backoffice/src/ui/IFrame/index.d.ts.map +1 -1
  135. package/build/types/backoffice/src/ui/ImageCropper/index.d.ts +4 -16
  136. package/build/types/backoffice/src/ui/ImageCropper/index.d.ts.map +1 -1
  137. package/build/types/backoffice/src/ui/JsonEditor/index.d.ts +7 -27
  138. package/build/types/backoffice/src/ui/JsonEditor/index.d.ts.map +1 -1
  139. package/build/types/backoffice/src/ui/List/index.d.ts +3 -7
  140. package/build/types/backoffice/src/ui/List/index.d.ts.map +1 -1
  141. package/build/types/backoffice/src/ui/MediaUpload/useMediaUpload.d.ts +13 -11
  142. package/build/types/backoffice/src/ui/MediaUpload/useMediaUpload.d.ts.map +1 -1
  143. package/build/types/backoffice/src/ui/ModalProgressBar/index.d.ts +2 -1
  144. package/build/types/backoffice/src/ui/ModalProgressBar/index.d.ts.map +1 -1
  145. package/build/types/backoffice/src/ui/RelationSelector/DropDown/index.d.ts +2 -1
  146. package/build/types/backoffice/src/ui/RelationSelector/DropDown/index.d.ts.map +1 -1
  147. package/build/types/backoffice/src/ui/RelationSelector/RelationSelectorApiHandler.d.ts +1 -1
  148. package/build/types/backoffice/src/ui/RelationSelector/RelationSelectorApiHandler.d.ts.map +1 -1
  149. package/build/types/backoffice/src/ui/RelationSelector/filter/index.d.ts +2 -1
  150. package/build/types/backoffice/src/ui/RelationSelector/filter/index.d.ts.map +1 -1
  151. package/build/types/backoffice/src/ui/RelationSelector/index.d.ts +3 -7
  152. package/build/types/backoffice/src/ui/RelationSelector/index.d.ts.map +1 -1
  153. package/build/types/backoffice/src/ui/RelationSelector/useRelationSelectorData.d.ts +9 -10
  154. package/build/types/backoffice/src/ui/RelationSelector/useRelationSelectorData.d.ts.map +1 -1
  155. package/build/types/backoffice/src/ui/RichTextEditor/index.d.ts +3 -2
  156. package/build/types/backoffice/src/ui/RichTextEditor/index.d.ts.map +1 -1
  157. package/build/types/backoffice/src/ui/RoleSelector/index.d.ts +3 -7
  158. package/build/types/backoffice/src/ui/RoleSelector/index.d.ts.map +1 -1
  159. package/build/types/backoffice/src/ui/RoleSelector/useRoleSelectorData.d.ts +2 -3
  160. package/build/types/backoffice/src/ui/RoleSelector/useRoleSelectorData.d.ts.map +1 -1
  161. package/build/types/backoffice/src/ui/SMChart/types.d.ts +0 -1
  162. package/build/types/backoffice/src/ui/SMChart/types.d.ts.map +1 -1
  163. package/build/types/backoffice/src/ui/Select/index.d.ts +2 -2
  164. package/build/types/backoffice/src/ui/Select/index.d.ts.map +1 -1
  165. package/build/types/backoffice/src/ui/Select/useSelectData.d.ts +0 -1
  166. package/build/types/backoffice/src/ui/Select/useSelectData.d.ts.map +1 -1
  167. package/build/types/backoffice/src/ui/SelectClientRelationCatalog/Select/index.d.ts +2 -1
  168. package/build/types/backoffice/src/ui/SelectClientRelationCatalog/Select/index.d.ts.map +1 -1
  169. package/build/types/backoffice/src/ui/SelectClientRelationCatalog/index.d.ts +2 -1
  170. package/build/types/backoffice/src/ui/SelectClientRelationCatalog/index.d.ts.map +1 -1
  171. package/build/types/backoffice/src/ui/SelectClientRelationCatalog/useSelectClientRelationCatalog.d.ts +0 -1
  172. package/build/types/backoffice/src/ui/SelectClientRelationCatalog/useSelectClientRelationCatalog.d.ts.map +1 -1
  173. package/build/types/backoffice/src/ui/SelectOrCreate/index.d.ts +3 -7
  174. package/build/types/backoffice/src/ui/SelectOrCreate/index.d.ts.map +1 -1
  175. package/build/types/backoffice/src/ui/SelectSimple/index.d.ts +1 -3
  176. package/build/types/backoffice/src/ui/SelectSimple/index.d.ts.map +1 -1
  177. package/build/types/backoffice/src/ui/SelectSimple/types.d.ts +0 -1
  178. package/build/types/backoffice/src/ui/SelectSimple/types.d.ts.map +1 -1
  179. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/BooleanCell/index.d.ts +2 -1
  180. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/BooleanCell/index.d.ts.map +1 -1
  181. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/DropdownCell/index.d.ts +2 -1
  182. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/DropdownCell/index.d.ts.map +1 -1
  183. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/IconCell/index.d.ts +2 -1
  184. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/IconCell/index.d.ts.map +1 -1
  185. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/ImageCell/index.d.ts +2 -1
  186. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/ImageCell/index.d.ts.map +1 -1
  187. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/MediaItemViewerCell/index.d.ts +2 -1
  188. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/MediaItemViewerCell/index.d.ts.map +1 -1
  189. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/MediaViewerCell/index.d.ts +2 -1
  190. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/MediaViewerCell/index.d.ts.map +1 -1
  191. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/StringCell/index.d.ts +2 -1
  192. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/StringCell/index.d.ts.map +1 -1
  193. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/TextCell/index.d.ts +2 -1
  194. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/TextCell/index.d.ts.map +1 -1
  195. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/UnixTimeStamCheckCell/index.d.ts +2 -1
  196. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/UnixTimeStamCheckCell/index.d.ts.map +1 -1
  197. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/UnixTimeStampCell/index.d.ts +2 -1
  198. package/build/types/backoffice/src/ui/Table/BaseTable/cellRenderer/UnixTimeStampCell/index.d.ts.map +1 -1
  199. package/build/types/backoffice/src/ui/Table/BaseTable/getExpandedRowRenderer.d.ts +2 -1
  200. package/build/types/backoffice/src/ui/Table/BaseTable/getExpandedRowRenderer.d.ts.map +1 -1
  201. package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts +2 -1
  202. package/build/types/backoffice/src/ui/Table/BaseTable/index.d.ts.map +1 -1
  203. package/build/types/backoffice/src/ui/Table/CatalogTable/index.d.ts +2 -1
  204. package/build/types/backoffice/src/ui/Table/CatalogTable/index.d.ts.map +1 -1
  205. package/build/types/backoffice/src/ui/Table/CatalogTable/useTableData.d.ts.map +1 -1
  206. package/build/types/backoffice/src/ui/Table/StandardTable/index.d.ts +2 -1
  207. package/build/types/backoffice/src/ui/Table/StandardTable/index.d.ts.map +1 -1
  208. package/build/types/backoffice/src/ui/Table/StandardTable/useTableData.d.ts.map +1 -1
  209. package/build/types/backoffice/src/ui/Table/index.d.ts +2 -1
  210. package/build/types/backoffice/src/ui/Table/index.d.ts.map +1 -1
  211. package/build/types/backoffice/src/ui/Table/types.d.ts +2 -1
  212. package/build/types/backoffice/src/ui/Table/types.d.ts.map +1 -1
  213. package/build/types/backoffice/src/ui/Table/utils/aplyFilterAndSortation.d.ts +73 -18
  214. package/build/types/backoffice/src/ui/Table/utils/aplyFilterAndSortation.d.ts.map +1 -1
  215. package/build/types/backoffice/src/ui/Table/utils/mapColumns.d.ts.map +1 -1
  216. package/build/types/backoffice/src/ui/TreeChart/BreadCrumbsTrigger/index.d.ts +2 -1
  217. package/build/types/backoffice/src/ui/TreeChart/BreadCrumbsTrigger/index.d.ts.map +1 -1
  218. package/build/types/backoffice/src/ui/TreeChart/HelpLegend/index.d.ts +2 -1
  219. package/build/types/backoffice/src/ui/TreeChart/HelpLegend/index.d.ts.map +1 -1
  220. package/build/types/backoffice/src/ui/TreeChart/OrgItem/index.d.ts +1 -1
  221. package/build/types/backoffice/src/ui/TreeChart/OrgItem/index.d.ts.map +1 -1
  222. package/build/types/backoffice/src/ui/TreeChart/SearchSelect/index.d.ts +2 -1
  223. package/build/types/backoffice/src/ui/TreeChart/SearchSelect/index.d.ts.map +1 -1
  224. package/build/types/backoffice/src/ui/TreeChart/ZoomWrapper/index.d.ts +2 -1
  225. package/build/types/backoffice/src/ui/TreeChart/ZoomWrapper/index.d.ts.map +1 -1
  226. package/build/types/backoffice/src/ui/TreeChart/index.d.ts +2 -1
  227. package/build/types/backoffice/src/ui/TreeChart/index.d.ts.map +1 -1
  228. package/build/types/backoffice/src/ui/UIBuilder/index.d.ts +2 -1
  229. package/build/types/backoffice/src/ui/UIBuilder/index.d.ts.map +1 -1
  230. package/build/types/backoffice/src/ui/UIBuilder/useUIBuilderData.d.ts +0 -1
  231. package/build/types/backoffice/src/ui/UIBuilder/useUIBuilderData.d.ts.map +1 -1
  232. package/build/types/backoffice/src/utils/getIcons.d.ts +2 -1
  233. package/build/types/backoffice/src/utils/getIcons.d.ts.map +1 -1
  234. package/package.json +35 -37
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import React, { createElement, createContext, useState, useEffect, useRef, useMemo, useImperativeHandle, useCallback, createRef, useReducer, useContext, memo } from 'react';
2
+ import React, { createElement, createContext, useState, useEffect, useRef, useMemo, forwardRef, useImperativeHandle, useCallback, createRef, useReducer, useContext, memo } from 'react';
3
3
  import 'antd/dist/reset.css';
4
- import { Form as Form$1, Button, Input, Popover, Typography, Divider, Select as Select$1, Avatar, Spin, Radio, Space, DatePicker, Checkbox, InputNumber, Modal as Modal$2, Progress, Cascader, Descriptions, Row, Col, Tooltip as Tooltip$1, Collapse, List as List$1, Skeleton, Alert, Card, Upload as Upload$2, Switch, Table as Table$1, Popconfirm, Tabs, Image, Slider, Breadcrumb, Result as Result$1, message, Layout, Drawer, ConfigProvider, theme } from 'antd';
4
+ import { Form as Form$1, Button, Input, Popover, Typography, Divider, Select as Select$1, Avatar, Spin, Radio, Space, Dropdown, DatePicker, Checkbox, InputNumber, Modal as Modal$2, Progress, Cascader, Descriptions, Row, Col, Tooltip as Tooltip$1, Collapse, List as List$1, Skeleton, Alert, Card, Upload as Upload$2, Switch, Table as Table$1, Popconfirm, Tabs, Image, Slider, Breadcrumb, Result as Result$1, message, Layout, Drawer, ConfigProvider, theme } from 'antd';
5
5
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
6
  import { observer } from 'mobx-react-lite';
7
7
  import { getLogger, DivaError, useTranslation, useDivaCore, DivaUtils } from '@crystaldesign/diva-core';
@@ -16,12 +16,12 @@ import _get from '@babel/runtime/helpers/get';
16
16
  import _inherits from '@babel/runtime/helpers/inherits';
17
17
  import _regeneratorRuntime from '@babel/runtime/regenerator';
18
18
  import _typeof from '@babel/runtime/helpers/typeof';
19
- import flat, { flatten, unflatten } from 'flat';
19
+ import { flatten, unflatten } from 'flat';
20
20
  import { compare } from 'fast-json-patch';
21
21
  import { io } from 'socket.io-client';
22
22
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
23
23
  import { toJS, makeAutoObservable, observable, action, makeObservable } from 'mobx';
24
- import merge from 'deepmerge';
24
+ import mergeWith from 'lodash/mergeWith';
25
25
  import Tooltip from 'antd/es/tooltip';
26
26
  import RightOutlined from '@ant-design/icons/RightOutlined';
27
27
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -65,7 +65,8 @@ import FolderOutlined from '@ant-design/icons/FolderOutlined';
65
65
  import SettingOutlined from '@ant-design/icons/SettingOutlined';
66
66
  import PieChartOutlined from '@ant-design/icons/PieChartOutlined';
67
67
  import InfoCircleOutlined from '@ant-design/icons/InfoCircleOutlined';
68
- import { cloneDeep, merge as merge$1, mergeWith } from 'lodash';
68
+ import merge from 'lodash/merge';
69
+ import cloneDeep from 'lodash/cloneDeep';
69
70
  import DivaUtils$1, { nanoid, DivaError as DivaError$1 } from '@crystaldesign/diva-utils';
70
71
  import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
71
72
  import JSONEditor from 'jsoneditor';
@@ -73,10 +74,11 @@ import 'jsoneditor/dist/jsoneditor.css';
73
74
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
74
75
  import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, PushpinOutlined, PushpinFilled, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
75
76
  import classnames from 'classnames';
76
- import { Editor } from '@tinymce/tinymce-react';
77
+ import RTFEditor from '@crystaldesign/rtf-editor';
77
78
  import debounce from 'lodash/debounce';
78
79
  import Button$1 from 'antd/es/button';
79
80
  import Upload$1 from 'antd/es/upload';
81
+ import DownOutlined from '@ant-design/icons/lib/icons/DownOutlined';
80
82
  import Space$1 from 'antd/es/space';
81
83
  import { stringify } from 'csv';
82
84
  import InfiniteScroll from 'react-infinite-scroll-component';
@@ -91,8 +93,9 @@ import QuestionCircleOutlined from '@ant-design/icons/QuestionCircleOutlined';
91
93
  import WarningTwoTone from '@ant-design/icons/WarningTwoTone';
92
94
  import CheckOutlined from '@ant-design/icons/lib/icons/CheckOutlined';
93
95
  import CloseOutlined from '@ant-design/icons/lib/icons/CloseOutlined';
96
+ import merge$1 from 'deepmerge';
94
97
  import { ContentBoxComponent } from '@crystaldesign/content-box';
95
- import { AgChartsReact } from 'ag-charts-react';
98
+ import { AgCharts } from 'ag-charts-react';
96
99
  import { Histogram } from '@crystaldesign/analytics';
97
100
  import dayjs from 'dayjs';
98
101
  import advancedFormat from 'dayjs/plugin/advancedFormat';
@@ -142,7 +145,7 @@ function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r
142
145
  function _arrayLikeToArray$m(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
143
146
  function ownKeys$N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
144
147
  function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$N(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
145
- var LOG$c = getLogger('Backoffice', 'AplyMapping');
148
+ var LOG$d = getLogger('Backoffice', 'AplyMapping');
146
149
  function aplyMapping (_ref) {
147
150
  var mapable = _ref.mapable,
148
151
  mappingData = _ref.mappingData,
@@ -286,7 +289,7 @@ function aplyMapping (_ref) {
286
289
  }
287
290
  return returnValue;
288
291
  } catch (e) {
289
- LOG$c.debug('Mapabledata', mapable);
292
+ LOG$d.debug('Mapabledata', mapable);
290
293
  throw e;
291
294
  }
292
295
  }
@@ -448,7 +451,7 @@ function getLeafColumns(columns) {
448
451
 
449
452
  function ownKeys$M(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
450
453
  function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$M(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$M(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
451
- var LOG$b = getLogger('Backoffice', 'ApiHandler');
454
+ var LOG$c = getLogger('Backoffice', 'ApiHandler');
452
455
  var jp = require('jsonpath');
453
456
  var _default$d = /*#__PURE__*/function () {
454
457
  function _default(configuration, _rootStore) {
@@ -1125,16 +1128,16 @@ var _default$d = /*#__PURE__*/function () {
1125
1128
  }
1126
1129
  });
1127
1130
  this._socket.on('error', function (error) {
1128
- LOG$b.error(new DivaError('Error on connection', error));
1131
+ LOG$c.error(new DivaError('Error on connection', error));
1129
1132
  });
1130
1133
  this._socket.on('connect_error', function (error) {
1131
- LOG$b.log("connect_error due to ".concat(error.message));
1134
+ LOG$c.log("connect_error due to ".concat(error.message));
1132
1135
  });
1133
1136
  this._socket.on('connect', function () {
1134
- LOG$b.debug('Successfully connected to socket');
1137
+ LOG$c.debug('Successfully connected to socket');
1135
1138
  });
1136
1139
  this._socket.on('disconnect', function () {
1137
- LOG$b.debug('Disconnect from socket');
1140
+ LOG$c.debug('Disconnect from socket');
1138
1141
  });
1139
1142
  return this._socket;
1140
1143
  }
@@ -1715,8 +1718,8 @@ var _default$7 = /*#__PURE__*/function () {
1715
1718
  function _default(root) {
1716
1719
  _classCallCheck(this, _default);
1717
1720
  this.root = root;
1718
- _defineProperty(this, "_configuration", void 0);
1719
- _defineProperty(this, "_apiConfig", void 0);
1721
+ _defineProperty(this, "_configuration", undefined);
1722
+ _defineProperty(this, "_apiConfig", undefined);
1720
1723
  makeAutoObservable(this, {
1721
1724
  root: false,
1722
1725
  fetchConfiguration: false
@@ -1760,10 +1763,9 @@ var _default$7 = /*#__PURE__*/function () {
1760
1763
 
1761
1764
  //merge with configuration so everything can changed by config
1762
1765
  if (config.configuration) {
1763
- configuration = merge(configuration, config.configuration, {
1764
- arrayMerge: function arrayMerge(_, s) {
1765
- return s;
1766
- }
1766
+ configuration = mergeWith(configuration, config.configuration, function (obj, src) {
1767
+ if (Array.isArray(obj) && Array.isArray(src) && obj.length != src.length) return src;
1768
+ return undefined;
1767
1769
  });
1768
1770
  }
1769
1771
 
@@ -3144,17 +3146,6 @@ function loadConfiguration(t, root, config, lang) {
3144
3146
  }]
3145
3147
  }
3146
3148
  },
3147
- GroupContentItems: {
3148
- type: 'Group',
3149
- items: [{
3150
- id: 'ContentItems',
3151
- type: 'Table'
3152
- }, {
3153
- id: 'ContentItemsTemplate',
3154
- type: 'Table'
3155
- }],
3156
- setSelectedOrganization: true
3157
- },
3158
3149
  ContentItems: {
3159
3150
  title: t('backoffice.table.contentitems.title'),
3160
3151
  type: 'Table',
@@ -3162,18 +3153,33 @@ function loadConfiguration(t, root, config, lang) {
3162
3153
  pagination: {
3163
3154
  pageSize: 50
3164
3155
  },
3156
+ filter: {
3157
+ toggle: {
3158
+ fields: ['onlyTemplates'],
3159
+ label: t('backoffice.table.contentitemstemplate.title'),
3160
+ labelOff: t('backoffice.table.contentitems.toggleOff'),
3161
+ inQuery: true
3162
+ }
3163
+ },
3165
3164
  copyAction: {
3166
3165
  actionType: 'Detail',
3167
3166
  type: 'Form',
3168
3167
  id: 'FormEditContentItem',
3168
+ disableOnMultiselect: true,
3169
+ resetToggleAfter: true,
3169
3170
  title: t('backoffice.table.contentItem.copyAction.title'),
3170
3171
  label: t('backoffice.table.services.copyAction.label'),
3171
- disableOnMultiselect: true,
3172
3172
  mapping: {
3173
3173
  type: 'body',
3174
3174
  map: [{
3175
3175
  targetField: 'content',
3176
3176
  sourceField: 'content'
3177
+ }, {
3178
+ targetField: 'catalogName',
3179
+ sourceField: 'catalogName'
3180
+ }, {
3181
+ targetField: 'supplierName',
3182
+ sourceField: 'supplierName'
3177
3183
  }, {
3178
3184
  targetField: 'description',
3179
3185
  sourceField: 'description'
@@ -3183,10 +3189,18 @@ function loadConfiguration(t, root, config, lang) {
3183
3189
  }]
3184
3190
  }
3185
3191
  },
3192
+ createAction: {
3193
+ actionType: 'Detail',
3194
+ type: 'JsonEditor',
3195
+ id: 'JsonEditorCreateContentItem',
3196
+ title: t('backoffice.table.contentItem.label.create'),
3197
+ label: t('backoffice.table.contentItem.label.create'),
3198
+ permission: 'backoffice_create_contentitem_template'
3199
+ },
3186
3200
  deleteAction: {
3187
3201
  disabled: function disabled(datas) {
3188
3202
  return (datas === null || datas === void 0 ? void 0 : datas.find(function (d) {
3189
- return !d.organizationId;
3203
+ return !(d !== null && d !== void 0 && d.organizationId);
3190
3204
  })) && !root.actions.userHasPermission('backoffice_delete_contentitem_template');
3191
3205
  }
3192
3206
  },
@@ -3217,6 +3231,7 @@ function loadConfiguration(t, root, config, lang) {
3217
3231
  }, {
3218
3232
  title: t('backoffice.table.views.lastUpdated'),
3219
3233
  field: 'lastUpdated',
3234
+ defaultSortOrder: 'descend',
3220
3235
  type: 'unixTimeStamp',
3221
3236
  sorter: 1,
3222
3237
  filter: 'advanced',
@@ -3238,106 +3253,6 @@ function loadConfiguration(t, root, config, lang) {
3238
3253
  filter: 'advanced',
3239
3254
  width: 150
3240
3255
  }],
3241
- rowAction: [{
3242
- actionType: 'Detail',
3243
- disabled: function disabled(data) {
3244
- return !(data !== null && data !== void 0 && data.organizationId) && !root.actions.userHasPermission('backoffice_edit_contentitem_template');
3245
- },
3246
- disableOnMultiselect: true,
3247
- type: 'Form',
3248
- id: 'FormEditContentItem',
3249
- title: t('backoffice.table.contentItem.edit'),
3250
- label: t('backoffice.edit')
3251
- }, {
3252
- disableOnMultiselect: true,
3253
- actionType: 'Detail',
3254
- permission: 'backoffice_edit_contentitem_template',
3255
- type: 'JsonEditor',
3256
- label: t('backoffice.table.contentItem.editjson'),
3257
- id: 'JsonEditorEditContentItem',
3258
- title: t('backoffice.table.contentItem.edit')
3259
- }],
3260
- apiInterface: {
3261
- read: {
3262
- list: '${catalogService}/contentItems',
3263
- filterServerSide: true
3264
- },
3265
- "delete": '${catalogService}/contentItems/${id}'
3266
- }
3267
- },
3268
- ContentItemsTemplate: {
3269
- title: t('backoffice.table.contentitemstemplate.title'),
3270
- type: 'Table',
3271
- canRefresh: true,
3272
- pagination: {
3273
- pageSize: 50
3274
- },
3275
- copyAction: {
3276
- actionType: 'Detail',
3277
- type: 'Form',
3278
- id: 'FormEditContentItem',
3279
- disableOnMultiselect: true,
3280
- title: t('backoffice.table.contentItem.copyAction.title'),
3281
- label: t('backoffice.table.services.copyAction.label'),
3282
- mapping: {
3283
- type: 'body',
3284
- map: [{
3285
- targetField: 'content',
3286
- sourceField: 'content'
3287
- }, {
3288
- targetField: 'description',
3289
- sourceField: 'description'
3290
- }, {
3291
- targetField: 'organizationId',
3292
- globalValue: 'organizationId'
3293
- }]
3294
- }
3295
- },
3296
- createAction: {
3297
- actionType: 'Detail',
3298
- type: 'JsonEditor',
3299
- id: 'JsonEditorCreateContentItem',
3300
- title: t('backoffice.table.contentItem.label.create'),
3301
- label: t('backoffice.table.contentItem.label.create'),
3302
- permission: 'backoffice_create_contentitem_template'
3303
- },
3304
- deleteAction: {
3305
- disabled: function disabled(datas) {
3306
- return (datas === null || datas === void 0 ? void 0 : datas.find(function (d) {
3307
- return !d.organizationId;
3308
- })) && !root.actions.userHasPermission('backoffice_delete_contentitem_template');
3309
- }
3310
- },
3311
- columns: [{
3312
- title: t('backoffice.table.roles.columns.description'),
3313
- field: 'description',
3314
- sorter: 1,
3315
- filter: 'advanced',
3316
- width: 500
3317
- }, {
3318
- title: t('backoffice.table.views.lastUpdatedBy'),
3319
- field: 'lastUpdatedBy_displayText',
3320
- sorter: 1,
3321
- filter: 'advanced',
3322
- width: 150
3323
- }, {
3324
- title: t('backoffice.table.views.lastUpdated'),
3325
- field: 'lastUpdated',
3326
- type: 'unixTimeStamp',
3327
- sorter: 1,
3328
- filter: 'advanced',
3329
- width: 200
3330
- }, {
3331
- title: 'backoffice.content',
3332
- field: 'content',
3333
- hidden: true
3334
- }, {
3335
- title: t('backoffice._id'),
3336
- field: '_id',
3337
- sorter: 1,
3338
- filter: 'advanced',
3339
- width: 100
3340
- }],
3341
3256
  rowAction: [{
3342
3257
  actionType: 'Detail',
3343
3258
  disabled: function disabled(data) {
@@ -3369,7 +3284,7 @@ function loadConfiguration(t, root, config, lang) {
3369
3284
  }],
3370
3285
  apiInterface: {
3371
3286
  read: {
3372
- list: '${catalogService}/contentItems?onlyTemplates=true',
3287
+ list: '${catalogService}/contentItems',
3373
3288
  filterServerSide: true
3374
3289
  },
3375
3290
  "delete": '${catalogService}/contentItems/${id}'
@@ -7260,6 +7175,7 @@ function loadConfiguration(t, root, config, lang) {
7260
7175
  mode: 'multiple',
7261
7176
  values: ['de', 'en', 'fr', 'it'],
7262
7177
  permission: 'backoffice_admin_organizations',
7178
+ canSetToUndefined: true,
7263
7179
  hidden: function hidden(data) {
7264
7180
  return (data === null || data === void 0 ? void 0 : data.type) === undefined || (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) !== 'SUPPLIER';
7265
7181
  },
@@ -7624,6 +7540,7 @@ function loadConfiguration(t, root, config, lang) {
7624
7540
  }, {
7625
7541
  name: 'mediaItemImage',
7626
7542
  type: 'media',
7543
+ hideTrash: true,
7627
7544
  allowedTypes: ['image/*'],
7628
7545
  mediaItemRefField: 'mediaItemRefImage',
7629
7546
  urlField: 'image',
@@ -7644,6 +7561,7 @@ function loadConfiguration(t, root, config, lang) {
7644
7561
  }, {
7645
7562
  name: 'mediaItemVideo',
7646
7563
  type: 'media',
7564
+ hideTrash: true,
7647
7565
  allowedTypes: ['video/*'],
7648
7566
  mediaItemRefField: 'mediaItemRefVideo',
7649
7567
  urlField: 'video',
@@ -12250,16 +12168,10 @@ var menu = [{
12250
12168
  }
12251
12169
  }]
12252
12170
  }, {
12253
- id: 'GroupContentItems',
12171
+ id: 'ContentItems',
12254
12172
  path: 'contentitems',
12255
12173
  label: 'backoffice.menu.items.label.ContentItems',
12256
- icon: 'OrderedListOutlined',
12257
- rules: [{
12258
- match: {
12259
- value: ['RETAILER', 'ASSOCIATION'],
12260
- globalValue: 'organization.parentType'
12261
- }
12262
- }]
12174
+ icon: 'OrderedListOutlined'
12263
12175
  }, {
12264
12176
  id: 'idmTables',
12265
12177
  path: 'idm',
@@ -12787,7 +12699,7 @@ var _default$3 = /*#__PURE__*/function () {
12787
12699
  function _createForOfIteratorHelper$k(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12788
12700
  function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$k(r, a) : void 0; } }
12789
12701
  function _arrayLikeToArray$k(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
12790
- var LOG$a = getLogger('Backoffice', 'DownloadStore');
12702
+ var LOG$b = getLogger('Backoffice', 'DownloadStore');
12791
12703
  var DownloadStore = /*#__PURE__*/function () {
12792
12704
  function DownloadStore(_rootStore) {
12793
12705
  var _this = this;
@@ -12817,7 +12729,7 @@ var DownloadStore = /*#__PURE__*/function () {
12817
12729
  _iterator = _createForOfIteratorHelper$k(action.download);
12818
12730
  _context2.prev = 8;
12819
12731
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
12820
- var _download$params, _ref3, _data$fileUrl;
12732
+ var _download$params, _data$fileFormat, _data$fileUrl;
12821
12733
  var url;
12822
12734
  return _regeneratorRuntime.wrap(function _loop$(_context) {
12823
12735
  while (1) switch (_context.prev = _context.next) {
@@ -12847,7 +12759,7 @@ var DownloadStore = /*#__PURE__*/function () {
12847
12759
  url.searchParams.append(param.name, param.value);
12848
12760
  });
12849
12761
  _context.next = 14;
12850
- return _this.donwloadFile(url, (_ref3 = (data === null || data === void 0 ? void 0 : data.fileName) + '.' + data.fileFormat) !== null && _ref3 !== void 0 ? _ref3 : data === null || data === void 0 || (_data$fileUrl = data.fileUrl) === null || _data$fileUrl === void 0 ? void 0 : _data$fileUrl.substring((data === null || data === void 0 ? void 0 : data.fileUrl.lastIndexOf('.')) + 1));
12762
+ return _this.donwloadFile(url, (data === null || data === void 0 ? void 0 : data.fileName) + '.' + ((_data$fileFormat = data.fileFormat) !== null && _data$fileFormat !== void 0 ? _data$fileFormat : data === null || data === void 0 || (_data$fileUrl = data.fileUrl) === null || _data$fileUrl === void 0 ? void 0 : _data$fileUrl.substring((data === null || data === void 0 ? void 0 : data.fileUrl.lastIndexOf('.')) + 1)));
12851
12763
  case 14:
12852
12764
  return _context.abrupt("break", 24);
12853
12765
  case 15:
@@ -13003,7 +12915,7 @@ var DownloadStore = /*#__PURE__*/function () {
13003
12915
  _context5.next = 4;
13004
12916
  break;
13005
12917
  }
13006
- LOG$a.debug("The organization ".concat(data._id, " has no parentType of ").concat(validTypes.join(' or ')));
12918
+ LOG$b.debug("The organization ".concat(data._id, " has no parentType of ").concat(validTypes.join(' or ')));
13007
12919
  throw new Error("Current organization is no ".concat(type == 'RETAILER' ? 'retailer, retailer channel or association' : 'supplier or dealer'));
13008
12920
  case 4:
13009
12921
  orgData = data;
@@ -13022,7 +12934,7 @@ var DownloadStore = /*#__PURE__*/function () {
13022
12934
  _context5.next = 14;
13023
12935
  break;
13024
12936
  }
13025
- LOG$a.debug("The organization ".concat(data._id, " has no type of ").concat(validTypes.join(' or '), " nor a parent organization"));
12937
+ LOG$b.debug("The organization ".concat(data._id, " has no type of ").concat(validTypes.join(' or '), " nor a parent organization"));
13026
12938
  throw new Error("Current organization is no ".concat(type == 'RETAILER' ? 'retailer channel or association' : 'supplier or dealer'));
13027
12939
  case 14:
13028
12940
  _context5.prev = 14;
@@ -13638,24 +13550,34 @@ function isExternalVid(file) {
13638
13550
  }
13639
13551
 
13640
13552
  var VIDEO_THUMB_PLACEHOLDER = 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiBoZWlnaHQ9IjgwMHB4IiB3aWR0aD0iODAwcHgiIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgCgkgdmlld0JveD0iMCAwIDQ5IDQ5IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8Zz4KCQk8cGF0aCBkPSJNMzkuMjU2LDYuNUg5Ljc0NEM0LjM3MSw2LjUsMCwxMC44ODUsMCwxNi4yNzR2MTYuNDUxYzAsNS4zOSw0LjM3MSw5Ljc3NCw5Ljc0NCw5Ljc3NGgyOS41MTIKCQkJYzUuMzczLDAsOS43NDQtNC4zODUsOS43NDQtOS43NzRWMTYuMjc0QzQ5LDEwLjg4NSw0NC42MjksNi41LDM5LjI1Niw2LjV6IE00NywzMi43MjZjMCw0LjI4Ny0zLjQ3NCw3Ljc3NC03Ljc0NCw3Ljc3NEg5Ljc0NAoJCQlDNS40NzQsNDAuNSwyLDM3LjAxMiwyLDMyLjcyNlYxNi4yNzRDMiwxMS45ODgsNS40NzQsOC41LDkuNzQ0LDguNWgyOS41MTJjNC4yNywwLDcuNzQ0LDMuNDg4LDcuNzQ0LDcuNzc0VjMyLjcyNnoiLz4KCQk8cGF0aCBkPSJNMzMuMzYsMjQuMTM4bC0xMy44NTUtOC4xMTVjLTAuMzA4LTAuMTgtMC42OTEtMC4xODMtMS4wMDItMC4wMDVTMTgsMTYuNTI3LDE4LDE2Ljg4NnYxNi4yMjkKCQkJYzAsMC4zNTgsMC4xOTIsMC42OSwwLjUwMiwwLjg2OGMwLjE1NCwwLjA4OCwwLjMyNiwwLjEzMiwwLjQ5OCwwLjEzMmMwLjE3NSwwLDAuMzQ5LTAuMDQ2LDAuNTA1LTAuMTM3bDEzLjg1NS04LjExMwoJCQljMC4zMDYtMC4xNzksMC40OTUtMC41MDgsMC40OTUtMC44NjNTMzMuNjY3LDI0LjMxNywzMy4zNiwyNC4xMzh6IE0yMCwzMS4zN1YxOC42M2wxMC44NzYsNi4zNzFMMjAsMzEuMzd6Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+';
13553
+ var LOG$a = getLogger('Backoffice', 'MediaItem');
13641
13554
  var MediaItem = /*#__PURE__*/function () {
13642
- function MediaItem(media, config, mediaItemId, medaItemRefId) {
13555
+ function MediaItem(_ref) {
13556
+ var media = _ref.media,
13557
+ remoteUrl = _ref.remoteUrl,
13558
+ config = _ref.config,
13559
+ mediaItemId = _ref.mediaItemId,
13560
+ mediaItemRefId = _ref.mediaItemRefId;
13643
13561
  _classCallCheck(this, MediaItem);
13644
- this.config = config;
13645
13562
  _defineProperty(this, "_url", void 0);
13646
13563
  _defineProperty(this, "_file", void 0);
13647
13564
  _defineProperty(this, "_mediaItemId", void 0);
13648
13565
  _defineProperty(this, "_mediaItemRefId", void 0);
13649
13566
  _defineProperty(this, "_itemRef", void 0);
13650
13567
  _defineProperty(this, "_isRemoteUrl", void 0);
13568
+ _defineProperty(this, "_config", void 0);
13569
+ this._config = config;
13651
13570
  if (typeof media === 'string') {
13652
13571
  this._url = media;
13653
- this._isRemoteUrl = isExternalVid(media);
13572
+ if (!this._url.startsWith('http')) {
13573
+ this._url = "https://".concat(this._url);
13574
+ }
13575
+ this._isRemoteUrl = remoteUrl ? true : isExternalVid(media);
13654
13576
  } else {
13655
13577
  this._file = media;
13656
13578
  }
13657
13579
  this._mediaItemId = mediaItemId;
13658
- this._mediaItemRefId = medaItemRefId;
13580
+ this._mediaItemRefId = mediaItemRefId;
13659
13581
  }
13660
13582
  return _createClass(MediaItem, [{
13661
13583
  key: "file",
@@ -13680,10 +13602,10 @@ var MediaItem = /*#__PURE__*/function () {
13680
13602
  }, {
13681
13603
  key: "antdFile",
13682
13604
  get: function get() {
13683
- var _this$_itemRef$_id, _this$_itemRef, _ref, _this$_itemRef$fileNa, _this$_itemRef2, _this$_file, _this$_url;
13605
+ var _this$_itemRef$_id, _this$_itemRef, _ref2, _this$_itemRef$fileNa, _this$_itemRef2, _this$_file, _this$_url;
13684
13606
  return {
13685
13607
  uid: (_this$_itemRef$_id = (_this$_itemRef = this._itemRef) === null || _this$_itemRef === void 0 ? void 0 : _this$_itemRef._id) !== null && _this$_itemRef$_id !== void 0 ? _this$_itemRef$_id : nanoid(),
13686
- name: this._isRemoteUrl ? this._url : (_ref = (_this$_itemRef$fileNa = (_this$_itemRef2 = this._itemRef) === null || _this$_itemRef2 === void 0 ? void 0 : _this$_itemRef2.fileName) !== null && _this$_itemRef$fileNa !== void 0 ? _this$_itemRef$fileNa : (_this$_file = this._file) === null || _this$_file === void 0 ? void 0 : _this$_file.name) !== null && _ref !== void 0 ? _ref : nameFromUrl((_this$_url = this._url) !== null && _this$_url !== void 0 ? _this$_url : ''),
13608
+ name: this._isRemoteUrl ? this._url : (_ref2 = (_this$_itemRef$fileNa = (_this$_itemRef2 = this._itemRef) === null || _this$_itemRef2 === void 0 ? void 0 : _this$_itemRef2.fileName) !== null && _this$_itemRef$fileNa !== void 0 ? _this$_itemRef$fileNa : (_this$_file = this._file) === null || _this$_file === void 0 ? void 0 : _this$_file.name) !== null && _ref2 !== void 0 ? _ref2 : nameFromUrl((_this$_url = this._url) !== null && _this$_url !== void 0 ? _this$_url : ''),
13687
13609
  url: this._url,
13688
13610
  thumbUrl: this._isRemoteUrl ? VIDEO_THUMB_PLACEHOLDER : undefined
13689
13611
  };
@@ -13704,7 +13626,7 @@ var MediaItem = /*#__PURE__*/function () {
13704
13626
  return _context.abrupt("return");
13705
13627
  case 4:
13706
13628
  _context.next = 6;
13707
- return removeMediaItemRef(this.config.baseUrl, this.config.jwt, this._mediaItemRefId);
13629
+ return removeMediaItemRef(this._config.baseUrl, this._config.jwt, this._mediaItemRefId);
13708
13630
  case 6:
13709
13631
  this._mediaItemId = undefined;
13710
13632
  this._mediaItemRefId = undefined;
@@ -13728,45 +13650,55 @@ var MediaItem = /*#__PURE__*/function () {
13728
13650
  while (1) switch (_context2.prev = _context2.next) {
13729
13651
  case 0:
13730
13652
  if (!this._mediaItemRefId) {
13731
- _context2.next = 5;
13653
+ _context2.next = 12;
13732
13654
  break;
13733
13655
  }
13734
- _context2.next = 3;
13735
- return getMediaItemRef(this.config.baseUrl, this.config.jwt, this._mediaItemRefId);
13736
- case 3:
13656
+ _context2.prev = 1;
13657
+ _context2.next = 4;
13658
+ return getMediaItemRef(this._config.baseUrl, this._config.jwt, this._mediaItemRefId);
13659
+ case 4:
13737
13660
  this._itemRef = _context2.sent;
13738
13661
  this._url = this._itemRef.url;
13739
- case 5:
13662
+ _context2.next = 12;
13663
+ break;
13664
+ case 8:
13665
+ _context2.prev = 8;
13666
+ _context2.t0 = _context2["catch"](1);
13667
+ this._mediaItemRefId = undefined;
13668
+ LOG$a.error(new DivaError$1('Failed to get media item ref, on next upload a new ref will be created', {
13669
+ cause: _context2.t0
13670
+ }));
13671
+ case 12:
13740
13672
  if (!(this.file && !this._url)) {
13741
- _context2.next = 11;
13673
+ _context2.next = 18;
13742
13674
  break;
13743
13675
  }
13744
- _context2.next = 8;
13676
+ _context2.next = 15;
13745
13677
  return getFileAsDataUri(this.file);
13746
- case 8:
13678
+ case 15:
13747
13679
  this._url = _context2.sent;
13748
- _context2.next = 15;
13680
+ _context2.next = 22;
13749
13681
  break;
13750
- case 11:
13682
+ case 18:
13751
13683
  if (!(this._url && !this._file && !this._isRemoteUrl)) {
13752
- _context2.next = 15;
13684
+ _context2.next = 22;
13753
13685
  break;
13754
13686
  }
13755
- _context2.next = 14;
13687
+ _context2.next = 21;
13756
13688
  return fetchFileData(this._url);
13757
- case 14:
13689
+ case 21:
13758
13690
  this._file = _context2.sent;
13759
- case 15:
13691
+ case 22:
13760
13692
  if (!(this.file && !isFileOfType(this.file, allowedTypes))) {
13761
- _context2.next = 17;
13693
+ _context2.next = 24;
13762
13694
  break;
13763
13695
  }
13764
13696
  throw new Error('File type is not allowed');
13765
- case 17:
13697
+ case 24:
13766
13698
  case "end":
13767
13699
  return _context2.stop();
13768
13700
  }
13769
- }, _callee2, this);
13701
+ }, _callee2, this, [[1, 8]]);
13770
13702
  }));
13771
13703
  function init(_x) {
13772
13704
  return _init.apply(this, arguments);
@@ -13811,7 +13743,7 @@ var MediaItem = /*#__PURE__*/function () {
13811
13743
  }));
13812
13744
  formData.append('file', this._file, this._file.name);
13813
13745
  _context3.next = 12;
13814
- return uploadMediaItem(this.config.baseUrl, this.config.jwt, formData);
13746
+ return uploadMediaItem(this._config.baseUrl, this._config.jwt, formData);
13815
13747
  case 12:
13816
13748
  response = _context3.sent;
13817
13749
  this._mediaItemRefId = response.ref._id;
@@ -13879,6 +13811,7 @@ function useFormData (_ref) {
13879
13811
  removedMedias = _useState12[0],
13880
13812
  setRemovedMedias = _useState12[1];
13881
13813
  var _useMemo = useMemo(function () {
13814
+ setCanSave === null || setCanSave === void 0 || setCanSave(true);
13882
13815
  var c = {
13883
13816
  apiHandler: root.getApiHandler(id, apiInterface),
13884
13817
  configuration: root.configurationStore.getConfiguration(id, 'Form')
@@ -13894,7 +13827,7 @@ function useFormData (_ref) {
13894
13827
  if (configuration.disableSave) setCanSave === null || setCanSave === void 0 || setCanSave(false);
13895
13828
  }, [configuration]);
13896
13829
  var _onLoadFields = function onLoadFields(data) {
13897
- var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items;
13830
+ var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.itemSelector && Array.isArray(configuration.items[0])) ? configuration.items[0] : configuration.items;
13898
13831
  var _iterator = _createForOfIteratorHelper$j(items),
13899
13832
  _step;
13900
13833
  try {
@@ -13909,10 +13842,15 @@ function useFormData (_ref) {
13909
13842
  var ref = typeof item.mediaItemRefField == 'string' ? [item.mediaItemRefField] : item.mediaItemRefField;
13910
13843
  var media = getData(itemName, data);
13911
13844
  if (media) {
13912
- var mediaItem = new MediaItem(getData(urlName, data), {
13913
- baseUrl: root.configurationStore.apiConfig.mediaService,
13914
- jwt: root.dataStore.jwt
13915
- }, media, getData(ref, data));
13845
+ var mediaItem = new MediaItem({
13846
+ media: getData(urlName, data),
13847
+ config: {
13848
+ baseUrl: root.configurationStore.apiConfig.mediaService,
13849
+ jwt: root.dataStore.jwt
13850
+ },
13851
+ mediaItemId: media,
13852
+ mediaItemRefId: getData(ref, data)
13853
+ });
13916
13854
  mediaItem.init(item.allowedTypes);
13917
13855
  setFieldInObject(itemName, data, mediaItem);
13918
13856
  }
@@ -14015,21 +13953,25 @@ function useFormData (_ref) {
14015
13953
  _context.next = 17;
14016
13954
  break;
14017
13955
  }
13956
+ if (configuration.showProgressBar) setProgressBarPercentage(i > 0 ? Math.floor(i / multipleEditingData.length * 100) : 1);
14018
13957
  original = multipleEditingData[i];
14019
13958
  _newData = setNewData(newData, JSON.parse(JSON.stringify(original)));
14020
13959
  _context.t0 = response;
14021
- _context.next = 11;
13960
+ _context.next = 12;
14022
13961
  return apiHandler.update(_newData, original, configuration.mapping);
14023
- case 11:
13962
+ case 12:
14024
13963
  _context.t1 = _context.sent;
14025
13964
  _context.t0.push.call(_context.t0, _context.t1);
14026
- if (configuration.showProgressBar) setProgressBarPercentage(Math.abs((i + 1 / multipleEditingData.length) * 100));
14027
13965
  case 14:
14028
13966
  i++;
14029
13967
  _context.next = 5;
14030
13968
  break;
14031
13969
  case 17:
14032
- if (configuration.showProgressBar) setProgressBarOpen(false);
13970
+ if (configuration.showProgressBar) {
13971
+ if (configuration.showProgressBar) setProgressBarPercentage(100);
13972
+ setProgressBarOpen(false);
13973
+ setProgressBarPercentage(0);
13974
+ }
14033
13975
  _context.next = 23;
14034
13976
  break;
14035
13977
  case 20:
@@ -14084,34 +14026,44 @@ function useFormData (_ref) {
14084
14026
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
14085
14027
  while (1) switch (_context2.prev = _context2.next) {
14086
14028
  case 0:
14087
- newData = merge$1(_objectSpread$I({}, state.data), values);
14029
+ newData = merge(_objectSpread$I({}, state.data), values);
14088
14030
  if (!skipApi) {
14089
14031
  _context2.next = 3;
14090
14032
  break;
14091
14033
  }
14092
14034
  return _context2.abrupt("return", newData);
14093
14035
  case 3:
14094
- _context2.next = 5;
14036
+ root.actions.toggleLoading('saving_form');
14037
+ _context2.prev = 4;
14038
+ _context2.next = 7;
14095
14039
  return setDynamicFields(_objectSpread$I({}, state.data), newData);
14096
- case 5:
14040
+ case 7:
14097
14041
  newData = _context2.sent;
14098
- _context2.next = 8;
14042
+ _context2.next = 10;
14099
14043
  return preSaveProcess(newData, selectedItems !== null && selectedItems !== void 0 ? selectedItems : configuration.items);
14100
- case 8:
14044
+ case 10:
14101
14045
  newData = removeEmpty(newData);
14046
+ _context2.next = 17;
14047
+ break;
14048
+ case 13:
14049
+ _context2.prev = 13;
14050
+ _context2.t0 = _context2["catch"](4);
14051
+ root.actions.toggleLoading('saving_form');
14052
+ throw _context2.t0;
14053
+ case 17:
14102
14054
  setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
14103
14055
  loading: true
14104
14056
  }));
14105
14057
  finalData = state.data;
14106
- _context2.prev = 11;
14107
- _context2.next = 14;
14058
+ _context2.prev = 19;
14059
+ _context2.next = 22;
14108
14060
  return apiCall(newData);
14109
- case 14:
14061
+ case 22:
14110
14062
  response = _context2.sent;
14111
14063
  i = 0;
14112
- case 16:
14064
+ case 24:
14113
14065
  if (!(i < (((_configuration$additi = configuration.additionals) === null || _configuration$additi === void 0 ? void 0 : _configuration$additi.length) || 0))) {
14114
- _context2.next = 26;
14066
+ _context2.next = 34;
14115
14067
  break;
14116
14068
  }
14117
14069
  // perform additional server actions before returning the data
@@ -14123,47 +14075,52 @@ function useFormData (_ref) {
14123
14075
  if (additional.addBaseUrl) {
14124
14076
  data[additional.addBaseUrl] = window.location.origin;
14125
14077
  }
14126
- _context2.next = 23;
14078
+ _context2.next = 31;
14127
14079
  return additionalApi.create(data, additional.mapping, response);
14128
- case 23:
14080
+ case 31:
14129
14081
  i++;
14130
- _context2.next = 16;
14082
+ _context2.next = 24;
14131
14083
  break;
14132
- case 26:
14084
+ case 34:
14133
14085
  finalData = response;
14134
14086
  return _context2.abrupt("return", response);
14135
- case 30:
14136
- _context2.prev = 30;
14137
- _context2.t0 = _context2["catch"](11);
14138
- if (!(_context2.t0 instanceof DivaError && _context2.t0.name)) {
14139
- _context2.next = 38;
14087
+ case 38:
14088
+ _context2.prev = 38;
14089
+ _context2.t1 = _context2["catch"](19);
14090
+ if (configuration.showProgressBar) {
14091
+ setProgressBarOpen(false);
14092
+ setProgressBarPercentage(0);
14093
+ }
14094
+ if (!(_context2.t1 instanceof DivaError && _context2.t1.name)) {
14095
+ _context2.next = 47;
14140
14096
  break;
14141
14097
  }
14142
- errorCode = _context2.t0.name;
14098
+ errorCode = _context2.t1.name;
14143
14099
  item = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.find(function (item) {
14144
14100
  var _item$onError;
14145
14101
  return (_item$onError = item.onError) === null || _item$onError === void 0 ? void 0 : _item$onError[errorCode];
14146
14102
  });
14147
14103
  if (!item) {
14148
- _context2.next = 38;
14104
+ _context2.next = 47;
14149
14105
  break;
14150
14106
  }
14151
14107
  setFieldErrors(_objectSpread$I(_objectSpread$I({}, fieldErrors), {}, _defineProperty({}, item.name.toString(), item.onError[errorCode])));
14152
14108
  return _context2.abrupt("return", undefined);
14153
- case 38:
14154
- throw _context2.t0;
14155
- case 39:
14156
- _context2.prev = 39;
14109
+ case 47:
14110
+ throw _context2.t1;
14111
+ case 48:
14112
+ _context2.prev = 48;
14113
+ root.actions.toggleLoading('saving_form');
14157
14114
  setState(_objectSpread$I(_objectSpread$I({}, state), {}, {
14158
14115
  data: finalData,
14159
14116
  loading: false
14160
14117
  }));
14161
- return _context2.finish(39);
14162
- case 42:
14118
+ return _context2.finish(48);
14119
+ case 52:
14163
14120
  case "end":
14164
14121
  return _context2.stop();
14165
14122
  }
14166
- }, _callee2, null, [[11, 30, 39, 42]]);
14123
+ }, _callee2, null, [[4, 13], [19, 38, 48, 52]]);
14167
14124
  }));
14168
14125
  return function onSave(_x2) {
14169
14126
  return _ref3.apply(this, arguments);
@@ -14212,7 +14169,7 @@ function useFormData (_ref) {
14212
14169
 
14213
14170
  //if at an array an entry got added or deleted, its handeled by and so we take the data from the formdata
14214
14171
  var mergeCustomizer = function mergeCustomizer(obj, src) {
14215
- if (Array.isArray(obj) && obj.length != src.length) return src;
14172
+ if (Array.isArray(obj) && Array.isArray(src) && obj.length != src.length) return src;
14216
14173
  return undefined;
14217
14174
  };
14218
14175
  var setNewData = function setNewData(newData, orig) {
@@ -14842,9 +14799,7 @@ var FormList$2 = function FormList(_ref) {
14842
14799
  }
14843
14800
  });
14844
14801
  };
14845
- var FormList$3 = observer(FormList$2, {
14846
- forwardRef: true
14847
- });
14802
+ var FormList$3 = observer(FormList$2);
14848
14803
 
14849
14804
  var ApiKey = function ApiKey(_ref) {
14850
14805
  var value = _ref.value,
@@ -15049,9 +15004,7 @@ var CustomButton = function CustomButton(_ref) {
15049
15004
  })
15050
15005
  });
15051
15006
  };
15052
- var CustomButton$1 = observer(CustomButton, {
15053
- forwardRef: true
15054
- });
15007
+ var CustomButton$1 = observer(CustomButton);
15055
15008
 
15056
15009
  var wrapper$5 = "wrapper-GVe2h";
15057
15010
  var buttonGroup = "button-group-GYt-T";
@@ -15089,7 +15042,7 @@ var SubTitle = function SubTitle(_ref) {
15089
15042
  };
15090
15043
  var SubTitle$1 = observer(SubTitle);
15091
15044
 
15092
- var InputComponent = function InputComponent(_ref) {
15045
+ var InputComponent = function InputComponent(_ref, ref) {
15093
15046
  var _item$value, _item$value4;
15094
15047
  var item = _ref.item,
15095
15048
  data = _ref.data,
@@ -15126,6 +15079,7 @@ var InputComponent = function InputComponent(_ref) {
15126
15079
  };
15127
15080
  if (item.type === 'password') {
15128
15081
  return /*#__PURE__*/jsx(Input.Password, {
15082
+ ref: ref,
15129
15083
  addonBefore: item.prefix,
15130
15084
  addonAfter: item.suffix,
15131
15085
  disabled: isReadonly(item, data),
@@ -15138,6 +15092,7 @@ var InputComponent = function InputComponent(_ref) {
15138
15092
  });
15139
15093
  }
15140
15094
  return /*#__PURE__*/jsx(Input, {
15095
+ ref: ref,
15141
15096
  addonBefore: item.prefix,
15142
15097
  addonAfter: item.suffix,
15143
15098
  disabled: isReadonly(item, data),
@@ -15148,9 +15103,7 @@ var InputComponent = function InputComponent(_ref) {
15148
15103
  }
15149
15104
  });
15150
15105
  };
15151
- var InputComponent$1 = observer(InputComponent, {
15152
- forwardRef: true
15153
- });
15106
+ var InputComponent$1 = observer(/*#__PURE__*/React.forwardRef(InputComponent));
15154
15107
 
15155
15108
  function _createForOfIteratorHelper$i(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$i(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
15156
15109
  function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$i(r, a) : void 0; } }
@@ -15166,7 +15119,7 @@ function getCombinedValues(data, pattern) {
15166
15119
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
15167
15120
  var _flatten$match$;
15168
15121
  var match = _step.value;
15169
- value = value.replace(match[0], (_flatten$match$ = flat(data)[match[1]]) !== null && _flatten$match$ !== void 0 ? _flatten$match$ : '');
15122
+ value = value.replace(match[0], (_flatten$match$ = flatten(data)[match[1]]) !== null && _flatten$match$ !== void 0 ? _flatten$match$ : '');
15170
15123
  }
15171
15124
  } catch (err) {
15172
15125
  _iterator.e(err);
@@ -15314,7 +15267,7 @@ styleInject(css_248z$m);
15314
15267
  var _excluded$2 = ["apiInterface", "selectMapping", "apiMapping", "onChange", "value", "search", "options", "autoSelectFirst", "title"];
15315
15268
  function ownKeys$F(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15316
15269
  function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$F(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15317
- var SelectWrapper$1 = function SelectWrapper(_ref) {
15270
+ var SelectWrapper$1 = function SelectWrapper(_ref, ref) {
15318
15271
  var apiInterface = _ref.apiInterface,
15319
15272
  selectMapping = _ref.selectMapping,
15320
15273
  apiMapping = _ref.apiMapping,
@@ -15336,6 +15289,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
15336
15289
  autoSelectFirst: autoSelectFirst
15337
15290
  });
15338
15291
  return /*#__PURE__*/jsxs("div", {
15292
+ ref: ref,
15339
15293
  className: classnames(title ? wrapper$4 : undefined),
15340
15294
  children: [title, /*#__PURE__*/jsx(Select$1, _objectSpread$F(_objectSpread$F({}, selectProps), {}, {
15341
15295
  showSearch: search,
@@ -15348,9 +15302,7 @@ var SelectWrapper$1 = function SelectWrapper(_ref) {
15348
15302
  }))]
15349
15303
  });
15350
15304
  };
15351
- var SimpleSelect = observer(SelectWrapper$1, {
15352
- forwardRef: true
15353
- });
15305
+ var SimpleSelect = observer(/*#__PURE__*/forwardRef(SelectWrapper$1));
15354
15306
  var filterOption = function filterOption(input, option) {
15355
15307
  var _option$label;
15356
15308
  return ((_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : '').toLowerCase().includes(input.toLowerCase());
@@ -15360,28 +15312,16 @@ var RichTextEditor = function RichTextEditor(_ref) {
15360
15312
  var initValue = _ref.initValue,
15361
15313
  onChange = _ref.onChange,
15362
15314
  name = _ref.name;
15363
- var _useDivaCore = useDivaCore(),
15364
- tinyMceApiKey = _useDivaCore.state.tinyMceApiKey;
15365
15315
  var val = useRef(initValue);
15366
- return /*#__PURE__*/jsx(Editor, {
15367
- apiKey: tinyMceApiKey,
15368
- onEditorChange: function onEditorChange(val, e) {
15369
- onChange === null || onChange === void 0 || onChange(name, val);
15370
- },
15316
+ function handleChange(val) {
15317
+ onChange(name, val);
15318
+ }
15319
+ return /*#__PURE__*/jsx(RTFEditor, {
15371
15320
  initialValue: val.current,
15372
- textareaName: "text",
15373
- init: {
15374
- height: 500,
15375
- menubar: false,
15376
- plugins: ['advlist autolink lists link table paste'],
15377
- contextmenu: '',
15378
- resize: false,
15379
- statusbar: false,
15380
- toolbar: 'undo redo | formatselect | ' + 'bold italic backcolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | table ',
15381
- content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
15382
- }
15321
+ onChange: handleChange
15383
15322
  });
15384
15323
  };
15324
+ var RichTextEditor$1 = /*#__PURE__*/React.forwardRef(RichTextEditor);
15385
15325
 
15386
15326
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15387
15327
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -16807,7 +16747,7 @@ var SelectWrapper = function SelectWrapper(_ref) {
16807
16747
  filterOption: false,
16808
16748
  placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('filter.global'),
16809
16749
  allowClear: allowClear !== null && allowClear !== void 0 ? allowClear : filterServerSide,
16810
- showArrow: !filterServerSide || allowCreate || search,
16750
+ suffixIcon: filterServerSide && !allowCreate && !search ? null : undefined,
16811
16751
  mode: mode == 'single' ? undefined : mode,
16812
16752
  showSearch: filterServerSide || allowCreate || search,
16813
16753
  onSearch: filterServerSide || allowCreate || search ? state.fetch : undefined,
@@ -16823,9 +16763,7 @@ var SelectWrapper = function SelectWrapper(_ref) {
16823
16763
  value: selected
16824
16764
  });
16825
16765
  };
16826
- var Select = observer(SelectWrapper, {
16827
- forwardRef: true
16828
- });
16766
+ var Select = observer(SelectWrapper);
16829
16767
 
16830
16768
  var wrapper$3 = "wrapper-WStAk";
16831
16769
  var headerWrapper = "header-wrapper-gWQuH";
@@ -17089,9 +17027,7 @@ var Translation = function Translation(_ref) {
17089
17027
  })]
17090
17028
  });
17091
17029
  };
17092
- var Translation$1 = observer(Translation, {
17093
- forwardRef: true
17094
- });
17030
+ var Translation$1 = observer(Translation);
17095
17031
 
17096
17032
  function FileFromWeb (_ref) {
17097
17033
  var _onEnter = _ref.onEnter;
@@ -17101,8 +17037,8 @@ function FileFromWeb (_ref) {
17101
17037
  setUploadFromWeb = _useState2[1];
17102
17038
  if (uploadFromWeb) {
17103
17039
  return /*#__PURE__*/jsx(FileInput, {
17104
- onEnter: function onEnter(f) {
17105
- _onEnter(f);
17040
+ onEnter: function onEnter(f, copy) {
17041
+ _onEnter(f, copy);
17106
17042
  setUploadFromWeb(false);
17107
17043
  },
17108
17044
  onAbort: function onAbort() {
@@ -17136,6 +17072,8 @@ function FileInput(_ref3) {
17136
17072
  _useState4 = _slicedToArray(_useState3, 2),
17137
17073
  value = _useState4[0],
17138
17074
  setValue = _useState4[1];
17075
+ var _useTranslation2 = useTranslation(),
17076
+ t = _useTranslation2.t;
17139
17077
  return /*#__PURE__*/jsxs(Space, {
17140
17078
  direction: "horizontal",
17141
17079
  onClick: function onClick(e) {
@@ -17151,17 +17089,26 @@ function FileInput(_ref3) {
17151
17089
  value ? onEnter(value) : undefined;
17152
17090
  },
17153
17091
  allowClear: true
17154
- }), /*#__PURE__*/jsx(Button, {
17155
- onClick: function onClick() {
17156
- onEnter(value);
17092
+ }), /*#__PURE__*/jsx(Dropdown.Button, {
17093
+ icon: /*#__PURE__*/jsx(DownOutlined, {}),
17094
+ menu: {
17095
+ items: [{
17096
+ key: 'use',
17097
+ label: t('backoffice.mediaupload.upload'),
17098
+ onClick: function onClick() {
17099
+ onEnter(value);
17100
+ }
17101
+ }],
17102
+ onClick: function onClick() {
17103
+ return onEnter(value, true);
17104
+ }
17157
17105
  },
17158
- disabled: !value,
17159
- children: "\xDCbernehmen"
17106
+ children: t('backoffice.mediaupload.use')
17160
17107
  })]
17161
17108
  }), /*#__PURE__*/jsx(Button, {
17162
17109
  type: "link",
17163
17110
  onClick: onAbort,
17164
- children: "Abbrechen"
17111
+ children: t('backoffice.mediaupload.cancel')
17165
17112
  })]
17166
17113
  });
17167
17114
  }
@@ -17186,6 +17133,12 @@ function Upload (_ref) {
17186
17133
  return f.antdFile;
17187
17134
  });
17188
17135
  }, [files]);
17136
+ var _useState = useState(),
17137
+ _useState2 = _slicedToArray(_useState, 2),
17138
+ error = _useState2[0],
17139
+ setError = _useState2[1];
17140
+ var _useTranslation = useTranslation(),
17141
+ t = _useTranslation.t;
17189
17142
  useEffect(function () {
17190
17143
  _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
17191
17144
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -17234,21 +17187,22 @@ function Upload (_ref) {
17234
17187
  case 4:
17235
17188
  setFiles([media]);
17236
17189
  onAdd === null || onAdd === void 0 || onAdd(media);
17237
- _context2.next = 11;
17190
+ _context2.next = 12;
17238
17191
  break;
17239
17192
  case 8:
17240
17193
  _context2.prev = 8;
17241
17194
  _context2.t0 = _context2["catch"](1);
17242
17195
  onError === null || onError === void 0 || onError(_context2.t0);
17243
- case 11:
17244
- _context2.prev = 11;
17196
+ setError(_context2.t0.message);
17197
+ case 12:
17198
+ _context2.prev = 12;
17245
17199
  setLoading(false);
17246
- return _context2.finish(11);
17247
- case 14:
17200
+ return _context2.finish(12);
17201
+ case 15:
17248
17202
  case "end":
17249
17203
  return _context2.stop();
17250
17204
  }
17251
- }, _callee2, null, [[1, 8, 11, 14]]);
17205
+ }, _callee2, null, [[1, 8, 12, 15]]);
17252
17206
  }));
17253
17207
  return function addMediaItem(_x) {
17254
17208
  return _ref3.apply(this, arguments);
@@ -17262,31 +17216,45 @@ function Upload (_ref) {
17262
17216
  }
17263
17217
  };
17264
17218
  var beforeUpload = function beforeUpload(file) {
17265
- var mediaItem = new MediaItem(file, config);
17219
+ var mediaItem = new MediaItem({
17220
+ media: file,
17221
+ config: config
17222
+ });
17266
17223
  addMediaItem(mediaItem);
17267
17224
  return Upload$1.LIST_IGNORE;
17268
17225
  };
17269
- var onFileFormWeb = function onFileFormWeb(url) {
17270
- var mediaItem = new MediaItem(url, config);
17226
+ var onFileFormWeb = function onFileFormWeb(url, copy) {
17227
+ var mediaItem = new MediaItem({
17228
+ media: url,
17229
+ remoteUrl: !copy,
17230
+ config: config
17231
+ });
17271
17232
  addMediaItem(mediaItem);
17272
17233
  };
17273
- return /*#__PURE__*/jsx(Upload$1, {
17274
- listType: "picture",
17275
- maxCount: 1,
17276
- fileList: fileList,
17277
- beforeUpload: beforeUpload,
17278
- onRemove: onRemoveMedia,
17279
- accept: allowedTypes === null || allowedTypes === void 0 ? void 0 : allowedTypes.join(','),
17280
- children: /*#__PURE__*/jsxs(Space$1, {
17281
- direction: "horizontal",
17282
- children: [/*#__PURE__*/jsx(Button$1, {
17283
- type: "primary",
17284
- icon: /*#__PURE__*/jsx(UploadOutlined, {}),
17285
- loading: loading,
17286
- children: "Upload"
17287
- }), /*#__PURE__*/jsx(FileFromWeb, {
17288
- onEnter: onFileFormWeb
17289
- })]
17234
+ return /*#__PURE__*/jsx(Form$1.Item, {
17235
+ validateStatus: error ? 'error' : '',
17236
+ help: error ? t(error) : undefined,
17237
+ children: /*#__PURE__*/jsx(Upload$1, {
17238
+ listType: "picture",
17239
+ maxCount: 1,
17240
+ fileList: fileList,
17241
+ beforeUpload: beforeUpload,
17242
+ onRemove: onRemoveMedia,
17243
+ accept: allowedTypes === null || allowedTypes === void 0 ? void 0 : allowedTypes.join(','),
17244
+ showUploadList: {
17245
+ showRemoveIcon: !config.hideTrash
17246
+ },
17247
+ children: /*#__PURE__*/jsxs(Space$1, {
17248
+ direction: "horizontal",
17249
+ children: [/*#__PURE__*/jsx(Button$1, {
17250
+ type: "primary",
17251
+ icon: /*#__PURE__*/jsx(UploadOutlined, {}),
17252
+ loading: loading,
17253
+ children: "Upload"
17254
+ }), /*#__PURE__*/jsx(FileFromWeb, {
17255
+ onEnter: onFileFormWeb
17256
+ })]
17257
+ })
17290
17258
  })
17291
17259
  });
17292
17260
  }
@@ -17300,10 +17268,15 @@ function Media (_ref) {
17300
17268
  var urlPath = item.urlField ? absoluteName.slice(0, -1).concat(item.urlField) : undefined;
17301
17269
  var mediaItemRefId = mediaItemRefIdPath ? state.getData(mediaItemRefIdPath, state.data) : undefined;
17302
17270
  var url = urlPath ? state.getData(urlPath, state.data) : undefined;
17303
- var _React$useState = React.useState(value ? new MediaItem(url, {
17304
- baseUrl: state.root.configurationStore.apiConfig.mediaService,
17305
- jwt: state.root.dataStore.jwt
17306
- }, value, mediaItemRefId) : undefined),
17271
+ var _React$useState = React.useState(value ? new MediaItem({
17272
+ media: url,
17273
+ config: {
17274
+ baseUrl: state.root.configurationStore.apiConfig.mediaService,
17275
+ jwt: state.root.dataStore.jwt
17276
+ },
17277
+ mediaItemId: value,
17278
+ mediaItemRefId: mediaItemRefId
17279
+ }) : undefined),
17307
17280
  _React$useState2 = _slicedToArray(_React$useState, 2),
17308
17281
  media = _React$useState2[0],
17309
17282
  setMedia = _React$useState2[1];
@@ -17339,7 +17312,8 @@ function Media (_ref) {
17339
17312
  onError: onError,
17340
17313
  config: {
17341
17314
  baseUrl: state.root.configurationStore.apiConfig.mediaService,
17342
- jwt: state.root.dataStore.jwt
17315
+ jwt: state.root.dataStore.jwt,
17316
+ hideTrash: item.hideTrash
17343
17317
  }
17344
17318
  });
17345
17319
  }
@@ -17356,6 +17330,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
17356
17330
  switch (item.type) {
17357
17331
  case 'select':
17358
17332
  return /*#__PURE__*/jsx(Select, {
17333
+ value: item.value,
17359
17334
  initialValue: item.defaultValue,
17360
17335
  apiInterface: item.apiInterface,
17361
17336
  mode: item.mode,
@@ -17467,7 +17442,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
17467
17442
  children: item.label
17468
17443
  });
17469
17444
  case 'richText':
17470
- return /*#__PURE__*/jsx(RichTextEditor, {
17445
+ return /*#__PURE__*/jsx(RichTextEditor$1, {
17471
17446
  initValue: state.getData(absoluteName, state.data),
17472
17447
  name: absoluteName,
17473
17448
  onChange: _onChange
@@ -17569,6 +17544,7 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
17569
17544
  });
17570
17545
  case 'radio':
17571
17546
  return /*#__PURE__*/jsx(Radio.Group, {
17547
+ defaultValue: item.defaultValue,
17572
17548
  value: item.value,
17573
17549
  options: item.options.map(function (o) {
17574
17550
  var _o$disabled;
@@ -17607,14 +17583,15 @@ function getElement(item, setCanSave, state, absoluteName, _onChange, _onError,
17607
17583
  return /*#__PURE__*/jsx(Fragment, {});
17608
17584
  }
17609
17585
  }
17610
- function DisplayInput(props) {
17586
+ var DisplayInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
17611
17587
  var _useTranslation = useTranslation(),
17612
17588
  t = _useTranslation.t;
17613
17589
  return /*#__PURE__*/jsx(Input, _objectSpread$A(_objectSpread$A({}, props), {}, {
17590
+ ref: ref,
17614
17591
  disabled: true,
17615
17592
  value: t(props.translationPrefix + '.' + props.value)
17616
17593
  }));
17617
- }
17594
+ });
17618
17595
  function isReadonly(item, data) {
17619
17596
  if (_typeof(item.readonly) != 'object') {
17620
17597
  return item.readonly;
@@ -18025,9 +18002,7 @@ function getLabel(item, t) {
18025
18002
  if (!item.label && item.type === 'button') return undefined;
18026
18003
  return item.label ? t(item.label, item.label) : item.name;
18027
18004
  }
18028
- var Form = observer(FormWrapper$1, {
18029
- forwardRef: true
18030
- });
18005
+ var Form = observer(/*#__PURE__*/React.forwardRef(FormWrapper$1));
18031
18006
 
18032
18007
  function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18033
18008
  function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -18781,9 +18756,7 @@ var RoleSelector = function RoleSelector(_ref, ref) {
18781
18756
  })
18782
18757
  });
18783
18758
  };
18784
- var RoleSelector$1 = observer(RoleSelector, {
18785
- forwardRef: true
18786
- });
18759
+ var RoleSelector$1 = observer(/*#__PURE__*/React.forwardRef(RoleSelector));
18787
18760
 
18788
18761
  var permissionButton = "permission-Button-XctsZ";
18789
18762
  var select$1 = "select-lzft-";
@@ -20285,9 +20258,7 @@ var RelationSelector = function RelationSelector(_ref, ref) {
20285
20258
  })]
20286
20259
  });
20287
20260
  };
20288
- var RelationSelector$1 = observer(RelationSelector, {
20289
- forwardRef: true
20290
- });
20261
+ var RelationSelector$1 = observer(/*#__PURE__*/React.forwardRef(RelationSelector));
20291
20262
 
20292
20263
  function ownKeys$t(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20293
20264
  function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -20505,9 +20476,7 @@ var FormList = function FormList(_ref, ref) {
20505
20476
  })]
20506
20477
  });
20507
20478
  };
20508
- var FormList$1 = observer(FormList, {
20509
- forwardRef: true
20510
- });
20479
+ var FormList$1 = observer(/*#__PURE__*/React.forwardRef(FormList));
20511
20480
 
20512
20481
  function ownKeys$s(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20513
20482
  function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -20844,7 +20813,7 @@ var FormWrapper = function FormWrapper(_ref, ref) {
20844
20813
  placeholder: t('filter.global'),
20845
20814
  mode: mode == 'single' ? undefined : mode,
20846
20815
  allowClear: true,
20847
- showArrow: false,
20816
+ suffixIcon: null,
20848
20817
  showSearch: true,
20849
20818
  onSearch: state.fetch,
20850
20819
  notFoundContent: state.fetching ? /*#__PURE__*/jsx(Spin, {
@@ -20864,9 +20833,7 @@ var FormWrapper = function FormWrapper(_ref, ref) {
20864
20833
  })]
20865
20834
  });
20866
20835
  };
20867
- var SelectOrCreate = observer(FormWrapper, {
20868
- forwardRef: true
20869
- });
20836
+ var SelectOrCreate = observer(/*#__PURE__*/React.forwardRef(FormWrapper));
20870
20837
  var Single = function Single(_ref2) {
20871
20838
  var _state$selected$;
20872
20839
  var state = _ref2.state;
@@ -21233,9 +21200,7 @@ var ListWrapper = function ListWrapper(props, ref) {
21233
21200
  }
21234
21201
  });
21235
21202
  };
21236
- var List = observer(ListWrapper, {
21237
- forwardRef: true
21238
- });
21203
+ var List = observer(/*#__PURE__*/React.forwardRef(ListWrapper));
21239
21204
 
21240
21205
  var LOG$5 = getLogger('Backoffice', 'JsonEditor');
21241
21206
  function useJsonEditorData (id, setCanSave, onChange, onError) {
@@ -21485,9 +21450,7 @@ var JsonEditor = function JsonEditor(_ref, ref) {
21485
21450
  })
21486
21451
  });
21487
21452
  };
21488
- var JsonEditor$1 = observer(JsonEditor, {
21489
- forwardRef: true
21490
- });
21453
+ var JsonEditor$1 = observer(/*#__PURE__*/React.forwardRef(JsonEditor));
21491
21454
 
21492
21455
  function ConfirmationPopup(props) {
21493
21456
  var _useTranslation = useTranslation(),
@@ -21728,7 +21691,7 @@ var ImageCropper = function ImageCropper(_ref, ref) {
21728
21691
  onChange: function onChange(e) {
21729
21692
  return aspect ? setKeepAspect(undefined) : setKeepAspect(crop.width / crop.height);
21730
21693
  }
21731
- }), "Echte Gr\xF6\xDFe x: ", realSize.x, "px y: ", realSize.y, "px"]
21694
+ }), "Echte Gr\xF6\xDFe x: ", realSize.x.toString(), "px y: ", realSize.y.toString(), "px"]
21732
21695
  }), /*#__PURE__*/jsx(ReactCrop, {
21733
21696
  crop: crop,
21734
21697
  onChange: function onChange(_, percentCrop) {
@@ -21763,9 +21726,7 @@ var ImageCropper = function ImageCropper(_ref, ref) {
21763
21726
  })]
21764
21727
  });
21765
21728
  };
21766
- var ImageCropper$1 = observer(ImageCropper, {
21767
- forwardRef: true
21768
- });
21729
+ var ImageCropper$1 = observer(/*#__PURE__*/React.forwardRef(ImageCropper));
21769
21730
 
21770
21731
  function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
21771
21732
  function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
@@ -22213,8 +22174,10 @@ var ToolTipInfo = function ToolTipInfo(props) {
22213
22174
  className: wrapper$2,
22214
22175
  children: /*#__PURE__*/jsx(Card, {
22215
22176
  title: t('backoffice.tooltipinfo.useroverview'),
22216
- bodyStyle: {
22217
- padding: 10
22177
+ styles: {
22178
+ body: {
22179
+ padding: 10
22180
+ }
22218
22181
  },
22219
22182
  bordered: false,
22220
22183
  style: {
@@ -22405,7 +22368,7 @@ var useMediaUpload = function useMediaUpload(_ref) {
22405
22368
  var small = "small-NY1-k";
22406
22369
  var medium = "medium---QcO";
22407
22370
  var big = "big--E39S";
22408
- var css_248z$d = ".diva-component-DIVA_BACKOFFICE_NEW .ant-upload-wrapper {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-nested-loading {\n width: 100%;\n height: 100%;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-table-wrapper, .diva-component-DIVA_BACKOFFICE_NEW .ant-table {\n height: inherit;\n overflow: auto;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-container {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-spin-container {\n display: flex;\n flex-direction: column;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-space-item .andt-table .ant-spin-container {\n height: calc(60vh - 90px);\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-table-container {\n height: calc(100% - 80px);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list-item-container {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-select {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .small-NY1-k {\n width: 104px;\n height: 104px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .medium---QcO {\n width: 200px;\n height: 200px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .big--E39S {\n width: 400px;\n height: 400px;\n}\n";
22371
+ var css_248z$d = ".diva-component-DIVA_BACKOFFICE_NEW .ant-upload-wrapper {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-nested-loading {\n width: 100%;\n height: 100%;\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-table-wrapper, .diva-component-DIVA_BACKOFFICE_NEW .ant-table {\n height: inherit;\n overflow: auto;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-drawer-body .ant-spin-nested-loading {\n width: 100%;\n height: 80%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-spin-container {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-spin-container {\n display: flex;\n flex-direction: column;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-space-item .andt-table .ant-spin-container {\n height: calc(60vh - 90px);\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .andt-table .ant-table-container {\n height: calc(100% - 80px);\n}\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list {\n width: 100%;\n height: 100%;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-list-item-container {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .ant-upload-select {\n width: 100% !important;\n height: 100% !important;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .small-NY1-k {\n width: 104px;\n height: 104px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .medium---QcO {\n width: 200px;\n height: 200px;\n}\n\n.diva-component-DIVA_BACKOFFICE_NEW .big--E39S {\n width: 400px;\n height: 400px;\n}\n";
22409
22372
  styleInject(css_248z$d);
22410
22373
 
22411
22374
  var MediaUpload = observer(function (_ref) {
@@ -22769,7 +22732,7 @@ function DropdownCell (_ref) {
22769
22732
  width: column.width - 20
22770
22733
  },
22771
22734
  onChange: save,
22772
- bordered: false,
22735
+ variant: "borderless",
22773
22736
  disabled: !((_column$flow = column.flow) !== null && _column$flow !== void 0 && (_column$flow = _column$flow[children[1]]) !== null && _column$flow !== void 0 && _column$flow.length),
22774
22737
  options: (_column$flow2 = column.flow) === null || _column$flow2 === void 0 || (_column$flow2 = _column$flow2[children[1]]) === null || _column$flow2 === void 0 ? void 0 : _column$flow2.map(function (opt) {
22775
22738
  return {
@@ -22804,6 +22767,8 @@ if (!window.customElements.get('model-viewer')) {
22804
22767
  function MediaViewerCell (_ref) {
22805
22768
  var children = _ref.children,
22806
22769
  column = _ref.column;
22770
+ var _useDivaCore = useDivaCore(),
22771
+ isFirefox = _useDivaCore.state.isFirefox;
22807
22772
  if (!(children !== null && children !== void 0 && children[1])) {
22808
22773
  return /*#__PURE__*/jsx(Fragment, {});
22809
22774
  }
@@ -22849,7 +22814,7 @@ function MediaViewerCell (_ref) {
22849
22814
  src: children[1],
22850
22815
  ar: true,
22851
22816
  "ar-scale": 'fixed',
22852
- "ar-modes": 'webxr quick-look',
22817
+ "ar-modes": !isFirefox ? 'webxr quick-look' : '',
22853
22818
  "shadow-intensity": "1",
22854
22819
  "camera-controls": true,
22855
22820
  "touch-action": "pan-y",
@@ -22915,12 +22880,12 @@ function UnixTimeStampCell (_ref) {
22915
22880
  }
22916
22881
 
22917
22882
  function UnixTimeStampCheckCell (_ref) {
22918
- var _ref2;
22883
+ var _checkTime;
22919
22884
  var children = _ref.children,
22920
22885
  column = _ref.column;
22921
22886
  _ref.dataIndex;
22922
22887
  _ref.save;
22923
- if ((_ref2 = (Date.now() - children[1]) / 1000 / 60 >= column.checkTime) !== null && _ref2 !== void 0 ? _ref2 : 15) {
22888
+ if ((Date.now() - children[1]) / 1000 / 60 >= ((_checkTime = column.checkTime) !== null && _checkTime !== void 0 ? _checkTime : 15)) {
22924
22889
  return /*#__PURE__*/jsx("span", {
22925
22890
  style: {
22926
22891
  whiteSpace: 'nowrap'
@@ -22989,6 +22954,8 @@ function MediaItemViewerCell (_ref) {
22989
22954
  timeStamp = _useState4[0],
22990
22955
  setTimeStamp = _useState4[1];
22991
22956
  var id;
22957
+ var _useDivaCore = useDivaCore(),
22958
+ isFirefox = _useDivaCore.state.isFirefox;
22992
22959
 
22993
22960
  //! for renderjob table mediaItems because can't filter mediaItems.0
22994
22961
  if (Array.isArray(children[1])) {
@@ -23020,9 +22987,9 @@ function MediaItemViewerCell (_ref) {
23020
22987
  });
23021
22988
  }, [timeStamp, id]);
23022
22989
  if (!id) return /*#__PURE__*/jsx(FileUnknownOutlined, {});
23023
- var _useDivaCore = useDivaCore(),
23024
- handler = _useDivaCore.handler,
23025
- actions = _useDivaCore.actions;
22990
+ var _useDivaCore2 = useDivaCore(),
22991
+ handler = _useDivaCore2.handler,
22992
+ actions = _useDivaCore2.actions;
23026
22993
  var openModelViewer = function openModelViewer() {
23027
22994
  actions.openFullscreen({
23028
22995
  content: /*#__PURE__*/jsx("model-viewer", {
@@ -23030,7 +22997,7 @@ function MediaItemViewerCell (_ref) {
23030
22997
  src: children[1],
23031
22998
  ar: true,
23032
22999
  "ar-scale": 'fixed',
23033
- "ar-modes": 'webxr quick-look',
23000
+ "ar-modes": !isFirefox ? 'webxr quick-look' : '',
23034
23001
  "shadow-intensity": "1",
23035
23002
  "camera-controls": true,
23036
23003
  "touch-action": "pan-y",
@@ -23150,7 +23117,7 @@ var CustomCell = function CustomCell(_ref2) {
23150
23117
  return form.validateFields();
23151
23118
  case 3:
23152
23119
  values = _context.sent;
23153
- handleSave(merge(record, values));
23120
+ handleSave(merge$1(record, values));
23154
23121
  _context.next = 10;
23155
23122
  break;
23156
23123
  case 7:
@@ -23463,7 +23430,6 @@ function AGHistogram (_ref) {
23463
23430
  if (subtitle) parseSubTitle = subtitle.text + eval(subtitle.variable);
23464
23431
  setOptions({
23465
23432
  data: data.bulks,
23466
- autoSize: true,
23467
23433
  theme: {
23468
23434
  baseTheme: root.contentStore.theme == 'darkmode' ? 'ag-default-dark' : 'ag-default'
23469
23435
  },
@@ -23534,7 +23500,7 @@ function AGHistogram (_ref) {
23534
23500
  height: height,
23535
23501
  width: width
23536
23502
  },
23537
- children: options && /*#__PURE__*/jsx(AgChartsReact, {
23503
+ children: options && /*#__PURE__*/jsx(AgCharts, {
23538
23504
  options: options
23539
23505
  })
23540
23506
  }), loadingHistogram && /*#__PURE__*/jsx("div", {
@@ -23587,7 +23553,7 @@ dayjs.extend(weekYear);
23587
23553
  Select$1.Option;
23588
23554
  var LOG$3 = getLogger('Backoffice', 'BaseTable');
23589
23555
  var TableWrapper = function TableWrapper(_ref) {
23590
- var _state$configuration$, _state$configuration$2, _state$configuration$3, _state$configuration$4, _state$configuration$5, _state$configuration$6, _state$globalFilter, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$configuration$7, _state$configuration$8, _state$globalFilter$s, _state$configuration$9, _state$configuration$10, _state$configuration$11, _state$selected2, _state$configuration$12, _state$configuration$13, _state$configuration$14, _state$configuration$17, _state$configuration$18, _state$configuration$19;
23556
+ var _state$configuration$, _toggleConfig$label, _toggleConfig$labelOf, _state$globalFilter, _state$configuration$2, _state$configuration$3, _state$globalFilter2, _state$globalFilter3, _state$globalFilter4, _state$globalFilter5, _state$configuration$4, _state$configuration$5, _state$globalFilter$s, _state$configuration$6, _state$configuration$7, _state$configuration$8, _state$selected2, _state$configuration$9, _state$configuration$10, _state$configuration$11, _state$configuration$14, _state$configuration$15, _state$configuration$16;
23591
23557
  var state = _ref.state;
23592
23558
  var root = useStore();
23593
23559
  var _useState = useState(0),
@@ -23681,6 +23647,7 @@ var TableWrapper = function TableWrapper(_ref) {
23681
23647
  if (!permission) return true;
23682
23648
  return root.actions.userHasPermission(permission);
23683
23649
  }
23650
+ var toggleConfig = (_state$configuration$ = state.configuration.filter) === null || _state$configuration$ === void 0 ? void 0 : _state$configuration$.toggle;
23684
23651
  return /*#__PURE__*/jsxs(Fragment, {
23685
23652
  children: [(state.canDelete || state.configuration.createAction || state.title || state.configuration.canRefresh || state.configuration.clientRelations) && /*#__PURE__*/jsx(Fragment, {
23686
23653
  children: /*#__PURE__*/jsx(Descriptions, {
@@ -23739,16 +23706,17 @@ var TableWrapper = function TableWrapper(_ref) {
23739
23706
  state.triggerRefresh();
23740
23707
  },
23741
23708
  children: /*#__PURE__*/jsx(ReloadOutlined, {})
23742
- }), ((_state$configuration$ = state.configuration.filter) === null || _state$configuration$ === void 0 ? void 0 : _state$configuration$.toggle) && (!state.configuration.filter.toggle.permission || root.actions.userHasPermission(state.configuration.filter.toggle.permission)) && /*#__PURE__*/jsx("div", {
23709
+ }), toggleConfig && (!toggleConfig.permission || root.actions.userHasPermission(toggleConfig.permission)) && /*#__PURE__*/jsx("div", {
23743
23710
  children: /*#__PURE__*/jsx(Switch, {
23744
- defaultChecked: (_state$configuration$2 = state.configuration.filter) === null || _state$configuration$2 === void 0 ? void 0 : _state$configuration$2.toggle.defaultChecked,
23745
- checkedChildren: (_state$configuration$3 = state.configuration.filter.toggle.label) !== null && _state$configuration$3 !== void 0 ? _state$configuration$3 : 'unfiltered',
23746
- unCheckedChildren: (_state$configuration$4 = state.configuration.filter.toggle.labelOff) !== null && _state$configuration$4 !== void 0 ? _state$configuration$4 : 'filtered',
23711
+ defaultChecked: toggleConfig.defaultChecked,
23712
+ checkedChildren: (_toggleConfig$label = toggleConfig.label) !== null && _toggleConfig$label !== void 0 ? _toggleConfig$label : 'unfiltered',
23713
+ unCheckedChildren: (_toggleConfig$labelOf = toggleConfig.labelOff) !== null && _toggleConfig$labelOf !== void 0 ? _toggleConfig$labelOf : 'filtered',
23747
23714
  onChange: function onChange() {
23748
23715
  return state.onGlobalFilterToggle();
23749
- }
23716
+ },
23717
+ checked: !!((_state$globalFilter = state.globalFilter) !== null && _state$globalFilter !== void 0 && _state$globalFilter.toggle) != !!toggleConfig.inverted
23750
23718
  })
23751
- }), ((_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.search) && /*#__PURE__*/jsx(Input.Search, {
23719
+ }), ((_state$configuration$2 = state.configuration.filter) === null || _state$configuration$2 === void 0 ? void 0 : _state$configuration$2.search) && /*#__PURE__*/jsx(Input.Search, {
23752
23720
  placeholder: t('filter.global'),
23753
23721
  onSearch: function onSearch(v) {
23754
23722
  return state.onGlobalFilterSearch(v);
@@ -23757,17 +23725,17 @@ var TableWrapper = function TableWrapper(_ref) {
23757
23725
  style: {
23758
23726
  width: 200
23759
23727
  }
23760
- }), ((_state$configuration$6 = state.configuration.filter) === null || _state$configuration$6 === void 0 ? void 0 : _state$configuration$6.period) && /*#__PURE__*/jsx(DatePicker.RangePicker, {
23728
+ }), ((_state$configuration$3 = state.configuration.filter) === null || _state$configuration$3 === void 0 ? void 0 : _state$configuration$3.period) && /*#__PURE__*/jsx(DatePicker.RangePicker, {
23761
23729
  onCalendarChange: function onCalendarChange(values) {
23762
23730
  if (values && values[0] && values[1]) {
23763
23731
  state.onGlobalFilterPeriod(values[0].valueOf(), values[1].valueOf());
23764
23732
  }
23765
23733
  },
23766
- value: [(_state$globalFilter = state.globalFilter) !== null && _state$globalFilter !== void 0 && (_state$globalFilter = _state$globalFilter.timeStamp) !== null && _state$globalFilter !== void 0 && (_state$globalFilter = _state$globalFilter['fromTimeStamp']) !== null && _state$globalFilter !== void 0 && _state$globalFilter[0] ? dayjs((_state$globalFilter2 = state.globalFilter) === null || _state$globalFilter2 === void 0 || (_state$globalFilter2 = _state$globalFilter2.timeStamp) === null || _state$globalFilter2 === void 0 || (_state$globalFilter2 = _state$globalFilter2['fromTimeStamp']) === null || _state$globalFilter2 === void 0 ? void 0 : _state$globalFilter2[0]) : dayjs(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000)),
23734
+ value: [(_state$globalFilter2 = state.globalFilter) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2.timeStamp) !== null && _state$globalFilter2 !== void 0 && (_state$globalFilter2 = _state$globalFilter2['fromTimeStamp']) !== null && _state$globalFilter2 !== void 0 && _state$globalFilter2[0] ? dayjs((_state$globalFilter3 = state.globalFilter) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3.timeStamp) === null || _state$globalFilter3 === void 0 || (_state$globalFilter3 = _state$globalFilter3['fromTimeStamp']) === null || _state$globalFilter3 === void 0 ? void 0 : _state$globalFilter3[0]) : dayjs(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000)),
23767
23735
  // Convert to Dayjs
23768
- (_state$globalFilter3 = state.globalFilter) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3.timeStamp) !== null && _state$globalFilter3 !== void 0 && (_state$globalFilter3 = _state$globalFilter3['toTimeStamp']) !== null && _state$globalFilter3 !== void 0 && _state$globalFilter3[0] ? dayjs((_state$globalFilter4 = state.globalFilter) === null || _state$globalFilter4 === void 0 || (_state$globalFilter4 = _state$globalFilter4.timeStamp) === null || _state$globalFilter4 === void 0 || (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) === null || _state$globalFilter4 === void 0 ? void 0 : _state$globalFilter4[0]) : dayjs(new Date()) // Convert to Dayjs
23736
+ (_state$globalFilter4 = state.globalFilter) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4.timeStamp) !== null && _state$globalFilter4 !== void 0 && (_state$globalFilter4 = _state$globalFilter4['toTimeStamp']) !== null && _state$globalFilter4 !== void 0 && _state$globalFilter4[0] ? dayjs((_state$globalFilter5 = state.globalFilter) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5.timeStamp) === null || _state$globalFilter5 === void 0 || (_state$globalFilter5 = _state$globalFilter5['toTimeStamp']) === null || _state$globalFilter5 === void 0 ? void 0 : _state$globalFilter5[0]) : dayjs(new Date()) // Convert to Dayjs
23769
23737
  ]
23770
- }), ((_state$configuration$7 = state.configuration.filter) === null || _state$configuration$7 === void 0 ? void 0 : _state$configuration$7.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$l(_objectSpread$l({}, (_state$configuration$8 = state.configuration.filter) === null || _state$configuration$8 === void 0 ? void 0 : _state$configuration$8.select.settings), {}, {
23738
+ }), ((_state$configuration$4 = state.configuration.filter) === null || _state$configuration$4 === void 0 ? void 0 : _state$configuration$4.select) && /*#__PURE__*/jsx(SimpleSelect, _objectSpread$l(_objectSpread$l({}, (_state$configuration$5 = state.configuration.filter) === null || _state$configuration$5 === void 0 ? void 0 : _state$configuration$5.select.settings), {}, {
23771
23739
  style: {
23772
23740
  minWidth: '200px'
23773
23741
  },
@@ -23780,17 +23748,17 @@ var TableWrapper = function TableWrapper(_ref) {
23780
23748
  }), state.canDelete && /*#__PURE__*/jsx(DeleteButton, {
23781
23749
  selected: state.selected,
23782
23750
  total: state.pagination.total,
23783
- min: (_state$configuration$9 = state.configuration.rules) === null || _state$configuration$9 === void 0 ? void 0 : _state$configuration$9.min,
23751
+ min: (_state$configuration$6 = state.configuration.rules) === null || _state$configuration$6 === void 0 ? void 0 : _state$configuration$6.min,
23784
23752
  deleting: state.deleting,
23785
23753
  onDelete: state.onDelete,
23786
- disabled: !!((_state$configuration$10 = state.configuration.deleteAction) !== null && _state$configuration$10 !== void 0 && (_state$configuration$11 = _state$configuration$10.disabled) !== null && _state$configuration$11 !== void 0 && _state$configuration$11.call(_state$configuration$10, ((_state$selected2 = state.selected) !== null && _state$selected2 !== void 0 ? _state$selected2 : []).map(function (id) {
23754
+ disabled: !!((_state$configuration$7 = state.configuration.deleteAction) !== null && _state$configuration$7 !== void 0 && (_state$configuration$8 = _state$configuration$7.disabled) !== null && _state$configuration$8 !== void 0 && _state$configuration$8.call(_state$configuration$7, ((_state$selected2 = state.selected) !== null && _state$selected2 !== void 0 ? _state$selected2 : []).map(function (id) {
23787
23755
  return state.data.find(function (d) {
23788
23756
  return d._id == id;
23789
23757
  });
23790
23758
  })))
23791
23759
  }), state.configuration.copyAction !== undefined && /*#__PURE__*/jsx(CopyButton, {
23792
23760
  state: state
23793
- }), (_state$configuration$12 = state.configuration.bulkActions) === null || _state$configuration$12 === void 0 ? void 0 : _state$configuration$12.map(function (action) {
23761
+ }), (_state$configuration$9 = state.configuration.bulkActions) === null || _state$configuration$9 === void 0 ? void 0 : _state$configuration$9.map(function (action) {
23794
23762
  return /*#__PURE__*/jsx(BulkAction, {
23795
23763
  action: action,
23796
23764
  state: state,
@@ -23801,18 +23769,18 @@ var TableWrapper = function TableWrapper(_ref) {
23801
23769
  setProgressBarPercentage: setProgressBarPercentage
23802
23770
  } : undefined
23803
23771
  }, action.id);
23804
- }), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && !((_state$configuration$13 = (_state$configuration$14 = state.configuration.createAction).hidden) !== null && _state$configuration$13 !== void 0 && _state$configuration$13.call(_state$configuration$14, data)) && /*#__PURE__*/jsx(ActionButton, {
23772
+ }), state.configuration.createAction && checkPermission(state.configuration.createAction.permission) && !((_state$configuration$10 = (_state$configuration$11 = state.configuration.createAction).hidden) !== null && _state$configuration$10 !== void 0 && _state$configuration$10.call(_state$configuration$11, data)) && /*#__PURE__*/jsx(ActionButton, {
23805
23773
  action: state.configuration.createAction,
23806
23774
  callback: function callback(data) {
23807
- var _state$onUpdate, _state$configuration$15, _state$configuration$16;
23775
+ var _state$onUpdate, _state$configuration$12, _state$configuration$13;
23808
23776
  (_state$onUpdate = state.onUpdate) === null || _state$onUpdate === void 0 || _state$onUpdate.call(state, data);
23809
- (_state$configuration$15 = state.configuration.createAction) === null || _state$configuration$15 === void 0 || (_state$configuration$16 = _state$configuration$15.callback) === null || _state$configuration$16 === void 0 || _state$configuration$16.call(_state$configuration$15, data);
23777
+ (_state$configuration$12 = state.configuration.createAction) === null || _state$configuration$12 === void 0 || (_state$configuration$13 = _state$configuration$12.callback) === null || _state$configuration$13 === void 0 || _state$configuration$13.call(_state$configuration$12, data);
23810
23778
  },
23811
23779
  type: "Button",
23812
23780
  id: 'create',
23813
23781
  defaultLabel: t('backoffice.table.emailtemplates.createAction.title'),
23814
23782
  isCreateButton: true,
23815
- disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle || ((_state$configuration$17 = (_state$configuration$18 = state.configuration.createAction).disabled) === null || _state$configuration$17 === void 0 ? void 0 : _state$configuration$17.call(_state$configuration$18, data)),
23783
+ disabled: state.configuration.createAction.disableOnToggle === !!state.globalFilter.toggle || ((_state$configuration$14 = (_state$configuration$15 = state.configuration.createAction).disabled) === null || _state$configuration$14 === void 0 ? void 0 : _state$configuration$14.call(_state$configuration$15, data)),
23816
23784
  data: state.configuration.createActionMapping ? aplyMapping({
23817
23785
  mapable: {},
23818
23786
  mapping: state.configuration.createActionMapping,
@@ -23860,13 +23828,13 @@ var TableWrapper = function TableWrapper(_ref) {
23860
23828
  className: "andt-table",
23861
23829
  scroll: {
23862
23830
  x: '100%',
23863
- y: (_state$configuration$19 = state.configuration.height) !== null && _state$configuration$19 !== void 0 ? _state$configuration$19 : '100%'
23831
+ y: (_state$configuration$16 = state.configuration.height) !== null && _state$configuration$16 !== void 0 ? _state$configuration$16 : '100%'
23864
23832
  },
23865
23833
  rowClassName: editableRow,
23866
23834
  components: cellRenderer,
23867
23835
  rowKey: function rowKey(dataRow) {
23868
- var _state$configuration$20, _state$configuration$21;
23869
- return goTroughObject(dataRow, (_state$configuration$20 = (_state$configuration$21 = state.configuration.rowKey) === null || _state$configuration$21 === void 0 ? void 0 : _state$configuration$21.split('.')) !== null && _state$configuration$20 !== void 0 ? _state$configuration$20 : ['_id'], 0);
23836
+ var _state$configuration$17, _state$configuration$18;
23837
+ return goTroughObject(dataRow, (_state$configuration$17 = (_state$configuration$18 = state.configuration.rowKey) === null || _state$configuration$18 === void 0 ? void 0 : _state$configuration$18.split('.')) !== null && _state$configuration$17 !== void 0 ? _state$configuration$17 : ['_id'], 0);
23870
23838
  },
23871
23839
  dataSource: data,
23872
23840
  loading: state.loading,
@@ -23936,22 +23904,22 @@ function DeleteButton(_ref2) {
23936
23904
  });
23937
23905
  }
23938
23906
  function CopyButton(_ref3) {
23939
- var _state$configuration$25;
23907
+ var _state$configuration$22;
23940
23908
  var state = _ref3.state;
23941
23909
  var root = useStore();
23942
- var apiHandler = new _default$d({
23910
+ new _default$d({
23943
23911
  apiInterface: state.configuration.apiInterface,
23944
23912
  type: 'Table'
23945
23913
  }, root);
23946
23914
  var onCopy = /*#__PURE__*/function () {
23947
23915
  var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
23948
- var _state$configuration$22;
23916
+ var _state$configuration$19;
23949
23917
  var copyAction, _iterator3, _step3, selectedRow;
23950
23918
  return _regeneratorRuntime.wrap(function _callee$(_context) {
23951
23919
  while (1) switch (_context.prev = _context.next) {
23952
23920
  case 0:
23953
23921
  copyAction = state.configuration.copyAction;
23954
- if (((_state$configuration$22 = state.configuration.copyAction) === null || _state$configuration$22 === void 0 ? void 0 : _state$configuration$22.apiInterface) != undefined) {
23922
+ if (((_state$configuration$19 = state.configuration.copyAction) === null || _state$configuration$19 === void 0 ? void 0 : _state$configuration$19.apiInterface) != undefined) {
23955
23923
  _iterator3 = _createForOfIteratorHelper$4(state.selected);
23956
23924
  try {
23957
23925
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
@@ -23986,28 +23954,22 @@ function CopyButton(_ref3) {
23986
23954
  }();
23987
23955
  var onCopyAction = /*#__PURE__*/function () {
23988
23956
  var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
23989
- var _state$configuration$23, _state$configuration$24;
23990
- var copyAction, id, filter, data;
23957
+ var _state$configuration$20, _state$configuration$21;
23958
+ var copyAction, id, data;
23991
23959
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
23992
23960
  while (1) switch (_context3.prev = _context3.next) {
23993
23961
  case 0:
23994
23962
  copyAction = state.configuration.copyAction;
23995
- if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$23 = state.configuration.createAction) === null || _state$configuration$23 === void 0 ? void 0 : _state$configuration$23.actionType) != 'Detail')) {
23963
+ if (!(copyAction.id == undefined || copyAction.actionType != 'Detail' || ((_state$configuration$20 = state.configuration.createAction) === null || _state$configuration$20 === void 0 ? void 0 : _state$configuration$20.actionType) != 'Detail')) {
23996
23964
  _context3.next = 3;
23997
23965
  break;
23998
23966
  }
23999
23967
  throw new Error('configuration needs to be of type Detail');
24000
23968
  case 3:
24001
23969
  id = state.selected[0];
24002
- filter = {};
24003
- filter['_id'] = [id, 'eq', false];
24004
- _context3.next = 8;
24005
- return apiHandler.readList(undefined, undefined, {
24006
- pagination: {},
24007
- columns: [],
24008
- filters: filter
24009
- });
24010
- case 8:
23970
+ _context3.next = 6;
23971
+ return state.getDataById(id);
23972
+ case 6:
24011
23973
  data = _context3.sent;
24012
23974
  data.data[0] = aplyMapping({
24013
23975
  mapable: {},
@@ -24022,7 +23984,7 @@ function CopyButton(_ref3) {
24022
23984
  configurationId: copyAction === null || copyAction === void 0 ? void 0 : copyAction.id,
24023
23985
  data: data.data[0],
24024
23986
  type: copyAction === null || copyAction === void 0 ? void 0 : copyAction.type,
24025
- mapping: (_state$configuration$24 = state.configuration.createAction) === null || _state$configuration$24 === void 0 ? void 0 : _state$configuration$24.mapping,
23987
+ mapping: (_state$configuration$21 = state.configuration.createAction) === null || _state$configuration$21 === void 0 ? void 0 : _state$configuration$21.mapping,
24026
23988
  mappingData: data.data[0],
24027
23989
  callback: function () {
24028
23990
  var _callback = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
@@ -24032,6 +23994,8 @@ function CopyButton(_ref3) {
24032
23994
  _context2.next = 2;
24033
23995
  return state.onUpdate(e);
24034
23996
  case 2:
23997
+ if (copyAction.resetToggleAfter) state.resetToggle();
23998
+ case 3:
24035
23999
  case "end":
24036
24000
  return _context2.stop();
24037
24001
  }
@@ -24043,7 +24007,7 @@ function CopyButton(_ref3) {
24043
24007
  return callback;
24044
24008
  }()
24045
24009
  });
24046
- case 11:
24010
+ case 9:
24047
24011
  case "end":
24048
24012
  return _context3.stop();
24049
24013
  }
@@ -24058,7 +24022,7 @@ function CopyButton(_ref3) {
24058
24022
  return /*#__PURE__*/jsx(Button, {
24059
24023
  type: "primary",
24060
24024
  onClick: onCopy,
24061
- disabled: state.selected.length == 0 || state.selected.length > 1 && ((_state$configuration$25 = state.configuration.copyAction) === null || _state$configuration$25 === void 0 ? void 0 : _state$configuration$25.disableOnMultiselect),
24025
+ disabled: state.selected.length == 0 || state.selected.length > 1 && ((_state$configuration$22 = state.configuration.copyAction) === null || _state$configuration$22 === void 0 ? void 0 : _state$configuration$22.disableOnMultiselect),
24062
24026
  children: t('backoffice.basetable.copy')
24063
24027
  });
24064
24028
  }
@@ -24210,7 +24174,7 @@ function BulkAction(_ref6) {
24210
24174
  _context4.t5 = _context4.sent;
24211
24175
  _context4.t4.push.call(_context4.t4, _context4.t5);
24212
24176
  case 29:
24213
- if (progressBar) progressBar.setProgressBarPercentage(Math.floor((i + 1 / selectedData.length) * 100));
24177
+ if (progressBar) progressBar.setProgressBarPercentage(Math.floor(i / selectedData.length * 100));
24214
24178
  case 30:
24215
24179
  i++;
24216
24180
  _context4.next = 4;
@@ -24218,22 +24182,27 @@ function BulkAction(_ref6) {
24218
24182
  case 33:
24219
24183
  state.onUpdate(data);
24220
24184
  if (progressBar) {
24185
+ progressBar.setProgressBarPercentage(100);
24221
24186
  progressBar.setProgressBarOpen(false);
24222
24187
  progressBar.setProgressBarPercentage(0);
24223
24188
  }
24224
- _context4.next = 41;
24189
+ _context4.next = 42;
24225
24190
  break;
24226
24191
  case 37:
24227
24192
  _context4.prev = 37;
24228
24193
  _context4.t6 = _context4["catch"](2);
24194
+ if (progressBar) {
24195
+ progressBar.setProgressBarOpen(false);
24196
+ progressBar.setProgressBarPercentage(0);
24197
+ }
24229
24198
  LOG$3.error(new DivaError('Error changing data', {
24230
24199
  cause: _context4.t6,
24231
24200
  code: 'BACKO_0002'
24232
24201
  }));
24233
24202
  setShowPopover(t('errorcodes._source.labels.error.BACKO_0002'));
24234
- case 41:
24235
- (_action$callback = action.callback) === null || _action$callback === void 0 || _action$callback.call(action, updatedData);
24236
24203
  case 42:
24204
+ (_action$callback = action.callback) === null || _action$callback === void 0 || _action$callback.call(action, updatedData);
24205
+ case 43:
24237
24206
  case "end":
24238
24207
  return _context4.stop();
24239
24208
  }
@@ -24272,6 +24241,8 @@ function BulkAction(_ref6) {
24272
24241
  }
24273
24242
  function SelectionText(_ref8) {
24274
24243
  var selected = _ref8.selected;
24244
+ var _useTranslation5 = useTranslation(),
24245
+ t = _useTranslation5.t;
24275
24246
  if (!(selected !== null && selected !== void 0 && selected.length)) {
24276
24247
  return /*#__PURE__*/jsx(Fragment, {});
24277
24248
  }
@@ -24281,7 +24252,7 @@ function SelectionText(_ref8) {
24281
24252
  fontWeight: 'normal',
24282
24253
  fontSize: 'small'
24283
24254
  },
24284
- children: "".concat(selected.length, " Eintr\xE4ge ausgew\xE4hlt")
24255
+ children: "".concat(selected.length, " ") + t('backoffice.table.selected_entries')
24285
24256
  });
24286
24257
  }
24287
24258
 
@@ -24551,10 +24522,10 @@ var searchProps = function searchProps(title, filter) {
24551
24522
  confirm = _ref4.confirm,
24552
24523
  clearFilters = _ref4.clearFilters,
24553
24524
  visible = _ref4.visible;
24554
- var ref = useRef(null);
24525
+ var ref1 = useRef(null);
24555
24526
  useEffect(function () {
24556
24527
  if (visible) {
24557
- ref.current.select();
24528
+ ref1.current.select();
24558
24529
  }
24559
24530
  }, [visible]);
24560
24531
  return /*#__PURE__*/jsxs("div", {
@@ -24562,7 +24533,7 @@ var searchProps = function searchProps(title, filter) {
24562
24533
  padding: 8
24563
24534
  },
24564
24535
  children: [/*#__PURE__*/jsx(Input, {
24565
- ref: ref,
24536
+ ref: ref1,
24566
24537
  placeholder: "Filter ".concat(title),
24567
24538
  value: selectedKeys[0],
24568
24539
  onChange: function onChange(e) {
@@ -24827,6 +24798,7 @@ function mapColumns(configuration, userHasPermission, onUpdate, data, globalFilt
24827
24798
  function mapColumn(column, onUpdate) {
24828
24799
  var _column$field, _column$children;
24829
24800
  return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, column), {}, {
24801
+ hidden: false,
24830
24802
  width: column.width || 100,
24831
24803
  dataIndex: (_column$field = column.field) === null || _column$field === void 0 ? void 0 : _column$field.split('.'),
24832
24804
  key: column.field || column.title,
@@ -24906,7 +24878,7 @@ function aplyFilterAndSortation (_ref) {
24906
24878
  */
24907
24879
  function sort(s, data) {
24908
24880
  var flatData = data.map(function (d) {
24909
- return flat.flatten(d);
24881
+ return flatten(d);
24910
24882
  });
24911
24883
  var sorters = Array.of(s).flat().sort(function (a, b) {
24912
24884
  var _a$column, _b$column;
@@ -24917,7 +24889,7 @@ function sort(s, data) {
24917
24889
  return d[s.columnKey];
24918
24890
  });
24919
24891
  })).map(function (r) {
24920
- return flat.unflatten(r);
24892
+ return unflatten(r);
24921
24893
  });
24922
24894
  }
24923
24895
 
@@ -24936,7 +24908,7 @@ function filter(f, data) {
24936
24908
  return k.includes('.');
24937
24909
  })) {
24938
24910
  filterableData = data.map(function (d) {
24939
- return flat.flatten(d);
24911
+ return flatten(d);
24940
24912
  });
24941
24913
  isFlatted = true;
24942
24914
  }
@@ -24971,7 +24943,7 @@ function filter(f, data) {
24971
24943
  });
24972
24944
  });
24973
24945
  return isFlatted ? result.map(function (r) {
24974
- return flat.unflatten(r);
24946
+ return unflatten(r);
24975
24947
  }) : result;
24976
24948
  }
24977
24949
 
@@ -25032,7 +25004,7 @@ function useTableData$1 (_ref) {
25032
25004
  var _configuration$create;
25033
25005
  if (!dataRow) return;
25034
25006
  var id = v4();
25035
- var processedDataRow = flat.unflatten(_objectSpread$h({
25007
+ var processedDataRow = unflatten(_objectSpread$h({
25036
25008
  _id: id,
25037
25009
  ID: id
25038
25010
  }, dataRow));
@@ -25091,11 +25063,10 @@ function useTableData$1 (_ref) {
25091
25063
  sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
25092
25064
  return c.defaultSortOrder;
25093
25065
  }).map(function (c) {
25094
- var _c$dataIndex;
25095
25066
  return {
25096
25067
  column: c,
25097
25068
  field: c.dataIndex,
25098
- columnKey: (_c$dataIndex = c.dataIndex) === null || _c$dataIndex === void 0 ? void 0 : _c$dataIndex.join('.'),
25069
+ columnKey: c.key,
25099
25070
  order: c.defaultSortOrder
25100
25071
  };
25101
25072
  })
@@ -25108,11 +25079,10 @@ function useTableData$1 (_ref) {
25108
25079
  sorter: mapColumns(configuration, root.actions.userHasPermission, onUpdate).filter(function (c) {
25109
25080
  return c.defaultSortOrder;
25110
25081
  }).map(function (c) {
25111
- var _c$dataIndex2;
25112
25082
  return {
25113
25083
  column: c,
25114
25084
  field: c.dataIndex,
25115
- columnKey: (_c$dataIndex2 = c.dataIndex) === null || _c$dataIndex2 === void 0 ? void 0 : _c$dataIndex2.join('.'),
25085
+ columnKey: c.key,
25116
25086
  order: c.defaultSortOrder
25117
25087
  };
25118
25088
  })
@@ -25165,16 +25135,44 @@ function useTableData$1 (_ref) {
25165
25135
  });
25166
25136
  }
25167
25137
  };
25138
+ var getDataById = /*#__PURE__*/function () {
25139
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(id) {
25140
+ var filters, data;
25141
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
25142
+ while (1) switch (_context.prev = _context.next) {
25143
+ case 0:
25144
+ filters = {};
25145
+ filters['_id'] = [id, 'eq', false];
25146
+ _context.next = 4;
25147
+ return apiHandler.readList(configuration.mapping, {
25148
+ pagination: _objectSpread$h({}, state.pagination),
25149
+ columns: configuration.columns,
25150
+ filters: filters,
25151
+ sorter: filterData.sorter
25152
+ });
25153
+ case 4:
25154
+ data = _context.sent;
25155
+ return _context.abrupt("return", data);
25156
+ case 6:
25157
+ case "end":
25158
+ return _context.stop();
25159
+ }
25160
+ }, _callee);
25161
+ }));
25162
+ return function getDataById(_x) {
25163
+ return _ref2.apply(this, arguments);
25164
+ };
25165
+ }();
25168
25166
  var onSelect = function onSelect(keys) {
25169
25167
  setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
25170
25168
  selected: keys
25171
25169
  }));
25172
25170
  };
25173
25171
  var onDelete = /*#__PURE__*/function () {
25174
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
25172
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
25175
25173
  var newData, deleted, _loop, mappingData, index, total, pages, current, data;
25176
- return _regeneratorRuntime.wrap(function _callee$(_context2) {
25177
- while (1) switch (_context2.prev = _context2.next) {
25174
+ return _regeneratorRuntime.wrap(function _callee2$(_context3) {
25175
+ while (1) switch (_context3.prev = _context3.next) {
25178
25176
  case 0:
25179
25177
  setState(_objectSpread$h(_objectSpread$h({}, state), {}, {
25180
25178
  deleting: true
@@ -25184,24 +25182,24 @@ function useTableData$1 (_ref) {
25184
25182
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop(index) {
25185
25183
  var _newData$filter, _configuration$delete;
25186
25184
  var id, deleteResult, deletedIndex;
25187
- return _regeneratorRuntime.wrap(function _loop$(_context) {
25188
- while (1) switch (_context.prev = _context.next) {
25185
+ return _regeneratorRuntime.wrap(function _loop$(_context2) {
25186
+ while (1) switch (_context2.prev = _context2.next) {
25189
25187
  case 0:
25190
25188
  id = state.selected[index];
25191
25189
  mappingData = (_newData$filter = newData.filter(function (nd) {
25192
25190
  return nd._id === state.selected[index];
25193
25191
  })) === null || _newData$filter === void 0 ? void 0 : _newData$filter[0];
25194
25192
  mappingData = _objectSpread$h(_objectSpread$h({}, mappingData), state.mappingData);
25195
- _context.next = 5;
25193
+ _context2.next = 5;
25196
25194
  return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData, true);
25197
25195
  case 5:
25198
- deleteResult = _context.sent;
25196
+ deleteResult = _context2.sent;
25199
25197
  if (deleteResult) {
25200
- _context.next = 9;
25198
+ _context2.next = 9;
25201
25199
  break;
25202
25200
  }
25203
25201
  setError('Fehler beim löschen eines Elementes.');
25204
- return _context.abrupt("return", 1);
25202
+ return _context2.abrupt("return", 1);
25205
25203
  case 9:
25206
25204
  deletedIndex = newData.findIndex(function (d) {
25207
25205
  return (d === null || d === void 0 ? void 0 : d._id) == id;
@@ -25210,36 +25208,36 @@ function useTableData$1 (_ref) {
25210
25208
  deleted++;
25211
25209
  case 12:
25212
25210
  case "end":
25213
- return _context.stop();
25211
+ return _context2.stop();
25214
25212
  }
25215
25213
  }, _loop);
25216
25214
  });
25217
25215
  index = 0;
25218
25216
  case 5:
25219
25217
  if (!(index < state.selected.length)) {
25220
- _context2.next = 12;
25218
+ _context3.next = 12;
25221
25219
  break;
25222
25220
  }
25223
- return _context2.delegateYield(_loop(index), "t0", 7);
25221
+ return _context3.delegateYield(_loop(index), "t0", 7);
25224
25222
  case 7:
25225
- if (!_context2.t0) {
25226
- _context2.next = 9;
25223
+ if (!_context3.t0) {
25224
+ _context3.next = 9;
25227
25225
  break;
25228
25226
  }
25229
- return _context2.abrupt("continue", 9);
25227
+ return _context3.abrupt("continue", 9);
25230
25228
  case 9:
25231
25229
  index++;
25232
- _context2.next = 5;
25230
+ _context3.next = 5;
25233
25231
  break;
25234
25232
  case 12:
25235
25233
  total = state.pagination.total - deleted;
25236
25234
  pages = Math.ceil(total / state.pagination.pageSize);
25237
25235
  current = state.pagination.current > pages ? pages || 1 : state.pagination.current;
25238
25236
  if (!(pages > 0 && state.pagination.current > pages && filterServerSide || state.selected.length === 0)) {
25239
- _context2.next = 21;
25237
+ _context3.next = 21;
25240
25238
  break;
25241
25239
  }
25242
- _context2.next = 18;
25240
+ _context3.next = 18;
25243
25241
  return apiHandler.readList(configuration.mapping, {
25244
25242
  pagination: _objectSpread$h(_objectSpread$h({}, state.pagination), {}, {
25245
25243
  current: current
@@ -25249,7 +25247,7 @@ function useTableData$1 (_ref) {
25249
25247
  sorter: filterData.sorter
25250
25248
  });
25251
25249
  case 18:
25252
- data = _context2.sent;
25250
+ data = _context3.sent;
25253
25251
  newData = data.data;
25254
25252
  total = data.total;
25255
25253
  case 21:
@@ -25264,12 +25262,12 @@ function useTableData$1 (_ref) {
25264
25262
  }));
25265
25263
  case 22:
25266
25264
  case "end":
25267
- return _context2.stop();
25265
+ return _context3.stop();
25268
25266
  }
25269
- }, _callee);
25267
+ }, _callee2);
25270
25268
  }));
25271
25269
  return function onDelete() {
25272
- return _ref2.apply(this, arguments);
25270
+ return _ref3.apply(this, arguments);
25273
25271
  };
25274
25272
  }();
25275
25273
  function setLoading() {
@@ -25289,6 +25287,10 @@ function useTableData$1 (_ref) {
25289
25287
  onChange: onChange,
25290
25288
  onUpdate: onUpdate,
25291
25289
  onDelete: onDelete,
25290
+ getDataById: getDataById,
25291
+ resetToggle: function resetToggle() {
25292
+ throw new Error('not implemented for CatalogTable');
25293
+ },
25292
25294
  triggerRefresh: function triggerRefresh() {
25293
25295
  throw new Error('not implemented for CatalogTable');
25294
25296
  },
@@ -25596,11 +25598,10 @@ function useTableData (_ref) {
25596
25598
  var sorter = columns.filter(function (c) {
25597
25599
  return c.defaultSortOrder;
25598
25600
  }).map(function (c) {
25599
- var _c$dataIndex;
25600
25601
  return {
25601
25602
  column: c,
25602
25603
  field: c.dataIndex,
25603
- columnKey: (_c$dataIndex = c.dataIndex) === null || _c$dataIndex === void 0 ? void 0 : _c$dataIndex.join('.'),
25604
+ columnKey: c.key,
25604
25605
  order: c.defaultSortOrder
25605
25606
  };
25606
25607
  });
@@ -25638,38 +25639,74 @@ function useTableData (_ref) {
25638
25639
  }
25639
25640
  return title;
25640
25641
  }, [configuration.title, parentData]);
25642
+ var getDataById = /*#__PURE__*/function () {
25643
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id) {
25644
+ var _configuration$filter9;
25645
+ var filters, ssf, data;
25646
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
25647
+ while (1) switch (_context2.prev = _context2.next) {
25648
+ case 0:
25649
+ filters = {};
25650
+ filters['_id'] = [id, 'eq', false];
25651
+ ssf = _objectSpread$g({
25652
+ pagination: {
25653
+ current: 1,
25654
+ pageSize: 1
25655
+ },
25656
+ columns: configuration.columns,
25657
+ filters: filters
25658
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter9 = configuration.filter) !== null && _configuration$filter9 !== void 0 && (_configuration$filter9 = _configuration$filter9.toggle) !== null && _configuration$filter9 !== void 0 && _configuration$filter9.inQuery ? {
25659
+ genericProps: globalFilter.toggle
25660
+ } : undefined);
25661
+ _context2.next = 5;
25662
+ return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf);
25663
+ case 5:
25664
+ data = _context2.sent;
25665
+ return _context2.abrupt("return", data);
25666
+ case 7:
25667
+ case "end":
25668
+ return _context2.stop();
25669
+ }
25670
+ }, _callee2);
25671
+ }));
25672
+ return function getDataById(_x2) {
25673
+ return _ref4.apply(this, arguments);
25674
+ };
25675
+ }();
25641
25676
  var onChange = /*#__PURE__*/function () {
25642
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(p) {
25643
- var _configuration$filter9, _configuration$filter10, _configuration$filter11, _prefilter$select, _configuration$filter12, _configuration$filter13;
25677
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(p) {
25678
+ var _configuration$filter10, _configuration$filter11, _configuration$filter12, _prefilter$select, _configuration$filter13, _configuration$filter14;
25644
25679
  var prefilter,
25645
25680
  refresh,
25681
+ clearSelection,
25646
25682
  currentData,
25647
25683
  filterData,
25648
25684
  currentFilterHash,
25649
25685
  currentPagination,
25650
25686
  currentUrl,
25651
- _configuration$filter14,
25687
+ _configuration$filter15,
25652
25688
  ssf,
25653
25689
  data,
25654
25690
  _data3,
25655
25691
  _aplyFilterAndSortati2,
25656
25692
  _data4,
25657
25693
  pagination,
25658
- _args2 = arguments;
25659
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
25660
- while (1) switch (_context2.prev = _context2.next) {
25694
+ _args3 = arguments;
25695
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
25696
+ while (1) switch (_context3.prev = _context3.next) {
25661
25697
  case 0:
25662
- prefilter = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : globalFilter;
25663
- refresh = _args2.length > 2 ? _args2[2] : undefined;
25698
+ prefilter = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : globalFilter;
25699
+ refresh = _args3.length > 2 ? _args3[2] : undefined;
25700
+ clearSelection = _args3.length > 3 ? _args3[3] : undefined;
25664
25701
  setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
25665
25702
  loading: true
25666
25703
  }));
25667
25704
  currentData = initData;
25668
- filterData = _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, p.filters), prefilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter9 = configuration.filter) !== null && _configuration$filter9 !== void 0 && (_configuration$filter9 = _configuration$filter9.toggle) !== null && _configuration$filter9 !== void 0 && _configuration$filter9.inQuery) ? prefilter.toggle : undefined), ((_configuration$filter10 = configuration.filter) === null || _configuration$filter10 === void 0 || (_configuration$filter10 = _configuration$filter10.select) === null || _configuration$filter10 === void 0 ? void 0 : _configuration$filter10.applyDefaultValue) !== false || ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter12 = (_configuration$filter13 = configuration.filter) === null || _configuration$filter13 === void 0 || (_configuration$filter13 = _configuration$filter13.select) === null || _configuration$filter13 === void 0 ? void 0 : _configuration$filter13.filterField) !== null && _configuration$filter12 !== void 0 ? _configuration$filter12 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
25669
- filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref5) {
25670
- var _ref6 = _slicedToArray(_ref5, 2);
25671
- _ref6[0];
25672
- var v = _ref6[1];
25705
+ filterData = _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, p.filters), prefilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter10 = configuration.filter) !== null && _configuration$filter10 !== void 0 && (_configuration$filter10 = _configuration$filter10.toggle) !== null && _configuration$filter10 !== void 0 && _configuration$filter10.inQuery) ? prefilter.toggle : undefined), ((_configuration$filter11 = configuration.filter) === null || _configuration$filter11 === void 0 || (_configuration$filter11 = _configuration$filter11.select) === null || _configuration$filter11 === void 0 ? void 0 : _configuration$filter11.applyDefaultValue) !== false || ((_configuration$filter12 = configuration.filter) === null || _configuration$filter12 === void 0 || (_configuration$filter12 = _configuration$filter12.select) === null || _configuration$filter12 === void 0 ? void 0 : _configuration$filter12.defaultValue) !== ((_prefilter$select = prefilter.select) === null || _prefilter$select === void 0 || (_prefilter$select = _prefilter$select[(_configuration$filter13 = (_configuration$filter14 = configuration.filter) === null || _configuration$filter14 === void 0 || (_configuration$filter14 = _configuration$filter14.select) === null || _configuration$filter14 === void 0 ? void 0 : _configuration$filter14.filterField) !== null && _configuration$filter13 !== void 0 ? _configuration$filter13 : '']) === null || _prefilter$select === void 0 ? void 0 : _prefilter$select[0]) ? prefilter.select : undefined), prefilter.timeStamp), prefilter["default"]); //remove all null values
25706
+ filterData = Object.fromEntries(Object.entries(filterData).filter(function (_ref6) {
25707
+ var _ref7 = _slicedToArray(_ref6, 2);
25708
+ _ref7[0];
25709
+ var v = _ref7[1];
25673
25710
  return v != null;
25674
25711
  }));
25675
25712
  currentFilterHash = objectHash(filterData);
@@ -25678,7 +25715,7 @@ function useTableData (_ref) {
25678
25715
  });
25679
25716
  filterHash.current = currentFilterHash;
25680
25717
  if (!filterServerSide) {
25681
- _context2.next = 19;
25718
+ _context3.next = 20;
25682
25719
  break;
25683
25720
  }
25684
25721
  ssf = _objectSpread$g({
@@ -25686,32 +25723,32 @@ function useTableData (_ref) {
25686
25723
  columns: configuration.columns,
25687
25724
  filters: filterData,
25688
25725
  sorter: p.sorter
25689
- }, configuration !== null && configuration !== void 0 && (_configuration$filter14 = configuration.filter) !== null && _configuration$filter14 !== void 0 && (_configuration$filter14 = _configuration$filter14.toggle) !== null && _configuration$filter14 !== void 0 && _configuration$filter14.inQuery ? {
25726
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery ? {
25690
25727
  genericProps: prefilter.toggle
25691
25728
  } : undefined);
25692
- _context2.next = 13;
25729
+ _context3.next = 14;
25693
25730
  return apiHandler.readList(parentMapping || configuration.mapping, mapping, ssf);
25694
- case 13:
25695
- data = _context2.sent;
25731
+ case 14:
25732
+ data = _context3.sent;
25696
25733
  currentUrl = apiHandler.getReadListUrl(parentMapping || configuration.mapping, mapping, ssf);
25697
25734
  currentData = data.data;
25698
25735
  currentPagination = _objectSpread$g(_objectSpread$g({}, currentPagination), {}, {
25699
25736
  total: data.total
25700
25737
  });
25701
- _context2.next = 28;
25738
+ _context3.next = 29;
25702
25739
  break;
25703
- case 19:
25740
+ case 20:
25704
25741
  if (!(!currentData || currentData.length === 0 || refresh)) {
25705
- _context2.next = 25;
25742
+ _context3.next = 26;
25706
25743
  break;
25707
25744
  }
25708
- _context2.next = 22;
25745
+ _context3.next = 23;
25709
25746
  return apiHandler.readList(parentMapping || configuration.mapping, mapping, undefined);
25710
- case 22:
25711
- _data3 = _context2.sent;
25747
+ case 23:
25748
+ _data3 = _context3.sent;
25712
25749
  currentData = _data3.data;
25713
25750
  setInitData(currentData);
25714
- case 25:
25751
+ case 26:
25715
25752
  _aplyFilterAndSortati2 = aplyFilterAndSortation(_objectSpread$g(_objectSpread$g({}, p), {}, {
25716
25753
  pagination: currentPagination,
25717
25754
  filters: filterData,
@@ -25720,7 +25757,7 @@ function useTableData (_ref) {
25720
25757
  })), _data4 = _aplyFilterAndSortati2.data, pagination = _aplyFilterAndSortati2.pagination;
25721
25758
  currentData = _data4;
25722
25759
  currentPagination = pagination;
25723
- case 28:
25760
+ case 29:
25724
25761
  setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
25725
25762
  loading: false,
25726
25763
  data: currentData,
@@ -25729,19 +25766,21 @@ function useTableData (_ref) {
25729
25766
  prefilter: prefilter
25730
25767
  }),
25731
25768
  currentFetchUrl: currentUrl
25732
- }));
25769
+ }, clearSelection ? {
25770
+ selected: []
25771
+ } : {}));
25733
25772
  setFilter({
25734
25773
  filters: p.filters,
25735
25774
  sorter: p.sorter
25736
25775
  });
25737
- case 30:
25776
+ case 31:
25738
25777
  case "end":
25739
- return _context2.stop();
25778
+ return _context3.stop();
25740
25779
  }
25741
- }, _callee2);
25780
+ }, _callee3);
25742
25781
  }));
25743
- return function onChange(_x2) {
25744
- return _ref4.apply(this, arguments);
25782
+ return function onChange(_x3) {
25783
+ return _ref5.apply(this, arguments);
25745
25784
  };
25746
25785
  }();
25747
25786
  var onSelect = function onSelect(keys) {
@@ -25750,11 +25789,11 @@ function useTableData (_ref) {
25750
25789
  }));
25751
25790
  };
25752
25791
  var onDelete = /*#__PURE__*/function () {
25753
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
25792
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
25754
25793
  var _configuration$apiInt2;
25755
- var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$filter15, _configuration$filter16, data;
25756
- return _regeneratorRuntime.wrap(function _callee3$(_context4) {
25757
- while (1) switch (_context4.prev = _context4.next) {
25794
+ var newData, newInitData, deleted, userPermissions, _loop, mappingData, deleteResult, _ret, index, total, pages, current, _configuration$filter16, _configuration$filter17, data;
25795
+ return _regeneratorRuntime.wrap(function _callee4$(_context5) {
25796
+ while (1) switch (_context5.prev = _context5.next) {
25758
25797
  case 0:
25759
25798
  setState(_objectSpread$g(_objectSpread$g({}, state), {}, {
25760
25799
  deleting: true
@@ -25762,15 +25801,15 @@ function useTableData (_ref) {
25762
25801
  newData = _toConsumableArray(state.data);
25763
25802
  newInitData = initData ? _toConsumableArray(initData) : undefined;
25764
25803
  deleted = 0;
25765
- _context4.next = 6;
25804
+ _context5.next = 6;
25766
25805
  return _typeof(configuration.apiInterface) == 'object' && _typeof(configuration.apiInterface["delete"]) == 'object' ? (_configuration$apiInt2 = configuration.apiInterface["delete"]) === null || _configuration$apiInt2 === void 0 ? void 0 : _configuration$apiInt2.permission : undefined;
25767
25806
  case 6:
25768
- userPermissions = _context4.sent;
25807
+ userPermissions = _context5.sent;
25769
25808
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop(index) {
25770
- var _configuration$rowKey, _configuration$filter17, _configuration$filter18;
25809
+ var _configuration$filter18, _configuration$filter19;
25771
25810
  var id, _newData$filter, _newData$filter2, mapToggle, _iterator, _step, _globalFilter$toggle, field, _globalFilter$toggle2, _configuration$delete, _configuration$onErro, _configuration$onErro2, deletedIndex, initDeletedIndex;
25772
- return _regeneratorRuntime.wrap(function _loop$(_context3) {
25773
- while (1) switch (_context3.prev = _context3.next) {
25811
+ return _regeneratorRuntime.wrap(function _loop$(_context4) {
25812
+ while (1) switch (_context4.prev = _context4.next) {
25774
25813
  case 0:
25775
25814
  id = state.selected[index];
25776
25815
  if (configuration.rowKey) {
@@ -25783,7 +25822,7 @@ function useTableData (_ref) {
25783
25822
  })) === null || _newData$filter2 === void 0 ? void 0 : _newData$filter2[0];
25784
25823
  }
25785
25824
  mapToggle = {};
25786
- _iterator = _createForOfIteratorHelper$3((_configuration$filter17 = (_configuration$filter18 = configuration.filter) === null || _configuration$filter18 === void 0 || (_configuration$filter18 = _configuration$filter18.toggle) === null || _configuration$filter18 === void 0 ? void 0 : _configuration$filter18.fields) !== null && _configuration$filter17 !== void 0 ? _configuration$filter17 : []);
25825
+ _iterator = _createForOfIteratorHelper$3((_configuration$filter18 = (_configuration$filter19 = configuration.filter) === null || _configuration$filter19 === void 0 || (_configuration$filter19 = _configuration$filter19.toggle) === null || _configuration$filter19 === void 0 ? void 0 : _configuration$filter19.fields) !== null && _configuration$filter18 !== void 0 ? _configuration$filter18 : []);
25787
25826
  try {
25788
25827
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
25789
25828
  field = _step.value;
@@ -25798,107 +25837,106 @@ function useTableData (_ref) {
25798
25837
  }
25799
25838
  mappingData = _objectSpread$g(_objectSpread$g(_objectSpread$g({}, mappingData), state.mappingData), mapToggle);
25800
25839
  deleteResult = undefined;
25801
- _context3.prev = 7;
25840
+ _context4.prev = 7;
25802
25841
  if (!(userPermissions && !root.actions.userHasPermission(userPermissions))) {
25803
- _context3.next = 11;
25842
+ _context4.next = 11;
25804
25843
  break;
25805
25844
  }
25806
25845
  setError('Sie haben keine Berechtigung ein Mediaitem zu löschen.');
25807
- return _context3.abrupt("return", 0);
25846
+ return _context4.abrupt("return", 0);
25808
25847
  case 11:
25809
- _context3.next = 13;
25848
+ _context4.next = 13;
25810
25849
  return apiHandler["delete"](id, (_configuration$delete = configuration.deleteMapping) !== null && _configuration$delete !== void 0 ? _configuration$delete : configuration.mapping, mappingData);
25811
25850
  case 13:
25812
- deleteResult = _context3.sent;
25813
- _context3.next = 24;
25851
+ deleteResult = _context4.sent;
25852
+ _context4.next = 24;
25814
25853
  break;
25815
25854
  case 16:
25816
- _context3.prev = 16;
25817
- _context3.t0 = _context3["catch"](7);
25818
- if (!(_context3.t0 instanceof DivaError && _context3.t0.name)) {
25819
- _context3.next = 22;
25855
+ _context4.prev = 16;
25856
+ _context4.t0 = _context4["catch"](7);
25857
+ if (!(_context4.t0 instanceof DivaError && _context4.t0.name)) {
25858
+ _context4.next = 22;
25820
25859
  break;
25821
25860
  }
25822
- if (!((_configuration$onErro = configuration.onError) !== null && _configuration$onErro !== void 0 && _configuration$onErro[_context3.t0.name])) {
25823
- _context3.next = 22;
25861
+ if (!((_configuration$onErro = configuration.onError) !== null && _configuration$onErro !== void 0 && _configuration$onErro[_context4.t0.name])) {
25862
+ _context4.next = 22;
25824
25863
  break;
25825
25864
  }
25826
- setError((_configuration$onErro2 = configuration.onError) === null || _configuration$onErro2 === void 0 ? void 0 : _configuration$onErro2[_context3.t0.name]);
25827
- return _context3.abrupt("return", 0);
25865
+ setError((_configuration$onErro2 = configuration.onError) === null || _configuration$onErro2 === void 0 ? void 0 : _configuration$onErro2[_context4.t0.name]);
25866
+ return _context4.abrupt("return", 0);
25828
25867
  case 22:
25829
- setError(_context3.t0.message);
25830
- return _context3.abrupt("return", 0);
25868
+ setError(_context4.t0.message);
25869
+ return _context4.abrupt("return", 0);
25831
25870
  case 24:
25832
25871
  if (deleteResult) {
25833
- _context3.next = 27;
25872
+ _context4.next = 27;
25834
25873
  break;
25835
25874
  }
25836
25875
  setError('Fehler beim löschen eines Elementes.');
25837
- return _context3.abrupt("return", 1);
25876
+ return _context4.abrupt("return", 1);
25838
25877
  case 27:
25839
- (_configuration$rowKey = configuration.rowKey) !== null && _configuration$rowKey !== void 0 ? _configuration$rowKey : '_id';
25840
25878
  deletedIndex = newData.findIndex(function (d) {
25841
- var _configuration$rowKey2, _configuration$rowKey3;
25842
- return goTroughObject(d, (_configuration$rowKey2 = (_configuration$rowKey3 = configuration.rowKey) === null || _configuration$rowKey3 === void 0 ? void 0 : _configuration$rowKey3.split('.')) !== null && _configuration$rowKey2 !== void 0 ? _configuration$rowKey2 : ['_id']) == id;
25879
+ var _configuration$rowKey, _configuration$rowKey2;
25880
+ return goTroughObject(d, (_configuration$rowKey = (_configuration$rowKey2 = configuration.rowKey) === null || _configuration$rowKey2 === void 0 ? void 0 : _configuration$rowKey2.split('.')) !== null && _configuration$rowKey !== void 0 ? _configuration$rowKey : ['_id']) == id;
25843
25881
  });
25844
25882
  newData.splice(deletedIndex, 1);
25845
25883
  initDeletedIndex = newInitData === null || newInitData === void 0 ? void 0 : newInitData.findIndex(function (d) {
25846
- var _configuration$rowKey4, _configuration$rowKey5;
25847
- return goTroughObject(d, (_configuration$rowKey4 = (_configuration$rowKey5 = configuration.rowKey) === null || _configuration$rowKey5 === void 0 ? void 0 : _configuration$rowKey5.split('.')) !== null && _configuration$rowKey4 !== void 0 ? _configuration$rowKey4 : ['_id']) == id;
25884
+ var _configuration$rowKey3, _configuration$rowKey4;
25885
+ return goTroughObject(d, (_configuration$rowKey3 = (_configuration$rowKey4 = configuration.rowKey) === null || _configuration$rowKey4 === void 0 ? void 0 : _configuration$rowKey4.split('.')) !== null && _configuration$rowKey3 !== void 0 ? _configuration$rowKey3 : ['_id']) == id;
25848
25886
  });
25849
25887
  newInitData === null || newInitData === void 0 || newInitData.splice(initDeletedIndex, 1);
25850
25888
  deleted++;
25851
- case 33:
25889
+ case 32:
25852
25890
  case "end":
25853
- return _context3.stop();
25891
+ return _context4.stop();
25854
25892
  }
25855
25893
  }, _loop, null, [[7, 16]]);
25856
25894
  });
25857
25895
  index = 0;
25858
25896
  case 9:
25859
25897
  if (!(index < state.selected.length)) {
25860
- _context4.next = 19;
25898
+ _context5.next = 19;
25861
25899
  break;
25862
25900
  }
25863
- return _context4.delegateYield(_loop(index), "t0", 11);
25901
+ return _context5.delegateYield(_loop(index), "t0", 11);
25864
25902
  case 11:
25865
- _ret = _context4.t0;
25903
+ _ret = _context5.t0;
25866
25904
  if (!(_ret === 0)) {
25867
- _context4.next = 14;
25905
+ _context5.next = 14;
25868
25906
  break;
25869
25907
  }
25870
- return _context4.abrupt("break", 19);
25908
+ return _context5.abrupt("break", 19);
25871
25909
  case 14:
25872
25910
  if (!(_ret === 1)) {
25873
- _context4.next = 16;
25911
+ _context5.next = 16;
25874
25912
  break;
25875
25913
  }
25876
- return _context4.abrupt("continue", 16);
25914
+ return _context5.abrupt("continue", 16);
25877
25915
  case 16:
25878
25916
  index++;
25879
- _context4.next = 9;
25917
+ _context5.next = 9;
25880
25918
  break;
25881
25919
  case 19:
25882
25920
  total = state.pagination.total - deleted;
25883
25921
  pages = Math.ceil(total / state.pagination.pageSize);
25884
25922
  current = state.pagination.current > pages ? pages : state.pagination.current;
25885
25923
  if (!(state.pagination.current > pages && filterServerSide || state.selected.length === 0)) {
25886
- _context4.next = 28;
25924
+ _context5.next = 28;
25887
25925
  break;
25888
25926
  }
25889
- _context4.next = 25;
25927
+ _context5.next = 25;
25890
25928
  return apiHandler.readList(parentMapping || configuration.mapping, mapping, _objectSpread$g({
25891
25929
  pagination: _objectSpread$g(_objectSpread$g({}, state.pagination), {}, {
25892
25930
  current: current
25893
25931
  }),
25894
25932
  columns: configuration.columns,
25895
- filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter15 = configuration.filter) !== null && _configuration$filter15 !== void 0 && (_configuration$filter15 = _configuration$filter15.toggle) !== null && _configuration$filter15 !== void 0 && _configuration$filter15.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
25933
+ filters: _objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g(_objectSpread$g({}, filterData.filters), globalFilter.search), !(configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery) ? globalFilter.toggle : undefined), globalFilter.select), globalFilter.timeStamp), globalFilter["default"]),
25896
25934
  sorter: filterData.sorter
25897
- }, configuration !== null && configuration !== void 0 && (_configuration$filter16 = configuration.filter) !== null && _configuration$filter16 !== void 0 && (_configuration$filter16 = _configuration$filter16.toggle) !== null && _configuration$filter16 !== void 0 && _configuration$filter16.inQuery ? {
25935
+ }, configuration !== null && configuration !== void 0 && (_configuration$filter17 = configuration.filter) !== null && _configuration$filter17 !== void 0 && (_configuration$filter17 = _configuration$filter17.toggle) !== null && _configuration$filter17 !== void 0 && _configuration$filter17.inQuery ? {
25898
25936
  genericProps: globalFilter.toggle
25899
25937
  } : undefined));
25900
25938
  case 25:
25901
- data = _context4.sent;
25939
+ data = _context5.sent;
25902
25940
  newData = data.data;
25903
25941
  total = data.total;
25904
25942
  case 28:
@@ -25914,17 +25952,17 @@ function useTableData (_ref) {
25914
25952
  }));
25915
25953
  case 30:
25916
25954
  case "end":
25917
- return _context4.stop();
25955
+ return _context5.stop();
25918
25956
  }
25919
- }, _callee3);
25957
+ }, _callee4);
25920
25958
  }));
25921
25959
  return function onDelete() {
25922
- return _ref7.apply(this, arguments);
25960
+ return _ref8.apply(this, arguments);
25923
25961
  };
25924
25962
  }();
25925
25963
  var onGlobalFilterSelect = function onGlobalFilterSelect(value) {
25926
- var _configuration$filter19;
25927
- if (!((_configuration$filter19 = configuration.filter) !== null && _configuration$filter19 !== void 0 && _configuration$filter19.select)) {
25964
+ var _configuration$filter20;
25965
+ if (!((_configuration$filter20 = configuration.filter) !== null && _configuration$filter20 !== void 0 && _configuration$filter20.select)) {
25928
25966
  LOG$2.error(new DivaError('No global select filter defiend'));
25929
25967
  return;
25930
25968
  }
@@ -25940,8 +25978,8 @@ function useTableData (_ref) {
25940
25978
  }, filterData), newGlobalFilter);
25941
25979
  };
25942
25980
  var onGlobalFilterToggle = function onGlobalFilterToggle() {
25943
- var _configuration$filter20;
25944
- if (!((_configuration$filter20 = configuration.filter) !== null && _configuration$filter20 !== void 0 && _configuration$filter20.toggle)) {
25981
+ var _configuration$filter21;
25982
+ if (!((_configuration$filter21 = configuration.filter) !== null && _configuration$filter21 !== void 0 && _configuration$filter21.toggle)) {
25945
25983
  LOG$2.error(new DivaError('No global toggle filter defined'));
25946
25984
  return;
25947
25985
  }
@@ -25955,11 +25993,14 @@ function useTableData (_ref) {
25955
25993
  setGlobaFilter(newGlobalFilter);
25956
25994
  onChange(_objectSpread$g({
25957
25995
  pagination: state.pagination
25958
- }, filterData), newGlobalFilter);
25996
+ }, filterData), newGlobalFilter, undefined, true);
25997
+ };
25998
+ var resetToggle = function resetToggle() {
25999
+ if (globalFilter !== null && globalFilter !== void 0 && globalFilter.toggle) onGlobalFilterToggle();
25959
26000
  };
25960
26001
  var onGlobalFilterSearch = function onGlobalFilterSearch(value) {
25961
- var _configuration$filter21;
25962
- if (!((_configuration$filter21 = configuration.filter) !== null && _configuration$filter21 !== void 0 && _configuration$filter21.search)) {
26002
+ var _configuration$filter22;
26003
+ if (!((_configuration$filter22 = configuration.filter) !== null && _configuration$filter22 !== void 0 && _configuration$filter22.search)) {
25963
26004
  LOG$2.error(new DivaError('No global search filter defiend'));
25964
26005
  return;
25965
26006
  }
@@ -25967,8 +26008,8 @@ function useTableData (_ref) {
25967
26008
  search: {}
25968
26009
  });
25969
26010
  if (value) {
25970
- var _configuration$filter22;
25971
- (_configuration$filter22 = configuration.filter) === null || _configuration$filter22 === void 0 || _configuration$filter22.search.fields.forEach(function (f) {
26011
+ var _configuration$filter23;
26012
+ (_configuration$filter23 = configuration.filter) === null || _configuration$filter23 === void 0 || _configuration$filter23.search.fields.forEach(function (f) {
25972
26013
  if (typeof f == 'string') {
25973
26014
  newGlobalFilter.search[f] = [value, 'contains', 0];
25974
26015
  } else {
@@ -25982,8 +26023,8 @@ function useTableData (_ref) {
25982
26023
  }, filterData), newGlobalFilter);
25983
26024
  };
25984
26025
  var onGlobalFilterPeriod = function onGlobalFilterPeriod(from, to) {
25985
- var _configuration$filter23;
25986
- if (!((_configuration$filter23 = configuration.filter) !== null && _configuration$filter23 !== void 0 && _configuration$filter23.period)) {
26026
+ var _configuration$filter24;
26027
+ if (!((_configuration$filter24 = configuration.filter) !== null && _configuration$filter24 !== void 0 && _configuration$filter24.period)) {
25987
26028
  LOG$2.error(new DivaError('No global period filter defiend'));
25988
26029
  return;
25989
26030
  }
@@ -26005,7 +26046,9 @@ function useTableData (_ref) {
26005
26046
  onUpdate: onUpdate,
26006
26047
  onDelete: onDelete,
26007
26048
  onSelect: onSelect,
26049
+ getDataById: getDataById,
26008
26050
  triggerRefresh: triggerRefresh,
26051
+ resetToggle: resetToggle,
26009
26052
  onSelectedCatalog: onSelectedCatalog,
26010
26053
  error: error,
26011
26054
  catalogItem: catalogItem,
@@ -26324,7 +26367,7 @@ var AGChart = function AGChart(_ref) {
26324
26367
  padding: '50px'
26325
26368
  },
26326
26369
  className: root.contentStore.theme == 'darkmode' ? 'ag-theme-alpine-dark' : 'ag-theme-alpine',
26327
- children: /*#__PURE__*/jsx(AgChartsReact, {
26370
+ children: /*#__PURE__*/jsx(AgCharts, {
26328
26371
  options: {
26329
26372
  data: dt,
26330
26373
  title: {
@@ -26673,9 +26716,7 @@ var CustomInput = function CustomInput(_ref) {
26673
26716
  })]
26674
26717
  });
26675
26718
  };
26676
- var CustomInput$1 = observer(CustomInput, {
26677
- forwardRef: true
26678
- });
26719
+ var CustomInput$1 = observer(CustomInput);
26679
26720
 
26680
26721
  function useTextData (_ref) {
26681
26722
  var id = _ref.id;
@@ -26709,9 +26750,7 @@ var CustomText = function CustomText(_ref) {
26709
26750
  });
26710
26751
  }
26711
26752
  };
26712
- var CustomText$1 = observer(CustomText, {
26713
- forwardRef: true
26714
- });
26753
+ var CustomText$1 = observer(CustomText);
26715
26754
 
26716
26755
  function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26717
26756
  function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -27488,15 +27527,16 @@ var BreadCrumbsTrigger = function BreadCrumbsTrigger(_ref) {
27488
27527
  return e.stopPropagation();
27489
27528
  },
27490
27529
  children: /*#__PURE__*/jsx(Breadcrumb, {
27491
- children: breadcrumbs.map(function (data) {
27492
- return /*#__PURE__*/jsx(Breadcrumb.Item, {
27493
- className: classnames(breadcrumb, root.dataStore.selectedOrganizationId === data.id ? selected : undefined, !data.readPermission ? disabled : undefined),
27530
+ items: breadcrumbs.map(function (data) {
27531
+ return {
27532
+ key: data.id,
27533
+ breadcrumbName: data.displayName,
27494
27534
  onClick: function onClick() {
27495
27535
  var _root$dataStore;
27496
27536
  return root === null || root === void 0 || (_root$dataStore = root.dataStore) === null || _root$dataStore === void 0 ? void 0 : _root$dataStore.setSelectedOrganizationId(data.id);
27497
27537
  },
27498
- children: data.displayName
27499
- }, data.id);
27538
+ className: classnames(breadcrumb, root.dataStore.selectedOrganizationId === data.id ? selected : undefined, !data.readPermission ? disabled : undefined)
27539
+ };
27500
27540
  })
27501
27541
  })
27502
27542
  })]
@@ -28835,7 +28875,8 @@ function useModule (currentModules) {
28835
28875
  },
28836
28876
  type: 'Configurator',
28837
28877
  id: 'WYSIWYG',
28838
- startWidth: 600
28878
+ startWidth: 600,
28879
+ defaultPinned: true
28839
28880
  });
28840
28881
  root.contentStore.tools = tools;
28841
28882
  return function () {
@@ -29960,7 +30001,7 @@ var ExclusivityFeatureOption = function ExclusivityFeatureOption() {
29960
30001
  });
29961
30002
  };
29962
30003
  var ExclusivityTable = function ExclusivityTable(_ref) {
29963
- var _ref2;
30004
+ var _selectedSerie$series;
29964
30005
  var type = _ref.type,
29965
30006
  config = _ref.config;
29966
30007
  var _useTranslation = useTranslation(),
@@ -30024,7 +30065,7 @@ var ExclusivityTable = function ExclusivityTable(_ref) {
30024
30065
  })]
30025
30066
  })
30026
30067
  }), showTable() && /*#__PURE__*/jsx(Spreadsheet, {
30027
- gridId: (_ref2 = 'crud-grid_exclusivity_' + type + (selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.seriesName.DE)) !== null && _ref2 !== void 0 ? _ref2 : '',
30068
+ gridId: 'crud-grid_exclusivity_' + type + ((_selectedSerie$series = selectedSerie === null || selectedSerie === void 0 ? void 0 : selectedSerie.seriesName.DE) !== null && _selectedSerie$series !== void 0 ? _selectedSerie$series : ''),
30028
30069
  jwt: jwt,
30029
30070
  applicationData: applicationData,
30030
30071
  configuration: {
@@ -30456,8 +30497,10 @@ function Detail(_ref) {
30456
30497
  },
30457
30498
  width: (_info$width = info.width) !== null && _info$width !== void 0 ? _info$width : left ? '800px' : '1000px',
30458
30499
  title: info.title,
30459
- bodyStyle: {
30460
- padding: 0
30500
+ styles: {
30501
+ body: {
30502
+ padding: 0
30503
+ }
30461
30504
  },
30462
30505
  footer: info.footer != false ? /*#__PURE__*/jsxs("div", {
30463
30506
  style: {
@@ -30898,7 +30941,8 @@ var ArticleSelection = function ArticleSelection(_ref) {
30898
30941
  }), root.contentStore.toolPinned && /*#__PURE__*/jsx(PushpinFilled, {
30899
30942
  onClick: function onClick() {
30900
30943
  return root.contentStore.toolPinned = !root.contentStore.toolPinned;
30901
- }
30944
+ },
30945
+ className: button
30902
30946
  }), /*#__PURE__*/jsx(Select$2, {
30903
30947
  value: articleList.find(function (a) {
30904
30948
  return a.value == articleCodex;
@@ -31085,6 +31129,7 @@ function useWysiwyg$1(_ref) {
31085
31129
  hideMobileFolder: true,
31086
31130
  showSettingsFolder: true,
31087
31131
  hideRalColorFilter: false,
31132
+ showOptionCodexInOptionHeader: true,
31088
31133
  hideSearchBar: false,
31089
31134
  alwaysShowSearchBar: true,
31090
31135
  displayMetaDatas: ['codex'],
@@ -31445,6 +31490,7 @@ var Toolbar = function Toolbar(_ref) {
31445
31490
  });
31446
31491
  if (_tool) {
31447
31492
  root.contentStore.openedToolId = _tool.id;
31493
+ root.contentStore.toolPinned = !!_tool.defaultPinned;
31448
31494
  root.contentStore.hideTools = false;
31449
31495
  }
31450
31496
  }
@@ -31474,6 +31520,7 @@ var Toolbar = function Toolbar(_ref) {
31474
31520
  onClick: function onClick() {
31475
31521
  if (root.contentStore.openedToolId != t.id) {
31476
31522
  root.contentStore.openedToolId = t.id;
31523
+ root.contentStore.toolPinned = !!t.defaultPinned;
31477
31524
  root.contentStore.hideTools = false;
31478
31525
  } else {
31479
31526
  root.contentStore.hideTools = !root.contentStore.hideTools;