@farris/ui-vue 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var G = (t, e, n) =>
|
|
4
|
-
import { defineComponent as he, ref as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
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 he, ref as D, computed as j, onMounted as ge, watch as Ye, createVNode as pe, inject as Fe } from "vue";
|
|
5
|
+
import { isPlainObject as ie, cloneDeep as We } from "lodash-es";
|
|
6
|
+
import M from "bignumber.js";
|
|
7
7
|
const ye = {}, we = {};
|
|
8
|
-
function
|
|
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 ?
|
|
10
|
-
return (!a || !r.find((o) => o == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
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 == s)) && (o[s] = e[s].type === "object" && e[s].properties ? ee(e[s]) : We(e[s].default)), o), {});
|
|
10
|
+
return n && (!a || !r.find((o) => o == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function be(t, e = {}, n) {
|
|
13
13
|
const r = ye[t];
|
|
14
14
|
if (r) {
|
|
15
|
-
let a =
|
|
15
|
+
let a = ee(r);
|
|
16
16
|
const i = we[t];
|
|
17
|
-
return a = i ? i({ getSchemaByType:
|
|
17
|
+
return a = i ? i({ getSchemaByType: be }, a, e, n) : a, a;
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
function Ae(t, e) {
|
|
22
|
-
const n =
|
|
23
|
-
return Object.keys(t).reduce((r, a) => (r[a] &&
|
|
22
|
+
const n = ee(e);
|
|
23
|
+
return Object.keys(t).reduce((r, a) => (r[a] && ie(r[a]) && ie(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
|
|
40
|
+
function je(t, e, n = /* @__PURE__ */ new Map()) {
|
|
41
41
|
const r = Ae(t, e);
|
|
42
|
-
return
|
|
42
|
+
return $e(r, n);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function He(t = {}) {
|
|
45
45
|
function e(u, d, m, h) {
|
|
46
46
|
if (typeof m == "number")
|
|
47
47
|
return h[u].length === m;
|
|
@@ -90,29 +90,29 @@ function Ce(t = {}) {
|
|
|
90
90
|
return i(u).reduce((w, g) => w && o(g, d), !0);
|
|
91
91
|
}
|
|
92
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((
|
|
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((v) => s(v, d));
|
|
94
94
|
return h ? !y.includes(!1) : y.includes(!0);
|
|
95
95
|
}
|
|
96
96
|
return { parseValueSchema: c };
|
|
97
97
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
return ye[e.title] = e, we[e.title] = r,
|
|
102
|
-
const s =
|
|
98
|
+
const Ce = {}, Re = {};
|
|
99
|
+
He();
|
|
100
|
+
function qe(t, e, n = /* @__PURE__ */ new Map(), r = (o, s, c) => s, a = {}, i = (o) => o) {
|
|
101
|
+
return ye[e.title] = e, we[e.title] = r, Ce[e.title] = a, Re[e.title] = i, (o = {}) => {
|
|
102
|
+
const s = je(o, e, n), c = Object.keys(t).reduce((u, d) => (u[d] = t[d].default, u), {});
|
|
103
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,18 +201,18 @@ 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:
|
|
215
|
-
},
|
|
207
|
+
], rt = {
|
|
208
|
+
$schema: Ze,
|
|
209
|
+
$id: Je,
|
|
210
|
+
title: Ie,
|
|
211
|
+
description: Ke,
|
|
212
|
+
type: et,
|
|
213
|
+
properties: tt,
|
|
214
|
+
required: nt
|
|
215
|
+
}, te = {
|
|
216
216
|
// 组件值
|
|
217
217
|
modelValue: { type: [String, Number, Boolean], default: "" },
|
|
218
218
|
// 是否是密码
|
|
@@ -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
|
-
}, oe =
|
|
257
|
-
class
|
|
256
|
+
}, oe = qe(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
|
+
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)))
|
|
@@ -376,40 +376,40 @@ class be {
|
|
|
376
376
|
return e == null ? Date.now() : e instanceof Date ? e : this.parse(e);
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function P(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 W(t, e) {
|
|
384
384
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
385
385
|
}
|
|
386
|
-
const
|
|
387
|
-
let
|
|
388
|
-
function
|
|
389
|
-
return
|
|
386
|
+
const Me = 6048e5, ot = 864e5, Ne = 6e4, ve = 36e5;
|
|
387
|
+
let st = {};
|
|
388
|
+
function Q() {
|
|
389
|
+
return st;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function q(t, e) {
|
|
392
392
|
var s, c, u, d;
|
|
393
|
-
const n =
|
|
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 = P(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
|
-
function
|
|
397
|
-
return
|
|
396
|
+
function U(t) {
|
|
397
|
+
return q(t, { weekStartsOn: 1 });
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
const e =
|
|
399
|
+
function Oe(t) {
|
|
400
|
+
const e = P(t), n = e.getFullYear(), r = W(t, 0);
|
|
401
401
|
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
402
|
-
const a =
|
|
402
|
+
const a = U(r), i = W(t, 0);
|
|
403
403
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
404
|
-
const o =
|
|
404
|
+
const o = U(i);
|
|
405
405
|
return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= o.getTime() ? n : n - 1;
|
|
406
406
|
}
|
|
407
407
|
function se(t) {
|
|
408
|
-
const e =
|
|
408
|
+
const e = P(t);
|
|
409
409
|
return e.setHours(0, 0, 0, 0), e;
|
|
410
410
|
}
|
|
411
411
|
function ue(t) {
|
|
412
|
-
const e =
|
|
412
|
+
const e = P(t), n = new Date(
|
|
413
413
|
Date.UTC(
|
|
414
414
|
e.getFullYear(),
|
|
415
415
|
e.getMonth(),
|
|
@@ -422,28 +422,28 @@ function ue(t) {
|
|
|
422
422
|
);
|
|
423
423
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function ut(t, e) {
|
|
426
426
|
const n = se(t), r = se(e), a = +n - ue(n), i = +r - ue(r);
|
|
427
|
-
return Math.round((a - i) /
|
|
428
|
-
}
|
|
429
|
-
function ut(t) {
|
|
430
|
-
const e = ve(t), n = C(t, 0);
|
|
431
|
-
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), X(n);
|
|
427
|
+
return Math.round((a - i) / ot);
|
|
432
428
|
}
|
|
433
429
|
function ct(t) {
|
|
430
|
+
const e = Oe(t), n = W(t, 0);
|
|
431
|
+
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), U(n);
|
|
432
|
+
}
|
|
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
|
-
const e =
|
|
439
|
+
const e = P(t);
|
|
440
440
|
return !isNaN(Number(e));
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const e =
|
|
442
|
+
function ft(t) {
|
|
443
|
+
const e = P(t), n = W(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,43 +516,43 @@ 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
|
-
},
|
|
555
|
-
function
|
|
554
|
+
}, bt = (t, e, n, r) => wt[t];
|
|
555
|
+
function H(t) {
|
|
556
556
|
return (e, n) => {
|
|
557
557
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
558
558
|
let a;
|
|
@@ -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,38 +692,38 @@ const bt = {
|
|
|
692
692
|
return n + "rd";
|
|
693
693
|
}
|
|
694
694
|
return n + "th";
|
|
695
|
-
},
|
|
696
|
-
ordinalNumber:
|
|
697
|
-
era:
|
|
698
|
-
values:
|
|
695
|
+
}, Pt = {
|
|
696
|
+
ordinalNumber: Tt,
|
|
697
|
+
era: H({
|
|
698
|
+
values: Dt,
|
|
699
699
|
defaultWidth: "wide"
|
|
700
700
|
}),
|
|
701
|
-
quarter:
|
|
702
|
-
values:
|
|
701
|
+
quarter: H({
|
|
702
|
+
values: Mt,
|
|
703
703
|
defaultWidth: "wide",
|
|
704
704
|
argumentCallback: (t) => t - 1
|
|
705
705
|
}),
|
|
706
|
-
month:
|
|
707
|
-
values: Mt,
|
|
708
|
-
defaultWidth: "wide"
|
|
709
|
-
}),
|
|
710
|
-
day: R({
|
|
706
|
+
month: H({
|
|
711
707
|
values: Nt,
|
|
712
708
|
defaultWidth: "wide"
|
|
713
709
|
}),
|
|
714
|
-
|
|
710
|
+
day: H({
|
|
715
711
|
values: vt,
|
|
712
|
+
defaultWidth: "wide"
|
|
713
|
+
}),
|
|
714
|
+
dayPeriod: H({
|
|
715
|
+
values: Ot,
|
|
716
716
|
defaultWidth: "wide",
|
|
717
717
|
formattingValues: xt,
|
|
718
718
|
defaultFormattingWidth: "wide"
|
|
719
719
|
})
|
|
720
720
|
};
|
|
721
|
-
function
|
|
721
|
+
function C(t) {
|
|
722
722
|
return (e, n = {}) => {
|
|
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], c = Array.isArray(s) ?
|
|
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
|
St(s, (m) => m.test(o))
|
|
729
729
|
);
|
|
@@ -741,12 +741,12 @@ function St(t, e) {
|
|
|
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
|
-
},
|
|
765
|
+
}, Wt = {
|
|
766
766
|
any: [/^b/i, /^(a|c)/i]
|
|
767
767
|
}, At = {
|
|
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
|
+
}, jt = {
|
|
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
|
+
}, Ht = {
|
|
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
|
+
}, Ct = {
|
|
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
|
-
era:
|
|
835
|
-
matchPatterns:
|
|
834
|
+
era: C({
|
|
835
|
+
matchPatterns: Ft,
|
|
836
836
|
defaultMatchWidth: "wide",
|
|
837
|
-
parsePatterns:
|
|
837
|
+
parsePatterns: Wt,
|
|
838
838
|
defaultParseWidth: "any"
|
|
839
839
|
}),
|
|
840
|
-
quarter:
|
|
840
|
+
quarter: C({
|
|
841
841
|
matchPatterns: At,
|
|
842
842
|
defaultMatchWidth: "wide",
|
|
843
|
-
parsePatterns:
|
|
843
|
+
parsePatterns: $t,
|
|
844
844
|
defaultParseWidth: "any",
|
|
845
845
|
valueCallback: (t) => t + 1
|
|
846
846
|
}),
|
|
847
|
-
month:
|
|
848
|
-
matchPatterns:
|
|
847
|
+
month: C({
|
|
848
|
+
matchPatterns: jt,
|
|
849
849
|
defaultMatchWidth: "wide",
|
|
850
|
-
parsePatterns:
|
|
850
|
+
parsePatterns: Ht,
|
|
851
851
|
defaultParseWidth: "any"
|
|
852
852
|
}),
|
|
853
|
-
day:
|
|
854
|
-
matchPatterns:
|
|
853
|
+
day: C({
|
|
854
|
+
matchPatterns: Ct,
|
|
855
855
|
defaultMatchWidth: "wide",
|
|
856
|
-
parsePatterns:
|
|
856
|
+
parsePatterns: Rt,
|
|
857
857
|
defaultParseWidth: "any"
|
|
858
858
|
}),
|
|
859
|
-
dayPeriod:
|
|
860
|
-
matchPatterns:
|
|
859
|
+
dayPeriod: C({
|
|
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: Pt,
|
|
871
|
+
match: Lt,
|
|
872
872
|
options: {
|
|
873
873
|
weekStartsOn: 0,
|
|
874
874
|
firstWeekContainsDate: 1
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
|
-
function Ut(t) {
|
|
878
|
-
const e = T(t);
|
|
879
|
-
return st(e, lt(e)) + 1;
|
|
880
|
-
}
|
|
881
877
|
function Qt(t) {
|
|
882
|
-
const e =
|
|
883
|
-
return
|
|
878
|
+
const e = P(t);
|
|
879
|
+
return ut(e, ft(e)) + 1;
|
|
880
|
+
}
|
|
881
|
+
function Xt(t) {
|
|
882
|
+
const e = P(t), n = +U(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 =
|
|
887
|
+
const n = P(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 ?? ((w = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : w.firstWeekContainsDate) ?? 1, o = W(t, 0);
|
|
888
888
|
o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
|
|
889
|
-
const s =
|
|
889
|
+
const s = q(o, e), c = W(t, 0);
|
|
890
890
|
c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
|
|
891
|
-
const u =
|
|
891
|
+
const u = q(c, e);
|
|
892
892
|
return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= u.getTime() ? r : r - 1;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function zt(t, e) {
|
|
895
895
|
var s, c, u, d;
|
|
896
|
-
const n =
|
|
897
|
-
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0),
|
|
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 = Te(t, e), i = W(t, 0);
|
|
897
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), q(i, e);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
const n =
|
|
901
|
-
return Math.round(r /
|
|
899
|
+
function Gt(t, e) {
|
|
900
|
+
const n = P(t), r = +q(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 _ = {
|
|
908
908
|
// Year
|
|
909
909
|
y(t, e) {
|
|
910
910
|
const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -958,7 +958,7 @@ const F = {
|
|
|
958
958
|
);
|
|
959
959
|
return p(a, e.length);
|
|
960
960
|
}
|
|
961
|
-
},
|
|
961
|
+
}, $ = {
|
|
962
962
|
am: "am",
|
|
963
963
|
pm: "pm",
|
|
964
964
|
midnight: "midnight",
|
|
@@ -989,11 +989,11 @@ const F = {
|
|
|
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 _.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 F = {
|
|
|
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 F = {
|
|
|
1080
1080
|
switch (e) {
|
|
1081
1081
|
case "M":
|
|
1082
1082
|
case "MM":
|
|
1083
|
-
return
|
|
1083
|
+
return _.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 F = {
|
|
|
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" }) : _.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
|
|
@@ -1302,7 +1302,7 @@ const F = {
|
|
|
1302
1302
|
b: function(t, e, n) {
|
|
1303
1303
|
const r = t.getHours();
|
|
1304
1304
|
let a;
|
|
1305
|
-
switch (r === 12 ? a =
|
|
1305
|
+
switch (r === 12 ? a = $.noon : r === 0 ? a = $.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
|
|
1306
1306
|
case "b":
|
|
1307
1307
|
case "bb":
|
|
1308
1308
|
return n.dayPeriod(a, {
|
|
@@ -1331,7 +1331,7 @@ const F = {
|
|
|
1331
1331
|
B: function(t, e, n) {
|
|
1332
1332
|
const r = t.getHours();
|
|
1333
1333
|
let a;
|
|
1334
|
-
switch (r >= 17 ? a =
|
|
1334
|
+
switch (r >= 17 ? a = $.evening : r >= 12 ? a = $.afternoon : r >= 4 ? a = $.morning : a = $.night, e) {
|
|
1335
1335
|
case "B":
|
|
1336
1336
|
case "BB":
|
|
1337
1337
|
case "BBB":
|
|
@@ -1358,11 +1358,11 @@ const F = {
|
|
|
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 _.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" }) : _.H(t, e);
|
|
1366
1366
|
},
|
|
1367
1367
|
// Hour [0-11]
|
|
1368
1368
|
K: function(t, e, n) {
|
|
@@ -1376,15 +1376,15 @@ const F = {
|
|
|
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" }) : _.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" }) : _.s(t, e);
|
|
1384
1384
|
},
|
|
1385
1385
|
// Fraction of second
|
|
1386
1386
|
S: function(t, e) {
|
|
1387
|
-
return
|
|
1387
|
+
return _.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) {
|
|
@@ -1396,11 +1396,11 @@ const F = {
|
|
|
1396
1396
|
return fe(r);
|
|
1397
1397
|
case "XXXX":
|
|
1398
1398
|
case "XX":
|
|
1399
|
-
return
|
|
1399
|
+
return F(r);
|
|
1400
1400
|
case "XXXXX":
|
|
1401
1401
|
case "XXX":
|
|
1402
1402
|
default:
|
|
1403
|
-
return
|
|
1403
|
+
return F(r, ":");
|
|
1404
1404
|
}
|
|
1405
1405
|
},
|
|
1406
1406
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1411,11 +1411,11 @@ const F = {
|
|
|
1411
1411
|
return fe(r);
|
|
1412
1412
|
case "xxxx":
|
|
1413
1413
|
case "xx":
|
|
1414
|
-
return
|
|
1414
|
+
return F(r);
|
|
1415
1415
|
case "xxxxx":
|
|
1416
1416
|
case "xxx":
|
|
1417
1417
|
default:
|
|
1418
|
-
return
|
|
1418
|
+
return F(r, ":");
|
|
1419
1419
|
}
|
|
1420
1420
|
},
|
|
1421
1421
|
// Timezone (GMT)
|
|
@@ -1428,7 +1428,7 @@ const F = {
|
|
|
1428
1428
|
return "GMT" + le(r, ":");
|
|
1429
1429
|
case "OOOO":
|
|
1430
1430
|
default:
|
|
1431
|
-
return "GMT" +
|
|
1431
|
+
return "GMT" + F(r, ":");
|
|
1432
1432
|
}
|
|
1433
1433
|
},
|
|
1434
1434
|
// Timezone (specific non-location)
|
|
@@ -1441,7 +1441,7 @@ const F = {
|
|
|
1441
1441
|
return "GMT" + le(r, ":");
|
|
1442
1442
|
case "zzzz":
|
|
1443
1443
|
default:
|
|
1444
|
-
return "GMT" +
|
|
1444
|
+
return "GMT" + F(r, ":");
|
|
1445
1445
|
}
|
|
1446
1446
|
},
|
|
1447
1447
|
// Seconds timestamp
|
|
@@ -1460,9 +1460,9 @@ function le(t, e = "") {
|
|
|
1460
1460
|
return i === 0 ? n + String(a) : n + String(a) + e + p(i, 2);
|
|
1461
1461
|
}
|
|
1462
1462
|
function fe(t, e) {
|
|
1463
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) :
|
|
1463
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) : F(t, e);
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function F(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
|
}
|
|
@@ -1478,7 +1478,7 @@ const de = (t, e) => {
|
|
|
1478
1478
|
default:
|
|
1479
1479
|
return e.date({ width: "full" });
|
|
1480
1480
|
}
|
|
1481
|
-
},
|
|
1481
|
+
}, Pe = (t, e) => {
|
|
1482
1482
|
switch (t) {
|
|
1483
1483
|
case "p":
|
|
1484
1484
|
return e.time({ width: "short" });
|
|
@@ -1490,7 +1490,7 @@ 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
1496
|
return de(t, e);
|
|
@@ -1510,47 +1510,47 @@ const de = (t, e) => {
|
|
|
1510
1510
|
i = e.dateTime({ width: "full" });
|
|
1511
1511
|
break;
|
|
1512
1512
|
}
|
|
1513
|
-
return i.replace("{{date}}", de(r, e)).replace("{{time}}",
|
|
1514
|
-
},
|
|
1515
|
-
p:
|
|
1516
|
-
P:
|
|
1517
|
-
},
|
|
1518
|
-
function Kt(t) {
|
|
1519
|
-
return Zt.test(t);
|
|
1520
|
-
}
|
|
1513
|
+
return i.replace("{{date}}", de(r, e)).replace("{{time}}", Pe(a, e));
|
|
1514
|
+
}, Zt = {
|
|
1515
|
+
p: Pe,
|
|
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
|
|
1533
|
-
function
|
|
1532
|
+
const an = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, on = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, sn = /^'([^]*?)'?$/, un = /''/g, cn = /[a-zA-Z]/;
|
|
1533
|
+
function B(t, e, n) {
|
|
1534
1534
|
var d, m, h, w;
|
|
1535
|
-
const r =
|
|
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 ?? ((w = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : w.weekStartsOn) ?? 0, s = P(t);
|
|
1536
1536
|
if (!xe(s))
|
|
1537
1537
|
throw new RangeError("Invalid time value");
|
|
1538
|
-
let c = e.match(
|
|
1538
|
+
let c = e.match(on).map((g) => {
|
|
1539
1539
|
const f = g[0];
|
|
1540
1540
|
if (f === "p" || f === "P") {
|
|
1541
|
-
const l =
|
|
1541
|
+
const l = Zt[f];
|
|
1542
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:
|
|
1550
|
+
return { isToken: !1, value: ln(g) };
|
|
1551
1551
|
if (ce[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
|
);
|
|
@@ -1565,30 +1565,30 @@ function U(t, e, n) {
|
|
|
1565
1565
|
return c.map((g) => {
|
|
1566
1566
|
if (!g.isToken) return g.value;
|
|
1567
1567
|
const f = g.value;
|
|
1568
|
-
(
|
|
1568
|
+
(tn(f) || en(f)) && nn(f, e, String(t));
|
|
1569
1569
|
const l = ce[f[0]];
|
|
1570
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 c =
|
|
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
1594
|
const c = new Date(i + o), u = /* @__PURE__ */ new Date(0);
|
|
@@ -1605,26 +1605,26 @@ function Z(t, e) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
return new Date(i + o + s);
|
|
1607
1607
|
}
|
|
1608
|
-
const
|
|
1608
|
+
const L = {
|
|
1609
1609
|
dateTimeDelimiter: /[T ]/,
|
|
1610
1610
|
timeZoneDelimiter: /[Z ]/i,
|
|
1611
1611
|
timezone: /([Z+-].*)$/
|
|
1612
|
-
},
|
|
1613
|
-
function
|
|
1614
|
-
const e = {}, n = t.split(
|
|
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
|
+
const e = {}, n = t.split(L.dateTimeDelimiter);
|
|
1615
1615
|
let r;
|
|
1616
1616
|
if (n.length > 2)
|
|
1617
1617
|
return e;
|
|
1618
|
-
if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1],
|
|
1618
|
+
if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1], L.timeZoneDelimiter.test(e.date) && (e.date = t.split(L.timeZoneDelimiter)[0], r = t.substr(
|
|
1619
1619
|
e.date.length,
|
|
1620
1620
|
t.length
|
|
1621
1621
|
))), r) {
|
|
1622
|
-
const a =
|
|
1622
|
+
const a = L.timezone.exec(r);
|
|
1623
1623
|
a ? (e.time = r.replace(a[1], ""), e.timezone = a[1]) : e.time = r;
|
|
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,78 +1635,78 @@ 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 =
|
|
1642
|
+
const r = !!n[4], a = R(n[1]), i = R(n[2]) - 1, o = R(n[3]), s = R(n[4]), c = R(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
|
-
function
|
|
1650
|
+
function R(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
|
|
1675
|
+
const Dn = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1676
1676
|
function Se(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] || (Se(t) ? 29 : 28));
|
|
1681
1681
|
}
|
|
1682
|
-
function
|
|
1682
|
+
function Nn(t, e) {
|
|
1683
1683
|
return e >= 1 && e <= (Se(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)
|
|
1699
1699
|
return "";
|
|
1700
1700
|
if (n instanceof Date)
|
|
1701
|
-
return
|
|
1701
|
+
return B(n, r);
|
|
1702
1702
|
let a = Z(n);
|
|
1703
1703
|
if (a == "Invalid Date" && (a = t.create(n) || new Date(n)), xe(a))
|
|
1704
|
-
return a = Z(
|
|
1704
|
+
return a = Z(B(a, "yyyy-MM-dd HH:mm:ss")), B(a, r);
|
|
1705
1705
|
if (r.indexOf("HH") === 0 || r.indexOf("hh") === 0) {
|
|
1706
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
|
-
return
|
|
1709
|
+
return B(s, r);
|
|
1710
1710
|
}
|
|
1711
1711
|
return "";
|
|
1712
1712
|
}
|
|
@@ -1714,77 +1714,77 @@ function On() {
|
|
|
1714
1714
|
formatTo: e
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1717
|
+
function Pn() {
|
|
1718
1718
|
function t(f, l = null) {
|
|
1719
|
-
return Array.isArray(f) ?
|
|
1719
|
+
return Array.isArray(f) ? M.max.apply(null, f).toFixed() : f && l ? M.maximum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1720
1720
|
}
|
|
1721
1721
|
function e(f, l = null) {
|
|
1722
|
-
return Array.isArray(f) ?
|
|
1722
|
+
return Array.isArray(f) ? M.min.apply(null, f).toFixed() : f && l ? M.minimum(f, l).toFixed() : (console.error("请提供比较的值firstValue、secondValue."), "");
|
|
1723
1723
|
}
|
|
1724
1724
|
function n(f) {
|
|
1725
|
-
return
|
|
1725
|
+
return M.sum.apply(null, f).toFixed();
|
|
1726
1726
|
}
|
|
1727
1727
|
function r(f, l) {
|
|
1728
|
-
return new
|
|
1728
|
+
return new M(f).div(l).toFixed();
|
|
1729
1729
|
}
|
|
1730
1730
|
function a(f, l) {
|
|
1731
|
-
return new
|
|
1731
|
+
return new M(f).plus(l).toFixed();
|
|
1732
1732
|
}
|
|
1733
1733
|
function i(f, l) {
|
|
1734
|
-
return new
|
|
1734
|
+
return new M(f).times(l).toFixed();
|
|
1735
1735
|
}
|
|
1736
1736
|
function o(f, l) {
|
|
1737
|
-
return new
|
|
1737
|
+
return new M(f).minus(l).toFixed();
|
|
1738
1738
|
}
|
|
1739
1739
|
function s(f, l) {
|
|
1740
|
-
return new
|
|
1740
|
+
return new M(f).eq(l);
|
|
1741
1741
|
}
|
|
1742
1742
|
function c(f, l) {
|
|
1743
|
-
return new
|
|
1743
|
+
return new M(f).lt(l);
|
|
1744
1744
|
}
|
|
1745
1745
|
function u(f, l) {
|
|
1746
|
-
return new
|
|
1746
|
+
return new M(f).gt(l);
|
|
1747
1747
|
}
|
|
1748
1748
|
function d(f) {
|
|
1749
|
-
return new
|
|
1749
|
+
return new M(f).toNumber();
|
|
1750
1750
|
}
|
|
1751
1751
|
function m(f, l = 0) {
|
|
1752
|
-
return new
|
|
1752
|
+
return new M(f).toFixed(l);
|
|
1753
1753
|
}
|
|
1754
1754
|
function h(f) {
|
|
1755
|
-
const l = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"), y = new Array("", "拾", "佰", "仟"), S = new Array("", "万", "亿", "兆"),
|
|
1756
|
-
let
|
|
1755
|
+
const l = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"), y = new Array("", "拾", "佰", "仟"), S = new Array("", "万", "亿", "兆"), v = new Array("角", "分", "毫", "厘"), k = "整", b = "元", T = 1e15;
|
|
1756
|
+
let N, x, O = "", X;
|
|
1757
1757
|
if (f == "")
|
|
1758
1758
|
return "";
|
|
1759
|
-
const
|
|
1760
|
-
if (
|
|
1759
|
+
const z = parseFloat(f);
|
|
1760
|
+
if (z >= T)
|
|
1761
1761
|
return "";
|
|
1762
|
-
if (
|
|
1763
|
-
return
|
|
1764
|
-
if (f =
|
|
1765
|
-
let
|
|
1766
|
-
const
|
|
1767
|
-
for (let
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1762
|
+
if (z === 0)
|
|
1763
|
+
return O = l[0] + b + k, O;
|
|
1764
|
+
if (f = z.toString(), f.indexOf(".") === -1 ? (N = f, x = "") : (X = f.split("."), N = X[0], x = X[1].substr(0, 4)), parseInt(N, 10) > 0) {
|
|
1765
|
+
let A = 0;
|
|
1766
|
+
const E = N.length;
|
|
1767
|
+
for (let Y = 0; Y < E; Y++) {
|
|
1768
|
+
const ne = N.substr(Y, 1), re = E - Y - 1, ke = re / 4, ae = re % 4;
|
|
1769
|
+
ne == "0" ? A++ : (A > 0 && (O += l[0]), A = 0, O += l[parseInt(ne, 10)] + y[ae]), ae == 0 && A < 4 && (O += S[ke]);
|
|
1770
1770
|
}
|
|
1771
|
-
|
|
1771
|
+
O += b;
|
|
1772
1772
|
}
|
|
1773
|
-
if (
|
|
1774
|
-
const
|
|
1775
|
-
for (let
|
|
1776
|
-
let
|
|
1777
|
-
|
|
1773
|
+
if (x !== "") {
|
|
1774
|
+
const A = x.length;
|
|
1775
|
+
for (let E = 0; E < A; E++) {
|
|
1776
|
+
let Y = x.substr(E, 1);
|
|
1777
|
+
Y !== "0" && (O += l[Number(Y)] + v[E]);
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
return
|
|
1780
|
+
return O === "" ? O += l[0] + b + k : x === "" && (O += k), O;
|
|
1781
1781
|
}
|
|
1782
1782
|
function w(f, l) {
|
|
1783
1783
|
var y = f == null || typeof f == "number" && isNaN(f) ? "" : String(f);
|
|
1784
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
1785
|
}
|
|
1786
1786
|
function g(f, l) {
|
|
1787
|
-
const y = new
|
|
1787
|
+
const y = new M(f), S = {
|
|
1788
1788
|
prefix: l.prefix || "",
|
|
1789
1789
|
suffix: l.suffix || "",
|
|
1790
1790
|
decimalSeparator: l.decimalSeparator || ".",
|
|
@@ -1793,8 +1793,8 @@ function Tn() {
|
|
|
1793
1793
|
};
|
|
1794
1794
|
if (y.isNaN())
|
|
1795
1795
|
return "";
|
|
1796
|
-
let
|
|
1797
|
-
return
|
|
1796
|
+
let v = l.precision || 0;
|
|
1797
|
+
return v = Number(v), y.toFormat(v, S);
|
|
1798
1798
|
}
|
|
1799
1799
|
return {
|
|
1800
1800
|
formatTo: g,
|
|
@@ -1828,8 +1828,8 @@ 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
1835
|
const c = Sn[~~(s / 2)];
|
|
@@ -1862,8 +1862,8 @@ function Pn() {
|
|
|
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,20 +1872,20 @@ 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 Wn(t, e, n, r, a) {
|
|
1889
1889
|
if (t == null || t === "")
|
|
1890
1890
|
return "";
|
|
1891
1891
|
if (e && e.length) {
|
|
@@ -1900,39 +1900,39 @@ function Fn(t, e, n, r, a) {
|
|
|
1900
1900
|
}
|
|
1901
1901
|
function me(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
1905
|
function An(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 jn(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 Hn(t, e) {
|
|
1915
1915
|
return Number(t * 100).toFixed(Number(e)) + "%";
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1917
|
+
function Cn(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 } = Pn();
|
|
1930
1930
|
switch (s) {
|
|
1931
1931
|
case "C":
|
|
1932
1932
|
Object.assign(u, { prefix: "¥", precision: c }), d = m(t, u);
|
|
1933
1933
|
break;
|
|
1934
1934
|
case "D":
|
|
1935
|
-
d =
|
|
1935
|
+
d = jn(t, c, o);
|
|
1936
1936
|
break;
|
|
1937
1937
|
case "F":
|
|
1938
1938
|
Object.assign(u, { prefix: "", groupSeparator: "", precision: c }), d = m(t, u);
|
|
@@ -1941,24 +1941,24 @@ function jn(t, e, n, r, a, i, o) {
|
|
|
1941
1941
|
Object.assign(u, { prefix: "", precision: c }), d = m(t, u);
|
|
1942
1942
|
break;
|
|
1943
1943
|
case "P":
|
|
1944
|
-
d =
|
|
1944
|
+
d = Hn(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
1952
|
const K = /* @__PURE__ */ he({
|
|
1953
1953
|
name: "FText",
|
|
1954
|
-
props:
|
|
1954
|
+
props: te,
|
|
1955
1955
|
emits: ["update:modelValue", "valueChange"],
|
|
1956
1956
|
setup(t, e) {
|
|
1957
|
-
const n =
|
|
1957
|
+
const n = D(t.textarea), r = D(t.password), a = D(t.autoSize), i = D(t.dateRange), o = D(t.type), s = D(t.format), c = D(), u = D(), d = D(""), m = j(() => ({
|
|
1958
1958
|
"f-form-control-text": !n.value,
|
|
1959
1959
|
"f-form-context-textarea": n,
|
|
1960
1960
|
"f-component-text-auto-size": a.value
|
|
1961
|
-
})), h =
|
|
1961
|
+
})), h = j(() => ({
|
|
1962
1962
|
"text-align": t.textAlign,
|
|
1963
1963
|
height: !a.value && t.height > 0 ? `${t.height}px` : "",
|
|
1964
1964
|
"min-height": a.value && t.height > 0 ? `${t.height}px` : "",
|
|
@@ -1970,7 +1970,7 @@ const K = /* @__PURE__ */ he({
|
|
|
1970
1970
|
u.value.parentElement.className = l + " f-cmp-text-is-textarea";
|
|
1971
1971
|
}
|
|
1972
1972
|
});
|
|
1973
|
-
const w =
|
|
1973
|
+
const w = j(() => {
|
|
1974
1974
|
let l = g(t.modelValue);
|
|
1975
1975
|
return c.value != l && (e.emit("valueChange", l), c.value = l), l;
|
|
1976
1976
|
});
|
|
@@ -1990,21 +1990,21 @@ const K = /* @__PURE__ */ he({
|
|
|
1990
1990
|
y = me(l, s.value);
|
|
1991
1991
|
else {
|
|
1992
1992
|
let S = t.dateRangeDelimiter;
|
|
1993
|
-
const
|
|
1993
|
+
const v = l.split(S);
|
|
1994
1994
|
let k = [];
|
|
1995
|
-
|
|
1996
|
-
k.push(me(
|
|
1995
|
+
v && v.length && v.forEach((b) => {
|
|
1996
|
+
k.push(me(b, s.value));
|
|
1997
1997
|
}), y = k.join(S);
|
|
1998
1998
|
}
|
|
1999
1999
|
break;
|
|
2000
2000
|
case "number":
|
|
2001
|
-
s.value = An(s.value, t.numberOptions), y =
|
|
2001
|
+
s.value = An(s.value, t.numberOptions), y = Cn(l, s.value, t.numberOptions, t.groupSeparator, t.decimalSeparator, t.amountExpression, t.decimalFilledSymbol);
|
|
2002
2002
|
break;
|
|
2003
2003
|
case "enum":
|
|
2004
|
-
y =
|
|
2004
|
+
y = Wn(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;
|
|
@@ -2013,7 +2013,7 @@ const K = /* @__PURE__ */ he({
|
|
|
2013
2013
|
const l = u.value;
|
|
2014
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
|
|
2016
|
+
return Ye(() => t.modelValue, (l, y) => {
|
|
2017
2017
|
l !== y && e.emit("update:modelValue", l);
|
|
2018
2018
|
}), () => pe("span", {
|
|
2019
2019
|
class: m.value,
|
|
@@ -2024,11 +2024,11 @@ const K = /* @__PURE__ */ he({
|
|
|
2024
2024
|
}, [w.value]);
|
|
2025
2025
|
}
|
|
2026
2026
|
});
|
|
2027
|
-
function
|
|
2028
|
-
var
|
|
2027
|
+
function qn(t, e, n) {
|
|
2028
|
+
var k;
|
|
2029
2029
|
function r() {
|
|
2030
2030
|
}
|
|
2031
|
-
const a = "", i = "", o =
|
|
2031
|
+
const a = "", i = "", o = D();
|
|
2032
2032
|
function s() {
|
|
2033
2033
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
2034
2034
|
}
|
|
@@ -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
|
|
2049
|
+
const T = D(b == null ? void 0 : b.value.parent), N = m(T);
|
|
2050
2050
|
return N || null;
|
|
2051
2051
|
}
|
|
2052
2052
|
function h(b = e) {
|
|
2053
|
-
const { componentInstance:
|
|
2054
|
-
return !
|
|
2053
|
+
const { componentInstance: T, designerItemElementRef: N } = b;
|
|
2054
|
+
return !T || !T.value ? null : T.value.canMove ? N : h(b.parent);
|
|
2055
2055
|
}
|
|
2056
2056
|
function w(b) {
|
|
2057
2057
|
return !!n;
|
|
@@ -2061,24 +2061,17 @@ function Rn(t, e, n) {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
function f() {
|
|
2063
2063
|
}
|
|
2064
|
-
function l(b,
|
|
2064
|
+
function l(b, T) {
|
|
2065
2065
|
}
|
|
2066
|
-
function y(b,
|
|
2066
|
+
function y(b, T) {
|
|
2067
2067
|
const { componentType: N } = b;
|
|
2068
|
-
let
|
|
2069
|
-
const
|
|
2070
|
-
return
|
|
2071
|
-
}
|
|
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;
|
|
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;
|
|
2078
2071
|
}
|
|
2079
|
-
function
|
|
2072
|
+
function S(b) {
|
|
2080
2073
|
}
|
|
2081
|
-
function
|
|
2074
|
+
function v(...b) {
|
|
2082
2075
|
}
|
|
2083
2076
|
return o.value = {
|
|
2084
2077
|
canMove: s(),
|
|
@@ -2087,7 +2080,7 @@ function Rn(t, e, n) {
|
|
|
2087
2080
|
canNested: !d(),
|
|
2088
2081
|
contents: e == null ? void 0 : e.schema.contents,
|
|
2089
2082
|
elementRef: t,
|
|
2090
|
-
parent: (
|
|
2083
|
+
parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
|
|
2091
2084
|
schema: e == null ? void 0 : e.schema,
|
|
2092
2085
|
styles: a,
|
|
2093
2086
|
designerClass: i,
|
|
@@ -2095,34 +2088,33 @@ function Rn(t, e, n) {
|
|
|
2095
2088
|
getBelongedComponentInstance: m,
|
|
2096
2089
|
getDraggableDesignItemElement: h,
|
|
2097
2090
|
getDraggingDisplayText: g,
|
|
2098
|
-
getPropConfig:
|
|
2091
|
+
getPropConfig: v,
|
|
2099
2092
|
getDragScopeElement: f,
|
|
2100
2093
|
onAcceptMovedChildElement: l,
|
|
2101
|
-
|
|
2102
|
-
onChildElementMovedOut: O,
|
|
2094
|
+
onChildElementMovedOut: S,
|
|
2103
2095
|
addNewChildComponentSchema: y,
|
|
2104
2096
|
updateDragAndDropRules: r,
|
|
2105
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2106
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2097
|
+
triggerBelongedComponentToMoveWhenMoved: D(!1),
|
|
2098
|
+
triggerBelongedComponentToDeleteWhenDeleted: D(!1)
|
|
2107
2099
|
}, o;
|
|
2108
2100
|
}
|
|
2109
|
-
const
|
|
2101
|
+
const Bn = /* @__PURE__ */ he({
|
|
2110
2102
|
name: "FTextDesign",
|
|
2111
|
-
props:
|
|
2103
|
+
props: te,
|
|
2112
2104
|
emits: ["update:modelValue"],
|
|
2113
2105
|
setup(t, e) {
|
|
2114
|
-
const n =
|
|
2106
|
+
const n = D(!0), r = D(!0), a = D(""), i = D(0), o = D(0), s = D(t.modelValue), c = j(() => ({
|
|
2115
2107
|
"f-form-control-text": !n.value,
|
|
2116
2108
|
"f-form-context-textarea": n,
|
|
2117
2109
|
"f-component-text-auto-size": r.value
|
|
2118
|
-
})), u =
|
|
2110
|
+
})), u = j(() => ({
|
|
2119
2111
|
textalign: a.value,
|
|
2120
2112
|
height: !r.value && i.value > 0 ? `${i.value}px` : "",
|
|
2121
2113
|
"min-height": !r.value && i.value > 0 ? `${i.value}px` : "",
|
|
2122
2114
|
"max-height": !r.value && o.value > 0 ? `${o.value}px` : ""
|
|
2123
2115
|
}));
|
|
2124
|
-
|
|
2125
|
-
const d =
|
|
2116
|
+
j(() => "");
|
|
2117
|
+
const d = D(), m = Fe("design-item-context"), h = qn(d, m);
|
|
2126
2118
|
return ge(() => {
|
|
2127
2119
|
d.value.componentInstance = h;
|
|
2128
2120
|
}), e.expose(h.value), () => pe("span", {
|
|
@@ -2131,7 +2123,7 @@ const qn = /* @__PURE__ */ he({
|
|
|
2131
2123
|
style: u.value
|
|
2132
2124
|
}, [s.value]);
|
|
2133
2125
|
}
|
|
2134
|
-
}),
|
|
2126
|
+
}), zn = {
|
|
2135
2127
|
install(t) {
|
|
2136
2128
|
t.component(K.name, K);
|
|
2137
2129
|
},
|
|
@@ -2139,12 +2131,12 @@ const qn = /* @__PURE__ */ he({
|
|
|
2139
2131
|
t.text = K, e.text = oe;
|
|
2140
2132
|
},
|
|
2141
2133
|
registerDesigner(t, e, n) {
|
|
2142
|
-
t.text =
|
|
2134
|
+
t.text = Bn, e.text = oe;
|
|
2143
2135
|
}
|
|
2144
2136
|
};
|
|
2145
2137
|
export {
|
|
2146
2138
|
K as FText,
|
|
2147
|
-
|
|
2139
|
+
zn as default,
|
|
2148
2140
|
oe as propsResolver,
|
|
2149
|
-
|
|
2141
|
+
te as textProps
|
|
2150
2142
|
};
|