@farris/ui-vue 1.2.7 → 1.2.9
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 +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as v, defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
1
|
+
var xt = Object.defineProperty;
|
|
2
|
+
var Mt = (t, n, e) => n in t ? xt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
+
var p = (t, n, e) => Mt(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { ref as v, defineComponent as re, watch as R, computed as B, onMounted as fe, createVNode as b, createTextVNode as ve, mergeProps as Pe, Teleport as kt, createApp as Tt, onUnmounted as Ct, inject as me, nextTick as Se, withDirectives as Pt, vShow as Ot, Fragment as Dt, resolveComponent as Ht } from "vue";
|
|
5
|
+
import { cloneDeep as Bt } from "lodash-es";
|
|
6
|
+
import Et from "../button-edit/index.esm.js";
|
|
7
7
|
import "bignumber.js";
|
|
8
|
-
import { resolveAppearance as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
import { resolveAppearance as Vt, getSchemaByType as Ye } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
import Ft from "../tags/index.esm.js";
|
|
10
|
+
import Nt from "../popover/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as St } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { withInstall as Yt } from "../common/index.esm.js";
|
|
13
|
+
const Re = {}, $e = {};
|
|
14
|
+
function Oe(t) {
|
|
15
|
+
const { properties: n, title: e, ignore: r } = t, o = r && Array.isArray(r), a = Object.keys(n).reduce((s, i) => ((!o || !r.find((f) => f == i)) && (s[i] = n[i].type === "object" && n[i].properties ? Oe(n[i]) : Bt(n[i].default)), s), {});
|
|
16
|
+
return (!o || !r.find((s) => s == "id")) && (a.id = `${e}-${Date.now()}`), a;
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
let
|
|
21
|
-
const
|
|
22
|
-
return
|
|
18
|
+
function Me(t, n = {}, e) {
|
|
19
|
+
const r = Re[t];
|
|
20
|
+
if (r) {
|
|
21
|
+
let o = Oe(r);
|
|
22
|
+
const a = $e[t];
|
|
23
|
+
return o = a ? a({ getSchemaByType: Me }, o, n, e) : o, o;
|
|
23
24
|
}
|
|
24
25
|
return null;
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
const e =
|
|
28
|
-
return Object.keys(t).reduce((r, o) => (r[o] = t[o], r), e), e;
|
|
27
|
+
function Wt(t, n) {
|
|
28
|
+
const e = Oe(n);
|
|
29
|
+
return Object.keys(t).reduce((r, o) => (r[o] && typeof r[o] == "object" ? Object.assign(r[o], t[o]) : r[o] = t[o], r), e), e;
|
|
29
30
|
}
|
|
30
31
|
function qt(t, n) {
|
|
31
32
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
@@ -34,29 +35,29 @@ function qt(t, n) {
|
|
|
34
35
|
if (typeof a == "string")
|
|
35
36
|
r[a] = t[o];
|
|
36
37
|
else {
|
|
37
|
-
const
|
|
38
|
-
Object.assign(r,
|
|
38
|
+
const s = a(o, t[o], t);
|
|
39
|
+
Object.assign(r, s);
|
|
39
40
|
}
|
|
40
41
|
} else
|
|
41
42
|
r[o] = t[o];
|
|
42
43
|
return r;
|
|
43
44
|
}, {});
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
const r =
|
|
46
|
+
function At(t, n, e = /* @__PURE__ */ new Map()) {
|
|
47
|
+
const r = Wt(t, n);
|
|
47
48
|
return qt(r, e);
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function Lt(t = {}) {
|
|
50
51
|
function n(c, d, u, l) {
|
|
51
52
|
if (typeof u == "number")
|
|
52
53
|
return l[c].length === u;
|
|
53
54
|
if (typeof u == "object") {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
55
|
+
const m = Object.keys(u)[0], y = u[m];
|
|
56
|
+
if (m === "not")
|
|
56
57
|
return Number(l[c].length) !== Number(y);
|
|
57
|
-
if (
|
|
58
|
+
if (m === "moreThan")
|
|
58
59
|
return Number(l[c].length) >= Number(y);
|
|
59
|
-
if (
|
|
60
|
+
if (m === "lessThan")
|
|
60
61
|
return Number(l[c].length) <= Number(y);
|
|
61
62
|
}
|
|
62
63
|
return !1;
|
|
@@ -74,39 +75,37 @@ function Rt(t = {}) {
|
|
|
74
75
|
return typeof d == "number" ? [{ target: u, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: u, operator: "getProperty", param: c, value: !!d }] : typeof d == "object" ? Object.keys(d).map((l) => {
|
|
75
76
|
if (l === "length")
|
|
76
77
|
return { target: u, operator: "length", param: null, value: d[l] };
|
|
77
|
-
const
|
|
78
|
-
return { target: u, operator: "getProperty", param:
|
|
78
|
+
const m = l, y = d[l];
|
|
79
|
+
return { target: u, operator: "getProperty", param: m, value: y };
|
|
79
80
|
}) : [];
|
|
80
81
|
}
|
|
81
82
|
function a(c) {
|
|
82
83
|
return Object.keys(c).reduce((u, l) => {
|
|
83
|
-
const
|
|
84
|
-
return u.push(...
|
|
84
|
+
const m = o(l, c[l]);
|
|
85
|
+
return u.push(...m), u;
|
|
85
86
|
}, []);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function s(c, d) {
|
|
88
89
|
if (r.has(c.operator)) {
|
|
89
90
|
const u = r.get(c.operator);
|
|
90
91
|
return u && u(c.target, c.param, c.value, d) || !1;
|
|
91
92
|
}
|
|
92
93
|
return !1;
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
return a(c).reduce((
|
|
95
|
+
function i(c, d) {
|
|
96
|
+
return a(c).reduce((m, y) => m && s(y, d), !0);
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
-
const u = Object.keys(c), l = u.includes("allOf"),
|
|
99
|
-
return l ? !
|
|
98
|
+
function f(c, d) {
|
|
99
|
+
const u = Object.keys(c), l = u.includes("allOf"), m = u.includes("anyOf"), y = l || m, I = (y ? c[y ? l ? "allOf" : "anyOf" : "allOf"] : [c]).map((w) => i(w, d));
|
|
100
|
+
return l ? !I.includes(!1) : I.includes(!0);
|
|
100
101
|
}
|
|
101
|
-
return { parseValueSchema:
|
|
102
|
+
return { parseValueSchema: f };
|
|
102
103
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
104
|
+
const k = {
|
|
105
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
106
106
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
107
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
107
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
108
108
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
109
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
110
109
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
111
110
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
112
111
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -117,114 +116,43 @@ const b = {
|
|
|
117
116
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
118
117
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
119
118
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
124
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
125
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
119
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
120
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
121
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
126
122
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
127
|
-
|
|
128
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
129
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
130
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
123
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
131
124
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
132
125
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
133
|
-
|
|
134
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
126
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
135
127
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
136
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
137
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
138
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
139
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
140
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
141
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
142
128
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
143
129
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
144
130
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
145
|
-
|
|
146
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
147
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
148
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
149
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
150
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
151
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
131
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
152
132
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
160
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
161
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
162
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
163
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
164
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
165
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
166
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
167
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
168
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
169
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
170
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
171
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
172
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
173
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
174
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
175
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
176
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
177
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
178
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
179
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
180
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
181
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
133
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
134
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
135
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
136
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
137
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
138
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
182
139
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
192
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
193
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
194
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
195
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
196
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
197
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
198
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
199
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
200
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
201
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
202
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
203
|
-
/** 查询类 start */
|
|
204
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
205
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
206
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
207
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
208
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
209
|
-
/** 查询类 end */
|
|
210
|
-
/** 审批类 start */
|
|
211
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
212
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
213
|
-
/** 审批类 end */
|
|
214
|
-
}, jt = {}, Qt = {};
|
|
215
|
-
Rt();
|
|
216
|
-
function Re(t, n, e = /* @__PURE__ */ new Map(), r = (i, s, p) => s, o = {}, a = (i) => i) {
|
|
217
|
-
return qe[n.title] = n, _e[n.title] = r, jt[n.title] = o, Qt[n.title] = a, (i = {}) => {
|
|
218
|
-
const s = _t(i, n, e), p = Object.keys(t).reduce((c, d) => (c[d] = t[d].default, c), {});
|
|
219
|
-
return Object.assign(p, s);
|
|
140
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
141
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
142
|
+
}, It = {}, _t = {};
|
|
143
|
+
Lt();
|
|
144
|
+
function Ge(t, n, e = /* @__PURE__ */ new Map(), r = (s, i, f) => i, o = {}, a = (s) => s) {
|
|
145
|
+
return Re[n.title] = n, $e[n.title] = r, It[n.title] = o, _t[n.title] = a, (s = {}) => {
|
|
146
|
+
const i = At(s, n, e), f = Object.keys(t).reduce((c, d) => (c[d] = t[d].default, c), {});
|
|
147
|
+
return Object.assign(f, i);
|
|
220
148
|
};
|
|
221
149
|
}
|
|
222
|
-
function
|
|
150
|
+
function jt(t, n) {
|
|
223
151
|
return { customClass: n.class, customStyle: n.style };
|
|
224
152
|
}
|
|
225
|
-
const
|
|
226
|
-
["appearance",
|
|
227
|
-
]),
|
|
153
|
+
const Rt = /* @__PURE__ */ new Map([
|
|
154
|
+
["appearance", jt]
|
|
155
|
+
]), $t = "https://json-schema.org/draft/2020-12/schema", Gt = "https://farris-design.gitee.io/time-picker.schema.json", Qt = "time-picker", Xt = "A Farris Input Component", Ut = "object", zt = {
|
|
228
156
|
id: {
|
|
229
157
|
description: "The unique identifier for a time picker",
|
|
230
158
|
type: "string"
|
|
@@ -252,7 +180,7 @@ const Gt = /* @__PURE__ */ new Map([
|
|
|
252
180
|
type: "object",
|
|
253
181
|
default: {}
|
|
254
182
|
},
|
|
255
|
-
|
|
183
|
+
disabled: {
|
|
256
184
|
type: "string",
|
|
257
185
|
default: !1
|
|
258
186
|
},
|
|
@@ -301,22 +229,27 @@ const Gt = /* @__PURE__ */ new Map([
|
|
|
301
229
|
type: "boolean",
|
|
302
230
|
default: !1
|
|
303
231
|
}
|
|
304
|
-
},
|
|
232
|
+
}, Jt = [
|
|
305
233
|
"id",
|
|
306
234
|
"type"
|
|
307
|
-
],
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
235
|
+
], Zt = [
|
|
236
|
+
"id",
|
|
237
|
+
"appearance",
|
|
238
|
+
"binding"
|
|
239
|
+
], Kt = {
|
|
240
|
+
$schema: $t,
|
|
241
|
+
$id: Gt,
|
|
242
|
+
title: Qt,
|
|
243
|
+
description: Xt,
|
|
244
|
+
type: Ut,
|
|
245
|
+
properties: zt,
|
|
246
|
+
required: Jt,
|
|
247
|
+
ignore: Zt
|
|
315
248
|
};
|
|
316
|
-
function
|
|
249
|
+
function en(t, n, e) {
|
|
317
250
|
return n;
|
|
318
251
|
}
|
|
319
|
-
const
|
|
252
|
+
const De = {
|
|
320
253
|
/**
|
|
321
254
|
* 组件值,这个是与指定的format格式相对应的值
|
|
322
255
|
*/
|
|
@@ -341,10 +274,10 @@ const Pe = {
|
|
|
341
274
|
* 是否隐藏禁用的元素
|
|
342
275
|
*/
|
|
343
276
|
hideDisabledElements: { type: Boolean, default: !1 },
|
|
344
|
-
|
|
277
|
+
disabled: { type: Boolean, default: !1 },
|
|
345
278
|
readonly: { type: Boolean, default: !1 },
|
|
346
279
|
editable: { type: Boolean, default: !0 }
|
|
347
|
-
},
|
|
280
|
+
}, Qe = Ge(De, Kt, Rt, en), tn = {
|
|
348
281
|
modelValue: {
|
|
349
282
|
type: String,
|
|
350
283
|
default: ""
|
|
@@ -398,44 +331,44 @@ const Pe = {
|
|
|
398
331
|
default: !1
|
|
399
332
|
}
|
|
400
333
|
};
|
|
401
|
-
function
|
|
334
|
+
function L(t) {
|
|
402
335
|
const n = Object.prototype.toString.call(t);
|
|
403
336
|
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);
|
|
404
337
|
}
|
|
405
|
-
function
|
|
338
|
+
function Y(t, n) {
|
|
406
339
|
return t instanceof Date ? new t.constructor(n) : new Date(n);
|
|
407
340
|
}
|
|
408
|
-
function
|
|
409
|
-
const e =
|
|
410
|
-
return isNaN(n) ?
|
|
341
|
+
function Xe(t, n) {
|
|
342
|
+
const e = L(t);
|
|
343
|
+
return isNaN(n) ? Y(t, NaN) : (n && e.setDate(e.getDate() + n), e);
|
|
411
344
|
}
|
|
412
|
-
const
|
|
413
|
-
let
|
|
414
|
-
function
|
|
415
|
-
return
|
|
345
|
+
const Ue = 6048e5, nn = 864e5, rn = 6e4, on = 36e5, an = 1e3;
|
|
346
|
+
let sn = {};
|
|
347
|
+
function oe() {
|
|
348
|
+
return sn;
|
|
416
349
|
}
|
|
417
350
|
function z(t, n) {
|
|
418
|
-
var
|
|
419
|
-
const e =
|
|
420
|
-
return o.setDate(o.getDate() -
|
|
351
|
+
var i, f, c, d;
|
|
352
|
+
const e = oe(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((f = (i = n == null ? void 0 : n.locale) == null ? void 0 : i.options) == null ? void 0 : f.weekStartsOn) ?? e.weekStartsOn ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = L(t), a = o.getDay(), s = (a < r ? 7 : 0) + a - r;
|
|
353
|
+
return o.setDate(o.getDate() - s), o.setHours(0, 0, 0, 0), o;
|
|
421
354
|
}
|
|
422
|
-
function
|
|
355
|
+
function ne(t) {
|
|
423
356
|
return z(t, { weekStartsOn: 1 });
|
|
424
357
|
}
|
|
425
|
-
function
|
|
426
|
-
const n =
|
|
358
|
+
function ze(t) {
|
|
359
|
+
const n = L(t), e = n.getFullYear(), r = Y(t, 0);
|
|
427
360
|
r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
428
|
-
const o =
|
|
361
|
+
const o = ne(r), a = Y(t, 0);
|
|
429
362
|
a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0);
|
|
430
|
-
const
|
|
431
|
-
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >=
|
|
363
|
+
const s = ne(a);
|
|
364
|
+
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >= s.getTime() ? e : e - 1;
|
|
432
365
|
}
|
|
433
|
-
function
|
|
434
|
-
const n =
|
|
366
|
+
function We(t) {
|
|
367
|
+
const n = L(t);
|
|
435
368
|
return n.setHours(0, 0, 0, 0), n;
|
|
436
369
|
}
|
|
437
|
-
function
|
|
438
|
-
const n =
|
|
370
|
+
function he(t) {
|
|
371
|
+
const n = L(t), e = new Date(
|
|
439
372
|
Date.UTC(
|
|
440
373
|
n.getFullYear(),
|
|
441
374
|
n.getMonth(),
|
|
@@ -448,28 +381,28 @@ function me(t) {
|
|
|
448
381
|
);
|
|
449
382
|
return e.setUTCFullYear(n.getFullYear()), +t - +e;
|
|
450
383
|
}
|
|
451
|
-
function
|
|
452
|
-
const e =
|
|
453
|
-
return Math.round((o - a) /
|
|
384
|
+
function un(t, n) {
|
|
385
|
+
const e = We(t), r = We(n), o = +e - he(e), a = +r - he(r);
|
|
386
|
+
return Math.round((o - a) / nn);
|
|
454
387
|
}
|
|
455
|
-
function
|
|
456
|
-
const n =
|
|
457
|
-
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0),
|
|
388
|
+
function ln(t) {
|
|
389
|
+
const n = ze(t), e = Y(t, 0);
|
|
390
|
+
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), ne(e);
|
|
458
391
|
}
|
|
459
|
-
function
|
|
392
|
+
function cn(t) {
|
|
460
393
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
461
394
|
}
|
|
462
|
-
function
|
|
463
|
-
if (!
|
|
395
|
+
function Je(t) {
|
|
396
|
+
if (!cn(t) && typeof t != "number")
|
|
464
397
|
return !1;
|
|
465
|
-
const n =
|
|
398
|
+
const n = L(t);
|
|
466
399
|
return !isNaN(Number(n));
|
|
467
400
|
}
|
|
468
|
-
function
|
|
469
|
-
const n =
|
|
401
|
+
function dn(t) {
|
|
402
|
+
const n = L(t), e = Y(t, 0);
|
|
470
403
|
return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
471
404
|
}
|
|
472
|
-
const
|
|
405
|
+
const fn = {
|
|
473
406
|
lessThanXSeconds: {
|
|
474
407
|
one: "less than a second",
|
|
475
408
|
other: "less than {{count}} seconds"
|
|
@@ -531,77 +464,77 @@ const mn = {
|
|
|
531
464
|
one: "almost 1 year",
|
|
532
465
|
other: "almost {{count}} years"
|
|
533
466
|
}
|
|
534
|
-
},
|
|
467
|
+
}, pn = (t, n, e) => {
|
|
535
468
|
let r;
|
|
536
|
-
const o =
|
|
469
|
+
const o = fn[t];
|
|
537
470
|
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;
|
|
538
471
|
};
|
|
539
|
-
function
|
|
472
|
+
function xe(t) {
|
|
540
473
|
return (n = {}) => {
|
|
541
474
|
const e = n.width ? String(n.width) : t.defaultWidth;
|
|
542
475
|
return t.formats[e] || t.formats[t.defaultWidth];
|
|
543
476
|
};
|
|
544
477
|
}
|
|
545
|
-
const
|
|
478
|
+
const mn = {
|
|
546
479
|
full: "EEEE, MMMM do, y",
|
|
547
480
|
long: "MMMM do, y",
|
|
548
481
|
medium: "MMM d, y",
|
|
549
482
|
short: "MM/dd/yyyy"
|
|
550
|
-
},
|
|
483
|
+
}, hn = {
|
|
551
484
|
full: "h:mm:ss a zzzz",
|
|
552
485
|
long: "h:mm:ss a z",
|
|
553
486
|
medium: "h:mm:ss a",
|
|
554
487
|
short: "h:mm a"
|
|
555
|
-
},
|
|
488
|
+
}, yn = {
|
|
556
489
|
full: "{{date}} 'at' {{time}}",
|
|
557
490
|
long: "{{date}} 'at' {{time}}",
|
|
558
491
|
medium: "{{date}}, {{time}}",
|
|
559
492
|
short: "{{date}}, {{time}}"
|
|
560
|
-
},
|
|
561
|
-
date:
|
|
562
|
-
formats:
|
|
493
|
+
}, gn = {
|
|
494
|
+
date: xe({
|
|
495
|
+
formats: mn,
|
|
563
496
|
defaultWidth: "full"
|
|
564
497
|
}),
|
|
565
|
-
time:
|
|
566
|
-
formats:
|
|
498
|
+
time: xe({
|
|
499
|
+
formats: hn,
|
|
567
500
|
defaultWidth: "full"
|
|
568
501
|
}),
|
|
569
|
-
dateTime:
|
|
570
|
-
formats:
|
|
502
|
+
dateTime: xe({
|
|
503
|
+
formats: yn,
|
|
571
504
|
defaultWidth: "full"
|
|
572
505
|
})
|
|
573
|
-
},
|
|
506
|
+
}, bn = {
|
|
574
507
|
lastWeek: "'last' eeee 'at' p",
|
|
575
508
|
yesterday: "'yesterday at' p",
|
|
576
509
|
today: "'today at' p",
|
|
577
510
|
tomorrow: "'tomorrow at' p",
|
|
578
511
|
nextWeek: "eeee 'at' p",
|
|
579
512
|
other: "P"
|
|
580
|
-
},
|
|
581
|
-
function
|
|
513
|
+
}, wn = (t, n, e, r) => bn[t];
|
|
514
|
+
function le(t) {
|
|
582
515
|
return (n, e) => {
|
|
583
516
|
const r = e != null && e.context ? String(e.context) : "standalone";
|
|
584
517
|
let o;
|
|
585
518
|
if (r === "formatting" && t.formattingValues) {
|
|
586
|
-
const
|
|
587
|
-
o = t.formattingValues[
|
|
519
|
+
const s = t.defaultFormattingWidth || t.defaultWidth, i = e != null && e.width ? String(e.width) : s;
|
|
520
|
+
o = t.formattingValues[i] || t.formattingValues[s];
|
|
588
521
|
} else {
|
|
589
|
-
const
|
|
590
|
-
o = t.values[
|
|
522
|
+
const s = t.defaultWidth, i = e != null && e.width ? String(e.width) : t.defaultWidth;
|
|
523
|
+
o = t.values[i] || t.values[s];
|
|
591
524
|
}
|
|
592
525
|
const a = t.argumentCallback ? t.argumentCallback(n) : n;
|
|
593
526
|
return o[a];
|
|
594
527
|
};
|
|
595
528
|
}
|
|
596
|
-
const
|
|
529
|
+
const vn = {
|
|
597
530
|
narrow: ["B", "A"],
|
|
598
531
|
abbreviated: ["BC", "AD"],
|
|
599
532
|
wide: ["Before Christ", "Anno Domini"]
|
|
600
|
-
},
|
|
533
|
+
}, xn = {
|
|
601
534
|
narrow: ["1", "2", "3", "4"],
|
|
602
535
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
603
536
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
604
|
-
},
|
|
537
|
+
}, Mn = {
|
|
605
538
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
606
539
|
abbreviated: [
|
|
607
540
|
"Jan",
|
|
@@ -644,7 +577,7 @@ const Tn = {
|
|
|
644
577
|
"Friday",
|
|
645
578
|
"Saturday"
|
|
646
579
|
]
|
|
647
|
-
},
|
|
580
|
+
}, Tn = {
|
|
648
581
|
narrow: {
|
|
649
582
|
am: "a",
|
|
650
583
|
pm: "p",
|
|
@@ -675,7 +608,7 @@ const Tn = {
|
|
|
675
608
|
evening: "evening",
|
|
676
609
|
night: "night"
|
|
677
610
|
}
|
|
678
|
-
},
|
|
611
|
+
}, Cn = {
|
|
679
612
|
narrow: {
|
|
680
613
|
am: "a",
|
|
681
614
|
pm: "p",
|
|
@@ -706,7 +639,7 @@ const Tn = {
|
|
|
706
639
|
evening: "in the evening",
|
|
707
640
|
night: "at night"
|
|
708
641
|
}
|
|
709
|
-
},
|
|
642
|
+
}, Pn = (t, n) => {
|
|
710
643
|
const e = Number(t), r = e % 100;
|
|
711
644
|
if (r > 20 || r < 10)
|
|
712
645
|
switch (r % 10) {
|
|
@@ -718,89 +651,89 @@ const Tn = {
|
|
|
718
651
|
return e + "rd";
|
|
719
652
|
}
|
|
720
653
|
return e + "th";
|
|
721
|
-
},
|
|
722
|
-
ordinalNumber:
|
|
723
|
-
era:
|
|
724
|
-
values:
|
|
654
|
+
}, On = {
|
|
655
|
+
ordinalNumber: Pn,
|
|
656
|
+
era: le({
|
|
657
|
+
values: vn,
|
|
725
658
|
defaultWidth: "wide"
|
|
726
659
|
}),
|
|
727
|
-
quarter:
|
|
728
|
-
values:
|
|
660
|
+
quarter: le({
|
|
661
|
+
values: xn,
|
|
729
662
|
defaultWidth: "wide",
|
|
730
663
|
argumentCallback: (t) => t - 1
|
|
731
664
|
}),
|
|
732
|
-
month:
|
|
733
|
-
values:
|
|
665
|
+
month: le({
|
|
666
|
+
values: Mn,
|
|
734
667
|
defaultWidth: "wide"
|
|
735
668
|
}),
|
|
736
|
-
day:
|
|
669
|
+
day: le({
|
|
737
670
|
values: kn,
|
|
738
671
|
defaultWidth: "wide"
|
|
739
672
|
}),
|
|
740
|
-
dayPeriod:
|
|
741
|
-
values:
|
|
673
|
+
dayPeriod: le({
|
|
674
|
+
values: Tn,
|
|
742
675
|
defaultWidth: "wide",
|
|
743
|
-
formattingValues:
|
|
676
|
+
formattingValues: Cn,
|
|
744
677
|
defaultFormattingWidth: "wide"
|
|
745
678
|
})
|
|
746
679
|
};
|
|
747
|
-
function
|
|
680
|
+
function ce(t) {
|
|
748
681
|
return (n, e = {}) => {
|
|
749
682
|
const r = e.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = n.match(o);
|
|
750
683
|
if (!a)
|
|
751
684
|
return null;
|
|
752
|
-
const
|
|
685
|
+
const s = a[0], i = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(i) ? Hn(i, (u) => u.test(s)) : (
|
|
753
686
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
754
|
-
|
|
687
|
+
Dn(i, (u) => u.test(s))
|
|
755
688
|
);
|
|
756
689
|
let c;
|
|
757
|
-
c = t.valueCallback ? t.valueCallback(
|
|
690
|
+
c = t.valueCallback ? t.valueCallback(f) : f, c = e.valueCallback ? (
|
|
758
691
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
759
692
|
e.valueCallback(c)
|
|
760
693
|
) : c;
|
|
761
|
-
const d = n.slice(
|
|
694
|
+
const d = n.slice(s.length);
|
|
762
695
|
return { value: c, rest: d };
|
|
763
696
|
};
|
|
764
697
|
}
|
|
765
|
-
function
|
|
698
|
+
function Dn(t, n) {
|
|
766
699
|
for (const e in t)
|
|
767
700
|
if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
|
|
768
701
|
return e;
|
|
769
702
|
}
|
|
770
|
-
function
|
|
703
|
+
function Hn(t, n) {
|
|
771
704
|
for (let e = 0; e < t.length; e++)
|
|
772
705
|
if (n(t[e]))
|
|
773
706
|
return e;
|
|
774
707
|
}
|
|
775
|
-
function
|
|
708
|
+
function Bn(t) {
|
|
776
709
|
return (n, e = {}) => {
|
|
777
710
|
const r = n.match(t.matchPattern);
|
|
778
711
|
if (!r) return null;
|
|
779
712
|
const o = r[0], a = n.match(t.parsePattern);
|
|
780
713
|
if (!a) return null;
|
|
781
|
-
let
|
|
782
|
-
|
|
783
|
-
const
|
|
784
|
-
return { value:
|
|
714
|
+
let s = t.valueCallback ? t.valueCallback(a[0]) : a[0];
|
|
715
|
+
s = e.valueCallback ? e.valueCallback(s) : s;
|
|
716
|
+
const i = n.slice(o.length);
|
|
717
|
+
return { value: s, rest: i };
|
|
785
718
|
};
|
|
786
719
|
}
|
|
787
|
-
const
|
|
720
|
+
const En = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Fn = {
|
|
788
721
|
narrow: /^(b|a)/i,
|
|
789
722
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
790
723
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
791
|
-
},
|
|
724
|
+
}, Nn = {
|
|
792
725
|
any: [/^b/i, /^(a|c)/i]
|
|
793
|
-
},
|
|
726
|
+
}, Sn = {
|
|
794
727
|
narrow: /^[1234]/i,
|
|
795
728
|
abbreviated: /^q[1234]/i,
|
|
796
729
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
797
|
-
},
|
|
730
|
+
}, Yn = {
|
|
798
731
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
799
|
-
},
|
|
732
|
+
}, Wn = {
|
|
800
733
|
narrow: /^[jfmasond]/i,
|
|
801
734
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
802
735
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
803
|
-
},
|
|
736
|
+
}, qn = {
|
|
804
737
|
narrow: [
|
|
805
738
|
/^j/i,
|
|
806
739
|
/^f/i,
|
|
@@ -829,18 +762,18 @@ const Sn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Nn = {
|
|
|
829
762
|
/^n/i,
|
|
830
763
|
/^d/i
|
|
831
764
|
]
|
|
832
|
-
},
|
|
765
|
+
}, An = {
|
|
833
766
|
narrow: /^[smtwf]/i,
|
|
834
767
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
835
768
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
836
769
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
837
|
-
},
|
|
770
|
+
}, Ln = {
|
|
838
771
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
839
772
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
840
|
-
},
|
|
773
|
+
}, In = {
|
|
841
774
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
842
775
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
843
|
-
},
|
|
776
|
+
}, _n = {
|
|
844
777
|
any: {
|
|
845
778
|
am: /^a/i,
|
|
846
779
|
pm: /^p/i,
|
|
@@ -851,99 +784,99 @@ const Sn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Nn = {
|
|
|
851
784
|
evening: /evening/i,
|
|
852
785
|
night: /night/i
|
|
853
786
|
}
|
|
854
|
-
},
|
|
855
|
-
ordinalNumber:
|
|
856
|
-
matchPattern:
|
|
787
|
+
}, jn = {
|
|
788
|
+
ordinalNumber: Bn({
|
|
789
|
+
matchPattern: En,
|
|
857
790
|
parsePattern: Vn,
|
|
858
791
|
valueCallback: (t) => parseInt(t, 10)
|
|
859
792
|
}),
|
|
860
|
-
era:
|
|
861
|
-
matchPatterns:
|
|
793
|
+
era: ce({
|
|
794
|
+
matchPatterns: Fn,
|
|
862
795
|
defaultMatchWidth: "wide",
|
|
863
|
-
parsePatterns:
|
|
796
|
+
parsePatterns: Nn,
|
|
864
797
|
defaultParseWidth: "any"
|
|
865
798
|
}),
|
|
866
|
-
quarter:
|
|
867
|
-
matchPatterns:
|
|
799
|
+
quarter: ce({
|
|
800
|
+
matchPatterns: Sn,
|
|
868
801
|
defaultMatchWidth: "wide",
|
|
869
|
-
parsePatterns:
|
|
802
|
+
parsePatterns: Yn,
|
|
870
803
|
defaultParseWidth: "any",
|
|
871
804
|
valueCallback: (t) => t + 1
|
|
872
805
|
}),
|
|
873
|
-
month:
|
|
874
|
-
matchPatterns:
|
|
806
|
+
month: ce({
|
|
807
|
+
matchPatterns: Wn,
|
|
875
808
|
defaultMatchWidth: "wide",
|
|
876
|
-
parsePatterns:
|
|
809
|
+
parsePatterns: qn,
|
|
877
810
|
defaultParseWidth: "any"
|
|
878
811
|
}),
|
|
879
|
-
day:
|
|
880
|
-
matchPatterns:
|
|
812
|
+
day: ce({
|
|
813
|
+
matchPatterns: An,
|
|
881
814
|
defaultMatchWidth: "wide",
|
|
882
|
-
parsePatterns:
|
|
815
|
+
parsePatterns: Ln,
|
|
883
816
|
defaultParseWidth: "any"
|
|
884
817
|
}),
|
|
885
|
-
dayPeriod:
|
|
886
|
-
matchPatterns:
|
|
818
|
+
dayPeriod: ce({
|
|
819
|
+
matchPatterns: In,
|
|
887
820
|
defaultMatchWidth: "any",
|
|
888
|
-
parsePatterns:
|
|
821
|
+
parsePatterns: _n,
|
|
889
822
|
defaultParseWidth: "any"
|
|
890
823
|
})
|
|
891
|
-
},
|
|
824
|
+
}, Ze = {
|
|
892
825
|
code: "en-US",
|
|
893
|
-
formatDistance:
|
|
894
|
-
formatLong:
|
|
895
|
-
formatRelative:
|
|
896
|
-
localize:
|
|
897
|
-
match:
|
|
826
|
+
formatDistance: pn,
|
|
827
|
+
formatLong: gn,
|
|
828
|
+
formatRelative: wn,
|
|
829
|
+
localize: On,
|
|
830
|
+
match: jn,
|
|
898
831
|
options: {
|
|
899
832
|
weekStartsOn: 0,
|
|
900
833
|
firstWeekContainsDate: 1
|
|
901
834
|
}
|
|
902
835
|
};
|
|
903
|
-
function
|
|
904
|
-
const n =
|
|
905
|
-
return
|
|
836
|
+
function Rn(t) {
|
|
837
|
+
const n = L(t);
|
|
838
|
+
return un(n, dn(n)) + 1;
|
|
906
839
|
}
|
|
907
|
-
function
|
|
908
|
-
const n =
|
|
909
|
-
return Math.round(e /
|
|
840
|
+
function Ke(t) {
|
|
841
|
+
const n = L(t), e = +ne(n) - +ln(n);
|
|
842
|
+
return Math.round(e / Ue) + 1;
|
|
910
843
|
}
|
|
911
|
-
function
|
|
912
|
-
var d, u, l,
|
|
913
|
-
const e =
|
|
914
|
-
|
|
915
|
-
const
|
|
916
|
-
|
|
917
|
-
const c = z(
|
|
918
|
-
return e.getTime() >=
|
|
844
|
+
function He(t, n) {
|
|
845
|
+
var d, u, l, m;
|
|
846
|
+
const e = L(t), r = e.getFullYear(), o = oe(), a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((u = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : u.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (l = o.locale) == null ? void 0 : l.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, s = Y(t, 0);
|
|
847
|
+
s.setFullYear(r + 1, 0, a), s.setHours(0, 0, 0, 0);
|
|
848
|
+
const i = z(s, n), f = Y(t, 0);
|
|
849
|
+
f.setFullYear(r, 0, a), f.setHours(0, 0, 0, 0);
|
|
850
|
+
const c = z(f, n);
|
|
851
|
+
return e.getTime() >= i.getTime() ? r + 1 : e.getTime() >= c.getTime() ? r : r - 1;
|
|
919
852
|
}
|
|
920
|
-
function
|
|
921
|
-
var
|
|
922
|
-
const e =
|
|
853
|
+
function $n(t, n) {
|
|
854
|
+
var i, f, c, d;
|
|
855
|
+
const e = oe(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (i = n == null ? void 0 : n.locale) == null ? void 0 : i.options) == null ? void 0 : f.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = He(t, n), a = Y(t, 0);
|
|
923
856
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), z(a, n);
|
|
924
857
|
}
|
|
925
|
-
function
|
|
926
|
-
const e =
|
|
927
|
-
return Math.round(r /
|
|
858
|
+
function et(t, n) {
|
|
859
|
+
const e = L(t), r = +z(e, n) - +$n(e, n);
|
|
860
|
+
return Math.round(r / Ue) + 1;
|
|
928
861
|
}
|
|
929
|
-
function
|
|
862
|
+
function O(t, n) {
|
|
930
863
|
const e = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(n, "0");
|
|
931
864
|
return e + r;
|
|
932
865
|
}
|
|
933
|
-
const
|
|
866
|
+
const U = {
|
|
934
867
|
// Year
|
|
935
868
|
y(t, n) {
|
|
936
869
|
const e = t.getFullYear(), r = e > 0 ? e : 1 - e;
|
|
937
|
-
return
|
|
870
|
+
return O(n === "yy" ? r % 100 : r, n.length);
|
|
938
871
|
},
|
|
939
872
|
// Month
|
|
940
873
|
M(t, n) {
|
|
941
874
|
const e = t.getMonth();
|
|
942
|
-
return n === "M" ? String(e + 1) :
|
|
875
|
+
return n === "M" ? String(e + 1) : O(e + 1, 2);
|
|
943
876
|
},
|
|
944
877
|
// Day of the month
|
|
945
878
|
d(t, n) {
|
|
946
|
-
return
|
|
879
|
+
return O(t.getDate(), n.length);
|
|
947
880
|
},
|
|
948
881
|
// AM or PM
|
|
949
882
|
a(t, n) {
|
|
@@ -963,26 +896,26 @@ const X = {
|
|
|
963
896
|
},
|
|
964
897
|
// Hour [1-12]
|
|
965
898
|
h(t, n) {
|
|
966
|
-
return
|
|
899
|
+
return O(t.getHours() % 12 || 12, n.length);
|
|
967
900
|
},
|
|
968
901
|
// Hour [0-23]
|
|
969
902
|
H(t, n) {
|
|
970
|
-
return
|
|
903
|
+
return O(t.getHours(), n.length);
|
|
971
904
|
},
|
|
972
905
|
// Minute
|
|
973
906
|
m(t, n) {
|
|
974
|
-
return
|
|
907
|
+
return O(t.getMinutes(), n.length);
|
|
975
908
|
},
|
|
976
909
|
// Second
|
|
977
910
|
s(t, n) {
|
|
978
|
-
return
|
|
911
|
+
return O(t.getSeconds(), n.length);
|
|
979
912
|
},
|
|
980
913
|
// Fraction of second
|
|
981
914
|
S(t, n) {
|
|
982
915
|
const e = n.length, r = t.getMilliseconds(), o = Math.trunc(
|
|
983
916
|
r * Math.pow(10, e - 3)
|
|
984
917
|
);
|
|
985
|
-
return
|
|
918
|
+
return O(o, n.length);
|
|
986
919
|
}
|
|
987
920
|
}, K = {
|
|
988
921
|
am: "am",
|
|
@@ -993,7 +926,7 @@ const X = {
|
|
|
993
926
|
afternoon: "afternoon",
|
|
994
927
|
evening: "evening",
|
|
995
928
|
night: "night"
|
|
996
|
-
},
|
|
929
|
+
}, qe = {
|
|
997
930
|
// Era
|
|
998
931
|
G: function(t, n, e) {
|
|
999
932
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -1015,21 +948,21 @@ const X = {
|
|
|
1015
948
|
const r = t.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
1016
949
|
return e.ordinalNumber(o, { unit: "year" });
|
|
1017
950
|
}
|
|
1018
|
-
return
|
|
951
|
+
return U.y(t, n);
|
|
1019
952
|
},
|
|
1020
953
|
// Local week-numbering year
|
|
1021
954
|
Y: function(t, n, e, r) {
|
|
1022
|
-
const o =
|
|
955
|
+
const o = He(t, r), a = o > 0 ? o : 1 - o;
|
|
1023
956
|
if (n === "YY") {
|
|
1024
|
-
const
|
|
1025
|
-
return
|
|
957
|
+
const s = a % 100;
|
|
958
|
+
return O(s, 2);
|
|
1026
959
|
}
|
|
1027
|
-
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) :
|
|
960
|
+
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) : O(a, n.length);
|
|
1028
961
|
},
|
|
1029
962
|
// ISO week-numbering year
|
|
1030
963
|
R: function(t, n) {
|
|
1031
|
-
const e =
|
|
1032
|
-
return
|
|
964
|
+
const e = ze(t);
|
|
965
|
+
return O(e, n.length);
|
|
1033
966
|
},
|
|
1034
967
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
1035
968
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -1042,7 +975,7 @@ const X = {
|
|
|
1042
975
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
1043
976
|
u: function(t, n) {
|
|
1044
977
|
const e = t.getFullYear();
|
|
1045
|
-
return
|
|
978
|
+
return O(e, n.length);
|
|
1046
979
|
},
|
|
1047
980
|
// Quarter
|
|
1048
981
|
Q: function(t, n, e) {
|
|
@@ -1051,7 +984,7 @@ const X = {
|
|
|
1051
984
|
case "Q":
|
|
1052
985
|
return String(r);
|
|
1053
986
|
case "QQ":
|
|
1054
|
-
return
|
|
987
|
+
return O(r, 2);
|
|
1055
988
|
case "Qo":
|
|
1056
989
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
1057
990
|
case "QQQ":
|
|
@@ -1079,7 +1012,7 @@ const X = {
|
|
|
1079
1012
|
case "q":
|
|
1080
1013
|
return String(r);
|
|
1081
1014
|
case "qq":
|
|
1082
|
-
return
|
|
1015
|
+
return O(r, 2);
|
|
1083
1016
|
case "qo":
|
|
1084
1017
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
1085
1018
|
case "qqq":
|
|
@@ -1106,7 +1039,7 @@ const X = {
|
|
|
1106
1039
|
switch (n) {
|
|
1107
1040
|
case "M":
|
|
1108
1041
|
case "MM":
|
|
1109
|
-
return
|
|
1042
|
+
return U.M(t, n);
|
|
1110
1043
|
case "Mo":
|
|
1111
1044
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1112
1045
|
case "MMM":
|
|
@@ -1131,7 +1064,7 @@ const X = {
|
|
|
1131
1064
|
case "L":
|
|
1132
1065
|
return String(r + 1);
|
|
1133
1066
|
case "LL":
|
|
1134
|
-
return
|
|
1067
|
+
return O(r + 1, 2);
|
|
1135
1068
|
case "Lo":
|
|
1136
1069
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1137
1070
|
case "LLL":
|
|
@@ -1151,22 +1084,22 @@ const X = {
|
|
|
1151
1084
|
},
|
|
1152
1085
|
// Local week of year
|
|
1153
1086
|
w: function(t, n, e, r) {
|
|
1154
|
-
const o =
|
|
1155
|
-
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) :
|
|
1087
|
+
const o = et(t, r);
|
|
1088
|
+
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) : O(o, n.length);
|
|
1156
1089
|
},
|
|
1157
1090
|
// ISO week of year
|
|
1158
1091
|
I: function(t, n, e) {
|
|
1159
|
-
const r =
|
|
1160
|
-
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) :
|
|
1092
|
+
const r = Ke(t);
|
|
1093
|
+
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) : O(r, n.length);
|
|
1161
1094
|
},
|
|
1162
1095
|
// Day of the month
|
|
1163
1096
|
d: function(t, n, e) {
|
|
1164
|
-
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1097
|
+
return n === "do" ? e.ordinalNumber(t.getDate(), { unit: "date" }) : U.d(t, n);
|
|
1165
1098
|
},
|
|
1166
1099
|
// Day of year
|
|
1167
1100
|
D: function(t, n, e) {
|
|
1168
|
-
const r =
|
|
1169
|
-
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
1101
|
+
const r = Rn(t);
|
|
1102
|
+
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) : O(r, n.length);
|
|
1170
1103
|
},
|
|
1171
1104
|
// Day of week
|
|
1172
1105
|
E: function(t, n, e) {
|
|
@@ -1204,7 +1137,7 @@ const X = {
|
|
|
1204
1137
|
case "e":
|
|
1205
1138
|
return String(a);
|
|
1206
1139
|
case "ee":
|
|
1207
|
-
return
|
|
1140
|
+
return O(a, 2);
|
|
1208
1141
|
case "eo":
|
|
1209
1142
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1210
1143
|
case "eee":
|
|
@@ -1237,7 +1170,7 @@ const X = {
|
|
|
1237
1170
|
case "c":
|
|
1238
1171
|
return String(a);
|
|
1239
1172
|
case "cc":
|
|
1240
|
-
return
|
|
1173
|
+
return O(a, n.length);
|
|
1241
1174
|
case "co":
|
|
1242
1175
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1243
1176
|
case "ccc":
|
|
@@ -1270,7 +1203,7 @@ const X = {
|
|
|
1270
1203
|
case "i":
|
|
1271
1204
|
return String(o);
|
|
1272
1205
|
case "ii":
|
|
1273
|
-
return
|
|
1206
|
+
return O(o, n.length);
|
|
1274
1207
|
case "io":
|
|
1275
1208
|
return e.ordinalNumber(o, { unit: "day" });
|
|
1276
1209
|
case "iii":
|
|
@@ -1384,33 +1317,33 @@ const X = {
|
|
|
1384
1317
|
let r = t.getHours() % 12;
|
|
1385
1318
|
return r === 0 && (r = 12), e.ordinalNumber(r, { unit: "hour" });
|
|
1386
1319
|
}
|
|
1387
|
-
return
|
|
1320
|
+
return U.h(t, n);
|
|
1388
1321
|
},
|
|
1389
1322
|
// Hour [0-23]
|
|
1390
1323
|
H: function(t, n, e) {
|
|
1391
|
-
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1324
|
+
return n === "Ho" ? e.ordinalNumber(t.getHours(), { unit: "hour" }) : U.H(t, n);
|
|
1392
1325
|
},
|
|
1393
1326
|
// Hour [0-11]
|
|
1394
1327
|
K: function(t, n, e) {
|
|
1395
1328
|
const r = t.getHours() % 12;
|
|
1396
|
-
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1329
|
+
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) : O(r, n.length);
|
|
1397
1330
|
},
|
|
1398
1331
|
// Hour [1-24]
|
|
1399
1332
|
k: function(t, n, e) {
|
|
1400
1333
|
let r = t.getHours();
|
|
1401
|
-
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1334
|
+
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) : O(r, n.length);
|
|
1402
1335
|
},
|
|
1403
1336
|
// Minute
|
|
1404
1337
|
m: function(t, n, e) {
|
|
1405
|
-
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1338
|
+
return n === "mo" ? e.ordinalNumber(t.getMinutes(), { unit: "minute" }) : U.m(t, n);
|
|
1406
1339
|
},
|
|
1407
1340
|
// Second
|
|
1408
1341
|
s: function(t, n, e) {
|
|
1409
|
-
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1342
|
+
return n === "so" ? e.ordinalNumber(t.getSeconds(), { unit: "second" }) : U.s(t, n);
|
|
1410
1343
|
},
|
|
1411
1344
|
// Fraction of second
|
|
1412
1345
|
S: function(t, n) {
|
|
1413
|
-
return
|
|
1346
|
+
return U.S(t, n);
|
|
1414
1347
|
},
|
|
1415
1348
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1416
1349
|
X: function(t, n, e) {
|
|
@@ -1419,14 +1352,14 @@ const X = {
|
|
|
1419
1352
|
return "Z";
|
|
1420
1353
|
switch (n) {
|
|
1421
1354
|
case "X":
|
|
1422
|
-
return
|
|
1355
|
+
return Le(r);
|
|
1423
1356
|
case "XXXX":
|
|
1424
1357
|
case "XX":
|
|
1425
|
-
return
|
|
1358
|
+
return J(r);
|
|
1426
1359
|
case "XXXXX":
|
|
1427
1360
|
case "XXX":
|
|
1428
1361
|
default:
|
|
1429
|
-
return
|
|
1362
|
+
return J(r, ":");
|
|
1430
1363
|
}
|
|
1431
1364
|
},
|
|
1432
1365
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1434,14 +1367,14 @@ const X = {
|
|
|
1434
1367
|
const r = t.getTimezoneOffset();
|
|
1435
1368
|
switch (n) {
|
|
1436
1369
|
case "x":
|
|
1437
|
-
return
|
|
1370
|
+
return Le(r);
|
|
1438
1371
|
case "xxxx":
|
|
1439
1372
|
case "xx":
|
|
1440
|
-
return
|
|
1373
|
+
return J(r);
|
|
1441
1374
|
case "xxxxx":
|
|
1442
1375
|
case "xxx":
|
|
1443
1376
|
default:
|
|
1444
|
-
return
|
|
1377
|
+
return J(r, ":");
|
|
1445
1378
|
}
|
|
1446
1379
|
},
|
|
1447
1380
|
// Timezone (GMT)
|
|
@@ -1451,10 +1384,10 @@ const X = {
|
|
|
1451
1384
|
case "O":
|
|
1452
1385
|
case "OO":
|
|
1453
1386
|
case "OOO":
|
|
1454
|
-
return "GMT" +
|
|
1387
|
+
return "GMT" + Ae(r, ":");
|
|
1455
1388
|
case "OOOO":
|
|
1456
1389
|
default:
|
|
1457
|
-
return "GMT" +
|
|
1390
|
+
return "GMT" + J(r, ":");
|
|
1458
1391
|
}
|
|
1459
1392
|
},
|
|
1460
1393
|
// Timezone (specific non-location)
|
|
@@ -1464,35 +1397,35 @@ const X = {
|
|
|
1464
1397
|
case "z":
|
|
1465
1398
|
case "zz":
|
|
1466
1399
|
case "zzz":
|
|
1467
|
-
return "GMT" +
|
|
1400
|
+
return "GMT" + Ae(r, ":");
|
|
1468
1401
|
case "zzzz":
|
|
1469
1402
|
default:
|
|
1470
|
-
return "GMT" +
|
|
1403
|
+
return "GMT" + J(r, ":");
|
|
1471
1404
|
}
|
|
1472
1405
|
},
|
|
1473
1406
|
// Seconds timestamp
|
|
1474
1407
|
t: function(t, n, e) {
|
|
1475
1408
|
const r = Math.trunc(t.getTime() / 1e3);
|
|
1476
|
-
return
|
|
1409
|
+
return O(r, n.length);
|
|
1477
1410
|
},
|
|
1478
1411
|
// Milliseconds timestamp
|
|
1479
1412
|
T: function(t, n, e) {
|
|
1480
1413
|
const r = t.getTime();
|
|
1481
|
-
return
|
|
1414
|
+
return O(r, n.length);
|
|
1482
1415
|
}
|
|
1483
1416
|
};
|
|
1484
|
-
function
|
|
1417
|
+
function Ae(t, n = "") {
|
|
1485
1418
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
1486
|
-
return a === 0 ? e + String(o) : e + String(o) + n +
|
|
1419
|
+
return a === 0 ? e + String(o) : e + String(o) + n + O(a, 2);
|
|
1487
1420
|
}
|
|
1488
|
-
function
|
|
1489
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") +
|
|
1421
|
+
function Le(t, n) {
|
|
1422
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + O(Math.abs(t) / 60, 2) : J(t, n);
|
|
1490
1423
|
}
|
|
1491
|
-
function
|
|
1492
|
-
const e = t > 0 ? "-" : "+", r = Math.abs(t), o =
|
|
1424
|
+
function J(t, n = "") {
|
|
1425
|
+
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = O(Math.trunc(r / 60), 2), a = O(r % 60, 2);
|
|
1493
1426
|
return e + o + n + a;
|
|
1494
1427
|
}
|
|
1495
|
-
const
|
|
1428
|
+
const Ie = (t, n) => {
|
|
1496
1429
|
switch (t) {
|
|
1497
1430
|
case "P":
|
|
1498
1431
|
return n.date({ width: "short" });
|
|
@@ -1504,7 +1437,7 @@ const We = (t, n) => {
|
|
|
1504
1437
|
default:
|
|
1505
1438
|
return n.date({ width: "full" });
|
|
1506
1439
|
}
|
|
1507
|
-
},
|
|
1440
|
+
}, tt = (t, n) => {
|
|
1508
1441
|
switch (t) {
|
|
1509
1442
|
case "p":
|
|
1510
1443
|
return n.time({ width: "short" });
|
|
@@ -1516,10 +1449,10 @@ const We = (t, n) => {
|
|
|
1516
1449
|
default:
|
|
1517
1450
|
return n.time({ width: "full" });
|
|
1518
1451
|
}
|
|
1519
|
-
},
|
|
1452
|
+
}, Gn = (t, n) => {
|
|
1520
1453
|
const e = t.match(/(P+)(p+)?/) || [], r = e[1], o = e[2];
|
|
1521
1454
|
if (!o)
|
|
1522
|
-
return
|
|
1455
|
+
return Ie(t, n);
|
|
1523
1456
|
let a;
|
|
1524
1457
|
switch (r) {
|
|
1525
1458
|
case "P":
|
|
@@ -1536,79 +1469,79 @@ const We = (t, n) => {
|
|
|
1536
1469
|
a = n.dateTime({ width: "full" });
|
|
1537
1470
|
break;
|
|
1538
1471
|
}
|
|
1539
|
-
return a.replace("{{date}}",
|
|
1540
|
-
},
|
|
1541
|
-
p:
|
|
1542
|
-
P:
|
|
1543
|
-
},
|
|
1544
|
-
function
|
|
1545
|
-
return
|
|
1472
|
+
return a.replace("{{date}}", Ie(r, n)).replace("{{time}}", tt(o, n));
|
|
1473
|
+
}, ke = {
|
|
1474
|
+
p: tt,
|
|
1475
|
+
P: Gn
|
|
1476
|
+
}, Qn = /^D+$/, Xn = /^Y+$/, Un = ["D", "DD", "YY", "YYYY"];
|
|
1477
|
+
function nt(t) {
|
|
1478
|
+
return Qn.test(t);
|
|
1546
1479
|
}
|
|
1547
|
-
function
|
|
1548
|
-
return
|
|
1480
|
+
function rt(t) {
|
|
1481
|
+
return Xn.test(t);
|
|
1549
1482
|
}
|
|
1550
1483
|
function Te(t, n, e) {
|
|
1551
|
-
const r =
|
|
1552
|
-
if (console.warn(r),
|
|
1484
|
+
const r = zn(t, n, e);
|
|
1485
|
+
if (console.warn(r), Un.includes(t)) throw new RangeError(r);
|
|
1553
1486
|
}
|
|
1554
|
-
function
|
|
1487
|
+
function zn(t, n, e) {
|
|
1555
1488
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1556
1489
|
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`;
|
|
1557
1490
|
}
|
|
1558
|
-
const
|
|
1559
|
-
function
|
|
1560
|
-
var d, u, l,
|
|
1561
|
-
const r =
|
|
1562
|
-
if (!
|
|
1491
|
+
const Jn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Zn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Kn = /^'([^]*?)'?$/, er = /''/g, tr = /[a-zA-Z]/;
|
|
1492
|
+
function _e(t, n, e) {
|
|
1493
|
+
var d, u, l, m;
|
|
1494
|
+
const r = oe(), o = r.locale ?? Ze, a = r.firstWeekContainsDate ?? ((u = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, s = r.weekStartsOn ?? ((m = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : m.weekStartsOn) ?? 0, i = L(t);
|
|
1495
|
+
if (!Je(i))
|
|
1563
1496
|
throw new RangeError("Invalid time value");
|
|
1564
|
-
let
|
|
1497
|
+
let f = n.match(Zn).map((y) => {
|
|
1565
1498
|
const M = y[0];
|
|
1566
1499
|
if (M === "p" || M === "P") {
|
|
1567
|
-
const
|
|
1568
|
-
return
|
|
1500
|
+
const E = ke[M];
|
|
1501
|
+
return E(y, o.formatLong);
|
|
1569
1502
|
}
|
|
1570
1503
|
return y;
|
|
1571
|
-
}).join("").match(
|
|
1504
|
+
}).join("").match(Jn).map((y) => {
|
|
1572
1505
|
if (y === "''")
|
|
1573
1506
|
return { isToken: !1, value: "'" };
|
|
1574
1507
|
const M = y[0];
|
|
1575
1508
|
if (M === "'")
|
|
1576
|
-
return { isToken: !1, value:
|
|
1577
|
-
if (
|
|
1509
|
+
return { isToken: !1, value: nr(y) };
|
|
1510
|
+
if (qe[M])
|
|
1578
1511
|
return { isToken: !0, value: y };
|
|
1579
|
-
if (M.match(
|
|
1512
|
+
if (M.match(tr))
|
|
1580
1513
|
throw new RangeError(
|
|
1581
1514
|
"Format string contains an unescaped latin alphabet character `" + M + "`"
|
|
1582
1515
|
);
|
|
1583
1516
|
return { isToken: !1, value: y };
|
|
1584
1517
|
});
|
|
1585
|
-
o.localize.preprocessor && (
|
|
1518
|
+
o.localize.preprocessor && (f = o.localize.preprocessor(i, f));
|
|
1586
1519
|
const c = {
|
|
1587
1520
|
firstWeekContainsDate: a,
|
|
1588
|
-
weekStartsOn:
|
|
1521
|
+
weekStartsOn: s,
|
|
1589
1522
|
locale: o
|
|
1590
1523
|
};
|
|
1591
|
-
return
|
|
1524
|
+
return f.map((y) => {
|
|
1592
1525
|
if (!y.isToken) return y.value;
|
|
1593
1526
|
const M = y.value;
|
|
1594
|
-
(
|
|
1595
|
-
const
|
|
1596
|
-
return
|
|
1527
|
+
(rt(M) || nt(M)) && Te(M, n, String(t));
|
|
1528
|
+
const E = qe[M[0]];
|
|
1529
|
+
return E(i, M, o.localize, c);
|
|
1597
1530
|
}).join("");
|
|
1598
1531
|
}
|
|
1599
|
-
function
|
|
1600
|
-
const n = t.match(
|
|
1601
|
-
return n ? n[1].replace(
|
|
1532
|
+
function nr(t) {
|
|
1533
|
+
const n = t.match(Kn);
|
|
1534
|
+
return n ? n[1].replace(er, "'") : t;
|
|
1602
1535
|
}
|
|
1603
|
-
function
|
|
1604
|
-
return Object.assign({},
|
|
1536
|
+
function rr() {
|
|
1537
|
+
return Object.assign({}, oe());
|
|
1605
1538
|
}
|
|
1606
|
-
function
|
|
1607
|
-
let e =
|
|
1539
|
+
function or(t) {
|
|
1540
|
+
let e = L(t).getDay();
|
|
1608
1541
|
return e === 0 && (e = 7), e;
|
|
1609
1542
|
}
|
|
1610
|
-
function
|
|
1611
|
-
const e = n instanceof Date ?
|
|
1543
|
+
function ar(t, n) {
|
|
1544
|
+
const e = n instanceof Date ? Y(n, 0) : new n(0);
|
|
1612
1545
|
return e.setFullYear(
|
|
1613
1546
|
t.getFullYear(),
|
|
1614
1547
|
t.getMonth(),
|
|
@@ -1620,16 +1553,16 @@ function sr(t, n) {
|
|
|
1620
1553
|
t.getMilliseconds()
|
|
1621
1554
|
), e;
|
|
1622
1555
|
}
|
|
1623
|
-
const
|
|
1624
|
-
class
|
|
1556
|
+
const ir = 10;
|
|
1557
|
+
class ot {
|
|
1625
1558
|
constructor() {
|
|
1626
|
-
|
|
1559
|
+
p(this, "subPriority", 0);
|
|
1627
1560
|
}
|
|
1628
1561
|
validate(n, e) {
|
|
1629
1562
|
return !0;
|
|
1630
1563
|
}
|
|
1631
1564
|
}
|
|
1632
|
-
class
|
|
1565
|
+
class sr extends ot {
|
|
1633
1566
|
constructor(n, e, r, o, a) {
|
|
1634
1567
|
super(), this.value = n, this.validateValue = e, this.setValue = r, this.priority = o, a && (this.subPriority = a);
|
|
1635
1568
|
}
|
|
@@ -1640,21 +1573,21 @@ class lr extends tt {
|
|
|
1640
1573
|
return this.setValue(n, e, this.value, r);
|
|
1641
1574
|
}
|
|
1642
1575
|
}
|
|
1643
|
-
class
|
|
1576
|
+
class ur extends ot {
|
|
1644
1577
|
constructor() {
|
|
1645
1578
|
super(...arguments);
|
|
1646
|
-
|
|
1647
|
-
|
|
1579
|
+
p(this, "priority", ir);
|
|
1580
|
+
p(this, "subPriority", -1);
|
|
1648
1581
|
}
|
|
1649
1582
|
set(e, r) {
|
|
1650
|
-
return r.timestampIsSet ? e :
|
|
1583
|
+
return r.timestampIsSet ? e : Y(e, ar(e, Date));
|
|
1651
1584
|
}
|
|
1652
1585
|
}
|
|
1653
1586
|
class P {
|
|
1654
1587
|
run(n, e, r, o) {
|
|
1655
1588
|
const a = this.parse(n, e, r, o);
|
|
1656
1589
|
return a ? {
|
|
1657
|
-
setter: new
|
|
1590
|
+
setter: new sr(
|
|
1658
1591
|
a.value,
|
|
1659
1592
|
this.validate,
|
|
1660
1593
|
this.set,
|
|
@@ -1668,11 +1601,11 @@ class P {
|
|
|
1668
1601
|
return !0;
|
|
1669
1602
|
}
|
|
1670
1603
|
}
|
|
1671
|
-
class
|
|
1604
|
+
class lr extends P {
|
|
1672
1605
|
constructor() {
|
|
1673
1606
|
super(...arguments);
|
|
1674
|
-
|
|
1675
|
-
|
|
1607
|
+
p(this, "priority", 140);
|
|
1608
|
+
p(this, "incompatibleTokens", ["R", "u", "t", "T"]);
|
|
1676
1609
|
}
|
|
1677
1610
|
parse(e, r, o) {
|
|
1678
1611
|
switch (r) {
|
|
@@ -1691,7 +1624,7 @@ class dr extends P {
|
|
|
1691
1624
|
return r.era = o, e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1692
1625
|
}
|
|
1693
1626
|
}
|
|
1694
|
-
const
|
|
1627
|
+
const q = {
|
|
1695
1628
|
month: /^(1[0-2]|0?\d)/,
|
|
1696
1629
|
// 0 to 12
|
|
1697
1630
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -1729,27 +1662,27 @@ const W = {
|
|
|
1729
1662
|
// 0 to 999, -0 to -999
|
|
1730
1663
|
fourDigitsSigned: /^-?\d{1,4}/
|
|
1731
1664
|
// 0 to 9999, -0 to -9999
|
|
1732
|
-
},
|
|
1665
|
+
}, Q = {
|
|
1733
1666
|
basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
|
|
1734
1667
|
basic: /^([+-])(\d{2})(\d{2})|Z/,
|
|
1735
1668
|
basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
|
|
1736
1669
|
extended: /^([+-])(\d{2}):(\d{2})|Z/,
|
|
1737
1670
|
extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
|
|
1738
1671
|
};
|
|
1739
|
-
function
|
|
1672
|
+
function A(t, n) {
|
|
1740
1673
|
return t && {
|
|
1741
1674
|
value: n(t.value),
|
|
1742
1675
|
rest: t.rest
|
|
1743
1676
|
};
|
|
1744
1677
|
}
|
|
1745
|
-
function
|
|
1678
|
+
function F(t, n) {
|
|
1746
1679
|
const e = n.match(t);
|
|
1747
1680
|
return e ? {
|
|
1748
1681
|
value: parseInt(e[0], 10),
|
|
1749
1682
|
rest: n.slice(e[0].length)
|
|
1750
1683
|
} : null;
|
|
1751
1684
|
}
|
|
1752
|
-
function
|
|
1685
|
+
function X(t, n) {
|
|
1753
1686
|
const e = n.match(t);
|
|
1754
1687
|
if (!e)
|
|
1755
1688
|
return null;
|
|
@@ -1758,44 +1691,44 @@ function U(t, n) {
|
|
|
1758
1691
|
value: 0,
|
|
1759
1692
|
rest: n.slice(1)
|
|
1760
1693
|
};
|
|
1761
|
-
const r = e[1] === "+" ? 1 : -1, o = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0,
|
|
1694
|
+
const r = e[1] === "+" ? 1 : -1, o = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0, s = e[5] ? parseInt(e[5], 10) : 0;
|
|
1762
1695
|
return {
|
|
1763
|
-
value: r * (o *
|
|
1696
|
+
value: r * (o * on + a * rn + s * an),
|
|
1764
1697
|
rest: n.slice(e[0].length)
|
|
1765
1698
|
};
|
|
1766
1699
|
}
|
|
1767
|
-
function
|
|
1768
|
-
return
|
|
1700
|
+
function at(t) {
|
|
1701
|
+
return F(q.anyDigitsSigned, t);
|
|
1769
1702
|
}
|
|
1770
|
-
function
|
|
1703
|
+
function W(t, n) {
|
|
1771
1704
|
switch (t) {
|
|
1772
1705
|
case 1:
|
|
1773
|
-
return
|
|
1706
|
+
return F(q.singleDigit, n);
|
|
1774
1707
|
case 2:
|
|
1775
|
-
return
|
|
1708
|
+
return F(q.twoDigits, n);
|
|
1776
1709
|
case 3:
|
|
1777
|
-
return
|
|
1710
|
+
return F(q.threeDigits, n);
|
|
1778
1711
|
case 4:
|
|
1779
|
-
return
|
|
1712
|
+
return F(q.fourDigits, n);
|
|
1780
1713
|
default:
|
|
1781
|
-
return
|
|
1714
|
+
return F(new RegExp("^\\d{1," + t + "}"), n);
|
|
1782
1715
|
}
|
|
1783
1716
|
}
|
|
1784
|
-
function
|
|
1717
|
+
function ye(t, n) {
|
|
1785
1718
|
switch (t) {
|
|
1786
1719
|
case 1:
|
|
1787
|
-
return
|
|
1720
|
+
return F(q.singleDigitSigned, n);
|
|
1788
1721
|
case 2:
|
|
1789
|
-
return
|
|
1722
|
+
return F(q.twoDigitsSigned, n);
|
|
1790
1723
|
case 3:
|
|
1791
|
-
return
|
|
1724
|
+
return F(q.threeDigitsSigned, n);
|
|
1792
1725
|
case 4:
|
|
1793
|
-
return
|
|
1726
|
+
return F(q.fourDigitsSigned, n);
|
|
1794
1727
|
default:
|
|
1795
|
-
return
|
|
1728
|
+
return F(new RegExp("^-?\\d{1," + t + "}"), n);
|
|
1796
1729
|
}
|
|
1797
1730
|
}
|
|
1798
|
-
function
|
|
1731
|
+
function Be(t) {
|
|
1799
1732
|
switch (t) {
|
|
1800
1733
|
case "morning":
|
|
1801
1734
|
return 4;
|
|
@@ -1812,43 +1745,43 @@ function Oe(t) {
|
|
|
1812
1745
|
return 0;
|
|
1813
1746
|
}
|
|
1814
1747
|
}
|
|
1815
|
-
function
|
|
1748
|
+
function it(t, n) {
|
|
1816
1749
|
const e = n > 0, r = e ? n : 1 - n;
|
|
1817
1750
|
let o;
|
|
1818
1751
|
if (r <= 50)
|
|
1819
1752
|
o = t || 100;
|
|
1820
1753
|
else {
|
|
1821
|
-
const a = r + 50,
|
|
1822
|
-
o = t +
|
|
1754
|
+
const a = r + 50, s = Math.trunc(a / 100) * 100, i = t >= a % 100;
|
|
1755
|
+
o = t + s - (i ? 100 : 0);
|
|
1823
1756
|
}
|
|
1824
1757
|
return e ? o : 1 - o;
|
|
1825
1758
|
}
|
|
1826
|
-
function
|
|
1759
|
+
function st(t) {
|
|
1827
1760
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1828
1761
|
}
|
|
1829
|
-
class
|
|
1762
|
+
class cr extends P {
|
|
1830
1763
|
constructor() {
|
|
1831
1764
|
super(...arguments);
|
|
1832
|
-
|
|
1833
|
-
|
|
1765
|
+
p(this, "priority", 130);
|
|
1766
|
+
p(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1834
1767
|
}
|
|
1835
1768
|
parse(e, r, o) {
|
|
1836
|
-
const a = (
|
|
1837
|
-
year:
|
|
1769
|
+
const a = (s) => ({
|
|
1770
|
+
year: s,
|
|
1838
1771
|
isTwoDigitYear: r === "yy"
|
|
1839
1772
|
});
|
|
1840
1773
|
switch (r) {
|
|
1841
1774
|
case "y":
|
|
1842
|
-
return
|
|
1775
|
+
return A(W(4, e), a);
|
|
1843
1776
|
case "yo":
|
|
1844
|
-
return
|
|
1777
|
+
return A(
|
|
1845
1778
|
o.ordinalNumber(e, {
|
|
1846
1779
|
unit: "year"
|
|
1847
1780
|
}),
|
|
1848
1781
|
a
|
|
1849
1782
|
);
|
|
1850
1783
|
default:
|
|
1851
|
-
return
|
|
1784
|
+
return A(W(r.length, e), a);
|
|
1852
1785
|
}
|
|
1853
1786
|
}
|
|
1854
1787
|
validate(e, r) {
|
|
@@ -1857,21 +1790,21 @@ class fr extends P {
|
|
|
1857
1790
|
set(e, r, o) {
|
|
1858
1791
|
const a = e.getFullYear();
|
|
1859
1792
|
if (o.isTwoDigitYear) {
|
|
1860
|
-
const
|
|
1793
|
+
const i = it(
|
|
1861
1794
|
o.year,
|
|
1862
1795
|
a
|
|
1863
1796
|
);
|
|
1864
|
-
return e.setFullYear(
|
|
1797
|
+
return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1865
1798
|
}
|
|
1866
|
-
const
|
|
1867
|
-
return e.setFullYear(
|
|
1799
|
+
const s = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1800
|
+
return e.setFullYear(s, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1868
1801
|
}
|
|
1869
1802
|
}
|
|
1870
|
-
class
|
|
1803
|
+
class dr extends P {
|
|
1871
1804
|
constructor() {
|
|
1872
1805
|
super(...arguments);
|
|
1873
|
-
|
|
1874
|
-
|
|
1806
|
+
p(this, "priority", 130);
|
|
1807
|
+
p(this, "incompatibleTokens", [
|
|
1875
1808
|
"y",
|
|
1876
1809
|
"R",
|
|
1877
1810
|
"u",
|
|
@@ -1888,49 +1821,49 @@ class pr extends P {
|
|
|
1888
1821
|
]);
|
|
1889
1822
|
}
|
|
1890
1823
|
parse(e, r, o) {
|
|
1891
|
-
const a = (
|
|
1892
|
-
year:
|
|
1824
|
+
const a = (s) => ({
|
|
1825
|
+
year: s,
|
|
1893
1826
|
isTwoDigitYear: r === "YY"
|
|
1894
1827
|
});
|
|
1895
1828
|
switch (r) {
|
|
1896
1829
|
case "Y":
|
|
1897
|
-
return
|
|
1830
|
+
return A(W(4, e), a);
|
|
1898
1831
|
case "Yo":
|
|
1899
|
-
return
|
|
1832
|
+
return A(
|
|
1900
1833
|
o.ordinalNumber(e, {
|
|
1901
1834
|
unit: "year"
|
|
1902
1835
|
}),
|
|
1903
1836
|
a
|
|
1904
1837
|
);
|
|
1905
1838
|
default:
|
|
1906
|
-
return
|
|
1839
|
+
return A(W(r.length, e), a);
|
|
1907
1840
|
}
|
|
1908
1841
|
}
|
|
1909
1842
|
validate(e, r) {
|
|
1910
1843
|
return r.isTwoDigitYear || r.year > 0;
|
|
1911
1844
|
}
|
|
1912
1845
|
set(e, r, o, a) {
|
|
1913
|
-
const
|
|
1846
|
+
const s = He(e, a);
|
|
1914
1847
|
if (o.isTwoDigitYear) {
|
|
1915
|
-
const
|
|
1848
|
+
const f = it(
|
|
1916
1849
|
o.year,
|
|
1917
|
-
|
|
1850
|
+
s
|
|
1918
1851
|
);
|
|
1919
1852
|
return e.setFullYear(
|
|
1920
|
-
|
|
1853
|
+
f,
|
|
1921
1854
|
0,
|
|
1922
1855
|
a.firstWeekContainsDate
|
|
1923
1856
|
), e.setHours(0, 0, 0, 0), z(e, a);
|
|
1924
1857
|
}
|
|
1925
|
-
const
|
|
1926
|
-
return e.setFullYear(
|
|
1858
|
+
const i = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1859
|
+
return e.setFullYear(i, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), z(e, a);
|
|
1927
1860
|
}
|
|
1928
1861
|
}
|
|
1929
|
-
class
|
|
1862
|
+
class fr extends P {
|
|
1930
1863
|
constructor() {
|
|
1931
1864
|
super(...arguments);
|
|
1932
|
-
|
|
1933
|
-
|
|
1865
|
+
p(this, "priority", 130);
|
|
1866
|
+
p(this, "incompatibleTokens", [
|
|
1934
1867
|
"G",
|
|
1935
1868
|
"y",
|
|
1936
1869
|
"Y",
|
|
@@ -1949,31 +1882,31 @@ class mr extends P {
|
|
|
1949
1882
|
]);
|
|
1950
1883
|
}
|
|
1951
1884
|
parse(e, r) {
|
|
1952
|
-
return
|
|
1885
|
+
return ye(r === "R" ? 4 : r.length, e);
|
|
1953
1886
|
}
|
|
1954
1887
|
set(e, r, o) {
|
|
1955
|
-
const a =
|
|
1956
|
-
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0),
|
|
1888
|
+
const a = Y(e, 0);
|
|
1889
|
+
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0), ne(a);
|
|
1957
1890
|
}
|
|
1958
1891
|
}
|
|
1959
|
-
class
|
|
1892
|
+
class pr extends P {
|
|
1960
1893
|
constructor() {
|
|
1961
1894
|
super(...arguments);
|
|
1962
|
-
|
|
1963
|
-
|
|
1895
|
+
p(this, "priority", 130);
|
|
1896
|
+
p(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1964
1897
|
}
|
|
1965
1898
|
parse(e, r) {
|
|
1966
|
-
return
|
|
1899
|
+
return ye(r === "u" ? 4 : r.length, e);
|
|
1967
1900
|
}
|
|
1968
1901
|
set(e, r, o) {
|
|
1969
1902
|
return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1970
1903
|
}
|
|
1971
1904
|
}
|
|
1972
|
-
class
|
|
1905
|
+
class mr extends P {
|
|
1973
1906
|
constructor() {
|
|
1974
1907
|
super(...arguments);
|
|
1975
|
-
|
|
1976
|
-
|
|
1908
|
+
p(this, "priority", 120);
|
|
1909
|
+
p(this, "incompatibleTokens", [
|
|
1977
1910
|
"Y",
|
|
1978
1911
|
"R",
|
|
1979
1912
|
"q",
|
|
@@ -1994,7 +1927,7 @@ class yr extends P {
|
|
|
1994
1927
|
switch (r) {
|
|
1995
1928
|
case "Q":
|
|
1996
1929
|
case "QQ":
|
|
1997
|
-
return
|
|
1930
|
+
return W(r.length, e);
|
|
1998
1931
|
case "Qo":
|
|
1999
1932
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
2000
1933
|
case "QQQ":
|
|
@@ -2031,11 +1964,11 @@ class yr extends P {
|
|
|
2031
1964
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2032
1965
|
}
|
|
2033
1966
|
}
|
|
2034
|
-
class
|
|
1967
|
+
class hr extends P {
|
|
2035
1968
|
constructor() {
|
|
2036
1969
|
super(...arguments);
|
|
2037
|
-
|
|
2038
|
-
|
|
1970
|
+
p(this, "priority", 120);
|
|
1971
|
+
p(this, "incompatibleTokens", [
|
|
2039
1972
|
"Y",
|
|
2040
1973
|
"R",
|
|
2041
1974
|
"Q",
|
|
@@ -2056,7 +1989,7 @@ class gr extends P {
|
|
|
2056
1989
|
switch (r) {
|
|
2057
1990
|
case "q":
|
|
2058
1991
|
case "qq":
|
|
2059
|
-
return
|
|
1992
|
+
return W(r.length, e);
|
|
2060
1993
|
case "qo":
|
|
2061
1994
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
2062
1995
|
case "qqq":
|
|
@@ -2093,10 +2026,10 @@ class gr extends P {
|
|
|
2093
2026
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2094
2027
|
}
|
|
2095
2028
|
}
|
|
2096
|
-
class
|
|
2029
|
+
class yr extends P {
|
|
2097
2030
|
constructor() {
|
|
2098
2031
|
super(...arguments);
|
|
2099
|
-
|
|
2032
|
+
p(this, "incompatibleTokens", [
|
|
2100
2033
|
"Y",
|
|
2101
2034
|
"R",
|
|
2102
2035
|
"q",
|
|
@@ -2111,20 +2044,20 @@ class br extends P {
|
|
|
2111
2044
|
"t",
|
|
2112
2045
|
"T"
|
|
2113
2046
|
]);
|
|
2114
|
-
|
|
2047
|
+
p(this, "priority", 110);
|
|
2115
2048
|
}
|
|
2116
2049
|
parse(e, r, o) {
|
|
2117
|
-
const a = (
|
|
2050
|
+
const a = (s) => s - 1;
|
|
2118
2051
|
switch (r) {
|
|
2119
2052
|
case "M":
|
|
2120
|
-
return
|
|
2121
|
-
|
|
2053
|
+
return A(
|
|
2054
|
+
F(q.month, e),
|
|
2122
2055
|
a
|
|
2123
2056
|
);
|
|
2124
2057
|
case "MM":
|
|
2125
|
-
return
|
|
2058
|
+
return A(W(2, e), a);
|
|
2126
2059
|
case "Mo":
|
|
2127
|
-
return
|
|
2060
|
+
return A(
|
|
2128
2061
|
o.ordinalNumber(e, {
|
|
2129
2062
|
unit: "month"
|
|
2130
2063
|
}),
|
|
@@ -2155,11 +2088,11 @@ class br extends P {
|
|
|
2155
2088
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2156
2089
|
}
|
|
2157
2090
|
}
|
|
2158
|
-
class
|
|
2091
|
+
class gr extends P {
|
|
2159
2092
|
constructor() {
|
|
2160
2093
|
super(...arguments);
|
|
2161
|
-
|
|
2162
|
-
|
|
2094
|
+
p(this, "priority", 110);
|
|
2095
|
+
p(this, "incompatibleTokens", [
|
|
2163
2096
|
"Y",
|
|
2164
2097
|
"R",
|
|
2165
2098
|
"q",
|
|
@@ -2176,17 +2109,17 @@ class wr extends P {
|
|
|
2176
2109
|
]);
|
|
2177
2110
|
}
|
|
2178
2111
|
parse(e, r, o) {
|
|
2179
|
-
const a = (
|
|
2112
|
+
const a = (s) => s - 1;
|
|
2180
2113
|
switch (r) {
|
|
2181
2114
|
case "L":
|
|
2182
|
-
return
|
|
2183
|
-
|
|
2115
|
+
return A(
|
|
2116
|
+
F(q.month, e),
|
|
2184
2117
|
a
|
|
2185
2118
|
);
|
|
2186
2119
|
case "LL":
|
|
2187
|
-
return
|
|
2120
|
+
return A(W(2, e), a);
|
|
2188
2121
|
case "Lo":
|
|
2189
|
-
return
|
|
2122
|
+
return A(
|
|
2190
2123
|
o.ordinalNumber(e, {
|
|
2191
2124
|
unit: "month"
|
|
2192
2125
|
}),
|
|
@@ -2217,15 +2150,15 @@ class wr extends P {
|
|
|
2217
2150
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2218
2151
|
}
|
|
2219
2152
|
}
|
|
2220
|
-
function
|
|
2221
|
-
const r =
|
|
2153
|
+
function br(t, n, e) {
|
|
2154
|
+
const r = L(t), o = et(r, e) - n;
|
|
2222
2155
|
return r.setDate(r.getDate() - o * 7), r;
|
|
2223
2156
|
}
|
|
2224
|
-
class
|
|
2157
|
+
class wr extends P {
|
|
2225
2158
|
constructor() {
|
|
2226
2159
|
super(...arguments);
|
|
2227
|
-
|
|
2228
|
-
|
|
2160
|
+
p(this, "priority", 100);
|
|
2161
|
+
p(this, "incompatibleTokens", [
|
|
2229
2162
|
"y",
|
|
2230
2163
|
"R",
|
|
2231
2164
|
"u",
|
|
@@ -2244,29 +2177,29 @@ class xr extends P {
|
|
|
2244
2177
|
parse(e, r, o) {
|
|
2245
2178
|
switch (r) {
|
|
2246
2179
|
case "w":
|
|
2247
|
-
return
|
|
2180
|
+
return F(q.week, e);
|
|
2248
2181
|
case "wo":
|
|
2249
2182
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2250
2183
|
default:
|
|
2251
|
-
return
|
|
2184
|
+
return W(r.length, e);
|
|
2252
2185
|
}
|
|
2253
2186
|
}
|
|
2254
2187
|
validate(e, r) {
|
|
2255
2188
|
return r >= 1 && r <= 53;
|
|
2256
2189
|
}
|
|
2257
2190
|
set(e, r, o, a) {
|
|
2258
|
-
return z(
|
|
2191
|
+
return z(br(e, o, a), a);
|
|
2259
2192
|
}
|
|
2260
2193
|
}
|
|
2261
|
-
function
|
|
2262
|
-
const e =
|
|
2194
|
+
function vr(t, n) {
|
|
2195
|
+
const e = L(t), r = Ke(e) - n;
|
|
2263
2196
|
return e.setDate(e.getDate() - r * 7), e;
|
|
2264
2197
|
}
|
|
2265
|
-
class
|
|
2198
|
+
class xr extends P {
|
|
2266
2199
|
constructor() {
|
|
2267
2200
|
super(...arguments);
|
|
2268
|
-
|
|
2269
|
-
|
|
2201
|
+
p(this, "priority", 100);
|
|
2202
|
+
p(this, "incompatibleTokens", [
|
|
2270
2203
|
"y",
|
|
2271
2204
|
"Y",
|
|
2272
2205
|
"u",
|
|
@@ -2286,21 +2219,21 @@ class Mr extends P {
|
|
|
2286
2219
|
parse(e, r, o) {
|
|
2287
2220
|
switch (r) {
|
|
2288
2221
|
case "I":
|
|
2289
|
-
return
|
|
2222
|
+
return F(q.week, e);
|
|
2290
2223
|
case "Io":
|
|
2291
2224
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2292
2225
|
default:
|
|
2293
|
-
return
|
|
2226
|
+
return W(r.length, e);
|
|
2294
2227
|
}
|
|
2295
2228
|
}
|
|
2296
2229
|
validate(e, r) {
|
|
2297
2230
|
return r >= 1 && r <= 53;
|
|
2298
2231
|
}
|
|
2299
2232
|
set(e, r, o) {
|
|
2300
|
-
return
|
|
2233
|
+
return ne(vr(e, o));
|
|
2301
2234
|
}
|
|
2302
2235
|
}
|
|
2303
|
-
const
|
|
2236
|
+
const Mr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], kr = [
|
|
2304
2237
|
31,
|
|
2305
2238
|
29,
|
|
2306
2239
|
31,
|
|
@@ -2314,12 +2247,12 @@ const Cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], kr = [
|
|
|
2314
2247
|
30,
|
|
2315
2248
|
31
|
|
2316
2249
|
];
|
|
2317
|
-
class
|
|
2250
|
+
class Tr extends P {
|
|
2318
2251
|
constructor() {
|
|
2319
2252
|
super(...arguments);
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2253
|
+
p(this, "priority", 90);
|
|
2254
|
+
p(this, "subPriority", 1);
|
|
2255
|
+
p(this, "incompatibleTokens", [
|
|
2323
2256
|
"Y",
|
|
2324
2257
|
"R",
|
|
2325
2258
|
"q",
|
|
@@ -2337,27 +2270,27 @@ class Pr extends P {
|
|
|
2337
2270
|
parse(e, r, o) {
|
|
2338
2271
|
switch (r) {
|
|
2339
2272
|
case "d":
|
|
2340
|
-
return
|
|
2273
|
+
return F(q.date, e);
|
|
2341
2274
|
case "do":
|
|
2342
2275
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2343
2276
|
default:
|
|
2344
|
-
return
|
|
2277
|
+
return W(r.length, e);
|
|
2345
2278
|
}
|
|
2346
2279
|
}
|
|
2347
2280
|
validate(e, r) {
|
|
2348
|
-
const o = e.getFullYear(), a =
|
|
2349
|
-
return a ? r >= 1 && r <= kr[
|
|
2281
|
+
const o = e.getFullYear(), a = st(o), s = e.getMonth();
|
|
2282
|
+
return a ? r >= 1 && r <= kr[s] : r >= 1 && r <= Mr[s];
|
|
2350
2283
|
}
|
|
2351
2284
|
set(e, r, o) {
|
|
2352
2285
|
return e.setDate(o), e.setHours(0, 0, 0, 0), e;
|
|
2353
2286
|
}
|
|
2354
2287
|
}
|
|
2355
|
-
class
|
|
2288
|
+
class Cr extends P {
|
|
2356
2289
|
constructor() {
|
|
2357
2290
|
super(...arguments);
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2291
|
+
p(this, "priority", 90);
|
|
2292
|
+
p(this, "subpriority", 1);
|
|
2293
|
+
p(this, "incompatibleTokens", [
|
|
2361
2294
|
"Y",
|
|
2362
2295
|
"R",
|
|
2363
2296
|
"q",
|
|
@@ -2379,31 +2312,31 @@ class Dr extends P {
|
|
|
2379
2312
|
switch (r) {
|
|
2380
2313
|
case "D":
|
|
2381
2314
|
case "DD":
|
|
2382
|
-
return
|
|
2315
|
+
return F(q.dayOfYear, e);
|
|
2383
2316
|
case "Do":
|
|
2384
2317
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2385
2318
|
default:
|
|
2386
|
-
return
|
|
2319
|
+
return W(r.length, e);
|
|
2387
2320
|
}
|
|
2388
2321
|
}
|
|
2389
2322
|
validate(e, r) {
|
|
2390
2323
|
const o = e.getFullYear();
|
|
2391
|
-
return
|
|
2324
|
+
return st(o) ? r >= 1 && r <= 366 : r >= 1 && r <= 365;
|
|
2392
2325
|
}
|
|
2393
2326
|
set(e, r, o) {
|
|
2394
2327
|
return e.setMonth(0, o), e.setHours(0, 0, 0, 0), e;
|
|
2395
2328
|
}
|
|
2396
2329
|
}
|
|
2397
|
-
function
|
|
2398
|
-
var u, l,
|
|
2399
|
-
const r =
|
|
2400
|
-
return
|
|
2330
|
+
function Ee(t, n, e) {
|
|
2331
|
+
var u, l, m, y;
|
|
2332
|
+
const r = oe(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? r.weekStartsOn ?? ((y = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : y.weekStartsOn) ?? 0, a = L(t), s = a.getDay(), f = (n % 7 + 7) % 7, c = 7 - o, d = n < 0 || n > 6 ? n - (s + c) % 7 : (f + c) % 7 - (s + c) % 7;
|
|
2333
|
+
return Xe(a, d);
|
|
2401
2334
|
}
|
|
2402
|
-
class
|
|
2335
|
+
class Pr extends P {
|
|
2403
2336
|
constructor() {
|
|
2404
2337
|
super(...arguments);
|
|
2405
|
-
|
|
2406
|
-
|
|
2338
|
+
p(this, "priority", 90);
|
|
2339
|
+
p(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
|
|
2407
2340
|
}
|
|
2408
2341
|
parse(e, r, o) {
|
|
2409
2342
|
switch (r) {
|
|
@@ -2433,14 +2366,14 @@ class Or extends P {
|
|
|
2433
2366
|
return r >= 0 && r <= 6;
|
|
2434
2367
|
}
|
|
2435
2368
|
set(e, r, o, a) {
|
|
2436
|
-
return e =
|
|
2369
|
+
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2437
2370
|
}
|
|
2438
2371
|
}
|
|
2439
|
-
class
|
|
2372
|
+
class Or extends P {
|
|
2440
2373
|
constructor() {
|
|
2441
2374
|
super(...arguments);
|
|
2442
|
-
|
|
2443
|
-
|
|
2375
|
+
p(this, "priority", 90);
|
|
2376
|
+
p(this, "incompatibleTokens", [
|
|
2444
2377
|
"y",
|
|
2445
2378
|
"R",
|
|
2446
2379
|
"u",
|
|
@@ -2459,20 +2392,20 @@ class Hr extends P {
|
|
|
2459
2392
|
]);
|
|
2460
2393
|
}
|
|
2461
2394
|
parse(e, r, o, a) {
|
|
2462
|
-
const
|
|
2463
|
-
const
|
|
2464
|
-
return (
|
|
2395
|
+
const s = (i) => {
|
|
2396
|
+
const f = Math.floor((i - 1) / 7) * 7;
|
|
2397
|
+
return (i + a.weekStartsOn + 6) % 7 + f;
|
|
2465
2398
|
};
|
|
2466
2399
|
switch (r) {
|
|
2467
2400
|
case "e":
|
|
2468
2401
|
case "ee":
|
|
2469
|
-
return
|
|
2402
|
+
return A(W(r.length, e), s);
|
|
2470
2403
|
case "eo":
|
|
2471
|
-
return
|
|
2404
|
+
return A(
|
|
2472
2405
|
o.ordinalNumber(e, {
|
|
2473
2406
|
unit: "day"
|
|
2474
2407
|
}),
|
|
2475
|
-
|
|
2408
|
+
s
|
|
2476
2409
|
);
|
|
2477
2410
|
case "eee":
|
|
2478
2411
|
return o.day(e, {
|
|
@@ -2498,14 +2431,14 @@ class Hr extends P {
|
|
|
2498
2431
|
return r >= 0 && r <= 6;
|
|
2499
2432
|
}
|
|
2500
2433
|
set(e, r, o, a) {
|
|
2501
|
-
return e =
|
|
2434
|
+
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2502
2435
|
}
|
|
2503
2436
|
}
|
|
2504
|
-
class
|
|
2437
|
+
class Dr extends P {
|
|
2505
2438
|
constructor() {
|
|
2506
2439
|
super(...arguments);
|
|
2507
|
-
|
|
2508
|
-
|
|
2440
|
+
p(this, "priority", 90);
|
|
2441
|
+
p(this, "incompatibleTokens", [
|
|
2509
2442
|
"y",
|
|
2510
2443
|
"R",
|
|
2511
2444
|
"u",
|
|
@@ -2524,20 +2457,20 @@ class Br extends P {
|
|
|
2524
2457
|
]);
|
|
2525
2458
|
}
|
|
2526
2459
|
parse(e, r, o, a) {
|
|
2527
|
-
const
|
|
2528
|
-
const
|
|
2529
|
-
return (
|
|
2460
|
+
const s = (i) => {
|
|
2461
|
+
const f = Math.floor((i - 1) / 7) * 7;
|
|
2462
|
+
return (i + a.weekStartsOn + 6) % 7 + f;
|
|
2530
2463
|
};
|
|
2531
2464
|
switch (r) {
|
|
2532
2465
|
case "c":
|
|
2533
2466
|
case "cc":
|
|
2534
|
-
return
|
|
2467
|
+
return A(W(r.length, e), s);
|
|
2535
2468
|
case "co":
|
|
2536
|
-
return
|
|
2469
|
+
return A(
|
|
2537
2470
|
o.ordinalNumber(e, {
|
|
2538
2471
|
unit: "day"
|
|
2539
2472
|
}),
|
|
2540
|
-
|
|
2473
|
+
s
|
|
2541
2474
|
);
|
|
2542
2475
|
case "ccc":
|
|
2543
2476
|
return o.day(e, {
|
|
@@ -2563,18 +2496,18 @@ class Br extends P {
|
|
|
2563
2496
|
return r >= 0 && r <= 6;
|
|
2564
2497
|
}
|
|
2565
2498
|
set(e, r, o, a) {
|
|
2566
|
-
return e =
|
|
2499
|
+
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2567
2500
|
}
|
|
2568
2501
|
}
|
|
2569
|
-
function
|
|
2570
|
-
const e =
|
|
2571
|
-
return
|
|
2502
|
+
function Hr(t, n) {
|
|
2503
|
+
const e = L(t), r = or(e), o = n - r;
|
|
2504
|
+
return Xe(e, o);
|
|
2572
2505
|
}
|
|
2573
|
-
class
|
|
2506
|
+
class Br extends P {
|
|
2574
2507
|
constructor() {
|
|
2575
2508
|
super(...arguments);
|
|
2576
|
-
|
|
2577
|
-
|
|
2509
|
+
p(this, "priority", 90);
|
|
2510
|
+
p(this, "incompatibleTokens", [
|
|
2578
2511
|
"y",
|
|
2579
2512
|
"Y",
|
|
2580
2513
|
"u",
|
|
@@ -2593,15 +2526,15 @@ class Er extends P {
|
|
|
2593
2526
|
]);
|
|
2594
2527
|
}
|
|
2595
2528
|
parse(e, r, o) {
|
|
2596
|
-
const a = (
|
|
2529
|
+
const a = (s) => s === 0 ? 7 : s;
|
|
2597
2530
|
switch (r) {
|
|
2598
2531
|
case "i":
|
|
2599
2532
|
case "ii":
|
|
2600
|
-
return
|
|
2533
|
+
return W(r.length, e);
|
|
2601
2534
|
case "io":
|
|
2602
2535
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2603
2536
|
case "iii":
|
|
2604
|
-
return
|
|
2537
|
+
return A(
|
|
2605
2538
|
o.day(e, {
|
|
2606
2539
|
width: "abbreviated",
|
|
2607
2540
|
context: "formatting"
|
|
@@ -2615,7 +2548,7 @@ class Er extends P {
|
|
|
2615
2548
|
a
|
|
2616
2549
|
);
|
|
2617
2550
|
case "iiiii":
|
|
2618
|
-
return
|
|
2551
|
+
return A(
|
|
2619
2552
|
o.day(e, {
|
|
2620
2553
|
width: "narrow",
|
|
2621
2554
|
context: "formatting"
|
|
@@ -2623,7 +2556,7 @@ class Er extends P {
|
|
|
2623
2556
|
a
|
|
2624
2557
|
);
|
|
2625
2558
|
case "iiiiii":
|
|
2626
|
-
return
|
|
2559
|
+
return A(
|
|
2627
2560
|
o.day(e, {
|
|
2628
2561
|
width: "short",
|
|
2629
2562
|
context: "formatting"
|
|
@@ -2635,7 +2568,7 @@ class Er extends P {
|
|
|
2635
2568
|
);
|
|
2636
2569
|
case "iiii":
|
|
2637
2570
|
default:
|
|
2638
|
-
return
|
|
2571
|
+
return A(
|
|
2639
2572
|
o.day(e, {
|
|
2640
2573
|
width: "wide",
|
|
2641
2574
|
context: "formatting"
|
|
@@ -2657,14 +2590,14 @@ class Er extends P {
|
|
|
2657
2590
|
return r >= 1 && r <= 7;
|
|
2658
2591
|
}
|
|
2659
2592
|
set(e, r, o) {
|
|
2660
|
-
return e =
|
|
2593
|
+
return e = Hr(e, o), e.setHours(0, 0, 0, 0), e;
|
|
2661
2594
|
}
|
|
2662
2595
|
}
|
|
2663
|
-
class
|
|
2596
|
+
class Er extends P {
|
|
2664
2597
|
constructor() {
|
|
2665
2598
|
super(...arguments);
|
|
2666
|
-
|
|
2667
|
-
|
|
2599
|
+
p(this, "priority", 80);
|
|
2600
|
+
p(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
|
|
2668
2601
|
}
|
|
2669
2602
|
parse(e, r, o) {
|
|
2670
2603
|
switch (r) {
|
|
@@ -2698,14 +2631,14 @@ class Sr extends P {
|
|
|
2698
2631
|
}
|
|
2699
2632
|
}
|
|
2700
2633
|
set(e, r, o) {
|
|
2701
|
-
return e.setHours(
|
|
2634
|
+
return e.setHours(Be(o), 0, 0, 0), e;
|
|
2702
2635
|
}
|
|
2703
2636
|
}
|
|
2704
2637
|
class Vr extends P {
|
|
2705
2638
|
constructor() {
|
|
2706
2639
|
super(...arguments);
|
|
2707
|
-
|
|
2708
|
-
|
|
2640
|
+
p(this, "priority", 80);
|
|
2641
|
+
p(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
|
|
2709
2642
|
}
|
|
2710
2643
|
parse(e, r, o) {
|
|
2711
2644
|
switch (r) {
|
|
@@ -2739,14 +2672,14 @@ class Vr extends P {
|
|
|
2739
2672
|
}
|
|
2740
2673
|
}
|
|
2741
2674
|
set(e, r, o) {
|
|
2742
|
-
return e.setHours(
|
|
2675
|
+
return e.setHours(Be(o), 0, 0, 0), e;
|
|
2743
2676
|
}
|
|
2744
2677
|
}
|
|
2745
|
-
class
|
|
2678
|
+
class Fr extends P {
|
|
2746
2679
|
constructor() {
|
|
2747
2680
|
super(...arguments);
|
|
2748
|
-
|
|
2749
|
-
|
|
2681
|
+
p(this, "priority", 80);
|
|
2682
|
+
p(this, "incompatibleTokens", ["a", "b", "t", "T"]);
|
|
2750
2683
|
}
|
|
2751
2684
|
parse(e, r, o) {
|
|
2752
2685
|
switch (r) {
|
|
@@ -2780,23 +2713,23 @@ class Nr extends P {
|
|
|
2780
2713
|
}
|
|
2781
2714
|
}
|
|
2782
2715
|
set(e, r, o) {
|
|
2783
|
-
return e.setHours(
|
|
2716
|
+
return e.setHours(Be(o), 0, 0, 0), e;
|
|
2784
2717
|
}
|
|
2785
2718
|
}
|
|
2786
|
-
class
|
|
2719
|
+
class Nr extends P {
|
|
2787
2720
|
constructor() {
|
|
2788
2721
|
super(...arguments);
|
|
2789
|
-
|
|
2790
|
-
|
|
2722
|
+
p(this, "priority", 70);
|
|
2723
|
+
p(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
|
|
2791
2724
|
}
|
|
2792
2725
|
parse(e, r, o) {
|
|
2793
2726
|
switch (r) {
|
|
2794
2727
|
case "h":
|
|
2795
|
-
return
|
|
2728
|
+
return F(q.hour12h, e);
|
|
2796
2729
|
case "ho":
|
|
2797
2730
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2798
2731
|
default:
|
|
2799
|
-
return
|
|
2732
|
+
return W(r.length, e);
|
|
2800
2733
|
}
|
|
2801
2734
|
}
|
|
2802
2735
|
validate(e, r) {
|
|
@@ -2807,20 +2740,20 @@ class Lr extends P {
|
|
|
2807
2740
|
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;
|
|
2808
2741
|
}
|
|
2809
2742
|
}
|
|
2810
|
-
class
|
|
2743
|
+
class Sr extends P {
|
|
2811
2744
|
constructor() {
|
|
2812
2745
|
super(...arguments);
|
|
2813
|
-
|
|
2814
|
-
|
|
2746
|
+
p(this, "priority", 70);
|
|
2747
|
+
p(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
|
|
2815
2748
|
}
|
|
2816
2749
|
parse(e, r, o) {
|
|
2817
2750
|
switch (r) {
|
|
2818
2751
|
case "H":
|
|
2819
|
-
return
|
|
2752
|
+
return F(q.hour23h, e);
|
|
2820
2753
|
case "Ho":
|
|
2821
2754
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2822
2755
|
default:
|
|
2823
|
-
return
|
|
2756
|
+
return W(r.length, e);
|
|
2824
2757
|
}
|
|
2825
2758
|
}
|
|
2826
2759
|
validate(e, r) {
|
|
@@ -2830,20 +2763,20 @@ class Ar extends P {
|
|
|
2830
2763
|
return e.setHours(o, 0, 0, 0), e;
|
|
2831
2764
|
}
|
|
2832
2765
|
}
|
|
2833
|
-
class
|
|
2766
|
+
class Yr extends P {
|
|
2834
2767
|
constructor() {
|
|
2835
2768
|
super(...arguments);
|
|
2836
|
-
|
|
2837
|
-
|
|
2769
|
+
p(this, "priority", 70);
|
|
2770
|
+
p(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
|
|
2838
2771
|
}
|
|
2839
2772
|
parse(e, r, o) {
|
|
2840
2773
|
switch (r) {
|
|
2841
2774
|
case "K":
|
|
2842
|
-
return
|
|
2775
|
+
return F(q.hour11h, e);
|
|
2843
2776
|
case "Ko":
|
|
2844
2777
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2845
2778
|
default:
|
|
2846
|
-
return
|
|
2779
|
+
return W(r.length, e);
|
|
2847
2780
|
}
|
|
2848
2781
|
}
|
|
2849
2782
|
validate(e, r) {
|
|
@@ -2853,20 +2786,20 @@ class Wr extends P {
|
|
|
2853
2786
|
return e.getHours() >= 12 && o < 12 ? e.setHours(o + 12, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2854
2787
|
}
|
|
2855
2788
|
}
|
|
2856
|
-
class
|
|
2789
|
+
class Wr extends P {
|
|
2857
2790
|
constructor() {
|
|
2858
2791
|
super(...arguments);
|
|
2859
|
-
|
|
2860
|
-
|
|
2792
|
+
p(this, "priority", 70);
|
|
2793
|
+
p(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
|
|
2861
2794
|
}
|
|
2862
2795
|
parse(e, r, o) {
|
|
2863
2796
|
switch (r) {
|
|
2864
2797
|
case "k":
|
|
2865
|
-
return
|
|
2798
|
+
return F(q.hour24h, e);
|
|
2866
2799
|
case "ko":
|
|
2867
2800
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2868
2801
|
default:
|
|
2869
|
-
return
|
|
2802
|
+
return W(r.length, e);
|
|
2870
2803
|
}
|
|
2871
2804
|
}
|
|
2872
2805
|
validate(e, r) {
|
|
@@ -2877,20 +2810,20 @@ class Ir extends P {
|
|
|
2877
2810
|
return e.setHours(a, 0, 0, 0), e;
|
|
2878
2811
|
}
|
|
2879
2812
|
}
|
|
2880
|
-
class
|
|
2813
|
+
class qr extends P {
|
|
2881
2814
|
constructor() {
|
|
2882
2815
|
super(...arguments);
|
|
2883
|
-
|
|
2884
|
-
|
|
2816
|
+
p(this, "priority", 60);
|
|
2817
|
+
p(this, "incompatibleTokens", ["t", "T"]);
|
|
2885
2818
|
}
|
|
2886
2819
|
parse(e, r, o) {
|
|
2887
2820
|
switch (r) {
|
|
2888
2821
|
case "m":
|
|
2889
|
-
return
|
|
2822
|
+
return F(q.minute, e);
|
|
2890
2823
|
case "mo":
|
|
2891
2824
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2892
2825
|
default:
|
|
2893
|
-
return
|
|
2826
|
+
return W(r.length, e);
|
|
2894
2827
|
}
|
|
2895
2828
|
}
|
|
2896
2829
|
validate(e, r) {
|
|
@@ -2900,20 +2833,20 @@ class Yr extends P {
|
|
|
2900
2833
|
return e.setMinutes(o, 0, 0), e;
|
|
2901
2834
|
}
|
|
2902
2835
|
}
|
|
2903
|
-
class
|
|
2836
|
+
class Ar extends P {
|
|
2904
2837
|
constructor() {
|
|
2905
2838
|
super(...arguments);
|
|
2906
|
-
|
|
2907
|
-
|
|
2839
|
+
p(this, "priority", 50);
|
|
2840
|
+
p(this, "incompatibleTokens", ["t", "T"]);
|
|
2908
2841
|
}
|
|
2909
2842
|
parse(e, r, o) {
|
|
2910
2843
|
switch (r) {
|
|
2911
2844
|
case "s":
|
|
2912
|
-
return
|
|
2845
|
+
return F(q.second, e);
|
|
2913
2846
|
case "so":
|
|
2914
2847
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2915
2848
|
default:
|
|
2916
|
-
return
|
|
2849
|
+
return W(r.length, e);
|
|
2917
2850
|
}
|
|
2918
2851
|
}
|
|
2919
2852
|
validate(e, r) {
|
|
@@ -2923,257 +2856,257 @@ class qr extends P {
|
|
|
2923
2856
|
return e.setSeconds(o, 0), e;
|
|
2924
2857
|
}
|
|
2925
2858
|
}
|
|
2926
|
-
class
|
|
2859
|
+
class Lr extends P {
|
|
2927
2860
|
constructor() {
|
|
2928
2861
|
super(...arguments);
|
|
2929
|
-
|
|
2930
|
-
|
|
2862
|
+
p(this, "priority", 30);
|
|
2863
|
+
p(this, "incompatibleTokens", ["t", "T"]);
|
|
2931
2864
|
}
|
|
2932
2865
|
parse(e, r) {
|
|
2933
2866
|
const o = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
|
|
2934
|
-
return
|
|
2867
|
+
return A(W(r.length, e), o);
|
|
2935
2868
|
}
|
|
2936
2869
|
set(e, r, o) {
|
|
2937
2870
|
return e.setMilliseconds(o), e;
|
|
2938
2871
|
}
|
|
2939
2872
|
}
|
|
2940
|
-
class
|
|
2873
|
+
class Ir extends P {
|
|
2941
2874
|
constructor() {
|
|
2942
2875
|
super(...arguments);
|
|
2943
|
-
|
|
2944
|
-
|
|
2876
|
+
p(this, "priority", 10);
|
|
2877
|
+
p(this, "incompatibleTokens", ["t", "T", "x"]);
|
|
2945
2878
|
}
|
|
2946
2879
|
parse(e, r) {
|
|
2947
2880
|
switch (r) {
|
|
2948
2881
|
case "X":
|
|
2949
|
-
return
|
|
2950
|
-
|
|
2882
|
+
return X(
|
|
2883
|
+
Q.basicOptionalMinutes,
|
|
2951
2884
|
e
|
|
2952
2885
|
);
|
|
2953
2886
|
case "XX":
|
|
2954
|
-
return
|
|
2887
|
+
return X(Q.basic, e);
|
|
2955
2888
|
case "XXXX":
|
|
2956
|
-
return
|
|
2957
|
-
|
|
2889
|
+
return X(
|
|
2890
|
+
Q.basicOptionalSeconds,
|
|
2958
2891
|
e
|
|
2959
2892
|
);
|
|
2960
2893
|
case "XXXXX":
|
|
2961
|
-
return
|
|
2962
|
-
|
|
2894
|
+
return X(
|
|
2895
|
+
Q.extendedOptionalSeconds,
|
|
2963
2896
|
e
|
|
2964
2897
|
);
|
|
2965
2898
|
case "XXX":
|
|
2966
2899
|
default:
|
|
2967
|
-
return
|
|
2900
|
+
return X(Q.extended, e);
|
|
2968
2901
|
}
|
|
2969
2902
|
}
|
|
2970
2903
|
set(e, r, o) {
|
|
2971
|
-
return r.timestampIsSet ? e :
|
|
2904
|
+
return r.timestampIsSet ? e : Y(
|
|
2972
2905
|
e,
|
|
2973
|
-
e.getTime() -
|
|
2906
|
+
e.getTime() - he(e) - o
|
|
2974
2907
|
);
|
|
2975
2908
|
}
|
|
2976
2909
|
}
|
|
2977
|
-
class
|
|
2910
|
+
class _r extends P {
|
|
2978
2911
|
constructor() {
|
|
2979
2912
|
super(...arguments);
|
|
2980
|
-
|
|
2981
|
-
|
|
2913
|
+
p(this, "priority", 10);
|
|
2914
|
+
p(this, "incompatibleTokens", ["t", "T", "X"]);
|
|
2982
2915
|
}
|
|
2983
2916
|
parse(e, r) {
|
|
2984
2917
|
switch (r) {
|
|
2985
2918
|
case "x":
|
|
2986
|
-
return
|
|
2987
|
-
|
|
2919
|
+
return X(
|
|
2920
|
+
Q.basicOptionalMinutes,
|
|
2988
2921
|
e
|
|
2989
2922
|
);
|
|
2990
2923
|
case "xx":
|
|
2991
|
-
return
|
|
2924
|
+
return X(Q.basic, e);
|
|
2992
2925
|
case "xxxx":
|
|
2993
|
-
return
|
|
2994
|
-
|
|
2926
|
+
return X(
|
|
2927
|
+
Q.basicOptionalSeconds,
|
|
2995
2928
|
e
|
|
2996
2929
|
);
|
|
2997
2930
|
case "xxxxx":
|
|
2998
|
-
return
|
|
2999
|
-
|
|
2931
|
+
return X(
|
|
2932
|
+
Q.extendedOptionalSeconds,
|
|
3000
2933
|
e
|
|
3001
2934
|
);
|
|
3002
2935
|
case "xxx":
|
|
3003
2936
|
default:
|
|
3004
|
-
return
|
|
2937
|
+
return X(Q.extended, e);
|
|
3005
2938
|
}
|
|
3006
2939
|
}
|
|
3007
2940
|
set(e, r, o) {
|
|
3008
|
-
return r.timestampIsSet ? e :
|
|
2941
|
+
return r.timestampIsSet ? e : Y(
|
|
3009
2942
|
e,
|
|
3010
|
-
e.getTime() -
|
|
2943
|
+
e.getTime() - he(e) - o
|
|
3011
2944
|
);
|
|
3012
2945
|
}
|
|
3013
2946
|
}
|
|
3014
|
-
class
|
|
2947
|
+
class jr extends P {
|
|
3015
2948
|
constructor() {
|
|
3016
2949
|
super(...arguments);
|
|
3017
|
-
|
|
3018
|
-
|
|
2950
|
+
p(this, "priority", 40);
|
|
2951
|
+
p(this, "incompatibleTokens", "*");
|
|
3019
2952
|
}
|
|
3020
2953
|
parse(e) {
|
|
3021
|
-
return
|
|
2954
|
+
return at(e);
|
|
3022
2955
|
}
|
|
3023
2956
|
set(e, r, o) {
|
|
3024
|
-
return [
|
|
2957
|
+
return [Y(e, o * 1e3), { timestampIsSet: !0 }];
|
|
3025
2958
|
}
|
|
3026
2959
|
}
|
|
3027
|
-
class
|
|
2960
|
+
class Rr extends P {
|
|
3028
2961
|
constructor() {
|
|
3029
2962
|
super(...arguments);
|
|
3030
|
-
|
|
3031
|
-
|
|
2963
|
+
p(this, "priority", 20);
|
|
2964
|
+
p(this, "incompatibleTokens", "*");
|
|
3032
2965
|
}
|
|
3033
2966
|
parse(e) {
|
|
3034
|
-
return
|
|
2967
|
+
return at(e);
|
|
3035
2968
|
}
|
|
3036
2969
|
set(e, r, o) {
|
|
3037
|
-
return [
|
|
2970
|
+
return [Y(e, o), { timestampIsSet: !0 }];
|
|
3038
2971
|
}
|
|
3039
2972
|
}
|
|
3040
|
-
const
|
|
3041
|
-
G: new
|
|
3042
|
-
y: new
|
|
3043
|
-
Y: new
|
|
3044
|
-
R: new
|
|
3045
|
-
u: new
|
|
3046
|
-
Q: new
|
|
3047
|
-
q: new
|
|
3048
|
-
M: new
|
|
3049
|
-
L: new
|
|
3050
|
-
w: new
|
|
3051
|
-
I: new
|
|
3052
|
-
d: new
|
|
3053
|
-
D: new
|
|
3054
|
-
E: new
|
|
3055
|
-
e: new
|
|
3056
|
-
c: new
|
|
3057
|
-
i: new
|
|
3058
|
-
a: new
|
|
2973
|
+
const $r = {
|
|
2974
|
+
G: new lr(),
|
|
2975
|
+
y: new cr(),
|
|
2976
|
+
Y: new dr(),
|
|
2977
|
+
R: new fr(),
|
|
2978
|
+
u: new pr(),
|
|
2979
|
+
Q: new mr(),
|
|
2980
|
+
q: new hr(),
|
|
2981
|
+
M: new yr(),
|
|
2982
|
+
L: new gr(),
|
|
2983
|
+
w: new wr(),
|
|
2984
|
+
I: new xr(),
|
|
2985
|
+
d: new Tr(),
|
|
2986
|
+
D: new Cr(),
|
|
2987
|
+
E: new Pr(),
|
|
2988
|
+
e: new Or(),
|
|
2989
|
+
c: new Dr(),
|
|
2990
|
+
i: new Br(),
|
|
2991
|
+
a: new Er(),
|
|
3059
2992
|
b: new Vr(),
|
|
3060
|
-
B: new
|
|
3061
|
-
h: new
|
|
3062
|
-
H: new
|
|
3063
|
-
K: new
|
|
3064
|
-
k: new
|
|
3065
|
-
m: new
|
|
3066
|
-
s: new
|
|
3067
|
-
S: new
|
|
3068
|
-
X: new
|
|
3069
|
-
x: new
|
|
3070
|
-
t: new
|
|
3071
|
-
T: new
|
|
3072
|
-
},
|
|
3073
|
-
function
|
|
3074
|
-
var M,
|
|
3075
|
-
const o =
|
|
2993
|
+
B: new Fr(),
|
|
2994
|
+
h: new Nr(),
|
|
2995
|
+
H: new Sr(),
|
|
2996
|
+
K: new Yr(),
|
|
2997
|
+
k: new Wr(),
|
|
2998
|
+
m: new qr(),
|
|
2999
|
+
s: new Ar(),
|
|
3000
|
+
S: new Lr(),
|
|
3001
|
+
X: new Ir(),
|
|
3002
|
+
x: new _r(),
|
|
3003
|
+
t: new jr(),
|
|
3004
|
+
T: new Rr()
|
|
3005
|
+
}, Gr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Qr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xr = /^'([^]*?)'?$/, Ur = /''/g, zr = /\S/, Jr = /[a-zA-Z]/;
|
|
3006
|
+
function je(t, n, e, r) {
|
|
3007
|
+
var M, E, I, j;
|
|
3008
|
+
const o = rr(), a = o.locale ?? Ze, s = o.firstWeekContainsDate ?? ((E = (M = o.locale) == null ? void 0 : M.options) == null ? void 0 : E.firstWeekContainsDate) ?? 1, i = o.weekStartsOn ?? ((j = (I = o.locale) == null ? void 0 : I.options) == null ? void 0 : j.weekStartsOn) ?? 0;
|
|
3076
3009
|
if (n === "")
|
|
3077
|
-
return t === "" ?
|
|
3078
|
-
const
|
|
3079
|
-
firstWeekContainsDate:
|
|
3080
|
-
weekStartsOn:
|
|
3010
|
+
return t === "" ? L(e) : Y(e, NaN);
|
|
3011
|
+
const f = {
|
|
3012
|
+
firstWeekContainsDate: s,
|
|
3013
|
+
weekStartsOn: i,
|
|
3081
3014
|
locale: a
|
|
3082
|
-
}, c = [new
|
|
3083
|
-
const
|
|
3084
|
-
if (
|
|
3085
|
-
const
|
|
3086
|
-
return
|
|
3015
|
+
}, c = [new ur()], d = n.match(Qr).map((w) => {
|
|
3016
|
+
const T = w[0];
|
|
3017
|
+
if (T in ke) {
|
|
3018
|
+
const N = ke[T];
|
|
3019
|
+
return N(w, a.formatLong);
|
|
3087
3020
|
}
|
|
3088
|
-
return
|
|
3089
|
-
}).join("").match(
|
|
3090
|
-
for (let
|
|
3091
|
-
|
|
3092
|
-
const
|
|
3093
|
-
if (
|
|
3094
|
-
const { incompatibleTokens:
|
|
3095
|
-
if (Array.isArray(
|
|
3096
|
-
const
|
|
3097
|
-
(
|
|
3021
|
+
return w;
|
|
3022
|
+
}).join("").match(Gr), u = [];
|
|
3023
|
+
for (let w of d) {
|
|
3024
|
+
rt(w) && Te(w, n, t), nt(w) && Te(w, n, t);
|
|
3025
|
+
const T = w[0], N = $r[T];
|
|
3026
|
+
if (N) {
|
|
3027
|
+
const { incompatibleTokens: C } = N;
|
|
3028
|
+
if (Array.isArray(C)) {
|
|
3029
|
+
const S = u.find(
|
|
3030
|
+
(g) => C.includes(g.token) || g.token === T
|
|
3098
3031
|
);
|
|
3099
|
-
if (
|
|
3032
|
+
if (S)
|
|
3100
3033
|
throw new RangeError(
|
|
3101
|
-
`The format string mustn't contain \`${
|
|
3034
|
+
`The format string mustn't contain \`${S.fullToken}\` and \`${w}\` at the same time`
|
|
3102
3035
|
);
|
|
3103
|
-
} else if (
|
|
3036
|
+
} else if (N.incompatibleTokens === "*" && u.length > 0)
|
|
3104
3037
|
throw new RangeError(
|
|
3105
|
-
`The format string mustn't contain \`${
|
|
3038
|
+
`The format string mustn't contain \`${w}\` and any other token at the same time`
|
|
3106
3039
|
);
|
|
3107
|
-
u.push({ token:
|
|
3108
|
-
const
|
|
3040
|
+
u.push({ token: T, fullToken: w });
|
|
3041
|
+
const V = N.run(
|
|
3109
3042
|
t,
|
|
3110
|
-
|
|
3043
|
+
w,
|
|
3111
3044
|
a.match,
|
|
3112
|
-
|
|
3045
|
+
f
|
|
3113
3046
|
);
|
|
3114
|
-
if (!
|
|
3115
|
-
return
|
|
3116
|
-
c.push(
|
|
3047
|
+
if (!V)
|
|
3048
|
+
return Y(e, NaN);
|
|
3049
|
+
c.push(V.setter), t = V.rest;
|
|
3117
3050
|
} else {
|
|
3118
|
-
if (
|
|
3051
|
+
if (T.match(Jr))
|
|
3119
3052
|
throw new RangeError(
|
|
3120
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
3053
|
+
"Format string contains an unescaped latin alphabet character `" + T + "`"
|
|
3121
3054
|
);
|
|
3122
|
-
if (
|
|
3123
|
-
t = t.slice(
|
|
3055
|
+
if (w === "''" ? w = "'" : T === "'" && (w = Zr(w)), t.indexOf(w) === 0)
|
|
3056
|
+
t = t.slice(w.length);
|
|
3124
3057
|
else
|
|
3125
|
-
return
|
|
3058
|
+
return Y(e, NaN);
|
|
3126
3059
|
}
|
|
3127
3060
|
}
|
|
3128
|
-
if (t.length > 0 &&
|
|
3129
|
-
return
|
|
3130
|
-
const l = c.map((
|
|
3131
|
-
(
|
|
3132
|
-
).map((
|
|
3133
|
-
let
|
|
3134
|
-
if (isNaN(
|
|
3135
|
-
return
|
|
3061
|
+
if (t.length > 0 && zr.test(t))
|
|
3062
|
+
return Y(e, NaN);
|
|
3063
|
+
const l = c.map((w) => w.priority).sort((w, T) => T - w).filter((w, T, N) => N.indexOf(w) === T).map(
|
|
3064
|
+
(w) => c.filter((T) => T.priority === w).sort((T, N) => N.subPriority - T.subPriority)
|
|
3065
|
+
).map((w) => w[0]);
|
|
3066
|
+
let m = L(e);
|
|
3067
|
+
if (isNaN(m.getTime()))
|
|
3068
|
+
return Y(e, NaN);
|
|
3136
3069
|
const y = {};
|
|
3137
|
-
for (const
|
|
3138
|
-
if (!
|
|
3139
|
-
return
|
|
3140
|
-
const
|
|
3141
|
-
Array.isArray(
|
|
3070
|
+
for (const w of l) {
|
|
3071
|
+
if (!w.validate(m, f))
|
|
3072
|
+
return Y(e, NaN);
|
|
3073
|
+
const T = w.set(m, y, f);
|
|
3074
|
+
Array.isArray(T) ? (m = T[0], Object.assign(y, T[1])) : m = T;
|
|
3142
3075
|
}
|
|
3143
|
-
return
|
|
3076
|
+
return Y(e, m);
|
|
3144
3077
|
}
|
|
3145
|
-
function
|
|
3146
|
-
return t.match(
|
|
3078
|
+
function Zr(t) {
|
|
3079
|
+
return t.match(Xr)[1].replace(Ur, "'");
|
|
3147
3080
|
}
|
|
3148
|
-
function
|
|
3081
|
+
function D(t) {
|
|
3149
3082
|
return typeof t < "u" && t !== null;
|
|
3150
3083
|
}
|
|
3151
|
-
function
|
|
3084
|
+
function ut(t, n = "hh:mm:ss") {
|
|
3152
3085
|
if (!(!t || !n))
|
|
3153
|
-
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3086
|
+
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), je(t.toLowerCase(), n, /* @__PURE__ */ new Date())) : je(t, n, /* @__PURE__ */ new Date());
|
|
3154
3087
|
}
|
|
3155
|
-
function
|
|
3156
|
-
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3088
|
+
function lt(t, n = "hh:mm:ss", e = "AM") {
|
|
3089
|
+
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), _e(t, n).toUpperCase()) : _e(t, n);
|
|
3157
3090
|
}
|
|
3158
|
-
function
|
|
3091
|
+
function ct(t, n) {
|
|
3159
3092
|
let e = t || "hh:mm:ss";
|
|
3160
3093
|
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;
|
|
3161
3094
|
}
|
|
3162
|
-
class
|
|
3095
|
+
class Kr {
|
|
3163
3096
|
constructor() {
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3097
|
+
p(this, "hourStep", 1);
|
|
3098
|
+
p(this, "minuteStep", 1);
|
|
3099
|
+
p(this, "secondStep", 1);
|
|
3100
|
+
p(this, "use12Hours", !1);
|
|
3101
|
+
p(this, "changedValue", v({ text: "", value: void 0 }));
|
|
3102
|
+
p(this, "format", "HH:mm:ss");
|
|
3103
|
+
p(this, "temporaryHours");
|
|
3104
|
+
p(this, "temporaryMinutes");
|
|
3105
|
+
p(this, "temporarySeconds");
|
|
3106
|
+
p(this, "temporaryText", "");
|
|
3107
|
+
p(this, "temporaryValue");
|
|
3108
|
+
p(this, "temporarySelected12Hours");
|
|
3109
|
+
p(this, "temporaryDefaultOpenValue", /* @__PURE__ */ new Date());
|
|
3177
3110
|
}
|
|
3178
3111
|
/**
|
|
3179
3112
|
* @description
|
|
@@ -3204,7 +3137,7 @@ class to {
|
|
|
3204
3137
|
* Get viewHours which is selected in `time-picker-panel` and its range is [12, 1, 2, ..., 11]
|
|
3205
3138
|
*/
|
|
3206
3139
|
get viewHours() {
|
|
3207
|
-
return this.use12Hours &&
|
|
3140
|
+
return this.use12Hours && D(this.temporaryHours) ? this.calculateViewHour(this.temporaryHours) : this.temporaryHours;
|
|
3208
3141
|
}
|
|
3209
3142
|
get minutes() {
|
|
3210
3143
|
return this.temporaryMinutes;
|
|
@@ -3232,7 +3165,7 @@ class to {
|
|
|
3232
3165
|
*/
|
|
3233
3166
|
get defaultViewHours() {
|
|
3234
3167
|
const n = this.defaultOpenValue.getHours();
|
|
3235
|
-
return this.use12Hours &&
|
|
3168
|
+
return this.use12Hours && D(n) ? this.calculateViewHour(n) : n;
|
|
3236
3169
|
}
|
|
3237
3170
|
/**
|
|
3238
3171
|
* @description
|
|
@@ -3261,7 +3194,7 @@ class to {
|
|
|
3261
3194
|
return this.temporaryValue;
|
|
3262
3195
|
}
|
|
3263
3196
|
set value(n) {
|
|
3264
|
-
n !== this.temporaryValue && (this.temporaryValue = n,
|
|
3197
|
+
n !== this.temporaryValue && (this.temporaryValue = n, D(this.temporaryValue) && Je(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());
|
|
3265
3198
|
}
|
|
3266
3199
|
get selected12Hours() {
|
|
3267
3200
|
return this.temporarySelected12Hours;
|
|
@@ -3276,7 +3209,7 @@ class to {
|
|
|
3276
3209
|
this.temporaryDefaultOpenValue !== n && (this.temporaryDefaultOpenValue = n, this.update());
|
|
3277
3210
|
}
|
|
3278
3211
|
get isEmpty() {
|
|
3279
|
-
return !(
|
|
3212
|
+
return !(D(this.temporaryHours) || D(this.temporaryMinutes) || D(this.temporarySeconds));
|
|
3280
3213
|
}
|
|
3281
3214
|
setFormat(n) {
|
|
3282
3215
|
this.format = n;
|
|
@@ -3294,7 +3227,7 @@ class to {
|
|
|
3294
3227
|
return e ? this : (this.setDefaultValueIfNil(), this.seconds = n, this);
|
|
3295
3228
|
}
|
|
3296
3229
|
setValue(n, e) {
|
|
3297
|
-
return
|
|
3230
|
+
return D(e) && (this.use12Hours = e), this.value = n, this;
|
|
3298
3231
|
}
|
|
3299
3232
|
setValueByStep(n, e) {
|
|
3300
3233
|
let r = Math.floor(n / e);
|
|
@@ -3305,10 +3238,10 @@ class to {
|
|
|
3305
3238
|
return this.defaultOpenValue = n, this;
|
|
3306
3239
|
}
|
|
3307
3240
|
setDefaultValueIfNil() {
|
|
3308
|
-
|
|
3241
|
+
D(this.temporaryValue) || (this.temporaryValue = new Date(this.defaultOpenValue));
|
|
3309
3242
|
}
|
|
3310
3243
|
update() {
|
|
3311
|
-
this.isEmpty ? this.temporaryValue = void 0 : (
|
|
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 = lt(
|
|
3312
3245
|
this.temporaryValue,
|
|
3313
3246
|
this.format,
|
|
3314
3247
|
this.selected12Hours
|
|
@@ -3325,8 +3258,8 @@ class to {
|
|
|
3325
3258
|
return e === "PM" && n > 12 ? n - 12 : e === "AM" && n === 0 ? 12 : n;
|
|
3326
3259
|
}
|
|
3327
3260
|
}
|
|
3328
|
-
const
|
|
3329
|
-
function
|
|
3261
|
+
const eo = ["moz", "ms", "webkit"];
|
|
3262
|
+
function to() {
|
|
3330
3263
|
let t = 0;
|
|
3331
3264
|
return (n) => {
|
|
3332
3265
|
const e = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (e - t)), o = setTimeout(() => {
|
|
@@ -3335,339 +3268,339 @@ function ro() {
|
|
|
3335
3268
|
return t = e + r, o;
|
|
3336
3269
|
};
|
|
3337
3270
|
}
|
|
3338
|
-
function
|
|
3271
|
+
function no() {
|
|
3339
3272
|
if (typeof window > "u")
|
|
3340
3273
|
return () => 0;
|
|
3341
3274
|
if (window.requestAnimationFrame)
|
|
3342
3275
|
return window.requestAnimationFrame.bind(window);
|
|
3343
|
-
const t =
|
|
3344
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
3276
|
+
const t = eo.filter((n) => `${n}RequestAnimationFrame` in window)[0];
|
|
3277
|
+
return t ? window[`${t}RequestAnimationFrame`] : to();
|
|
3345
3278
|
}
|
|
3346
|
-
const
|
|
3347
|
-
function
|
|
3348
|
-
function
|
|
3349
|
-
const M =
|
|
3350
|
-
|
|
3279
|
+
const ro = no();
|
|
3280
|
+
function oo(t, n, e, r, o, a) {
|
|
3281
|
+
function s(d, u, l = 0, m, y) {
|
|
3282
|
+
const M = i(u, m, y), E = d.children[0].children[M] || d.children[0].children[0];
|
|
3283
|
+
f(d, E.offsetTop, l);
|
|
3351
3284
|
}
|
|
3352
|
-
function
|
|
3285
|
+
function i(d, u, l) {
|
|
3353
3286
|
if (u === "hour") {
|
|
3354
|
-
const
|
|
3287
|
+
const m = t.disabledHours && t.disabledHours();
|
|
3355
3288
|
return c(
|
|
3356
|
-
|
|
3289
|
+
m,
|
|
3357
3290
|
e.value.map((y) => y.index).indexOf(d)
|
|
3358
3291
|
);
|
|
3359
3292
|
}
|
|
3360
3293
|
if (u === "minute") {
|
|
3361
|
-
const
|
|
3294
|
+
const m = t.disabledMinutes && t.disabledMinutes(l.hours);
|
|
3362
3295
|
return c(
|
|
3363
|
-
|
|
3296
|
+
m,
|
|
3364
3297
|
r.value.map((y) => y.index).indexOf(d)
|
|
3365
3298
|
);
|
|
3366
3299
|
}
|
|
3367
3300
|
if (u === "second") {
|
|
3368
|
-
const
|
|
3301
|
+
const m = t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes);
|
|
3369
3302
|
return c(
|
|
3370
|
-
|
|
3303
|
+
m,
|
|
3371
3304
|
o.value.map((y) => y.index).indexOf(d)
|
|
3372
3305
|
);
|
|
3373
3306
|
}
|
|
3374
3307
|
return c(
|
|
3375
3308
|
[],
|
|
3376
|
-
a.value.map((
|
|
3309
|
+
a.value.map((m) => m.index).indexOf(d)
|
|
3377
3310
|
);
|
|
3378
3311
|
}
|
|
3379
|
-
function
|
|
3312
|
+
function f(d, u, l) {
|
|
3380
3313
|
if (l <= 0) {
|
|
3381
3314
|
d.scrollTop = u;
|
|
3382
3315
|
return;
|
|
3383
3316
|
}
|
|
3384
3317
|
const y = (u - d.scrollTop) / l * 10;
|
|
3385
|
-
|
|
3386
|
-
d.scrollTop += y, d.scrollTop !== u &&
|
|
3318
|
+
ro(() => {
|
|
3319
|
+
d.scrollTop += y, d.scrollTop !== u && f(d, u, l - 10);
|
|
3387
3320
|
});
|
|
3388
3321
|
}
|
|
3389
3322
|
function c(d, u) {
|
|
3390
|
-
return d && d.length && t.hideDisabledElements ? u - d.reduce((l,
|
|
3323
|
+
return d && d.length && t.hideDisabledElements ? u - d.reduce((l, m) => l + (m < u ? 1 : 0), 0) : u;
|
|
3391
3324
|
}
|
|
3392
|
-
return { scrollToSelected:
|
|
3325
|
+
return { scrollToSelected: s };
|
|
3393
3326
|
}
|
|
3394
|
-
function
|
|
3395
|
-
function e(
|
|
3396
|
-
return
|
|
3327
|
+
function ao(t, n) {
|
|
3328
|
+
function e(i) {
|
|
3329
|
+
return i.index === t.viewHours || !D(t.viewHours) && i.index === t.defaultViewHours;
|
|
3397
3330
|
}
|
|
3398
|
-
function r(
|
|
3399
|
-
return
|
|
3331
|
+
function r(i) {
|
|
3332
|
+
return i.index === t.minutes || !D(t.minutes) && i.index === t.defaultMinutes;
|
|
3400
3333
|
}
|
|
3401
|
-
function o(
|
|
3402
|
-
return
|
|
3334
|
+
function o(i) {
|
|
3335
|
+
return i.index === t.seconds || !D(t.seconds) && i.index === t.defaultSeconds;
|
|
3403
3336
|
}
|
|
3404
|
-
function a(
|
|
3405
|
-
return
|
|
3337
|
+
function a(i) {
|
|
3338
|
+
return i.value.toUpperCase() === t.selected12Hours || !D(t.selected12Hours) && i.value.toUpperCase() === t.default12Hours;
|
|
3406
3339
|
}
|
|
3407
|
-
function i
|
|
3340
|
+
function s(i, f) {
|
|
3408
3341
|
let c = "";
|
|
3409
3342
|
const d = ` ${n}-select-option-selected `, u = ` ${n}-select-option-disabled `;
|
|
3410
3343
|
let l = !1;
|
|
3411
|
-
return
|
|
3344
|
+
return f === "hour" ? l = e(i) : f === "minute" ? l = r(i) : f === "second" ? l = o(i) : l = a(i), l && (c += d), f === "12-hour" || i.disabled && (c += u), c;
|
|
3412
3345
|
}
|
|
3413
|
-
return { getSelectedClass:
|
|
3346
|
+
return { getSelectedClass: s };
|
|
3414
3347
|
}
|
|
3415
|
-
const
|
|
3348
|
+
const Ce = /* @__PURE__ */ re({
|
|
3416
3349
|
name: "FTimePickerTimeView",
|
|
3417
|
-
props:
|
|
3350
|
+
props: tn,
|
|
3418
3351
|
emits: ["valueChange", "formatedValueChange"],
|
|
3419
3352
|
setup(t, n) {
|
|
3420
|
-
const e = "time-picker-panel", r = v(0), o = v([]), a = v([]),
|
|
3421
|
-
scrollToSelected:
|
|
3422
|
-
} =
|
|
3353
|
+
const e = "time-picker-panel", r = v(0), o = v([]), a = v([]), s = v([]), i = v([]), f = v(), c = v(), d = v(), u = v(), l = new Kr(), {
|
|
3354
|
+
scrollToSelected: m
|
|
3355
|
+
} = oo(t, n, o, a, s, i), {
|
|
3423
3356
|
getSelectedClass: y
|
|
3424
|
-
} =
|
|
3425
|
-
R(() => t.defaultOpenValue, (
|
|
3426
|
-
|
|
3427
|
-
}), R(
|
|
3428
|
-
|
|
3429
|
-
}),
|
|
3430
|
-
n.emit("valueChange",
|
|
3431
|
-
}), R(() => t.modelValue, (
|
|
3432
|
-
|
|
3433
|
-
}), R(() => t.format, (
|
|
3434
|
-
|
|
3435
|
-
}), R(
|
|
3436
|
-
|
|
3437
|
-
}), R(() => t.use12Hours, (
|
|
3438
|
-
|
|
3439
|
-
}), R(
|
|
3440
|
-
|
|
3357
|
+
} = ao(l, e), M = v(t.hourStep), E = v(t.minuteStep), I = v(t.secondStep), j = v(), w = v(""), T = v(), N = v(t.hideDisabledElements), C = v(0);
|
|
3358
|
+
R(() => t.defaultOpenValue, (h) => {
|
|
3359
|
+
D(h) && (j.value = h);
|
|
3360
|
+
}), R(j, (h) => {
|
|
3361
|
+
D(h) && l.setDefaultOpenValue(h);
|
|
3362
|
+
}), j.value = t.defaultOpenValue, R(l.changedValue, (h) => {
|
|
3363
|
+
n.emit("valueChange", h);
|
|
3364
|
+
}), R(() => t.modelValue, (h) => {
|
|
3365
|
+
V(h);
|
|
3366
|
+
}), R(() => t.format, (h) => {
|
|
3367
|
+
D(h) ? w.value = h : w.value = "HH:mm:ss";
|
|
3368
|
+
}), R(w, (h) => {
|
|
3369
|
+
D(h) && (l.setFormat(w.value), C.value = 0, Z.value && C.value++, ae.value && C.value++, ie.value && C.value++, T.value && (C.value++, Fe()), r.value = C.value * 66);
|
|
3370
|
+
}), R(() => t.use12Hours, (h) => {
|
|
3371
|
+
T.value = h;
|
|
3372
|
+
}), R(T, (h) => {
|
|
3373
|
+
w.value = ct(w.value, h), l.setUse12Hours(h);
|
|
3441
3374
|
}), R(() => t.disabledHours, () => {
|
|
3442
|
-
|
|
3375
|
+
we();
|
|
3443
3376
|
}), R(() => t.disabledMinutes, () => {
|
|
3444
|
-
|
|
3377
|
+
pe();
|
|
3445
3378
|
}), R(() => t.disabledSeconds, () => {
|
|
3446
|
-
|
|
3379
|
+
se();
|
|
3447
3380
|
});
|
|
3448
|
-
function
|
|
3449
|
-
if (
|
|
3450
|
-
l.text =
|
|
3451
|
-
const x =
|
|
3452
|
-
l.setValue(x,
|
|
3381
|
+
function V(h) {
|
|
3382
|
+
if (D(h)) {
|
|
3383
|
+
l.text = h;
|
|
3384
|
+
const x = ut(l.text, w.value);
|
|
3385
|
+
l.setValue(x, T.value), Ne();
|
|
3453
3386
|
} else
|
|
3454
|
-
l.setUse12Hours(
|
|
3387
|
+
l.setUse12Hours(T.value);
|
|
3455
3388
|
}
|
|
3456
|
-
function
|
|
3457
|
-
let
|
|
3458
|
-
return t.disabledHours && (
|
|
3389
|
+
function S() {
|
|
3390
|
+
let h = [];
|
|
3391
|
+
return t.disabledHours && (h = t.disabledHours(), T.value && (l.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;
|
|
3459
3392
|
}
|
|
3460
|
-
function
|
|
3461
|
-
return
|
|
3393
|
+
function g(h = "hour") {
|
|
3394
|
+
return w.value ? w.value.indexOf(h[0].toUpperCase()) > -1 || w.value.indexOf(h[0].toLowerCase()) > -1 : !1;
|
|
3462
3395
|
}
|
|
3463
|
-
const
|
|
3396
|
+
const _ = B(() => ({
|
|
3464
3397
|
"time-picker-panel": !0,
|
|
3465
3398
|
"time-picker-panel-column-3": !0,
|
|
3466
3399
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
3467
3400
|
"f-area-show": !0
|
|
3468
|
-
})),
|
|
3469
|
-
width:
|
|
3470
|
-
})),
|
|
3471
|
-
function
|
|
3472
|
-
return x = Math.ceil(x), new Array(Math.ceil(
|
|
3401
|
+
})), $ = B(() => ({
|
|
3402
|
+
width: T.value ? `${r.value}px` : "100%"
|
|
3403
|
+
})), Z = B(() => g("hour")), ae = B(() => g("minute")), ie = B(() => g("second"));
|
|
3404
|
+
function be(h, x = 1, G = 0) {
|
|
3405
|
+
return x = Math.ceil(x), new Array(Math.ceil(h / x)).fill(0).map((H, ue) => (ue + G) * x);
|
|
3473
3406
|
}
|
|
3474
|
-
function
|
|
3475
|
-
if (
|
|
3476
|
-
const x = (
|
|
3477
|
-
|
|
3407
|
+
function ht() {
|
|
3408
|
+
if (Z.value && f.value && m(f.value, D(l.viewHours) ? l.viewHours : l.defaultViewHours, 0, "hour", l), ae.value && c.value && m(c.value, D(l.minutes) ? l.minutes : l.defaultMinutes, 0, "minute", l), ie.value && d.value && m(d.value, D(l.seconds) ? l.seconds : l.defaultSeconds, 0, "second", l), T.value && u.value) {
|
|
3409
|
+
const x = (D(l.selected12Hours) ? l.selected12Hours : l.default12Hours) === "AM" ? 0 : 1;
|
|
3410
|
+
m(u.value, x, 0, "12-hour", l);
|
|
3478
3411
|
}
|
|
3479
3412
|
}
|
|
3480
|
-
function
|
|
3481
|
-
let
|
|
3482
|
-
|
|
3483
|
-
const
|
|
3484
|
-
if (o.value =
|
|
3485
|
-
index:
|
|
3486
|
-
disabled:
|
|
3487
|
-
})),
|
|
3488
|
-
const
|
|
3489
|
-
|
|
3413
|
+
function we() {
|
|
3414
|
+
let h = 24, x = 0;
|
|
3415
|
+
T.value && (h = 12, x = 1);
|
|
3416
|
+
const G = S();
|
|
3417
|
+
if (o.value = be(h, M.value, x).map((H) => ({
|
|
3418
|
+
index: H,
|
|
3419
|
+
disabled: G.length > 0 && G.indexOf(H) !== -1
|
|
3420
|
+
})), T.value && o.value[o.value.length - 1].index === 12) {
|
|
3421
|
+
const H = [...o.value];
|
|
3422
|
+
H.unshift(H[H.length - 1]), H.splice(H.length - 1, 1), o.value = H;
|
|
3490
3423
|
}
|
|
3491
|
-
o.value = o.value.filter((
|
|
3424
|
+
o.value = o.value.filter((H) => !(N.value && H.disabled));
|
|
3492
3425
|
}
|
|
3493
|
-
function
|
|
3494
|
-
a.value =
|
|
3495
|
-
index:
|
|
3496
|
-
disabled: !!t.disabledMinutes && t.disabledMinutes(l.hours).indexOf(
|
|
3497
|
-
})), a.value = a.value.filter((
|
|
3426
|
+
function pe() {
|
|
3427
|
+
a.value = be(60, E.value).map((h) => ({
|
|
3428
|
+
index: h,
|
|
3429
|
+
disabled: !!t.disabledMinutes && t.disabledMinutes(l.hours).indexOf(h) !== -1
|
|
3430
|
+
})), a.value = a.value.filter((h) => !(N.value && h.disabled));
|
|
3498
3431
|
}
|
|
3499
|
-
function
|
|
3500
|
-
|
|
3501
|
-
index:
|
|
3502
|
-
disabled: !!t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes).indexOf(
|
|
3503
|
-
})),
|
|
3432
|
+
function se() {
|
|
3433
|
+
s.value = be(60, I.value).map((h) => ({
|
|
3434
|
+
index: h,
|
|
3435
|
+
disabled: !!t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes).indexOf(h) !== -1
|
|
3436
|
+
})), s.value = s.value.filter((h) => !(N.value && h.disabled));
|
|
3504
3437
|
}
|
|
3505
3438
|
function Fe() {
|
|
3506
|
-
const
|
|
3507
|
-
|
|
3439
|
+
const h = w.value.includes("A");
|
|
3440
|
+
i.value = [{
|
|
3508
3441
|
index: 0,
|
|
3509
|
-
value:
|
|
3442
|
+
value: h ? "AM" : "am"
|
|
3510
3443
|
}, {
|
|
3511
3444
|
index: 1,
|
|
3512
|
-
value:
|
|
3513
|
-
}],
|
|
3445
|
+
value: h ? "PM" : "pm"
|
|
3446
|
+
}], i.value = i.value.filter(() => !N.value);
|
|
3514
3447
|
}
|
|
3515
|
-
function
|
|
3516
|
-
if (
|
|
3517
|
-
if (
|
|
3518
|
-
|
|
3519
|
-
const
|
|
3520
|
-
if (
|
|
3448
|
+
function yt(h, x) {
|
|
3449
|
+
if (h.stopPropagation(), l.setHours(x.index, x.disabled), !x.disabled) {
|
|
3450
|
+
if (m(f.value, x.index, 120, "hour", l), t.disabledMinutes !== null) {
|
|
3451
|
+
pe();
|
|
3452
|
+
const G = a.value.filter((H) => !H.disabled);
|
|
3453
|
+
if (!G.find((H) => H.index === l.minutes)) {
|
|
3521
3454
|
const {
|
|
3522
|
-
index:
|
|
3523
|
-
disabled:
|
|
3524
|
-
} =
|
|
3525
|
-
l.setMinutes(
|
|
3455
|
+
index: H,
|
|
3456
|
+
disabled: ue
|
|
3457
|
+
} = G[0];
|
|
3458
|
+
l.setMinutes(H, ue);
|
|
3526
3459
|
}
|
|
3527
3460
|
}
|
|
3528
|
-
(t.disabledSeconds !== null || t.disabledMinutes !== null) &&
|
|
3461
|
+
(t.disabledSeconds !== null || t.disabledMinutes !== null) && se();
|
|
3529
3462
|
}
|
|
3530
3463
|
}
|
|
3531
|
-
function
|
|
3532
|
-
|
|
3464
|
+
function gt(h, x) {
|
|
3465
|
+
h.stopPropagation(), l.selected12Hours = x.value, we(), pe(), se(), m(u.value, x.index, 120, "12-hour", l);
|
|
3533
3466
|
}
|
|
3534
|
-
function
|
|
3535
|
-
if (
|
|
3536
|
-
|
|
3537
|
-
const
|
|
3538
|
-
if (
|
|
3467
|
+
function bt(h, x) {
|
|
3468
|
+
if (h.stopPropagation(), l.setMinutes(x.index, x.disabled), !x.disabled && (m(c.value, x.index, 120, "minute", l), t.disabledSeconds !== null)) {
|
|
3469
|
+
se();
|
|
3470
|
+
const G = s.value.filter((H) => !H.disabled);
|
|
3471
|
+
if (!G.find((H) => H.index === l.seconds)) {
|
|
3539
3472
|
const {
|
|
3540
|
-
index:
|
|
3541
|
-
disabled:
|
|
3542
|
-
} =
|
|
3543
|
-
l.setSeconds(
|
|
3473
|
+
index: H,
|
|
3474
|
+
disabled: ue
|
|
3475
|
+
} = G[0];
|
|
3476
|
+
l.setSeconds(H, ue);
|
|
3544
3477
|
}
|
|
3545
3478
|
}
|
|
3546
3479
|
}
|
|
3547
|
-
function
|
|
3548
|
-
|
|
3480
|
+
function wt(h, x) {
|
|
3481
|
+
h.stopPropagation(), l.setSeconds(x.index, x.disabled), !x.disabled && m(d.value, x.index, 120, "second", l);
|
|
3549
3482
|
}
|
|
3550
|
-
function
|
|
3551
|
-
|
|
3483
|
+
function Ne() {
|
|
3484
|
+
we(), pe(), se(), Fe();
|
|
3552
3485
|
}
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3486
|
+
fe(() => {
|
|
3487
|
+
w.value = t.format, T.value = t.use12Hours, V(t.modelValue), Ne(), setTimeout(() => {
|
|
3488
|
+
ht();
|
|
3556
3489
|
}, 10);
|
|
3557
3490
|
});
|
|
3558
|
-
function
|
|
3559
|
-
return t.showHeader ?
|
|
3491
|
+
function vt() {
|
|
3492
|
+
return t.showHeader ? b("div", {
|
|
3560
3493
|
class: e + "-combobox time-picker-panel-header",
|
|
3561
|
-
style:
|
|
3562
|
-
}, [
|
|
3494
|
+
style: $.value
|
|
3495
|
+
}, [Z.value && b("div", {
|
|
3563
3496
|
class: e + "-select",
|
|
3564
3497
|
style: "height: 32px"
|
|
3565
|
-
}, [
|
|
3566
|
-
class: "time-header" +
|
|
3567
|
-
}, [
|
|
3498
|
+
}, [b("ul", null, [b("li", {
|
|
3499
|
+
class: "time-header" + ae.value ? "time-header-split" : ""
|
|
3500
|
+
}, [ve("时")])])]), ae.value && b("div", {
|
|
3568
3501
|
class: e + "-select",
|
|
3569
3502
|
style: "height: 32px"
|
|
3570
|
-
}, [
|
|
3571
|
-
class: "time-header" +
|
|
3572
|
-
}, [
|
|
3503
|
+
}, [b("ul", null, [b("li", {
|
|
3504
|
+
class: "time-header" + ie.value ? "time-header-split" : ""
|
|
3505
|
+
}, [ve("分")])])]), ie.value && b("div", {
|
|
3573
3506
|
class: e + "-select",
|
|
3574
3507
|
style: "height: 32px"
|
|
3575
|
-
}, [
|
|
3508
|
+
}, [b("ul", null, [b("li", {
|
|
3576
3509
|
class: "time-header"
|
|
3577
|
-
}, [
|
|
3510
|
+
}, [ve("秒")])])]), t.use12Hours && b("div", {
|
|
3578
3511
|
class: e + "-select",
|
|
3579
3512
|
style: "height: 32px"
|
|
3580
|
-
}, [
|
|
3513
|
+
}, [b("ul", null, [b("li", {
|
|
3581
3514
|
class: "time-header"
|
|
3582
3515
|
}, null)])])]) : null;
|
|
3583
3516
|
}
|
|
3584
|
-
return () =>
|
|
3585
|
-
class:
|
|
3586
|
-
}, [
|
|
3517
|
+
return () => b("div", {
|
|
3518
|
+
class: _.value
|
|
3519
|
+
}, [b("div", {
|
|
3587
3520
|
class: "farris-timer-picker"
|
|
3588
|
-
}, [
|
|
3521
|
+
}, [b("div", {
|
|
3589
3522
|
class: e + "-inner"
|
|
3590
|
-
}, [
|
|
3523
|
+
}, [vt(), b("div", {
|
|
3591
3524
|
class: e + "-combobox",
|
|
3592
|
-
style:
|
|
3593
|
-
}, [
|
|
3525
|
+
style: $.value
|
|
3526
|
+
}, [Z.value && b("div", {
|
|
3594
3527
|
class: e + "-select",
|
|
3595
|
-
ref:
|
|
3596
|
-
}, [
|
|
3597
|
-
class: y(
|
|
3598
|
-
onClick: (x) =>
|
|
3599
|
-
}, [`${
|
|
3528
|
+
ref: f
|
|
3529
|
+
}, [b("ul", null, [o.value.map((h) => b("li", {
|
|
3530
|
+
class: y(h, "hour"),
|
|
3531
|
+
onClick: (x) => yt(x, h)
|
|
3532
|
+
}, [`${h.index}`]))])]), ae.value && b("div", {
|
|
3600
3533
|
class: e + "-select",
|
|
3601
3534
|
ref: c
|
|
3602
|
-
}, [
|
|
3603
|
-
class: y(
|
|
3604
|
-
onClick: (x) =>
|
|
3605
|
-
}, [`${
|
|
3535
|
+
}, [b("ul", null, [a.value.map((h) => b("li", {
|
|
3536
|
+
class: y(h, "minute"),
|
|
3537
|
+
onClick: (x) => bt(x, h)
|
|
3538
|
+
}, [`${h.index}`]))])]), ie.value && b("div", {
|
|
3606
3539
|
class: e + "-select",
|
|
3607
3540
|
ref: d
|
|
3608
|
-
}, [
|
|
3609
|
-
class: y(
|
|
3610
|
-
onClick: (x) =>
|
|
3611
|
-
}, [`${
|
|
3541
|
+
}, [b("ul", null, [s.value.map((h) => b("li", {
|
|
3542
|
+
class: y(h, "second"),
|
|
3543
|
+
onClick: (x) => wt(x, h)
|
|
3544
|
+
}, [`${h.index}`]))])]), T.value && b("div", {
|
|
3612
3545
|
class: e + "-select",
|
|
3613
3546
|
ref: u
|
|
3614
|
-
}, [
|
|
3615
|
-
class: y(
|
|
3616
|
-
onClick: (x) =>
|
|
3617
|
-
}, [`${
|
|
3547
|
+
}, [b("ul", null, [i.value.map((h) => b("li", {
|
|
3548
|
+
class: y(h, "12-hour"),
|
|
3549
|
+
onClick: (x) => gt(x, h)
|
|
3550
|
+
}, [`${h.value}`]))])])])])])]);
|
|
3618
3551
|
}
|
|
3619
|
-
}),
|
|
3552
|
+
}), te = /* @__PURE__ */ re({
|
|
3620
3553
|
name: "FTimePicker",
|
|
3621
|
-
props:
|
|
3554
|
+
props: De,
|
|
3622
3555
|
emits: ["update:modelValue", "valueChange", "clear"],
|
|
3623
3556
|
setup(t, n) {
|
|
3624
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(null), a = v(),
|
|
3625
|
-
function
|
|
3557
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(null), a = v(), s = B(() => ct(t.format, t.use12Hours));
|
|
3558
|
+
function i() {
|
|
3626
3559
|
r.value = "", n.emit("clear");
|
|
3627
3560
|
}
|
|
3628
|
-
function
|
|
3561
|
+
function f() {
|
|
3629
3562
|
if (r.value) {
|
|
3630
|
-
const u =
|
|
3631
|
-
r.value =
|
|
3563
|
+
const u = ut(r.value, s.value);
|
|
3564
|
+
r.value = lt(u, s.value);
|
|
3632
3565
|
}
|
|
3633
3566
|
}
|
|
3634
3567
|
function c() {
|
|
3635
|
-
|
|
3568
|
+
f();
|
|
3636
3569
|
}
|
|
3637
3570
|
function d(u) {
|
|
3638
3571
|
r.value = u.text;
|
|
3639
3572
|
}
|
|
3640
|
-
return
|
|
3573
|
+
return f(), R(() => t.modelValue, (u) => {
|
|
3641
3574
|
r.value = u;
|
|
3642
3575
|
}), R(r, (u) => {
|
|
3643
3576
|
n.emit("valueChange", u), n.emit("update:modelValue", u);
|
|
3644
|
-
}), () =>
|
|
3577
|
+
}), () => b(Et, {
|
|
3645
3578
|
ref: o,
|
|
3646
3579
|
modelValue: r.value,
|
|
3647
3580
|
"onUpdate:modelValue": (u) => r.value = u,
|
|
3648
|
-
disable: t.
|
|
3581
|
+
disable: t.disabled,
|
|
3649
3582
|
readonly: t.readonly,
|
|
3650
3583
|
editable: t.editable,
|
|
3651
3584
|
buttonContent: e,
|
|
3652
3585
|
placeholder: t.placeholder,
|
|
3653
3586
|
enableClear: !0,
|
|
3654
|
-
onClear:
|
|
3587
|
+
onClear: i,
|
|
3655
3588
|
onBlur: c
|
|
3656
3589
|
}, {
|
|
3657
|
-
default: () => [
|
|
3590
|
+
default: () => [b(Ce, Pe({
|
|
3658
3591
|
ref: a
|
|
3659
3592
|
}, t, {
|
|
3660
3593
|
onValueChange: d
|
|
3661
3594
|
}), null)]
|
|
3662
3595
|
});
|
|
3663
3596
|
}
|
|
3664
|
-
}),
|
|
3665
|
-
["appearance",
|
|
3597
|
+
}), io = /* @__PURE__ */ new Map([
|
|
3598
|
+
["appearance", Vt]
|
|
3666
3599
|
]);
|
|
3667
|
-
function
|
|
3600
|
+
function so(t, n, e) {
|
|
3668
3601
|
return n;
|
|
3669
3602
|
}
|
|
3670
|
-
const
|
|
3603
|
+
const uo = "https://json-schema.org/draft/2020-12/schema", lo = "https://farris-design.gitee.io/button-edit.schema.json", co = "button-edit", fo = "A Farris Input Component", po = "object", mo = {
|
|
3671
3604
|
id: {
|
|
3672
3605
|
description: "The unique identifier for a Input Group",
|
|
3673
3606
|
type: "string"
|
|
@@ -3851,18 +3784,18 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3851
3784
|
type: "string",
|
|
3852
3785
|
default: ""
|
|
3853
3786
|
}
|
|
3854
|
-
},
|
|
3787
|
+
}, ho = [
|
|
3855
3788
|
"id",
|
|
3856
3789
|
"type"
|
|
3857
|
-
],
|
|
3858
|
-
$schema:
|
|
3859
|
-
$id:
|
|
3860
|
-
title:
|
|
3861
|
-
description:
|
|
3862
|
-
type:
|
|
3863
|
-
properties:
|
|
3864
|
-
required:
|
|
3865
|
-
},
|
|
3790
|
+
], yo = {
|
|
3791
|
+
$schema: uo,
|
|
3792
|
+
$id: lo,
|
|
3793
|
+
title: co,
|
|
3794
|
+
description: fo,
|
|
3795
|
+
type: po,
|
|
3796
|
+
properties: mo,
|
|
3797
|
+
required: ho
|
|
3798
|
+
}, go = "buttonEdit", bo = "A Farris Component", wo = "object", vo = {
|
|
3866
3799
|
basic: {
|
|
3867
3800
|
description: "Basic Infomation",
|
|
3868
3801
|
title: "基本信息",
|
|
@@ -3944,12 +3877,12 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3944
3877
|
}
|
|
3945
3878
|
}
|
|
3946
3879
|
}
|
|
3947
|
-
},
|
|
3948
|
-
title:
|
|
3949
|
-
description:
|
|
3950
|
-
type:
|
|
3951
|
-
categories:
|
|
3952
|
-
},
|
|
3880
|
+
}, xo = {
|
|
3881
|
+
title: go,
|
|
3882
|
+
description: bo,
|
|
3883
|
+
type: wo,
|
|
3884
|
+
categories: vo
|
|
3885
|
+
}, Ve = {
|
|
3953
3886
|
/**
|
|
3954
3887
|
* 组件标识
|
|
3955
3888
|
*/
|
|
@@ -4055,30 +3988,30 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
4055
3988
|
* 打开前
|
|
4056
3989
|
*/
|
|
4057
3990
|
beforeOpen: { type: Function, default: null }
|
|
4058
|
-
},
|
|
3991
|
+
}, dt = Ge(Ve, yo, io, so, xo), Mo = {
|
|
4059
3992
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
4060
3993
|
host: { type: Object },
|
|
4061
3994
|
backgroundColor: { type: String, default: "" }
|
|
4062
|
-
}, ko = /* @__PURE__ */
|
|
3995
|
+
}, ko = /* @__PURE__ */ re({
|
|
4063
3996
|
name: "FOverlay",
|
|
4064
|
-
props:
|
|
3997
|
+
props: Mo,
|
|
4065
3998
|
emits: ["click"],
|
|
4066
3999
|
setup(t, n) {
|
|
4067
|
-
const e = v(t.popupContentPosition), r = v(t.host), o =
|
|
4000
|
+
const e = v(t.popupContentPosition), r = v(t.host), o = B(() => ({
|
|
4068
4001
|
backgroundColor: t.backgroundColor || "",
|
|
4069
4002
|
pointerEvents: "auto"
|
|
4070
4003
|
}));
|
|
4071
|
-
function a(
|
|
4072
|
-
n.emit("click"),
|
|
4004
|
+
function a(i) {
|
|
4005
|
+
n.emit("click"), i.preventDefault(), i.stopPropagation();
|
|
4073
4006
|
}
|
|
4074
|
-
|
|
4075
|
-
const
|
|
4076
|
-
if (
|
|
4077
|
-
const
|
|
4007
|
+
B(() => {
|
|
4008
|
+
const i = r.value;
|
|
4009
|
+
if (i) {
|
|
4010
|
+
const f = i.getBoundingClientRect(), {
|
|
4078
4011
|
left: c,
|
|
4079
4012
|
top: d,
|
|
4080
4013
|
height: u
|
|
4081
|
-
} =
|
|
4014
|
+
} = f;
|
|
4082
4015
|
return {
|
|
4083
4016
|
left: c,
|
|
4084
4017
|
top: d + u
|
|
@@ -4086,34 +4019,34 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
4086
4019
|
}
|
|
4087
4020
|
return e.value;
|
|
4088
4021
|
});
|
|
4089
|
-
const
|
|
4022
|
+
const s = B(() => ({
|
|
4090
4023
|
// position: 'relative',
|
|
4091
4024
|
// left: `${position.value.left}px`,
|
|
4092
4025
|
// top: `${position.value.top}px`
|
|
4093
4026
|
}));
|
|
4094
|
-
return () =>
|
|
4027
|
+
return () => b(kt, {
|
|
4095
4028
|
to: "body"
|
|
4096
4029
|
}, {
|
|
4097
4030
|
default: () => {
|
|
4098
|
-
var
|
|
4099
|
-
return [
|
|
4031
|
+
var i, f;
|
|
4032
|
+
return [b("div", {
|
|
4100
4033
|
class: "overlay-container",
|
|
4101
4034
|
onClick: (c) => a(c),
|
|
4102
4035
|
style: o.value
|
|
4103
|
-
}, [
|
|
4104
|
-
style:
|
|
4105
|
-
}, [(
|
|
4036
|
+
}, [b("div", {
|
|
4037
|
+
style: s.value
|
|
4038
|
+
}, [(f = (i = n.slots).default) == null ? void 0 : f.call(i)])])];
|
|
4106
4039
|
}
|
|
4107
4040
|
});
|
|
4108
4041
|
}
|
|
4109
4042
|
});
|
|
4110
|
-
function
|
|
4043
|
+
function To(t) {
|
|
4111
4044
|
if (t.content && t.content.render)
|
|
4112
4045
|
return t.content.render;
|
|
4113
4046
|
if (t.render && typeof t.render == "function")
|
|
4114
4047
|
return t.render;
|
|
4115
4048
|
}
|
|
4116
|
-
function
|
|
4049
|
+
function Co(t) {
|
|
4117
4050
|
const n = document.createElement("div");
|
|
4118
4051
|
n.style.display = "contents";
|
|
4119
4052
|
let e;
|
|
@@ -4121,13 +4054,13 @@ function Do(t) {
|
|
|
4121
4054
|
}), o = () => {
|
|
4122
4055
|
r(), e && e.unmount();
|
|
4123
4056
|
};
|
|
4124
|
-
return e =
|
|
4057
|
+
return e = Tt({
|
|
4125
4058
|
setup() {
|
|
4126
|
-
|
|
4059
|
+
Ct(() => {
|
|
4127
4060
|
document.body.removeChild(n);
|
|
4128
4061
|
});
|
|
4129
|
-
const a =
|
|
4130
|
-
return () =>
|
|
4062
|
+
const a = To(t);
|
|
4063
|
+
return () => b(ko, {
|
|
4131
4064
|
"popup-content-position": t.popupPosition,
|
|
4132
4065
|
host: t.host,
|
|
4133
4066
|
onClick: o,
|
|
@@ -4138,13 +4071,13 @@ function Do(t) {
|
|
|
4138
4071
|
}
|
|
4139
4072
|
}), document.body.appendChild(n), e.mount(n), e;
|
|
4140
4073
|
}
|
|
4141
|
-
class
|
|
4074
|
+
class Po {
|
|
4142
4075
|
static show(n) {
|
|
4143
|
-
return
|
|
4076
|
+
return Co(n);
|
|
4144
4077
|
}
|
|
4145
4078
|
}
|
|
4146
|
-
const
|
|
4147
|
-
function
|
|
4079
|
+
const Oo = Symbol("FModalService");
|
|
4080
|
+
function ft(t, n) {
|
|
4148
4081
|
function e() {
|
|
4149
4082
|
const r = t.beforeOpen || t.beforeClickButton || null;
|
|
4150
4083
|
let o = Promise.resolve(!0);
|
|
@@ -4158,57 +4091,57 @@ function lt(t, n) {
|
|
|
4158
4091
|
}
|
|
4159
4092
|
return { judgeCanOpen: e };
|
|
4160
4093
|
}
|
|
4161
|
-
function
|
|
4162
|
-
const a = v(t.buttonBehavior),
|
|
4094
|
+
function pt(t, n, e, r, o) {
|
|
4095
|
+
const a = v(t.buttonBehavior), s = v(t.popupOnInput), i = B(() => ({
|
|
4163
4096
|
"input-group-append": !0,
|
|
4164
4097
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4165
|
-
})), { judgeCanOpen:
|
|
4098
|
+
})), { judgeCanOpen: f } = ft(t, o), c = B(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = me(Oo, null), u = v();
|
|
4166
4099
|
async function l(M) {
|
|
4167
|
-
if (await
|
|
4168
|
-
const
|
|
4100
|
+
if (await f() && c.value) {
|
|
4101
|
+
const E = !!n.slots.default;
|
|
4169
4102
|
if (a.value === "Modal") {
|
|
4170
|
-
const
|
|
4171
|
-
...
|
|
4103
|
+
const I = t.modalOptions, j = d == null ? void 0 : d.open({
|
|
4104
|
+
...I,
|
|
4172
4105
|
render: () => n.slots.default && n.slots.default()
|
|
4173
4106
|
});
|
|
4174
|
-
u.value =
|
|
4107
|
+
u.value = j == null ? void 0 : j.modalRef;
|
|
4175
4108
|
}
|
|
4176
|
-
a.value === "Overlay" &&
|
|
4109
|
+
a.value === "Overlay" && Po.show({
|
|
4177
4110
|
// host: buttonEditRef.value,
|
|
4178
4111
|
host: document.body,
|
|
4179
4112
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
4180
4113
|
render: () => n.slots.default && n.slots.default()
|
|
4181
|
-
}),
|
|
4114
|
+
}), E && a.value === "Popup" && r.togglePopup(!0), E && s.value && r.hidePopup(), n.emit("clickButton", { origin: M, value: t.modelValue });
|
|
4182
4115
|
}
|
|
4183
4116
|
}
|
|
4184
|
-
function
|
|
4117
|
+
function m(M) {
|
|
4185
4118
|
n.emit("mouseEnterIcon", M);
|
|
4186
4119
|
}
|
|
4187
4120
|
function y(M) {
|
|
4188
4121
|
n.emit("mouseLeaveIcon", M);
|
|
4189
4122
|
}
|
|
4190
4123
|
return {
|
|
4191
|
-
buttonGroupClass:
|
|
4124
|
+
buttonGroupClass: i,
|
|
4192
4125
|
onClickButton: l,
|
|
4193
|
-
onMouseEnterButton:
|
|
4126
|
+
onMouseEnterButton: m,
|
|
4194
4127
|
onMouseLeaveButton: y,
|
|
4195
4128
|
modalRef: u
|
|
4196
4129
|
};
|
|
4197
4130
|
}
|
|
4198
|
-
function
|
|
4199
|
-
const
|
|
4200
|
-
function c(
|
|
4201
|
-
|
|
4131
|
+
function Do(t, n, e, r, o, a) {
|
|
4132
|
+
const s = v(!1), i = B(() => t.enableClear && !t.readonly && !t.disable), { changeTextBoxValue: f } = a;
|
|
4133
|
+
function c(m) {
|
|
4134
|
+
s.value = m;
|
|
4202
4135
|
}
|
|
4203
4136
|
R(o, () => {
|
|
4204
4137
|
c(!!o.value);
|
|
4205
4138
|
});
|
|
4206
|
-
function d(
|
|
4139
|
+
function d(m) {
|
|
4207
4140
|
const y = !t.readonly && !t.disable && t.editable, M = !t.editable;
|
|
4208
|
-
|
|
4141
|
+
m.stopPropagation(), (y || M) && (f("", !1), c(!s.value), n.emit("clear"));
|
|
4209
4142
|
}
|
|
4210
|
-
function u(
|
|
4211
|
-
if (
|
|
4143
|
+
function u(m) {
|
|
4144
|
+
if (i.value) {
|
|
4212
4145
|
if (!e.value) {
|
|
4213
4146
|
c(!1);
|
|
4214
4147
|
return;
|
|
@@ -4216,133 +4149,133 @@ function dt(t, n, e, r, o, a) {
|
|
|
4216
4149
|
!t.disable && !t.readonly && c(!0);
|
|
4217
4150
|
}
|
|
4218
4151
|
}
|
|
4219
|
-
function l(
|
|
4220
|
-
|
|
4152
|
+
function l(m) {
|
|
4153
|
+
i.value && c(!1);
|
|
4221
4154
|
}
|
|
4222
4155
|
return {
|
|
4223
|
-
enableClearButton:
|
|
4224
|
-
showClearButton:
|
|
4156
|
+
enableClearButton: i,
|
|
4157
|
+
showClearButton: s,
|
|
4225
4158
|
onClearValue: d,
|
|
4226
4159
|
onMouseEnterTextBox: u,
|
|
4227
4160
|
onMouseLeaveTextBox: l
|
|
4228
4161
|
};
|
|
4229
4162
|
}
|
|
4230
|
-
function
|
|
4231
|
-
const a =
|
|
4163
|
+
function Ho(t, n, e, r, o) {
|
|
4164
|
+
const a = B(() => t.popupOnInput), s = B(() => t.popupOnFocus), { shouldPopupContent: i } = o, f = B(() => t.enableTitle ? e.value : ""), c = B(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), d = B(() => t.readonly || !t.editable), u = v(!1), l = B(() => !t.disable && u.value), m = B(() => ({
|
|
4232
4165
|
"text-left": t.textAlign === "left",
|
|
4233
4166
|
"text-center": t.textAlign === "center",
|
|
4234
4167
|
"text-right": t.textAlign === "right",
|
|
4235
4168
|
"form-control": !0,
|
|
4236
4169
|
"f-utils-fill": !0
|
|
4237
|
-
})), y =
|
|
4170
|
+
})), y = B(() => ({
|
|
4238
4171
|
"input-group": !0,
|
|
4239
4172
|
"f-state-disable": t.disable,
|
|
4240
4173
|
"f-state-editable": t.editable && !t.disable && !t.readonly,
|
|
4241
4174
|
"f-state-readonly": t.readonly && !t.disable,
|
|
4242
4175
|
"f-state-focus": l.value
|
|
4243
4176
|
}));
|
|
4244
|
-
function M(
|
|
4245
|
-
e.value !==
|
|
4177
|
+
function M(g, _ = !0) {
|
|
4178
|
+
e.value !== g && (e.value = g, _ && n.emit("change", g), n.emit("update:modelValue", g));
|
|
4246
4179
|
}
|
|
4247
|
-
function
|
|
4248
|
-
|
|
4180
|
+
function E(g) {
|
|
4181
|
+
i.value = !1, M(g, !0);
|
|
4249
4182
|
}
|
|
4250
4183
|
R(
|
|
4251
4184
|
() => t.modelValue,
|
|
4252
|
-
(
|
|
4253
|
-
e.value =
|
|
4185
|
+
(g) => {
|
|
4186
|
+
e.value = g;
|
|
4254
4187
|
}
|
|
4255
4188
|
);
|
|
4256
|
-
function
|
|
4257
|
-
u.value = !1, n.emit("blur",
|
|
4189
|
+
function I(g) {
|
|
4190
|
+
u.value = !1, n.emit("blur", g), g.stopPropagation();
|
|
4258
4191
|
}
|
|
4259
|
-
function
|
|
4260
|
-
n.emit("click",
|
|
4192
|
+
function j(g) {
|
|
4193
|
+
n.emit("click", g);
|
|
4261
4194
|
}
|
|
4262
|
-
function g
|
|
4263
|
-
t.disable || (u.value = !0, d.value || (n.emit("focus",
|
|
4195
|
+
function w(g) {
|
|
4196
|
+
t.disable || (u.value = !0, d.value || (n.emit("focus", g), s.value && !i.value && o.popup()));
|
|
4264
4197
|
}
|
|
4265
|
-
function
|
|
4266
|
-
n.emit("input",
|
|
4267
|
-
const
|
|
4268
|
-
r.value =
|
|
4198
|
+
function T(g) {
|
|
4199
|
+
n.emit("input", g.target.value);
|
|
4200
|
+
const _ = g.target.value;
|
|
4201
|
+
r.value = _, e.value !== _ && M(_, !0), a.value && !i.value && o.popup();
|
|
4269
4202
|
}
|
|
4270
|
-
function
|
|
4271
|
-
|
|
4203
|
+
function N(g) {
|
|
4204
|
+
g.target.tagName !== "INPUT" && g.preventDefault(), g.stopPropagation();
|
|
4272
4205
|
}
|
|
4273
|
-
function
|
|
4274
|
-
n.emit("keydown",
|
|
4206
|
+
function C(g) {
|
|
4207
|
+
n.emit("keydown", g);
|
|
4275
4208
|
}
|
|
4276
|
-
function
|
|
4277
|
-
|
|
4209
|
+
function V(g) {
|
|
4210
|
+
g.key === "Enter" && (a.value || s.value) && o.hidePopup(), n.emit("keyup", g);
|
|
4278
4211
|
}
|
|
4279
|
-
function
|
|
4280
|
-
const
|
|
4281
|
-
|
|
4212
|
+
function S(g) {
|
|
4213
|
+
const _ = g.target.value;
|
|
4214
|
+
g.stopPropagation(), M(_);
|
|
4282
4215
|
}
|
|
4283
4216
|
return {
|
|
4284
4217
|
hasFocusedTextBox: l,
|
|
4285
4218
|
isTextBoxReadonly: d,
|
|
4286
|
-
textBoxClass:
|
|
4219
|
+
textBoxClass: m,
|
|
4287
4220
|
textBoxPlaceholder: c,
|
|
4288
|
-
textBoxTitle:
|
|
4221
|
+
textBoxTitle: f,
|
|
4289
4222
|
inputGroupClass: y,
|
|
4290
4223
|
changeTextBoxValue: M,
|
|
4291
|
-
commitValue:
|
|
4292
|
-
onBlurTextBox:
|
|
4293
|
-
onClickTextBox:
|
|
4294
|
-
onFocusTextBox:
|
|
4295
|
-
onInput:
|
|
4296
|
-
onKeyDownTextBox:
|
|
4297
|
-
onKeyUpTextBox:
|
|
4298
|
-
onMouseDownTextBox:
|
|
4299
|
-
onTextBoxValueChange:
|
|
4224
|
+
commitValue: E,
|
|
4225
|
+
onBlurTextBox: I,
|
|
4226
|
+
onClickTextBox: j,
|
|
4227
|
+
onFocusTextBox: w,
|
|
4228
|
+
onInput: T,
|
|
4229
|
+
onKeyDownTextBox: C,
|
|
4230
|
+
onKeyUpTextBox: V,
|
|
4231
|
+
onMouseDownTextBox: N,
|
|
4232
|
+
onTextBoxValueChange: S
|
|
4300
4233
|
};
|
|
4301
4234
|
}
|
|
4302
|
-
function
|
|
4303
|
-
const o = v(), a = v(!1), { judgeCanOpen:
|
|
4304
|
-
function
|
|
4235
|
+
function mt(t, n, e, r) {
|
|
4236
|
+
const o = v(), a = v(!1), { judgeCanOpen: s } = ft(t, r);
|
|
4237
|
+
function i() {
|
|
4305
4238
|
const u = o.value;
|
|
4306
4239
|
u && u.show(e.value);
|
|
4307
4240
|
}
|
|
4308
|
-
async function
|
|
4241
|
+
async function f(u = !1) {
|
|
4309
4242
|
if (!!n.slots.default) {
|
|
4310
|
-
if (!u && !a.value && !await
|
|
4243
|
+
if (!u && !a.value && !await s())
|
|
4311
4244
|
return;
|
|
4312
|
-
a.value = !a.value, await Se(),
|
|
4245
|
+
a.value = !a.value, await Se(), i();
|
|
4313
4246
|
}
|
|
4314
4247
|
}
|
|
4315
4248
|
async function c(u = !1) {
|
|
4316
4249
|
if (!!n.slots.default) {
|
|
4317
|
-
if (!u && !await
|
|
4250
|
+
if (!u && !await s())
|
|
4318
4251
|
return;
|
|
4319
|
-
a.value = !0, await Se(),
|
|
4252
|
+
a.value = !0, await Se(), i();
|
|
4320
4253
|
}
|
|
4321
4254
|
}
|
|
4322
4255
|
function d() {
|
|
4323
4256
|
a.value = !1;
|
|
4324
4257
|
}
|
|
4325
|
-
return { hidePopup: d, popup: c, shouldPopupContent: a, togglePopup:
|
|
4258
|
+
return { hidePopup: d, popup: c, shouldPopupContent: a, togglePopup: f, popoverRef: o };
|
|
4326
4259
|
}
|
|
4327
|
-
function
|
|
4260
|
+
function Bo(t, n, e) {
|
|
4328
4261
|
const r = v(), {
|
|
4329
4262
|
isTextBoxReadonly: o,
|
|
4330
4263
|
textBoxClass: a,
|
|
4331
|
-
textBoxPlaceholder:
|
|
4332
|
-
textBoxTitle:
|
|
4333
|
-
onBlurTextBox:
|
|
4264
|
+
textBoxPlaceholder: s,
|
|
4265
|
+
textBoxTitle: i,
|
|
4266
|
+
onBlurTextBox: f,
|
|
4334
4267
|
onClickTextBox: c,
|
|
4335
4268
|
onFocusTextBox: d,
|
|
4336
4269
|
onInput: u,
|
|
4337
4270
|
onKeyDownTextBox: l,
|
|
4338
|
-
onKeyUpTextBox:
|
|
4271
|
+
onKeyUpTextBox: m,
|
|
4339
4272
|
onMouseDownTextBox: y,
|
|
4340
4273
|
onTextBoxValueChange: M
|
|
4341
4274
|
} = e;
|
|
4342
|
-
return
|
|
4343
|
-
var
|
|
4344
|
-
t.selectOnCreated && ((
|
|
4345
|
-
}), () =>
|
|
4275
|
+
return fe(() => {
|
|
4276
|
+
var E, I;
|
|
4277
|
+
t.selectOnCreated && ((E = r.value) == null || E.select()), t.focusOnCreated && ((I = r.value) == null || I.focus());
|
|
4278
|
+
}), () => b("input", {
|
|
4346
4279
|
ref: r,
|
|
4347
4280
|
name: "input-group-value",
|
|
4348
4281
|
autocomplete: t.autoComplete ? "on" : "off",
|
|
@@ -4350,83 +4283,83 @@ function mt(t, n, e) {
|
|
|
4350
4283
|
disabled: t.disable,
|
|
4351
4284
|
maxlength: t.maxLength,
|
|
4352
4285
|
minlength: t.minLength,
|
|
4353
|
-
placeholder:
|
|
4286
|
+
placeholder: s.value,
|
|
4354
4287
|
readonly: o.value,
|
|
4355
4288
|
tabindex: t.tabIndex,
|
|
4356
|
-
title:
|
|
4289
|
+
title: i.value,
|
|
4357
4290
|
type: t.inputType,
|
|
4358
4291
|
value: n.value,
|
|
4359
|
-
onBlur:
|
|
4292
|
+
onBlur: f,
|
|
4360
4293
|
onChange: M,
|
|
4361
4294
|
onClick: c,
|
|
4362
4295
|
onFocus: d,
|
|
4363
4296
|
onInput: u,
|
|
4364
4297
|
onKeydown: l,
|
|
4365
|
-
onKeyup:
|
|
4298
|
+
onKeyup: m,
|
|
4366
4299
|
onMousedown: y
|
|
4367
4300
|
}, null);
|
|
4368
4301
|
}
|
|
4369
|
-
function
|
|
4302
|
+
function Eo(t, n, e) {
|
|
4370
4303
|
const r = v(t.separator), {
|
|
4371
4304
|
changeTextBoxValue: o
|
|
4372
|
-
} = e, a =
|
|
4373
|
-
name:
|
|
4305
|
+
} = e, a = B(() => n.value ? n.value.split(r.value).map((i) => ({
|
|
4306
|
+
name: i,
|
|
4374
4307
|
selectable: !0
|
|
4375
4308
|
})) : []);
|
|
4376
|
-
function i
|
|
4377
|
-
o(
|
|
4309
|
+
function s(i) {
|
|
4310
|
+
o(i.map((f) => f.name).join(r.value), !0);
|
|
4378
4311
|
}
|
|
4379
|
-
return () =>
|
|
4312
|
+
return () => b(Ft, {
|
|
4380
4313
|
id: `${t.id}-tag-editor`,
|
|
4381
4314
|
class: "form-control",
|
|
4382
4315
|
data: a.value,
|
|
4383
4316
|
showClose: !0,
|
|
4384
4317
|
showInput: !0,
|
|
4385
|
-
onChange:
|
|
4318
|
+
onChange: s
|
|
4386
4319
|
}, null);
|
|
4387
4320
|
}
|
|
4388
|
-
function
|
|
4321
|
+
function Vo(t, n, e, r) {
|
|
4389
4322
|
const {
|
|
4390
4323
|
buttonGroupClass: o,
|
|
4391
4324
|
onClickButton: a,
|
|
4392
|
-
onMouseEnterButton:
|
|
4393
|
-
onMouseLeaveButton:
|
|
4325
|
+
onMouseEnterButton: s,
|
|
4326
|
+
onMouseLeaveButton: i
|
|
4394
4327
|
} = e, {
|
|
4395
|
-
enableClearButton:
|
|
4328
|
+
enableClearButton: f,
|
|
4396
4329
|
showClearButton: c,
|
|
4397
4330
|
onClearValue: d
|
|
4398
4331
|
} = r, u = v();
|
|
4399
4332
|
return {
|
|
4400
|
-
renderButtonGroup: () =>
|
|
4333
|
+
renderButtonGroup: () => b("div", {
|
|
4401
4334
|
id: `${t.id}-button-group`,
|
|
4402
4335
|
class: o.value
|
|
4403
|
-
}, [
|
|
4336
|
+
}, [f.value && Pt(b("span", {
|
|
4404
4337
|
class: "input-group-text input-group-clear",
|
|
4405
4338
|
onClick: d
|
|
4406
|
-
}, [
|
|
4339
|
+
}, [b("i", {
|
|
4407
4340
|
class: "f-icon modal_close"
|
|
4408
|
-
}, null)]), [[
|
|
4341
|
+
}, null)]), [[Ot, c.value]]), n.slots.buttonContent ? b("span", {
|
|
4409
4342
|
class: "input-group-text input-group-append-button",
|
|
4410
4343
|
onClick: a,
|
|
4411
|
-
onMouseenter:
|
|
4412
|
-
onMouseleave:
|
|
4413
|
-
}, [n.slots.buttonContent()]) : t.buttonContent ?
|
|
4344
|
+
onMouseenter: s,
|
|
4345
|
+
onMouseleave: i
|
|
4346
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? b("span", {
|
|
4414
4347
|
class: "input-group-text input-group-append-button",
|
|
4415
4348
|
innerHTML: t.buttonContent,
|
|
4416
4349
|
ref: u,
|
|
4417
4350
|
onClick: a,
|
|
4418
|
-
onMouseenter:
|
|
4419
|
-
onMouseleave:
|
|
4351
|
+
onMouseenter: s,
|
|
4352
|
+
onMouseleave: i
|
|
4420
4353
|
}, null) : null]),
|
|
4421
4354
|
buttonHandleElement: u
|
|
4422
4355
|
};
|
|
4423
4356
|
}
|
|
4424
|
-
function
|
|
4357
|
+
function Fo(t, n, e) {
|
|
4425
4358
|
const r = v(t.popupMinWidth), {
|
|
4426
4359
|
hidePopup: o,
|
|
4427
4360
|
popoverRef: a
|
|
4428
4361
|
} = e;
|
|
4429
|
-
return () =>
|
|
4362
|
+
return () => b(Nt, {
|
|
4430
4363
|
id: `${t.id}-popover`,
|
|
4431
4364
|
ref: a,
|
|
4432
4365
|
visible: !0,
|
|
@@ -4440,86 +4373,150 @@ function Bo(t, n, e) {
|
|
|
4440
4373
|
onHidden: o
|
|
4441
4374
|
}, {
|
|
4442
4375
|
default: () => {
|
|
4443
|
-
var
|
|
4444
|
-
return [(
|
|
4376
|
+
var s, i;
|
|
4377
|
+
return [(i = (s = n.slots).default) == null ? void 0 : i.call(s)];
|
|
4445
4378
|
}
|
|
4446
4379
|
});
|
|
4447
4380
|
}
|
|
4448
|
-
const
|
|
4381
|
+
const de = /* @__PURE__ */ re({
|
|
4449
4382
|
name: "FButtonEdit",
|
|
4450
|
-
props:
|
|
4383
|
+
props: Ve,
|
|
4451
4384
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4452
4385
|
setup(t, n) {
|
|
4453
|
-
const e = v(), r = v(t.customClass), o = v(t.modelValue), a =
|
|
4454
|
-
shouldPopupContent:
|
|
4455
|
-
hidePopup:
|
|
4456
|
-
togglePopup:
|
|
4457
|
-
} = a, c =
|
|
4386
|
+
const e = v(), r = v(t.customClass), o = v(t.modelValue), a = mt(t, n, e, o), {
|
|
4387
|
+
shouldPopupContent: s,
|
|
4388
|
+
hidePopup: i,
|
|
4389
|
+
togglePopup: f
|
|
4390
|
+
} = a, c = pt(t, n, e, a, o), d = v(""), u = Ho(t, n, o, d, a), {
|
|
4458
4391
|
hasFocusedTextBox: l,
|
|
4459
|
-
commitValue:
|
|
4392
|
+
commitValue: m,
|
|
4460
4393
|
inputGroupClass: y
|
|
4461
|
-
} = u, M =
|
|
4462
|
-
onMouseEnterTextBox:
|
|
4463
|
-
onMouseLeaveTextBox:
|
|
4464
|
-
} = M,
|
|
4465
|
-
const
|
|
4394
|
+
} = u, M = Do(t, n, o, l, d, u), {
|
|
4395
|
+
onMouseEnterTextBox: E,
|
|
4396
|
+
onMouseLeaveTextBox: I
|
|
4397
|
+
} = M, j = B(() => {
|
|
4398
|
+
const g = {
|
|
4466
4399
|
"f-button-edit": !0,
|
|
4467
4400
|
"f-cmp-inputgroup": !0,
|
|
4468
4401
|
"f-button-edit-nowrap": !t.wrapText
|
|
4469
4402
|
};
|
|
4470
|
-
return r.value && r.value.split(" ").reduce((
|
|
4403
|
+
return r.value && r.value.split(" ").reduce((_, $) => (_[$] = !0, _), g), g;
|
|
4471
4404
|
});
|
|
4472
|
-
function
|
|
4473
|
-
return t.multiSelect && t.inputType === "tag" ?
|
|
4405
|
+
function w() {
|
|
4406
|
+
return t.multiSelect && t.inputType === "tag" ? Eo(t, o, u) : Bo(t, o, u);
|
|
4474
4407
|
}
|
|
4475
|
-
let
|
|
4408
|
+
let T = w();
|
|
4476
4409
|
R([() => t.multiSelect, () => t.inputType], () => {
|
|
4477
|
-
|
|
4410
|
+
T = w();
|
|
4478
4411
|
});
|
|
4479
4412
|
const {
|
|
4480
|
-
renderButtonGroup:
|
|
4481
|
-
buttonHandleElement:
|
|
4482
|
-
} =
|
|
4483
|
-
commitValue:
|
|
4413
|
+
renderButtonGroup: N,
|
|
4414
|
+
buttonHandleElement: C
|
|
4415
|
+
} = Vo(t, n, c, M), V = Fo(t, n, a), S = {
|
|
4416
|
+
commitValue: m,
|
|
4484
4417
|
elementRef: e,
|
|
4485
|
-
hidePopup:
|
|
4486
|
-
shouldPopupContent:
|
|
4487
|
-
togglePopup:
|
|
4418
|
+
hidePopup: i,
|
|
4419
|
+
shouldPopupContent: s,
|
|
4420
|
+
togglePopup: f,
|
|
4488
4421
|
openDialog: () => {
|
|
4489
|
-
|
|
4422
|
+
C.value && t.buttonBehavior === "Modal" && C.value.click();
|
|
4490
4423
|
},
|
|
4491
4424
|
getModal: () => {
|
|
4492
|
-
var
|
|
4493
|
-
return t.buttonBehavior === "Modal" ? (
|
|
4425
|
+
var g;
|
|
4426
|
+
return t.buttonBehavior === "Modal" ? (g = c.modalRef.value) == null ? void 0 : g.value : null;
|
|
4494
4427
|
}
|
|
4495
4428
|
};
|
|
4496
|
-
return
|
|
4497
|
-
e.value.componentInstance =
|
|
4429
|
+
return fe(() => {
|
|
4430
|
+
e.value.componentInstance = S, window.onresize = () => {
|
|
4498
4431
|
document.body.click();
|
|
4499
4432
|
};
|
|
4500
|
-
}), n.expose(
|
|
4433
|
+
}), n.expose(S), () => b(Dt, null, [b("div", Pe(n.attrs, {
|
|
4501
4434
|
ref: e,
|
|
4502
|
-
class:
|
|
4435
|
+
class: j.value,
|
|
4503
4436
|
id: t.id
|
|
4504
|
-
}), [
|
|
4437
|
+
}), [b("div", {
|
|
4505
4438
|
id: `${t.id}-input-group`,
|
|
4506
4439
|
class: y.value,
|
|
4507
|
-
onMouseenter:
|
|
4508
|
-
onMouseleave:
|
|
4509
|
-
}, [
|
|
4440
|
+
onMouseenter: E,
|
|
4441
|
+
onMouseleave: I
|
|
4442
|
+
}, [T(), N()])]), s.value && V()]);
|
|
4510
4443
|
}
|
|
4511
4444
|
});
|
|
4512
|
-
function
|
|
4513
|
-
|
|
4445
|
+
function No(t, n, e) {
|
|
4446
|
+
const {
|
|
4447
|
+
buttonGroupClass: r
|
|
4448
|
+
} = e, o = v();
|
|
4449
|
+
return {
|
|
4450
|
+
renderButtonGroup: () => b("div", {
|
|
4451
|
+
id: `${t.id}-button-group`,
|
|
4452
|
+
class: r.value
|
|
4453
|
+
}, [n.slots.buttonContent ? b("span", {
|
|
4454
|
+
class: "input-group-text input-group-append-button"
|
|
4455
|
+
}, [n.slots.buttonContent()]) : t.buttonContent ? b("span", {
|
|
4456
|
+
class: "input-group-text input-group-append-button",
|
|
4457
|
+
innerHTML: t.buttonContent,
|
|
4458
|
+
ref: o
|
|
4459
|
+
}, null) : null]),
|
|
4460
|
+
buttonHandleElement: o
|
|
4461
|
+
};
|
|
4462
|
+
}
|
|
4463
|
+
const So = /* @__PURE__ */ re({
|
|
4464
|
+
name: "FButtonEdit",
|
|
4465
|
+
props: Ve,
|
|
4466
|
+
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4467
|
+
setup(t, n) {
|
|
4468
|
+
const e = v(), r = me("design-item-context"), o = St(e, r), a = v(t.customClass), s = v(t.modelValue), i = mt(t, n, e, s), f = pt(t, n, e, i, s), c = v(), d = B(() => ({
|
|
4469
|
+
"f-cmp-inputgroup": !0,
|
|
4470
|
+
"input-group": !0,
|
|
4471
|
+
"f-state-disable": !0,
|
|
4472
|
+
"f-state-editable": !1,
|
|
4473
|
+
"f-state-readonly": !0
|
|
4474
|
+
}));
|
|
4475
|
+
fe(() => {
|
|
4476
|
+
e.value.componentInstance = o;
|
|
4477
|
+
}), n.expose(o.value);
|
|
4478
|
+
const u = B(() => {
|
|
4479
|
+
const m = {
|
|
4480
|
+
"f-button-edit": !0,
|
|
4481
|
+
"f-cmp-inputgroup": !0,
|
|
4482
|
+
"f-button-edit-nowrap": !t.wrapText
|
|
4483
|
+
};
|
|
4484
|
+
return a.value && a.value.split(" ").reduce((y, M) => (y[M] = !0, y), m), m;
|
|
4485
|
+
}), {
|
|
4486
|
+
renderButtonGroup: l
|
|
4487
|
+
} = No(t, n, f);
|
|
4488
|
+
return () => b("div", Pe(n.attrs, {
|
|
4489
|
+
ref: e,
|
|
4490
|
+
class: u.value,
|
|
4491
|
+
id: t.id
|
|
4492
|
+
}), [b("div", {
|
|
4493
|
+
class: d.value
|
|
4494
|
+
}, [b("input", {
|
|
4495
|
+
ref: c,
|
|
4496
|
+
class: "form-control",
|
|
4497
|
+
readonly: !0,
|
|
4498
|
+
placeholder: t.placeholder
|
|
4499
|
+
}, null), l()])]);
|
|
4500
|
+
}
|
|
4501
|
+
});
|
|
4502
|
+
de.register = (t, n, e, r) => {
|
|
4503
|
+
t["button-edit"] = de, n["button-edit"] = dt;
|
|
4504
|
+
};
|
|
4505
|
+
de.registerDesigner = (t, n, e) => {
|
|
4506
|
+
t["button-edit"] = So, n["button-edit"] = dt;
|
|
4507
|
+
};
|
|
4508
|
+
Yt(de);
|
|
4509
|
+
function Yo(t, n, e) {
|
|
4510
|
+
var N;
|
|
4514
4511
|
function r() {
|
|
4515
4512
|
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
4516
4513
|
}
|
|
4517
4514
|
r();
|
|
4518
|
-
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "",
|
|
4519
|
-
function
|
|
4515
|
+
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", s = v();
|
|
4516
|
+
function i() {
|
|
4520
4517
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
4521
4518
|
}
|
|
4522
|
-
function
|
|
4519
|
+
function f() {
|
|
4523
4520
|
return !1;
|
|
4524
4521
|
}
|
|
4525
4522
|
function c() {
|
|
@@ -4528,227 +4525,242 @@ function gt(t, n, e) {
|
|
|
4528
4525
|
function d() {
|
|
4529
4526
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
4530
4527
|
}
|
|
4531
|
-
function u(
|
|
4532
|
-
if (!
|
|
4528
|
+
function u(C) {
|
|
4529
|
+
if (!C || !C.value)
|
|
4533
4530
|
return null;
|
|
4534
|
-
if (
|
|
4535
|
-
return
|
|
4536
|
-
const
|
|
4537
|
-
return
|
|
4531
|
+
if (C.value.schema && C.value.schema.type === "component")
|
|
4532
|
+
return C.value;
|
|
4533
|
+
const V = v(C == null ? void 0 : C.value.parent), S = u(V);
|
|
4534
|
+
return S || null;
|
|
4538
4535
|
}
|
|
4539
|
-
function l(
|
|
4540
|
-
const { componentInstance:
|
|
4541
|
-
return !
|
|
4536
|
+
function l(C = n) {
|
|
4537
|
+
const { componentInstance: V, designerItemElementRef: S } = C;
|
|
4538
|
+
return !V || !V.value ? null : V.value.canMove ? S : l(C.parent);
|
|
4542
4539
|
}
|
|
4543
|
-
function
|
|
4544
|
-
return !!e && e.canAccepts(
|
|
4540
|
+
function m(C) {
|
|
4541
|
+
return !!e && e.canAccepts(C);
|
|
4545
4542
|
}
|
|
4546
4543
|
function y() {
|
|
4547
4544
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
4548
4545
|
}
|
|
4549
4546
|
function M() {
|
|
4550
4547
|
}
|
|
4551
|
-
function
|
|
4552
|
-
|
|
4548
|
+
function E(C, V) {
|
|
4549
|
+
V && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(V);
|
|
4553
4550
|
}
|
|
4554
|
-
function
|
|
4555
|
-
const { componentType:
|
|
4556
|
-
let
|
|
4557
|
-
e && e.onResolveNewComponentSchema && (
|
|
4558
|
-
const
|
|
4559
|
-
return
|
|
4551
|
+
function I(C, V) {
|
|
4552
|
+
const { componentType: S } = C;
|
|
4553
|
+
let g = Me(S, C, V);
|
|
4554
|
+
e && e.onResolveNewComponentSchema && (g = e.onResolveNewComponentSchema(C, g));
|
|
4555
|
+
const _ = S.toLowerCase().replace("-", "_");
|
|
4556
|
+
return g && !g.id && g.type === S && (g.id = `${_}_${Math.random().toString().slice(2, 6)}`), g;
|
|
4560
4557
|
}
|
|
4561
|
-
function
|
|
4562
|
-
const
|
|
4563
|
-
|
|
4564
|
-
let
|
|
4565
|
-
e && e.onAcceptNewChildElement && (
|
|
4566
|
-
const
|
|
4567
|
-
return
|
|
4558
|
+
function j(C, V) {
|
|
4559
|
+
const S = String(C.getAttribute("data-controltype")), g = C.getAttribute("data-feature"), _ = g ? JSON.parse(g) : {};
|
|
4560
|
+
_.parentComponentInstance = s.value;
|
|
4561
|
+
let $ = Me(S, _);
|
|
4562
|
+
e && e.onAcceptNewChildElement && ($ = e.onAcceptNewChildElement(C, V, $));
|
|
4563
|
+
const Z = S.toLowerCase().replace("-", "_");
|
|
4564
|
+
return $ && !$.id && $.type === S && ($.id = `${Z}_${Math.random().toString().slice(2, 6)}`), $;
|
|
4568
4565
|
}
|
|
4569
|
-
function
|
|
4566
|
+
function w(C) {
|
|
4570
4567
|
}
|
|
4571
|
-
function
|
|
4568
|
+
function T(...C) {
|
|
4572
4569
|
if (e && e.getPropsConfig)
|
|
4573
|
-
return e.getPropsConfig(...
|
|
4570
|
+
return e.getPropsConfig(...C);
|
|
4574
4571
|
}
|
|
4575
|
-
return
|
|
4576
|
-
canMove:
|
|
4577
|
-
canSelectParent:
|
|
4572
|
+
return s.value = {
|
|
4573
|
+
canMove: i(),
|
|
4574
|
+
canSelectParent: f(),
|
|
4578
4575
|
canDelete: c(),
|
|
4579
4576
|
canNested: !d(),
|
|
4580
4577
|
contents: n == null ? void 0 : n.schema.contents,
|
|
4581
4578
|
elementRef: t,
|
|
4582
|
-
parent: (
|
|
4579
|
+
parent: (N = n == null ? void 0 : n.parent) == null ? void 0 : N.componentInstance,
|
|
4583
4580
|
schema: n == null ? void 0 : n.schema,
|
|
4584
4581
|
styles: o,
|
|
4585
4582
|
designerClass: a,
|
|
4586
|
-
canAccepts:
|
|
4583
|
+
canAccepts: m,
|
|
4587
4584
|
getBelongedComponentInstance: u,
|
|
4588
4585
|
getDraggableDesignItemElement: l,
|
|
4589
4586
|
getDraggingDisplayText: y,
|
|
4590
|
-
getPropConfig:
|
|
4587
|
+
getPropConfig: T,
|
|
4591
4588
|
getDragScopeElement: M,
|
|
4592
|
-
onAcceptMovedChildElement:
|
|
4593
|
-
onAcceptNewChildElement:
|
|
4594
|
-
onChildElementMovedOut:
|
|
4595
|
-
addNewChildComponentSchema:
|
|
4589
|
+
onAcceptMovedChildElement: E,
|
|
4590
|
+
onAcceptNewChildElement: j,
|
|
4591
|
+
onChildElementMovedOut: w,
|
|
4592
|
+
addNewChildComponentSchema: I,
|
|
4596
4593
|
updateDragAndDropRules: r,
|
|
4597
4594
|
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || v(!1),
|
|
4598
4595
|
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
|
|
4599
|
-
},
|
|
4596
|
+
}, s;
|
|
4600
4597
|
}
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
"f-button-edit-nowrap": !t.wrapText
|
|
4618
|
-
};
|
|
4619
|
-
return a.value && a.value.split(" ").reduce((C, E) => (C[E] = !0, C), g), g;
|
|
4598
|
+
class Wo {
|
|
4599
|
+
constructor(n, e) {
|
|
4600
|
+
p(this, "componentId");
|
|
4601
|
+
p(this, "viewModelId");
|
|
4602
|
+
p(this, "eventsEditorUtils");
|
|
4603
|
+
p(this, "formSchemaUtils");
|
|
4604
|
+
p(this, "formMetadataConverter");
|
|
4605
|
+
p(this, "designViewModelUtils");
|
|
4606
|
+
p(this, "designViewModelField");
|
|
4607
|
+
p(this, "controlCreatorUtils");
|
|
4608
|
+
p(this, "designerHostService");
|
|
4609
|
+
p(this, "schemaService", null);
|
|
4610
|
+
p(this, "metadataService", null);
|
|
4611
|
+
p(this, "propertyConfig", {
|
|
4612
|
+
type: "object",
|
|
4613
|
+
categories: {}
|
|
4620
4614
|
});
|
|
4621
|
-
|
|
4622
|
-
|
|
4615
|
+
var r;
|
|
4616
|
+
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
4617
|
+
}
|
|
4618
|
+
getTableInfo() {
|
|
4619
|
+
var n;
|
|
4620
|
+
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
4621
|
+
}
|
|
4622
|
+
setDesignViewModelField(n) {
|
|
4623
|
+
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
4624
|
+
if (e) {
|
|
4625
|
+
if (!this.designViewModelField) {
|
|
4626
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
4627
|
+
this.designViewModelField = r.fields.find((o) => o.id === e);
|
|
4628
|
+
}
|
|
4629
|
+
n.updateOn = this.designViewModelField.updateOn;
|
|
4623
4630
|
}
|
|
4624
|
-
let O = M();
|
|
4625
|
-
R([() => t.multiSelect, () => t.inputType], () => {
|
|
4626
|
-
O = M();
|
|
4627
|
-
});
|
|
4628
|
-
const {
|
|
4629
|
-
renderButtonGroup: Y,
|
|
4630
|
-
buttonHandleElement: _
|
|
4631
|
-
} = yt(t, n, p, h);
|
|
4632
|
-
return () => w("div", Ce(n.attrs, {
|
|
4633
|
-
ref: e,
|
|
4634
|
-
class: y.value,
|
|
4635
|
-
id: t.id
|
|
4636
|
-
}), [w("div", {
|
|
4637
|
-
class: l.value
|
|
4638
|
-
}, [O(), Y()])]);
|
|
4639
4631
|
}
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4632
|
+
changeFieldEditorType(n, e) {
|
|
4633
|
+
}
|
|
4634
|
+
getBasicPropConfig(n) {
|
|
4635
|
+
return {
|
|
4636
|
+
description: "Basic Information",
|
|
4637
|
+
title: "基本信息",
|
|
4638
|
+
properties: {
|
|
4639
|
+
id: {
|
|
4640
|
+
description: "组件标识",
|
|
4641
|
+
title: "标识",
|
|
4642
|
+
type: "string",
|
|
4643
|
+
readonly: !0
|
|
4644
|
+
},
|
|
4645
|
+
type: {
|
|
4646
|
+
description: "组件类型",
|
|
4647
|
+
title: "控件类型",
|
|
4648
|
+
type: "select",
|
|
4649
|
+
editor: {
|
|
4650
|
+
type: "combo-list",
|
|
4651
|
+
textField: "name",
|
|
4652
|
+
valueField: "value",
|
|
4653
|
+
data: [{ value: n.type, name: k[n.type].name }]
|
|
4654
|
+
}
|
|
4655
|
+
}
|
|
4656
|
+
}
|
|
4657
|
+
};
|
|
4658
|
+
}
|
|
4659
|
+
getAppearanceConfig(n = null) {
|
|
4660
|
+
return {
|
|
4661
|
+
title: "样式",
|
|
4662
|
+
description: "Appearance",
|
|
4663
|
+
properties: {
|
|
4664
|
+
class: {
|
|
4665
|
+
title: "class样式",
|
|
4666
|
+
type: "string",
|
|
4667
|
+
description: "组件的CSS样式",
|
|
4668
|
+
$converter: "/converter/appearance.converter"
|
|
4669
|
+
},
|
|
4670
|
+
style: {
|
|
4671
|
+
title: "style样式",
|
|
4672
|
+
type: "string",
|
|
4673
|
+
description: "组件的样式",
|
|
4674
|
+
$converter: "/converter/appearance.converter"
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
};
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
const ee = class ee {
|
|
4681
|
+
/**
|
|
4682
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
4683
|
+
*/
|
|
4649
4684
|
static getEditorTypesByMDataType(n) {
|
|
4650
|
-
const e =
|
|
4685
|
+
const e = ee.fieldControlTypeMapping[n];
|
|
4651
4686
|
return e || [{ key: "", value: "" }];
|
|
4652
4687
|
}
|
|
4653
|
-
|
|
4688
|
+
/**
|
|
4689
|
+
* 获取所有输入类控件
|
|
4690
|
+
*/
|
|
4691
|
+
static getAllInputTypes() {
|
|
4692
|
+
const n = [];
|
|
4693
|
+
for (let e in ee.fieldControlTypeMapping)
|
|
4694
|
+
ee.fieldControlTypeMapping[e].forEach((r) => {
|
|
4695
|
+
n.find((o) => o.key === r.key && o.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
4696
|
+
});
|
|
4697
|
+
return n;
|
|
4698
|
+
}
|
|
4699
|
+
};
|
|
4654
4700
|
/**
|
|
4655
4701
|
* <字段类型,可配置的控件类型列表>的映射
|
|
4656
4702
|
*/
|
|
4657
|
-
|
|
4703
|
+
p(ee, "fieldControlTypeMapping", {
|
|
4658
4704
|
String: [
|
|
4659
|
-
{ key:
|
|
4660
|
-
{ key:
|
|
4661
|
-
{ key:
|
|
4662
|
-
{ key:
|
|
4663
|
-
{ key:
|
|
4664
|
-
{ key:
|
|
4665
|
-
{ key:
|
|
4666
|
-
{ key: b.textarea.type, value: b.textarea.name }
|
|
4667
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
4705
|
+
{ key: k["input-group"].type, value: k["input-group"].name },
|
|
4706
|
+
{ key: k.lookup.type, value: k.lookup.name },
|
|
4707
|
+
{ key: k["date-picker"].type, value: k["date-picker"].name },
|
|
4708
|
+
{ key: k["check-box"].type, value: k["check-box"].name },
|
|
4709
|
+
{ key: k["radio-group"].type, value: k["radio-group"].name },
|
|
4710
|
+
{ key: k["combo-list"].type, value: k["combo-list"].name },
|
|
4711
|
+
{ key: k.textarea.type, value: k.textarea.name }
|
|
4668
4712
|
],
|
|
4669
4713
|
Text: [
|
|
4670
|
-
{ key:
|
|
4671
|
-
{ key:
|
|
4672
|
-
{ key: b.lookup.type, value: b.lookup.name }
|
|
4714
|
+
{ key: k.textarea.type, value: k.textarea.name },
|
|
4715
|
+
{ key: k.lookup.type, value: k.lookup.name }
|
|
4673
4716
|
],
|
|
4674
4717
|
Decimal: [
|
|
4675
|
-
{ key:
|
|
4718
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
4676
4719
|
],
|
|
4677
4720
|
Integer: [
|
|
4678
|
-
{ key:
|
|
4721
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
4679
4722
|
],
|
|
4680
4723
|
Number: [
|
|
4681
|
-
{ key:
|
|
4724
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
4682
4725
|
],
|
|
4683
4726
|
BigNumber: [
|
|
4684
|
-
{ key:
|
|
4727
|
+
{ key: k["number-spinner"].type, value: k["number-spinner"].name }
|
|
4685
4728
|
],
|
|
4686
4729
|
Date: [
|
|
4687
|
-
{ key:
|
|
4730
|
+
{ key: k["date-picker"].type, value: k["date-picker"].name }
|
|
4688
4731
|
],
|
|
4689
4732
|
DateTime: [
|
|
4690
|
-
{ key:
|
|
4733
|
+
{ key: k["date-picker"].type, value: k["date-picker"].name }
|
|
4691
4734
|
],
|
|
4692
4735
|
Boolean: [
|
|
4693
|
-
{ key:
|
|
4694
|
-
{ key:
|
|
4736
|
+
{ key: k.switch.type, value: k.switch.name },
|
|
4737
|
+
{ key: k["check-box"].type, value: k["check-box"].name }
|
|
4695
4738
|
],
|
|
4696
4739
|
Enum: [
|
|
4697
|
-
{ key:
|
|
4698
|
-
{ key:
|
|
4740
|
+
{ key: k["combo-list"].type, value: k["combo-list"].name },
|
|
4741
|
+
{ key: k["radio-group"].type, value: k["radio-group"].name }
|
|
4699
4742
|
],
|
|
4700
4743
|
Object: [
|
|
4701
|
-
{ key:
|
|
4702
|
-
{ key:
|
|
4703
|
-
{ key:
|
|
4704
|
-
],
|
|
4705
|
-
EmployeeSelector: [
|
|
4706
|
-
{ key: b.EmployeeSelector.type, value: b.EmployeeSelector.name }
|
|
4707
|
-
],
|
|
4708
|
-
AdminOrganizationSelector: [
|
|
4709
|
-
{ key: b.AdminOrganizationSelector.type, value: b.AdminOrganizationSelector.name }
|
|
4744
|
+
{ key: k.lookup.type, value: k.lookup.name },
|
|
4745
|
+
{ key: k["combo-list"].type, value: k["combo-list"].name },
|
|
4746
|
+
{ key: k["radio-group"].type, value: k["radio-group"].name }
|
|
4710
4747
|
]
|
|
4711
4748
|
});
|
|
4712
|
-
|
|
4749
|
+
let ge = ee;
|
|
4750
|
+
const qo = v(0);
|
|
4751
|
+
class Ao extends Wo {
|
|
4713
4752
|
constructor(n, e) {
|
|
4714
|
-
|
|
4715
|
-
f(this, "viewModelId");
|
|
4716
|
-
f(this, "eventsEditorUtils");
|
|
4717
|
-
f(this, "formSchemaUtils");
|
|
4718
|
-
f(this, "formMetadataConverter");
|
|
4719
|
-
f(this, "designViewModelUtils");
|
|
4720
|
-
f(this, "designViewModelField");
|
|
4721
|
-
f(this, "controlCreatorUtils");
|
|
4722
|
-
f(this, "designerHostService");
|
|
4723
|
-
f(this, "schemaService", null);
|
|
4724
|
-
f(this, "metadataService", null);
|
|
4725
|
-
f(this, "propertyConfig", {
|
|
4726
|
-
type: "object",
|
|
4727
|
-
categories: {}
|
|
4728
|
-
});
|
|
4729
|
-
var r;
|
|
4730
|
-
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
4731
|
-
}
|
|
4732
|
-
getTableInfo() {
|
|
4733
|
-
var n;
|
|
4734
|
-
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
4735
|
-
}
|
|
4736
|
-
setDesignViewModelField(n) {
|
|
4737
|
-
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
4738
|
-
if (e) {
|
|
4739
|
-
if (!this.designViewModelField) {
|
|
4740
|
-
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
4741
|
-
this.designViewModelField = r.fields.find((o) => o.id === e);
|
|
4742
|
-
}
|
|
4743
|
-
n.updateOn = this.designViewModelField.updateOn;
|
|
4744
|
-
}
|
|
4753
|
+
super(n, e);
|
|
4745
4754
|
}
|
|
4746
|
-
|
|
4755
|
+
getPropertyConfig(n, e) {
|
|
4756
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(n, e), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
4747
4757
|
}
|
|
4748
|
-
|
|
4749
|
-
var
|
|
4750
|
-
var
|
|
4751
|
-
|
|
4758
|
+
getBasicProperties(n, e) {
|
|
4759
|
+
var s;
|
|
4760
|
+
var r = this;
|
|
4761
|
+
this.setDesignViewModelField(n);
|
|
4762
|
+
const o = this.formSchemaUtils.getFormMetadataBasicInfo(), a = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
4763
|
+
return {
|
|
4752
4764
|
description: "Basic Information",
|
|
4753
4765
|
title: "基本信息",
|
|
4754
4766
|
properties: {
|
|
@@ -4759,8 +4771,8 @@ class Eo {
|
|
|
4759
4771
|
readonly: !0
|
|
4760
4772
|
},
|
|
4761
4773
|
type: {
|
|
4762
|
-
description: "
|
|
4763
|
-
title: "
|
|
4774
|
+
description: "编辑器类型",
|
|
4775
|
+
title: "编辑器类型",
|
|
4764
4776
|
type: "string",
|
|
4765
4777
|
refreshPanelAfterChanged: !0,
|
|
4766
4778
|
$converter: "/converter/change-editor.converter",
|
|
@@ -4768,63 +4780,52 @@ class Eo {
|
|
|
4768
4780
|
type: "combo-list",
|
|
4769
4781
|
textField: "value",
|
|
4770
4782
|
valueField: "key",
|
|
4771
|
-
|
|
4772
|
-
|
|
4783
|
+
editable: !1,
|
|
4784
|
+
data: r.designViewModelField ? ge.getEditorTypesByMDataType((s = r.designViewModelField.type) == null ? void 0 : s.name) : ge.getAllInputTypes()
|
|
4773
4785
|
}
|
|
4774
4786
|
},
|
|
4775
4787
|
label: {
|
|
4776
4788
|
title: "标签",
|
|
4777
4789
|
type: "string",
|
|
4778
4790
|
$converter: "/converter/form-group-label.converter"
|
|
4791
|
+
},
|
|
4792
|
+
binding: {
|
|
4793
|
+
description: "绑定的表单字段",
|
|
4794
|
+
title: "绑定",
|
|
4795
|
+
$converter: "/converter/field-selector.converter",
|
|
4796
|
+
editor: {
|
|
4797
|
+
type: "field-selector",
|
|
4798
|
+
bindingType: { enable: !1 },
|
|
4799
|
+
editorParams: {
|
|
4800
|
+
propertyData: n,
|
|
4801
|
+
formBasicInfo: o
|
|
4802
|
+
},
|
|
4803
|
+
columns: [
|
|
4804
|
+
{ field: "name", title: "字段名称" },
|
|
4805
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
4806
|
+
{ field: "fieldType", title: "字段类型" }
|
|
4807
|
+
],
|
|
4808
|
+
textField: "bindingField",
|
|
4809
|
+
data: a
|
|
4810
|
+
}
|
|
4779
4811
|
}
|
|
4780
4812
|
},
|
|
4781
|
-
setPropertyRelates(
|
|
4782
|
-
if (
|
|
4783
|
-
switch (
|
|
4813
|
+
setPropertyRelates(i, f) {
|
|
4814
|
+
if (i)
|
|
4815
|
+
switch (i && i.propertyID) {
|
|
4784
4816
|
case "type": {
|
|
4785
|
-
|
|
4817
|
+
r.changeControlType(n, i, e);
|
|
4818
|
+
break;
|
|
4819
|
+
}
|
|
4820
|
+
case "label": {
|
|
4821
|
+
i.needRefreshControlTree = !0;
|
|
4786
4822
|
break;
|
|
4787
4823
|
}
|
|
4788
4824
|
}
|
|
4789
4825
|
}
|
|
4790
4826
|
};
|
|
4791
4827
|
}
|
|
4792
|
-
|
|
4793
|
-
* 卡片控件:切换控件类型后事件
|
|
4794
|
-
* @param propertyData 控件DOM属性
|
|
4795
|
-
* @param newControlType 新控件类型
|
|
4796
|
-
*/
|
|
4797
|
-
changeControlType(n, e) {
|
|
4798
|
-
var c, d, u, l, h;
|
|
4799
|
-
const r = e.propertyValue, o = this.formSchemaUtils.getComponentById(this.componentId);
|
|
4800
|
-
let a = this.getControlParentContainer(n.id, o);
|
|
4801
|
-
if (!a)
|
|
4802
|
-
return;
|
|
4803
|
-
const i = a.contents.findIndex((y) => y.id === n.id), s = a.contents[i];
|
|
4804
|
-
let p;
|
|
4805
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
4806
|
-
editor: {
|
|
4807
|
-
$type: r
|
|
4808
|
-
},
|
|
4809
|
-
name: this.designViewModelField.name,
|
|
4810
|
-
require: this.designViewModelField.require,
|
|
4811
|
-
readonly: this.designViewModelField.readonly
|
|
4812
|
-
}, !1), p = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, r)), Object.assign(p, {
|
|
4813
|
-
id: s.id,
|
|
4814
|
-
appearance: s.appearance,
|
|
4815
|
-
size: s.size,
|
|
4816
|
-
label: s.label
|
|
4817
|
-
}), Object.assign(p.editor, {
|
|
4818
|
-
isTextArea: p.isTextArea && s.isTextArea,
|
|
4819
|
-
type: r || "",
|
|
4820
|
-
placeHolder: (c = s.editor) == null ? void 0 : c.placeHolder,
|
|
4821
|
-
holdPlace: (d = s.editor) == null ? void 0 : d.holdPlace,
|
|
4822
|
-
readonly: (u = s.editor) == null ? void 0 : u.readonly,
|
|
4823
|
-
require: (l = s.editor) == null ? void 0 : l.require,
|
|
4824
|
-
visible: (h = s.editor) == null ? void 0 : h.visible
|
|
4825
|
-
}), a.contents.splice(i, 1, p);
|
|
4826
|
-
}
|
|
4827
|
-
getAppearanceConfig(n = null) {
|
|
4828
|
+
getAppearanceProperties(n) {
|
|
4828
4829
|
return {
|
|
4829
4830
|
title: "样式",
|
|
4830
4831
|
description: "Appearance",
|
|
@@ -4854,70 +4855,49 @@ class Eo {
|
|
|
4854
4855
|
}
|
|
4855
4856
|
};
|
|
4856
4857
|
}
|
|
4857
|
-
/**
|
|
4858
|
-
* 获取控件:以contents为节点进行定位
|
|
4859
|
-
* @param controlId 控件ID
|
|
4860
|
-
* @param domJson 容器
|
|
4861
|
-
*/
|
|
4862
|
-
getControlParentContainer(n, e) {
|
|
4863
|
-
let r;
|
|
4864
|
-
if (!e || !e.contents || e.contents.length === 0)
|
|
4865
|
-
return null;
|
|
4866
|
-
for (const o of e.contents) {
|
|
4867
|
-
if (o.id === n)
|
|
4868
|
-
return r = e, e;
|
|
4869
|
-
if (r = this.getControlParentContainer(n, o), r)
|
|
4870
|
-
return r;
|
|
4871
|
-
}
|
|
4872
|
-
}
|
|
4873
|
-
}
|
|
4874
|
-
class So extends Eo {
|
|
4875
|
-
constructor(n, e) {
|
|
4876
|
-
super(n, e);
|
|
4877
|
-
}
|
|
4878
|
-
getBasicProperties(n) {
|
|
4879
|
-
let e = this.getBasicPropConfig(n);
|
|
4880
|
-
return e.properties.binding = this.getFieldSelectorOptions(n), e;
|
|
4881
|
-
}
|
|
4882
|
-
getAppearanceProperties(n) {
|
|
4883
|
-
return this.getAppearanceConfig(n);
|
|
4884
|
-
}
|
|
4885
4858
|
getEditorProperties(n) {
|
|
4886
4859
|
return this.getComponentConfig(n);
|
|
4887
4860
|
}
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4861
|
+
/**
|
|
4862
|
+
* 卡片控件:切换控件类型后事件
|
|
4863
|
+
* @param propertyData 控件DOM属性
|
|
4864
|
+
* @param newControlType 新控件类型
|
|
4865
|
+
*/
|
|
4866
|
+
changeControlType(n, e, r) {
|
|
4867
|
+
var c, d, u, l;
|
|
4868
|
+
const o = e.propertyValue, a = r && r.parent && r.parent.schema;
|
|
4869
|
+
if (!a)
|
|
4870
|
+
return;
|
|
4871
|
+
const s = a.contents.findIndex((m) => m.id === n.id), i = a.contents[s];
|
|
4872
|
+
let f;
|
|
4873
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
4897
4874
|
editor: {
|
|
4898
|
-
type:
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4875
|
+
$type: o
|
|
4876
|
+
},
|
|
4877
|
+
name: this.designViewModelField.name,
|
|
4878
|
+
require: this.designViewModelField.require,
|
|
4879
|
+
readonly: this.designViewModelField.readonly
|
|
4880
|
+
}, !1), f = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o)), f || (f = Ye("form-group") || {}, f.editor = Ye(o) || {}, delete f.editor.id, delete f.editor.binding, delete f.editor.appearance), Object.assign(f, {
|
|
4881
|
+
id: i.id,
|
|
4882
|
+
appearance: i.appearance,
|
|
4883
|
+
size: i.size,
|
|
4884
|
+
label: i.label,
|
|
4885
|
+
binding: i.binding,
|
|
4886
|
+
visible: i.visible
|
|
4887
|
+
}), Object.assign(f.editor, {
|
|
4888
|
+
isTextArea: f.isTextArea && i.isTextArea,
|
|
4889
|
+
placeholder: (c = i.editor) == null ? void 0 : c.placeholder,
|
|
4890
|
+
holdPlace: (d = i.editor) == null ? void 0 : d.holdPlace,
|
|
4891
|
+
readonly: (u = i.editor) == null ? void 0 : u.readonly,
|
|
4892
|
+
require: (l = i.editor) == null ? void 0 : l.require
|
|
4893
|
+
}), a.contents.splice(s, 1), a.contents.splice(s, 0, f), r.schema = Object.assign(i, f), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
4894
|
+
(m) => m.classList.remove("dgComponentSelected")
|
|
4895
|
+
), qo.value++;
|
|
4916
4896
|
}
|
|
4917
4897
|
getComponentConfig(n, e = {}, r = {}) {
|
|
4918
4898
|
const o = Object.assign({
|
|
4919
|
-
description: "
|
|
4920
|
-
title: "
|
|
4899
|
+
description: "编辑器",
|
|
4900
|
+
title: "编辑器",
|
|
4921
4901
|
type: "input-group",
|
|
4922
4902
|
$converter: "/converter/property-editor.converter"
|
|
4923
4903
|
}, e), a = Object.assign({
|
|
@@ -4945,7 +4925,7 @@ class So extends Eo {
|
|
|
4945
4925
|
return { ...o, properties: { ...a } };
|
|
4946
4926
|
}
|
|
4947
4927
|
}
|
|
4948
|
-
class
|
|
4928
|
+
class Lo extends Ao {
|
|
4949
4929
|
constructor(n, e) {
|
|
4950
4930
|
super(n, e);
|
|
4951
4931
|
}
|
|
@@ -4985,7 +4965,7 @@ class Vo extends So {
|
|
|
4985
4965
|
});
|
|
4986
4966
|
}
|
|
4987
4967
|
}
|
|
4988
|
-
function
|
|
4968
|
+
function Io(t, n) {
|
|
4989
4969
|
t.schema;
|
|
4990
4970
|
const e = v(!0), r = v(!0);
|
|
4991
4971
|
function o(u) {
|
|
@@ -4994,13 +4974,13 @@ function No(t, n) {
|
|
|
4994
4974
|
function a() {
|
|
4995
4975
|
return !1;
|
|
4996
4976
|
}
|
|
4997
|
-
function
|
|
4977
|
+
function s() {
|
|
4998
4978
|
return !1;
|
|
4999
4979
|
}
|
|
5000
|
-
function
|
|
4980
|
+
function i() {
|
|
5001
4981
|
return !0;
|
|
5002
4982
|
}
|
|
5003
|
-
function
|
|
4983
|
+
function f(u) {
|
|
5004
4984
|
}
|
|
5005
4985
|
function c() {
|
|
5006
4986
|
}
|
|
@@ -5010,55 +4990,55 @@ function No(t, n) {
|
|
|
5010
4990
|
return {
|
|
5011
4991
|
canAccepts: o,
|
|
5012
4992
|
checkCanDeleteComponent: a,
|
|
5013
|
-
checkCanMoveComponent:
|
|
5014
|
-
hideNestedPaddingInDesginerView:
|
|
5015
|
-
onAcceptMovedChildElement:
|
|
4993
|
+
checkCanMoveComponent: s,
|
|
4994
|
+
hideNestedPaddingInDesginerView: i,
|
|
4995
|
+
onAcceptMovedChildElement: f,
|
|
5016
4996
|
resolveComponentContext: c,
|
|
5017
4997
|
triggerBelongedComponentToMoveWhenMoved: e,
|
|
5018
4998
|
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
5019
4999
|
getPropsConfig: d
|
|
5020
5000
|
};
|
|
5021
5001
|
}
|
|
5022
|
-
function
|
|
5002
|
+
function _o(t, n) {
|
|
5023
5003
|
const {
|
|
5024
5004
|
canAccepts: e,
|
|
5025
5005
|
checkCanDeleteComponent: r,
|
|
5026
5006
|
checkCanMoveComponent: o,
|
|
5027
5007
|
hideNestedPaddingInDesginerView: a,
|
|
5028
|
-
onAcceptMovedChildElement:
|
|
5029
|
-
resolveComponentContext:
|
|
5030
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
5008
|
+
onAcceptMovedChildElement: s,
|
|
5009
|
+
resolveComponentContext: i,
|
|
5010
|
+
triggerBelongedComponentToMoveWhenMoved: f,
|
|
5031
5011
|
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
5032
|
-
} =
|
|
5033
|
-
function u(l) {
|
|
5034
|
-
return new
|
|
5012
|
+
} = Io(t), d = t.schema;
|
|
5013
|
+
function u(l, m) {
|
|
5014
|
+
return new Lo(l, n).getPropertyConfig(d, m);
|
|
5035
5015
|
}
|
|
5036
5016
|
return {
|
|
5037
5017
|
canAccepts: e,
|
|
5038
5018
|
checkCanDeleteComponent: r,
|
|
5039
5019
|
checkCanMoveComponent: o,
|
|
5040
5020
|
hideNestedPaddingInDesginerView: a,
|
|
5041
|
-
onAcceptMovedChildElement:
|
|
5042
|
-
resolveComponentContext:
|
|
5043
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
5021
|
+
onAcceptMovedChildElement: s,
|
|
5022
|
+
resolveComponentContext: i,
|
|
5023
|
+
triggerBelongedComponentToMoveWhenMoved: f,
|
|
5044
5024
|
triggerBelongedComponentToDeleteWhenDeleted: c,
|
|
5045
5025
|
getPropsConfig: u
|
|
5046
5026
|
};
|
|
5047
5027
|
}
|
|
5048
|
-
const
|
|
5028
|
+
const jo = /* @__PURE__ */ re({
|
|
5049
5029
|
name: "FTimePickerDesign",
|
|
5050
|
-
props:
|
|
5030
|
+
props: De,
|
|
5051
5031
|
emits: ["datePicked", "update:modelValue"],
|
|
5052
5032
|
setup(t, n) {
|
|
5053
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(),
|
|
5054
|
-
|
|
5033
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(), s = me("designer-host-service"), i = me("design-item-context"), f = _o(i, s), c = Yo(a, i, f);
|
|
5034
|
+
fe(() => {
|
|
5055
5035
|
a.value.componentInstance = c;
|
|
5056
5036
|
}), n.expose(c.value);
|
|
5057
5037
|
function d() {
|
|
5058
5038
|
}
|
|
5059
|
-
return () =>
|
|
5039
|
+
return () => b("div", {
|
|
5060
5040
|
ref: a
|
|
5061
|
-
}, [
|
|
5041
|
+
}, [b(de, {
|
|
5062
5042
|
ref: o,
|
|
5063
5043
|
modelValue: r.value,
|
|
5064
5044
|
"onUpdate:modelValue": (u) => r.value = u,
|
|
@@ -5066,24 +5046,24 @@ const Ao = /* @__PURE__ */ ne({
|
|
|
5066
5046
|
enableClear: !0,
|
|
5067
5047
|
onClickButton: () => void 0
|
|
5068
5048
|
}, {
|
|
5069
|
-
default: () => [
|
|
5049
|
+
default: () => [b(Ht("f-time-picker-time-view"), null, null)]
|
|
5070
5050
|
})]);
|
|
5071
5051
|
}
|
|
5072
5052
|
});
|
|
5073
|
-
|
|
5074
|
-
t.component(
|
|
5053
|
+
te.install = (t) => {
|
|
5054
|
+
t.component(te.name, te).component(Ce.name, Ce);
|
|
5075
5055
|
};
|
|
5076
|
-
|
|
5077
|
-
t["time-picker"] =
|
|
5056
|
+
te.register = (t, n, e, r) => {
|
|
5057
|
+
t["time-picker"] = te, n["time-picker"] = Qe;
|
|
5078
5058
|
};
|
|
5079
|
-
|
|
5080
|
-
t["time-picker"] =
|
|
5059
|
+
te.registerDesigner = (t, n, e) => {
|
|
5060
|
+
t["time-picker"] = jo, n["time-picker"] = Qe;
|
|
5081
5061
|
};
|
|
5082
5062
|
export {
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5063
|
+
te as FTimePicker,
|
|
5064
|
+
Ce as FTimePickerTimeView,
|
|
5065
|
+
te as default,
|
|
5066
|
+
Qe as propsResolver,
|
|
5067
|
+
De as timePickerProps,
|
|
5068
|
+
tn as timeProps
|
|
5089
5069
|
};
|