@farris/ui-vue 1.3.1 → 1.3.4
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 +1175 -1280
- 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 +4658 -4555
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2891 -2994
- 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 +9912 -1191
- 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 +1595 -1725
- 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 +355 -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 +622 -633
- 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 +2079 -2178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3062 -3322
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10581 -3225
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +10182 -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 +1909 -2007
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6292 -6244
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5165 -5062
- 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.css +1 -1
- 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 +12607 -5080
- 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 +5002 -5272
- 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 +2128 -427
- 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 +2223 -2203
- 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 +399 -421
- 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 +2992 -3101
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2350 -2448
- 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 +46910 -42804
- 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 +2 -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 +18 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +28 -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/composition/use-general-editor.d.ts +26 -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/events-editor/src/composition/types.d.ts +1 -1
- 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 +90 -4
- package/types/query-solution/src/composition/use-condition.d.ts +19 -0
- 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 +18 -16
- package/types/query-solution/src/designer/query-solution-config/converter/query-solution-config-property.converter.d.ts +4 -0
- 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/index.d.ts +15 -0
- package/types/section/src/designer/section-header.design.component.d.ts +4 -0
- package/types/section/src/designer/section-toolbar-item.props.d.ts +19 -0
- package/types/section/src/designer/section-toolbar.design.component.d.ts +3 -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
|
@@ -3,11 +3,15 @@ var Ee = (t, e, n) => e in t ? _e(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var G = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { defineComponent as he, ref as D, computed as j, onMounted as ge, watch as Ye, createVNode as pe, inject as Fe } from "vue";
|
|
5
5
|
import { isPlainObject as ie, cloneDeep as We } from "lodash-es";
|
|
6
|
-
import
|
|
6
|
+
import N from "bignumber.js";
|
|
7
7
|
const ye = {}, we = {};
|
|
8
8
|
function ee(t) {
|
|
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
|
|
10
|
-
|
|
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 ? ee(e[s]) : We(e[s].default)), o), {});
|
|
10
|
+
if (n && (!a || !r.find((o) => o === "id"))) {
|
|
11
|
+
const o = n.toLowerCase().replace(/-/g, "_");
|
|
12
|
+
i.id = `${o}_${Math.random().toString().slice(2, 6)}`;
|
|
13
|
+
}
|
|
14
|
+
return i;
|
|
11
15
|
}
|
|
12
16
|
function be(t, e = {}, n) {
|
|
13
17
|
const r = ye[t];
|
|
@@ -20,7 +24,7 @@ function be(t, e = {}, n) {
|
|
|
20
24
|
}
|
|
21
25
|
function Ae(t, e) {
|
|
22
26
|
const n = ee(e);
|
|
23
|
-
return Object.keys(
|
|
27
|
+
return Object.keys(n).reduce((r, a) => (r[a] && ie(r[a]) && ie(t[a] || !t[a]) ? Object.assign(r[a], t[a] || {}) : r[a] = t[a], r), n), n;
|
|
24
28
|
}
|
|
25
29
|
function $e(t, e) {
|
|
26
30
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, a) => {
|
|
@@ -46,12 +50,12 @@ function He(t = {}) {
|
|
|
46
50
|
if (typeof m == "number")
|
|
47
51
|
return h[u].length === m;
|
|
48
52
|
if (typeof m == "object") {
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
53
|
+
const b = Object.keys(m)[0], g = m[b];
|
|
54
|
+
if (b === "not")
|
|
51
55
|
return Number(h[u].length) !== Number(g);
|
|
52
|
-
if (
|
|
56
|
+
if (b === "moreThan")
|
|
53
57
|
return Number(h[u].length) >= Number(g);
|
|
54
|
-
if (
|
|
58
|
+
if (b === "lessThan")
|
|
55
59
|
return Number(h[u].length) <= Number(g);
|
|
56
60
|
}
|
|
57
61
|
return !1;
|
|
@@ -69,14 +73,14 @@ function He(t = {}) {
|
|
|
69
73
|
return typeof d == "number" ? [{ target: m, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: m, operator: "getProperty", param: u, value: !!d }] : typeof d == "object" ? Object.keys(d).map((h) => {
|
|
70
74
|
if (h === "length")
|
|
71
75
|
return { target: m, operator: "length", param: null, value: d[h] };
|
|
72
|
-
const
|
|
73
|
-
return { target: m, operator: "getProperty", param:
|
|
76
|
+
const b = h, g = d[h];
|
|
77
|
+
return { target: m, operator: "getProperty", param: b, value: g };
|
|
74
78
|
}) : [];
|
|
75
79
|
}
|
|
76
80
|
function i(u) {
|
|
77
81
|
return Object.keys(u).reduce((m, h) => {
|
|
78
|
-
const
|
|
79
|
-
return m.push(...
|
|
82
|
+
const b = a(h, u[h]);
|
|
83
|
+
return m.push(...b), m;
|
|
80
84
|
}, []);
|
|
81
85
|
}
|
|
82
86
|
function o(u, d) {
|
|
@@ -87,18 +91,18 @@ function He(t = {}) {
|
|
|
87
91
|
return !1;
|
|
88
92
|
}
|
|
89
93
|
function s(u, d) {
|
|
90
|
-
return i(u).reduce((
|
|
94
|
+
return i(u).reduce((b, g) => b && o(g, d), !0);
|
|
91
95
|
}
|
|
92
96
|
function c(u, d) {
|
|
93
|
-
const m = Object.keys(u), h = m.includes("allOf"),
|
|
94
|
-
return h ? !
|
|
97
|
+
const m = Object.keys(u), h = m.includes("allOf"), b = m.includes("anyOf"), g = h || b, w = (g ? u[g ? h ? "allOf" : "anyOf" : "allOf"] : [u]).map((O) => s(O, d));
|
|
98
|
+
return h ? !w.includes(!1) : w.includes(!0);
|
|
95
99
|
}
|
|
96
100
|
return { parseValueSchema: c };
|
|
97
101
|
}
|
|
98
|
-
const
|
|
102
|
+
const Re = {}, qe = {};
|
|
99
103
|
He();
|
|
100
|
-
function
|
|
101
|
-
return ye[e.title] = e, we[e.title] = r,
|
|
104
|
+
function Ce(t, e, n = /* @__PURE__ */ new Map(), r = (o, s, c, u) => s, a = {}, i = (o) => o) {
|
|
105
|
+
return ye[e.title] = e, we[e.title] = r, Re[e.title] = a, qe[e.title] = i, (o = {}) => {
|
|
102
106
|
const s = je(o, e, n), c = Object.keys(t).reduce((u, d) => (u[d] = t[d].default, u), {});
|
|
103
107
|
return Object.assign(c, s);
|
|
104
108
|
};
|
|
@@ -253,7 +257,7 @@ const Qe = "text", Xe = "A Farris Component", ze = "object", Ge = {
|
|
|
253
257
|
dateRangeDelimiter: { type: String, default: "~" },
|
|
254
258
|
// 枚举项的分隔符
|
|
255
259
|
enumDelimiter: { type: String, default: "," }
|
|
256
|
-
}, oe =
|
|
260
|
+
}, oe = Ce(te, 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
261
|
class De {
|
|
258
262
|
constructor() {
|
|
259
263
|
G(this, "regexes", {
|
|
@@ -376,28 +380,28 @@ class De {
|
|
|
376
380
|
return e == null ? Date.now() : e instanceof Date ? e : this.parse(e);
|
|
377
381
|
}
|
|
378
382
|
}
|
|
379
|
-
function
|
|
383
|
+
function S(t) {
|
|
380
384
|
const e = Object.prototype.toString.call(t);
|
|
381
385
|
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
386
|
}
|
|
383
387
|
function W(t, e) {
|
|
384
388
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
385
389
|
}
|
|
386
|
-
const Me = 6048e5, ot = 864e5,
|
|
390
|
+
const Me = 6048e5, ot = 864e5, ve = 6e4, Ne = 36e5;
|
|
387
391
|
let st = {};
|
|
388
392
|
function Q() {
|
|
389
393
|
return st;
|
|
390
394
|
}
|
|
391
|
-
function
|
|
395
|
+
function C(t, e) {
|
|
392
396
|
var s, c, u, d;
|
|
393
|
-
const n = Q(), 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 =
|
|
397
|
+
const n = Q(), 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 = S(t), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
|
|
394
398
|
return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
|
|
395
399
|
}
|
|
396
400
|
function U(t) {
|
|
397
|
-
return
|
|
401
|
+
return C(t, { weekStartsOn: 1 });
|
|
398
402
|
}
|
|
399
403
|
function Oe(t) {
|
|
400
|
-
const e =
|
|
404
|
+
const e = S(t), n = e.getFullYear(), r = W(t, 0);
|
|
401
405
|
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
402
406
|
const a = U(r), i = W(t, 0);
|
|
403
407
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
@@ -405,11 +409,11 @@ function Oe(t) {
|
|
|
405
409
|
return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= o.getTime() ? n : n - 1;
|
|
406
410
|
}
|
|
407
411
|
function se(t) {
|
|
408
|
-
const e =
|
|
412
|
+
const e = S(t);
|
|
409
413
|
return e.setHours(0, 0, 0, 0), e;
|
|
410
414
|
}
|
|
411
415
|
function ue(t) {
|
|
412
|
-
const e =
|
|
416
|
+
const e = S(t), n = new Date(
|
|
413
417
|
Date.UTC(
|
|
414
418
|
e.getFullYear(),
|
|
415
419
|
e.getMonth(),
|
|
@@ -433,14 +437,14 @@ function ct(t) {
|
|
|
433
437
|
function lt(t) {
|
|
434
438
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
435
439
|
}
|
|
436
|
-
function
|
|
440
|
+
function Te(t) {
|
|
437
441
|
if (!lt(t) && typeof t != "number")
|
|
438
442
|
return !1;
|
|
439
|
-
const e =
|
|
443
|
+
const e = S(t);
|
|
440
444
|
return !isNaN(Number(e));
|
|
441
445
|
}
|
|
442
446
|
function ft(t) {
|
|
443
|
-
const e =
|
|
447
|
+
const e = S(t), n = W(t, 0);
|
|
444
448
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
445
449
|
}
|
|
446
450
|
const dt = {
|
|
@@ -575,7 +579,7 @@ const Dt = {
|
|
|
575
579
|
narrow: ["1", "2", "3", "4"],
|
|
576
580
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
577
581
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
578
|
-
},
|
|
582
|
+
}, vt = {
|
|
579
583
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
580
584
|
abbreviated: [
|
|
581
585
|
"Jan",
|
|
@@ -605,7 +609,7 @@ const Dt = {
|
|
|
605
609
|
"November",
|
|
606
610
|
"December"
|
|
607
611
|
]
|
|
608
|
-
},
|
|
612
|
+
}, Nt = {
|
|
609
613
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
610
614
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
611
615
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -649,7 +653,7 @@ const Dt = {
|
|
|
649
653
|
evening: "evening",
|
|
650
654
|
night: "night"
|
|
651
655
|
}
|
|
652
|
-
},
|
|
656
|
+
}, Tt = {
|
|
653
657
|
narrow: {
|
|
654
658
|
am: "a",
|
|
655
659
|
pm: "p",
|
|
@@ -680,7 +684,7 @@ const Dt = {
|
|
|
680
684
|
evening: "in the evening",
|
|
681
685
|
night: "at night"
|
|
682
686
|
}
|
|
683
|
-
},
|
|
687
|
+
}, xt = (t, e) => {
|
|
684
688
|
const n = Number(t), r = n % 100;
|
|
685
689
|
if (r > 20 || r < 10)
|
|
686
690
|
switch (r % 10) {
|
|
@@ -692,8 +696,8 @@ const Dt = {
|
|
|
692
696
|
return n + "rd";
|
|
693
697
|
}
|
|
694
698
|
return n + "th";
|
|
695
|
-
},
|
|
696
|
-
ordinalNumber:
|
|
699
|
+
}, St = {
|
|
700
|
+
ordinalNumber: xt,
|
|
697
701
|
era: H({
|
|
698
702
|
values: Dt,
|
|
699
703
|
defaultWidth: "wide"
|
|
@@ -704,28 +708,28 @@ const Dt = {
|
|
|
704
708
|
argumentCallback: (t) => t - 1
|
|
705
709
|
}),
|
|
706
710
|
month: H({
|
|
707
|
-
values:
|
|
711
|
+
values: vt,
|
|
708
712
|
defaultWidth: "wide"
|
|
709
713
|
}),
|
|
710
714
|
day: H({
|
|
711
|
-
values:
|
|
715
|
+
values: Nt,
|
|
712
716
|
defaultWidth: "wide"
|
|
713
717
|
}),
|
|
714
718
|
dayPeriod: H({
|
|
715
719
|
values: Ot,
|
|
716
720
|
defaultWidth: "wide",
|
|
717
|
-
formattingValues:
|
|
721
|
+
formattingValues: Tt,
|
|
718
722
|
defaultFormattingWidth: "wide"
|
|
719
723
|
})
|
|
720
724
|
};
|
|
721
|
-
function
|
|
725
|
+
function R(t) {
|
|
722
726
|
return (e, n = {}) => {
|
|
723
727
|
const r = n.width, a = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], i = e.match(a);
|
|
724
728
|
if (!i)
|
|
725
729
|
return null;
|
|
726
730
|
const o = i[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], c = Array.isArray(s) ? kt(s, (m) => m.test(o)) : (
|
|
727
731
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
728
|
-
|
|
732
|
+
Pt(s, (m) => m.test(o))
|
|
729
733
|
);
|
|
730
734
|
let u;
|
|
731
735
|
u = t.valueCallback ? t.valueCallback(c) : c, u = n.valueCallback ? (
|
|
@@ -736,7 +740,7 @@ function C(t) {
|
|
|
736
740
|
return { value: u, rest: d };
|
|
737
741
|
};
|
|
738
742
|
}
|
|
739
|
-
function
|
|
743
|
+
function Pt(t, e) {
|
|
740
744
|
for (const n in t)
|
|
741
745
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
742
746
|
return n;
|
|
@@ -803,15 +807,15 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
803
807
|
/^n/i,
|
|
804
808
|
/^d/i
|
|
805
809
|
]
|
|
806
|
-
},
|
|
810
|
+
}, Rt = {
|
|
807
811
|
narrow: /^[smtwf]/i,
|
|
808
812
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
809
813
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
810
814
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
811
|
-
},
|
|
815
|
+
}, qt = {
|
|
812
816
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
813
817
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
814
|
-
},
|
|
818
|
+
}, Ct = {
|
|
815
819
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
816
820
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
817
821
|
}, Bt = {
|
|
@@ -831,33 +835,33 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
831
835
|
parsePattern: Yt,
|
|
832
836
|
valueCallback: (t) => parseInt(t, 10)
|
|
833
837
|
}),
|
|
834
|
-
era:
|
|
838
|
+
era: R({
|
|
835
839
|
matchPatterns: Ft,
|
|
836
840
|
defaultMatchWidth: "wide",
|
|
837
841
|
parsePatterns: Wt,
|
|
838
842
|
defaultParseWidth: "any"
|
|
839
843
|
}),
|
|
840
|
-
quarter:
|
|
844
|
+
quarter: R({
|
|
841
845
|
matchPatterns: At,
|
|
842
846
|
defaultMatchWidth: "wide",
|
|
843
847
|
parsePatterns: $t,
|
|
844
848
|
defaultParseWidth: "any",
|
|
845
849
|
valueCallback: (t) => t + 1
|
|
846
850
|
}),
|
|
847
|
-
month:
|
|
851
|
+
month: R({
|
|
848
852
|
matchPatterns: jt,
|
|
849
853
|
defaultMatchWidth: "wide",
|
|
850
854
|
parsePatterns: Ht,
|
|
851
855
|
defaultParseWidth: "any"
|
|
852
856
|
}),
|
|
853
|
-
day:
|
|
854
|
-
matchPatterns:
|
|
857
|
+
day: R({
|
|
858
|
+
matchPatterns: Rt,
|
|
855
859
|
defaultMatchWidth: "wide",
|
|
856
|
-
parsePatterns:
|
|
860
|
+
parsePatterns: qt,
|
|
857
861
|
defaultParseWidth: "any"
|
|
858
862
|
}),
|
|
859
|
-
dayPeriod:
|
|
860
|
-
matchPatterns:
|
|
863
|
+
dayPeriod: R({
|
|
864
|
+
matchPatterns: Ct,
|
|
861
865
|
defaultMatchWidth: "any",
|
|
862
866
|
parsePatterns: Bt,
|
|
863
867
|
defaultParseWidth: "any"
|
|
@@ -867,7 +871,7 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
867
871
|
formatDistance: mt,
|
|
868
872
|
formatLong: yt,
|
|
869
873
|
formatRelative: bt,
|
|
870
|
-
localize:
|
|
874
|
+
localize: St,
|
|
871
875
|
match: Lt,
|
|
872
876
|
options: {
|
|
873
877
|
weekStartsOn: 0,
|
|
@@ -875,29 +879,29 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
875
879
|
}
|
|
876
880
|
};
|
|
877
881
|
function Qt(t) {
|
|
878
|
-
const e =
|
|
882
|
+
const e = S(t);
|
|
879
883
|
return ut(e, ft(e)) + 1;
|
|
880
884
|
}
|
|
881
885
|
function Xt(t) {
|
|
882
|
-
const e =
|
|
886
|
+
const e = S(t), n = +U(e) - +ct(e);
|
|
883
887
|
return Math.round(n / Me) + 1;
|
|
884
888
|
}
|
|
885
|
-
function
|
|
886
|
-
var d, m, h,
|
|
887
|
-
const n =
|
|
889
|
+
function xe(t, e) {
|
|
890
|
+
var d, m, h, b;
|
|
891
|
+
const n = S(t), r = n.getFullYear(), a = Q(), 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 ?? ((b = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : b.firstWeekContainsDate) ?? 1, o = W(t, 0);
|
|
888
892
|
o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
|
|
889
|
-
const s =
|
|
893
|
+
const s = C(o, e), c = W(t, 0);
|
|
890
894
|
c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
|
|
891
|
-
const u =
|
|
895
|
+
const u = C(c, e);
|
|
892
896
|
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
|
|
893
897
|
}
|
|
894
898
|
function zt(t, e) {
|
|
895
899
|
var s, c, u, d;
|
|
896
|
-
const n = Q(), 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 =
|
|
897
|
-
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0),
|
|
900
|
+
const n = Q(), 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 = xe(t, e), i = W(t, 0);
|
|
901
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), C(i, e);
|
|
898
902
|
}
|
|
899
903
|
function Gt(t, e) {
|
|
900
|
-
const n =
|
|
904
|
+
const n = S(t), r = +C(n, e) - +zt(n, e);
|
|
901
905
|
return Math.round(r / Me) + 1;
|
|
902
906
|
}
|
|
903
907
|
function p(t, e) {
|
|
@@ -993,7 +997,7 @@ const _ = {
|
|
|
993
997
|
},
|
|
994
998
|
// Local week-numbering year
|
|
995
999
|
Y: function(t, e, n, r) {
|
|
996
|
-
const a =
|
|
1000
|
+
const a = xe(t, r), i = a > 0 ? a : 1 - a;
|
|
997
1001
|
if (e === "YY") {
|
|
998
1002
|
const o = i % 100;
|
|
999
1003
|
return p(o, 2);
|
|
@@ -1478,7 +1482,7 @@ const de = (t, e) => {
|
|
|
1478
1482
|
default:
|
|
1479
1483
|
return e.date({ width: "full" });
|
|
1480
1484
|
}
|
|
1481
|
-
},
|
|
1485
|
+
}, Se = (t, e) => {
|
|
1482
1486
|
switch (t) {
|
|
1483
1487
|
case "p":
|
|
1484
1488
|
return e.time({ width: "short" });
|
|
@@ -1510,9 +1514,9 @@ const de = (t, e) => {
|
|
|
1510
1514
|
i = e.dateTime({ width: "full" });
|
|
1511
1515
|
break;
|
|
1512
1516
|
}
|
|
1513
|
-
return i.replace("{{date}}", de(r, e)).replace("{{time}}",
|
|
1517
|
+
return i.replace("{{date}}", de(r, e)).replace("{{time}}", Se(a, e));
|
|
1514
1518
|
}, Zt = {
|
|
1515
|
-
p:
|
|
1519
|
+
p: Se,
|
|
1516
1520
|
P: Vt
|
|
1517
1521
|
}, Jt = /^D+$/, It = /^Y+$/, Kt = ["D", "DD", "YY", "YYYY"];
|
|
1518
1522
|
function en(t) {
|
|
@@ -1531,9 +1535,9 @@ function rn(t, e, n) {
|
|
|
1531
1535
|
}
|
|
1532
1536
|
const an = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, on = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, sn = /^'([^]*?)'?$/, un = /''/g, cn = /[a-zA-Z]/;
|
|
1533
1537
|
function B(t, e, n) {
|
|
1534
|
-
var d, m, h,
|
|
1535
|
-
const r = Q(), 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 ?? ((
|
|
1536
|
-
if (!
|
|
1538
|
+
var d, m, h, b;
|
|
1539
|
+
const r = Q(), 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 ?? ((b = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : b.weekStartsOn) ?? 0, s = S(t);
|
|
1540
|
+
if (!Te(s))
|
|
1537
1541
|
throw new RangeError("Invalid time value");
|
|
1538
1542
|
let c = e.match(on).map((g) => {
|
|
1539
1543
|
const f = g[0];
|
|
@@ -1639,22 +1643,22 @@ function pn(t, e) {
|
|
|
1639
1643
|
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
1640
1644
|
const n = t.match(fn);
|
|
1641
1645
|
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
1642
|
-
const r = !!n[4], a =
|
|
1646
|
+
const r = !!n[4], a = q(n[1]), i = q(n[2]) - 1, o = q(n[3]), s = q(n[4]), c = q(n[5]) - 1;
|
|
1643
1647
|
if (r)
|
|
1644
|
-
return
|
|
1648
|
+
return Nn(e, s, c) ? bn(e, s, c) : /* @__PURE__ */ new Date(NaN);
|
|
1645
1649
|
{
|
|
1646
1650
|
const u = /* @__PURE__ */ new Date(0);
|
|
1647
|
-
return !Mn(e, i, o) || !
|
|
1651
|
+
return !Mn(e, i, o) || !vn(e, a) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, i, Math.max(a, o)), u);
|
|
1648
1652
|
}
|
|
1649
1653
|
}
|
|
1650
|
-
function
|
|
1654
|
+
function q(t) {
|
|
1651
1655
|
return t ? parseInt(t) : 1;
|
|
1652
1656
|
}
|
|
1653
1657
|
function yn(t) {
|
|
1654
1658
|
const e = t.match(dn);
|
|
1655
1659
|
if (!e) return NaN;
|
|
1656
1660
|
const n = J(e[1]), r = J(e[2]), a = J(e[3]);
|
|
1657
|
-
return On(n, r, a) ? n *
|
|
1661
|
+
return On(n, r, a) ? n * Ne + r * ve + a * 1e3 : NaN;
|
|
1658
1662
|
}
|
|
1659
1663
|
function J(t) {
|
|
1660
1664
|
return t && parseFloat(t.replace(",", ".")) || 0;
|
|
@@ -1664,7 +1668,7 @@ function wn(t) {
|
|
|
1664
1668
|
const e = t.match(mn);
|
|
1665
1669
|
if (!e) return 0;
|
|
1666
1670
|
const n = e[1] === "+" ? -1 : 1, r = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
|
|
1667
|
-
return
|
|
1671
|
+
return Tn(r, a) ? n * (r * Ne + a * ve) : NaN;
|
|
1668
1672
|
}
|
|
1669
1673
|
function bn(t, e, n) {
|
|
1670
1674
|
const r = /* @__PURE__ */ new Date(0);
|
|
@@ -1673,25 +1677,25 @@ function bn(t, e, n) {
|
|
|
1673
1677
|
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
1674
1678
|
}
|
|
1675
1679
|
const Dn = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1676
|
-
function
|
|
1680
|
+
function Pe(t) {
|
|
1677
1681
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1678
1682
|
}
|
|
1679
1683
|
function Mn(t, e, n) {
|
|
1680
|
-
return e >= 0 && e <= 11 && n >= 1 && n <= (Dn[e] || (
|
|
1684
|
+
return e >= 0 && e <= 11 && n >= 1 && n <= (Dn[e] || (Pe(t) ? 29 : 28));
|
|
1681
1685
|
}
|
|
1682
|
-
function
|
|
1683
|
-
return e >= 1 && e <= (
|
|
1686
|
+
function vn(t, e) {
|
|
1687
|
+
return e >= 1 && e <= (Pe(t) ? 366 : 365);
|
|
1684
1688
|
}
|
|
1685
|
-
function
|
|
1689
|
+
function Nn(t, e, n) {
|
|
1686
1690
|
return e >= 1 && e <= 53 && n >= 0 && n <= 6;
|
|
1687
1691
|
}
|
|
1688
1692
|
function On(t, e, n) {
|
|
1689
1693
|
return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
|
|
1690
1694
|
}
|
|
1691
|
-
function
|
|
1695
|
+
function Tn(t, e) {
|
|
1692
1696
|
return e >= 0 && e <= 59;
|
|
1693
1697
|
}
|
|
1694
|
-
function
|
|
1698
|
+
function xn() {
|
|
1695
1699
|
const t = new De();
|
|
1696
1700
|
function e(n, r) {
|
|
1697
1701
|
var i;
|
|
@@ -1700,7 +1704,7 @@ function Tn() {
|
|
|
1700
1704
|
if (n instanceof Date)
|
|
1701
1705
|
return B(n, r);
|
|
1702
1706
|
let a = Z(n);
|
|
1703
|
-
if (a == "Invalid Date" && (a = t.create(n) || new Date(n)),
|
|
1707
|
+
if (a == "Invalid Date" && (a = t.create(n) || new Date(n)), Te(a))
|
|
1704
1708
|
return a = Z(B(a, "yyyy-MM-dd HH:mm:ss")), B(a, r);
|
|
1705
1709
|
if (r.indexOf("HH") === 0 || r.indexOf("hh") === 0) {
|
|
1706
1710
|
const o = (i = n.match(/\d*/g)) == null ? void 0 : i.filter((c) => c !== "").join(":");
|
|
@@ -1714,91 +1718,91 @@ function Tn() {
|
|
|
1714
1718
|
formatTo: e
|
|
1715
1719
|
};
|
|
1716
1720
|
}
|
|
1717
|
-
function
|
|
1721
|
+
function Sn() {
|
|
1718
1722
|
function t(f, l = null) {
|
|
1719
|
-
return Array.isArray(f) ?
|
|
1723
|
+
return Array.isArray(f) ? N.max.apply(null, f).toFixed() : f && l ? N.maximum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1720
1724
|
}
|
|
1721
1725
|
function e(f, l = null) {
|
|
1722
|
-
return Array.isArray(f) ?
|
|
1726
|
+
return Array.isArray(f) ? N.min.apply(null, f).toFixed() : f && l ? N.minimum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1723
1727
|
}
|
|
1724
1728
|
function n(f) {
|
|
1725
|
-
return
|
|
1729
|
+
return N.sum.apply(null, f).toFixed();
|
|
1726
1730
|
}
|
|
1727
1731
|
function r(f, l) {
|
|
1728
|
-
return new
|
|
1732
|
+
return new N(f).div(l).toFixed();
|
|
1729
1733
|
}
|
|
1730
1734
|
function a(f, l) {
|
|
1731
|
-
return new
|
|
1735
|
+
return new N(f).plus(l).toFixed();
|
|
1732
1736
|
}
|
|
1733
1737
|
function i(f, l) {
|
|
1734
|
-
return new
|
|
1738
|
+
return new N(f).times(l).toFixed();
|
|
1735
1739
|
}
|
|
1736
1740
|
function o(f, l) {
|
|
1737
|
-
return new
|
|
1741
|
+
return new N(f).minus(l).toFixed();
|
|
1738
1742
|
}
|
|
1739
1743
|
function s(f, l) {
|
|
1740
|
-
return new
|
|
1744
|
+
return new N(f).eq(l);
|
|
1741
1745
|
}
|
|
1742
1746
|
function c(f, l) {
|
|
1743
|
-
return new
|
|
1747
|
+
return new N(f).lt(l);
|
|
1744
1748
|
}
|
|
1745
1749
|
function u(f, l) {
|
|
1746
|
-
return new
|
|
1750
|
+
return new N(f).gt(l);
|
|
1747
1751
|
}
|
|
1748
1752
|
function d(f) {
|
|
1749
|
-
return new
|
|
1753
|
+
return new N(f).toNumber();
|
|
1750
1754
|
}
|
|
1751
1755
|
function m(f, l = 0) {
|
|
1752
|
-
return new
|
|
1756
|
+
return new N(f).toFixed(l);
|
|
1753
1757
|
}
|
|
1754
1758
|
function h(f) {
|
|
1755
|
-
const l =
|
|
1756
|
-
let
|
|
1757
|
-
if (f
|
|
1759
|
+
const l = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], w = ["", "拾", "佰", "仟"], P = ["", "万", "亿", "兆"], O = ["角", "分", "毫", "厘"], k = "整", y = "元";
|
|
1760
|
+
let M, v, x = "", X;
|
|
1761
|
+
if (f === "")
|
|
1758
1762
|
return "";
|
|
1759
1763
|
const z = parseFloat(f);
|
|
1760
|
-
if (z >=
|
|
1764
|
+
if (z >= 1e15)
|
|
1761
1765
|
return "";
|
|
1762
1766
|
if (z === 0)
|
|
1763
|
-
return
|
|
1764
|
-
if (f = z.toString(), f.indexOf(".") === -1 ? (
|
|
1767
|
+
return x = l[0] + y + k, x;
|
|
1768
|
+
if (f = z.toString(), f.indexOf(".") === -1 ? (M = f, v = "") : (X = f.split("."), M = X[0], v = X[1].substr(0, 4)), parseInt(M, 10) > 0) {
|
|
1765
1769
|
let A = 0;
|
|
1766
|
-
const E =
|
|
1770
|
+
const E = M.length;
|
|
1767
1771
|
for (let Y = 0; Y < E; Y++) {
|
|
1768
|
-
const ne =
|
|
1769
|
-
ne
|
|
1772
|
+
const ne = M.substr(Y, 1), re = E - Y - 1, ke = re / 4, ae = re % 4;
|
|
1773
|
+
ne === "0" ? A++ : (A > 0 && (x += l[0]), A = 0, x += l[parseInt(ne, 10)] + w[ae]), ae === 0 && A < 4 && (x += P[ke]);
|
|
1770
1774
|
}
|
|
1771
|
-
|
|
1775
|
+
x += y;
|
|
1772
1776
|
}
|
|
1773
|
-
if (
|
|
1774
|
-
const A =
|
|
1777
|
+
if (v !== "") {
|
|
1778
|
+
const A = v.length;
|
|
1775
1779
|
for (let E = 0; E < A; E++) {
|
|
1776
|
-
|
|
1777
|
-
Y !== "0" && (
|
|
1780
|
+
const Y = v.substr(E, 1);
|
|
1781
|
+
Y !== "0" && (x += l[Number(Y)] + O[E]);
|
|
1778
1782
|
}
|
|
1779
1783
|
}
|
|
1780
|
-
return
|
|
1784
|
+
return x === "" ? x += l[0] + y + k : v === "" && (x += k), x;
|
|
1781
1785
|
}
|
|
1782
|
-
function
|
|
1783
|
-
|
|
1784
|
-
return l && (l.prefix && (
|
|
1786
|
+
function b(f, l) {
|
|
1787
|
+
let w = f == null || typeof f == "number" && isNaN(f) ? "" : String(f);
|
|
1788
|
+
return l && (l.prefix && (w = w.replace(new RegExp(l.prefix, "g"), "")), l.suffix && (w = w.replace(new RegExp(l.suffix, "g"), "")), w = w.replace(/\\,/g, "")), w;
|
|
1785
1789
|
}
|
|
1786
1790
|
function g(f, l) {
|
|
1787
|
-
const
|
|
1791
|
+
const w = new N(f), P = {
|
|
1788
1792
|
prefix: l.prefix || "",
|
|
1789
1793
|
suffix: l.suffix || "",
|
|
1790
1794
|
decimalSeparator: l.decimalSeparator || ".",
|
|
1791
1795
|
groupSeparator: l.groupSeparator || "",
|
|
1792
1796
|
groupSize: 3
|
|
1793
1797
|
};
|
|
1794
|
-
if (
|
|
1798
|
+
if (w.isNaN())
|
|
1795
1799
|
return "";
|
|
1796
|
-
let
|
|
1797
|
-
return
|
|
1800
|
+
let O = l.precision || 0;
|
|
1801
|
+
return O = Number(O), w.toFormat(O, P);
|
|
1798
1802
|
}
|
|
1799
1803
|
return {
|
|
1800
1804
|
formatTo: g,
|
|
1801
|
-
removeFormat:
|
|
1805
|
+
removeFormat: b,
|
|
1802
1806
|
convertCurrency: h,
|
|
1803
1807
|
toFixed: m,
|
|
1804
1808
|
toNumber: d,
|
|
@@ -1814,7 +1818,7 @@ function Pn() {
|
|
|
1814
1818
|
max: t
|
|
1815
1819
|
};
|
|
1816
1820
|
}
|
|
1817
|
-
const
|
|
1821
|
+
const Pn = ["秒", "分钟", "小时", "天", "周", "个月", "年"], I = [
|
|
1818
1822
|
60,
|
|
1819
1823
|
// 60 seconds in 1 min
|
|
1820
1824
|
60,
|
|
@@ -1831,15 +1835,16 @@ const Sn = ["秒", "分钟", "小时", "天", "周", "个月", "年"], I = [
|
|
|
1831
1835
|
function kn() {
|
|
1832
1836
|
const t = new De();
|
|
1833
1837
|
function e(o, s) {
|
|
1834
|
-
if (s === 0)
|
|
1835
|
-
|
|
1838
|
+
if (s === 0)
|
|
1839
|
+
return ["刚刚", "片刻后"];
|
|
1840
|
+
const c = Pn[~~(s / 2)];
|
|
1836
1841
|
return [`${o} ${c}前`, `${o} ${c}后`];
|
|
1837
1842
|
}
|
|
1838
1843
|
function n(o) {
|
|
1839
1844
|
if (typeof o == "object")
|
|
1840
1845
|
return o;
|
|
1841
1846
|
{
|
|
1842
|
-
|
|
1847
|
+
const s = t.create(o);
|
|
1843
1848
|
return typeof s == "object" ? s : /* @__PURE__ */ new Date();
|
|
1844
1849
|
}
|
|
1845
1850
|
}
|
|
@@ -1900,7 +1905,7 @@ function Wn(t, e, n, r, a) {
|
|
|
1900
1905
|
}
|
|
1901
1906
|
function me(t, e) {
|
|
1902
1907
|
let n;
|
|
1903
|
-
return e || (e = "YYYY-MM-DD"), e === "timeago" ? kn().formatTo(t) : (e === "hh:mm:ss" || e === "HH:mm:ss" ? n = t : n =
|
|
1908
|
+
return e || (e = "YYYY-MM-DD"), e === "timeago" ? kn().formatTo(t) : (e === "hh:mm:ss" || e === "HH:mm:ss" ? n = t : n = xn().formatTo(t, Fn(e)), n);
|
|
1904
1909
|
}
|
|
1905
1910
|
function An(t, e) {
|
|
1906
1911
|
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;
|
|
@@ -1914,7 +1919,7 @@ function jn(t, e, n) {
|
|
|
1914
1919
|
function Hn(t, e) {
|
|
1915
1920
|
return Number(t * 100).toFixed(Number(e)) + "%";
|
|
1916
1921
|
}
|
|
1917
|
-
function
|
|
1922
|
+
function Rn(t, e, n, r, a, i, o) {
|
|
1918
1923
|
if (!e && !n)
|
|
1919
1924
|
return t.toString();
|
|
1920
1925
|
if (n && n.type && n.type === "number" && n.formatter)
|
|
@@ -1926,7 +1931,7 @@ function Cn(t, e, n, r, a, i, o) {
|
|
|
1926
1931
|
return;
|
|
1927
1932
|
}
|
|
1928
1933
|
r && Object.assign(u, { groupSeparator: r }), a && Object.assign(u, { decimalSeparator: a }), i && Object.assign(u, { format: i });
|
|
1929
|
-
const { formatTo: m } =
|
|
1934
|
+
const { formatTo: m } = Sn();
|
|
1930
1935
|
switch (s) {
|
|
1931
1936
|
case "C":
|
|
1932
1937
|
Object.assign(u, { prefix: "¥", precision: c }), d = m(t, u);
|
|
@@ -1946,7 +1951,7 @@ function Cn(t, e, n, r, a, i, o) {
|
|
|
1946
1951
|
}
|
|
1947
1952
|
return d;
|
|
1948
1953
|
}
|
|
1949
|
-
function
|
|
1954
|
+
function qn(t) {
|
|
1950
1955
|
return t === !0 ? "是" : t === !1 || t == null || t === "" || typeof t > "u" ? "否" : t;
|
|
1951
1956
|
}
|
|
1952
1957
|
const K = /* @__PURE__ */ he({
|
|
@@ -1970,133 +1975,138 @@ const K = /* @__PURE__ */ he({
|
|
|
1970
1975
|
u.value.parentElement.className = l + " f-cmp-text-is-textarea";
|
|
1971
1976
|
}
|
|
1972
1977
|
});
|
|
1973
|
-
|
|
1974
|
-
let l = g(t.modelValue);
|
|
1975
|
-
return c.value != l && (e.emit("valueChange", l), c.value = l), l;
|
|
1976
|
-
});
|
|
1977
|
-
function g(l) {
|
|
1978
|
+
function b(l) {
|
|
1978
1979
|
if (r.value)
|
|
1979
1980
|
return l ? "******" : "";
|
|
1980
1981
|
if (o.value !== "boolean" && (l == null || typeof l > "u"))
|
|
1981
1982
|
return "";
|
|
1982
|
-
let
|
|
1983
|
+
let w = "";
|
|
1983
1984
|
switch (o.value) {
|
|
1984
1985
|
case "string":
|
|
1985
|
-
|
|
1986
|
+
w = l;
|
|
1986
1987
|
break;
|
|
1987
1988
|
case "date":
|
|
1988
1989
|
case "datetime":
|
|
1989
1990
|
if (!i.value)
|
|
1990
|
-
|
|
1991
|
+
w = me(l, s.value);
|
|
1991
1992
|
else {
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
k.push(me(b, s.value));
|
|
1997
|
-
}), y = k.join(S);
|
|
1993
|
+
const P = t.dateRangeDelimiter, O = l.split(P), k = [];
|
|
1994
|
+
O && O.length && O.forEach((y) => {
|
|
1995
|
+
k.push(me(y, s.value));
|
|
1996
|
+
}), w = k.join(P);
|
|
1998
1997
|
}
|
|
1999
1998
|
break;
|
|
2000
1999
|
case "number":
|
|
2001
|
-
s.value = An(s.value, t.numberOptions),
|
|
2000
|
+
s.value = An(s.value, t.numberOptions), w = Rn(l, s.value, t.numberOptions, t.groupSeparator, t.decimalSeparator, t.amountExpression, t.decimalFilledSymbol);
|
|
2002
2001
|
break;
|
|
2003
2002
|
case "enum":
|
|
2004
|
-
|
|
2003
|
+
w = Wn(l, t.enumConvertedDatas, t.enumDelimiter, t.textField, t.valueField);
|
|
2005
2004
|
break;
|
|
2006
2005
|
case "boolean":
|
|
2007
|
-
|
|
2006
|
+
w = qn(l);
|
|
2008
2007
|
break;
|
|
2009
2008
|
}
|
|
2010
|
-
return
|
|
2009
|
+
return w;
|
|
2011
2010
|
}
|
|
2011
|
+
const g = j(() => {
|
|
2012
|
+
const l = b(t.modelValue);
|
|
2013
|
+
return c.value !== l && (e.emit("valueChange", l), c.value = l), l;
|
|
2014
|
+
});
|
|
2012
2015
|
function f() {
|
|
2013
2016
|
const l = u.value;
|
|
2014
|
-
Math.abs(l.scrollWidth - l.clientWidth) > 2 || Math.abs(l.scrollHeight - l.clientHeight) > 2 ? d.value =
|
|
2017
|
+
Math.abs(l.scrollWidth - l.clientWidth) > 2 || Math.abs(l.scrollHeight - l.clientHeight) > 2 ? d.value = g.value : d.value = "";
|
|
2015
2018
|
}
|
|
2016
|
-
return Ye(() => t.modelValue, (l,
|
|
2017
|
-
l !==
|
|
2019
|
+
return Ye(() => t.modelValue, (l, w) => {
|
|
2020
|
+
l !== w && e.emit("update:modelValue", l);
|
|
2018
2021
|
}), () => pe("span", {
|
|
2019
2022
|
class: m.value,
|
|
2020
2023
|
style: h.value,
|
|
2021
2024
|
ref: u,
|
|
2022
2025
|
onMouseenter: () => f(),
|
|
2023
2026
|
title: d.value
|
|
2024
|
-
}, [
|
|
2027
|
+
}, [g.value]);
|
|
2025
2028
|
}
|
|
2026
2029
|
});
|
|
2027
|
-
function
|
|
2030
|
+
function Cn(t, e, n) {
|
|
2028
2031
|
var k;
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
const a = "", i = "", o = D();
|
|
2032
|
-
function s() {
|
|
2032
|
+
const r = "", a = "", i = D();
|
|
2033
|
+
function o() {
|
|
2033
2034
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
2034
2035
|
}
|
|
2035
|
-
function
|
|
2036
|
+
function s() {
|
|
2036
2037
|
return !1;
|
|
2037
2038
|
}
|
|
2038
|
-
function
|
|
2039
|
+
function c() {
|
|
2039
2040
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
2040
2041
|
}
|
|
2041
|
-
function
|
|
2042
|
+
function u() {
|
|
2042
2043
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
2043
2044
|
}
|
|
2044
|
-
function
|
|
2045
|
-
if (!
|
|
2045
|
+
function d(y) {
|
|
2046
|
+
if (!y || !y.value)
|
|
2046
2047
|
return null;
|
|
2047
|
-
if (
|
|
2048
|
-
return
|
|
2049
|
-
const T = D(
|
|
2050
|
-
return
|
|
2048
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
2049
|
+
return y.value;
|
|
2050
|
+
const T = D(y == null ? void 0 : y.value.parent), M = d(T);
|
|
2051
|
+
return M || null;
|
|
2051
2052
|
}
|
|
2052
|
-
function
|
|
2053
|
-
const { componentInstance: T, designerItemElementRef:
|
|
2054
|
-
return !T || !T.value ? null : T.value.canMove ?
|
|
2053
|
+
function m(y = e) {
|
|
2054
|
+
const { componentInstance: T, designerItemElementRef: M } = y;
|
|
2055
|
+
return !T || !T.value ? null : T.value.canMove ? M : m(y.parent);
|
|
2055
2056
|
}
|
|
2056
|
-
function
|
|
2057
|
+
function h(y) {
|
|
2057
2058
|
return !!n;
|
|
2058
2059
|
}
|
|
2059
|
-
function
|
|
2060
|
+
function b() {
|
|
2060
2061
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2061
2062
|
}
|
|
2062
|
-
function
|
|
2063
|
+
function g() {
|
|
2064
|
+
}
|
|
2065
|
+
function f(y, T) {
|
|
2063
2066
|
}
|
|
2064
|
-
function l(
|
|
2067
|
+
function l(y, T) {
|
|
2068
|
+
const { componentType: M } = y;
|
|
2069
|
+
let v = be(M, y, T);
|
|
2070
|
+
const x = M.toLowerCase().replace(/-/g, "_");
|
|
2071
|
+
return v && !v.id && v.type === M && (v.id = `${x}_${Math.random().toString().slice(2, 6)}`), v;
|
|
2065
2072
|
}
|
|
2066
|
-
function y
|
|
2067
|
-
const { componentType: N } = b;
|
|
2068
|
-
let x = be(N, b, T);
|
|
2069
|
-
const O = N.toLowerCase().replace("-", "_");
|
|
2070
|
-
return x && !x.id && x.type === N && (x.id = `${O}_${Math.random().toString().slice(2, 6)}`), x;
|
|
2073
|
+
function w(y) {
|
|
2071
2074
|
}
|
|
2072
|
-
function
|
|
2075
|
+
function P(...y) {
|
|
2073
2076
|
}
|
|
2074
|
-
function
|
|
2077
|
+
function O() {
|
|
2078
|
+
e != null && e.schema.contents && e.schema.contents.map((y) => {
|
|
2079
|
+
var v;
|
|
2080
|
+
let T = y.id;
|
|
2081
|
+
y.type === "component-ref" && (T = y.component);
|
|
2082
|
+
const M = t.value.querySelector(`#${T}-design-item`);
|
|
2083
|
+
(v = M == null ? void 0 : M.componentInstance) != null && v.value.onRemoveComponent && M.componentInstance.value.onRemoveComponent();
|
|
2084
|
+
});
|
|
2075
2085
|
}
|
|
2076
|
-
return
|
|
2077
|
-
canMove:
|
|
2078
|
-
canSelectParent:
|
|
2079
|
-
canDelete:
|
|
2080
|
-
canNested: !
|
|
2086
|
+
return i.value = {
|
|
2087
|
+
canMove: o(),
|
|
2088
|
+
canSelectParent: s(),
|
|
2089
|
+
canDelete: c(),
|
|
2090
|
+
canNested: !u(),
|
|
2081
2091
|
contents: e == null ? void 0 : e.schema.contents,
|
|
2082
2092
|
elementRef: t,
|
|
2083
2093
|
parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
|
|
2084
2094
|
schema: e == null ? void 0 : e.schema,
|
|
2085
|
-
styles:
|
|
2086
|
-
designerClass:
|
|
2087
|
-
canAccepts:
|
|
2088
|
-
getBelongedComponentInstance:
|
|
2089
|
-
getDraggableDesignItemElement:
|
|
2090
|
-
getDraggingDisplayText:
|
|
2091
|
-
getPropConfig:
|
|
2092
|
-
getDragScopeElement:
|
|
2093
|
-
onAcceptMovedChildElement:
|
|
2094
|
-
onChildElementMovedOut:
|
|
2095
|
-
addNewChildComponentSchema:
|
|
2096
|
-
updateDragAndDropRules: r,
|
|
2095
|
+
styles: r,
|
|
2096
|
+
designerClass: a,
|
|
2097
|
+
canAccepts: h,
|
|
2098
|
+
getBelongedComponentInstance: d,
|
|
2099
|
+
getDraggableDesignItemElement: m,
|
|
2100
|
+
getDraggingDisplayText: b,
|
|
2101
|
+
getPropConfig: P,
|
|
2102
|
+
getDragScopeElement: g,
|
|
2103
|
+
onAcceptMovedChildElement: f,
|
|
2104
|
+
onChildElementMovedOut: w,
|
|
2105
|
+
addNewChildComponentSchema: l,
|
|
2097
2106
|
triggerBelongedComponentToMoveWhenMoved: D(!1),
|
|
2098
|
-
triggerBelongedComponentToDeleteWhenDeleted: D(!1)
|
|
2099
|
-
|
|
2107
|
+
triggerBelongedComponentToDeleteWhenDeleted: D(!1),
|
|
2108
|
+
onRemoveComponent: O
|
|
2109
|
+
}, i;
|
|
2100
2110
|
}
|
|
2101
2111
|
const Bn = /* @__PURE__ */ he({
|
|
2102
2112
|
name: "FTextDesign",
|
|
@@ -2114,7 +2124,7 @@ const Bn = /* @__PURE__ */ he({
|
|
|
2114
2124
|
"max-height": !r.value && o.value > 0 ? `${o.value}px` : ""
|
|
2115
2125
|
}));
|
|
2116
2126
|
j(() => "");
|
|
2117
|
-
const d = D(), m = Fe("design-item-context"), h =
|
|
2127
|
+
const d = D(), m = Fe("design-item-context"), h = Cn(d, m);
|
|
2118
2128
|
return ge(() => {
|
|
2119
2129
|
d.value.componentInstance = h;
|
|
2120
2130
|
}), e.expose(h.value), () => pe("span", {
|