@rytass/bpm-core-react 0.15.0 → 0.17.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 +86 -0
- package/README.md +54 -6
- package/dist/chunks/{FormBuilderView-CLg-JYmu.js → FormBuilderView-BYL42M0d.js} +13 -33
- package/dist/chunks/FormBuilderView-BYL42M0d.js.map +1 -0
- package/dist/chunks/FormBuilderView-aBcA-_tt.cjs +3 -0
- package/dist/chunks/FormBuilderView-aBcA-_tt.cjs.map +1 -0
- package/dist/chunks/FormRendererView-DRFi_IH7.cjs +4 -0
- package/dist/chunks/FormRendererView-DRFi_IH7.cjs.map +1 -0
- package/dist/chunks/{FormRendererView-DU9LLrOF.js → FormRendererView-cZGOOjU5.js} +319 -332
- package/dist/chunks/FormRendererView-cZGOOjU5.js.map +1 -0
- package/dist/chunks/{admin-pickers-DLlG_1du.js → admin-pickers-DxhzECkD.js} +52 -51
- package/dist/chunks/admin-pickers-DxhzECkD.js.map +1 -0
- package/dist/chunks/admin-pickers-qe3j--gX.cjs +2 -0
- package/dist/chunks/admin-pickers-qe3j--gX.cjs.map +1 -0
- package/dist/chunks/approval-instance-list-page-CPXMP3PL.js.map +1 -1
- package/dist/chunks/approval-instance-list-page-ax0pm8bt.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/bpm-form-field-Cao0rMol.js.map +1 -1
- package/dist/chunks/{categories-DGlxuC6X.js → categories-1gKxeEqw.js} +4 -10
- package/dist/chunks/categories-1gKxeEqw.js.map +1 -0
- package/dist/chunks/{categories-Yid05WAX.cjs → categories-DjENouRm.cjs} +2 -2
- package/dist/chunks/categories-DjENouRm.cjs.map +1 -0
- package/dist/chunks/{compose-BtQPBd1Q.js → compose-Crklayzy.js} +4 -4
- package/dist/chunks/compose-Crklayzy.js.map +1 -0
- package/dist/chunks/{compose-DZhTQOt4.cjs → compose-DZ7RKvUp.cjs} +2 -2
- package/dist/chunks/compose-DZ7RKvUp.cjs.map +1 -0
- package/dist/chunks/dashboard-page-BWQBSGDq.cjs +2 -0
- package/dist/chunks/dashboard-page-BWQBSGDq.cjs.map +1 -0
- package/dist/chunks/{dashboard-page-CeCLV1tp.js → dashboard-page-DdBvV6YI.js} +15 -16
- package/dist/chunks/dashboard-page-DdBvV6YI.js.map +1 -0
- package/dist/chunks/delegations-Ckf03icM.cjs +2 -0
- package/dist/chunks/delegations-Ckf03icM.cjs.map +1 -0
- package/dist/chunks/{delegations-DRupxJ4_.js → delegations-MxF3uJGW.js} +205 -215
- package/dist/chunks/delegations-MxF3uJGW.js.map +1 -0
- package/dist/chunks/delegations-V9HIe3_P.cjs +2 -0
- package/dist/chunks/delegations-V9HIe3_P.cjs.map +1 -0
- package/dist/chunks/{delegations-B8gLSt0i.js → delegations-xUt1tj8d.js} +168 -173
- package/dist/chunks/delegations-xUt1tj8d.js.map +1 -0
- package/dist/chunks/{designer-CrbBRPUU.js → designer-D9eFma1W.js} +1180 -1134
- package/dist/chunks/designer-D9eFma1W.js.map +1 -0
- package/dist/chunks/designer-sJGTGYOf.cjs +65 -0
- package/dist/chunks/designer-sJGTGYOf.cjs.map +1 -0
- package/dist/chunks/detail-DRCTnuKm.cjs +2 -0
- package/dist/chunks/detail-DRCTnuKm.cjs.map +1 -0
- package/dist/chunks/{detail-_c21WQla.js → detail-DScLf42P.js} +849 -836
- package/dist/chunks/detail-DScLf42P.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.map +1 -1
- package/dist/chunks/format-member-label-DudVI55w.js +13 -0
- package/dist/chunks/format-member-label-DudVI55w.js.map +1 -0
- package/dist/chunks/format-member-label-t7ANTF62.cjs +2 -0
- package/dist/chunks/format-member-label-t7ANTF62.cjs.map +1 -0
- package/dist/chunks/login-AtVxZBsC.cjs.map +1 -1
- package/dist/chunks/login-C6qlTC6F.js.map +1 -1
- package/dist/chunks/notifications-Bc4mgSds.cjs.map +1 -1
- package/dist/chunks/notifications-DJ5wzCye.js.map +1 -1
- package/dist/chunks/{orgs-BpqVu5ka.js → orgs-CY0i1fie.js} +787 -766
- package/dist/chunks/orgs-CY0i1fie.js.map +1 -0
- package/dist/chunks/orgs-Dr0FFoZo.cjs +2 -0
- package/dist/chunks/orgs-Dr0FFoZo.cjs.map +1 -0
- package/dist/chunks/providers-DHtDZFNA.cjs.map +1 -1
- package/dist/chunks/providers-J5eyByQj.js.map +1 -1
- package/dist/chunks/router-adapter--gYs13E8.cjs.map +1 -1
- package/dist/chunks/router-adapter-DftlFTOd.js.map +1 -1
- package/dist/chunks/routes-config-C1j_vFKo.cjs.map +1 -1
- package/dist/chunks/routes-config-yZbESPlw.js.map +1 -1
- package/dist/chunks/task-node-label-BF6UllxP.cjs.map +1 -1
- package/dist/chunks/task-node-label-CWZgOBj0.js.map +1 -1
- package/dist/chunks/use-bpm-member-D57LKe_u.js.map +1 -1
- package/dist/chunks/use-bpm-member-DpNAQtNC.cjs.map +1 -1
- package/dist/chunks/users-BCyePbwB.js +422 -0
- package/dist/chunks/users-BCyePbwB.js.map +1 -0
- package/dist/chunks/users-DVBJluFR.cjs +2 -0
- package/dist/chunks/users-DVBJluFR.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/format-member-label.d.ts +12 -0
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js.map +1 -1
- package/dist/next/workflow-chat-route.cjs.map +1 -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/delegations/index.js.map +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/orgs/index.js.map +1 -1
- package/dist/pages/admin/users/index.cjs +1 -1
- package/dist/pages/admin/users/index.cjs.map +1 -1
- package/dist/pages/admin/users/index.js +1 -1
- package/dist/pages/admin/users/index.js.map +1 -1
- package/dist/pages/admin/webhook-endpoints/index.cjs.map +1 -1
- package/dist/pages/admin/webhook-endpoints/index.js.map +1 -1
- package/dist/pages/cc/index.cjs.map +1 -1
- package/dist/pages/cc/index.js.map +1 -1
- package/dist/pages/dashboard/index.cjs.map +1 -1
- package/dist/pages/dashboard/index.js.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/delegations/index.js.map +1 -1
- package/dist/pages/inbox/index.cjs.map +1 -1
- package/dist/pages/inbox/index.js.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/detail/index.js.map +1 -1
- package/dist/pages/instances/new/index.cjs.map +1 -1
- package/dist/pages/instances/new/index.js.map +1 -1
- package/dist/pages/login/index.cjs.map +1 -1
- package/dist/pages/login/index.js.map +1 -1
- package/dist/pages/root/index.cjs.map +1 -1
- package/dist/pages/root/index.js.map +1 -1
- package/dist/pages/search/index.cjs.map +1 -1
- package/dist/pages/search/index.js.map +1 -1
- package/dist/pages/sent/index.cjs.map +1 -1
- package/dist/pages/sent/index.js.map +1 -1
- package/dist/pages/settings/notifications/index.cjs.map +1 -1
- package/dist/pages/settings/notifications/index.js.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/categories/index.js +1 -1
- package/dist/pages/templates/categories/index.js.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/compose/index.js.map +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/designer/index.js.map +1 -1
- package/dist/pages/templates/index.cjs.map +1 -1
- package/dist/pages/templates/index.js.map +1 -1
- package/dist/pages/templates/versions/index.cjs.map +1 -1
- package/dist/pages/templates/versions/index.js.map +1 -1
- package/dist/views/admin/delegations/index.cjs +1 -1
- package/dist/views/admin/delegations/index.js +1 -2
- package/dist/views/admin/index.cjs +1 -1
- package/dist/views/admin/index.js +3 -3
- package/dist/views/admin/orgs/index.cjs +1 -1
- package/dist/views/admin/orgs/index.js +1 -2
- package/dist/views/admin/users/MemberTaskReassignModal.d.ts +13 -0
- package/dist/views/admin/users/index.cjs +1 -1
- package/dist/views/admin/users/index.js +1 -2
- package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
- package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
- package/dist/views/cc/index.cjs.map +1 -1
- package/dist/views/cc/index.js.map +1 -1
- package/dist/views/dashboard/index.cjs +1 -1
- package/dist/views/dashboard/index.cjs.map +1 -1
- package/dist/views/dashboard/index.js +1 -1
- package/dist/views/dashboard/index.js.map +1 -1
- package/dist/views/delegations/index.cjs +1 -1
- package/dist/views/delegations/index.js +1 -2
- package/dist/views/forms/builder/index.cjs +1 -1
- package/dist/views/forms/builder/index.js +1 -2
- package/dist/views/forms/renderer/index.cjs +1 -1
- package/dist/views/forms/renderer/index.js +1 -2
- package/dist/views/inbox/index.cjs +1 -1
- package/dist/views/inbox/index.cjs.map +1 -1
- package/dist/views/inbox/index.js +1 -5
- 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 -2
- package/dist/views/instances/index.js +1 -2
- 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 +4 -11
- package/dist/views/instances/new/index.js.map +1 -1
- package/dist/views/login/index.js +1 -2
- package/dist/views/search/index.cjs.map +1 -1
- package/dist/views/search/index.js.map +1 -1
- package/dist/views/sent/index.cjs.map +1 -1
- package/dist/views/sent/index.js.map +1 -1
- package/dist/views/settings/index.js +1 -2
- package/dist/views/settings/notifications/index.js +1 -2
- package/dist/views/templates/categories/index.cjs +1 -1
- package/dist/views/templates/categories/index.js +1 -2
- package/dist/views/templates/compose/index.cjs +1 -1
- package/dist/views/templates/compose/index.js +1 -2
- package/dist/views/templates/designer/index.cjs +1 -1
- package/dist/views/templates/designer/index.js +1 -2
- package/dist/views/templates/index.cjs +1 -1
- package/dist/views/templates/index.cjs.map +1 -1
- package/dist/views/templates/index.js +1 -1
- package/dist/views/templates/index.js.map +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 +5 -5
- package/dist/chunks/FormBuilderView-6bCbIkz6.cjs +0 -3
- package/dist/chunks/FormBuilderView-6bCbIkz6.cjs.map +0 -1
- package/dist/chunks/FormBuilderView-CLg-JYmu.js.map +0 -1
- package/dist/chunks/FormRendererView-DU9LLrOF.js.map +0 -1
- package/dist/chunks/FormRendererView-gctFIqwC.cjs +0 -4
- package/dist/chunks/FormRendererView-gctFIqwC.cjs.map +0 -1
- package/dist/chunks/admin-pickers-Btvij1at.cjs +0 -2
- package/dist/chunks/admin-pickers-Btvij1at.cjs.map +0 -1
- package/dist/chunks/admin-pickers-DLlG_1du.js.map +0 -1
- package/dist/chunks/categories-DGlxuC6X.js.map +0 -1
- package/dist/chunks/categories-Yid05WAX.cjs.map +0 -1
- package/dist/chunks/compose-BtQPBd1Q.js.map +0 -1
- package/dist/chunks/compose-DZhTQOt4.cjs.map +0 -1
- package/dist/chunks/dashboard-page-CeCLV1tp.js.map +0 -1
- package/dist/chunks/dashboard-page-DooFJsxM.cjs +0 -2
- package/dist/chunks/dashboard-page-DooFJsxM.cjs.map +0 -1
- package/dist/chunks/delegations-8LsxcQM4.cjs +0 -2
- package/dist/chunks/delegations-8LsxcQM4.cjs.map +0 -1
- package/dist/chunks/delegations-B8gLSt0i.js.map +0 -1
- package/dist/chunks/delegations-DRupxJ4_.js.map +0 -1
- package/dist/chunks/delegations-DlYwMiAW.cjs +0 -2
- package/dist/chunks/delegations-DlYwMiAW.cjs.map +0 -1
- package/dist/chunks/designer-CrbBRPUU.js.map +0 -1
- package/dist/chunks/designer-D3_lWmfa.cjs +0 -65
- package/dist/chunks/designer-D3_lWmfa.cjs.map +0 -1
- package/dist/chunks/detail-CVXb5Vy8.cjs +0 -2
- package/dist/chunks/detail-CVXb5Vy8.cjs.map +0 -1
- package/dist/chunks/detail-_c21WQla.js.map +0 -1
- package/dist/chunks/orgs-BpqVu5ka.js.map +0 -1
- package/dist/chunks/orgs-D0-5BaHT.cjs +0 -2
- package/dist/chunks/orgs-D0-5BaHT.cjs.map +0 -1
- package/dist/chunks/users-C9LA-Rd7.cjs +0 -2
- package/dist/chunks/users-C9LA-Rd7.cjs.map +0 -1
- package/dist/chunks/users-FWrb3ehW.js +0 -214
- package/dist/chunks/users-FWrb3ehW.js.map +0 -1
|
@@ -2,28 +2,30 @@
|
|
|
2
2
|
import { r as e } from "./router-adapter-DftlFTOd.js";
|
|
3
3
|
import { r as t } from "./routes-config-yZbESPlw.js";
|
|
4
4
|
import { t as n } from "./bpm-form-field-Cao0rMol.js";
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
5
|
+
import { t as r } from "./format-member-label-DudVI55w.js";
|
|
6
|
+
import { a as i, n as a, o, r as s } from "./admin-pickers-DxhzECkD.js";
|
|
7
|
+
import { n as c, r as l } from "./FormRendererView-cZGOOjU5.js";
|
|
7
8
|
import '../style.css';/* empty css */
|
|
8
|
-
import { t as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { AutoComplete as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { CheckedIcon as
|
|
15
|
-
import { DefaultChatTransport as
|
|
16
|
-
import { WORKFLOW_TOOLSET as
|
|
17
|
-
import { readFormBuilder as
|
|
18
|
-
import { isFormStaticOptionFieldDefinition as
|
|
19
|
-
import { readOrganizationDashboard as
|
|
20
|
-
import { Background as
|
|
9
|
+
import { t as u } from "./FormBuilderView-BYL42M0d.js";
|
|
10
|
+
import { Fragment as d, useCallback as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
11
|
+
import { AutoComplete as _, Button as v, Icon as ee, Input as te, Modal as y, PageHeader as ne, Section as re, SectionGroup as ie, Select as b, Textarea as ae, Toggle as x, Typography as S } from "@mezzanine-ui/react";
|
|
12
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
13
|
+
import oe from "@mezzanine-ui/react/Drawer";
|
|
14
|
+
import E from "@mezzanine-ui/react/ContentHeader";
|
|
15
|
+
import { CheckedIcon as se, DotGridIcon as ce, EyeIcon as le, FilterIcon as ue, MailIcon as de, PlusIcon as fe, SaveIcon as pe, TrashIcon as me, UserIcon as he } from "@mezzanine-ui/icons";
|
|
16
|
+
import { DefaultChatTransport as ge, getToolName as _e, isToolUIPart as ve, lastAssistantMessageIsCompleteWithToolCalls as D } from "ai";
|
|
17
|
+
import { WORKFLOW_TOOLSET as ye, applyWorkflowCommand as be, applyWorkflowMacroCommand as xe, executeWorkflowTool as Se, readWorkflowSnapshot as Ce } from "@rytass/bpm-core-shared";
|
|
18
|
+
import { readFormBuilder as we, readFormSchemaLintMessage as Te } from "@rytass/bpm-core-client/form";
|
|
19
|
+
import { isFormStaticOptionFieldDefinition as Ee, isMemberFieldDefinition as De } from "@rytass/bpm-core-shared/form";
|
|
20
|
+
import { readOrganizationDashboard as Oe } from "@rytass/bpm-core-client/organization";
|
|
21
|
+
import { Background as ke, ConnectionMode as Ae, ControlButton as je, Controls as Me, Handle as O, MiniMap as Ne, Panel as Pe, Position as k, ReactFlow as Fe, applyNodeChanges as Ie, getViewportForBounds as Le } from "@xyflow/react";
|
|
21
22
|
import * as Re from "dagre";
|
|
22
23
|
import { composeApprovalTemplateWithForm as ze, dryRunApprovalWorkflow as Be, forkApprovalTemplate as Ve, listWorkflowWebhookEndpoints as He, publishApprovalTemplateVersion as Ue, readTemplateDesigner as We, resolveMemberOptions as Ge, searchMemberOptions as Ke, searchPublishedFormVersionOptions as qe, updateApprovalTemplateDraft as Je } from "@rytass/bpm-core-client/template";
|
|
23
24
|
import { useChat as Ye } from "@ai-sdk/react";
|
|
24
|
-
import {
|
|
25
|
+
import { readUnsupportedApproverFallbackType as Xe } from "@rytass/bpm-core-shared/workflow";
|
|
26
|
+
import { DEFAULT_QUORUM_THRESHOLD as A, DEFAULT_SLA_CONFIG as Ze, NOTIFY_WEBHOOK_CONTEXT_PATHS as j, NOTIFY_WEBHOOK_TARGET_LIMIT as M, SLA_CALENDAR_MODE_OPTIONS as Qe, SLA_DURATION_UNIT_OPTIONS as $e, SLA_TIMEOUT_ACTION_OPTIONS as et, composeQuorumThreshold as tt, composeSlaDuration as N, createNotifyWebhookTarget as nt, hasConfiguredConditionEdges as rt, isDecisionPolicyUnsatisfiable as it, isFormFieldCompatibleWithWebhookParameter as P, isNotifyWebhookContextPath as at, isOrgManagerChainDecisionPolicyInvalid as ot, readApproverResolverIssue as st, readConditionOperatorIds as ct, readDesignTimeApproverCount as lt, readExcludeInitiatorIssue as ut, readNotifyServiceTaskIssue as dt, readNotifyWebhookCatalogIssueMessage as ft, readNotifyWebhookStructureIssues as pt, readNotifyWebhookTargetCatalogIssues as mt, readNotifyWebhookTargets as ht, readSlaDurationParts as gt } from "@rytass/bpm-core-shared/workflow-graph";
|
|
25
27
|
//#region src/views/templates/designer/decision-policy-options.ts
|
|
26
|
-
var
|
|
28
|
+
var _t = [
|
|
27
29
|
{
|
|
28
30
|
id: "SINGLE",
|
|
29
31
|
name: "單人簽核"
|
|
@@ -45,25 +47,25 @@ var gt = [
|
|
|
45
47
|
name: "達到指定門檻"
|
|
46
48
|
}
|
|
47
49
|
];
|
|
48
|
-
function
|
|
50
|
+
function vt(e) {
|
|
49
51
|
if (!e || e.type === "SINGLE" || e.type === "PARALLEL_ANY") return "可指定多位;多位時所有人都會收到待辦,任一人同意即可通過。";
|
|
50
52
|
if (e.type === "PARALLEL_ALL") return "可指定多位;多位時所有人都會收到待辦,全部同意後才會通過。";
|
|
51
53
|
if (e.type === "SEQUENTIAL") return "依簽核人順序一次開放一位,前一位核准後才輪到下一位;任一位拒絕或退回即結束此關。";
|
|
52
54
|
let t = e.thresholdType === "PERCENTAGE" ? "%" : " 位簽核者";
|
|
53
55
|
return `可指定多位;需達到 ${e.threshold}${t} 才會通過。`;
|
|
54
56
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
57
|
+
function yt(e) {
|
|
58
|
+
return _t.find((t) => t.id === e) || {
|
|
57
59
|
id: e,
|
|
58
60
|
name: `未知決策方式(${e})`
|
|
59
61
|
};
|
|
60
62
|
}
|
|
61
63
|
//#endregion
|
|
62
64
|
//#region src/views/templates/designer/use-workflow-designer-controller.ts
|
|
63
|
-
function
|
|
64
|
-
let [i, a] =
|
|
65
|
+
function bt({ directory: e, initialState: t, layout: n, onLayout: r }) {
|
|
66
|
+
let [i, a] = g(t), o = h(t), s = h(e);
|
|
65
67
|
s.current = e;
|
|
66
|
-
let c =
|
|
68
|
+
let c = f((e) => {
|
|
67
69
|
if (!e.changed && !e.error) return e;
|
|
68
70
|
let t = e.effects.layout ? n(e.state.definition) : e.state.definition, i = {
|
|
69
71
|
...e.state,
|
|
@@ -73,57 +75,53 @@ function yt({ directory: e, initialState: t, layout: n, onLayout: r }) {
|
|
|
73
75
|
...e,
|
|
74
76
|
state: i
|
|
75
77
|
};
|
|
76
|
-
}, [n, r]), l =
|
|
77
|
-
let n = await
|
|
78
|
+
}, [n, r]), l = f((e) => c(be(o.current, e)), [c]), u = f((e) => c(xe(o.current, e)), [c]), d = f(async (e, t) => {
|
|
79
|
+
let n = await Se(o.current, e, t, { directory: s.current });
|
|
78
80
|
if (n.ok && (n.kind === "mutation" || n.kind === "macro")) {
|
|
79
81
|
let e = c(n.result);
|
|
80
82
|
return {
|
|
81
83
|
...n,
|
|
82
84
|
result: e,
|
|
83
|
-
snapshot:
|
|
85
|
+
snapshot: Ce(e.state)
|
|
84
86
|
};
|
|
85
87
|
}
|
|
86
88
|
return n;
|
|
87
|
-
}, [c]),
|
|
89
|
+
}, [c]), p = f((e) => {
|
|
88
90
|
let t = typeof e == "function" ? e(o.current) : e;
|
|
89
91
|
o.current = t, a(t);
|
|
90
|
-
}, []), _ =
|
|
91
|
-
return
|
|
92
|
+
}, []), _ = f(() => o.current, []), v = m(() => Ce(i), [i]);
|
|
93
|
+
return m(() => ({
|
|
92
94
|
dispatch: l,
|
|
93
95
|
dispatchMacro: u,
|
|
94
|
-
executeTool:
|
|
96
|
+
executeTool: d,
|
|
95
97
|
getState: _,
|
|
96
|
-
replaceState:
|
|
98
|
+
replaceState: p,
|
|
97
99
|
snapshot: v,
|
|
98
100
|
state: i,
|
|
99
|
-
tools:
|
|
101
|
+
tools: ye
|
|
100
102
|
}), [
|
|
101
103
|
l,
|
|
102
104
|
u,
|
|
103
|
-
|
|
105
|
+
d,
|
|
104
106
|
_,
|
|
105
|
-
|
|
107
|
+
p,
|
|
106
108
|
v,
|
|
107
109
|
i
|
|
108
110
|
]);
|
|
109
111
|
}
|
|
110
112
|
//#endregion
|
|
111
113
|
//#region src/views/templates/designer/use-workflow-chat.ts
|
|
112
|
-
function
|
|
113
|
-
let n =
|
|
114
|
+
function F({ controller: e, api: t = "/api/chat" }) {
|
|
115
|
+
let n = m(() => new ge({ api: t }), [t]), r = Ye({
|
|
114
116
|
transport: n,
|
|
115
|
-
sendAutomaticallyWhen:
|
|
117
|
+
sendAutomaticallyWhen: D,
|
|
116
118
|
async onToolCall({ toolCall: t }) {
|
|
117
119
|
let n = await e.executeTool(t.toolName, t.input);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
});
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
r.addToolOutput({
|
|
120
|
+
n.ok ? r.addToolOutput({
|
|
121
|
+
output: n.kind === "query" ? n.data : n.snapshot,
|
|
122
|
+
tool: t.toolName,
|
|
123
|
+
toolCallId: t.toolCallId
|
|
124
|
+
}) : r.addToolOutput({
|
|
127
125
|
errorText: n.error,
|
|
128
126
|
state: "output-error",
|
|
129
127
|
tool: t.toolName,
|
|
@@ -135,12 +133,12 @@ function bt({ controller: e, api: t = "/api/chat" }) {
|
|
|
135
133
|
}
|
|
136
134
|
//#endregion
|
|
137
135
|
//#region src/views/templates/designer/chrome-workflow-chat.ts
|
|
138
|
-
var
|
|
139
|
-
function
|
|
136
|
+
var xt = 12;
|
|
137
|
+
function I() {
|
|
140
138
|
let e = globalThis.LanguageModel;
|
|
141
139
|
return e && typeof e == "object" ? e : null;
|
|
142
140
|
}
|
|
143
|
-
var
|
|
141
|
+
var St = {
|
|
144
142
|
additionalProperties: !1,
|
|
145
143
|
properties: {
|
|
146
144
|
action: {
|
|
@@ -154,7 +152,7 @@ var F = {
|
|
|
154
152
|
required: ["action"],
|
|
155
153
|
type: "object"
|
|
156
154
|
};
|
|
157
|
-
function
|
|
155
|
+
function Ct() {
|
|
158
156
|
return `你是「簽核流程設計器」頁面的離線 AI 助理。只能透過下列工具操作這個流程畫布,其他請求一律婉拒並引導回流程設計。
|
|
159
157
|
|
|
160
158
|
每一步只輸出一個 JSON 決策物件:
|
|
@@ -164,17 +162,17 @@ function St() {
|
|
|
164
162
|
規則:先用 get_workflow_snapshot 了解現況再規劃;完成後用 validate_workflow 檢查並以 message 說明做了什麼。
|
|
165
163
|
|
|
166
164
|
可用工具:
|
|
167
|
-
${
|
|
165
|
+
${ye.map((e) => `- ${e.name}(${JSON.stringify(e.inputSchema.properties ?? {})}): ${e.description}`).join("\n")}`;
|
|
168
166
|
}
|
|
169
|
-
function
|
|
170
|
-
let [t, n] =
|
|
171
|
-
|
|
172
|
-
let e =
|
|
167
|
+
function wt({ controller: e }) {
|
|
168
|
+
let [t, n] = g(!1), [r, i] = g([]), [a, o] = g("ready"), s = h(0);
|
|
169
|
+
p(() => {
|
|
170
|
+
let e = I();
|
|
173
171
|
e && e.availability().then((e) => {
|
|
174
172
|
n(e !== "unavailable");
|
|
175
173
|
}).catch(() => n(!1));
|
|
176
174
|
}, []);
|
|
177
|
-
let c =
|
|
175
|
+
let c = f((e, t) => {
|
|
178
176
|
s.current += 1, i((n) => [...n, {
|
|
179
177
|
id: `chrome-${s.current}`,
|
|
180
178
|
parts: [{
|
|
@@ -187,15 +185,15 @@ function Ct({ controller: e }) {
|
|
|
187
185
|
return {
|
|
188
186
|
available: t,
|
|
189
187
|
messages: r,
|
|
190
|
-
send:
|
|
191
|
-
let n =
|
|
192
|
-
n && a === "ready" && (c("user", t), o("submitted"),
|
|
188
|
+
send: f((t) => {
|
|
189
|
+
let n = I();
|
|
190
|
+
n && a === "ready" && (c("user", t), o("submitted"), Tt({
|
|
193
191
|
appendMessage: c,
|
|
194
192
|
controller: e,
|
|
195
193
|
model: n,
|
|
196
194
|
userText: t
|
|
197
195
|
}).then(() => o("ready")).catch((e) => {
|
|
198
|
-
c("assistant",
|
|
196
|
+
c("assistant", Dt(e)), o("error");
|
|
199
197
|
}));
|
|
200
198
|
}, [
|
|
201
199
|
c,
|
|
@@ -205,15 +203,15 @@ function Ct({ controller: e }) {
|
|
|
205
203
|
status: a
|
|
206
204
|
};
|
|
207
205
|
}
|
|
208
|
-
async function
|
|
206
|
+
async function Tt({ appendMessage: e, controller: t, model: n, userText: r }) {
|
|
209
207
|
let i = await n.create({ initialPrompts: [{
|
|
210
|
-
content:
|
|
208
|
+
content: Ct(),
|
|
211
209
|
role: "system"
|
|
212
210
|
}] });
|
|
213
211
|
try {
|
|
214
212
|
let n = `使用者需求:${r}\n目前流程:${JSON.stringify(t.snapshot)}`;
|
|
215
|
-
for (let r = 0; r <
|
|
216
|
-
let r =
|
|
213
|
+
for (let r = 0; r < xt; r += 1) {
|
|
214
|
+
let r = Et(await i.prompt(n, { responseConstraint: St }));
|
|
217
215
|
if (!r || r.action === "message") {
|
|
218
216
|
e("assistant", r?.text ?? "我已完成可處理的部分。");
|
|
219
217
|
return;
|
|
@@ -233,7 +231,7 @@ async function wt({ appendMessage: e, controller: t, model: n, userText: r }) {
|
|
|
233
231
|
i.destroy();
|
|
234
232
|
}
|
|
235
233
|
}
|
|
236
|
-
function
|
|
234
|
+
function Et(e) {
|
|
237
235
|
try {
|
|
238
236
|
let t = JSON.parse(e);
|
|
239
237
|
return typeof t == "object" && t && t.action !== void 0 ? t : null;
|
|
@@ -241,51 +239,51 @@ function Tt(e) {
|
|
|
241
239
|
return null;
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
|
-
function
|
|
242
|
+
function Dt(e) {
|
|
245
243
|
return e instanceof Error ? `離線模式發生錯誤:${e.message}` : "離線模式發生未知錯誤。";
|
|
246
244
|
}
|
|
247
245
|
//#endregion
|
|
248
246
|
//#region src/views/templates/designer/workflow-chat-drawer.tsx
|
|
249
|
-
var
|
|
247
|
+
var Ot = {
|
|
250
248
|
display: "flex",
|
|
251
249
|
flexDirection: "column",
|
|
252
250
|
gap: 12,
|
|
253
251
|
height: "100%"
|
|
254
|
-
},
|
|
252
|
+
}, kt = {
|
|
255
253
|
display: "flex",
|
|
256
254
|
flex: 1,
|
|
257
255
|
flexDirection: "column",
|
|
258
256
|
gap: 12,
|
|
259
257
|
minHeight: 0,
|
|
260
258
|
overflowY: "auto"
|
|
261
|
-
},
|
|
259
|
+
}, At = {
|
|
262
260
|
display: "flex",
|
|
263
261
|
gap: 8,
|
|
264
262
|
paddingBottom: 4
|
|
265
|
-
},
|
|
263
|
+
}, jt = {
|
|
266
264
|
borderTop: "1px solid var(--mzn-color-border-neutral, #e5e7eb)",
|
|
267
265
|
display: "flex",
|
|
268
266
|
flexDirection: "column",
|
|
269
267
|
gap: 8,
|
|
270
268
|
paddingTop: 12
|
|
271
|
-
},
|
|
269
|
+
}, Mt = {
|
|
272
270
|
display: "flex",
|
|
273
271
|
justifyContent: "flex-end"
|
|
274
|
-
},
|
|
275
|
-
.${
|
|
272
|
+
}, Nt = { width: "100%" }, L = "workflow-chat-input-field", Pt = `
|
|
273
|
+
.${L}.mzn-text-field {
|
|
276
274
|
width: 100%;
|
|
277
275
|
}
|
|
278
|
-
`,
|
|
276
|
+
`, Ft = {
|
|
279
277
|
color: "var(--mzn-color-text-secondary, #6b7280)",
|
|
280
278
|
fontSize: 12,
|
|
281
279
|
padding: "2px 0"
|
|
282
|
-
},
|
|
280
|
+
}, It = {
|
|
283
281
|
"input-available": "執行中…",
|
|
284
282
|
"input-streaming": "準備中…",
|
|
285
283
|
"output-available": "完成",
|
|
286
284
|
"output-error": "失敗"
|
|
287
285
|
};
|
|
288
|
-
function
|
|
286
|
+
function Lt(e) {
|
|
289
287
|
let t = e === "user";
|
|
290
288
|
return {
|
|
291
289
|
alignSelf: t ? "flex-end" : "flex-start",
|
|
@@ -298,11 +296,11 @@ function It(e) {
|
|
|
298
296
|
wordBreak: "break-word"
|
|
299
297
|
};
|
|
300
298
|
}
|
|
301
|
-
function
|
|
302
|
-
let i =
|
|
299
|
+
function Rt({ api: e, controller: t, onClose: n, open: r }) {
|
|
300
|
+
let i = F({
|
|
303
301
|
api: e,
|
|
304
302
|
controller: t
|
|
305
|
-
}), a =
|
|
303
|
+
}), a = wt({ controller: t }), [o, s] = g("online"), [c, l] = g(""), u = o === "offline" ? {
|
|
306
304
|
messages: a.messages,
|
|
307
305
|
send: a.send,
|
|
308
306
|
status: a.status
|
|
@@ -312,72 +310,72 @@ function Lt({ api: e, controller: t, onClose: n, open: r }) {
|
|
|
312
310
|
i.sendMessage({ text: e });
|
|
313
311
|
},
|
|
314
312
|
status: i.status
|
|
315
|
-
}, { messages: p, send: m } =
|
|
313
|
+
}, { messages: p, send: m } = u, h = u.status === "submitted" || u.status === "streaming", _ = f(() => {
|
|
316
314
|
let e = c.trim();
|
|
317
|
-
e && !
|
|
315
|
+
e && !h && (l(""), m(e));
|
|
318
316
|
}, [
|
|
319
|
-
|
|
317
|
+
h,
|
|
320
318
|
c,
|
|
321
319
|
m
|
|
322
|
-
]),
|
|
323
|
-
e.nativeEvent.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
324
|
-
}, [
|
|
325
|
-
return /* @__PURE__ */
|
|
320
|
+
]), ee = f((e) => {
|
|
321
|
+
e.nativeEvent.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), _());
|
|
322
|
+
}, [_]);
|
|
323
|
+
return /* @__PURE__ */ T(oe, {
|
|
326
324
|
headerTitle: "AI 流程助理",
|
|
327
325
|
isHeaderDisplay: !0,
|
|
328
326
|
onClose: n,
|
|
329
327
|
open: r,
|
|
330
328
|
size: "medium",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
332
|
-
style:
|
|
329
|
+
children: [/* @__PURE__ */ w("style", { children: Pt }), /* @__PURE__ */ T("div", {
|
|
330
|
+
style: Ot,
|
|
333
331
|
children: [
|
|
334
|
-
a.available ? /* @__PURE__ */
|
|
335
|
-
style:
|
|
336
|
-
children: [/* @__PURE__ */
|
|
332
|
+
a.available ? /* @__PURE__ */ T("div", {
|
|
333
|
+
style: At,
|
|
334
|
+
children: [/* @__PURE__ */ w(v, {
|
|
337
335
|
onClick: () => s("online"),
|
|
338
336
|
variant: o === "online" ? "base-primary" : "base-tertiary",
|
|
339
337
|
children: "線上"
|
|
340
|
-
}), /* @__PURE__ */
|
|
338
|
+
}), /* @__PURE__ */ w(v, {
|
|
341
339
|
onClick: () => s("offline"),
|
|
342
340
|
variant: o === "offline" ? "base-primary" : "base-tertiary",
|
|
343
341
|
children: "離線(裝置內,實驗)"
|
|
344
342
|
})]
|
|
345
343
|
}) : null,
|
|
346
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ T("div", {
|
|
347
345
|
role: "log",
|
|
348
|
-
style:
|
|
346
|
+
style: kt,
|
|
349
347
|
children: [
|
|
350
|
-
p.length === 0 ? /* @__PURE__ */
|
|
348
|
+
p.length === 0 ? /* @__PURE__ */ w(S, {
|
|
351
349
|
color: "text-neutral",
|
|
352
350
|
variant: "body",
|
|
353
351
|
children: "用一句話描述你想要的流程,例如:「建立三關簽核:部門主管 → 經理 → 財務,金額大於十萬走財務複核」。我會直接在畫布上幫你繪製。"
|
|
354
352
|
}) : null,
|
|
355
|
-
p.map((e) => /* @__PURE__ */
|
|
356
|
-
|
|
353
|
+
p.map((e) => /* @__PURE__ */ w(d, { children: zt(e) }, e.id)),
|
|
354
|
+
h ? /* @__PURE__ */ w(S, {
|
|
357
355
|
color: "text-neutral",
|
|
358
356
|
variant: "body",
|
|
359
357
|
children: "思考中…"
|
|
360
358
|
}) : null
|
|
361
359
|
]
|
|
362
360
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
style:
|
|
365
|
-
children: [/* @__PURE__ */
|
|
366
|
-
className:
|
|
367
|
-
disabled:
|
|
361
|
+
/* @__PURE__ */ T("div", {
|
|
362
|
+
style: jt,
|
|
363
|
+
children: [/* @__PURE__ */ w(ae, {
|
|
364
|
+
className: L,
|
|
365
|
+
disabled: h,
|
|
368
366
|
maxLength: 2e3,
|
|
369
367
|
onChange: (e) => l(e.target.value),
|
|
370
|
-
onKeyDown:
|
|
368
|
+
onKeyDown: ee,
|
|
371
369
|
placeholder: "描述你想要的流程…(Enter 送出,Shift + Enter 換行)",
|
|
372
370
|
rows: 3,
|
|
373
|
-
style:
|
|
371
|
+
style: Nt,
|
|
374
372
|
value: c
|
|
375
|
-
}), /* @__PURE__ */
|
|
376
|
-
style:
|
|
377
|
-
children: /* @__PURE__ */
|
|
378
|
-
disabled:
|
|
379
|
-
loading:
|
|
380
|
-
onClick:
|
|
373
|
+
}), /* @__PURE__ */ w("div", {
|
|
374
|
+
style: Mt,
|
|
375
|
+
children: /* @__PURE__ */ w(v, {
|
|
376
|
+
disabled: h || c.trim().length === 0,
|
|
377
|
+
loading: h,
|
|
378
|
+
onClick: _,
|
|
381
379
|
type: "button",
|
|
382
380
|
variant: "base-primary",
|
|
383
381
|
children: "送出"
|
|
@@ -388,16 +386,16 @@ function Lt({ api: e, controller: t, onClose: n, open: r }) {
|
|
|
388
386
|
})]
|
|
389
387
|
});
|
|
390
388
|
}
|
|
391
|
-
function
|
|
389
|
+
function zt(e) {
|
|
392
390
|
return e.parts.map((t, n) => {
|
|
393
|
-
if (t.type === "text") return /* @__PURE__ */
|
|
394
|
-
style:
|
|
391
|
+
if (t.type === "text") return /* @__PURE__ */ w("div", {
|
|
392
|
+
style: Lt(e.role),
|
|
395
393
|
children: t.text
|
|
396
394
|
}, `${e.id}-${n}`);
|
|
397
|
-
if (t.type === "dynamic-tool" ||
|
|
398
|
-
let r =
|
|
399
|
-
return /* @__PURE__ */
|
|
400
|
-
style:
|
|
395
|
+
if (t.type === "dynamic-tool" || ve(t)) {
|
|
396
|
+
let r = _e(t), i = It[t.state] ?? t.state;
|
|
397
|
+
return /* @__PURE__ */ w("div", {
|
|
398
|
+
style: Ft,
|
|
401
399
|
children: `⚙ ${r} · ${i}`
|
|
402
400
|
}, `${e.id}-${n}`);
|
|
403
401
|
}
|
|
@@ -406,7 +404,7 @@ function Rt(e) {
|
|
|
406
404
|
}
|
|
407
405
|
//#endregion
|
|
408
406
|
//#region src/views/templates/designer/position-level-options.ts
|
|
409
|
-
function
|
|
407
|
+
function Bt(e, t) {
|
|
410
408
|
let n = [...new Set(e.map((e) => e.level))];
|
|
411
409
|
return [...n.includes(t) ? n : [...n, t]].sort((e, t) => t - e).map((t) => {
|
|
412
410
|
let n = e.filter((e) => e.level === t).map((e) => e.name);
|
|
@@ -417,12 +415,12 @@ function zt(e, t) {
|
|
|
417
415
|
};
|
|
418
416
|
});
|
|
419
417
|
}
|
|
420
|
-
function
|
|
418
|
+
function R(e) {
|
|
421
419
|
return e.reduce((e, t) => Math.max(e, t.level), 1);
|
|
422
420
|
}
|
|
423
421
|
//#endregion
|
|
424
422
|
//#region src/views/templates/designer/notify-webhook-designer.ts
|
|
425
|
-
var
|
|
423
|
+
var Vt = {
|
|
426
424
|
"initiator.memberId": "發起人會員編號",
|
|
427
425
|
"instance.id": "案件編號",
|
|
428
426
|
"instance.templateId": "模板編號",
|
|
@@ -430,14 +428,14 @@ var L = {
|
|
|
430
428
|
"instance.title": "案件主旨",
|
|
431
429
|
"node.id": "節點編號",
|
|
432
430
|
"node.label": "節點名稱"
|
|
433
|
-
},
|
|
431
|
+
}, z = {
|
|
434
432
|
boolean: "是/否",
|
|
435
433
|
json: "JSON",
|
|
436
434
|
number: "數字",
|
|
437
435
|
string: "文字",
|
|
438
436
|
stringArray: "文字清單"
|
|
439
437
|
};
|
|
440
|
-
function
|
|
438
|
+
function B(e) {
|
|
441
439
|
return `${e.key}@${e.version}`;
|
|
442
440
|
}
|
|
443
441
|
function Ht(e, t) {
|
|
@@ -451,7 +449,7 @@ function Ut(e) {
|
|
|
451
449
|
];
|
|
452
450
|
}
|
|
453
451
|
function Wt(e, t) {
|
|
454
|
-
return e.filter((e) =>
|
|
452
|
+
return e.filter((e) => P(e, t));
|
|
455
453
|
}
|
|
456
454
|
function Gt(e, t, n) {
|
|
457
455
|
return e === "FIELD" ? {
|
|
@@ -472,7 +470,7 @@ function qt(e, t) {
|
|
|
472
470
|
return n ? Kt.test(n) ? Number(n) : t : null;
|
|
473
471
|
}
|
|
474
472
|
function Jt(e) {
|
|
475
|
-
return !
|
|
473
|
+
return !pt(e).some((e) => Yt.has(e.code));
|
|
476
474
|
}
|
|
477
475
|
var Yt = /* @__PURE__ */ new Set([
|
|
478
476
|
"BINDING_INVALID",
|
|
@@ -503,7 +501,7 @@ function Zt(e, t, n) {
|
|
|
503
501
|
return {
|
|
504
502
|
bindings: e.bindings.filter((r) => {
|
|
505
503
|
let i = t.parameters.find((e) => e.key === r.parameter);
|
|
506
|
-
return i !== void 0 && !
|
|
504
|
+
return i !== void 0 && !mt({
|
|
507
505
|
endpoint: { parameters: [{
|
|
508
506
|
...i,
|
|
509
507
|
required: !1
|
|
@@ -523,14 +521,14 @@ function Zt(e, t, n) {
|
|
|
523
521
|
};
|
|
524
522
|
}
|
|
525
523
|
function Qt({ definition: e, endpoints: t, formFields: n }) {
|
|
526
|
-
return e.nodes.flatMap((e) => e.type !== "serviceTask" || e.data.action.type !== "NOTIFY" ||
|
|
524
|
+
return e.nodes.flatMap((e) => e.type !== "serviceTask" || e.data.action.type !== "NOTIFY" || pt(e.data.action.webhooks).length ? [] : ht(e.data.action).flatMap((r, i) => {
|
|
527
525
|
let a = Ht(t, r.endpoint);
|
|
528
|
-
return
|
|
526
|
+
return mt({
|
|
529
527
|
endpoint: a,
|
|
530
528
|
formFields: n,
|
|
531
529
|
target: r
|
|
532
|
-
}).map((t) =>
|
|
533
|
-
endpointLabel: a?.label ??
|
|
530
|
+
}).map((t) => ft({
|
|
531
|
+
endpointLabel: a?.label ?? B(r.endpoint),
|
|
534
532
|
issue: t,
|
|
535
533
|
nodeLabel: e.data.label,
|
|
536
534
|
targetIndex: i
|
|
@@ -581,9 +579,9 @@ var $t = {
|
|
|
581
579
|
}, {
|
|
582
580
|
id: "false",
|
|
583
581
|
name: "否"
|
|
584
|
-
}], sn =
|
|
582
|
+
}], sn = j.map((e) => ({
|
|
585
583
|
id: e,
|
|
586
|
-
name:
|
|
584
|
+
name: Vt[e]
|
|
587
585
|
}));
|
|
588
586
|
function cn({ catalog: e, catalogState: t, formFields: n, onChange: r, targets: i }) {
|
|
589
587
|
let a = e.filter((e) => !e.deprecated);
|
|
@@ -593,34 +591,34 @@ function cn({ catalog: e, catalogState: t, formFields: n, onChange: r, targets:
|
|
|
593
591
|
}
|
|
594
592
|
function s() {
|
|
595
593
|
let [e] = a;
|
|
596
|
-
e && r([...i,
|
|
594
|
+
e && r([...i, nt({
|
|
597
595
|
key: e.key,
|
|
598
596
|
version: e.version
|
|
599
597
|
})]);
|
|
600
598
|
}
|
|
601
|
-
return /* @__PURE__ */
|
|
599
|
+
return /* @__PURE__ */ T("div", {
|
|
602
600
|
style: $t,
|
|
603
601
|
children: [
|
|
604
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ w(S, {
|
|
605
603
|
variant: "label-primary-highlight",
|
|
606
604
|
children: "Webhook"
|
|
607
605
|
}),
|
|
608
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ w(S, {
|
|
609
607
|
color: "text-neutral",
|
|
610
608
|
variant: "caption",
|
|
611
609
|
children: "知會節點抵達時,將指定的表單欄位或案件資訊送到外部系統。"
|
|
612
610
|
}),
|
|
613
|
-
t === "loading" ? /* @__PURE__ */
|
|
611
|
+
t === "loading" ? /* @__PURE__ */ w(S, {
|
|
614
612
|
color: "text-neutral",
|
|
615
613
|
variant: "body",
|
|
616
614
|
children: "正在載入可用的 Webhook 端點…"
|
|
617
615
|
}) : null,
|
|
618
|
-
t === "unavailable" ? /* @__PURE__ */
|
|
616
|
+
t === "unavailable" ? /* @__PURE__ */ w(S, {
|
|
619
617
|
color: "text-error",
|
|
620
618
|
variant: "body",
|
|
621
619
|
children: "目前無法載入 Webhook 端點,已設定的內容會保留,請稍後重試。"
|
|
622
620
|
}) : null,
|
|
623
|
-
i.map((s, c) => /* @__PURE__ */
|
|
621
|
+
i.map((s, c) => /* @__PURE__ */ w(ln, {
|
|
624
622
|
activeEndpoints: a,
|
|
625
623
|
catalog: e,
|
|
626
624
|
catalogState: t,
|
|
@@ -630,20 +628,20 @@ function cn({ catalog: e, catalogState: t, formFields: n, onChange: r, targets:
|
|
|
630
628
|
onRemove: () => r(i.filter((e, t) => t !== c)),
|
|
631
629
|
target: s
|
|
632
630
|
}, s.id)),
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
disabled: t !== "ready" || !a.length || i.length >=
|
|
635
|
-
icon:
|
|
631
|
+
/* @__PURE__ */ w("div", { children: /* @__PURE__ */ w(v, {
|
|
632
|
+
disabled: t !== "ready" || !a.length || i.length >= M,
|
|
633
|
+
icon: fe,
|
|
636
634
|
iconType: "leading",
|
|
637
635
|
onClick: s,
|
|
638
636
|
variant: "base-dashed",
|
|
639
637
|
children: "新增 Webhook"
|
|
640
638
|
}) }),
|
|
641
|
-
i.length >=
|
|
639
|
+
i.length >= M ? /* @__PURE__ */ T(S, {
|
|
642
640
|
color: "text-neutral",
|
|
643
641
|
variant: "caption",
|
|
644
642
|
children: [
|
|
645
643
|
"每個知會節點最多 ",
|
|
646
|
-
|
|
644
|
+
M,
|
|
647
645
|
" 個 Webhook。"
|
|
648
646
|
]
|
|
649
647
|
}) : null
|
|
@@ -651,42 +649,42 @@ function cn({ catalog: e, catalogState: t, formFields: n, onChange: r, targets:
|
|
|
651
649
|
});
|
|
652
650
|
}
|
|
653
651
|
function ln({ activeEndpoints: e, catalog: t, catalogState: r, formFields: i, index: a, onChange: o, onRemove: s, target: c }) {
|
|
654
|
-
let l = Ht(t, c.endpoint), u =
|
|
655
|
-
id:
|
|
656
|
-
name:
|
|
652
|
+
let l = Ht(t, c.endpoint), u = B(c.endpoint), d = [...e.map((e) => ({
|
|
653
|
+
id: B(e),
|
|
654
|
+
name: H(e)
|
|
657
655
|
})), ...l && !l.deprecated ? [] : [{
|
|
658
656
|
id: u,
|
|
659
|
-
name: l ?
|
|
657
|
+
name: l ? H(l) : `${u}(找不到端點)`
|
|
660
658
|
}]], f = new Set((l?.parameters ?? []).map((e) => e.key)), p = l ? c.bindings.filter((e) => !f.has(e.parameter)) : [];
|
|
661
|
-
return /* @__PURE__ */
|
|
659
|
+
return /* @__PURE__ */ T("div", {
|
|
662
660
|
style: en,
|
|
663
661
|
children: [
|
|
664
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ T("div", {
|
|
665
663
|
style: tn,
|
|
666
|
-
children: [/* @__PURE__ */
|
|
664
|
+
children: [/* @__PURE__ */ T(S, {
|
|
667
665
|
variant: "label-primary",
|
|
668
666
|
children: [
|
|
669
667
|
"第 ",
|
|
670
668
|
a + 1,
|
|
671
669
|
" 個 Webhook"
|
|
672
670
|
]
|
|
673
|
-
}), /* @__PURE__ */
|
|
674
|
-
icon:
|
|
671
|
+
}), /* @__PURE__ */ w(v, {
|
|
672
|
+
icon: me,
|
|
675
673
|
iconType: "leading",
|
|
676
674
|
onClick: s,
|
|
677
675
|
variant: "destructive-text-link",
|
|
678
676
|
children: "移除"
|
|
679
677
|
})]
|
|
680
678
|
}),
|
|
681
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ w(n, {
|
|
682
680
|
label: "端點",
|
|
683
681
|
name: `webhookEndpoint-${c.id}`,
|
|
684
682
|
required: !0,
|
|
685
|
-
children: /* @__PURE__ */
|
|
683
|
+
children: /* @__PURE__ */ w(b, {
|
|
686
684
|
clearable: !1,
|
|
687
685
|
disabled: r !== "ready",
|
|
688
686
|
onChange: (t) => {
|
|
689
|
-
let n = e.find((e) =>
|
|
687
|
+
let n = e.find((e) => B(e) === t?.id);
|
|
690
688
|
n && o(Zt(c, n, i ?? []));
|
|
691
689
|
},
|
|
692
690
|
options: [...d],
|
|
@@ -694,40 +692,40 @@ function ln({ activeEndpoints: e, catalog: t, catalogState: r, formFields: i, in
|
|
|
694
692
|
value: d.find((e) => e.id === u) ?? null
|
|
695
693
|
})
|
|
696
694
|
}),
|
|
697
|
-
r === "ready" && !l ? /* @__PURE__ */
|
|
695
|
+
r === "ready" && !l ? /* @__PURE__ */ w(S, {
|
|
698
696
|
color: "text-warning",
|
|
699
697
|
variant: "body",
|
|
700
698
|
children: "找不到這個端點,設定會保留;請改選其他端點或移除,否則無法發布。"
|
|
701
699
|
}) : null,
|
|
702
|
-
l?.disabled ? /* @__PURE__ */
|
|
700
|
+
l?.disabled ? /* @__PURE__ */ w(S, {
|
|
703
701
|
color: "text-warning",
|
|
704
702
|
variant: "body",
|
|
705
703
|
children: "這個端點已被管理者停用,不會再送出;設定會保留,請改選其他端點,否則無法發布。"
|
|
706
|
-
}) : l?.deprecated ? /* @__PURE__ */
|
|
704
|
+
}) : l?.deprecated ? /* @__PURE__ */ w(S, {
|
|
707
705
|
color: "text-warning",
|
|
708
706
|
variant: "body",
|
|
709
707
|
children: "這個端點不建議再使用,設定會保留;請改選其他端點,否則無法發布。"
|
|
710
708
|
}) : null,
|
|
711
|
-
l?.description ? /* @__PURE__ */
|
|
709
|
+
l?.description ? /* @__PURE__ */ w(S, {
|
|
712
710
|
color: "text-neutral",
|
|
713
711
|
variant: "caption",
|
|
714
712
|
children: l.description
|
|
715
713
|
}) : null,
|
|
716
|
-
l && !l.parameters.length ? /* @__PURE__ */
|
|
714
|
+
l && !l.parameters.length ? /* @__PURE__ */ w(S, {
|
|
717
715
|
color: "text-neutral",
|
|
718
716
|
variant: "caption",
|
|
719
717
|
children: "這個端點不需要參數。"
|
|
720
718
|
}) : null,
|
|
721
|
-
(l?.parameters ?? []).map((e) => /* @__PURE__ */
|
|
719
|
+
(l?.parameters ?? []).map((e) => /* @__PURE__ */ w(un, {
|
|
722
720
|
formFields: i,
|
|
723
721
|
onChange: (t) => o(Xt(c, e.key, t)),
|
|
724
722
|
parameter: e,
|
|
725
723
|
source: c.bindings.find((t) => t.parameter === e.key)?.from ?? null,
|
|
726
724
|
targetId: c.id
|
|
727
725
|
}, e.key)),
|
|
728
|
-
p.map((e) => /* @__PURE__ */
|
|
726
|
+
p.map((e) => /* @__PURE__ */ T("div", {
|
|
729
727
|
style: tn,
|
|
730
|
-
children: [/* @__PURE__ */
|
|
728
|
+
children: [/* @__PURE__ */ T(S, {
|
|
731
729
|
color: "text-warning",
|
|
732
730
|
variant: "body",
|
|
733
731
|
children: [
|
|
@@ -735,7 +733,7 @@ function ln({ activeEndpoints: e, catalog: t, catalogState: r, formFields: i, in
|
|
|
735
733
|
e.parameter,
|
|
736
734
|
"」已不在端點定義中。"
|
|
737
735
|
]
|
|
738
|
-
}), /* @__PURE__ */
|
|
736
|
+
}), /* @__PURE__ */ w(v, {
|
|
739
737
|
onClick: () => o(Xt(c, e.parameter, null)),
|
|
740
738
|
variant: "base-text-link",
|
|
741
739
|
children: "移除設定"
|
|
@@ -745,8 +743,8 @@ function ln({ activeEndpoints: e, catalog: t, catalogState: r, formFields: i, in
|
|
|
745
743
|
});
|
|
746
744
|
}
|
|
747
745
|
function un({ formFields: e, onChange: t, parameter: r, source: i, targetId: a }) {
|
|
748
|
-
let o = i?.kind === "FIELD" || Wt(e ?? [], r.type).length > 0, s = [...r.required ? [] : [rn], ...Ut(r.type).filter((e) => e !== "FIELD" || o).map((e) => an[e])], c =
|
|
749
|
-
return /* @__PURE__ */
|
|
746
|
+
let o = i?.kind === "FIELD" || Wt(e ?? [], r.type).length > 0, s = [...r.required ? [] : [rn], ...Ut(r.type).filter((e) => e !== "FIELD" || o).map((e) => an[e])], c = z[r.type];
|
|
747
|
+
return /* @__PURE__ */ w(n, {
|
|
750
748
|
hintText: [
|
|
751
749
|
r.key,
|
|
752
750
|
c,
|
|
@@ -755,18 +753,18 @@ function un({ formFields: e, onChange: t, parameter: r, source: i, targetId: a }
|
|
|
755
753
|
label: r.label,
|
|
756
754
|
name: `webhookBinding-${a}-${r.key}`,
|
|
757
755
|
required: r.required,
|
|
758
|
-
children: /* @__PURE__ */
|
|
756
|
+
children: /* @__PURE__ */ T("div", {
|
|
759
757
|
style: nn,
|
|
760
|
-
children: [/* @__PURE__ */
|
|
758
|
+
children: [/* @__PURE__ */ w(b, {
|
|
761
759
|
clearable: !1,
|
|
762
760
|
onChange: (n) => {
|
|
763
|
-
let i =
|
|
761
|
+
let i = fn(n?.id ?? null);
|
|
764
762
|
t(i ? Gt(i, r, e ?? []) : null);
|
|
765
763
|
},
|
|
766
764
|
options: [...s],
|
|
767
765
|
placeholder: "選擇來源",
|
|
768
766
|
value: i ? an[i.kind] : r.required ? null : rn
|
|
769
|
-
}), i ? /* @__PURE__ */
|
|
767
|
+
}), i ? /* @__PURE__ */ w(dn, {
|
|
770
768
|
formFields: e,
|
|
771
769
|
onChange: t,
|
|
772
770
|
parameter: r,
|
|
@@ -777,7 +775,7 @@ function un({ formFields: e, onChange: t, parameter: r, source: i, targetId: a }
|
|
|
777
775
|
}
|
|
778
776
|
function dn({ formFields: e, onChange: t, parameter: n, source: r }) {
|
|
779
777
|
if (r.kind === "FIELD") {
|
|
780
|
-
if (!e) return /* @__PURE__ */
|
|
778
|
+
if (!e) return /* @__PURE__ */ w(S, {
|
|
781
779
|
color: "text-neutral",
|
|
782
780
|
variant: "caption",
|
|
783
781
|
children: "請先綁定表單版本,才能選擇表單欄位。"
|
|
@@ -789,7 +787,7 @@ function dn({ formFields: e, onChange: t, parameter: n, source: r }) {
|
|
|
789
787
|
id: r.fieldKey,
|
|
790
788
|
name: `${r.fieldKey}(找不到相容欄位)`
|
|
791
789
|
}] : i;
|
|
792
|
-
return /* @__PURE__ */
|
|
790
|
+
return /* @__PURE__ */ w(b, {
|
|
793
791
|
clearable: !1,
|
|
794
792
|
onChange: (e) => t({
|
|
795
793
|
fieldKey: e?.id ?? "",
|
|
@@ -800,17 +798,17 @@ function dn({ formFields: e, onChange: t, parameter: n, source: r }) {
|
|
|
800
798
|
value: a.find((e) => e.id === r.fieldKey) ?? null
|
|
801
799
|
});
|
|
802
800
|
}
|
|
803
|
-
return r.kind === "CONTEXT" ? /* @__PURE__ */
|
|
801
|
+
return r.kind === "CONTEXT" ? /* @__PURE__ */ w(b, {
|
|
804
802
|
clearable: !1,
|
|
805
803
|
onChange: (e) => {
|
|
806
|
-
|
|
804
|
+
at(e?.id) && t({
|
|
807
805
|
kind: "CONTEXT",
|
|
808
806
|
path: e.id
|
|
809
807
|
});
|
|
810
808
|
},
|
|
811
809
|
options: [...sn],
|
|
812
810
|
value: sn.find((e) => e.id === r.path) ?? null
|
|
813
|
-
}) : n.type === "boolean" ? /* @__PURE__ */
|
|
811
|
+
}) : n.type === "boolean" ? /* @__PURE__ */ w(b, {
|
|
814
812
|
clearable: !1,
|
|
815
813
|
onChange: (e) => t({
|
|
816
814
|
kind: "CONSTANT",
|
|
@@ -818,7 +816,7 @@ function dn({ formFields: e, onChange: t, parameter: n, source: r }) {
|
|
|
818
816
|
}),
|
|
819
817
|
options: [...on],
|
|
820
818
|
value: typeof r.value == "boolean" ? on.find((e) => e.id === String(r.value)) ?? null : null
|
|
821
|
-
}) : /* @__PURE__ */
|
|
819
|
+
}) : /* @__PURE__ */ w(V, {
|
|
822
820
|
onChange: (e) => t({
|
|
823
821
|
kind: "CONSTANT",
|
|
824
822
|
value: e
|
|
@@ -827,11 +825,11 @@ function dn({ formFields: e, onChange: t, parameter: n, source: r }) {
|
|
|
827
825
|
value: r.value
|
|
828
826
|
});
|
|
829
827
|
}
|
|
830
|
-
function
|
|
831
|
-
let [r, i] =
|
|
832
|
-
return
|
|
828
|
+
function V({ onChange: e, type: t, value: n }) {
|
|
829
|
+
let [r, i] = g(n === null ? "" : String(n));
|
|
830
|
+
return p(() => {
|
|
833
831
|
i((e) => qt(t, e) === n ? e : n === null ? "" : String(n));
|
|
834
|
-
}, [t, n]), /* @__PURE__ */
|
|
832
|
+
}, [t, n]), /* @__PURE__ */ w(te, {
|
|
835
833
|
inputProps: { inputMode: t === "number" ? "decimal" : void 0 },
|
|
836
834
|
onChange: (n) => {
|
|
837
835
|
i(n.target.value), e(qt(t, n.target.value));
|
|
@@ -841,7 +839,7 @@ function fn({ onChange: e, type: t, value: n }) {
|
|
|
841
839
|
variant: "base"
|
|
842
840
|
});
|
|
843
841
|
}
|
|
844
|
-
function
|
|
842
|
+
function H(e) {
|
|
845
843
|
let t = [
|
|
846
844
|
`v${e.version}`,
|
|
847
845
|
...e.source === "DATABASE" ? ["後台維護"] : [],
|
|
@@ -849,61 +847,61 @@ function z(e) {
|
|
|
849
847
|
];
|
|
850
848
|
return `${e.label}(${t.join(",")})`;
|
|
851
849
|
}
|
|
852
|
-
function
|
|
850
|
+
function fn(e) {
|
|
853
851
|
return e === "FIELD" || e === "CONSTANT" || e === "CONTEXT" ? e : null;
|
|
854
852
|
}
|
|
855
853
|
//#endregion
|
|
856
854
|
//#region src/views/templates/designer/dry-run-sample-data.ts
|
|
857
|
-
function
|
|
855
|
+
function pn(e) {
|
|
858
856
|
return (e?.fields ?? []).reduce((e, t) => ({
|
|
859
857
|
...e,
|
|
860
|
-
[t.fieldKey]:
|
|
858
|
+
[t.fieldKey]: hn(t)
|
|
861
859
|
}), {});
|
|
862
860
|
}
|
|
863
|
-
function
|
|
861
|
+
function mn(e) {
|
|
864
862
|
return `formMember:${e}`;
|
|
865
863
|
}
|
|
866
|
-
function
|
|
864
|
+
function hn(e) {
|
|
867
865
|
if (e.type === "number") return 1e3;
|
|
868
866
|
if (e.type === "boolean") return !0;
|
|
869
867
|
if (e.type === "member") {
|
|
870
|
-
let t =
|
|
868
|
+
let t = mn(e.fieldKey);
|
|
871
869
|
return e.multiple ? [t] : t;
|
|
872
870
|
}
|
|
873
|
-
return
|
|
871
|
+
return Ee(e) ? e.type === "checkbox" ? e.options[0] ? [e.options[0].value] : [] : e.options[0]?.value ?? "" : e.type === "date" ? "2026-05-08" : e.type === "datetime" ? "2026-05-08T09:00:00+08:00" : e.placeholder ?? e.label;
|
|
874
872
|
}
|
|
875
873
|
//#endregion
|
|
876
874
|
//#region src/views/templates/designer/dry-run-assignee-label.ts
|
|
877
|
-
function
|
|
875
|
+
function gn(e, t) {
|
|
878
876
|
let [n, ...r] = e.split(":"), i = (e) => t.orgUnits.find((t) => t.id === e)?.name ?? e, a = (e) => t.positions.find((t) => t.id === e)?.name ?? e;
|
|
879
877
|
return n === "position" && r.length === 1 && r[0] ? `職位:${a(r[0])}(送出時依當下人員決定)` : n === "orgUnitMember" && r.length === 1 && r[0] ? `組織任一人:${i(r[0])}` : n === "orgUnitPosition" && r.length === 2 && r[0] && r[1] ? `組織職位:${i(r[0])}/${a(r[1])}` : n === "orgUnitManager" && r.length === 1 && r[0] ? `組織主管:${i(r[0])}` : n === "formMember" && r.length === 1 && r[0] ? `表單欄位「${((e) => t.formFields.find((t) => t.fieldKey === e)?.label || e)(r[0])}」選的人(送出時依填寫內容決定)` : n === "orgManagerChain" && r.length === 1 && r[0] ? `主管鏈:簽到職等 ${r[0]}(送出時依組織決定實際主管)` : t.memberName(e) ?? e;
|
|
880
878
|
}
|
|
881
879
|
//#endregion
|
|
882
880
|
//#region src/views/templates/designer/dynamic-form-resolver-options.ts
|
|
883
|
-
var
|
|
884
|
-
function
|
|
881
|
+
var _n = "表單中沒有「人員選擇」欄位,請先到表單設計加入", vn = "原本指定的欄位已不在表單中,或已不是「人員選擇」欄位,請重新選擇。", yn = "此欄位非必填", U = "此欄位可能被條件隱藏", bn = "此欄位為隱藏欄位,申請人無法填寫", xn = ",空白時此關會找不到人員,發佈時會被拒絕;請在表單設計將它設為必填且不隱藏";
|
|
882
|
+
function Sn(e) {
|
|
885
883
|
let t = [
|
|
886
|
-
...e.required ? [] : [
|
|
887
|
-
...e.visibleWhen?.trim() ? [
|
|
888
|
-
...e.hidden ? [
|
|
884
|
+
...e.required ? [] : [yn],
|
|
885
|
+
...e.visibleWhen?.trim() ? [U] : [],
|
|
886
|
+
...e.hidden ? [bn] : []
|
|
889
887
|
];
|
|
890
|
-
return t.length > 0 ? `${t.join("、")}${
|
|
888
|
+
return t.length > 0 ? `${t.join("、")}${xn}` : void 0;
|
|
891
889
|
}
|
|
892
|
-
function
|
|
890
|
+
function Cn(e) {
|
|
893
891
|
return `${e.required ? "" : "(非必填)"}${e.visibleWhen?.trim() ? "(可能被條件隱藏)" : ""}${e.hidden ? "(隱藏欄位)" : ""}`;
|
|
894
892
|
}
|
|
895
|
-
function
|
|
896
|
-
return (e?.fields ?? []).filter(
|
|
897
|
-
let t =
|
|
893
|
+
function wn(e) {
|
|
894
|
+
return (e?.fields ?? []).filter(De).map((e) => {
|
|
895
|
+
let t = Sn(e);
|
|
898
896
|
return {
|
|
899
897
|
id: e.fieldKey,
|
|
900
|
-
name: `${e.label} (${e.fieldKey})${
|
|
898
|
+
name: `${e.label} (${e.fieldKey})${Cn(e)}`,
|
|
901
899
|
...t ? { warning: t } : {}
|
|
902
900
|
};
|
|
903
901
|
});
|
|
904
902
|
}
|
|
905
|
-
function
|
|
906
|
-
let n =
|
|
903
|
+
function Tn(e, t) {
|
|
904
|
+
let n = wn(e), r = n.find((e) => e.id === t) ?? null;
|
|
907
905
|
if (r) return {
|
|
908
906
|
options: n,
|
|
909
907
|
problem: r.warning ?? null,
|
|
@@ -916,46 +914,46 @@ function En(e, t) {
|
|
|
916
914
|
};
|
|
917
915
|
return {
|
|
918
916
|
options: [...n, e],
|
|
919
|
-
problem:
|
|
917
|
+
problem: vn,
|
|
920
918
|
selected: e
|
|
921
919
|
};
|
|
922
920
|
}
|
|
923
921
|
return {
|
|
924
922
|
options: n,
|
|
925
|
-
problem: n.length === 0 ?
|
|
923
|
+
problem: n.length === 0 ? _n : null,
|
|
926
924
|
selected: null
|
|
927
925
|
};
|
|
928
926
|
}
|
|
929
|
-
function
|
|
927
|
+
function En(e, t) {
|
|
930
928
|
if (!t.trim()) return "依表單欄位:未設定";
|
|
931
929
|
let n = e?.fields.find((e) => e.fieldKey === t);
|
|
932
|
-
return n && !
|
|
930
|
+
return n && !De(n) ? `依表單欄位:${n.label || t}(非人員選擇欄位)` : `依表單欄位:${n?.label || t}`;
|
|
933
931
|
}
|
|
934
932
|
//#endregion
|
|
935
933
|
//#region src/views/templates/designer/designer-version-labels.ts
|
|
936
|
-
function
|
|
934
|
+
function Dn(e) {
|
|
937
935
|
return `${e.draftVersion === null ? "尚未建立草稿" : `草稿 v${e.draftVersion}`} · ${e.publishedVersion === null ? e.hasPublishedVersion ? "已發布版本" : "尚未發布" : `已發布 v${e.publishedVersion}`}`;
|
|
938
936
|
}
|
|
939
|
-
function
|
|
937
|
+
function W(e, t) {
|
|
940
938
|
return `表單:${e} v${t}`;
|
|
941
939
|
}
|
|
942
940
|
//#endregion
|
|
943
941
|
//#region src/views/templates/designer/TemplateDesignerView.tsx
|
|
944
|
-
var
|
|
942
|
+
var On = {
|
|
945
943
|
display: "grid",
|
|
946
944
|
gap: 16
|
|
947
|
-
},
|
|
945
|
+
}, kn = {
|
|
948
946
|
alignItems: "start",
|
|
949
947
|
display: "grid",
|
|
950
948
|
gap: 16,
|
|
951
949
|
gridTemplateColumns: "minmax(0, 1fr) 420px"
|
|
952
|
-
},
|
|
950
|
+
}, An = {
|
|
953
951
|
border: "1px solid var(--mzn-color-border-neutral)",
|
|
954
952
|
borderRadius: 6,
|
|
955
953
|
height: 620,
|
|
956
954
|
minWidth: 0,
|
|
957
955
|
overflow: "hidden"
|
|
958
|
-
},
|
|
956
|
+
}, jn = {
|
|
959
957
|
alignItems: "center",
|
|
960
958
|
boxSizing: "border-box",
|
|
961
959
|
color: "var(--mzn-color-text-error)",
|
|
@@ -965,24 +963,24 @@ var An = {
|
|
|
965
963
|
lineHeight: 0,
|
|
966
964
|
padding: 0,
|
|
967
965
|
width: 26
|
|
968
|
-
},
|
|
966
|
+
}, Mn = {
|
|
969
967
|
alignItems: "center",
|
|
970
968
|
display: "flex",
|
|
971
969
|
height: "100%",
|
|
972
970
|
justifyContent: "center",
|
|
973
971
|
width: "100%"
|
|
974
|
-
},
|
|
975
|
-
.${
|
|
976
|
-
.${
|
|
977
|
-
flex: 0 0 ${
|
|
978
|
-
width: ${
|
|
972
|
+
}, Nn = "workflow-designer-side-panel", Pn = 96, Fn = `
|
|
973
|
+
.${Nn} .mzn-form-field--stretch .mzn-form-field__label-area,
|
|
974
|
+
.${Nn} .mzn-form-field--horizontal .mzn-form-field__label-area {
|
|
975
|
+
flex: 0 0 ${Pn}px;
|
|
976
|
+
width: ${Pn}px;
|
|
979
977
|
}
|
|
980
978
|
|
|
981
|
-
.${
|
|
982
|
-
.${
|
|
979
|
+
.${Nn} .mzn-form-field--stretch .mzn-form-field__data-entry,
|
|
980
|
+
.${Nn} .mzn-form-field--horizontal .mzn-form-field__data-entry {
|
|
983
981
|
min-width: 0;
|
|
984
982
|
}
|
|
985
|
-
`,
|
|
983
|
+
`, G = "#2563eb", In = "#64748b", Ln = "var(--mzn-color-text-error, #dc2626)", Rn = "drop-shadow(0 0 3px rgba(0, 87, 255, 0.85)) drop-shadow(0 0 9px rgba(0, 87, 255, 0.36))", zn = `
|
|
986
984
|
.workflow-selection-delete-control.react-flow__controls-button {
|
|
987
985
|
align-items: center !important;
|
|
988
986
|
display: flex !important;
|
|
@@ -1007,26 +1005,26 @@ var An = {
|
|
|
1007
1005
|
|
|
1008
1006
|
.workflow-edge--selected .react-flow__edge-path,
|
|
1009
1007
|
.react-flow__edge-path.workflow-edge--selected {
|
|
1010
|
-
filter: ${
|
|
1008
|
+
filter: ${Rn};
|
|
1011
1009
|
opacity: 1 !important;
|
|
1012
|
-
stroke: ${
|
|
1010
|
+
stroke: ${In} !important;
|
|
1013
1011
|
stroke-opacity: 1 !important;
|
|
1014
1012
|
stroke-width: 1.5px !important;
|
|
1015
1013
|
}
|
|
1016
1014
|
|
|
1017
1015
|
.workflow-edge--selected {
|
|
1018
|
-
--xy-edge-stroke: ${
|
|
1019
|
-
--xy-edge-stroke-selected: ${
|
|
1016
|
+
--xy-edge-stroke: ${In};
|
|
1017
|
+
--xy-edge-stroke-selected: ${In};
|
|
1020
1018
|
--xy-edge-stroke-width: 1.5px;
|
|
1021
1019
|
}
|
|
1022
1020
|
|
|
1023
|
-
`,
|
|
1021
|
+
`, Bn = {
|
|
1024
1022
|
display: "grid",
|
|
1025
1023
|
gap: 12
|
|
1026
|
-
},
|
|
1024
|
+
}, K = {
|
|
1027
1025
|
display: "grid",
|
|
1028
1026
|
gap: 12
|
|
1029
|
-
},
|
|
1027
|
+
}, Vn = {
|
|
1030
1028
|
border: "1px solid var(--mzn-color-border-neutral)",
|
|
1031
1029
|
borderRadius: 6,
|
|
1032
1030
|
display: "grid",
|
|
@@ -1034,26 +1032,26 @@ var An = {
|
|
|
1034
1032
|
maxHeight: 360,
|
|
1035
1033
|
overflow: "auto",
|
|
1036
1034
|
padding: 12
|
|
1037
|
-
},
|
|
1035
|
+
}, Hn = {
|
|
1038
1036
|
borderBottom: "1px solid var(--mzn-color-border-neutral)",
|
|
1039
1037
|
display: "grid",
|
|
1040
1038
|
gap: 4,
|
|
1041
1039
|
padding: "0 0 8px"
|
|
1042
|
-
},
|
|
1040
|
+
}, Un = {
|
|
1043
1041
|
display: "flex",
|
|
1044
1042
|
flexWrap: "wrap",
|
|
1045
1043
|
gap: 8
|
|
1046
|
-
},
|
|
1044
|
+
}, Wn = {
|
|
1047
1045
|
alignItems: "center",
|
|
1048
1046
|
display: "flex",
|
|
1049
1047
|
gap: 8
|
|
1050
|
-
},
|
|
1048
|
+
}, Gn = {
|
|
1051
1049
|
flex: "1 1 auto",
|
|
1052
1050
|
minWidth: 0
|
|
1053
|
-
},
|
|
1051
|
+
}, Kn = { flex: "0 0 auto" }, qn = {
|
|
1054
1052
|
display: "grid",
|
|
1055
1053
|
gap: 8
|
|
1056
|
-
},
|
|
1054
|
+
}, q = {
|
|
1057
1055
|
alignContent: "center",
|
|
1058
1056
|
background: "var(--mzn-color-bg-surface)",
|
|
1059
1057
|
border: "1px solid var(--mzn-color-border-neutral)",
|
|
@@ -1068,28 +1066,28 @@ var An = {
|
|
|
1068
1066
|
padding: "10px 12px",
|
|
1069
1067
|
textAlign: "center",
|
|
1070
1068
|
width: "100%"
|
|
1071
|
-
},
|
|
1072
|
-
...
|
|
1069
|
+
}, J = "0 8px 20px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--mzn-color-primary, #0057ff), 0 0 10px rgba(0, 87, 255, 0.3)", Y = 64, Jn = 160, Yn = 20, X = 64, Xn = 180, Zn = {
|
|
1070
|
+
...q,
|
|
1073
1071
|
display: "grid",
|
|
1074
1072
|
gap: 8,
|
|
1075
1073
|
padding: "10px 12px"
|
|
1076
|
-
},
|
|
1077
|
-
...
|
|
1074
|
+
}, Qn = {
|
|
1075
|
+
...Zn,
|
|
1078
1076
|
background: "#eff6ff",
|
|
1079
1077
|
border: "1px solid #2563eb"
|
|
1080
|
-
},
|
|
1081
|
-
...
|
|
1078
|
+
}, $n = {
|
|
1079
|
+
...Zn,
|
|
1082
1080
|
background: "#f0fdfa",
|
|
1083
1081
|
border: "1px solid #0f766e"
|
|
1084
|
-
},
|
|
1085
|
-
...
|
|
1082
|
+
}, er = {
|
|
1083
|
+
...q,
|
|
1086
1084
|
background: "#ffffff"
|
|
1087
|
-
},
|
|
1088
|
-
...
|
|
1085
|
+
}, tr = {
|
|
1086
|
+
...q,
|
|
1089
1087
|
background: "#ecfdf3",
|
|
1090
1088
|
border: "1px solid #2f855a"
|
|
1091
1089
|
}, nr = {
|
|
1092
|
-
...
|
|
1090
|
+
...q,
|
|
1093
1091
|
background: "#fff4ed",
|
|
1094
1092
|
border: "1px solid #c2410c"
|
|
1095
1093
|
}, rr = {
|
|
@@ -1108,15 +1106,15 @@ var An = {
|
|
|
1108
1106
|
startEvent: "開始",
|
|
1109
1107
|
userTask: "簽核"
|
|
1110
1108
|
}, cr = [{
|
|
1111
|
-
icon:
|
|
1109
|
+
icon: he,
|
|
1112
1110
|
label: "簽核節點",
|
|
1113
1111
|
type: "userTask"
|
|
1114
1112
|
}, {
|
|
1115
|
-
icon:
|
|
1113
|
+
icon: de,
|
|
1116
1114
|
label: "知會節點",
|
|
1117
1115
|
type: "serviceTask"
|
|
1118
1116
|
}], lr = [{
|
|
1119
|
-
icon:
|
|
1117
|
+
icon: ue,
|
|
1120
1118
|
label: "條件分流",
|
|
1121
1119
|
type: "exclusiveGateway"
|
|
1122
1120
|
}], ur = [{
|
|
@@ -1191,7 +1189,7 @@ var An = {
|
|
|
1191
1189
|
}, {
|
|
1192
1190
|
id: "PERCENTAGE",
|
|
1193
1191
|
name: "百分比"
|
|
1194
|
-
}],
|
|
1192
|
+
}], hr = [
|
|
1195
1193
|
{
|
|
1196
1194
|
id: "1",
|
|
1197
1195
|
name: "直屬主管",
|
|
@@ -1207,13 +1205,23 @@ var An = {
|
|
|
1207
1205
|
name: "第三層主管",
|
|
1208
1206
|
value: 3
|
|
1209
1207
|
}
|
|
1210
|
-
],
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1208
|
+
], gr = [
|
|
1209
|
+
{
|
|
1210
|
+
id: "NONE",
|
|
1211
|
+
name: "停止流程並提示"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
id: "DIRECT",
|
|
1215
|
+
name: "固定改派"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
id: "POSITION",
|
|
1219
|
+
name: "指定職位"
|
|
1220
|
+
}
|
|
1221
|
+
], _r = {
|
|
1222
|
+
id: "UNSUPPORTED",
|
|
1223
|
+
name: "不支援的備援設定"
|
|
1224
|
+
}, vr = [
|
|
1217
1225
|
{
|
|
1218
1226
|
id: "INITIATOR_MANAGER",
|
|
1219
1227
|
name: "改由申請人的直屬主管簽核"
|
|
@@ -1226,7 +1234,7 @@ var An = {
|
|
|
1226
1234
|
id: "FAIL",
|
|
1227
1235
|
name: "停止流程並提示"
|
|
1228
1236
|
}
|
|
1229
|
-
],
|
|
1237
|
+
], yr = { whenEmpty: "INITIATOR_MANAGER" }, br = [
|
|
1230
1238
|
{
|
|
1231
1239
|
id: "EQUALS",
|
|
1232
1240
|
name: "等於"
|
|
@@ -1259,14 +1267,14 @@ var An = {
|
|
|
1259
1267
|
id: "IS_EMPTY",
|
|
1260
1268
|
name: "未填寫"
|
|
1261
1269
|
}
|
|
1262
|
-
],
|
|
1270
|
+
], xr = [
|
|
1263
1271
|
"EQUALS",
|
|
1264
1272
|
"GREATER_THAN",
|
|
1265
1273
|
"GREATER_THAN_OR_EQUALS",
|
|
1266
1274
|
"LESS_THAN",
|
|
1267
1275
|
"LESS_THAN_OR_EQUALS",
|
|
1268
1276
|
"NOT_EQUALS"
|
|
1269
|
-
],
|
|
1277
|
+
], Sr = [
|
|
1270
1278
|
{
|
|
1271
1279
|
id: "NONE",
|
|
1272
1280
|
name: "未設定"
|
|
@@ -1283,341 +1291,340 @@ var An = {
|
|
|
1283
1291
|
id: "ORG_UNIT_POSITION",
|
|
1284
1292
|
name: "指定組織職位"
|
|
1285
1293
|
}
|
|
1286
|
-
],
|
|
1294
|
+
], Cr = {
|
|
1287
1295
|
id: "CUSTOM",
|
|
1288
1296
|
name: "既有自訂規則"
|
|
1289
|
-
},
|
|
1297
|
+
}, wr = "member-001", Tr = {
|
|
1290
1298
|
display: "flex",
|
|
1291
1299
|
flexDirection: "column",
|
|
1292
1300
|
height: "100%"
|
|
1293
|
-
},
|
|
1301
|
+
}, Er = {
|
|
1294
1302
|
flex: 1,
|
|
1295
1303
|
minHeight: 0,
|
|
1296
1304
|
overflowY: "auto"
|
|
1297
|
-
},
|
|
1305
|
+
}, Dr = {
|
|
1298
1306
|
borderTop: "1px solid var(--mzn-color-border-neutral)",
|
|
1299
1307
|
display: "flex",
|
|
1300
1308
|
gap: 8,
|
|
1301
1309
|
paddingTop: 12
|
|
1302
|
-
},
|
|
1310
|
+
}, Or = {
|
|
1303
1311
|
fields: [],
|
|
1304
1312
|
schemaVersion: 1
|
|
1305
|
-
},
|
|
1313
|
+
}, kr = {
|
|
1306
1314
|
layout: [],
|
|
1307
1315
|
schemaVersion: 1
|
|
1308
|
-
},
|
|
1309
|
-
endEvent:
|
|
1310
|
-
exclusiveGateway:
|
|
1311
|
-
parallelGateway:
|
|
1312
|
-
serviceTask:
|
|
1313
|
-
startEvent:
|
|
1314
|
-
userTask:
|
|
1316
|
+
}, Ar = {
|
|
1317
|
+
endEvent: Pr,
|
|
1318
|
+
exclusiveGateway: Pr,
|
|
1319
|
+
parallelGateway: Pr,
|
|
1320
|
+
serviceTask: Pr,
|
|
1321
|
+
startEvent: Pr,
|
|
1322
|
+
userTask: Pr
|
|
1315
1323
|
};
|
|
1316
|
-
function
|
|
1324
|
+
function jr(e, t) {
|
|
1317
1325
|
return typeof e == "function" ? e(t) : e;
|
|
1318
1326
|
}
|
|
1319
|
-
function
|
|
1320
|
-
let _e = e(), ve = t(), [D, ye] =
|
|
1321
|
-
directory:
|
|
1322
|
-
listOrgUnits: async () =>
|
|
1327
|
+
function Mr({ aiAssistantAvailable: r = !0, embedded: i = !1, formSchemaOverride: o, initialInitiatorPolicyCel: d, initialWorkflowDefinition: ce, onInitiatorPolicyChange: ue, onWorkflowChange: de, showAiAssistant: fe = !1, showDryRun: he = !0, templateId: ge }) {
|
|
1328
|
+
let _e = e(), ve = t(), [D, ye] = g(null), [be, xe] = g(null), [Se, Ce] = g(""), [Te, Ee] = g(null), [De, O] = g(null), Pe = h(null), [k, Le] = g(void 0), Re = h([]), Ye = h([]), A = bt({
|
|
1329
|
+
directory: m(() => ({
|
|
1330
|
+
listOrgUnits: async () => Re.current.map((e) => ({
|
|
1323
1331
|
id: e.id,
|
|
1324
1332
|
name: e.name
|
|
1325
1333
|
})),
|
|
1326
|
-
listPositions: async () =>
|
|
1334
|
+
listPositions: async () => Ye.current.map((e) => ({
|
|
1327
1335
|
id: e.id,
|
|
1328
1336
|
name: e.name
|
|
1329
1337
|
})),
|
|
1330
|
-
searchMembers: async (e) =>
|
|
1338
|
+
searchMembers: async (e) => Vi(await Ke(e)).map((e) => ({
|
|
1331
1339
|
email: e.email,
|
|
1332
1340
|
id: e.memberId,
|
|
1333
1341
|
name: e.name
|
|
1334
1342
|
}))
|
|
1335
1343
|
}), []),
|
|
1336
1344
|
initialState: {
|
|
1337
|
-
definition:
|
|
1345
|
+
definition: i && ce != null ? Wr(ce) : Yr(),
|
|
1338
1346
|
editingEdgeId: null,
|
|
1339
1347
|
formDefinitionVersionId: null,
|
|
1340
1348
|
formSchema: null,
|
|
1341
|
-
initiatorPolicyCel:
|
|
1349
|
+
initiatorPolicyCel: i && d !== void 0 ? d : null,
|
|
1342
1350
|
selectedEdgeIds: [],
|
|
1343
|
-
selectedNodeId:
|
|
1351
|
+
selectedNodeId: i && ce != null ? ce.nodes[0]?.id ?? "start" : "start"
|
|
1344
1352
|
},
|
|
1345
|
-
layout:
|
|
1353
|
+
layout: Zr,
|
|
1346
1354
|
onLayout: (e) => {
|
|
1347
|
-
let t =
|
|
1348
|
-
t &&
|
|
1355
|
+
let t = da(e, Pe.current);
|
|
1356
|
+
t && Le(t);
|
|
1349
1357
|
}
|
|
1350
|
-
}),
|
|
1358
|
+
}), j = A.state.definition, M = A.state.formDefinitionVersionId, N = A.state.initiatorPolicyCel, nt = A.state.selectedNodeId, P = A.state.selectedEdgeIds, at = A.state.editingEdgeId, st = (e) => A.replaceState((t) => ({
|
|
1351
1359
|
...t,
|
|
1352
|
-
definition:
|
|
1353
|
-
})),
|
|
1360
|
+
definition: jr(e, t.definition)
|
|
1361
|
+
})), ct = (e) => A.replaceState((t) => ({
|
|
1354
1362
|
...t,
|
|
1355
|
-
formDefinitionVersionId:
|
|
1356
|
-
})), ut = (e) =>
|
|
1363
|
+
formDefinitionVersionId: jr(e, t.formDefinitionVersionId)
|
|
1364
|
+
})), ut = (e) => A.replaceState((t) => ({
|
|
1357
1365
|
...t,
|
|
1358
|
-
initiatorPolicyCel:
|
|
1359
|
-
})), dt = (e) =>
|
|
1366
|
+
initiatorPolicyCel: jr(e, t.initiatorPolicyCel)
|
|
1367
|
+
})), dt = (e) => A.replaceState((t) => ({
|
|
1360
1368
|
...t,
|
|
1361
|
-
selectedNodeId:
|
|
1362
|
-
})), ft = (e) =>
|
|
1369
|
+
selectedNodeId: jr(e, t.selectedNodeId)
|
|
1370
|
+
})), ft = (e) => A.replaceState((t) => ({
|
|
1363
1371
|
...t,
|
|
1364
|
-
selectedEdgeIds:
|
|
1365
|
-
})), pt = (e) =>
|
|
1372
|
+
selectedEdgeIds: jr(e, t.selectedEdgeIds)
|
|
1373
|
+
})), pt = (e) => A.replaceState((t) => ({
|
|
1366
1374
|
...t,
|
|
1367
|
-
editingEdgeId:
|
|
1368
|
-
})), [
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
}, [
|
|
1372
|
-
let [St, Ct] =
|
|
1373
|
-
formDefinitionVersionId:
|
|
1374
|
-
initiatorPolicyCel:
|
|
1375
|
-
workflowDefinition:
|
|
1375
|
+
editingEdgeId: jr(e, t.editingEdgeId)
|
|
1376
|
+
})), [mt, F] = g(null), [xt, I] = g(null);
|
|
1377
|
+
p(() => {
|
|
1378
|
+
I(null);
|
|
1379
|
+
}, [nt]);
|
|
1380
|
+
let [St, Ct] = g(!0), [wt, Tt] = g(!1), [Et, Dt] = g(!1), [Ot, kt] = g([]), At = m(() => JSON.stringify({
|
|
1381
|
+
formDefinitionVersionId: M,
|
|
1382
|
+
initiatorPolicyCel: N,
|
|
1383
|
+
workflowDefinition: j
|
|
1376
1384
|
}), [
|
|
1377
|
-
j,
|
|
1378
1385
|
M,
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
+
N,
|
|
1387
|
+
j
|
|
1388
|
+
]), jt = !!Se && At !== Se, [Mt, Nt] = g(!1), [L, Pt] = g([]), [Ft, It] = g([]), Lt = h(0), zt = h(/* @__PURE__ */ new Set()), [R, Vt] = g([]), [z, B] = g([]), [Ht, Ut] = g([]);
|
|
1389
|
+
Re.current = R, Ye.current = z;
|
|
1390
|
+
let [Wt, Gt] = g(!1), [Kt, qt] = g(!1), [Yt, Xt] = g("{}"), [Zt, $t] = g(null), [en, tn] = g(null), [nn, rn] = g([]), [an, on] = g("loading"), [sn, ln] = g(!1), [un, dn] = g(!1), [V, H] = g(null), [fn, mn] = g(!1), [hn, _n] = g(!1), vn = jt || fn ? "保存並發布" : be ? "發布草稿" : "已發布";
|
|
1391
|
+
p(() => {
|
|
1392
|
+
i ? Zn() : Qn();
|
|
1393
|
+
}, [i, ge]), p(() => {
|
|
1386
1394
|
function e(e) {
|
|
1387
1395
|
jt && (e.preventDefault(), e.returnValue = "");
|
|
1388
1396
|
}
|
|
1389
1397
|
return window.addEventListener("beforeunload", e), () => {
|
|
1390
1398
|
window.removeEventListener("beforeunload", e);
|
|
1391
1399
|
};
|
|
1392
|
-
}, [jt]),
|
|
1393
|
-
|
|
1394
|
-
}, [
|
|
1395
|
-
st((e) =>
|
|
1396
|
-
}, [
|
|
1397
|
-
function
|
|
1400
|
+
}, [jt]), p(() => {
|
|
1401
|
+
tr(j);
|
|
1402
|
+
}, [j, L]), p(() => {
|
|
1403
|
+
st((e) => Wr(e));
|
|
1404
|
+
}, [j.edges, j.nodes]);
|
|
1405
|
+
function yn() {
|
|
1398
1406
|
(!jt || window.confirm("目前有尚未儲存的流程草稿,確定要離開嗎?")) && _e.push(ve.templates());
|
|
1399
1407
|
}
|
|
1400
|
-
let
|
|
1401
|
-
|
|
1408
|
+
let U = m(() => j.nodes.find((e) => e.id === nt) ?? null, [nt, j.nodes]), bn = U ? Ai(U) : !1, xn = P.length > 0 || bn, Sn = f(() => {
|
|
1409
|
+
A.getState().selectedEdgeIds.forEach((e) => A.dispatch({
|
|
1402
1410
|
edgeId: e,
|
|
1403
1411
|
type: "deleteEdge"
|
|
1404
|
-
})),
|
|
1405
|
-
nodeId:
|
|
1412
|
+
})), U && Ai(U) && A.dispatch({
|
|
1413
|
+
nodeId: U.id,
|
|
1406
1414
|
type: "deleteNode"
|
|
1407
1415
|
});
|
|
1408
|
-
}, [
|
|
1409
|
-
|
|
1410
|
-
if (!
|
|
1416
|
+
}, [A, U]);
|
|
1417
|
+
p(() => {
|
|
1418
|
+
if (!xn) return;
|
|
1411
1419
|
function e(e) {
|
|
1412
|
-
(e.key === "Delete" || e.key === "Backspace") && (
|
|
1420
|
+
(e.key === "Delete" || e.key === "Backspace") && (Pi(e.target) || (e.preventDefault(), Sn()));
|
|
1413
1421
|
}
|
|
1414
1422
|
return window.addEventListener("keydown", e), () => {
|
|
1415
1423
|
window.removeEventListener("keydown", e);
|
|
1416
1424
|
};
|
|
1417
|
-
}, [
|
|
1418
|
-
let
|
|
1419
|
-
M,
|
|
1420
|
-
Me,
|
|
1421
|
-
Te
|
|
1422
|
-
]), Ln = p(() => A.edges.map((e) => Br(e, A.nodes, N.includes(e.id))), [
|
|
1425
|
+
}, [xn, Sn]);
|
|
1426
|
+
let Cn = m(() => j.edges.find((e) => e.id === at) ?? null, [at, j.edges]), wn = m(() => P.length === 1 ? j.edges.find((e) => e.id === P[0]) ?? null : null, [P, j.edges]), En = m(() => P.map((e) => j.edges.find((t) => t.id === e) ?? null).filter((e) => !!e), [P, j.edges]), W = m(() => De ?? Si(N, Te), [
|
|
1423
1427
|
N,
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
]),
|
|
1427
|
-
|
|
1428
|
+
De,
|
|
1429
|
+
Te
|
|
1430
|
+
]), Pn = m(() => j.edges.map((e) => Hr(e, j.nodes, P.includes(e.id))), [
|
|
1431
|
+
P,
|
|
1432
|
+
j.edges,
|
|
1433
|
+
j.nodes
|
|
1434
|
+
]), G = m(() => $(Ot, M) ?? $(Fi(D?.formVersions ?? []), M), [
|
|
1435
|
+
M,
|
|
1428
1436
|
Ot,
|
|
1429
1437
|
D?.formVersions
|
|
1430
|
-
]),
|
|
1431
|
-
|
|
1432
|
-
|
|
1438
|
+
]), In = m(() => Bi(Ot, G), [Ot, G]), Rn = G?.schema ?? null, q = i ? o ?? null : Rn;
|
|
1439
|
+
p(() => {
|
|
1440
|
+
A.getState().formSchema !== q && A.replaceState((e) => ({
|
|
1433
1441
|
...e,
|
|
1434
|
-
formSchema:
|
|
1442
|
+
formSchema: q
|
|
1435
1443
|
}));
|
|
1436
|
-
}, [
|
|
1437
|
-
let
|
|
1438
|
-
|
|
1444
|
+
}, [A, q]);
|
|
1445
|
+
let J = m(() => fa(j), [j]);
|
|
1446
|
+
p(() => {
|
|
1439
1447
|
let e = !0;
|
|
1440
1448
|
return He({ includeDeprecated: !0 }).then((t) => {
|
|
1441
|
-
e && (
|
|
1449
|
+
e && (rn(t), on("ready"));
|
|
1442
1450
|
}).catch(() => {
|
|
1443
|
-
e &&
|
|
1451
|
+
e && on("unavailable");
|
|
1444
1452
|
}), () => {
|
|
1445
1453
|
e = !1;
|
|
1446
1454
|
};
|
|
1447
1455
|
}, []);
|
|
1448
|
-
let
|
|
1449
|
-
definition:
|
|
1450
|
-
endpoints:
|
|
1451
|
-
formFields:
|
|
1456
|
+
let Y = fn && V ? V.schema : q, Jn = m(() => an === "ready" ? Qt({
|
|
1457
|
+
definition: j,
|
|
1458
|
+
endpoints: nn,
|
|
1459
|
+
formFields: Y?.fields ?? []
|
|
1452
1460
|
})[0] ?? null : null, [
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
]),
|
|
1458
|
-
|
|
1459
|
-
I,
|
|
1461
|
+
nn,
|
|
1462
|
+
an,
|
|
1463
|
+
Y,
|
|
1464
|
+
j
|
|
1465
|
+
]), Yn = m(() => j.nodes.map((e) => zr(e, L, R, z, e.id === nt, W, Y)), [
|
|
1466
|
+
W,
|
|
1460
1467
|
L,
|
|
1461
1468
|
R,
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1469
|
+
z,
|
|
1470
|
+
nt,
|
|
1471
|
+
Y,
|
|
1472
|
+
j.nodes
|
|
1473
|
+
]), X = m(() => rt(j), [j]), Xn = m(() => Ci(W), [W]);
|
|
1474
|
+
p(() => {
|
|
1475
|
+
i && de?.(j);
|
|
1476
|
+
}, [i, j]), p(() => {
|
|
1477
|
+
i && ue?.(N);
|
|
1478
|
+
}, [i, N]);
|
|
1479
|
+
async function Zn() {
|
|
1480
|
+
Ct(!0), F(null);
|
|
1473
1481
|
try {
|
|
1474
|
-
let e = await
|
|
1475
|
-
Vt(e.orgUnits),
|
|
1482
|
+
let e = await Oe();
|
|
1483
|
+
Vt(e.orgUnits), B(e.positions), Ut(e.memberships);
|
|
1476
1484
|
} catch (e) {
|
|
1477
|
-
|
|
1485
|
+
F(wa(e));
|
|
1478
1486
|
} finally {
|
|
1479
1487
|
Ct(!1);
|
|
1480
1488
|
}
|
|
1481
1489
|
}
|
|
1482
|
-
async function
|
|
1483
|
-
Ct(!0),
|
|
1490
|
+
async function Qn() {
|
|
1491
|
+
Ct(!0), F(null), I(null);
|
|
1484
1492
|
try {
|
|
1485
|
-
let [e, t] = await Promise.all([We(ge),
|
|
1486
|
-
ye(e), xe(n), Vt(t.orgUnits),
|
|
1487
|
-
let i =
|
|
1488
|
-
st(i),
|
|
1493
|
+
let [e, t] = await Promise.all([We(ge), Oe()]), n = e.versions.find((e) => e.status === "DRAFT") ?? null, r = n ?? e.versions[0] ?? null;
|
|
1494
|
+
ye(e), xe(n), Vt(t.orgUnits), B(t.positions), Ut(t.memberships), kt(Fi(e.formVersions));
|
|
1495
|
+
let i = Wr(r?.workflowDefinition ?? Yr()), a = r?.formDefinitionVersionId ?? e.formVersions[0]?.id ?? null, o = r?.initiatorPolicyCel ?? null;
|
|
1496
|
+
st(i), ct(a), ut(o), Ce(JSON.stringify({
|
|
1489
1497
|
formDefinitionVersionId: a,
|
|
1490
1498
|
initiatorPolicyCel: o,
|
|
1491
1499
|
workflowDefinition: i
|
|
1492
|
-
})), Ee(r && !e.template.currentVersionId && !r.initiatorPolicyCel &&
|
|
1500
|
+
})), Ee(r && !e.template.currentVersionId && !r.initiatorPolicyCel && Xr(r.workflowDefinition) ? "NONE" : null), O(null), dt(r?.workflowDefinition.nodes[0]?.id ?? "start"), ft([]), pt(null), H(null), mn(!1);
|
|
1493
1501
|
} catch (e) {
|
|
1494
|
-
|
|
1502
|
+
F(wa(e));
|
|
1495
1503
|
} finally {
|
|
1496
1504
|
Ct(!1);
|
|
1497
1505
|
}
|
|
1498
1506
|
}
|
|
1499
|
-
async function
|
|
1500
|
-
Dt(!0),
|
|
1507
|
+
async function $n(e) {
|
|
1508
|
+
Dt(!0), F(null);
|
|
1501
1509
|
try {
|
|
1502
1510
|
let t = await qe(e);
|
|
1503
|
-
kt(
|
|
1511
|
+
kt(Bi(Fi(t), G));
|
|
1504
1512
|
} catch (e) {
|
|
1505
|
-
|
|
1513
|
+
F(wa(e));
|
|
1506
1514
|
} finally {
|
|
1507
1515
|
Dt(!1);
|
|
1508
1516
|
}
|
|
1509
1517
|
}
|
|
1510
|
-
async function
|
|
1511
|
-
Nt(!0),
|
|
1512
|
-
let t = ++
|
|
1518
|
+
async function er(e) {
|
|
1519
|
+
Nt(!0), F(null);
|
|
1520
|
+
let t = ++Lt.current;
|
|
1513
1521
|
try {
|
|
1514
|
-
let n =
|
|
1515
|
-
Pt((e) =>
|
|
1522
|
+
let n = Vi(await Ke(e));
|
|
1523
|
+
Pt((e) => ta(e, n)), t === Lt.current && It(n);
|
|
1516
1524
|
} catch (e) {
|
|
1517
|
-
t ===
|
|
1525
|
+
t === Lt.current && F(wa(e));
|
|
1518
1526
|
} finally {
|
|
1519
|
-
t ===
|
|
1527
|
+
t === Lt.current && Nt(!1);
|
|
1520
1528
|
}
|
|
1521
1529
|
}
|
|
1522
|
-
async function
|
|
1523
|
-
let t =
|
|
1530
|
+
async function tr(e) {
|
|
1531
|
+
let t = ra(e), n = c(t.filter((e) => !L.some((t) => t.memberId === e && !t.unresolved)), zt.current);
|
|
1524
1532
|
if (n.length === 0) return;
|
|
1525
|
-
let { profiles: r, skippedIds: i } = await
|
|
1526
|
-
o.forEach((e) =>
|
|
1533
|
+
let { profiles: r, skippedIds: i } = await l(n, Ge), a = new Set(r.map((e) => e.memberId)), o = n.filter((e) => !a.has(e) && !i.includes(e));
|
|
1534
|
+
o.forEach((e) => zt.current.add(e)), Pt((e) => ta(e, [...Vi(r), ...[...o, ...i].map(Hi)]));
|
|
1527
1535
|
}
|
|
1528
|
-
async function
|
|
1529
|
-
Tt(!0),
|
|
1536
|
+
async function nr(e) {
|
|
1537
|
+
Tt(!0), F(null);
|
|
1530
1538
|
try {
|
|
1531
|
-
let t =
|
|
1539
|
+
let t = fa(j), n = Ci(W), r = e ? Jn : null;
|
|
1532
1540
|
if (t || n || r) {
|
|
1533
1541
|
let e = t ?? n ?? r ?? "流程設定未完成";
|
|
1534
|
-
throw
|
|
1542
|
+
throw F(e), Error(e);
|
|
1535
1543
|
}
|
|
1536
|
-
if (
|
|
1544
|
+
if (fn && V !== null) await ze({
|
|
1537
1545
|
category: D?.template.category ?? null,
|
|
1538
1546
|
categoryId: D?.template.categoryId ?? null,
|
|
1539
|
-
formDefinitionId:
|
|
1547
|
+
formDefinitionId: G?.formDefinitionId ?? null,
|
|
1540
1548
|
formDescription: null,
|
|
1541
|
-
formName:
|
|
1542
|
-
initiatorPolicyCel:
|
|
1549
|
+
formName: G?.formName ?? D?.template.name ?? "表單",
|
|
1550
|
+
initiatorPolicyCel: N,
|
|
1543
1551
|
notificationConfig: null,
|
|
1544
1552
|
publish: e,
|
|
1545
|
-
schema:
|
|
1553
|
+
schema: V.schema,
|
|
1546
1554
|
slaDefaults: null,
|
|
1547
1555
|
templateDescription: null,
|
|
1548
1556
|
templateId: ge ?? null,
|
|
1549
1557
|
templateName: D?.template.name ?? "模板",
|
|
1550
|
-
uiSchema:
|
|
1551
|
-
workflowDefinition:
|
|
1552
|
-
}),
|
|
1558
|
+
uiSchema: V.uiSchema,
|
|
1559
|
+
workflowDefinition: j
|
|
1560
|
+
}), mn(!1), H(null), await Qn();
|
|
1553
1561
|
else {
|
|
1554
1562
|
let t = be ?? await Ve(ge), n = await Je({
|
|
1555
|
-
formDefinitionVersionId:
|
|
1556
|
-
initiatorPolicyCel:
|
|
1563
|
+
formDefinitionVersionId: M,
|
|
1564
|
+
initiatorPolicyCel: N,
|
|
1557
1565
|
versionId: t.id,
|
|
1558
|
-
workflowDefinition:
|
|
1566
|
+
workflowDefinition: j
|
|
1559
1567
|
});
|
|
1560
|
-
xe(n), e && await Ue(n.id), await
|
|
1568
|
+
xe(n), e && await Ue(n.id), await Qn();
|
|
1561
1569
|
}
|
|
1562
1570
|
} catch (e) {
|
|
1563
|
-
throw
|
|
1571
|
+
throw F(wa(e)), e;
|
|
1564
1572
|
} finally {
|
|
1565
1573
|
Tt(!1);
|
|
1566
1574
|
}
|
|
1567
1575
|
}
|
|
1576
|
+
async function rr() {
|
|
1577
|
+
await nr(!1);
|
|
1578
|
+
}
|
|
1568
1579
|
async function ir() {
|
|
1569
|
-
await
|
|
1580
|
+
await nr(!0);
|
|
1570
1581
|
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1582
|
+
function ar() {
|
|
1583
|
+
Xt(JSON.stringify(pn(Y), null, 2)), $t(null), tn(null), Gt(!0);
|
|
1573
1584
|
}
|
|
1574
1585
|
function or() {
|
|
1575
|
-
|
|
1586
|
+
Kt || Gt(!1);
|
|
1576
1587
|
}
|
|
1577
|
-
function
|
|
1578
|
-
qt
|
|
1579
|
-
}
|
|
1580
|
-
async function yr() {
|
|
1581
|
-
Yt(!0), nn(null), en(null);
|
|
1588
|
+
async function br() {
|
|
1589
|
+
qt(!0), tn(null), $t(null);
|
|
1582
1590
|
try {
|
|
1583
|
-
let e =
|
|
1591
|
+
let e = Ii(Yt), t = await Be({
|
|
1584
1592
|
formData: e,
|
|
1585
|
-
initiatorMemberId:
|
|
1586
|
-
initiatorMetadataSnapshot:
|
|
1587
|
-
workflowDefinition:
|
|
1593
|
+
initiatorMemberId: wr,
|
|
1594
|
+
initiatorMetadataSnapshot: Ji(wr, Ht),
|
|
1595
|
+
workflowDefinition: j
|
|
1588
1596
|
});
|
|
1589
|
-
|
|
1597
|
+
$t(t);
|
|
1590
1598
|
} catch (e) {
|
|
1591
|
-
|
|
1599
|
+
tn(wa(e));
|
|
1592
1600
|
} finally {
|
|
1593
|
-
|
|
1601
|
+
qt(!1);
|
|
1594
1602
|
}
|
|
1595
1603
|
}
|
|
1596
|
-
async function
|
|
1597
|
-
if (
|
|
1598
|
-
let e =
|
|
1599
|
-
if (!e) {
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
yn(!1);
|
|
1604
|
+
async function xr() {
|
|
1605
|
+
if (dn(!0), V !== null) return;
|
|
1606
|
+
let e = G?.formDefinitionId ?? null;
|
|
1607
|
+
if (!e) H({
|
|
1608
|
+
schema: Or,
|
|
1609
|
+
uiSchema: kr
|
|
1610
|
+
});
|
|
1611
|
+
else {
|
|
1612
|
+
_n(!0);
|
|
1613
|
+
try {
|
|
1614
|
+
let t = await we(e), n = t.versions.find((e) => e.status === "DRAFT") ?? t.versions.find((e) => e.id === t.definition.currentVersionId) ?? t.versions[0] ?? null;
|
|
1615
|
+
H({
|
|
1616
|
+
schema: n?.schema ?? Or,
|
|
1617
|
+
uiSchema: n?.uiSchema ?? kr
|
|
1618
|
+
});
|
|
1619
|
+
} catch (e) {
|
|
1620
|
+
F(wa(e));
|
|
1621
|
+
} finally {
|
|
1622
|
+
_n(!1);
|
|
1623
|
+
}
|
|
1617
1624
|
}
|
|
1618
1625
|
}
|
|
1619
|
-
function
|
|
1620
|
-
let t = Ie(e,
|
|
1626
|
+
function Mr(e) {
|
|
1627
|
+
let t = Ie(e, Yn);
|
|
1621
1628
|
st((e) => ({
|
|
1622
1629
|
...e,
|
|
1623
1630
|
nodes: e.nodes.map((e) => {
|
|
@@ -1629,127 +1636,123 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
1629
1636
|
})
|
|
1630
1637
|
}));
|
|
1631
1638
|
}
|
|
1632
|
-
function
|
|
1633
|
-
|
|
1639
|
+
function Pr(e) {
|
|
1640
|
+
Oi(e, j.nodes) && e.source && e.target && A.dispatch({
|
|
1634
1641
|
source: e.source,
|
|
1635
1642
|
target: e.target,
|
|
1636
1643
|
type: "connectEdge"
|
|
1637
1644
|
});
|
|
1638
1645
|
}
|
|
1639
|
-
function
|
|
1640
|
-
e.stopPropagation(), ft((n) => e.shiftKey || e.metaKey || e.ctrlKey ?
|
|
1646
|
+
function Fr(e, t) {
|
|
1647
|
+
e.stopPropagation(), ft((n) => e.shiftKey || e.metaKey || e.ctrlKey ? ki(n, t.id) : [t.id]), dt(null);
|
|
1641
1648
|
}
|
|
1642
|
-
function
|
|
1649
|
+
function Ir() {
|
|
1643
1650
|
pt(null);
|
|
1644
1651
|
}
|
|
1645
|
-
function
|
|
1646
|
-
|
|
1652
|
+
function Lr(e) {
|
|
1653
|
+
A.dispatch({
|
|
1647
1654
|
nodeType: e,
|
|
1648
1655
|
type: "addNode"
|
|
1649
1656
|
});
|
|
1650
1657
|
}
|
|
1651
|
-
function
|
|
1652
|
-
|
|
1658
|
+
function Rr(e) {
|
|
1659
|
+
U && A.dispatch({
|
|
1653
1660
|
label: e,
|
|
1654
|
-
nodeId:
|
|
1661
|
+
nodeId: U.id,
|
|
1655
1662
|
type: "renameNode"
|
|
1656
1663
|
});
|
|
1657
1664
|
}
|
|
1658
1665
|
function Z(e) {
|
|
1659
|
-
if (!
|
|
1660
|
-
let t =
|
|
1661
|
-
|
|
1666
|
+
if (!U || U.type !== "userTask") return;
|
|
1667
|
+
let t = U.id, n = U.data.decisionPolicy;
|
|
1668
|
+
A.dispatch({
|
|
1662
1669
|
approverResolver: e,
|
|
1663
1670
|
nodeId: t,
|
|
1664
1671
|
type: "setUserTaskApprover"
|
|
1665
|
-
}),
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
}
|
|
1671
|
-
return;
|
|
1672
|
-
}
|
|
1673
|
-
rt(n, e) && F({
|
|
1674
|
-
message: `簽核者已變更為 ${ct(e)} 位,不足原本設定的 ${n?.type === "QUORUM" ? n.threshold : 0} 位門檻,簽核政策已重設為單人簽核,請重新設定。`,
|
|
1672
|
+
}), I(null), ot(e, n) ? I({
|
|
1673
|
+
message: "主管鏈會依序加入多位主管,簽核方式已改為「依序簽核」。",
|
|
1674
|
+
nodeId: t,
|
|
1675
|
+
policyType: "SEQUENTIAL"
|
|
1676
|
+
}) : it(n, e) && I({
|
|
1677
|
+
message: `簽核者已變更為 ${lt(e)} 位,不足原本設定的 ${n?.type === "QUORUM" ? n.threshold : 0} 位門檻,簽核政策已重設為單人簽核,請重新設定。`,
|
|
1675
1678
|
nodeId: t,
|
|
1676
1679
|
policyType: "SINGLE"
|
|
1677
1680
|
});
|
|
1678
1681
|
}
|
|
1679
|
-
function
|
|
1680
|
-
|
|
1681
|
-
nodeId:
|
|
1682
|
+
function Br(e) {
|
|
1683
|
+
U && U.type === "userTask" && A.dispatch({
|
|
1684
|
+
nodeId: U.id,
|
|
1682
1685
|
resubmitStrategy: e,
|
|
1683
1686
|
type: "setUserTaskReturnResubmitStrategy"
|
|
1684
1687
|
});
|
|
1685
1688
|
}
|
|
1686
|
-
function
|
|
1687
|
-
|
|
1688
|
-
nodeId:
|
|
1689
|
+
function Vr(e) {
|
|
1690
|
+
U && U.type === "userTask" && A.dispatch({
|
|
1691
|
+
nodeId: U.id,
|
|
1689
1692
|
requireComment: e,
|
|
1690
1693
|
type: "setUserTaskReturnRequireComment"
|
|
1691
1694
|
});
|
|
1692
1695
|
}
|
|
1693
1696
|
function Q(e) {
|
|
1694
|
-
|
|
1695
|
-
nodeId:
|
|
1697
|
+
U && U.type === "userTask" && A.dispatch({
|
|
1698
|
+
nodeId: U.id,
|
|
1696
1699
|
sla: e,
|
|
1697
1700
|
type: "setUserTaskSla"
|
|
1698
1701
|
});
|
|
1699
1702
|
}
|
|
1700
|
-
function
|
|
1701
|
-
|
|
1703
|
+
function Ur(e) {
|
|
1704
|
+
U && U.type === "userTask" && A.dispatch({
|
|
1702
1705
|
excludeInitiator: e,
|
|
1703
|
-
nodeId:
|
|
1706
|
+
nodeId: U.id,
|
|
1704
1707
|
type: "setUserTaskExcludeInitiator"
|
|
1705
1708
|
});
|
|
1706
1709
|
}
|
|
1707
|
-
function
|
|
1708
|
-
if (!
|
|
1709
|
-
|
|
1710
|
+
function Gr(e) {
|
|
1711
|
+
if (!U || U.type !== "userTask") return;
|
|
1712
|
+
I(null);
|
|
1710
1713
|
let t = e.type === "QUORUM" ? {
|
|
1711
1714
|
...e,
|
|
1712
1715
|
threshold: tt(e.threshold, e.thresholdType)
|
|
1713
1716
|
} : e;
|
|
1714
|
-
|
|
1717
|
+
A.dispatch({
|
|
1715
1718
|
decisionPolicy: t,
|
|
1716
|
-
nodeId:
|
|
1719
|
+
nodeId: U.id,
|
|
1717
1720
|
type: "setUserTaskDecisionPolicy"
|
|
1718
1721
|
});
|
|
1719
1722
|
}
|
|
1720
|
-
function
|
|
1721
|
-
|
|
1723
|
+
function Kr(e) {
|
|
1724
|
+
U && U.type === "userTask" && A.dispatch({
|
|
1722
1725
|
...e,
|
|
1723
|
-
nodeId:
|
|
1726
|
+
nodeId: U.id,
|
|
1724
1727
|
type: "setUserTaskOptions"
|
|
1725
1728
|
});
|
|
1726
1729
|
}
|
|
1727
|
-
function
|
|
1728
|
-
|
|
1730
|
+
function qr(e) {
|
|
1731
|
+
U && U.type === "serviceTask" && A.dispatch({
|
|
1729
1732
|
action: e,
|
|
1730
|
-
nodeId:
|
|
1733
|
+
nodeId: U.id,
|
|
1731
1734
|
type: "setServiceAction"
|
|
1732
1735
|
});
|
|
1733
1736
|
}
|
|
1734
|
-
function
|
|
1735
|
-
|
|
1737
|
+
function Jr(e) {
|
|
1738
|
+
O(e.mode === "ALL" || e.mode === "CUSTOM" ? null : e), Ee(e.mode === "ALL" || e.mode === "CUSTOM" ? null : e.mode), ut(Ti(e, R));
|
|
1736
1739
|
}
|
|
1737
|
-
function
|
|
1738
|
-
|
|
1739
|
-
nodeId:
|
|
1740
|
+
function fi(e) {
|
|
1741
|
+
U && U.type !== "startEvent" && A.dispatch({
|
|
1742
|
+
nodeId: U.id,
|
|
1740
1743
|
triggerMode: e,
|
|
1741
1744
|
type: "setNodeTriggerMode"
|
|
1742
1745
|
});
|
|
1743
1746
|
}
|
|
1744
|
-
function
|
|
1745
|
-
|
|
1747
|
+
function hi(e, t) {
|
|
1748
|
+
A.dispatch({
|
|
1746
1749
|
edgeId: e,
|
|
1747
1750
|
isDefault: t,
|
|
1748
1751
|
type: "setEdgeDefault"
|
|
1749
1752
|
});
|
|
1750
1753
|
}
|
|
1751
|
-
function
|
|
1752
|
-
|
|
1754
|
+
function xi({ edgeId: e, fieldKey: t, operator: n, value: r }) {
|
|
1755
|
+
A.dispatch({
|
|
1753
1756
|
edgeId: e,
|
|
1754
1757
|
fieldKey: t,
|
|
1755
1758
|
operator: n,
|
|
@@ -1757,293 +1760,293 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
1757
1760
|
value: r
|
|
1758
1761
|
});
|
|
1759
1762
|
}
|
|
1760
|
-
function
|
|
1761
|
-
|
|
1763
|
+
function wi() {
|
|
1764
|
+
A.dispatch({ type: "autoLayout" });
|
|
1762
1765
|
}
|
|
1763
|
-
return /* @__PURE__ */
|
|
1764
|
-
/* @__PURE__ */
|
|
1765
|
-
|
|
1766
|
-
description:
|
|
1766
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
1767
|
+
/* @__PURE__ */ w("style", { children: Fn }),
|
|
1768
|
+
i ? null : /* @__PURE__ */ w(ne, { children: /* @__PURE__ */ T(E, {
|
|
1769
|
+
description: Dn({
|
|
1767
1770
|
draftVersion: be?.version ?? null,
|
|
1768
1771
|
hasPublishedVersion: !!D?.template.currentVersionId,
|
|
1769
1772
|
publishedVersion: D?.versions.find((e) => e.id === D.template.currentVersionId)?.version ?? null
|
|
1770
1773
|
}),
|
|
1771
|
-
onBackClick:
|
|
1774
|
+
onBackClick: yn,
|
|
1772
1775
|
title: D?.template.name ?? "流程設計器",
|
|
1773
1776
|
children: [
|
|
1774
|
-
|
|
1777
|
+
fe ? /* @__PURE__ */ w(v, {
|
|
1775
1778
|
disabled: !r,
|
|
1776
|
-
onClick: () =>
|
|
1777
|
-
variant:
|
|
1779
|
+
onClick: () => ln((e) => !e),
|
|
1780
|
+
variant: sn ? "base-primary" : "base-secondary",
|
|
1778
1781
|
children: r ? "AI 助理" : "AI 助理(未設定)"
|
|
1779
1782
|
}) : null,
|
|
1780
|
-
/* @__PURE__ */
|
|
1783
|
+
/* @__PURE__ */ w(v, {
|
|
1781
1784
|
"aria-label": "儲存草稿",
|
|
1782
|
-
disabled: wt || !!
|
|
1783
|
-
icon:
|
|
1785
|
+
disabled: wt || !!J || !!Xn,
|
|
1786
|
+
icon: pe,
|
|
1784
1787
|
iconType: "icon-only",
|
|
1785
|
-
onClick: () => void
|
|
1788
|
+
onClick: () => void rr(),
|
|
1786
1789
|
variant: "base-secondary",
|
|
1787
1790
|
children: "儲存草稿"
|
|
1788
1791
|
}),
|
|
1789
|
-
he ? /* @__PURE__ */
|
|
1790
|
-
disabled: St || !!
|
|
1791
|
-
icon:
|
|
1792
|
+
he ? /* @__PURE__ */ w(v, {
|
|
1793
|
+
disabled: St || !!J || !!Xn,
|
|
1794
|
+
icon: le,
|
|
1792
1795
|
iconType: "leading",
|
|
1793
|
-
onClick:
|
|
1796
|
+
onClick: ar,
|
|
1794
1797
|
variant: "base-secondary",
|
|
1795
1798
|
children: "試跑流程"
|
|
1796
1799
|
}) : null,
|
|
1797
|
-
/* @__PURE__ */
|
|
1798
|
-
disabled: wt || !be && !jt && !
|
|
1799
|
-
icon:
|
|
1800
|
+
/* @__PURE__ */ w(v, {
|
|
1801
|
+
disabled: wt || !be && !jt && !fn || !!J || !!Xn || !!Jn,
|
|
1802
|
+
icon: se,
|
|
1800
1803
|
iconType: "leading",
|
|
1801
|
-
onClick: () => void
|
|
1804
|
+
onClick: () => void ir(),
|
|
1802
1805
|
variant: "base-primary",
|
|
1803
|
-
children:
|
|
1806
|
+
children: vn
|
|
1804
1807
|
})
|
|
1805
1808
|
]
|
|
1806
1809
|
}) }),
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
style:
|
|
1810
|
+
/* @__PURE__ */ w(ie, { children: /* @__PURE__ */ w(re, { children: /* @__PURE__ */ T("div", {
|
|
1811
|
+
style: On,
|
|
1809
1812
|
children: [
|
|
1810
|
-
|
|
1813
|
+
mt ? /* @__PURE__ */ w(S, {
|
|
1811
1814
|
color: "text-error",
|
|
1812
1815
|
variant: "body",
|
|
1813
|
-
children:
|
|
1816
|
+
children: mt
|
|
1814
1817
|
}) : null,
|
|
1815
|
-
xt && xt.nodeId ===
|
|
1818
|
+
xt && xt.nodeId === U?.id && U.type === "userTask" && (U.data.decisionPolicy?.type ?? "SINGLE") === xt.policyType ? /* @__PURE__ */ w(S, {
|
|
1816
1819
|
color: "text-warning",
|
|
1817
1820
|
variant: "body",
|
|
1818
1821
|
children: xt.message
|
|
1819
1822
|
}) : null,
|
|
1820
|
-
|
|
1823
|
+
J ? /* @__PURE__ */ w(S, {
|
|
1821
1824
|
color: "text-error",
|
|
1822
1825
|
variant: "body",
|
|
1823
|
-
children:
|
|
1826
|
+
children: J
|
|
1824
1827
|
}) : null,
|
|
1825
|
-
|
|
1828
|
+
Xn ? /* @__PURE__ */ w(S, {
|
|
1826
1829
|
color: "text-error",
|
|
1827
1830
|
variant: "body",
|
|
1828
|
-
children:
|
|
1831
|
+
children: Xn
|
|
1829
1832
|
}) : null,
|
|
1830
|
-
!
|
|
1833
|
+
!J && Jn ? /* @__PURE__ */ T(S, {
|
|
1831
1834
|
color: "text-error",
|
|
1832
1835
|
variant: "body",
|
|
1833
|
-
children: ["發布前需修正:",
|
|
1836
|
+
children: ["發布前需修正:", Jn]
|
|
1834
1837
|
}) : null,
|
|
1835
|
-
|
|
1836
|
-
style:
|
|
1837
|
-
children: /* @__PURE__ */
|
|
1838
|
-
hintText:
|
|
1838
|
+
i ? null : /* @__PURE__ */ w("div", {
|
|
1839
|
+
style: K,
|
|
1840
|
+
children: /* @__PURE__ */ w(n, {
|
|
1841
|
+
hintText: X ? "已設定條件分流條件。請先移除所有條件,才能更換綁定表單版本。" : void 0,
|
|
1839
1842
|
label: "綁定表單版本",
|
|
1840
1843
|
name: "formDefinitionVersionId",
|
|
1841
1844
|
required: !0,
|
|
1842
|
-
children: /* @__PURE__ */
|
|
1843
|
-
style:
|
|
1844
|
-
children: [/* @__PURE__ */
|
|
1845
|
-
style:
|
|
1846
|
-
children: /* @__PURE__ */
|
|
1845
|
+
children: /* @__PURE__ */ T("div", {
|
|
1846
|
+
style: Wn,
|
|
1847
|
+
children: [/* @__PURE__ */ w("div", {
|
|
1848
|
+
style: Gn,
|
|
1849
|
+
children: /* @__PURE__ */ w(_, {
|
|
1847
1850
|
asyncData: !0,
|
|
1848
|
-
disabled: St ||
|
|
1851
|
+
disabled: St || X,
|
|
1849
1852
|
disabledOptionsFilter: !0,
|
|
1850
1853
|
emptyText: "沒有符合的已發布表單版本",
|
|
1851
|
-
isForceClearable: !!
|
|
1854
|
+
isForceClearable: !!M && !X,
|
|
1852
1855
|
loading: Et,
|
|
1853
1856
|
loadingText: "搜尋表單版本中...",
|
|
1854
1857
|
mode: "single",
|
|
1855
1858
|
onChange: (e) => {
|
|
1856
|
-
|
|
1859
|
+
X || ct(e?.id ?? null);
|
|
1857
1860
|
},
|
|
1858
1861
|
onClear: () => {
|
|
1859
|
-
|
|
1862
|
+
X || ct(null);
|
|
1860
1863
|
},
|
|
1861
|
-
onSearch:
|
|
1864
|
+
onSearch: $n,
|
|
1862
1865
|
onVisibilityChange: (e) => {
|
|
1863
|
-
e && !
|
|
1866
|
+
e && !X && $n("");
|
|
1864
1867
|
},
|
|
1865
|
-
options: [...
|
|
1868
|
+
options: [...In],
|
|
1866
1869
|
placeholder: "選擇已發布表單版本",
|
|
1867
1870
|
searchDebounceTime: 300,
|
|
1868
|
-
value:
|
|
1871
|
+
value: G
|
|
1869
1872
|
})
|
|
1870
|
-
}), /* @__PURE__ */
|
|
1873
|
+
}), /* @__PURE__ */ w(v, {
|
|
1871
1874
|
disabled: St,
|
|
1872
1875
|
onClick: () => {
|
|
1873
|
-
|
|
1876
|
+
xr();
|
|
1874
1877
|
},
|
|
1875
|
-
style:
|
|
1878
|
+
style: Kn,
|
|
1876
1879
|
variant: "base-secondary",
|
|
1877
1880
|
children: "編輯表單"
|
|
1878
1881
|
})]
|
|
1879
1882
|
})
|
|
1880
1883
|
})
|
|
1881
1884
|
}),
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
style:
|
|
1884
|
-
children: [/* @__PURE__ */
|
|
1885
|
-
ref:
|
|
1886
|
-
style:
|
|
1887
|
-
children: /* @__PURE__ */
|
|
1888
|
-
connectionMode:
|
|
1889
|
-
edges:
|
|
1885
|
+
/* @__PURE__ */ T("div", {
|
|
1886
|
+
style: kn,
|
|
1887
|
+
children: [/* @__PURE__ */ w("div", {
|
|
1888
|
+
ref: Pe,
|
|
1889
|
+
style: An,
|
|
1890
|
+
children: /* @__PURE__ */ T(Fe, {
|
|
1891
|
+
connectionMode: Ae.Strict,
|
|
1892
|
+
edges: Pn,
|
|
1890
1893
|
fitView: !0,
|
|
1891
|
-
isValidConnection: (e) =>
|
|
1892
|
-
nodeTypes:
|
|
1893
|
-
nodes:
|
|
1894
|
+
isValidConnection: (e) => Oi(e, j.nodes),
|
|
1895
|
+
nodeTypes: Ar,
|
|
1896
|
+
nodes: Yn,
|
|
1894
1897
|
deleteKeyCode: null,
|
|
1895
1898
|
multiSelectionKeyCode: [
|
|
1896
1899
|
"Shift",
|
|
1897
1900
|
"Meta",
|
|
1898
1901
|
"Control"
|
|
1899
1902
|
],
|
|
1900
|
-
onConnect:
|
|
1901
|
-
onEdgeClick:
|
|
1903
|
+
onConnect: Pr,
|
|
1904
|
+
onEdgeClick: Fr,
|
|
1902
1905
|
onNodeClick: (e, t) => {
|
|
1903
1906
|
dt(t.id), ft([]);
|
|
1904
1907
|
},
|
|
1905
|
-
onNodesChange:
|
|
1908
|
+
onNodesChange: Mr,
|
|
1906
1909
|
onPaneClick: () => {
|
|
1907
1910
|
dt(null), ft([]);
|
|
1908
1911
|
},
|
|
1909
|
-
onViewportChange:
|
|
1910
|
-
viewport:
|
|
1912
|
+
onViewportChange: Le,
|
|
1913
|
+
viewport: k,
|
|
1911
1914
|
children: [
|
|
1912
|
-
/* @__PURE__ */
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
+
/* @__PURE__ */ w(ke, {}),
|
|
1916
|
+
/* @__PURE__ */ w("style", { children: zn }),
|
|
1917
|
+
/* @__PURE__ */ w(Me, { children: xn ? /* @__PURE__ */ w(je, {
|
|
1915
1918
|
"aria-label": "刪除選取項目",
|
|
1916
1919
|
className: "workflow-selection-delete-control",
|
|
1917
|
-
onClick:
|
|
1918
|
-
style:
|
|
1920
|
+
onClick: Sn,
|
|
1921
|
+
style: jn,
|
|
1919
1922
|
title: "刪除選取項目",
|
|
1920
|
-
children: /* @__PURE__ */
|
|
1921
|
-
style:
|
|
1922
|
-
children: /* @__PURE__ */
|
|
1923
|
+
children: /* @__PURE__ */ w("span", {
|
|
1924
|
+
style: Mn,
|
|
1925
|
+
children: /* @__PURE__ */ w(ee, {
|
|
1923
1926
|
color: "error",
|
|
1924
|
-
icon:
|
|
1927
|
+
icon: me,
|
|
1925
1928
|
size: 16
|
|
1926
1929
|
})
|
|
1927
1930
|
})
|
|
1928
1931
|
}) : null }),
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
-
/* @__PURE__ */
|
|
1932
|
+
/* @__PURE__ */ w(Nr, { onApplyAutoLayout: wi }),
|
|
1933
|
+
/* @__PURE__ */ w(Ne, {})
|
|
1931
1934
|
]
|
|
1932
1935
|
})
|
|
1933
|
-
}), /* @__PURE__ */
|
|
1934
|
-
className:
|
|
1935
|
-
style:
|
|
1936
|
+
}), /* @__PURE__ */ T("div", {
|
|
1937
|
+
className: Nn,
|
|
1938
|
+
style: Bn,
|
|
1936
1939
|
children: [
|
|
1937
|
-
/* @__PURE__ */
|
|
1940
|
+
/* @__PURE__ */ w(S, {
|
|
1938
1941
|
component: "h2",
|
|
1939
1942
|
variant: "h3",
|
|
1940
1943
|
children: "流程工具"
|
|
1941
1944
|
}),
|
|
1942
|
-
|
|
1943
|
-
style:
|
|
1944
|
-
children: [/* @__PURE__ */
|
|
1945
|
+
i && fe ? /* @__PURE__ */ T("div", {
|
|
1946
|
+
style: qn,
|
|
1947
|
+
children: [/* @__PURE__ */ w(S, {
|
|
1945
1948
|
color: "text-neutral",
|
|
1946
1949
|
variant: "caption",
|
|
1947
1950
|
children: "AI 協助"
|
|
1948
|
-
}), /* @__PURE__ */
|
|
1949
|
-
style:
|
|
1950
|
-
children: /* @__PURE__ */
|
|
1951
|
+
}), /* @__PURE__ */ w("div", {
|
|
1952
|
+
style: Un,
|
|
1953
|
+
children: /* @__PURE__ */ w(v, {
|
|
1951
1954
|
disabled: !r,
|
|
1952
|
-
onClick: () =>
|
|
1955
|
+
onClick: () => ln((e) => !e),
|
|
1953
1956
|
size: "sub",
|
|
1954
|
-
variant:
|
|
1957
|
+
variant: sn ? "base-primary" : "base-secondary",
|
|
1955
1958
|
children: r ? "AI 助理" : "AI 助理(未設定)"
|
|
1956
1959
|
})
|
|
1957
1960
|
})]
|
|
1958
1961
|
}) : null,
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
style:
|
|
1961
|
-
children: [/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ T("div", {
|
|
1963
|
+
style: qn,
|
|
1964
|
+
children: [/* @__PURE__ */ w(S, {
|
|
1962
1965
|
color: "text-neutral",
|
|
1963
1966
|
variant: "caption",
|
|
1964
1967
|
children: "動作節點"
|
|
1965
|
-
}), /* @__PURE__ */
|
|
1966
|
-
style:
|
|
1967
|
-
children: cr.map((e) => /* @__PURE__ */
|
|
1968
|
+
}), /* @__PURE__ */ w("div", {
|
|
1969
|
+
style: Un,
|
|
1970
|
+
children: cr.map((e) => /* @__PURE__ */ w(v, {
|
|
1968
1971
|
icon: e.icon,
|
|
1969
1972
|
iconType: "leading",
|
|
1970
|
-
onClick: () =>
|
|
1973
|
+
onClick: () => Lr(e.type),
|
|
1971
1974
|
size: "sub",
|
|
1972
1975
|
variant: "base-secondary",
|
|
1973
1976
|
children: e.label
|
|
1974
1977
|
}, e.type))
|
|
1975
1978
|
})]
|
|
1976
1979
|
}),
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
style:
|
|
1979
|
-
children: [/* @__PURE__ */
|
|
1980
|
+
/* @__PURE__ */ T("div", {
|
|
1981
|
+
style: qn,
|
|
1982
|
+
children: [/* @__PURE__ */ w(S, {
|
|
1980
1983
|
color: "text-neutral",
|
|
1981
1984
|
variant: "caption",
|
|
1982
1985
|
children: "流程控制"
|
|
1983
|
-
}), /* @__PURE__ */
|
|
1984
|
-
style:
|
|
1985
|
-
children: lr.map((e) => /* @__PURE__ */
|
|
1986
|
+
}), /* @__PURE__ */ w("div", {
|
|
1987
|
+
style: Un,
|
|
1988
|
+
children: lr.map((e) => /* @__PURE__ */ w(v, {
|
|
1986
1989
|
icon: e.icon,
|
|
1987
1990
|
iconType: "leading",
|
|
1988
|
-
onClick: () =>
|
|
1991
|
+
onClick: () => Lr(e.type),
|
|
1989
1992
|
size: "sub",
|
|
1990
1993
|
variant: "base-secondary",
|
|
1991
1994
|
children: e.label
|
|
1992
1995
|
}, e.type))
|
|
1993
1996
|
})]
|
|
1994
1997
|
}),
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
+
En.length > 1 ? qi(En) : null,
|
|
1999
|
+
En.length === 1 && wn ? Yi(wn) : null,
|
|
2000
|
+
En.length === 0 && U ? ji(U) : null
|
|
1998
2001
|
]
|
|
1999
2002
|
})]
|
|
2000
2003
|
})
|
|
2001
2004
|
]
|
|
2002
2005
|
}) }) }),
|
|
2003
|
-
|
|
2004
|
-
!
|
|
2005
|
-
|
|
2006
|
-
controller:
|
|
2007
|
-
onClose: () =>
|
|
2008
|
-
open:
|
|
2006
|
+
Xi(Cn),
|
|
2007
|
+
!i && he ? Ei() : null,
|
|
2008
|
+
fe && r ? /* @__PURE__ */ w(Rt, {
|
|
2009
|
+
controller: A,
|
|
2010
|
+
onClose: () => ln(!1),
|
|
2011
|
+
open: sn
|
|
2009
2012
|
}) : null,
|
|
2010
|
-
|
|
2013
|
+
i ? null : /* @__PURE__ */ w(oe, {
|
|
2011
2014
|
headerTitle: "編輯表單",
|
|
2012
2015
|
isHeaderDisplay: !0,
|
|
2013
|
-
onClose: () =>
|
|
2014
|
-
open:
|
|
2016
|
+
onClose: () => dn(!1),
|
|
2017
|
+
open: un,
|
|
2015
2018
|
size: "wide",
|
|
2016
|
-
children: /* @__PURE__ */
|
|
2017
|
-
style:
|
|
2018
|
-
children: [/* @__PURE__ */
|
|
2019
|
-
style:
|
|
2020
|
-
children:
|
|
2019
|
+
children: /* @__PURE__ */ T("div", {
|
|
2020
|
+
style: Tr,
|
|
2021
|
+
children: [/* @__PURE__ */ w("div", {
|
|
2022
|
+
style: Er,
|
|
2023
|
+
children: hn ? /* @__PURE__ */ w(S, {
|
|
2021
2024
|
color: "text-neutral",
|
|
2022
2025
|
variant: "body",
|
|
2023
2026
|
children: "載入中…"
|
|
2024
|
-
}) : /* @__PURE__ */
|
|
2027
|
+
}) : /* @__PURE__ */ w(u, {
|
|
2025
2028
|
onChange: (e) => {
|
|
2026
|
-
|
|
2029
|
+
H(e);
|
|
2027
2030
|
},
|
|
2028
|
-
value:
|
|
2029
|
-
schema:
|
|
2030
|
-
uiSchema:
|
|
2031
|
+
value: V ?? {
|
|
2032
|
+
schema: Or,
|
|
2033
|
+
uiSchema: kr
|
|
2031
2034
|
}
|
|
2032
2035
|
})
|
|
2033
|
-
}), /* @__PURE__ */
|
|
2034
|
-
style:
|
|
2035
|
-
children: [/* @__PURE__ */
|
|
2036
|
-
disabled:
|
|
2036
|
+
}), /* @__PURE__ */ T("div", {
|
|
2037
|
+
style: Dr,
|
|
2038
|
+
children: [/* @__PURE__ */ w(v, {
|
|
2039
|
+
disabled: hn,
|
|
2037
2040
|
onClick: () => {
|
|
2038
|
-
|
|
2041
|
+
V !== null && (mn(!0), A.replaceState((e) => ({
|
|
2039
2042
|
...e,
|
|
2040
|
-
formSchema:
|
|
2041
|
-
}))),
|
|
2043
|
+
formSchema: V.schema
|
|
2044
|
+
}))), dn(!1);
|
|
2042
2045
|
},
|
|
2043
2046
|
variant: "base-primary",
|
|
2044
2047
|
children: "套用"
|
|
2045
|
-
}), /* @__PURE__ */
|
|
2046
|
-
onClick: () =>
|
|
2048
|
+
}), /* @__PURE__ */ w(v, {
|
|
2049
|
+
onClick: () => dn(!1),
|
|
2047
2050
|
variant: "base-secondary",
|
|
2048
2051
|
children: "取消"
|
|
2049
2052
|
})]
|
|
@@ -2051,85 +2054,85 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2051
2054
|
})
|
|
2052
2055
|
})
|
|
2053
2056
|
] });
|
|
2054
|
-
function
|
|
2057
|
+
function Ei() {
|
|
2055
2058
|
let e = {
|
|
2056
|
-
formFields:
|
|
2057
|
-
memberName: (e) =>
|
|
2058
|
-
orgUnits:
|
|
2059
|
-
positions:
|
|
2059
|
+
formFields: Y?.fields ?? [],
|
|
2060
|
+
memberName: (e) => L.find((t) => t.memberId === e && !t.unresolved)?.displayName ?? null,
|
|
2061
|
+
orgUnits: R,
|
|
2062
|
+
positions: z
|
|
2060
2063
|
};
|
|
2061
|
-
return /* @__PURE__ */
|
|
2064
|
+
return /* @__PURE__ */ w(y, {
|
|
2062
2065
|
cancelText: "關閉",
|
|
2063
2066
|
confirmText: "執行試跑",
|
|
2064
|
-
loading:
|
|
2067
|
+
loading: Kt,
|
|
2065
2068
|
modalType: "standard",
|
|
2066
|
-
onCancel:
|
|
2067
|
-
onClose:
|
|
2068
|
-
onConfirm: () => void
|
|
2069
|
-
open:
|
|
2069
|
+
onCancel: or,
|
|
2070
|
+
onClose: or,
|
|
2071
|
+
onConfirm: () => void br(),
|
|
2072
|
+
open: Wt,
|
|
2070
2073
|
showModalFooter: !0,
|
|
2071
2074
|
showModalHeader: !0,
|
|
2072
2075
|
size: "wide",
|
|
2073
|
-
supportingText: `使用 ${
|
|
2076
|
+
supportingText: `使用 ${wr} 與範例表單資料模擬目前畫布流程,不會建立案件。`,
|
|
2074
2077
|
title: "試跑流程",
|
|
2075
|
-
children: /* @__PURE__ */
|
|
2076
|
-
style:
|
|
2078
|
+
children: /* @__PURE__ */ T("div", {
|
|
2079
|
+
style: K,
|
|
2077
2080
|
children: [
|
|
2078
|
-
/* @__PURE__ */
|
|
2081
|
+
/* @__PURE__ */ w(n, {
|
|
2079
2082
|
label: "表單資料 JSON",
|
|
2080
2083
|
name: "dryRunFormDataJson",
|
|
2081
2084
|
required: !0,
|
|
2082
|
-
children: /* @__PURE__ */
|
|
2083
|
-
onChange: (e) =>
|
|
2085
|
+
children: /* @__PURE__ */ w(ae, {
|
|
2086
|
+
onChange: (e) => Xt(e.target.value),
|
|
2084
2087
|
resize: "vertical",
|
|
2085
2088
|
rows: 8,
|
|
2086
|
-
value:
|
|
2089
|
+
value: Yt
|
|
2087
2090
|
})
|
|
2088
2091
|
}),
|
|
2089
|
-
|
|
2092
|
+
en ? /* @__PURE__ */ w(S, {
|
|
2090
2093
|
color: "text-error",
|
|
2091
2094
|
variant: "body",
|
|
2092
|
-
children:
|
|
2095
|
+
children: en
|
|
2093
2096
|
}) : null,
|
|
2094
|
-
|
|
2095
|
-
style:
|
|
2097
|
+
Zt ? /* @__PURE__ */ T("div", {
|
|
2098
|
+
style: Vn,
|
|
2096
2099
|
children: [
|
|
2097
|
-
/* @__PURE__ */
|
|
2098
|
-
color:
|
|
2100
|
+
/* @__PURE__ */ w(S, {
|
|
2101
|
+
color: Zt.valid ? "text-success" : "text-error",
|
|
2099
2102
|
variant: "label-primary-highlight",
|
|
2100
|
-
children:
|
|
2103
|
+
children: Zt.valid ? "試跑通過" : "試跑失敗"
|
|
2101
2104
|
}),
|
|
2102
|
-
|
|
2105
|
+
Zt.errors.map((e) => /* @__PURE__ */ w(S, {
|
|
2103
2106
|
color: "text-error",
|
|
2104
2107
|
variant: "body",
|
|
2105
2108
|
children: e
|
|
2106
2109
|
}, e)),
|
|
2107
|
-
|
|
2108
|
-
style:
|
|
2110
|
+
Zt.steps.map((t) => /* @__PURE__ */ T("div", {
|
|
2111
|
+
style: Hn,
|
|
2109
2112
|
children: [
|
|
2110
|
-
/* @__PURE__ */
|
|
2113
|
+
/* @__PURE__ */ T(S, {
|
|
2111
2114
|
variant: "label-primary-highlight",
|
|
2112
2115
|
children: [
|
|
2113
2116
|
t.nodeLabel,
|
|
2114
2117
|
" · ",
|
|
2115
|
-
|
|
2118
|
+
Ri(t.status)
|
|
2116
2119
|
]
|
|
2117
2120
|
}),
|
|
2118
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ T(S, {
|
|
2119
2122
|
color: "text-neutral",
|
|
2120
2123
|
variant: "caption",
|
|
2121
2124
|
children: [
|
|
2122
|
-
|
|
2123
|
-
t.assigneeMemberId ? ` · 處理者:${
|
|
2125
|
+
zi(t.nodeType),
|
|
2126
|
+
t.assigneeMemberId ? ` · 處理者:${gn(t.assigneeMemberId, e)}` : "",
|
|
2124
2127
|
t.edgeLabel ? ` · 來源線段:${t.edgeLabel}` : ""
|
|
2125
2128
|
]
|
|
2126
2129
|
}),
|
|
2127
|
-
t.edgeReason ? /* @__PURE__ */
|
|
2130
|
+
t.edgeReason ? /* @__PURE__ */ w(S, {
|
|
2128
2131
|
color: "text-neutral",
|
|
2129
2132
|
variant: "caption",
|
|
2130
2133
|
children: t.edgeReason
|
|
2131
2134
|
}) : null,
|
|
2132
|
-
t.entryCondition ? /* @__PURE__ */
|
|
2135
|
+
t.entryCondition ? /* @__PURE__ */ T(S, {
|
|
2133
2136
|
color: "text-neutral",
|
|
2134
2137
|
variant: "caption",
|
|
2135
2138
|
children: [
|
|
@@ -2140,12 +2143,12 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2140
2143
|
t.entryCondition
|
|
2141
2144
|
]
|
|
2142
2145
|
}) : null,
|
|
2143
|
-
/* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ w(S, {
|
|
2144
2147
|
color: "text-neutral",
|
|
2145
2148
|
variant: "body",
|
|
2146
2149
|
children: t.message
|
|
2147
2150
|
}),
|
|
2148
|
-
(t.status === "SKIPPED" ? [] :
|
|
2151
|
+
(t.status === "SKIPPED" ? [] : ca(j, t.nodeId, nn)).map((e) => /* @__PURE__ */ T(S, {
|
|
2149
2152
|
color: "text-neutral",
|
|
2150
2153
|
variant: "caption",
|
|
2151
2154
|
children: ["將送出 Webhook:", e.label]
|
|
@@ -2158,16 +2161,16 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2158
2161
|
})
|
|
2159
2162
|
});
|
|
2160
2163
|
}
|
|
2161
|
-
function
|
|
2162
|
-
return /* @__PURE__ */
|
|
2163
|
-
style:
|
|
2164
|
+
function ji(e) {
|
|
2165
|
+
return /* @__PURE__ */ T("div", {
|
|
2166
|
+
style: K,
|
|
2164
2167
|
children: [
|
|
2165
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ w(S, {
|
|
2166
2169
|
component: "h2",
|
|
2167
2170
|
variant: "h3",
|
|
2168
2171
|
children: "節點屬性"
|
|
2169
2172
|
}),
|
|
2170
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ T(S, {
|
|
2171
2174
|
color: "text-neutral",
|
|
2172
2175
|
variant: "body",
|
|
2173
2176
|
children: [
|
|
@@ -2176,141 +2179,141 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2176
2179
|
e.id
|
|
2177
2180
|
]
|
|
2178
2181
|
}),
|
|
2179
|
-
/* @__PURE__ */
|
|
2182
|
+
/* @__PURE__ */ w(n, {
|
|
2180
2183
|
label: "顯示名稱",
|
|
2181
2184
|
name: "nodeLabel",
|
|
2182
2185
|
required: !0,
|
|
2183
|
-
children: /* @__PURE__ */
|
|
2184
|
-
onChange: (e) =>
|
|
2186
|
+
children: /* @__PURE__ */ w(te, {
|
|
2187
|
+
onChange: (e) => Rr(e.target.value),
|
|
2185
2188
|
value: e.data.label,
|
|
2186
2189
|
variant: "base"
|
|
2187
2190
|
})
|
|
2188
2191
|
}),
|
|
2189
|
-
e.type === "startEvent" ?
|
|
2190
|
-
e.type === "startEvent" ? null :
|
|
2191
|
-
e.type === "userTask" ?
|
|
2192
|
-
e.type === "serviceTask" ?
|
|
2192
|
+
e.type === "startEvent" ? Mi() : null,
|
|
2193
|
+
e.type === "startEvent" ? null : Ni(e),
|
|
2194
|
+
e.type === "userTask" ? Li(e) : null,
|
|
2195
|
+
e.type === "serviceTask" ? Ki(e) : null
|
|
2193
2196
|
]
|
|
2194
2197
|
});
|
|
2195
2198
|
}
|
|
2196
|
-
function
|
|
2197
|
-
let e =
|
|
2198
|
-
includeDescendants: !!
|
|
2199
|
-
memberships:
|
|
2200
|
-
orgUnitId:
|
|
2201
|
-
orgUnits:
|
|
2202
|
-
positions:
|
|
2199
|
+
function Mi() {
|
|
2200
|
+
let e = W.mode === "CUSTOM" ? [...Sr, Cr] : [...Sr], t = W.mode === "ORG_UNIT" || W.mode === "ORG_UNIT_POSITION" ? Wi(R, W.orgUnitId ?? "") : null, r = W.mode === "ORG_UNIT_POSITION" ? Gi(z, W.positionId ?? "") : null, i = W.mode === "ORG_UNIT_POSITION" ? $i({
|
|
2201
|
+
includeDescendants: !!W.includeDescendants,
|
|
2202
|
+
memberships: Ht,
|
|
2203
|
+
orgUnitId: W.orgUnitId ?? "",
|
|
2204
|
+
orgUnits: R,
|
|
2205
|
+
positions: z
|
|
2203
2206
|
}) : [];
|
|
2204
|
-
return /* @__PURE__ */
|
|
2205
|
-
/* @__PURE__ */
|
|
2206
|
-
hintText:
|
|
2207
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
2208
|
+
/* @__PURE__ */ w(n, {
|
|
2209
|
+
hintText: W.mode === "CUSTOM" ? "這是舊版表達式規則;切換成標準選項後會改由 UI 管理。" : void 0,
|
|
2207
2210
|
label: "發起權限",
|
|
2208
2211
|
name: "initiatorPolicyMode",
|
|
2209
2212
|
required: !0,
|
|
2210
|
-
children: /* @__PURE__ */
|
|
2213
|
+
children: /* @__PURE__ */ w(b, {
|
|
2211
2214
|
clearable: !1,
|
|
2212
2215
|
onChange: (e) => {
|
|
2213
2216
|
if (e?.id === "CUSTOM") {
|
|
2214
|
-
Ee(null),
|
|
2217
|
+
Ee(null), O(null);
|
|
2215
2218
|
return;
|
|
2216
2219
|
}
|
|
2217
|
-
let t =
|
|
2218
|
-
Ee(t === "ALL" ? null : t),
|
|
2220
|
+
let t = bi(e?.id ?? null), n = Di(t);
|
|
2221
|
+
Ee(t === "ALL" ? null : t), O(t === "ALL" ? null : n), ut(Ti(n, R));
|
|
2219
2222
|
},
|
|
2220
2223
|
options: e,
|
|
2221
2224
|
placeholder: "選擇誰可以發起",
|
|
2222
|
-
value: $(e,
|
|
2225
|
+
value: $(e, W.mode)
|
|
2223
2226
|
})
|
|
2224
2227
|
}),
|
|
2225
|
-
|
|
2228
|
+
W.mode === "ORG_UNIT" || W.mode === "ORG_UNIT_POSITION" ? /* @__PURE__ */ w(n, {
|
|
2226
2229
|
label: "組織",
|
|
2227
2230
|
name: "initiatorOrgUnitId",
|
|
2228
2231
|
required: !0,
|
|
2229
|
-
children: /* @__PURE__ */
|
|
2232
|
+
children: /* @__PURE__ */ w(a, {
|
|
2230
2233
|
name: "initiatorOrgUnitId",
|
|
2231
|
-
onChange: (e) =>
|
|
2232
|
-
...
|
|
2234
|
+
onChange: (e) => Jr({
|
|
2235
|
+
...W,
|
|
2233
2236
|
orgUnitId: e?.id ?? "",
|
|
2234
2237
|
positionId: "",
|
|
2235
2238
|
value: e?.id ?? ""
|
|
2236
2239
|
}),
|
|
2237
|
-
orgUnits:
|
|
2240
|
+
orgUnits: R,
|
|
2238
2241
|
placeholder: "選擇組織",
|
|
2239
2242
|
value: t
|
|
2240
2243
|
})
|
|
2241
2244
|
}) : null,
|
|
2242
|
-
|
|
2245
|
+
W.mode === "ORG_UNIT" || W.mode === "ORG_UNIT_POSITION" ? /* @__PURE__ */ w(n, {
|
|
2243
2246
|
label: "包含下層",
|
|
2244
2247
|
name: "initiatorIncludeDescendants",
|
|
2245
|
-
children: /* @__PURE__ */
|
|
2246
|
-
checked: !!
|
|
2247
|
-
onChange: (e) =>
|
|
2248
|
-
...
|
|
2248
|
+
children: /* @__PURE__ */ w(x, {
|
|
2249
|
+
checked: !!W.includeDescendants,
|
|
2250
|
+
onChange: (e) => Jr({
|
|
2251
|
+
...W,
|
|
2249
2252
|
includeDescendants: e.target.checked,
|
|
2250
|
-
...
|
|
2253
|
+
...W.mode === "ORG_UNIT_POSITION" ? { positionId: "" } : {}
|
|
2251
2254
|
})
|
|
2252
2255
|
})
|
|
2253
2256
|
}) : null,
|
|
2254
|
-
|
|
2257
|
+
W.mode === "ORG_UNIT_POSITION" ? /* @__PURE__ */ w(n, {
|
|
2255
2258
|
label: "職位",
|
|
2256
2259
|
name: "initiatorPositionId",
|
|
2257
2260
|
required: !0,
|
|
2258
|
-
children: /* @__PURE__ */
|
|
2259
|
-
disabled: !
|
|
2261
|
+
children: /* @__PURE__ */ w(s, {
|
|
2262
|
+
disabled: !W.orgUnitId?.trim(),
|
|
2260
2263
|
name: "initiatorPositionId",
|
|
2261
|
-
onChange: (e) =>
|
|
2262
|
-
...
|
|
2264
|
+
onChange: (e) => Jr({
|
|
2265
|
+
...W,
|
|
2263
2266
|
positionId: e?.id ?? ""
|
|
2264
2267
|
}),
|
|
2265
|
-
placeholder:
|
|
2266
|
-
positions:
|
|
2268
|
+
placeholder: W.orgUnitId?.trim() ? "選擇職位" : "請先選擇組織",
|
|
2269
|
+
positions: i,
|
|
2267
2270
|
value: r
|
|
2268
2271
|
})
|
|
2269
2272
|
}) : null
|
|
2270
2273
|
] });
|
|
2271
2274
|
}
|
|
2272
|
-
function
|
|
2273
|
-
let t =
|
|
2274
|
-
return /* @__PURE__ */
|
|
2275
|
+
function Ni(e) {
|
|
2276
|
+
let t = j.edges.filter((t) => t.target === e.id).length, r = t < 2, i = r ? "AND" : e.data.triggerMode ?? "AND";
|
|
2277
|
+
return /* @__PURE__ */ w(n, {
|
|
2275
2278
|
hintText: r ? "需要至少兩條前置連線,才可切換為任一前置完成。" : t > 1 ? `${t} 條前置連線會依此規則觸發。` : "只有一條前置連線時,兩種設定效果相同。",
|
|
2276
2279
|
label: "前置條件",
|
|
2277
2280
|
name: "triggerMode",
|
|
2278
2281
|
required: !0,
|
|
2279
|
-
children: /* @__PURE__ */
|
|
2282
|
+
children: /* @__PURE__ */ w(b, {
|
|
2280
2283
|
clearable: !1,
|
|
2281
|
-
onChange: (e) => r ? void 0 :
|
|
2284
|
+
onChange: (e) => r ? void 0 : fi(Qr(e?.id ?? null)),
|
|
2282
2285
|
options: [...ur],
|
|
2283
2286
|
readOnly: r,
|
|
2284
2287
|
value: $(ur, i)
|
|
2285
2288
|
})
|
|
2286
2289
|
});
|
|
2287
2290
|
}
|
|
2288
|
-
function
|
|
2289
|
-
let t = e.data.approverResolver, r =
|
|
2291
|
+
function Li(e) {
|
|
2292
|
+
let t = e.data.approverResolver, r = pi(t.type), i = t.type === "DIRECT" ? t.memberIds.map((e) => Ui(L, e)) : [], o = t.type === "ORG_UNIT_MANAGER" || t.type === "ORG_UNIT_MEMBER" || t.type === "ORG_UNIT_POSITION" ? Wi(R, t.orgUnitId) : null, c = t.type === "POSITION" || t.type === "ORG_UNIT_POSITION" ? Gi(z, t.positionId) : null, l = t.type === "ORG_UNIT_POSITION" ? $i({
|
|
2290
2293
|
includeDescendants: !!t.includeDescendants,
|
|
2291
|
-
memberships:
|
|
2294
|
+
memberships: Ht,
|
|
2292
2295
|
orgUnitId: t.orgUnitId,
|
|
2293
|
-
orgUnits:
|
|
2294
|
-
positions:
|
|
2295
|
-
}) : [], u = t.type === "DYNAMIC_FORM" ?
|
|
2296
|
-
return /* @__PURE__ */
|
|
2297
|
-
/* @__PURE__ */
|
|
2296
|
+
orgUnits: R,
|
|
2297
|
+
positions: z
|
|
2298
|
+
}) : [], u = t.type === "DYNAMIC_FORM" ? Tn(Y, t.formPath) : null, d = t.type === "ORG_MANAGER" ? vi(t.levelsUp) : hr[0], f = t.type === "ORG_MANAGER" || t.type === "ORG_MANAGER_CHAIN" || t.type === "ORG_UNIT_MANAGER" ? t.fallback ?? { type: "NONE" } : { type: "NONE" }, p = Xe(f), m = p === null ? gr : [...gr, _r], h = t.type === "ORG_MANAGER_CHAIN" ? Bt(z, t.minPositionLevel) : [], g = f.type === "DIRECT" && f.memberId ? Ui(L, f.memberId) : null, v = f.type === "POSITION" ? Gi(z, f.positionId) : null, ee = e.data.returnBehavior.resubmitStrategy ?? "RESTART", y = e.data.sla ?? null, ne = e.data.excludeInitiator ?? null, re = y ? gt(y.duration) : null, ie = re?.unit ?? "DAY", ae = si(y?.warningAt ?? null), S = vi(y?.escalateLevelsUp ?? 1), oe = ei(e.data.decisionPolicy), E = ni(e.data.decisionPolicy);
|
|
2299
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
2300
|
+
/* @__PURE__ */ w(n, {
|
|
2298
2301
|
label: "簽核來源",
|
|
2299
2302
|
name: "approverResolverType",
|
|
2300
2303
|
required: !0,
|
|
2301
|
-
children: /* @__PURE__ */
|
|
2304
|
+
children: /* @__PURE__ */ w(b, {
|
|
2302
2305
|
clearable: !1,
|
|
2303
|
-
onChange: (e) => Z(
|
|
2306
|
+
onChange: (e) => Z(mi(e?.id ?? null, z)),
|
|
2304
2307
|
options: [...pr],
|
|
2305
2308
|
value: $(pr, r)
|
|
2306
2309
|
})
|
|
2307
2310
|
}),
|
|
2308
|
-
t.type === "DIRECT" ? /* @__PURE__ */
|
|
2309
|
-
hintText:
|
|
2311
|
+
t.type === "DIRECT" ? /* @__PURE__ */ w(n, {
|
|
2312
|
+
hintText: vt(e.data.decisionPolicy),
|
|
2310
2313
|
label: "簽核者",
|
|
2311
2314
|
name: "memberId",
|
|
2312
2315
|
required: !0,
|
|
2313
|
-
children: /* @__PURE__ */
|
|
2316
|
+
children: /* @__PURE__ */ w(_, {
|
|
2314
2317
|
asyncData: !0,
|
|
2315
2318
|
disabledOptionsFilter: !0,
|
|
2316
2319
|
emptyText: "沒有符合的成員",
|
|
@@ -2327,22 +2330,22 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2327
2330
|
memberIds: e.map((e) => e.id),
|
|
2328
2331
|
type: "DIRECT"
|
|
2329
2332
|
}),
|
|
2330
|
-
onSearch:
|
|
2333
|
+
onSearch: er,
|
|
2331
2334
|
onVisibilityChange: (e) => {
|
|
2332
|
-
e && (It([]),
|
|
2335
|
+
e && (It([]), er(""));
|
|
2333
2336
|
},
|
|
2334
|
-
options: [...
|
|
2337
|
+
options: [...ta(i, Ft)],
|
|
2335
2338
|
placeholder: "搜尋姓名或信箱",
|
|
2336
2339
|
searchDebounceTime: 300,
|
|
2337
|
-
value:
|
|
2340
|
+
value: i
|
|
2338
2341
|
})
|
|
2339
2342
|
}) : null,
|
|
2340
|
-
t.type === "DYNAMIC_FORM" ? /* @__PURE__ */
|
|
2343
|
+
t.type === "DYNAMIC_FORM" ? /* @__PURE__ */ w(n, {
|
|
2341
2344
|
hintText: u?.problem ?? "簽核人取自申請人送出表單時在該欄位選的人員。",
|
|
2342
2345
|
label: "表單欄位",
|
|
2343
2346
|
name: "approverFormPath",
|
|
2344
2347
|
required: !0,
|
|
2345
|
-
children: /* @__PURE__ */
|
|
2348
|
+
children: /* @__PURE__ */ w(b, {
|
|
2346
2349
|
clearable: !1,
|
|
2347
2350
|
onChange: (e) => Z({
|
|
2348
2351
|
formPath: e?.id ?? "",
|
|
@@ -2353,43 +2356,44 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2353
2356
|
value: u?.selected ?? void 0
|
|
2354
2357
|
})
|
|
2355
2358
|
}) : null,
|
|
2356
|
-
t.type === "ORG_MANAGER" ? /* @__PURE__ */
|
|
2359
|
+
t.type === "ORG_MANAGER" ? /* @__PURE__ */ w(n, {
|
|
2357
2360
|
hintText: "依發起人的有效會員歸屬與主管解析規則決定簽核人。",
|
|
2358
2361
|
label: "主管層級",
|
|
2359
2362
|
name: "managerLevelsUp",
|
|
2360
2363
|
required: !0,
|
|
2361
|
-
children: /* @__PURE__ */
|
|
2364
|
+
children: /* @__PURE__ */ w(b, {
|
|
2362
2365
|
clearable: !1,
|
|
2363
2366
|
onChange: (e) => Z({
|
|
2364
2367
|
baseFromInitiator: !0,
|
|
2365
|
-
|
|
2368
|
+
...t.fallback ? { fallback: t.fallback } : {},
|
|
2369
|
+
levelsUp: yi(e?.id ?? null).value,
|
|
2366
2370
|
type: "ORG_MANAGER"
|
|
2367
2371
|
}),
|
|
2368
|
-
options: [...
|
|
2372
|
+
options: [...hr],
|
|
2369
2373
|
value: d
|
|
2370
2374
|
})
|
|
2371
2375
|
}) : null,
|
|
2372
|
-
t.type === "ORG_MANAGER_CHAIN" ? /* @__PURE__ */
|
|
2376
|
+
t.type === "ORG_MANAGER_CHAIN" ? /* @__PURE__ */ w(n, {
|
|
2373
2377
|
hintText: "從發起人的直屬主管開始往上,職等比前一位高的主管依序加入,簽到職等達此值的主管為止。沒有職位的主管會略過。",
|
|
2374
2378
|
label: "簽到職等",
|
|
2375
2379
|
name: "minPositionLevel",
|
|
2376
2380
|
required: !0,
|
|
2377
|
-
children: /* @__PURE__ */
|
|
2381
|
+
children: /* @__PURE__ */ w(b, {
|
|
2378
2382
|
clearable: !1,
|
|
2379
2383
|
onChange: (e) => Z({
|
|
2380
2384
|
...t,
|
|
2381
2385
|
minPositionLevel: Number(e?.id ?? t.minPositionLevel)
|
|
2382
2386
|
}),
|
|
2383
|
-
options: [...
|
|
2384
|
-
value: $(
|
|
2387
|
+
options: [...h],
|
|
2388
|
+
value: $(h, String(t.minPositionLevel))
|
|
2385
2389
|
})
|
|
2386
2390
|
}) : null,
|
|
2387
|
-
t.type === "ORG_UNIT_MANAGER" || t.type === "ORG_UNIT_MEMBER" || t.type === "ORG_UNIT_POSITION" ? /* @__PURE__ */
|
|
2391
|
+
t.type === "ORG_UNIT_MANAGER" || t.type === "ORG_UNIT_MEMBER" || t.type === "ORG_UNIT_POSITION" ? /* @__PURE__ */ w(n, {
|
|
2388
2392
|
hintText: t.type === "ORG_UNIT_MANAGER" ? "依指定組織或其上層的主管解析規則決定簽核人。" : "依指定組織目前有效會員歸屬建立候選簽核人。",
|
|
2389
2393
|
label: "組織",
|
|
2390
2394
|
name: "orgUnitId",
|
|
2391
2395
|
required: !0,
|
|
2392
|
-
children: /* @__PURE__ */
|
|
2396
|
+
children: /* @__PURE__ */ w(a, {
|
|
2393
2397
|
name: "orgUnitId",
|
|
2394
2398
|
onChange: (e) => Z(t.type === "ORG_UNIT_MEMBER" ? {
|
|
2395
2399
|
includeDescendants: t.includeDescendants,
|
|
@@ -2405,17 +2409,17 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2405
2409
|
orgUnitId: e?.id ?? "",
|
|
2406
2410
|
type: "ORG_UNIT_MANAGER"
|
|
2407
2411
|
}),
|
|
2408
|
-
orgUnits:
|
|
2412
|
+
orgUnits: R,
|
|
2409
2413
|
placeholder: "選擇組織",
|
|
2410
|
-
value:
|
|
2414
|
+
value: o
|
|
2411
2415
|
})
|
|
2412
2416
|
}) : null,
|
|
2413
|
-
t.type === "ORG_MANAGER" || t.type === "ORG_MANAGER_CHAIN" || t.type === "ORG_UNIT_MANAGER" ? /* @__PURE__ */
|
|
2414
|
-
t.type === "ORG_MANAGER_CHAIN" ? null : /* @__PURE__ */
|
|
2417
|
+
t.type === "ORG_MANAGER" || t.type === "ORG_MANAGER_CHAIN" || t.type === "ORG_UNIT_MANAGER" ? /* @__PURE__ */ T(C, { children: [
|
|
2418
|
+
t.type === "ORG_MANAGER_CHAIN" ? null : /* @__PURE__ */ w(n, {
|
|
2415
2419
|
hintText: "開啟後只取離該員最近一層的主管規則;掛在上層單位、涵蓋範圍較大的規則不會再一併加入簽核人。",
|
|
2416
2420
|
label: "只取最近一層主管",
|
|
2417
2421
|
name: "preferClosestOrgUnit",
|
|
2418
|
-
children: /* @__PURE__ */
|
|
2422
|
+
children: /* @__PURE__ */ w(x, {
|
|
2419
2423
|
checked: !!t.preferClosestOrgUnit,
|
|
2420
2424
|
inputProps: {
|
|
2421
2425
|
id: "preferClosestOrgUnit",
|
|
@@ -2427,26 +2431,25 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2427
2431
|
})
|
|
2428
2432
|
})
|
|
2429
2433
|
}),
|
|
2430
|
-
/* @__PURE__ */
|
|
2431
|
-
hintText: t.type === "ORG_MANAGER_CHAIN" ? "預設會停止流程並提示;若設定固定人,主管鏈在達到簽核職等前就結束時,會再加上該會員作為最後一關。" : "預設會停止流程並提示;若設定固定人,找不到主管時會改派給該會員。",
|
|
2434
|
+
/* @__PURE__ */ w(n, {
|
|
2435
|
+
hintText: p === null ? t.type === "ORG_MANAGER_CHAIN" ? "預設會停止流程並提示;若設定固定人,主管鏈在達到簽核職等前就結束時,會再加上該會員作為最後一關。" : "預設會停止流程並提示;若設定固定人,找不到主管時會改派給該會員。" : "此改派設定來自較新版本的 BPMCore,本版本無法執行也無法編輯;請升級後再編輯。這裡選擇其他模式會覆寫原設定。",
|
|
2432
2436
|
label: "無主管時",
|
|
2433
2437
|
name: "approverFallbackMode",
|
|
2434
2438
|
required: !0,
|
|
2435
|
-
children: /* @__PURE__ */
|
|
2439
|
+
children: /* @__PURE__ */ w(b, {
|
|
2436
2440
|
clearable: !1,
|
|
2437
|
-
onChange: (e) =>
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
value: $(hr, f.type)
|
|
2441
|
+
onChange: (e) => {
|
|
2442
|
+
e?.id !== "UNSUPPORTED" && Z(_i(t, gi(e?.id ?? null)));
|
|
2443
|
+
},
|
|
2444
|
+
options: [...m],
|
|
2445
|
+
value: p === null ? $(gr, f.type) : _r
|
|
2443
2446
|
})
|
|
2444
2447
|
}),
|
|
2445
|
-
f.type === "DIRECT" ? /* @__PURE__ */
|
|
2448
|
+
f.type === "DIRECT" ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(n, {
|
|
2446
2449
|
label: "改派人員",
|
|
2447
2450
|
name: "approverFallbackMemberId",
|
|
2448
2451
|
required: !0,
|
|
2449
|
-
children: /* @__PURE__ */
|
|
2452
|
+
children: /* @__PURE__ */ w(_, {
|
|
2450
2453
|
asyncData: !0,
|
|
2451
2454
|
disabledOptionsFilter: !0,
|
|
2452
2455
|
emptyText: "沒有符合的成員",
|
|
@@ -2459,42 +2462,75 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2459
2462
|
loading: Mt,
|
|
2460
2463
|
loadingText: "搜尋成員中...",
|
|
2461
2464
|
mode: "single",
|
|
2462
|
-
onChange: (e) => Z(
|
|
2465
|
+
onChange: (e) => Z(_i(t, {
|
|
2463
2466
|
allowInitiatorSelfApproval: f.allowInitiatorSelfApproval,
|
|
2464
2467
|
memberId: e?.id ?? "",
|
|
2465
2468
|
type: "DIRECT"
|
|
2466
2469
|
})),
|
|
2467
|
-
onSearch:
|
|
2470
|
+
onSearch: er,
|
|
2468
2471
|
onVisibilityChange: (e) => {
|
|
2469
|
-
e && (It([]),
|
|
2472
|
+
e && (It([]), er(""));
|
|
2470
2473
|
},
|
|
2471
|
-
options: [...
|
|
2474
|
+
options: [...ta(Ft, g ? [g] : [])],
|
|
2472
2475
|
placeholder: "搜尋姓名或信箱",
|
|
2473
2476
|
searchDebounceTime: 300,
|
|
2474
|
-
value:
|
|
2477
|
+
value: g
|
|
2475
2478
|
})
|
|
2476
|
-
}), /* @__PURE__ */
|
|
2479
|
+
}), /* @__PURE__ */ w(n, {
|
|
2477
2480
|
hintText: "預設禁止申請人簽自己的案件;只有此流程允許自簽時才開啟。",
|
|
2478
2481
|
label: "允許自簽",
|
|
2479
2482
|
name: "allowInitiatorSelfApproval",
|
|
2480
|
-
children: /* @__PURE__ */
|
|
2483
|
+
children: /* @__PURE__ */ w(x, {
|
|
2481
2484
|
checked: !!f.allowInitiatorSelfApproval,
|
|
2482
2485
|
inputProps: {
|
|
2483
2486
|
id: "allowInitiatorSelfApproval",
|
|
2484
2487
|
name: "allowInitiatorSelfApproval"
|
|
2485
2488
|
},
|
|
2486
|
-
onChange: (e) => Z(
|
|
2489
|
+
onChange: (e) => Z(_i(t, {
|
|
2487
2490
|
allowInitiatorSelfApproval: e.target.checked,
|
|
2488
2491
|
memberId: f.memberId,
|
|
2489
2492
|
type: "DIRECT"
|
|
2490
2493
|
}))
|
|
2491
2494
|
})
|
|
2495
|
+
})] }) : null,
|
|
2496
|
+
f.type === "POSITION" ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(n, {
|
|
2497
|
+
hintText: "指派給目前有效歸屬中擁有此職位的會員;主要歸屬優先。多人時全部成為簽核人,依上方的決策政策處理。",
|
|
2498
|
+
label: "改派職位",
|
|
2499
|
+
name: "approverFallbackPositionId",
|
|
2500
|
+
required: !0,
|
|
2501
|
+
children: /* @__PURE__ */ w(s, {
|
|
2502
|
+
name: "approverFallbackPositionId",
|
|
2503
|
+
onChange: (e) => Z(_i(t, {
|
|
2504
|
+
allowInitiatorSelfApproval: f.allowInitiatorSelfApproval,
|
|
2505
|
+
positionId: e?.id ?? "",
|
|
2506
|
+
type: "POSITION"
|
|
2507
|
+
})),
|
|
2508
|
+
placeholder: "選擇職位",
|
|
2509
|
+
positions: z,
|
|
2510
|
+
value: v
|
|
2511
|
+
})
|
|
2512
|
+
}), /* @__PURE__ */ w(n, {
|
|
2513
|
+
hintText: "預設禁止申請人簽自己的案件;只有此流程允許自簽時才開啟。",
|
|
2514
|
+
label: "允許自簽",
|
|
2515
|
+
name: "allowInitiatorSelfApproval",
|
|
2516
|
+
children: /* @__PURE__ */ w(x, {
|
|
2517
|
+
checked: !!f.allowInitiatorSelfApproval,
|
|
2518
|
+
inputProps: {
|
|
2519
|
+
id: "allowInitiatorSelfApproval",
|
|
2520
|
+
name: "allowInitiatorSelfApproval"
|
|
2521
|
+
},
|
|
2522
|
+
onChange: (e) => Z(_i(t, {
|
|
2523
|
+
allowInitiatorSelfApproval: e.target.checked,
|
|
2524
|
+
positionId: f.positionId,
|
|
2525
|
+
type: "POSITION"
|
|
2526
|
+
}))
|
|
2527
|
+
})
|
|
2492
2528
|
})] }) : null
|
|
2493
2529
|
] }) : null,
|
|
2494
|
-
t.type === "ORG_UNIT_MEMBER" || t.type === "ORG_UNIT_POSITION" ? /* @__PURE__ */
|
|
2530
|
+
t.type === "ORG_UNIT_MEMBER" || t.type === "ORG_UNIT_POSITION" ? /* @__PURE__ */ w(n, {
|
|
2495
2531
|
label: "包含下層",
|
|
2496
2532
|
name: "includeDescendants",
|
|
2497
|
-
children: /* @__PURE__ */
|
|
2533
|
+
children: /* @__PURE__ */ w(x, {
|
|
2498
2534
|
checked: !!t.includeDescendants,
|
|
2499
2535
|
inputProps: {
|
|
2500
2536
|
id: "includeDescendants",
|
|
@@ -2507,28 +2543,28 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2507
2543
|
})
|
|
2508
2544
|
})
|
|
2509
2545
|
}) : null,
|
|
2510
|
-
t.type === "POSITION" ? /* @__PURE__ */
|
|
2546
|
+
t.type === "POSITION" ? /* @__PURE__ */ w(n, {
|
|
2511
2547
|
hintText: "指派給目前有效歸屬中擁有此職位的會員;主要歸屬優先。",
|
|
2512
2548
|
label: "職位",
|
|
2513
2549
|
name: "positionId",
|
|
2514
2550
|
required: !0,
|
|
2515
|
-
children: /* @__PURE__ */
|
|
2551
|
+
children: /* @__PURE__ */ w(s, {
|
|
2516
2552
|
name: "positionId",
|
|
2517
2553
|
onChange: (e) => Z({
|
|
2518
2554
|
positionId: e?.id ?? "",
|
|
2519
2555
|
type: "POSITION"
|
|
2520
2556
|
}),
|
|
2521
2557
|
placeholder: "選擇職位",
|
|
2522
|
-
positions:
|
|
2558
|
+
positions: z,
|
|
2523
2559
|
value: c
|
|
2524
2560
|
})
|
|
2525
2561
|
}) : null,
|
|
2526
|
-
t.type === "ORG_UNIT_POSITION" ? /* @__PURE__ */
|
|
2562
|
+
t.type === "ORG_UNIT_POSITION" ? /* @__PURE__ */ w(n, {
|
|
2527
2563
|
hintText: "只納入指定組織範圍內擁有此職位的有效會員。",
|
|
2528
2564
|
label: "職位",
|
|
2529
2565
|
name: "orgUnitPositionId",
|
|
2530
2566
|
required: !0,
|
|
2531
|
-
children: /* @__PURE__ */
|
|
2567
|
+
children: /* @__PURE__ */ w(s, {
|
|
2532
2568
|
disabled: !t.orgUnitId.trim(),
|
|
2533
2569
|
name: "orgUnitPositionId",
|
|
2534
2570
|
onChange: (e) => Z({
|
|
@@ -2542,85 +2578,85 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2542
2578
|
value: c
|
|
2543
2579
|
})
|
|
2544
2580
|
}) : null,
|
|
2545
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ w(n, {
|
|
2546
2582
|
hintText: "決定這一關要幾位簽核者同意才會通過;單人簽核與任一人同意的效果完全相同,皆為其中一人同意即通過。",
|
|
2547
2583
|
label: "決策方式",
|
|
2548
2584
|
name: "decisionPolicy",
|
|
2549
2585
|
required: !0,
|
|
2550
|
-
children: /* @__PURE__ */
|
|
2586
|
+
children: /* @__PURE__ */ w(b, {
|
|
2551
2587
|
clearable: !1,
|
|
2552
|
-
onChange: (t) =>
|
|
2553
|
-
options: [...
|
|
2554
|
-
value:
|
|
2588
|
+
onChange: (t) => Gr(ti(t?.id ?? null, e.data.decisionPolicy)),
|
|
2589
|
+
options: [..._t.filter((e) => t.type !== "ORG_MANAGER_CHAIN" || e.id === "SEQUENTIAL" || e.id === "PARALLEL_ALL")],
|
|
2590
|
+
value: yt(oe)
|
|
2555
2591
|
})
|
|
2556
2592
|
}),
|
|
2557
|
-
|
|
2593
|
+
oe === "QUORUM" ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(n, {
|
|
2558
2594
|
label: "門檻計算方式",
|
|
2559
2595
|
name: "quorumThresholdType",
|
|
2560
2596
|
required: !0,
|
|
2561
|
-
children: /* @__PURE__ */
|
|
2597
|
+
children: /* @__PURE__ */ w(b, {
|
|
2562
2598
|
clearable: !1,
|
|
2563
|
-
onChange: (e) =>
|
|
2564
|
-
threshold:
|
|
2565
|
-
thresholdType:
|
|
2599
|
+
onChange: (e) => Gr({
|
|
2600
|
+
threshold: E.threshold,
|
|
2601
|
+
thresholdType: ri(e?.id ?? null),
|
|
2566
2602
|
type: "QUORUM"
|
|
2567
2603
|
}),
|
|
2568
2604
|
options: [...mr],
|
|
2569
|
-
value: $(mr,
|
|
2605
|
+
value: $(mr, E.thresholdType)
|
|
2570
2606
|
})
|
|
2571
|
-
}), /* @__PURE__ */
|
|
2572
|
-
hintText:
|
|
2573
|
-
label:
|
|
2607
|
+
}), /* @__PURE__ */ w(n, {
|
|
2608
|
+
hintText: E.thresholdType === "PERCENTAGE" ? "達到簽核者總數的這個百分比即通過,換算人數時無條件進位;超過 100 的輸入會自動夾至 100。" : "達到這個同意人數即通過;門檻超過實際簽核者人數時,這一關將永遠無法通過,請勿設定超過實際簽核者人數。",
|
|
2609
|
+
label: E.thresholdType === "PERCENTAGE" ? "門檻百分比" : "門檻人數",
|
|
2574
2610
|
name: "quorumThreshold",
|
|
2575
2611
|
required: !0,
|
|
2576
|
-
children: /* @__PURE__ */
|
|
2612
|
+
children: /* @__PURE__ */ w(te, {
|
|
2577
2613
|
id: "quorumThreshold",
|
|
2578
|
-
inputProps:
|
|
2614
|
+
inputProps: E.thresholdType === "PERCENTAGE" ? {
|
|
2579
2615
|
max: 100,
|
|
2580
2616
|
min: 1
|
|
2581
2617
|
} : { min: 1 },
|
|
2582
2618
|
inputType: "number",
|
|
2583
2619
|
name: "quorumThreshold",
|
|
2584
|
-
onChange: (e) =>
|
|
2585
|
-
threshold: tt(Number(e.target.value),
|
|
2586
|
-
thresholdType:
|
|
2620
|
+
onChange: (e) => Gr({
|
|
2621
|
+
threshold: tt(Number(e.target.value), E.thresholdType),
|
|
2622
|
+
thresholdType: E.thresholdType,
|
|
2587
2623
|
type: "QUORUM"
|
|
2588
2624
|
}),
|
|
2589
|
-
value: String(
|
|
2625
|
+
value: String(E.threshold),
|
|
2590
2626
|
variant: "base"
|
|
2591
2627
|
})
|
|
2592
2628
|
})] }) : null,
|
|
2593
|
-
e.data.returnBehavior.allowReturn ? /* @__PURE__ */
|
|
2629
|
+
e.data.returnBehavior.allowReturn ? /* @__PURE__ */ w(n, {
|
|
2594
2630
|
hintText: "退回發起人後,重新送出時要從流程開始重跑,或直接回到退回的簽核節點。",
|
|
2595
2631
|
label: "重送策略",
|
|
2596
2632
|
name: "returnResubmitStrategy",
|
|
2597
2633
|
required: !0,
|
|
2598
|
-
children: /* @__PURE__ */
|
|
2634
|
+
children: /* @__PURE__ */ w(b, {
|
|
2599
2635
|
clearable: !1,
|
|
2600
|
-
onChange: (e) =>
|
|
2636
|
+
onChange: (e) => Br($r(e?.id ?? null)),
|
|
2601
2637
|
options: [...dr],
|
|
2602
|
-
value: $(dr,
|
|
2638
|
+
value: $(dr, ee)
|
|
2603
2639
|
})
|
|
2604
2640
|
}) : null,
|
|
2605
|
-
e.data.returnBehavior.allowReturn ? /* @__PURE__ */
|
|
2641
|
+
e.data.returnBehavior.allowReturn ? /* @__PURE__ */ w(n, {
|
|
2606
2642
|
hintText: "開啟後,簽核者按下退回時必須填寫意見,未填寫會被擋下。",
|
|
2607
2643
|
label: "退回時意見必填",
|
|
2608
2644
|
name: "returnRequireComment",
|
|
2609
|
-
children: /* @__PURE__ */
|
|
2645
|
+
children: /* @__PURE__ */ w(x, {
|
|
2610
2646
|
checked: e.data.returnBehavior.requireComment === !0,
|
|
2611
2647
|
inputProps: {
|
|
2612
2648
|
id: "returnRequireComment",
|
|
2613
2649
|
name: "returnRequireComment"
|
|
2614
2650
|
},
|
|
2615
|
-
onChange: (e) =>
|
|
2651
|
+
onChange: (e) => Vr(e.target.checked)
|
|
2616
2652
|
})
|
|
2617
2653
|
}) : null,
|
|
2618
|
-
/* @__PURE__ */
|
|
2654
|
+
/* @__PURE__ */ w(n, {
|
|
2619
2655
|
hintText: "開啟後可設定簽核期限,逾時將依下方設定處理。",
|
|
2620
2656
|
label: "啟用時效",
|
|
2621
2657
|
name: "slaEnabled",
|
|
2622
|
-
children: /* @__PURE__ */
|
|
2623
|
-
checked: !!
|
|
2658
|
+
children: /* @__PURE__ */ w(x, {
|
|
2659
|
+
checked: !!y,
|
|
2624
2660
|
inputProps: {
|
|
2625
2661
|
id: "slaEnabled",
|
|
2626
2662
|
name: "slaEnabled"
|
|
@@ -2628,171 +2664,171 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2628
2664
|
onChange: (e) => Q(e.target.checked ? Ze : null)
|
|
2629
2665
|
})
|
|
2630
2666
|
}),
|
|
2631
|
-
|
|
2667
|
+
y && !re ? /* @__PURE__ */ w(n, {
|
|
2632
2668
|
hintText: "此期限混用了日與時,無法在表單中編輯。請改以單一單位設定,或透過 API 維護。",
|
|
2633
2669
|
label: "時效期限",
|
|
2634
2670
|
name: "slaDurationRaw",
|
|
2635
|
-
children: /* @__PURE__ */
|
|
2671
|
+
children: /* @__PURE__ */ w(te, {
|
|
2636
2672
|
disabled: !0,
|
|
2637
|
-
value:
|
|
2673
|
+
value: y.duration,
|
|
2638
2674
|
variant: "base"
|
|
2639
2675
|
})
|
|
2640
2676
|
}) : null,
|
|
2641
|
-
|
|
2677
|
+
y && re ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(n, {
|
|
2642
2678
|
label: "時效期限",
|
|
2643
2679
|
name: "slaDurationValue",
|
|
2644
2680
|
required: !0,
|
|
2645
|
-
children: /* @__PURE__ */
|
|
2681
|
+
children: /* @__PURE__ */ w(te, {
|
|
2646
2682
|
id: "slaDurationValue",
|
|
2647
2683
|
inputProps: { min: 1 },
|
|
2648
2684
|
inputType: "number",
|
|
2649
2685
|
name: "slaDurationValue",
|
|
2650
|
-
onChange: (e) => Q(
|
|
2651
|
-
unit:
|
|
2686
|
+
onChange: (e) => Q(li(y, {
|
|
2687
|
+
unit: ie,
|
|
2652
2688
|
value: Number(e.target.value)
|
|
2653
2689
|
})),
|
|
2654
|
-
value: String(
|
|
2690
|
+
value: String(re.value),
|
|
2655
2691
|
variant: "base"
|
|
2656
2692
|
})
|
|
2657
|
-
}), /* @__PURE__ */
|
|
2693
|
+
}), /* @__PURE__ */ w(n, {
|
|
2658
2694
|
label: "期限單位",
|
|
2659
2695
|
name: "slaDurationUnit",
|
|
2660
2696
|
required: !0,
|
|
2661
|
-
children: /* @__PURE__ */
|
|
2697
|
+
children: /* @__PURE__ */ w(b, {
|
|
2662
2698
|
clearable: !1,
|
|
2663
|
-
onChange: (e) => Q(
|
|
2664
|
-
unit:
|
|
2665
|
-
value:
|
|
2699
|
+
onChange: (e) => Q(li(y, {
|
|
2700
|
+
unit: ii(e?.id ?? null),
|
|
2701
|
+
value: re.value
|
|
2666
2702
|
})),
|
|
2667
2703
|
options: [...$e],
|
|
2668
|
-
value: $($e,
|
|
2704
|
+
value: $($e, ie)
|
|
2669
2705
|
})
|
|
2670
2706
|
})] }) : null,
|
|
2671
|
-
|
|
2707
|
+
y && ie === "DAY" ? /* @__PURE__ */ w(n, {
|
|
2672
2708
|
hintText: "工作日會跳過週末與行事曆上的假日,補班日仍計為工作日;行事曆由系統管理者設定。",
|
|
2673
2709
|
label: "計算方式",
|
|
2674
2710
|
name: "slaCalendar",
|
|
2675
2711
|
required: !0,
|
|
2676
|
-
children: /* @__PURE__ */
|
|
2712
|
+
children: /* @__PURE__ */ w(b, {
|
|
2677
2713
|
clearable: !1,
|
|
2678
2714
|
onChange: (e) => Q({
|
|
2679
|
-
...
|
|
2680
|
-
calendar:
|
|
2715
|
+
...y,
|
|
2716
|
+
calendar: ai(e?.id ?? null)
|
|
2681
2717
|
}),
|
|
2682
2718
|
options: [...Qe],
|
|
2683
|
-
value: $(Qe,
|
|
2719
|
+
value: $(Qe, y.calendar ?? "CALENDAR")
|
|
2684
2720
|
})
|
|
2685
2721
|
}) : null,
|
|
2686
|
-
|
|
2722
|
+
y ? /* @__PURE__ */ w(n, {
|
|
2687
2723
|
label: "逾時處理",
|
|
2688
2724
|
name: "slaOnTimeout",
|
|
2689
2725
|
required: !0,
|
|
2690
|
-
children: /* @__PURE__ */
|
|
2726
|
+
children: /* @__PURE__ */ w(b, {
|
|
2691
2727
|
clearable: !1,
|
|
2692
|
-
onChange: (e) => Q(
|
|
2728
|
+
onChange: (e) => Q(ui(y, oi(e?.id ?? null))),
|
|
2693
2729
|
options: [...et],
|
|
2694
|
-
value: $(et,
|
|
2730
|
+
value: $(et, y.onTimeout)
|
|
2695
2731
|
})
|
|
2696
2732
|
}) : null,
|
|
2697
|
-
|
|
2733
|
+
y?.onTimeout === "ESCALATE" ? /* @__PURE__ */ w(n, {
|
|
2698
2734
|
hintText: "逾時後改派給簽核者的上層主管,只會升級一次。",
|
|
2699
2735
|
label: "升級層級",
|
|
2700
2736
|
name: "slaEscalateLevelsUp",
|
|
2701
2737
|
required: !0,
|
|
2702
|
-
children: /* @__PURE__ */
|
|
2738
|
+
children: /* @__PURE__ */ w(b, {
|
|
2703
2739
|
clearable: !1,
|
|
2704
2740
|
onChange: (e) => Q({
|
|
2705
|
-
...
|
|
2706
|
-
escalateLevelsUp:
|
|
2741
|
+
...y,
|
|
2742
|
+
escalateLevelsUp: yi(e?.id ?? null).value
|
|
2707
2743
|
}),
|
|
2708
|
-
options: [...
|
|
2709
|
-
value:
|
|
2744
|
+
options: [...hr],
|
|
2745
|
+
value: S
|
|
2710
2746
|
})
|
|
2711
2747
|
}) : null,
|
|
2712
|
-
|
|
2748
|
+
y ? /* @__PURE__ */ w(n, {
|
|
2713
2749
|
hintText: "在期限到達前先送出一次提醒。",
|
|
2714
2750
|
label: "預警提醒",
|
|
2715
2751
|
name: "slaWarningAt",
|
|
2716
|
-
children: /* @__PURE__ */
|
|
2752
|
+
children: /* @__PURE__ */ w(b, {
|
|
2717
2753
|
clearable: !1,
|
|
2718
|
-
onChange: (e) => Q(
|
|
2754
|
+
onChange: (e) => Q(di(y, ci(e?.id ?? null).value)),
|
|
2719
2755
|
options: [...fr],
|
|
2720
|
-
value:
|
|
2756
|
+
value: ae
|
|
2721
2757
|
})
|
|
2722
2758
|
}) : null,
|
|
2723
|
-
/* @__PURE__ */
|
|
2759
|
+
/* @__PURE__ */ w(n, {
|
|
2724
2760
|
hintText: "關閉後,簽核者在此關卡看不到「拒絕」按鈕。",
|
|
2725
2761
|
label: "允許拒絕",
|
|
2726
2762
|
name: "allowReject",
|
|
2727
|
-
children: /* @__PURE__ */
|
|
2763
|
+
children: /* @__PURE__ */ w(x, {
|
|
2728
2764
|
checked: e.data.allowReject,
|
|
2729
2765
|
inputProps: {
|
|
2730
2766
|
id: "allowReject",
|
|
2731
2767
|
name: "allowReject"
|
|
2732
2768
|
},
|
|
2733
|
-
onChange: (e) =>
|
|
2769
|
+
onChange: (e) => Kr({ allowReject: e.target.checked })
|
|
2734
2770
|
})
|
|
2735
2771
|
}),
|
|
2736
|
-
/* @__PURE__ */
|
|
2772
|
+
/* @__PURE__ */ w(n, {
|
|
2737
2773
|
hintText: "關閉後,簽核者無法把此關卡的任務轉派給其他人。",
|
|
2738
2774
|
label: "允許轉派",
|
|
2739
2775
|
name: "allowTransfer",
|
|
2740
|
-
children: /* @__PURE__ */
|
|
2776
|
+
children: /* @__PURE__ */ w(x, {
|
|
2741
2777
|
checked: e.data.allowTransfer,
|
|
2742
2778
|
inputProps: {
|
|
2743
2779
|
id: "allowTransfer",
|
|
2744
2780
|
name: "allowTransfer"
|
|
2745
2781
|
},
|
|
2746
|
-
onChange: (e) =>
|
|
2782
|
+
onChange: (e) => Kr({ allowTransfer: e.target.checked })
|
|
2747
2783
|
})
|
|
2748
2784
|
}),
|
|
2749
|
-
/* @__PURE__ */
|
|
2785
|
+
/* @__PURE__ */ w(n, {
|
|
2750
2786
|
hintText: "開啟後,簽核者可在此關卡臨時加入其他簽核人;會簽為平行處理,加簽則需等加入者簽完才往下。",
|
|
2751
2787
|
label: "允許加簽",
|
|
2752
2788
|
name: "allowAddSigner",
|
|
2753
|
-
children: /* @__PURE__ */
|
|
2789
|
+
children: /* @__PURE__ */ w(x, {
|
|
2754
2790
|
checked: e.data.allowAddSigner,
|
|
2755
2791
|
inputProps: {
|
|
2756
2792
|
id: "allowAddSigner",
|
|
2757
2793
|
name: "allowAddSigner"
|
|
2758
2794
|
},
|
|
2759
|
-
onChange: (e) =>
|
|
2795
|
+
onChange: (e) => Kr({ allowAddSigner: e.target.checked })
|
|
2760
2796
|
})
|
|
2761
2797
|
}),
|
|
2762
|
-
/* @__PURE__ */
|
|
2798
|
+
/* @__PURE__ */ w(n, {
|
|
2763
2799
|
hintText: "開啟後,申請人本人(含其代理人)不會成為此關的簽核人,也不能被轉簽或加簽到此關。",
|
|
2764
2800
|
label: "申請人不可簽核自己的單",
|
|
2765
2801
|
name: "excludeInitiator",
|
|
2766
|
-
children: /* @__PURE__ */
|
|
2767
|
-
checked: !!
|
|
2802
|
+
children: /* @__PURE__ */ w(x, {
|
|
2803
|
+
checked: !!ne,
|
|
2768
2804
|
inputProps: {
|
|
2769
2805
|
id: "excludeInitiator",
|
|
2770
2806
|
name: "excludeInitiator"
|
|
2771
2807
|
},
|
|
2772
|
-
onChange: (e) =>
|
|
2808
|
+
onChange: (e) => Ur(e.target.checked ? yr : null)
|
|
2773
2809
|
})
|
|
2774
2810
|
}),
|
|
2775
|
-
|
|
2811
|
+
ne ? /* @__PURE__ */ w(n, {
|
|
2776
2812
|
label: "排除後沒有簽核人時",
|
|
2777
2813
|
name: "excludeInitiatorWhenEmpty",
|
|
2778
2814
|
required: !0,
|
|
2779
|
-
children: /* @__PURE__ */
|
|
2815
|
+
children: /* @__PURE__ */ w(b, {
|
|
2780
2816
|
clearable: !1,
|
|
2781
|
-
onChange: (e) =>
|
|
2782
|
-
options: [...
|
|
2783
|
-
value: $(
|
|
2817
|
+
onChange: (e) => Ur({ whenEmpty: $(vr, e?.id ?? null)?.id ?? yr.whenEmpty }),
|
|
2818
|
+
options: [...vr],
|
|
2819
|
+
value: $(vr, ne.whenEmpty)
|
|
2784
2820
|
})
|
|
2785
2821
|
}) : null
|
|
2786
2822
|
] });
|
|
2787
2823
|
}
|
|
2788
|
-
function
|
|
2789
|
-
let t = e.data.action, r =
|
|
2824
|
+
function Ki(e) {
|
|
2825
|
+
let t = e.data.action, r = Ca(t).map((e) => Ui(L, e)), i = t.type === "NOTIFY" && t.recipients.type !== "DIRECT" ? aa(t.recipients, L, R, z, Y) : null;
|
|
2790
2826
|
function a(e) {
|
|
2791
2827
|
let n = {
|
|
2792
2828
|
memberIds: [...e],
|
|
2793
2829
|
type: "DIRECT"
|
|
2794
2830
|
};
|
|
2795
|
-
|
|
2831
|
+
qr(t.type === "NOTIFY" ? {
|
|
2796
2832
|
...t,
|
|
2797
2833
|
recipients: n
|
|
2798
2834
|
} : {
|
|
@@ -2802,17 +2838,17 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2802
2838
|
});
|
|
2803
2839
|
}
|
|
2804
2840
|
function o(e) {
|
|
2805
|
-
t.type === "NOTIFY" &&
|
|
2841
|
+
t.type === "NOTIFY" && qr({
|
|
2806
2842
|
...t,
|
|
2807
2843
|
webhooks: e
|
|
2808
2844
|
});
|
|
2809
2845
|
}
|
|
2810
|
-
return /* @__PURE__ */
|
|
2811
|
-
/* @__PURE__ */
|
|
2846
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
2847
|
+
/* @__PURE__ */ w(n, {
|
|
2812
2848
|
hintText: i ? `目前知會對象為「${i}」;在此選擇成員會改為指定成員。` : t.type === "NOTIFY" ? "可只設定 Webhook,不指定知會對象。" : void 0,
|
|
2813
2849
|
label: "知會對象",
|
|
2814
2850
|
name: "notifyMemberIds",
|
|
2815
|
-
children: /* @__PURE__ */
|
|
2851
|
+
children: /* @__PURE__ */ w(_, {
|
|
2816
2852
|
asyncData: !0,
|
|
2817
2853
|
disabledOptionsFilter: !0,
|
|
2818
2854
|
emptyText: "沒有符合的成員",
|
|
@@ -2820,46 +2856,46 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2820
2856
|
loadingText: "搜尋成員中...",
|
|
2821
2857
|
mode: "multiple",
|
|
2822
2858
|
onChange: (e) => a(e.map((e) => e.id)),
|
|
2823
|
-
onSearch:
|
|
2859
|
+
onSearch: er,
|
|
2824
2860
|
onVisibilityChange: (e) => {
|
|
2825
|
-
e && (It([]),
|
|
2861
|
+
e && (It([]), er(""));
|
|
2826
2862
|
},
|
|
2827
|
-
options: [...
|
|
2863
|
+
options: [...ta(r, Ft)],
|
|
2828
2864
|
overflowStrategy: "wrap",
|
|
2829
2865
|
placeholder: "搜尋姓名或信箱",
|
|
2830
2866
|
searchDebounceTime: 300,
|
|
2831
2867
|
value: [...r]
|
|
2832
2868
|
})
|
|
2833
2869
|
}),
|
|
2834
|
-
t.type === "NOTIFY" && !Jt(t.webhooks) ? /* @__PURE__ */
|
|
2835
|
-
style:
|
|
2836
|
-
children: [/* @__PURE__ */
|
|
2870
|
+
t.type === "NOTIFY" && !Jt(t.webhooks) ? /* @__PURE__ */ T("div", {
|
|
2871
|
+
style: K,
|
|
2872
|
+
children: [/* @__PURE__ */ w(S, {
|
|
2837
2873
|
color: "text-warning",
|
|
2838
2874
|
variant: "body",
|
|
2839
2875
|
children: "這個節點的 Webhook 設定格式錯誤,無法在此編輯。清除後可重新新增。"
|
|
2840
|
-
}), /* @__PURE__ */
|
|
2876
|
+
}), /* @__PURE__ */ w("div", { children: /* @__PURE__ */ w(v, {
|
|
2841
2877
|
onClick: () => o([]),
|
|
2842
2878
|
variant: "destructive-secondary",
|
|
2843
2879
|
children: "清除 Webhook 設定"
|
|
2844
2880
|
}) })]
|
|
2845
2881
|
}) : null,
|
|
2846
|
-
t.type === "NOTIFY" && Jt(t.webhooks) ? /* @__PURE__ */
|
|
2847
|
-
catalog:
|
|
2848
|
-
catalogState:
|
|
2849
|
-
formFields:
|
|
2882
|
+
t.type === "NOTIFY" && Jt(t.webhooks) ? /* @__PURE__ */ w(cn, {
|
|
2883
|
+
catalog: nn,
|
|
2884
|
+
catalogState: an,
|
|
2885
|
+
formFields: Y?.fields ?? null,
|
|
2850
2886
|
onChange: o,
|
|
2851
|
-
targets:
|
|
2887
|
+
targets: ht(t)
|
|
2852
2888
|
}) : null
|
|
2853
2889
|
] });
|
|
2854
2890
|
}
|
|
2855
|
-
function
|
|
2856
|
-
return /* @__PURE__ */
|
|
2857
|
-
style:
|
|
2858
|
-
children: [/* @__PURE__ */
|
|
2891
|
+
function qi(e) {
|
|
2892
|
+
return /* @__PURE__ */ T("div", {
|
|
2893
|
+
style: K,
|
|
2894
|
+
children: [/* @__PURE__ */ w(S, {
|
|
2859
2895
|
component: "h2",
|
|
2860
2896
|
variant: "h3",
|
|
2861
2897
|
children: "已選取線段"
|
|
2862
|
-
}), /* @__PURE__ */
|
|
2898
|
+
}), /* @__PURE__ */ T(S, {
|
|
2863
2899
|
color: "text-neutral",
|
|
2864
2900
|
variant: "body",
|
|
2865
2901
|
children: [
|
|
@@ -2870,17 +2906,17 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2870
2906
|
})]
|
|
2871
2907
|
});
|
|
2872
2908
|
}
|
|
2873
|
-
function
|
|
2874
|
-
let t =
|
|
2875
|
-
return /* @__PURE__ */
|
|
2876
|
-
style:
|
|
2909
|
+
function Yi(e) {
|
|
2910
|
+
let t = xa(e, j.nodes);
|
|
2911
|
+
return /* @__PURE__ */ T("div", {
|
|
2912
|
+
style: K,
|
|
2877
2913
|
children: [
|
|
2878
|
-
/* @__PURE__ */
|
|
2914
|
+
/* @__PURE__ */ w(S, {
|
|
2879
2915
|
component: "h2",
|
|
2880
2916
|
variant: "h3",
|
|
2881
2917
|
children: t ? "條件設定" : "線段屬性"
|
|
2882
2918
|
}),
|
|
2883
|
-
/* @__PURE__ */
|
|
2919
|
+
/* @__PURE__ */ T(S, {
|
|
2884
2920
|
color: "text-neutral",
|
|
2885
2921
|
variant: "body",
|
|
2886
2922
|
children: [
|
|
@@ -2889,7 +2925,7 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2889
2925
|
e.target
|
|
2890
2926
|
]
|
|
2891
2927
|
}),
|
|
2892
|
-
t ?
|
|
2928
|
+
t ? Zi(e) : /* @__PURE__ */ w(S, {
|
|
2893
2929
|
color: "text-neutral",
|
|
2894
2930
|
variant: "body",
|
|
2895
2931
|
children: "這條線會直接把流程送到下一個節點。"
|
|
@@ -2897,63 +2933,63 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2897
2933
|
]
|
|
2898
2934
|
});
|
|
2899
2935
|
}
|
|
2900
|
-
function
|
|
2901
|
-
return !e || !
|
|
2936
|
+
function Xi(e) {
|
|
2937
|
+
return !e || !xa(e, j.nodes) ? null : /* @__PURE__ */ w(y, {
|
|
2902
2938
|
cancelText: "取消",
|
|
2903
2939
|
confirmButtonProps: { disabled: !e.data.isDefault && !e.data.condition },
|
|
2904
2940
|
confirmText: "完成",
|
|
2905
2941
|
modalType: "standard",
|
|
2906
|
-
onCancel:
|
|
2907
|
-
onClose:
|
|
2908
|
-
onConfirm:
|
|
2909
|
-
open: !!
|
|
2942
|
+
onCancel: Ir,
|
|
2943
|
+
onClose: Ir,
|
|
2944
|
+
onConfirm: Ir,
|
|
2945
|
+
open: !!at,
|
|
2910
2946
|
showModalFooter: !0,
|
|
2911
2947
|
showModalHeader: !0,
|
|
2912
2948
|
size: "regular",
|
|
2913
2949
|
supportingText: "條件分流的輸出連線需要指定條件,條件會直接顯示在線上。",
|
|
2914
2950
|
title: "條件設定",
|
|
2915
|
-
children:
|
|
2951
|
+
children: Zi(e)
|
|
2916
2952
|
});
|
|
2917
2953
|
}
|
|
2918
|
-
function
|
|
2919
|
-
let t =
|
|
2920
|
-
return /* @__PURE__ */
|
|
2921
|
-
style:
|
|
2954
|
+
function Zi(e) {
|
|
2955
|
+
let t = ya(e, j.nodes), r = pa(G?.schema ?? null), i = ma(G?.schema ?? null, e.data.conditionFieldKey ?? null), a = ha(i), o = _a(i), s = $(a, e.data.conditionOperator ?? null), c = !e.data.isDefault && !e.data.condition;
|
|
2956
|
+
return /* @__PURE__ */ T("div", {
|
|
2957
|
+
style: K,
|
|
2922
2958
|
children: [
|
|
2923
|
-
/* @__PURE__ */
|
|
2959
|
+
/* @__PURE__ */ T(S, {
|
|
2924
2960
|
color: "text-neutral",
|
|
2925
2961
|
variant: "body",
|
|
2926
2962
|
children: [
|
|
2927
2963
|
"畫布上的這條線目前會顯示「",
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
style: { color: c ?
|
|
2964
|
+
/* @__PURE__ */ w("span", {
|
|
2965
|
+
style: { color: c ? Ln : void 0 },
|
|
2930
2966
|
children: t ?? "請設定條件"
|
|
2931
2967
|
}),
|
|
2932
2968
|
"」。"
|
|
2933
2969
|
]
|
|
2934
2970
|
}),
|
|
2935
|
-
/* @__PURE__ */
|
|
2971
|
+
/* @__PURE__ */ w(x, {
|
|
2936
2972
|
checked: !!e.data.isDefault,
|
|
2937
2973
|
label: "其他情況走這條",
|
|
2938
|
-
onChange: (t) =>
|
|
2974
|
+
onChange: (t) => hi(e.id, t.target.checked)
|
|
2939
2975
|
}),
|
|
2940
|
-
e.data.isDefault ? /* @__PURE__ */
|
|
2976
|
+
e.data.isDefault ? /* @__PURE__ */ w(S, {
|
|
2941
2977
|
color: "text-neutral",
|
|
2942
2978
|
variant: "body",
|
|
2943
2979
|
children: "其他條件都不符合時,流程會走這條線。"
|
|
2944
|
-
}) : /* @__PURE__ */
|
|
2945
|
-
|
|
2980
|
+
}) : /* @__PURE__ */ T(C, { children: [
|
|
2981
|
+
G ? null : /* @__PURE__ */ w(S, {
|
|
2946
2982
|
color: "text-neutral",
|
|
2947
2983
|
variant: "body",
|
|
2948
2984
|
children: "請先綁定表單版本,才能選擇條件欄位。"
|
|
2949
2985
|
}),
|
|
2950
|
-
/* @__PURE__ */
|
|
2986
|
+
/* @__PURE__ */ w(n, {
|
|
2951
2987
|
label: "條件欄位",
|
|
2952
2988
|
name: "edgeConditionField",
|
|
2953
2989
|
required: !0,
|
|
2954
|
-
children: /* @__PURE__ */
|
|
2990
|
+
children: /* @__PURE__ */ w(b, {
|
|
2955
2991
|
clearable: !1,
|
|
2956
|
-
onChange: (t) =>
|
|
2992
|
+
onChange: (t) => xi({
|
|
2957
2993
|
edgeId: e.id,
|
|
2958
2994
|
fieldKey: t?.id ?? null,
|
|
2959
2995
|
operator: null,
|
|
@@ -2964,15 +3000,15 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2964
3000
|
value: $(r, e.data.conditionFieldKey ?? null)
|
|
2965
3001
|
})
|
|
2966
3002
|
}),
|
|
2967
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ w(n, {
|
|
2968
3004
|
label: "條件判斷",
|
|
2969
3005
|
name: "edgeConditionOperator",
|
|
2970
3006
|
required: !0,
|
|
2971
|
-
children: /* @__PURE__ */
|
|
3007
|
+
children: /* @__PURE__ */ w(b, {
|
|
2972
3008
|
clearable: !1,
|
|
2973
|
-
onChange: (t) =>
|
|
3009
|
+
onChange: (t) => xi({
|
|
2974
3010
|
edgeId: e.id,
|
|
2975
|
-
operator:
|
|
3011
|
+
operator: ga(t?.id ?? null),
|
|
2976
3012
|
value: null
|
|
2977
3013
|
}),
|
|
2978
3014
|
options: [...a],
|
|
@@ -2980,21 +3016,21 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
2980
3016
|
value: s
|
|
2981
3017
|
})
|
|
2982
3018
|
}),
|
|
2983
|
-
s &&
|
|
3019
|
+
s && va(s.id) ? /* @__PURE__ */ w(n, {
|
|
2984
3020
|
label: "條件值",
|
|
2985
3021
|
name: "edgeConditionValue",
|
|
2986
3022
|
required: !0,
|
|
2987
|
-
children: o.length > 0 ? /* @__PURE__ */
|
|
3023
|
+
children: o.length > 0 ? /* @__PURE__ */ w(b, {
|
|
2988
3024
|
clearable: !1,
|
|
2989
|
-
onChange: (t) =>
|
|
3025
|
+
onChange: (t) => xi({
|
|
2990
3026
|
edgeId: e.id,
|
|
2991
3027
|
value: t?.id ?? null
|
|
2992
3028
|
}),
|
|
2993
3029
|
options: [...o],
|
|
2994
3030
|
placeholder: "選擇條件值",
|
|
2995
3031
|
value: $(o, e.data.conditionValue ?? null)
|
|
2996
|
-
}) : /* @__PURE__ */
|
|
2997
|
-
onChange: (t) =>
|
|
3032
|
+
}) : /* @__PURE__ */ w(te, {
|
|
3033
|
+
onChange: (t) => xi({
|
|
2998
3034
|
edgeId: e.id,
|
|
2999
3035
|
value: t.target.value
|
|
3000
3036
|
}),
|
|
@@ -3008,14 +3044,14 @@ function Ar({ aiAssistantAvailable: r = !0, embedded: a = !1, formSchemaOverride
|
|
|
3008
3044
|
});
|
|
3009
3045
|
}
|
|
3010
3046
|
}
|
|
3011
|
-
function
|
|
3047
|
+
function Nr({ onApplyAutoLayout: e }) {
|
|
3012
3048
|
function t() {
|
|
3013
3049
|
e();
|
|
3014
3050
|
}
|
|
3015
|
-
return /* @__PURE__ */
|
|
3051
|
+
return /* @__PURE__ */ w(Pe, {
|
|
3016
3052
|
position: "top-right",
|
|
3017
|
-
children: /* @__PURE__ */
|
|
3018
|
-
icon:
|
|
3053
|
+
children: /* @__PURE__ */ w(v, {
|
|
3054
|
+
icon: ce,
|
|
3019
3055
|
iconType: "leading",
|
|
3020
3056
|
onClick: t,
|
|
3021
3057
|
size: "sub",
|
|
@@ -3024,15 +3060,15 @@ function jr({ onApplyAutoLayout: e }) {
|
|
|
3024
3060
|
})
|
|
3025
3061
|
});
|
|
3026
3062
|
}
|
|
3027
|
-
function
|
|
3028
|
-
let r = e.approverLines ?? [e.approverSummary ?? e.label], i =
|
|
3029
|
-
return /* @__PURE__ */
|
|
3063
|
+
function Pr({ data: e, selected: t, type: n }) {
|
|
3064
|
+
let r = e.approverLines ?? [e.approverSummary ?? e.label], i = Fr(e), a = Ir(n, t);
|
|
3065
|
+
return /* @__PURE__ */ T("div", {
|
|
3030
3066
|
style: a,
|
|
3031
3067
|
children: [
|
|
3032
|
-
|
|
3033
|
-
/* @__PURE__ */
|
|
3068
|
+
Rr(e),
|
|
3069
|
+
/* @__PURE__ */ w("div", {
|
|
3034
3070
|
style: ir,
|
|
3035
|
-
children: r.map((e, t) => /* @__PURE__ */
|
|
3071
|
+
children: r.map((e, t) => /* @__PURE__ */ w(S, {
|
|
3036
3072
|
component: "span",
|
|
3037
3073
|
ellipsis: !0,
|
|
3038
3074
|
style: rr,
|
|
@@ -3041,7 +3077,7 @@ function X({ data: e, selected: t, type: n }) {
|
|
|
3041
3077
|
children: e
|
|
3042
3078
|
}, `${e}_${t}`))
|
|
3043
3079
|
}),
|
|
3044
|
-
/* @__PURE__ */
|
|
3080
|
+
/* @__PURE__ */ w(S, {
|
|
3045
3081
|
color: "text-neutral",
|
|
3046
3082
|
component: "span",
|
|
3047
3083
|
ellipsis: !0,
|
|
@@ -3053,106 +3089,106 @@ function X({ data: e, selected: t, type: n }) {
|
|
|
3053
3089
|
]
|
|
3054
3090
|
});
|
|
3055
3091
|
}
|
|
3056
|
-
function
|
|
3092
|
+
function Fr(e) {
|
|
3057
3093
|
return e.nodeKind === "startEvent" ? e.initiatorPolicySummary ?? "所有人" : e.approverSummary || e.approverLines ? e.label : e.nodeKind === "exclusiveGateway" ? "條件在線上" : e.nodeKind === "parallelGateway" ? "多條路徑同時進行" : sr[e.nodeKind];
|
|
3058
3094
|
}
|
|
3059
|
-
function
|
|
3060
|
-
let n =
|
|
3095
|
+
function Ir(e, t) {
|
|
3096
|
+
let n = Lr(e);
|
|
3061
3097
|
return t ? {
|
|
3062
3098
|
...n,
|
|
3063
3099
|
border: "1px solid var(--mzn-color-primary, #0057ff)",
|
|
3064
|
-
boxShadow:
|
|
3100
|
+
boxShadow: J
|
|
3065
3101
|
} : n;
|
|
3066
3102
|
}
|
|
3067
|
-
function
|
|
3068
|
-
return e === "exclusiveGateway" ?
|
|
3103
|
+
function Lr(e) {
|
|
3104
|
+
return e === "exclusiveGateway" ? Qn : e === "parallelGateway" ? $n : e === "startEvent" ? tr : e === "endEvent" ? nr : e === "userTask" ? er : q;
|
|
3069
3105
|
}
|
|
3070
|
-
function
|
|
3071
|
-
return !e.hasInput && e.hasOutput ? /* @__PURE__ */
|
|
3106
|
+
function Rr(e) {
|
|
3107
|
+
return !e.hasInput && e.hasOutput ? /* @__PURE__ */ w(O, {
|
|
3072
3108
|
id: or,
|
|
3073
|
-
position:
|
|
3109
|
+
position: k.Right,
|
|
3074
3110
|
type: "source"
|
|
3075
|
-
}) : e.hasInput && !e.hasOutput ? /* @__PURE__ */
|
|
3111
|
+
}) : e.hasInput && !e.hasOutput ? /* @__PURE__ */ w(O, {
|
|
3076
3112
|
id: ar,
|
|
3077
|
-
position:
|
|
3113
|
+
position: k.Left,
|
|
3078
3114
|
type: "target"
|
|
3079
|
-
}) : !e.hasInput && !e.hasOutput ? null : [/* @__PURE__ */
|
|
3115
|
+
}) : !e.hasInput && !e.hasOutput ? null : [/* @__PURE__ */ w(O, {
|
|
3080
3116
|
id: ar,
|
|
3081
|
-
position:
|
|
3117
|
+
position: k.Left,
|
|
3082
3118
|
type: "target"
|
|
3083
|
-
}, "target"), /* @__PURE__ */
|
|
3119
|
+
}, "target"), /* @__PURE__ */ w(O, {
|
|
3084
3120
|
id: or,
|
|
3085
|
-
position:
|
|
3121
|
+
position: k.Right,
|
|
3086
3122
|
type: "source"
|
|
3087
3123
|
}, "source")];
|
|
3088
3124
|
}
|
|
3089
|
-
function
|
|
3090
|
-
let s =
|
|
3125
|
+
function zr(e, t, n, r, i, a, o) {
|
|
3126
|
+
let s = Z(e);
|
|
3091
3127
|
return {
|
|
3092
3128
|
data: {
|
|
3093
|
-
approverLines:
|
|
3094
|
-
approverSummary:
|
|
3095
|
-
hasInput:
|
|
3096
|
-
hasOutput:
|
|
3097
|
-
initiatorPolicySummary: e.type === "startEvent" ?
|
|
3129
|
+
approverLines: oa(e, t, n, r, o),
|
|
3130
|
+
approverSummary: ia(e, t, n, r, o),
|
|
3131
|
+
hasInput: ji(e),
|
|
3132
|
+
hasOutput: Mi(e),
|
|
3133
|
+
initiatorPolicySummary: e.type === "startEvent" ? Ei(a, n, r) : null,
|
|
3098
3134
|
label: e.data.label,
|
|
3099
3135
|
nodeKind: e.type
|
|
3100
3136
|
},
|
|
3101
3137
|
height: s.height,
|
|
3102
|
-
handles:
|
|
3138
|
+
handles: Br(e),
|
|
3103
3139
|
id: e.id,
|
|
3104
3140
|
initialHeight: s.height,
|
|
3105
3141
|
initialWidth: s.width,
|
|
3106
3142
|
position: e.position,
|
|
3107
3143
|
selected: i,
|
|
3108
|
-
sourcePosition:
|
|
3109
|
-
targetPosition:
|
|
3144
|
+
sourcePosition: k.Right,
|
|
3145
|
+
targetPosition: k.Left,
|
|
3110
3146
|
type: e.type,
|
|
3111
3147
|
width: s.width
|
|
3112
3148
|
};
|
|
3113
3149
|
}
|
|
3114
|
-
function
|
|
3150
|
+
function Z(e) {
|
|
3115
3151
|
return e.type === "exclusiveGateway" || e.type === "parallelGateway" ? {
|
|
3116
|
-
height:
|
|
3117
|
-
width:
|
|
3152
|
+
height: X,
|
|
3153
|
+
width: Xn
|
|
3118
3154
|
} : e.type === "serviceTask" ? {
|
|
3119
|
-
height:
|
|
3120
|
-
width:
|
|
3155
|
+
height: Y + (sa(e.data.action) - 1) * Yn,
|
|
3156
|
+
width: Jn
|
|
3121
3157
|
} : {
|
|
3122
|
-
height:
|
|
3123
|
-
width:
|
|
3158
|
+
height: Y,
|
|
3159
|
+
width: Jn
|
|
3124
3160
|
};
|
|
3125
3161
|
}
|
|
3126
|
-
function
|
|
3127
|
-
let t =
|
|
3128
|
-
return [...
|
|
3162
|
+
function Br(e) {
|
|
3163
|
+
let t = Z(e);
|
|
3164
|
+
return [...ji(e) ? [Vr(t)] : [], ...Mi(e) ? [Q(t)] : []];
|
|
3129
3165
|
}
|
|
3130
|
-
function
|
|
3166
|
+
function Vr({ height: e }) {
|
|
3131
3167
|
let t = e / 2 - 9 / 2;
|
|
3132
3168
|
return {
|
|
3133
3169
|
height: 9,
|
|
3134
3170
|
id: ar,
|
|
3135
|
-
position:
|
|
3171
|
+
position: k.Left,
|
|
3136
3172
|
type: "target",
|
|
3137
3173
|
width: 9,
|
|
3138
3174
|
x: -9 / 2,
|
|
3139
3175
|
y: t
|
|
3140
3176
|
};
|
|
3141
3177
|
}
|
|
3142
|
-
function
|
|
3178
|
+
function Q({ height: e, width: t }) {
|
|
3143
3179
|
let n = e / 2 - 9 / 2;
|
|
3144
3180
|
return {
|
|
3145
3181
|
height: 9,
|
|
3146
3182
|
id: or,
|
|
3147
|
-
position:
|
|
3183
|
+
position: k.Right,
|
|
3148
3184
|
type: "source",
|
|
3149
3185
|
width: 9,
|
|
3150
3186
|
x: t - 9 / 2,
|
|
3151
3187
|
y: n
|
|
3152
3188
|
};
|
|
3153
3189
|
}
|
|
3154
|
-
function
|
|
3155
|
-
let r =
|
|
3190
|
+
function Hr(e, t, n) {
|
|
3191
|
+
let r = ya(e, t), i = xa(e, t), a = i && !e.data.isDefault && !e.data.condition, o = a ? Ln : i ? G : "#475569", s = a ? "#fef2f2" : i ? "#eff6ff" : "#ffffff", c = a ? Ln : i ? G : In;
|
|
3156
3192
|
return {
|
|
3157
3193
|
className: n ? "workflow-edge--selected" : void 0,
|
|
3158
3194
|
data: e.data,
|
|
@@ -3175,9 +3211,9 @@ function Br(e, t, n) {
|
|
|
3175
3211
|
source: e.source,
|
|
3176
3212
|
sourceHandle: e.sourceHandle,
|
|
3177
3213
|
style: {
|
|
3178
|
-
filter: n ?
|
|
3214
|
+
filter: n ? Rn : void 0,
|
|
3179
3215
|
opacity: 1,
|
|
3180
|
-
stroke:
|
|
3216
|
+
stroke: In,
|
|
3181
3217
|
strokeOpacity: 1,
|
|
3182
3218
|
strokeWidth: 1.5
|
|
3183
3219
|
},
|
|
@@ -3186,7 +3222,7 @@ function Br(e, t, n) {
|
|
|
3186
3222
|
type: e.type ?? "smoothstep"
|
|
3187
3223
|
};
|
|
3188
3224
|
}
|
|
3189
|
-
function
|
|
3225
|
+
function Ur(e, t) {
|
|
3190
3226
|
return e.type === "startEvent" ? e : (e.type === "endEvent" || e.type === "userTask" || e.type === "serviceTask" || e.type, {
|
|
3191
3227
|
...e,
|
|
3192
3228
|
data: {
|
|
@@ -3195,10 +3231,10 @@ function Q(e, t) {
|
|
|
3195
3231
|
}
|
|
3196
3232
|
});
|
|
3197
3233
|
}
|
|
3198
|
-
function
|
|
3199
|
-
return
|
|
3234
|
+
function Wr(e) {
|
|
3235
|
+
return Jr(Kr(qr(Gr(e))));
|
|
3200
3236
|
}
|
|
3201
|
-
function
|
|
3237
|
+
function Gr(e) {
|
|
3202
3238
|
let t = e.edges.map((e) => {
|
|
3203
3239
|
let t = e.data ?? {};
|
|
3204
3240
|
return e.data === t ? e : {
|
|
@@ -3211,7 +3247,7 @@ function Hr(e) {
|
|
|
3211
3247
|
edges: t
|
|
3212
3248
|
} : e;
|
|
3213
3249
|
}
|
|
3214
|
-
function
|
|
3250
|
+
function Kr(e) {
|
|
3215
3251
|
let t = e.nodes.map((e) => {
|
|
3216
3252
|
if (e.type !== "userTask") return e;
|
|
3217
3253
|
let t = e.data.allowAddSigner ?? !1, n = e.data.allowReject ?? !0, r = e.data.allowTransfer ?? !0, i = !e.data.decisionPolicy;
|
|
@@ -3231,24 +3267,24 @@ function Ur(e) {
|
|
|
3231
3267
|
nodes: t
|
|
3232
3268
|
} : e;
|
|
3233
3269
|
}
|
|
3234
|
-
function
|
|
3235
|
-
let t = new Set(e.nodes.filter((e) =>
|
|
3270
|
+
function qr(e) {
|
|
3271
|
+
let t = new Set(e.nodes.filter((e) => Ni(e)).map((e) => e.id)), n = e.edges.filter((e) => !t.has(e.source));
|
|
3236
3272
|
return n.length === e.edges.length ? e : {
|
|
3237
3273
|
...e,
|
|
3238
3274
|
edges: n
|
|
3239
3275
|
};
|
|
3240
3276
|
}
|
|
3241
|
-
function
|
|
3277
|
+
function Jr(e) {
|
|
3242
3278
|
let t = e.edges.reduce((e, t) => ({
|
|
3243
3279
|
...e,
|
|
3244
3280
|
[t.target]: (e[t.target] ?? 0) + 1
|
|
3245
|
-
}), {}), n = e.nodes.map((e) => e.type === "startEvent" ? e : (t[e.id] ?? 0) < 2 && e.data.triggerMode !== "AND" ?
|
|
3281
|
+
}), {}), n = e.nodes.map((e) => e.type === "startEvent" ? e : (t[e.id] ?? 0) < 2 && e.data.triggerMode !== "AND" ? Ur(e, "AND") : e);
|
|
3246
3282
|
return n.some((t, n) => t !== e.nodes[n]) ? {
|
|
3247
3283
|
...e,
|
|
3248
3284
|
nodes: n
|
|
3249
3285
|
} : e;
|
|
3250
3286
|
}
|
|
3251
|
-
function
|
|
3287
|
+
function Yr() {
|
|
3252
3288
|
return {
|
|
3253
3289
|
edges: [],
|
|
3254
3290
|
meta: { schemaVersion: 1 },
|
|
@@ -3275,16 +3311,16 @@ function Kr() {
|
|
|
3275
3311
|
}]
|
|
3276
3312
|
};
|
|
3277
3313
|
}
|
|
3278
|
-
function
|
|
3314
|
+
function Xr(e) {
|
|
3279
3315
|
return e.edges.length === 0 && e.nodes.length === 2 && e.nodes.some((e) => e.type === "startEvent") && e.nodes.some((e) => e.type === "endEvent");
|
|
3280
3316
|
}
|
|
3281
|
-
function
|
|
3317
|
+
function Zr(e) {
|
|
3282
3318
|
let t = new Re.graphlib.Graph();
|
|
3283
3319
|
return t.setDefaultEdgeLabel(() => ({})), t.setGraph({
|
|
3284
3320
|
rankdir: "LR",
|
|
3285
3321
|
ranksep: 120
|
|
3286
3322
|
}), e.nodes.forEach((e) => {
|
|
3287
|
-
t.setNode(e.id,
|
|
3323
|
+
t.setNode(e.id, Z(e));
|
|
3288
3324
|
}), e.edges.forEach((e) => {
|
|
3289
3325
|
t.setEdge(e.source, e.target);
|
|
3290
3326
|
}), Re.layout(t), {
|
|
@@ -3294,8 +3330,8 @@ function Jr(e) {
|
|
|
3294
3330
|
return n ? {
|
|
3295
3331
|
...e,
|
|
3296
3332
|
position: {
|
|
3297
|
-
x: n.x -
|
|
3298
|
-
y: n.y -
|
|
3333
|
+
x: n.x - Z(e).width / 2,
|
|
3334
|
+
y: n.y - Z(e).height / 2
|
|
3299
3335
|
}
|
|
3300
3336
|
} : e;
|
|
3301
3337
|
})
|
|
@@ -3304,51 +3340,51 @@ function Jr(e) {
|
|
|
3304
3340
|
function $(e, t) {
|
|
3305
3341
|
return t ? e.find((e) => e.id === t) ?? null : null;
|
|
3306
3342
|
}
|
|
3307
|
-
function
|
|
3343
|
+
function Qr(e) {
|
|
3308
3344
|
return e === "OR" ? "OR" : "AND";
|
|
3309
3345
|
}
|
|
3310
|
-
function
|
|
3346
|
+
function $r(e) {
|
|
3311
3347
|
return e === "FROM_RETURN_POINT" ? "FROM_RETURN_POINT" : "RESTART";
|
|
3312
3348
|
}
|
|
3313
|
-
function
|
|
3349
|
+
function ei(e) {
|
|
3314
3350
|
return e?.type ?? "SINGLE";
|
|
3315
3351
|
}
|
|
3316
|
-
function
|
|
3352
|
+
function ti(e, t) {
|
|
3317
3353
|
return e === "QUORUM" ? t?.type === "QUORUM" ? t : {
|
|
3318
|
-
threshold:
|
|
3354
|
+
threshold: A,
|
|
3319
3355
|
thresholdType: "COUNT",
|
|
3320
3356
|
type: "QUORUM"
|
|
3321
3357
|
} : e === "PARALLEL_ALL" || e === "PARALLEL_ANY" || e === "SEQUENTIAL" ? { type: e } : { type: "SINGLE" };
|
|
3322
3358
|
}
|
|
3323
|
-
function
|
|
3359
|
+
function ni(e) {
|
|
3324
3360
|
return e?.type === "QUORUM" ? {
|
|
3325
|
-
threshold: Number.isFinite(e.threshold) ? e.threshold :
|
|
3326
|
-
thresholdType:
|
|
3361
|
+
threshold: Number.isFinite(e.threshold) ? e.threshold : A,
|
|
3362
|
+
thresholdType: ri(e.thresholdType ?? null)
|
|
3327
3363
|
} : {
|
|
3328
|
-
threshold:
|
|
3364
|
+
threshold: A,
|
|
3329
3365
|
thresholdType: "COUNT"
|
|
3330
3366
|
};
|
|
3331
3367
|
}
|
|
3332
|
-
function
|
|
3368
|
+
function ri(e) {
|
|
3333
3369
|
return e === "PERCENTAGE" ? "PERCENTAGE" : "COUNT";
|
|
3334
3370
|
}
|
|
3335
|
-
function
|
|
3371
|
+
function ii(e) {
|
|
3336
3372
|
return e === "HOUR" ? "HOUR" : "DAY";
|
|
3337
3373
|
}
|
|
3338
|
-
function
|
|
3374
|
+
function ai(e) {
|
|
3339
3375
|
return e === "BUSINESS_DAY" ? "BUSINESS_DAY" : "CALENDAR";
|
|
3340
3376
|
}
|
|
3341
|
-
function
|
|
3377
|
+
function oi(e) {
|
|
3342
3378
|
return et.find((t) => t.id === e)?.id ?? "REMIND";
|
|
3343
3379
|
}
|
|
3344
|
-
function
|
|
3380
|
+
function si(e) {
|
|
3345
3381
|
return fr.find((t) => t.value === e) ?? fr[0];
|
|
3346
3382
|
}
|
|
3347
|
-
function
|
|
3383
|
+
function ci(e) {
|
|
3348
3384
|
return fr.find((t) => t.id === e) ?? fr[0];
|
|
3349
3385
|
}
|
|
3350
|
-
function
|
|
3351
|
-
let n = Number.isFinite(t.value) ? Math.trunc(t.value) : 1, r =
|
|
3386
|
+
function li(e, t) {
|
|
3387
|
+
let n = Number.isFinite(t.value) ? Math.trunc(t.value) : 1, r = N({
|
|
3352
3388
|
unit: t.unit,
|
|
3353
3389
|
value: n
|
|
3354
3390
|
});
|
|
@@ -3358,30 +3394,30 @@ function oi(e, t) {
|
|
|
3358
3394
|
duration: r
|
|
3359
3395
|
};
|
|
3360
3396
|
}
|
|
3361
|
-
function
|
|
3397
|
+
function ui(e, t) {
|
|
3362
3398
|
return t === "ESCALATE" ? {
|
|
3363
3399
|
...e,
|
|
3364
3400
|
escalateLevelsUp: e.escalateLevelsUp ?? 1,
|
|
3365
3401
|
onTimeout: t
|
|
3366
3402
|
} : {
|
|
3367
|
-
...
|
|
3403
|
+
...fi(e, "escalateLevelsUp"),
|
|
3368
3404
|
onTimeout: t
|
|
3369
3405
|
};
|
|
3370
3406
|
}
|
|
3371
|
-
function
|
|
3372
|
-
return t === null ?
|
|
3407
|
+
function di(e, t) {
|
|
3408
|
+
return t === null ? fi(e, "warningAt") : {
|
|
3373
3409
|
...e,
|
|
3374
3410
|
warningAt: t
|
|
3375
3411
|
};
|
|
3376
3412
|
}
|
|
3377
|
-
function
|
|
3413
|
+
function fi(e, t) {
|
|
3378
3414
|
return Object.fromEntries(Object.entries(e).filter(([e]) => e !== t));
|
|
3379
3415
|
}
|
|
3380
|
-
function
|
|
3416
|
+
function pi(e) {
|
|
3381
3417
|
return e === "DYNAMIC_FORM" || e === "ORG_MANAGER" || e === "ORG_MANAGER_CHAIN" || e === "ORG_UNIT_MANAGER" || e === "ORG_UNIT_MEMBER" || e === "ORG_UNIT_POSITION" || e === "POSITION" ? e : "DIRECT";
|
|
3382
3418
|
}
|
|
3383
|
-
function
|
|
3384
|
-
let n =
|
|
3419
|
+
function mi(e, t) {
|
|
3420
|
+
let n = pi(e ?? "DIRECT");
|
|
3385
3421
|
return n === "DYNAMIC_FORM" ? {
|
|
3386
3422
|
formPath: "",
|
|
3387
3423
|
type: "DYNAMIC_FORM"
|
|
@@ -3390,7 +3426,7 @@ function di(e, t) {
|
|
|
3390
3426
|
levelsUp: 1,
|
|
3391
3427
|
type: "ORG_MANAGER"
|
|
3392
3428
|
} : n === "ORG_MANAGER_CHAIN" ? {
|
|
3393
|
-
minPositionLevel:
|
|
3429
|
+
minPositionLevel: R(t),
|
|
3394
3430
|
type: "ORG_MANAGER_CHAIN"
|
|
3395
3431
|
} : n === "ORG_UNIT_MANAGER" ? {
|
|
3396
3432
|
orgUnitId: "",
|
|
@@ -3412,31 +3448,41 @@ function di(e, t) {
|
|
|
3412
3448
|
type: "DIRECT"
|
|
3413
3449
|
};
|
|
3414
3450
|
}
|
|
3415
|
-
function
|
|
3416
|
-
return e === "DIRECT"
|
|
3451
|
+
function hi(e) {
|
|
3452
|
+
return e === "DIRECT" || e === "POSITION" ? e : "NONE";
|
|
3453
|
+
}
|
|
3454
|
+
function gi(e) {
|
|
3455
|
+
let t = hi(e);
|
|
3456
|
+
return t === "DIRECT" ? {
|
|
3457
|
+
memberId: "",
|
|
3458
|
+
type: "DIRECT"
|
|
3459
|
+
} : t === "POSITION" ? {
|
|
3460
|
+
positionId: "",
|
|
3461
|
+
type: "POSITION"
|
|
3462
|
+
} : { type: "NONE" };
|
|
3417
3463
|
}
|
|
3418
|
-
function
|
|
3464
|
+
function _i(e, t) {
|
|
3419
3465
|
return e.type === "ORG_MANAGER" || e.type === "ORG_MANAGER_CHAIN" || e.type === "ORG_UNIT_MANAGER" ? {
|
|
3420
3466
|
...e,
|
|
3421
3467
|
fallback: t
|
|
3422
3468
|
} : e;
|
|
3423
3469
|
}
|
|
3424
|
-
function
|
|
3425
|
-
return
|
|
3470
|
+
function vi(e) {
|
|
3471
|
+
return hr.find((t) => t.value === e) ?? hr[0];
|
|
3426
3472
|
}
|
|
3427
|
-
function
|
|
3428
|
-
return
|
|
3473
|
+
function yi(e) {
|
|
3474
|
+
return hr.find((t) => t.id === e) ?? hr[0];
|
|
3429
3475
|
}
|
|
3430
|
-
function
|
|
3476
|
+
function bi(e) {
|
|
3431
3477
|
return e === "ORG_UNIT" || e === "ORG_UNIT_POSITION" || e === "NONE" ? e : "ALL";
|
|
3432
3478
|
}
|
|
3433
|
-
function
|
|
3479
|
+
function xi(e) {
|
|
3434
3480
|
let t = e?.trim();
|
|
3435
3481
|
if (!t) return {
|
|
3436
3482
|
mode: "ALL",
|
|
3437
3483
|
value: ""
|
|
3438
3484
|
};
|
|
3439
|
-
let n =
|
|
3485
|
+
let n = wi(t, /"([^"]+)" in subject\.orgUnitIds/gu), r = wi(t, /"([^"]+)" in subject\.positionIds/gu);
|
|
3440
3486
|
return n.length > 0 && r.length > 0 ? {
|
|
3441
3487
|
includeDescendants: n.length > 1,
|
|
3442
3488
|
mode: "ORG_UNIT_POSITION",
|
|
@@ -3453,32 +3499,32 @@ function _i(e) {
|
|
|
3453
3499
|
value: t
|
|
3454
3500
|
};
|
|
3455
3501
|
}
|
|
3456
|
-
function
|
|
3457
|
-
let n =
|
|
3502
|
+
function Si(e, t) {
|
|
3503
|
+
let n = xi(e);
|
|
3458
3504
|
return !t || t === "ALL" || t === "NONE" ? t === "ALL" || t === "NONE" ? {
|
|
3459
3505
|
mode: t,
|
|
3460
3506
|
value: ""
|
|
3461
|
-
} : n : n.mode === t ? n :
|
|
3507
|
+
} : n : n.mode === t ? n : Di(t);
|
|
3462
3508
|
}
|
|
3463
|
-
function
|
|
3509
|
+
function Ci(e) {
|
|
3464
3510
|
return e.mode === "NONE" ? "發起權限需要選擇誰可以發起。" : (e.mode === "ORG_UNIT" || e.mode === "ORG_UNIT_POSITION") && !e.orgUnitId?.trim() ? "指定組織發起時,需要選擇組織。" : e.mode === "ORG_UNIT_POSITION" && !e.positionId?.trim() ? "指定組織職位發起時,需要選擇職位。" : null;
|
|
3465
3511
|
}
|
|
3466
|
-
function
|
|
3512
|
+
function wi(e, t) {
|
|
3467
3513
|
return [...e.matchAll(t)].map((e) => e[1]).filter((e) => !!e);
|
|
3468
3514
|
}
|
|
3469
|
-
function
|
|
3515
|
+
function Ti(e, t) {
|
|
3470
3516
|
if (e.mode === "ALL" || e.mode === "NONE") return null;
|
|
3471
3517
|
let n = e.orgUnitId?.trim() ?? "";
|
|
3472
3518
|
if (!n) return null;
|
|
3473
|
-
let r =
|
|
3519
|
+
let r = ea(t, n, !!e.includeDescendants).map((e) => `${JSON.stringify(e)} in subject.orgUnitIds`).join(" || ");
|
|
3474
3520
|
if (e.mode === "ORG_UNIT") return r ? `(${r})` : null;
|
|
3475
3521
|
let i = e.positionId?.trim() ?? "";
|
|
3476
3522
|
return i && r ? `(${r}) && ${JSON.stringify(i)} in subject.positionIds` : null;
|
|
3477
3523
|
}
|
|
3478
|
-
function
|
|
3479
|
-
return e.mode === "NONE" ? "未設定" : e.mode === "ORG_UNIT" ? e.orgUnitId ? `組織:${
|
|
3524
|
+
function Ei(e, t, n) {
|
|
3525
|
+
return e.mode === "NONE" ? "未設定" : e.mode === "ORG_UNIT" ? e.orgUnitId ? `組織:${Ki(t, e.orgUnitId)}` : "指定組織" : e.mode === "ORG_UNIT_POSITION" ? e.orgUnitId && e.positionId ? `組織職位:${Ki(t, e.orgUnitId)} / ${qi(n, e.positionId)}` : "指定組織職位" : e.mode === "CUSTOM" ? "既有自訂規則" : "所有人";
|
|
3480
3526
|
}
|
|
3481
|
-
function
|
|
3527
|
+
function Di(e) {
|
|
3482
3528
|
return {
|
|
3483
3529
|
includeDescendants: !0,
|
|
3484
3530
|
mode: e,
|
|
@@ -3487,64 +3533,64 @@ function Ci(e) {
|
|
|
3487
3533
|
value: ""
|
|
3488
3534
|
};
|
|
3489
3535
|
}
|
|
3490
|
-
function
|
|
3536
|
+
function Oi(e, t) {
|
|
3491
3537
|
let n = e.source ? t.find((t) => t.id === e.source) ?? null : null, r = e.target ? t.find((t) => t.id === e.target) ?? null : null;
|
|
3492
|
-
return !!n && !!r && e.source !== e.target && e.sourceHandle === or && e.targetHandle === ar && !!(n &&
|
|
3538
|
+
return !!n && !!r && e.source !== e.target && e.sourceHandle === or && e.targetHandle === ar && !!(n && Mi(n)) && !!(r && ji(r));
|
|
3493
3539
|
}
|
|
3494
|
-
function
|
|
3540
|
+
function ki(e, t) {
|
|
3495
3541
|
return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
|
|
3496
3542
|
}
|
|
3497
|
-
function
|
|
3543
|
+
function Ai(e) {
|
|
3498
3544
|
return e.type !== "startEvent" && e.type !== "endEvent";
|
|
3499
3545
|
}
|
|
3500
|
-
function
|
|
3546
|
+
function ji(e) {
|
|
3501
3547
|
return e.type !== "startEvent";
|
|
3502
3548
|
}
|
|
3503
|
-
function
|
|
3504
|
-
return e.type !== "endEvent" && !
|
|
3549
|
+
function Mi(e) {
|
|
3550
|
+
return e.type !== "endEvent" && !Ni(e);
|
|
3505
3551
|
}
|
|
3506
|
-
function
|
|
3552
|
+
function Ni(e) {
|
|
3507
3553
|
return e.type === "serviceTask" && e.data.action.type === "NOTIFY";
|
|
3508
3554
|
}
|
|
3509
|
-
function
|
|
3555
|
+
function Pi(e) {
|
|
3510
3556
|
return e instanceof HTMLElement ? e.isContentEditable || e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.tagName === "SELECT" || !!e.closest("[contenteditable=\"true\"]") : !1;
|
|
3511
3557
|
}
|
|
3512
|
-
function
|
|
3558
|
+
function Fi(e) {
|
|
3513
3559
|
return e.map((e) => ({
|
|
3514
3560
|
formDefinitionId: e.formDefinitionId,
|
|
3515
3561
|
formName: e.formName,
|
|
3516
3562
|
id: e.id,
|
|
3517
|
-
name:
|
|
3563
|
+
name: W(e.formName, e.version),
|
|
3518
3564
|
schema: e.schema
|
|
3519
3565
|
}));
|
|
3520
3566
|
}
|
|
3521
|
-
function
|
|
3567
|
+
function Ii(e) {
|
|
3522
3568
|
let t = JSON.parse(e);
|
|
3523
|
-
if (!
|
|
3569
|
+
if (!Li(t)) throw Error("表單資料 JSON 必須是物件。");
|
|
3524
3570
|
return t;
|
|
3525
3571
|
}
|
|
3526
|
-
function
|
|
3572
|
+
function Li(e) {
|
|
3527
3573
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
3528
3574
|
}
|
|
3529
|
-
function
|
|
3575
|
+
function Ri(e) {
|
|
3530
3576
|
return e === "COMPLETED" ? "完成" : e === "PASSED" ? "通過" : e === "SKIPPED" ? "略過" : e === "STOPPED" ? "已停止" : e === "WAITING" ? "將等待簽核" : e;
|
|
3531
3577
|
}
|
|
3532
|
-
function
|
|
3578
|
+
function zi(e) {
|
|
3533
3579
|
return e in sr ? sr[e] : e;
|
|
3534
3580
|
}
|
|
3535
|
-
function
|
|
3581
|
+
function Bi(e, t) {
|
|
3536
3582
|
return t && !e.some((e) => e.id === t.id) ? [t, ...e] : e;
|
|
3537
3583
|
}
|
|
3538
|
-
function
|
|
3584
|
+
function Vi(e) {
|
|
3539
3585
|
return e.map((e) => ({
|
|
3540
3586
|
displayName: e.name,
|
|
3541
3587
|
email: e.email,
|
|
3542
3588
|
id: e.memberId,
|
|
3543
3589
|
memberId: e.memberId,
|
|
3544
|
-
name:
|
|
3590
|
+
name: ua(e.name, e.email)
|
|
3545
3591
|
}));
|
|
3546
3592
|
}
|
|
3547
|
-
function
|
|
3593
|
+
function Hi(e) {
|
|
3548
3594
|
return {
|
|
3549
3595
|
displayName: "未知會員",
|
|
3550
3596
|
email: "",
|
|
@@ -3554,101 +3600,101 @@ function Ri(e) {
|
|
|
3554
3600
|
unresolved: !0
|
|
3555
3601
|
};
|
|
3556
3602
|
}
|
|
3557
|
-
function
|
|
3558
|
-
return e.find((e) => e.memberId === t) ??
|
|
3603
|
+
function Ui(e, t) {
|
|
3604
|
+
return e.find((e) => e.memberId === t) ?? Hi(t);
|
|
3559
3605
|
}
|
|
3560
|
-
function
|
|
3606
|
+
function Wi(e, t) {
|
|
3561
3607
|
let n = e.find((e) => e.id === t);
|
|
3562
|
-
return n ?
|
|
3608
|
+
return n ? i(n) : null;
|
|
3563
3609
|
}
|
|
3564
|
-
function
|
|
3610
|
+
function Gi(e, t) {
|
|
3565
3611
|
let n = e.find((e) => e.id === t);
|
|
3566
|
-
return n ?
|
|
3612
|
+
return n ? o(n) : null;
|
|
3567
3613
|
}
|
|
3568
|
-
function
|
|
3569
|
-
return
|
|
3614
|
+
function Ki(e, t) {
|
|
3615
|
+
return Wi(e, t)?.name ?? "未指定組織";
|
|
3570
3616
|
}
|
|
3571
|
-
function
|
|
3572
|
-
return
|
|
3617
|
+
function qi(e, t) {
|
|
3618
|
+
return Gi(e, t)?.name ?? "未指定職位";
|
|
3573
3619
|
}
|
|
3574
|
-
function
|
|
3575
|
-
let n =
|
|
3620
|
+
function Ji(e, t) {
|
|
3621
|
+
let n = Yi(), r = t.filter((t) => t.memberId === e && Xi(t, n)), i = r.reduce((e, t) => e && Zi(e, t) <= 0 ? e : t, null);
|
|
3576
3622
|
return {
|
|
3577
3623
|
customFields: {},
|
|
3578
3624
|
managerMemberId: "member-002",
|
|
3579
3625
|
memberId: e,
|
|
3580
3626
|
orgCode: "HQ",
|
|
3581
|
-
orgUnitIds:
|
|
3627
|
+
orgUnitIds: Qi(r.map((e) => e.orgUnitId)),
|
|
3582
3628
|
positionId: i?.positionId ?? null,
|
|
3583
|
-
positionIds:
|
|
3629
|
+
positionIds: Qi(r.map((e) => e.positionId)),
|
|
3584
3630
|
primaryOrgUnitId: i?.orgUnitId ?? null,
|
|
3585
3631
|
roles: ["manager"]
|
|
3586
3632
|
};
|
|
3587
3633
|
}
|
|
3588
|
-
function
|
|
3634
|
+
function Yi() {
|
|
3589
3635
|
return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
3590
3636
|
}
|
|
3591
|
-
function
|
|
3637
|
+
function Xi(e, t) {
|
|
3592
3638
|
return e.effectiveFrom <= t && (!e.effectiveTo || e.effectiveTo >= t);
|
|
3593
3639
|
}
|
|
3594
|
-
function
|
|
3640
|
+
function Zi(e, t) {
|
|
3595
3641
|
return e.isPrimary === t.isPrimary ? t.effectiveFrom.localeCompare(e.effectiveFrom) : e.isPrimary ? -1 : 1;
|
|
3596
3642
|
}
|
|
3597
|
-
function
|
|
3643
|
+
function Qi(e) {
|
|
3598
3644
|
return e.reduce((e, t) => t && !e.includes(t) ? [...e, t] : e, []);
|
|
3599
3645
|
}
|
|
3600
|
-
function
|
|
3601
|
-
let a = new Set(
|
|
3646
|
+
function $i({ includeDescendants: e, memberships: t, orgUnitId: n, orgUnits: r, positions: i }) {
|
|
3647
|
+
let a = new Set(ea(r, n, e)), o = new Set(t.filter((e) => a.has(e.orgUnitId)).map((e) => e.positionId).filter((e) => !!e));
|
|
3602
3648
|
return i.filter((e) => o.has(e.id));
|
|
3603
3649
|
}
|
|
3604
|
-
function
|
|
3650
|
+
function ea(e, t, n) {
|
|
3605
3651
|
let r = e.find((e) => e.id === t);
|
|
3606
3652
|
return r ? n ? e.filter((e) => e.id === r.id || e.path.startsWith(`${r.path}.`)).map((e) => e.id) : [r.id] : t.trim() ? [t] : [];
|
|
3607
3653
|
}
|
|
3608
|
-
function
|
|
3654
|
+
function ta(e, t) {
|
|
3609
3655
|
let n = new Map(t.filter((e) => !e.unresolved).map((e) => [e.memberId, e])), r = new Set(e.map((e) => e.memberId)), i = t.filter((e) => !r.has(e.memberId)), a = e.map((e) => (e.unresolved ? n.get(e.memberId) : null) ?? e);
|
|
3610
3656
|
return i.length > 0 || a.some((t, n) => t !== e[n]) ? [...a, ...i] : e;
|
|
3611
3657
|
}
|
|
3612
|
-
function
|
|
3658
|
+
function na(e) {
|
|
3613
3659
|
return e.type === "DIRECT" ? e.memberIds : (e.type === "ORG_MANAGER" || e.type === "ORG_MANAGER_CHAIN" || e.type === "ORG_UNIT_MANAGER") && e.fallback?.type === "DIRECT" && e.fallback.memberId ? [e.fallback.memberId] : [];
|
|
3614
3660
|
}
|
|
3615
|
-
function
|
|
3616
|
-
return [...new Set(e.nodes.flatMap((e) => e.type === "userTask" ?
|
|
3661
|
+
function ra(e) {
|
|
3662
|
+
return [...new Set(e.nodes.flatMap((e) => e.type === "userTask" ? na(e.data.approverResolver) : e.type === "serviceTask" ? Ca(e.data.action) : []))];
|
|
3617
3663
|
}
|
|
3618
|
-
function
|
|
3619
|
-
return e.type === "userTask" ?
|
|
3664
|
+
function ia(e, t, n, r, i) {
|
|
3665
|
+
return e.type === "userTask" ? aa(e.data.approverResolver, t, n, r, i) : null;
|
|
3620
3666
|
}
|
|
3621
|
-
function
|
|
3622
|
-
return e.type === "DIRECT" ?
|
|
3667
|
+
function aa(e, t, n, r, i) {
|
|
3668
|
+
return e.type === "DIRECT" ? la(e.memberIds, t, "未指定簽核者") : e.type === "ORG_MANAGER" ? vi(e.levelsUp).name : e.type === "ORG_MANAGER_CHAIN" ? `主管鏈:簽到職等 ${e.minPositionLevel}` : e.type === "ORG_UNIT_MANAGER" ? `組織主管:${Ki(n, e.orgUnitId)}` : e.type === "ORG_UNIT_MEMBER" ? `組織任一人:${Ki(n, e.orgUnitId)}` : e.type === "ORG_UNIT_POSITION" ? `組織職位:${Ki(n, e.orgUnitId)} / ${qi(r, e.positionId)}` : e.type === "POSITION" ? `職位:${qi(r, e.positionId)}` : e.type === "DYNAMIC_FORM" ? En(i, e.formPath) : "自訂表達式";
|
|
3623
3669
|
}
|
|
3624
|
-
function
|
|
3670
|
+
function oa(e, t, n, r, i) {
|
|
3625
3671
|
if (e.type !== "serviceTask") return null;
|
|
3626
|
-
let a = e.data.action, o = a.type === "NOTIFY" && a.recipients.type !== "DIRECT" ? [
|
|
3672
|
+
let a = e.data.action, o = a.type === "NOTIFY" && a.recipients.type !== "DIRECT" ? [aa(a.recipients, t, n, r, i)] : Ca(a).map((e) => Ui(t, e).name), s = ht(a).length, c = [...o, ...s ? [`Webhook ${s} 個`] : []];
|
|
3627
3673
|
return c.length ? c : ["未指定知會對象"];
|
|
3628
3674
|
}
|
|
3629
|
-
function
|
|
3630
|
-
let t = e.type === "NOTIFY" && e.recipients.type !== "DIRECT" ? 1 :
|
|
3675
|
+
function sa(e) {
|
|
3676
|
+
let t = e.type === "NOTIFY" && e.recipients.type !== "DIRECT" ? 1 : Ca(e).length, n = +!!ht(e).length;
|
|
3631
3677
|
return Math.max(1, t + n);
|
|
3632
3678
|
}
|
|
3633
|
-
function
|
|
3679
|
+
function ca(e, t, n) {
|
|
3634
3680
|
let r = e.nodes.find((e) => e.id === t);
|
|
3635
|
-
return r?.type === "serviceTask" && r.data.action.type === "NOTIFY" && Jt(r.data.action.webhooks) ?
|
|
3681
|
+
return r?.type === "serviceTask" && r.data.action.type === "NOTIFY" && Jt(r.data.action.webhooks) ? ht(r.data.action).map((e) => ({
|
|
3636
3682
|
key: e.id,
|
|
3637
|
-
label: Ht(n, e.endpoint)?.label ??
|
|
3683
|
+
label: Ht(n, e.endpoint)?.label ?? B(e.endpoint)
|
|
3638
3684
|
})) : [];
|
|
3639
3685
|
}
|
|
3640
|
-
function
|
|
3641
|
-
let r = e.map((e) =>
|
|
3686
|
+
function la(e, t, n) {
|
|
3687
|
+
let r = e.map((e) => Ui(t, e).name);
|
|
3642
3688
|
return r.length === 0 ? n : r.length <= 2 ? r.join("、") : `${r.slice(0, 2).join("、")} 等 ${r.length} 人`;
|
|
3643
3689
|
}
|
|
3644
|
-
function
|
|
3645
|
-
return
|
|
3690
|
+
function ua(e, t) {
|
|
3691
|
+
return r(e, t);
|
|
3646
3692
|
}
|
|
3647
|
-
function
|
|
3693
|
+
function da(e, t) {
|
|
3648
3694
|
let n = t?.getBoundingClientRect();
|
|
3649
3695
|
if (!n || e.nodes.length === 0) return null;
|
|
3650
3696
|
let r = e.nodes.reduce((e, t) => {
|
|
3651
|
-
let n =
|
|
3697
|
+
let n = Z(t);
|
|
3652
3698
|
return {
|
|
3653
3699
|
maxX: Math.max(e.maxX, t.position.x + n.width),
|
|
3654
3700
|
maxY: Math.max(e.maxY, t.position.y + n.height),
|
|
@@ -3668,64 +3714,64 @@ function sa(e, t) {
|
|
|
3668
3714
|
y: r.minY
|
|
3669
3715
|
}, n.width, n.height, .1, 1, .2);
|
|
3670
3716
|
}
|
|
3671
|
-
function
|
|
3672
|
-
let t = e.nodes.find((e) => e.type === "userTask" && !!
|
|
3673
|
-
return t && t.type === "userTask" ?
|
|
3717
|
+
function fa(e) {
|
|
3718
|
+
let t = e.nodes.find((e) => e.type === "userTask" && !!st(e.data.approverResolver)), n = e.nodes.find((e) => e.type === "userTask" && !!ut(e.data.excludeInitiator)), r = e.nodes.map((e) => dt(e)).find((e) => e !== null) ?? null, i = e.edges.find((t) => xa(t, e.nodes) && !t.data.isDefault && !t.data.condition), a = e.nodes.find((e) => e.type === "userTask" && ot(e.data.approverResolver, e.data.decisionPolicy));
|
|
3719
|
+
return t && t.type === "userTask" ? st(t.data.approverResolver) : a && a.type === "userTask" ? `簽核節點「${a.data.label}」使用「沿主管鏈簽核」時,決策方式必須是「依序簽核或全部同意」,否則任一位主管簽完就會結案。` : n && n.type === "userTask" ? ut(n.data.excludeInitiator) : r || (i ? "條件分流的每條輸出連線都需要先設定條件。" : null);
|
|
3674
3720
|
}
|
|
3675
|
-
function
|
|
3721
|
+
function pa(e) {
|
|
3676
3722
|
return e?.fields.map((e) => ({
|
|
3677
3723
|
fieldType: e.type,
|
|
3678
3724
|
id: e.fieldKey,
|
|
3679
3725
|
name: `${e.label} (${e.fieldKey})`
|
|
3680
3726
|
})) ?? [];
|
|
3681
3727
|
}
|
|
3682
|
-
function
|
|
3728
|
+
function ma(e, t) {
|
|
3683
3729
|
return t ? e?.fields.find((e) => e.fieldKey === t) ?? null : null;
|
|
3684
3730
|
}
|
|
3685
|
-
function
|
|
3731
|
+
function ha(e) {
|
|
3686
3732
|
if (!e) return [];
|
|
3687
|
-
let t =
|
|
3688
|
-
return
|
|
3733
|
+
let t = ct(e);
|
|
3734
|
+
return br.filter((e) => t.includes(e.id));
|
|
3689
3735
|
}
|
|
3690
|
-
function
|
|
3691
|
-
return
|
|
3736
|
+
function ga(e) {
|
|
3737
|
+
return br.some((t) => t.id === e) ? e : null;
|
|
3692
3738
|
}
|
|
3693
|
-
function
|
|
3739
|
+
function _a(e) {
|
|
3694
3740
|
return e ? e.type === "boolean" ? [{
|
|
3695
3741
|
id: "true",
|
|
3696
3742
|
name: "是"
|
|
3697
3743
|
}, {
|
|
3698
3744
|
id: "false",
|
|
3699
3745
|
name: "否"
|
|
3700
|
-
}] :
|
|
3746
|
+
}] : Ee(e) ? e.options.map((e) => ({
|
|
3701
3747
|
id: e.value,
|
|
3702
3748
|
name: e.label
|
|
3703
3749
|
})) : [] : [];
|
|
3704
3750
|
}
|
|
3705
|
-
function
|
|
3706
|
-
return
|
|
3751
|
+
function va(e) {
|
|
3752
|
+
return xr.includes(e);
|
|
3707
3753
|
}
|
|
3708
|
-
function
|
|
3754
|
+
function ya(e, t) {
|
|
3709
3755
|
if (e.data.label) return e.data.label;
|
|
3710
|
-
if (
|
|
3711
|
-
if (
|
|
3756
|
+
if (xa(e, t)) return ba(e);
|
|
3757
|
+
if (Sa(e, t)) return "同時進行";
|
|
3712
3758
|
}
|
|
3713
|
-
function
|
|
3759
|
+
function ba(e) {
|
|
3714
3760
|
return e.data.isDefault ? "其他情況" : "請設定條件";
|
|
3715
3761
|
}
|
|
3716
|
-
function
|
|
3762
|
+
function xa(e, t) {
|
|
3717
3763
|
return t.some((t) => t.id === e.source && t.type === "exclusiveGateway");
|
|
3718
3764
|
}
|
|
3719
|
-
function
|
|
3765
|
+
function Sa(e, t) {
|
|
3720
3766
|
return t.some((t) => t.id === e.source && t.type === "parallelGateway");
|
|
3721
3767
|
}
|
|
3722
|
-
function
|
|
3768
|
+
function Ca(e) {
|
|
3723
3769
|
return e.type === "NOTIFY" && e.recipients.type === "DIRECT" ? e.recipients.memberIds : [];
|
|
3724
3770
|
}
|
|
3725
|
-
function
|
|
3726
|
-
return e instanceof Error ? e.message.includes("WORKFLOW_WEBHOOK_") ? `Webhook 設定未通過發布檢查:${e.message}` :
|
|
3771
|
+
function wa(e) {
|
|
3772
|
+
return e instanceof Error ? e.message.includes("WORKFLOW_WEBHOOK_") ? `Webhook 設定未通過發布檢查:${e.message}` : Te(e.message) : "發生未知錯誤";
|
|
3727
3773
|
}
|
|
3728
3774
|
//#endregion
|
|
3729
|
-
export {
|
|
3775
|
+
export { Mr as t };
|
|
3730
3776
|
|
|
3731
|
-
//# sourceMappingURL=designer-
|
|
3777
|
+
//# sourceMappingURL=designer-D9eFma1W.js.map
|