@rytass/bpm-core-react 0.20.1 → 0.21.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/CHANGELOG.md +80 -0
- package/README.md +1 -1
- package/dist/approval-instance-list-page.css +1 -1
- package/dist/chunks/{FormBuilderView-CFRiw04B.js → FormBuilderView-6KdApi-D.js} +667 -584
- package/dist/chunks/FormBuilderView-6KdApi-D.js.map +1 -0
- package/dist/chunks/FormBuilderView-CGKkuVFi.cjs +4 -0
- package/dist/chunks/FormBuilderView-CGKkuVFi.cjs.map +1 -0
- package/dist/chunks/{FormRendererView-lYSaR8CQ.cjs → FormRendererView-B-xycC9S.cjs} +3 -3
- package/dist/chunks/{FormRendererView-lYSaR8CQ.cjs.map → FormRendererView-B-xycC9S.cjs.map} +1 -1
- package/dist/chunks/{FormRendererView-GfbVWEGa.js → FormRendererView-BcQKUi1A.js} +238 -238
- package/dist/chunks/{FormRendererView-GfbVWEGa.js.map → FormRendererView-BcQKUi1A.js.map} +1 -1
- package/dist/chunks/approval-instance-list-page-BI5fIXc-.js +724 -0
- package/dist/chunks/approval-instance-list-page-BI5fIXc-.js.map +1 -0
- package/dist/chunks/approval-instance-list-page-Cv5I1YPX.cjs +2 -0
- package/dist/chunks/approval-instance-list-page-Cv5I1YPX.cjs.map +1 -0
- package/dist/chunks/{categories-DQUtVEiV.cjs → categories-CyyqG6wG.cjs} +2 -2
- package/dist/chunks/{categories-DQUtVEiV.cjs.map → categories-CyyqG6wG.cjs.map} +1 -1
- package/dist/chunks/{categories-BAdxjNSA.js → categories-f7E-RJEc.js} +9 -9
- package/dist/chunks/{categories-BAdxjNSA.js.map → categories-f7E-RJEc.js.map} +1 -1
- package/dist/chunks/{compose-egQlRjuZ.js → compose-DFuLPmOA.js} +5 -5
- package/dist/chunks/{compose-egQlRjuZ.js.map → compose-DFuLPmOA.js.map} +1 -1
- package/dist/chunks/compose-DK3ocWwG.cjs +2 -0
- package/dist/chunks/compose-DK3ocWwG.cjs.map +1 -0
- package/dist/chunks/{delegations-CVmtpkRn.cjs → delegations-ClRCwD1I.cjs} +2 -2
- package/dist/chunks/{delegations-CVmtpkRn.cjs.map → delegations-ClRCwD1I.cjs.map} +1 -1
- package/dist/chunks/{delegations-9-yvWWws.js → delegations-CqND-Qtz.js} +5 -5
- package/dist/chunks/{delegations-9-yvWWws.js.map → delegations-CqND-Qtz.js.map} +1 -1
- package/dist/chunks/{delegations-CrfjsH94.cjs → delegations-D43VDSz1.cjs} +2 -2
- package/dist/chunks/{delegations-CrfjsH94.cjs.map → delegations-D43VDSz1.cjs.map} +1 -1
- package/dist/chunks/{delegations-CxnNvTCc.js → delegations-zisffLwk.js} +5 -5
- package/dist/chunks/{delegations-CxnNvTCc.js.map → delegations-zisffLwk.js.map} +1 -1
- package/dist/chunks/designer-CAUWEKJ4.cjs +69 -0
- package/dist/chunks/designer-CAUWEKJ4.cjs.map +1 -0
- package/dist/chunks/{designer-CZDlQ9Nf.js → designer-CCy5EbOe.js} +2380 -1786
- package/dist/chunks/designer-CCy5EbOe.js.map +1 -0
- package/dist/chunks/detail-C5KrUC7s.cjs +5 -0
- package/dist/chunks/detail-C5KrUC7s.cjs.map +1 -0
- package/dist/chunks/{detail-ByZV1XaI.js → detail-Dnc4PPWO.js} +804 -777
- package/dist/chunks/detail-Dnc4PPWO.js.map +1 -0
- package/dist/chunks/instance-error-message-BEM4O_Kj.js +208 -0
- package/dist/chunks/instance-error-message-BEM4O_Kj.js.map +1 -0
- package/dist/chunks/instance-error-message-BpCLCOjp.cjs +2 -0
- package/dist/chunks/instance-error-message-BpCLCOjp.cjs.map +1 -0
- package/dist/chunks/organization-time-zone-provider-B7CXQril.cjs +2 -0
- package/dist/chunks/organization-time-zone-provider-B7CXQril.cjs.map +1 -0
- package/dist/chunks/organization-time-zone-provider-DNL8yo4-.js +42 -0
- package/dist/chunks/organization-time-zone-provider-DNL8yo4-.js.map +1 -0
- package/dist/chunks/{providers-BbCs23sk.js → providers-CQWekD7_.js} +197 -196
- package/dist/chunks/providers-CQWekD7_.js.map +1 -0
- package/dist/chunks/providers-VUOh6i0i.cjs +2 -0
- package/dist/chunks/providers-VUOh6i0i.cjs.map +1 -0
- package/dist/components/approval-instance-field-filter-controls.d.cts +12 -0
- package/dist/components/approval-instance-field-filter-controls.d.ts +12 -0
- package/dist/components/approval-instance-field-filters.d.cts +86 -0
- package/dist/components/approval-instance-field-filters.d.ts +86 -0
- package/dist/components/approval-instance-list-page.d.cts +4 -0
- package/dist/components/approval-instance-list-page.d.ts +4 -0
- package/dist/components/notification-drawer-options.d.cts +18 -0
- package/dist/components/notification-drawer-options.d.ts +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +23 -23
- package/dist/index.js.map +1 -1
- package/dist/lib/organization-time-zone-provider.d.cts +20 -0
- package/dist/lib/organization-time-zone-provider.d.ts +20 -0
- package/dist/lib/organization-time-zone.d.cts +8 -0
- package/dist/lib/organization-time-zone.d.ts +8 -0
- package/dist/lib/providers.d.cts +10 -1
- package/dist/lib/providers.d.ts +10 -1
- package/dist/next/BPMNextProviders.d.cts +8 -1
- package/dist/next/BPMNextProviders.d.ts +8 -1
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +12 -11
- package/dist/next/index.js.map +1 -1
- package/dist/next/workflow-chat-route.cjs +2 -2
- package/dist/next/workflow-chat-route.cjs.map +1 -1
- package/dist/next/workflow-chat-route.js +13 -13
- package/dist/pages/admin/delegations/index.cjs +1 -1
- package/dist/pages/admin/delegations/index.js +1 -1
- package/dist/pages/delegations/index.cjs +1 -1
- package/dist/pages/delegations/index.js +1 -1
- package/dist/pages/instances/detail/index.cjs +1 -1
- package/dist/pages/instances/detail/index.js +1 -1
- package/dist/pages/templates/categories/index.cjs +1 -1
- package/dist/pages/templates/categories/index.js +1 -1
- package/dist/pages/templates/compose/index.cjs +1 -1
- package/dist/pages/templates/compose/index.js +1 -1
- package/dist/pages/templates/designer/index.cjs +1 -1
- package/dist/pages/templates/designer/index.js +1 -1
- package/dist/views/admin/delegations/index.cjs +1 -1
- package/dist/views/admin/delegations/index.js +1 -1
- package/dist/views/admin/index.cjs +1 -1
- package/dist/views/admin/index.js +1 -1
- package/dist/views/admin/webhook-endpoints/index.cjs +1 -1
- package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
- package/dist/views/admin/webhook-endpoints/index.js +60 -60
- package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
- package/dist/views/cc/index.cjs +1 -1
- package/dist/views/cc/index.js +1 -1
- package/dist/views/delegations/index.cjs +1 -1
- package/dist/views/delegations/index.js +1 -1
- package/dist/views/forms/builder/FormBuilderView.d.cts +8 -1
- package/dist/views/forms/builder/FormBuilderView.d.ts +8 -1
- package/dist/views/forms/builder/index.cjs +1 -1
- package/dist/views/forms/builder/index.js +1 -1
- package/dist/views/forms/renderer/index.cjs +1 -1
- package/dist/views/forms/renderer/index.js +1 -1
- package/dist/views/instances/approver-filled-form.d.cts +8 -5
- package/dist/views/instances/approver-filled-form.d.ts +8 -5
- package/dist/views/instances/detail/index.cjs +1 -1
- package/dist/views/instances/detail/index.js +1 -1
- package/dist/views/instances/detail/sections/InstanceTasksSection.d.cts +2 -1
- package/dist/views/instances/detail/sections/InstanceTasksSection.d.ts +2 -1
- package/dist/views/instances/detail/sections/shared.d.cts +0 -1
- package/dist/views/instances/detail/sections/shared.d.ts +0 -1
- package/dist/views/instances/new/index.cjs +1 -1
- package/dist/views/instances/new/index.cjs.map +1 -1
- package/dist/views/instances/new/index.js +8 -8
- package/dist/views/instances/new/index.js.map +1 -1
- package/dist/views/search/index.cjs +1 -1
- package/dist/views/search/index.js +1 -1
- package/dist/views/sent/index.cjs +1 -1
- package/dist/views/sent/index.js +1 -1
- package/dist/views/templates/categories/index.cjs +1 -1
- package/dist/views/templates/categories/index.js +1 -1
- package/dist/views/templates/compose/index.cjs +1 -1
- package/dist/views/templates/compose/index.js +1 -1
- package/dist/views/templates/designer/NotifyWebhookTargetsEditor.d.cts +2 -0
- package/dist/views/templates/designer/NotifyWebhookTargetsEditor.d.ts +2 -0
- package/dist/views/templates/designer/approver-resolver-model.d.cts +105 -1
- package/dist/views/templates/designer/approver-resolver-model.d.ts +105 -1
- package/dist/views/templates/designer/dynamic-form-resolver-options.d.cts +5 -0
- package/dist/views/templates/designer/dynamic-form-resolver-options.d.ts +5 -0
- package/dist/views/templates/designer/index.cjs +1 -1
- package/dist/views/templates/designer/index.js +1 -1
- package/dist/views/templates/designer/node-actor-resolver-options.d.cts +44 -1
- package/dist/views/templates/designer/node-actor-resolver-options.d.ts +44 -1
- package/dist/views/templates/designer/notify-recipient-options.d.cts +81 -0
- package/dist/views/templates/designer/notify-recipient-options.d.ts +81 -0
- package/dist/views/templates/designer/position-level-options.d.cts +3 -1
- package/dist/views/templates/designer/position-level-options.d.ts +3 -1
- package/dist/views/templates/designer/position-scope.d.cts +51 -0
- package/dist/views/templates/designer/position-scope.d.ts +51 -0
- package/dist/views/templates/index.cjs +1 -1
- package/dist/views/templates/index.cjs.map +1 -1
- package/dist/views/templates/index.js +7 -7
- package/package.json +3 -3
- package/dist/chunks/FormBuilderView-CFRiw04B.js.map +0 -1
- package/dist/chunks/FormBuilderView-CpUgbSbt.cjs +0 -3
- package/dist/chunks/FormBuilderView-CpUgbSbt.cjs.map +0 -1
- package/dist/chunks/approval-instance-list-page-BnI4t5mD.js +0 -279
- package/dist/chunks/approval-instance-list-page-BnI4t5mD.js.map +0 -1
- package/dist/chunks/approval-instance-list-page-fqvmkBlg.cjs +0 -2
- package/dist/chunks/approval-instance-list-page-fqvmkBlg.cjs.map +0 -1
- package/dist/chunks/compose-Bb5bUVFd.cjs +0 -2
- package/dist/chunks/compose-Bb5bUVFd.cjs.map +0 -1
- package/dist/chunks/designer-CX9bhYJS.cjs +0 -69
- package/dist/chunks/designer-CX9bhYJS.cjs.map +0 -1
- package/dist/chunks/designer-CZDlQ9Nf.js.map +0 -1
- package/dist/chunks/detail-ByZV1XaI.js.map +0 -1
- package/dist/chunks/detail-ChseSF55.cjs +0 -5
- package/dist/chunks/detail-ChseSF55.cjs.map +0 -1
- package/dist/chunks/instance-error-message-DTARGbGo.cjs +0 -2
- package/dist/chunks/instance-error-message-DTARGbGo.cjs.map +0 -1
- package/dist/chunks/instance-error-message-q6gy5evy.js +0 -120
- package/dist/chunks/instance-error-message-q6gy5evy.js.map +0 -1
- package/dist/chunks/language-provider-Bdnx3Gxl.cjs +0 -2
- package/dist/chunks/language-provider-Bdnx3Gxl.cjs.map +0 -1
- package/dist/chunks/language-provider-phkWOapf.js +0 -17
- package/dist/chunks/language-provider-phkWOapf.js.map +0 -1
- package/dist/chunks/providers-BbCs23sk.js.map +0 -1
- package/dist/chunks/providers-D_KAgOOu.cjs +0 -2
- package/dist/chunks/providers-D_KAgOOu.cjs.map +0 -1
|
@@ -5,12 +5,12 @@ import { useCallback as n, useEffect as r, useMemo as i, useRef as a, useState a
|
|
|
5
5
|
import { AutoComplete as s, Button as c, CheckboxGroup as l, DatePicker as u, DateTimePicker as d, Input as f, RadioGroup as p, Select as m, Table as h, Textarea as g, Toggle as _, Typography as v, Upload as y } from "@mezzanine-ui/react";
|
|
6
6
|
import { resolveMembers as b, searchMembers as x } from "@rytass/bpm-core-client";
|
|
7
7
|
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { isFormDataSourceFieldDefinition as
|
|
11
|
-
import { resolveOrgUnitOptions as
|
|
8
|
+
import { buildFormRendererValues as w, clampOptionalNumber as T, createFormTableRow as E, formatDatePickerValue as D, formatDateTimePickerValue as O, isFormRendererFieldReadonly as k, isFormRendererFieldRequired as A, mergeFormDataSourceOptions as j, parseOptionalNumberInput as M, previewFormFieldOptions as ee, previewResolveFormFieldOptions as te, readDatePickerValue as ne, readFieldOptionAsSelectOption as N, readFormDataSourceErrorCode as re, readFormDataSourceErrorMessage as ie, readFormDataSourceSelectedValues as ae, readFormDataSourceValueSignature as P, readFormFieldOptions as oe, readFormTableCellPath as se, readFormTableRowBounds as ce, readFormTableRows as le, readMissingFormDataSourceDependencies as ue, readMissingFormDataSourceOptionValues as de, readSelectOption as fe, readSelectedFormDataSourceOptions as pe, readVisibleFormRendererFields as F, resolveFormFieldOptions as me } from "@rytass/bpm-core-client/form";
|
|
9
|
+
import { PlusIcon as I, TrashIcon as L } from "@mezzanine-ui/icons";
|
|
10
|
+
import { isFormDataSourceFieldDefinition as he, isFormStaticOptionFieldDefinition as R, isFormTableCellValue as ge, isTableFieldDefinition as _e, readFormFieldSelectionMode as z, readFormMemberIds as ve } from "@rytass/bpm-core-shared/form";
|
|
11
|
+
import { resolveOrgUnitOptions as ye, searchOrgUnitOptions as B } from "@rytass/bpm-core-client/organization";
|
|
12
12
|
// src/views/forms/renderer/form-data-source-field.ts
|
|
13
|
-
var
|
|
13
|
+
var be = {
|
|
14
14
|
canRetry: !1,
|
|
15
15
|
error: null,
|
|
16
16
|
hasValue: !1,
|
|
@@ -21,16 +21,16 @@ var ve = {
|
|
|
21
21
|
options: [],
|
|
22
22
|
retry: () => void 0,
|
|
23
23
|
status: "IDLE"
|
|
24
|
-
},
|
|
25
|
-
function
|
|
24
|
+
}, xe = [], Se = 10, Ce = 300, we = ["FORM_DATA_SOURCE_SEARCH_NOT_SUPPORTED", "FORM_DATA_SOURCE_SEARCH_TOO_SHORT"];
|
|
25
|
+
function Te(e, t) {
|
|
26
26
|
if (!t.row) return e;
|
|
27
27
|
let n = t.fieldPath?.indexOf(".") ?? -1;
|
|
28
28
|
return t.fieldPath && n > 0 ? t.fieldPath.slice(0, n) : null;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function V(e, t) {
|
|
31
31
|
return t === null ? e : Object.fromEntries(Object.entries(e).filter(([e]) => e !== t));
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Ee(e, t) {
|
|
34
34
|
let n = e.from;
|
|
35
35
|
switch (n.kind) {
|
|
36
36
|
case "FIELD": return {
|
|
@@ -44,32 +44,32 @@ function we(e, t) {
|
|
|
44
44
|
};
|
|
45
45
|
case "EXPRESSION": return {
|
|
46
46
|
expression: n.expression,
|
|
47
|
-
form:
|
|
48
|
-
row: t.rowValues ?
|
|
47
|
+
form: V(t.formData, t.ownFormKey),
|
|
48
|
+
row: t.rowValues ? V(t.rowValues, t.ownRowKey) : null
|
|
49
49
|
};
|
|
50
|
-
default: return
|
|
50
|
+
default: return De(n);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function De(e) {
|
|
54
54
|
return { unsupported: !0 };
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return JSON.stringify(
|
|
56
|
+
function Oe(e) {
|
|
57
|
+
return JSON.stringify(ke(e)) ?? "null";
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
return Array.isArray(e) ? e.map(
|
|
59
|
+
function ke(e) {
|
|
60
|
+
return Array.isArray(e) ? e.map(ke) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0).sort(([e], [t]) => e < t ? -1 : +(e > t)).map(([e, t]) => [e, ke(t)])) : e;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
let t =
|
|
62
|
+
function H(e) {
|
|
63
|
+
let t = he(e.field) ? e.field : null, s = e.fieldPath ?? t?.fieldKey ?? "", c = t ? e.optionSnapshots?.[e.snapshotKey ?? t.fieldKey] : void 0, l = t ? JSON.stringify({
|
|
64
64
|
dataSource: t.dataSource,
|
|
65
65
|
fieldKey: t.fieldKey,
|
|
66
66
|
type: t.type
|
|
67
|
-
}) : "", u = JSON.stringify(c ?? null), d = i(() => c?.options ?? [], [u]), f = JSON.stringify(e.formData), p = JSON.stringify(e.initialFormData ?? {}), m = JSON.stringify(e.schema), h = JSON.stringify(e.uiSchema), g = e.context?.kind, _ = e.context?.kind === "runtime" ? e.context.instanceId : void 0, v = e.context?.kind === "runtime" ? e.context.templateId : void 0, y = JSON.stringify(e.row?.values ?? null), b = JSON.stringify(e.row?.initialValues ?? null), x = t ? e.row ? e.row.values[t.fieldKey] : e.formData[t.fieldKey] : void 0, S =
|
|
67
|
+
}) : "", u = JSON.stringify(c ?? null), d = i(() => c?.options ?? [], [u]), f = JSON.stringify(e.formData), p = JSON.stringify(e.initialFormData ?? {}), m = JSON.stringify(e.schema), h = JSON.stringify(e.uiSchema), g = e.context?.kind, _ = e.context?.kind === "runtime" ? e.context.instanceId : void 0, v = e.context?.kind === "runtime" ? e.context.templateId : void 0, y = JSON.stringify(e.row?.values ?? null), b = JSON.stringify(e.row?.initialValues ?? null), x = t ? e.row ? e.row.values[t.fieldKey] : e.formData[t.fieldKey] : void 0, S = P(x), C = i(() => ae(x), [S]), T = C.length > 0, E = t ? JSON.stringify(t.dataSource.bindings.map((n) => Ee(n, {
|
|
68
68
|
formData: e.formData,
|
|
69
|
-
ownFormKey:
|
|
69
|
+
ownFormKey: Te(t.fieldKey, e),
|
|
70
70
|
ownRowKey: e.row ? t.fieldKey : null,
|
|
71
71
|
rowValues: e.row?.values
|
|
72
|
-
}))) : "", D = t ? JSON.stringify(e.initialFormData !== void 0 || e.initialValue !== void 0 ? x ?? null : null) : "", O = t ? `${
|
|
72
|
+
}))) : "", D = t ? JSON.stringify(e.initialFormData !== void 0 || e.initialValue !== void 0 ? x ?? null : null) : "", O = t ? `${E}\u0000${D}` : "", k = Ae(E, t?.dataSource.bindings.some((e) => e.from.kind === "EXPRESSION") ? Ce : 0), A = k !== E, M = i(() => {
|
|
73
73
|
if (g === "preview") return { kind: "preview" };
|
|
74
74
|
if (g === "runtime" && !e.readonly) return {
|
|
75
75
|
instanceId: _,
|
|
@@ -81,146 +81,146 @@ function W(e) {
|
|
|
81
81
|
g,
|
|
82
82
|
v,
|
|
83
83
|
e.readonly
|
|
84
|
-
]),
|
|
85
|
-
if (n.from.kind === "FIELD") return
|
|
86
|
-
if (n.from.kind === "ROW_FIELD" && e.row?.initialValues) return
|
|
84
|
+
]), ne = t ? (e.initialFormData !== void 0 || e.initialValue !== void 0) && P(e.initialValue) !== S : !1, N = t ? e.initialFormData !== void 0 && t.dataSource.bindings.some((n) => {
|
|
85
|
+
if (n.from.kind === "FIELD") return P(e.initialFormData?.[n.from.fieldKey]) !== P(e.formData[n.from.fieldKey]);
|
|
86
|
+
if (n.from.kind === "ROW_FIELD" && e.row?.initialValues) return P(e.row.initialValues[n.from.columnKey]) !== P(e.row.values[n.from.columnKey]);
|
|
87
87
|
if (n.from.kind === "EXPRESSION") {
|
|
88
|
-
if (!
|
|
88
|
+
if (!M) return !1;
|
|
89
89
|
let r = {
|
|
90
|
-
ownFormKey:
|
|
90
|
+
ownFormKey: Te(t.fieldKey, e),
|
|
91
91
|
ownRowKey: e.row ? t.fieldKey : null
|
|
92
92
|
};
|
|
93
|
-
return Ee(
|
|
93
|
+
return Oe(Ee(n, {
|
|
94
94
|
...r,
|
|
95
|
-
formData:
|
|
95
|
+
formData: w(e.schema.fields, e.initialFormData ?? {}),
|
|
96
96
|
rowValues: e.row?.initialValues ?? e.row?.values
|
|
97
|
-
})) !== Ee(
|
|
97
|
+
})) !== Oe(Ee(n, {
|
|
98
98
|
...r,
|
|
99
|
-
formData:
|
|
99
|
+
formData: w(e.schema.fields, e.formData),
|
|
100
100
|
rowValues: e.row?.values
|
|
101
101
|
}));
|
|
102
102
|
}
|
|
103
103
|
return !1;
|
|
104
|
-
}) : !1,
|
|
104
|
+
}) : !1, se = !!t?.dataSource.bindings.some((e) => e.from.kind === "EXPRESSION"), [ce, le] = o(() => ({
|
|
105
105
|
bindings: k,
|
|
106
106
|
value: S
|
|
107
107
|
}));
|
|
108
|
-
|
|
108
|
+
ce.value !== S && le({
|
|
109
109
|
bindings: k,
|
|
110
110
|
value: S
|
|
111
111
|
});
|
|
112
|
-
let
|
|
112
|
+
let de = !!(se && M && T && ce.value === S && ce.bindings !== k), fe = !!((c || T) && (ne || N || de)), F = !!(t && M && fe && T), I = Pe({
|
|
113
113
|
hasSnapshot: !!c,
|
|
114
|
-
hasValue:
|
|
115
|
-
isStale:
|
|
114
|
+
hasValue: T,
|
|
115
|
+
isStale: fe,
|
|
116
116
|
readonly: e.readonly
|
|
117
|
-
}),
|
|
118
|
-
|
|
119
|
-
let [
|
|
117
|
+
}), L = !!(t && M && t.type !== "autocomplete"), R = Fe(fe, L && t !== null && ue(t, e.formData, e.row?.values).length > 0), ge = a(I);
|
|
118
|
+
ge.current = I;
|
|
119
|
+
let [_e, z] = o([]), [ve, ye] = o(""), [B, xe] = o(null), [V, De] = o(null), [ke, H] = o(() => t ? L ? R : I : "IDLE"), [je, U] = o(null), Me = a(0), W = a(0), G = a(0), K = a(null), Be = a(null), q = a({
|
|
120
120
|
cursor: null,
|
|
121
121
|
searchText: ""
|
|
122
|
-
}),
|
|
123
|
-
options:
|
|
124
|
-
resolution:
|
|
125
|
-
resolvePending:
|
|
122
|
+
}), J = i(() => ze(e.formData), [f]), Y = i(() => e.row ? ze(e.row.values) : void 0, [y]), Ve = i(() => j(d, _e), [_e, d]), X = V && V.signature === O && V.valueSignature === S ? V : null, He = F && !X, Ue = !!(de && X && X.unresolvedValues.length > 0), We = Ne({
|
|
123
|
+
options: Ve,
|
|
124
|
+
resolution: X,
|
|
125
|
+
resolvePending: He,
|
|
126
126
|
value: x
|
|
127
|
-
}),
|
|
128
|
-
if (!t || !
|
|
129
|
-
let i =
|
|
130
|
-
|
|
127
|
+
}), Z = n((n, r) => {
|
|
128
|
+
if (!t || !M) return;
|
|
129
|
+
let i = W.current + 1;
|
|
130
|
+
W.current = i, q.current = {
|
|
131
131
|
cursor: r,
|
|
132
132
|
searchText: n
|
|
133
|
-
},
|
|
133
|
+
}, K.current?.abort();
|
|
134
134
|
let a = new AbortController();
|
|
135
|
-
|
|
135
|
+
K.current = a, H(R), U(null), (M.kind === "preview" ? ee({
|
|
136
136
|
cursor: r,
|
|
137
137
|
fieldKey: s,
|
|
138
|
-
formData:
|
|
139
|
-
rowValues:
|
|
138
|
+
formData: J,
|
|
139
|
+
rowValues: Y,
|
|
140
140
|
schema: e.schema,
|
|
141
141
|
searchText: n,
|
|
142
142
|
signal: a.signal,
|
|
143
143
|
uiSchema: e.uiSchema
|
|
144
|
-
}) :
|
|
144
|
+
}) : oe({
|
|
145
145
|
cursor: r,
|
|
146
146
|
fieldKey: s,
|
|
147
|
-
formData:
|
|
148
|
-
instanceId:
|
|
149
|
-
rowValues:
|
|
147
|
+
formData: J,
|
|
148
|
+
instanceId: M.instanceId ?? null,
|
|
149
|
+
rowValues: Y,
|
|
150
150
|
searchText: n,
|
|
151
151
|
signal: a.signal,
|
|
152
|
-
templateId:
|
|
152
|
+
templateId: M.templateId ?? null
|
|
153
153
|
})).then((e) => {
|
|
154
|
-
|
|
155
|
-
let n =
|
|
156
|
-
return
|
|
157
|
-
}),
|
|
154
|
+
Re(a, W, i) || (z((t) => {
|
|
155
|
+
let n = pe(x, t);
|
|
156
|
+
return j(n, r ? t : [], e.options);
|
|
157
|
+
}), xe(e.nextCursor), U(null), Me.current = r ? Me.current + e.options.length : e.options.length, e.nextCursor && e.options.length > 0 && Me.current < Se && Ge.current(n, e.nextCursor), H(e.waitingForFieldKeys.length ? "WAITING_FOR_DEPENDENCIES" : "VALID"));
|
|
158
158
|
}).catch((e) => {
|
|
159
|
-
if (
|
|
160
|
-
let t =
|
|
161
|
-
|
|
159
|
+
if (Re(a, W, i)) return;
|
|
160
|
+
let t = ie(e) ?? "選項來源暫時無法使用。", n = re(e);
|
|
161
|
+
U(t), H(Ie(!!(n && we.includes(n)), T));
|
|
162
162
|
});
|
|
163
163
|
}, [
|
|
164
164
|
S,
|
|
165
165
|
l,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
M,
|
|
167
|
+
T,
|
|
168
|
+
R,
|
|
169
169
|
s,
|
|
170
|
+
J,
|
|
170
171
|
Y,
|
|
171
|
-
X,
|
|
172
172
|
m,
|
|
173
173
|
h
|
|
174
|
-
]),
|
|
175
|
-
|
|
176
|
-
let
|
|
177
|
-
if (!t || !
|
|
178
|
-
let n = O, r = S, i =
|
|
179
|
-
|
|
174
|
+
]), Ge = a(Z);
|
|
175
|
+
Ge.current = Z;
|
|
176
|
+
let Q = n(() => {
|
|
177
|
+
if (!t || !M || C.length === 0) return;
|
|
178
|
+
let n = O, r = S, i = G.current + 1;
|
|
179
|
+
G.current = i, Be.current?.abort();
|
|
180
180
|
let a = new AbortController();
|
|
181
|
-
|
|
181
|
+
Be.current = a, U(null), (M.kind === "preview" ? te({
|
|
182
182
|
fieldKey: s,
|
|
183
|
-
formData:
|
|
184
|
-
rowValues:
|
|
183
|
+
formData: J,
|
|
184
|
+
rowValues: Y,
|
|
185
185
|
schema: e.schema,
|
|
186
186
|
signal: a.signal,
|
|
187
187
|
uiSchema: e.uiSchema,
|
|
188
188
|
values: C
|
|
189
|
-
}) :
|
|
189
|
+
}) : me({
|
|
190
190
|
fieldKey: s,
|
|
191
|
-
formData:
|
|
192
|
-
instanceId:
|
|
193
|
-
rowValues:
|
|
191
|
+
formData: J,
|
|
192
|
+
instanceId: M.instanceId ?? null,
|
|
193
|
+
rowValues: Y,
|
|
194
194
|
signal: a.signal,
|
|
195
|
-
templateId:
|
|
195
|
+
templateId: M.templateId ?? null,
|
|
196
196
|
values: C
|
|
197
197
|
})).then((e) => {
|
|
198
|
-
|
|
198
|
+
Re(a, G, i) || (e.waitingForFieldKeys.length ? H("WAITING_FOR_DEPENDENCIES") : (z((t) => j(t, e.options)), De({
|
|
199
199
|
signature: n,
|
|
200
200
|
unresolvedValues: e.unresolvedValues,
|
|
201
201
|
valueSignature: r
|
|
202
|
-
}),
|
|
202
|
+
}), H("VALID")));
|
|
203
203
|
}).catch((e) => {
|
|
204
|
-
|
|
204
|
+
Re(a, G, i) || (H("UNAVAILABLE"), U(ie(e) ?? "選項來源暫時無法使用。"));
|
|
205
205
|
});
|
|
206
206
|
}, [
|
|
207
207
|
S,
|
|
208
208
|
O,
|
|
209
209
|
l,
|
|
210
|
-
|
|
210
|
+
M,
|
|
211
211
|
s,
|
|
212
|
+
J,
|
|
212
213
|
Y,
|
|
213
|
-
X,
|
|
214
214
|
m,
|
|
215
215
|
C,
|
|
216
216
|
h
|
|
217
|
-
]), Ke = a(
|
|
218
|
-
Ke.current =
|
|
219
|
-
|
|
217
|
+
]), Ke = a(Q);
|
|
218
|
+
Ke.current = Q, r(() => {
|
|
219
|
+
W.current += 1, K.current?.abort(), z((e) => pe(x, e)), xe((e) => e === null ? e : null), ye((e) => e && ""), U((e) => e && null), t ? L ? Ge.current("", null) : H(ge.current) : H("IDLE");
|
|
220
220
|
}, [
|
|
221
|
-
|
|
221
|
+
L,
|
|
222
222
|
l,
|
|
223
|
-
|
|
223
|
+
M,
|
|
224
224
|
k,
|
|
225
225
|
D,
|
|
226
226
|
p,
|
|
@@ -228,56 +228,56 @@ function W(e) {
|
|
|
228
228
|
e.readonly,
|
|
229
229
|
u
|
|
230
230
|
]), r(() => {
|
|
231
|
-
t && !
|
|
231
|
+
t && !L && H(I);
|
|
232
232
|
}, [
|
|
233
|
-
|
|
233
|
+
L,
|
|
234
234
|
l,
|
|
235
|
-
|
|
235
|
+
I
|
|
236
236
|
]), r(() => {
|
|
237
|
-
|
|
237
|
+
F && !A && Ke.current();
|
|
238
238
|
}, [
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
M,
|
|
240
|
+
F,
|
|
241
241
|
A,
|
|
242
242
|
k,
|
|
243
243
|
D
|
|
244
244
|
]), r(() => () => {
|
|
245
|
-
|
|
245
|
+
K.current?.abort(), Be.current?.abort();
|
|
246
246
|
}, []);
|
|
247
247
|
let qe = n((e) => {
|
|
248
|
-
|
|
249
|
-
}, [
|
|
250
|
-
|
|
248
|
+
ye(e), z((e) => pe(x, e)), xe(null), Z(e, null);
|
|
249
|
+
}, [Z]), Je = n(() => {
|
|
250
|
+
B && Z(ve, B);
|
|
251
251
|
}, [
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
Z,
|
|
253
|
+
B,
|
|
254
|
+
ve
|
|
255
255
|
]), Ye = n(() => {
|
|
256
|
-
|
|
256
|
+
M && (Z(q.current.searchText, q.current.cursor), F && Ke.current());
|
|
257
257
|
}, [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
258
|
+
M,
|
|
259
|
+
Z,
|
|
260
|
+
F
|
|
261
261
|
]);
|
|
262
262
|
return t ? {
|
|
263
|
-
canRetry: !!
|
|
264
|
-
error:
|
|
265
|
-
hasValue:
|
|
266
|
-
hasNextPage: !!
|
|
267
|
-
invalidValues:
|
|
263
|
+
canRetry: !!M,
|
|
264
|
+
error: je,
|
|
265
|
+
hasValue: T,
|
|
266
|
+
hasNextPage: !!B,
|
|
267
|
+
invalidValues: We,
|
|
268
268
|
onReachBottom: Je,
|
|
269
269
|
onSearch: qe,
|
|
270
|
-
options:
|
|
270
|
+
options: Ve,
|
|
271
271
|
retry: Ye,
|
|
272
|
-
selectionExpired:
|
|
273
|
-
status: A &&
|
|
274
|
-
invalidValues:
|
|
275
|
-
resolvePending:
|
|
276
|
-
status:
|
|
272
|
+
selectionExpired: Ue,
|
|
273
|
+
status: A && M && (L || T) ? L ? R : "STALE" : Le({
|
|
274
|
+
invalidValues: We,
|
|
275
|
+
resolvePending: He,
|
|
276
|
+
status: ke
|
|
277
277
|
})
|
|
278
|
-
} :
|
|
278
|
+
} : be;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Ae(e, t) {
|
|
281
281
|
let [n, i] = o(e);
|
|
282
282
|
return r(() => {
|
|
283
283
|
if (t <= 0) return;
|
|
@@ -289,70 +289,70 @@ function Oe(e, t) {
|
|
|
289
289
|
};
|
|
290
290
|
}, [t, e]), t > 0 ? n : e;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function je(e) {
|
|
293
293
|
switch (e.status) {
|
|
294
294
|
case "WAITING_FOR_DEPENDENCIES": return "請先填寫相依欄位。";
|
|
295
295
|
case "STALE": return "選項需要重新載入或驗證。";
|
|
296
|
-
case "INVALID": return e.selectionExpired ?
|
|
296
|
+
case "INVALID": return e.selectionExpired ? ie("FORM_DATA_SOURCE_VALUE_NOT_RESOLVED") : e.invalidValues.length ? `無法辨識選項:${e.invalidValues.join("、")}` : "目前選項已失效,請重新選擇。";
|
|
297
297
|
case "UNAVAILABLE": return e.error ?? "選項來源暫時無法使用。";
|
|
298
298
|
case "VALID": return e.error ?? (e.options.length ? null : "目前沒有可用選項。");
|
|
299
299
|
default: return e.error;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function U(e) {
|
|
303
303
|
return e.hasValue && e.status !== "VALID";
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
let t = e.filter(
|
|
307
|
-
return t.length === 0 ? null : t.some((e) => e.status === "INVALID" && e.selectionExpired === !0) ?
|
|
305
|
+
function Me(e) {
|
|
306
|
+
let t = e.filter(U);
|
|
307
|
+
return t.length === 0 ? null : t.some((e) => e.status === "INVALID" && e.selectionExpired === !0) ? ie("FORM_DATA_SOURCE_VALUE_NOT_RESOLVED") : t.every((e) => e.status === "LOADING" || e.status === "STALE") ? "選項驗證中,請稍候再送出。" : "請先完成動態選項驗證。";
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
return e.resolution ? e.resolution.unresolvedValues : e.resolvePending ?
|
|
309
|
+
function Ne(e) {
|
|
310
|
+
return e.resolution ? e.resolution.unresolvedValues : e.resolvePending ? xe : de(e.value, e.options);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function Pe(e) {
|
|
313
313
|
return e.isStale ? "STALE" : e.hasSnapshot ? "VALID" : e.readonly && e.hasValue ? "UNAVAILABLE" : "IDLE";
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Fe(e, t) {
|
|
316
316
|
return t ? "WAITING_FOR_DEPENDENCIES" : e ? "STALE" : "LOADING";
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Ie(e, t) {
|
|
319
319
|
return e ? t ? "VALID" : "IDLE" : "UNAVAILABLE";
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Le(e) {
|
|
322
322
|
return e.status === "LOADING" || e.status === "UNAVAILABLE" || e.status === "WAITING_FOR_DEPENDENCIES" ? e.status : e.invalidValues.length ? "INVALID" : e.resolvePending ? "STALE" : e.status;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Re(e, t, n) {
|
|
325
325
|
return e.signal.aborted || t.current !== n;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function ze(e) {
|
|
328
328
|
return Object.entries(e).reduce((e, [t, n]) => n === void 0 ? e : {
|
|
329
329
|
...e,
|
|
330
330
|
[t]: n
|
|
331
331
|
}, {});
|
|
332
332
|
}
|
|
333
333
|
// src/views/forms/renderer/form-value-readers.ts
|
|
334
|
-
function
|
|
334
|
+
function W(e) {
|
|
335
335
|
return Array.isArray(e) && e.every((e) => typeof e == "string") ? e : [];
|
|
336
336
|
}
|
|
337
337
|
// src/views/forms/renderer/file-upload-field.tsx
|
|
338
|
-
function
|
|
338
|
+
function G(e) {
|
|
339
339
|
return e.some((e) => e.pendingCount > 0) ? "附件仍在上傳中,請稍候再送出。" : e.some((e) => e.failedCount > 0) ? "有附件上傳失敗,請重試或移除後再送出。" : null;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function K() {
|
|
342
342
|
let [e, t] = o({}), r = n((e, n) => t((t) => ({
|
|
343
343
|
...t,
|
|
344
344
|
[e]: n
|
|
345
345
|
})), []);
|
|
346
346
|
return {
|
|
347
|
-
blockMessage:
|
|
347
|
+
blockMessage: G(Object.values(e)),
|
|
348
348
|
onFileUploadStateChange: r
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
var
|
|
352
|
-
function
|
|
353
|
-
let [p, m] = o([]), [h, g] = o(() => /* @__PURE__ */ new Map()), [_, v] = o([]), b =
|
|
351
|
+
var Be = "無法讀取檔名的附件", q = "此處無法上傳附件";
|
|
352
|
+
function J({ attachments: e, field: t, onChange: s, onDownloadAttachment: c, onStateChange: l, onUploadAttachment: u, readonly: d, value: f }) {
|
|
353
|
+
let [p, m] = o([]), [h, g] = o(() => /* @__PURE__ */ new Map()), [_, v] = o([]), b = W(f), x = b.join("\n"), C = i(() => new Map((e ?? []).map((e) => [e.id, e])), [e]), w = i(() => {
|
|
354
354
|
let e = new Map(_.map((e, t) => [e, t]));
|
|
355
|
-
return [...b.map((e) => h.get(e) ??
|
|
355
|
+
return [...b.map((e) => h.get(e) ?? Y(e, C.get(e))), ...p].sort((t, n) => (e.get(t.id) ?? -1) - (e.get(n.id) ?? -1));
|
|
356
356
|
}, [
|
|
357
357
|
C,
|
|
358
358
|
_,
|
|
@@ -380,8 +380,8 @@ function Y({ attachments: e, field: t, onChange: s, onDownloadAttachment: c, onS
|
|
|
380
380
|
let t = e.filter((e) => e.status === "done"), n = t.map((e) => e.id), r = new Set(b), i = t.filter((e) => e.file !== void 0 && !r.has(e.id));
|
|
381
381
|
T.current = e, v(e.map((e) => e.id)), m(e.filter((e) => e.status !== "done")), i.length > 0 && g((e) => new Map([...e, ...i.map((e) => [e.id, e])])), n.join("\n") !== x && s(n.length ? n : void 0);
|
|
382
382
|
}
|
|
383
|
-
async function
|
|
384
|
-
if (!u) throw Error(
|
|
383
|
+
async function ee(e) {
|
|
384
|
+
if (!u) throw Error(q);
|
|
385
385
|
return {
|
|
386
386
|
file: e,
|
|
387
387
|
id: (await u(t, e)).id,
|
|
@@ -389,20 +389,20 @@ function Y({ attachments: e, field: t, onChange: s, onDownloadAttachment: c, onS
|
|
|
389
389
|
status: "done"
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
|
-
async function
|
|
393
|
-
let n = await
|
|
394
|
-
errorMessage:
|
|
392
|
+
async function te(e, t) {
|
|
393
|
+
let n = await ee(t).catch((n) => ({
|
|
394
|
+
errorMessage: X(n),
|
|
395
395
|
file: t,
|
|
396
396
|
id: e,
|
|
397
397
|
status: "error"
|
|
398
398
|
}));
|
|
399
399
|
D.current(T.current.map((t) => t.id === e ? n : t));
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
h.has(e) ?
|
|
401
|
+
function ne(e, t) {
|
|
402
|
+
h.has(e) ? He(t) : c?.(e);
|
|
403
403
|
}
|
|
404
|
-
let
|
|
405
|
-
label:
|
|
404
|
+
let N = !!u && !d, re = [...!d && !u ? [{
|
|
405
|
+
label: q,
|
|
406
406
|
type: "info"
|
|
407
407
|
}] : [], ...p.filter((e) => e.status === "error").map((e) => ({
|
|
408
408
|
label: `${e.file?.name ?? "檔案"}:${e.errorMessage ?? "上傳失敗"},未附加。請重試或刪除。`,
|
|
@@ -410,19 +410,19 @@ function Y({ attachments: e, field: t, onChange: s, onDownloadAttachment: c, onS
|
|
|
410
410
|
}))];
|
|
411
411
|
return /* @__PURE__ */ S(y, {
|
|
412
412
|
accept: t.acceptedMimeTypes?.join(","),
|
|
413
|
-
disabled: !
|
|
413
|
+
disabled: !N,
|
|
414
414
|
files: w,
|
|
415
415
|
...re.length > 0 ? { hints: re } : {},
|
|
416
416
|
maxFiles: t.maxFiles,
|
|
417
417
|
mode: "button-list",
|
|
418
418
|
...(t.maxFiles ?? 1) > 1 ? { multiple: !0 } : {},
|
|
419
419
|
onChange: O,
|
|
420
|
-
onDownload:
|
|
420
|
+
onDownload: ne,
|
|
421
421
|
onReload: (e, t) => {
|
|
422
|
-
|
|
422
|
+
te(e, t);
|
|
423
423
|
},
|
|
424
|
-
onUpload: async (e) => Promise.all(e.map(async (e) =>
|
|
425
|
-
errorMessage:
|
|
424
|
+
onUpload: async (e) => Promise.all(e.map(async (e) => ee(e).catch((t) => ({
|
|
425
|
+
errorMessage: X(t),
|
|
426
426
|
file: e,
|
|
427
427
|
id: `failed-${e.name}-${e.lastModified}-${Math.random()}`,
|
|
428
428
|
status: "error"
|
|
@@ -430,9 +430,9 @@ function Y({ attachments: e, field: t, onChange: s, onDownloadAttachment: c, onS
|
|
|
430
430
|
size: "sub"
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Y(e, t) {
|
|
434
434
|
return t ? {
|
|
435
|
-
file:
|
|
435
|
+
file: Ve(t),
|
|
436
436
|
id: e,
|
|
437
437
|
progress: 100,
|
|
438
438
|
status: "done"
|
|
@@ -440,43 +440,43 @@ function X(e, t) {
|
|
|
440
440
|
id: e,
|
|
441
441
|
progress: 100,
|
|
442
442
|
status: "done",
|
|
443
|
-
url:
|
|
443
|
+
url: Be
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Ve(e) {
|
|
447
447
|
let t = new File([], e.filename), n = Number(e.sizeBytes);
|
|
448
448
|
return Number.isFinite(n) && n >= 0 && Object.defineProperty(t, "size", { value: n }), t;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function X(e) {
|
|
451
451
|
return e instanceof Error && e.message ? `上傳失敗:${e.message}` : "上傳失敗,請重試。";
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function He(e) {
|
|
454
454
|
let t = URL.createObjectURL(e), n = document.createElement("a");
|
|
455
455
|
n.href = t, n.download = e.name, n.style.display = "none", document.body.appendChild(n), n.click(), n.remove(), setTimeout(() => URL.revokeObjectURL(t), 3e4);
|
|
456
456
|
}
|
|
457
457
|
// src/views/forms/renderer/form-field-link.ts
|
|
458
|
-
var
|
|
459
|
-
function
|
|
458
|
+
var Ue = /\s/u;
|
|
459
|
+
function We(e) {
|
|
460
460
|
return [...e].some((e) => {
|
|
461
461
|
let t = e.codePointAt(0) ?? 0;
|
|
462
|
-
return t <= 32 || t >= 127 && t <= 160 ||
|
|
462
|
+
return t <= 32 || t >= 127 && t <= 160 || Ue.test(e);
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
var
|
|
466
|
-
function
|
|
467
|
-
return typeof e != "string" || !e || e.includes("\\") ||
|
|
465
|
+
var Z = /^https?:\/\//iu;
|
|
466
|
+
function Ge(e) {
|
|
467
|
+
return typeof e != "string" || !e || e.includes("\\") || We(e) ? null : e.startsWith("/") ? !e.startsWith("//") && Ke(e) ? {
|
|
468
468
|
external: !1,
|
|
469
469
|
href: e
|
|
470
|
-
} : null :
|
|
470
|
+
} : null : Z.test(e) && qe(e) ? {
|
|
471
471
|
external: !0,
|
|
472
472
|
href: e
|
|
473
473
|
} : null;
|
|
474
474
|
}
|
|
475
|
-
var
|
|
475
|
+
var Q = "http://placeholder.invalid";
|
|
476
476
|
function Ke(e) {
|
|
477
477
|
try {
|
|
478
|
-
let t = new URL(e,
|
|
479
|
-
return t.origin ===
|
|
478
|
+
let t = new URL(e, Q);
|
|
479
|
+
return t.origin === Q && !t.pathname.startsWith("//");
|
|
480
480
|
} catch {
|
|
481
481
|
return !1;
|
|
482
482
|
}
|
|
@@ -551,10 +551,10 @@ function et(e, t) {
|
|
|
551
551
|
}
|
|
552
552
|
function tt(e, t) {
|
|
553
553
|
let n = new Set(t.filter((e) => !e.unresolved).map((e) => e.id));
|
|
554
|
-
return
|
|
554
|
+
return ve(e).filter((e) => !n.has(e));
|
|
555
555
|
}
|
|
556
556
|
function nt(e, t) {
|
|
557
|
-
return
|
|
557
|
+
return ve(e).map((e) => t.find((t) => t.id === e) ?? $e(e));
|
|
558
558
|
}
|
|
559
559
|
function rt(e, t) {
|
|
560
560
|
if (e.length !== 0) return t ? e.map((e) => e.id) : e[0]?.id;
|
|
@@ -673,7 +673,7 @@ function _t({ name: e, onChange: t, placeholder: n, readonly: i, size: c, value:
|
|
|
673
673
|
let [u, d] = o([]), [f, p] = o([]), [m, h] = o(!1), [g, _] = o(!1), y = a(0), b = pt(l, u);
|
|
674
674
|
r(() => {
|
|
675
675
|
let e = !1;
|
|
676
|
-
return b === null ? () => void 0 : (
|
|
676
|
+
return b === null ? () => void 0 : (ye([b]).then((e) => {
|
|
677
677
|
let t = e.map(st);
|
|
678
678
|
return t.some((e) => e.id.toLowerCase() === b.toLowerCase()) ? t : [...t, lt(b)];
|
|
679
679
|
}).catch(() => [lt(b)]).then((t) => {
|
|
@@ -686,7 +686,7 @@ function _t({ name: e, onChange: t, placeholder: n, readonly: i, size: c, value:
|
|
|
686
686
|
let t = y.current + 1;
|
|
687
687
|
y.current = t, h(!0);
|
|
688
688
|
try {
|
|
689
|
-
let n = (await
|
|
689
|
+
let n = (await B(e)).map(st);
|
|
690
690
|
y.current === t && (p(n), _(!1), d((e) => mt(e, n)));
|
|
691
691
|
} catch {
|
|
692
692
|
y.current === t && (p([]), _(!0));
|
|
@@ -746,8 +746,8 @@ var vt = {
|
|
|
746
746
|
function St(e) {
|
|
747
747
|
e && (e.style.width = "100%");
|
|
748
748
|
}
|
|
749
|
-
function Ct({ attachments: e, dataSourceContext: t, dataSourceInitialValues: n, emptyText: s = "尚未建立欄位。", errors: c = {}, fieldAccess: l, fieldLabelMarkers: u, maxWidth: d, onChange: f, onDataSourceStateChange: p, onDownloadAttachment: m, onFileUploadStateChange: h, onUploadAttachment: g, optionSnapshots: _, readonly: y = !1, schema: b, singleColumn: x = !1, uiSchema: C, value:
|
|
750
|
-
let
|
|
749
|
+
function Ct({ attachments: e, dataSourceContext: t, dataSourceInitialValues: n, emptyText: s = "尚未建立欄位。", errors: c = {}, fieldAccess: l, fieldLabelMarkers: u, maxWidth: d, onChange: f, onDataSourceStateChange: p, onDownloadAttachment: m, onFileUploadStateChange: h, onUploadAttachment: g, optionSnapshots: _, readonly: y = !1, schema: b, singleColumn: x = !1, uiSchema: C, value: T }) {
|
|
750
|
+
let E = i(() => ({
|
|
751
751
|
attachments: e,
|
|
752
752
|
onDownloadAttachment: m,
|
|
753
753
|
onStateChange: h,
|
|
@@ -757,11 +757,11 @@ function Ct({ attachments: e, dataSourceContext: t, dataSourceInitialValues: n,
|
|
|
757
757
|
m,
|
|
758
758
|
h,
|
|
759
759
|
g
|
|
760
|
-
]), [D, O] = o(() =>
|
|
760
|
+
]), [D, O] = o(() => w(b.fields, T ?? {})), k = i(() => w(b.fields, T ?? D), [
|
|
761
761
|
D,
|
|
762
762
|
b.fields,
|
|
763
|
-
|
|
764
|
-
]), A = a(k), j = i(() =>
|
|
763
|
+
T
|
|
764
|
+
]), A = a(k), j = i(() => F(b, C, k).filter((e) => wt(l, e.fieldKey)?.visible !== !1), [
|
|
765
765
|
l,
|
|
766
766
|
b,
|
|
767
767
|
C,
|
|
@@ -770,14 +770,14 @@ function Ct({ attachments: e, dataSourceContext: t, dataSourceInitialValues: n,
|
|
|
770
770
|
r(() => {
|
|
771
771
|
A.current = k;
|
|
772
772
|
}, [k]), r(() => {
|
|
773
|
-
O((e) =>
|
|
774
|
-
}, [b.fields,
|
|
773
|
+
O((e) => w(b.fields, T ?? e));
|
|
774
|
+
}, [b.fields, T]);
|
|
775
775
|
function M(e, t) {
|
|
776
776
|
let n = {
|
|
777
777
|
...A.current,
|
|
778
778
|
[e]: t
|
|
779
779
|
};
|
|
780
|
-
A.current = n,
|
|
780
|
+
A.current = n, T || O(n), f?.(n);
|
|
781
781
|
}
|
|
782
782
|
return j.length ? /* @__PURE__ */ S("div", {
|
|
783
783
|
style: {
|
|
@@ -793,7 +793,7 @@ function Ct({ attachments: e, dataSourceContext: t, dataSourceInitialValues: n,
|
|
|
793
793
|
fields: b.fields,
|
|
794
794
|
labelMarker: u !== void 0 && Object.prototype.hasOwnProperty.call(u, e.fieldKey) ? u[e.fieldKey] : void 0,
|
|
795
795
|
onChange: M,
|
|
796
|
-
fileUpload:
|
|
796
|
+
fileUpload: E,
|
|
797
797
|
onDataSourceStateChange: p,
|
|
798
798
|
optionSnapshots: _,
|
|
799
799
|
readonly: Tt(wt(l, e.fieldKey), y),
|
|
@@ -801,7 +801,7 @@ function Ct({ attachments: e, dataSourceContext: t, dataSourceInitialValues: n,
|
|
|
801
801
|
style: {
|
|
802
802
|
...bt,
|
|
803
803
|
gridColumn: `span ${x ? 12 : Kt(e, C)}`,
|
|
804
|
-
...x && !
|
|
804
|
+
...x && !_e(e) ? { maxWidth: d } : {}
|
|
805
805
|
},
|
|
806
806
|
value: k[e.fieldKey],
|
|
807
807
|
values: k,
|
|
@@ -824,7 +824,7 @@ function Tt(e, t) {
|
|
|
824
824
|
return e === void 0 ? t : !e.editable;
|
|
825
825
|
}
|
|
826
826
|
function Et({ dataSourceContext: t, dataSourceInitialValues: n, error: i, errors: a, field: o, fields: s, fileUpload: l, labelMarker: u, onChange: d, onDataSourceStateChange: f, optionSnapshots: p, readonly: m, schema: h, style: g, value: _, values: y, uiSchema: b }) {
|
|
827
|
-
let x =
|
|
827
|
+
let x = A(o, s, y), w = m || k(o, s, y), T = H({
|
|
828
828
|
context: t,
|
|
829
829
|
field: o,
|
|
830
830
|
formData: y,
|
|
@@ -834,14 +834,14 @@ function Et({ dataSourceContext: t, dataSourceInitialValues: n, error: i, errors
|
|
|
834
834
|
readonly: w,
|
|
835
835
|
schema: h,
|
|
836
836
|
uiSchema: b
|
|
837
|
-
}), E =
|
|
837
|
+
}), E = je(T), D = JSON.stringify({
|
|
838
838
|
hasValue: T.hasValue,
|
|
839
839
|
invalidValues: T.invalidValues,
|
|
840
840
|
selectionExpired: T.selectionExpired === !0,
|
|
841
841
|
status: T.status
|
|
842
842
|
});
|
|
843
843
|
return r(() => {
|
|
844
|
-
|
|
844
|
+
he(o) && f?.(o.fieldKey, {
|
|
845
845
|
hasValue: T.hasValue,
|
|
846
846
|
invalidValues: T.invalidValues,
|
|
847
847
|
selectionExpired: T.selectionExpired === !0,
|
|
@@ -860,7 +860,7 @@ function Et({ dataSourceContext: t, dataSourceInitialValues: n, error: i, errors
|
|
|
860
860
|
...u ? { labelOptionalMarker: u } : {},
|
|
861
861
|
name: o.fieldKey,
|
|
862
862
|
required: x,
|
|
863
|
-
children:
|
|
863
|
+
children: _e(o) ? /* @__PURE__ */ S(Lt, {
|
|
864
864
|
dataSourceContext: t,
|
|
865
865
|
dataSourceInitialValues: n,
|
|
866
866
|
errors: a,
|
|
@@ -922,53 +922,53 @@ var Dt = "(另開新分頁)", Ot = "另開新分頁", kt = {
|
|
|
922
922
|
minWidth: 0
|
|
923
923
|
};
|
|
924
924
|
function Lt({ dataSourceContext: e, dataSourceInitialValues: t, errors: n, field: i, onChange: s, onDataSourceStateChange: l, optionSnapshots: u, readonly: d, schema: f, uiSchema: p, value: m, values: g }) {
|
|
925
|
-
let _ =
|
|
925
|
+
let _ = le(m), v = ce(i), y = a(0), [b, x] = o(() => _.map(() => Bt(y)));
|
|
926
926
|
r(() => {
|
|
927
927
|
b.length !== _.length && x(_.map(() => Bt(y)));
|
|
928
928
|
}, [b.length, _.length]);
|
|
929
|
-
function
|
|
929
|
+
function w(e) {
|
|
930
930
|
s(i.fieldKey, e);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
933
|
-
x([...b, Bt(y)]),
|
|
932
|
+
function T() {
|
|
933
|
+
x([...b, Bt(y)]), w([..._, E(i.columns)]);
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
x(b.filter((t, n) => n !== e)),
|
|
935
|
+
function D(e) {
|
|
936
|
+
x(b.filter((t, n) => n !== e)), w(_.filter((t, n) => n !== e));
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
|
|
938
|
+
function O(e, t, n) {
|
|
939
|
+
w(_.map((r, i) => i === e ? Vt(r, t, n) : r));
|
|
940
940
|
}
|
|
941
|
-
let
|
|
941
|
+
let k = _.map((e, t) => ({
|
|
942
942
|
...e,
|
|
943
943
|
index: t,
|
|
944
944
|
key: b[t] ?? `row-${t}`
|
|
945
|
-
})),
|
|
945
|
+
})), A = i.columns.map((r) => ({
|
|
946
946
|
key: r.fieldKey,
|
|
947
947
|
render: (a) => /* @__PURE__ */ S(Rt, {
|
|
948
948
|
column: r,
|
|
949
949
|
dataSourceContext: e,
|
|
950
|
-
error: n[
|
|
950
|
+
error: n[se(i.fieldKey, a.index, r.fieldKey)] ?? null,
|
|
951
951
|
fieldPath: `${i.fieldKey}.${r.fieldKey}`,
|
|
952
952
|
formData: g,
|
|
953
953
|
initialFormData: t,
|
|
954
954
|
initialRowValues: zt(t?.[i.fieldKey], a.index),
|
|
955
|
-
onChange: (e) =>
|
|
955
|
+
onChange: (e) => O(a.index, r.fieldKey, e),
|
|
956
956
|
onDataSourceStateChange: l,
|
|
957
957
|
optionSnapshots: u,
|
|
958
|
-
path:
|
|
958
|
+
path: se(i.fieldKey, a.index, r.fieldKey),
|
|
959
959
|
readonly: d,
|
|
960
960
|
rowValues: _[a.index] ?? {},
|
|
961
961
|
schema: f,
|
|
962
962
|
uiSchema: p
|
|
963
963
|
}, `${b[a.index] ?? a.index}-${r.fieldKey}`),
|
|
964
964
|
title: r.label || r.fieldKey
|
|
965
|
-
})),
|
|
965
|
+
})), j = d ? void 0 : {
|
|
966
966
|
render: (e) => [{
|
|
967
967
|
disabled: () => _.length <= v.minRows,
|
|
968
|
-
icon:
|
|
968
|
+
icon: L,
|
|
969
969
|
iconType: "icon-only",
|
|
970
970
|
name: "刪除此列",
|
|
971
|
-
onClick: () =>
|
|
971
|
+
onClick: () => D(e.index),
|
|
972
972
|
variant: "destructive-ghost"
|
|
973
973
|
}],
|
|
974
974
|
width: 56
|
|
@@ -978,11 +978,11 @@ function Lt({ dataSourceContext: e, dataSourceInitialValues: t, errors: n, field
|
|
|
978
978
|
children: [/* @__PURE__ */ S("div", {
|
|
979
979
|
style: Nt,
|
|
980
980
|
children: /* @__PURE__ */ S("div", {
|
|
981
|
-
style: { minWidth: i.columns.length * Pt + (
|
|
981
|
+
style: { minWidth: i.columns.length * Pt + (j ? Ft : 0) },
|
|
982
982
|
children: /* @__PURE__ */ S(h, {
|
|
983
|
-
...
|
|
984
|
-
columns:
|
|
985
|
-
dataSource: [...
|
|
983
|
+
...j ? { actions: j } : {},
|
|
984
|
+
columns: A,
|
|
985
|
+
dataSource: [...k],
|
|
986
986
|
rowHeightPreset: "roomy",
|
|
987
987
|
showHeader: !0,
|
|
988
988
|
size: "sub"
|
|
@@ -992,9 +992,9 @@ function Lt({ dataSourceContext: e, dataSourceInitialValues: t, errors: n, field
|
|
|
992
992
|
style: Mt,
|
|
993
993
|
children: /* @__PURE__ */ S(c, {
|
|
994
994
|
disabled: _.length >= v.maxRows,
|
|
995
|
-
icon:
|
|
995
|
+
icon: I,
|
|
996
996
|
iconType: "leading",
|
|
997
|
-
onClick:
|
|
997
|
+
onClick: T,
|
|
998
998
|
size: "sub",
|
|
999
999
|
type: "button",
|
|
1000
1000
|
variant: "base-secondary",
|
|
@@ -1004,7 +1004,7 @@ function Lt({ dataSourceContext: e, dataSourceInitialValues: t, errors: n, field
|
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
1006
|
function Rt({ column: e, dataSourceContext: t, error: n, fieldPath: i, formData: a, initialFormData: o, initialRowValues: s, onChange: l, onDataSourceStateChange: u, optionSnapshots: d, path: f, readonly: p, rowValues: m, schema: h, uiSchema: g }) {
|
|
1007
|
-
let _ = Ht(m, e.fieldKey), y =
|
|
1007
|
+
let _ = Ht(m, e.fieldKey), y = H({
|
|
1008
1008
|
context: t,
|
|
1009
1009
|
field: e,
|
|
1010
1010
|
fieldPath: i,
|
|
@@ -1020,14 +1020,14 @@ function Rt({ column: e, dataSourceContext: t, error: n, fieldPath: i, formData:
|
|
|
1020
1020
|
schema: h,
|
|
1021
1021
|
snapshotKey: f,
|
|
1022
1022
|
uiSchema: g
|
|
1023
|
-
}), b =
|
|
1023
|
+
}), b = je(y), x = JSON.stringify({
|
|
1024
1024
|
hasValue: y.hasValue,
|
|
1025
1025
|
invalidValues: y.invalidValues,
|
|
1026
1026
|
selectionExpired: y.selectionExpired === !0,
|
|
1027
1027
|
status: y.status
|
|
1028
1028
|
});
|
|
1029
1029
|
return r(() => {
|
|
1030
|
-
if (
|
|
1030
|
+
if (he(e)) return u?.(f, {
|
|
1031
1031
|
hasValue: y.hasValue,
|
|
1032
1032
|
invalidValues: y.invalidValues,
|
|
1033
1033
|
selectionExpired: y.selectionExpired === !0,
|
|
@@ -1071,13 +1071,13 @@ function Rt({ column: e, dataSourceContext: t, error: n, fieldPath: i, formData:
|
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
1073
|
function zt(e, t) {
|
|
1074
|
-
return
|
|
1074
|
+
return le(e)[t];
|
|
1075
1075
|
}
|
|
1076
1076
|
function Bt(e) {
|
|
1077
1077
|
return e.current += 1, `table-row-${e.current}`;
|
|
1078
1078
|
}
|
|
1079
1079
|
function Vt(e, t, n) {
|
|
1080
|
-
return n === void 0 || !
|
|
1080
|
+
return n === void 0 || !ge(n) ? Object.fromEntries(Object.entries(e).filter(([e]) => e !== t)) : {
|
|
1081
1081
|
...e,
|
|
1082
1082
|
[t]: n
|
|
1083
1083
|
};
|
|
@@ -1086,10 +1086,10 @@ function Ht(e, t) {
|
|
|
1086
1086
|
if (e && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
1087
1087
|
}
|
|
1088
1088
|
function Ut(e, t, n, r, i, a, o, s = "main") {
|
|
1089
|
-
return
|
|
1089
|
+
return he(e) ? Gt(e, t, n, r, a, o, s) : Wt(e, t, n, r, i, s);
|
|
1090
1090
|
}
|
|
1091
1091
|
function Wt(e, t, n, r, i, a = "main") {
|
|
1092
|
-
let o = n && (e.type === "text" || e.type === "textarea") && e.displayAs === "link" ?
|
|
1092
|
+
let o = n && (e.type === "text" || e.type === "textarea") && e.displayAs === "link" ? Ge(t) : null;
|
|
1093
1093
|
if (o) return /* @__PURE__ */ S(v, {
|
|
1094
1094
|
color: "text-brand",
|
|
1095
1095
|
component: "span",
|
|
@@ -1122,8 +1122,8 @@ function Wt(e, t, n, r, i, a = "main") {
|
|
|
1122
1122
|
onChange: (t) => r(e.fieldKey, t.target.checked),
|
|
1123
1123
|
size: a
|
|
1124
1124
|
});
|
|
1125
|
-
if (
|
|
1126
|
-
let i = e.options.map(
|
|
1125
|
+
if (R(e) && e.type === "checkbox") {
|
|
1126
|
+
let i = e.options.map(N);
|
|
1127
1127
|
return /* @__PURE__ */ S(m, {
|
|
1128
1128
|
mode: "multiple",
|
|
1129
1129
|
onChange: (t) => r(e.fieldKey, t?.length ? t.map((e) => e.id) : void 0),
|
|
@@ -1131,18 +1131,18 @@ function Wt(e, t, n, r, i, a = "main") {
|
|
|
1131
1131
|
placeholder: e.placeholder ?? "請選擇一或多個選項",
|
|
1132
1132
|
readOnly: n,
|
|
1133
1133
|
size: a,
|
|
1134
|
-
value: i.filter((e) =>
|
|
1134
|
+
value: i.filter((e) => W(t).includes(e.id))
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
if (
|
|
1138
|
-
let i = e.options.map(
|
|
1137
|
+
if (R(e)) {
|
|
1138
|
+
let i = e.options.map(N);
|
|
1139
1139
|
return /* @__PURE__ */ S(m, {
|
|
1140
1140
|
onChange: (t) => r(e.fieldKey, t?.id ?? void 0),
|
|
1141
1141
|
options: i,
|
|
1142
1142
|
placeholder: e.placeholder ?? "請選擇",
|
|
1143
1143
|
readOnly: n,
|
|
1144
1144
|
size: a,
|
|
1145
|
-
value:
|
|
1145
|
+
value: fe(i, qt(t))
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
1148
|
return e.type === "member" ? /* @__PURE__ */ S(it, {
|
|
@@ -1160,7 +1160,7 @@ function Wt(e, t, n, r, i, a = "main") {
|
|
|
1160
1160
|
readonly: n,
|
|
1161
1161
|
size: a,
|
|
1162
1162
|
value: t
|
|
1163
|
-
}) : e.type === "file_upload" ? /* @__PURE__ */ S(
|
|
1163
|
+
}) : e.type === "file_upload" ? /* @__PURE__ */ S(J, {
|
|
1164
1164
|
attachments: i?.attachments,
|
|
1165
1165
|
field: e,
|
|
1166
1166
|
onChange: (t) => r(e.fieldKey, t),
|
|
@@ -1172,26 +1172,26 @@ function Wt(e, t, n, r, i, a = "main") {
|
|
|
1172
1172
|
}) : e.type === "date" ? /* @__PURE__ */ S(u, {
|
|
1173
1173
|
format: "YYYY-MM-DD",
|
|
1174
1174
|
fullWidth: !0,
|
|
1175
|
-
onChange: (t) => r(e.fieldKey,
|
|
1175
|
+
onChange: (t) => r(e.fieldKey, D(t)),
|
|
1176
1176
|
placeholder: e.placeholder ?? Yt(e.type),
|
|
1177
1177
|
readOnly: n,
|
|
1178
|
-
value:
|
|
1178
|
+
value: ne(t)
|
|
1179
1179
|
}) : e.type === "datetime" ? /* @__PURE__ */ S(d, {
|
|
1180
1180
|
formatDate: "YYYY-MM-DD",
|
|
1181
1181
|
formatTime: "HH:mm",
|
|
1182
1182
|
fullWidth: !0,
|
|
1183
1183
|
hideSecond: !0,
|
|
1184
|
-
onChange: (t) => r(e.fieldKey,
|
|
1184
|
+
onChange: (t) => r(e.fieldKey, O(t)),
|
|
1185
1185
|
placeholderLeft: "選擇日期",
|
|
1186
1186
|
placeholderRight: "選擇時間",
|
|
1187
1187
|
readOnly: n,
|
|
1188
|
-
value:
|
|
1188
|
+
value: ne(t)
|
|
1189
1189
|
}) : e.type === "number" || e.type === "money" ? /* @__PURE__ */ S(f, {
|
|
1190
1190
|
fullWidth: !0,
|
|
1191
1191
|
max: e.maximum,
|
|
1192
1192
|
min: e.minimum,
|
|
1193
1193
|
size: a,
|
|
1194
|
-
onChange: (t) => r(e.fieldKey,
|
|
1194
|
+
onChange: (t) => r(e.fieldKey, T(M(t.target.value), {
|
|
1195
1195
|
max: e.maximum,
|
|
1196
1196
|
min: e.minimum
|
|
1197
1197
|
})),
|
|
@@ -1211,8 +1211,8 @@ function Wt(e, t, n, r, i, a = "main") {
|
|
|
1211
1211
|
});
|
|
1212
1212
|
}
|
|
1213
1213
|
function Gt(e, t, n, r, i, a, o = "main") {
|
|
1214
|
-
let c = a.options.map(
|
|
1215
|
-
return e.type === "autocomplete" ?
|
|
1214
|
+
let c = a.options.map(N), u = pe(t, a.options).map(N), d = a.status === "LOADING", f = a.status === "WAITING_FOR_DEPENDENCIES", h = !!i && !n, g = n || f, _ = n;
|
|
1215
|
+
return e.type === "autocomplete" ? z(e) === "multiple" ? /* @__PURE__ */ S(s, {
|
|
1216
1216
|
asyncData: h,
|
|
1217
1217
|
clearSearchText: !0,
|
|
1218
1218
|
disabled: _,
|
|
@@ -1260,8 +1260,8 @@ function Gt(e, t, n, r, i, a, o = "main") {
|
|
|
1260
1260
|
label: e.name,
|
|
1261
1261
|
value: e.id
|
|
1262
1262
|
})),
|
|
1263
|
-
value: [...
|
|
1264
|
-
}) :
|
|
1263
|
+
value: [...W(t)]
|
|
1264
|
+
}) : z(e) === "multiple" ? /* @__PURE__ */ S(m, {
|
|
1265
1265
|
disabled: g,
|
|
1266
1266
|
loading: d,
|
|
1267
1267
|
mode: "multiple",
|
|
@@ -1316,6 +1316,6 @@ function Yt(e) {
|
|
|
1316
1316
|
textarea: "請輸入多行文字"
|
|
1317
1317
|
}[e];
|
|
1318
1318
|
}
|
|
1319
|
-
export {
|
|
1319
|
+
export { G as a, je as c, Je as i, Me as l, st as n, K as o, Ye as r, U as s, Ct as t, H as u };
|
|
1320
1320
|
|
|
1321
|
-
//# sourceMappingURL=FormRendererView-
|
|
1321
|
+
//# sourceMappingURL=FormRendererView-BcQKUi1A.js.map
|