@leav/ui 1.4.1-2c37238c → 1.4.1-43ad122d

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 (259) hide show
  1. package/dist/_gqlTypes/index.d.ts +49 -5
  2. package/dist/_gqlTypes/index.js +45 -3
  3. package/dist/_gqlTypes/index.js.map +1 -1
  4. package/dist/_queries/export/exportQuery.js +2 -2
  5. package/dist/_utils/index.js +4 -4
  6. package/dist/components/AttributePicker/AttributesList/AttributesList.js +1 -1
  7. package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedLibraryForm/LinkedLibraryForm.js +1 -1
  8. package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedTreeForm/LinkedTreeForm.js +1 -1
  9. package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributeCell/AttributeCell.js +1 -1
  10. package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.js +5 -5
  11. package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js +1 -1
  12. package/dist/components/EntityCard/EntityCard.js +5 -5
  13. package/dist/components/Explorer/Explorer.d.ts +2 -1
  14. package/dist/components/Explorer/Explorer.js +50 -32
  15. package/dist/components/Explorer/Explorer.js.map +1 -1
  16. package/dist/components/Explorer/ExplorerFiltersAndSorts.js +8 -12
  17. package/dist/components/Explorer/ExplorerFiltersAndSorts.js.map +1 -1
  18. package/dist/components/Explorer/ExplorerToolbar.js +6 -3
  19. package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
  20. package/dist/components/Explorer/_constants.d.ts +1 -0
  21. package/dist/components/Explorer/_constants.js +1 -0
  22. package/dist/components/Explorer/_constants.js.map +1 -1
  23. package/dist/components/Explorer/_queries/useExplorerData.d.ts +3 -2
  24. package/dist/components/Explorer/_queries/useExplorerData.js +1 -1
  25. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  26. package/dist/components/Explorer/_types.d.ts +4 -117
  27. package/dist/components/Explorer/_types.js +1 -12
  28. package/dist/components/Explorer/_types.js.map +1 -1
  29. package/dist/components/Explorer/actions-item/useEditStatusItemAction.js +17 -8
  30. package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -1
  31. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +12 -5
  32. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -1
  33. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.d.ts +3 -1
  34. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +14 -7
  35. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
  36. package/dist/components/Explorer/actions-mass/useExportMassAction.d.ts +17 -0
  37. package/dist/components/Explorer/actions-mass/useExportMassAction.js +100 -0
  38. package/dist/components/Explorer/actions-mass/useExportMassAction.js.map +1 -0
  39. package/dist/components/Explorer/actions-mass/useMassActions.d.ts +3 -1
  40. package/dist/components/Explorer/actions-mass/useMassActions.js +4 -4
  41. package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
  42. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +3 -3
  43. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
  44. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +3 -1
  45. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
  46. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.d.ts +2 -1
  47. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +6 -6
  48. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
  49. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +15 -3
  50. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
  51. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +4 -0
  52. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -1
  53. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +4 -2
  54. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -1
  55. package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +15 -3
  56. package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -1
  57. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +1 -4
  58. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
  59. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +8 -9
  60. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +4 -128
  61. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
  62. package/dist/components/Explorer/useLoadView.js +15 -8
  63. package/dist/components/Explorer/useLoadView.js.map +1 -1
  64. package/dist/components/Explorer/useViewSettingsReducer.js +5 -10
  65. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
  66. package/dist/components/Filters/FiltersProvider.d.ts +3 -0
  67. package/dist/components/Filters/FiltersProvider.js +8 -0
  68. package/dist/components/Filters/FiltersProvider.js.map +1 -0
  69. package/dist/components/Filters/_types.d.ts +130 -0
  70. package/dist/components/Filters/_types.js +14 -0
  71. package/dist/components/Filters/_types.js.map +1 -0
  72. package/dist/components/Filters/conditionsHelper.d.ts +2 -0
  73. package/dist/components/Filters/conditionsHelper.js +16 -0
  74. package/dist/components/Filters/conditionsHelper.js.map +1 -0
  75. package/dist/components/Filters/context/filtersContext.d.ts +6 -0
  76. package/dist/components/Filters/context/filtersContext.js +9 -0
  77. package/dist/components/Filters/context/filtersContext.js.map +1 -0
  78. package/dist/components/Filters/context/filtersInitialState.d.ts +2 -0
  79. package/dist/components/Filters/context/filtersInitialState.js +10 -0
  80. package/dist/components/Filters/context/filtersInitialState.js.map +1 -0
  81. package/dist/components/Filters/context/filtersReducer.d.ts +64 -0
  82. package/dist/components/Filters/context/filtersReducer.js +179 -0
  83. package/dist/components/Filters/context/filtersReducer.js.map +1 -0
  84. package/dist/components/Filters/context/useFiltersReducer.d.ts +13 -0
  85. package/dist/components/Filters/context/useFiltersReducer.js +68 -0
  86. package/dist/components/Filters/context/useFiltersReducer.js.map +1 -0
  87. package/dist/components/Filters/filter-items/CommonFilterItem.d.ts +8 -0
  88. package/dist/components/{Explorer/manage-view-settings/_shared → Filters/filter-items}/CommonFilterItem.js +7 -7
  89. package/dist/components/Filters/filter-items/CommonFilterItem.js.map +1 -0
  90. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/BooleanAttributeDropdown.js +16 -8
  91. package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  92. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ColorAttributeDropDown.js +1 -1
  93. package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  94. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateAttributeDropDown.js +3 -3
  95. package/dist/components/Filters/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  96. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateRangeAttributeDropDown.js +1 -1
  97. package/dist/components/Filters/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  98. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/EncryptedAttributeDropDown.js +1 -1
  99. package/dist/components/Filters/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  100. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ExtendedAttributeDropDown.js +1 -1
  101. package/dist/components/Filters/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  102. package/dist/components/Filters/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  103. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterDropDown.js +9 -9
  104. package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js.map +1 -0
  105. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterDropdownContent.d.ts +3 -3
  106. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterDropdownContent.js +6 -6
  107. package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js.map +1 -0
  108. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterValueListDropDown.d.ts +3 -3
  109. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterValueListDropDown.js +5 -5
  110. package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js.map +1 -0
  111. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/LinkAttributeDropdown.js +6 -6
  112. package/dist/components/Filters/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -0
  113. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/NumericAttributeDropDown.js +2 -2
  114. package/dist/components/Filters/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  115. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TextAttributeDropDown.js +2 -2
  116. package/dist/components/Filters/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  117. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TreeAttributeDropDown.js +5 -5
  118. package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -0
  119. package/dist/components/Filters/filter-items/filter-type/_types.d.ts +18 -0
  120. package/dist/components/Filters/filter-items/filter-type/_types.js.map +1 -0
  121. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/useConditionOptionsByType.d.ts +7 -7
  122. package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/useConditionOptionsByType.js +14 -14
  123. package/dist/components/Filters/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  124. package/dist/components/Filters/index.d.ts +8 -0
  125. package/dist/components/Filters/index.js +12 -0
  126. package/dist/components/Filters/index.js.map +1 -0
  127. package/dist/components/Filters/prepareFiltersForRequest.d.ts +4 -0
  128. package/dist/components/{Explorer/_queries → Filters}/prepareFiltersForRequest.js +12 -11
  129. package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -0
  130. package/dist/components/Filters/useFilters.d.ts +1724 -0
  131. package/dist/components/Filters/useFilters.js +28 -0
  132. package/dist/components/Filters/useFilters.js.map +1 -0
  133. package/dist/components/Filters/useFiltersContext.d.ts +4 -0
  134. package/dist/components/Filters/useFiltersContext.js +13 -0
  135. package/dist/components/Filters/useFiltersContext.js.map +1 -0
  136. package/dist/components/{Explorer/manage-view-settings/_shared → Filters}/useTransformFilters.d.ts +9 -9
  137. package/dist/components/{Explorer/manage-view-settings/_shared → Filters}/useTransformFilters.js +8 -8
  138. package/dist/components/Filters/useTransformFilters.js.map +1 -0
  139. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +5 -5
  140. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
  141. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +1 -1
  142. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js +1 -1
  143. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js +1 -1
  144. package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js +1 -1
  145. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js +1 -14
  146. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js.map +1 -1
  147. package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js +2 -2
  148. package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js +1 -1
  149. package/dist/components/LibraryItemsList/MenuView/MenuView.js +6 -6
  150. package/dist/components/LibraryItemsList/Sidebar/Sidebar.js +1 -1
  151. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js +1 -1
  152. package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js +3 -3
  153. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.d.ts +1 -1
  154. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js +4 -4
  155. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +2 -2
  156. package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js +2 -2
  157. package/dist/components/Notifications/InitNotificationsSubscription.d.ts +2 -0
  158. package/dist/components/Notifications/InitNotificationsSubscription.js +7 -0
  159. package/dist/components/Notifications/InitNotificationsSubscription.js.map +1 -0
  160. package/dist/components/Notifications/hooks/useNotificationSubscription.d.ts +4 -0
  161. package/dist/components/Notifications/hooks/useNotificationSubscription.js +33 -0
  162. package/dist/components/Notifications/hooks/useNotificationSubscription.js.map +1 -0
  163. package/dist/components/Notifications/index.d.ts +1 -0
  164. package/dist/components/{ExportModal → Notifications}/index.js +1 -1
  165. package/dist/components/Notifications/index.js.map +1 -0
  166. package/dist/components/RecordCard/RecordCard.js +4 -4
  167. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +9 -2
  168. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  169. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +5 -2
  170. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -1
  171. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +12 -4
  172. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  173. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +1 -1
  174. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +1 -1
  175. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +1 -1
  176. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +1 -1
  177. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +1 -1
  178. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +1 -1
  179. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +1 -1
  180. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +14 -2
  181. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
  182. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js +3 -1
  183. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js.map +1 -1
  184. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +1 -1
  185. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
  186. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.d.ts +2 -2
  187. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +3 -2
  188. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +15 -2
  189. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  190. package/dist/components/RecordEdition/_types.d.ts +2 -2
  191. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.d.ts +2 -2
  192. package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalContent.js +1 -1
  193. package/dist/components/SelectTreeNode/_types.js +1 -0
  194. package/dist/components/SelectTreeNode/_types.js.map +1 -1
  195. package/dist/components/TreePicker/TreesList/TreesList.js +1 -1
  196. package/dist/components/index.d.ts +2 -1
  197. package/dist/components/index.js +2 -1
  198. package/dist/components/index.js.map +1 -1
  199. package/dist/constants.d.ts +6 -4
  200. package/dist/constants.js +6 -4
  201. package/dist/constants.js.map +1 -1
  202. package/dist/hooks/index.d.ts +1 -0
  203. package/dist/hooks/index.js +1 -0
  204. package/dist/hooks/index.js.map +1 -1
  205. package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +3 -3
  206. package/dist/hooks/useIFrameMessenger/messageHandlers.js +12 -16
  207. package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -1
  208. package/dist/hooks/useIFrameMessenger/schema.d.ts +88 -5
  209. package/dist/hooks/useIFrameMessenger/schema.js +50 -58
  210. package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
  211. package/dist/hooks/useIFrameMessenger/types.d.ts +33 -31
  212. package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
  213. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +2 -2
  214. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
  215. package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.d.ts +2 -2
  216. package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.d.ts +2 -2
  217. package/dist/locales/en/shared.json +26 -4
  218. package/dist/locales/fr/shared.json +26 -4
  219. package/dist/types/search.d.ts +5 -5
  220. package/dist/types/search.js +5 -5
  221. package/package.json +3 -3
  222. package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +0 -4
  223. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +0 -1
  224. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +0 -6
  225. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +0 -1
  226. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +0 -1
  227. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +0 -1
  228. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +0 -1
  229. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +0 -1
  230. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +0 -1
  231. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +0 -1
  232. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +0 -1
  233. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +0 -3
  234. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +0 -1
  235. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +0 -1
  236. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js.map +0 -1
  237. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +0 -1
  238. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +0 -1
  239. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +0 -1
  240. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js.map +0 -1
  241. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +0 -18
  242. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js.map +0 -1
  243. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +0 -1
  244. package/dist/components/ExportModal/ExportModal.d.ts +0 -10
  245. package/dist/components/ExportModal/ExportModal.js +0 -123
  246. package/dist/components/ExportModal/ExportModal.js.map +0 -1
  247. package/dist/components/ExportModal/index.d.ts +0 -1
  248. package/dist/components/ExportModal/index.js.map +0 -1
  249. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/BooleanAttributeDropdown.d.ts +0 -0
  250. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ColorAttributeDropDown.d.ts +0 -0
  251. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateAttributeDropDown.d.ts +0 -0
  252. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +0 -0
  253. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +0 -0
  254. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +0 -0
  255. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/LinkAttributeDropdown.d.ts +0 -0
  256. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/NumericAttributeDropDown.d.ts +0 -0
  257. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TextAttributeDropDown.d.ts +0 -0
  258. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TreeAttributeDropDown.d.ts +0 -0
  259. /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/_types.js +0 -0
@@ -17,8 +17,8 @@ export * from './ErrorBoundary';
17
17
  export * from './ErrorDisplay';
18
18
  export * from './ErrorMessage';
19
19
  export * from './Explorer';
20
- export * from './ExportModal';
21
20
  export * from './FieldsGroup';
21
+ export * from './Filters';
22
22
  export * from './FloatingMenu';
23
23
  export * from './ImageLoading';
24
24
  export * from './ImageMissing';
@@ -27,6 +27,7 @@ export * from './LibraryItemsList';
27
27
  export * from './LibraryPicker';
28
28
  export * from './List';
29
29
  export * from './Loading';
30
+ export * from './Notifications';
30
31
  export * from './RecordCard';
31
32
  export * from './RecordEdition';
32
33
  export * from './RecordHistory';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { AttributeFormat, AttributeType } from './_gqlTypes';
2
2
  export declare enum PreviewSize {
3
- tiny = "tiny",
4
- small = "small",
5
- medium = "medium",
6
- big = "big"
3
+ TINY = "tiny",
4
+ SMALL = "small",
5
+ MEDIUM = "medium",
6
+ BIG = "big"
7
7
  }
8
8
  export declare const tagColorByAttributeType: {
9
9
  [key in AttributeType]: [border: string, background: string];
@@ -36,3 +36,5 @@ export declare const EDIT_RECORD_SIDEBAR_ID = "edit_record_sidebar";
36
36
  export declare const STANDARD_FIELD_ID_PREFIX = "standardfield-";
37
37
  export declare const LINK_FIELD_ID_PREFIX = "linkfield-";
38
38
  export declare const TREE_FIELD_ID_PREFIX = "treefield-";
39
+ export declare const SUBMIT_BUTTONS_PORTAL = "submit_buttons_portal";
40
+ export declare const NEW_RECORD_ID = "newRecord";
package/dist/constants.js CHANGED
@@ -7,10 +7,10 @@ import { AttributeFormat, AttributeType } from './_gqlTypes';
7
7
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
8
8
  export var PreviewSize;
9
9
  (function (PreviewSize) {
10
- PreviewSize["tiny"] = "tiny";
11
- PreviewSize["small"] = "small";
12
- PreviewSize["medium"] = "medium";
13
- PreviewSize["big"] = "big";
10
+ PreviewSize["TINY"] = "tiny";
11
+ PreviewSize["SMALL"] = "small";
12
+ PreviewSize["MEDIUM"] = "medium";
13
+ PreviewSize["BIG"] = "big";
14
14
  })(PreviewSize || (PreviewSize = {}));
15
15
  export const tagColorByAttributeType = {
16
16
  [AttributeType.simple]: ['purple', '#ffe5ff'],
@@ -47,4 +47,6 @@ export const EDIT_RECORD_SIDEBAR_ID = 'edit_record_sidebar';
47
47
  export const STANDARD_FIELD_ID_PREFIX = 'standardfield-';
48
48
  export const LINK_FIELD_ID_PREFIX = 'linkfield-';
49
49
  export const TREE_FIELD_ID_PREFIX = 'treefield-';
50
+ export const SUBMIT_BUTTONS_PORTAL = 'submit_buttons_portal';
51
+ export const NEW_RECORD_ID = 'newRecord';
50
52
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"const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,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;CACtD,CAAC;AAEF,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,oCAAe,CAAA;IACf,0DAAqC,CAAA;IACrC,4DAAuC,CAAA;AAC3C,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AAaD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,IAAI,EAAE,CAAC;AAEhE,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAC/D,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AAEnE,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAEpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAK,CAAC;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAEzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAEjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC"}
@@ -15,3 +15,4 @@ export { useValuesCacheUpdate } from './useValuesCacheUpdate';
15
15
  export { useIFrameMessenger } from './useIFrameMessenger/useIFrameMessenger';
16
16
  export { useIFrameMessengerClient } from './useIFrameMessengerClient/useIFrameMessengerClient';
17
17
  export { IFrameMessengerClient } from './useIFrameMessengerClient/IFrameMessengerClient';
18
+ export { creationPanelSchema } from './useIFrameMessenger/schema';
@@ -18,4 +18,5 @@ export { useValuesCacheUpdate } from './useValuesCacheUpdate';
18
18
  export { useIFrameMessenger } from './useIFrameMessenger/useIFrameMessenger';
19
19
  export { useIFrameMessengerClient } from './useIFrameMessengerClient/useIFrameMessengerClient';
20
20
  export { IFrameMessengerClient } from './useIFrameMessengerClient/IFrameMessengerClient';
21
+ export { creationPanelSchema } from './useIFrameMessenger/schema';
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAEtE,OAAO,EAAC,0BAA0B,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,cAAc,CAAC;AACnD,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,+BAA+B,EAAC,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EA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,CAAC"}
@@ -1,15 +1,15 @@
1
1
  import { type MutableRefObject } from 'react';
2
- import { type AlertMessage, type Callbacks, type CallCbFunction, type IUseIFrameMessengerOptions, type Message, type MessageDispatcher, type MessageHandler, type MessageToPanelMessage, type ModalConfirmMessage, type ModalFormMessage, type NavigateToPanelMessage, type NotificationMessage, type SidePanelFormMessage, type SimpleMessage } from './types';
2
+ import { type AlertMessage, type Callbacks, type CallCbFunction, type ClosePanelMessage, type IUseIFrameMessengerOptions, type Message, type MessageDispatcher, type MessageHandler, type MessageToPanelMessage, type ModalConfirmMessage, type NavigateToIframeMessage, type NavigateToPanelMessage, type NotificationMessage, type SimpleMessage } from './types';
3
3
  export declare const encodeMessage: (message: Message) => string;
4
4
  export declare const decodeMessage: (raw: string) => Message | undefined;
5
5
  export declare const initClientHandlers: (callCb: CallCbFunction, options?: IUseIFrameMessengerOptions, callbacksList?: MutableRefObject<Callbacks>) => MessageHandler;
6
6
  export declare const getExposedMethods: (callbacksStore: MutableRefObject<Callbacks>, dispatch?: MessageDispatcher) => {
7
- showSidePanelForm: (data: SidePanelFormMessage["data"]) => void;
8
7
  showModalConfirm: (data: ModalConfirmMessage["data"]) => void;
9
- showModalForm: (data: ModalFormMessage["data"]) => void;
10
8
  showAlert: (data: AlertMessage["data"]) => void;
11
9
  showNotification: (data: NotificationMessage["data"]) => void;
12
10
  messageToParent: (data: SimpleMessage["data"]) => void;
13
11
  navigateToPanel: (data: NavigateToPanelMessage["data"]) => void;
12
+ closePanel: (data: ClosePanelMessage["data"]) => void;
13
+ navigateToIframe: (data: NavigateToIframeMessage["data"]) => void;
14
14
  messageToPanel: (data: MessageToPanelMessage["data"]) => void;
15
15
  };
@@ -38,15 +38,9 @@ const setCallbacks = (id, frameId, data, callCb, overrides) => {
38
38
  };
39
39
  export const initClientHandlers = (callCb, options, callbacksList) => (message, dispatch) => {
40
40
  switch (message.type) {
41
- case 'sidepanel-form':
42
- options?.handlers?.onSidePanelForm?.(setCallbacks(message.id, message.__frameId, message.data, callCb, message.overrides), message.id, dispatch, callCb);
43
- break;
44
41
  case 'modal-confirm':
45
42
  options?.handlers?.onModalConfirm?.(setCallbacks(message.id, message.__frameId, message.data, callCb, message.overrides), message.id, dispatch, callCb);
46
43
  break;
47
- case 'modal-form':
48
- options?.handlers?.onModalForm?.(setCallbacks(message.id, message.__frameId, message.data, callCb, message.overrides), message.id, dispatch, callCb);
49
- break;
50
44
  case 'alert':
51
45
  options?.handlers?.onAlert?.(setCallbacks(message.id, message.__frameId, message.data, callCb, message.overrides), message.id, dispatch, callCb);
52
46
  break;
@@ -63,6 +57,12 @@ export const initClientHandlers = (callCb, options, callbacksList) => (message,
63
57
  case 'navigate-to-panel':
64
58
  options?.handlers?.onNavigateToPanel?.(message.data);
65
59
  break;
60
+ case 'close-panel':
61
+ options?.handlers?.onClosePanel?.(message.data);
62
+ break;
63
+ case 'navigate-to-iframe':
64
+ options?.handlers?.onNavigateToIframe?.(message.data);
65
+ break;
66
66
  default:
67
67
  break;
68
68
  }
@@ -82,21 +82,11 @@ const storeCallbacks = (data, id, callbacksStore) => {
82
82
  return { data: nextData, overrides };
83
83
  };
84
84
  export const getExposedMethods = (callbacksStore, dispatch) => ({
85
- showSidePanelForm: (data) => {
86
- const id = Date.now().toString();
87
- const { data: nextData, overrides } = storeCallbacks(data, id, callbacksStore);
88
- dispatch?.({ type: 'sidepanel-form', data: nextData, id, overrides });
89
- },
90
85
  showModalConfirm: (data) => {
91
86
  const id = Date.now().toString();
92
87
  const { data: nextData, overrides } = storeCallbacks(data, id, callbacksStore);
93
88
  dispatch?.({ type: 'modal-confirm', data: nextData, id, overrides });
94
89
  },
95
- showModalForm: (data) => {
96
- const id = Date.now().toString();
97
- const { data: nextData, overrides } = storeCallbacks(data, id, callbacksStore);
98
- dispatch?.({ type: 'modal-form', data: nextData, id, overrides });
99
- },
100
90
  showAlert: (data) => {
101
91
  const id = Date.now().toString();
102
92
  const { data: nextData, overrides } = storeCallbacks(data, id, callbacksStore);
@@ -114,6 +104,12 @@ export const getExposedMethods = (callbacksStore, dispatch) => ({
114
104
  navigateToPanel: (data) => {
115
105
  dispatch?.({ type: 'navigate-to-panel', data });
116
106
  },
107
+ closePanel: (data) => {
108
+ dispatch?.({ type: 'close-panel', data });
109
+ },
110
+ navigateToIframe: (data) => {
111
+ dispatch?.({ type: 'navigate-to-iframe', data });
112
+ },
117
113
  messageToPanel: (data) => {
118
114
  dispatch?.({ type: 'message-to-panel', data });
119
115
  }
@@ -1 +1 @@
1
- {"version":3,"file":"messageHandlers.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/messageHandlers.ts"],"names":[],"mappings":"AAIA,OAAO,EAeH,QAAQ,EAGX,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAgB,EAAU,EAAE,CACtD,IAAI,CAAC,SAAS,CAAC;IACX,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;IAChC,CAAC,QAAQ,CAAC,EAAE,IAAI;CACnB,CAAC,CAAC;AAEP,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAuB,EAAE;IAC9D,IAAI,CAAC;QACD,MAAM,OAAO,GAAoB,IAAI,CAAC,KAAK,CAAC,GAAG,CAA+B,CAAC;QAC/E,IAAI,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAY,CAAC;QAClD,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACT,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,aAA2C,EAA2B,EAAE;IACvG,IAAI,CAAC,aAAa,EAAE,OAAO,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;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,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;QACjC,QAAQ,EAAE,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;IAC5C,CAAC;IACD,eAAe,EAAE,CAAC,IAAoC,EAAE,EAAE;QACtD,QAAQ,EAAE,CAAC,EAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAC,CAAC,CAAC;IAClD,CAAC;IACD,UAAU,EAAE,CAAC,IAA+B,EAAE,EAAE;QAC5C,QAAQ,EAAE,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;IAC5C,CAAC;IACD,gBAAgB,EAAE,CAAC,IAAqC,EAAE,EAAE;QACxD,QAAQ,EAAE,CAAC,EAAC,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAC,CAAC,CAAC;IACnD,CAAC;IACD,cAAc,EAAE,CAAC,IAAmC,EAAE,EAAE;QACpD,QAAQ,EAAE,CAAC,EAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAC,CAAC,CAAC;IACjD,CAAC;CACJ,CAAC,CAAC"}
@@ -2,8 +2,10 @@ import * as z from 'zod/v4';
2
2
  export declare const FONT_AWESOME_ICON_REGEX: RegExp;
3
3
  export declare const PanelIdSchema: z.ZodString;
4
4
  export declare const LanguageSchema: z.ZodString;
5
+ export declare const LibraryIdSchema: z.ZodString;
5
6
  export declare const FontAwesomeIconSchema: z.ZodOptional<z.ZodString>;
6
- export declare const LibraryExplorerPropsSchema: z.ZodObject<{
7
+ export declare const WhereSchema: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
8
+ export declare const ExplorerPropsSchema: z.ZodObject<{
7
9
  showSearch: z.ZodOptional<z.ZodBoolean>;
8
10
  showFilters: z.ZodOptional<z.ZodBoolean>;
9
11
  showSorts: z.ZodOptional<z.ZodBoolean>;
@@ -13,12 +15,93 @@ export declare const LibraryExplorerPropsSchema: z.ZodObject<{
13
15
  noPagination: z.ZodOptional<z.ZodLiteral<true>>;
14
16
  showActionsLabels: z.ZodOptional<z.ZodBoolean>;
15
17
  defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
18
+ defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
16
19
  defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
17
- defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">]>>>;
18
20
  }, z.core.$strip>;
19
21
  export declare const ItemActionsSchema: z.ZodArray<z.ZodObject<{
20
22
  where: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
21
- what: z.ZodLazy<any>;
22
- useItemActionOnRowClick: z.ZodOptional<z.ZodBoolean>;
23
+ what: z.ZodLiteral<"record">;
24
+ icon: z.ZodOptional<z.ZodString>;
25
+ label: z.ZodRecord<z.ZodString, z.ZodString>;
26
+ onRowClick: z.ZodOptional<z.ZodBoolean>;
27
+ }, z.core.$strip>>;
28
+ export declare const basePanelSchema: z.ZodObject<{
29
+ id: z.ZodString;
30
+ name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
31
+ isStandalone: z.ZodOptional<z.ZodBoolean>;
32
+ }, z.core.$strip>;
33
+ export declare const iframePanelSchema: z.ZodObject<{
34
+ type: z.ZodLiteral<"custom">;
35
+ iframeSource: z.ZodString;
36
+ isSelfContaining: z.ZodOptional<z.ZodBoolean>;
37
+ }, z.core.$strip>;
38
+ export declare const creationPanelSchema: z.ZodObject<{
39
+ type: z.ZodLiteral<"creationForm">;
40
+ formId: z.ZodString;
41
+ attributeSource: z.ZodString;
42
+ }, z.core.$strip>;
43
+ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
44
+ id: z.ZodString;
45
+ name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
46
+ isStandalone: z.ZodOptional<z.ZodBoolean>;
47
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
48
+ type: z.ZodLiteral<"explorer">;
49
+ viewId: z.ZodOptional<z.ZodString>;
50
+ actions: z.ZodArray<z.ZodObject<{
51
+ where: z.ZodUnion<readonly [z.ZodLiteral<"popup">, z.ZodLiteral<"slider">, z.ZodLiteral<"fullpage">]>;
52
+ what: z.ZodLiteral<"record">;
53
+ icon: z.ZodOptional<z.ZodString>;
54
+ label: z.ZodRecord<z.ZodString, z.ZodString>;
55
+ onRowClick: z.ZodOptional<z.ZodBoolean>;
56
+ }, z.core.$strip>>;
57
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
58
+ attributeSource: z.ZodString;
59
+ libraryId: z.ZodOptional<z.ZodString>;
60
+ explorerProps: z.ZodOptional<z.ZodObject<{
61
+ showSearch: z.ZodOptional<z.ZodBoolean>;
62
+ showFilters: z.ZodOptional<z.ZodBoolean>;
63
+ showSorts: z.ZodOptional<z.ZodBoolean>;
64
+ freezeView: z.ZodOptional<z.ZodBoolean>;
65
+ showAttributeLabels: z.ZodOptional<z.ZodBoolean>;
66
+ creationFormId: z.ZodOptional<z.ZodString>;
67
+ noPagination: z.ZodOptional<z.ZodLiteral<true>>;
68
+ showActionsLabels: z.ZodOptional<z.ZodBoolean>;
69
+ defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
70
+ defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
71
+ defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
72
+ }, z.core.$strip>>;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ explorerProps: z.ZodOptional<z.ZodObject<{
75
+ showSearch: z.ZodOptional<z.ZodBoolean>;
76
+ showFilters: z.ZodOptional<z.ZodBoolean>;
77
+ showSorts: z.ZodOptional<z.ZodBoolean>;
78
+ freezeView: z.ZodOptional<z.ZodBoolean>;
79
+ showAttributeLabels: z.ZodOptional<z.ZodBoolean>;
80
+ creationFormId: z.ZodOptional<z.ZodString>;
81
+ noPagination: z.ZodOptional<z.ZodLiteral<true>>;
82
+ showActionsLabels: z.ZodOptional<z.ZodBoolean>;
83
+ defaultPrimaryActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"create">]>>>;
84
+ defaultMassActions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"deactivate">, z.ZodLiteral<"export">]>>>;
85
+ defaultActionsForItem: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"replaceLink">, z.ZodLiteral<"remove">, z.ZodLiteral<"activate">]>>>;
86
+ }, z.core.$strip>>;
87
+ }, z.core.$strip>]>>, z.ZodObject<{
88
+ type: z.ZodLiteral<"custom">;
89
+ iframeSource: z.ZodString;
90
+ isSelfContaining: z.ZodOptional<z.ZodBoolean>;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ type: z.ZodLiteral<"editionForm">;
93
+ formId: z.ZodString;
94
+ }, z.core.$strip>, z.ZodObject<{
95
+ type: z.ZodLiteral<"creationForm">;
96
+ formId: z.ZodString;
97
+ attributeSource: z.ZodString;
98
+ }, z.core.$strip>]>>;
99
+ export declare const PanelIFrameSchema: z.ZodIntersection<z.ZodObject<{
100
+ id: z.ZodString;
101
+ name: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
102
+ isStandalone: z.ZodOptional<z.ZodBoolean>;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ type: z.ZodLiteral<"custom">;
105
+ iframeSource: z.ZodString;
106
+ isSelfContaining: z.ZodOptional<z.ZodBoolean>;
23
107
  }, z.core.$strip>>;
24
- export declare const PanelSchema: any;
@@ -5,8 +5,10 @@ import * as z from 'zod/v4';
5
5
  export const FONT_AWESOME_ICON_REGEX = /^fa-/;
6
6
  export const PanelIdSchema = z.string();
7
7
  export const LanguageSchema = z.string();
8
+ export const LibraryIdSchema = z.string();
8
9
  export const FontAwesomeIconSchema = z.string().regex(FONT_AWESOME_ICON_REGEX).optional();
9
- const CommonExplorerPropsSchema = z.object({
10
+ export const WhereSchema = z.union([z.literal('popup'), z.literal('slider'), z.literal('fullpage')]);
11
+ export const ExplorerPropsSchema = z.object({
10
12
  showSearch: z.boolean().optional(),
11
13
  showFilters: z.boolean().optional(),
12
14
  showSorts: z.boolean().optional(),
@@ -14,67 +16,57 @@ const CommonExplorerPropsSchema = z.object({
14
16
  showAttributeLabels: z.boolean().optional(),
15
17
  creationFormId: z.string().optional(),
16
18
  noPagination: z.literal(true).optional(),
17
- showActionsLabels: z.boolean().optional()
18
- });
19
- const LinkExplorerPropsSchema = CommonExplorerPropsSchema;
20
- export const LibraryExplorerPropsSchema = CommonExplorerPropsSchema.extend({
19
+ showActionsLabels: z.boolean().optional(),
21
20
  defaultPrimaryActions: z.array(z.union([z.literal('create')])).optional(),
21
+ defaultMassActions: z.array(z.union([z.literal('deactivate'), z.literal('export')])).optional(),
22
22
  defaultActionsForItem: z
23
23
  .array(z.union([z.literal('replaceLink'), z.literal('remove'), z.literal('activate')]))
24
- .optional(),
25
- defaultMassActions: z.array(z.union([z.literal('deactivate')])).optional()
24
+ .optional()
25
+ });
26
+ export const ItemActionsSchema = z
27
+ .array(z.object({
28
+ where: WhereSchema,
29
+ what: z.literal('record'),
30
+ icon: FontAwesomeIconSchema,
31
+ label: z.record(LanguageSchema, z.string()),
32
+ onRowClick: z.boolean().optional()
33
+ }))
34
+ .refine(actions => actions.reduce((acc, action) => (action.onRowClick ? acc + 1 : acc), 0) <= 1, {
35
+ message: 'At most one action must have onRowClick set to true'
26
36
  });
27
- export const ItemActionsSchema = z.array(z.object({
28
- where: z.union([z.literal('popup'), z.literal('slider'), z.literal('fullpage')]),
29
- what: z.lazy(() => PanelSchema),
30
- useItemActionOnRowClick: z.boolean().optional()
31
- }));
32
- export const PanelSchema = z.lazy(() => z
33
- .object({
37
+ export const basePanelSchema = z.object({
34
38
  id: PanelIdSchema,
35
39
  name: z.record(LanguageSchema, z.string()).optional(),
36
- icon: FontAwesomeIconSchema
37
- })
38
- .and(z.union([
39
- z.object({
40
- content: z.union([
41
- z
42
- .object({
43
- type: z.literal('explorer'), // TODO: you can split types into link-explorer and library-explorer
44
- viewId: z.string().optional(),
45
- actions: ItemActionsSchema
46
- })
47
- .and(z.union([
48
- z.object({
49
- // TODO: later add behavior on click on explorer item
50
- libraryId: z.string(),
51
- attributeSource: z.string(),
52
- explorerProps: LinkExplorerPropsSchema.optional()
53
- }),
54
- z.object({
55
- libraryId: z.union([z.literal('<props>'), z.string()]),
56
- explorerProps: LibraryExplorerPropsSchema.optional()
57
- })
58
- ])),
59
- z.object({
60
- type: z.literal('custom'),
61
- iframeSource: z.string()
62
- }),
63
- z.object({
64
- type: z.literal('editionForm'),
65
- formId: z.string(),
66
- libraryId: z.string()
67
- }),
68
- z.object({
69
- type: z.literal('creationForm'),
70
- formId: z.string(),
71
- libraryId: z.string()
72
- })
73
- ])
74
- }),
75
- z.object({
76
- children: z.array(z.lazy(() => PanelSchema)),
77
- libraryId: z.string().optional()
78
- })
79
- ])));
40
+ isStandalone: z.boolean().optional()
41
+ });
42
+ export const iframePanelSchema = z.object({
43
+ type: z.literal('custom'),
44
+ iframeSource: z.string(),
45
+ isSelfContaining: z.boolean().optional()
46
+ });
47
+ const editionPanelSchema = z.object({
48
+ type: z.literal('editionForm'),
49
+ formId: z.string()
50
+ });
51
+ export const creationPanelSchema = z.object({
52
+ type: z.literal('creationForm'),
53
+ formId: z.string(),
54
+ attributeSource: z.string()
55
+ });
56
+ const baseExplorerPanelSchema = z.object({
57
+ type: z.literal('explorer'),
58
+ viewId: z.string().optional(),
59
+ actions: ItemActionsSchema
60
+ });
61
+ const linkExplorerPanelSchema = z.object({
62
+ attributeSource: z.string(),
63
+ libraryId: LibraryIdSchema.optional(),
64
+ explorerProps: ExplorerPropsSchema.optional()
65
+ });
66
+ const libraryExplorerPanelSchema = z.object({
67
+ explorerProps: ExplorerPropsSchema.optional()
68
+ });
69
+ const explorerPanelSchema = baseExplorerPanelSchema.and(z.union([linkExplorerPanelSchema, libraryExplorerPanelSchema]));
70
+ export const PanelSchema = basePanelSchema.and(z.union([explorerPanelSchema, iframePanelSchema, editionPanelSchema, creationPanelSchema]));
71
+ export const PanelIFrameSchema = basePanelSchema.and(iframePanelSchema);
80
72
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/schema.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE1F,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,CAAC,CAAC,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C,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAC1C,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,CAC7F,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC"}
@@ -3,8 +3,7 @@ import type * as z from 'zod/v4';
3
3
  import { type KitNotification } from 'aristid-ds';
4
4
  import { type IKitConfirmDialog } from 'aristid-ds/dist/Kit/Feedback/Modal/types';
5
5
  import { type ToastedAlertProps } from 'aristid-ds/dist/Kit/Feedback/Alert/types';
6
- import { type EditRecordModal } from '../../components';
7
- import { type ItemActionsSchema, type PanelIdSchema, type PanelSchema } from '../../hooks/useIFrameMessenger/schema';
6
+ import { type LibraryIdSchema, type WhereSchema, type PanelIdSchema, type PanelSchema, type PanelIFrameSchema } from '../../hooks/useIFrameMessenger/schema';
8
7
  export declare const packetId = "__fromIframeMessenger";
9
8
  export interface IEncodedMessage {
10
9
  payload: string;
@@ -16,26 +15,12 @@ export type ComponentPropsWithKey<T extends keyof JSX.IntrinsicElements | JSXEle
16
15
  export interface IMessageBase {
17
16
  __frameId?: string;
18
17
  }
19
- export type SidePanelFormMessage = IMessageBase & {
20
- type: 'sidepanel-form';
21
- id: string;
22
- data: ComponentPropsWithKey<typeof EditRecordModal>;
23
- overrides?: string[];
24
- };
25
18
  export type ModalConfirmMessage = IMessageBase & {
26
19
  type: 'modal-confirm';
27
20
  id: string;
28
21
  data: IKitConfirmDialog;
29
22
  overrides?: string[];
30
23
  };
31
- export type ModalFormMessage = IMessageBase & {
32
- type: 'modal-form';
33
- id: string;
34
- data: ComponentPropsWithKey<typeof EditRecordModal> | {
35
- open: false;
36
- };
37
- overrides?: string[];
38
- };
39
24
  export type AlertMessage = IMessageBase & {
40
25
  type: 'alert';
41
26
  id: string;
@@ -66,21 +51,38 @@ export type UnregisterMessage = IMessageBase & {
66
51
  id: string;
67
52
  };
68
53
  export type Panel = z.infer<typeof PanelSchema>;
69
- type PanelId = z.infer<typeof PanelIdSchema>;
70
- type ItemActions = z.infer<typeof ItemActionsSchema>;
71
- export interface INestedPanel {
72
- panelTargetId?: PanelId;
73
- recordId?: string;
74
- where: ItemActions[number]['where'];
75
- what: Panel & {
76
- recordId?: string;
77
- };
78
- }
54
+ export type LibraryId = z.infer<typeof LibraryIdSchema>;
55
+ export type PanelId = z.infer<typeof PanelIdSchema>;
56
+ export type Where = z.infer<typeof WhereSchema>;
57
+ type PanelIFrame = z.infer<typeof PanelIFrameSchema>;
79
58
  export type NavigateToPanelMessage = IMessageBase & {
80
59
  type: 'navigate-to-panel';
81
60
  data: {
82
- panelId: PanelId;
83
- } | INestedPanel;
61
+ where: Where;
62
+ libraryId: LibraryId;
63
+ panelId?: PanelId;
64
+ recordId?: string;
65
+ };
66
+ };
67
+ export type ClosePanelMessage = IMessageBase & {
68
+ type: 'close-panel';
69
+ data: {
70
+ recordId: string;
71
+ where: string;
72
+ recordPanelId: string;
73
+ };
74
+ };
75
+ export type NavigateToIframeMessage = IMessageBase & {
76
+ type: 'navigate-to-iframe';
77
+ data: {
78
+ panel: PanelIFrame;
79
+ destination: {
80
+ libraryId: LibraryId;
81
+ };
82
+ where: Where;
83
+ recordId: string;
84
+ recordPanelId: string;
85
+ };
84
86
  };
85
87
  export type MessageToPanelMessage = IMessageBase & {
86
88
  type: 'message-to-panel';
@@ -90,7 +92,7 @@ export type MessageToPanelMessage = IMessageBase & {
90
92
  payload: unknown;
91
93
  };
92
94
  };
93
- export type MessageToParent = SidePanelFormMessage | ModalConfirmMessage | ModalFormMessage | AlertMessage | NotificationMessage | SimpleMessage | RegisterMessage | UnregisterMessage | NavigateToPanelMessage | MessageToPanelMessage;
95
+ export type MessageToParent = ModalConfirmMessage | AlertMessage | NotificationMessage | SimpleMessage | RegisterMessage | UnregisterMessage | NavigateToPanelMessage | ClosePanelMessage | NavigateToIframeMessage | MessageToPanelMessage;
94
96
  export type MessageFromParent = (IMessageBase & {
95
97
  type: 'on-call-callback';
96
98
  path: string;
@@ -108,13 +110,13 @@ export interface IUseIFrameMessengerOptions {
108
110
  ref?: RefObject<HTMLIFrameElement>;
109
111
  id?: string;
110
112
  handlers?: {
111
- onSidePanelForm?: (data: SidePanelFormMessage['data'], id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;
112
113
  onModalConfirm?: (data: ModalConfirmMessage['data'], id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;
113
- onModalForm?: (data: ModalFormMessage['data'], id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;
114
114
  onAlert?: (data: AlertMessage['data'], id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;
115
115
  onNotification?: (data: NotificationMessage['data'], id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;
116
116
  onMessage?: (data: unknown, id: string, dispatch: MessageDispatcher, callCb: CallCbFunction) => void;
117
117
  onNavigateToPanel?: (data: NavigateToPanelMessage['data']) => void;
118
+ onClosePanel?: (data: ClosePanelMessage['data']) => void;
119
+ onNavigateToIframe?: (data: NavigateToIframeMessage['data']) => void;
118
120
  };
119
121
  }
120
122
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,QAAQ,GAAG,uBAAuB,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/types.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,QAAQ,GAAG,uBAAuB,CAAC"}
@@ -8,12 +8,12 @@ export declare const useIFrameMessenger: (options?: IUseIFrameMessengerOptions)
8
8
  unregister: () => void;
9
9
  changeLangInAllFrames: (newLanguage: string) => void;
10
10
  addPanelMessageHandler: AddMessageToPanelMessageHandler;
11
- showSidePanelForm: (data: import("./types").SidePanelFormMessage["data"]) => void;
12
11
  showModalConfirm: (data: import("./types").ModalConfirmMessage["data"]) => void;
13
- showModalForm: (data: import("./types").ModalFormMessage["data"]) => void;
14
12
  showAlert: (data: import("./types").AlertMessage["data"]) => void;
15
13
  showNotification: (data: import("./types").NotificationMessage["data"]) => void;
16
14
  messageToParent: (data: import("./types").SimpleMessage["data"]) => void;
17
15
  navigateToPanel: (data: import("./types").NavigateToPanelMessage["data"]) => void;
16
+ closePanel: (data: import("./types").ClosePanelMessage["data"]) => void;
17
+ navigateToIframe: (data: import("./types").NavigateToIframeMessage["data"]) => void;
18
18
  messageToPanel: (data: import("./types").MessageToPanelMessage["data"]) => void;
19
19
  };