@erxes/ui 3.3.3 → 3.3.5-next.1
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/LICENSE.md +672 -0
- package/chunks/chunk-AHUBVFX5.js +63 -0
- package/components/choicebox-group.js +1 -1
- package/components/collapsible.js +1 -1
- package/components/color-picker.js +1 -1
- package/components/index.js +1 -1
- package/components/multiselect.js +1 -1
- package/components/string-array.js +1 -3
- package/components/upload.js +1 -1
- package/hooks/index.js +1 -1
- package/hooks/use-confirm.js +1 -1
- package/hooks/use-upload.js +1 -1
- package/index.js +1 -1
- package/modules/attachments/attachments.js +1 -1
- package/modules/attachments/index.js +1 -1
- package/modules/blocks/components/BarcodeAttribute.js +1 -1
- package/modules/blocks/components/BlockEditor.js +1 -1
- package/modules/blocks/components/BlockEditorReadOnly.js +1 -1
- package/modules/blocks/components/CustomFileBlock.js +1 -1
- package/modules/blocks/components/CustomImageBlock.js +1 -1
- package/modules/blocks/components/Editor.js +1 -1
- package/modules/blocks/components/GalleryBlock.js +1 -1
- package/modules/blocks/components/ImageStyleButton.js +1 -1
- package/modules/blocks/components/SlashMenu.js +1 -1
- package/modules/blocks/components/SuggestionMenu.js +1 -1
- package/modules/blocks/components/Toolbar.js +1 -1
- package/modules/blocks/components/index.js +1 -1
- package/modules/blocks/components/toolbar/ToolbarContents.js +1 -1
- package/modules/blocks/components/toolbar/buttons/ToolbarButton.js +1 -1
- package/modules/blocks/components/toolbar/buttons/ToolbarToggle.js +1 -1
- package/modules/blocks/components/toolbar/menus/ToolbarMenuItem.js +1 -1
- package/modules/blocks/components/toolbar/menus/ToolbarSelect.js +1 -1
- package/modules/blocks/constant/blockEditorSchema.js +1 -1
- package/modules/blocks/constant/index.js +1 -1
- package/modules/blocks/constant/toolbar/editorUIComponents.js +1 -1
- package/modules/blocks/hooks/toolbar/useToolbarComponents.js +1 -1
- package/modules/blocks/hooks/useBlockEditor.js +1 -1
- package/modules/blocks/index.js +1 -1
- package/modules/board/components/Board.js +1 -1
- package/modules/board/index.js +1 -1
- package/modules/display/components/EmailDisplay.js +1 -1
- package/modules/display/components/PhoneDisplay.js +1 -1
- package/modules/display/components/RelativeDateDisplay.js +1 -1
- package/modules/display/index.js +1 -1
- package/modules/email-editor/components/EmailEditor.js +1 -1
- package/modules/email-editor/components/EmailPreviewDeviceToggle.js +1 -1
- package/modules/email-editor/components/EmailTableBackground.js +1 -1
- package/modules/email-editor/components/EmailTableToolbar.js +1 -1
- package/modules/email-editor/components/index.js +1 -1
- package/modules/email-editor/index.js +1 -1
- package/modules/filter/components/Filter.js +1 -1
- package/modules/filter/date-filter/components/DateFilterCommand.js +1 -1
- package/modules/filter/date-filter/components/DialogDateView.js +1 -1
- package/modules/filter/date-filter/index.js +1 -1
- package/modules/filter/index.js +1 -1
- package/modules/focus-sheet/components/focus-sheet.js +1 -1
- package/modules/hotkey/components/PopoverScoped.js +1 -1
- package/modules/hotkey/index.js +1 -1
- package/modules/icons/components/IconPicker.js +1 -1
- package/modules/icons/index.js +1 -1
- package/modules/index.js +1 -1
- package/modules/inputs/components/CurrencyField.js +1 -1
- package/modules/inputs/components/EmailField.js +1 -1
- package/modules/inputs/components/FullNameField.js +1 -1
- package/modules/inputs/components/LanguageSelect.js +1 -1
- package/modules/inputs/components/PhoneField.js +1 -1
- package/modules/inputs/components/SexField.js +1 -1
- package/modules/inputs/components/TimezoneSelect.js +1 -1
- package/modules/inputs/index.js +1 -1
- package/modules/navigation-menu/components/NavigationMenu.js +1 -1
- package/modules/navigation-menu/index.js +1 -1
- package/modules/preview/components/Preview.js +1 -1
- package/modules/record-field/components/NumberField.js +1 -1
- package/modules/record-field/components/TextField.js +1 -1
- package/modules/record-field/index.js +1 -1
- package/modules/record-field/meta-inputs/components/EmailVerificationInput.js +1 -1
- package/modules/record-field/meta-inputs/components/PhoneInput.js +1 -1
- package/modules/record-field/meta-inputs/components/PhoneVerificationInput.js +1 -1
- package/modules/record-field/meta-inputs/components/TextFieldInput.js +1 -1
- package/modules/record-table/components/MoreColumn.js +1 -1
- package/modules/record-table/components/RecordTableArrowEffect.js +1 -1
- package/modules/record-table/components/RecordTableCell.js +1 -1
- package/modules/record-table/components/RecordTableCellInline.js +1 -1
- package/modules/record-table/components/RecordTableColumnSelector.js +1 -1
- package/modules/record-table/components/RecordTableCursor.js +1 -1
- package/modules/record-table/components/RecordTableHead.js +1 -1
- package/modules/record-table/components/RecordTableHeader.js +1 -1
- package/modules/record-table/components/RecordTableHotkeyCell.js +1 -1
- package/modules/record-table/components/RecordTableRoot.js +1 -1
- package/modules/record-table/components/RecordTableRow.js +1 -1
- package/modules/record-table/components/RecordTableRowList.js +1 -1
- package/modules/record-table/components/RecordTableRowSkeleton.js +1 -1
- package/modules/record-table/components/RecordTableScroll.js +1 -1
- package/modules/record-table/components/RecordTableTree.js +1 -1
- package/modules/record-table/contexts/RecordTableHotkeyContext.js +1 -1
- package/modules/record-table/hooks/usePopoverOnEnter.js +1 -1
- package/modules/record-table/index.js +1 -1
- package/modules/report/components/report-page-container.js +1 -1
- package/modules/report/index.js +1 -1
- package/modules/select-operation/components/SelectOperation.js +1 -1
- package/modules/select-operation/index.js +1 -1
- package/modules/select-tree/components/SelectTree.js +1 -1
- package/modules/select-tree/index.js +1 -1
- package/modules/side-menu/components/SideMenu.js +1 -1
- package/package.json +2 -1
- package/styles.css +1 -1
- package/chunks/chunk-MWRDVBYJ.js +0 -121
package/chunks/chunk-MWRDVBYJ.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
handleStringArrayPaste
|
|
3
|
-
} from "./chunk-WLKDIP4Y.js";
|
|
4
|
-
import {
|
|
5
|
-
Input
|
|
6
|
-
} from "./chunk-KT3H4JCX.js";
|
|
7
|
-
import {
|
|
8
|
-
buttonVariants
|
|
9
|
-
} from "./chunk-DCCZEG7Z.js";
|
|
10
|
-
import {
|
|
11
|
-
cn
|
|
12
|
-
} from "./chunk-KTBDECJI.js";
|
|
13
|
-
|
|
14
|
-
// src/components/string-array.tsx
|
|
15
|
-
import { IconX } from "@tabler/icons-react";
|
|
16
|
-
import { useRef, useState } from "react";
|
|
17
|
-
import { Button, Tag, TagGroup, TagList } from "react-aria-components";
|
|
18
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
function StringArrayInput({
|
|
20
|
-
value,
|
|
21
|
-
onValueChange,
|
|
22
|
-
id,
|
|
23
|
-
placeholder,
|
|
24
|
-
styleClasses,
|
|
25
|
-
onBlur,
|
|
26
|
-
splitOnPaste = false
|
|
27
|
-
}) {
|
|
28
|
-
const [draft, setDraft] = useState("");
|
|
29
|
-
const inputRef = useRef(null);
|
|
30
|
-
const lastTagRef = useRef(null);
|
|
31
|
-
return /* @__PURE__ */ jsxs(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: cn(
|
|
35
|
-
"flex items-center rounded bg-background border-none transition-[color,box-shadow] focus-within:shadow-focus outline-none min-h-8 h-auto p-0 px-1 gap-1 flex-wrap",
|
|
36
|
-
styleClasses?.inlineTagsContainer
|
|
37
|
-
),
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ jsx(
|
|
40
|
-
TagGroup,
|
|
41
|
-
{
|
|
42
|
-
"aria-label": placeholder || "Tags",
|
|
43
|
-
className: "contents",
|
|
44
|
-
onRemove: (keys) => {
|
|
45
|
-
if (inputRef.current?.matches(":disabled"))
|
|
46
|
-
return;
|
|
47
|
-
const nextValue = value.filter((_, index) => !keys.has(index));
|
|
48
|
-
onValueChange(nextValue);
|
|
49
|
-
if (!nextValue.length)
|
|
50
|
-
inputRef.current?.focus();
|
|
51
|
-
},
|
|
52
|
-
children: /* @__PURE__ */ jsx(TagList, { className: "flex flex-wrap gap-1", children: value.map((tag, index) => /* @__PURE__ */ jsxs(
|
|
53
|
-
Tag,
|
|
54
|
-
{
|
|
55
|
-
id: index,
|
|
56
|
-
textValue: tag,
|
|
57
|
-
ref: index === value.length - 1 ? lastTagRef : void 0,
|
|
58
|
-
className: cn(
|
|
59
|
-
"flex items-center h-6 relative bg-background border border-input hover:bg-background rounded-md font-medium text-xs ps-2 pe-5 outline-none data-[focus-visible]:shadow-focus",
|
|
60
|
-
styleClasses?.tag?.body
|
|
61
|
-
),
|
|
62
|
-
children: [
|
|
63
|
-
tag,
|
|
64
|
-
/* @__PURE__ */ jsx(
|
|
65
|
-
Button,
|
|
66
|
-
{
|
|
67
|
-
slot: "remove",
|
|
68
|
-
type: "button",
|
|
69
|
-
className: cn(
|
|
70
|
-
buttonVariants({ variant: "ghost", size: "icon" }),
|
|
71
|
-
"absolute -inset-y-px -end-px p-0 rounded-e-md flex size-6 transition-[color,box-shadow] outline-none text-muted-foreground/80 hover:text-foreground",
|
|
72
|
-
styleClasses?.tag?.closeButton
|
|
73
|
-
),
|
|
74
|
-
children: /* @__PURE__ */ jsx(IconX, { className: "size-3", "aria-hidden": "true" })
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
]
|
|
78
|
-
},
|
|
79
|
-
index
|
|
80
|
-
)) })
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsx(
|
|
84
|
-
Input,
|
|
85
|
-
{
|
|
86
|
-
ref: inputRef,
|
|
87
|
-
id,
|
|
88
|
-
placeholder: placeholder || "Add a tag",
|
|
89
|
-
"aria-label": placeholder || "Add a tag",
|
|
90
|
-
className: cn(
|
|
91
|
-
"flex-1 w-full min-w-[80px] shadow-none px-2 h-7",
|
|
92
|
-
styleClasses?.input
|
|
93
|
-
),
|
|
94
|
-
value: draft,
|
|
95
|
-
onChange: (event) => setDraft(event.target.value),
|
|
96
|
-
onKeyDown: (event) => {
|
|
97
|
-
if (event.nativeEvent.isComposing)
|
|
98
|
-
return;
|
|
99
|
-
if (event.key === "Enter" || event.key === ",") {
|
|
100
|
-
event.preventDefault();
|
|
101
|
-
const tag = draft.trim();
|
|
102
|
-
if (tag && !value.includes(tag))
|
|
103
|
-
onValueChange([...value, tag]);
|
|
104
|
-
setDraft("");
|
|
105
|
-
} else if (event.key === "ArrowLeft" && !draft && value.length) {
|
|
106
|
-
event.preventDefault();
|
|
107
|
-
lastTagRef.current?.focus();
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
onBlur,
|
|
111
|
-
onPaste: (event) => splitOnPaste && handleStringArrayPaste({ event, value, onValueChange })
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export {
|
|
120
|
-
StringArrayInput
|
|
121
|
-
};
|