@erxes/ui 4.0.0-v2.2 → 4.0.0-v2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +63 -0
- package/CATALOG.md +276 -0
- package/README.md +20 -0
- package/dist/components/accordion.d.ts +1 -0
- package/dist/components/accordion.js +1 -0
- package/dist/components/alert-dialog.d.ts +4 -0
- package/dist/components/alert-dialog.js +4 -0
- package/dist/components/alert.d.ts +1 -0
- package/dist/components/alert.js +1 -0
- package/dist/components/avatar.d.ts +2 -0
- package/dist/components/avatar.js +1 -0
- package/dist/components/background-gradient-animation.d.ts +4 -1
- package/dist/components/background-gradient-animation.js +4 -1
- package/dist/components/badge.d.ts +3 -0
- package/dist/components/badge.js +2 -0
- package/dist/components/breadcrumb.d.ts +1 -0
- package/dist/components/breadcrumb.js +1 -0
- package/dist/components/button.d.ts +6 -1
- package/dist/components/button.js +5 -1
- package/dist/components/calendar.d.ts +5 -0
- package/dist/components/calendar.js +4 -0
- package/dist/components/card.d.ts +1 -0
- package/dist/components/card.js +1 -0
- package/dist/components/chart-config.d.ts +4 -1
- package/dist/components/charts.d.ts +8 -1
- package/dist/components/charts.js +16 -6
- package/dist/components/checkbox.d.ts +1 -0
- package/dist/components/checkbox.js +1 -0
- package/dist/components/choicebox-group.d.ts +1 -0
- package/dist/components/choicebox-group.js +1 -0
- package/dist/components/collapsible.d.ts +1 -0
- package/dist/components/collapsible.js +1 -0
- package/dist/components/color-picker.d.ts +1 -0
- package/dist/components/color-picker.js +15 -8
- package/dist/components/combobox.d.ts +6 -1
- package/dist/components/combobox.js +13 -2
- package/dist/components/command-bar.d.ts +4 -0
- package/dist/components/command-bar.js +7 -0
- package/dist/components/command.d.ts +4 -0
- package/dist/components/command.js +4 -0
- package/dist/components/context-menu.d.ts +1 -0
- package/dist/components/context-menu.js +1 -0
- package/dist/components/copy-text.d.ts +1 -0
- package/dist/components/copy-text.js +1 -0
- package/dist/components/date-picker-value.d.ts +5 -9
- package/dist/components/date-picker-value.js +15 -34
- package/dist/components/date-picker.d.ts +4 -4
- package/dist/components/date-picker.js +9 -7
- package/dist/components/date-text-input.d.ts +2 -4
- package/dist/components/date-text-input.js +11 -9
- package/dist/components/dialog.d.ts +9 -2
- package/dist/components/dialog.js +24 -11
- package/dist/components/drag-handle.d.ts +1 -0
- package/dist/components/drag-handle.js +1 -0
- package/dist/components/dropdown-menu.d.ts +1 -0
- package/dist/components/dropdown-menu.js +1 -0
- package/dist/components/empty.d.ts +6 -1
- package/dist/components/empty.js +25 -2
- package/dist/components/field-control.d.ts +16 -0
- package/dist/components/field-control.js +19 -0
- package/dist/components/form-layout.d.ts +21 -0
- package/dist/components/form-layout.js +57 -0
- package/dist/components/form.d.ts +14 -3
- package/dist/components/form.js +24 -8
- package/dist/components/hover-card.d.ts +1 -0
- package/dist/components/hover-card.js +1 -0
- package/dist/components/icon-tip.d.ts +7 -0
- package/dist/components/icon-tip.js +16 -0
- package/dist/components/info-card.d.ts +4 -0
- package/dist/components/info-card.js +4 -0
- package/dist/components/input-group.d.ts +5 -4
- package/dist/components/input-group.js +6 -5
- package/dist/components/input.d.ts +2 -1
- package/dist/components/input.js +10 -4
- package/dist/components/kbd.d.ts +2 -1
- package/dist/components/kbd.js +2 -1
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/multiselect.d.ts +1 -0
- package/dist/components/multiselect.js +7 -3
- package/dist/components/on-demand.d.ts +15 -2
- package/dist/components/on-demand.js +21 -1
- package/dist/components/popover.d.ts +4 -0
- package/dist/components/popover.js +21 -13
- package/dist/components/radio-group.d.ts +1 -0
- package/dist/components/radio-group.js +1 -0
- package/dist/components/scroll-area.d.ts +1 -0
- package/dist/components/scroll-area.js +1 -0
- package/dist/components/select.d.ts +5 -1
- package/dist/components/select.js +21 -10
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/separator.js +4 -0
- package/dist/components/sheet.d.ts +9 -2
- package/dist/components/sheet.js +23 -10
- package/dist/components/sidebar/panel.js +1 -1
- package/dist/components/sidebar.d.ts +1 -0
- package/dist/components/sidebar.js +1 -0
- package/dist/components/skeleton.d.ts +1 -0
- package/dist/components/skeleton.js +1 -0
- package/dist/components/spinner.d.ts +1 -0
- package/dist/components/spinner.js +1 -0
- package/dist/components/string-array.js +1 -0
- package/dist/components/switch.d.ts +1 -0
- package/dist/components/switch.js +1 -0
- package/dist/components/table.d.ts +4 -0
- package/dist/components/table.js +4 -0
- package/dist/components/tabs.d.ts +8 -1
- package/dist/components/tabs.js +8 -1
- package/dist/components/text-overflow.d.ts +4 -1
- package/dist/components/text-overflow.js +4 -1
- package/dist/components/textarea.d.ts +1 -0
- package/dist/components/textarea.js +5 -1
- package/dist/components/toaster.d.ts +4 -1
- package/dist/components/toaster.js +5 -2
- package/dist/components/toggle-group.d.ts +5 -0
- package/dist/components/toggle-group.js +19 -11
- package/dist/components/toggle.d.ts +1 -0
- package/dist/components/toggle.js +1 -0
- package/dist/components/tooltip.d.ts +4 -0
- package/dist/components/tooltip.js +4 -0
- package/dist/components/upload.d.ts +4 -0
- package/dist/components/upload.js +20 -11
- package/dist/federation.d.ts +4 -0
- package/dist/federation.js +7 -1
- package/dist/hooks/use-focus-first-field.d.ts +8 -0
- package/dist/hooks/use-focus-first-field.js +15 -0
- package/dist/hooks/use-item-keys.d.ts +11 -0
- package/dist/hooks/use-item-keys.js +24 -0
- package/dist/hooks/use-page-hotkey.d.ts +14 -0
- package/dist/hooks/use-page-hotkey.js +24 -0
- package/dist/hooks/use-toast.d.ts +5 -0
- package/dist/hooks/use-toast.js +5 -0
- package/dist/index.d.ts +34 -7
- package/dist/index.js +32 -4
- package/dist/lib/format.d.ts +60 -0
- package/dist/lib/format.js +86 -0
- package/dist/lib/money.d.ts +13 -0
- package/dist/lib/money.js +21 -0
- package/dist/lib/render-in-dom.d.ts +6 -0
- package/dist/lib/render-in-dom.js +26 -0
- package/dist/lib/stored.d.ts +13 -0
- package/dist/lib/stored.js +41 -0
- package/dist/lib/text.d.ts +11 -0
- package/dist/lib/text.js +18 -0
- package/dist/modules/attachments/use-carousel.js +5 -10
- package/dist/modules/blocks/components/BlockEditor.js +2 -2
- package/dist/modules/blocks/components/Editor.d.ts +1 -1
- package/dist/modules/blocks/components/Editor.js +5 -2
- package/dist/modules/blocks/hooks/useBarcodeSizeForm.d.ts +1 -1
- package/dist/modules/blocks/hooks/useBlockEditor.d.ts +3 -0
- package/dist/modules/blocks/hooks/useBlockEditor.js +21 -2
- package/dist/modules/blocks/types/TextEditor.d.ts +3 -1
- package/dist/modules/blocks/utils/parseBlocks.d.ts +1 -1
- package/dist/modules/blocks/utils/parseBlocks.js +1 -1
- package/dist/modules/conditions/ConditionsEditor.d.ts +13 -0
- package/dist/modules/conditions/ConditionsEditor.js +171 -0
- package/dist/modules/conditions/DateEditors.d.ts +8 -0
- package/dist/modules/conditions/DateEditors.js +188 -0
- package/dist/modules/conditions/FieldPicker.d.ts +17 -0
- package/dist/modules/conditions/FieldPicker.js +99 -0
- package/dist/modules/conditions/LazyConditionsEditor.d.ts +10 -0
- package/dist/modules/conditions/LazyConditionsEditor.js +11 -0
- package/dist/modules/conditions/RuleParts.d.ts +30 -0
- package/dist/modules/conditions/RuleParts.js +78 -0
- package/dist/modules/conditions/RuleRow.d.ts +27 -0
- package/dist/modules/conditions/RuleRow.js +156 -0
- package/dist/modules/conditions/TypedInput.d.ts +13 -0
- package/dist/modules/conditions/TypedInput.js +36 -0
- package/dist/modules/conditions/ValueEditor.d.ts +18 -0
- package/dist/modules/conditions/ValueEditor.js +169 -0
- package/dist/modules/conditions/conditions.d.ts +77 -0
- package/dist/modules/conditions/conditions.js +69 -0
- package/dist/modules/conditions/fieldIcons.d.ts +6 -0
- package/dist/modules/conditions/fieldIcons.js +21 -0
- package/dist/modules/conditions/fieldOptions.d.ts +15 -0
- package/dist/modules/conditions/fieldOptions.js +38 -0
- package/dist/modules/conditions/filterRule.d.ts +45 -0
- package/dist/modules/conditions/filterRule.js +171 -0
- package/dist/modules/conditions/filterText.d.ts +16 -0
- package/dist/modules/conditions/filterText.js +156 -0
- package/dist/modules/display/components/EmailDisplay.d.ts +4 -0
- package/dist/modules/display/components/EmailDisplay.js +6 -3
- package/dist/modules/display/components/PhoneDisplay.d.ts +4 -0
- package/dist/modules/display/components/PhoneDisplay.js +4 -0
- package/dist/modules/display/components/RelativeDateDisplay.d.ts +7 -5
- package/dist/modules/display/components/RelativeDateDisplay.js +10 -8
- package/dist/modules/display/components/SexDisplay.d.ts +1 -0
- package/dist/modules/display/components/SexDisplay.js +1 -0
- package/dist/modules/filter/components/Filter.d.ts +4 -0
- package/dist/modules/filter/components/Filter.js +4 -0
- package/dist/modules/filter/components/FilterBar.js +8 -7
- package/dist/modules/filter/components/FilterDialog.js +4 -5
- package/dist/modules/filter/components/FilterPopover.js +1 -1
- package/dist/modules/filter/components/FilterProvider.d.ts +1 -2
- package/dist/modules/filter/components/FilterProvider.js +22 -16
- package/dist/modules/filter/hooks/useFilterContext.d.ts +1 -0
- package/dist/modules/filter/hooks/useFilterContext.js +1 -0
- package/dist/modules/filter/types/filter.d.ts +0 -1
- package/dist/modules/hotkey/components/PopoverScoped.d.ts +5 -0
- package/dist/modules/hotkey/components/PopoverScoped.js +5 -0
- package/dist/modules/hotkey/hooks/usePreviousHotkeyScope.d.ts +1 -0
- package/dist/modules/hotkey/hooks/usePreviousHotkeyScope.js +1 -0
- package/dist/modules/hotkey/hooks/useScopedHotkeys.d.ts +5 -1
- package/dist/modules/hotkey/hooks/useScopedHotkeys.js +5 -1
- package/dist/modules/icons/components/IconComponent.d.ts +4 -0
- package/dist/modules/icons/components/IconComponent.js +4 -0
- package/dist/modules/icons/components/IconPicker.d.ts +4 -0
- package/dist/modules/icons/components/IconPicker.js +7 -5
- package/dist/modules/icons/providers/IconsProvider.d.ts +1 -0
- package/dist/modules/icons/providers/IconsProvider.js +1 -0
- package/dist/modules/inputs/components/EmailField.d.ts +4 -1
- package/dist/modules/inputs/components/EmailField.js +4 -1
- package/dist/modules/inputs/components/FullNameField.d.ts +6 -0
- package/dist/modules/inputs/components/FullNameField.js +20 -8
- package/dist/modules/inputs/components/PhoneField.d.ts +4 -1
- package/dist/modules/inputs/components/PhoneField.js +4 -1
- package/dist/modules/inputs/components/SexField.d.ts +1 -0
- package/dist/modules/inputs/components/SexField.js +1 -0
- package/dist/modules/layout/components/AppLayout.d.ts +6 -6
- package/dist/modules/layout/components/AppLayout.js +12 -13
- package/dist/modules/layout/components/AppLayoutResizeHandle.d.ts +5 -12
- package/dist/modules/layout/components/AppLayoutResizeHandle.js +15 -18
- package/dist/modules/layout/components/Page.d.ts +5 -0
- package/dist/modules/layout/components/Page.js +5 -0
- package/dist/modules/layout/components/PageHeader.d.ts +4 -1
- package/dist/modules/layout/components/PageHeader.js +4 -1
- package/dist/modules/list/DisplayMenu.d.ts +37 -0
- package/dist/modules/list/DisplayMenu.js +92 -0
- package/dist/modules/list/ListFilter.d.ts +83 -0
- package/dist/modules/list/ListFilter.js +83 -0
- package/dist/modules/list/ViewBar.d.ts +47 -0
- package/dist/modules/list/ViewBar.js +65 -0
- package/dist/modules/list/filter/AddFilter.d.ts +10 -0
- package/dist/modules/list/filter/AddFilter.js +140 -0
- package/dist/modules/list/filter/AdvancedPopover.d.ts +8 -0
- package/dist/modules/list/filter/AdvancedPopover.js +103 -0
- package/dist/modules/list/filter/ListFilterBar.d.ts +6 -0
- package/dist/modules/list/filter/ListFilterBar.js +157 -0
- package/dist/modules/list/filter/RecordCount.d.ts +7 -0
- package/dist/modules/list/filter/RecordCount.js +22 -0
- package/dist/modules/list/filter/RuleChips.d.ts +12 -0
- package/dist/modules/list/filter/RuleChips.js +151 -0
- package/dist/modules/list/filter/SearchChip.d.ts +6 -0
- package/dist/modules/list/filter/SearchChip.js +69 -0
- package/dist/modules/list/filter/filterRules.d.ts +21 -0
- package/dist/modules/list/filter/filterRules.js +37 -0
- package/dist/modules/list/filter/listFilterContext.d.ts +36 -0
- package/dist/modules/list/filter/listFilterContext.js +18 -0
- package/dist/modules/list/filter/listFilterQuery.d.ts +20 -0
- package/dist/modules/list/filter/listFilterQuery.js +30 -0
- package/dist/modules/navigation-menu/components/NavigationMenu.d.ts +4 -3
- package/dist/modules/navigation-menu/components/NavigationMenu.js +7 -7
- package/dist/modules/pickers/EntityPicker.d.ts +7 -0
- package/dist/modules/pickers/EntityPicker.js +7 -0
- package/dist/modules/pickers/LookupPicker.d.ts +57 -0
- package/dist/modules/pickers/LookupPicker.js +115 -0
- package/dist/modules/pickers/SelectMember.d.ts +17 -2
- package/dist/modules/pickers/SelectMember.js +58 -4
- package/dist/modules/pickers/members.d.ts +3 -2
- package/dist/modules/pickers/members.js +1 -1
- package/dist/modules/record-field/components/NumberField.d.ts +5 -0
- package/dist/modules/record-field/components/NumberField.js +14 -7
- package/dist/modules/record-field/components/TextField.d.ts +4 -0
- package/dist/modules/record-field/components/TextField.js +10 -2
- package/dist/modules/record-field/meta-inputs/components/PhoneInput.d.ts +5 -0
- package/dist/modules/record-field/meta-inputs/components/PhoneInput.js +5 -0
- package/dist/modules/record-list/RecordList.d.ts +19 -0
- package/dist/modules/record-list/RecordList.js +24 -0
- package/dist/modules/record-list/RecordListProvider.d.ts +30 -0
- package/dist/modules/record-list/RecordListProvider.js +57 -0
- package/dist/modules/record-list/RecordListRoot.d.ts +30 -0
- package/dist/modules/record-list/RecordListRoot.js +140 -0
- package/dist/modules/record-list/selection.d.ts +22 -0
- package/dist/modules/record-list/selection.js +54 -0
- package/dist/modules/record-panel/PanelDescriptionEditor.d.ts +9 -0
- package/dist/modules/record-panel/PanelDescriptionEditor.js +39 -0
- package/dist/modules/record-panel/PanelDescriptionField.d.ts +13 -0
- package/dist/modules/record-panel/PanelDescriptionField.js +39 -0
- package/dist/modules/record-panel/PanelField.d.ts +17 -0
- package/dist/modules/record-panel/PanelField.js +47 -0
- package/dist/modules/record-panel/PanelForm.d.ts +30 -0
- package/dist/modules/record-panel/PanelForm.js +154 -0
- package/dist/modules/record-panel/PanelLabel.d.ts +10 -0
- package/dist/modules/record-panel/PanelLabel.js +55 -0
- package/dist/modules/record-panel/PanelSection.d.ts +12 -0
- package/dist/modules/record-panel/PanelSection.js +24 -0
- package/dist/modules/record-panel/panelExpansion.d.ts +10 -0
- package/dist/modules/record-panel/panelExpansion.js +7 -0
- package/dist/modules/record-panel/useSaveOnLeave.d.ts +14 -0
- package/dist/modules/record-panel/useSaveOnLeave.js +42 -0
- package/dist/modules/record-table/components/RecordTable.d.ts +6 -0
- package/dist/modules/record-table/components/RecordTable.js +6 -0
- package/dist/modules/record-table/components/RecordTableCell.d.ts +9 -0
- package/dist/modules/record-table/components/RecordTableCell.js +16 -2
- package/dist/modules/record-table/components/RecordTableCellInline.d.ts +5 -0
- package/dist/modules/record-table/components/RecordTableCellInline.js +8 -7
- package/dist/modules/record-table/components/RecordTableCursor.js +30 -28
- package/dist/modules/record-table/components/RecordTableHead.d.ts +7 -2
- package/dist/modules/record-table/components/RecordTableHead.js +73 -6
- package/dist/modules/record-table/components/RecordTableProvider.d.ts +22 -1
- package/dist/modules/record-table/components/RecordTableProvider.js +24 -8
- package/dist/modules/record-table/hooks/useTablePreferences.d.ts +1 -1
- package/dist/modules/record-table/hooks/useTablePreferences.js +18 -31
- package/dist/modules/record-table/states/RecordTableCursorState.d.ts +21 -1
- package/dist/modules/record-table/states/RecordTableCursorState.js +21 -3
- package/dist/modules/record-table/types/RecordTableCursorTypes.d.ts +1 -0
- package/dist/modules/record-table/types/RecordTableCursorTypes.js +1 -0
- package/dist/modules/records/ContactLink.d.ts +13 -0
- package/dist/modules/records/ContactLink.js +49 -0
- package/dist/modules/records/ContactPicker.d.ts +36 -0
- package/dist/modules/records/ContactPicker.js +173 -0
- package/dist/modules/records/MemberLink.d.ts +12 -0
- package/dist/modules/records/MemberLink.js +25 -0
- package/dist/modules/records/RecordChip.d.ts +13 -0
- package/dist/modules/records/RecordChip.js +46 -0
- package/dist/modules/records/contacts.d.ts +53 -0
- package/dist/modules/records/contacts.js +10 -0
- package/dist/modules/records/openRecord.d.ts +94 -0
- package/dist/modules/records/openRecord.js +72 -0
- package/dist/node_modules/.pnpm/vitest@5.1.0_@opentelemetry_api@1.10.0_@types_node@26.6.6_@vitest_browser-preview@5.1.0_d78d0f63d2a6b1c4a51a56547b330411/node_modules/vitest/dist/chunks/display.BlTmubjj.js +181 -0
- package/dist/node_modules/.pnpm/vitest@5.1.0_@opentelemetry_api@1.10.0_@types_node@26.6.6_@vitest_browser-preview@5.1.0_d78d0f63d2a6b1c4a51a56547b330411/node_modules/vitest/dist/chunks/index.D0heQG4v.js +987 -0
- package/dist/node_modules/.pnpm/vitest@5.1.0_@opentelemetry_api@1.10.0_@types_node@26.6.6_@vitest_browser-preview@5.1.0_d78d0f63d2a6b1c4a51a56547b330411/node_modules/vitest/dist/chunks/pathe.M-eThtNZ.zq3TM4NT.js +176 -0
- package/dist/node_modules/.pnpm/vitest@5.1.0_@opentelemetry_api@1.10.0_@types_node@26.6.6_@vitest_browser-preview@5.1.0_d78d0f63d2a6b1c4a51a56547b330411/node_modules/vitest/dist/chunks/run.CjdgFZiW.js +1509 -0
- package/dist/node_modules/.pnpm/vitest@5.1.0_@opentelemetry_api@1.10.0_@types_node@26.6.6_@vitest_browser-preview@5.1.0_d78d0f63d2a6b1c4a51a56547b330411/node_modules/vitest/dist/chunks/source-map.DakdQc29.js +687 -0
- package/dist/node_modules/.pnpm/vitest@5.1.0_@opentelemetry_api@1.10.0_@types_node@26.6.6_@vitest_browser-preview@5.1.0_d78d0f63d2a6b1c4a51a56547b330411/node_modules/vitest/dist/chunks/tinyrainbow.Do8I1XRG.js +85 -0
- package/dist/node_modules/.pnpm/vitest@5.1.0_@opentelemetry_api@1.10.0_@types_node@26.6.6_@vitest_browser-preview@5.1.0_d78d0f63d2a6b1c4a51a56547b330411/node_modules/vitest/dist/task-utils.js +6 -0
- package/dist/state/sidebarPanelState.js +7 -2
- package/dist/state/themeState.d.ts +13 -2
- package/dist/state/themeState.js +18 -4
- package/dist/theme.css +3 -0
- package/dist/types/SexCode.d.ts +1 -0
- package/dist/types/SexCode.js +1 -0
- package/dist/types/UIConfig.d.ts +182 -86
- package/dist/types/UIConfig.js +14 -0
- package/dist/utils/IsUndefinedOrNull.d.ts +1 -0
- package/dist/utils/IsUndefinedOrNull.js +1 -0
- package/dist/utils/file-storage.d.ts +1 -0
- package/dist/utils/file-storage.js +1 -0
- package/dist/utils/format/formatPhoneNumber.d.ts +4 -0
- package/dist/utils/format/formatPhoneNumber.js +4 -0
- package/dist/utils/getPluginAssetsUrl.d.ts +5 -0
- package/dist/utils/getPluginAssetsUrl.js +5 -0
- package/dist/utils/host-component.d.ts +10 -0
- package/dist/utils/host-component.js +34 -0
- package/dist/utils/json.d.ts +3 -2
- package/dist/utils/json.js +3 -2
- package/dist/utils/plugin-runtime.d.ts +21 -17
- package/dist/utils/plugin-runtime.js +59 -12
- package/dist/utils/plugin-styles.d.ts +10 -3
- package/dist/utils/plugin-styles.js +44 -12
- package/dist/utils/record-timeline.d.ts +10 -9
- package/dist/utils/record-timeline.js +12 -17
- package/exports.txt +249 -0
- package/package.json +14 -3
- package/dist/constants/IntlLanguages.d.ts +0 -74
- package/dist/constants/IntlLanguages.js +0 -76
- package/dist/hooks/use-query-state.d.ts +0 -16
- package/dist/hooks/use-query-state.js +0 -122
- package/dist/modules/filter/hooks/useFilterQueryState.d.ts +0 -4
- package/dist/modules/filter/hooks/useFilterQueryState.js +0 -14
- package/dist/types/Theme.d.ts +0 -1
- package/dist/types/Theme.js +0 -0
- package/dist/utils/localization/formatDateISOStringToRelativeDate.d.ts +0 -2
- package/dist/utils/localization/formatDateISOStringToRelativeDate.js +0 -16
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* How plugin UIs reach their own API and hear about changes. The host app
|
|
4
|
-
* (web) provides the runtime; erxes-ui is a Module Federation singleton,
|
|
5
|
-
* so every plugin UI gets the host's.
|
|
6
|
-
*
|
|
7
|
-
* - `pluginFetch('hr', '/leaves')` calls the plugin's API (its address comes
|
|
8
|
-
* from the plugin's manifest) with a 5-minute token core issues for this
|
|
9
|
-
* member and this plugin only. The plugin verifies it with core's public
|
|
10
|
-
* keys; core's session cookie never leaves core.
|
|
11
|
-
* - `useLiveSignal('hr', ['leaves'], refetch)` runs when the plugin says a
|
|
12
|
-
* topic changed (`core_live_signal` / `POST /core/v1/plugins/live`), and
|
|
13
|
-
* after reconnecting, over the one stream the browser keeps with core.
|
|
14
|
-
*/
|
|
2
|
+
/** A member's short-lived token for one plugin's API, and its address. */
|
|
15
3
|
export interface PluginSession {
|
|
16
4
|
token: string;
|
|
17
5
|
/** ISO time the token stops working. */
|
|
@@ -19,21 +7,37 @@ export interface PluginSession {
|
|
|
19
7
|
/** The plugin API's address, from its manifest. */
|
|
20
8
|
apiUrl: string | null;
|
|
21
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* A message on core's live stream: a plugin's changed topics, or resync.
|
|
12
|
+
* `resync` comes after a reconnect, when signals sent meanwhile were missed.
|
|
13
|
+
*/
|
|
22
14
|
export type PluginLiveMessage = {
|
|
23
15
|
plugin: string;
|
|
24
16
|
topics: string[];
|
|
25
17
|
} | {
|
|
26
18
|
resync: true;
|
|
27
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* What the host gives plugin UIs: plugin API sessions and the live stream.
|
|
22
|
+
* web provides it with `setPluginRuntime`; plugins call `pluginFetch`, `pluginJson` and
|
|
23
|
+
* `useLiveSignal`, which use it.
|
|
24
|
+
*/
|
|
28
25
|
export interface PluginRuntime {
|
|
29
26
|
session(plugin: string): Promise<PluginSession>;
|
|
30
27
|
subscribe(listener: (message: PluginLiveMessage) => void): () => void;
|
|
31
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Sets the plugin runtime; web calls it at startup and plugins don't.
|
|
31
|
+
* It drops every cached plugin session.
|
|
32
|
+
*/
|
|
32
33
|
export declare const setPluginRuntime: (next: PluginRuntime | null) => void;
|
|
34
|
+
/** The host's plugin runtime, or null outside erxes. */
|
|
33
35
|
export declare const getPluginRuntime: () => PluginRuntime | null;
|
|
34
36
|
/**
|
|
35
37
|
* `fetch` against a plugin's API as the signed-in member. Relative paths are
|
|
36
|
-
* resolved against the plugin's API address; a 401 renews the token once
|
|
38
|
+
* resolved against the plugin's API address; a 401 renews the token once and
|
|
39
|
+
* sends the call again, so `init.body` must be one that can be sent twice
|
|
40
|
+
* (text, an ArrayBuffer, a Blob or FormData, not a stream).
|
|
37
41
|
*/
|
|
38
42
|
export declare const pluginFetch: (plugin: string, path: string, init?: RequestInit) => Promise<Response>;
|
|
39
43
|
/**
|
|
@@ -44,8 +48,8 @@ export declare const pluginJson: <S extends z.ZodType>(plugin: string, path: str
|
|
|
44
48
|
json?: unknown;
|
|
45
49
|
}) => Promise<z.infer<S>>;
|
|
46
50
|
/**
|
|
47
|
-
* Runs `onSignal
|
|
48
|
-
*
|
|
49
|
-
*
|
|
51
|
+
* Runs `onSignal` when a plugin says one of `topics` changed, to refetch.
|
|
52
|
+
* It also runs after a reconnect, with every topic, since signals sent meanwhile were missed.
|
|
53
|
+
* Outside erxes it never runs.
|
|
50
54
|
*/
|
|
51
55
|
export declare const useLiveSignal: (plugin: string, topics: string | string[], onSignal: (topics: string[]) => void) => void;
|
|
@@ -4,28 +4,74 @@ import { z } from "zod";
|
|
|
4
4
|
// src/utils/plugin-runtime.ts
|
|
5
5
|
let runtime = null;
|
|
6
6
|
const sessions = /* @__PURE__ */ new Map();
|
|
7
|
+
/** A token is replaced this long before it ends, so no call carries one about to expire. */
|
|
8
|
+
const RENEW_BEFORE_MS = 3e4;
|
|
9
|
+
/**
|
|
10
|
+
* Sets the plugin runtime; web calls it at startup and plugins don't.
|
|
11
|
+
* It drops every cached plugin session.
|
|
12
|
+
*/
|
|
7
13
|
const setPluginRuntime = (next) => {
|
|
8
14
|
runtime = next;
|
|
9
15
|
sessions.clear();
|
|
10
16
|
};
|
|
17
|
+
/** The host's plugin runtime, or null outside erxes. */
|
|
11
18
|
const getPluginRuntime = () => runtime;
|
|
12
19
|
const need = () => {
|
|
13
20
|
if (!runtime) throw new Error("erxes plugin runtime is not available (open the plugin inside erxes)");
|
|
14
21
|
return runtime;
|
|
15
22
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
const Lifetime = jsonOf(z.object({
|
|
24
|
+
iat: z.number(),
|
|
25
|
+
exp: z.number()
|
|
26
|
+
}));
|
|
27
|
+
/** A JWT's claims as text; '' for a token that isn't one (its lifetime then comes from `expiresAt`). */
|
|
28
|
+
const claimsText = (token) => {
|
|
29
|
+
try {
|
|
30
|
+
return atob((token.split(".")[1] ?? "").replaceAll("-", "+").replaceAll("_", "/"));
|
|
31
|
+
} catch {
|
|
32
|
+
return "";
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* How long a token lasts, from its own claims (both core's clock), so a
|
|
37
|
+
* browser whose clock is set wrong still renews on time.
|
|
38
|
+
*/
|
|
39
|
+
const lifetimeMs = (session) => {
|
|
40
|
+
const claims = Lifetime.safeParse(claimsText(session.token));
|
|
41
|
+
return claims.success ? (claims.data.exp - claims.data.iat) * 1e3 : new Date(session.expiresAt).getTime() - Date.now();
|
|
42
|
+
};
|
|
43
|
+
const renew = (plugin) => {
|
|
44
|
+
const request = need().session(plugin).then((session) => ({
|
|
45
|
+
session,
|
|
46
|
+
endsAt: Date.now() + lifetimeMs(session)
|
|
47
|
+
}));
|
|
21
48
|
sessions.set(plugin, request);
|
|
22
|
-
request.catch(() =>
|
|
49
|
+
request.catch(() => {
|
|
50
|
+
if (sessions.get(plugin) === request) sessions.delete(plugin);
|
|
51
|
+
});
|
|
23
52
|
return request;
|
|
24
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* This member's session for `plugin`, renewed 30 seconds before it ends.
|
|
56
|
+
* `refused` is a token the plugin just turned down: it is replaced once, for
|
|
57
|
+
* every call that failed with it at the same time.
|
|
58
|
+
*/
|
|
59
|
+
const sessionOf = async (plugin, refused) => {
|
|
60
|
+
const cached = sessions.get(plugin);
|
|
61
|
+
if (cached) {
|
|
62
|
+
const held = await cached.catch(() => null);
|
|
63
|
+
if (held && held.session.token !== refused && held.endsAt - Date.now() > RENEW_BEFORE_MS) return held.session;
|
|
64
|
+
const renewing = sessions.get(plugin);
|
|
65
|
+
if (renewing && renewing !== cached) return (await renewing).session;
|
|
66
|
+
}
|
|
67
|
+
return (await renew(plugin)).session;
|
|
68
|
+
};
|
|
25
69
|
const join = (base, path) => `${base.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
|
|
26
70
|
/**
|
|
27
71
|
* `fetch` against a plugin's API as the signed-in member. Relative paths are
|
|
28
|
-
* resolved against the plugin's API address; a 401 renews the token once
|
|
72
|
+
* resolved against the plugin's API address; a 401 renews the token once and
|
|
73
|
+
* sends the call again, so `init.body` must be one that can be sent twice
|
|
74
|
+
* (text, an ArrayBuffer, a Blob or FormData, not a stream).
|
|
29
75
|
*/
|
|
30
76
|
const pluginFetch = async (plugin, path, init = {}) => {
|
|
31
77
|
const send = async (session) => {
|
|
@@ -38,8 +84,9 @@ const pluginFetch = async (plugin, path, init = {}) => {
|
|
|
38
84
|
credentials: "omit"
|
|
39
85
|
});
|
|
40
86
|
};
|
|
41
|
-
const
|
|
42
|
-
|
|
87
|
+
const session = await sessionOf(plugin);
|
|
88
|
+
const response = await send(session);
|
|
89
|
+
return response.status === 401 ? send(await sessionOf(plugin, session.token)) : response;
|
|
43
90
|
};
|
|
44
91
|
const errorBody = z.object({ message: z.string() });
|
|
45
92
|
/**
|
|
@@ -66,9 +113,9 @@ const pluginJson = async (plugin, path, schema, init = {}) => {
|
|
|
66
113
|
return jsonOf(schema).parse(text || "null");
|
|
67
114
|
};
|
|
68
115
|
/**
|
|
69
|
-
* Runs `onSignal
|
|
70
|
-
*
|
|
71
|
-
*
|
|
116
|
+
* Runs `onSignal` when a plugin says one of `topics` changed, to refetch.
|
|
117
|
+
* It also runs after a reconnect, with every topic, since signals sent meanwhile were missed.
|
|
118
|
+
* Outside erxes it never runs.
|
|
72
119
|
*/
|
|
73
120
|
const useLiveSignal = (plugin, topics, onSignal) => {
|
|
74
121
|
const handler = useRef(onSignal);
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The selectors of a list whose class the page lacks, and those with no class. Minified Tailwind
|
|
3
|
+
* merges rules with the same body into one list (`.bg-info,.bg-info\/10{…}`), so each selector
|
|
4
|
+
* is judged on its own.
|
|
5
|
+
*/
|
|
6
|
+
export declare const unknownSelectors: (selectorText: string, known: Set<string>) => string[];
|
|
7
|
+
/**
|
|
8
|
+
* Adds a plugin UI's compiled Tailwind to the page, minus what web has.
|
|
9
|
+
* Pass `css` from `import css from './styles.css?inline'`. It keeps the utilities layer without
|
|
10
|
+
* the classes the page already has, and the `@property` and `@keyframes` rules. Calling it again
|
|
11
|
+
* for the same plugin replaces its sheet.
|
|
5
12
|
*/
|
|
6
13
|
export declare const addPluginStyles: (plugin: string, css: string) => void;
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
// src/utils/plugin-styles.ts
|
|
2
2
|
const sheets = /* @__PURE__ */ new Map();
|
|
3
|
-
/** The class a
|
|
3
|
+
/** The class a selector is for: `md\:flex` in `.md\:flex`, `space-y-2` in `:where(.space-y-2 > …)`. */
|
|
4
4
|
const CLASS = /\.((?:\\[\da-f]{1,6} ?|\\.|[\w-])+)/i;
|
|
5
|
-
const classOf = (
|
|
5
|
+
const classOf = (selector) => CLASS.exec(selector)?.[1];
|
|
6
|
+
/** The selectors of a list, split at the commas outside brackets: `:is(.a, .b)` stays one. */
|
|
7
|
+
const selectorList = (selectorText) => {
|
|
8
|
+
const selectors = [];
|
|
9
|
+
let depth = 0;
|
|
10
|
+
let start = 0;
|
|
11
|
+
for (let index = 0; index < selectorText.length; index++) {
|
|
12
|
+
const char = selectorText[index];
|
|
13
|
+
if (char === "\\") index++;
|
|
14
|
+
else if (char === "(" || char === "[") depth++;
|
|
15
|
+
else if (char === ")" || char === "]") depth--;
|
|
16
|
+
else if (char === "," && depth === 0) {
|
|
17
|
+
selectors.push(selectorText.slice(start, index).trim());
|
|
18
|
+
start = index + 1;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return [...selectors, selectorText.slice(start).trim()];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The selectors of a list whose class the page lacks, and those with no class. Minified Tailwind
|
|
25
|
+
* merges rules with the same body into one list (`.bg-info,.bg-info\/10{…}`), so each selector
|
|
26
|
+
* is judged on its own.
|
|
27
|
+
*/
|
|
28
|
+
const unknownSelectors = (selectorText, known) => selectorList(selectorText).filter((selector) => {
|
|
29
|
+
const name = classOf(selector);
|
|
30
|
+
return name === void 0 || !known.has(name);
|
|
31
|
+
});
|
|
6
32
|
const collectClasses = (rules, into) => {
|
|
7
33
|
for (const rule of rules) {
|
|
8
|
-
const
|
|
9
|
-
if (name) into.add(name);
|
|
34
|
+
const names = rule instanceof CSSStyleRule ? selectorList(rule.selectorText).flatMap((selector) => classOf(selector) ?? []) : [];
|
|
35
|
+
if (names.length > 0) for (const name of names) into.add(name);
|
|
10
36
|
else if (rule instanceof CSSGroupingRule) collectClasses(rule.cssRules, into);
|
|
11
37
|
}
|
|
12
38
|
};
|
|
@@ -18,13 +44,18 @@ const pageClasses = (except) => {
|
|
|
18
44
|
for (const sheet of [...document.styleSheets, ...document.adoptedStyleSheets]) if (sheet !== except && sameOrigin(sheet)) collectClasses(sheet.cssRules, classes);
|
|
19
45
|
return classes;
|
|
20
46
|
};
|
|
21
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Deletes the selectors for classes the page has, the rules that leave with none, and the groups
|
|
49
|
+
* that leave empty.
|
|
50
|
+
*/
|
|
22
51
|
const dropKnown = (group, known) => {
|
|
23
52
|
for (let index = group.cssRules.length - 1; index >= 0; index--) {
|
|
24
53
|
const rule = group.cssRules[index];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
54
|
+
if (rule instanceof CSSStyleRule) {
|
|
55
|
+
const kept = unknownSelectors(rule.selectorText, known);
|
|
56
|
+
if (kept.length === 0) group.deleteRule(index);
|
|
57
|
+
else rule.selectorText = kept.join(", ");
|
|
58
|
+
} else if (rule instanceof CSSGroupingRule) {
|
|
28
59
|
dropKnown(rule, known);
|
|
29
60
|
if (rule.cssRules.length === 0) group.deleteRule(index);
|
|
30
61
|
}
|
|
@@ -33,9 +64,10 @@ const dropKnown = (group, known) => {
|
|
|
33
64
|
/** What a plugin sheet keeps besides its utilities: the custom properties and keyframes they use. */
|
|
34
65
|
const isSupport = (rule) => rule instanceof CSSPropertyRule || rule instanceof CSSKeyframesRule || rule instanceof CSSLayerStatementRule || rule instanceof CSSLayerBlockRule && rule.name === "properties";
|
|
35
66
|
/**
|
|
36
|
-
* Adds
|
|
37
|
-
*
|
|
38
|
-
* `@keyframes` rules. Calling it again
|
|
67
|
+
* Adds a plugin UI's compiled Tailwind to the page, minus what web has.
|
|
68
|
+
* Pass `css` from `import css from './styles.css?inline'`. It keeps the utilities layer without
|
|
69
|
+
* the classes the page already has, and the `@property` and `@keyframes` rules. Calling it again
|
|
70
|
+
* for the same plugin replaces its sheet.
|
|
39
71
|
*/
|
|
40
72
|
const addPluginStyles = (plugin, css) => {
|
|
41
73
|
const previous = sheets.get(plugin);
|
|
@@ -50,4 +82,4 @@ const addPluginStyles = (plugin, css) => {
|
|
|
50
82
|
sheets.set(plugin, sheet);
|
|
51
83
|
document.adoptedStyleSheets = [...document.adoptedStyleSheets.filter((adopted) => adopted !== previous), sheet];
|
|
52
84
|
};
|
|
53
|
-
export { addPluginStyles };
|
|
85
|
+
export { addPluginStyles, unknownSelectors };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Core's timeline, for plugin UIs: `<RecordTimeline type="hr.employee" id={employee.id} />`
|
|
4
|
-
* shows notes, mentions, pins, reactions, logged calls and the plugin's own
|
|
5
|
-
* entries for one of its records (the type must be in the plugin's manifest
|
|
6
|
-
* `timelines`). The host app (web) registers the component; erxes-ui is a
|
|
7
|
-
* Module Federation singleton, so every plugin gets the host's.
|
|
8
|
-
*/
|
|
1
|
+
/** Which record `RecordTimeline` shows: its timeline type and id. */
|
|
9
2
|
export type RecordTimelineProps = {
|
|
10
3
|
type: string;
|
|
11
4
|
id: string;
|
|
12
5
|
};
|
|
13
|
-
|
|
6
|
+
/** Registers core's timeline; web calls it at startup and plugins don't. */
|
|
7
|
+
export declare const setRecordTimeline: (component: import("react").ComponentType<RecordTimelineProps> | null) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Core's timeline of notes, calls and events for a plugin's record.
|
|
10
|
+
* `<RecordTimeline type="hr.employee" id={employee.id} />` shows notes, mentions, pins,
|
|
11
|
+
* reactions, logged calls and the plugin's own entries. The type must be in the plugin's
|
|
12
|
+
* manifest `timelines`. The host app (web) registers the component; outside erxes it renders
|
|
13
|
+
* nothing.
|
|
14
|
+
*/
|
|
14
15
|
export declare const RecordTimeline: (props: RecordTimelineProps) => import("react").JSX.Element | null;
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useSyncExternalStore } from "react";
|
|
1
|
+
import { hostComponent } from "./host-component.js";
|
|
3
2
|
// src/utils/record-timeline.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const setRecordTimeline =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const RecordTimeline =
|
|
15
|
-
const Component = useSyncExternalStore(subscribe, () => registered, () => registered);
|
|
16
|
-
if (!Component) return null;
|
|
17
|
-
return /* @__PURE__ */ jsx(Component, { ...props });
|
|
18
|
-
};
|
|
3
|
+
const timeline = hostComponent();
|
|
4
|
+
/** Registers core's timeline; web calls it at startup and plugins don't. */
|
|
5
|
+
const setRecordTimeline = timeline.set;
|
|
6
|
+
/**
|
|
7
|
+
* Core's timeline of notes, calls and events for a plugin's record.
|
|
8
|
+
* `<RecordTimeline type="hr.employee" id={employee.id} />` shows notes, mentions, pins,
|
|
9
|
+
* reactions, logged calls and the plugin's own entries. The type must be in the plugin's
|
|
10
|
+
* manifest `timelines`. The host app (web) registers the component; outside erxes it renders
|
|
11
|
+
* nothing.
|
|
12
|
+
*/
|
|
13
|
+
const RecordTimeline = timeline.Host;
|
|
19
14
|
export { RecordTimeline, setRecordTimeline };
|
package/exports.txt
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
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 ContactSearch
|
|
25
|
+
type ContactSearchQueries
|
|
26
|
+
type CustomerContact
|
|
27
|
+
type FileStorageAdapter
|
|
28
|
+
type IUIConfig
|
|
29
|
+
type Member
|
|
30
|
+
type MemberQueries
|
|
31
|
+
type MultiSelectOption
|
|
32
|
+
type PluginLiveMessage
|
|
33
|
+
type PluginRuntime
|
|
34
|
+
type PluginSession
|
|
35
|
+
type RecordListGroup
|
|
36
|
+
type RecordPageProps
|
|
37
|
+
type RecordPanelControls
|
|
38
|
+
type RecordRef
|
|
39
|
+
type RecordTableColumnDef
|
|
40
|
+
type RecordTimelineProps
|
|
41
|
+
type TConditionField
|
|
42
|
+
type TConditionGroup
|
|
43
|
+
type TConditionLookups
|
|
44
|
+
type TConditionRule
|
|
45
|
+
type TContactContentType
|
|
46
|
+
type TContactKind
|
|
47
|
+
type TDashboardWidget
|
|
48
|
+
type TDashboardWidgetPreview
|
|
49
|
+
type TListDisplay
|
|
50
|
+
type TListDisplayOption
|
|
51
|
+
type TListFilterField
|
|
52
|
+
type TListFilterProps
|
|
53
|
+
type TListViews
|
|
54
|
+
type TPanelRecordType
|
|
55
|
+
type TPluginListType
|
|
56
|
+
type TPluginSettingsPage
|
|
57
|
+
type TPropertyValue
|
|
58
|
+
type TRecordContacts
|
|
59
|
+
type TRecordDraftProps
|
|
60
|
+
type TRecordProperties
|
|
61
|
+
type TRecordSection
|
|
62
|
+
type TRecordSectionProps
|
|
63
|
+
type TRecordSlotProps
|
|
64
|
+
type TRecordTab
|
|
65
|
+
type TRecordTableSort
|
|
66
|
+
type TRelationTab
|
|
67
|
+
type TRelationTabProps
|
|
68
|
+
type TViewTabsProps
|
|
69
|
+
type Tag
|
|
70
|
+
type TagsQuery
|
|
71
|
+
value Accordion
|
|
72
|
+
value Alert
|
|
73
|
+
value AlertDialog
|
|
74
|
+
value AppLayout
|
|
75
|
+
value AppLayoutFooterLink
|
|
76
|
+
value Avatar
|
|
77
|
+
value BackgroundGradientAnimation
|
|
78
|
+
value Badge
|
|
79
|
+
value Breadcrumb
|
|
80
|
+
value Button
|
|
81
|
+
value Calendar
|
|
82
|
+
value Card
|
|
83
|
+
value ChartContainer
|
|
84
|
+
value ChartLegendContent
|
|
85
|
+
value ChartTooltipContent
|
|
86
|
+
value Checkbox
|
|
87
|
+
value ChoiceboxGroup
|
|
88
|
+
value Collapsible
|
|
89
|
+
value ColorPicker
|
|
90
|
+
value Combobox
|
|
91
|
+
value Command
|
|
92
|
+
value CommandBar
|
|
93
|
+
value ConditionsEditor
|
|
94
|
+
value ContactLink
|
|
95
|
+
value ContactRelationInput
|
|
96
|
+
value ContextMenu
|
|
97
|
+
value CopyText
|
|
98
|
+
value DASHBOARD_WIDGET_PREVIEWS
|
|
99
|
+
value DateInput
|
|
100
|
+
value DatePicker
|
|
101
|
+
value Dialog
|
|
102
|
+
value DisplayMenu
|
|
103
|
+
value DragHandle
|
|
104
|
+
value DropdownMenu
|
|
105
|
+
value Editor
|
|
106
|
+
value EmailDisplay
|
|
107
|
+
value EmailListField
|
|
108
|
+
value Empty
|
|
109
|
+
value EntityPicker
|
|
110
|
+
value EnumCursorDirection
|
|
111
|
+
value Filter
|
|
112
|
+
value Form
|
|
113
|
+
value FullNameField
|
|
114
|
+
value FullNameValue
|
|
115
|
+
value HoverCard
|
|
116
|
+
value IconComponent
|
|
117
|
+
value IconPicker
|
|
118
|
+
value IconTip
|
|
119
|
+
value IconsProvider
|
|
120
|
+
value InfoCard
|
|
121
|
+
value Input
|
|
122
|
+
value InputGroup
|
|
123
|
+
value Kbd
|
|
124
|
+
value LANGUAGES
|
|
125
|
+
value Label
|
|
126
|
+
value ListFilter
|
|
127
|
+
value ListFilterEmpty
|
|
128
|
+
value ListViewsProvider
|
|
129
|
+
value LookupPicker
|
|
130
|
+
value MEMBER_CONTENT_TYPE
|
|
131
|
+
value MemberInline
|
|
132
|
+
value MemberLink
|
|
133
|
+
value MultipleSelector
|
|
134
|
+
value NavigationMenuLinkItem
|
|
135
|
+
value NumberField
|
|
136
|
+
value PageContainer
|
|
137
|
+
value PageHeader
|
|
138
|
+
value PageSubHeader
|
|
139
|
+
value PanelDescriptionEditor
|
|
140
|
+
value PanelDescriptionField
|
|
141
|
+
value PanelExpansionContext
|
|
142
|
+
value PanelField
|
|
143
|
+
value PanelFieldTrigger
|
|
144
|
+
value PanelFormLayout
|
|
145
|
+
value PanelFormRow
|
|
146
|
+
value PanelLabel
|
|
147
|
+
value PanelSection
|
|
148
|
+
value PhoneDisplay
|
|
149
|
+
value PhoneField
|
|
150
|
+
value PhoneInput
|
|
151
|
+
value Popover
|
|
152
|
+
value PopoverScoped
|
|
153
|
+
value RadioGroup
|
|
154
|
+
value RecordList
|
|
155
|
+
value RecordOpenerProvider
|
|
156
|
+
value RecordPage
|
|
157
|
+
value RecordPanelProvider
|
|
158
|
+
value RecordTable
|
|
159
|
+
value RecordTableInlineCell
|
|
160
|
+
value RecordTimeline
|
|
161
|
+
value RelativeDateDisplay
|
|
162
|
+
value Resizable
|
|
163
|
+
value ScrollArea
|
|
164
|
+
value Select
|
|
165
|
+
value SelectContactContent
|
|
166
|
+
value SelectMember
|
|
167
|
+
value Separator
|
|
168
|
+
value SexCode
|
|
169
|
+
value SexDisplay
|
|
170
|
+
value SexField
|
|
171
|
+
value Sheet
|
|
172
|
+
value Sidebar
|
|
173
|
+
value Skeleton
|
|
174
|
+
value Slider
|
|
175
|
+
value Spinner
|
|
176
|
+
value StringArrayInput
|
|
177
|
+
value Switch
|
|
178
|
+
value TabButton
|
|
179
|
+
value Table
|
|
180
|
+
value Tabs
|
|
181
|
+
value TextField
|
|
182
|
+
value TextOverflowTooltip
|
|
183
|
+
value Textarea
|
|
184
|
+
value ThemeOption
|
|
185
|
+
value TimeField
|
|
186
|
+
value Toaster
|
|
187
|
+
value Toggle
|
|
188
|
+
value ToggleGroup
|
|
189
|
+
value Tooltip
|
|
190
|
+
value Upload
|
|
191
|
+
value ViewBar
|
|
192
|
+
value addPluginStyles
|
|
193
|
+
value amountStep
|
|
194
|
+
value badgeVariants
|
|
195
|
+
value buttonVariants
|
|
196
|
+
value cn
|
|
197
|
+
value companyTitle
|
|
198
|
+
value customerTitle
|
|
199
|
+
value editorText
|
|
200
|
+
value formatMoney
|
|
201
|
+
value formatPhoneNumber
|
|
202
|
+
value formatter
|
|
203
|
+
value fromAmountInput
|
|
204
|
+
value getPluginAssetsUrl
|
|
205
|
+
value getPluginRuntime
|
|
206
|
+
value isRule
|
|
207
|
+
value isUndefinedOrNull
|
|
208
|
+
value jsonOf
|
|
209
|
+
value listFilterQuery
|
|
210
|
+
value localTimeZone
|
|
211
|
+
value memberName
|
|
212
|
+
value oneOf
|
|
213
|
+
value pluginFetch
|
|
214
|
+
value pluginJson
|
|
215
|
+
value readImage
|
|
216
|
+
value setFileStorage
|
|
217
|
+
value setPluginRuntime
|
|
218
|
+
value setRecordPage
|
|
219
|
+
value setRecordTimeline
|
|
220
|
+
value stored
|
|
221
|
+
value storedFamily
|
|
222
|
+
value textOf
|
|
223
|
+
value themeState
|
|
224
|
+
value toAmountInput
|
|
225
|
+
value toIsoDay
|
|
226
|
+
value toast
|
|
227
|
+
value useConfirm
|
|
228
|
+
value useFieldControl
|
|
229
|
+
value useFilterContext
|
|
230
|
+
value useFocusFirstField
|
|
231
|
+
value useFormat
|
|
232
|
+
value useItemKeys
|
|
233
|
+
value useListDisplay
|
|
234
|
+
value useListFilterParams
|
|
235
|
+
value useListViews
|
|
236
|
+
value useLiveSignal
|
|
237
|
+
value useMemberOptions
|
|
238
|
+
value useMembersById
|
|
239
|
+
value useMoney
|
|
240
|
+
value useOpenRecord
|
|
241
|
+
value usePageHotkey
|
|
242
|
+
value usePanelExpanded
|
|
243
|
+
value usePreviousHotkeyScope
|
|
244
|
+
value useRecordPanel
|
|
245
|
+
value useScopedHotkeys
|
|
246
|
+
value useTagOptions
|
|
247
|
+
value useToast
|
|
248
|
+
value useUpload
|
|
249
|
+
value zoneOffset
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erxes/ui",
|
|
3
|
-
"version": "4.0.0-v2.
|
|
3
|
+
"version": "4.0.0-v2.20",
|
|
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",
|
|
@@ -74,19 +76,28 @@
|
|
|
74
76
|
"@types/node": "^26.6.6",
|
|
75
77
|
"@types/react": "19.3.0",
|
|
76
78
|
"@types/react-dom": "19.3.0",
|
|
79
|
+
"happy-dom": "21.0.4",
|
|
80
|
+
"i18next": "^27.1.1",
|
|
77
81
|
"jotai": "^3.0.2",
|
|
82
|
+
"nuqs": "^2.10.3",
|
|
78
83
|
"react": "^19.3.1",
|
|
79
84
|
"react-dom": "^19.3.1",
|
|
85
|
+
"react-hook-form": "^7.92.0",
|
|
80
86
|
"react-i18next": "^18.0.1"
|
|
81
87
|
},
|
|
82
88
|
"peerDependencies": {
|
|
83
89
|
"@tanstack/react-query": "^5.107.1",
|
|
84
90
|
"jotai": "^3.0.2",
|
|
91
|
+
"nuqs": "^2.10.3",
|
|
85
92
|
"react": "^19.3.1",
|
|
86
93
|
"react-dom": "^19.3.1",
|
|
94
|
+
"react-hook-form": "^7.92.0",
|
|
87
95
|
"react-i18next": "^18.0.1",
|
|
88
96
|
"react-router-dom": "^7.1.1"
|
|
89
97
|
},
|
|
98
|
+
"inlinedDependencies": {
|
|
99
|
+
"vitest": "5.1.0"
|
|
100
|
+
},
|
|
90
101
|
"scripts": {
|
|
91
102
|
"build": "tsdown",
|
|
92
103
|
"cn:tables": "cn build --full --css src/styles.css --out src/lib/cn-tables.ts --quiet"
|