lyflowchart 1.0.139 → 1.0.152

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/ActionsConfig-BrfcGMc2.js +521 -0
  2. package/dist/{ApprovalEditorModal-19j5zbe2.js → ApprovalEditorModal-HuU6SRJe.js} +1 -1
  3. package/dist/{Cell_click_approve-BGDZUzTS.js → Cell_click_approve-DiMuUB1k.js} +22 -20
  4. package/dist/{MyProcess-FWGEwQcv.js → MyProcess-C6fgOFiw.js} +1 -1
  5. package/dist/{approval-BW2WjPxY.js → approval-1GfOMaS4.js} +3 -3
  6. package/dist/{approval-BaD4Bmw6.js → approval-BlbNEsGQ.js} +1 -1
  7. package/dist/{approvalHistory-B2gpQbFC.js → approvalHistory-D-5rRWNw.js} +1 -1
  8. package/dist/{approvalPageConfig-D0zPXOUf.js → approvalPageConfig-4VU81v-x.js} +13 -13
  9. package/dist/{columnTables-DLwtgcC7.js → columnTables-DFwoawLF.js} +76 -69
  10. package/dist/components/approval/ApprovalEditorModal.vue.d.ts +2 -0
  11. package/dist/components/approval/components/approvalPageConfig/ActionsConfig.vue.d.ts +481 -0
  12. package/dist/components/approval/components/approvalPageConfig/leftColumn.vue.d.ts +1210 -0
  13. package/dist/components/approval/components/approvalPageConfig/middleColumn.vue.d.ts +605 -0
  14. package/dist/components/approval/components/approvalPageConfig/tableConfig.vue.d.ts +605 -0
  15. package/dist/components/approval/core.vue.d.ts +2 -0
  16. package/dist/components/approval/typing.d.ts +1 -1
  17. package/dist/components/approval/useApprovalRecordActions.d.ts +3 -1
  18. package/dist/constants.d.ts +26 -0
  19. package/dist/{core-Cv0Erg9E.js → core-BkpI8NUK.js} +355 -314
  20. package/dist/{debugCode-Cm9-WiUG.js → debugCode-CQm5weGM.js} +1 -1
  21. package/dist/{default-VdDMlY4e.js → default-kv1XZD9P.js} +28 -21
  22. package/dist/{example_code-C_xF8RRG.js → example_code-DKjqP7KK.js} +6 -0
  23. package/dist/index.js +18 -16
  24. package/dist/{leftColumn-CsPjufue.js → leftColumn-OrLOxcyw.js} +2 -2
  25. package/dist/lyflowchart.css +1 -1
  26. package/dist/{middleColumn-C7M6-eVo.js → middleColumn-DUBZPkDG.js} +2 -2
  27. package/dist/{recordActions-BgFlNsGU.js → recordActions-3vqHADOf.js} +1 -1
  28. package/dist/{tableConfig-uLXue-BS.js → tableConfig-W9yGeZs-.js} +41 -41
  29. package/dist/{tableModal-BcYfVL02.js → tableModal-H0SGP8PM.js} +2 -2
  30. package/dist/{useApprovalRecordActions-BQ6MgV2L.js → useApprovalRecordActions-B82xPY8g.js} +63 -63
  31. package/dist/{utils-CLet2gLV.js → utils-B1lkML14.js} +5 -1
  32. package/dist/{viewer-Dv3kQsMf.js → viewer-C_OHXXRU.js} +915 -916
  33. package/package.json +1 -1
  34. package/dist/ActionsConfig-BuvSvRbv.js +0 -395
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "lyflowchart",
3
3
  "type": "module",
4
4
  "license": "MIT",
5
- "version": "1.0.139",
5
+ "version": "1.0.152",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "scripts": {
@@ -1,395 +0,0 @@
1
- import { v as e } from "./init-plugin-fQTSQzui.js";
2
- import { o as t } from "./utils-CLet2gLV.js";
3
- import { t as n } from "./example_code-C_xF8RRG.js";
4
- import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, openBlock as f, ref as p, renderList as m, resolveComponent as h, toDisplayString as g, withCtx as _ } from "vue";
5
- import { Modal as v } from "ant-design-vue";
6
- //#region src/components/approval/components/approvalPageConfig/JsonText.vue?vue&type=script&lang.ts
7
- var y = d({
8
- name: "JsonTags",
9
- props: {
10
- value: {
11
- type: Object,
12
- required: !0
13
- },
14
- placeholder: {
15
- type: String,
16
- required: !1
17
- },
18
- rows: {
19
- type: Number,
20
- default: 3
21
- }
22
- },
23
- emits: ["update:value"],
24
- setup(e, { emit: t }) {
25
- return {
26
- _value: i(() => typeof e.value == "string" ? e.value : JSON.stringify(e.value)),
27
- handleChange: (e) => {
28
- let n = null;
29
- try {
30
- n = JSON.parse(e);
31
- } catch {
32
- n = e;
33
- }
34
- t("update:value", n);
35
- },
36
- valueType: i(() => typeof e.value)
37
- };
38
- }
39
- });
40
- //#endregion
41
- //#region src/components/approval/components/approvalPageConfig/JsonText.vue
42
- function b(e, t, n, i, a, o) {
43
- let c = h("a-textarea"), d = h("a-tag");
44
- return f(), s(r, null, [u(c, {
45
- value: e._value,
46
- placeholder: e.placeholder,
47
- rows: e.rows,
48
- "onUpdate:value": e.handleChange
49
- }, null, 8, [
50
- "value",
51
- "placeholder",
52
- "rows",
53
- "onUpdate:value"
54
- ]), u(d, null, {
55
- default: _(() => [l(g(e.valueType), 1)]),
56
- _: 1
57
- })], 64);
58
- }
59
- var x = /* @__PURE__ */ e(y, [["render", b], ["__scopeId", "data-v-43e40d82"]]), S = "click", C = d({
60
- name: "CodeEditorWraper",
61
- components: {},
62
- props: {
63
- value: {
64
- type: String,
65
- default: ""
66
- },
67
- editType: {
68
- type: String,
69
- default: ""
70
- },
71
- action: {
72
- type: String,
73
- default: ""
74
- }
75
- },
76
- emits: ["update:value"],
77
- setup(e, { emit: t }) {
78
- let r = p(!1), a = p("");
79
- return {
80
- update: (e) => {
81
- t("update:value", e);
82
- },
83
- isCodeVisible: r,
84
- exampleCode: a,
85
- filterExampleCodeList: i(() => n.filter((t) => e.editType === S ? t.types.includes(S) && t.actions.includes(e.action || null) : t.types.includes(e.editType))),
86
- handleAppendCode: () => {
87
- a.value && t("update:value", `${e.value || ""}\n${a.value}`);
88
- },
89
- handleReplaceCode: () => {
90
- a.value && (e.value ? v.confirm({
91
- title: "提示",
92
- content: "是否确认要替换现有代码",
93
- onOk() {
94
- t("update:value", a.value);
95
- },
96
- onCancel() {}
97
- }) : t("update:value", a.value));
98
- }
99
- };
100
- }
101
- }), w = { key: 0 };
102
- function T(e, t, n, i, d, p) {
103
- let v = h("a-button"), y = h("a-tooltip"), b = h("a-select-option"), x = h("a-select"), S = h("a-col"), C = h("a-button-group"), T = h("a-row"), E = h("a-form-item"), D = h("a-form"), O = h("code-editor");
104
- return f(), s("div", null, [c("div", null, [u(v, {
105
- type: "link",
106
- onClick: t[0] ||= (t) => e.isCodeVisible = !e.isCodeVisible
107
- }, {
108
- default: _(() => [l(g(e.isCodeVisible ? "隐藏代码" : "显示代码"), 1)]),
109
- _: 1
110
- })]), e.isCodeVisible ? (f(), s("div", w, [u(D, null, {
111
- default: _(() => [u(E, { label: "示例代码" }, {
112
- default: _(() => [u(T, { gutter: 10 }, {
113
- default: _(() => [u(S, { span: 20 }, {
114
- default: _(() => [u(x, {
115
- value: e.exampleCode,
116
- "onUpdate:value": t[1] ||= (t) => e.exampleCode = t,
117
- "show-search": ""
118
- }, {
119
- default: _(() => [(f(!0), s(r, null, m(e.filterExampleCodeList, (e) => (f(), a(b, {
120
- value: e.value,
121
- key: e.value
122
- }, {
123
- default: _(() => [u(y, {
124
- overlayClassName: "debug-code-code-view",
125
- color: "blue"
126
- }, {
127
- title: _(() => [c("pre", null, g(e.value), 1)]),
128
- default: _(() => [l(" " + g(e.label), 1)]),
129
- _: 2
130
- }, 1024)]),
131
- _: 2
132
- }, 1032, ["value"]))), 128))]),
133
- _: 1
134
- }, 8, ["value"])]),
135
- _: 1
136
- }), u(S, { span: 4 }, {
137
- default: _(() => [u(C, null, {
138
- default: _(() => [u(v, {
139
- type: "primary",
140
- onClick: e.handleAppendCode
141
- }, {
142
- default: _(() => [...t[2] ||= [l(" 附加 ", -1)]]),
143
- _: 1
144
- }, 8, ["onClick"]), u(v, {
145
- type: "primary",
146
- onClick: e.handleReplaceCode
147
- }, {
148
- default: _(() => [...t[3] ||= [l(" 替换 ", -1)]]),
149
- _: 1
150
- }, 8, ["onClick"])]),
151
- _: 1
152
- })]),
153
- _: 1
154
- })]),
155
- _: 1
156
- })]),
157
- _: 1
158
- })]),
159
- _: 1
160
- }), u(O, {
161
- editorValue: e.value,
162
- "onUpdate:editorValue": e.update,
163
- mode: "javascript",
164
- lineWrapping: !0
165
- }, null, 8, ["editorValue", "onUpdate:editorValue"])])) : o("", !0)]);
166
- }
167
- var E = /* @__PURE__ */ e(C, [["render", T]]), D = "async function run(params) {\n console.log(JSON.stringify(params));\n // try {\n // const res = await self.callHost('getApiData')({}, '/test/');\n // } catch (e) {\n // console.error('call error', JSON.stringify(e));\n // }\n return { name: 'test' };\n}\n", O = d({
168
- name: "ActionsConfig",
169
- components: {
170
- JsonText: x,
171
- CodeEditorWraper: E
172
- },
173
- props: { dataSource: {
174
- type: Object,
175
- required: !0
176
- } },
177
- emits: ["update:dataSource"],
178
- setup(e, { emit: n }) {
179
- return {
180
- addButton: () => {
181
- n("update:dataSource", [...e.dataSource || [], {
182
- label: "",
183
- type: "primary",
184
- action: "process",
185
- danger: !1,
186
- settings: {},
187
- code: D
188
- }]);
189
- },
190
- removeButton: (t) => {
191
- e.dataSource.splice(t, 1);
192
- },
193
- typeList: [
194
- "primary",
195
- "default",
196
- "dashed",
197
- "link",
198
- "text"
199
- ],
200
- actionTypes: t,
201
- showCodeEnableChange: (e, t) => {
202
- e.showCode = {
203
- ...e.showCode || { code: "async function run({ context, settings }) {\n console.log('context', JSON.stringify(context));\n console.log('settings', JSON.stringify(settings));\n const { tables, formModel } = context;\n // const table = tables['approve-approve_record'];\n // const { searchConditions, selectedRowKeys, selectedRecord, datasource } = table;\n\n // try {\n // const res = await self.callHost('getApiData')({}, '/test/');\n // } catch (e) {\n // console.error('call error', JSON.stringify(e));\n // }\n return true;\n}\n" },
204
- enable: t
205
- };
206
- },
207
- disableCodeEnableChange: (e, t) => {
208
- e.disableCode = {
209
- ...e.showCode || { code: "async function run({ context, settings }) {\n console.log('context', JSON.stringify(context));\n console.log('settings', JSON.stringify(settings));\n const { tables, formModel } = context;\n // const table = tables['approve-approve_record'];\n // const { searchConditions, selectedRowKeys, selectedRecord, datasource } = table;\n\n // try {\n // const res = await self.callHost('getApiData')({}, '/test/');\n // } catch (e) {\n // console.error('call error', JSON.stringify(e));\n // }\n return true;\n}\n" },
210
- enable: t
211
- };
212
- }
213
- };
214
- }
215
- }), k = { class: "item-index" }, A = { class: "config-body" }, j = { class: "config-actions" };
216
- function M(e, t, n, i, d, p) {
217
- let v = h("a-input"), y = h("a-col"), b = h("a-switch"), x = h("a-button"), S = h("a-select-option"), C = h("a-select"), w = h("a-row"), T = h("json-text"), E = h("code-editor-wraper"), D = h("delete-outlined");
218
- return f(), s("div", null, [(f(!0), s(r, null, m(e.dataSource, (n, i) => (f(), s("div", {
219
- key: i,
220
- class: "button-config-item"
221
- }, [
222
- c("div", k, "(" + g(i + 1) + ")", 1),
223
- c("div", A, [
224
- u(w, {
225
- gutter: 16,
226
- align: "top"
227
- }, {
228
- default: _(() => [
229
- u(y, { span: 5 }, {
230
- default: _(() => [t[0] ||= c("label", null, "名称", -1), u(v, {
231
- value: n.label,
232
- "onUpdate:value": (e) => n.label = e
233
- }, null, 8, ["value", "onUpdate:value"])]),
234
- _: 2
235
- }, 1024),
236
- u(y, { span: 3 }, {
237
- default: _(() => [t[1] ||= c("label", null, "下拉菜单", -1), c("div", null, [u(b, {
238
- checked: n.is_dropdown,
239
- "onUpdate:checked": (e) => n.is_dropdown = e
240
- }, null, 8, ["checked", "onUpdate:checked"])])]),
241
- _: 2
242
- }, 1024),
243
- n.is_dropdown ? (f(), a(y, {
244
- key: 1,
245
- span: 5
246
- }, {
247
- default: _(() => [t[4] ||= c("label", null, "组名", -1), u(v, {
248
- value: n.group_name,
249
- "onUpdate:value": (e) => n.group_name = e
250
- }, null, 8, ["value", "onUpdate:value"])]),
251
- _: 2
252
- }, 1024)) : (f(), s(r, { key: 0 }, [u(y, { span: 3 }, {
253
- default: _(() => [t[2] ||= c("label", null, "危险按钮", -1), c("div", null, [u(b, {
254
- checked: n.danger,
255
- "onUpdate:checked": (e) => n.danger = e
256
- }, null, 8, ["checked", "onUpdate:checked"])])]),
257
- _: 2
258
- }, 1024), u(y, { span: 5 }, {
259
- default: _(() => [t[3] ||= c("label", null, "显示类型", -1), u(C, {
260
- value: n.type,
261
- "onUpdate:value": (e) => n.type = e,
262
- class: "w-full"
263
- }, {
264
- default: _(() => [(f(!0), s(r, null, m(e.typeList, (e, t) => (f(), a(S, {
265
- value: e,
266
- key: t
267
- }, {
268
- default: _(() => [u(x, {
269
- size: "small",
270
- type: e,
271
- danger: n.danger
272
- }, {
273
- default: _(() => [l(g(e), 1)]),
274
- _: 2
275
- }, 1032, ["type", "danger"])]),
276
- _: 2
277
- }, 1032, ["value"]))), 128))]),
278
- _: 2
279
- }, 1032, ["value", "onUpdate:value"])]),
280
- _: 2
281
- }, 1024)], 64))
282
- ]),
283
- _: 2
284
- }, 1024),
285
- u(w, { gutter: 16 }, {
286
- default: _(() => [u(y, { span: 24 }, {
287
- default: _(() => [t[5] ||= c("label", null, "操作类型", -1), u(C, {
288
- value: n.action,
289
- "onUpdate:value": (e) => n.action = e,
290
- class: "w-full",
291
- options: e.actionTypes
292
- }, null, 8, [
293
- "value",
294
- "onUpdate:value",
295
- "options"
296
- ])]),
297
- _: 2
298
- }, 1024)]),
299
- _: 2
300
- }, 1024),
301
- u(w, {
302
- gutter: 16,
303
- class: "mt-4"
304
- }, {
305
- default: _(() => [u(y, { span: 24 }, {
306
- default: _(() => [t[6] ||= c("label", null, "配置", -1), u(T, {
307
- value: n.settings,
308
- "onUpdate:value": (e) => n.settings = e,
309
- rows: 3
310
- }, null, 8, ["value", "onUpdate:value"])]),
311
- _: 2
312
- }, 1024)]),
313
- _: 2
314
- }, 1024),
315
- u(w, {
316
- gutter: 16,
317
- class: "mt-4"
318
- }, {
319
- default: _(() => [u(y, { span: 24 }, {
320
- default: _(() => [t[7] ||= c("label", null, "点击事件代码", -1), u(E, {
321
- value: n.code,
322
- "onUpdate:value": (e) => n.code = e,
323
- "edit-type": "click",
324
- action: n.action
325
- }, null, 8, [
326
- "value",
327
- "onUpdate:value",
328
- "action"
329
- ])]),
330
- _: 2
331
- }, 1024)]),
332
- _: 2
333
- }, 1024),
334
- u(w, {
335
- gutter: 16,
336
- class: "mt-4"
337
- }, {
338
- default: _(() => [u(y, { span: 2 }, {
339
- default: _(() => [t[8] ||= c("label", null, "显示控制", -1), u(b, {
340
- checked: n.showCode?.enable,
341
- onChange: (t) => e.showCodeEnableChange(n, t)
342
- }, null, 8, ["checked", "onChange"])]),
343
- _: 2
344
- }, 1024), n.showCode?.enable ? (f(), a(y, {
345
- key: 0,
346
- span: 22
347
- }, {
348
- default: _(() => [t[9] ||= c("label", null, "显示控制代码", -1), u(E, {
349
- value: n.showCode.code,
350
- "onUpdate:value": (e) => n.showCode.code = e,
351
- "edit-type": "show"
352
- }, null, 8, ["value", "onUpdate:value"])]),
353
- _: 2
354
- }, 1024)) : o("", !0)]),
355
- _: 2
356
- }, 1024),
357
- u(w, {
358
- gutter: 16,
359
- class: "mt-4"
360
- }, {
361
- default: _(() => [u(y, { span: 2 }, {
362
- default: _(() => [t[10] ||= c("label", null, "禁用控制", -1), u(b, {
363
- checked: n.disableCode?.enable,
364
- onChange: (t) => e.disableCodeEnableChange(n, t)
365
- }, null, 8, ["checked", "onChange"])]),
366
- _: 2
367
- }, 1024), n.disableCode?.enable ? (f(), a(y, {
368
- key: 0,
369
- span: 22
370
- }, {
371
- default: _(() => [t[11] ||= c("label", null, "禁用制代码", -1), u(E, {
372
- value: n.disableCode.code,
373
- "onUpdate:value": (e) => n.disableCode.code = e,
374
- "edit-type": "disable"
375
- }, null, 8, ["value", "onUpdate:value"])]),
376
- _: 2
377
- }, 1024)) : o("", !0)]),
378
- _: 2
379
- }, 1024)
380
- ]),
381
- c("div", j, [u(D, {
382
- onClick: (t) => e.removeButton(i),
383
- class: "delete-icon"
384
- }, null, 8, ["onClick"])])
385
- ]))), 128)), u(x, {
386
- type: "link",
387
- onClick: e.addButton
388
- }, {
389
- default: _(() => [...t[12] ||= [l(" 添加按钮 ", -1)]]),
390
- _: 1
391
- }, 8, ["onClick"])]);
392
- }
393
- var N = /* @__PURE__ */ e(O, [["render", M], ["__scopeId", "data-v-b55f534d"]]);
394
- //#endregion
395
- export { x as n, N as t };