@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,35 +1,34 @@
|
|
|
1
1
|
var Ct = Object.defineProperty;
|
|
2
2
|
var kt = (t, n, e) => n in t ? Ct(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
3
|
var p = (t, n, e) => kt(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
-
import { ref as v, defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
4
|
+
import { ref as v, defineComponent as te, watch as G, computed as I, onMounted as ce, createVNode as w, createTextVNode as ve, mergeProps as Te, Teleport as Tt, createApp as Pt, onUnmounted as Dt, inject as me, nextTick as Ie, withDirectives as Ot, vShow as Ht, Fragment as Et, resolveComponent as Bt } from "vue";
|
|
5
|
+
import { isPlainObject as Se, cloneDeep as $e } from "lodash-es";
|
|
6
|
+
import Ft from "../button-edit/index.esm.js";
|
|
7
7
|
import "bignumber.js";
|
|
8
|
-
import { resolveAppearance as
|
|
9
|
-
import
|
|
8
|
+
import { resolveAppearance as Vt } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
import It from "../tags/index.esm.js";
|
|
10
10
|
import St from "../popover/index.esm.js";
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
import { withInstall as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const r = Ge[t];
|
|
11
|
+
import { useDesignerComponent as Nt, DgControl as Ne } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { withInstall as Lt } from "../common/index.esm.js";
|
|
13
|
+
const je = {}, Re = {};
|
|
14
|
+
function Pe(t) {
|
|
15
|
+
const { properties: n, title: e, ignore: r } = t, o = r && Array.isArray(r), a = Object.keys(n).reduce((i, u) => ((!o || !r.find((f) => f == u)) && (i[u] = n[u].type === "object" && n[u].properties ? Pe(n[u]) : $e(n[u].default)), i), {});
|
|
16
|
+
return e && (!o || !r.find((i) => i == "id")) && (a.id = `${e}-${Date.now()}`), a;
|
|
17
|
+
}
|
|
18
|
+
function Qe(t, n = {}, e) {
|
|
19
|
+
const r = je[t];
|
|
21
20
|
if (r) {
|
|
22
|
-
let o =
|
|
23
|
-
const a =
|
|
24
|
-
return o = a ? a({ getSchemaByType:
|
|
21
|
+
let o = Pe(r);
|
|
22
|
+
const a = Re[t];
|
|
23
|
+
return o = a ? a({ getSchemaByType: Qe }, o, n, e) : o, o;
|
|
25
24
|
}
|
|
26
25
|
return null;
|
|
27
26
|
}
|
|
28
|
-
function
|
|
29
|
-
const e =
|
|
30
|
-
return Object.keys(t).reduce((r, o) => (r[o] &&
|
|
27
|
+
function Wt(t, n) {
|
|
28
|
+
const e = Pe(n);
|
|
29
|
+
return Object.keys(t).reduce((r, o) => (r[o] && Se(r[o]) && Se(t[o]) ? Object.assign(r[o], t[o]) : r[o] = t[o], r), e), e;
|
|
31
30
|
}
|
|
32
|
-
function
|
|
31
|
+
function Yt(t, n) {
|
|
33
32
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
34
33
|
if (n.has(o)) {
|
|
35
34
|
const a = n.get(o);
|
|
@@ -44,65 +43,65 @@ function qt(t, n) {
|
|
|
44
43
|
return r;
|
|
45
44
|
}, {});
|
|
46
45
|
}
|
|
47
|
-
function
|
|
48
|
-
const r =
|
|
49
|
-
return
|
|
46
|
+
function At(t, n, e = /* @__PURE__ */ new Map()) {
|
|
47
|
+
const r = Wt(t, n);
|
|
48
|
+
return Yt(r, e);
|
|
50
49
|
}
|
|
51
|
-
function
|
|
52
|
-
function n(
|
|
53
|
-
if (typeof
|
|
54
|
-
return c
|
|
55
|
-
if (typeof
|
|
56
|
-
const m = Object.keys(
|
|
50
|
+
function qt(t = {}) {
|
|
51
|
+
function n(c, d, s, l) {
|
|
52
|
+
if (typeof s == "number")
|
|
53
|
+
return l[c].length === s;
|
|
54
|
+
if (typeof s == "object") {
|
|
55
|
+
const m = Object.keys(s)[0], h = s[m];
|
|
57
56
|
if (m === "not")
|
|
58
|
-
return Number(c
|
|
57
|
+
return Number(l[c].length) !== Number(h);
|
|
59
58
|
if (m === "moreThan")
|
|
60
|
-
return Number(c
|
|
59
|
+
return Number(l[c].length) >= Number(h);
|
|
61
60
|
if (m === "lessThan")
|
|
62
|
-
return Number(c
|
|
61
|
+
return Number(l[c].length) <= Number(h);
|
|
63
62
|
}
|
|
64
63
|
return !1;
|
|
65
64
|
}
|
|
66
|
-
function e(
|
|
67
|
-
return c
|
|
65
|
+
function e(c, d, s, l) {
|
|
66
|
+
return l[c] && l[c].propertyValue && String(l[c].propertyValue.value) === String(s);
|
|
68
67
|
}
|
|
69
68
|
const r = /* @__PURE__ */ new Map([
|
|
70
69
|
["length", n],
|
|
71
70
|
["getProperty", e]
|
|
72
71
|
]);
|
|
73
|
-
Object.keys(t).reduce((
|
|
74
|
-
function o(
|
|
75
|
-
const
|
|
76
|
-
return typeof
|
|
77
|
-
if (
|
|
78
|
-
return { target:
|
|
79
|
-
const m =
|
|
80
|
-
return { target:
|
|
72
|
+
Object.keys(t).reduce((c, d) => (c.set(d, t[d]), c), r);
|
|
73
|
+
function o(c, d) {
|
|
74
|
+
const s = c;
|
|
75
|
+
return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: c, value: !!d }] : typeof d == "object" ? Object.keys(d).map((l) => {
|
|
76
|
+
if (l === "length")
|
|
77
|
+
return { target: s, operator: "length", param: null, value: d[l] };
|
|
78
|
+
const m = l, h = d[l];
|
|
79
|
+
return { target: s, operator: "getProperty", param: m, value: h };
|
|
81
80
|
}) : [];
|
|
82
81
|
}
|
|
83
|
-
function a(
|
|
84
|
-
return Object.keys(
|
|
85
|
-
const m = o(
|
|
86
|
-
return
|
|
82
|
+
function a(c) {
|
|
83
|
+
return Object.keys(c).reduce((s, l) => {
|
|
84
|
+
const m = o(l, c[l]);
|
|
85
|
+
return s.push(...m), s;
|
|
87
86
|
}, []);
|
|
88
87
|
}
|
|
89
|
-
function i(
|
|
90
|
-
if (r.has(
|
|
91
|
-
const
|
|
92
|
-
return
|
|
88
|
+
function i(c, d) {
|
|
89
|
+
if (r.has(c.operator)) {
|
|
90
|
+
const s = r.get(c.operator);
|
|
91
|
+
return s && s(c.target, c.param, c.value, d) || !1;
|
|
93
92
|
}
|
|
94
93
|
return !1;
|
|
95
94
|
}
|
|
96
|
-
function
|
|
97
|
-
return a(
|
|
95
|
+
function u(c, d) {
|
|
96
|
+
return a(c).reduce((m, h) => m && i(h, d), !0);
|
|
98
97
|
}
|
|
99
|
-
function
|
|
100
|
-
const
|
|
101
|
-
return
|
|
98
|
+
function f(c, d) {
|
|
99
|
+
const s = Object.keys(c), l = s.includes("allOf"), m = s.includes("anyOf"), h = l || m, D = (h ? c[h ? l ? "allOf" : "anyOf" : "allOf"] : [c]).map((b) => u(b, d));
|
|
100
|
+
return l ? !D.includes(!1) : D.includes(!0);
|
|
102
101
|
}
|
|
103
|
-
return { parseValueSchema:
|
|
102
|
+
return { parseValueSchema: f };
|
|
104
103
|
}
|
|
105
|
-
const
|
|
104
|
+
const T = {
|
|
106
105
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
107
106
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
108
107
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -141,20 +140,20 @@ const C = {
|
|
|
141
140
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
142
141
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
143
142
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
function Ue(t, n, e = /* @__PURE__ */ new Map(), r = (i,
|
|
147
|
-
return
|
|
148
|
-
const
|
|
149
|
-
return Object.assign(
|
|
143
|
+
}, _t = {}, Gt = {};
|
|
144
|
+
qt();
|
|
145
|
+
function Ue(t, n, e = /* @__PURE__ */ new Map(), r = (i, u, f) => u, o = {}, a = (i) => i) {
|
|
146
|
+
return je[n.title] = n, Re[n.title] = r, _t[n.title] = o, Gt[n.title] = a, (i = {}) => {
|
|
147
|
+
const u = At(i, n, e), f = Object.keys(t).reduce((c, d) => (c[d] = t[d].default, c), {});
|
|
148
|
+
return Object.assign(f, u);
|
|
150
149
|
};
|
|
151
150
|
}
|
|
152
|
-
function
|
|
151
|
+
function $t(t, n) {
|
|
153
152
|
return { customClass: n.class, customStyle: n.style };
|
|
154
153
|
}
|
|
155
|
-
const
|
|
156
|
-
["appearance",
|
|
157
|
-
]),
|
|
154
|
+
const jt = /* @__PURE__ */ new Map([
|
|
155
|
+
["appearance", $t]
|
|
156
|
+
]), Rt = "https://json-schema.org/draft/2020-12/schema", Qt = "https://farris-design.gitee.io/time-picker.schema.json", Ut = "time-picker", Xt = "A Farris Input Component", zt = "object", Jt = {
|
|
158
157
|
id: {
|
|
159
158
|
description: "The unique identifier for a time picker",
|
|
160
159
|
type: "string"
|
|
@@ -231,24 +230,24 @@ const Gt = /* @__PURE__ */ new Map([
|
|
|
231
230
|
type: "boolean",
|
|
232
231
|
default: !1
|
|
233
232
|
}
|
|
234
|
-
},
|
|
233
|
+
}, Zt = [
|
|
235
234
|
"id",
|
|
236
235
|
"type"
|
|
237
|
-
],
|
|
236
|
+
], Kt = [
|
|
238
237
|
"id",
|
|
239
238
|
"appearance",
|
|
240
239
|
"binding"
|
|
241
|
-
],
|
|
242
|
-
$schema:
|
|
243
|
-
$id:
|
|
244
|
-
title:
|
|
245
|
-
description:
|
|
246
|
-
type:
|
|
247
|
-
properties:
|
|
248
|
-
required:
|
|
249
|
-
ignore:
|
|
240
|
+
], en = {
|
|
241
|
+
$schema: Rt,
|
|
242
|
+
$id: Qt,
|
|
243
|
+
title: Ut,
|
|
244
|
+
description: Xt,
|
|
245
|
+
type: zt,
|
|
246
|
+
properties: Jt,
|
|
247
|
+
required: Zt,
|
|
248
|
+
ignore: Kt
|
|
250
249
|
};
|
|
251
|
-
function
|
|
250
|
+
function tn(t, n, e) {
|
|
252
251
|
return n;
|
|
253
252
|
}
|
|
254
253
|
const De = {
|
|
@@ -279,7 +278,7 @@ const De = {
|
|
|
279
278
|
disabled: { type: Boolean, default: !1 },
|
|
280
279
|
readonly: { type: Boolean, default: !1 },
|
|
281
280
|
editable: { type: Boolean, default: !0 }
|
|
282
|
-
}, Xe = Ue(De,
|
|
281
|
+
}, Xe = Ue(De, en, jt, tn), nn = {
|
|
283
282
|
modelValue: {
|
|
284
283
|
type: String,
|
|
285
284
|
default: ""
|
|
@@ -333,44 +332,44 @@ const De = {
|
|
|
333
332
|
default: !1
|
|
334
333
|
}
|
|
335
334
|
};
|
|
336
|
-
function
|
|
335
|
+
function _(t) {
|
|
337
336
|
const n = Object.prototype.toString.call(t);
|
|
338
337
|
return t instanceof Date || typeof t == "object" && n === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || n === "[object Number]" || typeof t == "string" || n === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
339
338
|
}
|
|
340
|
-
function
|
|
339
|
+
function N(t, n) {
|
|
341
340
|
return t instanceof Date ? new t.constructor(n) : new Date(n);
|
|
342
341
|
}
|
|
343
342
|
function ze(t, n) {
|
|
344
|
-
const e =
|
|
345
|
-
return isNaN(n) ?
|
|
343
|
+
const e = _(t);
|
|
344
|
+
return isNaN(n) ? N(t, NaN) : (n && e.setDate(e.getDate() + n), e);
|
|
346
345
|
}
|
|
347
|
-
const Je = 6048e5,
|
|
348
|
-
let
|
|
349
|
-
function
|
|
350
|
-
return
|
|
346
|
+
const Je = 6048e5, rn = 864e5, on = 6e4, an = 36e5, sn = 1e3;
|
|
347
|
+
let un = {};
|
|
348
|
+
function ne() {
|
|
349
|
+
return un;
|
|
351
350
|
}
|
|
352
|
-
function
|
|
353
|
-
var
|
|
354
|
-
const e =
|
|
351
|
+
function X(t, n) {
|
|
352
|
+
var u, f, c, d;
|
|
353
|
+
const e = ne(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((f = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : f.weekStartsOn) ?? e.weekStartsOn ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = _(t), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
355
354
|
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
356
355
|
}
|
|
357
|
-
function
|
|
358
|
-
return
|
|
356
|
+
function ee(t) {
|
|
357
|
+
return X(t, { weekStartsOn: 1 });
|
|
359
358
|
}
|
|
360
359
|
function Ze(t) {
|
|
361
|
-
const n =
|
|
360
|
+
const n = _(t), e = n.getFullYear(), r = N(t, 0);
|
|
362
361
|
r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
363
|
-
const o =
|
|
362
|
+
const o = ee(r), a = N(t, 0);
|
|
364
363
|
a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0);
|
|
365
|
-
const i =
|
|
364
|
+
const i = ee(a);
|
|
366
365
|
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >= i.getTime() ? e : e - 1;
|
|
367
366
|
}
|
|
368
|
-
function
|
|
369
|
-
const n =
|
|
367
|
+
function Le(t) {
|
|
368
|
+
const n = _(t);
|
|
370
369
|
return n.setHours(0, 0, 0, 0), n;
|
|
371
370
|
}
|
|
372
371
|
function he(t) {
|
|
373
|
-
const n =
|
|
372
|
+
const n = _(t), e = new Date(
|
|
374
373
|
Date.UTC(
|
|
375
374
|
n.getFullYear(),
|
|
376
375
|
n.getMonth(),
|
|
@@ -383,28 +382,28 @@ function he(t) {
|
|
|
383
382
|
);
|
|
384
383
|
return e.setUTCFullYear(n.getFullYear()), +t - +e;
|
|
385
384
|
}
|
|
386
|
-
function
|
|
387
|
-
const e =
|
|
388
|
-
return Math.round((o - a) /
|
|
385
|
+
function ln(t, n) {
|
|
386
|
+
const e = Le(t), r = Le(n), o = +e - he(e), a = +r - he(r);
|
|
387
|
+
return Math.round((o - a) / rn);
|
|
389
388
|
}
|
|
390
|
-
function
|
|
391
|
-
const n = Ze(t), e =
|
|
392
|
-
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0),
|
|
389
|
+
function cn(t) {
|
|
390
|
+
const n = Ze(t), e = N(t, 0);
|
|
391
|
+
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), ee(e);
|
|
393
392
|
}
|
|
394
|
-
function
|
|
393
|
+
function dn(t) {
|
|
395
394
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
396
395
|
}
|
|
397
396
|
function Ke(t) {
|
|
398
|
-
if (!
|
|
397
|
+
if (!dn(t) && typeof t != "number")
|
|
399
398
|
return !1;
|
|
400
|
-
const n =
|
|
399
|
+
const n = _(t);
|
|
401
400
|
return !isNaN(Number(n));
|
|
402
401
|
}
|
|
403
|
-
function
|
|
404
|
-
const n =
|
|
402
|
+
function fn(t) {
|
|
403
|
+
const n = _(t), e = N(t, 0);
|
|
405
404
|
return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
406
405
|
}
|
|
407
|
-
const
|
|
406
|
+
const pn = {
|
|
408
407
|
lessThanXSeconds: {
|
|
409
408
|
one: "less than a second",
|
|
410
409
|
other: "less than {{count}} seconds"
|
|
@@ -466,9 +465,9 @@ const mn = {
|
|
|
466
465
|
one: "almost 1 year",
|
|
467
466
|
other: "almost {{count}} years"
|
|
468
467
|
}
|
|
469
|
-
},
|
|
468
|
+
}, mn = (t, n, e) => {
|
|
470
469
|
let r;
|
|
471
|
-
const o =
|
|
470
|
+
const o = pn[t];
|
|
472
471
|
return typeof o == "string" ? r = o : n === 1 ? r = o.one : r = o.other.replace("{{count}}", n.toString()), e != null && e.addSuffix ? e.comparison && e.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
473
472
|
};
|
|
474
473
|
function xe(t) {
|
|
@@ -477,66 +476,66 @@ function xe(t) {
|
|
|
477
476
|
return t.formats[e] || t.formats[t.defaultWidth];
|
|
478
477
|
};
|
|
479
478
|
}
|
|
480
|
-
const
|
|
479
|
+
const hn = {
|
|
481
480
|
full: "EEEE, MMMM do, y",
|
|
482
481
|
long: "MMMM do, y",
|
|
483
482
|
medium: "MMM d, y",
|
|
484
483
|
short: "MM/dd/yyyy"
|
|
485
|
-
},
|
|
484
|
+
}, yn = {
|
|
486
485
|
full: "h:mm:ss a zzzz",
|
|
487
486
|
long: "h:mm:ss a z",
|
|
488
487
|
medium: "h:mm:ss a",
|
|
489
488
|
short: "h:mm a"
|
|
490
|
-
},
|
|
489
|
+
}, gn = {
|
|
491
490
|
full: "{{date}} 'at' {{time}}",
|
|
492
491
|
long: "{{date}} 'at' {{time}}",
|
|
493
492
|
medium: "{{date}}, {{time}}",
|
|
494
493
|
short: "{{date}}, {{time}}"
|
|
495
|
-
},
|
|
494
|
+
}, bn = {
|
|
496
495
|
date: xe({
|
|
497
|
-
formats:
|
|
496
|
+
formats: hn,
|
|
498
497
|
defaultWidth: "full"
|
|
499
498
|
}),
|
|
500
499
|
time: xe({
|
|
501
|
-
formats:
|
|
500
|
+
formats: yn,
|
|
502
501
|
defaultWidth: "full"
|
|
503
502
|
}),
|
|
504
503
|
dateTime: xe({
|
|
505
|
-
formats:
|
|
504
|
+
formats: gn,
|
|
506
505
|
defaultWidth: "full"
|
|
507
506
|
})
|
|
508
|
-
},
|
|
507
|
+
}, wn = {
|
|
509
508
|
lastWeek: "'last' eeee 'at' p",
|
|
510
509
|
yesterday: "'yesterday at' p",
|
|
511
510
|
today: "'today at' p",
|
|
512
511
|
tomorrow: "'tomorrow at' p",
|
|
513
512
|
nextWeek: "eeee 'at' p",
|
|
514
513
|
other: "P"
|
|
515
|
-
},
|
|
516
|
-
function
|
|
514
|
+
}, vn = (t, n, e, r) => wn[t];
|
|
515
|
+
function ie(t) {
|
|
517
516
|
return (n, e) => {
|
|
518
517
|
const r = e != null && e.context ? String(e.context) : "standalone";
|
|
519
518
|
let o;
|
|
520
519
|
if (r === "formatting" && t.formattingValues) {
|
|
521
|
-
const i = t.defaultFormattingWidth || t.defaultWidth,
|
|
522
|
-
o = t.formattingValues[
|
|
520
|
+
const i = t.defaultFormattingWidth || t.defaultWidth, u = e != null && e.width ? String(e.width) : i;
|
|
521
|
+
o = t.formattingValues[u] || t.formattingValues[i];
|
|
523
522
|
} else {
|
|
524
|
-
const i = t.defaultWidth,
|
|
525
|
-
o = t.values[
|
|
523
|
+
const i = t.defaultWidth, u = e != null && e.width ? String(e.width) : t.defaultWidth;
|
|
524
|
+
o = t.values[u] || t.values[i];
|
|
526
525
|
}
|
|
527
526
|
const a = t.argumentCallback ? t.argumentCallback(n) : n;
|
|
528
527
|
return o[a];
|
|
529
528
|
};
|
|
530
529
|
}
|
|
531
|
-
const
|
|
530
|
+
const xn = {
|
|
532
531
|
narrow: ["B", "A"],
|
|
533
532
|
abbreviated: ["BC", "AD"],
|
|
534
533
|
wide: ["Before Christ", "Anno Domini"]
|
|
535
|
-
},
|
|
534
|
+
}, Mn = {
|
|
536
535
|
narrow: ["1", "2", "3", "4"],
|
|
537
536
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
538
537
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
539
|
-
},
|
|
538
|
+
}, Cn = {
|
|
540
539
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
541
540
|
abbreviated: [
|
|
542
541
|
"Jan",
|
|
@@ -566,7 +565,7 @@ const Mn = {
|
|
|
566
565
|
"November",
|
|
567
566
|
"December"
|
|
568
567
|
]
|
|
569
|
-
},
|
|
568
|
+
}, kn = {
|
|
570
569
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
571
570
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
572
571
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -579,7 +578,7 @@ const Mn = {
|
|
|
579
578
|
"Friday",
|
|
580
579
|
"Saturday"
|
|
581
580
|
]
|
|
582
|
-
},
|
|
581
|
+
}, Tn = {
|
|
583
582
|
narrow: {
|
|
584
583
|
am: "a",
|
|
585
584
|
pm: "p",
|
|
@@ -610,7 +609,7 @@ const Mn = {
|
|
|
610
609
|
evening: "evening",
|
|
611
610
|
night: "night"
|
|
612
611
|
}
|
|
613
|
-
},
|
|
612
|
+
}, Pn = {
|
|
614
613
|
narrow: {
|
|
615
614
|
am: "a",
|
|
616
615
|
pm: "p",
|
|
@@ -653,51 +652,51 @@ const Mn = {
|
|
|
653
652
|
return e + "rd";
|
|
654
653
|
}
|
|
655
654
|
return e + "th";
|
|
656
|
-
},
|
|
655
|
+
}, On = {
|
|
657
656
|
ordinalNumber: Dn,
|
|
658
|
-
era:
|
|
659
|
-
values:
|
|
657
|
+
era: ie({
|
|
658
|
+
values: xn,
|
|
660
659
|
defaultWidth: "wide"
|
|
661
660
|
}),
|
|
662
|
-
quarter:
|
|
663
|
-
values:
|
|
661
|
+
quarter: ie({
|
|
662
|
+
values: Mn,
|
|
664
663
|
defaultWidth: "wide",
|
|
665
664
|
argumentCallback: (t) => t - 1
|
|
666
665
|
}),
|
|
667
|
-
month:
|
|
668
|
-
values:
|
|
666
|
+
month: ie({
|
|
667
|
+
values: Cn,
|
|
669
668
|
defaultWidth: "wide"
|
|
670
669
|
}),
|
|
671
|
-
day:
|
|
672
|
-
values:
|
|
670
|
+
day: ie({
|
|
671
|
+
values: kn,
|
|
673
672
|
defaultWidth: "wide"
|
|
674
673
|
}),
|
|
675
|
-
dayPeriod:
|
|
676
|
-
values:
|
|
674
|
+
dayPeriod: ie({
|
|
675
|
+
values: Tn,
|
|
677
676
|
defaultWidth: "wide",
|
|
678
|
-
formattingValues:
|
|
677
|
+
formattingValues: Pn,
|
|
679
678
|
defaultFormattingWidth: "wide"
|
|
680
679
|
})
|
|
681
680
|
};
|
|
682
|
-
function
|
|
681
|
+
function ue(t) {
|
|
683
682
|
return (n, e = {}) => {
|
|
684
683
|
const r = e.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = n.match(o);
|
|
685
684
|
if (!a)
|
|
686
685
|
return null;
|
|
687
|
-
const i = a[0],
|
|
686
|
+
const i = a[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(u) ? En(u, (s) => s.test(i)) : (
|
|
688
687
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
689
|
-
|
|
688
|
+
Hn(u, (s) => s.test(i))
|
|
690
689
|
);
|
|
691
|
-
let
|
|
692
|
-
|
|
690
|
+
let c;
|
|
691
|
+
c = t.valueCallback ? t.valueCallback(f) : f, c = e.valueCallback ? (
|
|
693
692
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
694
|
-
e.valueCallback(
|
|
695
|
-
) :
|
|
696
|
-
const
|
|
697
|
-
return { value:
|
|
693
|
+
e.valueCallback(c)
|
|
694
|
+
) : c;
|
|
695
|
+
const d = n.slice(i.length);
|
|
696
|
+
return { value: c, rest: d };
|
|
698
697
|
};
|
|
699
698
|
}
|
|
700
|
-
function
|
|
699
|
+
function Hn(t, n) {
|
|
701
700
|
for (const e in t)
|
|
702
701
|
if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
|
|
703
702
|
return e;
|
|
@@ -707,7 +706,7 @@ function En(t, n) {
|
|
|
707
706
|
if (n(t[e]))
|
|
708
707
|
return e;
|
|
709
708
|
}
|
|
710
|
-
function
|
|
709
|
+
function Bn(t) {
|
|
711
710
|
return (n, e = {}) => {
|
|
712
711
|
const r = n.match(t.matchPattern);
|
|
713
712
|
if (!r) return null;
|
|
@@ -715,27 +714,27 @@ function Vn(t) {
|
|
|
715
714
|
if (!a) return null;
|
|
716
715
|
let i = t.valueCallback ? t.valueCallback(a[0]) : a[0];
|
|
717
716
|
i = e.valueCallback ? e.valueCallback(i) : i;
|
|
718
|
-
const
|
|
719
|
-
return { value: i, rest:
|
|
717
|
+
const u = n.slice(o.length);
|
|
718
|
+
return { value: i, rest: u };
|
|
720
719
|
};
|
|
721
720
|
}
|
|
722
|
-
const Fn = /^(\d+)(th|st|nd|rd)?/i,
|
|
721
|
+
const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, In = {
|
|
723
722
|
narrow: /^(b|a)/i,
|
|
724
723
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
725
724
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
726
|
-
},
|
|
725
|
+
}, Sn = {
|
|
727
726
|
any: [/^b/i, /^(a|c)/i]
|
|
728
|
-
},
|
|
727
|
+
}, Nn = {
|
|
729
728
|
narrow: /^[1234]/i,
|
|
730
729
|
abbreviated: /^q[1234]/i,
|
|
731
730
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
732
|
-
},
|
|
731
|
+
}, Ln = {
|
|
733
732
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
734
|
-
},
|
|
733
|
+
}, Wn = {
|
|
735
734
|
narrow: /^[jfmasond]/i,
|
|
736
735
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
737
736
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
738
|
-
},
|
|
737
|
+
}, Yn = {
|
|
739
738
|
narrow: [
|
|
740
739
|
/^j/i,
|
|
741
740
|
/^f/i,
|
|
@@ -764,18 +763,18 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Nn = /\d+/i, Sn = {
|
|
|
764
763
|
/^n/i,
|
|
765
764
|
/^d/i
|
|
766
765
|
]
|
|
767
|
-
},
|
|
766
|
+
}, An = {
|
|
768
767
|
narrow: /^[smtwf]/i,
|
|
769
768
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
770
769
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
771
770
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
772
|
-
},
|
|
771
|
+
}, qn = {
|
|
773
772
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
774
773
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
775
|
-
},
|
|
774
|
+
}, _n = {
|
|
776
775
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
777
776
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
778
|
-
},
|
|
777
|
+
}, Gn = {
|
|
779
778
|
any: {
|
|
780
779
|
am: /^a/i,
|
|
781
780
|
pm: /^p/i,
|
|
@@ -786,99 +785,99 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Nn = /\d+/i, Sn = {
|
|
|
786
785
|
evening: /evening/i,
|
|
787
786
|
night: /night/i
|
|
788
787
|
}
|
|
789
|
-
},
|
|
790
|
-
ordinalNumber:
|
|
788
|
+
}, $n = {
|
|
789
|
+
ordinalNumber: Bn({
|
|
791
790
|
matchPattern: Fn,
|
|
792
|
-
parsePattern:
|
|
791
|
+
parsePattern: Vn,
|
|
793
792
|
valueCallback: (t) => parseInt(t, 10)
|
|
794
793
|
}),
|
|
795
|
-
era:
|
|
796
|
-
matchPatterns:
|
|
794
|
+
era: ue({
|
|
795
|
+
matchPatterns: In,
|
|
797
796
|
defaultMatchWidth: "wide",
|
|
798
|
-
parsePatterns:
|
|
797
|
+
parsePatterns: Sn,
|
|
799
798
|
defaultParseWidth: "any"
|
|
800
799
|
}),
|
|
801
|
-
quarter:
|
|
802
|
-
matchPatterns:
|
|
800
|
+
quarter: ue({
|
|
801
|
+
matchPatterns: Nn,
|
|
803
802
|
defaultMatchWidth: "wide",
|
|
804
|
-
parsePatterns:
|
|
803
|
+
parsePatterns: Ln,
|
|
805
804
|
defaultParseWidth: "any",
|
|
806
805
|
valueCallback: (t) => t + 1
|
|
807
806
|
}),
|
|
808
|
-
month:
|
|
809
|
-
matchPatterns:
|
|
807
|
+
month: ue({
|
|
808
|
+
matchPatterns: Wn,
|
|
810
809
|
defaultMatchWidth: "wide",
|
|
811
|
-
parsePatterns:
|
|
810
|
+
parsePatterns: Yn,
|
|
812
811
|
defaultParseWidth: "any"
|
|
813
812
|
}),
|
|
814
|
-
day:
|
|
815
|
-
matchPatterns:
|
|
813
|
+
day: ue({
|
|
814
|
+
matchPatterns: An,
|
|
816
815
|
defaultMatchWidth: "wide",
|
|
817
|
-
parsePatterns:
|
|
816
|
+
parsePatterns: qn,
|
|
818
817
|
defaultParseWidth: "any"
|
|
819
818
|
}),
|
|
820
|
-
dayPeriod:
|
|
821
|
-
matchPatterns:
|
|
819
|
+
dayPeriod: ue({
|
|
820
|
+
matchPatterns: _n,
|
|
822
821
|
defaultMatchWidth: "any",
|
|
823
|
-
parsePatterns:
|
|
822
|
+
parsePatterns: Gn,
|
|
824
823
|
defaultParseWidth: "any"
|
|
825
824
|
})
|
|
826
825
|
}, et = {
|
|
827
826
|
code: "en-US",
|
|
828
|
-
formatDistance:
|
|
829
|
-
formatLong:
|
|
830
|
-
formatRelative:
|
|
831
|
-
localize:
|
|
832
|
-
match:
|
|
827
|
+
formatDistance: mn,
|
|
828
|
+
formatLong: bn,
|
|
829
|
+
formatRelative: vn,
|
|
830
|
+
localize: On,
|
|
831
|
+
match: $n,
|
|
833
832
|
options: {
|
|
834
833
|
weekStartsOn: 0,
|
|
835
834
|
firstWeekContainsDate: 1
|
|
836
835
|
}
|
|
837
836
|
};
|
|
838
|
-
function
|
|
839
|
-
const n =
|
|
840
|
-
return
|
|
837
|
+
function jn(t) {
|
|
838
|
+
const n = _(t);
|
|
839
|
+
return ln(n, fn(n)) + 1;
|
|
841
840
|
}
|
|
842
841
|
function tt(t) {
|
|
843
|
-
const n =
|
|
842
|
+
const n = _(t), e = +ee(n) - +cn(n);
|
|
844
843
|
return Math.round(e / Je) + 1;
|
|
845
844
|
}
|
|
846
|
-
function
|
|
847
|
-
var
|
|
848
|
-
const e =
|
|
845
|
+
function Oe(t, n) {
|
|
846
|
+
var d, s, l, m;
|
|
847
|
+
const e = _(t), r = e.getFullYear(), o = ne(), a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((s = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : s.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (l = o.locale) == null ? void 0 : l.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = N(t, 0);
|
|
849
848
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
-
const
|
|
853
|
-
return e.getTime() >=
|
|
849
|
+
const u = X(i, n), f = N(t, 0);
|
|
850
|
+
f.setFullYear(r, 0, a), f.setHours(0, 0, 0, 0);
|
|
851
|
+
const c = X(f, n);
|
|
852
|
+
return e.getTime() >= u.getTime() ? r + 1 : e.getTime() >= c.getTime() ? r : r - 1;
|
|
854
853
|
}
|
|
855
|
-
function
|
|
856
|
-
var
|
|
857
|
-
const e =
|
|
858
|
-
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0),
|
|
854
|
+
function Rn(t, n) {
|
|
855
|
+
var u, f, c, d;
|
|
856
|
+
const e = ne(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : f.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = Oe(t, n), a = N(t, 0);
|
|
857
|
+
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), X(a, n);
|
|
859
858
|
}
|
|
860
859
|
function nt(t, n) {
|
|
861
|
-
const e =
|
|
860
|
+
const e = _(t), r = +X(e, n) - +Rn(e, n);
|
|
862
861
|
return Math.round(r / Je) + 1;
|
|
863
862
|
}
|
|
864
|
-
function
|
|
863
|
+
function E(t, n) {
|
|
865
864
|
const e = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(n, "0");
|
|
866
865
|
return e + r;
|
|
867
866
|
}
|
|
868
|
-
const
|
|
867
|
+
const U = {
|
|
869
868
|
// Year
|
|
870
869
|
y(t, n) {
|
|
871
870
|
const e = t.getFullYear(), r = e > 0 ? e : 1 - e;
|
|
872
|
-
return
|
|
871
|
+
return E(n === "yy" ? r % 100 : r, n.length);
|
|
873
872
|
},
|
|
874
873
|
// Month
|
|
875
874
|
M(t, n) {
|
|
876
875
|
const e = t.getMonth();
|
|
877
|
-
return n === "M" ? String(e + 1) :
|
|
876
|
+
return n === "M" ? String(e + 1) : E(e + 1, 2);
|
|
878
877
|
},
|
|
879
878
|
// Day of the month
|
|
880
879
|
d(t, n) {
|
|
881
|
-
return
|
|
880
|
+
return E(t.getDate(), n.length);
|
|
882
881
|
},
|
|
883
882
|
// AM or PM
|
|
884
883
|
a(t, n) {
|
|
@@ -898,28 +897,28 @@ const X = {
|
|
|
898
897
|
},
|
|
899
898
|
// Hour [1-12]
|
|
900
899
|
h(t, n) {
|
|
901
|
-
return
|
|
900
|
+
return E(t.getHours() % 12 || 12, n.length);
|
|
902
901
|
},
|
|
903
902
|
// Hour [0-23]
|
|
904
903
|
H(t, n) {
|
|
905
|
-
return
|
|
904
|
+
return E(t.getHours(), n.length);
|
|
906
905
|
},
|
|
907
906
|
// Minute
|
|
908
907
|
m(t, n) {
|
|
909
|
-
return
|
|
908
|
+
return E(t.getMinutes(), n.length);
|
|
910
909
|
},
|
|
911
910
|
// Second
|
|
912
911
|
s(t, n) {
|
|
913
|
-
return
|
|
912
|
+
return E(t.getSeconds(), n.length);
|
|
914
913
|
},
|
|
915
914
|
// Fraction of second
|
|
916
915
|
S(t, n) {
|
|
917
916
|
const e = n.length, r = t.getMilliseconds(), o = Math.trunc(
|
|
918
917
|
r * Math.pow(10, e - 3)
|
|
919
918
|
);
|
|
920
|
-
return
|
|
919
|
+
return E(o, n.length);
|
|
921
920
|
}
|
|
922
|
-
},
|
|
921
|
+
}, J = {
|
|
923
922
|
am: "am",
|
|
924
923
|
pm: "pm",
|
|
925
924
|
midnight: "midnight",
|
|
@@ -928,7 +927,7 @@ const X = {
|
|
|
928
927
|
afternoon: "afternoon",
|
|
929
928
|
evening: "evening",
|
|
930
929
|
night: "night"
|
|
931
|
-
},
|
|
930
|
+
}, We = {
|
|
932
931
|
// Era
|
|
933
932
|
G: function(t, n, e) {
|
|
934
933
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -950,21 +949,21 @@ const X = {
|
|
|
950
949
|
const r = t.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
951
950
|
return e.ordinalNumber(o, { unit: "year" });
|
|
952
951
|
}
|
|
953
|
-
return
|
|
952
|
+
return U.y(t, n);
|
|
954
953
|
},
|
|
955
954
|
// Local week-numbering year
|
|
956
955
|
Y: function(t, n, e, r) {
|
|
957
|
-
const o =
|
|
956
|
+
const o = Oe(t, r), a = o > 0 ? o : 1 - o;
|
|
958
957
|
if (n === "YY") {
|
|
959
958
|
const i = a % 100;
|
|
960
|
-
return
|
|
959
|
+
return E(i, 2);
|
|
961
960
|
}
|
|
962
|
-
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) :
|
|
961
|
+
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) : E(a, n.length);
|
|
963
962
|
},
|
|
964
963
|
// ISO week-numbering year
|
|
965
964
|
R: function(t, n) {
|
|
966
965
|
const e = Ze(t);
|
|
967
|
-
return
|
|
966
|
+
return E(e, n.length);
|
|
968
967
|
},
|
|
969
968
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
970
969
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -977,7 +976,7 @@ const X = {
|
|
|
977
976
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
978
977
|
u: function(t, n) {
|
|
979
978
|
const e = t.getFullYear();
|
|
980
|
-
return
|
|
979
|
+
return E(e, n.length);
|
|
981
980
|
},
|
|
982
981
|
// Quarter
|
|
983
982
|
Q: function(t, n, e) {
|
|
@@ -986,7 +985,7 @@ const X = {
|
|
|
986
985
|
case "Q":
|
|
987
986
|
return String(r);
|
|
988
987
|
case "QQ":
|
|
989
|
-
return
|
|
988
|
+
return E(r, 2);
|
|
990
989
|
case "Qo":
|
|
991
990
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
992
991
|
case "QQQ":
|
|
@@ -1014,7 +1013,7 @@ const X = {
|
|
|
1014
1013
|
case "q":
|
|
1015
1014
|
return String(r);
|
|
1016
1015
|
case "qq":
|
|
1017
|
-
return
|
|
1016
|
+
return E(r, 2);
|
|
1018
1017
|
case "qo":
|
|
1019
1018
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
1020
1019
|
case "qqq":
|
|
@@ -1041,7 +1040,7 @@ const X = {
|
|
|
1041
1040
|
switch (n) {
|
|
1042
1041
|
case "M":
|
|
1043
1042
|
case "MM":
|
|
1044
|
-
return
|
|
1043
|
+
return U.M(t, n);
|
|
1045
1044
|
case "Mo":
|
|
1046
1045
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1047
1046
|
case "MMM":
|
|
@@ -1066,7 +1065,7 @@ const X = {
|
|
|
1066
1065
|
case "L":
|
|
1067
1066
|
return String(r + 1);
|
|
1068
1067
|
case "LL":
|
|
1069
|
-
return
|
|
1068
|
+
return E(r + 1, 2);
|
|
1070
1069
|
case "Lo":
|
|
1071
1070
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1072
1071
|
case "LLL":
|
|
@@ -1087,21 +1086,21 @@ const X = {
|
|
|
1087
1086
|
// Local week of year
|
|
1088
1087
|
w: function(t, n, e, r) {
|
|
1089
1088
|
const o = nt(t, r);
|
|
1090
|
-
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) :
|
|
1089
|
+
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) : E(o, n.length);
|
|
1091
1090
|
},
|
|
1092
1091
|
// ISO week of year
|
|
1093
1092
|
I: function(t, n, e) {
|
|
1094
1093
|
const r = tt(t);
|
|
1095
|
-
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) :
|
|
1094
|
+
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) : E(r, n.length);
|
|
1096
1095
|
},
|
|
1097
1096
|
// Day of the month
|
|
1098
1097
|
d: function(t, n, e) {
|
|
1099
|
-
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1098
|
+
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) : U.d(t, n);
|
|
1100
1099
|
},
|
|
1101
1100
|
// Day of year
|
|
1102
1101
|
D: function(t, n, e) {
|
|
1103
|
-
const r =
|
|
1104
|
-
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
1102
|
+
const r = jn(t);
|
|
1103
|
+
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) : E(r, n.length);
|
|
1105
1104
|
},
|
|
1106
1105
|
// Day of week
|
|
1107
1106
|
E: function(t, n, e) {
|
|
@@ -1139,7 +1138,7 @@ const X = {
|
|
|
1139
1138
|
case "e":
|
|
1140
1139
|
return String(a);
|
|
1141
1140
|
case "ee":
|
|
1142
|
-
return
|
|
1141
|
+
return E(a, 2);
|
|
1143
1142
|
case "eo":
|
|
1144
1143
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1145
1144
|
case "eee":
|
|
@@ -1172,7 +1171,7 @@ const X = {
|
|
|
1172
1171
|
case "c":
|
|
1173
1172
|
return String(a);
|
|
1174
1173
|
case "cc":
|
|
1175
|
-
return
|
|
1174
|
+
return E(a, n.length);
|
|
1176
1175
|
case "co":
|
|
1177
1176
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1178
1177
|
case "ccc":
|
|
@@ -1205,7 +1204,7 @@ const X = {
|
|
|
1205
1204
|
case "i":
|
|
1206
1205
|
return String(o);
|
|
1207
1206
|
case "ii":
|
|
1208
|
-
return
|
|
1207
|
+
return E(o, n.length);
|
|
1209
1208
|
case "io":
|
|
1210
1209
|
return e.ordinalNumber(o, { unit: "day" });
|
|
1211
1210
|
case "iii":
|
|
@@ -1263,7 +1262,7 @@ const X = {
|
|
|
1263
1262
|
b: function(t, n, e) {
|
|
1264
1263
|
const r = t.getHours();
|
|
1265
1264
|
let o;
|
|
1266
|
-
switch (r === 12 ? o =
|
|
1265
|
+
switch (r === 12 ? o = J.noon : r === 0 ? o = J.midnight : o = r / 12 >= 1 ? "pm" : "am", n) {
|
|
1267
1266
|
case "b":
|
|
1268
1267
|
case "bb":
|
|
1269
1268
|
return e.dayPeriod(o, {
|
|
@@ -1292,7 +1291,7 @@ const X = {
|
|
|
1292
1291
|
B: function(t, n, e) {
|
|
1293
1292
|
const r = t.getHours();
|
|
1294
1293
|
let o;
|
|
1295
|
-
switch (r >= 17 ? o =
|
|
1294
|
+
switch (r >= 17 ? o = J.evening : r >= 12 ? o = J.afternoon : r >= 4 ? o = J.morning : o = J.night, n) {
|
|
1296
1295
|
case "B":
|
|
1297
1296
|
case "BB":
|
|
1298
1297
|
case "BBB":
|
|
@@ -1319,33 +1318,33 @@ const X = {
|
|
|
1319
1318
|
let r = t.getHours() % 12;
|
|
1320
1319
|
return r === 0 && (r = 12), e.ordinalNumber(r, { unit: "hour" });
|
|
1321
1320
|
}
|
|
1322
|
-
return
|
|
1321
|
+
return U.h(t, n);
|
|
1323
1322
|
},
|
|
1324
1323
|
// Hour [0-23]
|
|
1325
1324
|
H: function(t, n, e) {
|
|
1326
|
-
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1325
|
+
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) : U.H(t, n);
|
|
1327
1326
|
},
|
|
1328
1327
|
// Hour [0-11]
|
|
1329
1328
|
K: function(t, n, e) {
|
|
1330
1329
|
const r = t.getHours() % 12;
|
|
1331
|
-
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1330
|
+
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) : E(r, n.length);
|
|
1332
1331
|
},
|
|
1333
1332
|
// Hour [1-24]
|
|
1334
1333
|
k: function(t, n, e) {
|
|
1335
1334
|
let r = t.getHours();
|
|
1336
|
-
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1335
|
+
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) : E(r, n.length);
|
|
1337
1336
|
},
|
|
1338
1337
|
// Minute
|
|
1339
1338
|
m: function(t, n, e) {
|
|
1340
|
-
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1339
|
+
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) : U.m(t, n);
|
|
1341
1340
|
},
|
|
1342
1341
|
// Second
|
|
1343
1342
|
s: function(t, n, e) {
|
|
1344
|
-
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1343
|
+
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) : U.s(t, n);
|
|
1345
1344
|
},
|
|
1346
1345
|
// Fraction of second
|
|
1347
1346
|
S: function(t, n) {
|
|
1348
|
-
return
|
|
1347
|
+
return U.S(t, n);
|
|
1349
1348
|
},
|
|
1350
1349
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1351
1350
|
X: function(t, n, e) {
|
|
@@ -1354,14 +1353,14 @@ const X = {
|
|
|
1354
1353
|
return "Z";
|
|
1355
1354
|
switch (n) {
|
|
1356
1355
|
case "X":
|
|
1357
|
-
return
|
|
1356
|
+
return Ae(r);
|
|
1358
1357
|
case "XXXX":
|
|
1359
1358
|
case "XX":
|
|
1360
|
-
return
|
|
1359
|
+
return z(r);
|
|
1361
1360
|
case "XXXXX":
|
|
1362
1361
|
case "XXX":
|
|
1363
1362
|
default:
|
|
1364
|
-
return
|
|
1363
|
+
return z(r, ":");
|
|
1365
1364
|
}
|
|
1366
1365
|
},
|
|
1367
1366
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1369,14 +1368,14 @@ const X = {
|
|
|
1369
1368
|
const r = t.getTimezoneOffset();
|
|
1370
1369
|
switch (n) {
|
|
1371
1370
|
case "x":
|
|
1372
|
-
return
|
|
1371
|
+
return Ae(r);
|
|
1373
1372
|
case "xxxx":
|
|
1374
1373
|
case "xx":
|
|
1375
|
-
return
|
|
1374
|
+
return z(r);
|
|
1376
1375
|
case "xxxxx":
|
|
1377
1376
|
case "xxx":
|
|
1378
1377
|
default:
|
|
1379
|
-
return
|
|
1378
|
+
return z(r, ":");
|
|
1380
1379
|
}
|
|
1381
1380
|
},
|
|
1382
1381
|
// Timezone (GMT)
|
|
@@ -1386,10 +1385,10 @@ const X = {
|
|
|
1386
1385
|
case "O":
|
|
1387
1386
|
case "OO":
|
|
1388
1387
|
case "OOO":
|
|
1389
|
-
return "GMT" +
|
|
1388
|
+
return "GMT" + Ye(r, ":");
|
|
1390
1389
|
case "OOOO":
|
|
1391
1390
|
default:
|
|
1392
|
-
return "GMT" +
|
|
1391
|
+
return "GMT" + z(r, ":");
|
|
1393
1392
|
}
|
|
1394
1393
|
},
|
|
1395
1394
|
// Timezone (specific non-location)
|
|
@@ -1399,35 +1398,35 @@ const X = {
|
|
|
1399
1398
|
case "z":
|
|
1400
1399
|
case "zz":
|
|
1401
1400
|
case "zzz":
|
|
1402
|
-
return "GMT" +
|
|
1401
|
+
return "GMT" + Ye(r, ":");
|
|
1403
1402
|
case "zzzz":
|
|
1404
1403
|
default:
|
|
1405
|
-
return "GMT" +
|
|
1404
|
+
return "GMT" + z(r, ":");
|
|
1406
1405
|
}
|
|
1407
1406
|
},
|
|
1408
1407
|
// Seconds timestamp
|
|
1409
1408
|
t: function(t, n, e) {
|
|
1410
1409
|
const r = Math.trunc(t.getTime() / 1e3);
|
|
1411
|
-
return
|
|
1410
|
+
return E(r, n.length);
|
|
1412
1411
|
},
|
|
1413
1412
|
// Milliseconds timestamp
|
|
1414
1413
|
T: function(t, n, e) {
|
|
1415
1414
|
const r = t.getTime();
|
|
1416
|
-
return
|
|
1415
|
+
return E(r, n.length);
|
|
1417
1416
|
}
|
|
1418
1417
|
};
|
|
1419
|
-
function
|
|
1418
|
+
function Ye(t, n = "") {
|
|
1420
1419
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
1421
|
-
return a === 0 ? e + String(o) : e + String(o) + n +
|
|
1420
|
+
return a === 0 ? e + String(o) : e + String(o) + n + E(a, 2);
|
|
1422
1421
|
}
|
|
1423
|
-
function
|
|
1424
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") +
|
|
1422
|
+
function Ae(t, n) {
|
|
1423
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + E(Math.abs(t) / 60, 2) : z(t, n);
|
|
1425
1424
|
}
|
|
1426
|
-
function
|
|
1427
|
-
const e = t > 0 ? "-" : "+", r = Math.abs(t), o =
|
|
1425
|
+
function z(t, n = "") {
|
|
1426
|
+
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = E(Math.trunc(r / 60), 2), a = E(r % 60, 2);
|
|
1428
1427
|
return e + o + n + a;
|
|
1429
1428
|
}
|
|
1430
|
-
const
|
|
1429
|
+
const qe = (t, n) => {
|
|
1431
1430
|
switch (t) {
|
|
1432
1431
|
case "P":
|
|
1433
1432
|
return n.date({ width: "short" });
|
|
@@ -1451,10 +1450,10 @@ const _e = (t, n) => {
|
|
|
1451
1450
|
default:
|
|
1452
1451
|
return n.time({ width: "full" });
|
|
1453
1452
|
}
|
|
1454
|
-
},
|
|
1453
|
+
}, Qn = (t, n) => {
|
|
1455
1454
|
const e = t.match(/(P+)(p+)?/) || [], r = e[1], o = e[2];
|
|
1456
1455
|
if (!o)
|
|
1457
|
-
return
|
|
1456
|
+
return qe(t, n);
|
|
1458
1457
|
let a;
|
|
1459
1458
|
switch (r) {
|
|
1460
1459
|
case "P":
|
|
@@ -1471,79 +1470,79 @@ const _e = (t, n) => {
|
|
|
1471
1470
|
a = n.dateTime({ width: "full" });
|
|
1472
1471
|
break;
|
|
1473
1472
|
}
|
|
1474
|
-
return a.replace("{{date}}",
|
|
1475
|
-
},
|
|
1473
|
+
return a.replace("{{date}}", qe(r, n)).replace("{{time}}", rt(o, n));
|
|
1474
|
+
}, Me = {
|
|
1476
1475
|
p: rt,
|
|
1477
|
-
P:
|
|
1478
|
-
},
|
|
1476
|
+
P: Qn
|
|
1477
|
+
}, Un = /^D+$/, Xn = /^Y+$/, zn = ["D", "DD", "YY", "YYYY"];
|
|
1479
1478
|
function ot(t) {
|
|
1480
|
-
return
|
|
1479
|
+
return Un.test(t);
|
|
1481
1480
|
}
|
|
1482
1481
|
function at(t) {
|
|
1483
|
-
return
|
|
1482
|
+
return Xn.test(t);
|
|
1484
1483
|
}
|
|
1485
|
-
function
|
|
1486
|
-
const r =
|
|
1487
|
-
if (console.warn(r),
|
|
1484
|
+
function Ce(t, n, e) {
|
|
1485
|
+
const r = Jn(t, n, e);
|
|
1486
|
+
if (console.warn(r), zn.includes(t)) throw new RangeError(r);
|
|
1488
1487
|
}
|
|
1489
|
-
function
|
|
1488
|
+
function Jn(t, n, e) {
|
|
1490
1489
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1491
1490
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1492
1491
|
}
|
|
1493
|
-
const
|
|
1494
|
-
function
|
|
1495
|
-
var
|
|
1496
|
-
const r =
|
|
1497
|
-
if (!Ke(
|
|
1492
|
+
const Zn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Kn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, er = /^'([^]*?)'?$/, tr = /''/g, nr = /[a-zA-Z]/;
|
|
1493
|
+
function _e(t, n, e) {
|
|
1494
|
+
var d, s, l, m;
|
|
1495
|
+
const r = ne(), o = r.locale ?? et, a = r.firstWeekContainsDate ?? ((s = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : s.firstWeekContainsDate) ?? 1, i = r.weekStartsOn ?? ((m = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : m.weekStartsOn) ?? 0, u = _(t);
|
|
1496
|
+
if (!Ke(u))
|
|
1498
1497
|
throw new RangeError("Invalid time value");
|
|
1499
|
-
let
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1502
|
-
const
|
|
1503
|
-
return
|
|
1498
|
+
let f = n.match(Kn).map((h) => {
|
|
1499
|
+
const g = h[0];
|
|
1500
|
+
if (g === "p" || g === "P") {
|
|
1501
|
+
const P = Me[g];
|
|
1502
|
+
return P(h, o.formatLong);
|
|
1504
1503
|
}
|
|
1505
|
-
return
|
|
1506
|
-
}).join("").match(
|
|
1507
|
-
if (
|
|
1504
|
+
return h;
|
|
1505
|
+
}).join("").match(Zn).map((h) => {
|
|
1506
|
+
if (h === "''")
|
|
1508
1507
|
return { isToken: !1, value: "'" };
|
|
1509
|
-
const
|
|
1510
|
-
if (
|
|
1511
|
-
return { isToken: !1, value:
|
|
1512
|
-
if (
|
|
1513
|
-
return { isToken: !0, value:
|
|
1514
|
-
if (
|
|
1508
|
+
const g = h[0];
|
|
1509
|
+
if (g === "'")
|
|
1510
|
+
return { isToken: !1, value: rr(h) };
|
|
1511
|
+
if (We[g])
|
|
1512
|
+
return { isToken: !0, value: h };
|
|
1513
|
+
if (g.match(nr))
|
|
1515
1514
|
throw new RangeError(
|
|
1516
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1515
|
+
"Format string contains an unescaped latin alphabet character `" + g + "`"
|
|
1517
1516
|
);
|
|
1518
|
-
return { isToken: !1, value:
|
|
1517
|
+
return { isToken: !1, value: h };
|
|
1519
1518
|
});
|
|
1520
|
-
o.localize.preprocessor && (
|
|
1521
|
-
const
|
|
1519
|
+
o.localize.preprocessor && (f = o.localize.preprocessor(u, f));
|
|
1520
|
+
const c = {
|
|
1522
1521
|
firstWeekContainsDate: a,
|
|
1523
1522
|
weekStartsOn: i,
|
|
1524
1523
|
locale: o
|
|
1525
1524
|
};
|
|
1526
|
-
return
|
|
1527
|
-
if (!
|
|
1528
|
-
const
|
|
1529
|
-
(at(
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1525
|
+
return f.map((h) => {
|
|
1526
|
+
if (!h.isToken) return h.value;
|
|
1527
|
+
const g = h.value;
|
|
1528
|
+
(at(g) || ot(g)) && Ce(g, n, String(t));
|
|
1529
|
+
const P = We[g[0]];
|
|
1530
|
+
return P(u, g, o.localize, c);
|
|
1532
1531
|
}).join("");
|
|
1533
1532
|
}
|
|
1534
|
-
function
|
|
1535
|
-
const n = t.match(
|
|
1536
|
-
return n ? n[1].replace(
|
|
1533
|
+
function rr(t) {
|
|
1534
|
+
const n = t.match(er);
|
|
1535
|
+
return n ? n[1].replace(tr, "'") : t;
|
|
1537
1536
|
}
|
|
1538
|
-
function
|
|
1539
|
-
return Object.assign({},
|
|
1537
|
+
function or() {
|
|
1538
|
+
return Object.assign({}, ne());
|
|
1540
1539
|
}
|
|
1541
|
-
function
|
|
1542
|
-
let e =
|
|
1540
|
+
function ar(t) {
|
|
1541
|
+
let e = _(t).getDay();
|
|
1543
1542
|
return e === 0 && (e = 7), e;
|
|
1544
1543
|
}
|
|
1545
1544
|
function sr(t, n) {
|
|
1546
|
-
const e = n instanceof Date ?
|
|
1545
|
+
const e = n instanceof Date ? N(n, 0) : new n(0);
|
|
1547
1546
|
return e.setFullYear(
|
|
1548
1547
|
t.getFullYear(),
|
|
1549
1548
|
t.getMonth(),
|
|
@@ -1555,8 +1554,8 @@ function sr(t, n) {
|
|
|
1555
1554
|
t.getMilliseconds()
|
|
1556
1555
|
), e;
|
|
1557
1556
|
}
|
|
1558
|
-
const
|
|
1559
|
-
class
|
|
1557
|
+
const ir = 10;
|
|
1558
|
+
class st {
|
|
1560
1559
|
constructor() {
|
|
1561
1560
|
p(this, "subPriority", 0);
|
|
1562
1561
|
}
|
|
@@ -1564,7 +1563,7 @@ class it {
|
|
|
1564
1563
|
return !0;
|
|
1565
1564
|
}
|
|
1566
1565
|
}
|
|
1567
|
-
class
|
|
1566
|
+
class ur extends st {
|
|
1568
1567
|
constructor(n, e, r, o, a) {
|
|
1569
1568
|
super(), this.value = n, this.validateValue = e, this.setValue = r, this.priority = o, a && (this.subPriority = a);
|
|
1570
1569
|
}
|
|
@@ -1575,21 +1574,21 @@ class lr extends it {
|
|
|
1575
1574
|
return this.setValue(n, e, this.value, r);
|
|
1576
1575
|
}
|
|
1577
1576
|
}
|
|
1578
|
-
class
|
|
1577
|
+
class lr extends st {
|
|
1579
1578
|
constructor() {
|
|
1580
1579
|
super(...arguments);
|
|
1581
|
-
p(this, "priority",
|
|
1580
|
+
p(this, "priority", ir);
|
|
1582
1581
|
p(this, "subPriority", -1);
|
|
1583
1582
|
}
|
|
1584
1583
|
set(e, r) {
|
|
1585
|
-
return r.timestampIsSet ? e :
|
|
1584
|
+
return r.timestampIsSet ? e : N(e, sr(e, Date));
|
|
1586
1585
|
}
|
|
1587
1586
|
}
|
|
1588
|
-
class
|
|
1587
|
+
class H {
|
|
1589
1588
|
run(n, e, r, o) {
|
|
1590
1589
|
const a = this.parse(n, e, r, o);
|
|
1591
1590
|
return a ? {
|
|
1592
|
-
setter: new
|
|
1591
|
+
setter: new ur(
|
|
1593
1592
|
a.value,
|
|
1594
1593
|
this.validate,
|
|
1595
1594
|
this.set,
|
|
@@ -1603,7 +1602,7 @@ class P {
|
|
|
1603
1602
|
return !0;
|
|
1604
1603
|
}
|
|
1605
1604
|
}
|
|
1606
|
-
class
|
|
1605
|
+
class cr extends H {
|
|
1607
1606
|
constructor() {
|
|
1608
1607
|
super(...arguments);
|
|
1609
1608
|
p(this, "priority", 140);
|
|
@@ -1664,7 +1663,7 @@ const Y = {
|
|
|
1664
1663
|
// 0 to 999, -0 to -999
|
|
1665
1664
|
fourDigitsSigned: /^-?\d{1,4}/
|
|
1666
1665
|
// 0 to 9999, -0 to -9999
|
|
1667
|
-
},
|
|
1666
|
+
}, R = {
|
|
1668
1667
|
basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
|
|
1669
1668
|
basic: /^([+-])(\d{2})(\d{2})|Z/,
|
|
1670
1669
|
basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
|
|
@@ -1677,14 +1676,14 @@ function A(t, n) {
|
|
|
1677
1676
|
rest: t.rest
|
|
1678
1677
|
};
|
|
1679
1678
|
}
|
|
1680
|
-
function
|
|
1679
|
+
function S(t, n) {
|
|
1681
1680
|
const e = n.match(t);
|
|
1682
1681
|
return e ? {
|
|
1683
1682
|
value: parseInt(e[0], 10),
|
|
1684
1683
|
rest: n.slice(e[0].length)
|
|
1685
1684
|
} : null;
|
|
1686
1685
|
}
|
|
1687
|
-
function
|
|
1686
|
+
function Q(t, n) {
|
|
1688
1687
|
const e = n.match(t);
|
|
1689
1688
|
if (!e)
|
|
1690
1689
|
return null;
|
|
@@ -1695,42 +1694,42 @@ function U(t, n) {
|
|
|
1695
1694
|
};
|
|
1696
1695
|
const r = e[1] === "+" ? 1 : -1, o = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0, i = e[5] ? parseInt(e[5], 10) : 0;
|
|
1697
1696
|
return {
|
|
1698
|
-
value: r * (o *
|
|
1697
|
+
value: r * (o * an + a * on + i * sn),
|
|
1699
1698
|
rest: n.slice(e[0].length)
|
|
1700
1699
|
};
|
|
1701
1700
|
}
|
|
1702
|
-
function
|
|
1703
|
-
return
|
|
1701
|
+
function it(t) {
|
|
1702
|
+
return S(Y.anyDigitsSigned, t);
|
|
1704
1703
|
}
|
|
1705
|
-
function
|
|
1704
|
+
function L(t, n) {
|
|
1706
1705
|
switch (t) {
|
|
1707
1706
|
case 1:
|
|
1708
|
-
return
|
|
1707
|
+
return S(Y.singleDigit, n);
|
|
1709
1708
|
case 2:
|
|
1710
|
-
return
|
|
1709
|
+
return S(Y.twoDigits, n);
|
|
1711
1710
|
case 3:
|
|
1712
|
-
return
|
|
1711
|
+
return S(Y.threeDigits, n);
|
|
1713
1712
|
case 4:
|
|
1714
|
-
return
|
|
1713
|
+
return S(Y.fourDigits, n);
|
|
1715
1714
|
default:
|
|
1716
|
-
return
|
|
1715
|
+
return S(new RegExp("^\\d{1," + t + "}"), n);
|
|
1717
1716
|
}
|
|
1718
1717
|
}
|
|
1719
1718
|
function ye(t, n) {
|
|
1720
1719
|
switch (t) {
|
|
1721
1720
|
case 1:
|
|
1722
|
-
return
|
|
1721
|
+
return S(Y.singleDigitSigned, n);
|
|
1723
1722
|
case 2:
|
|
1724
|
-
return
|
|
1723
|
+
return S(Y.twoDigitsSigned, n);
|
|
1725
1724
|
case 3:
|
|
1726
|
-
return
|
|
1725
|
+
return S(Y.threeDigitsSigned, n);
|
|
1727
1726
|
case 4:
|
|
1728
|
-
return
|
|
1727
|
+
return S(Y.fourDigitsSigned, n);
|
|
1729
1728
|
default:
|
|
1730
|
-
return
|
|
1729
|
+
return S(new RegExp("^-?\\d{1," + t + "}"), n);
|
|
1731
1730
|
}
|
|
1732
1731
|
}
|
|
1733
|
-
function
|
|
1732
|
+
function He(t) {
|
|
1734
1733
|
switch (t) {
|
|
1735
1734
|
case "morning":
|
|
1736
1735
|
return 4;
|
|
@@ -1753,15 +1752,15 @@ function ut(t, n) {
|
|
|
1753
1752
|
if (r <= 50)
|
|
1754
1753
|
o = t || 100;
|
|
1755
1754
|
else {
|
|
1756
|
-
const a = r + 50, i = Math.trunc(a / 100) * 100,
|
|
1757
|
-
o = t + i - (
|
|
1755
|
+
const a = r + 50, i = Math.trunc(a / 100) * 100, u = t >= a % 100;
|
|
1756
|
+
o = t + i - (u ? 100 : 0);
|
|
1758
1757
|
}
|
|
1759
1758
|
return e ? o : 1 - o;
|
|
1760
1759
|
}
|
|
1761
1760
|
function lt(t) {
|
|
1762
1761
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1763
1762
|
}
|
|
1764
|
-
class
|
|
1763
|
+
class dr extends H {
|
|
1765
1764
|
constructor() {
|
|
1766
1765
|
super(...arguments);
|
|
1767
1766
|
p(this, "priority", 130);
|
|
@@ -1774,7 +1773,7 @@ class fr extends P {
|
|
|
1774
1773
|
});
|
|
1775
1774
|
switch (r) {
|
|
1776
1775
|
case "y":
|
|
1777
|
-
return A(
|
|
1776
|
+
return A(L(4, e), a);
|
|
1778
1777
|
case "yo":
|
|
1779
1778
|
return A(
|
|
1780
1779
|
o.ordinalNumber(e, {
|
|
@@ -1783,7 +1782,7 @@ class fr extends P {
|
|
|
1783
1782
|
a
|
|
1784
1783
|
);
|
|
1785
1784
|
default:
|
|
1786
|
-
return A(
|
|
1785
|
+
return A(L(r.length, e), a);
|
|
1787
1786
|
}
|
|
1788
1787
|
}
|
|
1789
1788
|
validate(e, r) {
|
|
@@ -1792,17 +1791,17 @@ class fr extends P {
|
|
|
1792
1791
|
set(e, r, o) {
|
|
1793
1792
|
const a = e.getFullYear();
|
|
1794
1793
|
if (o.isTwoDigitYear) {
|
|
1795
|
-
const
|
|
1794
|
+
const u = ut(
|
|
1796
1795
|
o.year,
|
|
1797
1796
|
a
|
|
1798
1797
|
);
|
|
1799
|
-
return e.setFullYear(
|
|
1798
|
+
return e.setFullYear(u, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1800
1799
|
}
|
|
1801
1800
|
const i = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1802
1801
|
return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1803
1802
|
}
|
|
1804
1803
|
}
|
|
1805
|
-
class
|
|
1804
|
+
class fr extends H {
|
|
1806
1805
|
constructor() {
|
|
1807
1806
|
super(...arguments);
|
|
1808
1807
|
p(this, "priority", 130);
|
|
@@ -1829,7 +1828,7 @@ class pr extends P {
|
|
|
1829
1828
|
});
|
|
1830
1829
|
switch (r) {
|
|
1831
1830
|
case "Y":
|
|
1832
|
-
return A(
|
|
1831
|
+
return A(L(4, e), a);
|
|
1833
1832
|
case "Yo":
|
|
1834
1833
|
return A(
|
|
1835
1834
|
o.ordinalNumber(e, {
|
|
@@ -1838,30 +1837,30 @@ class pr extends P {
|
|
|
1838
1837
|
a
|
|
1839
1838
|
);
|
|
1840
1839
|
default:
|
|
1841
|
-
return A(
|
|
1840
|
+
return A(L(r.length, e), a);
|
|
1842
1841
|
}
|
|
1843
1842
|
}
|
|
1844
1843
|
validate(e, r) {
|
|
1845
1844
|
return r.isTwoDigitYear || r.year > 0;
|
|
1846
1845
|
}
|
|
1847
1846
|
set(e, r, o, a) {
|
|
1848
|
-
const i =
|
|
1847
|
+
const i = Oe(e, a);
|
|
1849
1848
|
if (o.isTwoDigitYear) {
|
|
1850
|
-
const
|
|
1849
|
+
const f = ut(
|
|
1851
1850
|
o.year,
|
|
1852
1851
|
i
|
|
1853
1852
|
);
|
|
1854
1853
|
return e.setFullYear(
|
|
1855
|
-
|
|
1854
|
+
f,
|
|
1856
1855
|
0,
|
|
1857
1856
|
a.firstWeekContainsDate
|
|
1858
|
-
), e.setHours(0, 0, 0, 0),
|
|
1857
|
+
), e.setHours(0, 0, 0, 0), X(e, a);
|
|
1859
1858
|
}
|
|
1860
|
-
const
|
|
1861
|
-
return e.setFullYear(
|
|
1859
|
+
const u = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1860
|
+
return e.setFullYear(u, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), X(e, a);
|
|
1862
1861
|
}
|
|
1863
1862
|
}
|
|
1864
|
-
class
|
|
1863
|
+
class pr extends H {
|
|
1865
1864
|
constructor() {
|
|
1866
1865
|
super(...arguments);
|
|
1867
1866
|
p(this, "priority", 130);
|
|
@@ -1887,11 +1886,11 @@ class mr extends P {
|
|
|
1887
1886
|
return ye(r === "R" ? 4 : r.length, e);
|
|
1888
1887
|
}
|
|
1889
1888
|
set(e, r, o) {
|
|
1890
|
-
const a =
|
|
1891
|
-
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0),
|
|
1889
|
+
const a = N(e, 0);
|
|
1890
|
+
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0), ee(a);
|
|
1892
1891
|
}
|
|
1893
1892
|
}
|
|
1894
|
-
class
|
|
1893
|
+
class mr extends H {
|
|
1895
1894
|
constructor() {
|
|
1896
1895
|
super(...arguments);
|
|
1897
1896
|
p(this, "priority", 130);
|
|
@@ -1904,7 +1903,7 @@ class hr extends P {
|
|
|
1904
1903
|
return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1905
1904
|
}
|
|
1906
1905
|
}
|
|
1907
|
-
class
|
|
1906
|
+
class hr extends H {
|
|
1908
1907
|
constructor() {
|
|
1909
1908
|
super(...arguments);
|
|
1910
1909
|
p(this, "priority", 120);
|
|
@@ -1929,7 +1928,7 @@ class yr extends P {
|
|
|
1929
1928
|
switch (r) {
|
|
1930
1929
|
case "Q":
|
|
1931
1930
|
case "QQ":
|
|
1932
|
-
return
|
|
1931
|
+
return L(r.length, e);
|
|
1933
1932
|
case "Qo":
|
|
1934
1933
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1935
1934
|
case "QQQ":
|
|
@@ -1966,7 +1965,7 @@ class yr extends P {
|
|
|
1966
1965
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
1967
1966
|
}
|
|
1968
1967
|
}
|
|
1969
|
-
class
|
|
1968
|
+
class yr extends H {
|
|
1970
1969
|
constructor() {
|
|
1971
1970
|
super(...arguments);
|
|
1972
1971
|
p(this, "priority", 120);
|
|
@@ -1991,7 +1990,7 @@ class gr extends P {
|
|
|
1991
1990
|
switch (r) {
|
|
1992
1991
|
case "q":
|
|
1993
1992
|
case "qq":
|
|
1994
|
-
return
|
|
1993
|
+
return L(r.length, e);
|
|
1995
1994
|
case "qo":
|
|
1996
1995
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1997
1996
|
case "qqq":
|
|
@@ -2028,7 +2027,7 @@ class gr extends P {
|
|
|
2028
2027
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2029
2028
|
}
|
|
2030
2029
|
}
|
|
2031
|
-
class
|
|
2030
|
+
class gr extends H {
|
|
2032
2031
|
constructor() {
|
|
2033
2032
|
super(...arguments);
|
|
2034
2033
|
p(this, "incompatibleTokens", [
|
|
@@ -2053,11 +2052,11 @@ class br extends P {
|
|
|
2053
2052
|
switch (r) {
|
|
2054
2053
|
case "M":
|
|
2055
2054
|
return A(
|
|
2056
|
-
|
|
2055
|
+
S(Y.month, e),
|
|
2057
2056
|
a
|
|
2058
2057
|
);
|
|
2059
2058
|
case "MM":
|
|
2060
|
-
return A(
|
|
2059
|
+
return A(L(2, e), a);
|
|
2061
2060
|
case "Mo":
|
|
2062
2061
|
return A(
|
|
2063
2062
|
o.ordinalNumber(e, {
|
|
@@ -2090,7 +2089,7 @@ class br extends P {
|
|
|
2090
2089
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2091
2090
|
}
|
|
2092
2091
|
}
|
|
2093
|
-
class
|
|
2092
|
+
class br extends H {
|
|
2094
2093
|
constructor() {
|
|
2095
2094
|
super(...arguments);
|
|
2096
2095
|
p(this, "priority", 110);
|
|
@@ -2115,11 +2114,11 @@ class wr extends P {
|
|
|
2115
2114
|
switch (r) {
|
|
2116
2115
|
case "L":
|
|
2117
2116
|
return A(
|
|
2118
|
-
|
|
2117
|
+
S(Y.month, e),
|
|
2119
2118
|
a
|
|
2120
2119
|
);
|
|
2121
2120
|
case "LL":
|
|
2122
|
-
return A(
|
|
2121
|
+
return A(L(2, e), a);
|
|
2123
2122
|
case "Lo":
|
|
2124
2123
|
return A(
|
|
2125
2124
|
o.ordinalNumber(e, {
|
|
@@ -2152,11 +2151,11 @@ class wr extends P {
|
|
|
2152
2151
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2153
2152
|
}
|
|
2154
2153
|
}
|
|
2155
|
-
function
|
|
2156
|
-
const r =
|
|
2154
|
+
function wr(t, n, e) {
|
|
2155
|
+
const r = _(t), o = nt(r, e) - n;
|
|
2157
2156
|
return r.setDate(r.getDate() - o * 7), r;
|
|
2158
2157
|
}
|
|
2159
|
-
class
|
|
2158
|
+
class vr extends H {
|
|
2160
2159
|
constructor() {
|
|
2161
2160
|
super(...arguments);
|
|
2162
2161
|
p(this, "priority", 100);
|
|
@@ -2179,25 +2178,25 @@ class xr extends P {
|
|
|
2179
2178
|
parse(e, r, o) {
|
|
2180
2179
|
switch (r) {
|
|
2181
2180
|
case "w":
|
|
2182
|
-
return
|
|
2181
|
+
return S(Y.week, e);
|
|
2183
2182
|
case "wo":
|
|
2184
2183
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2185
2184
|
default:
|
|
2186
|
-
return
|
|
2185
|
+
return L(r.length, e);
|
|
2187
2186
|
}
|
|
2188
2187
|
}
|
|
2189
2188
|
validate(e, r) {
|
|
2190
2189
|
return r >= 1 && r <= 53;
|
|
2191
2190
|
}
|
|
2192
2191
|
set(e, r, o, a) {
|
|
2193
|
-
return
|
|
2192
|
+
return X(wr(e, o, a), a);
|
|
2194
2193
|
}
|
|
2195
2194
|
}
|
|
2196
|
-
function
|
|
2197
|
-
const e =
|
|
2195
|
+
function xr(t, n) {
|
|
2196
|
+
const e = _(t), r = tt(e) - n;
|
|
2198
2197
|
return e.setDate(e.getDate() - r * 7), e;
|
|
2199
2198
|
}
|
|
2200
|
-
class
|
|
2199
|
+
class Mr extends H {
|
|
2201
2200
|
constructor() {
|
|
2202
2201
|
super(...arguments);
|
|
2203
2202
|
p(this, "priority", 100);
|
|
@@ -2221,21 +2220,21 @@ class Cr extends P {
|
|
|
2221
2220
|
parse(e, r, o) {
|
|
2222
2221
|
switch (r) {
|
|
2223
2222
|
case "I":
|
|
2224
|
-
return
|
|
2223
|
+
return S(Y.week, e);
|
|
2225
2224
|
case "Io":
|
|
2226
2225
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2227
2226
|
default:
|
|
2228
|
-
return
|
|
2227
|
+
return L(r.length, e);
|
|
2229
2228
|
}
|
|
2230
2229
|
}
|
|
2231
2230
|
validate(e, r) {
|
|
2232
2231
|
return r >= 1 && r <= 53;
|
|
2233
2232
|
}
|
|
2234
2233
|
set(e, r, o) {
|
|
2235
|
-
return
|
|
2234
|
+
return ee(xr(e, o));
|
|
2236
2235
|
}
|
|
2237
2236
|
}
|
|
2238
|
-
const
|
|
2237
|
+
const Cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], kr = [
|
|
2239
2238
|
31,
|
|
2240
2239
|
29,
|
|
2241
2240
|
31,
|
|
@@ -2249,7 +2248,7 @@ const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Tr = [
|
|
|
2249
2248
|
30,
|
|
2250
2249
|
31
|
|
2251
2250
|
];
|
|
2252
|
-
class
|
|
2251
|
+
class Tr extends H {
|
|
2253
2252
|
constructor() {
|
|
2254
2253
|
super(...arguments);
|
|
2255
2254
|
p(this, "priority", 90);
|
|
@@ -2272,22 +2271,22 @@ class Pr extends P {
|
|
|
2272
2271
|
parse(e, r, o) {
|
|
2273
2272
|
switch (r) {
|
|
2274
2273
|
case "d":
|
|
2275
|
-
return
|
|
2274
|
+
return S(Y.date, e);
|
|
2276
2275
|
case "do":
|
|
2277
2276
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2278
2277
|
default:
|
|
2279
|
-
return
|
|
2278
|
+
return L(r.length, e);
|
|
2280
2279
|
}
|
|
2281
2280
|
}
|
|
2282
2281
|
validate(e, r) {
|
|
2283
2282
|
const o = e.getFullYear(), a = lt(o), i = e.getMonth();
|
|
2284
|
-
return a ? r >= 1 && r <=
|
|
2283
|
+
return a ? r >= 1 && r <= kr[i] : r >= 1 && r <= Cr[i];
|
|
2285
2284
|
}
|
|
2286
2285
|
set(e, r, o) {
|
|
2287
2286
|
return e.setDate(o), e.setHours(0, 0, 0, 0), e;
|
|
2288
2287
|
}
|
|
2289
2288
|
}
|
|
2290
|
-
class
|
|
2289
|
+
class Pr extends H {
|
|
2291
2290
|
constructor() {
|
|
2292
2291
|
super(...arguments);
|
|
2293
2292
|
p(this, "priority", 90);
|
|
@@ -2314,11 +2313,11 @@ class Or extends P {
|
|
|
2314
2313
|
switch (r) {
|
|
2315
2314
|
case "D":
|
|
2316
2315
|
case "DD":
|
|
2317
|
-
return
|
|
2316
|
+
return S(Y.dayOfYear, e);
|
|
2318
2317
|
case "Do":
|
|
2319
2318
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2320
2319
|
default:
|
|
2321
|
-
return
|
|
2320
|
+
return L(r.length, e);
|
|
2322
2321
|
}
|
|
2323
2322
|
}
|
|
2324
2323
|
validate(e, r) {
|
|
@@ -2330,11 +2329,11 @@ class Or extends P {
|
|
|
2330
2329
|
}
|
|
2331
2330
|
}
|
|
2332
2331
|
function Ee(t, n, e) {
|
|
2333
|
-
var
|
|
2334
|
-
const r =
|
|
2335
|
-
return ze(a,
|
|
2332
|
+
var s, l, m, h;
|
|
2333
|
+
const r = ne(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? r.weekStartsOn ?? ((h = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : h.weekStartsOn) ?? 0, a = _(t), i = a.getDay(), f = (n % 7 + 7) % 7, c = 7 - o, d = n < 0 || n > 6 ? n - (i + c) % 7 : (f + c) % 7 - (i + c) % 7;
|
|
2334
|
+
return ze(a, d);
|
|
2336
2335
|
}
|
|
2337
|
-
class Dr extends
|
|
2336
|
+
class Dr extends H {
|
|
2338
2337
|
constructor() {
|
|
2339
2338
|
super(...arguments);
|
|
2340
2339
|
p(this, "priority", 90);
|
|
@@ -2371,7 +2370,7 @@ class Dr extends P {
|
|
|
2371
2370
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2372
2371
|
}
|
|
2373
2372
|
}
|
|
2374
|
-
class
|
|
2373
|
+
class Or extends H {
|
|
2375
2374
|
constructor() {
|
|
2376
2375
|
super(...arguments);
|
|
2377
2376
|
p(this, "priority", 90);
|
|
@@ -2394,14 +2393,14 @@ class Hr extends P {
|
|
|
2394
2393
|
]);
|
|
2395
2394
|
}
|
|
2396
2395
|
parse(e, r, o, a) {
|
|
2397
|
-
const i = (
|
|
2398
|
-
const
|
|
2399
|
-
return (
|
|
2396
|
+
const i = (u) => {
|
|
2397
|
+
const f = Math.floor((u - 1) / 7) * 7;
|
|
2398
|
+
return (u + a.weekStartsOn + 6) % 7 + f;
|
|
2400
2399
|
};
|
|
2401
2400
|
switch (r) {
|
|
2402
2401
|
case "e":
|
|
2403
2402
|
case "ee":
|
|
2404
|
-
return A(
|
|
2403
|
+
return A(L(r.length, e), i);
|
|
2405
2404
|
case "eo":
|
|
2406
2405
|
return A(
|
|
2407
2406
|
o.ordinalNumber(e, {
|
|
@@ -2436,7 +2435,7 @@ class Hr extends P {
|
|
|
2436
2435
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2437
2436
|
}
|
|
2438
2437
|
}
|
|
2439
|
-
class
|
|
2438
|
+
class Hr extends H {
|
|
2440
2439
|
constructor() {
|
|
2441
2440
|
super(...arguments);
|
|
2442
2441
|
p(this, "priority", 90);
|
|
@@ -2459,14 +2458,14 @@ class Br extends P {
|
|
|
2459
2458
|
]);
|
|
2460
2459
|
}
|
|
2461
2460
|
parse(e, r, o, a) {
|
|
2462
|
-
const i = (
|
|
2463
|
-
const
|
|
2464
|
-
return (
|
|
2461
|
+
const i = (u) => {
|
|
2462
|
+
const f = Math.floor((u - 1) / 7) * 7;
|
|
2463
|
+
return (u + a.weekStartsOn + 6) % 7 + f;
|
|
2465
2464
|
};
|
|
2466
2465
|
switch (r) {
|
|
2467
2466
|
case "c":
|
|
2468
2467
|
case "cc":
|
|
2469
|
-
return A(
|
|
2468
|
+
return A(L(r.length, e), i);
|
|
2470
2469
|
case "co":
|
|
2471
2470
|
return A(
|
|
2472
2471
|
o.ordinalNumber(e, {
|
|
@@ -2502,10 +2501,10 @@ class Br extends P {
|
|
|
2502
2501
|
}
|
|
2503
2502
|
}
|
|
2504
2503
|
function Er(t, n) {
|
|
2505
|
-
const e =
|
|
2504
|
+
const e = _(t), r = ar(e), o = n - r;
|
|
2506
2505
|
return ze(e, o);
|
|
2507
2506
|
}
|
|
2508
|
-
class
|
|
2507
|
+
class Br extends H {
|
|
2509
2508
|
constructor() {
|
|
2510
2509
|
super(...arguments);
|
|
2511
2510
|
p(this, "priority", 90);
|
|
@@ -2532,7 +2531,7 @@ class Vr extends P {
|
|
|
2532
2531
|
switch (r) {
|
|
2533
2532
|
case "i":
|
|
2534
2533
|
case "ii":
|
|
2535
|
-
return
|
|
2534
|
+
return L(r.length, e);
|
|
2536
2535
|
case "io":
|
|
2537
2536
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2538
2537
|
case "iii":
|
|
@@ -2595,7 +2594,7 @@ class Vr extends P {
|
|
|
2595
2594
|
return e = Er(e, o), e.setHours(0, 0, 0, 0), e;
|
|
2596
2595
|
}
|
|
2597
2596
|
}
|
|
2598
|
-
class Fr extends
|
|
2597
|
+
class Fr extends H {
|
|
2599
2598
|
constructor() {
|
|
2600
2599
|
super(...arguments);
|
|
2601
2600
|
p(this, "priority", 80);
|
|
@@ -2633,10 +2632,10 @@ class Fr extends P {
|
|
|
2633
2632
|
}
|
|
2634
2633
|
}
|
|
2635
2634
|
set(e, r, o) {
|
|
2636
|
-
return e.setHours(
|
|
2635
|
+
return e.setHours(He(o), 0, 0, 0), e;
|
|
2637
2636
|
}
|
|
2638
2637
|
}
|
|
2639
|
-
class
|
|
2638
|
+
class Vr extends H {
|
|
2640
2639
|
constructor() {
|
|
2641
2640
|
super(...arguments);
|
|
2642
2641
|
p(this, "priority", 80);
|
|
@@ -2674,10 +2673,10 @@ class Nr extends P {
|
|
|
2674
2673
|
}
|
|
2675
2674
|
}
|
|
2676
2675
|
set(e, r, o) {
|
|
2677
|
-
return e.setHours(
|
|
2676
|
+
return e.setHours(He(o), 0, 0, 0), e;
|
|
2678
2677
|
}
|
|
2679
2678
|
}
|
|
2680
|
-
class
|
|
2679
|
+
class Ir extends H {
|
|
2681
2680
|
constructor() {
|
|
2682
2681
|
super(...arguments);
|
|
2683
2682
|
p(this, "priority", 80);
|
|
@@ -2715,10 +2714,10 @@ class Sr extends P {
|
|
|
2715
2714
|
}
|
|
2716
2715
|
}
|
|
2717
2716
|
set(e, r, o) {
|
|
2718
|
-
return e.setHours(
|
|
2717
|
+
return e.setHours(He(o), 0, 0, 0), e;
|
|
2719
2718
|
}
|
|
2720
2719
|
}
|
|
2721
|
-
class
|
|
2720
|
+
class Sr extends H {
|
|
2722
2721
|
constructor() {
|
|
2723
2722
|
super(...arguments);
|
|
2724
2723
|
p(this, "priority", 70);
|
|
@@ -2727,11 +2726,11 @@ class Lr extends P {
|
|
|
2727
2726
|
parse(e, r, o) {
|
|
2728
2727
|
switch (r) {
|
|
2729
2728
|
case "h":
|
|
2730
|
-
return
|
|
2729
|
+
return S(Y.hour12h, e);
|
|
2731
2730
|
case "ho":
|
|
2732
2731
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2733
2732
|
default:
|
|
2734
|
-
return
|
|
2733
|
+
return L(r.length, e);
|
|
2735
2734
|
}
|
|
2736
2735
|
}
|
|
2737
2736
|
validate(e, r) {
|
|
@@ -2742,7 +2741,7 @@ class Lr extends P {
|
|
|
2742
2741
|
return a && o < 12 ? e.setHours(o + 12, 0, 0, 0) : !a && o === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2743
2742
|
}
|
|
2744
2743
|
}
|
|
2745
|
-
class
|
|
2744
|
+
class Nr extends H {
|
|
2746
2745
|
constructor() {
|
|
2747
2746
|
super(...arguments);
|
|
2748
2747
|
p(this, "priority", 70);
|
|
@@ -2751,11 +2750,11 @@ class Ir extends P {
|
|
|
2751
2750
|
parse(e, r, o) {
|
|
2752
2751
|
switch (r) {
|
|
2753
2752
|
case "H":
|
|
2754
|
-
return
|
|
2753
|
+
return S(Y.hour23h, e);
|
|
2755
2754
|
case "Ho":
|
|
2756
2755
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2757
2756
|
default:
|
|
2758
|
-
return
|
|
2757
|
+
return L(r.length, e);
|
|
2759
2758
|
}
|
|
2760
2759
|
}
|
|
2761
2760
|
validate(e, r) {
|
|
@@ -2765,7 +2764,7 @@ class Ir extends P {
|
|
|
2765
2764
|
return e.setHours(o, 0, 0, 0), e;
|
|
2766
2765
|
}
|
|
2767
2766
|
}
|
|
2768
|
-
class
|
|
2767
|
+
class Lr extends H {
|
|
2769
2768
|
constructor() {
|
|
2770
2769
|
super(...arguments);
|
|
2771
2770
|
p(this, "priority", 70);
|
|
@@ -2774,11 +2773,11 @@ class Yr extends P {
|
|
|
2774
2773
|
parse(e, r, o) {
|
|
2775
2774
|
switch (r) {
|
|
2776
2775
|
case "K":
|
|
2777
|
-
return
|
|
2776
|
+
return S(Y.hour11h, e);
|
|
2778
2777
|
case "Ko":
|
|
2779
2778
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2780
2779
|
default:
|
|
2781
|
-
return
|
|
2780
|
+
return L(r.length, e);
|
|
2782
2781
|
}
|
|
2783
2782
|
}
|
|
2784
2783
|
validate(e, r) {
|
|
@@ -2788,7 +2787,7 @@ class Yr extends P {
|
|
|
2788
2787
|
return e.getHours() >= 12 && o < 12 ? e.setHours(o + 12, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2789
2788
|
}
|
|
2790
2789
|
}
|
|
2791
|
-
class
|
|
2790
|
+
class Wr extends H {
|
|
2792
2791
|
constructor() {
|
|
2793
2792
|
super(...arguments);
|
|
2794
2793
|
p(this, "priority", 70);
|
|
@@ -2797,11 +2796,11 @@ class Ar extends P {
|
|
|
2797
2796
|
parse(e, r, o) {
|
|
2798
2797
|
switch (r) {
|
|
2799
2798
|
case "k":
|
|
2800
|
-
return
|
|
2799
|
+
return S(Y.hour24h, e);
|
|
2801
2800
|
case "ko":
|
|
2802
2801
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2803
2802
|
default:
|
|
2804
|
-
return
|
|
2803
|
+
return L(r.length, e);
|
|
2805
2804
|
}
|
|
2806
2805
|
}
|
|
2807
2806
|
validate(e, r) {
|
|
@@ -2812,7 +2811,7 @@ class Ar extends P {
|
|
|
2812
2811
|
return e.setHours(a, 0, 0, 0), e;
|
|
2813
2812
|
}
|
|
2814
2813
|
}
|
|
2815
|
-
class
|
|
2814
|
+
class Yr extends H {
|
|
2816
2815
|
constructor() {
|
|
2817
2816
|
super(...arguments);
|
|
2818
2817
|
p(this, "priority", 60);
|
|
@@ -2821,11 +2820,11 @@ class qr extends P {
|
|
|
2821
2820
|
parse(e, r, o) {
|
|
2822
2821
|
switch (r) {
|
|
2823
2822
|
case "m":
|
|
2824
|
-
return
|
|
2823
|
+
return S(Y.minute, e);
|
|
2825
2824
|
case "mo":
|
|
2826
2825
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2827
2826
|
default:
|
|
2828
|
-
return
|
|
2827
|
+
return L(r.length, e);
|
|
2829
2828
|
}
|
|
2830
2829
|
}
|
|
2831
2830
|
validate(e, r) {
|
|
@@ -2835,7 +2834,7 @@ class qr extends P {
|
|
|
2835
2834
|
return e.setMinutes(o, 0, 0), e;
|
|
2836
2835
|
}
|
|
2837
2836
|
}
|
|
2838
|
-
class
|
|
2837
|
+
class Ar extends H {
|
|
2839
2838
|
constructor() {
|
|
2840
2839
|
super(...arguments);
|
|
2841
2840
|
p(this, "priority", 50);
|
|
@@ -2844,11 +2843,11 @@ class Wr extends P {
|
|
|
2844
2843
|
parse(e, r, o) {
|
|
2845
2844
|
switch (r) {
|
|
2846
2845
|
case "s":
|
|
2847
|
-
return
|
|
2846
|
+
return S(Y.second, e);
|
|
2848
2847
|
case "so":
|
|
2849
2848
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2850
2849
|
default:
|
|
2851
|
-
return
|
|
2850
|
+
return L(r.length, e);
|
|
2852
2851
|
}
|
|
2853
2852
|
}
|
|
2854
2853
|
validate(e, r) {
|
|
@@ -2858,7 +2857,7 @@ class Wr extends P {
|
|
|
2858
2857
|
return e.setSeconds(o, 0), e;
|
|
2859
2858
|
}
|
|
2860
2859
|
}
|
|
2861
|
-
class
|
|
2860
|
+
class qr extends H {
|
|
2862
2861
|
constructor() {
|
|
2863
2862
|
super(...arguments);
|
|
2864
2863
|
p(this, "priority", 30);
|
|
@@ -2866,13 +2865,13 @@ class _r extends P {
|
|
|
2866
2865
|
}
|
|
2867
2866
|
parse(e, r) {
|
|
2868
2867
|
const o = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
|
|
2869
|
-
return A(
|
|
2868
|
+
return A(L(r.length, e), o);
|
|
2870
2869
|
}
|
|
2871
2870
|
set(e, r, o) {
|
|
2872
2871
|
return e.setMilliseconds(o), e;
|
|
2873
2872
|
}
|
|
2874
2873
|
}
|
|
2875
|
-
class
|
|
2874
|
+
class _r extends H {
|
|
2876
2875
|
constructor() {
|
|
2877
2876
|
super(...arguments);
|
|
2878
2877
|
p(this, "priority", 10);
|
|
@@ -2881,35 +2880,35 @@ class Rr extends P {
|
|
|
2881
2880
|
parse(e, r) {
|
|
2882
2881
|
switch (r) {
|
|
2883
2882
|
case "X":
|
|
2884
|
-
return
|
|
2885
|
-
|
|
2883
|
+
return Q(
|
|
2884
|
+
R.basicOptionalMinutes,
|
|
2886
2885
|
e
|
|
2887
2886
|
);
|
|
2888
2887
|
case "XX":
|
|
2889
|
-
return
|
|
2888
|
+
return Q(R.basic, e);
|
|
2890
2889
|
case "XXXX":
|
|
2891
|
-
return
|
|
2892
|
-
|
|
2890
|
+
return Q(
|
|
2891
|
+
R.basicOptionalSeconds,
|
|
2893
2892
|
e
|
|
2894
2893
|
);
|
|
2895
2894
|
case "XXXXX":
|
|
2896
|
-
return
|
|
2897
|
-
|
|
2895
|
+
return Q(
|
|
2896
|
+
R.extendedOptionalSeconds,
|
|
2898
2897
|
e
|
|
2899
2898
|
);
|
|
2900
2899
|
case "XXX":
|
|
2901
2900
|
default:
|
|
2902
|
-
return
|
|
2901
|
+
return Q(R.extended, e);
|
|
2903
2902
|
}
|
|
2904
2903
|
}
|
|
2905
2904
|
set(e, r, o) {
|
|
2906
|
-
return r.timestampIsSet ? e :
|
|
2905
|
+
return r.timestampIsSet ? e : N(
|
|
2907
2906
|
e,
|
|
2908
2907
|
e.getTime() - he(e) - o
|
|
2909
2908
|
);
|
|
2910
2909
|
}
|
|
2911
2910
|
}
|
|
2912
|
-
class
|
|
2911
|
+
class Gr extends H {
|
|
2913
2912
|
constructor() {
|
|
2914
2913
|
super(...arguments);
|
|
2915
2914
|
p(this, "priority", 10);
|
|
@@ -2918,183 +2917,183 @@ class $r extends P {
|
|
|
2918
2917
|
parse(e, r) {
|
|
2919
2918
|
switch (r) {
|
|
2920
2919
|
case "x":
|
|
2921
|
-
return
|
|
2922
|
-
|
|
2920
|
+
return Q(
|
|
2921
|
+
R.basicOptionalMinutes,
|
|
2923
2922
|
e
|
|
2924
2923
|
);
|
|
2925
2924
|
case "xx":
|
|
2926
|
-
return
|
|
2925
|
+
return Q(R.basic, e);
|
|
2927
2926
|
case "xxxx":
|
|
2928
|
-
return
|
|
2929
|
-
|
|
2927
|
+
return Q(
|
|
2928
|
+
R.basicOptionalSeconds,
|
|
2930
2929
|
e
|
|
2931
2930
|
);
|
|
2932
2931
|
case "xxxxx":
|
|
2933
|
-
return
|
|
2934
|
-
|
|
2932
|
+
return Q(
|
|
2933
|
+
R.extendedOptionalSeconds,
|
|
2935
2934
|
e
|
|
2936
2935
|
);
|
|
2937
2936
|
case "xxx":
|
|
2938
2937
|
default:
|
|
2939
|
-
return
|
|
2938
|
+
return Q(R.extended, e);
|
|
2940
2939
|
}
|
|
2941
2940
|
}
|
|
2942
2941
|
set(e, r, o) {
|
|
2943
|
-
return r.timestampIsSet ? e :
|
|
2942
|
+
return r.timestampIsSet ? e : N(
|
|
2944
2943
|
e,
|
|
2945
2944
|
e.getTime() - he(e) - o
|
|
2946
2945
|
);
|
|
2947
2946
|
}
|
|
2948
2947
|
}
|
|
2949
|
-
class
|
|
2948
|
+
class $r extends H {
|
|
2950
2949
|
constructor() {
|
|
2951
2950
|
super(...arguments);
|
|
2952
2951
|
p(this, "priority", 40);
|
|
2953
2952
|
p(this, "incompatibleTokens", "*");
|
|
2954
2953
|
}
|
|
2955
2954
|
parse(e) {
|
|
2956
|
-
return
|
|
2955
|
+
return it(e);
|
|
2957
2956
|
}
|
|
2958
2957
|
set(e, r, o) {
|
|
2959
|
-
return [
|
|
2958
|
+
return [N(e, o * 1e3), { timestampIsSet: !0 }];
|
|
2960
2959
|
}
|
|
2961
2960
|
}
|
|
2962
|
-
class
|
|
2961
|
+
class jr extends H {
|
|
2963
2962
|
constructor() {
|
|
2964
2963
|
super(...arguments);
|
|
2965
2964
|
p(this, "priority", 20);
|
|
2966
2965
|
p(this, "incompatibleTokens", "*");
|
|
2967
2966
|
}
|
|
2968
2967
|
parse(e) {
|
|
2969
|
-
return
|
|
2968
|
+
return it(e);
|
|
2970
2969
|
}
|
|
2971
2970
|
set(e, r, o) {
|
|
2972
|
-
return [
|
|
2973
|
-
}
|
|
2974
|
-
}
|
|
2975
|
-
const
|
|
2976
|
-
G: new
|
|
2977
|
-
y: new
|
|
2978
|
-
Y: new
|
|
2979
|
-
R: new
|
|
2980
|
-
u: new
|
|
2981
|
-
Q: new
|
|
2982
|
-
q: new
|
|
2983
|
-
M: new
|
|
2984
|
-
L: new
|
|
2985
|
-
w: new
|
|
2986
|
-
I: new
|
|
2987
|
-
d: new
|
|
2988
|
-
D: new
|
|
2971
|
+
return [N(e, o), { timestampIsSet: !0 }];
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
const Rr = {
|
|
2975
|
+
G: new cr(),
|
|
2976
|
+
y: new dr(),
|
|
2977
|
+
Y: new fr(),
|
|
2978
|
+
R: new pr(),
|
|
2979
|
+
u: new mr(),
|
|
2980
|
+
Q: new hr(),
|
|
2981
|
+
q: new yr(),
|
|
2982
|
+
M: new gr(),
|
|
2983
|
+
L: new br(),
|
|
2984
|
+
w: new vr(),
|
|
2985
|
+
I: new Mr(),
|
|
2986
|
+
d: new Tr(),
|
|
2987
|
+
D: new Pr(),
|
|
2989
2988
|
E: new Dr(),
|
|
2990
|
-
e: new
|
|
2991
|
-
c: new
|
|
2992
|
-
i: new
|
|
2989
|
+
e: new Or(),
|
|
2990
|
+
c: new Hr(),
|
|
2991
|
+
i: new Br(),
|
|
2993
2992
|
a: new Fr(),
|
|
2994
|
-
b: new
|
|
2995
|
-
B: new
|
|
2996
|
-
h: new
|
|
2997
|
-
H: new
|
|
2998
|
-
K: new
|
|
2999
|
-
k: new
|
|
3000
|
-
m: new
|
|
3001
|
-
s: new
|
|
3002
|
-
S: new
|
|
3003
|
-
X: new
|
|
3004
|
-
x: new
|
|
3005
|
-
t: new
|
|
3006
|
-
T: new
|
|
3007
|
-
},
|
|
3008
|
-
function
|
|
3009
|
-
var
|
|
3010
|
-
const o =
|
|
2993
|
+
b: new Vr(),
|
|
2994
|
+
B: new Ir(),
|
|
2995
|
+
h: new Sr(),
|
|
2996
|
+
H: new Nr(),
|
|
2997
|
+
K: new Lr(),
|
|
2998
|
+
k: new Wr(),
|
|
2999
|
+
m: new Yr(),
|
|
3000
|
+
s: new Ar(),
|
|
3001
|
+
S: new qr(),
|
|
3002
|
+
X: new _r(),
|
|
3003
|
+
x: new Gr(),
|
|
3004
|
+
t: new $r(),
|
|
3005
|
+
T: new jr()
|
|
3006
|
+
}, Qr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ur = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xr = /^'([^]*?)'?$/, zr = /''/g, Jr = /\S/, Zr = /[a-zA-Z]/;
|
|
3007
|
+
function Ge(t, n, e, r) {
|
|
3008
|
+
var g, P, D, O;
|
|
3009
|
+
const o = or(), a = o.locale ?? et, i = o.firstWeekContainsDate ?? ((P = (g = o.locale) == null ? void 0 : g.options) == null ? void 0 : P.firstWeekContainsDate) ?? 1, u = o.weekStartsOn ?? ((O = (D = o.locale) == null ? void 0 : D.options) == null ? void 0 : O.weekStartsOn) ?? 0;
|
|
3011
3010
|
if (n === "")
|
|
3012
|
-
return t === "" ?
|
|
3013
|
-
const
|
|
3011
|
+
return t === "" ? _(e) : N(e, NaN);
|
|
3012
|
+
const f = {
|
|
3014
3013
|
firstWeekContainsDate: i,
|
|
3015
|
-
weekStartsOn:
|
|
3014
|
+
weekStartsOn: u,
|
|
3016
3015
|
locale: a
|
|
3017
|
-
},
|
|
3018
|
-
const
|
|
3019
|
-
if (
|
|
3020
|
-
const
|
|
3021
|
-
return
|
|
3016
|
+
}, c = [new lr()], d = n.match(Ur).map((b) => {
|
|
3017
|
+
const M = b[0];
|
|
3018
|
+
if (M in Me) {
|
|
3019
|
+
const k = Me[M];
|
|
3020
|
+
return k(b, a.formatLong);
|
|
3022
3021
|
}
|
|
3023
|
-
return
|
|
3024
|
-
}).join("").match(
|
|
3025
|
-
for (let
|
|
3026
|
-
at(
|
|
3027
|
-
const
|
|
3028
|
-
if (
|
|
3029
|
-
const { incompatibleTokens:
|
|
3030
|
-
if (Array.isArray(
|
|
3031
|
-
const
|
|
3032
|
-
(
|
|
3022
|
+
return b;
|
|
3023
|
+
}).join("").match(Qr), s = [];
|
|
3024
|
+
for (let b of d) {
|
|
3025
|
+
at(b) && Ce(b, n, t), ot(b) && Ce(b, n, t);
|
|
3026
|
+
const M = b[0], k = Rr[M];
|
|
3027
|
+
if (k) {
|
|
3028
|
+
const { incompatibleTokens: B } = k;
|
|
3029
|
+
if (Array.isArray(B)) {
|
|
3030
|
+
const q = s.find(
|
|
3031
|
+
(C) => B.includes(C.token) || C.token === M
|
|
3033
3032
|
);
|
|
3034
|
-
if (
|
|
3033
|
+
if (q)
|
|
3035
3034
|
throw new RangeError(
|
|
3036
|
-
`The format string mustn't contain \`${
|
|
3035
|
+
`The format string mustn't contain \`${q.fullToken}\` and \`${b}\` at the same time`
|
|
3037
3036
|
);
|
|
3038
|
-
} else if (
|
|
3037
|
+
} else if (k.incompatibleTokens === "*" && s.length > 0)
|
|
3039
3038
|
throw new RangeError(
|
|
3040
|
-
`The format string mustn't contain \`${
|
|
3039
|
+
`The format string mustn't contain \`${b}\` and any other token at the same time`
|
|
3041
3040
|
);
|
|
3042
|
-
|
|
3043
|
-
const
|
|
3041
|
+
s.push({ token: M, fullToken: b });
|
|
3042
|
+
const W = k.run(
|
|
3044
3043
|
t,
|
|
3045
|
-
|
|
3044
|
+
b,
|
|
3046
3045
|
a.match,
|
|
3047
|
-
|
|
3046
|
+
f
|
|
3048
3047
|
);
|
|
3049
|
-
if (!
|
|
3050
|
-
return
|
|
3051
|
-
|
|
3048
|
+
if (!W)
|
|
3049
|
+
return N(e, NaN);
|
|
3050
|
+
c.push(W.setter), t = W.rest;
|
|
3052
3051
|
} else {
|
|
3053
|
-
if (
|
|
3052
|
+
if (M.match(Zr))
|
|
3054
3053
|
throw new RangeError(
|
|
3055
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
3054
|
+
"Format string contains an unescaped latin alphabet character `" + M + "`"
|
|
3056
3055
|
);
|
|
3057
|
-
if (
|
|
3058
|
-
t = t.slice(
|
|
3056
|
+
if (b === "''" ? b = "'" : M === "'" && (b = Kr(b)), t.indexOf(b) === 0)
|
|
3057
|
+
t = t.slice(b.length);
|
|
3059
3058
|
else
|
|
3060
|
-
return
|
|
3059
|
+
return N(e, NaN);
|
|
3061
3060
|
}
|
|
3062
3061
|
}
|
|
3063
|
-
if (t.length > 0 &&
|
|
3064
|
-
return
|
|
3065
|
-
const
|
|
3066
|
-
(
|
|
3067
|
-
).map((
|
|
3068
|
-
let m =
|
|
3062
|
+
if (t.length > 0 && Jr.test(t))
|
|
3063
|
+
return N(e, NaN);
|
|
3064
|
+
const l = c.map((b) => b.priority).sort((b, M) => M - b).filter((b, M, k) => k.indexOf(b) === M).map(
|
|
3065
|
+
(b) => c.filter((M) => M.priority === b).sort((M, k) => k.subPriority - M.subPriority)
|
|
3066
|
+
).map((b) => b[0]);
|
|
3067
|
+
let m = _(e);
|
|
3069
3068
|
if (isNaN(m.getTime()))
|
|
3070
|
-
return
|
|
3071
|
-
const
|
|
3072
|
-
for (const
|
|
3073
|
-
if (!
|
|
3074
|
-
return
|
|
3075
|
-
const
|
|
3076
|
-
Array.isArray(
|
|
3077
|
-
}
|
|
3078
|
-
return
|
|
3069
|
+
return N(e, NaN);
|
|
3070
|
+
const h = {};
|
|
3071
|
+
for (const b of l) {
|
|
3072
|
+
if (!b.validate(m, f))
|
|
3073
|
+
return N(e, NaN);
|
|
3074
|
+
const M = b.set(m, h, f);
|
|
3075
|
+
Array.isArray(M) ? (m = M[0], Object.assign(h, M[1])) : m = M;
|
|
3076
|
+
}
|
|
3077
|
+
return N(e, m);
|
|
3079
3078
|
}
|
|
3080
|
-
function
|
|
3081
|
-
return t.match(
|
|
3079
|
+
function Kr(t) {
|
|
3080
|
+
return t.match(Xr)[1].replace(zr, "'");
|
|
3082
3081
|
}
|
|
3083
|
-
function
|
|
3082
|
+
function F(t) {
|
|
3084
3083
|
return typeof t < "u" && t !== null;
|
|
3085
3084
|
}
|
|
3086
3085
|
function ct(t, n = "hh:mm:ss") {
|
|
3087
3086
|
if (!(!t || !n))
|
|
3088
|
-
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3087
|
+
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), Ge(t.toLowerCase(), n, /* @__PURE__ */ new Date())) : Ge(t, n, /* @__PURE__ */ new Date());
|
|
3089
3088
|
}
|
|
3090
3089
|
function dt(t, n = "hh:mm:ss", e = "AM") {
|
|
3091
|
-
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3090
|
+
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), _e(t, n).toUpperCase()) : _e(t, n);
|
|
3092
3091
|
}
|
|
3093
3092
|
function ft(t, n) {
|
|
3094
3093
|
let e = t || "hh:mm:ss";
|
|
3095
3094
|
return n ? (e = e ? e.replace(/H/g, "h") : "hh:mm:ss a", e.indexOf("a") === -1 && e.indexOf("A") === -1 && (e = e + " a")) : e = e ? e.replace(/h/g, "H") : "HH:mm:ss", e;
|
|
3096
3095
|
}
|
|
3097
|
-
class
|
|
3096
|
+
class eo {
|
|
3098
3097
|
constructor() {
|
|
3099
3098
|
p(this, "hourStep", 1);
|
|
3100
3099
|
p(this, "minuteStep", 1);
|
|
@@ -3139,7 +3138,7 @@ class to {
|
|
|
3139
3138
|
* Get viewHours which is selected in `time-picker-panel` and its range is [12, 1, 2, ..., 11]
|
|
3140
3139
|
*/
|
|
3141
3140
|
get viewHours() {
|
|
3142
|
-
return this.use12Hours &&
|
|
3141
|
+
return this.use12Hours && F(this.temporaryHours) ? this.calculateViewHour(this.temporaryHours) : this.temporaryHours;
|
|
3143
3142
|
}
|
|
3144
3143
|
get minutes() {
|
|
3145
3144
|
return this.temporaryMinutes;
|
|
@@ -3167,7 +3166,7 @@ class to {
|
|
|
3167
3166
|
*/
|
|
3168
3167
|
get defaultViewHours() {
|
|
3169
3168
|
const n = this.defaultOpenValue.getHours();
|
|
3170
|
-
return this.use12Hours &&
|
|
3169
|
+
return this.use12Hours && F(n) ? this.calculateViewHour(n) : n;
|
|
3171
3170
|
}
|
|
3172
3171
|
/**
|
|
3173
3172
|
* @description
|
|
@@ -3196,7 +3195,7 @@ class to {
|
|
|
3196
3195
|
return this.temporaryValue;
|
|
3197
3196
|
}
|
|
3198
3197
|
set value(n) {
|
|
3199
|
-
n !== this.temporaryValue && (this.temporaryValue = n,
|
|
3198
|
+
n !== this.temporaryValue && (this.temporaryValue = n, F(this.temporaryValue) && Ke(this.temporaryValue) ? (this.temporaryHours = this.temporaryValue.getHours(), this.temporaryMinutes = this.temporaryValue.getMinutes(), this.temporarySeconds = this.temporaryValue.getSeconds(), this.use12Hours && F(this.temporaryHours) && (this.temporarySelected12Hours = this.temporaryHours >= 12 ? "PM" : "AM")) : this.clearTimeValue());
|
|
3200
3199
|
}
|
|
3201
3200
|
get selected12Hours() {
|
|
3202
3201
|
return this.temporarySelected12Hours;
|
|
@@ -3211,7 +3210,7 @@ class to {
|
|
|
3211
3210
|
this.temporaryDefaultOpenValue !== n && (this.temporaryDefaultOpenValue = n, this.update());
|
|
3212
3211
|
}
|
|
3213
3212
|
get isEmpty() {
|
|
3214
|
-
return !(
|
|
3213
|
+
return !(F(this.temporaryHours) || F(this.temporaryMinutes) || F(this.temporarySeconds));
|
|
3215
3214
|
}
|
|
3216
3215
|
setFormat(n) {
|
|
3217
3216
|
this.format = n;
|
|
@@ -3229,7 +3228,7 @@ class to {
|
|
|
3229
3228
|
return e ? this : (this.setDefaultValueIfNil(), this.seconds = n, this);
|
|
3230
3229
|
}
|
|
3231
3230
|
setValue(n, e) {
|
|
3232
|
-
return
|
|
3231
|
+
return F(e) && (this.use12Hours = e), this.value = n, this;
|
|
3233
3232
|
}
|
|
3234
3233
|
setValueByStep(n, e) {
|
|
3235
3234
|
let r = Math.floor(n / e);
|
|
@@ -3240,10 +3239,10 @@ class to {
|
|
|
3240
3239
|
return this.defaultOpenValue = n, this;
|
|
3241
3240
|
}
|
|
3242
3241
|
setDefaultValueIfNil() {
|
|
3243
|
-
|
|
3242
|
+
F(this.temporaryValue) || (this.temporaryValue = new Date(this.defaultOpenValue));
|
|
3244
3243
|
}
|
|
3245
3244
|
update() {
|
|
3246
|
-
this.isEmpty ? this.temporaryValue = void 0 : (
|
|
3245
|
+
this.isEmpty ? this.temporaryValue = void 0 : (F(this.temporaryHours) ? this.temporaryValue.setHours(this.hours) : this.temporaryHours = this.defaultHours, F(this.temporaryMinutes) ? this.temporaryValue.setMinutes(this.minutes) : this.temporaryMinutes = this.defaultMinutes, F(this.temporarySeconds) ? this.temporaryValue.setSeconds(this.seconds) : this.temporarySeconds = this.defaultSeconds, this.use12Hours && (F(this.temporarySelected12Hours) || (this.temporarySelected12Hours = this.default12Hours), this.selected12Hours === "PM" && this.temporaryHours < 12 && (this.temporaryHours += 12, this.temporaryValue.setHours(this.temporaryHours)), this.selected12Hours === "AM" && this.temporaryHours >= 12 && (this.temporaryHours -= 12, this.temporaryValue.setHours(this.temporaryHours))), this.temporaryValue = new Date(this.temporaryValue), this.text = dt(
|
|
3247
3246
|
this.temporaryValue,
|
|
3248
3247
|
this.format,
|
|
3249
3248
|
this.selected12Hours
|
|
@@ -3260,8 +3259,8 @@ class to {
|
|
|
3260
3259
|
return e === "PM" && n > 12 ? n - 12 : e === "AM" && n === 0 ? 12 : n;
|
|
3261
3260
|
}
|
|
3262
3261
|
}
|
|
3263
|
-
const
|
|
3264
|
-
function
|
|
3262
|
+
const to = ["moz", "ms", "webkit"];
|
|
3263
|
+
function no() {
|
|
3265
3264
|
let t = 0;
|
|
3266
3265
|
return (n) => {
|
|
3267
3266
|
const e = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (e - t)), o = setTimeout(() => {
|
|
@@ -3270,339 +3269,339 @@ function ro() {
|
|
|
3270
3269
|
return t = e + r, o;
|
|
3271
3270
|
};
|
|
3272
3271
|
}
|
|
3273
|
-
function
|
|
3272
|
+
function ro() {
|
|
3274
3273
|
if (typeof window > "u")
|
|
3275
3274
|
return () => 0;
|
|
3276
3275
|
if (window.requestAnimationFrame)
|
|
3277
3276
|
return window.requestAnimationFrame.bind(window);
|
|
3278
|
-
const t =
|
|
3279
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
3277
|
+
const t = to.filter((n) => `${n}RequestAnimationFrame` in window)[0];
|
|
3278
|
+
return t ? window[`${t}RequestAnimationFrame`] : no();
|
|
3280
3279
|
}
|
|
3281
|
-
const
|
|
3282
|
-
function
|
|
3283
|
-
function i(
|
|
3284
|
-
const
|
|
3285
|
-
d
|
|
3286
|
-
}
|
|
3287
|
-
function
|
|
3288
|
-
if (
|
|
3280
|
+
const oo = ro();
|
|
3281
|
+
function ao(t, n, e, r, o, a) {
|
|
3282
|
+
function i(d, s, l = 0, m, h) {
|
|
3283
|
+
const g = u(s, m, h), P = d.children[0].children[g] || d.children[0].children[0];
|
|
3284
|
+
f(d, P.offsetTop, l);
|
|
3285
|
+
}
|
|
3286
|
+
function u(d, s, l) {
|
|
3287
|
+
if (s === "hour") {
|
|
3289
3288
|
const m = t.disabledHours && t.disabledHours();
|
|
3290
|
-
return
|
|
3289
|
+
return c(
|
|
3291
3290
|
m,
|
|
3292
|
-
e.value.map((
|
|
3291
|
+
e.value.map((h) => h.index).indexOf(d)
|
|
3293
3292
|
);
|
|
3294
3293
|
}
|
|
3295
|
-
if (
|
|
3296
|
-
const m = t.disabledMinutes && t.disabledMinutes(
|
|
3297
|
-
return
|
|
3294
|
+
if (s === "minute") {
|
|
3295
|
+
const m = t.disabledMinutes && t.disabledMinutes(l.hours);
|
|
3296
|
+
return c(
|
|
3298
3297
|
m,
|
|
3299
|
-
r.value.map((
|
|
3298
|
+
r.value.map((h) => h.index).indexOf(d)
|
|
3300
3299
|
);
|
|
3301
3300
|
}
|
|
3302
|
-
if (
|
|
3303
|
-
const m = t.disabledSeconds && t.disabledSeconds(
|
|
3304
|
-
return
|
|
3301
|
+
if (s === "second") {
|
|
3302
|
+
const m = t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes);
|
|
3303
|
+
return c(
|
|
3305
3304
|
m,
|
|
3306
|
-
o.value.map((
|
|
3305
|
+
o.value.map((h) => h.index).indexOf(d)
|
|
3307
3306
|
);
|
|
3308
3307
|
}
|
|
3309
|
-
return
|
|
3308
|
+
return c(
|
|
3310
3309
|
[],
|
|
3311
|
-
a.value.map((m) => m.index).indexOf(
|
|
3310
|
+
a.value.map((m) => m.index).indexOf(d)
|
|
3312
3311
|
);
|
|
3313
3312
|
}
|
|
3314
|
-
function d
|
|
3315
|
-
if (
|
|
3316
|
-
|
|
3313
|
+
function f(d, s, l) {
|
|
3314
|
+
if (l <= 0) {
|
|
3315
|
+
d.scrollTop = s;
|
|
3317
3316
|
return;
|
|
3318
3317
|
}
|
|
3319
|
-
const
|
|
3320
|
-
|
|
3321
|
-
|
|
3318
|
+
const h = (s - d.scrollTop) / l * 10;
|
|
3319
|
+
oo(() => {
|
|
3320
|
+
d.scrollTop += h, d.scrollTop !== s && f(d, s, l - 10);
|
|
3322
3321
|
});
|
|
3323
3322
|
}
|
|
3324
|
-
function
|
|
3325
|
-
return
|
|
3323
|
+
function c(d, s) {
|
|
3324
|
+
return d && d.length && t.hideDisabledElements ? s - d.reduce((l, m) => l + (m < s ? 1 : 0), 0) : s;
|
|
3326
3325
|
}
|
|
3327
3326
|
return { scrollToSelected: i };
|
|
3328
3327
|
}
|
|
3329
3328
|
function so(t, n) {
|
|
3330
|
-
function e(
|
|
3331
|
-
return
|
|
3329
|
+
function e(u) {
|
|
3330
|
+
return u.index === t.viewHours || !F(t.viewHours) && u.index === t.defaultViewHours;
|
|
3332
3331
|
}
|
|
3333
|
-
function r(
|
|
3334
|
-
return
|
|
3332
|
+
function r(u) {
|
|
3333
|
+
return u.index === t.minutes || !F(t.minutes) && u.index === t.defaultMinutes;
|
|
3335
3334
|
}
|
|
3336
|
-
function o(
|
|
3337
|
-
return
|
|
3335
|
+
function o(u) {
|
|
3336
|
+
return u.index === t.seconds || !F(t.seconds) && u.index === t.defaultSeconds;
|
|
3338
3337
|
}
|
|
3339
|
-
function a(
|
|
3340
|
-
return
|
|
3338
|
+
function a(u) {
|
|
3339
|
+
return u.value.toUpperCase() === t.selected12Hours || !F(t.selected12Hours) && u.value.toUpperCase() === t.default12Hours;
|
|
3341
3340
|
}
|
|
3342
|
-
function i(
|
|
3343
|
-
let
|
|
3344
|
-
const
|
|
3345
|
-
let
|
|
3346
|
-
return
|
|
3341
|
+
function i(u, f) {
|
|
3342
|
+
let c = "";
|
|
3343
|
+
const d = ` ${n}-select-option-selected `, s = ` ${n}-select-option-disabled `;
|
|
3344
|
+
let l = !1;
|
|
3345
|
+
return f === "hour" ? l = e(u) : f === "minute" ? l = r(u) : f === "second" ? l = o(u) : l = a(u), l && (c += d), f === "12-hour" || u.disabled && (c += s), c;
|
|
3347
3346
|
}
|
|
3348
3347
|
return { getSelectedClass: i };
|
|
3349
3348
|
}
|
|
3350
|
-
const
|
|
3349
|
+
const ke = /* @__PURE__ */ te({
|
|
3351
3350
|
name: "FTimePickerTimeView",
|
|
3352
|
-
props:
|
|
3351
|
+
props: nn,
|
|
3353
3352
|
emits: ["valueChange", "formatedValueChange"],
|
|
3354
3353
|
setup(t, n) {
|
|
3355
|
-
const e = "time-picker-panel", r = v(0), o = v([]), a = v([]), i = v([]),
|
|
3354
|
+
const e = "time-picker-panel", r = v(0), o = v([]), a = v([]), i = v([]), u = v([]), f = v(), c = v(), d = v(), s = v(), l = new eo(), {
|
|
3356
3355
|
scrollToSelected: m
|
|
3357
|
-
} =
|
|
3358
|
-
getSelectedClass:
|
|
3359
|
-
} = so(
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
}),
|
|
3363
|
-
|
|
3364
|
-
}),
|
|
3365
|
-
n.emit("valueChange",
|
|
3366
|
-
}),
|
|
3367
|
-
|
|
3368
|
-
}),
|
|
3369
|
-
|
|
3370
|
-
}),
|
|
3371
|
-
|
|
3372
|
-
}),
|
|
3373
|
-
|
|
3374
|
-
}),
|
|
3375
|
-
|
|
3376
|
-
}),
|
|
3356
|
+
} = ao(t, n, o, a, i, u), {
|
|
3357
|
+
getSelectedClass: h
|
|
3358
|
+
} = so(l, e), g = v(t.hourStep), P = v(t.minuteStep), D = v(t.secondStep), O = v(), b = v(""), M = v(), k = v(t.hideDisabledElements), B = v(0);
|
|
3359
|
+
G(() => t.defaultOpenValue, (y) => {
|
|
3360
|
+
F(y) && (O.value = y);
|
|
3361
|
+
}), G(O, (y) => {
|
|
3362
|
+
F(y) && l.setDefaultOpenValue(y);
|
|
3363
|
+
}), O.value = t.defaultOpenValue, G(l.changedValue, (y) => {
|
|
3364
|
+
n.emit("valueChange", y);
|
|
3365
|
+
}), G(() => t.modelValue, (y) => {
|
|
3366
|
+
W(y);
|
|
3367
|
+
}), G(() => t.format, (y) => {
|
|
3368
|
+
F(y) ? b.value = y : b.value = "HH:mm:ss";
|
|
3369
|
+
}), G(b, (y) => {
|
|
3370
|
+
F(y) && (l.setFormat(b.value), B.value = 0, fe.value && B.value++, re.value && B.value++, oe.value && B.value++, M.value && (B.value++, Fe()), r.value = B.value * 66);
|
|
3371
|
+
}), G(() => t.use12Hours, (y) => {
|
|
3372
|
+
M.value = y;
|
|
3373
|
+
}), G(M, (y) => {
|
|
3374
|
+
b.value = ft(b.value, y), l.setUse12Hours(y);
|
|
3375
|
+
}), G(() => t.disabledHours, () => {
|
|
3377
3376
|
we();
|
|
3378
|
-
}),
|
|
3377
|
+
}), G(() => t.disabledMinutes, () => {
|
|
3379
3378
|
pe();
|
|
3380
|
-
}),
|
|
3381
|
-
|
|
3379
|
+
}), G(() => t.disabledSeconds, () => {
|
|
3380
|
+
ae();
|
|
3382
3381
|
});
|
|
3383
|
-
function
|
|
3384
|
-
if (
|
|
3385
|
-
|
|
3386
|
-
const x = ct(
|
|
3387
|
-
|
|
3382
|
+
function W(y) {
|
|
3383
|
+
if (F(y)) {
|
|
3384
|
+
l.text = y;
|
|
3385
|
+
const x = ct(l.text, b.value);
|
|
3386
|
+
l.setValue(x, M.value), Ve();
|
|
3388
3387
|
} else
|
|
3389
|
-
|
|
3388
|
+
l.setUse12Hours(M.value);
|
|
3390
3389
|
}
|
|
3391
|
-
function
|
|
3392
|
-
let
|
|
3393
|
-
return t.disabledHours && (
|
|
3390
|
+
function q() {
|
|
3391
|
+
let y = [];
|
|
3392
|
+
return t.disabledHours && (y = t.disabledHours(), M.value && (l.selected12Hours === "PM" ? y = y.filter((x) => x >= 12).map((x) => x > 12 ? x - 12 : x) : y = y.filter((x) => x < 12 || x === 24).map((x) => x === 24 || x === 0 ? 12 : x))), y;
|
|
3394
3393
|
}
|
|
3395
|
-
function
|
|
3396
|
-
return
|
|
3394
|
+
function C(y = "hour") {
|
|
3395
|
+
return b.value ? b.value.indexOf(y[0].toUpperCase()) > -1 || b.value.indexOf(y[0].toLowerCase()) > -1 : !1;
|
|
3397
3396
|
}
|
|
3398
|
-
const
|
|
3397
|
+
const $ = I(() => ({
|
|
3399
3398
|
"time-picker-panel": !0,
|
|
3400
3399
|
"time-picker-panel-column-3": !0,
|
|
3401
3400
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
3402
3401
|
"f-area-show": !0
|
|
3403
|
-
})),
|
|
3404
|
-
width:
|
|
3405
|
-
})),
|
|
3406
|
-
function be(
|
|
3407
|
-
return x = Math.ceil(x), new Array(Math.ceil(
|
|
3402
|
+
})), de = I(() => ({
|
|
3403
|
+
width: M.value ? `${r.value}px` : "100%"
|
|
3404
|
+
})), fe = I(() => C("hour")), re = I(() => C("minute")), oe = I(() => C("second"));
|
|
3405
|
+
function be(y, x = 1, j = 0) {
|
|
3406
|
+
return x = Math.ceil(x), new Array(Math.ceil(y / x)).fill(0).map((V, se) => (se + j) * x);
|
|
3408
3407
|
}
|
|
3409
3408
|
function gt() {
|
|
3410
|
-
if (
|
|
3411
|
-
const x = (
|
|
3412
|
-
m(
|
|
3409
|
+
if (fe.value && f.value && m(f.value, F(l.viewHours) ? l.viewHours : l.defaultViewHours, 0, "hour", l), re.value && c.value && m(c.value, F(l.minutes) ? l.minutes : l.defaultMinutes, 0, "minute", l), oe.value && d.value && m(d.value, F(l.seconds) ? l.seconds : l.defaultSeconds, 0, "second", l), M.value && s.value) {
|
|
3410
|
+
const x = (F(l.selected12Hours) ? l.selected12Hours : l.default12Hours) === "AM" ? 0 : 1;
|
|
3411
|
+
m(s.value, x, 0, "12-hour", l);
|
|
3413
3412
|
}
|
|
3414
3413
|
}
|
|
3415
3414
|
function we() {
|
|
3416
|
-
let
|
|
3417
|
-
|
|
3418
|
-
const
|
|
3419
|
-
if (o.value = be(
|
|
3420
|
-
index:
|
|
3421
|
-
disabled:
|
|
3422
|
-
})),
|
|
3423
|
-
const
|
|
3424
|
-
|
|
3415
|
+
let y = 24, x = 0;
|
|
3416
|
+
M.value && (y = 12, x = 1);
|
|
3417
|
+
const j = q();
|
|
3418
|
+
if (o.value = be(y, g.value, x).map((V) => ({
|
|
3419
|
+
index: V,
|
|
3420
|
+
disabled: j.length > 0 && j.indexOf(V) !== -1
|
|
3421
|
+
})), M.value && o.value[o.value.length - 1].index === 12) {
|
|
3422
|
+
const V = [...o.value];
|
|
3423
|
+
V.unshift(V[V.length - 1]), V.splice(V.length - 1, 1), o.value = V;
|
|
3425
3424
|
}
|
|
3426
|
-
o.value = o.value.filter((
|
|
3425
|
+
o.value = o.value.filter((V) => !(k.value && V.disabled));
|
|
3427
3426
|
}
|
|
3428
3427
|
function pe() {
|
|
3429
|
-
a.value = be(60,
|
|
3430
|
-
index:
|
|
3431
|
-
disabled: !!t.disabledMinutes && t.disabledMinutes(
|
|
3432
|
-
})), a.value = a.value.filter((
|
|
3428
|
+
a.value = be(60, P.value).map((y) => ({
|
|
3429
|
+
index: y,
|
|
3430
|
+
disabled: !!t.disabledMinutes && t.disabledMinutes(l.hours).indexOf(y) !== -1
|
|
3431
|
+
})), a.value = a.value.filter((y) => !(k.value && y.disabled));
|
|
3433
3432
|
}
|
|
3434
|
-
function
|
|
3435
|
-
i.value = be(60,
|
|
3436
|
-
index:
|
|
3437
|
-
disabled: !!t.disabledSeconds && t.disabledSeconds(
|
|
3438
|
-
})), i.value = i.value.filter((
|
|
3433
|
+
function ae() {
|
|
3434
|
+
i.value = be(60, D.value).map((y) => ({
|
|
3435
|
+
index: y,
|
|
3436
|
+
disabled: !!t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes).indexOf(y) !== -1
|
|
3437
|
+
})), i.value = i.value.filter((y) => !(k.value && y.disabled));
|
|
3439
3438
|
}
|
|
3440
3439
|
function Fe() {
|
|
3441
|
-
const
|
|
3442
|
-
|
|
3440
|
+
const y = b.value.includes("A");
|
|
3441
|
+
u.value = [{
|
|
3443
3442
|
index: 0,
|
|
3444
|
-
value:
|
|
3443
|
+
value: y ? "AM" : "am"
|
|
3445
3444
|
}, {
|
|
3446
3445
|
index: 1,
|
|
3447
|
-
value:
|
|
3448
|
-
}],
|
|
3446
|
+
value: y ? "PM" : "pm"
|
|
3447
|
+
}], u.value = u.value.filter(() => !k.value);
|
|
3449
3448
|
}
|
|
3450
|
-
function bt(
|
|
3451
|
-
if (
|
|
3452
|
-
if (m(
|
|
3449
|
+
function bt(y, x) {
|
|
3450
|
+
if (y.stopPropagation(), l.setHours(x.index, x.disabled), !x.disabled) {
|
|
3451
|
+
if (m(f.value, x.index, 120, "hour", l), t.disabledMinutes !== null) {
|
|
3453
3452
|
pe();
|
|
3454
|
-
const
|
|
3455
|
-
if (!
|
|
3453
|
+
const j = a.value.filter((V) => !V.disabled);
|
|
3454
|
+
if (!j.find((V) => V.index === l.minutes)) {
|
|
3456
3455
|
const {
|
|
3457
|
-
index:
|
|
3458
|
-
disabled:
|
|
3459
|
-
} =
|
|
3460
|
-
|
|
3456
|
+
index: V,
|
|
3457
|
+
disabled: se
|
|
3458
|
+
} = j[0];
|
|
3459
|
+
l.setMinutes(V, se);
|
|
3461
3460
|
}
|
|
3462
3461
|
}
|
|
3463
|
-
(t.disabledSeconds !== null || t.disabledMinutes !== null) &&
|
|
3462
|
+
(t.disabledSeconds !== null || t.disabledMinutes !== null) && ae();
|
|
3464
3463
|
}
|
|
3465
3464
|
}
|
|
3466
|
-
function wt(
|
|
3467
|
-
|
|
3465
|
+
function wt(y, x) {
|
|
3466
|
+
y.stopPropagation(), l.selected12Hours = x.value, we(), pe(), ae(), m(s.value, x.index, 120, "12-hour", l);
|
|
3468
3467
|
}
|
|
3469
|
-
function vt(
|
|
3470
|
-
if (
|
|
3471
|
-
|
|
3472
|
-
const
|
|
3473
|
-
if (!
|
|
3468
|
+
function vt(y, x) {
|
|
3469
|
+
if (y.stopPropagation(), l.setMinutes(x.index, x.disabled), !x.disabled && (m(c.value, x.index, 120, "minute", l), t.disabledSeconds !== null)) {
|
|
3470
|
+
ae();
|
|
3471
|
+
const j = i.value.filter((V) => !V.disabled);
|
|
3472
|
+
if (!j.find((V) => V.index === l.seconds)) {
|
|
3474
3473
|
const {
|
|
3475
|
-
index:
|
|
3476
|
-
disabled:
|
|
3477
|
-
} =
|
|
3478
|
-
|
|
3474
|
+
index: V,
|
|
3475
|
+
disabled: se
|
|
3476
|
+
} = j[0];
|
|
3477
|
+
l.setSeconds(V, se);
|
|
3479
3478
|
}
|
|
3480
3479
|
}
|
|
3481
3480
|
}
|
|
3482
|
-
function xt(
|
|
3483
|
-
|
|
3481
|
+
function xt(y, x) {
|
|
3482
|
+
y.stopPropagation(), l.setSeconds(x.index, x.disabled), !x.disabled && m(d.value, x.index, 120, "second", l);
|
|
3484
3483
|
}
|
|
3485
|
-
function
|
|
3486
|
-
we(), pe(),
|
|
3484
|
+
function Ve() {
|
|
3485
|
+
we(), pe(), ae(), Fe();
|
|
3487
3486
|
}
|
|
3488
|
-
|
|
3489
|
-
|
|
3487
|
+
ce(() => {
|
|
3488
|
+
b.value = t.format, M.value = t.use12Hours, W(t.modelValue), Ve(), setTimeout(() => {
|
|
3490
3489
|
gt();
|
|
3491
3490
|
}, 10);
|
|
3492
3491
|
});
|
|
3493
3492
|
function Mt() {
|
|
3494
|
-
return t.showHeader ?
|
|
3493
|
+
return t.showHeader ? w("div", {
|
|
3495
3494
|
class: e + "-combobox time-picker-panel-header",
|
|
3496
|
-
style:
|
|
3497
|
-
}, [
|
|
3495
|
+
style: de.value
|
|
3496
|
+
}, [fe.value && w("div", {
|
|
3498
3497
|
class: e + "-select",
|
|
3499
3498
|
style: "height: 32px"
|
|
3500
|
-
}, [
|
|
3501
|
-
class: "time-header" +
|
|
3502
|
-
}, [ve("时")])])]),
|
|
3499
|
+
}, [w("ul", null, [w("li", {
|
|
3500
|
+
class: "time-header" + re.value ? "time-header-split" : ""
|
|
3501
|
+
}, [ve("时")])])]), re.value && w("div", {
|
|
3503
3502
|
class: e + "-select",
|
|
3504
3503
|
style: "height: 32px"
|
|
3505
|
-
}, [
|
|
3506
|
-
class: "time-header" +
|
|
3507
|
-
}, [ve("分")])])]),
|
|
3504
|
+
}, [w("ul", null, [w("li", {
|
|
3505
|
+
class: "time-header" + oe.value ? "time-header-split" : ""
|
|
3506
|
+
}, [ve("分")])])]), oe.value && w("div", {
|
|
3508
3507
|
class: e + "-select",
|
|
3509
3508
|
style: "height: 32px"
|
|
3510
|
-
}, [
|
|
3509
|
+
}, [w("ul", null, [w("li", {
|
|
3511
3510
|
class: "time-header"
|
|
3512
|
-
}, [ve("秒")])])]), t.use12Hours &&
|
|
3511
|
+
}, [ve("秒")])])]), t.use12Hours && w("div", {
|
|
3513
3512
|
class: e + "-select",
|
|
3514
3513
|
style: "height: 32px"
|
|
3515
|
-
}, [
|
|
3514
|
+
}, [w("ul", null, [w("li", {
|
|
3516
3515
|
class: "time-header"
|
|
3517
3516
|
}, null)])])]) : null;
|
|
3518
3517
|
}
|
|
3519
|
-
return () =>
|
|
3520
|
-
class:
|
|
3521
|
-
}, [
|
|
3518
|
+
return () => w("div", {
|
|
3519
|
+
class: $.value
|
|
3520
|
+
}, [w("div", {
|
|
3522
3521
|
class: "farris-timer-picker"
|
|
3523
|
-
}, [
|
|
3522
|
+
}, [w("div", {
|
|
3524
3523
|
class: e + "-inner"
|
|
3525
|
-
}, [Mt(),
|
|
3524
|
+
}, [Mt(), w("div", {
|
|
3526
3525
|
class: e + "-combobox",
|
|
3527
|
-
style:
|
|
3528
|
-
}, [
|
|
3526
|
+
style: de.value
|
|
3527
|
+
}, [fe.value && w("div", {
|
|
3529
3528
|
class: e + "-select",
|
|
3530
|
-
ref:
|
|
3531
|
-
}, [
|
|
3532
|
-
class: y
|
|
3533
|
-
onClick: (x) => bt(x,
|
|
3534
|
-
}, [`${
|
|
3529
|
+
ref: f
|
|
3530
|
+
}, [w("ul", null, [o.value.map((y) => w("li", {
|
|
3531
|
+
class: h(y, "hour"),
|
|
3532
|
+
onClick: (x) => bt(x, y)
|
|
3533
|
+
}, [`${y.index}`]))])]), re.value && w("div", {
|
|
3535
3534
|
class: e + "-select",
|
|
3536
|
-
ref:
|
|
3537
|
-
}, [
|
|
3538
|
-
class: y
|
|
3539
|
-
onClick: (x) => vt(x,
|
|
3540
|
-
}, [`${
|
|
3535
|
+
ref: c
|
|
3536
|
+
}, [w("ul", null, [a.value.map((y) => w("li", {
|
|
3537
|
+
class: h(y, "minute"),
|
|
3538
|
+
onClick: (x) => vt(x, y)
|
|
3539
|
+
}, [`${y.index}`]))])]), oe.value && w("div", {
|
|
3541
3540
|
class: e + "-select",
|
|
3542
|
-
ref:
|
|
3543
|
-
}, [
|
|
3544
|
-
class: y
|
|
3545
|
-
onClick: (x) => xt(x,
|
|
3546
|
-
}, [`${
|
|
3541
|
+
ref: d
|
|
3542
|
+
}, [w("ul", null, [i.value.map((y) => w("li", {
|
|
3543
|
+
class: h(y, "second"),
|
|
3544
|
+
onClick: (x) => xt(x, y)
|
|
3545
|
+
}, [`${y.index}`]))])]), M.value && w("div", {
|
|
3547
3546
|
class: e + "-select",
|
|
3548
|
-
ref:
|
|
3549
|
-
}, [
|
|
3550
|
-
class: y
|
|
3551
|
-
onClick: (x) => wt(x,
|
|
3552
|
-
}, [`${
|
|
3547
|
+
ref: s
|
|
3548
|
+
}, [w("ul", null, [u.value.map((y) => w("li", {
|
|
3549
|
+
class: h(y, "12-hour"),
|
|
3550
|
+
onClick: (x) => wt(x, y)
|
|
3551
|
+
}, [`${y.value}`]))])])])])])]);
|
|
3553
3552
|
}
|
|
3554
|
-
}),
|
|
3553
|
+
}), K = /* @__PURE__ */ te({
|
|
3555
3554
|
name: "FTimePicker",
|
|
3556
3555
|
props: De,
|
|
3557
3556
|
emits: ["update:modelValue", "valueChange", "clear"],
|
|
3558
3557
|
setup(t, n) {
|
|
3559
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(null), a = v(), i =
|
|
3560
|
-
function
|
|
3558
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(null), a = v(), i = I(() => ft(t.format, t.use12Hours));
|
|
3559
|
+
function u() {
|
|
3561
3560
|
r.value = "", n.emit("clear");
|
|
3562
3561
|
}
|
|
3563
|
-
function
|
|
3562
|
+
function f() {
|
|
3564
3563
|
if (r.value) {
|
|
3565
|
-
const
|
|
3566
|
-
r.value = dt(
|
|
3564
|
+
const s = ct(r.value, i.value);
|
|
3565
|
+
r.value = dt(s, i.value);
|
|
3567
3566
|
}
|
|
3568
3567
|
}
|
|
3569
|
-
function
|
|
3570
|
-
|
|
3568
|
+
function c() {
|
|
3569
|
+
f();
|
|
3571
3570
|
}
|
|
3572
|
-
function
|
|
3573
|
-
r.value =
|
|
3571
|
+
function d(s) {
|
|
3572
|
+
r.value = s.text;
|
|
3574
3573
|
}
|
|
3575
|
-
return
|
|
3576
|
-
r.value =
|
|
3577
|
-
}),
|
|
3578
|
-
n.emit("valueChange",
|
|
3579
|
-
}), () =>
|
|
3574
|
+
return f(), G(() => t.modelValue, (s) => {
|
|
3575
|
+
r.value = s;
|
|
3576
|
+
}), G(r, (s) => {
|
|
3577
|
+
n.emit("valueChange", s), n.emit("update:modelValue", s);
|
|
3578
|
+
}), () => w(Ft, {
|
|
3580
3579
|
ref: o,
|
|
3581
3580
|
modelValue: r.value,
|
|
3582
|
-
"onUpdate:modelValue": (
|
|
3581
|
+
"onUpdate:modelValue": (s) => r.value = s,
|
|
3583
3582
|
disable: t.disabled,
|
|
3584
3583
|
readonly: t.readonly,
|
|
3585
3584
|
editable: t.editable,
|
|
3586
3585
|
buttonContent: e,
|
|
3587
3586
|
placeholder: t.placeholder,
|
|
3588
3587
|
enableClear: !0,
|
|
3589
|
-
onClear:
|
|
3590
|
-
onBlur:
|
|
3588
|
+
onClear: u,
|
|
3589
|
+
onBlur: c
|
|
3591
3590
|
}, {
|
|
3592
|
-
default: () => [
|
|
3591
|
+
default: () => [w(ke, Te({
|
|
3593
3592
|
ref: a
|
|
3594
3593
|
}, t, {
|
|
3595
|
-
onValueChange:
|
|
3594
|
+
onValueChange: d
|
|
3596
3595
|
}), null)]
|
|
3597
3596
|
});
|
|
3598
3597
|
}
|
|
3599
|
-
}),
|
|
3600
|
-
["appearance",
|
|
3598
|
+
}), io = /* @__PURE__ */ new Map([
|
|
3599
|
+
["appearance", Vt]
|
|
3601
3600
|
]);
|
|
3602
|
-
function
|
|
3601
|
+
function uo(t, n, e) {
|
|
3603
3602
|
return n;
|
|
3604
3603
|
}
|
|
3605
|
-
const
|
|
3604
|
+
const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-design.gitee.io/button-edit.schema.json", fo = "button-edit", po = "A Farris Input Component", mo = "object", ho = {
|
|
3606
3605
|
id: {
|
|
3607
3606
|
description: "The unique identifier for a Input Group",
|
|
3608
3607
|
type: "string"
|
|
@@ -3786,18 +3785,18 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3786
3785
|
type: "string",
|
|
3787
3786
|
default: ""
|
|
3788
3787
|
}
|
|
3789
|
-
},
|
|
3788
|
+
}, yo = [
|
|
3790
3789
|
"id",
|
|
3791
3790
|
"type"
|
|
3792
|
-
],
|
|
3793
|
-
$schema:
|
|
3794
|
-
$id:
|
|
3795
|
-
title:
|
|
3796
|
-
description:
|
|
3797
|
-
type:
|
|
3798
|
-
properties:
|
|
3799
|
-
required:
|
|
3800
|
-
},
|
|
3791
|
+
], go = {
|
|
3792
|
+
$schema: lo,
|
|
3793
|
+
$id: co,
|
|
3794
|
+
title: fo,
|
|
3795
|
+
description: po,
|
|
3796
|
+
type: mo,
|
|
3797
|
+
properties: ho,
|
|
3798
|
+
required: yo
|
|
3799
|
+
}, bo = "buttonEdit", wo = "A Farris Component", vo = "object", xo = {
|
|
3801
3800
|
basic: {
|
|
3802
3801
|
description: "Basic Infomation",
|
|
3803
3802
|
title: "基本信息",
|
|
@@ -3879,12 +3878,12 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3879
3878
|
}
|
|
3880
3879
|
}
|
|
3881
3880
|
}
|
|
3882
|
-
},
|
|
3883
|
-
title:
|
|
3884
|
-
description:
|
|
3885
|
-
type:
|
|
3886
|
-
categories:
|
|
3887
|
-
},
|
|
3881
|
+
}, Mo = {
|
|
3882
|
+
title: bo,
|
|
3883
|
+
description: wo,
|
|
3884
|
+
type: vo,
|
|
3885
|
+
categories: xo
|
|
3886
|
+
}, Be = {
|
|
3888
3887
|
/**
|
|
3889
3888
|
* 组件标识
|
|
3890
3889
|
*/
|
|
@@ -3992,65 +3991,65 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3992
3991
|
beforeOpen: { type: Function, default: null },
|
|
3993
3992
|
/** 更新方式 blur | change */
|
|
3994
3993
|
updateOn: { type: String, default: "change" }
|
|
3995
|
-
}, pt = Ue(
|
|
3994
|
+
}, pt = Ue(Be, go, io, uo, Mo), Co = {
|
|
3996
3995
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
3997
3996
|
host: { type: Object },
|
|
3998
3997
|
backgroundColor: { type: String, default: "" }
|
|
3999
|
-
},
|
|
3998
|
+
}, ko = /* @__PURE__ */ te({
|
|
4000
3999
|
name: "FOverlay",
|
|
4001
|
-
props:
|
|
4000
|
+
props: Co,
|
|
4002
4001
|
emits: ["click"],
|
|
4003
4002
|
setup(t, n) {
|
|
4004
|
-
const e = v(t.popupContentPosition), r = v(t.host), o =
|
|
4003
|
+
const e = v(t.popupContentPosition), r = v(t.host), o = I(() => ({
|
|
4005
4004
|
backgroundColor: t.backgroundColor || "",
|
|
4006
4005
|
pointerEvents: "auto"
|
|
4007
4006
|
}));
|
|
4008
|
-
function a(
|
|
4009
|
-
n.emit("click"),
|
|
4007
|
+
function a(u) {
|
|
4008
|
+
n.emit("click"), u.preventDefault(), u.stopPropagation();
|
|
4010
4009
|
}
|
|
4011
|
-
|
|
4012
|
-
const
|
|
4013
|
-
if (
|
|
4014
|
-
const
|
|
4015
|
-
left:
|
|
4016
|
-
top:
|
|
4017
|
-
height:
|
|
4018
|
-
} =
|
|
4010
|
+
I(() => {
|
|
4011
|
+
const u = r.value;
|
|
4012
|
+
if (u) {
|
|
4013
|
+
const f = u.getBoundingClientRect(), {
|
|
4014
|
+
left: c,
|
|
4015
|
+
top: d,
|
|
4016
|
+
height: s
|
|
4017
|
+
} = f;
|
|
4019
4018
|
return {
|
|
4020
|
-
left:
|
|
4021
|
-
top:
|
|
4019
|
+
left: c,
|
|
4020
|
+
top: d + s
|
|
4022
4021
|
};
|
|
4023
4022
|
}
|
|
4024
4023
|
return e.value;
|
|
4025
4024
|
});
|
|
4026
|
-
const i =
|
|
4025
|
+
const i = I(() => ({
|
|
4027
4026
|
// position: 'relative',
|
|
4028
4027
|
// left: `${position.value.left}px`,
|
|
4029
4028
|
// top: `${position.value.top}px`
|
|
4030
4029
|
}));
|
|
4031
|
-
return () =>
|
|
4030
|
+
return () => w(Tt, {
|
|
4032
4031
|
to: "body"
|
|
4033
4032
|
}, {
|
|
4034
4033
|
default: () => {
|
|
4035
|
-
var
|
|
4036
|
-
return [
|
|
4034
|
+
var u, f;
|
|
4035
|
+
return [w("div", {
|
|
4037
4036
|
class: "overlay-container",
|
|
4038
|
-
onClick: (
|
|
4037
|
+
onClick: (c) => a(c),
|
|
4039
4038
|
style: o.value
|
|
4040
|
-
}, [
|
|
4039
|
+
}, [w("div", {
|
|
4041
4040
|
style: i.value
|
|
4042
|
-
}, [(
|
|
4041
|
+
}, [(f = (u = n.slots).default) == null ? void 0 : f.call(u)])])];
|
|
4043
4042
|
}
|
|
4044
4043
|
});
|
|
4045
4044
|
}
|
|
4046
4045
|
});
|
|
4047
|
-
function
|
|
4046
|
+
function To(t) {
|
|
4048
4047
|
if (t.content && t.content.render)
|
|
4049
4048
|
return t.content.render;
|
|
4050
4049
|
if (t.render && typeof t.render == "function")
|
|
4051
4050
|
return t.render;
|
|
4052
4051
|
}
|
|
4053
|
-
function
|
|
4052
|
+
function Po(t) {
|
|
4054
4053
|
const n = document.createElement("div");
|
|
4055
4054
|
n.style.display = "contents";
|
|
4056
4055
|
let e;
|
|
@@ -4060,11 +4059,11 @@ function Oo(t) {
|
|
|
4060
4059
|
};
|
|
4061
4060
|
return e = Pt({
|
|
4062
4061
|
setup() {
|
|
4063
|
-
|
|
4062
|
+
Dt(() => {
|
|
4064
4063
|
document.body.removeChild(n);
|
|
4065
4064
|
});
|
|
4066
|
-
const a =
|
|
4067
|
-
return () =>
|
|
4065
|
+
const a = To(t);
|
|
4066
|
+
return () => w(ko, {
|
|
4068
4067
|
"popup-content-position": t.popupPosition,
|
|
4069
4068
|
host: t.host,
|
|
4070
4069
|
onClick: o,
|
|
@@ -4077,10 +4076,10 @@ function Oo(t) {
|
|
|
4077
4076
|
}
|
|
4078
4077
|
class Do {
|
|
4079
4078
|
static show(n) {
|
|
4080
|
-
return
|
|
4079
|
+
return Po(n);
|
|
4081
4080
|
}
|
|
4082
4081
|
}
|
|
4083
|
-
const
|
|
4082
|
+
const Oo = Symbol("FModalService");
|
|
4084
4083
|
function mt(t, n) {
|
|
4085
4084
|
function e() {
|
|
4086
4085
|
const r = t.beforeOpen || t.beforeClickButton || null;
|
|
@@ -4096,190 +4095,190 @@ function mt(t, n) {
|
|
|
4096
4095
|
return { judgeCanOpen: e };
|
|
4097
4096
|
}
|
|
4098
4097
|
function ht(t, n, e, r, o) {
|
|
4099
|
-
const a = v(t.buttonBehavior), i = v(t.popupOnInput),
|
|
4098
|
+
const a = v(t.buttonBehavior), i = v(t.popupOnInput), u = I(() => ({
|
|
4100
4099
|
"input-group-append": !0,
|
|
4101
4100
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4102
|
-
})), { judgeCanOpen:
|
|
4103
|
-
async function
|
|
4104
|
-
if (await
|
|
4105
|
-
const
|
|
4101
|
+
})), { judgeCanOpen: f } = mt(t, o), c = I(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = me(Oo, null), s = v();
|
|
4102
|
+
async function l(g) {
|
|
4103
|
+
if (await f() && c.value) {
|
|
4104
|
+
const P = !!n.slots.default;
|
|
4106
4105
|
if (a.value === "Modal") {
|
|
4107
|
-
const
|
|
4108
|
-
...
|
|
4106
|
+
const D = t.modalOptions, O = d == null ? void 0 : d.open({
|
|
4107
|
+
...D,
|
|
4109
4108
|
render: () => n.slots.default && n.slots.default()
|
|
4110
4109
|
});
|
|
4111
|
-
|
|
4110
|
+
s.value = O == null ? void 0 : O.modalRef;
|
|
4112
4111
|
}
|
|
4113
4112
|
a.value === "Overlay" && Do.show({
|
|
4114
4113
|
// host: buttonEditRef.value,
|
|
4115
4114
|
host: document.body,
|
|
4116
4115
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
4117
4116
|
render: () => n.slots.default && n.slots.default()
|
|
4118
|
-
}),
|
|
4117
|
+
}), P && a.value === "Popup" && r.togglePopup(!0), P && i.value && r.hidePopup(), n.emit("clickButton", { origin: g, value: t.modelValue });
|
|
4119
4118
|
}
|
|
4120
4119
|
}
|
|
4121
|
-
function m(
|
|
4122
|
-
n.emit("mouseEnterIcon",
|
|
4120
|
+
function m(g) {
|
|
4121
|
+
n.emit("mouseEnterIcon", g);
|
|
4123
4122
|
}
|
|
4124
|
-
function
|
|
4125
|
-
n.emit("mouseLeaveIcon",
|
|
4123
|
+
function h(g) {
|
|
4124
|
+
n.emit("mouseLeaveIcon", g);
|
|
4126
4125
|
}
|
|
4127
4126
|
return {
|
|
4128
|
-
buttonGroupClass:
|
|
4129
|
-
onClickButton:
|
|
4127
|
+
buttonGroupClass: u,
|
|
4128
|
+
onClickButton: l,
|
|
4130
4129
|
onMouseEnterButton: m,
|
|
4131
|
-
onMouseLeaveButton:
|
|
4132
|
-
modalRef:
|
|
4130
|
+
onMouseLeaveButton: h,
|
|
4131
|
+
modalRef: s
|
|
4133
4132
|
};
|
|
4134
4133
|
}
|
|
4135
|
-
function
|
|
4136
|
-
const i = v(!1),
|
|
4137
|
-
function
|
|
4134
|
+
function Ho(t, n, e, r, o, a) {
|
|
4135
|
+
const i = v(!1), u = I(() => t.enableClear && !t.readonly && !t.disable), { changeTextBoxValue: f } = a;
|
|
4136
|
+
function c(m) {
|
|
4138
4137
|
i.value = m;
|
|
4139
4138
|
}
|
|
4140
|
-
|
|
4141
|
-
|
|
4139
|
+
G(o, () => {
|
|
4140
|
+
c(!!o.value);
|
|
4142
4141
|
});
|
|
4143
|
-
function
|
|
4144
|
-
const
|
|
4145
|
-
m.stopPropagation(), (
|
|
4142
|
+
function d(m) {
|
|
4143
|
+
const h = !t.readonly && !t.disable && t.editable, g = !t.editable;
|
|
4144
|
+
m.stopPropagation(), (h || g) && (f("", !1), c(!i.value), n.emit("clear"));
|
|
4146
4145
|
}
|
|
4147
|
-
function
|
|
4148
|
-
if (
|
|
4146
|
+
function s(m) {
|
|
4147
|
+
if (u.value) {
|
|
4149
4148
|
if (!e.value) {
|
|
4150
|
-
|
|
4149
|
+
c(!1);
|
|
4151
4150
|
return;
|
|
4152
4151
|
}
|
|
4153
|
-
!t.disable && !t.readonly &&
|
|
4152
|
+
!t.disable && !t.readonly && c(!0);
|
|
4154
4153
|
}
|
|
4155
4154
|
}
|
|
4156
|
-
function
|
|
4157
|
-
|
|
4155
|
+
function l(m) {
|
|
4156
|
+
u.value && c(!1);
|
|
4158
4157
|
}
|
|
4159
4158
|
return {
|
|
4160
|
-
enableClearButton:
|
|
4159
|
+
enableClearButton: u,
|
|
4161
4160
|
showClearButton: i,
|
|
4162
|
-
onClearValue:
|
|
4163
|
-
onMouseEnterTextBox:
|
|
4164
|
-
onMouseLeaveTextBox:
|
|
4161
|
+
onClearValue: d,
|
|
4162
|
+
onMouseEnterTextBox: s,
|
|
4163
|
+
onMouseLeaveTextBox: l
|
|
4165
4164
|
};
|
|
4166
4165
|
}
|
|
4167
4166
|
function Eo(t, n, e, r, o) {
|
|
4168
|
-
const a =
|
|
4167
|
+
const a = I(() => t.popupOnInput), i = I(() => t.popupOnFocus), { shouldPopupContent: u } = o, f = I(() => t.enableTitle ? e.value : ""), c = I(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), d = I(() => t.readonly || !t.editable), s = v(!1), l = I(() => !t.disable && s.value), m = I(() => ({
|
|
4169
4168
|
"text-left": t.textAlign === "left",
|
|
4170
4169
|
"text-center": t.textAlign === "center",
|
|
4171
4170
|
"text-right": t.textAlign === "right",
|
|
4172
4171
|
"form-control": !0,
|
|
4173
4172
|
"f-utils-fill": !0
|
|
4174
|
-
})),
|
|
4173
|
+
})), h = I(() => ({
|
|
4175
4174
|
"input-group": !0,
|
|
4176
4175
|
"f-state-disable": t.disable,
|
|
4177
4176
|
"f-state-editable": t.editable && !t.disable && !t.readonly,
|
|
4178
4177
|
"f-state-readonly": t.readonly && !t.disable,
|
|
4179
|
-
"f-state-focus":
|
|
4178
|
+
"f-state-focus": l.value
|
|
4180
4179
|
}));
|
|
4181
|
-
function
|
|
4182
|
-
e.value !==
|
|
4180
|
+
function g(C, $ = !0) {
|
|
4181
|
+
e.value !== C && (e.value = C, $ && (n.emit("change", C), n.emit("update:modelValue", C)));
|
|
4183
4182
|
}
|
|
4184
|
-
function
|
|
4185
|
-
|
|
4183
|
+
function P(C) {
|
|
4184
|
+
u.value = !1, g(C, !0);
|
|
4186
4185
|
}
|
|
4187
|
-
|
|
4186
|
+
G(
|
|
4188
4187
|
() => t.modelValue,
|
|
4189
|
-
(
|
|
4190
|
-
e.value =
|
|
4188
|
+
(C) => {
|
|
4189
|
+
e.value = C;
|
|
4191
4190
|
}
|
|
4192
4191
|
);
|
|
4193
|
-
function
|
|
4194
|
-
|
|
4192
|
+
function D(C) {
|
|
4193
|
+
s.value = !1, n.emit("blur", C), C.stopPropagation();
|
|
4195
4194
|
}
|
|
4196
|
-
function
|
|
4197
|
-
n.emit("click",
|
|
4195
|
+
function O(C) {
|
|
4196
|
+
n.emit("click", C);
|
|
4198
4197
|
}
|
|
4199
|
-
function
|
|
4200
|
-
t.disable || (
|
|
4198
|
+
function b(C) {
|
|
4199
|
+
t.disable || (s.value = !0, d.value || (n.emit("focus", C), i.value && !u.value && o.popup()));
|
|
4201
4200
|
}
|
|
4202
|
-
function
|
|
4203
|
-
n.emit("input",
|
|
4204
|
-
const
|
|
4205
|
-
r.value =
|
|
4201
|
+
function M(C) {
|
|
4202
|
+
n.emit("input", C.target.value);
|
|
4203
|
+
const $ = C.target.value;
|
|
4204
|
+
r.value = $, e.value !== $ && g($, t.updateOn === "change"), a.value && !u.value && o.popup();
|
|
4206
4205
|
}
|
|
4207
|
-
function
|
|
4208
|
-
|
|
4206
|
+
function k(C) {
|
|
4207
|
+
C.target.tagName !== "INPUT" && C.preventDefault(), C.stopPropagation();
|
|
4209
4208
|
}
|
|
4210
|
-
function
|
|
4211
|
-
n.emit("keydown",
|
|
4209
|
+
function B(C) {
|
|
4210
|
+
n.emit("keydown", C);
|
|
4212
4211
|
}
|
|
4213
|
-
function
|
|
4214
|
-
|
|
4212
|
+
function W(C) {
|
|
4213
|
+
C.key === "Enter" && (a.value || i.value) && o.hidePopup(), n.emit("keyup", C);
|
|
4215
4214
|
}
|
|
4216
|
-
function
|
|
4217
|
-
const
|
|
4218
|
-
|
|
4215
|
+
function q(C) {
|
|
4216
|
+
const $ = C.target.value;
|
|
4217
|
+
C.stopPropagation(), g($);
|
|
4219
4218
|
}
|
|
4220
4219
|
return {
|
|
4221
|
-
hasFocusedTextBox:
|
|
4222
|
-
isTextBoxReadonly:
|
|
4220
|
+
hasFocusedTextBox: l,
|
|
4221
|
+
isTextBoxReadonly: d,
|
|
4223
4222
|
textBoxClass: m,
|
|
4224
|
-
textBoxPlaceholder:
|
|
4225
|
-
textBoxTitle:
|
|
4226
|
-
inputGroupClass:
|
|
4227
|
-
changeTextBoxValue:
|
|
4228
|
-
commitValue:
|
|
4229
|
-
onBlurTextBox:
|
|
4230
|
-
onClickTextBox:
|
|
4231
|
-
onFocusTextBox:
|
|
4232
|
-
onInput:
|
|
4233
|
-
onKeyDownTextBox:
|
|
4234
|
-
onKeyUpTextBox:
|
|
4235
|
-
onMouseDownTextBox:
|
|
4236
|
-
onTextBoxValueChange:
|
|
4223
|
+
textBoxPlaceholder: c,
|
|
4224
|
+
textBoxTitle: f,
|
|
4225
|
+
inputGroupClass: h,
|
|
4226
|
+
changeTextBoxValue: g,
|
|
4227
|
+
commitValue: P,
|
|
4228
|
+
onBlurTextBox: D,
|
|
4229
|
+
onClickTextBox: O,
|
|
4230
|
+
onFocusTextBox: b,
|
|
4231
|
+
onInput: M,
|
|
4232
|
+
onKeyDownTextBox: B,
|
|
4233
|
+
onKeyUpTextBox: W,
|
|
4234
|
+
onMouseDownTextBox: k,
|
|
4235
|
+
onTextBoxValueChange: q
|
|
4237
4236
|
};
|
|
4238
4237
|
}
|
|
4239
4238
|
function yt(t, n, e, r) {
|
|
4240
4239
|
const o = v(), a = v(!1), { judgeCanOpen: i } = mt(t, r);
|
|
4241
|
-
function
|
|
4242
|
-
const
|
|
4243
|
-
|
|
4240
|
+
function u() {
|
|
4241
|
+
const s = o.value;
|
|
4242
|
+
s && s.show(e.value);
|
|
4244
4243
|
}
|
|
4245
|
-
async function
|
|
4244
|
+
async function f(s = !1) {
|
|
4246
4245
|
if (!!n.slots.default) {
|
|
4247
|
-
if (!
|
|
4246
|
+
if (!s && !a.value && !await i())
|
|
4248
4247
|
return;
|
|
4249
|
-
a.value = !a.value, await
|
|
4248
|
+
a.value = !a.value, await Ie(), u();
|
|
4250
4249
|
}
|
|
4251
4250
|
}
|
|
4252
|
-
async function
|
|
4251
|
+
async function c(s = !1) {
|
|
4253
4252
|
if (!!n.slots.default) {
|
|
4254
|
-
if (!
|
|
4253
|
+
if (!s && !await i())
|
|
4255
4254
|
return;
|
|
4256
|
-
a.value = !0, await
|
|
4255
|
+
a.value = !0, await Ie(), u();
|
|
4257
4256
|
}
|
|
4258
4257
|
}
|
|
4259
|
-
function
|
|
4258
|
+
function d() {
|
|
4260
4259
|
a.value = !1;
|
|
4261
4260
|
}
|
|
4262
|
-
return { hidePopup:
|
|
4261
|
+
return { hidePopup: d, popup: c, shouldPopupContent: a, togglePopup: f, popoverRef: o };
|
|
4263
4262
|
}
|
|
4264
|
-
function
|
|
4263
|
+
function Bo(t, n, e) {
|
|
4265
4264
|
const r = v(), {
|
|
4266
4265
|
isTextBoxReadonly: o,
|
|
4267
4266
|
textBoxClass: a,
|
|
4268
4267
|
textBoxPlaceholder: i,
|
|
4269
|
-
textBoxTitle:
|
|
4270
|
-
onBlurTextBox:
|
|
4271
|
-
onClickTextBox:
|
|
4272
|
-
onFocusTextBox:
|
|
4273
|
-
onInput:
|
|
4274
|
-
onKeyDownTextBox:
|
|
4268
|
+
textBoxTitle: u,
|
|
4269
|
+
onBlurTextBox: f,
|
|
4270
|
+
onClickTextBox: c,
|
|
4271
|
+
onFocusTextBox: d,
|
|
4272
|
+
onInput: s,
|
|
4273
|
+
onKeyDownTextBox: l,
|
|
4275
4274
|
onKeyUpTextBox: m,
|
|
4276
|
-
onMouseDownTextBox:
|
|
4277
|
-
onTextBoxValueChange:
|
|
4275
|
+
onMouseDownTextBox: h,
|
|
4276
|
+
onTextBoxValueChange: g
|
|
4278
4277
|
} = e;
|
|
4279
|
-
return
|
|
4280
|
-
var
|
|
4281
|
-
t.selectOnCreated && ((
|
|
4282
|
-
}), () =>
|
|
4278
|
+
return ce(() => {
|
|
4279
|
+
var P, D;
|
|
4280
|
+
t.selectOnCreated && ((P = r.value) == null || P.select()), t.focusOnCreated && ((D = r.value) == null || D.focus());
|
|
4281
|
+
}), () => w("input", {
|
|
4283
4282
|
ref: r,
|
|
4284
4283
|
name: "input-group-value",
|
|
4285
4284
|
autocomplete: t.autoComplete ? "on" : "off",
|
|
@@ -4290,30 +4289,30 @@ function Vo(t, n, e) {
|
|
|
4290
4289
|
placeholder: i.value,
|
|
4291
4290
|
readonly: o.value,
|
|
4292
4291
|
tabindex: t.tabIndex,
|
|
4293
|
-
title:
|
|
4292
|
+
title: u.value,
|
|
4294
4293
|
type: t.inputType,
|
|
4295
4294
|
value: n.value,
|
|
4296
|
-
onBlur:
|
|
4297
|
-
onChange:
|
|
4298
|
-
onClick:
|
|
4299
|
-
onFocus:
|
|
4300
|
-
onInput:
|
|
4301
|
-
onKeydown:
|
|
4295
|
+
onBlur: f,
|
|
4296
|
+
onChange: g,
|
|
4297
|
+
onClick: c,
|
|
4298
|
+
onFocus: d,
|
|
4299
|
+
onInput: s,
|
|
4300
|
+
onKeydown: l,
|
|
4302
4301
|
onKeyup: m,
|
|
4303
|
-
onMousedown:
|
|
4302
|
+
onMousedown: h
|
|
4304
4303
|
}, null);
|
|
4305
4304
|
}
|
|
4306
4305
|
function Fo(t, n, e) {
|
|
4307
4306
|
const r = v(t.separator), {
|
|
4308
4307
|
changeTextBoxValue: o
|
|
4309
|
-
} = e, a =
|
|
4310
|
-
name:
|
|
4308
|
+
} = e, a = I(() => n.value ? n.value.split(r.value).map((u) => ({
|
|
4309
|
+
name: u,
|
|
4311
4310
|
selectable: !0
|
|
4312
4311
|
})) : []);
|
|
4313
|
-
function i(
|
|
4314
|
-
o(
|
|
4312
|
+
function i(u) {
|
|
4313
|
+
o(u.map((f) => f.name).join(r.value), !0);
|
|
4315
4314
|
}
|
|
4316
|
-
return () =>
|
|
4315
|
+
return () => w(It, {
|
|
4317
4316
|
id: `${t.id}-tag-editor`,
|
|
4318
4317
|
class: "form-control",
|
|
4319
4318
|
data: a.value,
|
|
@@ -4322,48 +4321,48 @@ function Fo(t, n, e) {
|
|
|
4322
4321
|
onChange: i
|
|
4323
4322
|
}, null);
|
|
4324
4323
|
}
|
|
4325
|
-
function
|
|
4324
|
+
function Vo(t, n, e, r) {
|
|
4326
4325
|
const {
|
|
4327
4326
|
buttonGroupClass: o,
|
|
4328
4327
|
onClickButton: a,
|
|
4329
4328
|
onMouseEnterButton: i,
|
|
4330
|
-
onMouseLeaveButton:
|
|
4329
|
+
onMouseLeaveButton: u
|
|
4331
4330
|
} = e, {
|
|
4332
|
-
enableClearButton:
|
|
4333
|
-
showClearButton:
|
|
4334
|
-
onClearValue:
|
|
4335
|
-
} = r,
|
|
4331
|
+
enableClearButton: f,
|
|
4332
|
+
showClearButton: c,
|
|
4333
|
+
onClearValue: d
|
|
4334
|
+
} = r, s = v();
|
|
4336
4335
|
return {
|
|
4337
|
-
renderButtonGroup: () =>
|
|
4336
|
+
renderButtonGroup: () => w("div", {
|
|
4338
4337
|
id: `${t.id}-button-group`,
|
|
4339
4338
|
class: o.value
|
|
4340
|
-
}, [
|
|
4339
|
+
}, [f.value && Ot(w("span", {
|
|
4341
4340
|
class: "input-group-text input-group-clear",
|
|
4342
|
-
onClick:
|
|
4343
|
-
}, [
|
|
4341
|
+
onClick: d
|
|
4342
|
+
}, [w("i", {
|
|
4344
4343
|
class: "f-icon modal_close"
|
|
4345
|
-
}, null)]), [[Ht,
|
|
4344
|
+
}, null)]), [[Ht, c.value]]), n.slots.buttonContent ? w("span", {
|
|
4346
4345
|
class: "input-group-text input-group-append-button",
|
|
4347
4346
|
onClick: a,
|
|
4348
4347
|
onMouseenter: i,
|
|
4349
|
-
onMouseleave:
|
|
4350
|
-
}, [n.slots.buttonContent()]) : t.buttonContent ?
|
|
4348
|
+
onMouseleave: u
|
|
4349
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? w("span", {
|
|
4351
4350
|
class: "input-group-text input-group-append-button",
|
|
4352
4351
|
innerHTML: t.buttonContent,
|
|
4353
|
-
ref:
|
|
4352
|
+
ref: s,
|
|
4354
4353
|
onClick: a,
|
|
4355
4354
|
onMouseenter: i,
|
|
4356
|
-
onMouseleave:
|
|
4355
|
+
onMouseleave: u
|
|
4357
4356
|
}, null) : null]),
|
|
4358
|
-
buttonHandleElement:
|
|
4357
|
+
buttonHandleElement: s
|
|
4359
4358
|
};
|
|
4360
4359
|
}
|
|
4361
|
-
function
|
|
4360
|
+
function Io(t, n, e) {
|
|
4362
4361
|
const r = v(t.popupMinWidth), {
|
|
4363
4362
|
hidePopup: o,
|
|
4364
4363
|
popoverRef: a
|
|
4365
4364
|
} = e;
|
|
4366
|
-
return () =>
|
|
4365
|
+
return () => w(St, {
|
|
4367
4366
|
id: `${t.id}-popover`,
|
|
4368
4367
|
ref: a,
|
|
4369
4368
|
visible: !0,
|
|
@@ -4377,86 +4376,86 @@ function So(t, n, e) {
|
|
|
4377
4376
|
onHidden: o
|
|
4378
4377
|
}, {
|
|
4379
4378
|
default: () => {
|
|
4380
|
-
var i,
|
|
4381
|
-
return [(
|
|
4379
|
+
var i, u;
|
|
4380
|
+
return [(u = (i = n.slots).default) == null ? void 0 : u.call(i)];
|
|
4382
4381
|
}
|
|
4383
4382
|
});
|
|
4384
4383
|
}
|
|
4385
|
-
const
|
|
4384
|
+
const le = /* @__PURE__ */ te({
|
|
4386
4385
|
name: "FButtonEdit",
|
|
4387
|
-
props:
|
|
4386
|
+
props: Be,
|
|
4388
4387
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4389
4388
|
setup(t, n) {
|
|
4390
4389
|
const e = v(), r = v(t.customClass), o = v(t.modelValue), a = yt(t, n, e, o), {
|
|
4391
4390
|
shouldPopupContent: i,
|
|
4392
|
-
hidePopup:
|
|
4393
|
-
togglePopup:
|
|
4394
|
-
} = a,
|
|
4395
|
-
hasFocusedTextBox:
|
|
4391
|
+
hidePopup: u,
|
|
4392
|
+
togglePopup: f
|
|
4393
|
+
} = a, c = ht(t, n, e, a, o), d = v(""), s = Eo(t, n, o, d, a), {
|
|
4394
|
+
hasFocusedTextBox: l,
|
|
4396
4395
|
commitValue: m,
|
|
4397
|
-
inputGroupClass:
|
|
4398
|
-
} =
|
|
4399
|
-
onMouseEnterTextBox:
|
|
4400
|
-
onMouseLeaveTextBox:
|
|
4401
|
-
} =
|
|
4402
|
-
const
|
|
4396
|
+
inputGroupClass: h
|
|
4397
|
+
} = s, g = Ho(t, n, o, l, d, s), {
|
|
4398
|
+
onMouseEnterTextBox: P,
|
|
4399
|
+
onMouseLeaveTextBox: D
|
|
4400
|
+
} = g, O = I(() => {
|
|
4401
|
+
const C = {
|
|
4403
4402
|
"f-button-edit": !0,
|
|
4404
4403
|
"f-cmp-inputgroup": !0,
|
|
4405
4404
|
"f-button-edit-nowrap": !t.wrapText
|
|
4406
4405
|
};
|
|
4407
|
-
return r.value && r.value.split(" ").reduce((
|
|
4406
|
+
return r.value && r.value.split(" ").reduce(($, de) => ($[de] = !0, $), C), C;
|
|
4408
4407
|
});
|
|
4409
|
-
function
|
|
4410
|
-
return t.multiSelect && t.inputType === "tag" ? Fo(t, o,
|
|
4408
|
+
function b() {
|
|
4409
|
+
return t.multiSelect && t.inputType === "tag" ? Fo(t, o, s) : Bo(t, o, s);
|
|
4411
4410
|
}
|
|
4412
|
-
let
|
|
4413
|
-
|
|
4414
|
-
|
|
4411
|
+
let M = b();
|
|
4412
|
+
G([() => t.multiSelect, () => t.inputType], () => {
|
|
4413
|
+
M = b();
|
|
4415
4414
|
});
|
|
4416
4415
|
const {
|
|
4417
|
-
renderButtonGroup:
|
|
4418
|
-
buttonHandleElement:
|
|
4419
|
-
} =
|
|
4416
|
+
renderButtonGroup: k,
|
|
4417
|
+
buttonHandleElement: B
|
|
4418
|
+
} = Vo(t, n, c, g), W = Io(t, n, a), q = {
|
|
4420
4419
|
commitValue: m,
|
|
4421
4420
|
elementRef: e,
|
|
4422
|
-
hidePopup:
|
|
4421
|
+
hidePopup: u,
|
|
4423
4422
|
shouldPopupContent: i,
|
|
4424
|
-
togglePopup:
|
|
4423
|
+
togglePopup: f,
|
|
4425
4424
|
openDialog: () => {
|
|
4426
|
-
|
|
4425
|
+
B.value && t.buttonBehavior === "Modal" && B.value.click();
|
|
4427
4426
|
},
|
|
4428
4427
|
getModal: () => {
|
|
4429
|
-
var
|
|
4430
|
-
return t.buttonBehavior === "Modal" ? (
|
|
4428
|
+
var C;
|
|
4429
|
+
return t.buttonBehavior === "Modal" ? (C = c.modalRef.value) == null ? void 0 : C.value : null;
|
|
4431
4430
|
}
|
|
4432
4431
|
};
|
|
4433
|
-
return
|
|
4434
|
-
e.value.componentInstance =
|
|
4432
|
+
return ce(() => {
|
|
4433
|
+
e.value.componentInstance = q, window.onresize = () => {
|
|
4435
4434
|
document.body.click();
|
|
4436
4435
|
};
|
|
4437
|
-
}), n.expose(
|
|
4436
|
+
}), n.expose(q), () => w(Et, null, [w("div", Te(n.attrs, {
|
|
4438
4437
|
ref: e,
|
|
4439
|
-
class:
|
|
4438
|
+
class: O.value,
|
|
4440
4439
|
id: t.id
|
|
4441
|
-
}), [
|
|
4440
|
+
}), [w("div", {
|
|
4442
4441
|
id: `${t.id}-input-group`,
|
|
4443
|
-
class:
|
|
4444
|
-
onMouseenter:
|
|
4445
|
-
onMouseleave:
|
|
4446
|
-
}, [
|
|
4442
|
+
class: h.value,
|
|
4443
|
+
onMouseenter: P,
|
|
4444
|
+
onMouseleave: D
|
|
4445
|
+
}, [M(), k()])]), i.value && W()]);
|
|
4447
4446
|
}
|
|
4448
4447
|
});
|
|
4449
|
-
function
|
|
4448
|
+
function So(t, n, e) {
|
|
4450
4449
|
const {
|
|
4451
4450
|
buttonGroupClass: r
|
|
4452
4451
|
} = e, o = v();
|
|
4453
4452
|
return {
|
|
4454
|
-
renderButtonGroup: () =>
|
|
4453
|
+
renderButtonGroup: () => w("div", {
|
|
4455
4454
|
id: `${t.id}-button-group`,
|
|
4456
4455
|
class: r.value
|
|
4457
|
-
}, [n.slots.buttonContent ?
|
|
4456
|
+
}, [n.slots.buttonContent ? w("span", {
|
|
4458
4457
|
class: "input-group-text input-group-append-button"
|
|
4459
|
-
}, [n.slots.buttonContent()]) : t.buttonContent ?
|
|
4458
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? w("span", {
|
|
4460
4459
|
class: "input-group-text input-group-append-button",
|
|
4461
4460
|
innerHTML: t.buttonContent,
|
|
4462
4461
|
ref: o
|
|
@@ -4464,142 +4463,133 @@ function Lo(t, n, e) {
|
|
|
4464
4463
|
buttonHandleElement: o
|
|
4465
4464
|
};
|
|
4466
4465
|
}
|
|
4467
|
-
const
|
|
4466
|
+
const No = /* @__PURE__ */ te({
|
|
4468
4467
|
name: "FButtonEdit",
|
|
4469
|
-
props:
|
|
4468
|
+
props: Be,
|
|
4470
4469
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4471
4470
|
setup(t, n) {
|
|
4472
|
-
const e = v(), r = me("design-item-context"), o =
|
|
4471
|
+
const e = v(), r = me("design-item-context"), o = Nt(e, r), a = v(t.customClass), i = v(t.modelValue), u = yt(t, n, e, i), f = ht(t, n, e, u, i), c = v(), d = I(() => ({
|
|
4473
4472
|
"f-cmp-inputgroup": !0,
|
|
4474
4473
|
"input-group": !0,
|
|
4475
4474
|
"f-state-disable": !0,
|
|
4476
4475
|
"f-state-editable": !1,
|
|
4477
4476
|
"f-state-readonly": !0
|
|
4478
4477
|
}));
|
|
4479
|
-
|
|
4478
|
+
ce(() => {
|
|
4480
4479
|
e.value.componentInstance = o;
|
|
4481
4480
|
}), n.expose(o.value);
|
|
4482
|
-
const
|
|
4481
|
+
const s = I(() => {
|
|
4483
4482
|
const m = {
|
|
4484
4483
|
"f-button-edit": !0,
|
|
4485
4484
|
"f-cmp-inputgroup": !0,
|
|
4486
4485
|
"f-button-edit-nowrap": !t.wrapText
|
|
4487
4486
|
};
|
|
4488
|
-
return a.value && a.value.split(" ").reduce((
|
|
4487
|
+
return a.value && a.value.split(" ").reduce((h, g) => (h[g] = !0, h), m), m;
|
|
4489
4488
|
}), {
|
|
4490
|
-
renderButtonGroup:
|
|
4491
|
-
} =
|
|
4492
|
-
return () =>
|
|
4489
|
+
renderButtonGroup: l
|
|
4490
|
+
} = So(t, n, f);
|
|
4491
|
+
return () => w("div", Te(n.attrs, {
|
|
4493
4492
|
ref: e,
|
|
4494
|
-
class:
|
|
4493
|
+
class: s.value,
|
|
4495
4494
|
id: t.id
|
|
4496
|
-
}), [
|
|
4497
|
-
class:
|
|
4498
|
-
}, [
|
|
4499
|
-
ref:
|
|
4495
|
+
}), [w("div", {
|
|
4496
|
+
class: d.value
|
|
4497
|
+
}, [w("input", {
|
|
4498
|
+
ref: c,
|
|
4500
4499
|
class: "form-control",
|
|
4501
4500
|
readonly: !0,
|
|
4502
4501
|
placeholder: t.placeholder
|
|
4503
|
-
}, null),
|
|
4502
|
+
}, null), l()])]);
|
|
4504
4503
|
}
|
|
4505
4504
|
});
|
|
4506
|
-
|
|
4507
|
-
t["button-edit"] =
|
|
4505
|
+
le.register = (t, n, e, r) => {
|
|
4506
|
+
t["button-edit"] = le, n["button-edit"] = pt;
|
|
4508
4507
|
};
|
|
4509
|
-
|
|
4510
|
-
t["button-edit"] =
|
|
4508
|
+
le.registerDesigner = (t, n, e) => {
|
|
4509
|
+
t["button-edit"] = No, n["button-edit"] = pt;
|
|
4511
4510
|
};
|
|
4512
|
-
|
|
4513
|
-
function
|
|
4514
|
-
var
|
|
4511
|
+
Lt(le);
|
|
4512
|
+
function Lo(t, n, e) {
|
|
4513
|
+
var M;
|
|
4515
4514
|
function r() {
|
|
4516
4515
|
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
4517
4516
|
}
|
|
4518
4517
|
r();
|
|
4519
4518
|
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", i = v();
|
|
4520
|
-
function
|
|
4519
|
+
function u() {
|
|
4521
4520
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
4522
4521
|
}
|
|
4523
|
-
function
|
|
4522
|
+
function f() {
|
|
4524
4523
|
return !1;
|
|
4525
4524
|
}
|
|
4526
|
-
function
|
|
4525
|
+
function c() {
|
|
4527
4526
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
4528
4527
|
}
|
|
4529
|
-
function
|
|
4528
|
+
function d() {
|
|
4530
4529
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
4531
4530
|
}
|
|
4532
|
-
function
|
|
4533
|
-
if (!
|
|
4531
|
+
function s(k) {
|
|
4532
|
+
if (!k || !k.value)
|
|
4534
4533
|
return null;
|
|
4535
|
-
if (
|
|
4536
|
-
return
|
|
4537
|
-
const
|
|
4538
|
-
return
|
|
4534
|
+
if (k.value.schema && k.value.schema.type === "component")
|
|
4535
|
+
return k.value;
|
|
4536
|
+
const B = v(k == null ? void 0 : k.value.parent), W = s(B);
|
|
4537
|
+
return W || null;
|
|
4539
4538
|
}
|
|
4540
|
-
function
|
|
4541
|
-
const { componentInstance:
|
|
4542
|
-
return !
|
|
4539
|
+
function l(k = n) {
|
|
4540
|
+
const { componentInstance: B, designerItemElementRef: W } = k;
|
|
4541
|
+
return !B || !B.value ? null : B.value.canMove ? W : l(k.parent);
|
|
4543
4542
|
}
|
|
4544
|
-
function m(
|
|
4545
|
-
return !!e && e.canAccepts(
|
|
4543
|
+
function m(k) {
|
|
4544
|
+
return !!e && e.canAccepts(k);
|
|
4546
4545
|
}
|
|
4547
|
-
function
|
|
4546
|
+
function h() {
|
|
4548
4547
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
4549
4548
|
}
|
|
4550
|
-
function
|
|
4551
|
-
}
|
|
4552
|
-
function E(T, V) {
|
|
4553
|
-
V && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(V);
|
|
4549
|
+
function g() {
|
|
4554
4550
|
}
|
|
4555
|
-
function
|
|
4556
|
-
|
|
4557
|
-
let g = Me(S, T, V);
|
|
4558
|
-
e && e.onResolveNewComponentSchema && (g = e.onResolveNewComponentSchema(T, g));
|
|
4559
|
-
const _ = S.toLowerCase().replace("-", "_");
|
|
4560
|
-
return g && !g.id && g.type === S && (g.id = `${_}_${Math.random().toString().slice(2, 6)}`), g;
|
|
4551
|
+
function P(k, B) {
|
|
4552
|
+
B && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(B);
|
|
4561
4553
|
}
|
|
4562
|
-
function
|
|
4563
|
-
const
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
return j && !j.id && j.type === S && (j.id = `${Z}_${Math.random().toString().slice(2, 6)}`), j;
|
|
4554
|
+
function D(k, B) {
|
|
4555
|
+
const { componentType: W } = k;
|
|
4556
|
+
let q = Qe(W, k, B);
|
|
4557
|
+
e && e.onResolveNewComponentSchema && (q = e.onResolveNewComponentSchema(k, q));
|
|
4558
|
+
const C = W.toLowerCase().replace("-", "_");
|
|
4559
|
+
return q && !q.id && q.type === W && (q.id = `${C}_${Math.random().toString().slice(2, 6)}`), q;
|
|
4569
4560
|
}
|
|
4570
|
-
function
|
|
4561
|
+
function O(k) {
|
|
4571
4562
|
}
|
|
4572
|
-
function
|
|
4563
|
+
function b(...k) {
|
|
4573
4564
|
if (e && e.getPropsConfig)
|
|
4574
|
-
return e.getPropsConfig(...
|
|
4565
|
+
return e.getPropsConfig(...k);
|
|
4575
4566
|
}
|
|
4576
4567
|
return i.value = {
|
|
4577
|
-
canMove:
|
|
4578
|
-
canSelectParent:
|
|
4579
|
-
canDelete:
|
|
4580
|
-
canNested: !
|
|
4568
|
+
canMove: u(),
|
|
4569
|
+
canSelectParent: f(),
|
|
4570
|
+
canDelete: c(),
|
|
4571
|
+
canNested: !d(),
|
|
4581
4572
|
contents: n == null ? void 0 : n.schema.contents,
|
|
4582
4573
|
elementRef: t,
|
|
4583
|
-
parent: (
|
|
4574
|
+
parent: (M = n == null ? void 0 : n.parent) == null ? void 0 : M.componentInstance,
|
|
4584
4575
|
schema: n == null ? void 0 : n.schema,
|
|
4585
4576
|
styles: o,
|
|
4586
4577
|
designerClass: a,
|
|
4587
4578
|
canAccepts: m,
|
|
4588
|
-
getBelongedComponentInstance:
|
|
4589
|
-
getDraggableDesignItemElement:
|
|
4590
|
-
getDraggingDisplayText:
|
|
4591
|
-
getPropConfig:
|
|
4592
|
-
getDragScopeElement:
|
|
4593
|
-
onAcceptMovedChildElement:
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
addNewChildComponentSchema: W,
|
|
4579
|
+
getBelongedComponentInstance: s,
|
|
4580
|
+
getDraggableDesignItemElement: l,
|
|
4581
|
+
getDraggingDisplayText: h,
|
|
4582
|
+
getPropConfig: b,
|
|
4583
|
+
getDragScopeElement: g,
|
|
4584
|
+
onAcceptMovedChildElement: P,
|
|
4585
|
+
onChildElementMovedOut: O,
|
|
4586
|
+
addNewChildComponentSchema: D,
|
|
4597
4587
|
updateDragAndDropRules: r,
|
|
4598
4588
|
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || v(!1),
|
|
4599
4589
|
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
|
|
4600
4590
|
}, i;
|
|
4601
4591
|
}
|
|
4602
|
-
class
|
|
4592
|
+
class Wo {
|
|
4603
4593
|
constructor(n, e) {
|
|
4604
4594
|
p(this, "componentId");
|
|
4605
4595
|
p(this, "viewModelId");
|
|
@@ -4654,7 +4644,7 @@ class Ao {
|
|
|
4654
4644
|
type: "combo-list",
|
|
4655
4645
|
textField: "name",
|
|
4656
4646
|
valueField: "value",
|
|
4657
|
-
data: [{ value: n.type, name:
|
|
4647
|
+
data: [{ value: n.type, name: T[n.type].name }]
|
|
4658
4648
|
}
|
|
4659
4649
|
}
|
|
4660
4650
|
}
|
|
@@ -4690,16 +4680,16 @@ class Ao {
|
|
|
4690
4680
|
const r = e && e.parent && e.parent.schema;
|
|
4691
4681
|
if (!r)
|
|
4692
4682
|
return;
|
|
4693
|
-
const o = r.contents.findIndex((i) => i.id === n), a =
|
|
4683
|
+
const o = r.contents.findIndex((i) => i.id === n), a = $e(r.contents[o]);
|
|
4694
4684
|
r.contents.splice(o, 1), r.contents.splice(o, 0, a);
|
|
4695
4685
|
}
|
|
4696
4686
|
}
|
|
4697
|
-
const
|
|
4687
|
+
const Z = class Z {
|
|
4698
4688
|
/**
|
|
4699
4689
|
* 根据绑定字段类型获取可用的输入类控件
|
|
4700
4690
|
*/
|
|
4701
4691
|
static getEditorTypesByMDataType(n) {
|
|
4702
|
-
const e =
|
|
4692
|
+
const e = Z.fieldControlTypeMapping[n];
|
|
4703
4693
|
return e || [{ key: "", value: "" }];
|
|
4704
4694
|
}
|
|
4705
4695
|
/**
|
|
@@ -4707,8 +4697,8 @@ const ee = class ee {
|
|
|
4707
4697
|
*/
|
|
4708
4698
|
static getAllInputTypes() {
|
|
4709
4699
|
const n = [];
|
|
4710
|
-
for (let e in
|
|
4711
|
-
|
|
4700
|
+
for (let e in Z.fieldControlTypeMapping)
|
|
4701
|
+
Z.fieldControlTypeMapping[e].forEach((r) => {
|
|
4712
4702
|
n.find((o) => o.key === r.key && o.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
4713
4703
|
});
|
|
4714
4704
|
return n;
|
|
@@ -4717,65 +4707,172 @@ const ee = class ee {
|
|
|
4717
4707
|
/**
|
|
4718
4708
|
* <字段类型,可配置的控件类型列表>的映射
|
|
4719
4709
|
*/
|
|
4720
|
-
p(
|
|
4710
|
+
p(Z, "fieldControlTypeMapping", {
|
|
4721
4711
|
String: [
|
|
4722
|
-
{ key:
|
|
4723
|
-
{ key:
|
|
4724
|
-
{ key:
|
|
4725
|
-
{ key:
|
|
4726
|
-
{ key:
|
|
4727
|
-
{ key:
|
|
4728
|
-
{ key:
|
|
4712
|
+
{ key: T["input-group"].type, value: T["input-group"].name },
|
|
4713
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
4714
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name },
|
|
4715
|
+
{ key: T["check-box"].type, value: T["check-box"].name },
|
|
4716
|
+
{ key: T["check-group"].type, value: T["check-group"].name },
|
|
4717
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name },
|
|
4718
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
4719
|
+
{ key: T.textarea.type, value: T.textarea.name }
|
|
4729
4720
|
],
|
|
4730
4721
|
Text: [
|
|
4731
|
-
{ key:
|
|
4732
|
-
{ key:
|
|
4722
|
+
{ key: T.textarea.type, value: T.textarea.name },
|
|
4723
|
+
{ key: T.lookup.type, value: T.lookup.name }
|
|
4733
4724
|
],
|
|
4734
4725
|
Decimal: [
|
|
4735
|
-
{ key:
|
|
4726
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4736
4727
|
],
|
|
4737
4728
|
Integer: [
|
|
4738
|
-
{ key:
|
|
4729
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4739
4730
|
],
|
|
4740
4731
|
Number: [
|
|
4741
|
-
{ key:
|
|
4732
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4742
4733
|
],
|
|
4743
4734
|
BigNumber: [
|
|
4744
|
-
{ key:
|
|
4735
|
+
{ key: T["number-spinner"].type, value: T["number-spinner"].name }
|
|
4745
4736
|
],
|
|
4746
4737
|
Date: [
|
|
4747
|
-
{ key:
|
|
4738
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
4748
4739
|
],
|
|
4749
4740
|
DateTime: [
|
|
4750
|
-
{ key:
|
|
4741
|
+
{ key: T["date-picker"].type, value: T["date-picker"].name }
|
|
4751
4742
|
],
|
|
4752
4743
|
Boolean: [
|
|
4753
|
-
{ key:
|
|
4754
|
-
{ key:
|
|
4744
|
+
{ key: T.switch.type, value: T.switch.name },
|
|
4745
|
+
{ key: T["check-box"].type, value: T["check-box"].name }
|
|
4755
4746
|
],
|
|
4756
4747
|
Enum: [
|
|
4757
|
-
{ key:
|
|
4758
|
-
{ key:
|
|
4748
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
4749
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
4759
4750
|
],
|
|
4760
4751
|
Object: [
|
|
4761
|
-
{ key:
|
|
4762
|
-
{ key:
|
|
4763
|
-
{ key:
|
|
4752
|
+
{ key: T.lookup.type, value: T.lookup.name },
|
|
4753
|
+
{ key: T["combo-list"].type, value: T["combo-list"].name },
|
|
4754
|
+
{ key: T["radio-group"].type, value: T["radio-group"].name }
|
|
4764
4755
|
]
|
|
4765
4756
|
});
|
|
4766
|
-
let ge =
|
|
4767
|
-
const
|
|
4768
|
-
class
|
|
4757
|
+
let ge = Z;
|
|
4758
|
+
const Yo = v(0);
|
|
4759
|
+
class Ao {
|
|
4760
|
+
constructor() {
|
|
4761
|
+
/** 控件标题 */
|
|
4762
|
+
p(this, "label", "");
|
|
4763
|
+
/** 控件id */
|
|
4764
|
+
p(this, "id", "");
|
|
4765
|
+
/** 每个控件占用的栅格数 */
|
|
4766
|
+
p(this, "columnInSM", 12);
|
|
4767
|
+
p(this, "columnInMD", 6);
|
|
4768
|
+
p(this, "columnInLG", 3);
|
|
4769
|
+
p(this, "columnInEL", 2);
|
|
4770
|
+
/** 每个控件占用的列数 */
|
|
4771
|
+
p(this, "displayWidthInSM", 1);
|
|
4772
|
+
p(this, "displayWidthInMD", 1);
|
|
4773
|
+
p(this, "displayWidthInLG", 1);
|
|
4774
|
+
p(this, "displayWidthInEL", 1);
|
|
4775
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
4776
|
+
p(this, "displayColumnCountAtBreakPoint", "md");
|
|
4777
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
4778
|
+
p(this, "tagRow", 0);
|
|
4779
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
4780
|
+
p(this, "showTopBorder", 0);
|
|
4781
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
4782
|
+
p(this, "group", 1);
|
|
4783
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
4784
|
+
p(this, "isSupportedClass", !0);
|
|
4785
|
+
/** 控件所在分组id(设计器用的) */
|
|
4786
|
+
p(this, "fieldSetId", "");
|
|
4787
|
+
}
|
|
4788
|
+
}
|
|
4789
|
+
function qo(t) {
|
|
4790
|
+
let n, e;
|
|
4791
|
+
const r = /* @__PURE__ */ new Map();
|
|
4792
|
+
let o = [];
|
|
4793
|
+
function a(d, s) {
|
|
4794
|
+
const m = d.split(" ").filter((O) => O.startsWith("col-"));
|
|
4795
|
+
if (m.length === 0) {
|
|
4796
|
+
s.isSupportedClass = !1;
|
|
4797
|
+
return;
|
|
4798
|
+
}
|
|
4799
|
+
let h = m.find((O) => /^col-([1-9]|10|11|12)$/.test(O)), g = m.find((O) => /^col-md-([1-9]|10|11|12)$/.test(O)), P = m.find((O) => /^col-xl-([1-9]|10|11|12)$/.test(O)), D = m.find((O) => /^col-el-([1-9]|10|11|12)$/.test(O));
|
|
4800
|
+
h = h || "col-12", s.columnInSM = parseInt(h.replace("col-", ""), 10), s.displayWidthInSM = s.columnInSM / 12, s.displayWidthInSM !== 1 && (s.isSupportedClass = !1), g = g || "col-md-" + s.columnInSM, s.columnInMD = parseInt(g.replace("col-md-", ""), 10), s.displayWidthInMD = s.columnInMD / 6, [1, 2].includes(s.displayWidthInMD) || (s.isSupportedClass = !1), P = P || "col-xl-" + s.columnInMD, s.columnInLG = parseInt(P.replace("col-xl-", ""), 10), s.displayWidthInLG = s.columnInLG / 3, [1, 2, 3, 4].includes(s.displayWidthInLG) || (s.isSupportedClass = !1), D = D || "col-el-" + s.columnInLG, s.columnInEL = parseInt(D.replace("col-el-", ""), 10), s.displayWidthInEL = s.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(s.displayWidthInEL) || (s.isSupportedClass = !1);
|
|
4801
|
+
}
|
|
4802
|
+
function i(d, s, l, m = !1) {
|
|
4803
|
+
let h = !1;
|
|
4804
|
+
d.contents.forEach((g) => {
|
|
4805
|
+
if (g.type === "fieldset") {
|
|
4806
|
+
l += 1, i(g, s, l, !0), h = !0;
|
|
4807
|
+
return;
|
|
4808
|
+
}
|
|
4809
|
+
h && (l += 1, h = !1);
|
|
4810
|
+
const P = g.appearance && g.appearance.class, D = new Ao();
|
|
4811
|
+
P ? a(P, D) : D.isSupportedClass = !1, D.label = g.label || g.id, D.id = g.id, D.group = l, m && (D.fieldSetId = d.id), e === g.id && (n = l), r.set(g.id, g), s.push(D);
|
|
4812
|
+
});
|
|
4813
|
+
}
|
|
4814
|
+
function u(d) {
|
|
4815
|
+
const s = t.getComponentById(d);
|
|
4816
|
+
if (!s || !s.componentType || !s.componentType.startsWith("form"))
|
|
4817
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
4818
|
+
const l = t.selectNode(s, (m) => m.type === Ne["response-form"].type);
|
|
4819
|
+
return !l || !l.contents || l.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: l };
|
|
4820
|
+
}
|
|
4821
|
+
function f(d, s) {
|
|
4822
|
+
s = s || d.id;
|
|
4823
|
+
const { result: l, message: m, formNode: h } = u(s);
|
|
4824
|
+
if (!l)
|
|
4825
|
+
return { result: l, message: m };
|
|
4826
|
+
e = d.id, o = [], r.clear();
|
|
4827
|
+
const g = h.contents[0].type === Ne.fieldset.type ? 0 : 1;
|
|
4828
|
+
i(h, o, g);
|
|
4829
|
+
const P = o.find((O) => !O.isSupportedClass);
|
|
4830
|
+
return {
|
|
4831
|
+
defaultState: {
|
|
4832
|
+
defaultGroupNumber: n || 1,
|
|
4833
|
+
model: P ? "customize" : "standard"
|
|
4834
|
+
},
|
|
4835
|
+
importData: o
|
|
4836
|
+
};
|
|
4837
|
+
}
|
|
4838
|
+
function c(d, s) {
|
|
4839
|
+
s = s;
|
|
4840
|
+
const { result: l, formNode: m } = u(s);
|
|
4841
|
+
if (!l)
|
|
4842
|
+
return "";
|
|
4843
|
+
const h = [];
|
|
4844
|
+
return d.forEach((g) => {
|
|
4845
|
+
var O;
|
|
4846
|
+
const P = r.get(g.id), D = P.appearance && P.appearance.class;
|
|
4847
|
+
if (D) {
|
|
4848
|
+
const M = D.split(" ").filter(($) => !$.startsWith("col-")), k = "col-" + g.columnInSM, B = "col-md-" + g.columnInMD, W = "col-xl-" + g.columnInLG, q = "col-el-" + g.columnInEL, C = [k, B, W, q].concat(M);
|
|
4849
|
+
P.appearance.class = C.join(" ");
|
|
4850
|
+
}
|
|
4851
|
+
if (g.fieldSetId) {
|
|
4852
|
+
const b = m.contents.find((k) => k.id === g.fieldSetId), M = h.find((k) => k.id === g.fieldSetId);
|
|
4853
|
+
M ? (O = M.contents) == null || O.push(P) : (h.push(b), b.contents = [P]);
|
|
4854
|
+
} else
|
|
4855
|
+
h.push(P);
|
|
4856
|
+
}), m.contents = h, m.id;
|
|
4857
|
+
}
|
|
4858
|
+
return {
|
|
4859
|
+
checkCanFindFormNode: u,
|
|
4860
|
+
checkCanOpenLayoutEditor: f,
|
|
4861
|
+
changeFormControlsByResponseLayoutConfig: c,
|
|
4862
|
+
getResonseFormLayoutConfig: i
|
|
4863
|
+
};
|
|
4864
|
+
}
|
|
4865
|
+
class _o extends Wo {
|
|
4769
4866
|
constructor(e, r) {
|
|
4770
4867
|
super(e, r);
|
|
4771
4868
|
p(this, "responseLayoutEditorFunction");
|
|
4772
|
-
this.responseLayoutEditorFunction =
|
|
4869
|
+
this.responseLayoutEditorFunction = qo(this.formSchemaUtils);
|
|
4773
4870
|
}
|
|
4774
4871
|
getPropertyConfig(e, r) {
|
|
4775
4872
|
return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
4776
4873
|
}
|
|
4777
4874
|
getBasicProperties(e, r) {
|
|
4778
|
-
var
|
|
4875
|
+
var u;
|
|
4779
4876
|
var o = this;
|
|
4780
4877
|
this.setDesignViewModelField(e);
|
|
4781
4878
|
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
@@ -4800,7 +4897,7 @@ class Wo extends Ao {
|
|
|
4800
4897
|
textField: "value",
|
|
4801
4898
|
valueField: "key",
|
|
4802
4899
|
editable: !1,
|
|
4803
|
-
data: o.designViewModelField ? ge.getEditorTypesByMDataType((
|
|
4900
|
+
data: o.designViewModelField ? ge.getEditorTypesByMDataType((u = o.designViewModelField.type) == null ? void 0 : u.name) : ge.getAllInputTypes()
|
|
4804
4901
|
}
|
|
4805
4902
|
},
|
|
4806
4903
|
label: {
|
|
@@ -4829,15 +4926,15 @@ class Wo extends Ao {
|
|
|
4829
4926
|
}
|
|
4830
4927
|
}
|
|
4831
4928
|
},
|
|
4832
|
-
setPropertyRelates(
|
|
4833
|
-
if (
|
|
4834
|
-
switch (
|
|
4929
|
+
setPropertyRelates(f, c) {
|
|
4930
|
+
if (f)
|
|
4931
|
+
switch (f && f.propertyID) {
|
|
4835
4932
|
case "type": {
|
|
4836
|
-
o.changeControlType(e,
|
|
4933
|
+
o.changeControlType(e, f, r);
|
|
4837
4934
|
break;
|
|
4838
4935
|
}
|
|
4839
4936
|
case "label": {
|
|
4840
|
-
|
|
4937
|
+
f.needRefreshControlTree = !0;
|
|
4841
4938
|
break;
|
|
4842
4939
|
}
|
|
4843
4940
|
}
|
|
@@ -4897,12 +4994,12 @@ class Wo extends Ao {
|
|
|
4897
4994
|
* @param newControlType 新控件类型
|
|
4898
4995
|
*/
|
|
4899
4996
|
changeControlType(e, r, o) {
|
|
4900
|
-
var
|
|
4997
|
+
var d, s, l, m;
|
|
4901
4998
|
const a = r.propertyValue, i = o && o.parent && o.parent.schema;
|
|
4902
4999
|
if (!i)
|
|
4903
5000
|
return;
|
|
4904
|
-
const
|
|
4905
|
-
let
|
|
5001
|
+
const u = i.contents.findIndex((h) => h.id === e.id), f = i.contents[u];
|
|
5002
|
+
let c;
|
|
4906
5003
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
4907
5004
|
editor: {
|
|
4908
5005
|
$type: a
|
|
@@ -4910,22 +5007,22 @@ class Wo extends Ao {
|
|
|
4910
5007
|
name: this.designViewModelField.name,
|
|
4911
5008
|
require: this.designViewModelField.require,
|
|
4912
5009
|
readonly: this.designViewModelField.readonly
|
|
4913
|
-
}, !1),
|
|
4914
|
-
id:
|
|
4915
|
-
appearance:
|
|
4916
|
-
size:
|
|
4917
|
-
label:
|
|
4918
|
-
binding:
|
|
4919
|
-
visible:
|
|
4920
|
-
}), Object.assign(
|
|
4921
|
-
isTextArea:
|
|
4922
|
-
placeholder: (
|
|
4923
|
-
holdPlace: (
|
|
4924
|
-
readonly: (
|
|
4925
|
-
require: (m =
|
|
4926
|
-
}), i.contents.splice(
|
|
4927
|
-
(
|
|
4928
|
-
),
|
|
5010
|
+
}, !1), c = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), c || (c = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(c, {
|
|
5011
|
+
id: f.id,
|
|
5012
|
+
appearance: f.appearance,
|
|
5013
|
+
size: f.size,
|
|
5014
|
+
label: f.label,
|
|
5015
|
+
binding: f.binding,
|
|
5016
|
+
visible: f.visible
|
|
5017
|
+
}), Object.assign(c.editor, {
|
|
5018
|
+
isTextArea: c.isTextArea && f.isTextArea,
|
|
5019
|
+
placeholder: (d = f.editor) == null ? void 0 : d.placeholder,
|
|
5020
|
+
holdPlace: (s = f.editor) == null ? void 0 : s.holdPlace,
|
|
5021
|
+
readonly: (l = f.editor) == null ? void 0 : l.readonly,
|
|
5022
|
+
require: (m = f.editor) == null ? void 0 : m.require
|
|
5023
|
+
}), i.contents.splice(u, 1), i.contents.splice(u, 0, c), o.schema = Object.assign(f, c), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
5024
|
+
(h) => h.classList.remove("dgComponentSelected")
|
|
5025
|
+
), Yo.value++;
|
|
4929
5026
|
}
|
|
4930
5027
|
getComponentConfig(e, r = {}, o = {}) {
|
|
4931
5028
|
const a = Object.assign({
|
|
@@ -4965,16 +5062,16 @@ class Wo extends Ao {
|
|
|
4965
5062
|
*/
|
|
4966
5063
|
updateUnifiedLayoutAfterControlChanged(e, r, o) {
|
|
4967
5064
|
const a = e.split(" ");
|
|
4968
|
-
let i = a.find((
|
|
4969
|
-
i = i || "col-12",
|
|
4970
|
-
const
|
|
5065
|
+
let i = a.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), u = a.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), f = a.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), c = a.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
|
|
5066
|
+
i = i || "col-12", u = u || "col-md-" + i.replace("col-", ""), f = f || "col-xl-" + u.replace("col-md-", ""), c = c || "col-el-" + f.replace("col-xl-", "");
|
|
5067
|
+
const d = {
|
|
4971
5068
|
id: r,
|
|
4972
5069
|
columnInSM: parseInt(i.replace("col-", ""), 10),
|
|
4973
|
-
columnInMD: parseInt(
|
|
4974
|
-
columnInLG: parseInt(
|
|
4975
|
-
columnInEL: parseInt(
|
|
5070
|
+
columnInMD: parseInt(u.replace("col-md-", ""), 10),
|
|
5071
|
+
columnInLG: parseInt(f.replace("col-xl-", ""), 10),
|
|
5072
|
+
columnInEL: parseInt(c.replace("col-el-", ""), 10)
|
|
4976
5073
|
};
|
|
4977
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(o,
|
|
5074
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, d);
|
|
4978
5075
|
}
|
|
4979
5076
|
/**
|
|
4980
5077
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -4987,14 +5084,14 @@ class Wo extends Ao {
|
|
|
4987
5084
|
return;
|
|
4988
5085
|
const a = [];
|
|
4989
5086
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), r) {
|
|
4990
|
-
const
|
|
4991
|
-
Object.assign(
|
|
5087
|
+
const h = a.find((g) => g.id === r.id);
|
|
5088
|
+
Object.assign(h || {}, r);
|
|
4992
5089
|
}
|
|
4993
|
-
const i = a.map((
|
|
5090
|
+
const i = a.map((h) => h.columnInSM), u = a.map((h) => h.columnInMD), f = a.map((h) => h.columnInLG), c = a.map((h) => h.columnInEL), d = this.checkIsUniqueColumn(i) ? i[0] : null, s = this.checkIsUniqueColumn(u) ? u[0] : null, l = this.checkIsUniqueColumn(f) ? f[0] : null, m = this.checkIsUniqueColumn(c) ? c[0] : null;
|
|
4994
5091
|
Object.assign(o.unifiedLayout, {
|
|
4995
|
-
uniqueColClassInSM:
|
|
4996
|
-
uniqueColClassInMD:
|
|
4997
|
-
uniqueColClassInLG:
|
|
5092
|
+
uniqueColClassInSM: d,
|
|
5093
|
+
uniqueColClassInMD: s,
|
|
5094
|
+
uniqueColClassInLG: l,
|
|
4998
5095
|
uniqueColClassInEL: m
|
|
4999
5096
|
});
|
|
5000
5097
|
}
|
|
@@ -5006,7 +5103,7 @@ class Wo extends Ao {
|
|
|
5006
5103
|
return Array.from(r).length === 1;
|
|
5007
5104
|
}
|
|
5008
5105
|
}
|
|
5009
|
-
class
|
|
5106
|
+
class Go extends _o {
|
|
5010
5107
|
constructor(n, e) {
|
|
5011
5108
|
super(n, e);
|
|
5012
5109
|
}
|
|
@@ -5046,10 +5143,10 @@ class _o extends Wo {
|
|
|
5046
5143
|
});
|
|
5047
5144
|
}
|
|
5048
5145
|
}
|
|
5049
|
-
function
|
|
5146
|
+
function $o(t, n) {
|
|
5050
5147
|
t.schema;
|
|
5051
5148
|
const e = v(!0), r = v(!0);
|
|
5052
|
-
function o(
|
|
5149
|
+
function o(s) {
|
|
5053
5150
|
return !1;
|
|
5054
5151
|
}
|
|
5055
5152
|
function a() {
|
|
@@ -5058,41 +5155,41 @@ function Ro(t, n) {
|
|
|
5058
5155
|
function i() {
|
|
5059
5156
|
return !1;
|
|
5060
5157
|
}
|
|
5061
|
-
function
|
|
5158
|
+
function u() {
|
|
5062
5159
|
return !0;
|
|
5063
5160
|
}
|
|
5064
|
-
function
|
|
5161
|
+
function f(s) {
|
|
5065
5162
|
}
|
|
5066
|
-
function
|
|
5163
|
+
function c() {
|
|
5067
5164
|
}
|
|
5068
|
-
function
|
|
5165
|
+
function d(s) {
|
|
5069
5166
|
return null;
|
|
5070
5167
|
}
|
|
5071
5168
|
return {
|
|
5072
5169
|
canAccepts: o,
|
|
5073
5170
|
checkCanDeleteComponent: a,
|
|
5074
5171
|
checkCanMoveComponent: i,
|
|
5075
|
-
hideNestedPaddingInDesginerView:
|
|
5076
|
-
onAcceptMovedChildElement:
|
|
5077
|
-
resolveComponentContext:
|
|
5172
|
+
hideNestedPaddingInDesginerView: u,
|
|
5173
|
+
onAcceptMovedChildElement: f,
|
|
5174
|
+
resolveComponentContext: c,
|
|
5078
5175
|
triggerBelongedComponentToMoveWhenMoved: e,
|
|
5079
5176
|
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
5080
|
-
getPropsConfig:
|
|
5177
|
+
getPropsConfig: d
|
|
5081
5178
|
};
|
|
5082
5179
|
}
|
|
5083
|
-
function
|
|
5180
|
+
function jo(t, n) {
|
|
5084
5181
|
const {
|
|
5085
5182
|
canAccepts: e,
|
|
5086
5183
|
checkCanDeleteComponent: r,
|
|
5087
5184
|
checkCanMoveComponent: o,
|
|
5088
5185
|
hideNestedPaddingInDesginerView: a,
|
|
5089
5186
|
onAcceptMovedChildElement: i,
|
|
5090
|
-
resolveComponentContext:
|
|
5091
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
5092
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
5093
|
-
} =
|
|
5094
|
-
function l
|
|
5095
|
-
return new
|
|
5187
|
+
resolveComponentContext: u,
|
|
5188
|
+
triggerBelongedComponentToMoveWhenMoved: f,
|
|
5189
|
+
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
5190
|
+
} = $o(t), d = t.schema;
|
|
5191
|
+
function s(l, m) {
|
|
5192
|
+
return new Go(l, n).getPropertyConfig(d, m);
|
|
5096
5193
|
}
|
|
5097
5194
|
return {
|
|
5098
5195
|
canAccepts: e,
|
|
@@ -5100,51 +5197,51 @@ function $o(t, n) {
|
|
|
5100
5197
|
checkCanMoveComponent: o,
|
|
5101
5198
|
hideNestedPaddingInDesginerView: a,
|
|
5102
5199
|
onAcceptMovedChildElement: i,
|
|
5103
|
-
resolveComponentContext:
|
|
5104
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
5105
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
5106
|
-
getPropsConfig:
|
|
5200
|
+
resolveComponentContext: u,
|
|
5201
|
+
triggerBelongedComponentToMoveWhenMoved: f,
|
|
5202
|
+
triggerBelongedComponentToDeleteWhenDeleted: c,
|
|
5203
|
+
getPropsConfig: s
|
|
5107
5204
|
};
|
|
5108
5205
|
}
|
|
5109
|
-
const
|
|
5206
|
+
const Ro = /* @__PURE__ */ te({
|
|
5110
5207
|
name: "FTimePickerDesign",
|
|
5111
5208
|
props: De,
|
|
5112
5209
|
emits: ["datePicked", "update:modelValue"],
|
|
5113
5210
|
setup(t, n) {
|
|
5114
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(), i = me("designer-host-service"),
|
|
5115
|
-
|
|
5116
|
-
a.value.componentInstance =
|
|
5117
|
-
}), n.expose(
|
|
5118
|
-
function
|
|
5211
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(), i = me("designer-host-service"), u = me("design-item-context"), f = jo(u, i), c = Lo(a, u, f);
|
|
5212
|
+
ce(() => {
|
|
5213
|
+
a.value.componentInstance = c;
|
|
5214
|
+
}), n.expose(c.value);
|
|
5215
|
+
function d() {
|
|
5119
5216
|
}
|
|
5120
|
-
return () =>
|
|
5217
|
+
return () => w("div", {
|
|
5121
5218
|
ref: a
|
|
5122
|
-
}, [
|
|
5219
|
+
}, [w(le, {
|
|
5123
5220
|
ref: o,
|
|
5124
5221
|
modelValue: r.value,
|
|
5125
|
-
"onUpdate:modelValue": (
|
|
5222
|
+
"onUpdate:modelValue": (s) => r.value = s,
|
|
5126
5223
|
buttonContent: e,
|
|
5127
5224
|
enableClear: !0,
|
|
5128
5225
|
onClickButton: () => void 0
|
|
5129
5226
|
}, {
|
|
5130
|
-
default: () => [
|
|
5227
|
+
default: () => [w(Bt("f-time-picker-time-view"), null, null)]
|
|
5131
5228
|
})]);
|
|
5132
5229
|
}
|
|
5133
5230
|
});
|
|
5134
|
-
|
|
5135
|
-
t.component(
|
|
5231
|
+
K.install = (t) => {
|
|
5232
|
+
t.component(K.name, K).component(ke.name, ke);
|
|
5136
5233
|
};
|
|
5137
|
-
|
|
5138
|
-
t["time-picker"] =
|
|
5234
|
+
K.register = (t, n, e, r) => {
|
|
5235
|
+
t["time-picker"] = K, n["time-picker"] = Xe;
|
|
5139
5236
|
};
|
|
5140
|
-
|
|
5141
|
-
t["time-picker"] =
|
|
5237
|
+
K.registerDesigner = (t, n, e) => {
|
|
5238
|
+
t["time-picker"] = Ro, n["time-picker"] = Xe;
|
|
5142
5239
|
};
|
|
5143
5240
|
export {
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5241
|
+
K as FTimePicker,
|
|
5242
|
+
ke as FTimePickerTimeView,
|
|
5243
|
+
K as default,
|
|
5147
5244
|
Xe as propsResolver,
|
|
5148
5245
|
De as timePickerProps,
|
|
5149
|
-
|
|
5246
|
+
nn as timeProps
|
|
5150
5247
|
};
|