@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- 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/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { isPlainObject as
|
|
1
|
+
var kt = Object.defineProperty;
|
|
2
|
+
var Ct = (t, n, e) => n in t ? kt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
|
+
var f = (t, n, e) => Ct(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { ref as x, 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 Ot, inject as me, nextTick as Se, withDirectives as Dt, vShow as Ht, Fragment as Et, resolveComponent as Bt } from "vue";
|
|
5
|
+
import { isPlainObject as Ie, cloneDeep as $e } from "lodash-es";
|
|
6
6
|
import Ft from "../button-edit/index.esm.js";
|
|
7
7
|
import "bignumber.js";
|
|
8
8
|
import { resolveAppearance as Vt } from "../dynamic-resolver/index.esm.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import St from "../tags/index.esm.js";
|
|
10
|
+
import It from "../popover/index.esm.js";
|
|
11
11
|
import { useDesignerComponent as Nt, DgControl as Ne } from "../designer-canvas/index.esm.js";
|
|
12
12
|
import { withInstall as Lt } from "../common/index.esm.js";
|
|
13
13
|
const je = {}, Re = {};
|
|
14
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((
|
|
16
|
-
|
|
15
|
+
const { properties: n, title: e, ignore: r } = t, o = r && Array.isArray(r), a = Object.keys(n).reduce((i, u) => ((!o || !r.find((p) => p === u)) && (i[u] = n[u].type === "object" && n[u].properties ? Pe(n[u]) : $e(n[u].default)), i), {});
|
|
16
|
+
if (e && (!o || !r.find((i) => i === "id"))) {
|
|
17
|
+
const i = e.toLowerCase().replace(/-/g, "_");
|
|
18
|
+
a.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
17
21
|
}
|
|
18
22
|
function Qe(t, n = {}, e) {
|
|
19
23
|
const r = je[t];
|
|
@@ -26,7 +30,7 @@ function Qe(t, n = {}, e) {
|
|
|
26
30
|
}
|
|
27
31
|
function Wt(t, n) {
|
|
28
32
|
const e = Pe(n);
|
|
29
|
-
return Object.keys(
|
|
33
|
+
return Object.keys(e).reduce((r, o) => (r[o] && Ie(r[o]) && Ie(t[o] || !t[o]) ? Object.assign(r[o], t[o] || {}) : r[o] = t[o], r), e), e;
|
|
30
34
|
}
|
|
31
35
|
function Yt(t, n) {
|
|
32
36
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
@@ -43,11 +47,11 @@ function Yt(t, n) {
|
|
|
43
47
|
return r;
|
|
44
48
|
}, {});
|
|
45
49
|
}
|
|
46
|
-
function
|
|
50
|
+
function qt(t, n, e = /* @__PURE__ */ new Map()) {
|
|
47
51
|
const r = Wt(t, n);
|
|
48
52
|
return Yt(r, e);
|
|
49
53
|
}
|
|
50
|
-
function
|
|
54
|
+
function At(t = {}) {
|
|
51
55
|
function n(c, d, s, l) {
|
|
52
56
|
if (typeof s == "number")
|
|
53
57
|
return l[c].length === s;
|
|
@@ -95,11 +99,11 @@ function qt(t = {}) {
|
|
|
95
99
|
function u(c, d) {
|
|
96
100
|
return a(c).reduce((m, h) => m && i(h, d), !0);
|
|
97
101
|
}
|
|
98
|
-
function
|
|
99
|
-
const s = Object.keys(c), l = s.includes("allOf"), m = s.includes("anyOf"), h = l || m,
|
|
100
|
-
return l ? !
|
|
102
|
+
function p(c, d) {
|
|
103
|
+
const s = Object.keys(c), l = s.includes("allOf"), m = s.includes("anyOf"), h = l || m, O = (h ? c[h ? l ? "allOf" : "anyOf" : "allOf"] : [c]).map((b) => u(b, d));
|
|
104
|
+
return l ? !O.includes(!1) : O.includes(!0);
|
|
101
105
|
}
|
|
102
|
-
return { parseValueSchema:
|
|
106
|
+
return { parseValueSchema: p };
|
|
103
107
|
}
|
|
104
108
|
const T = {
|
|
105
109
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -139,13 +143,14 @@ const T = {
|
|
|
139
143
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
140
144
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
141
145
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
142
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
146
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
147
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
143
148
|
}, _t = {}, Gt = {};
|
|
144
|
-
|
|
145
|
-
function Ue(t, n, e = /* @__PURE__ */ new Map(), r = (i, u,
|
|
149
|
+
At();
|
|
150
|
+
function Ue(t, n, e = /* @__PURE__ */ new Map(), r = (i, u, p, c) => u, o = {}, a = (i) => i) {
|
|
146
151
|
return je[n.title] = n, Re[n.title] = r, _t[n.title] = o, Gt[n.title] = a, (i = {}) => {
|
|
147
|
-
const u =
|
|
148
|
-
return Object.assign(
|
|
152
|
+
const u = qt(i, n, e), p = Object.keys(t).reduce((c, d) => (c[d] = t[d].default, c), {});
|
|
153
|
+
return Object.assign(p, u);
|
|
149
154
|
};
|
|
150
155
|
}
|
|
151
156
|
function $t(t, n) {
|
|
@@ -236,7 +241,8 @@ const jt = /* @__PURE__ */ new Map([
|
|
|
236
241
|
], Kt = [
|
|
237
242
|
"id",
|
|
238
243
|
"appearance",
|
|
239
|
-
"binding"
|
|
244
|
+
"binding",
|
|
245
|
+
"visible"
|
|
240
246
|
], en = {
|
|
241
247
|
$schema: Rt,
|
|
242
248
|
$id: Qt,
|
|
@@ -250,7 +256,7 @@ const jt = /* @__PURE__ */ new Map([
|
|
|
250
256
|
function tn(t, n, e) {
|
|
251
257
|
return n;
|
|
252
258
|
}
|
|
253
|
-
const
|
|
259
|
+
const Oe = {
|
|
254
260
|
/**
|
|
255
261
|
* 组件值,这个是与指定的format格式相对应的值
|
|
256
262
|
*/
|
|
@@ -278,7 +284,7 @@ const De = {
|
|
|
278
284
|
disabled: { type: Boolean, default: !1 },
|
|
279
285
|
readonly: { type: Boolean, default: !1 },
|
|
280
286
|
editable: { type: Boolean, default: !0 }
|
|
281
|
-
}, Xe = Ue(
|
|
287
|
+
}, Xe = Ue(Oe, en, jt, tn), nn = {
|
|
282
288
|
modelValue: {
|
|
283
289
|
type: String,
|
|
284
290
|
default: ""
|
|
@@ -336,12 +342,12 @@ function _(t) {
|
|
|
336
342
|
const n = Object.prototype.toString.call(t);
|
|
337
343
|
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);
|
|
338
344
|
}
|
|
339
|
-
function
|
|
345
|
+
function W(t, n) {
|
|
340
346
|
return t instanceof Date ? new t.constructor(n) : new Date(n);
|
|
341
347
|
}
|
|
342
348
|
function ze(t, n) {
|
|
343
349
|
const e = _(t);
|
|
344
|
-
return isNaN(n) ?
|
|
350
|
+
return isNaN(n) ? W(t, NaN) : (n && e.setDate(e.getDate() + n), e);
|
|
345
351
|
}
|
|
346
352
|
const Je = 6048e5, rn = 864e5, on = 6e4, an = 36e5, sn = 1e3;
|
|
347
353
|
let un = {};
|
|
@@ -349,17 +355,17 @@ function ne() {
|
|
|
349
355
|
return un;
|
|
350
356
|
}
|
|
351
357
|
function X(t, n) {
|
|
352
|
-
var u,
|
|
353
|
-
const e = ne(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((
|
|
358
|
+
var u, p, c, d;
|
|
359
|
+
const e = ne(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((p = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : p.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
360
|
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
355
361
|
}
|
|
356
362
|
function ee(t) {
|
|
357
363
|
return X(t, { weekStartsOn: 1 });
|
|
358
364
|
}
|
|
359
365
|
function Ze(t) {
|
|
360
|
-
const n = _(t), e = n.getFullYear(), r =
|
|
366
|
+
const n = _(t), e = n.getFullYear(), r = W(t, 0);
|
|
361
367
|
r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
362
|
-
const o = ee(r), a =
|
|
368
|
+
const o = ee(r), a = W(t, 0);
|
|
363
369
|
a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0);
|
|
364
370
|
const i = ee(a);
|
|
365
371
|
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >= i.getTime() ? e : e - 1;
|
|
@@ -387,7 +393,7 @@ function ln(t, n) {
|
|
|
387
393
|
return Math.round((o - a) / rn);
|
|
388
394
|
}
|
|
389
395
|
function cn(t) {
|
|
390
|
-
const n = Ze(t), e =
|
|
396
|
+
const n = Ze(t), e = W(t, 0);
|
|
391
397
|
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), ee(e);
|
|
392
398
|
}
|
|
393
399
|
function dn(t) {
|
|
@@ -400,7 +406,7 @@ function Ke(t) {
|
|
|
400
406
|
return !isNaN(Number(n));
|
|
401
407
|
}
|
|
402
408
|
function fn(t) {
|
|
403
|
-
const n = _(t), e =
|
|
409
|
+
const n = _(t), e = W(t, 0);
|
|
404
410
|
return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
405
411
|
}
|
|
406
412
|
const pn = {
|
|
@@ -535,7 +541,7 @@ const xn = {
|
|
|
535
541
|
narrow: ["1", "2", "3", "4"],
|
|
536
542
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
537
543
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
538
|
-
},
|
|
544
|
+
}, kn = {
|
|
539
545
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
540
546
|
abbreviated: [
|
|
541
547
|
"Jan",
|
|
@@ -565,7 +571,7 @@ const xn = {
|
|
|
565
571
|
"November",
|
|
566
572
|
"December"
|
|
567
573
|
]
|
|
568
|
-
},
|
|
574
|
+
}, Cn = {
|
|
569
575
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
570
576
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
571
577
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -640,7 +646,7 @@ const xn = {
|
|
|
640
646
|
evening: "in the evening",
|
|
641
647
|
night: "at night"
|
|
642
648
|
}
|
|
643
|
-
},
|
|
649
|
+
}, On = (t, n) => {
|
|
644
650
|
const e = Number(t), r = e % 100;
|
|
645
651
|
if (r > 20 || r < 10)
|
|
646
652
|
switch (r % 10) {
|
|
@@ -652,8 +658,8 @@ const xn = {
|
|
|
652
658
|
return e + "rd";
|
|
653
659
|
}
|
|
654
660
|
return e + "th";
|
|
655
|
-
},
|
|
656
|
-
ordinalNumber:
|
|
661
|
+
}, Dn = {
|
|
662
|
+
ordinalNumber: On,
|
|
657
663
|
era: ie({
|
|
658
664
|
values: xn,
|
|
659
665
|
defaultWidth: "wide"
|
|
@@ -664,11 +670,11 @@ const xn = {
|
|
|
664
670
|
argumentCallback: (t) => t - 1
|
|
665
671
|
}),
|
|
666
672
|
month: ie({
|
|
667
|
-
values:
|
|
673
|
+
values: kn,
|
|
668
674
|
defaultWidth: "wide"
|
|
669
675
|
}),
|
|
670
676
|
day: ie({
|
|
671
|
-
values:
|
|
677
|
+
values: Cn,
|
|
672
678
|
defaultWidth: "wide"
|
|
673
679
|
}),
|
|
674
680
|
dayPeriod: ie({
|
|
@@ -683,12 +689,12 @@ function ue(t) {
|
|
|
683
689
|
const r = e.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = n.match(o);
|
|
684
690
|
if (!a)
|
|
685
691
|
return null;
|
|
686
|
-
const i = a[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth],
|
|
692
|
+
const i = a[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], p = Array.isArray(u) ? En(u, (s) => s.test(i)) : (
|
|
687
693
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
688
694
|
Hn(u, (s) => s.test(i))
|
|
689
695
|
);
|
|
690
696
|
let c;
|
|
691
|
-
c = t.valueCallback ? t.valueCallback(
|
|
697
|
+
c = t.valueCallback ? t.valueCallback(p) : p, c = e.valueCallback ? (
|
|
692
698
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
693
699
|
e.valueCallback(c)
|
|
694
700
|
) : c;
|
|
@@ -718,11 +724,11 @@ function Bn(t) {
|
|
|
718
724
|
return { value: i, rest: u };
|
|
719
725
|
};
|
|
720
726
|
}
|
|
721
|
-
const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i,
|
|
727
|
+
const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Sn = {
|
|
722
728
|
narrow: /^(b|a)/i,
|
|
723
729
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
724
730
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
725
|
-
},
|
|
731
|
+
}, In = {
|
|
726
732
|
any: [/^b/i, /^(a|c)/i]
|
|
727
733
|
}, Nn = {
|
|
728
734
|
narrow: /^[1234]/i,
|
|
@@ -763,12 +769,12 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, In = {
|
|
|
763
769
|
/^n/i,
|
|
764
770
|
/^d/i
|
|
765
771
|
]
|
|
766
|
-
},
|
|
772
|
+
}, qn = {
|
|
767
773
|
narrow: /^[smtwf]/i,
|
|
768
774
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
769
775
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
770
776
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
771
|
-
},
|
|
777
|
+
}, An = {
|
|
772
778
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
773
779
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
774
780
|
}, _n = {
|
|
@@ -792,9 +798,9 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, In = {
|
|
|
792
798
|
valueCallback: (t) => parseInt(t, 10)
|
|
793
799
|
}),
|
|
794
800
|
era: ue({
|
|
795
|
-
matchPatterns:
|
|
801
|
+
matchPatterns: Sn,
|
|
796
802
|
defaultMatchWidth: "wide",
|
|
797
|
-
parsePatterns:
|
|
803
|
+
parsePatterns: In,
|
|
798
804
|
defaultParseWidth: "any"
|
|
799
805
|
}),
|
|
800
806
|
quarter: ue({
|
|
@@ -811,9 +817,9 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, In = {
|
|
|
811
817
|
defaultParseWidth: "any"
|
|
812
818
|
}),
|
|
813
819
|
day: ue({
|
|
814
|
-
matchPatterns:
|
|
820
|
+
matchPatterns: qn,
|
|
815
821
|
defaultMatchWidth: "wide",
|
|
816
|
-
parsePatterns:
|
|
822
|
+
parsePatterns: An,
|
|
817
823
|
defaultParseWidth: "any"
|
|
818
824
|
}),
|
|
819
825
|
dayPeriod: ue({
|
|
@@ -827,7 +833,7 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, In = {
|
|
|
827
833
|
formatDistance: mn,
|
|
828
834
|
formatLong: bn,
|
|
829
835
|
formatRelative: vn,
|
|
830
|
-
localize:
|
|
836
|
+
localize: Dn,
|
|
831
837
|
match: $n,
|
|
832
838
|
options: {
|
|
833
839
|
weekStartsOn: 0,
|
|
@@ -842,25 +848,25 @@ function tt(t) {
|
|
|
842
848
|
const n = _(t), e = +ee(n) - +cn(n);
|
|
843
849
|
return Math.round(e / Je) + 1;
|
|
844
850
|
}
|
|
845
|
-
function
|
|
851
|
+
function De(t, n) {
|
|
846
852
|
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 =
|
|
853
|
+
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 = W(t, 0);
|
|
848
854
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
849
|
-
const u = X(i, n),
|
|
850
|
-
|
|
851
|
-
const c = X(
|
|
855
|
+
const u = X(i, n), p = W(t, 0);
|
|
856
|
+
p.setFullYear(r, 0, a), p.setHours(0, 0, 0, 0);
|
|
857
|
+
const c = X(p, n);
|
|
852
858
|
return e.getTime() >= u.getTime() ? r + 1 : e.getTime() >= c.getTime() ? r : r - 1;
|
|
853
859
|
}
|
|
854
860
|
function Rn(t, n) {
|
|
855
|
-
var u,
|
|
856
|
-
const e = ne(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((
|
|
861
|
+
var u, p, c, d;
|
|
862
|
+
const e = ne(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((p = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : p.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = De(t, n), a = W(t, 0);
|
|
857
863
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), X(a, n);
|
|
858
864
|
}
|
|
859
865
|
function nt(t, n) {
|
|
860
866
|
const e = _(t), r = +X(e, n) - +Rn(e, n);
|
|
861
867
|
return Math.round(r / Je) + 1;
|
|
862
868
|
}
|
|
863
|
-
function
|
|
869
|
+
function B(t, n) {
|
|
864
870
|
const e = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(n, "0");
|
|
865
871
|
return e + r;
|
|
866
872
|
}
|
|
@@ -868,16 +874,16 @@ const U = {
|
|
|
868
874
|
// Year
|
|
869
875
|
y(t, n) {
|
|
870
876
|
const e = t.getFullYear(), r = e > 0 ? e : 1 - e;
|
|
871
|
-
return
|
|
877
|
+
return B(n === "yy" ? r % 100 : r, n.length);
|
|
872
878
|
},
|
|
873
879
|
// Month
|
|
874
880
|
M(t, n) {
|
|
875
881
|
const e = t.getMonth();
|
|
876
|
-
return n === "M" ? String(e + 1) :
|
|
882
|
+
return n === "M" ? String(e + 1) : B(e + 1, 2);
|
|
877
883
|
},
|
|
878
884
|
// Day of the month
|
|
879
885
|
d(t, n) {
|
|
880
|
-
return
|
|
886
|
+
return B(t.getDate(), n.length);
|
|
881
887
|
},
|
|
882
888
|
// AM or PM
|
|
883
889
|
a(t, n) {
|
|
@@ -897,26 +903,26 @@ const U = {
|
|
|
897
903
|
},
|
|
898
904
|
// Hour [1-12]
|
|
899
905
|
h(t, n) {
|
|
900
|
-
return
|
|
906
|
+
return B(t.getHours() % 12 || 12, n.length);
|
|
901
907
|
},
|
|
902
908
|
// Hour [0-23]
|
|
903
909
|
H(t, n) {
|
|
904
|
-
return
|
|
910
|
+
return B(t.getHours(), n.length);
|
|
905
911
|
},
|
|
906
912
|
// Minute
|
|
907
913
|
m(t, n) {
|
|
908
|
-
return
|
|
914
|
+
return B(t.getMinutes(), n.length);
|
|
909
915
|
},
|
|
910
916
|
// Second
|
|
911
917
|
s(t, n) {
|
|
912
|
-
return
|
|
918
|
+
return B(t.getSeconds(), n.length);
|
|
913
919
|
},
|
|
914
920
|
// Fraction of second
|
|
915
921
|
S(t, n) {
|
|
916
922
|
const e = n.length, r = t.getMilliseconds(), o = Math.trunc(
|
|
917
923
|
r * Math.pow(10, e - 3)
|
|
918
924
|
);
|
|
919
|
-
return
|
|
925
|
+
return B(o, n.length);
|
|
920
926
|
}
|
|
921
927
|
}, J = {
|
|
922
928
|
am: "am",
|
|
@@ -953,17 +959,17 @@ const U = {
|
|
|
953
959
|
},
|
|
954
960
|
// Local week-numbering year
|
|
955
961
|
Y: function(t, n, e, r) {
|
|
956
|
-
const o =
|
|
962
|
+
const o = De(t, r), a = o > 0 ? o : 1 - o;
|
|
957
963
|
if (n === "YY") {
|
|
958
964
|
const i = a % 100;
|
|
959
|
-
return
|
|
965
|
+
return B(i, 2);
|
|
960
966
|
}
|
|
961
|
-
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) :
|
|
967
|
+
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) : B(a, n.length);
|
|
962
968
|
},
|
|
963
969
|
// ISO week-numbering year
|
|
964
970
|
R: function(t, n) {
|
|
965
971
|
const e = Ze(t);
|
|
966
|
-
return
|
|
972
|
+
return B(e, n.length);
|
|
967
973
|
},
|
|
968
974
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
969
975
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -976,7 +982,7 @@ const U = {
|
|
|
976
982
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
977
983
|
u: function(t, n) {
|
|
978
984
|
const e = t.getFullYear();
|
|
979
|
-
return
|
|
985
|
+
return B(e, n.length);
|
|
980
986
|
},
|
|
981
987
|
// Quarter
|
|
982
988
|
Q: function(t, n, e) {
|
|
@@ -985,7 +991,7 @@ const U = {
|
|
|
985
991
|
case "Q":
|
|
986
992
|
return String(r);
|
|
987
993
|
case "QQ":
|
|
988
|
-
return
|
|
994
|
+
return B(r, 2);
|
|
989
995
|
case "Qo":
|
|
990
996
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
991
997
|
case "QQQ":
|
|
@@ -1013,7 +1019,7 @@ const U = {
|
|
|
1013
1019
|
case "q":
|
|
1014
1020
|
return String(r);
|
|
1015
1021
|
case "qq":
|
|
1016
|
-
return
|
|
1022
|
+
return B(r, 2);
|
|
1017
1023
|
case "qo":
|
|
1018
1024
|
return e.ordinalNumber(r, { unit: "quarter" });
|
|
1019
1025
|
case "qqq":
|
|
@@ -1065,7 +1071,7 @@ const U = {
|
|
|
1065
1071
|
case "L":
|
|
1066
1072
|
return String(r + 1);
|
|
1067
1073
|
case "LL":
|
|
1068
|
-
return
|
|
1074
|
+
return B(r + 1, 2);
|
|
1069
1075
|
case "Lo":
|
|
1070
1076
|
return e.ordinalNumber(r + 1, { unit: "month" });
|
|
1071
1077
|
case "LLL":
|
|
@@ -1086,12 +1092,12 @@ const U = {
|
|
|
1086
1092
|
// Local week of year
|
|
1087
1093
|
w: function(t, n, e, r) {
|
|
1088
1094
|
const o = nt(t, r);
|
|
1089
|
-
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) :
|
|
1095
|
+
return n === "wo" ? e.ordinalNumber(o, { unit: "week" }) : B(o, n.length);
|
|
1090
1096
|
},
|
|
1091
1097
|
// ISO week of year
|
|
1092
1098
|
I: function(t, n, e) {
|
|
1093
1099
|
const r = tt(t);
|
|
1094
|
-
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) :
|
|
1100
|
+
return n === "Io" ? e.ordinalNumber(r, { unit: "week" }) : B(r, n.length);
|
|
1095
1101
|
},
|
|
1096
1102
|
// Day of the month
|
|
1097
1103
|
d: function(t, n, e) {
|
|
@@ -1100,7 +1106,7 @@ const U = {
|
|
|
1100
1106
|
// Day of year
|
|
1101
1107
|
D: function(t, n, e) {
|
|
1102
1108
|
const r = jn(t);
|
|
1103
|
-
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) :
|
|
1109
|
+
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) : B(r, n.length);
|
|
1104
1110
|
},
|
|
1105
1111
|
// Day of week
|
|
1106
1112
|
E: function(t, n, e) {
|
|
@@ -1138,7 +1144,7 @@ const U = {
|
|
|
1138
1144
|
case "e":
|
|
1139
1145
|
return String(a);
|
|
1140
1146
|
case "ee":
|
|
1141
|
-
return
|
|
1147
|
+
return B(a, 2);
|
|
1142
1148
|
case "eo":
|
|
1143
1149
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1144
1150
|
case "eee":
|
|
@@ -1171,7 +1177,7 @@ const U = {
|
|
|
1171
1177
|
case "c":
|
|
1172
1178
|
return String(a);
|
|
1173
1179
|
case "cc":
|
|
1174
|
-
return
|
|
1180
|
+
return B(a, n.length);
|
|
1175
1181
|
case "co":
|
|
1176
1182
|
return e.ordinalNumber(a, { unit: "day" });
|
|
1177
1183
|
case "ccc":
|
|
@@ -1204,7 +1210,7 @@ const U = {
|
|
|
1204
1210
|
case "i":
|
|
1205
1211
|
return String(o);
|
|
1206
1212
|
case "ii":
|
|
1207
|
-
return
|
|
1213
|
+
return B(o, n.length);
|
|
1208
1214
|
case "io":
|
|
1209
1215
|
return e.ordinalNumber(o, { unit: "day" });
|
|
1210
1216
|
case "iii":
|
|
@@ -1327,12 +1333,12 @@ const U = {
|
|
|
1327
1333
|
// Hour [0-11]
|
|
1328
1334
|
K: function(t, n, e) {
|
|
1329
1335
|
const r = t.getHours() % 12;
|
|
1330
|
-
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1336
|
+
return n === "Ko" ? e.ordinalNumber(r, { unit: "hour" }) : B(r, n.length);
|
|
1331
1337
|
},
|
|
1332
1338
|
// Hour [1-24]
|
|
1333
1339
|
k: function(t, n, e) {
|
|
1334
1340
|
let r = t.getHours();
|
|
1335
|
-
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) :
|
|
1341
|
+
return r === 0 && (r = 24), n === "ko" ? e.ordinalNumber(r, { unit: "hour" }) : B(r, n.length);
|
|
1336
1342
|
},
|
|
1337
1343
|
// Minute
|
|
1338
1344
|
m: function(t, n, e) {
|
|
@@ -1353,7 +1359,7 @@ const U = {
|
|
|
1353
1359
|
return "Z";
|
|
1354
1360
|
switch (n) {
|
|
1355
1361
|
case "X":
|
|
1356
|
-
return
|
|
1362
|
+
return qe(r);
|
|
1357
1363
|
case "XXXX":
|
|
1358
1364
|
case "XX":
|
|
1359
1365
|
return z(r);
|
|
@@ -1368,7 +1374,7 @@ const U = {
|
|
|
1368
1374
|
const r = t.getTimezoneOffset();
|
|
1369
1375
|
switch (n) {
|
|
1370
1376
|
case "x":
|
|
1371
|
-
return
|
|
1377
|
+
return qe(r);
|
|
1372
1378
|
case "xxxx":
|
|
1373
1379
|
case "xx":
|
|
1374
1380
|
return z(r);
|
|
@@ -1407,26 +1413,26 @@ const U = {
|
|
|
1407
1413
|
// Seconds timestamp
|
|
1408
1414
|
t: function(t, n, e) {
|
|
1409
1415
|
const r = Math.trunc(t.getTime() / 1e3);
|
|
1410
|
-
return
|
|
1416
|
+
return B(r, n.length);
|
|
1411
1417
|
},
|
|
1412
1418
|
// Milliseconds timestamp
|
|
1413
1419
|
T: function(t, n, e) {
|
|
1414
1420
|
const r = t.getTime();
|
|
1415
|
-
return
|
|
1421
|
+
return B(r, n.length);
|
|
1416
1422
|
}
|
|
1417
1423
|
};
|
|
1418
1424
|
function Ye(t, n = "") {
|
|
1419
1425
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
1420
|
-
return a === 0 ? e + String(o) : e + String(o) + n +
|
|
1426
|
+
return a === 0 ? e + String(o) : e + String(o) + n + B(a, 2);
|
|
1421
1427
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") +
|
|
1428
|
+
function qe(t, n) {
|
|
1429
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + B(Math.abs(t) / 60, 2) : z(t, n);
|
|
1424
1430
|
}
|
|
1425
1431
|
function z(t, n = "") {
|
|
1426
|
-
const e = t > 0 ? "-" : "+", r = Math.abs(t), o =
|
|
1432
|
+
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = B(Math.trunc(r / 60), 2), a = B(r % 60, 2);
|
|
1427
1433
|
return e + o + n + a;
|
|
1428
1434
|
}
|
|
1429
|
-
const
|
|
1435
|
+
const Ae = (t, n) => {
|
|
1430
1436
|
switch (t) {
|
|
1431
1437
|
case "P":
|
|
1432
1438
|
return n.date({ width: "short" });
|
|
@@ -1453,7 +1459,7 @@ const qe = (t, n) => {
|
|
|
1453
1459
|
}, Qn = (t, n) => {
|
|
1454
1460
|
const e = t.match(/(P+)(p+)?/) || [], r = e[1], o = e[2];
|
|
1455
1461
|
if (!o)
|
|
1456
|
-
return
|
|
1462
|
+
return Ae(t, n);
|
|
1457
1463
|
let a;
|
|
1458
1464
|
switch (r) {
|
|
1459
1465
|
case "P":
|
|
@@ -1470,7 +1476,7 @@ const qe = (t, n) => {
|
|
|
1470
1476
|
a = n.dateTime({ width: "full" });
|
|
1471
1477
|
break;
|
|
1472
1478
|
}
|
|
1473
|
-
return a.replace("{{date}}",
|
|
1479
|
+
return a.replace("{{date}}", Ae(r, n)).replace("{{time}}", rt(o, n));
|
|
1474
1480
|
}, Me = {
|
|
1475
1481
|
p: rt,
|
|
1476
1482
|
P: Qn
|
|
@@ -1481,7 +1487,7 @@ function ot(t) {
|
|
|
1481
1487
|
function at(t) {
|
|
1482
1488
|
return Xn.test(t);
|
|
1483
1489
|
}
|
|
1484
|
-
function
|
|
1490
|
+
function ke(t, n, e) {
|
|
1485
1491
|
const r = Jn(t, n, e);
|
|
1486
1492
|
if (console.warn(r), zn.includes(t)) throw new RangeError(r);
|
|
1487
1493
|
}
|
|
@@ -1495,7 +1501,7 @@ function _e(t, n, e) {
|
|
|
1495
1501
|
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
1502
|
if (!Ke(u))
|
|
1497
1503
|
throw new RangeError("Invalid time value");
|
|
1498
|
-
let
|
|
1504
|
+
let p = n.match(Kn).map((h) => {
|
|
1499
1505
|
const g = h[0];
|
|
1500
1506
|
if (g === "p" || g === "P") {
|
|
1501
1507
|
const P = Me[g];
|
|
@@ -1516,16 +1522,16 @@ function _e(t, n, e) {
|
|
|
1516
1522
|
);
|
|
1517
1523
|
return { isToken: !1, value: h };
|
|
1518
1524
|
});
|
|
1519
|
-
o.localize.preprocessor && (
|
|
1525
|
+
o.localize.preprocessor && (p = o.localize.preprocessor(u, p));
|
|
1520
1526
|
const c = {
|
|
1521
1527
|
firstWeekContainsDate: a,
|
|
1522
1528
|
weekStartsOn: i,
|
|
1523
1529
|
locale: o
|
|
1524
1530
|
};
|
|
1525
|
-
return
|
|
1531
|
+
return p.map((h) => {
|
|
1526
1532
|
if (!h.isToken) return h.value;
|
|
1527
1533
|
const g = h.value;
|
|
1528
|
-
(at(g) || ot(g)) &&
|
|
1534
|
+
(at(g) || ot(g)) && ke(g, n, String(t));
|
|
1529
1535
|
const P = We[g[0]];
|
|
1530
1536
|
return P(u, g, o.localize, c);
|
|
1531
1537
|
}).join("");
|
|
@@ -1542,7 +1548,7 @@ function ar(t) {
|
|
|
1542
1548
|
return e === 0 && (e = 7), e;
|
|
1543
1549
|
}
|
|
1544
1550
|
function sr(t, n) {
|
|
1545
|
-
const e = n instanceof Date ?
|
|
1551
|
+
const e = n instanceof Date ? W(n, 0) : new n(0);
|
|
1546
1552
|
return e.setFullYear(
|
|
1547
1553
|
t.getFullYear(),
|
|
1548
1554
|
t.getMonth(),
|
|
@@ -1557,7 +1563,7 @@ function sr(t, n) {
|
|
|
1557
1563
|
const ir = 10;
|
|
1558
1564
|
class st {
|
|
1559
1565
|
constructor() {
|
|
1560
|
-
|
|
1566
|
+
f(this, "subPriority", 0);
|
|
1561
1567
|
}
|
|
1562
1568
|
validate(n, e) {
|
|
1563
1569
|
return !0;
|
|
@@ -1577,11 +1583,11 @@ class ur extends st {
|
|
|
1577
1583
|
class lr extends st {
|
|
1578
1584
|
constructor() {
|
|
1579
1585
|
super(...arguments);
|
|
1580
|
-
|
|
1581
|
-
|
|
1586
|
+
f(this, "priority", ir);
|
|
1587
|
+
f(this, "subPriority", -1);
|
|
1582
1588
|
}
|
|
1583
1589
|
set(e, r) {
|
|
1584
|
-
return r.timestampIsSet ? e :
|
|
1590
|
+
return r.timestampIsSet ? e : W(e, sr(e, Date));
|
|
1585
1591
|
}
|
|
1586
1592
|
}
|
|
1587
1593
|
class H {
|
|
@@ -1605,8 +1611,8 @@ class H {
|
|
|
1605
1611
|
class cr extends H {
|
|
1606
1612
|
constructor() {
|
|
1607
1613
|
super(...arguments);
|
|
1608
|
-
|
|
1609
|
-
|
|
1614
|
+
f(this, "priority", 140);
|
|
1615
|
+
f(this, "incompatibleTokens", ["R", "u", "t", "T"]);
|
|
1610
1616
|
}
|
|
1611
1617
|
parse(e, r, o) {
|
|
1612
1618
|
switch (r) {
|
|
@@ -1625,7 +1631,7 @@ class cr extends H {
|
|
|
1625
1631
|
return r.era = o, e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1626
1632
|
}
|
|
1627
1633
|
}
|
|
1628
|
-
const
|
|
1634
|
+
const q = {
|
|
1629
1635
|
month: /^(1[0-2]|0?\d)/,
|
|
1630
1636
|
// 0 to 12
|
|
1631
1637
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -1676,7 +1682,7 @@ function A(t, n) {
|
|
|
1676
1682
|
rest: t.rest
|
|
1677
1683
|
};
|
|
1678
1684
|
}
|
|
1679
|
-
function
|
|
1685
|
+
function N(t, n) {
|
|
1680
1686
|
const e = n.match(t);
|
|
1681
1687
|
return e ? {
|
|
1682
1688
|
value: parseInt(e[0], 10),
|
|
@@ -1699,34 +1705,34 @@ function Q(t, n) {
|
|
|
1699
1705
|
};
|
|
1700
1706
|
}
|
|
1701
1707
|
function it(t) {
|
|
1702
|
-
return
|
|
1708
|
+
return N(q.anyDigitsSigned, t);
|
|
1703
1709
|
}
|
|
1704
|
-
function
|
|
1710
|
+
function Y(t, n) {
|
|
1705
1711
|
switch (t) {
|
|
1706
1712
|
case 1:
|
|
1707
|
-
return
|
|
1713
|
+
return N(q.singleDigit, n);
|
|
1708
1714
|
case 2:
|
|
1709
|
-
return
|
|
1715
|
+
return N(q.twoDigits, n);
|
|
1710
1716
|
case 3:
|
|
1711
|
-
return
|
|
1717
|
+
return N(q.threeDigits, n);
|
|
1712
1718
|
case 4:
|
|
1713
|
-
return
|
|
1719
|
+
return N(q.fourDigits, n);
|
|
1714
1720
|
default:
|
|
1715
|
-
return
|
|
1721
|
+
return N(new RegExp("^\\d{1," + t + "}"), n);
|
|
1716
1722
|
}
|
|
1717
1723
|
}
|
|
1718
1724
|
function ye(t, n) {
|
|
1719
1725
|
switch (t) {
|
|
1720
1726
|
case 1:
|
|
1721
|
-
return
|
|
1727
|
+
return N(q.singleDigitSigned, n);
|
|
1722
1728
|
case 2:
|
|
1723
|
-
return
|
|
1729
|
+
return N(q.twoDigitsSigned, n);
|
|
1724
1730
|
case 3:
|
|
1725
|
-
return
|
|
1731
|
+
return N(q.threeDigitsSigned, n);
|
|
1726
1732
|
case 4:
|
|
1727
|
-
return
|
|
1733
|
+
return N(q.fourDigitsSigned, n);
|
|
1728
1734
|
default:
|
|
1729
|
-
return
|
|
1735
|
+
return N(new RegExp("^-?\\d{1," + t + "}"), n);
|
|
1730
1736
|
}
|
|
1731
1737
|
}
|
|
1732
1738
|
function He(t) {
|
|
@@ -1763,8 +1769,8 @@ function lt(t) {
|
|
|
1763
1769
|
class dr extends H {
|
|
1764
1770
|
constructor() {
|
|
1765
1771
|
super(...arguments);
|
|
1766
|
-
|
|
1767
|
-
|
|
1772
|
+
f(this, "priority", 130);
|
|
1773
|
+
f(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1768
1774
|
}
|
|
1769
1775
|
parse(e, r, o) {
|
|
1770
1776
|
const a = (i) => ({
|
|
@@ -1773,7 +1779,7 @@ class dr extends H {
|
|
|
1773
1779
|
});
|
|
1774
1780
|
switch (r) {
|
|
1775
1781
|
case "y":
|
|
1776
|
-
return A(
|
|
1782
|
+
return A(Y(4, e), a);
|
|
1777
1783
|
case "yo":
|
|
1778
1784
|
return A(
|
|
1779
1785
|
o.ordinalNumber(e, {
|
|
@@ -1782,7 +1788,7 @@ class dr extends H {
|
|
|
1782
1788
|
a
|
|
1783
1789
|
);
|
|
1784
1790
|
default:
|
|
1785
|
-
return A(
|
|
1791
|
+
return A(Y(r.length, e), a);
|
|
1786
1792
|
}
|
|
1787
1793
|
}
|
|
1788
1794
|
validate(e, r) {
|
|
@@ -1804,8 +1810,8 @@ class dr extends H {
|
|
|
1804
1810
|
class fr extends H {
|
|
1805
1811
|
constructor() {
|
|
1806
1812
|
super(...arguments);
|
|
1807
|
-
|
|
1808
|
-
|
|
1813
|
+
f(this, "priority", 130);
|
|
1814
|
+
f(this, "incompatibleTokens", [
|
|
1809
1815
|
"y",
|
|
1810
1816
|
"R",
|
|
1811
1817
|
"u",
|
|
@@ -1828,7 +1834,7 @@ class fr extends H {
|
|
|
1828
1834
|
});
|
|
1829
1835
|
switch (r) {
|
|
1830
1836
|
case "Y":
|
|
1831
|
-
return A(
|
|
1837
|
+
return A(Y(4, e), a);
|
|
1832
1838
|
case "Yo":
|
|
1833
1839
|
return A(
|
|
1834
1840
|
o.ordinalNumber(e, {
|
|
@@ -1837,21 +1843,21 @@ class fr extends H {
|
|
|
1837
1843
|
a
|
|
1838
1844
|
);
|
|
1839
1845
|
default:
|
|
1840
|
-
return A(
|
|
1846
|
+
return A(Y(r.length, e), a);
|
|
1841
1847
|
}
|
|
1842
1848
|
}
|
|
1843
1849
|
validate(e, r) {
|
|
1844
1850
|
return r.isTwoDigitYear || r.year > 0;
|
|
1845
1851
|
}
|
|
1846
1852
|
set(e, r, o, a) {
|
|
1847
|
-
const i =
|
|
1853
|
+
const i = De(e, a);
|
|
1848
1854
|
if (o.isTwoDigitYear) {
|
|
1849
|
-
const
|
|
1855
|
+
const p = ut(
|
|
1850
1856
|
o.year,
|
|
1851
1857
|
i
|
|
1852
1858
|
);
|
|
1853
1859
|
return e.setFullYear(
|
|
1854
|
-
|
|
1860
|
+
p,
|
|
1855
1861
|
0,
|
|
1856
1862
|
a.firstWeekContainsDate
|
|
1857
1863
|
), e.setHours(0, 0, 0, 0), X(e, a);
|
|
@@ -1863,8 +1869,8 @@ class fr extends H {
|
|
|
1863
1869
|
class pr extends H {
|
|
1864
1870
|
constructor() {
|
|
1865
1871
|
super(...arguments);
|
|
1866
|
-
|
|
1867
|
-
|
|
1872
|
+
f(this, "priority", 130);
|
|
1873
|
+
f(this, "incompatibleTokens", [
|
|
1868
1874
|
"G",
|
|
1869
1875
|
"y",
|
|
1870
1876
|
"Y",
|
|
@@ -1886,15 +1892,15 @@ class pr extends H {
|
|
|
1886
1892
|
return ye(r === "R" ? 4 : r.length, e);
|
|
1887
1893
|
}
|
|
1888
1894
|
set(e, r, o) {
|
|
1889
|
-
const a =
|
|
1895
|
+
const a = W(e, 0);
|
|
1890
1896
|
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0), ee(a);
|
|
1891
1897
|
}
|
|
1892
1898
|
}
|
|
1893
1899
|
class mr extends H {
|
|
1894
1900
|
constructor() {
|
|
1895
1901
|
super(...arguments);
|
|
1896
|
-
|
|
1897
|
-
|
|
1902
|
+
f(this, "priority", 130);
|
|
1903
|
+
f(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1898
1904
|
}
|
|
1899
1905
|
parse(e, r) {
|
|
1900
1906
|
return ye(r === "u" ? 4 : r.length, e);
|
|
@@ -1906,8 +1912,8 @@ class mr extends H {
|
|
|
1906
1912
|
class hr extends H {
|
|
1907
1913
|
constructor() {
|
|
1908
1914
|
super(...arguments);
|
|
1909
|
-
|
|
1910
|
-
|
|
1915
|
+
f(this, "priority", 120);
|
|
1916
|
+
f(this, "incompatibleTokens", [
|
|
1911
1917
|
"Y",
|
|
1912
1918
|
"R",
|
|
1913
1919
|
"q",
|
|
@@ -1928,7 +1934,7 @@ class hr extends H {
|
|
|
1928
1934
|
switch (r) {
|
|
1929
1935
|
case "Q":
|
|
1930
1936
|
case "QQ":
|
|
1931
|
-
return
|
|
1937
|
+
return Y(r.length, e);
|
|
1932
1938
|
case "Qo":
|
|
1933
1939
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1934
1940
|
case "QQQ":
|
|
@@ -1968,8 +1974,8 @@ class hr extends H {
|
|
|
1968
1974
|
class yr extends H {
|
|
1969
1975
|
constructor() {
|
|
1970
1976
|
super(...arguments);
|
|
1971
|
-
|
|
1972
|
-
|
|
1977
|
+
f(this, "priority", 120);
|
|
1978
|
+
f(this, "incompatibleTokens", [
|
|
1973
1979
|
"Y",
|
|
1974
1980
|
"R",
|
|
1975
1981
|
"Q",
|
|
@@ -1990,7 +1996,7 @@ class yr extends H {
|
|
|
1990
1996
|
switch (r) {
|
|
1991
1997
|
case "q":
|
|
1992
1998
|
case "qq":
|
|
1993
|
-
return
|
|
1999
|
+
return Y(r.length, e);
|
|
1994
2000
|
case "qo":
|
|
1995
2001
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1996
2002
|
case "qqq":
|
|
@@ -2030,7 +2036,7 @@ class yr extends H {
|
|
|
2030
2036
|
class gr extends H {
|
|
2031
2037
|
constructor() {
|
|
2032
2038
|
super(...arguments);
|
|
2033
|
-
|
|
2039
|
+
f(this, "incompatibleTokens", [
|
|
2034
2040
|
"Y",
|
|
2035
2041
|
"R",
|
|
2036
2042
|
"q",
|
|
@@ -2045,18 +2051,18 @@ class gr extends H {
|
|
|
2045
2051
|
"t",
|
|
2046
2052
|
"T"
|
|
2047
2053
|
]);
|
|
2048
|
-
|
|
2054
|
+
f(this, "priority", 110);
|
|
2049
2055
|
}
|
|
2050
2056
|
parse(e, r, o) {
|
|
2051
2057
|
const a = (i) => i - 1;
|
|
2052
2058
|
switch (r) {
|
|
2053
2059
|
case "M":
|
|
2054
2060
|
return A(
|
|
2055
|
-
|
|
2061
|
+
N(q.month, e),
|
|
2056
2062
|
a
|
|
2057
2063
|
);
|
|
2058
2064
|
case "MM":
|
|
2059
|
-
return A(
|
|
2065
|
+
return A(Y(2, e), a);
|
|
2060
2066
|
case "Mo":
|
|
2061
2067
|
return A(
|
|
2062
2068
|
o.ordinalNumber(e, {
|
|
@@ -2092,8 +2098,8 @@ class gr extends H {
|
|
|
2092
2098
|
class br extends H {
|
|
2093
2099
|
constructor() {
|
|
2094
2100
|
super(...arguments);
|
|
2095
|
-
|
|
2096
|
-
|
|
2101
|
+
f(this, "priority", 110);
|
|
2102
|
+
f(this, "incompatibleTokens", [
|
|
2097
2103
|
"Y",
|
|
2098
2104
|
"R",
|
|
2099
2105
|
"q",
|
|
@@ -2114,11 +2120,11 @@ class br extends H {
|
|
|
2114
2120
|
switch (r) {
|
|
2115
2121
|
case "L":
|
|
2116
2122
|
return A(
|
|
2117
|
-
|
|
2123
|
+
N(q.month, e),
|
|
2118
2124
|
a
|
|
2119
2125
|
);
|
|
2120
2126
|
case "LL":
|
|
2121
|
-
return A(
|
|
2127
|
+
return A(Y(2, e), a);
|
|
2122
2128
|
case "Lo":
|
|
2123
2129
|
return A(
|
|
2124
2130
|
o.ordinalNumber(e, {
|
|
@@ -2158,8 +2164,8 @@ function wr(t, n, e) {
|
|
|
2158
2164
|
class vr extends H {
|
|
2159
2165
|
constructor() {
|
|
2160
2166
|
super(...arguments);
|
|
2161
|
-
|
|
2162
|
-
|
|
2167
|
+
f(this, "priority", 100);
|
|
2168
|
+
f(this, "incompatibleTokens", [
|
|
2163
2169
|
"y",
|
|
2164
2170
|
"R",
|
|
2165
2171
|
"u",
|
|
@@ -2178,11 +2184,11 @@ class vr extends H {
|
|
|
2178
2184
|
parse(e, r, o) {
|
|
2179
2185
|
switch (r) {
|
|
2180
2186
|
case "w":
|
|
2181
|
-
return
|
|
2187
|
+
return N(q.week, e);
|
|
2182
2188
|
case "wo":
|
|
2183
2189
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2184
2190
|
default:
|
|
2185
|
-
return
|
|
2191
|
+
return Y(r.length, e);
|
|
2186
2192
|
}
|
|
2187
2193
|
}
|
|
2188
2194
|
validate(e, r) {
|
|
@@ -2199,8 +2205,8 @@ function xr(t, n) {
|
|
|
2199
2205
|
class Mr extends H {
|
|
2200
2206
|
constructor() {
|
|
2201
2207
|
super(...arguments);
|
|
2202
|
-
|
|
2203
|
-
|
|
2208
|
+
f(this, "priority", 100);
|
|
2209
|
+
f(this, "incompatibleTokens", [
|
|
2204
2210
|
"y",
|
|
2205
2211
|
"Y",
|
|
2206
2212
|
"u",
|
|
@@ -2220,11 +2226,11 @@ class Mr extends H {
|
|
|
2220
2226
|
parse(e, r, o) {
|
|
2221
2227
|
switch (r) {
|
|
2222
2228
|
case "I":
|
|
2223
|
-
return
|
|
2229
|
+
return N(q.week, e);
|
|
2224
2230
|
case "Io":
|
|
2225
2231
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2226
2232
|
default:
|
|
2227
|
-
return
|
|
2233
|
+
return Y(r.length, e);
|
|
2228
2234
|
}
|
|
2229
2235
|
}
|
|
2230
2236
|
validate(e, r) {
|
|
@@ -2234,7 +2240,7 @@ class Mr extends H {
|
|
|
2234
2240
|
return ee(xr(e, o));
|
|
2235
2241
|
}
|
|
2236
2242
|
}
|
|
2237
|
-
const
|
|
2243
|
+
const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = [
|
|
2238
2244
|
31,
|
|
2239
2245
|
29,
|
|
2240
2246
|
31,
|
|
@@ -2251,9 +2257,9 @@ const Cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], kr = [
|
|
|
2251
2257
|
class Tr extends H {
|
|
2252
2258
|
constructor() {
|
|
2253
2259
|
super(...arguments);
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2260
|
+
f(this, "priority", 90);
|
|
2261
|
+
f(this, "subPriority", 1);
|
|
2262
|
+
f(this, "incompatibleTokens", [
|
|
2257
2263
|
"Y",
|
|
2258
2264
|
"R",
|
|
2259
2265
|
"q",
|
|
@@ -2271,16 +2277,16 @@ class Tr extends H {
|
|
|
2271
2277
|
parse(e, r, o) {
|
|
2272
2278
|
switch (r) {
|
|
2273
2279
|
case "d":
|
|
2274
|
-
return
|
|
2280
|
+
return N(q.date, e);
|
|
2275
2281
|
case "do":
|
|
2276
2282
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2277
2283
|
default:
|
|
2278
|
-
return
|
|
2284
|
+
return Y(r.length, e);
|
|
2279
2285
|
}
|
|
2280
2286
|
}
|
|
2281
2287
|
validate(e, r) {
|
|
2282
2288
|
const o = e.getFullYear(), a = lt(o), i = e.getMonth();
|
|
2283
|
-
return a ? r >= 1 && r <=
|
|
2289
|
+
return a ? r >= 1 && r <= Cr[i] : r >= 1 && r <= kr[i];
|
|
2284
2290
|
}
|
|
2285
2291
|
set(e, r, o) {
|
|
2286
2292
|
return e.setDate(o), e.setHours(0, 0, 0, 0), e;
|
|
@@ -2289,9 +2295,9 @@ class Tr extends H {
|
|
|
2289
2295
|
class Pr extends H {
|
|
2290
2296
|
constructor() {
|
|
2291
2297
|
super(...arguments);
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2298
|
+
f(this, "priority", 90);
|
|
2299
|
+
f(this, "subpriority", 1);
|
|
2300
|
+
f(this, "incompatibleTokens", [
|
|
2295
2301
|
"Y",
|
|
2296
2302
|
"R",
|
|
2297
2303
|
"q",
|
|
@@ -2313,11 +2319,11 @@ class Pr extends H {
|
|
|
2313
2319
|
switch (r) {
|
|
2314
2320
|
case "D":
|
|
2315
2321
|
case "DD":
|
|
2316
|
-
return
|
|
2322
|
+
return N(q.dayOfYear, e);
|
|
2317
2323
|
case "Do":
|
|
2318
2324
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2319
2325
|
default:
|
|
2320
|
-
return
|
|
2326
|
+
return Y(r.length, e);
|
|
2321
2327
|
}
|
|
2322
2328
|
}
|
|
2323
2329
|
validate(e, r) {
|
|
@@ -2330,14 +2336,14 @@ class Pr extends H {
|
|
|
2330
2336
|
}
|
|
2331
2337
|
function Ee(t, n, e) {
|
|
2332
2338
|
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(),
|
|
2339
|
+
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(), p = (n % 7 + 7) % 7, c = 7 - o, d = n < 0 || n > 6 ? n - (i + c) % 7 : (p + c) % 7 - (i + c) % 7;
|
|
2334
2340
|
return ze(a, d);
|
|
2335
2341
|
}
|
|
2336
|
-
class
|
|
2342
|
+
class Or extends H {
|
|
2337
2343
|
constructor() {
|
|
2338
2344
|
super(...arguments);
|
|
2339
|
-
|
|
2340
|
-
|
|
2345
|
+
f(this, "priority", 90);
|
|
2346
|
+
f(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
|
|
2341
2347
|
}
|
|
2342
2348
|
parse(e, r, o) {
|
|
2343
2349
|
switch (r) {
|
|
@@ -2370,11 +2376,11 @@ class Dr extends H {
|
|
|
2370
2376
|
return e = Ee(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2371
2377
|
}
|
|
2372
2378
|
}
|
|
2373
|
-
class
|
|
2379
|
+
class Dr extends H {
|
|
2374
2380
|
constructor() {
|
|
2375
2381
|
super(...arguments);
|
|
2376
|
-
|
|
2377
|
-
|
|
2382
|
+
f(this, "priority", 90);
|
|
2383
|
+
f(this, "incompatibleTokens", [
|
|
2378
2384
|
"y",
|
|
2379
2385
|
"R",
|
|
2380
2386
|
"u",
|
|
@@ -2394,13 +2400,13 @@ class Or extends H {
|
|
|
2394
2400
|
}
|
|
2395
2401
|
parse(e, r, o, a) {
|
|
2396
2402
|
const i = (u) => {
|
|
2397
|
-
const
|
|
2398
|
-
return (u + a.weekStartsOn + 6) % 7 +
|
|
2403
|
+
const p = Math.floor((u - 1) / 7) * 7;
|
|
2404
|
+
return (u + a.weekStartsOn + 6) % 7 + p;
|
|
2399
2405
|
};
|
|
2400
2406
|
switch (r) {
|
|
2401
2407
|
case "e":
|
|
2402
2408
|
case "ee":
|
|
2403
|
-
return A(
|
|
2409
|
+
return A(Y(r.length, e), i);
|
|
2404
2410
|
case "eo":
|
|
2405
2411
|
return A(
|
|
2406
2412
|
o.ordinalNumber(e, {
|
|
@@ -2438,8 +2444,8 @@ class Or extends H {
|
|
|
2438
2444
|
class Hr extends H {
|
|
2439
2445
|
constructor() {
|
|
2440
2446
|
super(...arguments);
|
|
2441
|
-
|
|
2442
|
-
|
|
2447
|
+
f(this, "priority", 90);
|
|
2448
|
+
f(this, "incompatibleTokens", [
|
|
2443
2449
|
"y",
|
|
2444
2450
|
"R",
|
|
2445
2451
|
"u",
|
|
@@ -2459,13 +2465,13 @@ class Hr extends H {
|
|
|
2459
2465
|
}
|
|
2460
2466
|
parse(e, r, o, a) {
|
|
2461
2467
|
const i = (u) => {
|
|
2462
|
-
const
|
|
2463
|
-
return (u + a.weekStartsOn + 6) % 7 +
|
|
2468
|
+
const p = Math.floor((u - 1) / 7) * 7;
|
|
2469
|
+
return (u + a.weekStartsOn + 6) % 7 + p;
|
|
2464
2470
|
};
|
|
2465
2471
|
switch (r) {
|
|
2466
2472
|
case "c":
|
|
2467
2473
|
case "cc":
|
|
2468
|
-
return A(
|
|
2474
|
+
return A(Y(r.length, e), i);
|
|
2469
2475
|
case "co":
|
|
2470
2476
|
return A(
|
|
2471
2477
|
o.ordinalNumber(e, {
|
|
@@ -2507,8 +2513,8 @@ function Er(t, n) {
|
|
|
2507
2513
|
class Br extends H {
|
|
2508
2514
|
constructor() {
|
|
2509
2515
|
super(...arguments);
|
|
2510
|
-
|
|
2511
|
-
|
|
2516
|
+
f(this, "priority", 90);
|
|
2517
|
+
f(this, "incompatibleTokens", [
|
|
2512
2518
|
"y",
|
|
2513
2519
|
"Y",
|
|
2514
2520
|
"u",
|
|
@@ -2531,7 +2537,7 @@ class Br extends H {
|
|
|
2531
2537
|
switch (r) {
|
|
2532
2538
|
case "i":
|
|
2533
2539
|
case "ii":
|
|
2534
|
-
return
|
|
2540
|
+
return Y(r.length, e);
|
|
2535
2541
|
case "io":
|
|
2536
2542
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2537
2543
|
case "iii":
|
|
@@ -2597,8 +2603,8 @@ class Br extends H {
|
|
|
2597
2603
|
class Fr extends H {
|
|
2598
2604
|
constructor() {
|
|
2599
2605
|
super(...arguments);
|
|
2600
|
-
|
|
2601
|
-
|
|
2606
|
+
f(this, "priority", 80);
|
|
2607
|
+
f(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
|
|
2602
2608
|
}
|
|
2603
2609
|
parse(e, r, o) {
|
|
2604
2610
|
switch (r) {
|
|
@@ -2638,8 +2644,8 @@ class Fr extends H {
|
|
|
2638
2644
|
class Vr extends H {
|
|
2639
2645
|
constructor() {
|
|
2640
2646
|
super(...arguments);
|
|
2641
|
-
|
|
2642
|
-
|
|
2647
|
+
f(this, "priority", 80);
|
|
2648
|
+
f(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
|
|
2643
2649
|
}
|
|
2644
2650
|
parse(e, r, o) {
|
|
2645
2651
|
switch (r) {
|
|
@@ -2676,11 +2682,11 @@ class Vr extends H {
|
|
|
2676
2682
|
return e.setHours(He(o), 0, 0, 0), e;
|
|
2677
2683
|
}
|
|
2678
2684
|
}
|
|
2679
|
-
class
|
|
2685
|
+
class Sr extends H {
|
|
2680
2686
|
constructor() {
|
|
2681
2687
|
super(...arguments);
|
|
2682
|
-
|
|
2683
|
-
|
|
2688
|
+
f(this, "priority", 80);
|
|
2689
|
+
f(this, "incompatibleTokens", ["a", "b", "t", "T"]);
|
|
2684
2690
|
}
|
|
2685
2691
|
parse(e, r, o) {
|
|
2686
2692
|
switch (r) {
|
|
@@ -2717,20 +2723,20 @@ class Ir extends H {
|
|
|
2717
2723
|
return e.setHours(He(o), 0, 0, 0), e;
|
|
2718
2724
|
}
|
|
2719
2725
|
}
|
|
2720
|
-
class
|
|
2726
|
+
class Ir extends H {
|
|
2721
2727
|
constructor() {
|
|
2722
2728
|
super(...arguments);
|
|
2723
|
-
|
|
2724
|
-
|
|
2729
|
+
f(this, "priority", 70);
|
|
2730
|
+
f(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
|
|
2725
2731
|
}
|
|
2726
2732
|
parse(e, r, o) {
|
|
2727
2733
|
switch (r) {
|
|
2728
2734
|
case "h":
|
|
2729
|
-
return
|
|
2735
|
+
return N(q.hour12h, e);
|
|
2730
2736
|
case "ho":
|
|
2731
2737
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2732
2738
|
default:
|
|
2733
|
-
return
|
|
2739
|
+
return Y(r.length, e);
|
|
2734
2740
|
}
|
|
2735
2741
|
}
|
|
2736
2742
|
validate(e, r) {
|
|
@@ -2744,17 +2750,17 @@ class Sr extends H {
|
|
|
2744
2750
|
class Nr extends H {
|
|
2745
2751
|
constructor() {
|
|
2746
2752
|
super(...arguments);
|
|
2747
|
-
|
|
2748
|
-
|
|
2753
|
+
f(this, "priority", 70);
|
|
2754
|
+
f(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
|
|
2749
2755
|
}
|
|
2750
2756
|
parse(e, r, o) {
|
|
2751
2757
|
switch (r) {
|
|
2752
2758
|
case "H":
|
|
2753
|
-
return
|
|
2759
|
+
return N(q.hour23h, e);
|
|
2754
2760
|
case "Ho":
|
|
2755
2761
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2756
2762
|
default:
|
|
2757
|
-
return
|
|
2763
|
+
return Y(r.length, e);
|
|
2758
2764
|
}
|
|
2759
2765
|
}
|
|
2760
2766
|
validate(e, r) {
|
|
@@ -2767,17 +2773,17 @@ class Nr extends H {
|
|
|
2767
2773
|
class Lr extends H {
|
|
2768
2774
|
constructor() {
|
|
2769
2775
|
super(...arguments);
|
|
2770
|
-
|
|
2771
|
-
|
|
2776
|
+
f(this, "priority", 70);
|
|
2777
|
+
f(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
|
|
2772
2778
|
}
|
|
2773
2779
|
parse(e, r, o) {
|
|
2774
2780
|
switch (r) {
|
|
2775
2781
|
case "K":
|
|
2776
|
-
return
|
|
2782
|
+
return N(q.hour11h, e);
|
|
2777
2783
|
case "Ko":
|
|
2778
2784
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2779
2785
|
default:
|
|
2780
|
-
return
|
|
2786
|
+
return Y(r.length, e);
|
|
2781
2787
|
}
|
|
2782
2788
|
}
|
|
2783
2789
|
validate(e, r) {
|
|
@@ -2790,17 +2796,17 @@ class Lr extends H {
|
|
|
2790
2796
|
class Wr extends H {
|
|
2791
2797
|
constructor() {
|
|
2792
2798
|
super(...arguments);
|
|
2793
|
-
|
|
2794
|
-
|
|
2799
|
+
f(this, "priority", 70);
|
|
2800
|
+
f(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
|
|
2795
2801
|
}
|
|
2796
2802
|
parse(e, r, o) {
|
|
2797
2803
|
switch (r) {
|
|
2798
2804
|
case "k":
|
|
2799
|
-
return
|
|
2805
|
+
return N(q.hour24h, e);
|
|
2800
2806
|
case "ko":
|
|
2801
2807
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2802
2808
|
default:
|
|
2803
|
-
return
|
|
2809
|
+
return Y(r.length, e);
|
|
2804
2810
|
}
|
|
2805
2811
|
}
|
|
2806
2812
|
validate(e, r) {
|
|
@@ -2814,17 +2820,17 @@ class Wr extends H {
|
|
|
2814
2820
|
class Yr extends H {
|
|
2815
2821
|
constructor() {
|
|
2816
2822
|
super(...arguments);
|
|
2817
|
-
|
|
2818
|
-
|
|
2823
|
+
f(this, "priority", 60);
|
|
2824
|
+
f(this, "incompatibleTokens", ["t", "T"]);
|
|
2819
2825
|
}
|
|
2820
2826
|
parse(e, r, o) {
|
|
2821
2827
|
switch (r) {
|
|
2822
2828
|
case "m":
|
|
2823
|
-
return
|
|
2829
|
+
return N(q.minute, e);
|
|
2824
2830
|
case "mo":
|
|
2825
2831
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2826
2832
|
default:
|
|
2827
|
-
return
|
|
2833
|
+
return Y(r.length, e);
|
|
2828
2834
|
}
|
|
2829
2835
|
}
|
|
2830
2836
|
validate(e, r) {
|
|
@@ -2834,20 +2840,20 @@ class Yr extends H {
|
|
|
2834
2840
|
return e.setMinutes(o, 0, 0), e;
|
|
2835
2841
|
}
|
|
2836
2842
|
}
|
|
2837
|
-
class
|
|
2843
|
+
class qr extends H {
|
|
2838
2844
|
constructor() {
|
|
2839
2845
|
super(...arguments);
|
|
2840
|
-
|
|
2841
|
-
|
|
2846
|
+
f(this, "priority", 50);
|
|
2847
|
+
f(this, "incompatibleTokens", ["t", "T"]);
|
|
2842
2848
|
}
|
|
2843
2849
|
parse(e, r, o) {
|
|
2844
2850
|
switch (r) {
|
|
2845
2851
|
case "s":
|
|
2846
|
-
return
|
|
2852
|
+
return N(q.second, e);
|
|
2847
2853
|
case "so":
|
|
2848
2854
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2849
2855
|
default:
|
|
2850
|
-
return
|
|
2856
|
+
return Y(r.length, e);
|
|
2851
2857
|
}
|
|
2852
2858
|
}
|
|
2853
2859
|
validate(e, r) {
|
|
@@ -2857,15 +2863,15 @@ class Ar extends H {
|
|
|
2857
2863
|
return e.setSeconds(o, 0), e;
|
|
2858
2864
|
}
|
|
2859
2865
|
}
|
|
2860
|
-
class
|
|
2866
|
+
class Ar extends H {
|
|
2861
2867
|
constructor() {
|
|
2862
2868
|
super(...arguments);
|
|
2863
|
-
|
|
2864
|
-
|
|
2869
|
+
f(this, "priority", 30);
|
|
2870
|
+
f(this, "incompatibleTokens", ["t", "T"]);
|
|
2865
2871
|
}
|
|
2866
2872
|
parse(e, r) {
|
|
2867
2873
|
const o = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
|
|
2868
|
-
return A(
|
|
2874
|
+
return A(Y(r.length, e), o);
|
|
2869
2875
|
}
|
|
2870
2876
|
set(e, r, o) {
|
|
2871
2877
|
return e.setMilliseconds(o), e;
|
|
@@ -2874,8 +2880,8 @@ class qr extends H {
|
|
|
2874
2880
|
class _r extends H {
|
|
2875
2881
|
constructor() {
|
|
2876
2882
|
super(...arguments);
|
|
2877
|
-
|
|
2878
|
-
|
|
2883
|
+
f(this, "priority", 10);
|
|
2884
|
+
f(this, "incompatibleTokens", ["t", "T", "x"]);
|
|
2879
2885
|
}
|
|
2880
2886
|
parse(e, r) {
|
|
2881
2887
|
switch (r) {
|
|
@@ -2902,7 +2908,7 @@ class _r extends H {
|
|
|
2902
2908
|
}
|
|
2903
2909
|
}
|
|
2904
2910
|
set(e, r, o) {
|
|
2905
|
-
return r.timestampIsSet ? e :
|
|
2911
|
+
return r.timestampIsSet ? e : W(
|
|
2906
2912
|
e,
|
|
2907
2913
|
e.getTime() - he(e) - o
|
|
2908
2914
|
);
|
|
@@ -2911,8 +2917,8 @@ class _r extends H {
|
|
|
2911
2917
|
class Gr extends H {
|
|
2912
2918
|
constructor() {
|
|
2913
2919
|
super(...arguments);
|
|
2914
|
-
|
|
2915
|
-
|
|
2920
|
+
f(this, "priority", 10);
|
|
2921
|
+
f(this, "incompatibleTokens", ["t", "T", "X"]);
|
|
2916
2922
|
}
|
|
2917
2923
|
parse(e, r) {
|
|
2918
2924
|
switch (r) {
|
|
@@ -2939,7 +2945,7 @@ class Gr extends H {
|
|
|
2939
2945
|
}
|
|
2940
2946
|
}
|
|
2941
2947
|
set(e, r, o) {
|
|
2942
|
-
return r.timestampIsSet ? e :
|
|
2948
|
+
return r.timestampIsSet ? e : W(
|
|
2943
2949
|
e,
|
|
2944
2950
|
e.getTime() - he(e) - o
|
|
2945
2951
|
);
|
|
@@ -2948,27 +2954,27 @@ class Gr extends H {
|
|
|
2948
2954
|
class $r extends H {
|
|
2949
2955
|
constructor() {
|
|
2950
2956
|
super(...arguments);
|
|
2951
|
-
|
|
2952
|
-
|
|
2957
|
+
f(this, "priority", 40);
|
|
2958
|
+
f(this, "incompatibleTokens", "*");
|
|
2953
2959
|
}
|
|
2954
2960
|
parse(e) {
|
|
2955
2961
|
return it(e);
|
|
2956
2962
|
}
|
|
2957
2963
|
set(e, r, o) {
|
|
2958
|
-
return [
|
|
2964
|
+
return [W(e, o * 1e3), { timestampIsSet: !0 }];
|
|
2959
2965
|
}
|
|
2960
2966
|
}
|
|
2961
2967
|
class jr extends H {
|
|
2962
2968
|
constructor() {
|
|
2963
2969
|
super(...arguments);
|
|
2964
|
-
|
|
2965
|
-
|
|
2970
|
+
f(this, "priority", 20);
|
|
2971
|
+
f(this, "incompatibleTokens", "*");
|
|
2966
2972
|
}
|
|
2967
2973
|
parse(e) {
|
|
2968
2974
|
return it(e);
|
|
2969
2975
|
}
|
|
2970
2976
|
set(e, r, o) {
|
|
2971
|
-
return [
|
|
2977
|
+
return [W(e, o), { timestampIsSet: !0 }];
|
|
2972
2978
|
}
|
|
2973
2979
|
}
|
|
2974
2980
|
const Rr = {
|
|
@@ -2985,101 +2991,101 @@ const Rr = {
|
|
|
2985
2991
|
I: new Mr(),
|
|
2986
2992
|
d: new Tr(),
|
|
2987
2993
|
D: new Pr(),
|
|
2988
|
-
E: new
|
|
2989
|
-
e: new
|
|
2994
|
+
E: new Or(),
|
|
2995
|
+
e: new Dr(),
|
|
2990
2996
|
c: new Hr(),
|
|
2991
2997
|
i: new Br(),
|
|
2992
2998
|
a: new Fr(),
|
|
2993
2999
|
b: new Vr(),
|
|
2994
|
-
B: new
|
|
2995
|
-
h: new
|
|
3000
|
+
B: new Sr(),
|
|
3001
|
+
h: new Ir(),
|
|
2996
3002
|
H: new Nr(),
|
|
2997
3003
|
K: new Lr(),
|
|
2998
3004
|
k: new Wr(),
|
|
2999
3005
|
m: new Yr(),
|
|
3000
|
-
s: new
|
|
3001
|
-
S: new
|
|
3006
|
+
s: new qr(),
|
|
3007
|
+
S: new Ar(),
|
|
3002
3008
|
X: new _r(),
|
|
3003
3009
|
x: new Gr(),
|
|
3004
3010
|
t: new $r(),
|
|
3005
3011
|
T: new jr()
|
|
3006
3012
|
}, Qr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ur = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Xr = /^'([^]*?)'?$/, zr = /''/g, Jr = /\S/, Zr = /[a-zA-Z]/;
|
|
3007
3013
|
function Ge(t, n, e, r) {
|
|
3008
|
-
var g, P,
|
|
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 ?? ((
|
|
3014
|
+
var g, P, O, D;
|
|
3015
|
+
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 ?? ((D = (O = o.locale) == null ? void 0 : O.options) == null ? void 0 : D.weekStartsOn) ?? 0;
|
|
3010
3016
|
if (n === "")
|
|
3011
|
-
return t === "" ? _(e) :
|
|
3012
|
-
const
|
|
3017
|
+
return t === "" ? _(e) : W(e, NaN);
|
|
3018
|
+
const p = {
|
|
3013
3019
|
firstWeekContainsDate: i,
|
|
3014
3020
|
weekStartsOn: u,
|
|
3015
3021
|
locale: a
|
|
3016
3022
|
}, c = [new lr()], d = n.match(Ur).map((b) => {
|
|
3017
|
-
const
|
|
3018
|
-
if (
|
|
3019
|
-
const
|
|
3020
|
-
return
|
|
3023
|
+
const k = b[0];
|
|
3024
|
+
if (k in Me) {
|
|
3025
|
+
const v = Me[k];
|
|
3026
|
+
return v(b, a.formatLong);
|
|
3021
3027
|
}
|
|
3022
3028
|
return b;
|
|
3023
3029
|
}).join("").match(Qr), s = [];
|
|
3024
3030
|
for (let b of d) {
|
|
3025
|
-
at(b) &&
|
|
3026
|
-
const
|
|
3027
|
-
if (
|
|
3028
|
-
const { incompatibleTokens:
|
|
3029
|
-
if (Array.isArray(
|
|
3030
|
-
const
|
|
3031
|
-
(C) =>
|
|
3031
|
+
at(b) && ke(b, n, t), ot(b) && ke(b, n, t);
|
|
3032
|
+
const k = b[0], v = Rr[k];
|
|
3033
|
+
if (v) {
|
|
3034
|
+
const { incompatibleTokens: E } = v;
|
|
3035
|
+
if (Array.isArray(E)) {
|
|
3036
|
+
const L = s.find(
|
|
3037
|
+
(C) => E.includes(C.token) || C.token === k
|
|
3032
3038
|
);
|
|
3033
|
-
if (
|
|
3039
|
+
if (L)
|
|
3034
3040
|
throw new RangeError(
|
|
3035
|
-
`The format string mustn't contain \`${
|
|
3041
|
+
`The format string mustn't contain \`${L.fullToken}\` and \`${b}\` at the same time`
|
|
3036
3042
|
);
|
|
3037
|
-
} else if (
|
|
3043
|
+
} else if (v.incompatibleTokens === "*" && s.length > 0)
|
|
3038
3044
|
throw new RangeError(
|
|
3039
3045
|
`The format string mustn't contain \`${b}\` and any other token at the same time`
|
|
3040
3046
|
);
|
|
3041
|
-
s.push({ token:
|
|
3042
|
-
const
|
|
3047
|
+
s.push({ token: k, fullToken: b });
|
|
3048
|
+
const F = v.run(
|
|
3043
3049
|
t,
|
|
3044
3050
|
b,
|
|
3045
3051
|
a.match,
|
|
3046
|
-
|
|
3052
|
+
p
|
|
3047
3053
|
);
|
|
3048
|
-
if (!
|
|
3049
|
-
return
|
|
3050
|
-
c.push(
|
|
3054
|
+
if (!F)
|
|
3055
|
+
return W(e, NaN);
|
|
3056
|
+
c.push(F.setter), t = F.rest;
|
|
3051
3057
|
} else {
|
|
3052
|
-
if (
|
|
3058
|
+
if (k.match(Zr))
|
|
3053
3059
|
throw new RangeError(
|
|
3054
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
3060
|
+
"Format string contains an unescaped latin alphabet character `" + k + "`"
|
|
3055
3061
|
);
|
|
3056
|
-
if (b === "''" ? b = "'" :
|
|
3062
|
+
if (b === "''" ? b = "'" : k === "'" && (b = Kr(b)), t.indexOf(b) === 0)
|
|
3057
3063
|
t = t.slice(b.length);
|
|
3058
3064
|
else
|
|
3059
|
-
return
|
|
3065
|
+
return W(e, NaN);
|
|
3060
3066
|
}
|
|
3061
3067
|
}
|
|
3062
3068
|
if (t.length > 0 && Jr.test(t))
|
|
3063
|
-
return
|
|
3064
|
-
const l = c.map((b) => b.priority).sort((b,
|
|
3065
|
-
(b) => c.filter((
|
|
3069
|
+
return W(e, NaN);
|
|
3070
|
+
const l = c.map((b) => b.priority).sort((b, k) => k - b).filter((b, k, v) => v.indexOf(b) === k).map(
|
|
3071
|
+
(b) => c.filter((k) => k.priority === b).sort((k, v) => v.subPriority - k.subPriority)
|
|
3066
3072
|
).map((b) => b[0]);
|
|
3067
3073
|
let m = _(e);
|
|
3068
3074
|
if (isNaN(m.getTime()))
|
|
3069
|
-
return
|
|
3075
|
+
return W(e, NaN);
|
|
3070
3076
|
const h = {};
|
|
3071
3077
|
for (const b of l) {
|
|
3072
|
-
if (!b.validate(m,
|
|
3073
|
-
return
|
|
3074
|
-
const
|
|
3075
|
-
Array.isArray(
|
|
3078
|
+
if (!b.validate(m, p))
|
|
3079
|
+
return W(e, NaN);
|
|
3080
|
+
const k = b.set(m, h, p);
|
|
3081
|
+
Array.isArray(k) ? (m = k[0], Object.assign(h, k[1])) : m = k;
|
|
3076
3082
|
}
|
|
3077
|
-
return
|
|
3083
|
+
return W(e, m);
|
|
3078
3084
|
}
|
|
3079
3085
|
function Kr(t) {
|
|
3080
3086
|
return t.match(Xr)[1].replace(zr, "'");
|
|
3081
3087
|
}
|
|
3082
|
-
function
|
|
3088
|
+
function V(t) {
|
|
3083
3089
|
return typeof t < "u" && t !== null;
|
|
3084
3090
|
}
|
|
3085
3091
|
function ct(t, n = "hh:mm:ss") {
|
|
@@ -3095,19 +3101,19 @@ function ft(t, n) {
|
|
|
3095
3101
|
}
|
|
3096
3102
|
class eo {
|
|
3097
3103
|
constructor() {
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3104
|
+
f(this, "hourStep", 1);
|
|
3105
|
+
f(this, "minuteStep", 1);
|
|
3106
|
+
f(this, "secondStep", 1);
|
|
3107
|
+
f(this, "use12Hours", !1);
|
|
3108
|
+
f(this, "changedValue", x({ text: "", value: void 0 }));
|
|
3109
|
+
f(this, "format", "HH:mm:ss");
|
|
3110
|
+
f(this, "temporaryHours");
|
|
3111
|
+
f(this, "temporaryMinutes");
|
|
3112
|
+
f(this, "temporarySeconds");
|
|
3113
|
+
f(this, "temporaryText", "");
|
|
3114
|
+
f(this, "temporaryValue");
|
|
3115
|
+
f(this, "temporarySelected12Hours");
|
|
3116
|
+
f(this, "temporaryDefaultOpenValue", /* @__PURE__ */ new Date());
|
|
3111
3117
|
}
|
|
3112
3118
|
/**
|
|
3113
3119
|
* @description
|
|
@@ -3138,7 +3144,7 @@ class eo {
|
|
|
3138
3144
|
* Get viewHours which is selected in `time-picker-panel` and its range is [12, 1, 2, ..., 11]
|
|
3139
3145
|
*/
|
|
3140
3146
|
get viewHours() {
|
|
3141
|
-
return this.use12Hours &&
|
|
3147
|
+
return this.use12Hours && V(this.temporaryHours) ? this.calculateViewHour(this.temporaryHours) : this.temporaryHours;
|
|
3142
3148
|
}
|
|
3143
3149
|
get minutes() {
|
|
3144
3150
|
return this.temporaryMinutes;
|
|
@@ -3166,7 +3172,7 @@ class eo {
|
|
|
3166
3172
|
*/
|
|
3167
3173
|
get defaultViewHours() {
|
|
3168
3174
|
const n = this.defaultOpenValue.getHours();
|
|
3169
|
-
return this.use12Hours &&
|
|
3175
|
+
return this.use12Hours && V(n) ? this.calculateViewHour(n) : n;
|
|
3170
3176
|
}
|
|
3171
3177
|
/**
|
|
3172
3178
|
* @description
|
|
@@ -3195,7 +3201,7 @@ class eo {
|
|
|
3195
3201
|
return this.temporaryValue;
|
|
3196
3202
|
}
|
|
3197
3203
|
set value(n) {
|
|
3198
|
-
n !== this.temporaryValue && (this.temporaryValue = n,
|
|
3204
|
+
n !== this.temporaryValue && (this.temporaryValue = n, V(this.temporaryValue) && Ke(this.temporaryValue) ? (this.temporaryHours = this.temporaryValue.getHours(), this.temporaryMinutes = this.temporaryValue.getMinutes(), this.temporarySeconds = this.temporaryValue.getSeconds(), this.use12Hours && V(this.temporaryHours) && (this.temporarySelected12Hours = this.temporaryHours >= 12 ? "PM" : "AM")) : this.clearTimeValue());
|
|
3199
3205
|
}
|
|
3200
3206
|
get selected12Hours() {
|
|
3201
3207
|
return this.temporarySelected12Hours;
|
|
@@ -3210,7 +3216,7 @@ class eo {
|
|
|
3210
3216
|
this.temporaryDefaultOpenValue !== n && (this.temporaryDefaultOpenValue = n, this.update());
|
|
3211
3217
|
}
|
|
3212
3218
|
get isEmpty() {
|
|
3213
|
-
return !(
|
|
3219
|
+
return !(V(this.temporaryHours) || V(this.temporaryMinutes) || V(this.temporarySeconds));
|
|
3214
3220
|
}
|
|
3215
3221
|
setFormat(n) {
|
|
3216
3222
|
this.format = n;
|
|
@@ -3228,7 +3234,7 @@ class eo {
|
|
|
3228
3234
|
return e ? this : (this.setDefaultValueIfNil(), this.seconds = n, this);
|
|
3229
3235
|
}
|
|
3230
3236
|
setValue(n, e) {
|
|
3231
|
-
return
|
|
3237
|
+
return V(e) && (this.use12Hours = e), this.value = n, this;
|
|
3232
3238
|
}
|
|
3233
3239
|
setValueByStep(n, e) {
|
|
3234
3240
|
let r = Math.floor(n / e);
|
|
@@ -3239,10 +3245,10 @@ class eo {
|
|
|
3239
3245
|
return this.defaultOpenValue = n, this;
|
|
3240
3246
|
}
|
|
3241
3247
|
setDefaultValueIfNil() {
|
|
3242
|
-
|
|
3248
|
+
V(this.temporaryValue) || (this.temporaryValue = new Date(this.defaultOpenValue));
|
|
3243
3249
|
}
|
|
3244
3250
|
update() {
|
|
3245
|
-
this.isEmpty ? this.temporaryValue = void 0 : (
|
|
3251
|
+
this.isEmpty ? this.temporaryValue = void 0 : (V(this.temporaryHours) ? this.temporaryValue.setHours(this.hours) : this.temporaryHours = this.defaultHours, V(this.temporaryMinutes) ? this.temporaryValue.setMinutes(this.minutes) : this.temporaryMinutes = this.defaultMinutes, V(this.temporarySeconds) ? this.temporaryValue.setSeconds(this.seconds) : this.temporarySeconds = this.defaultSeconds, this.use12Hours && (V(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(
|
|
3246
3252
|
this.temporaryValue,
|
|
3247
3253
|
this.format,
|
|
3248
3254
|
this.selected12Hours
|
|
@@ -3281,7 +3287,7 @@ const oo = ro();
|
|
|
3281
3287
|
function ao(t, n, e, r, o, a) {
|
|
3282
3288
|
function i(d, s, l = 0, m, h) {
|
|
3283
3289
|
const g = u(s, m, h), P = d.children[0].children[g] || d.children[0].children[0];
|
|
3284
|
-
|
|
3290
|
+
p(d, P.offsetTop, l);
|
|
3285
3291
|
}
|
|
3286
3292
|
function u(d, s, l) {
|
|
3287
3293
|
if (s === "hour") {
|
|
@@ -3310,14 +3316,14 @@ function ao(t, n, e, r, o, a) {
|
|
|
3310
3316
|
a.value.map((m) => m.index).indexOf(d)
|
|
3311
3317
|
);
|
|
3312
3318
|
}
|
|
3313
|
-
function
|
|
3319
|
+
function p(d, s, l) {
|
|
3314
3320
|
if (l <= 0) {
|
|
3315
3321
|
d.scrollTop = s;
|
|
3316
3322
|
return;
|
|
3317
3323
|
}
|
|
3318
3324
|
const h = (s - d.scrollTop) / l * 10;
|
|
3319
3325
|
oo(() => {
|
|
3320
|
-
d.scrollTop += h, d.scrollTop !== s &&
|
|
3326
|
+
d.scrollTop += h, d.scrollTop !== s && p(d, s, l - 10);
|
|
3321
3327
|
});
|
|
3322
3328
|
}
|
|
3323
3329
|
function c(d, s) {
|
|
@@ -3327,50 +3333,50 @@ function ao(t, n, e, r, o, a) {
|
|
|
3327
3333
|
}
|
|
3328
3334
|
function so(t, n) {
|
|
3329
3335
|
function e(u) {
|
|
3330
|
-
return u.index === t.viewHours || !
|
|
3336
|
+
return u.index === t.viewHours || !V(t.viewHours) && u.index === t.defaultViewHours;
|
|
3331
3337
|
}
|
|
3332
3338
|
function r(u) {
|
|
3333
|
-
return u.index === t.minutes || !
|
|
3339
|
+
return u.index === t.minutes || !V(t.minutes) && u.index === t.defaultMinutes;
|
|
3334
3340
|
}
|
|
3335
3341
|
function o(u) {
|
|
3336
|
-
return u.index === t.seconds || !
|
|
3342
|
+
return u.index === t.seconds || !V(t.seconds) && u.index === t.defaultSeconds;
|
|
3337
3343
|
}
|
|
3338
3344
|
function a(u) {
|
|
3339
|
-
return u.value.toUpperCase() === t.selected12Hours || !
|
|
3345
|
+
return u.value.toUpperCase() === t.selected12Hours || !V(t.selected12Hours) && u.value.toUpperCase() === t.default12Hours;
|
|
3340
3346
|
}
|
|
3341
|
-
function i(u,
|
|
3347
|
+
function i(u, p) {
|
|
3342
3348
|
let c = "";
|
|
3343
3349
|
const d = ` ${n}-select-option-selected `, s = ` ${n}-select-option-disabled `;
|
|
3344
3350
|
let l = !1;
|
|
3345
|
-
return
|
|
3351
|
+
return p === "hour" ? l = e(u) : p === "minute" ? l = r(u) : p === "second" ? l = o(u) : l = a(u), l && (c += d), p === "12-hour" || u.disabled && (c += s), c;
|
|
3346
3352
|
}
|
|
3347
3353
|
return { getSelectedClass: i };
|
|
3348
3354
|
}
|
|
3349
|
-
const
|
|
3355
|
+
const Ce = /* @__PURE__ */ te({
|
|
3350
3356
|
name: "FTimePickerTimeView",
|
|
3351
3357
|
props: nn,
|
|
3352
3358
|
emits: ["valueChange", "formatedValueChange"],
|
|
3353
3359
|
setup(t, n) {
|
|
3354
|
-
const e = "time-picker-panel", r =
|
|
3360
|
+
const e = "time-picker-panel", r = x(0), o = x([]), a = x([]), i = x([]), u = x([]), p = x(), c = x(), d = x(), s = x(), l = new eo(), {
|
|
3355
3361
|
scrollToSelected: m
|
|
3356
3362
|
} = ao(t, n, o, a, i, u), {
|
|
3357
3363
|
getSelectedClass: h
|
|
3358
|
-
} = so(l, e), g =
|
|
3364
|
+
} = so(l, e), g = x(t.hourStep), P = x(t.minuteStep), O = x(t.secondStep), D = x(), b = x(""), k = x(), v = x(t.hideDisabledElements), E = x(0);
|
|
3359
3365
|
G(() => t.defaultOpenValue, (y) => {
|
|
3360
|
-
|
|
3361
|
-
}), G(
|
|
3362
|
-
|
|
3363
|
-
}),
|
|
3366
|
+
V(y) && (D.value = y);
|
|
3367
|
+
}), G(D, (y) => {
|
|
3368
|
+
V(y) && l.setDefaultOpenValue(y);
|
|
3369
|
+
}), D.value = t.defaultOpenValue, G(l.changedValue, (y) => {
|
|
3364
3370
|
n.emit("valueChange", y);
|
|
3365
3371
|
}), G(() => t.modelValue, (y) => {
|
|
3366
|
-
|
|
3372
|
+
F(y);
|
|
3367
3373
|
}), G(() => t.format, (y) => {
|
|
3368
|
-
|
|
3374
|
+
V(y) ? b.value = y : b.value = "HH:mm:ss";
|
|
3369
3375
|
}), G(b, (y) => {
|
|
3370
|
-
|
|
3376
|
+
V(y) && (l.setFormat(b.value), E.value = 0, fe.value && E.value++, re.value && E.value++, oe.value && E.value++, k.value && (E.value++, Fe()), r.value = E.value * 66);
|
|
3371
3377
|
}), G(() => t.use12Hours, (y) => {
|
|
3372
|
-
|
|
3373
|
-
}), G(
|
|
3378
|
+
k.value = y;
|
|
3379
|
+
}), G(k, (y) => {
|
|
3374
3380
|
b.value = ft(b.value, y), l.setUse12Hours(y);
|
|
3375
3381
|
}), G(() => t.disabledHours, () => {
|
|
3376
3382
|
we();
|
|
@@ -3379,17 +3385,17 @@ const ke = /* @__PURE__ */ te({
|
|
|
3379
3385
|
}), G(() => t.disabledSeconds, () => {
|
|
3380
3386
|
ae();
|
|
3381
3387
|
});
|
|
3382
|
-
function
|
|
3383
|
-
if (
|
|
3388
|
+
function F(y) {
|
|
3389
|
+
if (V(y)) {
|
|
3384
3390
|
l.text = y;
|
|
3385
|
-
const
|
|
3386
|
-
l.setValue(
|
|
3391
|
+
const M = ct(l.text, b.value);
|
|
3392
|
+
l.setValue(M, k.value), Ve();
|
|
3387
3393
|
} else
|
|
3388
|
-
l.setUse12Hours(
|
|
3394
|
+
l.setUse12Hours(k.value);
|
|
3389
3395
|
}
|
|
3390
|
-
function
|
|
3396
|
+
function L() {
|
|
3391
3397
|
let y = [];
|
|
3392
|
-
return t.disabledHours && (y = t.disabledHours(),
|
|
3398
|
+
return t.disabledHours && (y = t.disabledHours(), k.value && (l.selected12Hours === "PM" ? y = y.filter((M) => M >= 12).map((M) => M > 12 ? M - 12 : M) : y = y.filter((M) => M < 12 || M === 24).map((M) => M === 24 || M === 0 ? 12 : M))), y;
|
|
3393
3399
|
}
|
|
3394
3400
|
function C(y = "hour") {
|
|
3395
3401
|
return b.value ? b.value.indexOf(y[0].toUpperCase()) > -1 || b.value.indexOf(y[0].toLowerCase()) > -1 : !1;
|
|
@@ -3400,41 +3406,41 @@ const ke = /* @__PURE__ */ te({
|
|
|
3400
3406
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
3401
3407
|
"f-area-show": !0
|
|
3402
3408
|
})), de = I(() => ({
|
|
3403
|
-
width:
|
|
3409
|
+
width: k.value ? `${r.value}px` : "100%"
|
|
3404
3410
|
})), fe = I(() => C("hour")), re = I(() => C("minute")), oe = I(() => C("second"));
|
|
3405
|
-
function be(y,
|
|
3406
|
-
return
|
|
3411
|
+
function be(y, M = 1, j = 0) {
|
|
3412
|
+
return M = Math.ceil(M), new Array(Math.ceil(y / M)).fill(0).map((S, se) => (se + j) * M);
|
|
3407
3413
|
}
|
|
3408
3414
|
function gt() {
|
|
3409
|
-
if (fe.value &&
|
|
3410
|
-
const
|
|
3411
|
-
m(s.value,
|
|
3415
|
+
if (fe.value && p.value && m(p.value, V(l.viewHours) ? l.viewHours : l.defaultViewHours, 0, "hour", l), re.value && c.value && m(c.value, V(l.minutes) ? l.minutes : l.defaultMinutes, 0, "minute", l), oe.value && d.value && m(d.value, V(l.seconds) ? l.seconds : l.defaultSeconds, 0, "second", l), k.value && s.value) {
|
|
3416
|
+
const M = (V(l.selected12Hours) ? l.selected12Hours : l.default12Hours) === "AM" ? 0 : 1;
|
|
3417
|
+
m(s.value, M, 0, "12-hour", l);
|
|
3412
3418
|
}
|
|
3413
3419
|
}
|
|
3414
3420
|
function we() {
|
|
3415
|
-
let y = 24,
|
|
3416
|
-
|
|
3417
|
-
const j =
|
|
3418
|
-
if (o.value = be(y, g.value,
|
|
3419
|
-
index:
|
|
3420
|
-
disabled: j.length > 0 && j.indexOf(
|
|
3421
|
-
})),
|
|
3422
|
-
const
|
|
3423
|
-
|
|
3421
|
+
let y = 24, M = 0;
|
|
3422
|
+
k.value && (y = 12, M = 1);
|
|
3423
|
+
const j = L();
|
|
3424
|
+
if (o.value = be(y, g.value, M).map((S) => ({
|
|
3425
|
+
index: S,
|
|
3426
|
+
disabled: j.length > 0 && j.indexOf(S) !== -1
|
|
3427
|
+
})), k.value && o.value[o.value.length - 1].index === 12) {
|
|
3428
|
+
const S = [...o.value];
|
|
3429
|
+
S.unshift(S[S.length - 1]), S.splice(S.length - 1, 1), o.value = S;
|
|
3424
3430
|
}
|
|
3425
|
-
o.value = o.value.filter((
|
|
3431
|
+
o.value = o.value.filter((S) => !(v.value && S.disabled));
|
|
3426
3432
|
}
|
|
3427
3433
|
function pe() {
|
|
3428
3434
|
a.value = be(60, P.value).map((y) => ({
|
|
3429
3435
|
index: y,
|
|
3430
3436
|
disabled: !!t.disabledMinutes && t.disabledMinutes(l.hours).indexOf(y) !== -1
|
|
3431
|
-
})), a.value = a.value.filter((y) => !(
|
|
3437
|
+
})), a.value = a.value.filter((y) => !(v.value && y.disabled));
|
|
3432
3438
|
}
|
|
3433
3439
|
function ae() {
|
|
3434
|
-
i.value = be(60,
|
|
3440
|
+
i.value = be(60, O.value).map((y) => ({
|
|
3435
3441
|
index: y,
|
|
3436
3442
|
disabled: !!t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes).indexOf(y) !== -1
|
|
3437
|
-
})), i.value = i.value.filter((y) => !(
|
|
3443
|
+
})), i.value = i.value.filter((y) => !(v.value && y.disabled));
|
|
3438
3444
|
}
|
|
3439
3445
|
function Fe() {
|
|
3440
3446
|
const y = b.value.includes("A");
|
|
@@ -3444,48 +3450,48 @@ const ke = /* @__PURE__ */ te({
|
|
|
3444
3450
|
}, {
|
|
3445
3451
|
index: 1,
|
|
3446
3452
|
value: y ? "PM" : "pm"
|
|
3447
|
-
}], u.value = u.value.filter(() => !
|
|
3453
|
+
}], u.value = u.value.filter(() => !v.value);
|
|
3448
3454
|
}
|
|
3449
|
-
function bt(y,
|
|
3450
|
-
if (y.stopPropagation(), l.setHours(
|
|
3451
|
-
if (m(
|
|
3455
|
+
function bt(y, M) {
|
|
3456
|
+
if (y.stopPropagation(), l.setHours(M.index, M.disabled), !M.disabled) {
|
|
3457
|
+
if (m(p.value, M.index, 120, "hour", l), t.disabledMinutes !== null) {
|
|
3452
3458
|
pe();
|
|
3453
|
-
const j = a.value.filter((
|
|
3454
|
-
if (!j.find((
|
|
3459
|
+
const j = a.value.filter((S) => !S.disabled);
|
|
3460
|
+
if (!j.find((S) => S.index === l.minutes)) {
|
|
3455
3461
|
const {
|
|
3456
|
-
index:
|
|
3462
|
+
index: S,
|
|
3457
3463
|
disabled: se
|
|
3458
3464
|
} = j[0];
|
|
3459
|
-
l.setMinutes(
|
|
3465
|
+
l.setMinutes(S, se);
|
|
3460
3466
|
}
|
|
3461
3467
|
}
|
|
3462
3468
|
(t.disabledSeconds !== null || t.disabledMinutes !== null) && ae();
|
|
3463
3469
|
}
|
|
3464
3470
|
}
|
|
3465
|
-
function wt(y,
|
|
3466
|
-
y.stopPropagation(), l.selected12Hours =
|
|
3471
|
+
function wt(y, M) {
|
|
3472
|
+
y.stopPropagation(), l.selected12Hours = M.value, we(), pe(), ae(), m(s.value, M.index, 120, "12-hour", l);
|
|
3467
3473
|
}
|
|
3468
|
-
function vt(y,
|
|
3469
|
-
if (y.stopPropagation(), l.setMinutes(
|
|
3474
|
+
function vt(y, M) {
|
|
3475
|
+
if (y.stopPropagation(), l.setMinutes(M.index, M.disabled), !M.disabled && (m(c.value, M.index, 120, "minute", l), t.disabledSeconds !== null)) {
|
|
3470
3476
|
ae();
|
|
3471
|
-
const j = i.value.filter((
|
|
3472
|
-
if (!j.find((
|
|
3477
|
+
const j = i.value.filter((S) => !S.disabled);
|
|
3478
|
+
if (!j.find((S) => S.index === l.seconds)) {
|
|
3473
3479
|
const {
|
|
3474
|
-
index:
|
|
3480
|
+
index: S,
|
|
3475
3481
|
disabled: se
|
|
3476
3482
|
} = j[0];
|
|
3477
|
-
l.setSeconds(
|
|
3483
|
+
l.setSeconds(S, se);
|
|
3478
3484
|
}
|
|
3479
3485
|
}
|
|
3480
3486
|
}
|
|
3481
|
-
function xt(y,
|
|
3482
|
-
y.stopPropagation(), l.setSeconds(
|
|
3487
|
+
function xt(y, M) {
|
|
3488
|
+
y.stopPropagation(), l.setSeconds(M.index, M.disabled), !M.disabled && m(d.value, M.index, 120, "second", l);
|
|
3483
3489
|
}
|
|
3484
3490
|
function Ve() {
|
|
3485
3491
|
we(), pe(), ae(), Fe();
|
|
3486
3492
|
}
|
|
3487
3493
|
ce(() => {
|
|
3488
|
-
b.value = t.format,
|
|
3494
|
+
b.value = t.format, k.value = t.use12Hours, F(t.modelValue), Ve(), setTimeout(() => {
|
|
3489
3495
|
gt();
|
|
3490
3496
|
}, 10);
|
|
3491
3497
|
});
|
|
@@ -3526,52 +3532,52 @@ const ke = /* @__PURE__ */ te({
|
|
|
3526
3532
|
style: de.value
|
|
3527
3533
|
}, [fe.value && w("div", {
|
|
3528
3534
|
class: e + "-select",
|
|
3529
|
-
ref:
|
|
3535
|
+
ref: p
|
|
3530
3536
|
}, [w("ul", null, [o.value.map((y) => w("li", {
|
|
3531
3537
|
class: h(y, "hour"),
|
|
3532
|
-
onClick: (
|
|
3538
|
+
onClick: (M) => bt(M, y)
|
|
3533
3539
|
}, [`${y.index}`]))])]), re.value && w("div", {
|
|
3534
3540
|
class: e + "-select",
|
|
3535
3541
|
ref: c
|
|
3536
3542
|
}, [w("ul", null, [a.value.map((y) => w("li", {
|
|
3537
3543
|
class: h(y, "minute"),
|
|
3538
|
-
onClick: (
|
|
3544
|
+
onClick: (M) => vt(M, y)
|
|
3539
3545
|
}, [`${y.index}`]))])]), oe.value && w("div", {
|
|
3540
3546
|
class: e + "-select",
|
|
3541
3547
|
ref: d
|
|
3542
3548
|
}, [w("ul", null, [i.value.map((y) => w("li", {
|
|
3543
3549
|
class: h(y, "second"),
|
|
3544
|
-
onClick: (
|
|
3545
|
-
}, [`${y.index}`]))])]),
|
|
3550
|
+
onClick: (M) => xt(M, y)
|
|
3551
|
+
}, [`${y.index}`]))])]), k.value && w("div", {
|
|
3546
3552
|
class: e + "-select",
|
|
3547
3553
|
ref: s
|
|
3548
3554
|
}, [w("ul", null, [u.value.map((y) => w("li", {
|
|
3549
3555
|
class: h(y, "12-hour"),
|
|
3550
|
-
onClick: (
|
|
3556
|
+
onClick: (M) => wt(M, y)
|
|
3551
3557
|
}, [`${y.value}`]))])])])])])]);
|
|
3552
3558
|
}
|
|
3553
3559
|
}), K = /* @__PURE__ */ te({
|
|
3554
3560
|
name: "FTimePicker",
|
|
3555
|
-
props:
|
|
3561
|
+
props: Oe,
|
|
3556
3562
|
emits: ["update:modelValue", "valueChange", "clear"],
|
|
3557
3563
|
setup(t, n) {
|
|
3558
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r =
|
|
3564
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = x(t.modelValue), o = x(null), a = x(), i = I(() => ft(t.format, t.use12Hours));
|
|
3559
3565
|
function u() {
|
|
3560
3566
|
r.value = "", n.emit("clear");
|
|
3561
3567
|
}
|
|
3562
|
-
function
|
|
3568
|
+
function p() {
|
|
3563
3569
|
if (r.value) {
|
|
3564
3570
|
const s = ct(r.value, i.value);
|
|
3565
3571
|
r.value = dt(s, i.value);
|
|
3566
3572
|
}
|
|
3567
3573
|
}
|
|
3568
3574
|
function c() {
|
|
3569
|
-
|
|
3575
|
+
p();
|
|
3570
3576
|
}
|
|
3571
3577
|
function d(s) {
|
|
3572
3578
|
r.value = s.text;
|
|
3573
3579
|
}
|
|
3574
|
-
return
|
|
3580
|
+
return p(), G(() => t.modelValue, (s) => {
|
|
3575
3581
|
r.value = s;
|
|
3576
3582
|
}), G(r, (s) => {
|
|
3577
3583
|
n.emit("valueChange", s), n.emit("update:modelValue", s);
|
|
@@ -3588,7 +3594,7 @@ const ke = /* @__PURE__ */ te({
|
|
|
3588
3594
|
onClear: u,
|
|
3589
3595
|
onBlur: c
|
|
3590
3596
|
}, {
|
|
3591
|
-
default: () => [w(
|
|
3597
|
+
default: () => [w(Ce, Te({
|
|
3592
3598
|
ref: a
|
|
3593
3599
|
}, t, {
|
|
3594
3600
|
onValueChange: d
|
|
@@ -3867,7 +3873,7 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
3867
3873
|
},
|
|
3868
3874
|
{
|
|
3869
3875
|
value: "center",
|
|
3870
|
-
name: "
|
|
3876
|
+
name: "居中"
|
|
3871
3877
|
},
|
|
3872
3878
|
{
|
|
3873
3879
|
value: "right",
|
|
@@ -3991,16 +3997,16 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
3991
3997
|
beforeOpen: { type: Function, default: null },
|
|
3992
3998
|
/** 更新方式 blur | change */
|
|
3993
3999
|
updateOn: { type: String, default: "change" }
|
|
3994
|
-
}, pt = Ue(Be, go, io, uo, Mo),
|
|
4000
|
+
}, pt = Ue(Be, go, io, uo, Mo), ko = {
|
|
3995
4001
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
3996
4002
|
host: { type: Object },
|
|
3997
4003
|
backgroundColor: { type: String, default: "" }
|
|
3998
|
-
},
|
|
4004
|
+
}, Co = /* @__PURE__ */ te({
|
|
3999
4005
|
name: "FOverlay",
|
|
4000
|
-
props:
|
|
4006
|
+
props: ko,
|
|
4001
4007
|
emits: ["click"],
|
|
4002
4008
|
setup(t, n) {
|
|
4003
|
-
const e =
|
|
4009
|
+
const e = x(t.popupContentPosition), r = x(t.host), o = I(() => ({
|
|
4004
4010
|
backgroundColor: t.backgroundColor || "",
|
|
4005
4011
|
pointerEvents: "auto"
|
|
4006
4012
|
}));
|
|
@@ -4010,11 +4016,11 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
4010
4016
|
I(() => {
|
|
4011
4017
|
const u = r.value;
|
|
4012
4018
|
if (u) {
|
|
4013
|
-
const
|
|
4019
|
+
const p = u.getBoundingClientRect(), {
|
|
4014
4020
|
left: c,
|
|
4015
4021
|
top: d,
|
|
4016
4022
|
height: s
|
|
4017
|
-
} =
|
|
4023
|
+
} = p;
|
|
4018
4024
|
return {
|
|
4019
4025
|
left: c,
|
|
4020
4026
|
top: d + s
|
|
@@ -4031,14 +4037,14 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
4031
4037
|
to: "body"
|
|
4032
4038
|
}, {
|
|
4033
4039
|
default: () => {
|
|
4034
|
-
var u,
|
|
4040
|
+
var u, p;
|
|
4035
4041
|
return [w("div", {
|
|
4036
4042
|
class: "overlay-container",
|
|
4037
4043
|
onClick: (c) => a(c),
|
|
4038
4044
|
style: o.value
|
|
4039
4045
|
}, [w("div", {
|
|
4040
4046
|
style: i.value
|
|
4041
|
-
}, [(
|
|
4047
|
+
}, [(p = (u = n.slots).default) == null ? void 0 : p.call(u)])])];
|
|
4042
4048
|
}
|
|
4043
4049
|
});
|
|
4044
4050
|
}
|
|
@@ -4059,11 +4065,11 @@ function Po(t) {
|
|
|
4059
4065
|
};
|
|
4060
4066
|
return e = Pt({
|
|
4061
4067
|
setup() {
|
|
4062
|
-
|
|
4068
|
+
Ot(() => {
|
|
4063
4069
|
document.body.removeChild(n);
|
|
4064
4070
|
});
|
|
4065
4071
|
const a = To(t);
|
|
4066
|
-
return () => w(
|
|
4072
|
+
return () => w(Co, {
|
|
4067
4073
|
"popup-content-position": t.popupPosition,
|
|
4068
4074
|
host: t.host,
|
|
4069
4075
|
onClick: o,
|
|
@@ -4074,12 +4080,12 @@ function Po(t) {
|
|
|
4074
4080
|
}
|
|
4075
4081
|
}), document.body.appendChild(n), e.mount(n), e;
|
|
4076
4082
|
}
|
|
4077
|
-
class
|
|
4083
|
+
class Oo {
|
|
4078
4084
|
static show(n) {
|
|
4079
4085
|
return Po(n);
|
|
4080
4086
|
}
|
|
4081
4087
|
}
|
|
4082
|
-
const
|
|
4088
|
+
const Do = Symbol("FModalService");
|
|
4083
4089
|
function mt(t, n) {
|
|
4084
4090
|
function e() {
|
|
4085
4091
|
const r = t.beforeOpen || t.beforeClickButton || null;
|
|
@@ -4095,21 +4101,21 @@ function mt(t, n) {
|
|
|
4095
4101
|
return { judgeCanOpen: e };
|
|
4096
4102
|
}
|
|
4097
4103
|
function ht(t, n, e, r, o) {
|
|
4098
|
-
const a =
|
|
4104
|
+
const a = x(t.buttonBehavior), i = x(t.popupOnInput), u = I(() => ({
|
|
4099
4105
|
"input-group-append": !0,
|
|
4100
4106
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4101
|
-
})), { judgeCanOpen:
|
|
4107
|
+
})), { judgeCanOpen: p } = mt(t, o), c = I(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = me(Do, null), s = x();
|
|
4102
4108
|
async function l(g) {
|
|
4103
|
-
if (await
|
|
4109
|
+
if (await p() && c.value) {
|
|
4104
4110
|
const P = !!n.slots.default;
|
|
4105
4111
|
if (a.value === "Modal") {
|
|
4106
|
-
const
|
|
4107
|
-
...
|
|
4112
|
+
const O = t.modalOptions, D = d == null ? void 0 : d.open({
|
|
4113
|
+
...O,
|
|
4108
4114
|
render: () => n.slots.default && n.slots.default()
|
|
4109
4115
|
});
|
|
4110
|
-
s.value =
|
|
4116
|
+
s.value = D == null ? void 0 : D.modalRef;
|
|
4111
4117
|
}
|
|
4112
|
-
a.value === "Overlay" &&
|
|
4118
|
+
a.value === "Overlay" && Oo.show({
|
|
4113
4119
|
// host: buttonEditRef.value,
|
|
4114
4120
|
host: document.body,
|
|
4115
4121
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
@@ -4132,7 +4138,7 @@ function ht(t, n, e, r, o) {
|
|
|
4132
4138
|
};
|
|
4133
4139
|
}
|
|
4134
4140
|
function Ho(t, n, e, r, o, a) {
|
|
4135
|
-
const i =
|
|
4141
|
+
const i = x(!1), u = I(() => t.enableClear && !t.readonly && !t.disable), { changeTextBoxValue: p } = a;
|
|
4136
4142
|
function c(m) {
|
|
4137
4143
|
i.value = m;
|
|
4138
4144
|
}
|
|
@@ -4141,7 +4147,7 @@ function Ho(t, n, e, r, o, a) {
|
|
|
4141
4147
|
});
|
|
4142
4148
|
function d(m) {
|
|
4143
4149
|
const h = !t.readonly && !t.disable && t.editable, g = !t.editable;
|
|
4144
|
-
m.stopPropagation(), (h || g) && (
|
|
4150
|
+
m.stopPropagation(), (h || g) && (p("", !1), c(!i.value), n.emit("clear"));
|
|
4145
4151
|
}
|
|
4146
4152
|
function s(m) {
|
|
4147
4153
|
if (u.value) {
|
|
@@ -4164,7 +4170,7 @@ function Ho(t, n, e, r, o, a) {
|
|
|
4164
4170
|
};
|
|
4165
4171
|
}
|
|
4166
4172
|
function Eo(t, n, e, r, o) {
|
|
4167
|
-
const a = I(() => t.popupOnInput), i = I(() => t.popupOnFocus), { shouldPopupContent: u } = o,
|
|
4173
|
+
const a = I(() => t.popupOnInput), i = I(() => t.popupOnFocus), { shouldPopupContent: u } = o, p = I(() => t.enableTitle ? e.value : ""), c = I(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), d = I(() => t.readonly || !t.editable), s = x(!1), l = I(() => !t.disable && s.value), m = I(() => ({
|
|
4168
4174
|
"text-left": t.textAlign === "left",
|
|
4169
4175
|
"text-center": t.textAlign === "center",
|
|
4170
4176
|
"text-right": t.textAlign === "right",
|
|
@@ -4189,30 +4195,30 @@ function Eo(t, n, e, r, o) {
|
|
|
4189
4195
|
e.value = C;
|
|
4190
4196
|
}
|
|
4191
4197
|
);
|
|
4192
|
-
function
|
|
4198
|
+
function O(C) {
|
|
4193
4199
|
s.value = !1, n.emit("blur", C), C.stopPropagation();
|
|
4194
4200
|
}
|
|
4195
|
-
function
|
|
4201
|
+
function D(C) {
|
|
4196
4202
|
n.emit("click", C);
|
|
4197
4203
|
}
|
|
4198
4204
|
function b(C) {
|
|
4199
4205
|
t.disable || (s.value = !0, d.value || (n.emit("focus", C), i.value && !u.value && o.popup()));
|
|
4200
4206
|
}
|
|
4201
|
-
function
|
|
4207
|
+
function k(C) {
|
|
4202
4208
|
n.emit("input", C.target.value);
|
|
4203
4209
|
const $ = C.target.value;
|
|
4204
4210
|
r.value = $, e.value !== $ && g($, t.updateOn === "change"), a.value && !u.value && o.popup();
|
|
4205
4211
|
}
|
|
4206
|
-
function
|
|
4212
|
+
function v(C) {
|
|
4207
4213
|
C.target.tagName !== "INPUT" && C.preventDefault(), C.stopPropagation();
|
|
4208
4214
|
}
|
|
4209
|
-
function
|
|
4215
|
+
function E(C) {
|
|
4210
4216
|
n.emit("keydown", C);
|
|
4211
4217
|
}
|
|
4212
|
-
function
|
|
4218
|
+
function F(C) {
|
|
4213
4219
|
C.key === "Enter" && (a.value || i.value) && o.hidePopup(), n.emit("keyup", C);
|
|
4214
4220
|
}
|
|
4215
|
-
function
|
|
4221
|
+
function L(C) {
|
|
4216
4222
|
const $ = C.target.value;
|
|
4217
4223
|
C.stopPropagation(), g($);
|
|
4218
4224
|
}
|
|
@@ -4221,52 +4227,52 @@ function Eo(t, n, e, r, o) {
|
|
|
4221
4227
|
isTextBoxReadonly: d,
|
|
4222
4228
|
textBoxClass: m,
|
|
4223
4229
|
textBoxPlaceholder: c,
|
|
4224
|
-
textBoxTitle:
|
|
4230
|
+
textBoxTitle: p,
|
|
4225
4231
|
inputGroupClass: h,
|
|
4226
4232
|
changeTextBoxValue: g,
|
|
4227
4233
|
commitValue: P,
|
|
4228
|
-
onBlurTextBox:
|
|
4229
|
-
onClickTextBox:
|
|
4234
|
+
onBlurTextBox: O,
|
|
4235
|
+
onClickTextBox: D,
|
|
4230
4236
|
onFocusTextBox: b,
|
|
4231
|
-
onInput:
|
|
4232
|
-
onKeyDownTextBox:
|
|
4233
|
-
onKeyUpTextBox:
|
|
4234
|
-
onMouseDownTextBox:
|
|
4235
|
-
onTextBoxValueChange:
|
|
4237
|
+
onInput: k,
|
|
4238
|
+
onKeyDownTextBox: E,
|
|
4239
|
+
onKeyUpTextBox: F,
|
|
4240
|
+
onMouseDownTextBox: v,
|
|
4241
|
+
onTextBoxValueChange: L
|
|
4236
4242
|
};
|
|
4237
4243
|
}
|
|
4238
4244
|
function yt(t, n, e, r) {
|
|
4239
|
-
const o =
|
|
4245
|
+
const o = x(), a = x(!1), { judgeCanOpen: i } = mt(t, r);
|
|
4240
4246
|
function u() {
|
|
4241
4247
|
const s = o.value;
|
|
4242
4248
|
s && s.show(e.value);
|
|
4243
4249
|
}
|
|
4244
|
-
async function
|
|
4250
|
+
async function p(s = !1) {
|
|
4245
4251
|
if (!!n.slots.default) {
|
|
4246
4252
|
if (!s && !a.value && !await i())
|
|
4247
4253
|
return;
|
|
4248
|
-
a.value = !a.value, await
|
|
4254
|
+
a.value = !a.value, await Se(), u();
|
|
4249
4255
|
}
|
|
4250
4256
|
}
|
|
4251
4257
|
async function c(s = !1) {
|
|
4252
4258
|
if (!!n.slots.default) {
|
|
4253
4259
|
if (!s && !await i())
|
|
4254
4260
|
return;
|
|
4255
|
-
a.value = !0, await
|
|
4261
|
+
a.value = !0, await Se(), u();
|
|
4256
4262
|
}
|
|
4257
4263
|
}
|
|
4258
4264
|
function d() {
|
|
4259
4265
|
a.value = !1;
|
|
4260
4266
|
}
|
|
4261
|
-
return { hidePopup: d, popup: c, shouldPopupContent: a, togglePopup:
|
|
4267
|
+
return { hidePopup: d, popup: c, shouldPopupContent: a, togglePopup: p, popoverRef: o };
|
|
4262
4268
|
}
|
|
4263
4269
|
function Bo(t, n, e) {
|
|
4264
|
-
const r =
|
|
4270
|
+
const r = x(), {
|
|
4265
4271
|
isTextBoxReadonly: o,
|
|
4266
4272
|
textBoxClass: a,
|
|
4267
4273
|
textBoxPlaceholder: i,
|
|
4268
4274
|
textBoxTitle: u,
|
|
4269
|
-
onBlurTextBox:
|
|
4275
|
+
onBlurTextBox: p,
|
|
4270
4276
|
onClickTextBox: c,
|
|
4271
4277
|
onFocusTextBox: d,
|
|
4272
4278
|
onInput: s,
|
|
@@ -4276,8 +4282,8 @@ function Bo(t, n, e) {
|
|
|
4276
4282
|
onTextBoxValueChange: g
|
|
4277
4283
|
} = e;
|
|
4278
4284
|
return ce(() => {
|
|
4279
|
-
var P,
|
|
4280
|
-
t.selectOnCreated && ((P = r.value) == null || P.select()), t.focusOnCreated && ((
|
|
4285
|
+
var P, O;
|
|
4286
|
+
t.selectOnCreated && ((P = r.value) == null || P.select()), t.focusOnCreated && ((O = r.value) == null || O.focus());
|
|
4281
4287
|
}), () => w("input", {
|
|
4282
4288
|
ref: r,
|
|
4283
4289
|
name: "input-group-value",
|
|
@@ -4292,7 +4298,7 @@ function Bo(t, n, e) {
|
|
|
4292
4298
|
title: u.value,
|
|
4293
4299
|
type: t.inputType,
|
|
4294
4300
|
value: n.value,
|
|
4295
|
-
onBlur:
|
|
4301
|
+
onBlur: p,
|
|
4296
4302
|
onChange: g,
|
|
4297
4303
|
onClick: c,
|
|
4298
4304
|
onFocus: d,
|
|
@@ -4303,16 +4309,16 @@ function Bo(t, n, e) {
|
|
|
4303
4309
|
}, null);
|
|
4304
4310
|
}
|
|
4305
4311
|
function Fo(t, n, e) {
|
|
4306
|
-
const r =
|
|
4312
|
+
const r = x(t.separator), {
|
|
4307
4313
|
changeTextBoxValue: o
|
|
4308
4314
|
} = e, a = I(() => n.value ? n.value.split(r.value).map((u) => ({
|
|
4309
4315
|
name: u,
|
|
4310
4316
|
selectable: !0
|
|
4311
4317
|
})) : []);
|
|
4312
4318
|
function i(u) {
|
|
4313
|
-
o(u.map((
|
|
4319
|
+
o(u.map((p) => p.name).join(r.value), !0);
|
|
4314
4320
|
}
|
|
4315
|
-
return () => w(
|
|
4321
|
+
return () => w(St, {
|
|
4316
4322
|
id: `${t.id}-tag-editor`,
|
|
4317
4323
|
class: "form-control",
|
|
4318
4324
|
data: a.value,
|
|
@@ -4328,15 +4334,15 @@ function Vo(t, n, e, r) {
|
|
|
4328
4334
|
onMouseEnterButton: i,
|
|
4329
4335
|
onMouseLeaveButton: u
|
|
4330
4336
|
} = e, {
|
|
4331
|
-
enableClearButton:
|
|
4337
|
+
enableClearButton: p,
|
|
4332
4338
|
showClearButton: c,
|
|
4333
4339
|
onClearValue: d
|
|
4334
|
-
} = r, s =
|
|
4340
|
+
} = r, s = x();
|
|
4335
4341
|
return {
|
|
4336
4342
|
renderButtonGroup: () => w("div", {
|
|
4337
4343
|
id: `${t.id}-button-group`,
|
|
4338
4344
|
class: o.value
|
|
4339
|
-
}, [
|
|
4345
|
+
}, [p.value && Dt(w("span", {
|
|
4340
4346
|
class: "input-group-text input-group-clear",
|
|
4341
4347
|
onClick: d
|
|
4342
4348
|
}, [w("i", {
|
|
@@ -4357,12 +4363,12 @@ function Vo(t, n, e, r) {
|
|
|
4357
4363
|
buttonHandleElement: s
|
|
4358
4364
|
};
|
|
4359
4365
|
}
|
|
4360
|
-
function
|
|
4361
|
-
const r =
|
|
4366
|
+
function So(t, n, e) {
|
|
4367
|
+
const r = x(t.popupMinWidth), {
|
|
4362
4368
|
hidePopup: o,
|
|
4363
4369
|
popoverRef: a
|
|
4364
4370
|
} = e;
|
|
4365
|
-
return () => w(
|
|
4371
|
+
return () => w(It, {
|
|
4366
4372
|
id: `${t.id}-popover`,
|
|
4367
4373
|
ref: a,
|
|
4368
4374
|
visible: !0,
|
|
@@ -4386,18 +4392,18 @@ const le = /* @__PURE__ */ te({
|
|
|
4386
4392
|
props: Be,
|
|
4387
4393
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4388
4394
|
setup(t, n) {
|
|
4389
|
-
const e =
|
|
4395
|
+
const e = x(), r = x(t.customClass), o = x(t.modelValue), a = yt(t, n, e, o), {
|
|
4390
4396
|
shouldPopupContent: i,
|
|
4391
4397
|
hidePopup: u,
|
|
4392
|
-
togglePopup:
|
|
4393
|
-
} = a, c = ht(t, n, e, a, o), d =
|
|
4398
|
+
togglePopup: p
|
|
4399
|
+
} = a, c = ht(t, n, e, a, o), d = x(""), s = Eo(t, n, o, d, a), {
|
|
4394
4400
|
hasFocusedTextBox: l,
|
|
4395
4401
|
commitValue: m,
|
|
4396
4402
|
inputGroupClass: h
|
|
4397
4403
|
} = s, g = Ho(t, n, o, l, d, s), {
|
|
4398
4404
|
onMouseEnterTextBox: P,
|
|
4399
|
-
onMouseLeaveTextBox:
|
|
4400
|
-
} = g,
|
|
4405
|
+
onMouseLeaveTextBox: O
|
|
4406
|
+
} = g, D = I(() => {
|
|
4401
4407
|
const C = {
|
|
4402
4408
|
"f-button-edit": !0,
|
|
4403
4409
|
"f-cmp-inputgroup": !0,
|
|
@@ -4408,21 +4414,21 @@ const le = /* @__PURE__ */ te({
|
|
|
4408
4414
|
function b() {
|
|
4409
4415
|
return t.multiSelect && t.inputType === "tag" ? Fo(t, o, s) : Bo(t, o, s);
|
|
4410
4416
|
}
|
|
4411
|
-
let
|
|
4417
|
+
let k = b();
|
|
4412
4418
|
G([() => t.multiSelect, () => t.inputType], () => {
|
|
4413
|
-
|
|
4419
|
+
k = b();
|
|
4414
4420
|
});
|
|
4415
4421
|
const {
|
|
4416
|
-
renderButtonGroup:
|
|
4417
|
-
buttonHandleElement:
|
|
4418
|
-
} = Vo(t, n, c, g),
|
|
4422
|
+
renderButtonGroup: v,
|
|
4423
|
+
buttonHandleElement: E
|
|
4424
|
+
} = Vo(t, n, c, g), F = So(t, n, a), L = {
|
|
4419
4425
|
commitValue: m,
|
|
4420
4426
|
elementRef: e,
|
|
4421
4427
|
hidePopup: u,
|
|
4422
4428
|
shouldPopupContent: i,
|
|
4423
|
-
togglePopup:
|
|
4429
|
+
togglePopup: p,
|
|
4424
4430
|
openDialog: () => {
|
|
4425
|
-
|
|
4431
|
+
E.value && t.buttonBehavior === "Modal" && E.value.click();
|
|
4426
4432
|
},
|
|
4427
4433
|
getModal: () => {
|
|
4428
4434
|
var C;
|
|
@@ -4430,25 +4436,25 @@ const le = /* @__PURE__ */ te({
|
|
|
4430
4436
|
}
|
|
4431
4437
|
};
|
|
4432
4438
|
return ce(() => {
|
|
4433
|
-
e.value.componentInstance =
|
|
4439
|
+
e.value.componentInstance = L, window.onresize = () => {
|
|
4434
4440
|
document.body.click();
|
|
4435
4441
|
};
|
|
4436
|
-
}), n.expose(
|
|
4442
|
+
}), n.expose(L), () => w(Et, null, [w("div", Te(n.attrs, {
|
|
4437
4443
|
ref: e,
|
|
4438
|
-
class:
|
|
4444
|
+
class: D.value,
|
|
4439
4445
|
id: t.id
|
|
4440
4446
|
}), [w("div", {
|
|
4441
4447
|
id: `${t.id}-input-group`,
|
|
4442
4448
|
class: h.value,
|
|
4443
4449
|
onMouseenter: P,
|
|
4444
|
-
onMouseleave:
|
|
4445
|
-
}, [
|
|
4450
|
+
onMouseleave: O
|
|
4451
|
+
}, [k(), v()])]), i.value && F()]);
|
|
4446
4452
|
}
|
|
4447
4453
|
});
|
|
4448
|
-
function
|
|
4454
|
+
function Io(t, n, e) {
|
|
4449
4455
|
const {
|
|
4450
4456
|
buttonGroupClass: r
|
|
4451
|
-
} = e, o =
|
|
4457
|
+
} = e, o = x();
|
|
4452
4458
|
return {
|
|
4453
4459
|
renderButtonGroup: () => w("div", {
|
|
4454
4460
|
id: `${t.id}-button-group`,
|
|
@@ -4468,7 +4474,7 @@ const No = /* @__PURE__ */ te({
|
|
|
4468
4474
|
props: Be,
|
|
4469
4475
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4470
4476
|
setup(t, n) {
|
|
4471
|
-
const e =
|
|
4477
|
+
const e = x(), r = me("design-item-context"), o = Nt(e, r), a = x(t.customClass), i = x(t.modelValue), u = yt(t, n, e, i), p = ht(t, n, e, u, i), c = x(), d = I(() => ({
|
|
4472
4478
|
"f-cmp-inputgroup": !0,
|
|
4473
4479
|
"input-group": !0,
|
|
4474
4480
|
"f-state-disable": !0,
|
|
@@ -4487,7 +4493,7 @@ const No = /* @__PURE__ */ te({
|
|
|
4487
4493
|
return a.value && a.value.split(" ").reduce((h, g) => (h[g] = !0, h), m), m;
|
|
4488
4494
|
}), {
|
|
4489
4495
|
renderButtonGroup: l
|
|
4490
|
-
} =
|
|
4496
|
+
} = Io(t, n, p);
|
|
4491
4497
|
return () => w("div", Te(n.attrs, {
|
|
4492
4498
|
ref: e,
|
|
4493
4499
|
class: s.value,
|
|
@@ -4510,99 +4516,104 @@ le.registerDesigner = (t, n, e) => {
|
|
|
4510
4516
|
};
|
|
4511
4517
|
Lt(le);
|
|
4512
4518
|
function Lo(t, n, e) {
|
|
4513
|
-
var
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
}
|
|
4517
|
-
r();
|
|
4518
|
-
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", i = v();
|
|
4519
|
-
function u() {
|
|
4519
|
+
var k;
|
|
4520
|
+
const r = e && e.getStyles && e.getStyles() || "", o = e && e.getDesignerClass && e.getDesignerClass() || "", a = x();
|
|
4521
|
+
function i() {
|
|
4520
4522
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
4521
4523
|
}
|
|
4522
|
-
function
|
|
4524
|
+
function u() {
|
|
4523
4525
|
return !1;
|
|
4524
4526
|
}
|
|
4525
|
-
function
|
|
4527
|
+
function p() {
|
|
4526
4528
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
4527
4529
|
}
|
|
4528
|
-
function
|
|
4530
|
+
function c() {
|
|
4529
4531
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
4530
4532
|
}
|
|
4531
|
-
function
|
|
4532
|
-
if (!
|
|
4533
|
+
function d(v) {
|
|
4534
|
+
if (!v || !v.value)
|
|
4533
4535
|
return null;
|
|
4534
|
-
if (
|
|
4535
|
-
return
|
|
4536
|
-
const
|
|
4537
|
-
return
|
|
4536
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
4537
|
+
return v.value;
|
|
4538
|
+
const E = x(v == null ? void 0 : v.value.parent), F = d(E);
|
|
4539
|
+
return F || null;
|
|
4538
4540
|
}
|
|
4539
|
-
function
|
|
4540
|
-
const { componentInstance:
|
|
4541
|
-
return !
|
|
4541
|
+
function s(v = n) {
|
|
4542
|
+
const { componentInstance: E, designerItemElementRef: F } = v;
|
|
4543
|
+
return !E || !E.value ? null : E.value.canMove ? F : s(v.parent);
|
|
4542
4544
|
}
|
|
4543
|
-
function
|
|
4544
|
-
return !!e && e.canAccepts(
|
|
4545
|
+
function l(v) {
|
|
4546
|
+
return !!e && e.canAccepts(v);
|
|
4545
4547
|
}
|
|
4546
|
-
function
|
|
4548
|
+
function m() {
|
|
4547
4549
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
4548
4550
|
}
|
|
4549
|
-
function
|
|
4551
|
+
function h() {
|
|
4550
4552
|
}
|
|
4551
|
-
function
|
|
4552
|
-
|
|
4553
|
+
function g(v, E) {
|
|
4554
|
+
E && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(E);
|
|
4553
4555
|
}
|
|
4554
|
-
function
|
|
4555
|
-
const { componentType:
|
|
4556
|
-
let
|
|
4557
|
-
e && e.onResolveNewComponentSchema && (
|
|
4558
|
-
const C =
|
|
4559
|
-
return
|
|
4556
|
+
function P(v, E) {
|
|
4557
|
+
const { componentType: F } = v;
|
|
4558
|
+
let L = Qe(F, v, E);
|
|
4559
|
+
e && e.onResolveNewComponentSchema && (L = e.onResolveNewComponentSchema(v, L));
|
|
4560
|
+
const C = F.toLowerCase().replace(/-/g, "_");
|
|
4561
|
+
return L && !L.id && L.type === F && (L.id = `${C}_${Math.random().toString().slice(2, 6)}`), L;
|
|
4560
4562
|
}
|
|
4561
|
-
function O(
|
|
4563
|
+
function O(v) {
|
|
4562
4564
|
}
|
|
4563
|
-
function
|
|
4565
|
+
function D(...v) {
|
|
4564
4566
|
if (e && e.getPropsConfig)
|
|
4565
|
-
return e.getPropsConfig(...
|
|
4567
|
+
return e.getPropsConfig(...v);
|
|
4568
|
+
}
|
|
4569
|
+
function b() {
|
|
4570
|
+
e && e.onRemoveComponent && e.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((v) => {
|
|
4571
|
+
var L;
|
|
4572
|
+
let E = v.id;
|
|
4573
|
+
v.type === "component-ref" && (E = v.component);
|
|
4574
|
+
const F = t.value.querySelector(`#${E}-design-item`);
|
|
4575
|
+
(L = F == null ? void 0 : F.componentInstance) != null && L.value.onRemoveComponent && F.componentInstance.value.onRemoveComponent();
|
|
4576
|
+
});
|
|
4566
4577
|
}
|
|
4567
|
-
return
|
|
4568
|
-
canMove:
|
|
4569
|
-
canSelectParent:
|
|
4570
|
-
canDelete:
|
|
4571
|
-
canNested: !
|
|
4578
|
+
return a.value = {
|
|
4579
|
+
canMove: i(),
|
|
4580
|
+
canSelectParent: u(),
|
|
4581
|
+
canDelete: p(),
|
|
4582
|
+
canNested: !c(),
|
|
4572
4583
|
contents: n == null ? void 0 : n.schema.contents,
|
|
4573
4584
|
elementRef: t,
|
|
4574
|
-
parent: (
|
|
4585
|
+
parent: (k = n == null ? void 0 : n.parent) == null ? void 0 : k.componentInstance,
|
|
4575
4586
|
schema: n == null ? void 0 : n.schema,
|
|
4576
|
-
styles:
|
|
4577
|
-
designerClass:
|
|
4578
|
-
canAccepts:
|
|
4579
|
-
getBelongedComponentInstance:
|
|
4580
|
-
getDraggableDesignItemElement:
|
|
4581
|
-
getDraggingDisplayText:
|
|
4582
|
-
getPropConfig:
|
|
4583
|
-
getDragScopeElement:
|
|
4584
|
-
onAcceptMovedChildElement:
|
|
4587
|
+
styles: r,
|
|
4588
|
+
designerClass: o,
|
|
4589
|
+
canAccepts: l,
|
|
4590
|
+
getBelongedComponentInstance: d,
|
|
4591
|
+
getDraggableDesignItemElement: s,
|
|
4592
|
+
getDraggingDisplayText: m,
|
|
4593
|
+
getPropConfig: D,
|
|
4594
|
+
getDragScopeElement: h,
|
|
4595
|
+
onAcceptMovedChildElement: g,
|
|
4585
4596
|
onChildElementMovedOut: O,
|
|
4586
|
-
addNewChildComponentSchema:
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
},
|
|
4597
|
+
addNewChildComponentSchema: P,
|
|
4598
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || x(!1),
|
|
4599
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || x(!1),
|
|
4600
|
+
onRemoveComponent: b
|
|
4601
|
+
}, a;
|
|
4591
4602
|
}
|
|
4592
4603
|
class Wo {
|
|
4593
4604
|
constructor(n, e) {
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4605
|
+
f(this, "componentId");
|
|
4606
|
+
f(this, "viewModelId");
|
|
4607
|
+
f(this, "eventsEditorUtils");
|
|
4608
|
+
f(this, "formSchemaUtils");
|
|
4609
|
+
f(this, "formMetadataConverter");
|
|
4610
|
+
f(this, "designViewModelUtils");
|
|
4611
|
+
f(this, "designViewModelField");
|
|
4612
|
+
f(this, "controlCreatorUtils");
|
|
4613
|
+
f(this, "designerHostService");
|
|
4614
|
+
f(this, "schemaService", null);
|
|
4615
|
+
f(this, "metadataService", null);
|
|
4616
|
+
f(this, "propertyConfig", {
|
|
4606
4617
|
type: "object",
|
|
4607
4618
|
categories: {}
|
|
4608
4619
|
});
|
|
@@ -4614,13 +4625,14 @@ class Wo {
|
|
|
4614
4625
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
4615
4626
|
}
|
|
4616
4627
|
setDesignViewModelField(n) {
|
|
4628
|
+
var r;
|
|
4617
4629
|
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
4618
4630
|
if (e) {
|
|
4619
4631
|
if (!this.designViewModelField) {
|
|
4620
|
-
const
|
|
4621
|
-
this.designViewModelField =
|
|
4632
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
4633
|
+
this.designViewModelField = o.fields.find((a) => a.id === e);
|
|
4622
4634
|
}
|
|
4623
|
-
n.updateOn = this.designViewModelField.updateOn;
|
|
4635
|
+
n.updateOn = (r = this.designViewModelField) == null ? void 0 : r.updateOn;
|
|
4624
4636
|
}
|
|
4625
4637
|
}
|
|
4626
4638
|
changeFieldEditorType(n, e) {
|
|
@@ -4697,7 +4709,7 @@ const Z = class Z {
|
|
|
4697
4709
|
*/
|
|
4698
4710
|
static getAllInputTypes() {
|
|
4699
4711
|
const n = [];
|
|
4700
|
-
for (
|
|
4712
|
+
for (const e in Z.fieldControlTypeMapping)
|
|
4701
4713
|
Z.fieldControlTypeMapping[e].forEach((r) => {
|
|
4702
4714
|
n.find((o) => o.key === r.key && o.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
4703
4715
|
});
|
|
@@ -4707,7 +4719,7 @@ const Z = class Z {
|
|
|
4707
4719
|
/**
|
|
4708
4720
|
* <字段类型,可配置的控件类型列表>的映射
|
|
4709
4721
|
*/
|
|
4710
|
-
|
|
4722
|
+
f(Z, "fieldControlTypeMapping", {
|
|
4711
4723
|
String: [
|
|
4712
4724
|
{ key: T["input-group"].type, value: T["input-group"].name },
|
|
4713
4725
|
{ key: T.lookup.type, value: T.lookup.name },
|
|
@@ -4755,49 +4767,49 @@ p(Z, "fieldControlTypeMapping", {
|
|
|
4755
4767
|
]
|
|
4756
4768
|
});
|
|
4757
4769
|
let ge = Z;
|
|
4758
|
-
const Yo =
|
|
4759
|
-
class
|
|
4770
|
+
const Yo = x(0);
|
|
4771
|
+
class qo {
|
|
4760
4772
|
constructor() {
|
|
4761
4773
|
/** 控件标题 */
|
|
4762
|
-
|
|
4774
|
+
f(this, "label", "");
|
|
4763
4775
|
/** 控件id */
|
|
4764
|
-
|
|
4776
|
+
f(this, "id", "");
|
|
4765
4777
|
/** 每个控件占用的栅格数 */
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4778
|
+
f(this, "columnInSM", 12);
|
|
4779
|
+
f(this, "columnInMD", 6);
|
|
4780
|
+
f(this, "columnInLG", 3);
|
|
4781
|
+
f(this, "columnInEL", 2);
|
|
4770
4782
|
/** 每个控件占用的列数 */
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4783
|
+
f(this, "displayWidthInSM", 1);
|
|
4784
|
+
f(this, "displayWidthInMD", 1);
|
|
4785
|
+
f(this, "displayWidthInLG", 1);
|
|
4786
|
+
f(this, "displayWidthInEL", 1);
|
|
4775
4787
|
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
4776
|
-
|
|
4788
|
+
f(this, "displayColumnCountAtBreakPoint", "md");
|
|
4777
4789
|
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
4778
|
-
|
|
4790
|
+
f(this, "tagRow", 0);
|
|
4779
4791
|
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
4780
|
-
|
|
4792
|
+
f(this, "showTopBorder", 0);
|
|
4781
4793
|
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
4782
|
-
|
|
4794
|
+
f(this, "group", 1);
|
|
4783
4795
|
/** 控件是否符合标准的class配置(设计器用的) */
|
|
4784
|
-
|
|
4796
|
+
f(this, "isSupportedClass", !0);
|
|
4785
4797
|
/** 控件所在分组id(设计器用的) */
|
|
4786
|
-
|
|
4798
|
+
f(this, "fieldSetId", "");
|
|
4787
4799
|
}
|
|
4788
4800
|
}
|
|
4789
|
-
function
|
|
4801
|
+
function Ao(t) {
|
|
4790
4802
|
let n, e;
|
|
4791
4803
|
const r = /* @__PURE__ */ new Map();
|
|
4792
4804
|
let o = [];
|
|
4793
4805
|
function a(d, s) {
|
|
4794
|
-
const m = d.split(" ").filter((
|
|
4806
|
+
const m = d.split(" ").filter((D) => D.startsWith("col-"));
|
|
4795
4807
|
if (m.length === 0) {
|
|
4796
4808
|
s.isSupportedClass = !1;
|
|
4797
4809
|
return;
|
|
4798
4810
|
}
|
|
4799
|
-
let h = m.find((
|
|
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),
|
|
4811
|
+
let h = m.find((D) => /^col-([1-9]|10|11|12)$/.test(D)), g = m.find((D) => /^col-md-([1-9]|10|11|12)$/.test(D)), P = m.find((D) => /^col-xl-([1-9]|10|11|12)$/.test(D)), O = m.find((D) => /^col-el-([1-9]|10|11|12)$/.test(D));
|
|
4812
|
+
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), O = O || "col-el-" + s.columnInLG, s.columnInEL = parseInt(O.replace("col-el-", ""), 10), s.displayWidthInEL = s.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(s.displayWidthInEL) || (s.isSupportedClass = !1);
|
|
4801
4813
|
}
|
|
4802
4814
|
function i(d, s, l, m = !1) {
|
|
4803
4815
|
let h = !1;
|
|
@@ -4807,8 +4819,8 @@ function qo(t) {
|
|
|
4807
4819
|
return;
|
|
4808
4820
|
}
|
|
4809
4821
|
h && (l += 1, h = !1);
|
|
4810
|
-
const P = g.appearance && g.appearance.class,
|
|
4811
|
-
P ? a(P,
|
|
4822
|
+
const P = g.appearance && g.appearance.class, O = new qo();
|
|
4823
|
+
P ? a(P, O) : O.isSupportedClass = !1, O.label = g.label || g.id, O.id = g.id, O.group = l, m && (O.fieldSetId = d.id), e === g.id && (n = l), r.set(g.id, g), s.push(O);
|
|
4812
4824
|
});
|
|
4813
4825
|
}
|
|
4814
4826
|
function u(d) {
|
|
@@ -4818,7 +4830,7 @@ function qo(t) {
|
|
|
4818
4830
|
const l = t.selectNode(s, (m) => m.type === Ne["response-form"].type);
|
|
4819
4831
|
return !l || !l.contents || l.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: l };
|
|
4820
4832
|
}
|
|
4821
|
-
function
|
|
4833
|
+
function p(d, s) {
|
|
4822
4834
|
s = s || d.id;
|
|
4823
4835
|
const { result: l, message: m, formNode: h } = u(s);
|
|
4824
4836
|
if (!l)
|
|
@@ -4826,7 +4838,7 @@ function qo(t) {
|
|
|
4826
4838
|
e = d.id, o = [], r.clear();
|
|
4827
4839
|
const g = h.contents[0].type === Ne.fieldset.type ? 0 : 1;
|
|
4828
4840
|
i(h, o, g);
|
|
4829
|
-
const P = o.find((
|
|
4841
|
+
const P = o.find((D) => !D.isSupportedClass);
|
|
4830
4842
|
return {
|
|
4831
4843
|
defaultState: {
|
|
4832
4844
|
defaultGroupNumber: n || 1,
|
|
@@ -4842,22 +4854,22 @@ function qo(t) {
|
|
|
4842
4854
|
return "";
|
|
4843
4855
|
const h = [];
|
|
4844
4856
|
return d.forEach((g) => {
|
|
4845
|
-
var
|
|
4846
|
-
const P = r.get(g.id),
|
|
4847
|
-
if (
|
|
4848
|
-
const
|
|
4857
|
+
var D;
|
|
4858
|
+
const P = r.get(g.id), O = P.appearance && P.appearance.class;
|
|
4859
|
+
if (O) {
|
|
4860
|
+
const k = O.split(" ").filter(($) => !$.startsWith("col-")), v = "col-" + g.columnInSM, E = "col-md-" + g.columnInMD, F = "col-xl-" + g.columnInLG, L = "col-el-" + g.columnInEL, C = [v, E, F, L].concat(k);
|
|
4849
4861
|
P.appearance.class = C.join(" ");
|
|
4850
4862
|
}
|
|
4851
4863
|
if (g.fieldSetId) {
|
|
4852
|
-
const b = m.contents.find((
|
|
4853
|
-
|
|
4864
|
+
const b = m.contents.find((v) => v.id === g.fieldSetId), k = h.find((v) => v.id === g.fieldSetId);
|
|
4865
|
+
k ? (D = k.contents) == null || D.push(P) : (h.push(b), b.contents = [P]);
|
|
4854
4866
|
} else
|
|
4855
4867
|
h.push(P);
|
|
4856
4868
|
}), m.contents = h, m.id;
|
|
4857
4869
|
}
|
|
4858
4870
|
return {
|
|
4859
4871
|
checkCanFindFormNode: u,
|
|
4860
|
-
checkCanOpenLayoutEditor:
|
|
4872
|
+
checkCanOpenLayoutEditor: p,
|
|
4861
4873
|
changeFormControlsByResponseLayoutConfig: c,
|
|
4862
4874
|
getResonseFormLayoutConfig: i
|
|
4863
4875
|
};
|
|
@@ -4865,18 +4877,16 @@ function qo(t) {
|
|
|
4865
4877
|
class _o extends Wo {
|
|
4866
4878
|
constructor(e, r) {
|
|
4867
4879
|
super(e, r);
|
|
4868
|
-
|
|
4869
|
-
this.responseLayoutEditorFunction =
|
|
4880
|
+
f(this, "responseLayoutEditorFunction");
|
|
4881
|
+
this.responseLayoutEditorFunction = Ao(this.formSchemaUtils);
|
|
4870
4882
|
}
|
|
4871
4883
|
getPropertyConfig(e, r) {
|
|
4872
4884
|
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
4885
|
}
|
|
4874
4886
|
getBasicProperties(e, r) {
|
|
4875
|
-
var
|
|
4876
|
-
|
|
4877
|
-
this.setDesignViewModelField(e)
|
|
4878
|
-
const a = this.formSchemaUtils.getFormMetadataBasicInfo(), i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
4879
|
-
return {
|
|
4887
|
+
var a;
|
|
4888
|
+
const o = this;
|
|
4889
|
+
return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
4880
4890
|
description: "Basic Information",
|
|
4881
4891
|
title: "基本信息",
|
|
4882
4892
|
properties: {
|
|
@@ -4897,7 +4907,7 @@ class _o extends Wo {
|
|
|
4897
4907
|
textField: "value",
|
|
4898
4908
|
valueField: "key",
|
|
4899
4909
|
editable: !1,
|
|
4900
|
-
data: o.designViewModelField ? ge.getEditorTypesByMDataType((
|
|
4910
|
+
data: o.designViewModelField ? ge.getEditorTypesByMDataType((a = o.designViewModelField.type) == null ? void 0 : a.name) : ge.getAllInputTypes()
|
|
4901
4911
|
}
|
|
4902
4912
|
},
|
|
4903
4913
|
label: {
|
|
@@ -4908,33 +4918,29 @@ class _o extends Wo {
|
|
|
4908
4918
|
binding: {
|
|
4909
4919
|
description: "绑定的表单字段",
|
|
4910
4920
|
title: "绑定",
|
|
4911
|
-
$converter: "/converter/field-selector.converter",
|
|
4912
4921
|
editor: {
|
|
4913
|
-
type: "
|
|
4922
|
+
type: "binding-selector",
|
|
4914
4923
|
bindingType: { enable: !1 },
|
|
4915
4924
|
editorParams: {
|
|
4916
|
-
|
|
4917
|
-
|
|
4925
|
+
componentSchema: e,
|
|
4926
|
+
needSyncToViewModel: !0,
|
|
4927
|
+
viewModelId: this.viewModelId,
|
|
4928
|
+
designerHostService: this.designerHostService,
|
|
4929
|
+
disableOccupiedFields: !0
|
|
4918
4930
|
},
|
|
4919
|
-
|
|
4920
|
-
{ field: "name", title: "字段名称" },
|
|
4921
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
4922
|
-
{ field: "fieldType", title: "字段类型" }
|
|
4923
|
-
],
|
|
4924
|
-
textField: "bindingField",
|
|
4925
|
-
data: i
|
|
4931
|
+
textField: "bindingField"
|
|
4926
4932
|
}
|
|
4927
4933
|
}
|
|
4928
4934
|
},
|
|
4929
|
-
setPropertyRelates(
|
|
4930
|
-
if (
|
|
4931
|
-
switch (
|
|
4935
|
+
setPropertyRelates(i, u) {
|
|
4936
|
+
if (i)
|
|
4937
|
+
switch (i && i.propertyID) {
|
|
4932
4938
|
case "type": {
|
|
4933
|
-
o.changeControlType(e,
|
|
4939
|
+
o.changeControlType(e, i, r);
|
|
4934
4940
|
break;
|
|
4935
4941
|
}
|
|
4936
4942
|
case "label": {
|
|
4937
|
-
|
|
4943
|
+
i.needRefreshControlTree = !0;
|
|
4938
4944
|
break;
|
|
4939
4945
|
}
|
|
4940
4946
|
}
|
|
@@ -4942,7 +4948,7 @@ class _o extends Wo {
|
|
|
4942
4948
|
};
|
|
4943
4949
|
}
|
|
4944
4950
|
getAppearanceProperties(e, r) {
|
|
4945
|
-
|
|
4951
|
+
const o = this;
|
|
4946
4952
|
return {
|
|
4947
4953
|
title: "样式",
|
|
4948
4954
|
description: "Appearance",
|
|
@@ -4998,7 +5004,7 @@ class _o extends Wo {
|
|
|
4998
5004
|
const a = r.propertyValue, i = o && o.parent && o.parent.schema;
|
|
4999
5005
|
if (!i)
|
|
5000
5006
|
return;
|
|
5001
|
-
const u = i.contents.findIndex((h) => h.id === e.id),
|
|
5007
|
+
const u = i.contents.findIndex((h) => h.id === e.id), p = i.contents[u];
|
|
5002
5008
|
let c;
|
|
5003
5009
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
5004
5010
|
editor: {
|
|
@@ -5008,19 +5014,19 @@ class _o extends Wo {
|
|
|
5008
5014
|
require: this.designViewModelField.require,
|
|
5009
5015
|
readonly: this.designViewModelField.readonly
|
|
5010
5016
|
}, !1), c = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), c || (c = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(c, {
|
|
5011
|
-
id:
|
|
5012
|
-
appearance:
|
|
5013
|
-
size:
|
|
5014
|
-
label:
|
|
5015
|
-
binding:
|
|
5016
|
-
visible:
|
|
5017
|
+
id: p.id,
|
|
5018
|
+
appearance: p.appearance,
|
|
5019
|
+
size: p.size,
|
|
5020
|
+
label: p.label,
|
|
5021
|
+
binding: p.binding,
|
|
5022
|
+
visible: p.visible
|
|
5017
5023
|
}), Object.assign(c.editor, {
|
|
5018
|
-
isTextArea: c.isTextArea &&
|
|
5019
|
-
placeholder: (d =
|
|
5020
|
-
holdPlace: (s =
|
|
5021
|
-
readonly: (l =
|
|
5022
|
-
require: (m =
|
|
5023
|
-
}), i.contents.splice(u, 1), i.contents.splice(u, 0, c), o.schema = Object.assign(
|
|
5024
|
+
isTextArea: c.isTextArea && p.isTextArea,
|
|
5025
|
+
placeholder: (d = p.editor) == null ? void 0 : d.placeholder,
|
|
5026
|
+
holdPlace: (s = p.editor) == null ? void 0 : s.holdPlace,
|
|
5027
|
+
readonly: (l = p.editor) == null ? void 0 : l.readonly,
|
|
5028
|
+
require: (m = p.editor) == null ? void 0 : m.require
|
|
5029
|
+
}), i.contents.splice(u, 1), i.contents.splice(u, 0, c), o.schema = Object.assign(p, c), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
5024
5030
|
(h) => h.classList.remove("dgComponentSelected")
|
|
5025
5031
|
), Yo.value++;
|
|
5026
5032
|
}
|
|
@@ -5062,13 +5068,13 @@ class _o extends Wo {
|
|
|
5062
5068
|
*/
|
|
5063
5069
|
updateUnifiedLayoutAfterControlChanged(e, r, o) {
|
|
5064
5070
|
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)),
|
|
5066
|
-
i = i || "col-12", u = u || "col-md-" + i.replace("col-", ""),
|
|
5071
|
+
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)), p = 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));
|
|
5072
|
+
i = i || "col-12", u = u || "col-md-" + i.replace("col-", ""), p = p || "col-xl-" + u.replace("col-md-", ""), c = c || "col-el-" + p.replace("col-xl-", "");
|
|
5067
5073
|
const d = {
|
|
5068
5074
|
id: r,
|
|
5069
5075
|
columnInSM: parseInt(i.replace("col-", ""), 10),
|
|
5070
5076
|
columnInMD: parseInt(u.replace("col-md-", ""), 10),
|
|
5071
|
-
columnInLG: parseInt(
|
|
5077
|
+
columnInLG: parseInt(p.replace("col-xl-", ""), 10),
|
|
5072
5078
|
columnInEL: parseInt(c.replace("col-el-", ""), 10)
|
|
5073
5079
|
};
|
|
5074
5080
|
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, d);
|
|
@@ -5087,7 +5093,7 @@ class _o extends Wo {
|
|
|
5087
5093
|
const h = a.find((g) => g.id === r.id);
|
|
5088
5094
|
Object.assign(h || {}, r);
|
|
5089
5095
|
}
|
|
5090
|
-
const i = a.map((h) => h.columnInSM), u = a.map((h) => h.columnInMD),
|
|
5096
|
+
const i = a.map((h) => h.columnInSM), u = a.map((h) => h.columnInMD), p = 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(p) ? p[0] : null, m = this.checkIsUniqueColumn(c) ? c[0] : null;
|
|
5091
5097
|
Object.assign(o.unifiedLayout, {
|
|
5092
5098
|
uniqueColClassInSM: d,
|
|
5093
5099
|
uniqueColClassInMD: s,
|
|
@@ -5144,71 +5150,18 @@ class Go extends _o {
|
|
|
5144
5150
|
}
|
|
5145
5151
|
}
|
|
5146
5152
|
function $o(t, n) {
|
|
5147
|
-
t.schema;
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
return !1;
|
|
5151
|
-
}
|
|
5152
|
-
function a() {
|
|
5153
|
-
return !1;
|
|
5153
|
+
const e = t.schema;
|
|
5154
|
+
function r(o, a) {
|
|
5155
|
+
return new Go(o, n).getPropertyConfig(e, a);
|
|
5154
5156
|
}
|
|
5155
|
-
|
|
5156
|
-
return !1;
|
|
5157
|
-
}
|
|
5158
|
-
function u() {
|
|
5159
|
-
return !0;
|
|
5160
|
-
}
|
|
5161
|
-
function f(s) {
|
|
5162
|
-
}
|
|
5163
|
-
function c() {
|
|
5164
|
-
}
|
|
5165
|
-
function d(s) {
|
|
5166
|
-
return null;
|
|
5167
|
-
}
|
|
5168
|
-
return {
|
|
5169
|
-
canAccepts: o,
|
|
5170
|
-
checkCanDeleteComponent: a,
|
|
5171
|
-
checkCanMoveComponent: i,
|
|
5172
|
-
hideNestedPaddingInDesginerView: u,
|
|
5173
|
-
onAcceptMovedChildElement: f,
|
|
5174
|
-
resolveComponentContext: c,
|
|
5175
|
-
triggerBelongedComponentToMoveWhenMoved: e,
|
|
5176
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
5177
|
-
getPropsConfig: d
|
|
5178
|
-
};
|
|
5179
|
-
}
|
|
5180
|
-
function jo(t, n) {
|
|
5181
|
-
const {
|
|
5182
|
-
canAccepts: e,
|
|
5183
|
-
checkCanDeleteComponent: r,
|
|
5184
|
-
checkCanMoveComponent: o,
|
|
5185
|
-
hideNestedPaddingInDesginerView: a,
|
|
5186
|
-
onAcceptMovedChildElement: i,
|
|
5187
|
-
resolveComponentContext: u,
|
|
5188
|
-
triggerBelongedComponentToMoveWhenMoved: f,
|
|
5189
|
-
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
5190
|
-
} = $o(t), d = t.schema;
|
|
5191
|
-
function s(l, m) {
|
|
5192
|
-
return new Go(l, n).getPropertyConfig(d, m);
|
|
5193
|
-
}
|
|
5194
|
-
return {
|
|
5195
|
-
canAccepts: e,
|
|
5196
|
-
checkCanDeleteComponent: r,
|
|
5197
|
-
checkCanMoveComponent: o,
|
|
5198
|
-
hideNestedPaddingInDesginerView: a,
|
|
5199
|
-
onAcceptMovedChildElement: i,
|
|
5200
|
-
resolveComponentContext: u,
|
|
5201
|
-
triggerBelongedComponentToMoveWhenMoved: f,
|
|
5202
|
-
triggerBelongedComponentToDeleteWhenDeleted: c,
|
|
5203
|
-
getPropsConfig: s
|
|
5204
|
-
};
|
|
5157
|
+
return { getPropsConfig: r };
|
|
5205
5158
|
}
|
|
5206
|
-
const
|
|
5159
|
+
const jo = /* @__PURE__ */ te({
|
|
5207
5160
|
name: "FTimePickerDesign",
|
|
5208
|
-
props:
|
|
5161
|
+
props: Oe,
|
|
5209
5162
|
emits: ["datePicked", "update:modelValue"],
|
|
5210
5163
|
setup(t, n) {
|
|
5211
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r =
|
|
5164
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = x(t.modelValue), o = x(), a = x(), i = me("designer-host-service"), u = me("design-item-context"), p = $o(u, i), c = Lo(a, u, p);
|
|
5212
5165
|
ce(() => {
|
|
5213
5166
|
a.value.componentInstance = c;
|
|
5214
5167
|
}), n.expose(c.value);
|
|
@@ -5229,19 +5182,19 @@ const Ro = /* @__PURE__ */ te({
|
|
|
5229
5182
|
}
|
|
5230
5183
|
});
|
|
5231
5184
|
K.install = (t) => {
|
|
5232
|
-
t.component(K.name, K).component(
|
|
5185
|
+
t.component(K.name, K).component(Ce.name, Ce);
|
|
5233
5186
|
};
|
|
5234
5187
|
K.register = (t, n, e, r) => {
|
|
5235
5188
|
t["time-picker"] = K, n["time-picker"] = Xe;
|
|
5236
5189
|
};
|
|
5237
5190
|
K.registerDesigner = (t, n, e) => {
|
|
5238
|
-
t["time-picker"] =
|
|
5191
|
+
t["time-picker"] = jo, n["time-picker"] = Xe;
|
|
5239
5192
|
};
|
|
5240
5193
|
export {
|
|
5241
5194
|
K as FTimePicker,
|
|
5242
|
-
|
|
5195
|
+
Ce as FTimePickerTimeView,
|
|
5243
5196
|
K as default,
|
|
5244
5197
|
Xe as propsResolver,
|
|
5245
|
-
|
|
5198
|
+
Oe as timePickerProps,
|
|
5246
5199
|
nn as timeProps
|
|
5247
5200
|
};
|