@farris/ui-vue 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var G = (t, e, n) =>
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
var _e = Object.defineProperty;
|
|
2
|
+
var Ee = (t, e, n) => e in t ? _e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var G = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { defineComponent as ge, ref as M, computed as H, onMounted as pe, watch as Ye, createVNode as ye, inject as Fe } from "vue";
|
|
5
|
+
import { isPlainObject as oe, cloneDeep as Ae } from "lodash-es";
|
|
6
|
+
import O from "bignumber.js";
|
|
7
|
+
const we = {}, be = {};
|
|
8
8
|
function te(t) {
|
|
9
|
-
const { properties: e, title: n } = t, r = Object.keys(e).reduce((
|
|
10
|
-
return r.id = `${n}-${Date.now()}
|
|
9
|
+
const { properties: e, title: n, ignore: r } = t, a = r && Array.isArray(r), i = Object.keys(e).reduce((o, s) => ((!a || !r.find((c) => c == s)) && (o[s] = e[s].type === "object" && e[s].properties ? te(e[s]) : Ae(e[s].default)), o), {});
|
|
10
|
+
return (!a || !r.find((o) => o == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
11
11
|
}
|
|
12
|
-
function ee(t, e = {}) {
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
let
|
|
16
|
-
const
|
|
17
|
-
return
|
|
12
|
+
function ee(t, e = {}, n) {
|
|
13
|
+
const r = we[t];
|
|
14
|
+
if (r) {
|
|
15
|
+
let a = te(r);
|
|
16
|
+
const i = be[t];
|
|
17
|
+
return a = i ? i({ getSchemaByType: ee }, a, e, n) : a, a;
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function We(t, e) {
|
|
22
22
|
const n = te(e);
|
|
23
|
-
return Object.keys(t).reduce((r, a) => (r[a] &&
|
|
23
|
+
return Object.keys(t).reduce((r, a) => (r[a] && oe(r[a]) && oe(t[a]) ? Object.assign(r[a], t[a]) : r[a] = t[a], r), n), n;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function $e(t, e) {
|
|
26
26
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, a) => {
|
|
27
27
|
if (e.has(a)) {
|
|
28
28
|
const i = e.get(a);
|
|
@@ -37,11 +37,11 @@ function We(t, e) {
|
|
|
37
37
|
return r;
|
|
38
38
|
}, {});
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
const r =
|
|
42
|
-
return
|
|
40
|
+
function Ce(t, e, n = /* @__PURE__ */ new Map()) {
|
|
41
|
+
const r = We(t, e);
|
|
42
|
+
return $e(r, n);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function je(t = {}) {
|
|
45
45
|
function e(u, d, m, h) {
|
|
46
46
|
if (typeof m == "number")
|
|
47
47
|
return h[u].length === m;
|
|
@@ -89,30 +89,30 @@ function Ce(t = {}) {
|
|
|
89
89
|
function s(u, d) {
|
|
90
90
|
return i(u).reduce((w, g) => w && o(g, d), !0);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const m = Object.keys(u), h = m.includes("allOf"), w = m.includes("anyOf"), g = h || w, y = (g ? u[g ? h ? "allOf" : "anyOf" : "allOf"] : [u]).map((
|
|
92
|
+
function c(u, d) {
|
|
93
|
+
const m = Object.keys(u), h = m.includes("allOf"), w = m.includes("anyOf"), g = h || w, y = (g ? u[g ? h ? "allOf" : "anyOf" : "allOf"] : [u]).map((x) => s(x, d));
|
|
94
94
|
return h ? !y.includes(!1) : y.includes(!0);
|
|
95
95
|
}
|
|
96
|
-
return { parseValueSchema:
|
|
96
|
+
return { parseValueSchema: c };
|
|
97
97
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
const s =
|
|
103
|
-
return Object.assign(
|
|
98
|
+
const He = {}, Re = {};
|
|
99
|
+
je();
|
|
100
|
+
function qe(t, e, n = /* @__PURE__ */ new Map(), r = (o, s, c) => s, a = {}, i = (o) => o) {
|
|
101
|
+
return we[e.title] = e, be[e.title] = r, He[e.title] = a, Re[e.title] = i, (o = {}) => {
|
|
102
|
+
const s = Ce(o, e, n), c = Object.keys(t).reduce((u, d) => (u[d] = t[d].default, u), {});
|
|
103
|
+
return Object.assign(c, s);
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Be(t, e) {
|
|
107
107
|
return { customClass: e.class, customStyle: e.style };
|
|
108
108
|
}
|
|
109
|
-
const
|
|
110
|
-
["appearance",
|
|
109
|
+
const Le = /* @__PURE__ */ new Map([
|
|
110
|
+
["appearance", Be]
|
|
111
111
|
]);
|
|
112
|
-
function
|
|
112
|
+
function Ue(t, e, n) {
|
|
113
113
|
return e;
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Qe = "text", Xe = "A Farris Component", ze = "object", Ge = {
|
|
116
116
|
basic: {
|
|
117
117
|
description: "Basic Infomation",
|
|
118
118
|
title: "基本信息",
|
|
@@ -134,12 +134,12 @@ const Ue = "text", Qe = "A Farris Component", Xe = "object", ze = {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
},
|
|
138
|
-
title:
|
|
139
|
-
description:
|
|
140
|
-
type:
|
|
141
|
-
categories:
|
|
142
|
-
},
|
|
137
|
+
}, Ve = {
|
|
138
|
+
title: Qe,
|
|
139
|
+
description: Xe,
|
|
140
|
+
type: ze,
|
|
141
|
+
categories: Ge
|
|
142
|
+
}, Ze = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-design.gitee.io/text.schema.json", Ie = "text", Ke = "A Farris Component", et = "object", tt = {
|
|
143
143
|
id: {
|
|
144
144
|
description: "The unique identifier for text",
|
|
145
145
|
type: "string"
|
|
@@ -201,17 +201,17 @@ const Ue = "text", Qe = "A Farris Component", Xe = "object", ze = {
|
|
|
201
201
|
type: "boolean",
|
|
202
202
|
default: !0
|
|
203
203
|
}
|
|
204
|
-
},
|
|
204
|
+
}, nt = [
|
|
205
205
|
"id",
|
|
206
206
|
"type"
|
|
207
|
-
],
|
|
208
|
-
$schema:
|
|
209
|
-
$id:
|
|
210
|
-
title:
|
|
211
|
-
description:
|
|
212
|
-
type:
|
|
213
|
-
properties:
|
|
214
|
-
required:
|
|
207
|
+
], rt = {
|
|
208
|
+
$schema: Ze,
|
|
209
|
+
$id: Je,
|
|
210
|
+
title: Ie,
|
|
211
|
+
description: Ke,
|
|
212
|
+
type: et,
|
|
213
|
+
properties: tt,
|
|
214
|
+
required: nt
|
|
215
215
|
}, ne = {
|
|
216
216
|
// 组件值
|
|
217
217
|
modelValue: { type: [String, Number, Boolean], default: "" },
|
|
@@ -253,8 +253,8 @@ const Ue = "text", Qe = "A Farris Component", Xe = "object", ze = {
|
|
|
253
253
|
dateRangeDelimiter: { type: String, default: "~" },
|
|
254
254
|
// 枚举项的分隔符
|
|
255
255
|
enumDelimiter: { type: String, default: "," }
|
|
256
|
-
},
|
|
257
|
-
class
|
|
256
|
+
}, se = qe(ne, rt, Le, Ue, Ve), at = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }, it = { sun: 0, mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6 };
|
|
257
|
+
class De {
|
|
258
258
|
constructor() {
|
|
259
259
|
G(this, "regexes", {
|
|
260
260
|
YEAR: "[1-9]\\d{3}",
|
|
@@ -339,10 +339,10 @@ class be {
|
|
|
339
339
|
return e = e.replace(/_([A-Z][A-Z0-9]+)_/g, (n, r) => this.regexes[r]), new RegExp(e, "i");
|
|
340
340
|
}
|
|
341
341
|
getMonthByName(e) {
|
|
342
|
-
return
|
|
342
|
+
return at[String(e).slice(0, 3).toLowerCase()];
|
|
343
343
|
}
|
|
344
344
|
getWeekdayByName(e) {
|
|
345
|
-
return
|
|
345
|
+
return it[String(e).slice(0, 3).toLowerCase()];
|
|
346
346
|
}
|
|
347
347
|
parse(e) {
|
|
348
348
|
if (!isNaN(Number(e)))
|
|
@@ -380,35 +380,35 @@ function T(t) {
|
|
|
380
380
|
const e = Object.prototype.toString.call(t);
|
|
381
381
|
return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function C(t, e) {
|
|
384
384
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
385
385
|
}
|
|
386
|
-
const
|
|
387
|
-
let
|
|
386
|
+
const Me = 6048e5, ot = 864e5, Ne = 6e4, ve = 36e5;
|
|
387
|
+
let st = {};
|
|
388
388
|
function z() {
|
|
389
|
-
return
|
|
389
|
+
return st;
|
|
390
390
|
}
|
|
391
391
|
function L(t, e) {
|
|
392
|
-
var s,
|
|
393
|
-
const n = z(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((
|
|
392
|
+
var s, c, u, d;
|
|
393
|
+
const n = z(), r = (e == null ? void 0 : e.weekStartsOn) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, a = T(t), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
|
|
394
394
|
return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
|
|
395
395
|
}
|
|
396
396
|
function X(t) {
|
|
397
397
|
return L(t, { weekStartsOn: 1 });
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
const e = T(t), n = e.getFullYear(), r =
|
|
399
|
+
function Oe(t) {
|
|
400
|
+
const e = T(t), n = e.getFullYear(), r = C(t, 0);
|
|
401
401
|
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
402
|
-
const a = X(r), i =
|
|
402
|
+
const a = X(r), i = C(t, 0);
|
|
403
403
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
404
404
|
const o = X(i);
|
|
405
405
|
return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= o.getTime() ? n : n - 1;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function ue(t) {
|
|
408
408
|
const e = T(t);
|
|
409
409
|
return e.setHours(0, 0, 0, 0), e;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function ce(t) {
|
|
412
412
|
const e = T(t), n = new Date(
|
|
413
413
|
Date.UTC(
|
|
414
414
|
e.getFullYear(),
|
|
@@ -422,28 +422,28 @@ function ue(t) {
|
|
|
422
422
|
);
|
|
423
423
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
const n =
|
|
427
|
-
return Math.round((a - i) /
|
|
425
|
+
function ut(t, e) {
|
|
426
|
+
const n = ue(t), r = ue(e), a = +n - ce(n), i = +r - ce(r);
|
|
427
|
+
return Math.round((a - i) / ot);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
const e =
|
|
429
|
+
function ct(t) {
|
|
430
|
+
const e = Oe(t), n = C(t, 0);
|
|
431
431
|
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), X(n);
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function lt(t) {
|
|
434
434
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
435
435
|
}
|
|
436
436
|
function xe(t) {
|
|
437
|
-
if (!
|
|
437
|
+
if (!lt(t) && typeof t != "number")
|
|
438
438
|
return !1;
|
|
439
439
|
const e = T(t);
|
|
440
440
|
return !isNaN(Number(e));
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const e = T(t), n =
|
|
442
|
+
function ft(t) {
|
|
443
|
+
const e = T(t), n = C(t, 0);
|
|
444
444
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
445
445
|
}
|
|
446
|
-
const
|
|
446
|
+
const dt = {
|
|
447
447
|
lessThanXSeconds: {
|
|
448
448
|
one: "less than a second",
|
|
449
449
|
other: "less than {{count}} seconds"
|
|
@@ -505,9 +505,9 @@ const ft = {
|
|
|
505
505
|
one: "almost 1 year",
|
|
506
506
|
other: "almost {{count}} years"
|
|
507
507
|
}
|
|
508
|
-
},
|
|
508
|
+
}, mt = (t, e, n) => {
|
|
509
509
|
let r;
|
|
510
|
-
const a =
|
|
510
|
+
const a = dt[t];
|
|
511
511
|
return typeof a == "string" ? r = a : e === 1 ? r = a.one : r = a.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
512
512
|
};
|
|
513
513
|
function V(t) {
|
|
@@ -516,42 +516,42 @@ function V(t) {
|
|
|
516
516
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const ht = {
|
|
520
520
|
full: "EEEE, MMMM do, y",
|
|
521
521
|
long: "MMMM do, y",
|
|
522
522
|
medium: "MMM d, y",
|
|
523
523
|
short: "MM/dd/yyyy"
|
|
524
|
-
},
|
|
524
|
+
}, gt = {
|
|
525
525
|
full: "h:mm:ss a zzzz",
|
|
526
526
|
long: "h:mm:ss a z",
|
|
527
527
|
medium: "h:mm:ss a",
|
|
528
528
|
short: "h:mm a"
|
|
529
|
-
},
|
|
529
|
+
}, pt = {
|
|
530
530
|
full: "{{date}} 'at' {{time}}",
|
|
531
531
|
long: "{{date}} 'at' {{time}}",
|
|
532
532
|
medium: "{{date}}, {{time}}",
|
|
533
533
|
short: "{{date}}, {{time}}"
|
|
534
|
-
},
|
|
534
|
+
}, yt = {
|
|
535
535
|
date: V({
|
|
536
|
-
formats:
|
|
536
|
+
formats: ht,
|
|
537
537
|
defaultWidth: "full"
|
|
538
538
|
}),
|
|
539
539
|
time: V({
|
|
540
|
-
formats:
|
|
540
|
+
formats: gt,
|
|
541
541
|
defaultWidth: "full"
|
|
542
542
|
}),
|
|
543
543
|
dateTime: V({
|
|
544
|
-
formats:
|
|
544
|
+
formats: pt,
|
|
545
545
|
defaultWidth: "full"
|
|
546
546
|
})
|
|
547
|
-
},
|
|
547
|
+
}, wt = {
|
|
548
548
|
lastWeek: "'last' eeee 'at' p",
|
|
549
549
|
yesterday: "'yesterday at' p",
|
|
550
550
|
today: "'today at' p",
|
|
551
551
|
tomorrow: "'tomorrow at' p",
|
|
552
552
|
nextWeek: "eeee 'at' p",
|
|
553
553
|
other: "P"
|
|
554
|
-
},
|
|
554
|
+
}, bt = (t, e, n, r) => wt[t];
|
|
555
555
|
function R(t) {
|
|
556
556
|
return (e, n) => {
|
|
557
557
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -567,15 +567,15 @@ function R(t) {
|
|
|
567
567
|
return a[i];
|
|
568
568
|
};
|
|
569
569
|
}
|
|
570
|
-
const
|
|
570
|
+
const Dt = {
|
|
571
571
|
narrow: ["B", "A"],
|
|
572
572
|
abbreviated: ["BC", "AD"],
|
|
573
573
|
wide: ["Before Christ", "Anno Domini"]
|
|
574
|
-
},
|
|
574
|
+
}, Mt = {
|
|
575
575
|
narrow: ["1", "2", "3", "4"],
|
|
576
576
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
577
577
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
578
|
-
},
|
|
578
|
+
}, Nt = {
|
|
579
579
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
580
580
|
abbreviated: [
|
|
581
581
|
"Jan",
|
|
@@ -605,7 +605,7 @@ const bt = {
|
|
|
605
605
|
"November",
|
|
606
606
|
"December"
|
|
607
607
|
]
|
|
608
|
-
},
|
|
608
|
+
}, vt = {
|
|
609
609
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
610
610
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
611
611
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -618,7 +618,7 @@ const bt = {
|
|
|
618
618
|
"Friday",
|
|
619
619
|
"Saturday"
|
|
620
620
|
]
|
|
621
|
-
},
|
|
621
|
+
}, Ot = {
|
|
622
622
|
narrow: {
|
|
623
623
|
am: "a",
|
|
624
624
|
pm: "p",
|
|
@@ -680,7 +680,7 @@ const bt = {
|
|
|
680
680
|
evening: "in the evening",
|
|
681
681
|
night: "at night"
|
|
682
682
|
}
|
|
683
|
-
},
|
|
683
|
+
}, Tt = (t, e) => {
|
|
684
684
|
const n = Number(t), r = n % 100;
|
|
685
685
|
if (r > 20 || r < 10)
|
|
686
686
|
switch (r % 10) {
|
|
@@ -692,27 +692,27 @@ const bt = {
|
|
|
692
692
|
return n + "rd";
|
|
693
693
|
}
|
|
694
694
|
return n + "th";
|
|
695
|
-
},
|
|
696
|
-
ordinalNumber:
|
|
695
|
+
}, St = {
|
|
696
|
+
ordinalNumber: Tt,
|
|
697
697
|
era: R({
|
|
698
|
-
values:
|
|
698
|
+
values: Dt,
|
|
699
699
|
defaultWidth: "wide"
|
|
700
700
|
}),
|
|
701
701
|
quarter: R({
|
|
702
|
-
values:
|
|
702
|
+
values: Mt,
|
|
703
703
|
defaultWidth: "wide",
|
|
704
704
|
argumentCallback: (t) => t - 1
|
|
705
705
|
}),
|
|
706
706
|
month: R({
|
|
707
|
-
values:
|
|
707
|
+
values: Nt,
|
|
708
708
|
defaultWidth: "wide"
|
|
709
709
|
}),
|
|
710
710
|
day: R({
|
|
711
|
-
values:
|
|
711
|
+
values: vt,
|
|
712
712
|
defaultWidth: "wide"
|
|
713
713
|
}),
|
|
714
714
|
dayPeriod: R({
|
|
715
|
-
values:
|
|
715
|
+
values: Ot,
|
|
716
716
|
defaultWidth: "wide",
|
|
717
717
|
formattingValues: xt,
|
|
718
718
|
defaultFormattingWidth: "wide"
|
|
@@ -723,12 +723,12 @@ function q(t) {
|
|
|
723
723
|
const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = e.match(a);
|
|
724
724
|
if (!i)
|
|
725
725
|
return null;
|
|
726
|
-
const o = i[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth],
|
|
726
|
+
const o = i[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? kt(s, (m) => m.test(o)) : (
|
|
727
727
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
728
|
-
|
|
728
|
+
Pt(s, (m) => m.test(o))
|
|
729
729
|
);
|
|
730
730
|
let u;
|
|
731
|
-
u = t.valueCallback ? t.valueCallback(
|
|
731
|
+
u = t.valueCallback ? t.valueCallback(c) : c, u = n.valueCallback ? (
|
|
732
732
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
733
733
|
n.valueCallback(u)
|
|
734
734
|
) : u;
|
|
@@ -736,17 +736,17 @@ function q(t) {
|
|
|
736
736
|
return { value: u, rest: d };
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Pt(t, e) {
|
|
740
740
|
for (const n in t)
|
|
741
741
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
742
742
|
return n;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function kt(t, e) {
|
|
745
745
|
for (let n = 0; n < t.length; n++)
|
|
746
746
|
if (e(t[n]))
|
|
747
747
|
return n;
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function _t(t) {
|
|
750
750
|
return (e, n = {}) => {
|
|
751
751
|
const r = e.match(t.matchPattern);
|
|
752
752
|
if (!r) return null;
|
|
@@ -758,23 +758,23 @@ function kt(t) {
|
|
|
758
758
|
return { value: o, rest: s };
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
const
|
|
761
|
+
const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
762
762
|
narrow: /^(b|a)/i,
|
|
763
763
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
764
764
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
765
|
-
}, Ft = {
|
|
766
|
-
any: [/^b/i, /^(a|c)/i]
|
|
767
765
|
}, At = {
|
|
766
|
+
any: [/^b/i, /^(a|c)/i]
|
|
767
|
+
}, Wt = {
|
|
768
768
|
narrow: /^[1234]/i,
|
|
769
769
|
abbreviated: /^q[1234]/i,
|
|
770
770
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
771
|
-
}, Wt = {
|
|
772
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
773
771
|
}, $t = {
|
|
772
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
773
|
+
}, Ct = {
|
|
774
774
|
narrow: /^[jfmasond]/i,
|
|
775
775
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
776
776
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
777
|
-
},
|
|
777
|
+
}, jt = {
|
|
778
778
|
narrow: [
|
|
779
779
|
/^j/i,
|
|
780
780
|
/^f/i,
|
|
@@ -803,18 +803,18 @@ const _t = /^(\d+)(th|st|nd|rd)?/i, Et = /\d+/i, Yt = {
|
|
|
803
803
|
/^n/i,
|
|
804
804
|
/^d/i
|
|
805
805
|
]
|
|
806
|
-
},
|
|
806
|
+
}, Ht = {
|
|
807
807
|
narrow: /^[smtwf]/i,
|
|
808
808
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
809
809
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
810
810
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
811
|
-
},
|
|
811
|
+
}, Rt = {
|
|
812
812
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
813
813
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
814
|
-
},
|
|
814
|
+
}, qt = {
|
|
815
815
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
816
816
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
817
|
-
},
|
|
817
|
+
}, Bt = {
|
|
818
818
|
any: {
|
|
819
819
|
am: /^a/i,
|
|
820
820
|
pm: /^p/i,
|
|
@@ -825,86 +825,86 @@ const _t = /^(\d+)(th|st|nd|rd)?/i, Et = /\d+/i, Yt = {
|
|
|
825
825
|
evening: /evening/i,
|
|
826
826
|
night: /night/i
|
|
827
827
|
}
|
|
828
|
-
},
|
|
829
|
-
ordinalNumber:
|
|
830
|
-
matchPattern:
|
|
831
|
-
parsePattern:
|
|
828
|
+
}, Lt = {
|
|
829
|
+
ordinalNumber: _t({
|
|
830
|
+
matchPattern: Et,
|
|
831
|
+
parsePattern: Yt,
|
|
832
832
|
valueCallback: (t) => parseInt(t, 10)
|
|
833
833
|
}),
|
|
834
834
|
era: q({
|
|
835
|
-
matchPatterns:
|
|
835
|
+
matchPatterns: Ft,
|
|
836
836
|
defaultMatchWidth: "wide",
|
|
837
|
-
parsePatterns:
|
|
837
|
+
parsePatterns: At,
|
|
838
838
|
defaultParseWidth: "any"
|
|
839
839
|
}),
|
|
840
840
|
quarter: q({
|
|
841
|
-
matchPatterns:
|
|
841
|
+
matchPatterns: Wt,
|
|
842
842
|
defaultMatchWidth: "wide",
|
|
843
|
-
parsePatterns:
|
|
843
|
+
parsePatterns: $t,
|
|
844
844
|
defaultParseWidth: "any",
|
|
845
845
|
valueCallback: (t) => t + 1
|
|
846
846
|
}),
|
|
847
847
|
month: q({
|
|
848
|
-
matchPatterns:
|
|
848
|
+
matchPatterns: Ct,
|
|
849
849
|
defaultMatchWidth: "wide",
|
|
850
|
-
parsePatterns:
|
|
850
|
+
parsePatterns: jt,
|
|
851
851
|
defaultParseWidth: "any"
|
|
852
852
|
}),
|
|
853
853
|
day: q({
|
|
854
|
-
matchPatterns:
|
|
854
|
+
matchPatterns: Ht,
|
|
855
855
|
defaultMatchWidth: "wide",
|
|
856
|
-
parsePatterns:
|
|
856
|
+
parsePatterns: Rt,
|
|
857
857
|
defaultParseWidth: "any"
|
|
858
858
|
}),
|
|
859
859
|
dayPeriod: q({
|
|
860
|
-
matchPatterns:
|
|
860
|
+
matchPatterns: qt,
|
|
861
861
|
defaultMatchWidth: "any",
|
|
862
|
-
parsePatterns:
|
|
862
|
+
parsePatterns: Bt,
|
|
863
863
|
defaultParseWidth: "any"
|
|
864
864
|
})
|
|
865
|
-
},
|
|
865
|
+
}, Ut = {
|
|
866
866
|
code: "en-US",
|
|
867
|
-
formatDistance:
|
|
868
|
-
formatLong:
|
|
869
|
-
formatRelative:
|
|
870
|
-
localize:
|
|
871
|
-
match:
|
|
867
|
+
formatDistance: mt,
|
|
868
|
+
formatLong: yt,
|
|
869
|
+
formatRelative: bt,
|
|
870
|
+
localize: St,
|
|
871
|
+
match: Lt,
|
|
872
872
|
options: {
|
|
873
873
|
weekStartsOn: 0,
|
|
874
874
|
firstWeekContainsDate: 1
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
|
-
function
|
|
877
|
+
function Qt(t) {
|
|
878
878
|
const e = T(t);
|
|
879
|
-
return
|
|
879
|
+
return ut(e, ft(e)) + 1;
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
const e = T(t), n = +X(e) - +
|
|
883
|
-
return Math.round(n /
|
|
881
|
+
function Xt(t) {
|
|
882
|
+
const e = T(t), n = +X(e) - +ct(e);
|
|
883
|
+
return Math.round(n / Me) + 1;
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Te(t, e) {
|
|
886
886
|
var d, m, h, w;
|
|
887
|
-
const n = T(t), r = n.getFullYear(), a = z(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((m = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : m.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, o =
|
|
887
|
+
const n = T(t), r = n.getFullYear(), a = z(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((m = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : m.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, o = C(t, 0);
|
|
888
888
|
o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
|
|
889
|
-
const s = L(o, e),
|
|
890
|
-
|
|
891
|
-
const u = L(
|
|
889
|
+
const s = L(o, e), c = C(t, 0);
|
|
890
|
+
c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
|
|
891
|
+
const u = L(c, e);
|
|
892
892
|
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
895
|
-
var s,
|
|
896
|
-
const n = z(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((
|
|
894
|
+
function zt(t, e) {
|
|
895
|
+
var s, c, u, d;
|
|
896
|
+
const n = z(), r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((c = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, a = Te(t, e), i = C(t, 0);
|
|
897
897
|
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), L(i, e);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
const n = T(t), r = +L(n, e) - +
|
|
901
|
-
return Math.round(r /
|
|
899
|
+
function Gt(t, e) {
|
|
900
|
+
const n = T(t), r = +L(n, e) - +zt(n, e);
|
|
901
|
+
return Math.round(r / Me) + 1;
|
|
902
902
|
}
|
|
903
903
|
function p(t, e) {
|
|
904
904
|
const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
|
|
905
905
|
return n + r;
|
|
906
906
|
}
|
|
907
|
-
const
|
|
907
|
+
const F = {
|
|
908
908
|
// Year
|
|
909
909
|
y(t, e) {
|
|
910
910
|
const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -967,7 +967,7 @@ const Y = {
|
|
|
967
967
|
afternoon: "afternoon",
|
|
968
968
|
evening: "evening",
|
|
969
969
|
night: "night"
|
|
970
|
-
},
|
|
970
|
+
}, le = {
|
|
971
971
|
// Era
|
|
972
972
|
G: function(t, e, n) {
|
|
973
973
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -989,11 +989,11 @@ const Y = {
|
|
|
989
989
|
const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
990
990
|
return n.ordinalNumber(a, { unit: "year" });
|
|
991
991
|
}
|
|
992
|
-
return
|
|
992
|
+
return F.y(t, e);
|
|
993
993
|
},
|
|
994
994
|
// Local week-numbering year
|
|
995
995
|
Y: function(t, e, n, r) {
|
|
996
|
-
const a =
|
|
996
|
+
const a = Te(t, r), i = a > 0 ? a : 1 - a;
|
|
997
997
|
if (e === "YY") {
|
|
998
998
|
const o = i % 100;
|
|
999
999
|
return p(o, 2);
|
|
@@ -1002,7 +1002,7 @@ const Y = {
|
|
|
1002
1002
|
},
|
|
1003
1003
|
// ISO week-numbering year
|
|
1004
1004
|
R: function(t, e) {
|
|
1005
|
-
const n =
|
|
1005
|
+
const n = Oe(t);
|
|
1006
1006
|
return p(n, e.length);
|
|
1007
1007
|
},
|
|
1008
1008
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1080,7 +1080,7 @@ const Y = {
|
|
|
1080
1080
|
switch (e) {
|
|
1081
1081
|
case "M":
|
|
1082
1082
|
case "MM":
|
|
1083
|
-
return
|
|
1083
|
+
return F.M(t, e);
|
|
1084
1084
|
case "Mo":
|
|
1085
1085
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
1086
1086
|
case "MMM":
|
|
@@ -1125,21 +1125,21 @@ const Y = {
|
|
|
1125
1125
|
},
|
|
1126
1126
|
// Local week of year
|
|
1127
1127
|
w: function(t, e, n, r) {
|
|
1128
|
-
const a =
|
|
1128
|
+
const a = Gt(t, r);
|
|
1129
1129
|
return e === "wo" ? n.ordinalNumber(a, { unit: "week" }) : p(a, e.length);
|
|
1130
1130
|
},
|
|
1131
1131
|
// ISO week of year
|
|
1132
1132
|
I: function(t, e, n) {
|
|
1133
|
-
const r =
|
|
1133
|
+
const r = Xt(t);
|
|
1134
1134
|
return e === "Io" ? n.ordinalNumber(r, { unit: "week" }) : p(r, e.length);
|
|
1135
1135
|
},
|
|
1136
1136
|
// Day of the month
|
|
1137
1137
|
d: function(t, e, n) {
|
|
1138
|
-
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1138
|
+
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : F.d(t, e);
|
|
1139
1139
|
},
|
|
1140
1140
|
// Day of year
|
|
1141
1141
|
D: function(t, e, n) {
|
|
1142
|
-
const r =
|
|
1142
|
+
const r = Qt(t);
|
|
1143
1143
|
return e === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : p(r, e.length);
|
|
1144
1144
|
},
|
|
1145
1145
|
// Day of week
|
|
@@ -1358,11 +1358,11 @@ const Y = {
|
|
|
1358
1358
|
let r = t.getHours() % 12;
|
|
1359
1359
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1360
1360
|
}
|
|
1361
|
-
return
|
|
1361
|
+
return F.h(t, e);
|
|
1362
1362
|
},
|
|
1363
1363
|
// Hour [0-23]
|
|
1364
1364
|
H: function(t, e, n) {
|
|
1365
|
-
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1365
|
+
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : F.H(t, e);
|
|
1366
1366
|
},
|
|
1367
1367
|
// Hour [0-11]
|
|
1368
1368
|
K: function(t, e, n) {
|
|
@@ -1376,15 +1376,15 @@ const Y = {
|
|
|
1376
1376
|
},
|
|
1377
1377
|
// Minute
|
|
1378
1378
|
m: function(t, e, n) {
|
|
1379
|
-
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1379
|
+
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : F.m(t, e);
|
|
1380
1380
|
},
|
|
1381
1381
|
// Second
|
|
1382
1382
|
s: function(t, e, n) {
|
|
1383
|
-
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1383
|
+
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : F.s(t, e);
|
|
1384
1384
|
},
|
|
1385
1385
|
// Fraction of second
|
|
1386
1386
|
S: function(t, e) {
|
|
1387
|
-
return
|
|
1387
|
+
return F.S(t, e);
|
|
1388
1388
|
},
|
|
1389
1389
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1390
1390
|
X: function(t, e, n) {
|
|
@@ -1393,14 +1393,14 @@ const Y = {
|
|
|
1393
1393
|
return "Z";
|
|
1394
1394
|
switch (e) {
|
|
1395
1395
|
case "X":
|
|
1396
|
-
return
|
|
1396
|
+
return de(r);
|
|
1397
1397
|
case "XXXX":
|
|
1398
1398
|
case "XX":
|
|
1399
|
-
return
|
|
1399
|
+
return $(r);
|
|
1400
1400
|
case "XXXXX":
|
|
1401
1401
|
case "XXX":
|
|
1402
1402
|
default:
|
|
1403
|
-
return
|
|
1403
|
+
return $(r, ":");
|
|
1404
1404
|
}
|
|
1405
1405
|
},
|
|
1406
1406
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1408,14 +1408,14 @@ const Y = {
|
|
|
1408
1408
|
const r = t.getTimezoneOffset();
|
|
1409
1409
|
switch (e) {
|
|
1410
1410
|
case "x":
|
|
1411
|
-
return
|
|
1411
|
+
return de(r);
|
|
1412
1412
|
case "xxxx":
|
|
1413
1413
|
case "xx":
|
|
1414
|
-
return
|
|
1414
|
+
return $(r);
|
|
1415
1415
|
case "xxxxx":
|
|
1416
1416
|
case "xxx":
|
|
1417
1417
|
default:
|
|
1418
|
-
return
|
|
1418
|
+
return $(r, ":");
|
|
1419
1419
|
}
|
|
1420
1420
|
},
|
|
1421
1421
|
// Timezone (GMT)
|
|
@@ -1425,10 +1425,10 @@ const Y = {
|
|
|
1425
1425
|
case "O":
|
|
1426
1426
|
case "OO":
|
|
1427
1427
|
case "OOO":
|
|
1428
|
-
return "GMT" +
|
|
1428
|
+
return "GMT" + fe(r, ":");
|
|
1429
1429
|
case "OOOO":
|
|
1430
1430
|
default:
|
|
1431
|
-
return "GMT" +
|
|
1431
|
+
return "GMT" + $(r, ":");
|
|
1432
1432
|
}
|
|
1433
1433
|
},
|
|
1434
1434
|
// Timezone (specific non-location)
|
|
@@ -1438,10 +1438,10 @@ const Y = {
|
|
|
1438
1438
|
case "z":
|
|
1439
1439
|
case "zz":
|
|
1440
1440
|
case "zzz":
|
|
1441
|
-
return "GMT" +
|
|
1441
|
+
return "GMT" + fe(r, ":");
|
|
1442
1442
|
case "zzzz":
|
|
1443
1443
|
default:
|
|
1444
|
-
return "GMT" +
|
|
1444
|
+
return "GMT" + $(r, ":");
|
|
1445
1445
|
}
|
|
1446
1446
|
},
|
|
1447
1447
|
// Seconds timestamp
|
|
@@ -1455,18 +1455,18 @@ const Y = {
|
|
|
1455
1455
|
return p(r, e.length);
|
|
1456
1456
|
}
|
|
1457
1457
|
};
|
|
1458
|
-
function
|
|
1458
|
+
function fe(t, e = "") {
|
|
1459
1459
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), i = r % 60;
|
|
1460
1460
|
return i === 0 ? n + String(a) : n + String(a) + e + p(i, 2);
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1463
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) :
|
|
1462
|
+
function de(t, e) {
|
|
1463
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) : $(t, e);
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function $(t, e = "") {
|
|
1466
1466
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = p(Math.trunc(r / 60), 2), i = p(r % 60, 2);
|
|
1467
1467
|
return n + a + e + i;
|
|
1468
1468
|
}
|
|
1469
|
-
const
|
|
1469
|
+
const me = (t, e) => {
|
|
1470
1470
|
switch (t) {
|
|
1471
1471
|
case "P":
|
|
1472
1472
|
return e.date({ width: "short" });
|
|
@@ -1478,7 +1478,7 @@ const de = (t, e) => {
|
|
|
1478
1478
|
default:
|
|
1479
1479
|
return e.date({ width: "full" });
|
|
1480
1480
|
}
|
|
1481
|
-
},
|
|
1481
|
+
}, Se = (t, e) => {
|
|
1482
1482
|
switch (t) {
|
|
1483
1483
|
case "p":
|
|
1484
1484
|
return e.time({ width: "short" });
|
|
@@ -1490,10 +1490,10 @@ const de = (t, e) => {
|
|
|
1490
1490
|
default:
|
|
1491
1491
|
return e.time({ width: "full" });
|
|
1492
1492
|
}
|
|
1493
|
-
},
|
|
1493
|
+
}, Vt = (t, e) => {
|
|
1494
1494
|
const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1495
1495
|
if (!a)
|
|
1496
|
-
return
|
|
1496
|
+
return me(t, e);
|
|
1497
1497
|
let i;
|
|
1498
1498
|
switch (r) {
|
|
1499
1499
|
case "P":
|
|
@@ -1510,97 +1510,97 @@ const de = (t, e) => {
|
|
|
1510
1510
|
i = e.dateTime({ width: "full" });
|
|
1511
1511
|
break;
|
|
1512
1512
|
}
|
|
1513
|
-
return i.replace("{{date}}",
|
|
1514
|
-
},
|
|
1515
|
-
p:
|
|
1516
|
-
P:
|
|
1517
|
-
},
|
|
1518
|
-
function Kt(t) {
|
|
1519
|
-
return Zt.test(t);
|
|
1520
|
-
}
|
|
1513
|
+
return i.replace("{{date}}", me(r, e)).replace("{{time}}", Se(a, e));
|
|
1514
|
+
}, Zt = {
|
|
1515
|
+
p: Se,
|
|
1516
|
+
P: Vt
|
|
1517
|
+
}, Jt = /^D+$/, It = /^Y+$/, Kt = ["D", "DD", "YY", "YYYY"];
|
|
1521
1518
|
function en(t) {
|
|
1522
1519
|
return Jt.test(t);
|
|
1523
1520
|
}
|
|
1524
|
-
function tn(t
|
|
1525
|
-
|
|
1526
|
-
if (console.warn(r), It.includes(t)) throw new RangeError(r);
|
|
1521
|
+
function tn(t) {
|
|
1522
|
+
return It.test(t);
|
|
1527
1523
|
}
|
|
1528
1524
|
function nn(t, e, n) {
|
|
1525
|
+
const r = rn(t, e, n);
|
|
1526
|
+
if (console.warn(r), Kt.includes(t)) throw new RangeError(r);
|
|
1527
|
+
}
|
|
1528
|
+
function rn(t, e, n) {
|
|
1529
1529
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1530
1530
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1531
1531
|
}
|
|
1532
|
-
const
|
|
1532
|
+
const an = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, on = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, sn = /^'([^]*?)'?$/, un = /''/g, cn = /[a-zA-Z]/;
|
|
1533
1533
|
function U(t, e, n) {
|
|
1534
1534
|
var d, m, h, w;
|
|
1535
|
-
const r = z(), a = r.locale ??
|
|
1535
|
+
const r = z(), a = r.locale ?? Ut, i = r.firstWeekContainsDate ?? ((m = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, o = r.weekStartsOn ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.weekStartsOn) ?? 0, s = T(t);
|
|
1536
1536
|
if (!xe(s))
|
|
1537
1537
|
throw new RangeError("Invalid time value");
|
|
1538
|
-
let
|
|
1538
|
+
let c = e.match(on).map((g) => {
|
|
1539
1539
|
const f = g[0];
|
|
1540
1540
|
if (f === "p" || f === "P") {
|
|
1541
|
-
const
|
|
1542
|
-
return
|
|
1541
|
+
const l = Zt[f];
|
|
1542
|
+
return l(g, a.formatLong);
|
|
1543
1543
|
}
|
|
1544
1544
|
return g;
|
|
1545
|
-
}).join("").match(
|
|
1545
|
+
}).join("").match(an).map((g) => {
|
|
1546
1546
|
if (g === "''")
|
|
1547
1547
|
return { isToken: !1, value: "'" };
|
|
1548
1548
|
const f = g[0];
|
|
1549
1549
|
if (f === "'")
|
|
1550
|
-
return { isToken: !1, value:
|
|
1551
|
-
if (
|
|
1550
|
+
return { isToken: !1, value: ln(g) };
|
|
1551
|
+
if (le[f])
|
|
1552
1552
|
return { isToken: !0, value: g };
|
|
1553
|
-
if (f.match(
|
|
1553
|
+
if (f.match(cn))
|
|
1554
1554
|
throw new RangeError(
|
|
1555
1555
|
"Format string contains an unescaped latin alphabet character `" + f + "`"
|
|
1556
1556
|
);
|
|
1557
1557
|
return { isToken: !1, value: g };
|
|
1558
1558
|
});
|
|
1559
|
-
a.localize.preprocessor && (
|
|
1559
|
+
a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
|
|
1560
1560
|
const u = {
|
|
1561
1561
|
firstWeekContainsDate: i,
|
|
1562
1562
|
weekStartsOn: o,
|
|
1563
1563
|
locale: a
|
|
1564
1564
|
};
|
|
1565
|
-
return
|
|
1565
|
+
return c.map((g) => {
|
|
1566
1566
|
if (!g.isToken) return g.value;
|
|
1567
1567
|
const f = g.value;
|
|
1568
|
-
(
|
|
1569
|
-
const
|
|
1570
|
-
return
|
|
1568
|
+
(tn(f) || en(f)) && nn(f, e, String(t));
|
|
1569
|
+
const l = le[f[0]];
|
|
1570
|
+
return l(s, f, a.localize, u);
|
|
1571
1571
|
}).join("");
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1574
|
-
const e = t.match(
|
|
1575
|
-
return e ? e[1].replace(
|
|
1573
|
+
function ln(t) {
|
|
1574
|
+
const e = t.match(sn);
|
|
1575
|
+
return e ? e[1].replace(un, "'") : t;
|
|
1576
1576
|
}
|
|
1577
1577
|
function Z(t, e) {
|
|
1578
|
-
const r =
|
|
1578
|
+
const r = hn(t);
|
|
1579
1579
|
let a;
|
|
1580
1580
|
if (r.date) {
|
|
1581
|
-
const
|
|
1582
|
-
a =
|
|
1581
|
+
const c = gn(r.date, 2);
|
|
1582
|
+
a = pn(c.restDateString, c.year);
|
|
1583
1583
|
}
|
|
1584
1584
|
if (!a || isNaN(a.getTime()))
|
|
1585
1585
|
return /* @__PURE__ */ new Date(NaN);
|
|
1586
1586
|
const i = a.getTime();
|
|
1587
1587
|
let o = 0, s;
|
|
1588
|
-
if (r.time && (o =
|
|
1588
|
+
if (r.time && (o = yn(r.time), isNaN(o)))
|
|
1589
1589
|
return /* @__PURE__ */ new Date(NaN);
|
|
1590
1590
|
if (r.timezone) {
|
|
1591
|
-
if (s =
|
|
1591
|
+
if (s = wn(r.timezone), isNaN(s))
|
|
1592
1592
|
return /* @__PURE__ */ new Date(NaN);
|
|
1593
1593
|
} else {
|
|
1594
|
-
const
|
|
1594
|
+
const c = new Date(i + o), u = /* @__PURE__ */ new Date(0);
|
|
1595
1595
|
return u.setFullYear(
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1596
|
+
c.getUTCFullYear(),
|
|
1597
|
+
c.getUTCMonth(),
|
|
1598
|
+
c.getUTCDate()
|
|
1599
1599
|
), u.setHours(
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1600
|
+
c.getUTCHours(),
|
|
1601
|
+
c.getUTCMinutes(),
|
|
1602
|
+
c.getUTCSeconds(),
|
|
1603
|
+
c.getUTCMilliseconds()
|
|
1604
1604
|
), u;
|
|
1605
1605
|
}
|
|
1606
1606
|
return new Date(i + o + s);
|
|
@@ -1609,8 +1609,8 @@ const Q = {
|
|
|
1609
1609
|
dateTimeDelimiter: /[T ]/,
|
|
1610
1610
|
timeZoneDelimiter: /[Z ]/i,
|
|
1611
1611
|
timezone: /([Z+-].*)$/
|
|
1612
|
-
},
|
|
1613
|
-
function
|
|
1612
|
+
}, fn = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, dn = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, mn = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
1613
|
+
function hn(t) {
|
|
1614
1614
|
const e = {}, n = t.split(Q.dateTimeDelimiter);
|
|
1615
1615
|
let r;
|
|
1616
1616
|
if (n.length > 2)
|
|
@@ -1624,7 +1624,7 @@ function mn(t) {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
return e;
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function gn(t, e) {
|
|
1628
1628
|
const n = new RegExp(
|
|
1629
1629
|
"^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
|
|
1630
1630
|
), r = t.match(n);
|
|
@@ -1635,64 +1635,64 @@ function hn(t, e) {
|
|
|
1635
1635
|
restDateString: t.slice((r[1] || r[2]).length)
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function pn(t, e) {
|
|
1639
1639
|
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
1640
|
-
const n = t.match(
|
|
1640
|
+
const n = t.match(fn);
|
|
1641
1641
|
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
1642
|
-
const r = !!n[4], a = B(n[1]), i = B(n[2]) - 1, o = B(n[3]), s = B(n[4]),
|
|
1642
|
+
const r = !!n[4], a = B(n[1]), i = B(n[2]) - 1, o = B(n[3]), s = B(n[4]), c = B(n[5]) - 1;
|
|
1643
1643
|
if (r)
|
|
1644
|
-
return
|
|
1644
|
+
return vn(e, s, c) ? bn(e, s, c) : /* @__PURE__ */ new Date(NaN);
|
|
1645
1645
|
{
|
|
1646
1646
|
const u = /* @__PURE__ */ new Date(0);
|
|
1647
|
-
return !
|
|
1647
|
+
return !Mn(e, i, o) || !Nn(e, a) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, i, Math.max(a, o)), u);
|
|
1648
1648
|
}
|
|
1649
1649
|
}
|
|
1650
1650
|
function B(t) {
|
|
1651
1651
|
return t ? parseInt(t) : 1;
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
const e = t.match(
|
|
1653
|
+
function yn(t) {
|
|
1654
|
+
const e = t.match(dn);
|
|
1655
1655
|
if (!e) return NaN;
|
|
1656
1656
|
const n = J(e[1]), r = J(e[2]), a = J(e[3]);
|
|
1657
|
-
return
|
|
1657
|
+
return On(n, r, a) ? n * ve + r * Ne + a * 1e3 : NaN;
|
|
1658
1658
|
}
|
|
1659
1659
|
function J(t) {
|
|
1660
1660
|
return t && parseFloat(t.replace(",", ".")) || 0;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function wn(t) {
|
|
1663
1663
|
if (t === "Z") return 0;
|
|
1664
|
-
const e = t.match(
|
|
1664
|
+
const e = t.match(mn);
|
|
1665
1665
|
if (!e) return 0;
|
|
1666
1666
|
const n = e[1] === "+" ? -1 : 1, r = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
|
|
1667
|
-
return xn(r, a) ? n * (r *
|
|
1667
|
+
return xn(r, a) ? n * (r * ve + a * Ne) : NaN;
|
|
1668
1668
|
}
|
|
1669
|
-
function
|
|
1669
|
+
function bn(t, e, n) {
|
|
1670
1670
|
const r = /* @__PURE__ */ new Date(0);
|
|
1671
1671
|
r.setUTCFullYear(t, 0, 4);
|
|
1672
1672
|
const a = r.getUTCDay() || 7, i = (e - 1) * 7 + n + 1 - a;
|
|
1673
1673
|
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
1674
1674
|
}
|
|
1675
|
-
const
|
|
1676
|
-
function
|
|
1675
|
+
const Dn = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1676
|
+
function Pe(t) {
|
|
1677
1677
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1680
|
-
return e >= 0 && e <= 11 && n >= 1 && n <= (
|
|
1679
|
+
function Mn(t, e, n) {
|
|
1680
|
+
return e >= 0 && e <= 11 && n >= 1 && n <= (Dn[e] || (Pe(t) ? 29 : 28));
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1683
|
-
return e >= 1 && e <= (
|
|
1682
|
+
function Nn(t, e) {
|
|
1683
|
+
return e >= 1 && e <= (Pe(t) ? 366 : 365);
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function vn(t, e, n) {
|
|
1686
1686
|
return e >= 1 && e <= 53 && n >= 0 && n <= 6;
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1688
|
+
function On(t, e, n) {
|
|
1689
1689
|
return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
|
|
1690
1690
|
}
|
|
1691
1691
|
function xn(t, e) {
|
|
1692
1692
|
return e >= 0 && e <= 59;
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1695
|
-
const t = new
|
|
1694
|
+
function Tn() {
|
|
1695
|
+
const t = new De();
|
|
1696
1696
|
function e(n, r) {
|
|
1697
1697
|
var i;
|
|
1698
1698
|
if (!n || typeof n == "string" && n.indexOf("0001") === 0)
|
|
@@ -1703,7 +1703,7 @@ function On() {
|
|
|
1703
1703
|
if (a == "Invalid Date" && (a = t.create(n) || new Date(n)), xe(a))
|
|
1704
1704
|
return a = Z(U(a, "yyyy-MM-dd HH:mm:ss")), U(a, r);
|
|
1705
1705
|
if (r.indexOf("HH") === 0 || r.indexOf("hh") === 0) {
|
|
1706
|
-
const o = (i = n.match(/\d*/g)) == null ? void 0 : i.filter((
|
|
1706
|
+
const o = (i = n.match(/\d*/g)) == null ? void 0 : i.filter((c) => c !== "").join(":");
|
|
1707
1707
|
(r === "HH" || r === "hh") && (r += ":mm");
|
|
1708
1708
|
const s = Z("2024-06-05 " + o);
|
|
1709
1709
|
return U(s, r);
|
|
@@ -1714,87 +1714,87 @@ function On() {
|
|
|
1714
1714
|
formatTo: e
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1718
|
-
function t(f,
|
|
1719
|
-
return Array.isArray(f) ?
|
|
1717
|
+
function Sn() {
|
|
1718
|
+
function t(f, l = null) {
|
|
1719
|
+
return Array.isArray(f) ? O.max.apply(null, f).toFixed() : f && l ? O.maximum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1720
1720
|
}
|
|
1721
|
-
function e(f,
|
|
1722
|
-
return Array.isArray(f) ?
|
|
1721
|
+
function e(f, l = null) {
|
|
1722
|
+
return Array.isArray(f) ? O.min.apply(null, f).toFixed() : f && l ? O.minimum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1723
1723
|
}
|
|
1724
1724
|
function n(f) {
|
|
1725
|
-
return
|
|
1725
|
+
return O.sum.apply(null, f).toFixed();
|
|
1726
1726
|
}
|
|
1727
|
-
function r(f,
|
|
1728
|
-
return new
|
|
1727
|
+
function r(f, l) {
|
|
1728
|
+
return new O(f).div(l).toFixed();
|
|
1729
1729
|
}
|
|
1730
|
-
function a(f,
|
|
1731
|
-
return new
|
|
1730
|
+
function a(f, l) {
|
|
1731
|
+
return new O(f).plus(l).toFixed();
|
|
1732
1732
|
}
|
|
1733
|
-
function i(f,
|
|
1734
|
-
return new
|
|
1733
|
+
function i(f, l) {
|
|
1734
|
+
return new O(f).times(l).toFixed();
|
|
1735
1735
|
}
|
|
1736
|
-
function o(f,
|
|
1737
|
-
return new
|
|
1736
|
+
function o(f, l) {
|
|
1737
|
+
return new O(f).minus(l).toFixed();
|
|
1738
1738
|
}
|
|
1739
|
-
function s(f,
|
|
1740
|
-
return new
|
|
1739
|
+
function s(f, l) {
|
|
1740
|
+
return new O(f).eq(l);
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1743
|
-
return new
|
|
1742
|
+
function c(f, l) {
|
|
1743
|
+
return new O(f).lt(l);
|
|
1744
1744
|
}
|
|
1745
|
-
function u(f,
|
|
1746
|
-
return new
|
|
1745
|
+
function u(f, l) {
|
|
1746
|
+
return new O(f).gt(l);
|
|
1747
1747
|
}
|
|
1748
1748
|
function d(f) {
|
|
1749
|
-
return new
|
|
1749
|
+
return new O(f).toNumber();
|
|
1750
1750
|
}
|
|
1751
|
-
function m(f,
|
|
1752
|
-
return new
|
|
1751
|
+
function m(f, l = 0) {
|
|
1752
|
+
return new O(f).toFixed(l);
|
|
1753
1753
|
}
|
|
1754
1754
|
function h(f) {
|
|
1755
|
-
const
|
|
1756
|
-
let N, D
|
|
1755
|
+
const l = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"), y = new Array("", "拾", "佰", "仟"), S = new Array("", "万", "亿", "兆"), x = new Array("角", "分", "毫", "厘"), k = "整", _ = "元", b = 1e15;
|
|
1756
|
+
let v, N, D = "", E;
|
|
1757
1757
|
if (f == "")
|
|
1758
1758
|
return "";
|
|
1759
1759
|
const P = parseFloat(f);
|
|
1760
1760
|
if (P >= b)
|
|
1761
1761
|
return "";
|
|
1762
1762
|
if (P === 0)
|
|
1763
|
-
return
|
|
1764
|
-
if (f = P.toString(), f.indexOf(".") === -1 ? (
|
|
1765
|
-
let
|
|
1766
|
-
const
|
|
1767
|
-
for (let
|
|
1768
|
-
const re =
|
|
1769
|
-
re == "0" ?
|
|
1763
|
+
return D = l[0] + _ + k, D;
|
|
1764
|
+
if (f = P.toString(), f.indexOf(".") === -1 ? (v = f, N = "") : (E = f.split("."), v = E[0], N = E[1].substr(0, 4)), parseInt(v, 10) > 0) {
|
|
1765
|
+
let Y = 0;
|
|
1766
|
+
const A = v.length;
|
|
1767
|
+
for (let W = 0; W < A; W++) {
|
|
1768
|
+
const re = v.substr(W, 1), ae = A - W - 1, ke = ae / 4, ie = ae % 4;
|
|
1769
|
+
re == "0" ? Y++ : (Y > 0 && (D += l[0]), Y = 0, D += l[parseInt(re, 10)] + y[ie]), ie == 0 && Y < 4 && (D += S[ke]);
|
|
1770
1770
|
}
|
|
1771
|
-
|
|
1771
|
+
D += _;
|
|
1772
1772
|
}
|
|
1773
|
-
if (
|
|
1774
|
-
const
|
|
1775
|
-
for (let
|
|
1776
|
-
let
|
|
1777
|
-
|
|
1773
|
+
if (N !== "") {
|
|
1774
|
+
const Y = N.length;
|
|
1775
|
+
for (let A = 0; A < Y; A++) {
|
|
1776
|
+
let W = N.substr(A, 1);
|
|
1777
|
+
W !== "0" && (D += l[Number(W)] + x[A]);
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
return
|
|
1780
|
+
return D === "" ? D += l[0] + _ + k : N === "" && (D += k), D;
|
|
1781
1781
|
}
|
|
1782
|
-
function w(f,
|
|
1782
|
+
function w(f, l) {
|
|
1783
1783
|
var y = f == null || typeof f == "number" && isNaN(f) ? "" : String(f);
|
|
1784
|
-
return
|
|
1785
|
-
}
|
|
1786
|
-
function g(f,
|
|
1787
|
-
const y = new
|
|
1788
|
-
prefix:
|
|
1789
|
-
suffix:
|
|
1790
|
-
decimalSeparator:
|
|
1791
|
-
groupSeparator:
|
|
1784
|
+
return l && (l.prefix && (y = y.replace(new RegExp(l.prefix, "g"), "")), l.suffix && (y = y.replace(new RegExp(l.suffix, "g"), "")), y = y.replace(/\,/g, "")), y;
|
|
1785
|
+
}
|
|
1786
|
+
function g(f, l) {
|
|
1787
|
+
const y = new O(f), S = {
|
|
1788
|
+
prefix: l.prefix || "",
|
|
1789
|
+
suffix: l.suffix || "",
|
|
1790
|
+
decimalSeparator: l.decimalSeparator || ".",
|
|
1791
|
+
groupSeparator: l.groupSeparator || "",
|
|
1792
1792
|
groupSize: 3
|
|
1793
1793
|
};
|
|
1794
1794
|
if (y.isNaN())
|
|
1795
1795
|
return "";
|
|
1796
|
-
let
|
|
1797
|
-
return
|
|
1796
|
+
let x = l.precision || 0;
|
|
1797
|
+
return x = Number(x), y.toFormat(x, S);
|
|
1798
1798
|
}
|
|
1799
1799
|
return {
|
|
1800
1800
|
formatTo: g,
|
|
@@ -1803,7 +1803,7 @@ function Tn() {
|
|
|
1803
1803
|
toFixed: m,
|
|
1804
1804
|
toNumber: d,
|
|
1805
1805
|
greaterThan: u,
|
|
1806
|
-
lessThan:
|
|
1806
|
+
lessThan: c,
|
|
1807
1807
|
equal: s,
|
|
1808
1808
|
minus: o,
|
|
1809
1809
|
multiplied: i,
|
|
@@ -1814,7 +1814,7 @@ function Tn() {
|
|
|
1814
1814
|
max: t
|
|
1815
1815
|
};
|
|
1816
1816
|
}
|
|
1817
|
-
const
|
|
1817
|
+
const Pn = ["秒", "分钟", "小时", "天", "周", "个月", "年"], I = [
|
|
1818
1818
|
60,
|
|
1819
1819
|
// 60 seconds in 1 min
|
|
1820
1820
|
60,
|
|
@@ -1828,12 +1828,12 @@ const Sn = ["秒", "分钟", "小时", "天", "周", "个月", "年"], I = [
|
|
|
1828
1828
|
12
|
|
1829
1829
|
// 12 months in 1 year
|
|
1830
1830
|
];
|
|
1831
|
-
function
|
|
1832
|
-
const t = new
|
|
1831
|
+
function kn() {
|
|
1832
|
+
const t = new De();
|
|
1833
1833
|
function e(o, s) {
|
|
1834
1834
|
if (s === 0) return ["刚刚", "片刻后"];
|
|
1835
|
-
const
|
|
1836
|
-
return [`${o} ${
|
|
1835
|
+
const c = Pn[~~(s / 2)];
|
|
1836
|
+
return [`${o} ${c}前`, `${o} ${c}后`];
|
|
1837
1837
|
}
|
|
1838
1838
|
function n(o) {
|
|
1839
1839
|
if (typeof o == "object")
|
|
@@ -1849,21 +1849,21 @@ function Pn() {
|
|
|
1849
1849
|
function a(o) {
|
|
1850
1850
|
const s = o < 0 ? 1 : 0;
|
|
1851
1851
|
o = Math.abs(o);
|
|
1852
|
-
let
|
|
1853
|
-
for (; o >= I[
|
|
1854
|
-
o /= I[
|
|
1855
|
-
return o = Math.floor(o),
|
|
1852
|
+
let c = 0;
|
|
1853
|
+
for (; o >= I[c] && c < I.length; c++)
|
|
1854
|
+
o /= I[c];
|
|
1855
|
+
return o = Math.floor(o), c *= 2, o > (c === 0 ? 9 : 1) && (c += 1), e(o, c)[s].replace("%s", o.toString());
|
|
1856
1856
|
}
|
|
1857
1857
|
function i(o, s) {
|
|
1858
|
-
const
|
|
1859
|
-
return a(
|
|
1858
|
+
const c = r(o, s && s.relativeDate);
|
|
1859
|
+
return a(c);
|
|
1860
1860
|
}
|
|
1861
1861
|
return {
|
|
1862
1862
|
formatTo: i
|
|
1863
1863
|
};
|
|
1864
1864
|
}
|
|
1865
|
-
const
|
|
1866
|
-
function
|
|
1865
|
+
const _n = ["moz", "ms", "webkit"];
|
|
1866
|
+
function En() {
|
|
1867
1867
|
let t = 0;
|
|
1868
1868
|
return (e) => {
|
|
1869
1869
|
const n = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (n - t)), a = setTimeout(() => {
|
|
@@ -1872,89 +1872,89 @@ function _n() {
|
|
|
1872
1872
|
return t = n + r, a;
|
|
1873
1873
|
};
|
|
1874
1874
|
}
|
|
1875
|
-
function
|
|
1875
|
+
function Yn() {
|
|
1876
1876
|
if (typeof window > "u")
|
|
1877
1877
|
return () => 0;
|
|
1878
1878
|
if (window.requestAnimationFrame)
|
|
1879
1879
|
return window.requestAnimationFrame.bind(window);
|
|
1880
|
-
const t =
|
|
1881
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
1880
|
+
const t = _n.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
1881
|
+
return t ? window[`${t}RequestAnimationFrame`] : En();
|
|
1882
1882
|
}
|
|
1883
|
-
|
|
1884
|
-
function
|
|
1883
|
+
Yn();
|
|
1884
|
+
function Fn(t) {
|
|
1885
1885
|
let e;
|
|
1886
1886
|
return /Y/g.test(t) === !0 ? e = t.replace(/Y/g, "y") : e = t, /D/g.test(e) === !0 && (e = e.replace(/D/g, "d")), e;
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function An(t, e, n, r, a) {
|
|
1889
1889
|
if (t == null || t === "")
|
|
1890
1890
|
return "";
|
|
1891
1891
|
if (e && e.length) {
|
|
1892
1892
|
const i = ("" + t).split(n), o = [];
|
|
1893
1893
|
for (let s = 0; s < i.length; s++) {
|
|
1894
|
-
const
|
|
1895
|
-
|
|
1894
|
+
const c = e.find((u) => u[a] === i[s]);
|
|
1895
|
+
c ? o.push(c[r]) : o.push(i[s]);
|
|
1896
1896
|
}
|
|
1897
1897
|
return o.length > 0 ? o.join(n) : "";
|
|
1898
1898
|
}
|
|
1899
1899
|
return t;
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1901
|
+
function he(t, e) {
|
|
1902
1902
|
let n;
|
|
1903
|
-
return e || (e = "YYYY-MM-DD"), e === "timeago" ?
|
|
1903
|
+
return e || (e = "YYYY-MM-DD"), e === "timeago" ? kn().formatTo(t) : (e === "hh:mm:ss" || e === "HH:mm:ss" ? n = t : n = Tn().formatTo(t, Fn(e)), n);
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Wn(t, e) {
|
|
1906
1906
|
return !t && !e || e && e.type && e.type === "number" && (e.formatter || (e.useThousands ? e.precision !== void 0 ? t = "n" + e.precision : t = "n2" : e.precision !== void 0 ? t = "f" + e.precision : t = "f2")), t;
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function $n(t) {
|
|
1909
1909
|
return t.replace(/[a-z]+/g, (e) => e.toUpperCase());
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1911
|
+
function Cn(t, e, n) {
|
|
1912
1912
|
return t.toString().indexOf(".") > -1 ? (console.warn("十进制转换仅限整型类型"), "") : (Array(e).join(n) + t).slice(-e);
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function jn(t, e) {
|
|
1915
1915
|
return Number(t * 100).toFixed(Number(e)) + "%";
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1917
|
+
function Hn(t, e, n, r, a, i, o) {
|
|
1918
1918
|
if (!e && !n)
|
|
1919
1919
|
return t.toString();
|
|
1920
1920
|
if (n && n.type && n.type === "number" && n.formatter)
|
|
1921
1921
|
return n.formatter(t);
|
|
1922
|
-
const s =
|
|
1922
|
+
const s = $n(e.substring(0, 1)), c = Number(e.substring(1)), u = {};
|
|
1923
1923
|
let d;
|
|
1924
1924
|
if (!/C|D|F|N|P/g.test(s)) {
|
|
1925
1925
|
console.log(`不支持format为 ${e} 类型的数字格式化`);
|
|
1926
1926
|
return;
|
|
1927
1927
|
}
|
|
1928
1928
|
r && Object.assign(u, { groupSeparator: r }), a && Object.assign(u, { decimalSeparator: a }), i && Object.assign(u, { format: i });
|
|
1929
|
-
const { formatTo: m } =
|
|
1929
|
+
const { formatTo: m } = Sn();
|
|
1930
1930
|
switch (s) {
|
|
1931
1931
|
case "C":
|
|
1932
|
-
Object.assign(u, { prefix: "¥", precision:
|
|
1932
|
+
Object.assign(u, { prefix: "¥", precision: c }), d = m(t, u);
|
|
1933
1933
|
break;
|
|
1934
1934
|
case "D":
|
|
1935
|
-
d =
|
|
1935
|
+
d = Cn(t, c, o);
|
|
1936
1936
|
break;
|
|
1937
1937
|
case "F":
|
|
1938
|
-
Object.assign(u, { prefix: "", groupSeparator: "", precision:
|
|
1938
|
+
Object.assign(u, { prefix: "", groupSeparator: "", precision: c }), d = m(t, u);
|
|
1939
1939
|
break;
|
|
1940
1940
|
case "N":
|
|
1941
|
-
Object.assign(u, { prefix: "", precision:
|
|
1941
|
+
Object.assign(u, { prefix: "", precision: c }), d = m(t, u);
|
|
1942
1942
|
break;
|
|
1943
1943
|
case "P":
|
|
1944
|
-
d =
|
|
1944
|
+
d = jn(t, c);
|
|
1945
1945
|
break;
|
|
1946
1946
|
}
|
|
1947
1947
|
return d;
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function Rn(t) {
|
|
1950
1950
|
return t === !0 ? "是" : t === !1 || t == null || t === "" || typeof t > "u" ? "否" : t;
|
|
1951
1951
|
}
|
|
1952
|
-
const K = /* @__PURE__ */
|
|
1952
|
+
const K = /* @__PURE__ */ ge({
|
|
1953
1953
|
name: "FText",
|
|
1954
1954
|
props: ne,
|
|
1955
1955
|
emits: ["update:modelValue", "valueChange"],
|
|
1956
1956
|
setup(t, e) {
|
|
1957
|
-
const n = M(t.textarea), r = M(t.password), a = M(t.autoSize), i = M(t.dateRange), o = M(t.type), s = M(t.format),
|
|
1957
|
+
const n = M(t.textarea), r = M(t.password), a = M(t.autoSize), i = M(t.dateRange), o = M(t.type), s = M(t.format), c = M(), u = M(), d = M(""), m = H(() => ({
|
|
1958
1958
|
"f-form-control-text": !n.value,
|
|
1959
1959
|
"f-form-context-textarea": n,
|
|
1960
1960
|
"f-component-text-auto-size": a.value
|
|
@@ -1964,58 +1964,58 @@ const K = /* @__PURE__ */ he({
|
|
|
1964
1964
|
"min-height": a.value && t.height > 0 ? `${t.height}px` : "",
|
|
1965
1965
|
"max-height": a.value && t.maxHeight > 0 ? `${t.maxHeight}px` : ""
|
|
1966
1966
|
}));
|
|
1967
|
-
|
|
1967
|
+
pe(() => {
|
|
1968
1968
|
if (n.value) {
|
|
1969
|
-
const
|
|
1970
|
-
u.value.parentElement.className =
|
|
1969
|
+
const l = u.value.parentElement.className;
|
|
1970
|
+
u.value.parentElement.className = l + " f-cmp-text-is-textarea";
|
|
1971
1971
|
}
|
|
1972
1972
|
});
|
|
1973
1973
|
const w = H(() => {
|
|
1974
|
-
let
|
|
1975
|
-
return
|
|
1974
|
+
let l = g(t.modelValue);
|
|
1975
|
+
return c.value != l && (e.emit("valueChange", l), c.value = l), l;
|
|
1976
1976
|
});
|
|
1977
|
-
function g(
|
|
1977
|
+
function g(l) {
|
|
1978
1978
|
if (r.value)
|
|
1979
|
-
return
|
|
1980
|
-
if (o.value !== "boolean" && (
|
|
1979
|
+
return l ? "******" : "";
|
|
1980
|
+
if (o.value !== "boolean" && (l == null || typeof l > "u"))
|
|
1981
1981
|
return "";
|
|
1982
1982
|
let y = "";
|
|
1983
1983
|
switch (o.value) {
|
|
1984
1984
|
case "string":
|
|
1985
|
-
y =
|
|
1985
|
+
y = l;
|
|
1986
1986
|
break;
|
|
1987
1987
|
case "date":
|
|
1988
1988
|
case "datetime":
|
|
1989
1989
|
if (!i.value)
|
|
1990
|
-
y =
|
|
1990
|
+
y = he(l, s.value);
|
|
1991
1991
|
else {
|
|
1992
1992
|
let S = t.dateRangeDelimiter;
|
|
1993
|
-
const
|
|
1993
|
+
const x = l.split(S);
|
|
1994
1994
|
let k = [];
|
|
1995
|
-
|
|
1996
|
-
k.push(
|
|
1995
|
+
x && x.length && x.forEach((_) => {
|
|
1996
|
+
k.push(he(_, s.value));
|
|
1997
1997
|
}), y = k.join(S);
|
|
1998
1998
|
}
|
|
1999
1999
|
break;
|
|
2000
2000
|
case "number":
|
|
2001
|
-
s.value =
|
|
2001
|
+
s.value = Wn(s.value, t.numberOptions), y = Hn(l, s.value, t.numberOptions, t.groupSeparator, t.decimalSeparator, t.amountExpression, t.decimalFilledSymbol);
|
|
2002
2002
|
break;
|
|
2003
2003
|
case "enum":
|
|
2004
|
-
y =
|
|
2004
|
+
y = An(l, t.enumConvertedDatas, t.enumDelimiter, t.textField, t.valueField);
|
|
2005
2005
|
break;
|
|
2006
2006
|
case "boolean":
|
|
2007
|
-
y =
|
|
2007
|
+
y = Rn(l);
|
|
2008
2008
|
break;
|
|
2009
2009
|
}
|
|
2010
2010
|
return y;
|
|
2011
2011
|
}
|
|
2012
2012
|
function f() {
|
|
2013
|
-
const
|
|
2014
|
-
Math.abs(
|
|
2013
|
+
const l = u.value;
|
|
2014
|
+
Math.abs(l.scrollWidth - l.clientWidth) > 2 || Math.abs(l.scrollHeight - l.clientHeight) > 2 ? d.value = w.value : d.value = "";
|
|
2015
2015
|
}
|
|
2016
|
-
return
|
|
2017
|
-
|
|
2018
|
-
}), () =>
|
|
2016
|
+
return Ye(() => t.modelValue, (l, y) => {
|
|
2017
|
+
l !== y && e.emit("update:modelValue", l);
|
|
2018
|
+
}), () => ye("span", {
|
|
2019
2019
|
class: m.value,
|
|
2020
2020
|
style: h.value,
|
|
2021
2021
|
ref: u,
|
|
@@ -2024,7 +2024,7 @@ const K = /* @__PURE__ */ he({
|
|
|
2024
2024
|
}, [w.value]);
|
|
2025
2025
|
}
|
|
2026
2026
|
});
|
|
2027
|
-
function
|
|
2027
|
+
function qn(t, e, n) {
|
|
2028
2028
|
var _;
|
|
2029
2029
|
function r() {
|
|
2030
2030
|
}
|
|
@@ -2032,7 +2032,7 @@ function Rn(t, e, n) {
|
|
|
2032
2032
|
function s() {
|
|
2033
2033
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function c() {
|
|
2036
2036
|
return !1;
|
|
2037
2037
|
}
|
|
2038
2038
|
function u() {
|
|
@@ -2046,12 +2046,12 @@ function Rn(t, e, n) {
|
|
|
2046
2046
|
return null;
|
|
2047
2047
|
if (b.value.schema && b.value.schema.type === "component")
|
|
2048
2048
|
return b.value;
|
|
2049
|
-
const
|
|
2050
|
-
return
|
|
2049
|
+
const v = M(b == null ? void 0 : b.value.parent), N = m(v);
|
|
2050
|
+
return N || null;
|
|
2051
2051
|
}
|
|
2052
2052
|
function h(b = e) {
|
|
2053
|
-
const { componentInstance:
|
|
2054
|
-
return !
|
|
2053
|
+
const { componentInstance: v, designerItemElementRef: N } = b;
|
|
2054
|
+
return !v || !v.value ? null : v.value.canMove ? N : h(b.parent);
|
|
2055
2055
|
}
|
|
2056
2056
|
function w(b) {
|
|
2057
2057
|
return !!n;
|
|
@@ -2061,28 +2061,28 @@ function Rn(t, e, n) {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
function f() {
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2064
|
+
function l(b, v) {
|
|
2065
2065
|
}
|
|
2066
|
-
function y(b) {
|
|
2066
|
+
function y(b, v) {
|
|
2067
2067
|
const { componentType: N } = b;
|
|
2068
|
-
let D = ee(N, b);
|
|
2069
|
-
const
|
|
2070
|
-
return D && !D.id && D.type === N && (D.id = `${
|
|
2068
|
+
let D = ee(N, b, v);
|
|
2069
|
+
const E = N.toLowerCase().replace("-", "_");
|
|
2070
|
+
return D && !D.id && D.type === N && (D.id = `${E}_${Math.random().toString().slice(2, 6)}`), D;
|
|
2071
2071
|
}
|
|
2072
|
-
function S(b,
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2075
|
-
let P = ee(
|
|
2076
|
-
const
|
|
2077
|
-
return P && !P.id && P.type ===
|
|
2072
|
+
function S(b, v) {
|
|
2073
|
+
const N = String(b.getAttribute("data-controltype")), D = b.getAttribute("data-feature"), E = D ? JSON.parse(D) : {};
|
|
2074
|
+
E.parentComponentInstance = o.value;
|
|
2075
|
+
let P = ee(N, E);
|
|
2076
|
+
const Y = N.toLowerCase().replace("-", "_");
|
|
2077
|
+
return P && !P.id && P.type === N && (P.id = `${Y}_${Math.random().toString().slice(2, 6)}`), P;
|
|
2078
2078
|
}
|
|
2079
|
-
function
|
|
2079
|
+
function x(b) {
|
|
2080
2080
|
}
|
|
2081
2081
|
function k(...b) {
|
|
2082
2082
|
}
|
|
2083
2083
|
return o.value = {
|
|
2084
2084
|
canMove: s(),
|
|
2085
|
-
canSelectParent:
|
|
2085
|
+
canSelectParent: c(),
|
|
2086
2086
|
canDelete: u(),
|
|
2087
2087
|
canNested: !d(),
|
|
2088
2088
|
contents: e == null ? void 0 : e.schema.contents,
|
|
@@ -2097,21 +2097,21 @@ function Rn(t, e, n) {
|
|
|
2097
2097
|
getDraggingDisplayText: g,
|
|
2098
2098
|
getPropConfig: k,
|
|
2099
2099
|
getDragScopeElement: f,
|
|
2100
|
-
onAcceptMovedChildElement:
|
|
2100
|
+
onAcceptMovedChildElement: l,
|
|
2101
2101
|
onAcceptNewChildElement: S,
|
|
2102
|
-
onChildElementMovedOut:
|
|
2102
|
+
onChildElementMovedOut: x,
|
|
2103
2103
|
addNewChildComponentSchema: y,
|
|
2104
2104
|
updateDragAndDropRules: r,
|
|
2105
2105
|
triggerBelongedComponentToMoveWhenMoved: M(!1),
|
|
2106
2106
|
triggerBelongedComponentToDeleteWhenDeleted: M(!1)
|
|
2107
2107
|
}, o;
|
|
2108
2108
|
}
|
|
2109
|
-
const
|
|
2109
|
+
const Bn = /* @__PURE__ */ ge({
|
|
2110
2110
|
name: "FTextDesign",
|
|
2111
2111
|
props: ne,
|
|
2112
2112
|
emits: ["update:modelValue"],
|
|
2113
2113
|
setup(t, e) {
|
|
2114
|
-
const n = M(!0), r = M(!0), a = M(""), i = M(0), o = M(0), s = M(t.modelValue),
|
|
2114
|
+
const n = M(!0), r = M(!0), a = M(""), i = M(0), o = M(0), s = M(t.modelValue), c = H(() => ({
|
|
2115
2115
|
"f-form-control-text": !n.value,
|
|
2116
2116
|
"f-form-context-textarea": n,
|
|
2117
2117
|
"f-component-text-auto-size": r.value
|
|
@@ -2122,29 +2122,29 @@ const qn = /* @__PURE__ */ he({
|
|
|
2122
2122
|
"max-height": !r.value && o.value > 0 ? `${o.value}px` : ""
|
|
2123
2123
|
}));
|
|
2124
2124
|
H(() => "");
|
|
2125
|
-
const d = M(), m =
|
|
2126
|
-
return
|
|
2125
|
+
const d = M(), m = Fe("design-item-context"), h = qn(d, m);
|
|
2126
|
+
return pe(() => {
|
|
2127
2127
|
d.value.componentInstance = h;
|
|
2128
|
-
}), e.expose(h.value), () =>
|
|
2128
|
+
}), e.expose(h.value), () => ye("span", {
|
|
2129
2129
|
ref: d,
|
|
2130
|
-
class:
|
|
2130
|
+
class: c.value,
|
|
2131
2131
|
style: u.value
|
|
2132
2132
|
}, [s.value]);
|
|
2133
2133
|
}
|
|
2134
|
-
}),
|
|
2134
|
+
}), zn = {
|
|
2135
2135
|
install(t) {
|
|
2136
2136
|
t.component(K.name, K);
|
|
2137
2137
|
},
|
|
2138
2138
|
register(t, e, n, r) {
|
|
2139
|
-
t.text = K, e.text =
|
|
2139
|
+
t.text = K, e.text = se;
|
|
2140
2140
|
},
|
|
2141
2141
|
registerDesigner(t, e, n) {
|
|
2142
|
-
t.text =
|
|
2142
|
+
t.text = Bn, e.text = se;
|
|
2143
2143
|
}
|
|
2144
2144
|
};
|
|
2145
2145
|
export {
|
|
2146
2146
|
K as FText,
|
|
2147
|
-
|
|
2148
|
-
|
|
2147
|
+
zn as default,
|
|
2148
|
+
se as propsResolver,
|
|
2149
2149
|
ne as textProps
|
|
2150
2150
|
};
|