@erxes/ui 4.0.0-v2.11 → 4.0.0-v2.12

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 (41) hide show
  1. package/CATALOG.md +9 -2
  2. package/dist/components/combobox.js +4 -1
  3. package/dist/components/dialog.d.ts +5 -2
  4. package/dist/components/dialog.js +19 -10
  5. package/dist/components/field-control.d.ts +16 -0
  6. package/dist/components/field-control.js +19 -0
  7. package/dist/components/form-layout.d.ts +19 -0
  8. package/dist/components/form-layout.js +56 -0
  9. package/dist/components/form.d.ts +9 -2
  10. package/dist/components/form.js +17 -7
  11. package/dist/components/input.js +7 -2
  12. package/dist/components/multiselect.js +4 -1
  13. package/dist/components/popover.js +17 -13
  14. package/dist/components/select.js +16 -11
  15. package/dist/components/sheet.d.ts +5 -2
  16. package/dist/components/sheet.js +18 -9
  17. package/dist/components/textarea.js +4 -1
  18. package/dist/hooks/use-focus-first-field.d.ts +8 -0
  19. package/dist/hooks/use-focus-first-field.js +15 -0
  20. package/dist/hooks/use-page-hotkey.d.ts +2 -0
  21. package/dist/hooks/use-page-hotkey.js +4 -2
  22. package/dist/index.d.ts +4 -2
  23. package/dist/index.js +4 -2
  24. package/dist/lib/render-in-dom.d.ts +6 -0
  25. package/dist/lib/render-in-dom.js +26 -0
  26. package/dist/modules/list/ListFilter.d.ts +7 -1
  27. package/dist/modules/list/ListFilter.js +8 -2
  28. package/dist/modules/list/ViewBar.d.ts +36 -4
  29. package/dist/modules/list/ViewBar.js +33 -9
  30. package/dist/modules/record-field/components/TextField.js +1 -4
  31. package/dist/modules/record-panel/PanelForm.d.ts +4 -2
  32. package/dist/modules/record-panel/PanelForm.js +73 -7
  33. 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
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. package/exports.txt +7 -0
  41. package/package.json +4 -1
@@ -0,0 +1,176 @@
1
+ // ../../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
2
+ const KNOWN_ASSET_TYPES = [
3
+ "apng",
4
+ "bmp",
5
+ "png",
6
+ "jpe?g",
7
+ "jfif",
8
+ "pjpeg",
9
+ "pjp",
10
+ "gif",
11
+ "svg",
12
+ "ico",
13
+ "webp",
14
+ "avif",
15
+ "mp4",
16
+ "webm",
17
+ "ogg",
18
+ "mp3",
19
+ "wav",
20
+ "flac",
21
+ "aac",
22
+ "woff2?",
23
+ "eot",
24
+ "ttf",
25
+ "otf",
26
+ "webmanifest",
27
+ "pdf",
28
+ "txt"
29
+ ];
30
+ new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`);
31
+ function notNullish(v) {
32
+ return v != null;
33
+ }
34
+ function assertTypes(value, name, types) {
35
+ const receivedType = typeof value;
36
+ if (!types.includes(receivedType)) throw new TypeError(`${name} value must be ${types.join(" or ")}, received "${receivedType}"`);
37
+ }
38
+ function filterOutComments(s) {
39
+ const result = [];
40
+ let commentState = "none";
41
+ for (let i = 0; i < s.length; ++i) if (commentState === "singleline") {
42
+ if (s[i] === "\n") commentState = "none";
43
+ } else if (commentState === "multiline") {
44
+ if (s[i - 1] === "*" && s[i] === "/") commentState = "none";
45
+ } else if (commentState === "none") {
46
+ if (s[i] === "/" && s[i + 1] === "/") commentState = "singleline";
47
+ else if (s[i] === "/" && s[i + 1] === "*") {
48
+ commentState = "multiline";
49
+ i += 2;
50
+ } else result.push(s[i]);
51
+ }
52
+ return result.join("");
53
+ }
54
+ function toArray(array) {
55
+ array ??= [];
56
+ if (Array.isArray(array)) return array;
57
+ return [array];
58
+ }
59
+ function isObject(item) {
60
+ return item != null && typeof item === "object" && !Array.isArray(item);
61
+ }
62
+ function objectAttr(source, path, defaultValue = void 0) {
63
+ const paths = path.replace(/\[(\d+)\]/g, ".$1").split(".");
64
+ let result = source;
65
+ for (const p of paths) {
66
+ result = new Object(result)[p];
67
+ if (result === void 0) return defaultValue;
68
+ }
69
+ return result;
70
+ }
71
+ function createDefer() {
72
+ let resolve = null;
73
+ let reject = null;
74
+ const p = new Promise((_resolve, _reject) => {
75
+ resolve = _resolve;
76
+ reject = _reject;
77
+ });
78
+ p.resolve = resolve;
79
+ p.reject = reject;
80
+ return p;
81
+ }
82
+ function isNegativeNaN(val) {
83
+ if (!Number.isNaN(val)) return false;
84
+ const f64 = /* @__PURE__ */ new Float64Array(1);
85
+ f64[0] = val;
86
+ return new Uint32Array(f64.buffer)[1] >>> 31 === 1;
87
+ }
88
+ function ordinal(i) {
89
+ const j = i % 10;
90
+ const k = i % 100;
91
+ if (j === 1 && k !== 11) return `${i}st`;
92
+ if (j === 2 && k !== 12) return `${i}nd`;
93
+ if (j === 3 && k !== 13) return `${i}rd`;
94
+ return `${i}th`;
95
+ }
96
+ function unique(array) {
97
+ return Array.from(new Set(array));
98
+ }
99
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
100
+ function normalizeWindowsPath(input = "") {
101
+ if (!input) return input;
102
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
103
+ }
104
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
105
+ function cwd() {
106
+ if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
107
+ return "/";
108
+ }
109
+ const resolve = function(...arguments_) {
110
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
111
+ let resolvedPath = "";
112
+ let resolvedAbsolute = false;
113
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
114
+ const path = index >= 0 ? arguments_[index] : cwd();
115
+ if (!path || path.length === 0) continue;
116
+ resolvedPath = `${path}/${resolvedPath}`;
117
+ resolvedAbsolute = isAbsolute(path);
118
+ }
119
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
120
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
121
+ return resolvedPath.length > 0 ? resolvedPath : ".";
122
+ };
123
+ function normalizeString(path, allowAboveRoot) {
124
+ let res = "";
125
+ let lastSegmentLength = 0;
126
+ let lastSlash = -1;
127
+ let dots = 0;
128
+ let char = null;
129
+ for (let index = 0; index <= path.length; ++index) {
130
+ if (index < path.length) char = path[index];
131
+ else if (char === "/") break;
132
+ else char = "/";
133
+ if (char === "/") {
134
+ if (lastSlash === index - 1 || dots === 1);
135
+ else if (dots === 2) {
136
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
137
+ if (res.length > 2) {
138
+ const lastSlashIndex = res.lastIndexOf("/");
139
+ if (lastSlashIndex === -1) {
140
+ res = "";
141
+ lastSegmentLength = 0;
142
+ } else {
143
+ res = res.slice(0, lastSlashIndex);
144
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
145
+ }
146
+ lastSlash = index;
147
+ dots = 0;
148
+ continue;
149
+ } else if (res.length > 0) {
150
+ res = "";
151
+ lastSegmentLength = 0;
152
+ lastSlash = index;
153
+ dots = 0;
154
+ continue;
155
+ }
156
+ }
157
+ if (allowAboveRoot) {
158
+ res += res.length > 0 ? "/.." : "..";
159
+ lastSegmentLength = 2;
160
+ }
161
+ } else {
162
+ if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
163
+ else res = path.slice(lastSlash + 1, index);
164
+ lastSegmentLength = index - lastSlash - 1;
165
+ }
166
+ lastSlash = index;
167
+ dots = 0;
168
+ } else if (char === "." && dots !== -1) ++dots;
169
+ else dots = -1;
170
+ }
171
+ return res;
172
+ }
173
+ const isAbsolute = function(p) {
174
+ return _IS_ABSOLUTE_RE.test(p);
175
+ };
176
+ export { unique as A, objectAttr as B, KNOWN_ASSET_TYPES as K, createDefer as e, isObject as f, isAbsolute as i, notNullish as q, resolve as r, toArray as t, filterOutComments as w, ordinal as x, assertTypes as y, isNegativeNaN as z };