@web-utils/component 4.0.11 → 4.0.13
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/chunks/MonacoEditor.D31t4FTy.mjs +327 -0
- package/chunks/{core.DJEgjQW6.mjs → core.0Exl13Mz.mjs} +3 -3
- package/chunks/{dictionary.3O-Io7Vh.mjs → dictionary.DGt59Ir7.mjs} +15 -15
- package/configComponents.d.ts +29 -0
- package/{chunks/configComponents.CpKi15WN.mjs → configComponents.mjs} +25 -22
- package/fy-curd/index.mjs +1 -1
- package/fy-form/index.mjs +1 -1
- package/fy-form-design/index.mjs +12 -13
- package/fy-from/crud/config.d.ts +69 -0
- package/fy-from/crud/eval.d.ts +1 -0
- package/fy-from/crud/zh.d.ts +87 -0
- package/helper-function.d.ts +33 -0
- package/helper-function.mjs +68 -0
- package/index.d.ts +180 -0
- package/index.mjs +364 -598
- package/input-number/index.mjs +2 -2
- package/monaco-editor/index.mjs +5 -205
- package/package.json +5 -4
- package/pageable-table/index.mjs +1 -1
- package/photo-swipe/index.d.ts +4 -0
- package/table-column/index.mjs +2 -2
- package/table-view/index.mjs +2 -2
- package/tabs-view/index.mjs +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/video/index.d.ts +10 -0
- package/web-types.json +1 -1
- package/chunks/json-beautifier.Bp3GslGm.mjs +0 -123
- /package/chunks/{FormTemp.Bu2VCxUh.mjs → FormTemp.BQxO5IQq.mjs} +0 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import * as d from "monaco-editor/esm/vs/editor/editor.api";
|
|
2
|
+
import { NOOP as _ } from "@web-utils/core";
|
|
3
|
+
import { n as x } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
4
|
+
const y = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, w = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
5
|
+
let u, g;
|
|
6
|
+
const j = {
|
|
7
|
+
// table of character substitutions
|
|
8
|
+
"\b": "\\b",
|
|
9
|
+
" ": "\\t",
|
|
10
|
+
"\n": "\\n",
|
|
11
|
+
"\f": "\\f",
|
|
12
|
+
"\r": "\\r",
|
|
13
|
+
'"': '\\"',
|
|
14
|
+
"'": "\\'",
|
|
15
|
+
"\\": "\\\\"
|
|
16
|
+
};
|
|
17
|
+
let c;
|
|
18
|
+
function M(t, e = {}) {
|
|
19
|
+
const i = e.space || 2, n = e.dropQuotesOnKeys !== !1, o = e.dropQuotesOnNumbers || !1, r = e.inlineShortArrays || !1, a = e.inlineShortArraysDepth || 1, f = e.quoteType || "single", h = e.minify || !1;
|
|
20
|
+
o && v(t);
|
|
21
|
+
let l = O(t, null, h ? void 0 : i, n, f);
|
|
22
|
+
if (r && !h) {
|
|
23
|
+
let s = $(l);
|
|
24
|
+
if (a > 1)
|
|
25
|
+
for (let b = 1; b < a && (l = s, s = $(l), s !== l); b++)
|
|
26
|
+
;
|
|
27
|
+
l = s;
|
|
28
|
+
}
|
|
29
|
+
return l;
|
|
30
|
+
}
|
|
31
|
+
function v(t) {
|
|
32
|
+
if (!E(t)) return;
|
|
33
|
+
const e = Object.keys(t);
|
|
34
|
+
e && e.forEach(function(i) {
|
|
35
|
+
const n = t[i];
|
|
36
|
+
if (typeof n == "string") {
|
|
37
|
+
const o = n - 0;
|
|
38
|
+
t[i] = isNaN(o) ? n : o;
|
|
39
|
+
} else (E(n) || Array.isArray(n)) && v(n);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function E(t) {
|
|
43
|
+
return t && typeof t == "object";
|
|
44
|
+
}
|
|
45
|
+
function $(t, e) {
|
|
46
|
+
if (e || (e = 80), typeof e != "number" || e < 20)
|
|
47
|
+
throw Error(`Invalid width '${e}'. Expecting number equal or larger than 20.`);
|
|
48
|
+
const i = t.split(`
|
|
49
|
+
`);
|
|
50
|
+
let n = 0, o = null, r = [];
|
|
51
|
+
for (; n < i.length; ) {
|
|
52
|
+
const a = !!i[n].match(/\[/), f = !!i[n].match(/\],?/);
|
|
53
|
+
if (a && !f)
|
|
54
|
+
r = [i[n]], o = n;
|
|
55
|
+
else if (f && !a && o) {
|
|
56
|
+
r.push((i[n] || "").trim());
|
|
57
|
+
const h = r.join(" ");
|
|
58
|
+
h.length < e && (i.splice(o, n - o + 1, h), n = o), o = null, r = [];
|
|
59
|
+
} else
|
|
60
|
+
o && r.push((i[n] || "").trim());
|
|
61
|
+
n += 1;
|
|
62
|
+
}
|
|
63
|
+
return i.join(`
|
|
64
|
+
`);
|
|
65
|
+
}
|
|
66
|
+
function O(t, e, i, n, o) {
|
|
67
|
+
let r;
|
|
68
|
+
if (u = "", g = "", typeof i == "number")
|
|
69
|
+
for (r = 0; r < i; r += 1)
|
|
70
|
+
g += " ";
|
|
71
|
+
else typeof i == "string" && (g = i);
|
|
72
|
+
return c = e, m("", { "": t }, n, o);
|
|
73
|
+
}
|
|
74
|
+
function m(t, e, i, n) {
|
|
75
|
+
let o, r, a, f;
|
|
76
|
+
const h = u;
|
|
77
|
+
let l, s = e[t];
|
|
78
|
+
switch (s && typeof s == "object" && typeof s.toJSON == "function" && (s = s.toJSON(t)), typeof c == "function" && (s = c.call(e, t, s)), typeof s) {
|
|
79
|
+
case "function":
|
|
80
|
+
return s;
|
|
81
|
+
case "string":
|
|
82
|
+
return p(s, n);
|
|
83
|
+
case "number":
|
|
84
|
+
return isFinite(s) ? String(s) : "null";
|
|
85
|
+
case "boolean":
|
|
86
|
+
case "null":
|
|
87
|
+
return String(s);
|
|
88
|
+
// If the type is 'object', we might be dealing with an object or an array or
|
|
89
|
+
// null.
|
|
90
|
+
case "object":
|
|
91
|
+
if (!s)
|
|
92
|
+
return "null";
|
|
93
|
+
if (u += g, l = [], Object.prototype.toString.apply(s) === "[object Array]") {
|
|
94
|
+
for (f = s.length, o = 0; o < f; o += 1)
|
|
95
|
+
l[o] = m(o, s, i, n) || "null";
|
|
96
|
+
return a = l.length === 0 ? "[]" : u ? `[
|
|
97
|
+
${u}${l.join(`,
|
|
98
|
+
${u}`)}
|
|
99
|
+
${h}]` : `[${l.join(",")}]`, u = h, a;
|
|
100
|
+
}
|
|
101
|
+
if (c && typeof c == "object")
|
|
102
|
+
for (f = c.length, o = 0; o < f; o += 1)
|
|
103
|
+
typeof c[o] == "string" && (r = c[o], a = m(r, s, i, n), a && l.push((i ? S(r, n) : p(r, n)) + (u ? ": " : ":") + a));
|
|
104
|
+
else
|
|
105
|
+
for (r in s)
|
|
106
|
+
Object.prototype.hasOwnProperty.call(s, r) && (a = m(r, s, i, n), a && l.push((i ? S(r, n) : p(r, n)) + (u ? ": " : ":") + a));
|
|
107
|
+
return a = l.length === 0 ? "{}" : u ? `{
|
|
108
|
+
${u}${l.join(`,
|
|
109
|
+
${u}`)}
|
|
110
|
+
${h}}` : `{${l.join(",")}}`, u = h, a;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function p(t, e) {
|
|
114
|
+
y.lastIndex = 0;
|
|
115
|
+
let i = '"';
|
|
116
|
+
return e === "single" && (i = "'"), y.test(t) ? i + t.replace(y, function(n) {
|
|
117
|
+
const o = j[n];
|
|
118
|
+
return typeof o == "string" ? o : `\\u${`0000${n.charCodeAt(0).toString(16)}`.slice(-4)}`;
|
|
119
|
+
}) + i : i + t + i;
|
|
120
|
+
}
|
|
121
|
+
function S(t, e) {
|
|
122
|
+
return w.test(t) ? t : p(t, e);
|
|
123
|
+
}
|
|
124
|
+
const A = {
|
|
125
|
+
name: "MonacoEditor",
|
|
126
|
+
props: {
|
|
127
|
+
diffEditor: { type: Boolean, default: !1 },
|
|
128
|
+
// 是否使用 diff 模式
|
|
129
|
+
width: { type: [String, Number], default: "100%" },
|
|
130
|
+
height: { type: [String, Number], default: "100%" },
|
|
131
|
+
original: String,
|
|
132
|
+
// 只有在 diff 模式下有效
|
|
133
|
+
value: [String, Object],
|
|
134
|
+
language: { type: String, default: "javascript" },
|
|
135
|
+
theme: { type: String, default: "vs" },
|
|
136
|
+
readOnly: { type: Boolean, default: !1 },
|
|
137
|
+
options: {
|
|
138
|
+
type: Object,
|
|
139
|
+
default() {
|
|
140
|
+
return {};
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
editorMounted: { type: Function, default: _ },
|
|
144
|
+
editorBeforeMount: { type: Function, default: _ },
|
|
145
|
+
keyIndex: { type: String }
|
|
146
|
+
},
|
|
147
|
+
data() {
|
|
148
|
+
return {
|
|
149
|
+
fullscreen: !1
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
computed: {
|
|
153
|
+
style() {
|
|
154
|
+
return this.fullscreen ? {} : {
|
|
155
|
+
width: /^\d+$/.test(this.width) ? `${this.width}px` : this.width,
|
|
156
|
+
height: /^\d+$/.test(this.height) ? `${this.height}px` : this.height,
|
|
157
|
+
position: "relative"
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
watch: {
|
|
162
|
+
options: {
|
|
163
|
+
deep: !0,
|
|
164
|
+
handler(t) {
|
|
165
|
+
var e;
|
|
166
|
+
(e = this.editor) == null || e.updateOptions(t);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
keyIndex() {
|
|
170
|
+
let t = this.value;
|
|
171
|
+
typeof t == "object" && (t = M(t)), this.editor && t !== this._getValue() && this._setValue(t);
|
|
172
|
+
},
|
|
173
|
+
language() {
|
|
174
|
+
if (this.editor)
|
|
175
|
+
if (this.diffEditor) {
|
|
176
|
+
const { original: t, modified: e } = this.editor.getModel();
|
|
177
|
+
d.editor.setModelLanguage(t, this.language), d.editor.setModelLanguage(e, this.language);
|
|
178
|
+
} else
|
|
179
|
+
d.editor.setModelLanguage(this.editor.getModel(), this.language);
|
|
180
|
+
},
|
|
181
|
+
theme() {
|
|
182
|
+
this.editor && d.editor.setTheme(this.theme);
|
|
183
|
+
},
|
|
184
|
+
style() {
|
|
185
|
+
this.$nextTick(() => {
|
|
186
|
+
var t;
|
|
187
|
+
(t = this.editor) == null || t.layout();
|
|
188
|
+
});
|
|
189
|
+
},
|
|
190
|
+
value(t) {
|
|
191
|
+
this.editor && t !== this._getValue() && this._setValue(t);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
mounted() {
|
|
195
|
+
this.initMonaco(), window.addEventListener("resize", this.onResize);
|
|
196
|
+
},
|
|
197
|
+
beforeDestroy() {
|
|
198
|
+
var t;
|
|
199
|
+
window.removeEventListener("resize", this.onResize), (t = this.editor) == null || t.dispose();
|
|
200
|
+
},
|
|
201
|
+
methods: {
|
|
202
|
+
initMonaco() {
|
|
203
|
+
const { value: t, language: e, theme: i, readOnly: n, options: o } = this;
|
|
204
|
+
Object.assign(o, this._editorBeforeMount()), this.editor = d.editor[this.diffEditor ? "createDiffEditor" : "create"](this.$el, {
|
|
205
|
+
value: typeof t == "string" ? t : M(t),
|
|
206
|
+
language: e,
|
|
207
|
+
theme: i,
|
|
208
|
+
readOnly: n,
|
|
209
|
+
...o
|
|
210
|
+
}), this.diffEditor && this._setModel(this.value, this.original), this._editorMounted(this.editor), this.editor.addAction({
|
|
211
|
+
id: "f1",
|
|
212
|
+
label: "full screen",
|
|
213
|
+
keybindings: [d.KeyCode.F1],
|
|
214
|
+
run: (r) => {
|
|
215
|
+
this.toggleFullScreen();
|
|
216
|
+
}
|
|
217
|
+
}), this.editor.addAction({
|
|
218
|
+
id: "escape",
|
|
219
|
+
label: "exit full screen",
|
|
220
|
+
keybindings: [d.KeyCode.Escape],
|
|
221
|
+
run: (r) => {
|
|
222
|
+
this.fullscreen = !1;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
},
|
|
226
|
+
toggleFullScreen() {
|
|
227
|
+
this.fullscreen = !this.fullscreen;
|
|
228
|
+
},
|
|
229
|
+
async onResize() {
|
|
230
|
+
await this.$nextTick();
|
|
231
|
+
const t = this.$el;
|
|
232
|
+
this.editor.layout({
|
|
233
|
+
width: t.clientWidth,
|
|
234
|
+
height: t.clientHeight
|
|
235
|
+
});
|
|
236
|
+
},
|
|
237
|
+
_handleFullScreen() {
|
|
238
|
+
this.isMaximum ? this.minEditor() : this.maxEditor();
|
|
239
|
+
},
|
|
240
|
+
// 放大
|
|
241
|
+
maxEditor() {
|
|
242
|
+
this.isMaximum = !0;
|
|
243
|
+
const t = this.$el;
|
|
244
|
+
this.originSize = {
|
|
245
|
+
width: t.clientWidth,
|
|
246
|
+
height: t.clientHeight
|
|
247
|
+
}, t.classList.add("editor-fullscreen"), this.editor.layout({
|
|
248
|
+
height: document.body.clientHeight,
|
|
249
|
+
width: document.body.clientWidth
|
|
250
|
+
}), document.addEventListener("keyup", this.handleEsc);
|
|
251
|
+
},
|
|
252
|
+
handleEsc(t) {
|
|
253
|
+
t.keyCode === 27 && this.minEditor();
|
|
254
|
+
},
|
|
255
|
+
// 缩小
|
|
256
|
+
minEditor() {
|
|
257
|
+
this.isMaximum = !1, this.$el.classList.remove("editor-fullscreen"), this.editor.layout({
|
|
258
|
+
height: this.originSize.height,
|
|
259
|
+
width: this.originSize.width
|
|
260
|
+
}), document.removeEventListener("keyup", this.handleEsc);
|
|
261
|
+
},
|
|
262
|
+
_getEditor() {
|
|
263
|
+
return this.editor ? this.diffEditor ? this.editor.modifiedEditor : this.editor : null;
|
|
264
|
+
},
|
|
265
|
+
_setModel(t, e) {
|
|
266
|
+
const { language: i } = this, n = d.editor.createModel(e, i), o = d.editor.createModel(t, i);
|
|
267
|
+
this.editor.setModel({
|
|
268
|
+
original: n,
|
|
269
|
+
modified: o
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
_setValue(t) {
|
|
273
|
+
const e = this._getEditor();
|
|
274
|
+
if (e) return e.setValue(t);
|
|
275
|
+
},
|
|
276
|
+
_getValue() {
|
|
277
|
+
const t = this._getEditor();
|
|
278
|
+
return t ? t.getValue() : "";
|
|
279
|
+
},
|
|
280
|
+
_editorBeforeMount() {
|
|
281
|
+
return this.editorBeforeMount(d) || {};
|
|
282
|
+
},
|
|
283
|
+
_editorMounted(t) {
|
|
284
|
+
this.editorMounted(t, d), this.diffEditor ? t.onDidUpdateDiff((e) => {
|
|
285
|
+
const i = this._getValue();
|
|
286
|
+
this._emitChange(i, e);
|
|
287
|
+
}) : t.onDidChangeModelContent((e) => {
|
|
288
|
+
const i = this._getValue();
|
|
289
|
+
this._emitChange(i, e);
|
|
290
|
+
});
|
|
291
|
+
},
|
|
292
|
+
_emitChange(t, e) {
|
|
293
|
+
this.$emit("change", t, e), this.$emit("input", t);
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
render(t) {
|
|
297
|
+
const e = this.options.fullScreen;
|
|
298
|
+
return t("div", { class: ["monaco_editor_container", this.fullscreen ? "fullscreen" : ""], style: this.style }, [
|
|
299
|
+
e ? t("i", {
|
|
300
|
+
class: "el-icon-full-screen",
|
|
301
|
+
style: {
|
|
302
|
+
width: "1.2em",
|
|
303
|
+
height: "1.2em",
|
|
304
|
+
position: "absolute",
|
|
305
|
+
left: "0px",
|
|
306
|
+
top: "0px",
|
|
307
|
+
zIndex: "1",
|
|
308
|
+
cursor: "pointer"
|
|
309
|
+
},
|
|
310
|
+
on: { click: this._handleFullScreen }
|
|
311
|
+
}) : ""
|
|
312
|
+
]);
|
|
313
|
+
}
|
|
314
|
+
}, k = null, z = null;
|
|
315
|
+
var C = /* @__PURE__ */ x(
|
|
316
|
+
A,
|
|
317
|
+
k,
|
|
318
|
+
z,
|
|
319
|
+
!1,
|
|
320
|
+
null,
|
|
321
|
+
null
|
|
322
|
+
);
|
|
323
|
+
const F = C.exports;
|
|
324
|
+
export {
|
|
325
|
+
F as M,
|
|
326
|
+
M as c
|
|
327
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const $ = {}, h = {}, m = {},
|
|
1
|
+
import { a as g, b as l } from "./core.0Exl13Mz.mjs";
|
|
2
|
+
import { getDictTreeByType as d, remote as w } from "../configComponents.mjs";
|
|
3
|
+
const $ = {}, h = {}, m = {}, b = (t, i = !0, { options: r, treeDict: o, idAsValue: n, labelAsValue: c } = {}) => {
|
|
4
4
|
let e = t;
|
|
5
5
|
o && (e = `${t}-${n}-${c}${r ? "-options" : ""}`);
|
|
6
6
|
const a = $[e];
|
|
7
|
-
return i && a ? a : o ?
|
|
8
|
-
},
|
|
7
|
+
return i && a ? a : o ? K(t, i, { idAsValue: n, labelAsValue: c }) : C(t, i);
|
|
8
|
+
}, C = (t, i = !0) => {
|
|
9
9
|
if (m[t])
|
|
10
10
|
return m[t];
|
|
11
11
|
const r = new Promise((o, n) => {
|
|
@@ -23,20 +23,20 @@ const $ = {}, h = {}, m = {}, C = (t, i = !0, { options: r, treeDict: o, idAsVal
|
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
return m[t] = r, r;
|
|
26
|
-
},
|
|
26
|
+
}, K = (t, i = !0, { idAsValue: r, labelAsValue: o } = {}) => {
|
|
27
27
|
const n = `${t}-${r}-${o}`;
|
|
28
28
|
if (m[n])
|
|
29
29
|
return m[n];
|
|
30
30
|
const c = new Promise((e, a) => {
|
|
31
31
|
i && $[n] ? e($[n]) : d(t, { idAsValue: r, labelAsValue: o }).then((f) => {
|
|
32
32
|
const s = f.data.data;
|
|
33
|
-
i && ($[n] = s, $[`${n}-options`] =
|
|
33
|
+
i && ($[n] = s, $[`${n}-options`] = g(s), h[n] = l(s)), m[n] = null, e(s);
|
|
34
34
|
}).catch((f) => {
|
|
35
35
|
m[n] = null, a(f);
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
return m[n] = c, c;
|
|
39
|
-
},
|
|
39
|
+
}, O = async (t, i, r = !0, { treeDict: o, idAsValue: n, labelAsValue: c } = {}) => {
|
|
40
40
|
let e = t;
|
|
41
41
|
o && (e = `${t}-${n}-${c}`);
|
|
42
42
|
const a = h[e];
|
|
@@ -44,15 +44,15 @@ const $ = {}, h = {}, m = {}, C = (t, i = !0, { options: r, treeDict: o, idAsVal
|
|
|
44
44
|
if (r && a)
|
|
45
45
|
f = a[i];
|
|
46
46
|
else {
|
|
47
|
-
let s = await
|
|
47
|
+
let s = await b(t, r, { treeDict: o, idAsValue: n, labelAsValue: c });
|
|
48
48
|
if (r)
|
|
49
49
|
f = h[e][i];
|
|
50
50
|
else {
|
|
51
|
-
o && (s =
|
|
52
|
-
for (let
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
f =
|
|
51
|
+
o && (s = g(s));
|
|
52
|
+
for (let u = 0; u < s.length; u++) {
|
|
53
|
+
const D = s[u];
|
|
54
|
+
if (D.value === i) {
|
|
55
|
+
f = D;
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -61,7 +61,7 @@ const $ = {}, h = {}, m = {}, C = (t, i = !0, { options: r, treeDict: o, idAsVal
|
|
|
61
61
|
return f;
|
|
62
62
|
}, z = async (t, i, r = !0, { treeDict: o, idAsValue: n, labelAsValue: c } = {}) => {
|
|
63
63
|
var e;
|
|
64
|
-
return ((e = await
|
|
64
|
+
return ((e = await O(t, i, r, { treeDict: o, idAsValue: n, labelAsValue: c })) == null ? void 0 : e.label) || i || "";
|
|
65
65
|
};
|
|
66
66
|
export {
|
|
67
67
|
z as g
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ConfigOptions {
|
|
2
|
+
privilege?: {
|
|
3
|
+
processButtons?: (buttons: Array<string | Record<string, string>>) => Array<string | Record<string, boolean>>;
|
|
4
|
+
hasAuthority?: (privilege: string) => boolean;
|
|
5
|
+
};
|
|
6
|
+
dict?: {
|
|
7
|
+
getDictTreeByType?: (type: string, options: {
|
|
8
|
+
idAsValue?: boolean;
|
|
9
|
+
labelAsValue?: boolean;
|
|
10
|
+
}) => Promise<unknown[]>;
|
|
11
|
+
remote?: (type: string) => Promise<unknown[]>;
|
|
12
|
+
};
|
|
13
|
+
tableView?: {
|
|
14
|
+
reload?: () => void;
|
|
15
|
+
};
|
|
16
|
+
toolbar?: {
|
|
17
|
+
goBack?: (path: string) => void;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const processButtons: (buttons: Array<string | Record<string, string>>) => (string | Record<string, boolean>)[] | undefined;
|
|
21
|
+
export declare const hasAuthority: (str: string) => boolean | undefined;
|
|
22
|
+
export declare const goBack: (path: string) => void | undefined;
|
|
23
|
+
export declare const reloadTable: () => void | undefined;
|
|
24
|
+
export declare const getDictTreeByType: (type: string, options: {
|
|
25
|
+
idAsValue?: boolean;
|
|
26
|
+
labelAsValue?: boolean;
|
|
27
|
+
}) => Promise<unknown[]> | undefined;
|
|
28
|
+
export declare const remote: (type: string) => Promise<unknown[]> | undefined;
|
|
29
|
+
export declare const configComponents: (options: ConfigOptions) => void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { isObject as
|
|
2
|
-
import {
|
|
1
|
+
import { isObject as s, isString as c } from "@web-utils/core";
|
|
2
|
+
import { mergeWith as p } from "@web-utils/integrations/lodash";
|
|
3
3
|
const r = {
|
|
4
4
|
privilege: {
|
|
5
5
|
processButtons(e) {
|
|
6
6
|
return e.map((t) => {
|
|
7
|
-
if (
|
|
8
|
-
const o = t,
|
|
9
|
-
for (const
|
|
10
|
-
c(o[
|
|
11
|
-
return
|
|
7
|
+
if (s(t)) {
|
|
8
|
+
const o = t, n = {};
|
|
9
|
+
for (const i in o)
|
|
10
|
+
c(o[i]) && (n[i] = u(o[i]) ?? !0);
|
|
11
|
+
return n;
|
|
12
12
|
}
|
|
13
13
|
return t;
|
|
14
14
|
});
|
|
@@ -17,33 +17,36 @@ const r = {
|
|
|
17
17
|
return !0;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, f = (e) => {
|
|
21
21
|
var t, o;
|
|
22
22
|
return (o = (t = r.privilege) == null ? void 0 : t.processButtons) == null ? void 0 : o.call(t, e);
|
|
23
|
-
},
|
|
23
|
+
}, u = (e) => {
|
|
24
24
|
var t, o;
|
|
25
25
|
return (o = (t = r.privilege) == null ? void 0 : t.hasAuthority) == null ? void 0 : o.call(t, e);
|
|
26
|
-
},
|
|
26
|
+
}, l = (e) => {
|
|
27
27
|
var t, o;
|
|
28
28
|
return (o = (t = r.toolbar) == null ? void 0 : t.goBack) == null ? void 0 : o.call(t, e);
|
|
29
|
-
},
|
|
29
|
+
}, m = () => {
|
|
30
30
|
var e, t;
|
|
31
31
|
return (t = (e = r.tableView) == null ? void 0 : e.reload) == null ? void 0 : t.call(e);
|
|
32
32
|
}, y = (e, t) => {
|
|
33
|
-
var o,
|
|
34
|
-
return (
|
|
35
|
-
},
|
|
33
|
+
var o, n;
|
|
34
|
+
return (n = (o = r.dict) == null ? void 0 : o.getDictTreeByType) == null ? void 0 : n.call(o, e, t);
|
|
35
|
+
}, b = (e) => {
|
|
36
36
|
var t, o;
|
|
37
37
|
return (o = (t = r.dict) == null ? void 0 : t.remote) == null ? void 0 : o.call(t, e);
|
|
38
38
|
}, h = (e) => {
|
|
39
|
-
|
|
39
|
+
p(r, e, (t, o) => {
|
|
40
|
+
if (typeof o == "function")
|
|
41
|
+
return o;
|
|
42
|
+
});
|
|
40
43
|
};
|
|
41
44
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
h as configComponents,
|
|
46
|
+
y as getDictTreeByType,
|
|
47
|
+
l as goBack,
|
|
48
|
+
u as hasAuthority,
|
|
49
|
+
f as processButtons,
|
|
50
|
+
m as reloadTable,
|
|
51
|
+
b as remote
|
|
49
52
|
};
|
package/fy-curd/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { o as h, j as C, d as a, u as B, D as b, k as P, i as D, l as T, s as z
|
|
|
6
6
|
import { isBlank as c } from "@web-utils/core";
|
|
7
7
|
import { s as M } from "../chunks/slot.DXIbhGat.mjs";
|
|
8
8
|
import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
9
|
-
import { F as L, d as w } from "../chunks/FormTemp.
|
|
9
|
+
import { F as L, d as w } from "../chunks/FormTemp.BQxO5IQq.mjs";
|
|
10
10
|
import { s as V } from "../chunks/dic.Dkl-leRW.mjs";
|
|
11
11
|
import R from "../icon-temp/index.mjs";
|
|
12
12
|
import "../icon-temp/style.css";
|
package/fy-form/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as N, d as P } from "../chunks/FormTemp.
|
|
1
|
+
import { F as N, d as P } from "../chunks/FormTemp.BQxO5IQq.mjs";
|
|
2
2
|
import { i as z } from "../chunks/init.DAsXSoLW.mjs";
|
|
3
3
|
import { u as B, d as D, s as v, j as S, x as j, o as I, D as L, y as V, p as M } from "../chunks/util.DqFv_pWg.mjs";
|
|
4
4
|
import { a as A, b as W, f as R, d as G, c as H } from "../chunks/dataformat.CpqOeGBl.mjs";
|
package/fy-form-design/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { isBlank as E } from "@web-utils/core";
|
|
2
|
-
import f from "../
|
|
2
|
+
import { c as v, M as f } from "../chunks/MonacoEditor.D31t4FTy.mjs";
|
|
3
3
|
import "../monaco-editor/style.css";
|
|
4
4
|
import b from "vuedraggable";
|
|
5
|
-
import { c as v } from "../chunks/json-beautifier.Bp3GslGm.mjs";
|
|
6
5
|
import { d as p, z as u } from "../chunks/util.DqFv_pWg.mjs";
|
|
7
6
|
import { cloneDeep as g } from "@web-utils/integrations/lodash";
|
|
8
7
|
import "../fy-u-editor/style.css";
|
|
@@ -782,7 +781,7 @@ var R = function() {
|
|
|
782
781
|
} } }, [t("i", { staticClass: "iconfont icon-clear" })]) : e._e(), e.selectWidget.prop === e.column.prop ? t("ElButton", { staticClass: "widget-action-clone", attrs: { title: "复制", circle: "", plain: "", size: "small", type: "primary" }, on: { click: function(a) {
|
|
783
782
|
return a.stopPropagation(), e.handleWidgetCloneTable(e.index);
|
|
784
783
|
} } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1);
|
|
785
|
-
}, P = [],
|
|
784
|
+
}, P = [], M = /* @__PURE__ */ c(
|
|
786
785
|
z,
|
|
787
786
|
R,
|
|
788
787
|
P,
|
|
@@ -790,9 +789,9 @@ var R = function() {
|
|
|
790
789
|
null,
|
|
791
790
|
null
|
|
792
791
|
);
|
|
793
|
-
const
|
|
792
|
+
const D = M.exports, Q = {
|
|
794
793
|
name: "WidgetForm",
|
|
795
|
-
components: { Draggable: b, WidgetFormItem: y, WidgetFormTable: x, WidgetFormGroup:
|
|
794
|
+
components: { Draggable: b, WidgetFormItem: y, WidgetFormTable: x, WidgetFormGroup: D },
|
|
796
795
|
props: {
|
|
797
796
|
data: Object,
|
|
798
797
|
select: Object
|
|
@@ -1229,15 +1228,15 @@ var Pe = function() {
|
|
|
1229
1228
|
return t("div", [t("ElFormItem", { attrs: { label: "占位内容" } }, [t("ElInput", { attrs: { clearable: "", placeholder: "占位内容" }, model: { value: e.data.placeholder, callback: function(a) {
|
|
1230
1229
|
e.$set(e.data, "placeholder", a);
|
|
1231
1230
|
}, expression: "data.placeholder" } })], 1)], 1);
|
|
1232
|
-
},
|
|
1231
|
+
}, Me = [], De = /* @__PURE__ */ c(
|
|
1233
1232
|
Re,
|
|
1234
1233
|
Pe,
|
|
1235
|
-
|
|
1234
|
+
Me,
|
|
1236
1235
|
!1,
|
|
1237
1236
|
null,
|
|
1238
1237
|
null
|
|
1239
1238
|
);
|
|
1240
|
-
const Qe =
|
|
1239
|
+
const Qe = De.exports, Ke = {
|
|
1241
1240
|
name: "ConfigSelect",
|
|
1242
1241
|
components: { Draggable: b, MonacoEditor: f },
|
|
1243
1242
|
props: {
|
|
@@ -1994,7 +1993,7 @@ const Rt = zt.exports, Pt = [
|
|
|
1994
1993
|
label: "年",
|
|
1995
1994
|
value: "year"
|
|
1996
1995
|
}
|
|
1997
|
-
],
|
|
1996
|
+
], Mt = {
|
|
1998
1997
|
name: "AfdColumn",
|
|
1999
1998
|
props: {
|
|
2000
1999
|
column: {
|
|
@@ -2028,7 +2027,7 @@ const Rt = zt.exports, Pt = [
|
|
|
2028
2027
|
}
|
|
2029
2028
|
}
|
|
2030
2029
|
};
|
|
2031
|
-
var
|
|
2030
|
+
var Dt = function() {
|
|
2032
2031
|
var e = this, t = e._self._c;
|
|
2033
2032
|
return t("ElDrawer", { attrs: { visible: e.visible, size: "80%", "append-to-body": "" }, on: { "update:visible": function(a) {
|
|
2034
2033
|
e.visible = a;
|
|
@@ -2066,8 +2065,8 @@ var Mt = function() {
|
|
|
2066
2065
|
e.visible = !1;
|
|
2067
2066
|
} } }, [e._v("取消")])], 1)], 1);
|
|
2068
2067
|
}, Qt = [], Kt = /* @__PURE__ */ c(
|
|
2069
|
-
Dt,
|
|
2070
2068
|
Mt,
|
|
2069
|
+
Dt,
|
|
2071
2070
|
Qt,
|
|
2072
2071
|
!1,
|
|
2073
2072
|
null,
|
|
@@ -2847,7 +2846,7 @@ var ta = function() {
|
|
|
2847
2846
|
null,
|
|
2848
2847
|
null
|
|
2849
2848
|
);
|
|
2850
|
-
const
|
|
2849
|
+
const ua = la.exports;
|
|
2851
2850
|
export {
|
|
2852
|
-
|
|
2851
|
+
ua as default
|
|
2853
2852
|
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
menuWidth: number;
|
|
3
|
+
menuFixed: string;
|
|
4
|
+
menuXsWidth: number;
|
|
5
|
+
menuAlign: string;
|
|
6
|
+
menuHeaderAlign: string;
|
|
7
|
+
headerAlign: string;
|
|
8
|
+
cancelBtnIcon: string;
|
|
9
|
+
viewBtnIcon: string;
|
|
10
|
+
editBtnIcon: string;
|
|
11
|
+
copyBtnIcon: string;
|
|
12
|
+
addBtnIcon: string;
|
|
13
|
+
printBtnIcon: string;
|
|
14
|
+
excelBtnIcon: string;
|
|
15
|
+
delBtnIcon: string;
|
|
16
|
+
searchBtnIcon: string;
|
|
17
|
+
emptyBtnIcon: string;
|
|
18
|
+
saveBtnIcon: string;
|
|
19
|
+
updateBtnIcon: string;
|
|
20
|
+
columnBtnIcon: string;
|
|
21
|
+
filterBtnIcon: string;
|
|
22
|
+
refreshBtnIcon: string;
|
|
23
|
+
viewBtn: boolean;
|
|
24
|
+
editBtn: boolean;
|
|
25
|
+
copyBtn: boolean;
|
|
26
|
+
cancelBtn: boolean;
|
|
27
|
+
addBtn: boolean;
|
|
28
|
+
addRowBtn: boolean;
|
|
29
|
+
printBtn: boolean;
|
|
30
|
+
excelBtn: boolean;
|
|
31
|
+
delBtn: boolean;
|
|
32
|
+
cellBtn: boolean;
|
|
33
|
+
dateBtn: boolean;
|
|
34
|
+
updateBtn: boolean;
|
|
35
|
+
saveBtn: boolean;
|
|
36
|
+
refreshBtn: boolean;
|
|
37
|
+
columnBtn: boolean;
|
|
38
|
+
filterBtn: boolean;
|
|
39
|
+
queryBtn: boolean;
|
|
40
|
+
menuBtn: boolean;
|
|
41
|
+
searchBtn: boolean;
|
|
42
|
+
clearBtn: boolean;
|
|
43
|
+
selectClearBtn: boolean;
|
|
44
|
+
searchShow: boolean;
|
|
45
|
+
tip: boolean;
|
|
46
|
+
dialogWidth: string;
|
|
47
|
+
dialogDrag: boolean;
|
|
48
|
+
formFullscreen: boolean;
|
|
49
|
+
pageBackground: boolean;
|
|
50
|
+
page: boolean;
|
|
51
|
+
menu: boolean;
|
|
52
|
+
indexLabel: string;
|
|
53
|
+
indexWidth: number;
|
|
54
|
+
indexFixed: string;
|
|
55
|
+
selectionWidth: number;
|
|
56
|
+
selectionFixed: string;
|
|
57
|
+
expandWidth: number;
|
|
58
|
+
expandFixed: string;
|
|
59
|
+
filterMultiple: boolean;
|
|
60
|
+
calcHeight: number;
|
|
61
|
+
width: string;
|
|
62
|
+
searchGutter: number;
|
|
63
|
+
searchLabelWidth: number;
|
|
64
|
+
searchSpan: number;
|
|
65
|
+
dropRowClass: string;
|
|
66
|
+
dropColClass: string;
|
|
67
|
+
ghostClass: string;
|
|
68
|
+
};
|
|
69
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function addAttrs(safe: any, data?: never[], { parent, preIndex, level, expandLevel, expand, show }?: any): void;
|