@farris/ui-vue 1.3.0 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +454 -398
- 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 +479 -476
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +255 -252
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +652 -567
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +518 -521
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +659 -553
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +162 -155
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +866 -747
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +371 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1174 -1280
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +340 -991
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +6066 -5847
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3400 -3486
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2328 -2446
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9551 -1200
- 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 +234 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1996 -2630
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +138 -123
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +548 -586
- 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 +2871 -3736
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3380 -3645
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10543 -3207
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9775 -1312
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +442 -438
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +587 -807
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +415 -381
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +361 -1024
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2265 -2371
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6425 -6257
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +6164 -5946
- 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 +524 -1474
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +547 -502
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +646 -574
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1181 -2028
- 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 +1185 -2027
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +442 -1368
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +238 -235
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1635 -1713
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +791 -716
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12203 -5274
- 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 +1873 -520
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +299 -300
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +176 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +715 -659
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1032 -1883
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4767 -5693
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +169 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +490 -1167
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +154 -151
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +575 -1204
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +279 -276
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +478 -428
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2591 -3326
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +442 -439
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +309 -307
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +500 -430
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1391 -1341
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +574 -575
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3422 -3536
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2661 -2764
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +675 -674
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +300 -297
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +454 -1089
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +709 -706
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +54780 -52757
- 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/directive/area-response.d.ts +10 -0
- package/types/common/entity/entity-schema.d.ts +26 -11
- 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 +2 -2
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +5 -4
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- 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.component.d.ts +3 -2
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- 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 +9 -11
- 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 +3 -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/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 +49 -41
- package/types/designer-canvas/src/types.d.ts +10 -21
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
- 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 +6 -1
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- 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/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/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/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 +3 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- 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/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 +12 -0
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/query-solution/src/solutions.d.ts +108 -509
- 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-layout-editor/index.d.ts +3 -1
- 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/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- 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/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/composition/types.d.ts +4 -1
- 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/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/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- 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/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/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
var _e = Object.defineProperty;
|
|
2
2
|
var Ee = (t, e, n) => e in t ? _e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var G = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
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
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 N from "bignumber.js";
|
|
7
|
+
const ye = {}, we = {};
|
|
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
|
+
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;
|
|
15
|
+
}
|
|
16
|
+
function be(t, e = {}, n) {
|
|
17
|
+
const r = ye[t];
|
|
14
18
|
if (r) {
|
|
15
|
-
let a =
|
|
16
|
-
const i =
|
|
17
|
-
return a = i ? i({ getSchemaByType:
|
|
19
|
+
let a = ee(r);
|
|
20
|
+
const i = we[t];
|
|
21
|
+
return a = i ? i({ getSchemaByType: be }, a, e, n) : a, a;
|
|
18
22
|
}
|
|
19
23
|
return null;
|
|
20
24
|
}
|
|
21
|
-
function
|
|
22
|
-
const n =
|
|
23
|
-
return Object.keys(
|
|
25
|
+
function Ae(t, e) {
|
|
26
|
+
const n = ee(e);
|
|
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) => {
|
|
@@ -37,21 +41,21 @@ function $e(t, e) {
|
|
|
37
41
|
return r;
|
|
38
42
|
}, {});
|
|
39
43
|
}
|
|
40
|
-
function
|
|
41
|
-
const r =
|
|
44
|
+
function je(t, e, n = /* @__PURE__ */ new Map()) {
|
|
45
|
+
const r = Ae(t, e);
|
|
42
46
|
return $e(r, n);
|
|
43
47
|
}
|
|
44
|
-
function
|
|
48
|
+
function He(t = {}) {
|
|
45
49
|
function e(u, d, m, h) {
|
|
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 je(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,19 +91,19 @@ function je(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
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
const s =
|
|
102
|
+
const Re = {}, qe = {};
|
|
103
|
+
He();
|
|
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 = {}) => {
|
|
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
|
};
|
|
105
109
|
}
|
|
@@ -212,7 +216,7 @@ const Qe = "text", Xe = "A Farris Component", ze = "object", Ge = {
|
|
|
212
216
|
type: et,
|
|
213
217
|
properties: tt,
|
|
214
218
|
required: nt
|
|
215
|
-
},
|
|
219
|
+
}, te = {
|
|
216
220
|
// 组件值
|
|
217
221
|
modelValue: { type: [String, Number, Boolean], default: "" },
|
|
218
222
|
// 是否是密码
|
|
@@ -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
|
-
},
|
|
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,40 +380,40 @@ 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
|
-
function
|
|
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
|
-
function
|
|
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 =
|
|
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
|
-
function
|
|
397
|
-
return
|
|
400
|
+
function U(t) {
|
|
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
|
-
const a =
|
|
406
|
+
const a = U(r), i = W(t, 0);
|
|
403
407
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
404
|
-
const o =
|
|
408
|
+
const o = U(i);
|
|
405
409
|
return e.getTime() >= a.getTime() ? n + 1 : e.getTime() >= o.getTime() ? n : n - 1;
|
|
406
410
|
}
|
|
407
|
-
function
|
|
408
|
-
const e =
|
|
411
|
+
function se(t) {
|
|
412
|
+
const e = S(t);
|
|
409
413
|
return e.setHours(0, 0, 0, 0), e;
|
|
410
414
|
}
|
|
411
|
-
function
|
|
412
|
-
const e =
|
|
415
|
+
function ue(t) {
|
|
416
|
+
const e = S(t), n = new Date(
|
|
413
417
|
Date.UTC(
|
|
414
418
|
e.getFullYear(),
|
|
415
419
|
e.getMonth(),
|
|
@@ -423,24 +427,24 @@ function ce(t) {
|
|
|
423
427
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
424
428
|
}
|
|
425
429
|
function ut(t, e) {
|
|
426
|
-
const n =
|
|
430
|
+
const n = se(t), r = se(e), a = +n - ue(n), i = +r - ue(r);
|
|
427
431
|
return Math.round((a - i) / ot);
|
|
428
432
|
}
|
|
429
433
|
function ct(t) {
|
|
430
|
-
const e = Oe(t), n =
|
|
431
|
-
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0),
|
|
434
|
+
const e = Oe(t), n = W(t, 0);
|
|
435
|
+
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), U(n);
|
|
432
436
|
}
|
|
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 = {
|
|
@@ -552,7 +556,7 @@ const ht = {
|
|
|
552
556
|
nextWeek: "eeee 'at' p",
|
|
553
557
|
other: "P"
|
|
554
558
|
}, bt = (t, e, n, r) => wt[t];
|
|
555
|
-
function
|
|
559
|
+
function H(t) {
|
|
556
560
|
return (e, n) => {
|
|
557
561
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
558
562
|
let a;
|
|
@@ -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) {
|
|
@@ -693,32 +697,32 @@ const Dt = {
|
|
|
693
697
|
}
|
|
694
698
|
return n + "th";
|
|
695
699
|
}, St = {
|
|
696
|
-
ordinalNumber:
|
|
697
|
-
era:
|
|
700
|
+
ordinalNumber: xt,
|
|
701
|
+
era: H({
|
|
698
702
|
values: Dt,
|
|
699
703
|
defaultWidth: "wide"
|
|
700
704
|
}),
|
|
701
|
-
quarter:
|
|
705
|
+
quarter: H({
|
|
702
706
|
values: Mt,
|
|
703
707
|
defaultWidth: "wide",
|
|
704
708
|
argumentCallback: (t) => t - 1
|
|
705
709
|
}),
|
|
706
|
-
month:
|
|
707
|
-
values:
|
|
710
|
+
month: H({
|
|
711
|
+
values: vt,
|
|
708
712
|
defaultWidth: "wide"
|
|
709
713
|
}),
|
|
710
|
-
day:
|
|
711
|
-
values:
|
|
714
|
+
day: H({
|
|
715
|
+
values: Nt,
|
|
712
716
|
defaultWidth: "wide"
|
|
713
717
|
}),
|
|
714
|
-
dayPeriod:
|
|
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)
|
|
@@ -762,19 +766,19 @@ const Et = /^(\d+)(th|st|nd|rd)?/i, Yt = /\d+/i, Ft = {
|
|
|
762
766
|
narrow: /^(b|a)/i,
|
|
763
767
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
764
768
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
765
|
-
}, At = {
|
|
766
|
-
any: [/^b/i, /^(a|c)/i]
|
|
767
769
|
}, Wt = {
|
|
770
|
+
any: [/^b/i, /^(a|c)/i]
|
|
771
|
+
}, At = {
|
|
768
772
|
narrow: /^[1234]/i,
|
|
769
773
|
abbreviated: /^q[1234]/i,
|
|
770
774
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
771
775
|
}, $t = {
|
|
772
776
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
773
|
-
},
|
|
777
|
+
}, jt = {
|
|
774
778
|
narrow: /^[jfmasond]/i,
|
|
775
779
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
776
780
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
777
|
-
},
|
|
781
|
+
}, Ht = {
|
|
778
782
|
narrow: [
|
|
779
783
|
/^j/i,
|
|
780
784
|
/^f/i,
|
|
@@ -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
|
-
parsePatterns:
|
|
841
|
+
parsePatterns: Wt,
|
|
838
842
|
defaultParseWidth: "any"
|
|
839
843
|
}),
|
|
840
|
-
quarter:
|
|
841
|
-
matchPatterns:
|
|
844
|
+
quarter: R({
|
|
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:
|
|
848
|
-
matchPatterns:
|
|
851
|
+
month: R({
|
|
852
|
+
matchPatterns: jt,
|
|
849
853
|
defaultMatchWidth: "wide",
|
|
850
|
-
parsePatterns:
|
|
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"
|
|
@@ -875,36 +879,36 @@ 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 =
|
|
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) {
|
|
904
908
|
const n = t < 0 ? "-" : "", r = Math.abs(t).toString().padStart(e, "0");
|
|
905
909
|
return n + r;
|
|
906
910
|
}
|
|
907
|
-
const
|
|
911
|
+
const _ = {
|
|
908
912
|
// Year
|
|
909
913
|
y(t, e) {
|
|
910
914
|
const n = t.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -958,7 +962,7 @@ const F = {
|
|
|
958
962
|
);
|
|
959
963
|
return p(a, e.length);
|
|
960
964
|
}
|
|
961
|
-
},
|
|
965
|
+
}, $ = {
|
|
962
966
|
am: "am",
|
|
963
967
|
pm: "pm",
|
|
964
968
|
midnight: "midnight",
|
|
@@ -967,7 +971,7 @@ const F = {
|
|
|
967
971
|
afternoon: "afternoon",
|
|
968
972
|
evening: "evening",
|
|
969
973
|
night: "night"
|
|
970
|
-
},
|
|
974
|
+
}, ce = {
|
|
971
975
|
// Era
|
|
972
976
|
G: function(t, e, n) {
|
|
973
977
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -989,11 +993,11 @@ const F = {
|
|
|
989
993
|
const r = t.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
990
994
|
return n.ordinalNumber(a, { unit: "year" });
|
|
991
995
|
}
|
|
992
|
-
return
|
|
996
|
+
return _.y(t, e);
|
|
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);
|
|
@@ -1080,7 +1084,7 @@ const F = {
|
|
|
1080
1084
|
switch (e) {
|
|
1081
1085
|
case "M":
|
|
1082
1086
|
case "MM":
|
|
1083
|
-
return
|
|
1087
|
+
return _.M(t, e);
|
|
1084
1088
|
case "Mo":
|
|
1085
1089
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
1086
1090
|
case "MMM":
|
|
@@ -1135,7 +1139,7 @@ const F = {
|
|
|
1135
1139
|
},
|
|
1136
1140
|
// Day of the month
|
|
1137
1141
|
d: function(t, e, n) {
|
|
1138
|
-
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1142
|
+
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : _.d(t, e);
|
|
1139
1143
|
},
|
|
1140
1144
|
// Day of year
|
|
1141
1145
|
D: function(t, e, n) {
|
|
@@ -1302,7 +1306,7 @@ const F = {
|
|
|
1302
1306
|
b: function(t, e, n) {
|
|
1303
1307
|
const r = t.getHours();
|
|
1304
1308
|
let a;
|
|
1305
|
-
switch (r === 12 ? a =
|
|
1309
|
+
switch (r === 12 ? a = $.noon : r === 0 ? a = $.midnight : a = r / 12 >= 1 ? "pm" : "am", e) {
|
|
1306
1310
|
case "b":
|
|
1307
1311
|
case "bb":
|
|
1308
1312
|
return n.dayPeriod(a, {
|
|
@@ -1331,7 +1335,7 @@ const F = {
|
|
|
1331
1335
|
B: function(t, e, n) {
|
|
1332
1336
|
const r = t.getHours();
|
|
1333
1337
|
let a;
|
|
1334
|
-
switch (r >= 17 ? a =
|
|
1338
|
+
switch (r >= 17 ? a = $.evening : r >= 12 ? a = $.afternoon : r >= 4 ? a = $.morning : a = $.night, e) {
|
|
1335
1339
|
case "B":
|
|
1336
1340
|
case "BB":
|
|
1337
1341
|
case "BBB":
|
|
@@ -1358,11 +1362,11 @@ const F = {
|
|
|
1358
1362
|
let r = t.getHours() % 12;
|
|
1359
1363
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
1360
1364
|
}
|
|
1361
|
-
return
|
|
1365
|
+
return _.h(t, e);
|
|
1362
1366
|
},
|
|
1363
1367
|
// Hour [0-23]
|
|
1364
1368
|
H: function(t, e, n) {
|
|
1365
|
-
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1369
|
+
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : _.H(t, e);
|
|
1366
1370
|
},
|
|
1367
1371
|
// Hour [0-11]
|
|
1368
1372
|
K: function(t, e, n) {
|
|
@@ -1376,15 +1380,15 @@ const F = {
|
|
|
1376
1380
|
},
|
|
1377
1381
|
// Minute
|
|
1378
1382
|
m: function(t, e, n) {
|
|
1379
|
-
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1383
|
+
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : _.m(t, e);
|
|
1380
1384
|
},
|
|
1381
1385
|
// Second
|
|
1382
1386
|
s: function(t, e, n) {
|
|
1383
|
-
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1387
|
+
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : _.s(t, e);
|
|
1384
1388
|
},
|
|
1385
1389
|
// Fraction of second
|
|
1386
1390
|
S: function(t, e) {
|
|
1387
|
-
return
|
|
1391
|
+
return _.S(t, e);
|
|
1388
1392
|
},
|
|
1389
1393
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1390
1394
|
X: function(t, e, n) {
|
|
@@ -1393,14 +1397,14 @@ const F = {
|
|
|
1393
1397
|
return "Z";
|
|
1394
1398
|
switch (e) {
|
|
1395
1399
|
case "X":
|
|
1396
|
-
return
|
|
1400
|
+
return fe(r);
|
|
1397
1401
|
case "XXXX":
|
|
1398
1402
|
case "XX":
|
|
1399
|
-
return
|
|
1403
|
+
return F(r);
|
|
1400
1404
|
case "XXXXX":
|
|
1401
1405
|
case "XXX":
|
|
1402
1406
|
default:
|
|
1403
|
-
return
|
|
1407
|
+
return F(r, ":");
|
|
1404
1408
|
}
|
|
1405
1409
|
},
|
|
1406
1410
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1408,14 +1412,14 @@ const F = {
|
|
|
1408
1412
|
const r = t.getTimezoneOffset();
|
|
1409
1413
|
switch (e) {
|
|
1410
1414
|
case "x":
|
|
1411
|
-
return
|
|
1415
|
+
return fe(r);
|
|
1412
1416
|
case "xxxx":
|
|
1413
1417
|
case "xx":
|
|
1414
|
-
return
|
|
1418
|
+
return F(r);
|
|
1415
1419
|
case "xxxxx":
|
|
1416
1420
|
case "xxx":
|
|
1417
1421
|
default:
|
|
1418
|
-
return
|
|
1422
|
+
return F(r, ":");
|
|
1419
1423
|
}
|
|
1420
1424
|
},
|
|
1421
1425
|
// Timezone (GMT)
|
|
@@ -1425,10 +1429,10 @@ const F = {
|
|
|
1425
1429
|
case "O":
|
|
1426
1430
|
case "OO":
|
|
1427
1431
|
case "OOO":
|
|
1428
|
-
return "GMT" +
|
|
1432
|
+
return "GMT" + le(r, ":");
|
|
1429
1433
|
case "OOOO":
|
|
1430
1434
|
default:
|
|
1431
|
-
return "GMT" +
|
|
1435
|
+
return "GMT" + F(r, ":");
|
|
1432
1436
|
}
|
|
1433
1437
|
},
|
|
1434
1438
|
// Timezone (specific non-location)
|
|
@@ -1438,10 +1442,10 @@ const F = {
|
|
|
1438
1442
|
case "z":
|
|
1439
1443
|
case "zz":
|
|
1440
1444
|
case "zzz":
|
|
1441
|
-
return "GMT" +
|
|
1445
|
+
return "GMT" + le(r, ":");
|
|
1442
1446
|
case "zzzz":
|
|
1443
1447
|
default:
|
|
1444
|
-
return "GMT" +
|
|
1448
|
+
return "GMT" + F(r, ":");
|
|
1445
1449
|
}
|
|
1446
1450
|
},
|
|
1447
1451
|
// Seconds timestamp
|
|
@@ -1455,18 +1459,18 @@ const F = {
|
|
|
1455
1459
|
return p(r, e.length);
|
|
1456
1460
|
}
|
|
1457
1461
|
};
|
|
1458
|
-
function
|
|
1462
|
+
function le(t, e = "") {
|
|
1459
1463
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = Math.trunc(r / 60), i = r % 60;
|
|
1460
1464
|
return i === 0 ? n + String(a) : n + String(a) + e + p(i, 2);
|
|
1461
1465
|
}
|
|
1462
|
-
function
|
|
1463
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) :
|
|
1466
|
+
function fe(t, e) {
|
|
1467
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + p(Math.abs(t) / 60, 2) : F(t, e);
|
|
1464
1468
|
}
|
|
1465
|
-
function
|
|
1469
|
+
function F(t, e = "") {
|
|
1466
1470
|
const n = t > 0 ? "-" : "+", r = Math.abs(t), a = p(Math.trunc(r / 60), 2), i = p(r % 60, 2);
|
|
1467
1471
|
return n + a + e + i;
|
|
1468
1472
|
}
|
|
1469
|
-
const
|
|
1473
|
+
const de = (t, e) => {
|
|
1470
1474
|
switch (t) {
|
|
1471
1475
|
case "P":
|
|
1472
1476
|
return e.date({ width: "short" });
|
|
@@ -1493,7 +1497,7 @@ const me = (t, e) => {
|
|
|
1493
1497
|
}, Vt = (t, e) => {
|
|
1494
1498
|
const n = t.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1495
1499
|
if (!a)
|
|
1496
|
-
return
|
|
1500
|
+
return de(t, e);
|
|
1497
1501
|
let i;
|
|
1498
1502
|
switch (r) {
|
|
1499
1503
|
case "P":
|
|
@@ -1510,7 +1514,7 @@ const me = (t, e) => {
|
|
|
1510
1514
|
i = e.dateTime({ width: "full" });
|
|
1511
1515
|
break;
|
|
1512
1516
|
}
|
|
1513
|
-
return i.replace("{{date}}",
|
|
1517
|
+
return i.replace("{{date}}", de(r, e)).replace("{{time}}", Se(a, e));
|
|
1514
1518
|
}, Zt = {
|
|
1515
1519
|
p: Se,
|
|
1516
1520
|
P: Vt
|
|
@@ -1530,10 +1534,10 @@ function rn(t, e, n) {
|
|
|
1530
1534
|
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
1535
|
}
|
|
1532
1536
|
const an = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, on = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, sn = /^'([^]*?)'?$/, un = /''/g, cn = /[a-zA-Z]/;
|
|
1533
|
-
function
|
|
1534
|
-
var d, m, h,
|
|
1535
|
-
const r =
|
|
1536
|
-
if (!
|
|
1537
|
+
function B(t, e, n) {
|
|
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];
|
|
@@ -1548,7 +1552,7 @@ function U(t, e, n) {
|
|
|
1548
1552
|
const f = g[0];
|
|
1549
1553
|
if (f === "'")
|
|
1550
1554
|
return { isToken: !1, value: ln(g) };
|
|
1551
|
-
if (
|
|
1555
|
+
if (ce[f])
|
|
1552
1556
|
return { isToken: !0, value: g };
|
|
1553
1557
|
if (f.match(cn))
|
|
1554
1558
|
throw new RangeError(
|
|
@@ -1566,7 +1570,7 @@ function U(t, e, n) {
|
|
|
1566
1570
|
if (!g.isToken) return g.value;
|
|
1567
1571
|
const f = g.value;
|
|
1568
1572
|
(tn(f) || en(f)) && nn(f, e, String(t));
|
|
1569
|
-
const l =
|
|
1573
|
+
const l = ce[f[0]];
|
|
1570
1574
|
return l(s, f, a.localize, u);
|
|
1571
1575
|
}).join("");
|
|
1572
1576
|
}
|
|
@@ -1605,21 +1609,21 @@ function Z(t, e) {
|
|
|
1605
1609
|
}
|
|
1606
1610
|
return new Date(i + o + s);
|
|
1607
1611
|
}
|
|
1608
|
-
const
|
|
1612
|
+
const L = {
|
|
1609
1613
|
dateTimeDelimiter: /[T ]/,
|
|
1610
1614
|
timeZoneDelimiter: /[Z ]/i,
|
|
1611
1615
|
timezone: /([Z+-].*)$/
|
|
1612
1616
|
}, 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
1617
|
function hn(t) {
|
|
1614
|
-
const e = {}, n = t.split(
|
|
1618
|
+
const e = {}, n = t.split(L.dateTimeDelimiter);
|
|
1615
1619
|
let r;
|
|
1616
1620
|
if (n.length > 2)
|
|
1617
1621
|
return e;
|
|
1618
|
-
if (/:/.test(n[0]) ? r = n[0] : (e.date = n[0], r = n[1],
|
|
1622
|
+
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
1623
|
e.date.length,
|
|
1620
1624
|
t.length
|
|
1621
1625
|
))), r) {
|
|
1622
|
-
const a =
|
|
1626
|
+
const a = L.timezone.exec(r);
|
|
1623
1627
|
a ? (e.time = r.replace(a[1], ""), e.timezone = a[1]) : e.time = r;
|
|
1624
1628
|
}
|
|
1625
1629
|
return e;
|
|
@@ -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);
|
|
@@ -1679,34 +1683,34 @@ function Pe(t) {
|
|
|
1679
1683
|
function Mn(t, e, n) {
|
|
1680
1684
|
return e >= 0 && e <= 11 && n >= 1 && n <= (Dn[e] || (Pe(t) ? 29 : 28));
|
|
1681
1685
|
}
|
|
1682
|
-
function
|
|
1686
|
+
function vn(t, e) {
|
|
1683
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;
|
|
1698
1702
|
if (!n || typeof n == "string" && n.indexOf("0001") === 0)
|
|
1699
1703
|
return "";
|
|
1700
1704
|
if (n instanceof Date)
|
|
1701
|
-
return
|
|
1705
|
+
return B(n, r);
|
|
1702
1706
|
let a = Z(n);
|
|
1703
|
-
if (a == "Invalid Date" && (a = t.create(n) || new Date(n)),
|
|
1704
|
-
return a = Z(
|
|
1707
|
+
if (a == "Invalid Date" && (a = t.create(n) || new Date(n)), Te(a))
|
|
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(":");
|
|
1707
1711
|
(r === "HH" || r === "hh") && (r += ":mm");
|
|
1708
1712
|
const s = Z("2024-06-05 " + o);
|
|
1709
|
-
return
|
|
1713
|
+
return B(s, r);
|
|
1710
1714
|
}
|
|
1711
1715
|
return "";
|
|
1712
1716
|
}
|
|
@@ -1716,89 +1720,89 @@ function Tn() {
|
|
|
1716
1720
|
}
|
|
1717
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
|
-
const
|
|
1760
|
-
if (
|
|
1763
|
+
const z = parseFloat(f);
|
|
1764
|
+
if (z >= 1e15)
|
|
1761
1765
|
return "";
|
|
1762
|
-
if (
|
|
1763
|
-
return
|
|
1764
|
-
if (f =
|
|
1765
|
-
let
|
|
1766
|
-
const
|
|
1767
|
-
for (let
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1766
|
+
if (z === 0)
|
|
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) {
|
|
1769
|
+
let A = 0;
|
|
1770
|
+
const E = M.length;
|
|
1771
|
+
for (let Y = 0; Y < E; Y++) {
|
|
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
|
|
1775
|
-
for (let
|
|
1776
|
-
|
|
1777
|
-
|
|
1777
|
+
if (v !== "") {
|
|
1778
|
+
const A = v.length;
|
|
1779
|
+
for (let E = 0; E < A; E++) {
|
|
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,
|
|
@@ -1831,7 +1835,8 @@ const Pn = ["秒", "分钟", "小时", "天", "周", "个月", "年"], I = [
|
|
|
1831
1835
|
function kn() {
|
|
1832
1836
|
const t = new De();
|
|
1833
1837
|
function e(o, s) {
|
|
1834
|
-
if (s === 0)
|
|
1838
|
+
if (s === 0)
|
|
1839
|
+
return ["刚刚", "片刻后"];
|
|
1835
1840
|
const c = Pn[~~(s / 2)];
|
|
1836
1841
|
return [`${o} ${c}前`, `${o} ${c}后`];
|
|
1837
1842
|
}
|
|
@@ -1839,7 +1844,7 @@ function kn() {
|
|
|
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
|
}
|
|
@@ -1885,7 +1890,7 @@ function Fn(t) {
|
|
|
1885
1890
|
let e;
|
|
1886
1891
|
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
1892
|
}
|
|
1888
|
-
function
|
|
1893
|
+
function Wn(t, e, n, r, a) {
|
|
1889
1894
|
if (t == null || t === "")
|
|
1890
1895
|
return "";
|
|
1891
1896
|
if (e && e.length) {
|
|
@@ -1898,23 +1903,23 @@ function An(t, e, n, r, a) {
|
|
|
1898
1903
|
}
|
|
1899
1904
|
return t;
|
|
1900
1905
|
}
|
|
1901
|
-
function
|
|
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
|
-
function
|
|
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;
|
|
1907
1912
|
}
|
|
1908
1913
|
function $n(t) {
|
|
1909
1914
|
return t.replace(/[a-z]+/g, (e) => e.toUpperCase());
|
|
1910
1915
|
}
|
|
1911
|
-
function
|
|
1916
|
+
function jn(t, e, n) {
|
|
1912
1917
|
return t.toString().indexOf(".") > -1 ? (console.warn("十进制转换仅限整型类型"), "") : (Array(e).join(n) + t).slice(-e);
|
|
1913
1918
|
}
|
|
1914
|
-
function
|
|
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)
|
|
@@ -1932,7 +1937,7 @@ function Hn(t, e, n, r, a, i, o) {
|
|
|
1932
1937
|
Object.assign(u, { prefix: "¥", precision: c }), d = m(t, u);
|
|
1933
1938
|
break;
|
|
1934
1939
|
case "D":
|
|
1935
|
-
d =
|
|
1940
|
+
d = jn(t, c, o);
|
|
1936
1941
|
break;
|
|
1937
1942
|
case "F":
|
|
1938
1943
|
Object.assign(u, { prefix: "", groupSeparator: "", precision: c }), d = m(t, u);
|
|
@@ -1941,191 +1946,188 @@ function Hn(t, e, n, r, a, i, o) {
|
|
|
1941
1946
|
Object.assign(u, { prefix: "", precision: c }), d = m(t, u);
|
|
1942
1947
|
break;
|
|
1943
1948
|
case "P":
|
|
1944
|
-
d =
|
|
1949
|
+
d = Hn(t, c);
|
|
1945
1950
|
break;
|
|
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
|
-
const K = /* @__PURE__ */
|
|
1957
|
+
const K = /* @__PURE__ */ he({
|
|
1953
1958
|
name: "FText",
|
|
1954
|
-
props:
|
|
1959
|
+
props: te,
|
|
1955
1960
|
emits: ["update:modelValue", "valueChange"],
|
|
1956
1961
|
setup(t, e) {
|
|
1957
|
-
const n =
|
|
1962
|
+
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
1963
|
"f-form-control-text": !n.value,
|
|
1959
1964
|
"f-form-context-textarea": n,
|
|
1960
1965
|
"f-component-text-auto-size": a.value
|
|
1961
|
-
})), h =
|
|
1966
|
+
})), h = j(() => ({
|
|
1962
1967
|
"text-align": t.textAlign,
|
|
1963
1968
|
height: !a.value && t.height > 0 ? `${t.height}px` : "",
|
|
1964
1969
|
"min-height": a.value && t.height > 0 ? `${t.height}px` : "",
|
|
1965
1970
|
"max-height": a.value && t.maxHeight > 0 ? `${t.maxHeight}px` : ""
|
|
1966
1971
|
}));
|
|
1967
|
-
|
|
1972
|
+
ge(() => {
|
|
1968
1973
|
if (n.value) {
|
|
1969
1974
|
const l = u.value.parentElement.className;
|
|
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(he(_, 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 =
|
|
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 !==
|
|
2018
|
-
}), () =>
|
|
2019
|
+
return Ye(() => t.modelValue, (l, w) => {
|
|
2020
|
+
l !== w && e.emit("update:modelValue", l);
|
|
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
|
|
2028
|
-
var
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
const a = "", i = "", o = M();
|
|
2032
|
-
function s() {
|
|
2030
|
+
function Cn(t, e, n) {
|
|
2031
|
+
var k;
|
|
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
|
|
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:
|
|
2054
|
-
return !
|
|
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() {
|
|
2063
2064
|
}
|
|
2064
|
-
function
|
|
2065
|
+
function f(y, T) {
|
|
2065
2066
|
}
|
|
2066
|
-
function y
|
|
2067
|
-
const { componentType:
|
|
2068
|
-
let
|
|
2069
|
-
const
|
|
2070
|
-
return
|
|
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;
|
|
2071
2072
|
}
|
|
2072
|
-
function
|
|
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;
|
|
2073
|
+
function w(y) {
|
|
2078
2074
|
}
|
|
2079
|
-
function
|
|
2075
|
+
function P(...y) {
|
|
2080
2076
|
}
|
|
2081
|
-
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
|
+
});
|
|
2082
2085
|
}
|
|
2083
|
-
return
|
|
2084
|
-
canMove:
|
|
2085
|
-
canSelectParent:
|
|
2086
|
-
canDelete:
|
|
2087
|
-
canNested: !
|
|
2086
|
+
return i.value = {
|
|
2087
|
+
canMove: o(),
|
|
2088
|
+
canSelectParent: s(),
|
|
2089
|
+
canDelete: c(),
|
|
2090
|
+
canNested: !u(),
|
|
2088
2091
|
contents: e == null ? void 0 : e.schema.contents,
|
|
2089
2092
|
elementRef: t,
|
|
2090
|
-
parent: (
|
|
2093
|
+
parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
|
|
2091
2094
|
schema: e == null ? void 0 : e.schema,
|
|
2092
|
-
styles:
|
|
2093
|
-
designerClass:
|
|
2094
|
-
canAccepts:
|
|
2095
|
-
getBelongedComponentInstance:
|
|
2096
|
-
getDraggableDesignItemElement:
|
|
2097
|
-
getDraggingDisplayText:
|
|
2098
|
-
getPropConfig:
|
|
2099
|
-
getDragScopeElement:
|
|
2100
|
-
onAcceptMovedChildElement:
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
const Bn = /* @__PURE__ */ ge({
|
|
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,
|
|
2106
|
+
triggerBelongedComponentToMoveWhenMoved: D(!1),
|
|
2107
|
+
triggerBelongedComponentToDeleteWhenDeleted: D(!1),
|
|
2108
|
+
onRemoveComponent: O
|
|
2109
|
+
}, i;
|
|
2110
|
+
}
|
|
2111
|
+
const Bn = /* @__PURE__ */ he({
|
|
2110
2112
|
name: "FTextDesign",
|
|
2111
|
-
props:
|
|
2113
|
+
props: te,
|
|
2112
2114
|
emits: ["update:modelValue"],
|
|
2113
2115
|
setup(t, e) {
|
|
2114
|
-
const n =
|
|
2116
|
+
const n = D(!0), r = D(!0), a = D(""), i = D(0), o = D(0), s = D(t.modelValue), c = j(() => ({
|
|
2115
2117
|
"f-form-control-text": !n.value,
|
|
2116
2118
|
"f-form-context-textarea": n,
|
|
2117
2119
|
"f-component-text-auto-size": r.value
|
|
2118
|
-
})), u =
|
|
2120
|
+
})), u = j(() => ({
|
|
2119
2121
|
textalign: a.value,
|
|
2120
2122
|
height: !r.value && i.value > 0 ? `${i.value}px` : "",
|
|
2121
2123
|
"min-height": !r.value && i.value > 0 ? `${i.value}px` : "",
|
|
2122
2124
|
"max-height": !r.value && o.value > 0 ? `${o.value}px` : ""
|
|
2123
2125
|
}));
|
|
2124
|
-
|
|
2125
|
-
const d =
|
|
2126
|
-
return
|
|
2126
|
+
j(() => "");
|
|
2127
|
+
const d = D(), m = Fe("design-item-context"), h = Cn(d, m);
|
|
2128
|
+
return ge(() => {
|
|
2127
2129
|
d.value.componentInstance = h;
|
|
2128
|
-
}), e.expose(h.value), () =>
|
|
2130
|
+
}), e.expose(h.value), () => pe("span", {
|
|
2129
2131
|
ref: d,
|
|
2130
2132
|
class: c.value,
|
|
2131
2133
|
style: u.value
|
|
@@ -2136,15 +2138,15 @@ const Bn = /* @__PURE__ */ ge({
|
|
|
2136
2138
|
t.component(K.name, K);
|
|
2137
2139
|
},
|
|
2138
2140
|
register(t, e, n, r) {
|
|
2139
|
-
t.text = K, e.text =
|
|
2141
|
+
t.text = K, e.text = oe;
|
|
2140
2142
|
},
|
|
2141
2143
|
registerDesigner(t, e, n) {
|
|
2142
|
-
t.text = Bn, e.text =
|
|
2144
|
+
t.text = Bn, e.text = oe;
|
|
2143
2145
|
}
|
|
2144
2146
|
};
|
|
2145
2147
|
export {
|
|
2146
2148
|
K as FText,
|
|
2147
2149
|
zn as default,
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
+
oe as propsResolver,
|
|
2151
|
+
te as textProps
|
|
2150
2152
|
};
|