@farris/ui-vue 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
var _e = Object.defineProperty;
|
|
2
2
|
var Ee = (t, e, n) => e in t ? _e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var G = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
const { properties: e, title: n, ignore: r } = t, a = r && Array.isArray(r), i = Object.keys(e).reduce((o, s) => ((!a || !r.find((c) => c == s)) && (o[s] = e[s].type === "object" && e[s].properties ?
|
|
10
|
-
return (!a || !r.find((o) => o == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
11
|
-
}
|
|
12
|
-
function
|
|
13
|
-
const r =
|
|
4
|
+
import { defineComponent as he, ref as D, computed as j, onMounted as ge, watch as Ye, createVNode as pe, inject as Fe } from "vue";
|
|
5
|
+
import { isPlainObject as ie, cloneDeep as We } from "lodash-es";
|
|
6
|
+
import M from "bignumber.js";
|
|
7
|
+
const ye = {}, we = {};
|
|
8
|
+
function ee(t) {
|
|
9
|
+
const { properties: e, title: n, ignore: r } = t, a = r && Array.isArray(r), i = Object.keys(e).reduce((o, s) => ((!a || !r.find((c) => c == s)) && (o[s] = e[s].type === "object" && e[s].properties ? ee(e[s]) : We(e[s].default)), o), {});
|
|
10
|
+
return n && (!a || !r.find((o) => o == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
11
|
+
}
|
|
12
|
+
function be(t, e = {}, n) {
|
|
13
|
+
const r = ye[t];
|
|
14
14
|
if (r) {
|
|
15
|
-
let a =
|
|
16
|
-
const i =
|
|
17
|
-
return a = i ? i({ getSchemaByType:
|
|
15
|
+
let a = ee(r);
|
|
16
|
+
const i = we[t];
|
|
17
|
+
return a = i ? i({ getSchemaByType: be }, a, e, n) : a, a;
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const n =
|
|
23
|
-
return Object.keys(t).reduce((r, a) => (r[a] &&
|
|
21
|
+
function Ae(t, e) {
|
|
22
|
+
const n = ee(e);
|
|
23
|
+
return Object.keys(t).reduce((r, a) => (r[a] && ie(r[a]) && ie(t[a]) ? Object.assign(r[a], t[a]) : r[a] = t[a], r), n), n;
|
|
24
24
|
}
|
|
25
25
|
function $e(t, e) {
|
|
26
26
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, a) => {
|
|
@@ -37,11 +37,11 @@ function $e(t, e) {
|
|
|
37
37
|
return r;
|
|
38
38
|
}, {});
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const r =
|
|
40
|
+
function je(t, e, n = /* @__PURE__ */ new Map()) {
|
|
41
|
+
const r = Ae(t, e);
|
|
42
42
|
return $e(r, n);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function He(t = {}) {
|
|
45
45
|
function e(u, d, m, h) {
|
|
46
46
|
if (typeof m == "number")
|
|
47
47
|
return h[u].length === m;
|
|
@@ -90,16 +90,16 @@ function je(t = {}) {
|
|
|
90
90
|
return i(u).reduce((w, g) => w && o(g, d), !0);
|
|
91
91
|
}
|
|
92
92
|
function c(u, d) {
|
|
93
|
-
const m = Object.keys(u), h = m.includes("allOf"), w = m.includes("anyOf"), g = h || w, y = (g ? u[g ? h ? "allOf" : "anyOf" : "allOf"] : [u]).map((
|
|
93
|
+
const m = Object.keys(u), h = m.includes("allOf"), w = m.includes("anyOf"), g = h || w, y = (g ? u[g ? h ? "allOf" : "anyOf" : "allOf"] : [u]).map((v) => s(v, d));
|
|
94
94
|
return h ? !y.includes(!1) : y.includes(!0);
|
|
95
95
|
}
|
|
96
96
|
return { parseValueSchema: c };
|
|
97
97
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
98
|
+
const Ce = {}, Re = {};
|
|
99
|
+
He();
|
|
100
100
|
function qe(t, e, n = /* @__PURE__ */ new Map(), r = (o, s, c) => s, a = {}, i = (o) => o) {
|
|
101
|
-
return
|
|
102
|
-
const s =
|
|
101
|
+
return ye[e.title] = e, we[e.title] = r, Ce[e.title] = a, Re[e.title] = i, (o = {}) => {
|
|
102
|
+
const s = je(o, e, n), c = Object.keys(t).reduce((u, d) => (u[d] = t[d].default, u), {});
|
|
103
103
|
return Object.assign(c, s);
|
|
104
104
|
};
|
|
105
105
|
}
|
|
@@ -212,7 +212,7 @@ const Qe = "text", Xe = "A Farris Component", ze = "object", Ge = {
|
|
|
212
212
|
type: et,
|
|
213
213
|
properties: tt,
|
|
214
214
|
required: nt
|
|
215
|
-
},
|
|
215
|
+
}, te = {
|
|
216
216
|
// 组件值
|
|
217
217
|
modelValue: { type: [String, Number, Boolean], default: "" },
|
|
218
218
|
// 是否是密码
|
|
@@ -253,7 +253,7 @@ const Qe = "text", Xe = "A Farris Component", ze = "object", Ge = {
|
|
|
253
253
|
dateRangeDelimiter: { type: String, default: "~" },
|
|
254
254
|
// 枚举项的分隔符
|
|
255
255
|
enumDelimiter: { type: String, default: "," }
|
|
256
|
-
},
|
|
256
|
+
}, oe = qe(te, rt, Le, Ue, Ve), at = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }, it = { sun: 0, mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6 };
|
|
257
257
|
class De {
|
|
258
258
|
constructor() {
|
|
259
259
|
G(this, "regexes", {
|
|
@@ -376,40 +376,40 @@ class De {
|
|
|
376
376
|
return e == null ? Date.now() : e instanceof Date ? e : this.parse(e);
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function P(t) {
|
|
380
380
|
const e = Object.prototype.toString.call(t);
|
|
381
381
|
return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function W(t, e) {
|
|
384
384
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
385
385
|
}
|
|
386
386
|
const Me = 6048e5, ot = 864e5, Ne = 6e4, ve = 36e5;
|
|
387
387
|
let st = {};
|
|
388
|
-
function
|
|
388
|
+
function Q() {
|
|
389
389
|
return st;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function q(t, e) {
|
|
392
392
|
var s, c, u, d;
|
|
393
|
-
const n =
|
|
393
|
+
const n = Q(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, a = P(t), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
|
|
394
394
|
return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
return
|
|
396
|
+
function U(t) {
|
|
397
|
+
return q(t, { weekStartsOn: 1 });
|
|
398
398
|
}
|
|
399
399
|
function Oe(t) {
|
|
400
|
-
const e =
|
|
400
|
+
const e = P(t), n = e.getFullYear(), r = W(t, 0);
|
|
401
401
|
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
402
|
-
const a =
|
|
402
|
+
const a = U(r), i = W(t, 0);
|
|
403
403
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
404
|
-
const o =
|
|
404
|
+
const o = U(i);
|
|
405
405
|
return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= o.getTime() ? n : n - 1;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
const e =
|
|
407
|
+
function se(t) {
|
|
408
|
+
const e = P(t);
|
|
409
409
|
return e.setHours(0, 0, 0, 0), e;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
const e =
|
|
411
|
+
function ue(t) {
|
|
412
|
+
const e = P(t), n = new Date(
|
|
413
413
|
Date.UTC(
|
|
414
414
|
e.getFullYear(),
|
|
415
415
|
e.getMonth(),
|
|
@@ -423,12 +423,12 @@ function ce(t) {
|
|
|
423
423
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
424
424
|
}
|
|
425
425
|
function ut(t, e) {
|
|
426
|
-
const n =
|
|
426
|
+
const n = se(t), r = se(e), a = +n - ue(n), i = +r - ue(r);
|
|
427
427
|
return Math.round((a - i) / ot);
|
|
428
428
|
}
|
|
429
429
|
function ct(t) {
|
|
430
|
-
const e = Oe(t), n =
|
|
431
|
-
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0),
|
|
430
|
+
const e = Oe(t), n = W(t, 0);
|
|
431
|
+
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), U(n);
|
|
432
432
|
}
|
|
433
433
|
function lt(t) {
|
|
434
434
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
@@ -436,11 +436,11 @@ function lt(t) {
|
|
|
436
436
|
function xe(t) {
|
|
437
437
|
if (!lt(t) && typeof t != "number")
|
|
438
438
|
return !1;
|
|
439
|
-
const e =
|
|
439
|
+
const e = P(t);
|
|
440
440
|
return !isNaN(Number(e));
|
|
441
441
|
}
|
|
442
442
|
function ft(t) {
|
|
443
|
-
const e =
|
|
443
|
+
const e = P(t), n = W(t, 0);
|
|
444
444
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
445
445
|
}
|
|
446
446
|
const dt = {
|
|
@@ -552,7 +552,7 @@ const ht = {
|
|
|
552
552
|
nextWeek: "eeee 'at' p",
|
|
553
553
|
other: "P"
|
|
554
554
|
}, bt = (t, e, n, r) => wt[t];
|
|
555
|
-
function
|
|
555
|
+
function H(t) {
|
|
556
556
|
return (e, n) => {
|
|
557
557
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
558
558
|
let a;
|
|
@@ -692,40 +692,40 @@ const Dt = {
|
|
|
692
692
|
return n + "rd";
|
|
693
693
|
}
|
|
694
694
|
return n + "th";
|
|
695
|
-
},
|
|
695
|
+
}, Pt = {
|
|
696
696
|
ordinalNumber: Tt,
|
|
697
|
-
era:
|
|
697
|
+
era: H({
|
|
698
698
|
values: Dt,
|
|
699
699
|
defaultWidth: "wide"
|
|
700
700
|
}),
|
|
701
|
-
quarter:
|
|
701
|
+
quarter: H({
|
|
702
702
|
values: Mt,
|
|
703
703
|
defaultWidth: "wide",
|
|
704
704
|
argumentCallback: (t) => t - 1
|
|
705
705
|
}),
|
|
706
|
-
month:
|
|
706
|
+
month: H({
|
|
707
707
|
values: Nt,
|
|
708
708
|
defaultWidth: "wide"
|
|
709
709
|
}),
|
|
710
|
-
day:
|
|
710
|
+
day: H({
|
|
711
711
|
values: vt,
|
|
712
712
|
defaultWidth: "wide"
|
|
713
713
|
}),
|
|
714
|
-
dayPeriod:
|
|
714
|
+
dayPeriod: H({
|
|
715
715
|
values: Ot,
|
|
716
716
|
defaultWidth: "wide",
|
|
717
717
|
formattingValues: xt,
|
|
718
718
|
defaultFormattingWidth: "wide"
|
|
719
719
|
})
|
|
720
720
|
};
|
|
721
|
-
function
|
|
721
|
+
function C(t) {
|
|
722
722
|
return (e, n = {}) => {
|
|
723
723
|
const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = e.match(a);
|
|
724
724
|
if (!i)
|
|
725
725
|
return null;
|
|
726
726
|
const o = i[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? kt(s, (m) => m.test(o)) : (
|
|
727
727
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
728
|
-
|
|
728
|
+
St(s, (m) => m.test(o))
|
|
729
729
|
);
|
|
730
730
|
let u;
|
|
731
731
|
u = t.valueCallback ? t.valueCallback(c) : c, u = n.valueCallback ? (
|
|
@@ -736,7 +736,7 @@ function q(t) {
|
|
|
736
736
|
return { value: u, rest: d };
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function St(t, e) {
|
|
740
740
|
for (const n in t)
|
|
741
741
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
742
742
|
return n;
|
|
@@ -762,19 +762,19 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
762
762
|
narrow: /^(b|a)/i,
|
|
763
763
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
764
764
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
765
|
-
}, At = {
|
|
766
|
-
any: [/^b/i, /^(a|c)/i]
|
|
767
765
|
}, Wt = {
|
|
766
|
+
any: [/^b/i, /^(a|c)/i]
|
|
767
|
+
}, At = {
|
|
768
768
|
narrow: /^[1234]/i,
|
|
769
769
|
abbreviated: /^q[1234]/i,
|
|
770
770
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
771
771
|
}, $t = {
|
|
772
772
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
773
|
-
},
|
|
773
|
+
}, jt = {
|
|
774
774
|
narrow: /^[jfmasond]/i,
|
|
775
775
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
776
776
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
777
|
-
},
|
|
777
|
+
}, Ht = {
|
|
778
778
|
narrow: [
|
|
779
779
|
/^j/i,
|
|
780
780
|
/^f/i,
|
|
@@ -803,7 +803,7 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
803
803
|
/^n/i,
|
|
804
804
|
/^d/i
|
|
805
805
|
]
|
|
806
|
-
},
|
|
806
|
+
}, Ct = {
|
|
807
807
|
narrow: /^[smtwf]/i,
|
|
808
808
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
809
809
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
@@ -831,32 +831,32 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
831
831
|
parsePattern: Yt,
|
|
832
832
|
valueCallback: (t) => parseInt(t, 10)
|
|
833
833
|
}),
|
|
834
|
-
era:
|
|
834
|
+
era: C({
|
|
835
835
|
matchPatterns: Ft,
|
|
836
836
|
defaultMatchWidth: "wide",
|
|
837
|
-
parsePatterns:
|
|
837
|
+
parsePatterns: Wt,
|
|
838
838
|
defaultParseWidth: "any"
|
|
839
839
|
}),
|
|
840
|
-
quarter:
|
|
841
|
-
matchPatterns:
|
|
840
|
+
quarter: C({
|
|
841
|
+
matchPatterns: At,
|
|
842
842
|
defaultMatchWidth: "wide",
|
|
843
843
|
parsePatterns: $t,
|
|
844
844
|
defaultParseWidth: "any",
|
|
845
845
|
valueCallback: (t) => t + 1
|
|
846
846
|
}),
|
|
847
|
-
month:
|
|
848
|
-
matchPatterns:
|
|
847
|
+
month: C({
|
|
848
|
+
matchPatterns: jt,
|
|
849
849
|
defaultMatchWidth: "wide",
|
|
850
|
-
parsePatterns:
|
|
850
|
+
parsePatterns: Ht,
|
|
851
851
|
defaultParseWidth: "any"
|
|
852
852
|
}),
|
|
853
|
-
day:
|
|
854
|
-
matchPatterns:
|
|
853
|
+
day: C({
|
|
854
|
+
matchPatterns: Ct,
|
|
855
855
|
defaultMatchWidth: "wide",
|
|
856
856
|
parsePatterns: Rt,
|
|
857
857
|
defaultParseWidth: "any"
|
|
858
858
|
}),
|
|
859
|
-
dayPeriod:
|
|
859
|
+
dayPeriod: C({
|
|
860
860
|
matchPatterns: qt,
|
|
861
861
|
defaultMatchWidth: "any",
|
|
862
862
|
parsePatterns: Bt,
|
|
@@ -867,7 +867,7 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
867
867
|
formatDistance: mt,
|
|
868
868
|
formatLong: yt,
|
|
869
869
|
formatRelative: bt,
|
|
870
|
-
localize:
|
|
870
|
+
localize: Pt,
|
|
871
871
|
match: Lt,
|
|
872
872
|
options: {
|
|
873
873
|
weekStartsOn: 0,
|
|
@@ -875,36 +875,36 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
877
|
function Qt(t) {
|
|
878
|
-
const e =
|
|
878
|
+
const e = P(t);
|
|
879
879
|
return ut(e, ft(e)) + 1;
|
|
880
880
|
}
|
|
881
881
|
function Xt(t) {
|
|
882
|
-
const e =
|
|
882
|
+
const e = P(t), n = +U(e) - +ct(e);
|
|
883
883
|
return Math.round(n / Me) + 1;
|
|
884
884
|
}
|
|
885
885
|
function Te(t, e) {
|
|
886
886
|
var d, m, h, w;
|
|
887
|
-
const n =
|
|
887
|
+
const n = P(t), r = n.getFullYear(), a = Q(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((m = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : m.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, o = W(t, 0);
|
|
888
888
|
o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
|
|
889
|
-
const s =
|
|
889
|
+
const s = q(o, e), c = W(t, 0);
|
|
890
890
|
c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
|
|
891
|
-
const u =
|
|
891
|
+
const u = q(c, e);
|
|
892
892
|
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
|
|
893
893
|
}
|
|
894
894
|
function zt(t, e) {
|
|
895
895
|
var s, c, u, d;
|
|
896
|
-
const n =
|
|
897
|
-
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0),
|
|
896
|
+
const n = Q(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, a = Te(t, e), i = W(t, 0);
|
|
897
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), q(i, e);
|
|
898
898
|
}
|
|
899
899
|
function Gt(t, e) {
|
|
900
|
-
const n =
|
|
900
|
+
const n = P(t), r = +q(n, e) - +zt(n, e);
|
|
901
901
|
return Math.round(r / Me) + 1;
|
|
902
902
|
}
|
|
903
903
|
function p(t, e) {
|
|
904
904
|
const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
|
|
905
905
|
return n + r;
|
|
906
906
|
}
|
|
907
|
-
const
|
|
907
|
+
const _ = {
|
|
908
908
|
// Year
|
|
909
909
|
y(t, e) {
|
|
910
910
|
const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -958,7 +958,7 @@ const F = {
|
|
|
958
958
|
);
|
|
959
959
|
return p(a, e.length);
|
|
960
960
|
}
|
|
961
|
-
},
|
|
961
|
+
}, $ = {
|
|
962
962
|
am: "am",
|
|
963
963
|
pm: "pm",
|
|
964
964
|
midnight: "midnight",
|
|
@@ -967,7 +967,7 @@ const F = {
|
|
|
967
967
|
afternoon: "afternoon",
|
|
968
968
|
evening: "evening",
|
|
969
969
|
night: "night"
|
|
970
|
-
},
|
|
970
|
+
}, ce = {
|
|
971
971
|
// Era
|
|
972
972
|
G: function(t, e, n) {
|
|
973
973
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -989,7 +989,7 @@ const F = {
|
|
|
989
989
|
const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
990
990
|
return n.ordinalNumber(a, { unit: "year" });
|
|
991
991
|
}
|
|
992
|
-
return
|
|
992
|
+
return _.y(t, e);
|
|
993
993
|
},
|
|
994
994
|
// Local week-numbering year
|
|
995
995
|
Y: function(t, e, n, r) {
|
|
@@ -1080,7 +1080,7 @@ const F = {
|
|
|
1080
1080
|
switch (e) {
|
|
1081
1081
|
case "M":
|
|
1082
1082
|
case "MM":
|
|
1083
|
-
return
|
|
1083
|
+
return _.M(t, e);
|
|
1084
1084
|
case "Mo":
|
|
1085
1085
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
1086
1086
|
case "MMM":
|
|
@@ -1135,7 +1135,7 @@ const F = {
|
|
|
1135
1135
|
},
|
|
1136
1136
|
// Day of the month
|
|
1137
1137
|
d: function(t, e, n) {
|
|
1138
|
-
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1138
|
+
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : _.d(t, e);
|
|
1139
1139
|
},
|
|
1140
1140
|
// Day of year
|
|
1141
1141
|
D: function(t, e, n) {
|
|
@@ -1302,7 +1302,7 @@ const F = {
|
|
|
1302
1302
|
b: function(t, e, n) {
|
|
1303
1303
|
const r = t.getHours();
|
|
1304
1304
|
let a;
|
|
1305
|
-
switch (r === 12 ? a =
|
|
1305
|
+
switch (r === 12 ? a = $.noon : r === 0 ? a = $.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
|
|
1306
1306
|
case "b":
|
|
1307
1307
|
case "bb":
|
|
1308
1308
|
return n.dayPeriod(a, {
|
|
@@ -1331,7 +1331,7 @@ const F = {
|
|
|
1331
1331
|
B: function(t, e, n) {
|
|
1332
1332
|
const r = t.getHours();
|
|
1333
1333
|
let a;
|
|
1334
|
-
switch (r >= 17 ? a =
|
|
1334
|
+
switch (r >= 17 ? a = $.evening : r >= 12 ? a = $.afternoon : r >= 4 ? a = $.morning : a = $.night, e) {
|
|
1335
1335
|
case "B":
|
|
1336
1336
|
case "BB":
|
|
1337
1337
|
case "BBB":
|
|
@@ -1358,11 +1358,11 @@ const F = {
|
|
|
1358
1358
|
let r = t.getHours() % 12;
|
|
1359
1359
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return _.h(t, e);
|
|
1362
1362
|
},
|
|
1363
1363
|
// Hour [0-23]
|
|
1364
1364
|
H: function(t, e, n) {
|
|
1365
|
-
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1365
|
+
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : _.H(t, e);
|
|
1366
1366
|
},
|
|
1367
1367
|
// Hour [0-11]
|
|
1368
1368
|
K: function(t, e, n) {
|
|
@@ -1376,15 +1376,15 @@ const F = {
|
|
|
1376
1376
|
},
|
|
1377
1377
|
// Minute
|
|
1378
1378
|
m: function(t, e, n) {
|
|
1379
|
-
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1379
|
+
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : _.m(t, e);
|
|
1380
1380
|
},
|
|
1381
1381
|
// Second
|
|
1382
1382
|
s: function(t, e, n) {
|
|
1383
|
-
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1383
|
+
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : _.s(t, e);
|
|
1384
1384
|
},
|
|
1385
1385
|
// Fraction of second
|
|
1386
1386
|
S: function(t, e) {
|
|
1387
|
-
return
|
|
1387
|
+
return _.S(t, e);
|
|
1388
1388
|
},
|
|
1389
1389
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1390
1390
|
X: function(t, e, n) {
|
|
@@ -1393,14 +1393,14 @@ const F = {
|
|
|
1393
1393
|
return "Z";
|
|
1394
1394
|
switch (e) {
|
|
1395
1395
|
case "X":
|
|
1396
|
-
return
|
|
1396
|
+
return fe(r);
|
|
1397
1397
|
case "XXXX":
|
|
1398
1398
|
case "XX":
|
|
1399
|
-
return
|
|
1399
|
+
return F(r);
|
|
1400
1400
|
case "XXXXX":
|
|
1401
1401
|
case "XXX":
|
|
1402
1402
|
default:
|
|
1403
|
-
return
|
|
1403
|
+
return F(r, ":");
|
|
1404
1404
|
}
|
|
1405
1405
|
},
|
|
1406
1406
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1408,14 +1408,14 @@ const F = {
|
|
|
1408
1408
|
const r = t.getTimezoneOffset();
|
|
1409
1409
|
switch (e) {
|
|
1410
1410
|
case "x":
|
|
1411
|
-
return
|
|
1411
|
+
return fe(r);
|
|
1412
1412
|
case "xxxx":
|
|
1413
1413
|
case "xx":
|
|
1414
|
-
return
|
|
1414
|
+
return F(r);
|
|
1415
1415
|
case "xxxxx":
|
|
1416
1416
|
case "xxx":
|
|
1417
1417
|
default:
|
|
1418
|
-
return
|
|
1418
|
+
return F(r, ":");
|
|
1419
1419
|
}
|
|
1420
1420
|
},
|
|
1421
1421
|
// Timezone (GMT)
|
|
@@ -1425,10 +1425,10 @@ const F = {
|
|
|
1425
1425
|
case "O":
|
|
1426
1426
|
case "OO":
|
|
1427
1427
|
case "OOO":
|
|
1428
|
-
return "GMT" +
|
|
1428
|
+
return "GMT" + le(r, ":");
|
|
1429
1429
|
case "OOOO":
|
|
1430
1430
|
default:
|
|
1431
|
-
return "GMT" +
|
|
1431
|
+
return "GMT" + F(r, ":");
|
|
1432
1432
|
}
|
|
1433
1433
|
},
|
|
1434
1434
|
// Timezone (specific non-location)
|
|
@@ -1438,10 +1438,10 @@ const F = {
|
|
|
1438
1438
|
case "z":
|
|
1439
1439
|
case "zz":
|
|
1440
1440
|
case "zzz":
|
|
1441
|
-
return "GMT" +
|
|
1441
|
+
return "GMT" + le(r, ":");
|
|
1442
1442
|
case "zzzz":
|
|
1443
1443
|
default:
|
|
1444
|
-
return "GMT" +
|
|
1444
|
+
return "GMT" + F(r, ":");
|
|
1445
1445
|
}
|
|
1446
1446
|
},
|
|
1447
1447
|
// Seconds timestamp
|
|
@@ -1455,18 +1455,18 @@ const F = {
|
|
|
1455
1455
|
return p(r, e.length);
|
|
1456
1456
|
}
|
|
1457
1457
|
};
|
|
1458
|
-
function
|
|
1458
|
+
function le(t, e = "") {
|
|
1459
1459
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), i = r % 60;
|
|
1460
1460
|
return i === 0 ? n + String(a) : n + String(a) + e + p(i, 2);
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1463
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) :
|
|
1462
|
+
function fe(t, e) {
|
|
1463
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) : F(t, e);
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function F(t, e = "") {
|
|
1466
1466
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = p(Math.trunc(r / 60), 2), i = p(r % 60, 2);
|
|
1467
1467
|
return n + a + e + i;
|
|
1468
1468
|
}
|
|
1469
|
-
const
|
|
1469
|
+
const de = (t, e) => {
|
|
1470
1470
|
switch (t) {
|
|
1471
1471
|
case "P":
|
|
1472
1472
|
return e.date({ width: "short" });
|
|
@@ -1478,7 +1478,7 @@ const me = (t, e) => {
|
|
|
1478
1478
|
default:
|
|
1479
1479
|
return e.date({ width: "full" });
|
|
1480
1480
|
}
|
|
1481
|
-
},
|
|
1481
|
+
}, Pe = (t, e) => {
|
|
1482
1482
|
switch (t) {
|
|
1483
1483
|
case "p":
|
|
1484
1484
|
return e.time({ width: "short" });
|
|
@@ -1493,7 +1493,7 @@ const me = (t, e) => {
|
|
|
1493
1493
|
}, Vt = (t, e) => {
|
|
1494
1494
|
const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1495
1495
|
if (!a)
|
|
1496
|
-
return
|
|
1496
|
+
return de(t, e);
|
|
1497
1497
|
let i;
|
|
1498
1498
|
switch (r) {
|
|
1499
1499
|
case "P":
|
|
@@ -1510,9 +1510,9 @@ const me = (t, e) => {
|
|
|
1510
1510
|
i = e.dateTime({ width: "full" });
|
|
1511
1511
|
break;
|
|
1512
1512
|
}
|
|
1513
|
-
return i.replace("{{date}}",
|
|
1513
|
+
return i.replace("{{date}}", de(r, e)).replace("{{time}}", Pe(a, e));
|
|
1514
1514
|
}, Zt = {
|
|
1515
|
-
p:
|
|
1515
|
+
p: Pe,
|
|
1516
1516
|
P: Vt
|
|
1517
1517
|
}, Jt = /^D+$/, It = /^Y+$/, Kt = ["D", "DD", "YY", "YYYY"];
|
|
1518
1518
|
function en(t) {
|
|
@@ -1530,9 +1530,9 @@ function rn(t, e, n) {
|
|
|
1530
1530
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1531
1531
|
}
|
|
1532
1532
|
const an = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, on = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, sn = /^'([^]*?)'?$/, un = /''/g, cn = /[a-zA-Z]/;
|
|
1533
|
-
function
|
|
1533
|
+
function B(t, e, n) {
|
|
1534
1534
|
var d, m, h, w;
|
|
1535
|
-
const r =
|
|
1535
|
+
const r = Q(), a = r.locale ?? Ut, i = r.firstWeekContainsDate ?? ((m = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, o = r.weekStartsOn ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.weekStartsOn) ?? 0, s = P(t);
|
|
1536
1536
|
if (!xe(s))
|
|
1537
1537
|
throw new RangeError("Invalid time value");
|
|
1538
1538
|
let c = e.match(on).map((g) => {
|
|
@@ -1548,7 +1548,7 @@ function U(t, e, n) {
|
|
|
1548
1548
|
const f = g[0];
|
|
1549
1549
|
if (f === "'")
|
|
1550
1550
|
return { isToken: !1, value: ln(g) };
|
|
1551
|
-
if (
|
|
1551
|
+
if (ce[f])
|
|
1552
1552
|
return { isToken: !0, value: g };
|
|
1553
1553
|
if (f.match(cn))
|
|
1554
1554
|
throw new RangeError(
|
|
@@ -1566,7 +1566,7 @@ function U(t, e, n) {
|
|
|
1566
1566
|
if (!g.isToken) return g.value;
|
|
1567
1567
|
const f = g.value;
|
|
1568
1568
|
(tn(f) || en(f)) && nn(f, e, String(t));
|
|
1569
|
-
const l =
|
|
1569
|
+
const l = ce[f[0]];
|
|
1570
1570
|
return l(s, f, a.localize, u);
|
|
1571
1571
|
}).join("");
|
|
1572
1572
|
}
|
|
@@ -1605,21 +1605,21 @@ function Z(t, e) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
return new Date(i + o + s);
|
|
1607
1607
|
}
|
|
1608
|
-
const
|
|
1608
|
+
const L = {
|
|
1609
1609
|
dateTimeDelimiter: /[T ]/,
|
|
1610
1610
|
timeZoneDelimiter: /[Z ]/i,
|
|
1611
1611
|
timezone: /([Z+-].*)$/
|
|
1612
1612
|
}, fn = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, dn = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, mn = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
1613
1613
|
function hn(t) {
|
|
1614
|
-
const e = {}, n = t.split(
|
|
1614
|
+
const e = {}, n = t.split(L.dateTimeDelimiter);
|
|
1615
1615
|
let r;
|
|
1616
1616
|
if (n.length > 2)
|
|
1617
1617
|
return e;
|
|
1618
|
-
if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1],
|
|
1618
|
+
if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1], L.timeZoneDelimiter.test(e.date) && (e.date = t.split(L.timeZoneDelimiter)[0], r = t.substr(
|
|
1619
1619
|
e.date.length,
|
|
1620
1620
|
t.length
|
|
1621
1621
|
))), r) {
|
|
1622
|
-
const a =
|
|
1622
|
+
const a = L.timezone.exec(r);
|
|
1623
1623
|
a ? (e.time = r.replace(a[1], ""), e.timezone = a[1]) : e.time = r;
|
|
1624
1624
|
}
|
|
1625
1625
|
return e;
|
|
@@ -1639,7 +1639,7 @@ function pn(t, e) {
|
|
|
1639
1639
|
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
1640
1640
|
const n = t.match(fn);
|
|
1641
1641
|
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
1642
|
-
const r = !!n[4], a =
|
|
1642
|
+
const r = !!n[4], a = R(n[1]), i = R(n[2]) - 1, o = R(n[3]), s = R(n[4]), c = R(n[5]) - 1;
|
|
1643
1643
|
if (r)
|
|
1644
1644
|
return vn(e, s, c) ? bn(e, s, c) : /* @__PURE__ */ new Date(NaN);
|
|
1645
1645
|
{
|
|
@@ -1647,7 +1647,7 @@ function pn(t, e) {
|
|
|
1647
1647
|
return !Mn(e, i, o) || !Nn(e, a) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, i, Math.max(a, o)), u);
|
|
1648
1648
|
}
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function R(t) {
|
|
1651
1651
|
return t ? parseInt(t) : 1;
|
|
1652
1652
|
}
|
|
1653
1653
|
function yn(t) {
|
|
@@ -1673,14 +1673,14 @@ function bn(t, e, n) {
|
|
|
1673
1673
|
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
1674
1674
|
}
|
|
1675
1675
|
const Dn = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1676
|
-
function
|
|
1676
|
+
function Se(t) {
|
|
1677
1677
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1678
1678
|
}
|
|
1679
1679
|
function Mn(t, e, n) {
|
|
1680
|
-
return e >= 0 && e <= 11 && n >= 1 && n <= (Dn[e] || (
|
|
1680
|
+
return e >= 0 && e <= 11 && n >= 1 && n <= (Dn[e] || (Se(t) ? 29 : 28));
|
|
1681
1681
|
}
|
|
1682
1682
|
function Nn(t, e) {
|
|
1683
|
-
return e >= 1 && e <= (
|
|
1683
|
+
return e >= 1 && e <= (Se(t) ? 366 : 365);
|
|
1684
1684
|
}
|
|
1685
1685
|
function vn(t, e, n) {
|
|
1686
1686
|
return e >= 1 && e <= 53 && n >= 0 && n <= 6;
|
|
@@ -1698,15 +1698,15 @@ function Tn() {
|
|
|
1698
1698
|
if (!n || typeof n == "string" && n.indexOf("0001") === 0)
|
|
1699
1699
|
return "";
|
|
1700
1700
|
if (n instanceof Date)
|
|
1701
|
-
return
|
|
1701
|
+
return B(n, r);
|
|
1702
1702
|
let a = Z(n);
|
|
1703
1703
|
if (a == "Invalid Date" && (a = t.create(n) || new Date(n)), xe(a))
|
|
1704
|
-
return a = Z(
|
|
1704
|
+
return a = Z(B(a, "yyyy-MM-dd HH:mm:ss")), B(a, r);
|
|
1705
1705
|
if (r.indexOf("HH") === 0 || r.indexOf("hh") === 0) {
|
|
1706
1706
|
const o = (i = n.match(/\d*/g)) == null ? void 0 : i.filter((c) => c !== "").join(":");
|
|
1707
1707
|
(r === "HH" || r === "hh") && (r += ":mm");
|
|
1708
1708
|
const s = Z("2024-06-05 " + o);
|
|
1709
|
-
return
|
|
1709
|
+
return B(s, r);
|
|
1710
1710
|
}
|
|
1711
1711
|
return "";
|
|
1712
1712
|
}
|
|
@@ -1714,77 +1714,77 @@ function Tn() {
|
|
|
1714
1714
|
formatTo: e
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1717
|
+
function Pn() {
|
|
1718
1718
|
function t(f, l = null) {
|
|
1719
|
-
return Array.isArray(f) ?
|
|
1719
|
+
return Array.isArray(f) ? M.max.apply(null, f).toFixed() : f && l ? M.maximum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1720
1720
|
}
|
|
1721
1721
|
function e(f, l = null) {
|
|
1722
|
-
return Array.isArray(f) ?
|
|
1722
|
+
return Array.isArray(f) ? M.min.apply(null, f).toFixed() : f && l ? M.minimum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1723
1723
|
}
|
|
1724
1724
|
function n(f) {
|
|
1725
|
-
return
|
|
1725
|
+
return M.sum.apply(null, f).toFixed();
|
|
1726
1726
|
}
|
|
1727
1727
|
function r(f, l) {
|
|
1728
|
-
return new
|
|
1728
|
+
return new M(f).div(l).toFixed();
|
|
1729
1729
|
}
|
|
1730
1730
|
function a(f, l) {
|
|
1731
|
-
return new
|
|
1731
|
+
return new M(f).plus(l).toFixed();
|
|
1732
1732
|
}
|
|
1733
1733
|
function i(f, l) {
|
|
1734
|
-
return new
|
|
1734
|
+
return new M(f).times(l).toFixed();
|
|
1735
1735
|
}
|
|
1736
1736
|
function o(f, l) {
|
|
1737
|
-
return new
|
|
1737
|
+
return new M(f).minus(l).toFixed();
|
|
1738
1738
|
}
|
|
1739
1739
|
function s(f, l) {
|
|
1740
|
-
return new
|
|
1740
|
+
return new M(f).eq(l);
|
|
1741
1741
|
}
|
|
1742
1742
|
function c(f, l) {
|
|
1743
|
-
return new
|
|
1743
|
+
return new M(f).lt(l);
|
|
1744
1744
|
}
|
|
1745
1745
|
function u(f, l) {
|
|
1746
|
-
return new
|
|
1746
|
+
return new M(f).gt(l);
|
|
1747
1747
|
}
|
|
1748
1748
|
function d(f) {
|
|
1749
|
-
return new
|
|
1749
|
+
return new M(f).toNumber();
|
|
1750
1750
|
}
|
|
1751
1751
|
function m(f, l = 0) {
|
|
1752
|
-
return new
|
|
1752
|
+
return new M(f).toFixed(l);
|
|
1753
1753
|
}
|
|
1754
1754
|
function h(f) {
|
|
1755
|
-
const l = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"), y = new Array("", "拾", "佰", "仟"), S = new Array("", "万", "亿", "兆"),
|
|
1756
|
-
let
|
|
1755
|
+
const l = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"), y = new Array("", "拾", "佰", "仟"), S = new Array("", "万", "亿", "兆"), v = new Array("角", "分", "毫", "厘"), k = "整", b = "元", T = 1e15;
|
|
1756
|
+
let N, x, O = "", X;
|
|
1757
1757
|
if (f == "")
|
|
1758
1758
|
return "";
|
|
1759
|
-
const
|
|
1760
|
-
if (
|
|
1759
|
+
const z = parseFloat(f);
|
|
1760
|
+
if (z >= T)
|
|
1761
1761
|
return "";
|
|
1762
|
-
if (
|
|
1763
|
-
return
|
|
1764
|
-
if (f =
|
|
1765
|
-
let
|
|
1766
|
-
const
|
|
1767
|
-
for (let
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1762
|
+
if (z === 0)
|
|
1763
|
+
return O = l[0] + b + k, O;
|
|
1764
|
+
if (f = z.toString(), f.indexOf(".") === -1 ? (N = f, x = "") : (X = f.split("."), N = X[0], x = X[1].substr(0, 4)), parseInt(N, 10) > 0) {
|
|
1765
|
+
let A = 0;
|
|
1766
|
+
const E = N.length;
|
|
1767
|
+
for (let Y = 0; Y < E; Y++) {
|
|
1768
|
+
const ne = N.substr(Y, 1), re = E - Y - 1, ke = re / 4, ae = re % 4;
|
|
1769
|
+
ne == "0" ? A++ : (A > 0 && (O += l[0]), A = 0, O += l[parseInt(ne, 10)] + y[ae]), ae == 0 && A < 4 && (O += S[ke]);
|
|
1770
1770
|
}
|
|
1771
|
-
|
|
1771
|
+
O += b;
|
|
1772
1772
|
}
|
|
1773
|
-
if (
|
|
1774
|
-
const
|
|
1775
|
-
for (let
|
|
1776
|
-
let
|
|
1777
|
-
|
|
1773
|
+
if (x !== "") {
|
|
1774
|
+
const A = x.length;
|
|
1775
|
+
for (let E = 0; E < A; E++) {
|
|
1776
|
+
let Y = x.substr(E, 1);
|
|
1777
|
+
Y !== "0" && (O += l[Number(Y)] + v[E]);
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
return
|
|
1780
|
+
return O === "" ? O += l[0] + b + k : x === "" && (O += k), O;
|
|
1781
1781
|
}
|
|
1782
1782
|
function w(f, l) {
|
|
1783
1783
|
var y = f == null || typeof f == "number" && isNaN(f) ? "" : String(f);
|
|
1784
1784
|
return l && (l.prefix && (y = y.replace(new RegExp(l.prefix, "g"), "")), l.suffix && (y = y.replace(new RegExp(l.suffix, "g"), "")), y = y.replace(/\,/g, "")), y;
|
|
1785
1785
|
}
|
|
1786
1786
|
function g(f, l) {
|
|
1787
|
-
const y = new
|
|
1787
|
+
const y = new M(f), S = {
|
|
1788
1788
|
prefix: l.prefix || "",
|
|
1789
1789
|
suffix: l.suffix || "",
|
|
1790
1790
|
decimalSeparator: l.decimalSeparator || ".",
|
|
@@ -1793,8 +1793,8 @@ function Sn() {
|
|
|
1793
1793
|
};
|
|
1794
1794
|
if (y.isNaN())
|
|
1795
1795
|
return "";
|
|
1796
|
-
let
|
|
1797
|
-
return
|
|
1796
|
+
let v = l.precision || 0;
|
|
1797
|
+
return v = Number(v), y.toFormat(v, S);
|
|
1798
1798
|
}
|
|
1799
1799
|
return {
|
|
1800
1800
|
formatTo: g,
|
|
@@ -1814,7 +1814,7 @@ function Sn() {
|
|
|
1814
1814
|
max: t
|
|
1815
1815
|
};
|
|
1816
1816
|
}
|
|
1817
|
-
const
|
|
1817
|
+
const Sn = ["秒", "分钟", "小时", "天", "周", "个月", "年"], I = [
|
|
1818
1818
|
60,
|
|
1819
1819
|
// 60 seconds in 1 min
|
|
1820
1820
|
60,
|
|
@@ -1832,7 +1832,7 @@ function kn() {
|
|
|
1832
1832
|
const t = new De();
|
|
1833
1833
|
function e(o, s) {
|
|
1834
1834
|
if (s === 0) return ["刚刚", "片刻后"];
|
|
1835
|
-
const c =
|
|
1835
|
+
const c = Sn[~~(s / 2)];
|
|
1836
1836
|
return [`${o} ${c}前`, `${o} ${c}后`];
|
|
1837
1837
|
}
|
|
1838
1838
|
function n(o) {
|
|
@@ -1885,7 +1885,7 @@ function Fn(t) {
|
|
|
1885
1885
|
let e;
|
|
1886
1886
|
return /Y/g.test(t) === !0 ? e = t.replace(/Y/g, "y") : e = t, /D/g.test(e) === !0 && (e = e.replace(/D/g, "d")), e;
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function Wn(t, e, n, r, a) {
|
|
1889
1889
|
if (t == null || t === "")
|
|
1890
1890
|
return "";
|
|
1891
1891
|
if (e && e.length) {
|
|
@@ -1898,23 +1898,23 @@ function An(t, e, n, r, a) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
return t;
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1901
|
+
function me(t, e) {
|
|
1902
1902
|
let n;
|
|
1903
1903
|
return e || (e = "YYYY-MM-DD"), e === "timeago" ? kn().formatTo(t) : (e === "hh:mm:ss" || e === "HH:mm:ss" ? n = t : n = Tn().formatTo(t, Fn(e)), n);
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function An(t, e) {
|
|
1906
1906
|
return !t && !e || e && e.type && e.type === "number" && (e.formatter || (e.useThousands ? e.precision !== void 0 ? t = "n" + e.precision : t = "n2" : e.precision !== void 0 ? t = "f" + e.precision : t = "f2")), t;
|
|
1907
1907
|
}
|
|
1908
1908
|
function $n(t) {
|
|
1909
1909
|
return t.replace(/[a-z]+/g, (e) => e.toUpperCase());
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1911
|
+
function jn(t, e, n) {
|
|
1912
1912
|
return t.toString().indexOf(".") > -1 ? (console.warn("十进制转换仅限整型类型"), "") : (Array(e).join(n) + t).slice(-e);
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Hn(t, e) {
|
|
1915
1915
|
return Number(t * 100).toFixed(Number(e)) + "%";
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1917
|
+
function Cn(t, e, n, r, a, i, o) {
|
|
1918
1918
|
if (!e && !n)
|
|
1919
1919
|
return t.toString();
|
|
1920
1920
|
if (n && n.type && n.type === "number" && n.formatter)
|
|
@@ -1926,13 +1926,13 @@ function Hn(t, e, n, r, a, i, o) {
|
|
|
1926
1926
|
return;
|
|
1927
1927
|
}
|
|
1928
1928
|
r && Object.assign(u, { groupSeparator: r }), a && Object.assign(u, { decimalSeparator: a }), i && Object.assign(u, { format: i });
|
|
1929
|
-
const { formatTo: m } =
|
|
1929
|
+
const { formatTo: m } = Pn();
|
|
1930
1930
|
switch (s) {
|
|
1931
1931
|
case "C":
|
|
1932
1932
|
Object.assign(u, { prefix: "¥", precision: c }), d = m(t, u);
|
|
1933
1933
|
break;
|
|
1934
1934
|
case "D":
|
|
1935
|
-
d =
|
|
1935
|
+
d = jn(t, c, o);
|
|
1936
1936
|
break;
|
|
1937
1937
|
case "F":
|
|
1938
1938
|
Object.assign(u, { prefix: "", groupSeparator: "", precision: c }), d = m(t, u);
|
|
@@ -1941,7 +1941,7 @@ function Hn(t, e, n, r, a, i, o) {
|
|
|
1941
1941
|
Object.assign(u, { prefix: "", precision: c }), d = m(t, u);
|
|
1942
1942
|
break;
|
|
1943
1943
|
case "P":
|
|
1944
|
-
d =
|
|
1944
|
+
d = Hn(t, c);
|
|
1945
1945
|
break;
|
|
1946
1946
|
}
|
|
1947
1947
|
return d;
|
|
@@ -1949,28 +1949,28 @@ function Hn(t, e, n, r, a, i, o) {
|
|
|
1949
1949
|
function Rn(t) {
|
|
1950
1950
|
return t === !0 ? "是" : t === !1 || t == null || t === "" || typeof t > "u" ? "否" : t;
|
|
1951
1951
|
}
|
|
1952
|
-
const K = /* @__PURE__ */
|
|
1952
|
+
const K = /* @__PURE__ */ he({
|
|
1953
1953
|
name: "FText",
|
|
1954
|
-
props:
|
|
1954
|
+
props: te,
|
|
1955
1955
|
emits: ["update:modelValue", "valueChange"],
|
|
1956
1956
|
setup(t, e) {
|
|
1957
|
-
const n =
|
|
1957
|
+
const n = D(t.textarea), r = D(t.password), a = D(t.autoSize), i = D(t.dateRange), o = D(t.type), s = D(t.format), c = D(), u = D(), d = D(""), m = j(() => ({
|
|
1958
1958
|
"f-form-control-text": !n.value,
|
|
1959
1959
|
"f-form-context-textarea": n,
|
|
1960
1960
|
"f-component-text-auto-size": a.value
|
|
1961
|
-
})), h =
|
|
1961
|
+
})), h = j(() => ({
|
|
1962
1962
|
"text-align": t.textAlign,
|
|
1963
1963
|
height: !a.value && t.height > 0 ? `${t.height}px` : "",
|
|
1964
1964
|
"min-height": a.value && t.height > 0 ? `${t.height}px` : "",
|
|
1965
1965
|
"max-height": a.value && t.maxHeight > 0 ? `${t.maxHeight}px` : ""
|
|
1966
1966
|
}));
|
|
1967
|
-
|
|
1967
|
+
ge(() => {
|
|
1968
1968
|
if (n.value) {
|
|
1969
1969
|
const l = u.value.parentElement.className;
|
|
1970
1970
|
u.value.parentElement.className = l + " f-cmp-text-is-textarea";
|
|
1971
1971
|
}
|
|
1972
1972
|
});
|
|
1973
|
-
const w =
|
|
1973
|
+
const w = j(() => {
|
|
1974
1974
|
let l = g(t.modelValue);
|
|
1975
1975
|
return c.value != l && (e.emit("valueChange", l), c.value = l), l;
|
|
1976
1976
|
});
|
|
@@ -1987,21 +1987,21 @@ const K = /* @__PURE__ */ ge({
|
|
|
1987
1987
|
case "date":
|
|
1988
1988
|
case "datetime":
|
|
1989
1989
|
if (!i.value)
|
|
1990
|
-
y =
|
|
1990
|
+
y = me(l, s.value);
|
|
1991
1991
|
else {
|
|
1992
1992
|
let S = t.dateRangeDelimiter;
|
|
1993
|
-
const
|
|
1993
|
+
const v = l.split(S);
|
|
1994
1994
|
let k = [];
|
|
1995
|
-
|
|
1996
|
-
k.push(
|
|
1995
|
+
v && v.length && v.forEach((b) => {
|
|
1996
|
+
k.push(me(b, s.value));
|
|
1997
1997
|
}), y = k.join(S);
|
|
1998
1998
|
}
|
|
1999
1999
|
break;
|
|
2000
2000
|
case "number":
|
|
2001
|
-
s.value =
|
|
2001
|
+
s.value = An(s.value, t.numberOptions), y = Cn(l, s.value, t.numberOptions, t.groupSeparator, t.decimalSeparator, t.amountExpression, t.decimalFilledSymbol);
|
|
2002
2002
|
break;
|
|
2003
2003
|
case "enum":
|
|
2004
|
-
y =
|
|
2004
|
+
y = Wn(l, t.enumConvertedDatas, t.enumDelimiter, t.textField, t.valueField);
|
|
2005
2005
|
break;
|
|
2006
2006
|
case "boolean":
|
|
2007
2007
|
y = Rn(l);
|
|
@@ -2015,7 +2015,7 @@ const K = /* @__PURE__ */ ge({
|
|
|
2015
2015
|
}
|
|
2016
2016
|
return Ye(() => t.modelValue, (l, y) => {
|
|
2017
2017
|
l !== y && e.emit("update:modelValue", l);
|
|
2018
|
-
}), () =>
|
|
2018
|
+
}), () => pe("span", {
|
|
2019
2019
|
class: m.value,
|
|
2020
2020
|
style: h.value,
|
|
2021
2021
|
ref: u,
|
|
@@ -2025,10 +2025,10 @@ const K = /* @__PURE__ */ ge({
|
|
|
2025
2025
|
}
|
|
2026
2026
|
});
|
|
2027
2027
|
function qn(t, e, n) {
|
|
2028
|
-
var
|
|
2028
|
+
var k;
|
|
2029
2029
|
function r() {
|
|
2030
2030
|
}
|
|
2031
|
-
const a = "", i = "", o =
|
|
2031
|
+
const a = "", i = "", o = D();
|
|
2032
2032
|
function s() {
|
|
2033
2033
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
2034
2034
|
}
|
|
@@ -2046,12 +2046,12 @@ function qn(t, e, n) {
|
|
|
2046
2046
|
return null;
|
|
2047
2047
|
if (b.value.schema && b.value.schema.type === "component")
|
|
2048
2048
|
return b.value;
|
|
2049
|
-
const
|
|
2049
|
+
const T = D(b == null ? void 0 : b.value.parent), N = m(T);
|
|
2050
2050
|
return N || null;
|
|
2051
2051
|
}
|
|
2052
2052
|
function h(b = e) {
|
|
2053
|
-
const { componentInstance:
|
|
2054
|
-
return !
|
|
2053
|
+
const { componentInstance: T, designerItemElementRef: N } = b;
|
|
2054
|
+
return !T || !T.value ? null : T.value.canMove ? N : h(b.parent);
|
|
2055
2055
|
}
|
|
2056
2056
|
function w(b) {
|
|
2057
2057
|
return !!n;
|
|
@@ -2061,24 +2061,17 @@ function qn(t, e, n) {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
function f() {
|
|
2063
2063
|
}
|
|
2064
|
-
function l(b,
|
|
2064
|
+
function l(b, T) {
|
|
2065
2065
|
}
|
|
2066
|
-
function y(b,
|
|
2066
|
+
function y(b, T) {
|
|
2067
2067
|
const { componentType: N } = b;
|
|
2068
|
-
let
|
|
2069
|
-
const
|
|
2070
|
-
return
|
|
2071
|
-
}
|
|
2072
|
-
function S(b, v) {
|
|
2073
|
-
const N = String(b.getAttribute("data-controltype")), D = b.getAttribute("data-feature"), E = D ? JSON.parse(D) : {};
|
|
2074
|
-
E.parentComponentInstance = o.value;
|
|
2075
|
-
let P = ee(N, E);
|
|
2076
|
-
const Y = N.toLowerCase().replace("-", "_");
|
|
2077
|
-
return P && !P.id && P.type === N && (P.id = `${Y}_${Math.random().toString().slice(2, 6)}`), P;
|
|
2068
|
+
let x = be(N, b, T);
|
|
2069
|
+
const O = N.toLowerCase().replace("-", "_");
|
|
2070
|
+
return x && !x.id && x.type === N && (x.id = `${O}_${Math.random().toString().slice(2, 6)}`), x;
|
|
2078
2071
|
}
|
|
2079
|
-
function
|
|
2072
|
+
function S(b) {
|
|
2080
2073
|
}
|
|
2081
|
-
function
|
|
2074
|
+
function v(...b) {
|
|
2082
2075
|
}
|
|
2083
2076
|
return o.value = {
|
|
2084
2077
|
canMove: s(),
|
|
@@ -2087,7 +2080,7 @@ function qn(t, e, n) {
|
|
|
2087
2080
|
canNested: !d(),
|
|
2088
2081
|
contents: e == null ? void 0 : e.schema.contents,
|
|
2089
2082
|
elementRef: t,
|
|
2090
|
-
parent: (
|
|
2083
|
+
parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
|
|
2091
2084
|
schema: e == null ? void 0 : e.schema,
|
|
2092
2085
|
styles: a,
|
|
2093
2086
|
designerClass: i,
|
|
@@ -2095,37 +2088,36 @@ function qn(t, e, n) {
|
|
|
2095
2088
|
getBelongedComponentInstance: m,
|
|
2096
2089
|
getDraggableDesignItemElement: h,
|
|
2097
2090
|
getDraggingDisplayText: g,
|
|
2098
|
-
getPropConfig:
|
|
2091
|
+
getPropConfig: v,
|
|
2099
2092
|
getDragScopeElement: f,
|
|
2100
2093
|
onAcceptMovedChildElement: l,
|
|
2101
|
-
|
|
2102
|
-
onChildElementMovedOut: x,
|
|
2094
|
+
onChildElementMovedOut: S,
|
|
2103
2095
|
addNewChildComponentSchema: y,
|
|
2104
2096
|
updateDragAndDropRules: r,
|
|
2105
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2106
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2097
|
+
triggerBelongedComponentToMoveWhenMoved: D(!1),
|
|
2098
|
+
triggerBelongedComponentToDeleteWhenDeleted: D(!1)
|
|
2107
2099
|
}, o;
|
|
2108
2100
|
}
|
|
2109
|
-
const Bn = /* @__PURE__ */
|
|
2101
|
+
const Bn = /* @__PURE__ */ he({
|
|
2110
2102
|
name: "FTextDesign",
|
|
2111
|
-
props:
|
|
2103
|
+
props: te,
|
|
2112
2104
|
emits: ["update:modelValue"],
|
|
2113
2105
|
setup(t, e) {
|
|
2114
|
-
const n =
|
|
2106
|
+
const n = D(!0), r = D(!0), a = D(""), i = D(0), o = D(0), s = D(t.modelValue), c = j(() => ({
|
|
2115
2107
|
"f-form-control-text": !n.value,
|
|
2116
2108
|
"f-form-context-textarea": n,
|
|
2117
2109
|
"f-component-text-auto-size": r.value
|
|
2118
|
-
})), u =
|
|
2110
|
+
})), u = j(() => ({
|
|
2119
2111
|
textalign: a.value,
|
|
2120
2112
|
height: !r.value && i.value > 0 ? `${i.value}px` : "",
|
|
2121
2113
|
"min-height": !r.value && i.value > 0 ? `${i.value}px` : "",
|
|
2122
2114
|
"max-height": !r.value && o.value > 0 ? `${o.value}px` : ""
|
|
2123
2115
|
}));
|
|
2124
|
-
|
|
2125
|
-
const d =
|
|
2126
|
-
return
|
|
2116
|
+
j(() => "");
|
|
2117
|
+
const d = D(), m = Fe("design-item-context"), h = qn(d, m);
|
|
2118
|
+
return ge(() => {
|
|
2127
2119
|
d.value.componentInstance = h;
|
|
2128
|
-
}), e.expose(h.value), () =>
|
|
2120
|
+
}), e.expose(h.value), () => pe("span", {
|
|
2129
2121
|
ref: d,
|
|
2130
2122
|
class: c.value,
|
|
2131
2123
|
style: u.value
|
|
@@ -2136,15 +2128,15 @@ const Bn = /* @__PURE__ */ ge({
|
|
|
2136
2128
|
t.component(K.name, K);
|
|
2137
2129
|
},
|
|
2138
2130
|
register(t, e, n, r) {
|
|
2139
|
-
t.text = K, e.text =
|
|
2131
|
+
t.text = K, e.text = oe;
|
|
2140
2132
|
},
|
|
2141
2133
|
registerDesigner(t, e, n) {
|
|
2142
|
-
t.text = Bn, e.text =
|
|
2134
|
+
t.text = Bn, e.text = oe;
|
|
2143
2135
|
}
|
|
2144
2136
|
};
|
|
2145
2137
|
export {
|
|
2146
2138
|
K as FText,
|
|
2147
2139
|
zn as default,
|
|
2148
|
-
|
|
2149
|
-
|
|
2140
|
+
oe as propsResolver,
|
|
2141
|
+
te as textProps
|
|
2150
2142
|
};
|