@erxes/ui 4.0.0-v2.8 → 4.0.0-v2.9

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 (45) hide show
  1. package/README.md +8 -3
  2. package/dist/hooks/use-item-keys.d.ts +10 -0
  3. package/dist/hooks/use-item-keys.js +23 -0
  4. package/dist/index.d.ts +9 -2
  5. package/dist/index.js +9 -2
  6. package/dist/lib/format.d.ts +2 -0
  7. package/dist/lib/format.js +6 -1
  8. package/dist/lib/money.d.ts +10 -0
  9. package/dist/lib/money.js +18 -0
  10. package/dist/lib/text.d.ts +7 -0
  11. package/dist/lib/text.js +14 -0
  12. package/dist/modules/conditions/ConditionValueInput.d.ts +10 -0
  13. package/dist/modules/conditions/ConditionValueInput.js +166 -0
  14. package/dist/modules/conditions/ConditionsEditor.d.ts +11 -0
  15. package/dist/modules/conditions/ConditionsEditor.js +209 -0
  16. package/dist/modules/conditions/LazyConditionsEditor.d.ts +9 -0
  17. package/dist/modules/conditions/LazyConditionsEditor.js +10 -0
  18. package/dist/modules/conditions/PathPicker.d.ts +8 -0
  19. package/dist/modules/conditions/PathPicker.js +51 -0
  20. package/dist/modules/conditions/conditions.d.ts +64 -0
  21. package/dist/modules/conditions/conditions.js +135 -0
  22. package/dist/modules/list/ListFilter.d.ts +25 -11
  23. package/dist/modules/list/ListFilter.js +30 -26
  24. package/dist/modules/list/filter/AdvancedFilterDialog.d.ts +5 -0
  25. package/dist/modules/list/filter/AdvancedFilterDialog.js +52 -0
  26. package/dist/modules/list/filter/FieldMenus.d.ts +5 -0
  27. package/dist/modules/list/filter/FieldMenus.js +184 -0
  28. package/dist/modules/list/filter/ListFilterBar.d.ts +6 -0
  29. package/dist/modules/list/filter/ListFilterBar.js +246 -0
  30. package/dist/modules/list/filter/RecordCount.d.ts +7 -0
  31. package/dist/modules/list/filter/RecordCount.js +22 -0
  32. package/dist/modules/list/filter/RuleChips.d.ts +2 -0
  33. package/dist/modules/list/filter/RuleChips.js +157 -0
  34. package/dist/modules/list/filter/fieldIcons.d.ts +7 -0
  35. package/dist/modules/list/filter/fieldIcons.js +16 -0
  36. package/dist/modules/list/filter/filterRules.d.ts +46 -0
  37. package/dist/modules/list/filter/filterRules.js +166 -0
  38. package/dist/modules/list/filter/listFilterContext.d.ts +29 -0
  39. package/dist/modules/list/filter/listFilterContext.js +34 -0
  40. package/dist/modules/list/filter/listFilterQuery.d.ts +15 -0
  41. package/dist/modules/list/filter/listFilterQuery.js +21 -0
  42. package/dist/modules/pickers/LookupPicker.d.ts +50 -0
  43. package/dist/modules/pickers/LookupPicker.js +83 -0
  44. package/dist/theme.css +2 -0
  45. package/package.json +2 -1
package/README.md CHANGED
@@ -41,10 +41,15 @@ Only what something uses:
41
41
  `PanelField`, `PanelFormRow`, `PanelFormLayout`, `PanelLabel`, the description field and
42
42
  editor, and `usePanelExpanded`. The panel itself (header, tabs, resize) is web's.
43
43
  - a list's bar in `src/modules/list`: `ViewBar`, `DisplayMenu` with `useListDisplay`, and
44
- `ListFilter` with `useListFilterParams`.
44
+ `ListFilter` with `useListFilterParams`. `ListFilter` draws core's filter bar itself, with or
45
+ without web: its `member` fields pick from `members` (`memberQueries` from
46
+ `@erxes/core-contract/client`) and its `tags` fields from `tags` (a tags query of the record
47
+ type); a plugin outside erxes passes its own. Web's lists and the automation builder use the
48
+ same bar and the condition editor under its advanced filter (`ConditionsEditor`,
49
+ `src/modules/conditions`).
45
50
  - what the host app provides at startup, rendered through `hostComponent`
46
- (`src/utils/host-component.tsx`): `setRecordTimeline`, `setRecordPage` and `setListFilter`.
47
- Outside erxes they render nothing.
51
+ (`src/utils/host-component.tsx`): `setRecordTimeline` and `setRecordPage`. Outside erxes they
52
+ render nothing.
48
53
 
49
54
  Anything else is removed, not kept "in case". Before you remove an export, check the HR plugin
50
55
  UI and `.agents/skills/plugin-contract/SKILL.md`.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Stable React keys for an editable list whose items have no id (condition rules, switch
3
+ * cases). Call `added` and `removed` next to the change, so a row keeps its key when an
4
+ * earlier one goes. A list replaced from outside keeps its first keys and gains or drops the rest.
5
+ */
6
+ export declare const useItemKeys: (length: number) => {
7
+ keyAt: (index: number) => string;
8
+ added: () => void;
9
+ removed: (index: number) => void;
10
+ };
@@ -0,0 +1,23 @@
1
+ import { useState } from "react";
2
+ // src/hooks/use-item-keys.ts
3
+ let counter = 0;
4
+ const newKey = () => {
5
+ counter += 1;
6
+ return `item-${counter}`;
7
+ };
8
+ /**
9
+ * Stable React keys for an editable list whose items have no id (condition rules, switch
10
+ * cases). Call `added` and `removed` next to the change, so a row keeps its key when an
11
+ * earlier one goes. A list replaced from outside keeps its first keys and gains or drops the rest.
12
+ */
13
+ const useItemKeys = (length) => {
14
+ const [keys, setKeys] = useState(() => Array.from({ length }, newKey));
15
+ const synced = keys.length === length ? keys : Array.from({ length }, (_, at) => keys[at] ?? newKey());
16
+ if (synced !== keys) setKeys(synced);
17
+ return {
18
+ keyAt: (index) => synced[index] ?? String(index),
19
+ added: () => setKeys((current) => [...current, newKey()]),
20
+ removed: (index) => setKeys((current) => current.filter((_, at) => at !== index))
21
+ };
22
+ };
23
+ export { useItemKeys };
package/dist/index.d.ts CHANGED
@@ -56,12 +56,15 @@ import { Toggle } from "./components/toggle.js";
56
56
  import { Tooltip } from "./components/tooltip.js";
57
57
  import { Upload } from "./components/upload.js";
58
58
  import { useConfirm } from "./hooks/use-confirm.js";
59
+ import { useItemKeys } from "./hooks/use-item-keys.js";
59
60
  import { usePageHotkey } from "./hooks/use-page-hotkey.js";
60
61
  import { toast, useToast } from "./hooks/use-toast.js";
61
62
  import { useUpload } from "./hooks/use-upload.js";
62
63
  import { cn } from "./lib/utils.js";
63
64
  import { LANGUAGES, formatter, localTimeZone, toIsoDay, useFormat, zoneOffset } from "./lib/format.js";
65
+ import { amountStep, formatMoney, fromAmountInput, toAmountInput, useMoney } from "./lib/money.js";
64
66
  import { stored, storedFamily } from "./lib/stored.js";
67
+ import { oneOf, textOf } from "./lib/text.js";
65
68
  import { Editor } from "./modules/blocks/components/LazyEditor.js";
66
69
  import { editorText } from "./modules/blocks/utils/parseBlocks.js";
67
70
  import { EmailDisplay } from "./modules/display/components/EmailDisplay.js";
@@ -87,6 +90,7 @@ import { NavigationMenuLinkItem } from "./modules/navigation-menu/components/Nav
87
90
  import { EntityPicker } from "./modules/pickers/EntityPicker.js";
88
91
  import { Member, MemberQueries, memberName, useMembersById } from "./modules/pickers/members.js";
89
92
  import { MemberInline, SelectMember } from "./modules/pickers/SelectMember.js";
93
+ import { LookupPicker, Tag, TagsQuery, useMemberOptions, useTagOptions } from "./modules/pickers/LookupPicker.js";
90
94
  import { NumberField } from "./modules/record-field/components/NumberField.js";
91
95
  import { TextField } from "./modules/record-field/components/TextField.js";
92
96
  import { PhoneInput } from "./modules/record-field/meta-inputs/components/PhoneInput.js";
@@ -97,7 +101,10 @@ import { RecordTableColumnDef } from "./modules/record-table/components/RecordTa
97
101
  import { RecordTableInlineCell } from "./modules/record-table/components/RecordTableCellInline.js";
98
102
  import { EnumCursorDirection } from "./modules/record-table/types/RecordTableCursorTypes.js";
99
103
  import { DisplayMenu, TListDisplay, useListDisplay } from "./modules/list/DisplayMenu.js";
100
- import { ListFilter, TListFilterField, TListFilterProps, setListFilter, useListFilterParams } from "./modules/list/ListFilter.js";
104
+ import { ListFilter, TListFilterField, TListFilterProps, useListFilterParams } from "./modules/list/ListFilter.js";
105
+ import { listFilterQuery } from "./modules/list/filter/listFilterQuery.js";
106
+ import { TConditionField, TConditionGroup, TConditionLookups, TConditionRule, isRule } from "./modules/conditions/conditions.js";
107
+ import { ConditionsEditor } from "./modules/conditions/LazyConditionsEditor.js";
101
108
  import { ViewBar } from "./modules/list/ViewBar.js";
102
109
  import { PanelDescriptionEditor } from "./modules/record-panel/PanelDescriptionEditor.js";
103
110
  import { PanelDescriptionField } from "./modules/record-panel/PanelDescriptionField.js";
@@ -121,4 +128,4 @@ import { jsonOf } from "./utils/json.js";
121
128
  import { PluginLiveMessage, PluginRuntime, PluginSession, getPluginRuntime, pluginFetch, pluginJson, setPluginRuntime, useLiveSignal } from "./utils/plugin-runtime.js";
122
129
  import { addPluginStyles } from "./utils/plugin-styles.js";
123
130
  import { RecordTimeline, RecordTimelineProps, setRecordTimeline } from "./utils/record-timeline.js";
124
- export { Accordion, Alert, AlertDialog, AppLayout, AppLayoutFooterLink, Avatar, type AvatarProps, BackgroundGradientAnimation, Badge, type BadgeProps, Breadcrumb, Button, type ButtonProps, Calendar, type CalendarProps, Card, type ChartConfig, ChartContainer, ChartLegendContent, ChartTooltipContent, Checkbox, ChoiceboxGroup, Collapsible, ColorPicker, Combobox, Command, CommandBar, type CompanyContact, ContactLink, type ContactQueries, ContextMenu, CopyText, type CustomerContact, DateInput, DatePicker, Dialog, DisplayMenu, DragHandle, DropdownMenu, Editor, EmailDisplay, EmailListField, Empty, EntityPicker, EnumCursorDirection, type FileStorageAdapter, Filter, Form, FullNameField, FullNameValue, HoverCard, type IUIConfig, IconComponent, IconPicker, IconTip, IconsProvider, InfoCard, Input, InputGroup, Kbd, LANGUAGES, Label, ListFilter, type Member, MemberInline, type MemberQueries, type MultiSelectOption, MultipleSelector, NavigationMenuLinkItem, NumberField, PageContainer, PageHeader, PageSubHeader, PanelDescriptionEditor, PanelDescriptionField, PanelExpansionContext, PanelField, PanelFieldTrigger, PanelFormLayout, PanelFormRow, PanelLabel, PanelSection, PhoneDisplay, PhoneField, PhoneInput, type PluginLiveMessage, type PluginRuntime, type PluginSession, Popover, PopoverScoped, RadioGroup, RecordList, type RecordListGroup, RecordOpenerProvider, RecordPage, type RecordRef, RecordTable, type RecordTableColumnDef, RecordTableInlineCell, RecordTimeline, type RecordTimelineProps, RelativeDateDisplay, Resizable, ScrollArea, Select, SelectMember, Separator, SexCode, SexDisplay, SexField, Sheet, Sidebar, Skeleton, Slider, Spinner, StringArrayInput, Switch, type TActivityRowProps, type TContactContentType, type TDashboardWidgetPreview, type TListDisplay, type TListFilterField, type TListFilterProps, type TPanelRecordType, type TPropertyInputMeta, type TPropertyInputProps, type TRecordContacts, type TRecordDraftProps, type TRecordSection, type TRecordSectionProps, type TRecordSlotProps, type TRecordTab, type TRelationTab, type TRelationTabProps, TabButton, Table, Tabs, TextField, TextOverflowTooltip, Textarea, ThemeOption, TimeField, Toaster, Toggle, ToggleGroup, Tooltip, Upload, ViewBar, addPluginStyles, badgeVariants, buttonVariants, cn, companyTitle, customerTitle, editorText, formatPhoneNumber, formatter, getPluginAssetsUrl, getPluginRuntime, isUndefinedOrNull, jsonOf, localTimeZone, memberName, pluginFetch, pluginJson, readImage, setFileStorage, setListFilter, setPluginRuntime, setRecordPage, setRecordTimeline, stored, storedFamily, themeState, toIsoDay, toast, useConfirm, useFilterContext, useFormat, useListDisplay, useListFilterParams, useLiveSignal, useMembersById, useOpenRecord, usePageHotkey, usePanelExpanded, usePreviousHotkeyScope, useScopedHotkeys, useToast, useUpload, zoneOffset };
131
+ export { Accordion, Alert, AlertDialog, AppLayout, AppLayoutFooterLink, Avatar, type AvatarProps, BackgroundGradientAnimation, Badge, type BadgeProps, Breadcrumb, Button, type ButtonProps, Calendar, type CalendarProps, Card, type ChartConfig, ChartContainer, ChartLegendContent, ChartTooltipContent, Checkbox, ChoiceboxGroup, Collapsible, ColorPicker, Combobox, Command, CommandBar, type CompanyContact, ConditionsEditor, ContactLink, type ContactQueries, ContextMenu, CopyText, type CustomerContact, DateInput, DatePicker, Dialog, DisplayMenu, DragHandle, DropdownMenu, Editor, EmailDisplay, EmailListField, Empty, EntityPicker, EnumCursorDirection, type FileStorageAdapter, Filter, Form, FullNameField, FullNameValue, HoverCard, type IUIConfig, IconComponent, IconPicker, IconTip, IconsProvider, InfoCard, Input, InputGroup, Kbd, LANGUAGES, Label, ListFilter, LookupPicker, type Member, MemberInline, type MemberQueries, type MultiSelectOption, MultipleSelector, NavigationMenuLinkItem, NumberField, PageContainer, PageHeader, PageSubHeader, PanelDescriptionEditor, PanelDescriptionField, PanelExpansionContext, PanelField, PanelFieldTrigger, PanelFormLayout, PanelFormRow, PanelLabel, PanelSection, PhoneDisplay, PhoneField, PhoneInput, type PluginLiveMessage, type PluginRuntime, type PluginSession, Popover, PopoverScoped, RadioGroup, RecordList, type RecordListGroup, RecordOpenerProvider, RecordPage, type RecordRef, RecordTable, type RecordTableColumnDef, RecordTableInlineCell, RecordTimeline, type RecordTimelineProps, RelativeDateDisplay, Resizable, ScrollArea, Select, SelectMember, Separator, SexCode, SexDisplay, SexField, Sheet, Sidebar, Skeleton, Slider, Spinner, StringArrayInput, Switch, type TActivityRowProps, type TConditionField, type TConditionGroup, type TConditionLookups, type TConditionRule, type TContactContentType, type TDashboardWidgetPreview, type TListDisplay, type TListFilterField, type TListFilterProps, type TPanelRecordType, type TPropertyInputMeta, type TPropertyInputProps, type TRecordContacts, type TRecordDraftProps, type TRecordSection, type TRecordSectionProps, type TRecordSlotProps, type TRecordTab, type TRelationTab, type TRelationTabProps, TabButton, Table, Tabs, type Tag, type TagsQuery, TextField, TextOverflowTooltip, Textarea, ThemeOption, TimeField, Toaster, Toggle, ToggleGroup, Tooltip, Upload, ViewBar, addPluginStyles, amountStep, badgeVariants, buttonVariants, cn, companyTitle, customerTitle, editorText, formatMoney, formatPhoneNumber, formatter, fromAmountInput, getPluginAssetsUrl, getPluginRuntime, isRule, isUndefinedOrNull, jsonOf, listFilterQuery, localTimeZone, memberName, oneOf, pluginFetch, pluginJson, readImage, setFileStorage, setPluginRuntime, setRecordPage, setRecordTimeline, stored, storedFamily, textOf, themeState, toAmountInput, toIsoDay, toast, useConfirm, useFilterContext, useFormat, useItemKeys, useListDisplay, useListFilterParams, useLiveSignal, useMemberOptions, useMembersById, useMoney, useOpenRecord, usePageHotkey, usePanelExpanded, usePreviousHotkeyScope, useScopedHotkeys, useTagOptions, useToast, useUpload, zoneOffset };
package/dist/index.js CHANGED
@@ -54,12 +54,15 @@ import { Toggle } from "./components/toggle.js";
54
54
  import { Tooltip } from "./components/tooltip.js";
55
55
  import { Upload } from "./components/upload.js";
56
56
  import { useConfirm } from "./hooks/use-confirm.js";
57
+ import { useItemKeys } from "./hooks/use-item-keys.js";
57
58
  import { usePageHotkey } from "./hooks/use-page-hotkey.js";
58
59
  import { toast, useToast } from "./hooks/use-toast.js";
59
60
  import { useUpload } from "./hooks/use-upload.js";
60
61
  import { cn } from "./lib/utils.js";
61
62
  import { LANGUAGES, formatter, localTimeZone, toIsoDay, useFormat, zoneOffset } from "./lib/format.js";
63
+ import { amountStep, formatMoney, fromAmountInput, toAmountInput, useMoney } from "./lib/money.js";
62
64
  import { stored, storedFamily } from "./lib/stored.js";
65
+ import { oneOf, textOf } from "./lib/text.js";
63
66
  import { Editor } from "./modules/blocks/components/LazyEditor.js";
64
67
  import { editorText } from "./modules/blocks/utils/parseBlocks.js";
65
68
  import { EmailDisplay } from "./modules/display/components/EmailDisplay.js";
@@ -85,6 +88,7 @@ import { NavigationMenuLinkItem } from "./modules/navigation-menu/components/Nav
85
88
  import { EntityPicker } from "./modules/pickers/EntityPicker.js";
86
89
  import { memberName, useMembersById } from "./modules/pickers/members.js";
87
90
  import { MemberInline, SelectMember } from "./modules/pickers/SelectMember.js";
91
+ import { LookupPicker, useMemberOptions, useTagOptions } from "./modules/pickers/LookupPicker.js";
88
92
  import { NumberField } from "./modules/record-field/components/NumberField.js";
89
93
  import { TextField } from "./modules/record-field/components/TextField.js";
90
94
  import { PhoneInput } from "./modules/record-field/meta-inputs/components/PhoneInput.js";
@@ -93,7 +97,10 @@ import { RecordTable } from "./modules/record-table/components/RecordTable.js";
93
97
  import { RecordTableInlineCell } from "./modules/record-table/components/RecordTableCellInline.js";
94
98
  import { EnumCursorDirection } from "./modules/record-table/types/RecordTableCursorTypes.js";
95
99
  import { DisplayMenu, useListDisplay } from "./modules/list/DisplayMenu.js";
96
- import { ListFilter, setListFilter, useListFilterParams } from "./modules/list/ListFilter.js";
100
+ import { ListFilter, useListFilterParams } from "./modules/list/ListFilter.js";
101
+ import { listFilterQuery } from "./modules/list/filter/listFilterQuery.js";
102
+ import { isRule } from "./modules/conditions/conditions.js";
103
+ import { ConditionsEditor } from "./modules/conditions/LazyConditionsEditor.js";
97
104
  import { ViewBar } from "./modules/list/ViewBar.js";
98
105
  import { PanelDescriptionEditor } from "./modules/record-panel/PanelDescriptionEditor.js";
99
106
  import { PanelDescriptionField } from "./modules/record-panel/PanelDescriptionField.js";
@@ -116,4 +123,4 @@ import { jsonOf } from "./utils/json.js";
116
123
  import { getPluginRuntime, pluginFetch, pluginJson, setPluginRuntime, useLiveSignal } from "./utils/plugin-runtime.js";
117
124
  import { addPluginStyles } from "./utils/plugin-styles.js";
118
125
  import { RecordTimeline, setRecordTimeline } from "./utils/record-timeline.js";
119
- export { Accordion, Alert, AlertDialog, AppLayout, AppLayoutFooterLink, Avatar, BackgroundGradientAnimation, Badge, Breadcrumb, Button, Calendar, Card, ChartContainer, ChartLegendContent, ChartTooltipContent, Checkbox, ChoiceboxGroup, Collapsible, ColorPicker, Combobox, Command, CommandBar, ContactLink, ContextMenu, CopyText, DateInput, DatePicker, Dialog, DisplayMenu, DragHandle, DropdownMenu, Editor, EmailDisplay, EmailListField, Empty, EntityPicker, EnumCursorDirection, Filter, Form, FullNameField, FullNameValue, HoverCard, IconComponent, IconPicker, IconTip, IconsProvider, InfoCard, Input, InputGroup, Kbd, LANGUAGES, Label, ListFilter, MemberInline, MultipleSelector, NavigationMenuLinkItem, NumberField, PageContainer, PageHeader, PageSubHeader, PanelDescriptionEditor, PanelDescriptionField, PanelExpansionContext, PanelField, PanelFieldTrigger, PanelFormLayout, PanelFormRow, PanelLabel, PanelSection, PhoneDisplay, PhoneField, PhoneInput, Popover, PopoverScoped, RadioGroup, RecordList, RecordOpenerProvider, RecordPage, RecordTable, RecordTableInlineCell, RecordTimeline, RelativeDateDisplay, Resizable, ScrollArea, Select, SelectMember, Separator, SexCode, SexDisplay, SexField, Sheet, Sidebar, Skeleton, Slider, Spinner, StringArrayInput, Switch, TabButton, Table, Tabs, TextField, TextOverflowTooltip, Textarea, ThemeOption, TimeField, Toaster, Toggle, ToggleGroup, Tooltip, Upload, ViewBar, addPluginStyles, badgeVariants, buttonVariants, cn, companyTitle, customerTitle, editorText, formatPhoneNumber, formatter, getPluginAssetsUrl, getPluginRuntime, isUndefinedOrNull, jsonOf, localTimeZone, memberName, pluginFetch, pluginJson, readImage, setFileStorage, setListFilter, setPluginRuntime, setRecordPage, setRecordTimeline, stored, storedFamily, themeState, toIsoDay, toast, useConfirm, useFilterContext, useFormat, useListDisplay, useListFilterParams, useLiveSignal, useMembersById, useOpenRecord, usePageHotkey, usePanelExpanded, usePreviousHotkeyScope, useScopedHotkeys, useToast, useUpload, zoneOffset };
126
+ export { Accordion, Alert, AlertDialog, AppLayout, AppLayoutFooterLink, Avatar, BackgroundGradientAnimation, Badge, Breadcrumb, Button, Calendar, Card, ChartContainer, ChartLegendContent, ChartTooltipContent, Checkbox, ChoiceboxGroup, Collapsible, ColorPicker, Combobox, Command, CommandBar, ConditionsEditor, ContactLink, ContextMenu, CopyText, DateInput, DatePicker, Dialog, DisplayMenu, DragHandle, DropdownMenu, Editor, EmailDisplay, EmailListField, Empty, EntityPicker, EnumCursorDirection, Filter, Form, FullNameField, FullNameValue, HoverCard, IconComponent, IconPicker, IconTip, IconsProvider, InfoCard, Input, InputGroup, Kbd, LANGUAGES, Label, ListFilter, LookupPicker, MemberInline, MultipleSelector, NavigationMenuLinkItem, NumberField, PageContainer, PageHeader, PageSubHeader, PanelDescriptionEditor, PanelDescriptionField, PanelExpansionContext, PanelField, PanelFieldTrigger, PanelFormLayout, PanelFormRow, PanelLabel, PanelSection, PhoneDisplay, PhoneField, PhoneInput, Popover, PopoverScoped, RadioGroup, RecordList, RecordOpenerProvider, RecordPage, RecordTable, RecordTableInlineCell, RecordTimeline, RelativeDateDisplay, Resizable, ScrollArea, Select, SelectMember, Separator, SexCode, SexDisplay, SexField, Sheet, Sidebar, Skeleton, Slider, Spinner, StringArrayInput, Switch, TabButton, Table, Tabs, TextField, TextOverflowTooltip, Textarea, ThemeOption, TimeField, Toaster, Toggle, ToggleGroup, Tooltip, Upload, ViewBar, addPluginStyles, amountStep, badgeVariants, buttonVariants, cn, companyTitle, customerTitle, editorText, formatMoney, formatPhoneNumber, formatter, fromAmountInput, getPluginAssetsUrl, getPluginRuntime, isRule, isUndefinedOrNull, jsonOf, listFilterQuery, localTimeZone, memberName, oneOf, pluginFetch, pluginJson, readImage, setFileStorage, setPluginRuntime, setRecordPage, setRecordTimeline, stored, storedFamily, textOf, themeState, toAmountInput, toIsoDay, toast, useConfirm, useFilterContext, useFormat, useItemKeys, useListDisplay, useListFilterParams, useLiveSignal, useMemberOptions, useMembersById, useMoney, useOpenRecord, usePageHotkey, usePanelExpanded, usePreviousHotkeyScope, useScopedHotkeys, useTagOptions, useToast, useUpload, zoneOffset };
@@ -26,6 +26,8 @@ export declare const formatter: (language: string) => {
26
26
  /** An amount in the currency's main unit: 1500 MNT → "MNT 1,500.00". */
27
27
  currency: (value: number, currency: string) => string;
28
28
  };
29
+ /** How many decimals a currency has (USD and MNT 2, JPY 0, KWD 3). */
30
+ export declare const currencyDigits: (currency: string) => number;
29
31
  /** The formatters in the UI's language; a component using them re-renders when it changes. */
30
32
  export declare const useFormat: () => {
31
33
  /** A date in a date-fns pattern; `PP` by default ("Nov 14, 2026"). */
@@ -49,6 +49,11 @@ const formatter = (language) => {
49
49
  }).format(value)
50
50
  };
51
51
  };
52
+ /** How many decimals a currency has (USD and MNT 2, JPY 0, KWD 3). */
53
+ const currencyDigits = (currency) => new Intl.NumberFormat("en", {
54
+ style: "currency",
55
+ currency
56
+ }).resolvedOptions().maximumFractionDigits ?? 2;
52
57
  /** The formatters in the UI's language; a component using them re-renders when it changes. */
53
58
  const useFormat = () => formatter(useTranslation().i18n.language);
54
59
  /** A local day as stored and typed, `yyyy-MM-dd`, the same in every language. */
@@ -72,4 +77,4 @@ const zoneOffset = (zone) => {
72
77
  return "";
73
78
  }
74
79
  };
75
- export { LANGUAGES, formatter, localTimeZone, toIsoDay, useFormat, zoneOffset };
80
+ export { LANGUAGES, currencyDigits, formatter, localTimeZone, toIsoDay, useFormat, zoneOffset };
@@ -0,0 +1,10 @@
1
+ /** An amount as people read it in `language`: 150000 MNT → "MNT 1,500.00". */
2
+ export declare const formatMoney: (amount: number, currency: string, language: string) => string;
3
+ /** An amount for a number input, with all of the currency's decimals: 1250 USD → "12.50", 500 JPY → "500". */
4
+ export declare const toAmountInput: (amount: number, currency: string) => string;
5
+ /** What was typed in a number input, in the smallest unit: "12.5" USD → 1250. */
6
+ export declare const fromAmountInput: (text: string, currency: string) => number;
7
+ /** The smallest step a number input takes for a currency: 0.01 for USD, 1 for JPY. */
8
+ export declare const amountStep: (currency: string) => number;
9
+ /** `formatMoney` in the UI's language. */
10
+ export declare const useMoney: () => (amount: number, currency: string) => string;
@@ -0,0 +1,18 @@
1
+ import { currencyDigits, formatter } from "./format.js";
2
+ import { useTranslation } from "react-i18next";
3
+ // src/lib/money.ts
4
+ const unit = (currency) => 10 ** currencyDigits(currency);
5
+ /** An amount as people read it in `language`: 150000 MNT → "MNT 1,500.00". */
6
+ const formatMoney = (amount, currency, language) => formatter(language).currency(amount / unit(currency), currency);
7
+ /** An amount for a number input, with all of the currency's decimals: 1250 USD → "12.50", 500 JPY → "500". */
8
+ const toAmountInput = (amount, currency) => (amount / unit(currency)).toFixed(currencyDigits(currency));
9
+ /** What was typed in a number input, in the smallest unit: "12.5" USD → 1250. */
10
+ const fromAmountInput = (text, currency) => Math.round(Number(text) * unit(currency));
11
+ /** The smallest step a number input takes for a currency: 0.01 for USD, 1 for JPY. */
12
+ const amountStep = (currency) => 1 / unit(currency);
13
+ /** `formatMoney` in the UI's language. */
14
+ const useMoney = () => {
15
+ const { i18n } = useTranslation();
16
+ return (amount, currency) => formatMoney(amount, currency, i18n.language);
17
+ };
18
+ export { amountStep, formatMoney, fromAmountInput, toAmountInput, useMoney };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * A stored value of any JSON shape as text: strings as they are, numbers and
3
+ * booleans printed, objects and arrays as JSON, nothing as ''.
4
+ */
5
+ export declare const textOf: (value: unknown) => string;
6
+ /** `value` when it is one of `options` (a select's string as its union type), else undefined. */
7
+ export declare const oneOf: <T extends string>(options: readonly T[], value: string | null) => T | undefined;
@@ -0,0 +1,14 @@
1
+ // src/lib/text.ts
2
+ /**
3
+ * A stored value of any JSON shape as text: strings as they are, numbers and
4
+ * booleans printed, objects and arrays as JSON, nothing as ''.
5
+ */
6
+ const textOf = (value) => {
7
+ if (value === null || value === void 0) return "";
8
+ if (typeof value === "string") return value;
9
+ if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") return value.toString();
10
+ return JSON.stringify(value) ?? "";
11
+ };
12
+ /** `value` when it is one of `options` (a select's string as its union type), else undefined. */
13
+ const oneOf = (options, value) => options.find((option) => option === value);
14
+ export { oneOf, textOf };
@@ -0,0 +1,10 @@
1
+ import { TConditionField, TConditionLookups, TConditionRule } from "./conditions.js";
2
+ type ValueProps = TConditionLookups & {
3
+ rule: TConditionRule;
4
+ field?: TConditionField;
5
+ onChange: (value: unknown) => void;
6
+ disabled?: boolean;
7
+ };
8
+ /** The value side of a rule, shaped by the operator and the field's type. */
9
+ export declare const ConditionValueInput: (props: ValueProps) => import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,166 @@
1
+ import { Input } from "../../components/input.js";
2
+ import { Select } from "../../components/select.js";
3
+ import { amountStep, fromAmountInput, toAmountInput } from "../../lib/money.js";
4
+ import { oneOf, textOf } from "../../lib/text.js";
5
+ import { LookupPicker, useMemberOptions, useTagOptions } from "../pickers/LookupPicker.js";
6
+ import { LIST_VALUE, RELATIVE, RELATIVE_UNITS } from "./conditions.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { useState } from "react";
9
+ import { z } from "zod";
10
+ import { useTranslation } from "react-i18next";
11
+ // src/modules/conditions/ConditionValueInput.tsx
12
+ /** What the rule holds so far: a half-typed amount is still shown. */
13
+ const RelativeValue = z.object({
14
+ amount: z.number().optional(),
15
+ unit: z.enum(RELATIVE_UNITS).optional()
16
+ });
17
+ const RelativeInput = ({ rule, onChange, disabled }) => {
18
+ const { t } = useTranslation("automations");
19
+ const current = RelativeValue.safeParse(rule.value).data ?? {};
20
+ return /* @__PURE__ */ jsxs("div", {
21
+ className: "flex w-full items-center gap-1",
22
+ children: [/* @__PURE__ */ jsx(Input, {
23
+ className: "h-8 w-20",
24
+ type: "number",
25
+ min: 0,
26
+ disabled,
27
+ value: current.amount ?? "",
28
+ onChange: (event) => onChange({
29
+ unit: "days",
30
+ ...current,
31
+ amount: Math.max(0, Number(event.target.value) || 0)
32
+ })
33
+ }), rule.op === "anniversary_within" ? /* @__PURE__ */ jsx("span", {
34
+ className: "text-sm text-muted-foreground",
35
+ children: t("days", "days")
36
+ }) : /* @__PURE__ */ jsxs(Select, {
37
+ value: current.unit ?? "days",
38
+ disabled,
39
+ onValueChange: (next) => {
40
+ const unit = oneOf(RELATIVE_UNITS, next);
41
+ if (unit) onChange({
42
+ amount: 0,
43
+ ...current,
44
+ unit
45
+ });
46
+ },
47
+ children: [/* @__PURE__ */ jsx(Select.Trigger, {
48
+ className: "h-8 w-28 shrink-0",
49
+ children: /* @__PURE__ */ jsx(Select.Value, {})
50
+ }), /* @__PURE__ */ jsx(Select.Content, { children: RELATIVE_UNITS.map((unit) => /* @__PURE__ */ jsx(Select.Item, {
51
+ value: unit,
52
+ children: t(unit, unit)
53
+ }, unit)) })]
54
+ })]
55
+ });
56
+ };
57
+ /** A team member ("me" first) or a tag of the subject. */
58
+ const LookupInput = ({ rule, field, onChange, disabled, ...lookups }) => {
59
+ const { t } = useTranslation("automations");
60
+ const isMember = field?.type === "member";
61
+ const value = textOf(rule.value);
62
+ const members = useMemberOptions(lookups.members, isMember, value ? [value] : []);
63
+ const tags = useTagOptions(lookups.tags, !isMember);
64
+ const lookup = isMember ? members : tags;
65
+ return /* @__PURE__ */ jsx(LookupPicker, {
66
+ lookup: isMember ? {
67
+ ...lookup,
68
+ options: [{
69
+ value: "me",
70
+ label: t("me", "Me")
71
+ }, ...lookup.options]
72
+ } : lookup,
73
+ value: value ? [value] : [],
74
+ onValueChange: ([next]) => onChange(next ?? ""),
75
+ disabled,
76
+ placeholder: t("choose", "Choose…"),
77
+ className: "h-8 w-full min-w-0"
78
+ });
79
+ };
80
+ const ListInput = ({ rule, onChange, disabled }) => {
81
+ const { t } = useTranslation("automations");
82
+ return /* @__PURE__ */ jsx(Input, {
83
+ className: "h-8 w-full min-w-0",
84
+ disabled,
85
+ placeholder: t("list-placeholder", "a, b, c"),
86
+ value: Array.isArray(rule.value) ? rule.value.join(", ") : textOf(rule.value),
87
+ onChange: (event) => onChange(event.target.value.split(",").map((item) => item.trim()).filter(Boolean))
88
+ });
89
+ };
90
+ const BooleanInput = ({ rule, onChange, disabled }) => {
91
+ const { t } = useTranslation("automations");
92
+ return /* @__PURE__ */ jsxs(Select, {
93
+ value: textOf(rule.value ?? "true"),
94
+ onValueChange: (value) => onChange(value === "true"),
95
+ disabled,
96
+ children: [/* @__PURE__ */ jsx(Select.Trigger, {
97
+ className: "h-8 w-28 shrink-0",
98
+ children: /* @__PURE__ */ jsx(Select.Value, {})
99
+ }), /* @__PURE__ */ jsxs(Select.Content, { children: [/* @__PURE__ */ jsx(Select.Item, {
100
+ value: "true",
101
+ children: t("yes", "yes")
102
+ }), /* @__PURE__ */ jsx(Select.Item, {
103
+ value: "false",
104
+ children: t("no", "no")
105
+ })] })]
106
+ });
107
+ };
108
+ const OptionInput = ({ rule, options, onChange, disabled }) => /* @__PURE__ */ jsxs(Select, {
109
+ value: textOf(rule.value),
110
+ onValueChange: onChange,
111
+ disabled,
112
+ children: [/* @__PURE__ */ jsx(Select.Trigger, {
113
+ className: "h-8 w-full min-w-0",
114
+ children: /* @__PURE__ */ jsx(Select.Value, {})
115
+ }), /* @__PURE__ */ jsx(Select.Content, { children: options.map((option) => /* @__PURE__ */ jsx(Select.Item, {
116
+ value: option,
117
+ children: option
118
+ }, option)) })]
119
+ });
120
+ const TextInput = ({ rule, field, onChange, disabled }) => {
121
+ const { t } = useTranslation("automations");
122
+ return /* @__PURE__ */ jsx(Input, {
123
+ className: "h-8 w-full min-w-0",
124
+ type: field?.type === "date" ? "date" : field?.type === "number" ? "number" : "text",
125
+ disabled,
126
+ placeholder: t("value-placeholder", "value"),
127
+ value: textOf(rule.value),
128
+ onChange: (event) => onChange(field?.type === "number" ? Number(event.target.value) : event.target.value)
129
+ });
130
+ };
131
+ /** An amount typed in the currency's major unit (12.50), kept in its smallest (1250); the text is kept while typing. */
132
+ const MoneyInput = ({ rule, onChange, disabled, currency }) => {
133
+ const { t } = useTranslation("automations");
134
+ const stored = Number(rule.value);
135
+ const [text, setText] = useState(rule.value === void 0 || !Number.isFinite(stored) ? "" : toAmountInput(stored, currency));
136
+ return /* @__PURE__ */ jsx(Input, {
137
+ className: "h-8 w-full min-w-0",
138
+ type: "number",
139
+ step: amountStep(currency),
140
+ disabled,
141
+ placeholder: t("value-placeholder", "value"),
142
+ value: text,
143
+ onChange: (event) => {
144
+ setText(event.target.value);
145
+ onChange(fromAmountInput(event.target.value, currency));
146
+ }
147
+ });
148
+ };
149
+ /** The value side of a rule, shaped by the operator and the field's type. */
150
+ const ConditionValueInput = (props) => {
151
+ const { rule, field } = props;
152
+ if (RELATIVE.has(rule.op)) return /* @__PURE__ */ jsx(RelativeInput, { ...props });
153
+ if (field?.currency && field.type === "number" && !LIST_VALUE.has(rule.op)) return /* @__PURE__ */ jsx(MoneyInput, {
154
+ ...props,
155
+ currency: field.currency
156
+ });
157
+ if (LIST_VALUE.has(rule.op)) return /* @__PURE__ */ jsx(ListInput, { ...props });
158
+ if (field?.type === "member" || field?.type === "tags") return /* @__PURE__ */ jsx(LookupInput, { ...props });
159
+ if (field?.type === "boolean") return /* @__PURE__ */ jsx(BooleanInput, { ...props });
160
+ if (field?.options?.length) return /* @__PURE__ */ jsx(OptionInput, {
161
+ ...props,
162
+ options: field.options
163
+ });
164
+ return /* @__PURE__ */ jsx(TextInput, { ...props });
165
+ };
166
+ export { ConditionValueInput };
@@ -0,0 +1,11 @@
1
+ import { TConditionField, TConditionGroup, TConditionLookups } from "./conditions.js";
2
+ /**
3
+ * Conditions: rows "<field> <operator> <value>", all or any, with nested groups, on `fields`
4
+ * (grouped in the picker when they have a `group`); `members` and `tags` feed their pickers.
5
+ */
6
+ export declare const ConditionsEditor: ({ value, onChange, disabled, fields, ...lookups }: TConditionLookups & {
7
+ value: TConditionGroup | undefined;
8
+ onChange: (next: TConditionGroup | undefined) => void;
9
+ disabled?: boolean;
10
+ fields: TConditionField[];
11
+ }) => import("react").JSX.Element;
@@ -0,0 +1,209 @@
1
+ import { Button } from "../../components/button.js";
2
+ import { Select } from "../../components/select.js";
3
+ import { useItemKeys } from "../../hooks/use-item-keys.js";
4
+ import { oneOf } from "../../lib/text.js";
5
+ import { cn } from "../../lib/utils.js";
6
+ import { CONDITION_OPERATORS, NO_VALUE, OPERATOR_LABELS, isRule, operatorsFor, withOperator } from "./conditions.js";
7
+ import { ConditionValueInput } from "./ConditionValueInput.js";
8
+ import { PathPicker } from "./PathPicker.js";
9
+ import { IconBraces, IconPlus, IconX } from "@tabler/icons-react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { useTranslation } from "react-i18next";
12
+ // src/modules/conditions/ConditionsEditor.tsx
13
+ /** Field and operator side by side, remove at the end; the value takes its own full line. */
14
+ const RuleRow = ({ rule, fields, disabled, lookups, onChange, onRemove }) => {
15
+ const { t } = useTranslation("automations");
16
+ const field = fields.find((one) => one.path === rule.path);
17
+ return /* @__PURE__ */ jsxs("div", {
18
+ className: "grid grid-cols-condition items-center gap-2",
19
+ children: [
20
+ /* @__PURE__ */ jsx(PathPicker, {
21
+ value: rule.path,
22
+ fields,
23
+ disabled,
24
+ onChange: (path) => onChange(fields.find((one) => one.path === path)?.type === field?.type ? {
25
+ ...rule,
26
+ path
27
+ } : {
28
+ ...rule,
29
+ path,
30
+ value: void 0
31
+ })
32
+ }),
33
+ /* @__PURE__ */ jsxs(Select, {
34
+ value: rule.op,
35
+ onValueChange: (next) => {
36
+ const op = oneOf(CONDITION_OPERATORS, next);
37
+ if (op) onChange(withOperator(rule, op));
38
+ },
39
+ disabled,
40
+ children: [/* @__PURE__ */ jsx(Select.Trigger, {
41
+ className: "h-8 w-full min-w-0",
42
+ "aria-label": t("operator", "Operator"),
43
+ children: /* @__PURE__ */ jsx(Select.Value, {})
44
+ }), /* @__PURE__ */ jsx(Select.Content, { children: operatorsFor(field?.type).map((op) => /* @__PURE__ */ jsx(Select.Item, {
45
+ value: op,
46
+ children: t(`op.${op}`, OPERATOR_LABELS[op])
47
+ }, op)) })]
48
+ }),
49
+ /* @__PURE__ */ jsx(Button, {
50
+ size: "icon",
51
+ variant: "ghost",
52
+ tone: "muted",
53
+ className: "size-8",
54
+ disabled,
55
+ onClick: onRemove,
56
+ "aria-label": t("remove", "Remove"),
57
+ children: /* @__PURE__ */ jsx(IconX, { className: "size-4" })
58
+ }),
59
+ !NO_VALUE.has(rule.op) && /* @__PURE__ */ jsx("div", {
60
+ className: "col-span-2 flex min-w-0",
61
+ children: /* @__PURE__ */ jsx(ConditionValueInput, {
62
+ rule,
63
+ field,
64
+ disabled,
65
+ ...lookups,
66
+ onChange: (value) => onChange({
67
+ ...rule,
68
+ value
69
+ })
70
+ })
71
+ })
72
+ ]
73
+ });
74
+ };
75
+ const MatchSelect = ({ group, onChange, onRemove, disabled }) => {
76
+ const { t } = useTranslation("automations");
77
+ return /* @__PURE__ */ jsxs("div", {
78
+ className: "flex items-center gap-2 text-sm",
79
+ children: [
80
+ /* @__PURE__ */ jsx("span", { children: t("match-prefix", "Match") }),
81
+ /* @__PURE__ */ jsxs(Select, {
82
+ value: group.match,
83
+ onValueChange: (match) => onChange({
84
+ ...group,
85
+ match: match === "any" ? "any" : "all"
86
+ }),
87
+ disabled,
88
+ children: [/* @__PURE__ */ jsx(Select.Trigger, {
89
+ className: "h-8 w-24",
90
+ "aria-label": t("match-prefix", "Match"),
91
+ children: /* @__PURE__ */ jsx(Select.Value, {})
92
+ }), /* @__PURE__ */ jsxs(Select.Content, { children: [/* @__PURE__ */ jsx(Select.Item, {
93
+ value: "all",
94
+ children: t("match-all", "all")
95
+ }), /* @__PURE__ */ jsx(Select.Item, {
96
+ value: "any",
97
+ children: t("match-any", "any")
98
+ })] })]
99
+ }),
100
+ /* @__PURE__ */ jsx("span", { children: t("match-suffix", "of these") }),
101
+ onRemove && /* @__PURE__ */ jsx(Button, {
102
+ size: "sm",
103
+ variant: "ghost",
104
+ className: "ml-auto",
105
+ disabled,
106
+ onClick: onRemove,
107
+ children: /* @__PURE__ */ jsx(IconX, {})
108
+ })
109
+ ]
110
+ });
111
+ };
112
+ const AddButtons = ({ newRule, newGroup, disabled, onAdd }) => {
113
+ const { t } = useTranslation("automations");
114
+ return /* @__PURE__ */ jsxs("div", {
115
+ className: "flex gap-2",
116
+ children: [/* @__PURE__ */ jsxs(Button, {
117
+ size: "sm",
118
+ variant: "outline",
119
+ disabled,
120
+ onClick: () => onAdd(newRule),
121
+ children: [/* @__PURE__ */ jsx(IconPlus, {}), t("add-condition", "Add condition")]
122
+ }), newGroup && /* @__PURE__ */ jsxs(Button, {
123
+ size: "sm",
124
+ variant: "ghost",
125
+ disabled,
126
+ onClick: () => onAdd(newGroup),
127
+ children: [/* @__PURE__ */ jsx(IconBraces, {}), t("add-group", "Add group")]
128
+ })]
129
+ });
130
+ };
131
+ /** One group: "all"/"any" of its rules and nested groups (up to three levels). */
132
+ const GroupEditor = ({ group, onChange, onRemove, fields, disabled, depth, lookups }) => {
133
+ const keys = useItemKeys(group.rules.length);
134
+ const update = (index, rule) => onChange({
135
+ ...group,
136
+ rules: group.rules.map((item, at) => at === index ? rule : item)
137
+ });
138
+ const remove = (index) => {
139
+ keys.removed(index);
140
+ onChange({
141
+ ...group,
142
+ rules: group.rules.filter((_, at) => at !== index)
143
+ });
144
+ };
145
+ const add = (rule) => {
146
+ keys.added();
147
+ onChange({
148
+ ...group,
149
+ rules: [...group.rules, rule]
150
+ });
151
+ };
152
+ return /* @__PURE__ */ jsxs("div", {
153
+ className: cn("space-y-2", depth > 0 && "rounded-md border border-dashed p-2"),
154
+ children: [
155
+ /* @__PURE__ */ jsx(MatchSelect, {
156
+ group,
157
+ onChange,
158
+ onRemove,
159
+ disabled
160
+ }),
161
+ group.rules.map((rule, index) => isRule(rule) ? /* @__PURE__ */ jsx(RuleRow, {
162
+ rule,
163
+ fields,
164
+ disabled,
165
+ lookups,
166
+ onChange: (next) => update(index, next),
167
+ onRemove: () => remove(index)
168
+ }, keys.keyAt(index)) : /* @__PURE__ */ jsx(GroupEditor, {
169
+ group: rule,
170
+ fields,
171
+ disabled,
172
+ lookups,
173
+ depth: depth + 1,
174
+ onChange: (next) => update(index, next),
175
+ onRemove: () => remove(index)
176
+ }, keys.keyAt(index))),
177
+ /* @__PURE__ */ jsx(AddButtons, {
178
+ newRule: {
179
+ path: fields[3]?.path ?? "subject.primaryEmail",
180
+ op: "exists"
181
+ },
182
+ newGroup: depth < 2 ? {
183
+ match: group.match === "all" ? "any" : "all",
184
+ rules: []
185
+ } : null,
186
+ disabled,
187
+ onAdd: add
188
+ })
189
+ ]
190
+ });
191
+ };
192
+ /**
193
+ * Conditions: rows "<field> <operator> <value>", all or any, with nested groups, on `fields`
194
+ * (grouped in the picker when they have a `group`); `members` and `tags` feed their pickers.
195
+ */
196
+ const ConditionsEditor = ({ value, onChange, disabled, fields, ...lookups }) => {
197
+ return /* @__PURE__ */ jsx(GroupEditor, {
198
+ group: value ?? {
199
+ match: "all",
200
+ rules: []
201
+ },
202
+ fields,
203
+ disabled,
204
+ lookups,
205
+ depth: 0,
206
+ onChange: (next) => onChange(next.rules.length ? next : void 0)
207
+ });
208
+ };
209
+ export { ConditionsEditor };
@@ -0,0 +1,9 @@
1
+ import { ConditionsEditor as ConditionsEditor$1 } from "./ConditionsEditor.js";
2
+ import { ComponentProps } from "react";
3
+ declare const Editor: import("react").LazyExoticComponent<typeof ConditionsEditor$1>;
4
+ /**
5
+ * The condition editor, fetched the first time one renders: erxes-ui is one shared chunk every
6
+ * route loads, and only automations and a list's advanced filter edit conditions.
7
+ */
8
+ export declare const ConditionsEditor: (props: ComponentProps<typeof Editor>) => import("react").JSX.Element;
9
+ export {};