@erxes/ui 4.0.0-v2.1 → 4.0.0-v2.10

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 (318) hide show
  1. package/AGENTS.md +58 -0
  2. package/CATALOG.md +251 -0
  3. package/README.md +25 -2
  4. package/dist/components/accordion.d.ts +1 -0
  5. package/dist/components/accordion.js +1 -0
  6. package/dist/components/alert-dialog.d.ts +4 -0
  7. package/dist/components/alert-dialog.js +4 -0
  8. package/dist/components/alert.d.ts +1 -0
  9. package/dist/components/alert.js +1 -0
  10. package/dist/components/avatar.d.ts +2 -0
  11. package/dist/components/avatar.js +1 -0
  12. package/dist/components/background-gradient-animation.d.ts +4 -1
  13. package/dist/components/background-gradient-animation.js +4 -1
  14. package/dist/components/badge.d.ts +3 -0
  15. package/dist/components/badge.js +2 -0
  16. package/dist/components/breadcrumb.d.ts +1 -0
  17. package/dist/components/breadcrumb.js +1 -0
  18. package/dist/components/button.d.ts +6 -1
  19. package/dist/components/button.js +5 -1
  20. package/dist/components/calendar.d.ts +5 -0
  21. package/dist/components/calendar.js +4 -0
  22. package/dist/components/card.d.ts +1 -0
  23. package/dist/components/card.js +1 -0
  24. package/dist/components/chart-config.d.ts +4 -1
  25. package/dist/components/charts.d.ts +6 -0
  26. package/dist/components/charts.js +12 -3
  27. package/dist/components/checkbox.d.ts +1 -0
  28. package/dist/components/checkbox.js +1 -0
  29. package/dist/components/choicebox-group.d.ts +1 -0
  30. package/dist/components/choicebox-group.js +1 -0
  31. package/dist/components/collapsible.d.ts +1 -0
  32. package/dist/components/collapsible.js +1 -0
  33. package/dist/components/color-picker.d.ts +1 -0
  34. package/dist/components/color-picker.js +13 -6
  35. package/dist/components/combobox.d.ts +6 -1
  36. package/dist/components/combobox.js +9 -1
  37. package/dist/components/command-bar.d.ts +4 -0
  38. package/dist/components/command-bar.js +4 -0
  39. package/dist/components/command.d.ts +4 -0
  40. package/dist/components/command.js +4 -0
  41. package/dist/components/context-menu.d.ts +1 -0
  42. package/dist/components/context-menu.js +1 -0
  43. package/dist/components/copy-text.d.ts +1 -0
  44. package/dist/components/copy-text.js +1 -0
  45. package/dist/components/date-picker-value.d.ts +5 -9
  46. package/dist/components/date-picker-value.js +15 -34
  47. package/dist/components/date-picker.d.ts +4 -4
  48. package/dist/components/date-picker.js +9 -7
  49. package/dist/components/date-text-input.d.ts +2 -4
  50. package/dist/components/date-text-input.js +11 -9
  51. package/dist/components/dialog.d.ts +4 -0
  52. package/dist/components/dialog.js +5 -1
  53. package/dist/components/drag-handle.d.ts +1 -0
  54. package/dist/components/drag-handle.js +1 -0
  55. package/dist/components/dropdown-menu.d.ts +1 -0
  56. package/dist/components/dropdown-menu.js +1 -0
  57. package/dist/components/empty.d.ts +6 -1
  58. package/dist/components/empty.js +25 -2
  59. package/dist/components/form.d.ts +6 -2
  60. package/dist/components/form.js +8 -2
  61. package/dist/components/hover-card.d.ts +1 -0
  62. package/dist/components/hover-card.js +1 -0
  63. package/dist/components/icon-tip.d.ts +7 -0
  64. package/dist/components/icon-tip.js +16 -0
  65. package/dist/components/info-card.d.ts +4 -0
  66. package/dist/components/info-card.js +4 -0
  67. package/dist/components/input-group.d.ts +5 -4
  68. package/dist/components/input-group.js +5 -4
  69. package/dist/components/input.d.ts +1 -0
  70. package/dist/components/input.js +1 -0
  71. package/dist/components/kbd.d.ts +2 -1
  72. package/dist/components/kbd.js +2 -1
  73. package/dist/components/label.d.ts +1 -1
  74. package/dist/components/label.js +1 -1
  75. package/dist/components/multiselect.d.ts +1 -0
  76. package/dist/components/multiselect.js +3 -2
  77. package/dist/components/on-demand.d.ts +6 -0
  78. package/dist/components/on-demand.js +6 -0
  79. package/dist/components/popover.d.ts +4 -0
  80. package/dist/components/popover.js +4 -0
  81. package/dist/components/radio-group.d.ts +1 -0
  82. package/dist/components/radio-group.js +1 -0
  83. package/dist/components/scroll-area.d.ts +1 -0
  84. package/dist/components/scroll-area.js +1 -0
  85. package/dist/components/select.d.ts +5 -1
  86. package/dist/components/select.js +7 -1
  87. package/dist/components/separator.d.ts +4 -0
  88. package/dist/components/separator.js +4 -0
  89. package/dist/components/sheet.d.ts +4 -0
  90. package/dist/components/sheet.js +8 -4
  91. package/dist/components/sidebar/panel.js +29 -7
  92. package/dist/components/sidebar.d.ts +1 -0
  93. package/dist/components/sidebar.js +1 -0
  94. package/dist/components/skeleton.d.ts +1 -0
  95. package/dist/components/skeleton.js +1 -0
  96. package/dist/components/spinner.d.ts +1 -0
  97. package/dist/components/spinner.js +1 -0
  98. package/dist/components/string-array.js +1 -0
  99. package/dist/components/switch.d.ts +1 -0
  100. package/dist/components/switch.js +1 -0
  101. package/dist/components/table.d.ts +4 -0
  102. package/dist/components/table.js +4 -0
  103. package/dist/components/tabs.d.ts +8 -1
  104. package/dist/components/tabs.js +8 -1
  105. package/dist/components/text-overflow.d.ts +4 -1
  106. package/dist/components/text-overflow.js +4 -1
  107. package/dist/components/textarea.d.ts +1 -0
  108. package/dist/components/textarea.js +1 -0
  109. package/dist/components/toaster.d.ts +4 -1
  110. package/dist/components/toaster.js +5 -2
  111. package/dist/components/toggle-group.d.ts +5 -0
  112. package/dist/components/toggle-group.js +19 -11
  113. package/dist/components/toggle.d.ts +1 -0
  114. package/dist/components/toggle.js +1 -0
  115. package/dist/components/tooltip.d.ts +4 -0
  116. package/dist/components/tooltip.js +4 -0
  117. package/dist/components/upload.d.ts +4 -0
  118. package/dist/components/upload.js +20 -11
  119. package/dist/federation.d.ts +8 -1
  120. package/dist/federation.js +12 -2
  121. package/dist/hooks/use-item-keys.d.ts +11 -0
  122. package/dist/hooks/use-item-keys.js +24 -0
  123. package/dist/hooks/use-page-hotkey.d.ts +12 -0
  124. package/dist/hooks/use-page-hotkey.js +22 -0
  125. package/dist/hooks/use-toast.d.ts +5 -0
  126. package/dist/hooks/use-toast.js +5 -0
  127. package/dist/index.d.ts +33 -6
  128. package/dist/index.js +31 -4
  129. package/dist/lib/format.d.ts +60 -0
  130. package/dist/lib/format.js +86 -0
  131. package/dist/lib/money.d.ts +13 -0
  132. package/dist/lib/money.js +21 -0
  133. package/dist/lib/stored.d.ts +13 -0
  134. package/dist/lib/stored.js +41 -0
  135. package/dist/lib/text.d.ts +11 -0
  136. package/dist/lib/text.js +18 -0
  137. package/dist/modules/attachments/use-carousel.js +5 -10
  138. package/dist/modules/blocks/hooks/useBarcodeSizeForm.d.ts +1 -1
  139. package/dist/modules/blocks/utils/parseBlocks.d.ts +1 -1
  140. package/dist/modules/blocks/utils/parseBlocks.js +1 -1
  141. package/dist/modules/conditions/ConditionValueInput.d.ts +10 -0
  142. package/dist/modules/conditions/ConditionValueInput.js +166 -0
  143. package/dist/modules/conditions/ConditionsEditor.d.ts +11 -0
  144. package/dist/modules/conditions/ConditionsEditor.js +209 -0
  145. package/dist/modules/conditions/LazyConditionsEditor.d.ts +10 -0
  146. package/dist/modules/conditions/LazyConditionsEditor.js +11 -0
  147. package/dist/modules/conditions/PathPicker.d.ts +8 -0
  148. package/dist/modules/conditions/PathPicker.js +51 -0
  149. package/dist/modules/conditions/conditions.d.ts +66 -0
  150. package/dist/modules/conditions/conditions.js +136 -0
  151. package/dist/modules/display/components/EmailDisplay.d.ts +4 -0
  152. package/dist/modules/display/components/EmailDisplay.js +6 -3
  153. package/dist/modules/display/components/PhoneDisplay.d.ts +4 -0
  154. package/dist/modules/display/components/PhoneDisplay.js +4 -0
  155. package/dist/modules/display/components/RelativeDateDisplay.d.ts +7 -5
  156. package/dist/modules/display/components/RelativeDateDisplay.js +10 -8
  157. package/dist/modules/display/components/SexDisplay.d.ts +1 -0
  158. package/dist/modules/display/components/SexDisplay.js +1 -0
  159. package/dist/modules/filter/components/Filter.d.ts +4 -0
  160. package/dist/modules/filter/components/Filter.js +4 -0
  161. package/dist/modules/filter/components/FilterBar.js +5 -7
  162. package/dist/modules/filter/components/FilterDialog.js +4 -5
  163. package/dist/modules/filter/components/FilterPopover.js +1 -1
  164. package/dist/modules/filter/components/FilterProvider.d.ts +1 -2
  165. package/dist/modules/filter/components/FilterProvider.js +22 -16
  166. package/dist/modules/filter/hooks/useFilterContext.d.ts +1 -0
  167. package/dist/modules/filter/hooks/useFilterContext.js +1 -0
  168. package/dist/modules/filter/types/filter.d.ts +0 -1
  169. package/dist/modules/hotkey/components/PopoverScoped.d.ts +5 -0
  170. package/dist/modules/hotkey/components/PopoverScoped.js +5 -0
  171. package/dist/modules/hotkey/hooks/usePreviousHotkeyScope.d.ts +1 -0
  172. package/dist/modules/hotkey/hooks/usePreviousHotkeyScope.js +1 -0
  173. package/dist/modules/hotkey/hooks/useScopedHotkeys.d.ts +5 -1
  174. package/dist/modules/hotkey/hooks/useScopedHotkeys.js +5 -1
  175. package/dist/modules/icons/components/IconComponent.d.ts +4 -0
  176. package/dist/modules/icons/components/IconComponent.js +4 -0
  177. package/dist/modules/icons/components/IconPicker.d.ts +4 -0
  178. package/dist/modules/icons/components/IconPicker.js +7 -5
  179. package/dist/modules/icons/providers/IconsProvider.d.ts +1 -0
  180. package/dist/modules/icons/providers/IconsProvider.js +1 -0
  181. package/dist/modules/inputs/components/EmailField.d.ts +4 -1
  182. package/dist/modules/inputs/components/EmailField.js +4 -1
  183. package/dist/modules/inputs/components/FullNameField.d.ts +6 -0
  184. package/dist/modules/inputs/components/FullNameField.js +20 -8
  185. package/dist/modules/inputs/components/PhoneField.d.ts +4 -1
  186. package/dist/modules/inputs/components/PhoneField.js +4 -1
  187. package/dist/modules/inputs/components/SexField.d.ts +1 -0
  188. package/dist/modules/inputs/components/SexField.js +1 -0
  189. package/dist/modules/layout/components/AppLayout.d.ts +6 -6
  190. package/dist/modules/layout/components/AppLayout.js +12 -13
  191. package/dist/modules/layout/components/AppLayoutResizeHandle.d.ts +5 -12
  192. package/dist/modules/layout/components/AppLayoutResizeHandle.js +15 -18
  193. package/dist/modules/layout/components/Page.d.ts +5 -0
  194. package/dist/modules/layout/components/Page.js +5 -0
  195. package/dist/modules/layout/components/PageHeader.d.ts +4 -1
  196. package/dist/modules/layout/components/PageHeader.js +9 -3
  197. package/dist/modules/list/DisplayMenu.d.ts +24 -0
  198. package/dist/modules/list/DisplayMenu.js +87 -0
  199. package/dist/modules/list/ListFilter.d.ts +63 -0
  200. package/dist/modules/list/ListFilter.js +44 -0
  201. package/dist/modules/list/ViewBar.d.ts +13 -0
  202. package/dist/modules/list/ViewBar.js +30 -0
  203. package/dist/modules/list/filter/AdvancedFilterDialog.d.ts +5 -0
  204. package/dist/modules/list/filter/AdvancedFilterDialog.js +52 -0
  205. package/dist/modules/list/filter/FieldMenus.d.ts +5 -0
  206. package/dist/modules/list/filter/FieldMenus.js +184 -0
  207. package/dist/modules/list/filter/ListFilterBar.d.ts +6 -0
  208. package/dist/modules/list/filter/ListFilterBar.js +246 -0
  209. package/dist/modules/list/filter/RecordCount.d.ts +7 -0
  210. package/dist/modules/list/filter/RecordCount.js +22 -0
  211. package/dist/modules/list/filter/RuleChips.d.ts +2 -0
  212. package/dist/modules/list/filter/RuleChips.js +157 -0
  213. package/dist/modules/list/filter/fieldIcons.d.ts +7 -0
  214. package/dist/modules/list/filter/fieldIcons.js +16 -0
  215. package/dist/modules/list/filter/filterRules.d.ts +46 -0
  216. package/dist/modules/list/filter/filterRules.js +166 -0
  217. package/dist/modules/list/filter/listFilterContext.d.ts +29 -0
  218. package/dist/modules/list/filter/listFilterContext.js +34 -0
  219. package/dist/modules/list/filter/listFilterQuery.d.ts +16 -0
  220. package/dist/modules/list/filter/listFilterQuery.js +22 -0
  221. package/dist/modules/navigation-menu/components/NavigationMenu.d.ts +4 -3
  222. package/dist/modules/navigation-menu/components/NavigationMenu.js +7 -7
  223. package/dist/modules/pickers/EntityPicker.d.ts +37 -0
  224. package/dist/modules/pickers/EntityPicker.js +67 -0
  225. package/dist/modules/pickers/LookupPicker.d.ts +51 -0
  226. package/dist/modules/pickers/LookupPicker.js +84 -0
  227. package/dist/modules/pickers/SelectMember.d.ts +41 -0
  228. package/dist/modules/pickers/SelectMember.js +122 -0
  229. package/dist/modules/pickers/members.d.ts +30 -0
  230. package/dist/modules/pickers/members.js +18 -0
  231. package/dist/modules/record-field/components/NumberField.d.ts +5 -0
  232. package/dist/modules/record-field/components/NumberField.js +14 -7
  233. package/dist/modules/record-field/components/TextField.d.ts +4 -0
  234. package/dist/modules/record-field/components/TextField.js +14 -3
  235. package/dist/modules/record-field/meta-inputs/components/PhoneInput.d.ts +5 -0
  236. package/dist/modules/record-field/meta-inputs/components/PhoneInput.js +5 -0
  237. package/dist/modules/record-list/RecordList.d.ts +18 -0
  238. package/dist/modules/record-list/RecordList.js +23 -0
  239. package/dist/modules/record-list/RecordListProvider.d.ts +30 -0
  240. package/dist/modules/record-list/RecordListProvider.js +57 -0
  241. package/dist/modules/record-list/RecordListRoot.d.ts +28 -0
  242. package/dist/modules/record-list/RecordListRoot.js +124 -0
  243. package/dist/modules/record-list/selection.d.ts +22 -0
  244. package/dist/modules/record-list/selection.js +54 -0
  245. package/dist/modules/record-panel/PanelDescriptionEditor.d.ts +9 -0
  246. package/dist/modules/record-panel/PanelDescriptionEditor.js +39 -0
  247. package/dist/modules/record-panel/PanelDescriptionField.d.ts +13 -0
  248. package/dist/modules/record-panel/PanelDescriptionField.js +39 -0
  249. package/dist/modules/record-panel/PanelField.d.ts +17 -0
  250. package/dist/modules/record-panel/PanelField.js +47 -0
  251. package/dist/modules/record-panel/PanelForm.d.ts +22 -0
  252. package/dist/modules/record-panel/PanelForm.js +81 -0
  253. package/dist/modules/record-panel/PanelLabel.d.ts +10 -0
  254. package/dist/modules/record-panel/PanelLabel.js +55 -0
  255. package/dist/modules/record-panel/PanelSection.d.ts +12 -0
  256. package/dist/modules/record-panel/PanelSection.js +24 -0
  257. package/dist/modules/record-panel/panelExpansion.d.ts +10 -0
  258. package/dist/modules/record-panel/panelExpansion.js +7 -0
  259. package/dist/modules/record-panel/useSaveOnLeave.d.ts +14 -0
  260. package/dist/modules/record-panel/useSaveOnLeave.js +42 -0
  261. package/dist/modules/record-table/components/RecordTable.d.ts +6 -0
  262. package/dist/modules/record-table/components/RecordTable.js +6 -0
  263. package/dist/modules/record-table/components/RecordTableCell.d.ts +9 -0
  264. package/dist/modules/record-table/components/RecordTableCell.js +16 -2
  265. package/dist/modules/record-table/components/RecordTableCellInline.d.ts +5 -0
  266. package/dist/modules/record-table/components/RecordTableCellInline.js +8 -7
  267. package/dist/modules/record-table/components/RecordTableCursor.js +30 -28
  268. package/dist/modules/record-table/components/RecordTableProvider.js +12 -7
  269. package/dist/modules/record-table/hooks/useTablePreferences.d.ts +1 -1
  270. package/dist/modules/record-table/hooks/useTablePreferences.js +18 -31
  271. package/dist/modules/record-table/states/RecordTableCursorState.d.ts +21 -1
  272. package/dist/modules/record-table/states/RecordTableCursorState.js +21 -3
  273. package/dist/modules/record-table/types/RecordTableCursorTypes.d.ts +1 -0
  274. package/dist/modules/record-table/types/RecordTableCursorTypes.js +1 -0
  275. package/dist/modules/records/ContactLink.d.ts +13 -0
  276. package/dist/modules/records/ContactLink.js +77 -0
  277. package/dist/modules/records/contacts.d.ts +35 -0
  278. package/dist/modules/records/contacts.js +10 -0
  279. package/dist/modules/records/openRecord.d.ts +44 -0
  280. package/dist/modules/records/openRecord.js +48 -0
  281. package/dist/state/sidebarPanelState.d.ts +5 -1
  282. package/dist/state/sidebarPanelState.js +11 -3
  283. package/dist/state/themeState.d.ts +13 -2
  284. package/dist/state/themeState.js +18 -4
  285. package/dist/theme.css +5 -2
  286. package/dist/types/SexCode.d.ts +1 -0
  287. package/dist/types/SexCode.js +1 -0
  288. package/dist/types/UIConfig.d.ts +131 -3
  289. package/dist/utils/IsUndefinedOrNull.d.ts +1 -0
  290. package/dist/utils/IsUndefinedOrNull.js +1 -0
  291. package/dist/utils/file-storage.d.ts +1 -0
  292. package/dist/utils/file-storage.js +1 -0
  293. package/dist/utils/format/formatPhoneNumber.d.ts +4 -0
  294. package/dist/utils/format/formatPhoneNumber.js +4 -0
  295. package/dist/utils/getPluginAssetsUrl.d.ts +5 -0
  296. package/dist/utils/getPluginAssetsUrl.js +5 -0
  297. package/dist/utils/host-component.d.ts +10 -0
  298. package/dist/utils/host-component.js +34 -0
  299. package/dist/utils/json.d.ts +3 -2
  300. package/dist/utils/json.js +3 -2
  301. package/dist/utils/plugin-runtime.d.ts +21 -17
  302. package/dist/utils/plugin-runtime.js +59 -12
  303. package/dist/utils/plugin-styles.d.ts +7 -0
  304. package/dist/utils/plugin-styles.js +54 -0
  305. package/dist/utils/record-timeline.d.ts +10 -9
  306. package/dist/utils/record-timeline.js +12 -17
  307. package/exports.txt +226 -0
  308. package/package.json +13 -3
  309. package/dist/constants/IntlLanguages.d.ts +0 -74
  310. package/dist/constants/IntlLanguages.js +0 -76
  311. package/dist/hooks/use-query-state.d.ts +0 -16
  312. package/dist/hooks/use-query-state.js +0 -122
  313. package/dist/modules/filter/hooks/useFilterQueryState.d.ts +0 -4
  314. package/dist/modules/filter/hooks/useFilterQueryState.js +0 -14
  315. package/dist/types/Theme.d.ts +0 -1
  316. package/dist/types/Theme.js +0 -0
  317. package/dist/utils/localization/formatDateISOStringToRelativeDate.d.ts +0 -2
  318. package/dist/utils/localization/formatDateISOStringToRelativeDate.js +0 -16
package/exports.txt ADDED
@@ -0,0 +1,226 @@
1
+ # Generated by tools/ui-exports.ts. Plugin UIs depend on every line: a removed one breaks
2
+ # them at runtime. Read .agents/skills/plugin-contract before removing any.
3
+ shared react
4
+ shared react/jsx-runtime
5
+ shared react/jsx-dev-runtime
6
+ shared react-dom
7
+ shared react-dom/client
8
+ shared react-router
9
+ shared react-router-dom
10
+ shared erxes-ui
11
+ shared jotai
12
+ shared react-i18next
13
+ shared @tanstack/react-query
14
+ shared @tanstack/query-core
15
+ shared nuqs
16
+ shared react-hook-form
17
+ type AvatarProps
18
+ type BadgeProps
19
+ type ButtonProps
20
+ type CalendarProps
21
+ type ChartConfig
22
+ type CompanyContact
23
+ type ContactQueries
24
+ type CustomerContact
25
+ type FileStorageAdapter
26
+ type IUIConfig
27
+ type Member
28
+ type MemberQueries
29
+ type MultiSelectOption
30
+ type PluginLiveMessage
31
+ type PluginRuntime
32
+ type PluginSession
33
+ type RecordListGroup
34
+ type RecordRef
35
+ type RecordTableColumnDef
36
+ type RecordTimelineProps
37
+ type TActivityRowProps
38
+ type TConditionField
39
+ type TConditionGroup
40
+ type TConditionLookups
41
+ type TConditionRule
42
+ type TContactContentType
43
+ type TDashboardWidgetPreview
44
+ type TListDisplay
45
+ type TListFilterField
46
+ type TListFilterProps
47
+ type TPanelRecordType
48
+ type TPropertyInputMeta
49
+ type TPropertyInputProps
50
+ type TRecordContacts
51
+ type TRecordDraftProps
52
+ type TRecordSection
53
+ type TRecordSectionProps
54
+ type TRecordSlotProps
55
+ type TRecordTab
56
+ type TRelationTab
57
+ type TRelationTabProps
58
+ type Tag
59
+ type TagsQuery
60
+ value Accordion
61
+ value Alert
62
+ value AlertDialog
63
+ value AppLayout
64
+ value AppLayoutFooterLink
65
+ value Avatar
66
+ value BackgroundGradientAnimation
67
+ value Badge
68
+ value Breadcrumb
69
+ value Button
70
+ value Calendar
71
+ value Card
72
+ value ChartContainer
73
+ value ChartLegendContent
74
+ value ChartTooltipContent
75
+ value Checkbox
76
+ value ChoiceboxGroup
77
+ value Collapsible
78
+ value ColorPicker
79
+ value Combobox
80
+ value Command
81
+ value CommandBar
82
+ value ConditionsEditor
83
+ value ContactLink
84
+ value ContextMenu
85
+ value CopyText
86
+ value DateInput
87
+ value DatePicker
88
+ value Dialog
89
+ value DisplayMenu
90
+ value DragHandle
91
+ value DropdownMenu
92
+ value Editor
93
+ value EmailDisplay
94
+ value EmailListField
95
+ value Empty
96
+ value EntityPicker
97
+ value EnumCursorDirection
98
+ value Filter
99
+ value Form
100
+ value FullNameField
101
+ value FullNameValue
102
+ value HoverCard
103
+ value IconComponent
104
+ value IconPicker
105
+ value IconTip
106
+ value IconsProvider
107
+ value InfoCard
108
+ value Input
109
+ value InputGroup
110
+ value Kbd
111
+ value LANGUAGES
112
+ value Label
113
+ value ListFilter
114
+ value LookupPicker
115
+ value MemberInline
116
+ value MultipleSelector
117
+ value NavigationMenuLinkItem
118
+ value NumberField
119
+ value PageContainer
120
+ value PageHeader
121
+ value PageSubHeader
122
+ value PanelDescriptionEditor
123
+ value PanelDescriptionField
124
+ value PanelExpansionContext
125
+ value PanelField
126
+ value PanelFieldTrigger
127
+ value PanelFormLayout
128
+ value PanelFormRow
129
+ value PanelLabel
130
+ value PanelSection
131
+ value PhoneDisplay
132
+ value PhoneField
133
+ value PhoneInput
134
+ value Popover
135
+ value PopoverScoped
136
+ value RadioGroup
137
+ value RecordList
138
+ value RecordOpenerProvider
139
+ value RecordPage
140
+ value RecordTable
141
+ value RecordTableInlineCell
142
+ value RecordTimeline
143
+ value RelativeDateDisplay
144
+ value Resizable
145
+ value ScrollArea
146
+ value Select
147
+ value SelectMember
148
+ value Separator
149
+ value SexCode
150
+ value SexDisplay
151
+ value SexField
152
+ value Sheet
153
+ value Sidebar
154
+ value Skeleton
155
+ value Slider
156
+ value Spinner
157
+ value StringArrayInput
158
+ value Switch
159
+ value TabButton
160
+ value Table
161
+ value Tabs
162
+ value TextField
163
+ value TextOverflowTooltip
164
+ value Textarea
165
+ value ThemeOption
166
+ value TimeField
167
+ value Toaster
168
+ value Toggle
169
+ value ToggleGroup
170
+ value Tooltip
171
+ value Upload
172
+ value ViewBar
173
+ value addPluginStyles
174
+ value amountStep
175
+ value badgeVariants
176
+ value buttonVariants
177
+ value cn
178
+ value companyTitle
179
+ value customerTitle
180
+ value editorText
181
+ value formatMoney
182
+ value formatPhoneNumber
183
+ value formatter
184
+ value fromAmountInput
185
+ value getPluginAssetsUrl
186
+ value getPluginRuntime
187
+ value isRule
188
+ value isUndefinedOrNull
189
+ value jsonOf
190
+ value listFilterQuery
191
+ value localTimeZone
192
+ value memberName
193
+ value oneOf
194
+ value pluginFetch
195
+ value pluginJson
196
+ value readImage
197
+ value setFileStorage
198
+ value setPluginRuntime
199
+ value setRecordPage
200
+ value setRecordTimeline
201
+ value stored
202
+ value storedFamily
203
+ value textOf
204
+ value themeState
205
+ value toAmountInput
206
+ value toIsoDay
207
+ value toast
208
+ value useConfirm
209
+ value useFilterContext
210
+ value useFormat
211
+ value useItemKeys
212
+ value useListDisplay
213
+ value useListFilterParams
214
+ value useLiveSignal
215
+ value useMemberOptions
216
+ value useMembersById
217
+ value useMoney
218
+ value useOpenRecord
219
+ value usePageHotkey
220
+ value usePanelExpanded
221
+ value usePreviousHotkeyScope
222
+ value useScopedHotkeys
223
+ value useTagOptions
224
+ value useToast
225
+ value useUpload
226
+ value zoneOffset
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erxes/ui",
3
- "version": "4.0.0-v2.1",
3
+ "version": "4.0.0-v2.10",
4
4
  "private": false,
5
5
  "description": "erxes design system: UI primitives, layout, hooks and shared frontend state",
6
6
  "license": "AGPL-3.0-only",
@@ -10,7 +10,10 @@
10
10
  "directory": "packages/ui"
11
11
  },
12
12
  "files": [
13
- "dist"
13
+ "dist",
14
+ "AGENTS.md",
15
+ "CATALOG.md",
16
+ "exports.txt"
14
17
  ],
15
18
  "type": "module",
16
19
  "sideEffects": [
@@ -57,7 +60,6 @@
57
60
  "jotai-family": "1.1.0",
58
61
  "libphonenumber-js": "1.12.6",
59
62
  "react-day-picker": "10.0.2",
60
- "react-hook-form": "7.55.0",
61
63
  "react-hotkeys-hook": "5.4.0",
62
64
  "react-imask": "7.6.1",
63
65
  "react-intersection-observer": "11.0.1",
@@ -70,18 +72,26 @@
70
72
  "zod": "4.6.7"
71
73
  },
72
74
  "devDependencies": {
75
+ "@tanstack/react-query": "^5.107.1",
73
76
  "@types/node": "^26.6.6",
74
77
  "@types/react": "19.3.0",
75
78
  "@types/react-dom": "19.3.0",
79
+ "happy-dom": "21.0.4",
80
+ "i18next": "^27.1.1",
76
81
  "jotai": "^3.0.2",
82
+ "nuqs": "^2.10.3",
77
83
  "react": "^19.3.1",
78
84
  "react-dom": "^19.3.1",
85
+ "react-hook-form": "^7.92.0",
79
86
  "react-i18next": "^18.0.1"
80
87
  },
81
88
  "peerDependencies": {
89
+ "@tanstack/react-query": "^5.107.1",
82
90
  "jotai": "^3.0.2",
91
+ "nuqs": "^2.10.3",
83
92
  "react": "^19.3.1",
84
93
  "react-dom": "^19.3.1",
94
+ "react-hook-form": "^7.92.0",
85
95
  "react-i18next": "^18.0.1",
86
96
  "react-router-dom": "^7.1.1"
87
97
  },
@@ -1,74 +0,0 @@
1
- export declare const INTL_LANGUAGES: {
2
- English: string;
3
- 'English (UK)': string;
4
- Spanish: string;
5
- 'Spanish (Mexico)': string;
6
- French: string;
7
- 'French (Canada)': string;
8
- German: string;
9
- Italian: string;
10
- Portuguese: string;
11
- 'Portuguese (Brazil)': string;
12
- Russian: string;
13
- 'Chinese (Simplified)': string;
14
- 'Chinese (Traditional)': string;
15
- Japanese: string;
16
- Korean: string;
17
- Arabic: string;
18
- Hindi: string;
19
- Dutch: string;
20
- Swedish: string;
21
- Norwegian: string;
22
- Danish: string;
23
- Finnish: string;
24
- Polish: string;
25
- Czech: string;
26
- Hungarian: string;
27
- Romanian: string;
28
- Bulgarian: string;
29
- Croatian: string;
30
- Serbian: string;
31
- Slovak: string;
32
- Slovenian: string;
33
- Estonian: string;
34
- Latvian: string;
35
- Lithuanian: string;
36
- Greek: string;
37
- Turkish: string;
38
- Hebrew: string;
39
- Thai: string;
40
- Vietnamese: string;
41
- Indonesian: string;
42
- Malay: string;
43
- Filipino: string;
44
- Ukrainian: string;
45
- Belarusian: string;
46
- Kazakh: string;
47
- Uzbek: string;
48
- Georgian: string;
49
- Armenian: string;
50
- Azerbaijani: string;
51
- Persian: string;
52
- Urdu: string;
53
- Bengali: string;
54
- Tamil: string;
55
- Telugu: string;
56
- Marathi: string;
57
- Gujarati: string;
58
- Kannada: string;
59
- Malayalam: string;
60
- Punjabi: string;
61
- Nepali: string;
62
- Sinhala: string;
63
- Burmese: string;
64
- Khmer: string;
65
- Lao: string;
66
- Mongolian: string;
67
- Tibetan: string;
68
- Swahili: string;
69
- Afrikaans: string;
70
- Amharic: string;
71
- Yoruba: string;
72
- Igbo: string;
73
- Hausa: string;
74
- };
@@ -1,76 +0,0 @@
1
- // src/constants/IntlLanguages.ts
2
- const INTL_LANGUAGES = {
3
- English: "en-US",
4
- "English (UK)": "en-GB",
5
- Spanish: "es-ES",
6
- "Spanish (Mexico)": "es-MX",
7
- French: "fr-FR",
8
- "French (Canada)": "fr-CA",
9
- German: "de-DE",
10
- Italian: "it-IT",
11
- Portuguese: "pt-PT",
12
- "Portuguese (Brazil)": "pt-BR",
13
- Russian: "ru-RU",
14
- "Chinese (Simplified)": "zh-CN",
15
- "Chinese (Traditional)": "zh-TW",
16
- Japanese: "ja-JP",
17
- Korean: "ko-KR",
18
- Arabic: "ar-SA",
19
- Hindi: "hi-IN",
20
- Dutch: "nl-NL",
21
- Swedish: "sv-SE",
22
- Norwegian: "no-NO",
23
- Danish: "da-DK",
24
- Finnish: "fi-FI",
25
- Polish: "pl-PL",
26
- Czech: "cs-CZ",
27
- Hungarian: "hu-HU",
28
- Romanian: "ro-RO",
29
- Bulgarian: "bg-BG",
30
- Croatian: "hr-HR",
31
- Serbian: "sr-RS",
32
- Slovak: "sk-SK",
33
- Slovenian: "sl-SI",
34
- Estonian: "et-EE",
35
- Latvian: "lv-LV",
36
- Lithuanian: "lt-LT",
37
- Greek: "el-GR",
38
- Turkish: "tr-TR",
39
- Hebrew: "he-IL",
40
- Thai: "th-TH",
41
- Vietnamese: "vi-VN",
42
- Indonesian: "id-ID",
43
- Malay: "ms-MY",
44
- Filipino: "fil-PH",
45
- Ukrainian: "uk-UA",
46
- Belarusian: "be-BY",
47
- Kazakh: "kk-KZ",
48
- Uzbek: "uz-UZ",
49
- Georgian: "ka-GE",
50
- Armenian: "hy-AM",
51
- Azerbaijani: "az-AZ",
52
- Persian: "fa-IR",
53
- Urdu: "ur-PK",
54
- Bengali: "bn-BD",
55
- Tamil: "ta-IN",
56
- Telugu: "te-IN",
57
- Marathi: "mr-IN",
58
- Gujarati: "gu-IN",
59
- Kannada: "kn-IN",
60
- Malayalam: "ml-IN",
61
- Punjabi: "pa-IN",
62
- Nepali: "ne-NP",
63
- Sinhala: "si-LK",
64
- Burmese: "my-MM",
65
- Khmer: "km-KH",
66
- Lao: "lo-LA",
67
- Mongolian: "mn-MN",
68
- Tibetan: "bo-CN",
69
- Swahili: "sw-KE",
70
- Afrikaans: "af-ZA",
71
- Amharic: "am-ET",
72
- Yoruba: "yo-NG",
73
- Igbo: "ig-NG",
74
- Hausa: "ha-NG"
75
- };
76
- export { INTL_LANGUAGES };
@@ -1,16 +0,0 @@
1
- import { z } from "zod";
2
- import { NavigateOptions } from "react-router-dom";
3
- type QuerySchemas = Record<string, z.ZodType>;
4
- /** Values to write; null removes the key, a missing key stays as it is. */
5
- type QueryValues<S extends QuerySchemas> = { [K in keyof S]?: z.output<S[K]> | null; };
6
- export type QueryState<T> = [T | null, (value: T | null, navigationOptions?: NavigateOptions) => void];
7
- /** Reads and updates one URL query value while preserving concurrent query changes. */
8
- export declare function useQueryState<S extends z.ZodType>(queryKey: string, schema: S): QueryState<z.output<S>>;
9
- /**
10
- * Reads and updates several query values through one shared navigation draft.
11
- * Each key's value is checked against its schema; absent and invalid ones are undefined.
12
- */
13
- export declare function useMultiQueryState<S extends QuerySchemas>(schemas: S): readonly [z.core.$InferObjectOutput<{ -readonly [k in keyof { -readonly [P in keyof S]: S[P]; }]: z.ZodOptional<{ -readonly [P in keyof S]: S[P]; }[k]>; }, {}>, (values: QueryValues<S>, navigationOptions?: NavigateOptions) => void];
14
- /** Creates a remover that preserves the remaining query values and router state. */
15
- export declare function useRemoveQueryStateByKey(): (key: string) => void;
16
- export {};
@@ -1,122 +0,0 @@
1
- import { jsonOf } from "../utils/json.js";
2
- import { useLayoutEffect, useRef } from "react";
3
- import { z } from "zod";
4
- import { useLocation, useSearchParams } from "react-router-dom";
5
- // src/hooks/use-query-state.tsx
6
- let searchParamsDraft = null;
7
- const getSearchParamsDraft = (location) => {
8
- if (!searchParamsDraft || searchParamsDraft.location !== location) {
9
- const draft = {
10
- location,
11
- params: new URLSearchParams(location.search),
12
- state: location.state
13
- };
14
- searchParamsDraft = draft;
15
- queueMicrotask(() => {
16
- if (searchParamsDraft === draft) searchParamsDraft = null;
17
- });
18
- }
19
- return searchParamsDraft;
20
- };
21
- /** Returns a reader for pending query changes at the latest router location. */
22
- const useSearchParamsDraft = () => {
23
- const location = useLocation();
24
- const latestLocation = useRef(location);
25
- useLayoutEffect(() => {
26
- latestLocation.current = location;
27
- });
28
- return () => getSearchParamsDraft(latestLocation.current);
29
- };
30
- /** Preserves pending query values and explicit navigation state for the next setter. */
31
- const updateSearchParamsDraft = (draft, nextParams, navigationOptions) => {
32
- draft.params = new URLSearchParams(nextParams);
33
- if (navigationOptions && "state" in navigationOptions) draft.state = navigationOptions.state;
34
- };
35
- /**
36
- * The query value in the form its schema takes: as written (strings), else as
37
- * JSON (numbers, booleans, arrays, objects). Anyone can edit a URL, so a value
38
- * that fits neither is undefined, read as absent.
39
- */
40
- const queryInput = (schema, value) => {
41
- if (!value) return void 0;
42
- if (schema.safeParse(value).success) return value;
43
- const decoded = jsonOf(z.json()).safeParse(value);
44
- return decoded.success && schema.safeParse(decoded.data).success ? decoded.data : void 0;
45
- };
46
- /** Strings as written, everything else (numbers, booleans, objects) as JSON. */
47
- const toQueryString = (value) => typeof value === "string" ? value : JSON.stringify(value);
48
- /** Reads and updates one URL query value while preserving concurrent query changes. */
49
- function useQueryState(queryKey, schema) {
50
- const [searchParams, setSearchParams] = useSearchParams();
51
- const getDraft = useSearchParamsDraft();
52
- const value = schema.safeParse(queryInput(schema, searchParams.get(queryKey))).data ?? null;
53
- /** Updates the requested query key without discarding other pending query changes. */
54
- const setQuery = (next, navigationOptions) => {
55
- const draft = getDraft();
56
- const nextParams = new URLSearchParams(draft.params);
57
- if (next !== null) {
58
- const stringValue = toQueryString(next);
59
- if (nextParams.get(queryKey) === stringValue && !navigationOptions) return;
60
- if (!nextParams.has(queryKey) && next === value && !navigationOptions) return;
61
- nextParams.set(queryKey, stringValue);
62
- } else if (nextParams.has(queryKey)) nextParams.delete(queryKey);
63
- else if (!navigationOptions) return;
64
- updateSearchParamsDraft(draft, nextParams, navigationOptions);
65
- setSearchParams(nextParams, {
66
- ...navigationOptions,
67
- state: draft.state
68
- });
69
- };
70
- return [value, setQuery];
71
- }
72
- /**
73
- * Reads and updates several query values through one shared navigation draft.
74
- * Each key's value is checked against its schema; absent and invalid ones are undefined.
75
- */
76
- function useMultiQueryState(schemas) {
77
- const [searchParams, setSearchParams] = useSearchParams();
78
- const getDraft = useSearchParamsDraft();
79
- const queries = z.object(schemas).partial().parse(Object.fromEntries(Object.entries(schemas).map(([key, schema]) => [key, queryInput(schema, searchParams.get(key))])));
80
- /** Applies a batch without discarding other query changes from the same event. */
81
- const setQueries = (values, navigationOptions) => {
82
- const draft = getDraft();
83
- const nextParams = new URLSearchParams(draft.params);
84
- let hasChanges = false;
85
- for (const [key, value] of Object.entries(values)) {
86
- if (value === void 0) continue;
87
- if (value !== null) {
88
- const stringValue = toQueryString(value);
89
- if (nextParams.get(key) === stringValue) continue;
90
- nextParams.set(key, stringValue);
91
- hasChanges = true;
92
- } else if (nextParams.has(key)) {
93
- nextParams.delete(key);
94
- hasChanges = true;
95
- }
96
- }
97
- if (!hasChanges && !navigationOptions) return;
98
- updateSearchParamsDraft(draft, nextParams, navigationOptions);
99
- setSearchParams(nextParams, {
100
- replace: true,
101
- ...navigationOptions,
102
- state: draft.state
103
- });
104
- };
105
- return [queries, setQueries];
106
- }
107
- /** Creates a remover that preserves the remaining query values and router state. */
108
- function useRemoveQueryStateByKey() {
109
- const [, setSearchParams] = useSearchParams();
110
- const getDraft = useSearchParamsDraft();
111
- /** Removes one query key when present and preserves other pending changes. */
112
- const removeQuery = (key) => {
113
- const draft = getDraft();
114
- const nextParams = new URLSearchParams(draft.params);
115
- if (!nextParams.has(key)) return;
116
- nextParams.delete(key);
117
- updateSearchParamsDraft(draft, nextParams);
118
- setSearchParams(nextParams, { state: draft.state });
119
- };
120
- return removeQuery;
121
- }
122
- export { useMultiQueryState, useQueryState, useRemoveQueryStateByKey };
@@ -1,4 +0,0 @@
1
- import { QueryState } from "../../../hooks/use-query-state.js";
2
- import { z } from "zod";
3
- /** A filter's query value; changing it sends the table back to its first page. */
4
- export declare function useFilterQueryState<S extends z.ZodType>(queryKey: string, schema: S, cursorKey?: string): QueryState<z.output<S>>;
@@ -1,14 +0,0 @@
1
- import { useQueryState } from "../../../hooks/use-query-state.js";
2
- import { recordTableCursorAtomFamily } from "../../record-table/states/RecordTableCursorState.js";
3
- import { useSetAtom } from "jotai";
4
- // src/modules/filter/hooks/useFilterQueryState.tsx
5
- /** A filter's query value; changing it sends the table back to its first page. */
6
- function useFilterQueryState(queryKey, schema, cursorKey) {
7
- const [query, setQuery] = useQueryState(queryKey, schema);
8
- const setCursor = useSetAtom(recordTableCursorAtomFamily(cursorKey ?? ""));
9
- return [query, (value) => {
10
- setQuery(value);
11
- if (cursorKey) setCursor("");
12
- }];
13
- }
14
- export { useFilterQueryState };
@@ -1 +0,0 @@
1
- export type ThemeOption = 'light' | 'dark' | 'system';
File without changes
@@ -1,2 +0,0 @@
1
- export declare const formatDateISOStringToRelativeDate: (isoDate: string, isDayMaximumPrecision?: boolean) => string;
2
- export declare const formatDateISOStringToRelativeDateShort: (isoDate: string) => string;
@@ -1,16 +0,0 @@
1
- import { differenceInDays, formatDistance, formatDistanceStrict, isToday, startOfDay } from "date-fns";
2
- // src/utils/localization/formatDateISOStringToRelativeDate.ts
3
- const formatDateISOStringToRelativeDate = (isoDate, isDayMaximumPrecision = false) => {
4
- const now = /* @__PURE__ */ new Date();
5
- const targetDate = new Date(isoDate);
6
- if (isDayMaximumPrecision && isToday(targetDate)) return "Today";
7
- const isWithin24h = Math.abs(differenceInDays(targetDate, now)) < 1;
8
- if (isDayMaximumPrecision || !isWithin24h) return formatDistance(startOfDay(targetDate), startOfDay(now), { addSuffix: true });
9
- return formatDistance(targetDate, now, { addSuffix: true });
10
- };
11
- const formatDateISOStringToRelativeDateShort = (isoDate) => {
12
- const now = /* @__PURE__ */ new Date();
13
- const targetDate = new Date(isoDate);
14
- return formatDistanceStrict(targetDate, now, { addSuffix: false }).replace(/\s*years?/g, "y").replace(/\s*months?/g, "mo").replace(/\s*days?/g, "d").replace(/\s*hours?/g, "h").replace(/\s*minutes?/g, "m").replace(/\s*seconds?/g, "s");
15
- };
16
- export { formatDateISOStringToRelativeDate, formatDateISOStringToRelativeDateShort };