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