@rytass/bpm-core-react 0.9.1 → 0.11.0
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 +50 -0
- package/dist/chunks/FormBuilderView-CAqjOYAP.cjs +3 -0
- package/dist/chunks/{FormBuilderView-BPLwAJGv.cjs.map → FormBuilderView-CAqjOYAP.cjs.map} +1 -1
- package/dist/chunks/{FormBuilderView-Do9-MIAe.js → FormBuilderView-TzSezeqC.js} +18 -16
- package/dist/chunks/{FormBuilderView-Do9-MIAe.js.map → FormBuilderView-TzSezeqC.js.map} +1 -1
- package/dist/chunks/{FormRendererView-C5POZbWz.js → FormRendererView-BurlEDUu.js} +232 -144
- package/dist/chunks/FormRendererView-BurlEDUu.js.map +1 -0
- package/dist/chunks/FormRendererView-Dde1s3I0.cjs +2 -0
- package/dist/chunks/FormRendererView-Dde1s3I0.cjs.map +1 -0
- package/dist/chunks/admin-pickers-Btvij1at.cjs.map +1 -1
- package/dist/chunks/admin-pickers-DLlG_1du.js.map +1 -1
- package/dist/chunks/approval-instance-list-page-BjX2kaoF.js.map +1 -1
- package/dist/chunks/approval-instance-list-page-CWiQvnfE.cjs +2 -0
- package/dist/chunks/{approval-instance-list-page-C408vxE2.cjs.map → approval-instance-list-page-CWiQvnfE.cjs.map} +1 -1
- package/dist/chunks/auth-provider-4BeCw7cI.cjs.map +1 -1
- package/dist/chunks/auth-provider-B5oPmvk2.js.map +1 -1
- package/dist/chunks/bpm-form-field-Bc6k4ZEO.cjs.map +1 -1
- package/dist/chunks/categories-DGlxuC6X.js.map +1 -1
- package/dist/chunks/categories-Yid05WAX.cjs +2 -0
- package/dist/chunks/{categories-DUfldZ_9.cjs.map → categories-Yid05WAX.cjs.map} +1 -1
- package/dist/chunks/{compose-DJBlA5PD.js → compose-CUOe5Ia9.js} +4 -4
- package/dist/chunks/{compose-DJBlA5PD.js.map → compose-CUOe5Ia9.js.map} +1 -1
- package/dist/chunks/compose-CyRkXdeu.cjs +2 -0
- package/dist/chunks/{compose-CULMDsLS.cjs.map → compose-CyRkXdeu.cjs.map} +1 -1
- package/dist/chunks/dashboard-page-CH87L5nx.cjs +2 -0
- package/dist/chunks/{dashboard-page-DwHQY6Ki.cjs.map → dashboard-page-CH87L5nx.cjs.map} +1 -1
- package/dist/chunks/dashboard-page-DJ9vOPga.js.map +1 -1
- package/dist/chunks/{delegations-DLEEFBlH.js → delegations-0MbJ7CWj.js} +3 -2
- package/dist/chunks/{delegations-DLEEFBlH.js.map → delegations-0MbJ7CWj.js.map} +1 -1
- package/dist/chunks/delegations-Bc9psOZ3.cjs +2 -0
- package/dist/chunks/{delegations-CGj-tZNO.cjs.map → delegations-Bc9psOZ3.cjs.map} +1 -1
- package/dist/chunks/{delegations-DqMpI_Nk.js → delegations-DyMGIDpp.js} +3 -2
- package/dist/chunks/{delegations-DqMpI_Nk.js.map → delegations-DyMGIDpp.js.map} +1 -1
- package/dist/chunks/delegations-vpLtus9g.cjs +2 -0
- package/dist/chunks/{delegations-kbMOSEif.cjs.map → delegations-vpLtus9g.cjs.map} +1 -1
- package/dist/chunks/{designer-BszXJ5RO.js → designer-Cb3WAC46.js} +39 -30
- package/dist/chunks/{designer-BszXJ5RO.js.map → designer-Cb3WAC46.js.map} +1 -1
- package/dist/chunks/designer-zLliyrHu.cjs +65 -0
- package/dist/chunks/{designer-CmqAU92b.cjs.map → designer-zLliyrHu.cjs.map} +1 -1
- package/dist/chunks/detail-Bp2Nv0cs.cjs +2 -0
- package/dist/chunks/detail-Bp2Nv0cs.cjs.map +1 -0
- package/dist/chunks/{detail-DAak2OXS.js → detail-Cmw-aQcu.js} +33 -32
- package/dist/chunks/detail-Cmw-aQcu.js.map +1 -0
- package/dist/chunks/format-date-time-CB-LxzqT.js.map +1 -1
- package/dist/chunks/format-date-time-D-cx5M8z.cjs +2 -0
- package/dist/chunks/{format-date-time-XxBzF0F5.cjs.map → format-date-time-D-cx5M8z.cjs.map} +1 -1
- package/dist/chunks/login-9bCXyjbX.cjs.map +1 -1
- package/dist/chunks/login-BKxpLibd.js.map +1 -1
- package/dist/chunks/notifications-Bc4mgSds.cjs +2 -0
- package/dist/chunks/{notifications--hwl-DR0.cjs.map → notifications-Bc4mgSds.cjs.map} +1 -1
- package/dist/chunks/notifications-DJ5wzCye.js.map +1 -1
- package/dist/chunks/{orgs-DytLvZ_X.js → orgs-B930facb.js} +11 -10
- package/dist/chunks/{orgs-DytLvZ_X.js.map → orgs-B930facb.js.map} +1 -1
- package/dist/chunks/orgs-BefGgeyc.cjs +2 -0
- package/dist/chunks/{orgs-Ni22buHs.cjs.map → orgs-BefGgeyc.cjs.map} +1 -1
- package/dist/chunks/providers-BsEn3ikK.cjs +2 -0
- package/dist/chunks/{providers-D_zTbkQH.cjs.map → providers-BsEn3ikK.cjs.map} +1 -1
- package/dist/chunks/{providers-DEqcuXw9.js → providers-DjLh4oLY.js} +3 -3
- package/dist/chunks/{providers-DEqcuXw9.js.map → providers-DjLh4oLY.js.map} +1 -1
- package/dist/chunks/{chunk-CMqjfN_6.cjs → rolldown-runtime-BocRIvOZ.cjs} +1 -1
- package/dist/chunks/router-adapter--gYs13E8.cjs.map +1 -1
- package/dist/chunks/routes-config-fDVHmvXi.cjs.map +1 -1
- package/dist/chunks/users-C9LA-Rd7.cjs +2 -0
- package/dist/chunks/{users-0HqlM_VQ.cjs.map → users-C9LA-Rd7.cjs.map} +1 -1
- package/dist/chunks/users-FWrb3ehW.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +9 -9
- package/dist/next/index.js.map +1 -1
- package/dist/next/workflow-chat-route.cjs +1 -1
- package/dist/next/workflow-chat-route.cjs.map +1 -1
- package/dist/next/workflow-chat-route.js +2 -1
- package/dist/next/workflow-chat-route.js.map +1 -1
- package/dist/pages/admin/delegations/index.cjs +1 -1
- package/dist/pages/admin/delegations/index.cjs.map +1 -1
- package/dist/pages/admin/delegations/index.js +1 -1
- package/dist/pages/admin/orgs/index.cjs +1 -1
- package/dist/pages/admin/orgs/index.cjs.map +1 -1
- package/dist/pages/admin/orgs/index.js +1 -1
- package/dist/pages/admin/users/index.cjs +1 -1
- package/dist/pages/admin/users/index.cjs.map +1 -1
- package/dist/pages/cc/index.cjs.map +1 -1
- package/dist/pages/dashboard/index.cjs.map +1 -1
- package/dist/pages/delegations/index.cjs +1 -1
- package/dist/pages/delegations/index.cjs.map +1 -1
- package/dist/pages/delegations/index.js +1 -1
- package/dist/pages/inbox/index.cjs.map +1 -1
- package/dist/pages/instances/detail/index.cjs +1 -1
- package/dist/pages/instances/detail/index.cjs.map +1 -1
- package/dist/pages/instances/detail/index.js +1 -1
- package/dist/pages/instances/new/index.cjs.map +1 -1
- package/dist/pages/login/index.cjs.map +1 -1
- package/dist/pages/root/index.cjs.map +1 -1
- package/dist/pages/search/index.cjs.map +1 -1
- package/dist/pages/sent/index.cjs.map +1 -1
- package/dist/pages/settings/notifications/index.cjs +1 -1
- package/dist/pages/settings/notifications/index.cjs.map +1 -1
- package/dist/pages/templates/categories/index.cjs +1 -1
- package/dist/pages/templates/categories/index.cjs.map +1 -1
- package/dist/pages/templates/compose/index.cjs +1 -1
- package/dist/pages/templates/compose/index.cjs.map +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.cjs.map +1 -1
- package/dist/pages/templates/designer/index.js +1 -1
- package/dist/pages/templates/index.cjs.map +1 -1
- package/dist/pages/templates/versions/index.cjs.map +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 +2 -2
- package/dist/views/admin/orgs/index.cjs +1 -1
- package/dist/views/admin/orgs/index.js +1 -1
- package/dist/views/admin/users/index.cjs +1 -1
- package/dist/views/cc/index.cjs +1 -1
- package/dist/views/cc/index.cjs.map +1 -1
- package/dist/views/dashboard/index.cjs +1 -1
- package/dist/views/dashboard/index.cjs.map +1 -1
- package/dist/views/delegations/index.cjs +1 -1
- package/dist/views/delegations/index.js +1 -1
- package/dist/views/forms/builder/index.cjs +1 -1
- package/dist/views/forms/builder/index.js +1 -1
- package/dist/views/forms/renderer/form-data-source-field.d.ts +15 -0
- package/dist/views/forms/renderer/index.cjs +1 -1
- package/dist/views/forms/renderer/index.js +2 -2
- package/dist/views/inbox/index.cjs +1 -1
- package/dist/views/inbox/index.cjs.map +1 -1
- package/dist/views/inbox/index.js.map +1 -1
- package/dist/views/instances/detail/index.cjs +1 -1
- package/dist/views/instances/detail/index.js +1 -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 -6
- package/dist/views/instances/new/index.js.map +1 -1
- package/dist/views/search/index.cjs +1 -1
- package/dist/views/search/index.cjs.map +1 -1
- package/dist/views/sent/index.cjs +1 -1
- package/dist/views/sent/index.cjs.map +1 -1
- package/dist/views/settings/index.cjs +1 -1
- package/dist/views/settings/notifications/index.cjs +1 -1
- package/dist/views/templates/categories/index.cjs +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/index.cjs +1 -1
- package/dist/views/templates/designer/index.js +1 -1
- package/dist/views/templates/index.cjs +1 -1
- package/dist/views/templates/index.cjs.map +1 -1
- package/dist/views/templates/index.js.map +1 -1
- package/dist/views/templates/versions/index.cjs +1 -1
- package/dist/views/templates/versions/index.cjs.map +1 -1
- package/dist/views/templates/versions/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunks/FormBuilderView-BPLwAJGv.cjs +0 -3
- package/dist/chunks/FormRendererView-C5POZbWz.js.map +0 -1
- package/dist/chunks/FormRendererView-DNtNodNl.cjs +0 -2
- package/dist/chunks/FormRendererView-DNtNodNl.cjs.map +0 -1
- package/dist/chunks/approval-instance-list-page-C408vxE2.cjs +0 -2
- package/dist/chunks/categories-DUfldZ_9.cjs +0 -2
- package/dist/chunks/compose-CULMDsLS.cjs +0 -2
- package/dist/chunks/dashboard-page-DwHQY6Ki.cjs +0 -2
- package/dist/chunks/delegations-CGj-tZNO.cjs +0 -2
- package/dist/chunks/delegations-kbMOSEif.cjs +0 -2
- package/dist/chunks/designer-CmqAU92b.cjs +0 -65
- package/dist/chunks/detail-CDexqBoU.cjs +0 -2
- package/dist/chunks/detail-CDexqBoU.cjs.map +0 -1
- package/dist/chunks/detail-DAak2OXS.js.map +0 -1
- package/dist/chunks/format-date-time-XxBzF0F5.cjs +0 -2
- package/dist/chunks/notifications--hwl-DR0.cjs +0 -2
- package/dist/chunks/orgs-Ni22buHs.cjs +0 -2
- package/dist/chunks/providers-D_zTbkQH.cjs +0 -2
- package/dist/chunks/users-0HqlM_VQ.cjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "./bpm-form-field-Cao0rMol.js";
|
|
3
|
-
import { t } from "./FormRendererView-
|
|
3
|
+
import { t } from "./FormRendererView-BurlEDUu.js";
|
|
4
4
|
import { useEffect as n, useMemo as r, useState as i } from "react";
|
|
5
5
|
import { Accordion as a, Badge as o, BaseCard as ee, Button as s, DatePicker as c, DateTimePicker as te, Icon as l, Input as u, Modal as ne, Section as re, SectionGroup as ie, Select as d, Tab as ae, TabItem as f, Table as oe, Textarea as se, Toggle as ce, Typography as p } from "@mezzanine-ui/react";
|
|
6
6
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
@@ -373,17 +373,17 @@ function F({ onChange: le, value: _ }) {
|
|
|
373
373
|
});
|
|
374
374
|
}, [y, x]);
|
|
375
375
|
function pn(e) {
|
|
376
|
-
let t =
|
|
376
|
+
let t = y.fields.length + 1, n = _e(e, t);
|
|
377
377
|
b({
|
|
378
378
|
...y,
|
|
379
|
-
fields: [...y.fields,
|
|
379
|
+
fields: [...y.fields, n]
|
|
380
380
|
}), S({
|
|
381
381
|
...x,
|
|
382
382
|
layout: [...x.layout, {
|
|
383
|
-
fieldKey:
|
|
383
|
+
fieldKey: n.fieldKey,
|
|
384
384
|
width: e === "textarea" || e === "file_upload" ? "FULL" : "HALF"
|
|
385
385
|
}]
|
|
386
|
-
}), z(
|
|
386
|
+
}), z(n.fieldKey), an("design"), F(null);
|
|
387
387
|
}
|
|
388
388
|
function mn(e) {
|
|
389
389
|
let t = e;
|
|
@@ -432,8 +432,8 @@ function F({ onChange: le, value: _ }) {
|
|
|
432
432
|
let t = G.fieldKey, n = e(G), r = n.fieldKey, i = {
|
|
433
433
|
...y,
|
|
434
434
|
fields: y.fields.map((e) => e.fieldKey === t ? n : e)
|
|
435
|
-
};
|
|
436
|
-
b(
|
|
435
|
+
}, a = t === r ? i : Be(i, t, r);
|
|
436
|
+
b(a), S({
|
|
437
437
|
...x,
|
|
438
438
|
layout: x.layout.map((e) => e.fieldKey === t ? {
|
|
439
439
|
...e,
|
|
@@ -526,7 +526,8 @@ function F({ onChange: le, value: _ }) {
|
|
|
526
526
|
async function Cn() {
|
|
527
527
|
fn(!0);
|
|
528
528
|
try {
|
|
529
|
-
|
|
529
|
+
let e = await we(y, x);
|
|
530
|
+
H(e.errors.map(ze));
|
|
530
531
|
} catch {
|
|
531
532
|
H(["目前無法完成 DataSource schema 驗證。"]);
|
|
532
533
|
} finally {
|
|
@@ -1045,7 +1046,7 @@ function F({ onChange: le, value: _ }) {
|
|
|
1045
1046
|
let t = typeof e.defaultValue == "boolean" ? String(e.defaultValue) : "unset";
|
|
1046
1047
|
return $("預設值", "fieldDefaultValue", /* @__PURE__ */ h(d, {
|
|
1047
1048
|
clearable: !1,
|
|
1048
|
-
onChange: (e) => wn({ defaultValue: e?.id === "true"
|
|
1049
|
+
onChange: (e) => wn({ defaultValue: e?.id === "true" || e?.id !== "false" && void 0 }),
|
|
1049
1050
|
options: [...Bt],
|
|
1050
1051
|
placeholder: "選擇預設狀態",
|
|
1051
1052
|
value: T(Bt, t)
|
|
@@ -1177,6 +1178,12 @@ function F({ onChange: le, value: _ }) {
|
|
|
1177
1178
|
});
|
|
1178
1179
|
}
|
|
1179
1180
|
function $n(e) {
|
|
1181
|
+
let t = e.options.map((t, n) => ({
|
|
1182
|
+
index: n,
|
|
1183
|
+
key: `${e.fieldKey}-${n}`,
|
|
1184
|
+
label: t.label,
|
|
1185
|
+
value: t.value
|
|
1186
|
+
}));
|
|
1180
1187
|
return /* @__PURE__ */ g("div", {
|
|
1181
1188
|
style: Dt,
|
|
1182
1189
|
children: [/* @__PURE__ */ h(oe, {
|
|
@@ -1212,12 +1219,7 @@ function F({ onChange: le, value: _ }) {
|
|
|
1212
1219
|
}),
|
|
1213
1220
|
title: "Value"
|
|
1214
1221
|
}],
|
|
1215
|
-
dataSource:
|
|
1216
|
-
index: n,
|
|
1217
|
-
key: `${e.fieldKey}-${n}`,
|
|
1218
|
-
label: t.label,
|
|
1219
|
-
value: t.value
|
|
1220
|
-
})),
|
|
1222
|
+
dataSource: t,
|
|
1221
1223
|
showHeader: !0,
|
|
1222
1224
|
size: "sub"
|
|
1223
1225
|
}), /* @__PURE__ */ h("div", {
|
|
@@ -1474,4 +1476,4 @@ function rn(e, t, n) {
|
|
|
1474
1476
|
//#endregion
|
|
1475
1477
|
export { F as t };
|
|
1476
1478
|
|
|
1477
|
-
//# sourceMappingURL=FormBuilderView-
|
|
1479
|
+
//# sourceMappingURL=FormBuilderView-TzSezeqC.js.map
|