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