@farris/ui-vue 1.2.5 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +122 -131
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +216 -223
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +201 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +341 -338
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +3415 -3295
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2719 -2717
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +31 -40
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +23 -20
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +578 -584
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +287 -278
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1923 -1908
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +3719 -3604
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +483 -470
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +37 -34
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +258 -267
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1452 -1450
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4860 -4657
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4411 -4259
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +763 -741
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +948 -945
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +485 -466
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +437 -426
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +98 -107
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +840 -800
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +757 -760
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +3659 -3432
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +126 -135
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1400 -1379
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +97 -106
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +393 -402
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +3531 -3412
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2046 -2044
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12370 -11917
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -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/property-config/data-grid.property-config.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +7 -3
- package/types/lookup/src/property-config/lookup.property-config.d.ts +31 -27
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/components/button-edit/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-canvas/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/flow-canvas/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var kt = Object.defineProperty;
|
|
2
2
|
var Pt = (t, n, e) => n in t ? kt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
3
|
var f = (t, n, e) => Pt(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
-
import { ref as v, defineComponent as ne, watch as R, computed as
|
|
5
|
-
import { cloneDeep as
|
|
4
|
+
import { ref as v, defineComponent as ne, watch as R, computed as V, onMounted as de, createVNode as w, createTextVNode as be, mergeProps as Ce, Teleport as Dt, createApp as Ot, onUnmounted as Ht, inject as pe, nextTick as Se, withDirectives as Bt, vShow as Ft, Fragment as Et, resolveComponent as St } from "vue";
|
|
5
|
+
import { cloneDeep as Vt } from "lodash-es";
|
|
6
6
|
import Nt from "@farris/ui-vue/components/button-edit";
|
|
7
7
|
import "bignumber.js";
|
|
8
8
|
import { resolveAppearance as Lt } from "@farris/ui-vue/components/dynamic-resolver";
|
|
9
9
|
import At from "@farris/ui-vue/components/tags";
|
|
10
|
-
import
|
|
11
|
-
import { withInstall as
|
|
10
|
+
import Wt from "@farris/ui-vue/components/popover";
|
|
11
|
+
import { withInstall as It } from "@farris/ui-vue/components/common";
|
|
12
12
|
const qe = {}, _e = {};
|
|
13
13
|
function ke(t) {
|
|
14
|
-
const { properties: n, title: e } = t, r = Object.keys(n).reduce((o, a) => (o[a] = n[a].type === "object" && n[a].properties ? ke(n[a]) :
|
|
14
|
+
const { properties: n, title: e } = t, r = Object.keys(n).reduce((o, a) => (o[a] = n[a].type === "object" && n[a].properties ? ke(n[a]) : Vt(n[a].default), o), {});
|
|
15
15
|
return r.id = `${e}-${Date.now()}`, r;
|
|
16
16
|
}
|
|
17
17
|
function ve(t, n = {}) {
|
|
@@ -34,8 +34,8 @@ function qt(t, n) {
|
|
|
34
34
|
if (typeof a == "string")
|
|
35
35
|
r[a] = t[o];
|
|
36
36
|
else {
|
|
37
|
-
const
|
|
38
|
-
Object.assign(r,
|
|
37
|
+
const i = a(o, t[o], t);
|
|
38
|
+
Object.assign(r, i);
|
|
39
39
|
}
|
|
40
40
|
} else
|
|
41
41
|
r[o] = t[o];
|
|
@@ -84,18 +84,18 @@ function Rt(t = {}) {
|
|
|
84
84
|
return u.push(...h), u;
|
|
85
85
|
}, []);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function i(c, d) {
|
|
88
88
|
if (r.has(c.operator)) {
|
|
89
89
|
const u = r.get(c.operator);
|
|
90
90
|
return u && u(c.target, c.param, c.value, d) || !1;
|
|
91
91
|
}
|
|
92
92
|
return !1;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
return a(c).reduce((h, y) => h &&
|
|
94
|
+
function s(c, d) {
|
|
95
|
+
return a(c).reduce((h, y) => h && i(y, d), !0);
|
|
96
96
|
}
|
|
97
97
|
function p(c, d) {
|
|
98
|
-
const u = Object.keys(c), l = u.includes("allOf"), h = u.includes("anyOf"), y = l || h, Y = (y ? c[y ? l ? "allOf" : "anyOf" : "allOf"] : [c]).map((g) =>
|
|
98
|
+
const u = Object.keys(c), l = u.includes("allOf"), h = u.includes("anyOf"), y = l || h, Y = (y ? c[y ? l ? "allOf" : "anyOf" : "allOf"] : [c]).map((g) => s(g, d));
|
|
99
99
|
return l ? !Y.includes(!1) : Y.includes(!0);
|
|
100
100
|
}
|
|
101
101
|
return { parseValueSchema: p };
|
|
@@ -103,9 +103,9 @@ function Rt(t = {}) {
|
|
|
103
103
|
const b = {
|
|
104
104
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
105
105
|
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
107
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
|
|
108
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
109
109
|
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
110
110
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
111
111
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
@@ -132,15 +132,15 @@ const b = {
|
|
|
132
132
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
133
133
|
Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
|
|
134
134
|
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
135
|
-
|
|
135
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
136
136
|
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
137
137
|
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
138
138
|
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
139
139
|
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
140
140
|
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
141
141
|
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
143
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
144
144
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
145
145
|
Tag: { type: "Tag", name: "Tag", icon: "Tag" },
|
|
146
146
|
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
@@ -149,7 +149,7 @@ const b = {
|
|
|
149
149
|
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
150
150
|
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
151
151
|
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
152
|
-
|
|
152
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
153
153
|
SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
|
|
154
154
|
SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
|
|
155
155
|
QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
|
|
@@ -179,7 +179,7 @@ const b = {
|
|
|
179
179
|
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
180
180
|
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
181
181
|
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
182
|
-
|
|
182
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
183
183
|
ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
|
|
184
184
|
ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
|
|
185
185
|
PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
@@ -213,10 +213,10 @@ const b = {
|
|
|
213
213
|
/** 审批类 end */
|
|
214
214
|
}, jt = {}, Qt = {};
|
|
215
215
|
Rt();
|
|
216
|
-
function Re(t, n, e = /* @__PURE__ */ new Map(), r = (
|
|
217
|
-
return qe[n.title] = n, _e[n.title] = r, jt[n.title] = o, Qt[n.title] = a, (
|
|
218
|
-
const
|
|
219
|
-
return Object.assign(p,
|
|
216
|
+
function Re(t, n, e = /* @__PURE__ */ new Map(), r = (i, s, p) => s, o = {}, a = (i) => i) {
|
|
217
|
+
return qe[n.title] = n, _e[n.title] = r, jt[n.title] = o, Qt[n.title] = a, (i = {}) => {
|
|
218
|
+
const s = _t(i, n, e), p = Object.keys(t).reduce((c, d) => (c[d] = t[d].default, c), {});
|
|
219
|
+
return Object.assign(p, s);
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
222
|
function $t(t, n) {
|
|
@@ -415,9 +415,9 @@ function re() {
|
|
|
415
415
|
return ln;
|
|
416
416
|
}
|
|
417
417
|
function z(t, n) {
|
|
418
|
-
var
|
|
419
|
-
const e = re(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((p = (
|
|
420
|
-
return o.setDate(o.getDate() -
|
|
418
|
+
var s, p, c, d;
|
|
419
|
+
const e = re(), r = (n == null ? void 0 : n.weekStartsOn) ?? ((p = (s = n == null ? void 0 : n.locale) == null ? void 0 : s.options) == null ? void 0 : p.weekStartsOn) ?? e.weekStartsOn ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = q(t), a = o.getDay(), i = (a < r ? 7 : 0) + a - r;
|
|
420
|
+
return o.setDate(o.getDate() - i), o.setHours(0, 0, 0, 0), o;
|
|
421
421
|
}
|
|
422
422
|
function te(t) {
|
|
423
423
|
return z(t, { weekStartsOn: 1 });
|
|
@@ -427,10 +427,10 @@ function Ge(t) {
|
|
|
427
427
|
r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
428
428
|
const o = te(r), a = L(t, 0);
|
|
429
429
|
a.setFullYear(e, 0, 4), a.setHours(0, 0, 0, 0);
|
|
430
|
-
const
|
|
431
|
-
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >=
|
|
430
|
+
const i = te(a);
|
|
431
|
+
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >= i.getTime() ? e : e - 1;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Ve(t) {
|
|
434
434
|
const n = q(t);
|
|
435
435
|
return n.setHours(0, 0, 0, 0), n;
|
|
436
436
|
}
|
|
@@ -449,7 +449,7 @@ function me(t) {
|
|
|
449
449
|
return e.setUTCFullYear(n.getFullYear()), +t - +e;
|
|
450
450
|
}
|
|
451
451
|
function cn(t, n) {
|
|
452
|
-
const e =
|
|
452
|
+
const e = Ve(t), r = Ve(n), o = +e - me(e), a = +r - me(r);
|
|
453
453
|
return Math.round((o - a) / on);
|
|
454
454
|
}
|
|
455
455
|
function dn(t) {
|
|
@@ -583,11 +583,11 @@ function ue(t) {
|
|
|
583
583
|
const r = e != null && e.context ? String(e.context) : "standalone";
|
|
584
584
|
let o;
|
|
585
585
|
if (r === "formatting" && t.formattingValues) {
|
|
586
|
-
const
|
|
587
|
-
o = t.formattingValues[
|
|
586
|
+
const i = t.defaultFormattingWidth || t.defaultWidth, s = e != null && e.width ? String(e.width) : i;
|
|
587
|
+
o = t.formattingValues[s] || t.formattingValues[i];
|
|
588
588
|
} else {
|
|
589
|
-
const
|
|
590
|
-
o = t.values[
|
|
589
|
+
const i = t.defaultWidth, s = e != null && e.width ? String(e.width) : t.defaultWidth;
|
|
590
|
+
o = t.values[s] || t.values[i];
|
|
591
591
|
}
|
|
592
592
|
const a = t.argumentCallback ? t.argumentCallback(n) : n;
|
|
593
593
|
return o[a];
|
|
@@ -597,11 +597,11 @@ const Tn = {
|
|
|
597
597
|
narrow: ["B", "A"],
|
|
598
598
|
abbreviated: ["BC", "AD"],
|
|
599
599
|
wide: ["Before Christ", "Anno Domini"]
|
|
600
|
-
},
|
|
600
|
+
}, Mn = {
|
|
601
601
|
narrow: ["1", "2", "3", "4"],
|
|
602
602
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
603
603
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
604
|
-
},
|
|
604
|
+
}, Cn = {
|
|
605
605
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
606
606
|
abbreviated: [
|
|
607
607
|
"Jan",
|
|
@@ -725,12 +725,12 @@ const Tn = {
|
|
|
725
725
|
defaultWidth: "wide"
|
|
726
726
|
}),
|
|
727
727
|
quarter: ue({
|
|
728
|
-
values:
|
|
728
|
+
values: Mn,
|
|
729
729
|
defaultWidth: "wide",
|
|
730
730
|
argumentCallback: (t) => t - 1
|
|
731
731
|
}),
|
|
732
732
|
month: ue({
|
|
733
|
-
values:
|
|
733
|
+
values: Cn,
|
|
734
734
|
defaultWidth: "wide"
|
|
735
735
|
}),
|
|
736
736
|
day: ue({
|
|
@@ -749,16 +749,16 @@ function le(t) {
|
|
|
749
749
|
const r = e.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = n.match(o);
|
|
750
750
|
if (!a)
|
|
751
751
|
return null;
|
|
752
|
-
const
|
|
752
|
+
const i = a[0], s = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], p = Array.isArray(s) ? Fn(s, (u) => u.test(i)) : (
|
|
753
753
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
754
|
-
Bn(
|
|
754
|
+
Bn(s, (u) => u.test(i))
|
|
755
755
|
);
|
|
756
756
|
let c;
|
|
757
757
|
c = t.valueCallback ? t.valueCallback(p) : p, c = e.valueCallback ? (
|
|
758
758
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
759
759
|
e.valueCallback(c)
|
|
760
760
|
) : c;
|
|
761
|
-
const d = n.slice(
|
|
761
|
+
const d = n.slice(i.length);
|
|
762
762
|
return { value: c, rest: d };
|
|
763
763
|
};
|
|
764
764
|
}
|
|
@@ -778,13 +778,13 @@ function En(t) {
|
|
|
778
778
|
if (!r) return null;
|
|
779
779
|
const o = r[0], a = n.match(t.parsePattern);
|
|
780
780
|
if (!a) return null;
|
|
781
|
-
let
|
|
782
|
-
|
|
783
|
-
const
|
|
784
|
-
return { value:
|
|
781
|
+
let i = t.valueCallback ? t.valueCallback(a[0]) : a[0];
|
|
782
|
+
i = e.valueCallback ? e.valueCallback(i) : i;
|
|
783
|
+
const s = n.slice(o.length);
|
|
784
|
+
return { value: i, rest: s };
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
|
-
const
|
|
787
|
+
const Sn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Nn = {
|
|
788
788
|
narrow: /^(b|a)/i,
|
|
789
789
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
790
790
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
@@ -794,9 +794,9 @@ const Vn = /^(\d+)(th|st|nd|rd)?/i, Sn = /\d+/i, Nn = {
|
|
|
794
794
|
narrow: /^[1234]/i,
|
|
795
795
|
abbreviated: /^q[1234]/i,
|
|
796
796
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
797
|
-
}, In = {
|
|
798
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
799
797
|
}, Wn = {
|
|
798
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
799
|
+
}, In = {
|
|
800
800
|
narrow: /^[jfmasond]/i,
|
|
801
801
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
802
802
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
@@ -853,8 +853,8 @@ const Vn = /^(\d+)(th|st|nd|rd)?/i, Sn = /\d+/i, Nn = {
|
|
|
853
853
|
}
|
|
854
854
|
}, Qn = {
|
|
855
855
|
ordinalNumber: En({
|
|
856
|
-
matchPattern:
|
|
857
|
-
parsePattern:
|
|
856
|
+
matchPattern: Sn,
|
|
857
|
+
parsePattern: Vn,
|
|
858
858
|
valueCallback: (t) => parseInt(t, 10)
|
|
859
859
|
}),
|
|
860
860
|
era: le({
|
|
@@ -866,12 +866,12 @@ const Vn = /^(\d+)(th|st|nd|rd)?/i, Sn = /\d+/i, Nn = {
|
|
|
866
866
|
quarter: le({
|
|
867
867
|
matchPatterns: An,
|
|
868
868
|
defaultMatchWidth: "wide",
|
|
869
|
-
parsePatterns:
|
|
869
|
+
parsePatterns: Wn,
|
|
870
870
|
defaultParseWidth: "any",
|
|
871
871
|
valueCallback: (t) => t + 1
|
|
872
872
|
}),
|
|
873
873
|
month: le({
|
|
874
|
-
matchPatterns:
|
|
874
|
+
matchPatterns: In,
|
|
875
875
|
defaultMatchWidth: "wide",
|
|
876
876
|
parsePatterns: Yn,
|
|
877
877
|
defaultParseWidth: "any"
|
|
@@ -910,16 +910,16 @@ function ze(t) {
|
|
|
910
910
|
}
|
|
911
911
|
function De(t, n) {
|
|
912
912
|
var d, u, l, h;
|
|
913
|
-
const e = q(t), r = e.getFullYear(), o = re(), a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((u = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : u.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((h = (l = o.locale) == null ? void 0 : l.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1,
|
|
914
|
-
|
|
915
|
-
const
|
|
913
|
+
const e = q(t), r = e.getFullYear(), o = re(), a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((u = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : u.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((h = (l = o.locale) == null ? void 0 : l.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, i = L(t, 0);
|
|
914
|
+
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
915
|
+
const s = z(i, n), p = L(t, 0);
|
|
916
916
|
p.setFullYear(r, 0, a), p.setHours(0, 0, 0, 0);
|
|
917
917
|
const c = z(p, n);
|
|
918
|
-
return e.getTime() >=
|
|
918
|
+
return e.getTime() >= s.getTime() ? r + 1 : e.getTime() >= c.getTime() ? r : r - 1;
|
|
919
919
|
}
|
|
920
920
|
function Gn(t, n) {
|
|
921
|
-
var
|
|
922
|
-
const e = re(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((p = (
|
|
921
|
+
var s, p, c, d;
|
|
922
|
+
const e = re(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((p = (s = n == null ? void 0 : n.locale) == null ? void 0 : s.options) == null ? void 0 : p.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = De(t, n), a = L(t, 0);
|
|
923
923
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), z(a, n);
|
|
924
924
|
}
|
|
925
925
|
function Ze(t, n) {
|
|
@@ -1021,8 +1021,8 @@ const X = {
|
|
|
1021
1021
|
Y: function(t, n, e, r) {
|
|
1022
1022
|
const o = De(t, r), a = o > 0 ? o : 1 - o;
|
|
1023
1023
|
if (n === "YY") {
|
|
1024
|
-
const
|
|
1025
|
-
return D(
|
|
1024
|
+
const i = a % 100;
|
|
1025
|
+
return D(i, 2);
|
|
1026
1026
|
}
|
|
1027
1027
|
return n === "Yo" ? e.ordinalNumber(a, { unit: "year" }) : D(a, n.length);
|
|
1028
1028
|
},
|
|
@@ -1492,7 +1492,7 @@ function Z(t, n = "") {
|
|
|
1492
1492
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = D(Math.trunc(r / 60), 2), a = D(r % 60, 2);
|
|
1493
1493
|
return e + o + n + a;
|
|
1494
1494
|
}
|
|
1495
|
-
const
|
|
1495
|
+
const We = (t, n) => {
|
|
1496
1496
|
switch (t) {
|
|
1497
1497
|
case "P":
|
|
1498
1498
|
return n.date({ width: "short" });
|
|
@@ -1519,7 +1519,7 @@ const Ie = (t, n) => {
|
|
|
1519
1519
|
}, Un = (t, n) => {
|
|
1520
1520
|
const e = t.match(/(P+)(p+)?/) || [], r = e[1], o = e[2];
|
|
1521
1521
|
if (!o)
|
|
1522
|
-
return
|
|
1522
|
+
return We(t, n);
|
|
1523
1523
|
let a;
|
|
1524
1524
|
switch (r) {
|
|
1525
1525
|
case "P":
|
|
@@ -1536,7 +1536,7 @@ const Ie = (t, n) => {
|
|
|
1536
1536
|
a = n.dateTime({ width: "full" });
|
|
1537
1537
|
break;
|
|
1538
1538
|
}
|
|
1539
|
-
return a.replace("{{date}}",
|
|
1539
|
+
return a.replace("{{date}}", We(r, n)).replace("{{time}}", Je(o, n));
|
|
1540
1540
|
}, xe = {
|
|
1541
1541
|
p: Je,
|
|
1542
1542
|
P: Un
|
|
@@ -1556,44 +1556,44 @@ function Jn(t, n, e) {
|
|
|
1556
1556
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1557
1557
|
}
|
|
1558
1558
|
const Kn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, er = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, tr = /^'([^]*?)'?$/, nr = /''/g, rr = /[a-zA-Z]/;
|
|
1559
|
-
function
|
|
1559
|
+
function Ie(t, n, e) {
|
|
1560
1560
|
var d, u, l, h;
|
|
1561
|
-
const r = re(), o = r.locale ?? Xe, a = r.firstWeekContainsDate ?? ((u = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1,
|
|
1562
|
-
if (!Ue(
|
|
1561
|
+
const r = re(), o = r.locale ?? Xe, a = r.firstWeekContainsDate ?? ((u = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : u.firstWeekContainsDate) ?? 1, i = r.weekStartsOn ?? ((h = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : h.weekStartsOn) ?? 0, s = q(t);
|
|
1562
|
+
if (!Ue(s))
|
|
1563
1563
|
throw new RangeError("Invalid time value");
|
|
1564
1564
|
let p = n.match(er).map((y) => {
|
|
1565
|
-
const
|
|
1566
|
-
if (
|
|
1567
|
-
const O = xe[
|
|
1565
|
+
const M = y[0];
|
|
1566
|
+
if (M === "p" || M === "P") {
|
|
1567
|
+
const O = xe[M];
|
|
1568
1568
|
return O(y, o.formatLong);
|
|
1569
1569
|
}
|
|
1570
1570
|
return y;
|
|
1571
1571
|
}).join("").match(Kn).map((y) => {
|
|
1572
1572
|
if (y === "''")
|
|
1573
1573
|
return { isToken: !1, value: "'" };
|
|
1574
|
-
const
|
|
1575
|
-
if (
|
|
1574
|
+
const M = y[0];
|
|
1575
|
+
if (M === "'")
|
|
1576
1576
|
return { isToken: !1, value: or(y) };
|
|
1577
|
-
if (Ne[
|
|
1577
|
+
if (Ne[M])
|
|
1578
1578
|
return { isToken: !0, value: y };
|
|
1579
|
-
if (
|
|
1579
|
+
if (M.match(rr))
|
|
1580
1580
|
throw new RangeError(
|
|
1581
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1581
|
+
"Format string contains an unescaped latin alphabet character `" + M + "`"
|
|
1582
1582
|
);
|
|
1583
1583
|
return { isToken: !1, value: y };
|
|
1584
1584
|
});
|
|
1585
|
-
o.localize.preprocessor && (p = o.localize.preprocessor(
|
|
1585
|
+
o.localize.preprocessor && (p = o.localize.preprocessor(s, p));
|
|
1586
1586
|
const c = {
|
|
1587
1587
|
firstWeekContainsDate: a,
|
|
1588
|
-
weekStartsOn:
|
|
1588
|
+
weekStartsOn: i,
|
|
1589
1589
|
locale: o
|
|
1590
1590
|
};
|
|
1591
1591
|
return p.map((y) => {
|
|
1592
1592
|
if (!y.isToken) return y.value;
|
|
1593
|
-
const
|
|
1594
|
-
(et(
|
|
1595
|
-
const O = Ne[
|
|
1596
|
-
return O(
|
|
1593
|
+
const M = y.value;
|
|
1594
|
+
(et(M) || Ke(M)) && Te(M, n, String(t));
|
|
1595
|
+
const O = Ne[M[0]];
|
|
1596
|
+
return O(s, M, o.localize, c);
|
|
1597
1597
|
}).join("");
|
|
1598
1598
|
}
|
|
1599
1599
|
function or(t) {
|
|
@@ -1691,7 +1691,7 @@ class dr extends P {
|
|
|
1691
1691
|
return r.era = o, e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
|
-
const
|
|
1694
|
+
const W = {
|
|
1695
1695
|
month: /^(1[0-2]|0?\d)/,
|
|
1696
1696
|
// 0 to 12
|
|
1697
1697
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -1736,7 +1736,7 @@ const I = {
|
|
|
1736
1736
|
extended: /^([+-])(\d{2}):(\d{2})|Z/,
|
|
1737
1737
|
extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
|
|
1738
1738
|
};
|
|
1739
|
-
function
|
|
1739
|
+
function I(t, n) {
|
|
1740
1740
|
return t && {
|
|
1741
1741
|
value: n(t.value),
|
|
1742
1742
|
rest: t.rest
|
|
@@ -1758,25 +1758,25 @@ function U(t, n) {
|
|
|
1758
1758
|
value: 0,
|
|
1759
1759
|
rest: n.slice(1)
|
|
1760
1760
|
};
|
|
1761
|
-
const r = e[1] === "+" ? 1 : -1, o = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0,
|
|
1761
|
+
const r = e[1] === "+" ? 1 : -1, o = e[2] ? parseInt(e[2], 10) : 0, a = e[3] ? parseInt(e[3], 10) : 0, i = e[5] ? parseInt(e[5], 10) : 0;
|
|
1762
1762
|
return {
|
|
1763
|
-
value: r * (o * sn + a * an +
|
|
1763
|
+
value: r * (o * sn + a * an + i * un),
|
|
1764
1764
|
rest: n.slice(e[0].length)
|
|
1765
1765
|
};
|
|
1766
1766
|
}
|
|
1767
1767
|
function nt(t) {
|
|
1768
|
-
return N(
|
|
1768
|
+
return N(W.anyDigitsSigned, t);
|
|
1769
1769
|
}
|
|
1770
1770
|
function A(t, n) {
|
|
1771
1771
|
switch (t) {
|
|
1772
1772
|
case 1:
|
|
1773
|
-
return N(
|
|
1773
|
+
return N(W.singleDigit, n);
|
|
1774
1774
|
case 2:
|
|
1775
|
-
return N(
|
|
1775
|
+
return N(W.twoDigits, n);
|
|
1776
1776
|
case 3:
|
|
1777
|
-
return N(
|
|
1777
|
+
return N(W.threeDigits, n);
|
|
1778
1778
|
case 4:
|
|
1779
|
-
return N(
|
|
1779
|
+
return N(W.fourDigits, n);
|
|
1780
1780
|
default:
|
|
1781
1781
|
return N(new RegExp("^\\d{1," + t + "}"), n);
|
|
1782
1782
|
}
|
|
@@ -1784,13 +1784,13 @@ function A(t, n) {
|
|
|
1784
1784
|
function he(t, n) {
|
|
1785
1785
|
switch (t) {
|
|
1786
1786
|
case 1:
|
|
1787
|
-
return N(
|
|
1787
|
+
return N(W.singleDigitSigned, n);
|
|
1788
1788
|
case 2:
|
|
1789
|
-
return N(
|
|
1789
|
+
return N(W.twoDigitsSigned, n);
|
|
1790
1790
|
case 3:
|
|
1791
|
-
return N(
|
|
1791
|
+
return N(W.threeDigitsSigned, n);
|
|
1792
1792
|
case 4:
|
|
1793
|
-
return N(
|
|
1793
|
+
return N(W.fourDigitsSigned, n);
|
|
1794
1794
|
default:
|
|
1795
1795
|
return N(new RegExp("^-?\\d{1," + t + "}"), n);
|
|
1796
1796
|
}
|
|
@@ -1818,8 +1818,8 @@ function rt(t, n) {
|
|
|
1818
1818
|
if (r <= 50)
|
|
1819
1819
|
o = t || 100;
|
|
1820
1820
|
else {
|
|
1821
|
-
const a = r + 50,
|
|
1822
|
-
o = t +
|
|
1821
|
+
const a = r + 50, i = Math.trunc(a / 100) * 100, s = t >= a % 100;
|
|
1822
|
+
o = t + i - (s ? 100 : 0);
|
|
1823
1823
|
}
|
|
1824
1824
|
return e ? o : 1 - o;
|
|
1825
1825
|
}
|
|
@@ -1833,22 +1833,22 @@ class fr extends P {
|
|
|
1833
1833
|
f(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
|
|
1834
1834
|
}
|
|
1835
1835
|
parse(e, r, o) {
|
|
1836
|
-
const a = (
|
|
1837
|
-
year:
|
|
1836
|
+
const a = (i) => ({
|
|
1837
|
+
year: i,
|
|
1838
1838
|
isTwoDigitYear: r === "yy"
|
|
1839
1839
|
});
|
|
1840
1840
|
switch (r) {
|
|
1841
1841
|
case "y":
|
|
1842
|
-
return
|
|
1842
|
+
return I(A(4, e), a);
|
|
1843
1843
|
case "yo":
|
|
1844
|
-
return
|
|
1844
|
+
return I(
|
|
1845
1845
|
o.ordinalNumber(e, {
|
|
1846
1846
|
unit: "year"
|
|
1847
1847
|
}),
|
|
1848
1848
|
a
|
|
1849
1849
|
);
|
|
1850
1850
|
default:
|
|
1851
|
-
return
|
|
1851
|
+
return I(A(r.length, e), a);
|
|
1852
1852
|
}
|
|
1853
1853
|
}
|
|
1854
1854
|
validate(e, r) {
|
|
@@ -1857,14 +1857,14 @@ class fr extends P {
|
|
|
1857
1857
|
set(e, r, o) {
|
|
1858
1858
|
const a = e.getFullYear();
|
|
1859
1859
|
if (o.isTwoDigitYear) {
|
|
1860
|
-
const
|
|
1860
|
+
const s = rt(
|
|
1861
1861
|
o.year,
|
|
1862
1862
|
a
|
|
1863
1863
|
);
|
|
1864
|
-
return e.setFullYear(
|
|
1864
|
+
return e.setFullYear(s, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1865
1865
|
}
|
|
1866
|
-
const
|
|
1867
|
-
return e.setFullYear(
|
|
1866
|
+
const i = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1867
|
+
return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
1870
|
class pr extends P {
|
|
@@ -1888,33 +1888,33 @@ class pr extends P {
|
|
|
1888
1888
|
]);
|
|
1889
1889
|
}
|
|
1890
1890
|
parse(e, r, o) {
|
|
1891
|
-
const a = (
|
|
1892
|
-
year:
|
|
1891
|
+
const a = (i) => ({
|
|
1892
|
+
year: i,
|
|
1893
1893
|
isTwoDigitYear: r === "YY"
|
|
1894
1894
|
});
|
|
1895
1895
|
switch (r) {
|
|
1896
1896
|
case "Y":
|
|
1897
|
-
return
|
|
1897
|
+
return I(A(4, e), a);
|
|
1898
1898
|
case "Yo":
|
|
1899
|
-
return
|
|
1899
|
+
return I(
|
|
1900
1900
|
o.ordinalNumber(e, {
|
|
1901
1901
|
unit: "year"
|
|
1902
1902
|
}),
|
|
1903
1903
|
a
|
|
1904
1904
|
);
|
|
1905
1905
|
default:
|
|
1906
|
-
return
|
|
1906
|
+
return I(A(r.length, e), a);
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
1909
|
validate(e, r) {
|
|
1910
1910
|
return r.isTwoDigitYear || r.year > 0;
|
|
1911
1911
|
}
|
|
1912
1912
|
set(e, r, o, a) {
|
|
1913
|
-
const
|
|
1913
|
+
const i = De(e, a);
|
|
1914
1914
|
if (o.isTwoDigitYear) {
|
|
1915
1915
|
const p = rt(
|
|
1916
1916
|
o.year,
|
|
1917
|
-
|
|
1917
|
+
i
|
|
1918
1918
|
);
|
|
1919
1919
|
return e.setFullYear(
|
|
1920
1920
|
p,
|
|
@@ -1922,8 +1922,8 @@ class pr extends P {
|
|
|
1922
1922
|
a.firstWeekContainsDate
|
|
1923
1923
|
), e.setHours(0, 0, 0, 0), z(e, a);
|
|
1924
1924
|
}
|
|
1925
|
-
const
|
|
1926
|
-
return e.setFullYear(
|
|
1925
|
+
const s = !("era" in r) || r.era === 1 ? o.year : 1 - o.year;
|
|
1926
|
+
return e.setFullYear(s, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), z(e, a);
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
1929
|
class mr extends P {
|
|
@@ -2114,17 +2114,17 @@ class br extends P {
|
|
|
2114
2114
|
f(this, "priority", 110);
|
|
2115
2115
|
}
|
|
2116
2116
|
parse(e, r, o) {
|
|
2117
|
-
const a = (
|
|
2117
|
+
const a = (i) => i - 1;
|
|
2118
2118
|
switch (r) {
|
|
2119
2119
|
case "M":
|
|
2120
|
-
return
|
|
2121
|
-
N(
|
|
2120
|
+
return I(
|
|
2121
|
+
N(W.month, e),
|
|
2122
2122
|
a
|
|
2123
2123
|
);
|
|
2124
2124
|
case "MM":
|
|
2125
|
-
return
|
|
2125
|
+
return I(A(2, e), a);
|
|
2126
2126
|
case "Mo":
|
|
2127
|
-
return
|
|
2127
|
+
return I(
|
|
2128
2128
|
o.ordinalNumber(e, {
|
|
2129
2129
|
unit: "month"
|
|
2130
2130
|
}),
|
|
@@ -2176,17 +2176,17 @@ class wr extends P {
|
|
|
2176
2176
|
]);
|
|
2177
2177
|
}
|
|
2178
2178
|
parse(e, r, o) {
|
|
2179
|
-
const a = (
|
|
2179
|
+
const a = (i) => i - 1;
|
|
2180
2180
|
switch (r) {
|
|
2181
2181
|
case "L":
|
|
2182
|
-
return
|
|
2183
|
-
N(
|
|
2182
|
+
return I(
|
|
2183
|
+
N(W.month, e),
|
|
2184
2184
|
a
|
|
2185
2185
|
);
|
|
2186
2186
|
case "LL":
|
|
2187
|
-
return
|
|
2187
|
+
return I(A(2, e), a);
|
|
2188
2188
|
case "Lo":
|
|
2189
|
-
return
|
|
2189
|
+
return I(
|
|
2190
2190
|
o.ordinalNumber(e, {
|
|
2191
2191
|
unit: "month"
|
|
2192
2192
|
}),
|
|
@@ -2244,7 +2244,7 @@ class xr extends P {
|
|
|
2244
2244
|
parse(e, r, o) {
|
|
2245
2245
|
switch (r) {
|
|
2246
2246
|
case "w":
|
|
2247
|
-
return N(
|
|
2247
|
+
return N(W.week, e);
|
|
2248
2248
|
case "wo":
|
|
2249
2249
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2250
2250
|
default:
|
|
@@ -2262,7 +2262,7 @@ function Tr(t, n) {
|
|
|
2262
2262
|
const e = q(t), r = ze(e) - n;
|
|
2263
2263
|
return e.setDate(e.getDate() - r * 7), e;
|
|
2264
2264
|
}
|
|
2265
|
-
class
|
|
2265
|
+
class Mr extends P {
|
|
2266
2266
|
constructor() {
|
|
2267
2267
|
super(...arguments);
|
|
2268
2268
|
f(this, "priority", 100);
|
|
@@ -2286,7 +2286,7 @@ class Cr extends P {
|
|
|
2286
2286
|
parse(e, r, o) {
|
|
2287
2287
|
switch (r) {
|
|
2288
2288
|
case "I":
|
|
2289
|
-
return N(
|
|
2289
|
+
return N(W.week, e);
|
|
2290
2290
|
case "Io":
|
|
2291
2291
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2292
2292
|
default:
|
|
@@ -2300,7 +2300,7 @@ class Cr extends P {
|
|
|
2300
2300
|
return te(Tr(e, o));
|
|
2301
2301
|
}
|
|
2302
2302
|
}
|
|
2303
|
-
const
|
|
2303
|
+
const Cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], kr = [
|
|
2304
2304
|
31,
|
|
2305
2305
|
29,
|
|
2306
2306
|
31,
|
|
@@ -2337,7 +2337,7 @@ class Pr extends P {
|
|
|
2337
2337
|
parse(e, r, o) {
|
|
2338
2338
|
switch (r) {
|
|
2339
2339
|
case "d":
|
|
2340
|
-
return N(
|
|
2340
|
+
return N(W.date, e);
|
|
2341
2341
|
case "do":
|
|
2342
2342
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2343
2343
|
default:
|
|
@@ -2345,8 +2345,8 @@ class Pr extends P {
|
|
|
2345
2345
|
}
|
|
2346
2346
|
}
|
|
2347
2347
|
validate(e, r) {
|
|
2348
|
-
const o = e.getFullYear(), a = ot(o),
|
|
2349
|
-
return a ? r >= 1 && r <= kr[
|
|
2348
|
+
const o = e.getFullYear(), a = ot(o), i = e.getMonth();
|
|
2349
|
+
return a ? r >= 1 && r <= kr[i] : r >= 1 && r <= Cr[i];
|
|
2350
2350
|
}
|
|
2351
2351
|
set(e, r, o) {
|
|
2352
2352
|
return e.setDate(o), e.setHours(0, 0, 0, 0), e;
|
|
@@ -2379,7 +2379,7 @@ class Dr extends P {
|
|
|
2379
2379
|
switch (r) {
|
|
2380
2380
|
case "D":
|
|
2381
2381
|
case "DD":
|
|
2382
|
-
return N(
|
|
2382
|
+
return N(W.dayOfYear, e);
|
|
2383
2383
|
case "Do":
|
|
2384
2384
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2385
2385
|
default:
|
|
@@ -2396,7 +2396,7 @@ class Dr extends P {
|
|
|
2396
2396
|
}
|
|
2397
2397
|
function He(t, n, e) {
|
|
2398
2398
|
var u, l, h, y;
|
|
2399
|
-
const r = re(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? r.weekStartsOn ?? ((y = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : y.weekStartsOn) ?? 0, a = q(t),
|
|
2399
|
+
const r = re(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : l.weekStartsOn) ?? r.weekStartsOn ?? ((y = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : y.weekStartsOn) ?? 0, a = q(t), i = a.getDay(), p = (n % 7 + 7) % 7, c = 7 - o, d = n < 0 || n > 6 ? n - (i + c) % 7 : (p + c) % 7 - (i + c) % 7;
|
|
2400
2400
|
return Qe(a, d);
|
|
2401
2401
|
}
|
|
2402
2402
|
class Or extends P {
|
|
@@ -2459,20 +2459,20 @@ class Hr extends P {
|
|
|
2459
2459
|
]);
|
|
2460
2460
|
}
|
|
2461
2461
|
parse(e, r, o, a) {
|
|
2462
|
-
const
|
|
2463
|
-
const p = Math.floor((
|
|
2464
|
-
return (
|
|
2462
|
+
const i = (s) => {
|
|
2463
|
+
const p = Math.floor((s - 1) / 7) * 7;
|
|
2464
|
+
return (s + a.weekStartsOn + 6) % 7 + p;
|
|
2465
2465
|
};
|
|
2466
2466
|
switch (r) {
|
|
2467
2467
|
case "e":
|
|
2468
2468
|
case "ee":
|
|
2469
|
-
return
|
|
2469
|
+
return I(A(r.length, e), i);
|
|
2470
2470
|
case "eo":
|
|
2471
|
-
return
|
|
2471
|
+
return I(
|
|
2472
2472
|
o.ordinalNumber(e, {
|
|
2473
2473
|
unit: "day"
|
|
2474
2474
|
}),
|
|
2475
|
-
|
|
2475
|
+
i
|
|
2476
2476
|
);
|
|
2477
2477
|
case "eee":
|
|
2478
2478
|
return o.day(e, {
|
|
@@ -2524,20 +2524,20 @@ class Br extends P {
|
|
|
2524
2524
|
]);
|
|
2525
2525
|
}
|
|
2526
2526
|
parse(e, r, o, a) {
|
|
2527
|
-
const
|
|
2528
|
-
const p = Math.floor((
|
|
2529
|
-
return (
|
|
2527
|
+
const i = (s) => {
|
|
2528
|
+
const p = Math.floor((s - 1) / 7) * 7;
|
|
2529
|
+
return (s + a.weekStartsOn + 6) % 7 + p;
|
|
2530
2530
|
};
|
|
2531
2531
|
switch (r) {
|
|
2532
2532
|
case "c":
|
|
2533
2533
|
case "cc":
|
|
2534
|
-
return
|
|
2534
|
+
return I(A(r.length, e), i);
|
|
2535
2535
|
case "co":
|
|
2536
|
-
return
|
|
2536
|
+
return I(
|
|
2537
2537
|
o.ordinalNumber(e, {
|
|
2538
2538
|
unit: "day"
|
|
2539
2539
|
}),
|
|
2540
|
-
|
|
2540
|
+
i
|
|
2541
2541
|
);
|
|
2542
2542
|
case "ccc":
|
|
2543
2543
|
return o.day(e, {
|
|
@@ -2593,7 +2593,7 @@ class Er extends P {
|
|
|
2593
2593
|
]);
|
|
2594
2594
|
}
|
|
2595
2595
|
parse(e, r, o) {
|
|
2596
|
-
const a = (
|
|
2596
|
+
const a = (i) => i === 0 ? 7 : i;
|
|
2597
2597
|
switch (r) {
|
|
2598
2598
|
case "i":
|
|
2599
2599
|
case "ii":
|
|
@@ -2601,7 +2601,7 @@ class Er extends P {
|
|
|
2601
2601
|
case "io":
|
|
2602
2602
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2603
2603
|
case "iii":
|
|
2604
|
-
return
|
|
2604
|
+
return I(
|
|
2605
2605
|
o.day(e, {
|
|
2606
2606
|
width: "abbreviated",
|
|
2607
2607
|
context: "formatting"
|
|
@@ -2615,7 +2615,7 @@ class Er extends P {
|
|
|
2615
2615
|
a
|
|
2616
2616
|
);
|
|
2617
2617
|
case "iiiii":
|
|
2618
|
-
return
|
|
2618
|
+
return I(
|
|
2619
2619
|
o.day(e, {
|
|
2620
2620
|
width: "narrow",
|
|
2621
2621
|
context: "formatting"
|
|
@@ -2623,7 +2623,7 @@ class Er extends P {
|
|
|
2623
2623
|
a
|
|
2624
2624
|
);
|
|
2625
2625
|
case "iiiiii":
|
|
2626
|
-
return
|
|
2626
|
+
return I(
|
|
2627
2627
|
o.day(e, {
|
|
2628
2628
|
width: "short",
|
|
2629
2629
|
context: "formatting"
|
|
@@ -2635,7 +2635,7 @@ class Er extends P {
|
|
|
2635
2635
|
);
|
|
2636
2636
|
case "iiii":
|
|
2637
2637
|
default:
|
|
2638
|
-
return
|
|
2638
|
+
return I(
|
|
2639
2639
|
o.day(e, {
|
|
2640
2640
|
width: "wide",
|
|
2641
2641
|
context: "formatting"
|
|
@@ -2660,7 +2660,7 @@ class Er extends P {
|
|
|
2660
2660
|
return e = Fr(e, o), e.setHours(0, 0, 0, 0), e;
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
|
-
class
|
|
2663
|
+
class Sr extends P {
|
|
2664
2664
|
constructor() {
|
|
2665
2665
|
super(...arguments);
|
|
2666
2666
|
f(this, "priority", 80);
|
|
@@ -2701,7 +2701,7 @@ class Vr extends P {
|
|
|
2701
2701
|
return e.setHours(Oe(o), 0, 0, 0), e;
|
|
2702
2702
|
}
|
|
2703
2703
|
}
|
|
2704
|
-
class
|
|
2704
|
+
class Vr extends P {
|
|
2705
2705
|
constructor() {
|
|
2706
2706
|
super(...arguments);
|
|
2707
2707
|
f(this, "priority", 80);
|
|
@@ -2792,7 +2792,7 @@ class Lr extends P {
|
|
|
2792
2792
|
parse(e, r, o) {
|
|
2793
2793
|
switch (r) {
|
|
2794
2794
|
case "h":
|
|
2795
|
-
return N(
|
|
2795
|
+
return N(W.hour12h, e);
|
|
2796
2796
|
case "ho":
|
|
2797
2797
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2798
2798
|
default:
|
|
@@ -2816,7 +2816,7 @@ class Ar extends P {
|
|
|
2816
2816
|
parse(e, r, o) {
|
|
2817
2817
|
switch (r) {
|
|
2818
2818
|
case "H":
|
|
2819
|
-
return N(
|
|
2819
|
+
return N(W.hour23h, e);
|
|
2820
2820
|
case "Ho":
|
|
2821
2821
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2822
2822
|
default:
|
|
@@ -2830,7 +2830,7 @@ class Ar extends P {
|
|
|
2830
2830
|
return e.setHours(o, 0, 0, 0), e;
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
|
-
class
|
|
2833
|
+
class Wr extends P {
|
|
2834
2834
|
constructor() {
|
|
2835
2835
|
super(...arguments);
|
|
2836
2836
|
f(this, "priority", 70);
|
|
@@ -2839,7 +2839,7 @@ class Ir extends P {
|
|
|
2839
2839
|
parse(e, r, o) {
|
|
2840
2840
|
switch (r) {
|
|
2841
2841
|
case "K":
|
|
2842
|
-
return N(
|
|
2842
|
+
return N(W.hour11h, e);
|
|
2843
2843
|
case "Ko":
|
|
2844
2844
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2845
2845
|
default:
|
|
@@ -2853,7 +2853,7 @@ class Ir extends P {
|
|
|
2853
2853
|
return e.getHours() >= 12 && o < 12 ? e.setHours(o + 12, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2854
2854
|
}
|
|
2855
2855
|
}
|
|
2856
|
-
class
|
|
2856
|
+
class Ir extends P {
|
|
2857
2857
|
constructor() {
|
|
2858
2858
|
super(...arguments);
|
|
2859
2859
|
f(this, "priority", 70);
|
|
@@ -2862,7 +2862,7 @@ class Wr extends P {
|
|
|
2862
2862
|
parse(e, r, o) {
|
|
2863
2863
|
switch (r) {
|
|
2864
2864
|
case "k":
|
|
2865
|
-
return N(
|
|
2865
|
+
return N(W.hour24h, e);
|
|
2866
2866
|
case "ko":
|
|
2867
2867
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2868
2868
|
default:
|
|
@@ -2886,7 +2886,7 @@ class Yr extends P {
|
|
|
2886
2886
|
parse(e, r, o) {
|
|
2887
2887
|
switch (r) {
|
|
2888
2888
|
case "m":
|
|
2889
|
-
return N(
|
|
2889
|
+
return N(W.minute, e);
|
|
2890
2890
|
case "mo":
|
|
2891
2891
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2892
2892
|
default:
|
|
@@ -2909,7 +2909,7 @@ class qr extends P {
|
|
|
2909
2909
|
parse(e, r, o) {
|
|
2910
2910
|
switch (r) {
|
|
2911
2911
|
case "s":
|
|
2912
|
-
return N(
|
|
2912
|
+
return N(W.second, e);
|
|
2913
2913
|
case "so":
|
|
2914
2914
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2915
2915
|
default:
|
|
@@ -2931,7 +2931,7 @@ class _r extends P {
|
|
|
2931
2931
|
}
|
|
2932
2932
|
parse(e, r) {
|
|
2933
2933
|
const o = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
|
|
2934
|
-
return
|
|
2934
|
+
return I(A(r.length, e), o);
|
|
2935
2935
|
}
|
|
2936
2936
|
set(e, r, o) {
|
|
2937
2937
|
return e.setMilliseconds(o), e;
|
|
@@ -3048,20 +3048,20 @@ const Gr = {
|
|
|
3048
3048
|
M: new br(),
|
|
3049
3049
|
L: new wr(),
|
|
3050
3050
|
w: new xr(),
|
|
3051
|
-
I: new
|
|
3051
|
+
I: new Mr(),
|
|
3052
3052
|
d: new Pr(),
|
|
3053
3053
|
D: new Dr(),
|
|
3054
3054
|
E: new Or(),
|
|
3055
3055
|
e: new Hr(),
|
|
3056
3056
|
c: new Br(),
|
|
3057
3057
|
i: new Er(),
|
|
3058
|
-
a: new
|
|
3059
|
-
b: new
|
|
3058
|
+
a: new Sr(),
|
|
3059
|
+
b: new Vr(),
|
|
3060
3060
|
B: new Nr(),
|
|
3061
3061
|
h: new Lr(),
|
|
3062
3062
|
H: new Ar(),
|
|
3063
|
-
K: new
|
|
3064
|
-
k: new
|
|
3063
|
+
K: new Wr(),
|
|
3064
|
+
k: new Ir(),
|
|
3065
3065
|
m: new Yr(),
|
|
3066
3066
|
s: new qr(),
|
|
3067
3067
|
S: new _r(),
|
|
@@ -3071,30 +3071,30 @@ const Gr = {
|
|
|
3071
3071
|
T: new $r()
|
|
3072
3072
|
}, Ur = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Xr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, zr = /^'([^]*?)'?$/, Zr = /''/g, Jr = /\S/, Kr = /[a-zA-Z]/;
|
|
3073
3073
|
function Ye(t, n, e, r) {
|
|
3074
|
-
var
|
|
3075
|
-
const o = ar(), a = o.locale ?? Xe,
|
|
3074
|
+
var M, O, Y, _;
|
|
3075
|
+
const o = ar(), a = o.locale ?? Xe, i = o.firstWeekContainsDate ?? ((O = (M = o.locale) == null ? void 0 : M.options) == null ? void 0 : O.firstWeekContainsDate) ?? 1, s = o.weekStartsOn ?? ((_ = (Y = o.locale) == null ? void 0 : Y.options) == null ? void 0 : _.weekStartsOn) ?? 0;
|
|
3076
3076
|
if (n === "")
|
|
3077
3077
|
return t === "" ? q(e) : L(e, NaN);
|
|
3078
3078
|
const p = {
|
|
3079
|
-
firstWeekContainsDate:
|
|
3080
|
-
weekStartsOn:
|
|
3079
|
+
firstWeekContainsDate: i,
|
|
3080
|
+
weekStartsOn: s,
|
|
3081
3081
|
locale: a
|
|
3082
3082
|
}, c = [new cr()], d = n.match(Xr).map((g) => {
|
|
3083
|
-
const
|
|
3084
|
-
if (
|
|
3085
|
-
const E = xe[
|
|
3083
|
+
const C = g[0];
|
|
3084
|
+
if (C in xe) {
|
|
3085
|
+
const E = xe[C];
|
|
3086
3086
|
return E(g, a.formatLong);
|
|
3087
3087
|
}
|
|
3088
3088
|
return g;
|
|
3089
3089
|
}).join("").match(Ur), u = [];
|
|
3090
3090
|
for (let g of d) {
|
|
3091
3091
|
et(g) && Te(g, n, t), Ke(g) && Te(g, n, t);
|
|
3092
|
-
const
|
|
3092
|
+
const C = g[0], E = Gr[C];
|
|
3093
3093
|
if (E) {
|
|
3094
3094
|
const { incompatibleTokens: k } = E;
|
|
3095
3095
|
if (Array.isArray(k)) {
|
|
3096
3096
|
const H = u.find(
|
|
3097
|
-
(T) => k.includes(T.token) || T.token ===
|
|
3097
|
+
(T) => k.includes(T.token) || T.token === C
|
|
3098
3098
|
);
|
|
3099
3099
|
if (H)
|
|
3100
3100
|
throw new RangeError(
|
|
@@ -3104,7 +3104,7 @@ function Ye(t, n, e, r) {
|
|
|
3104
3104
|
throw new RangeError(
|
|
3105
3105
|
`The format string mustn't contain \`${g}\` and any other token at the same time`
|
|
3106
3106
|
);
|
|
3107
|
-
u.push({ token:
|
|
3107
|
+
u.push({ token: C, fullToken: g });
|
|
3108
3108
|
const F = E.run(
|
|
3109
3109
|
t,
|
|
3110
3110
|
g,
|
|
@@ -3115,11 +3115,11 @@ function Ye(t, n, e, r) {
|
|
|
3115
3115
|
return L(e, NaN);
|
|
3116
3116
|
c.push(F.setter), t = F.rest;
|
|
3117
3117
|
} else {
|
|
3118
|
-
if (
|
|
3118
|
+
if (C.match(Kr))
|
|
3119
3119
|
throw new RangeError(
|
|
3120
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
3120
|
+
"Format string contains an unescaped latin alphabet character `" + C + "`"
|
|
3121
3121
|
);
|
|
3122
|
-
if (g === "''" ? g = "'" :
|
|
3122
|
+
if (g === "''" ? g = "'" : C === "'" && (g = eo(g)), t.indexOf(g) === 0)
|
|
3123
3123
|
t = t.slice(g.length);
|
|
3124
3124
|
else
|
|
3125
3125
|
return L(e, NaN);
|
|
@@ -3127,8 +3127,8 @@ function Ye(t, n, e, r) {
|
|
|
3127
3127
|
}
|
|
3128
3128
|
if (t.length > 0 && Jr.test(t))
|
|
3129
3129
|
return L(e, NaN);
|
|
3130
|
-
const l = c.map((g) => g.priority).sort((g,
|
|
3131
|
-
(g) => c.filter((
|
|
3130
|
+
const l = c.map((g) => g.priority).sort((g, C) => C - g).filter((g, C, E) => E.indexOf(g) === C).map(
|
|
3131
|
+
(g) => c.filter((C) => C.priority === g).sort((C, E) => E.subPriority - C.subPriority)
|
|
3132
3132
|
).map((g) => g[0]);
|
|
3133
3133
|
let h = q(e);
|
|
3134
3134
|
if (isNaN(h.getTime()))
|
|
@@ -3137,8 +3137,8 @@ function Ye(t, n, e, r) {
|
|
|
3137
3137
|
for (const g of l) {
|
|
3138
3138
|
if (!g.validate(h, p))
|
|
3139
3139
|
return L(e, NaN);
|
|
3140
|
-
const
|
|
3141
|
-
Array.isArray(
|
|
3140
|
+
const C = g.set(h, y, p);
|
|
3141
|
+
Array.isArray(C) ? (h = C[0], Object.assign(y, C[1])) : h = C;
|
|
3142
3142
|
}
|
|
3143
3143
|
return L(e, h);
|
|
3144
3144
|
}
|
|
@@ -3153,7 +3153,7 @@ function at(t, n = "hh:mm:ss") {
|
|
|
3153
3153
|
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), Ye(t.toLowerCase(), n, /* @__PURE__ */ new Date())) : Ye(t, n, /* @__PURE__ */ new Date());
|
|
3154
3154
|
}
|
|
3155
3155
|
function it(t, n = "hh:mm:ss", e = "AM") {
|
|
3156
|
-
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3156
|
+
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), Ie(t, n).toUpperCase()) : Ie(t, n);
|
|
3157
3157
|
}
|
|
3158
3158
|
function st(t, n) {
|
|
3159
3159
|
let e = t || "hh:mm:ss";
|
|
@@ -3345,11 +3345,11 @@ function oo() {
|
|
|
3345
3345
|
}
|
|
3346
3346
|
const ao = oo();
|
|
3347
3347
|
function io(t, n, e, r, o, a) {
|
|
3348
|
-
function
|
|
3349
|
-
const
|
|
3348
|
+
function i(d, u, l = 0, h, y) {
|
|
3349
|
+
const M = s(u, h, y), O = d.children[0].children[M] || d.children[0].children[0];
|
|
3350
3350
|
p(d, O.offsetTop, l);
|
|
3351
3351
|
}
|
|
3352
|
-
function
|
|
3352
|
+
function s(d, u, l) {
|
|
3353
3353
|
if (u === "hour") {
|
|
3354
3354
|
const h = t.disabledHours && t.disabledHours();
|
|
3355
3355
|
return c(
|
|
@@ -3389,39 +3389,39 @@ function io(t, n, e, r, o, a) {
|
|
|
3389
3389
|
function c(d, u) {
|
|
3390
3390
|
return d && d.length && t.hideDisabledElements ? u - d.reduce((l, h) => l + (h < u ? 1 : 0), 0) : u;
|
|
3391
3391
|
}
|
|
3392
|
-
return { scrollToSelected:
|
|
3392
|
+
return { scrollToSelected: i };
|
|
3393
3393
|
}
|
|
3394
3394
|
function so(t, n) {
|
|
3395
|
-
function e(
|
|
3396
|
-
return
|
|
3395
|
+
function e(s) {
|
|
3396
|
+
return s.index === t.viewHours || !B(t.viewHours) && s.index === t.defaultViewHours;
|
|
3397
3397
|
}
|
|
3398
|
-
function r(
|
|
3399
|
-
return
|
|
3398
|
+
function r(s) {
|
|
3399
|
+
return s.index === t.minutes || !B(t.minutes) && s.index === t.defaultMinutes;
|
|
3400
3400
|
}
|
|
3401
|
-
function o(
|
|
3402
|
-
return
|
|
3401
|
+
function o(s) {
|
|
3402
|
+
return s.index === t.seconds || !B(t.seconds) && s.index === t.defaultSeconds;
|
|
3403
3403
|
}
|
|
3404
|
-
function a(
|
|
3405
|
-
return
|
|
3404
|
+
function a(s) {
|
|
3405
|
+
return s.value.toUpperCase() === t.selected12Hours || !B(t.selected12Hours) && s.value.toUpperCase() === t.default12Hours;
|
|
3406
3406
|
}
|
|
3407
|
-
function s
|
|
3407
|
+
function i(s, p) {
|
|
3408
3408
|
let c = "";
|
|
3409
3409
|
const d = ` ${n}-select-option-selected `, u = ` ${n}-select-option-disabled `;
|
|
3410
3410
|
let l = !1;
|
|
3411
|
-
return p === "hour" ? l = e(
|
|
3411
|
+
return p === "hour" ? l = e(s) : p === "minute" ? l = r(s) : p === "second" ? l = o(s) : l = a(s), l && (c += d), p === "12-hour" || s.disabled && (c += u), c;
|
|
3412
3412
|
}
|
|
3413
|
-
return { getSelectedClass:
|
|
3413
|
+
return { getSelectedClass: i };
|
|
3414
3414
|
}
|
|
3415
|
-
const
|
|
3415
|
+
const Me = /* @__PURE__ */ ne({
|
|
3416
3416
|
name: "FTimePickerTimeView",
|
|
3417
3417
|
props: rn,
|
|
3418
3418
|
emits: ["valueChange", "formatedValueChange"],
|
|
3419
3419
|
setup(t, n) {
|
|
3420
|
-
const e = "time-picker-panel", r = v(0), o = v([]), a = v([]),
|
|
3420
|
+
const e = "time-picker-panel", r = v(0), o = v([]), a = v([]), i = v([]), s = v([]), p = v(), c = v(), d = v(), u = v(), l = new to(), {
|
|
3421
3421
|
scrollToSelected: h
|
|
3422
|
-
} = io(t, n, o, a,
|
|
3422
|
+
} = io(t, n, o, a, i, s), {
|
|
3423
3423
|
getSelectedClass: y
|
|
3424
|
-
} = so(l, e),
|
|
3424
|
+
} = so(l, e), M = v(t.hourStep), O = v(t.minuteStep), Y = v(t.secondStep), _ = v(), g = v(""), C = v(), E = v(t.hideDisabledElements), k = v(0);
|
|
3425
3425
|
R(() => t.defaultOpenValue, (m) => {
|
|
3426
3426
|
B(m) && (_.value = m);
|
|
3427
3427
|
}), R(_, (m) => {
|
|
@@ -3433,10 +3433,10 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3433
3433
|
}), R(() => t.format, (m) => {
|
|
3434
3434
|
B(m) ? g.value = m : g.value = "HH:mm:ss";
|
|
3435
3435
|
}), R(g, (m) => {
|
|
3436
|
-
B(m) && (l.setFormat(g.value), k.value = 0, J.value && k.value++, oe.value && k.value++, ae.value && k.value++,
|
|
3436
|
+
B(m) && (l.setFormat(g.value), k.value = 0, J.value && k.value++, oe.value && k.value++, ae.value && k.value++, C.value && (k.value++, Fe()), r.value = k.value * 66);
|
|
3437
3437
|
}), R(() => t.use12Hours, (m) => {
|
|
3438
|
-
|
|
3439
|
-
}), R(
|
|
3438
|
+
C.value = m;
|
|
3439
|
+
}), R(C, (m) => {
|
|
3440
3440
|
g.value = st(g.value, m), l.setUse12Hours(m);
|
|
3441
3441
|
}), R(() => t.disabledHours, () => {
|
|
3442
3442
|
ge();
|
|
@@ -3449,46 +3449,46 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3449
3449
|
if (B(m)) {
|
|
3450
3450
|
l.text = m;
|
|
3451
3451
|
const x = at(l.text, g.value);
|
|
3452
|
-
l.setValue(x,
|
|
3452
|
+
l.setValue(x, C.value), Ee();
|
|
3453
3453
|
} else
|
|
3454
|
-
l.setUse12Hours(
|
|
3454
|
+
l.setUse12Hours(C.value);
|
|
3455
3455
|
}
|
|
3456
3456
|
function H() {
|
|
3457
3457
|
let m = [];
|
|
3458
|
-
return t.disabledHours && (m = t.disabledHours(),
|
|
3458
|
+
return t.disabledHours && (m = t.disabledHours(), C.value && (l.selected12Hours === "PM" ? m = m.filter((x) => x >= 12).map((x) => x > 12 ? x - 12 : x) : m = m.filter((x) => x < 12 || x === 24).map((x) => x === 24 || x === 0 ? 12 : x))), m;
|
|
3459
3459
|
}
|
|
3460
3460
|
function T(m = "hour") {
|
|
3461
3461
|
return g.value ? g.value.indexOf(m[0].toUpperCase()) > -1 || g.value.indexOf(m[0].toLowerCase()) > -1 : !1;
|
|
3462
3462
|
}
|
|
3463
|
-
const j =
|
|
3463
|
+
const j = V(() => ({
|
|
3464
3464
|
"time-picker-panel": !0,
|
|
3465
3465
|
"time-picker-panel-column-3": !0,
|
|
3466
3466
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
3467
3467
|
"f-area-show": !0
|
|
3468
|
-
})), Q =
|
|
3469
|
-
width:
|
|
3470
|
-
})), J =
|
|
3468
|
+
})), Q = V(() => ({
|
|
3469
|
+
width: C.value ? `${r.value}px` : "100%"
|
|
3470
|
+
})), J = V(() => T("hour")), oe = V(() => T("minute")), ae = V(() => T("second"));
|
|
3471
3471
|
function ye(m, x = 1, $ = 0) {
|
|
3472
|
-
return x = Math.ceil(x), new Array(Math.ceil(m / x)).fill(0).map((
|
|
3472
|
+
return x = Math.ceil(x), new Array(Math.ceil(m / x)).fill(0).map((S, se) => (se + $) * x);
|
|
3473
3473
|
}
|
|
3474
3474
|
function wt() {
|
|
3475
|
-
if (J.value && p.value && h(p.value, B(l.viewHours) ? l.viewHours : l.defaultViewHours, 0, "hour", l), oe.value && c.value && h(c.value, B(l.minutes) ? l.minutes : l.defaultMinutes, 0, "minute", l), ae.value && d.value && h(d.value, B(l.seconds) ? l.seconds : l.defaultSeconds, 0, "second", l),
|
|
3475
|
+
if (J.value && p.value && h(p.value, B(l.viewHours) ? l.viewHours : l.defaultViewHours, 0, "hour", l), oe.value && c.value && h(c.value, B(l.minutes) ? l.minutes : l.defaultMinutes, 0, "minute", l), ae.value && d.value && h(d.value, B(l.seconds) ? l.seconds : l.defaultSeconds, 0, "second", l), C.value && u.value) {
|
|
3476
3476
|
const x = (B(l.selected12Hours) ? l.selected12Hours : l.default12Hours) === "AM" ? 0 : 1;
|
|
3477
3477
|
h(u.value, x, 0, "12-hour", l);
|
|
3478
3478
|
}
|
|
3479
3479
|
}
|
|
3480
3480
|
function ge() {
|
|
3481
3481
|
let m = 24, x = 0;
|
|
3482
|
-
|
|
3482
|
+
C.value && (m = 12, x = 1);
|
|
3483
3483
|
const $ = H();
|
|
3484
|
-
if (o.value = ye(m,
|
|
3485
|
-
index:
|
|
3486
|
-
disabled: $.length > 0 && $.indexOf(
|
|
3487
|
-
})),
|
|
3488
|
-
const
|
|
3489
|
-
|
|
3484
|
+
if (o.value = ye(m, M.value, x).map((S) => ({
|
|
3485
|
+
index: S,
|
|
3486
|
+
disabled: $.length > 0 && $.indexOf(S) !== -1
|
|
3487
|
+
})), C.value && o.value[o.value.length - 1].index === 12) {
|
|
3488
|
+
const S = [...o.value];
|
|
3489
|
+
S.unshift(S[S.length - 1]), S.splice(S.length - 1, 1), o.value = S;
|
|
3490
3490
|
}
|
|
3491
|
-
o.value = o.value.filter((
|
|
3491
|
+
o.value = o.value.filter((S) => !(E.value && S.disabled));
|
|
3492
3492
|
}
|
|
3493
3493
|
function fe() {
|
|
3494
3494
|
a.value = ye(60, O.value).map((m) => ({
|
|
@@ -3497,32 +3497,32 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3497
3497
|
})), a.value = a.value.filter((m) => !(E.value && m.disabled));
|
|
3498
3498
|
}
|
|
3499
3499
|
function ie() {
|
|
3500
|
-
|
|
3500
|
+
i.value = ye(60, Y.value).map((m) => ({
|
|
3501
3501
|
index: m,
|
|
3502
3502
|
disabled: !!t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes).indexOf(m) !== -1
|
|
3503
|
-
})),
|
|
3503
|
+
})), i.value = i.value.filter((m) => !(E.value && m.disabled));
|
|
3504
3504
|
}
|
|
3505
3505
|
function Fe() {
|
|
3506
3506
|
const m = g.value.includes("A");
|
|
3507
|
-
|
|
3507
|
+
s.value = [{
|
|
3508
3508
|
index: 0,
|
|
3509
3509
|
value: m ? "AM" : "am"
|
|
3510
3510
|
}, {
|
|
3511
3511
|
index: 1,
|
|
3512
3512
|
value: m ? "PM" : "pm"
|
|
3513
|
-
}],
|
|
3513
|
+
}], s.value = s.value.filter(() => !E.value);
|
|
3514
3514
|
}
|
|
3515
3515
|
function vt(m, x) {
|
|
3516
3516
|
if (m.stopPropagation(), l.setHours(x.index, x.disabled), !x.disabled) {
|
|
3517
3517
|
if (h(p.value, x.index, 120, "hour", l), t.disabledMinutes !== null) {
|
|
3518
3518
|
fe();
|
|
3519
|
-
const $ = a.value.filter((
|
|
3520
|
-
if (!$.find((
|
|
3519
|
+
const $ = a.value.filter((S) => !S.disabled);
|
|
3520
|
+
if (!$.find((S) => S.index === l.minutes)) {
|
|
3521
3521
|
const {
|
|
3522
|
-
index:
|
|
3522
|
+
index: S,
|
|
3523
3523
|
disabled: se
|
|
3524
3524
|
} = $[0];
|
|
3525
|
-
l.setMinutes(
|
|
3525
|
+
l.setMinutes(S, se);
|
|
3526
3526
|
}
|
|
3527
3527
|
}
|
|
3528
3528
|
(t.disabledSeconds !== null || t.disabledMinutes !== null) && ie();
|
|
@@ -3534,28 +3534,28 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3534
3534
|
function Tt(m, x) {
|
|
3535
3535
|
if (m.stopPropagation(), l.setMinutes(x.index, x.disabled), !x.disabled && (h(c.value, x.index, 120, "minute", l), t.disabledSeconds !== null)) {
|
|
3536
3536
|
ie();
|
|
3537
|
-
const $ =
|
|
3538
|
-
if (!$.find((
|
|
3537
|
+
const $ = i.value.filter((S) => !S.disabled);
|
|
3538
|
+
if (!$.find((S) => S.index === l.seconds)) {
|
|
3539
3539
|
const {
|
|
3540
|
-
index:
|
|
3540
|
+
index: S,
|
|
3541
3541
|
disabled: se
|
|
3542
3542
|
} = $[0];
|
|
3543
|
-
l.setSeconds(
|
|
3543
|
+
l.setSeconds(S, se);
|
|
3544
3544
|
}
|
|
3545
3545
|
}
|
|
3546
3546
|
}
|
|
3547
|
-
function
|
|
3547
|
+
function Mt(m, x) {
|
|
3548
3548
|
m.stopPropagation(), l.setSeconds(x.index, x.disabled), !x.disabled && h(d.value, x.index, 120, "second", l);
|
|
3549
3549
|
}
|
|
3550
3550
|
function Ee() {
|
|
3551
3551
|
ge(), fe(), ie(), Fe();
|
|
3552
3552
|
}
|
|
3553
3553
|
de(() => {
|
|
3554
|
-
g.value = t.format,
|
|
3554
|
+
g.value = t.format, C.value = t.use12Hours, F(t.modelValue), Ee(), setTimeout(() => {
|
|
3555
3555
|
wt();
|
|
3556
3556
|
}, 10);
|
|
3557
3557
|
});
|
|
3558
|
-
function
|
|
3558
|
+
function Ct() {
|
|
3559
3559
|
return t.showHeader ? w("div", {
|
|
3560
3560
|
class: e + "-combobox time-picker-panel-header",
|
|
3561
3561
|
style: Q.value
|
|
@@ -3587,7 +3587,7 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3587
3587
|
class: "farris-timer-picker"
|
|
3588
3588
|
}, [w("div", {
|
|
3589
3589
|
class: e + "-inner"
|
|
3590
|
-
}, [
|
|
3590
|
+
}, [Ct(), w("div", {
|
|
3591
3591
|
class: e + "-combobox",
|
|
3592
3592
|
style: Q.value
|
|
3593
3593
|
}, [J.value && w("div", {
|
|
@@ -3605,13 +3605,13 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3605
3605
|
}, [`${m.index}`]))])]), ae.value && w("div", {
|
|
3606
3606
|
class: e + "-select",
|
|
3607
3607
|
ref: d
|
|
3608
|
-
}, [w("ul", null, [
|
|
3608
|
+
}, [w("ul", null, [i.value.map((m) => w("li", {
|
|
3609
3609
|
class: y(m, "second"),
|
|
3610
|
-
onClick: (x) =>
|
|
3611
|
-
}, [`${m.index}`]))])]),
|
|
3610
|
+
onClick: (x) => Mt(x, m)
|
|
3611
|
+
}, [`${m.index}`]))])]), C.value && w("div", {
|
|
3612
3612
|
class: e + "-select",
|
|
3613
3613
|
ref: u
|
|
3614
|
-
}, [w("ul", null, [
|
|
3614
|
+
}, [w("ul", null, [s.value.map((m) => w("li", {
|
|
3615
3615
|
class: y(m, "12-hour"),
|
|
3616
3616
|
onClick: (x) => xt(x, m)
|
|
3617
3617
|
}, [`${m.value}`]))])])])])])]);
|
|
@@ -3621,14 +3621,14 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3621
3621
|
props: Pe,
|
|
3622
3622
|
emits: ["update:modelValue", "valueChange", "clear"],
|
|
3623
3623
|
setup(t, n) {
|
|
3624
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(null), a = v(),
|
|
3625
|
-
function
|
|
3624
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(null), a = v(), i = V(() => st(t.format, t.use12Hours));
|
|
3625
|
+
function s() {
|
|
3626
3626
|
r.value = "", n.emit("clear");
|
|
3627
3627
|
}
|
|
3628
3628
|
function p() {
|
|
3629
3629
|
if (r.value) {
|
|
3630
|
-
const u = at(r.value,
|
|
3631
|
-
r.value = it(u,
|
|
3630
|
+
const u = at(r.value, i.value);
|
|
3631
|
+
r.value = it(u, i.value);
|
|
3632
3632
|
}
|
|
3633
3633
|
}
|
|
3634
3634
|
function c() {
|
|
@@ -3651,10 +3651,10 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3651
3651
|
buttonContent: e,
|
|
3652
3652
|
placeholder: t.placeholder,
|
|
3653
3653
|
enableClear: !0,
|
|
3654
|
-
onClear:
|
|
3654
|
+
onClear: s,
|
|
3655
3655
|
onBlur: c
|
|
3656
3656
|
}, {
|
|
3657
|
-
default: () => [w(
|
|
3657
|
+
default: () => [w(Me, Ce({
|
|
3658
3658
|
ref: a
|
|
3659
3659
|
}, t, {
|
|
3660
3660
|
onValueChange: d
|
|
@@ -3944,7 +3944,7 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
3946
|
}
|
|
3947
|
-
},
|
|
3947
|
+
}, Mo = {
|
|
3948
3948
|
title: wo,
|
|
3949
3949
|
description: vo,
|
|
3950
3950
|
type: xo,
|
|
@@ -4055,26 +4055,26 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
4055
4055
|
* 打开前
|
|
4056
4056
|
*/
|
|
4057
4057
|
beforeOpen: { type: Function, default: null }
|
|
4058
|
-
}, ut = Re(Be, bo, uo, lo,
|
|
4058
|
+
}, ut = Re(Be, bo, uo, lo, Mo), Co = {
|
|
4059
4059
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
4060
4060
|
host: { type: Object },
|
|
4061
4061
|
backgroundColor: { type: String, default: "" }
|
|
4062
4062
|
}, ko = /* @__PURE__ */ ne({
|
|
4063
4063
|
name: "FOverlay",
|
|
4064
|
-
props:
|
|
4064
|
+
props: Co,
|
|
4065
4065
|
emits: ["click"],
|
|
4066
4066
|
setup(t, n) {
|
|
4067
|
-
const e = v(t.popupContentPosition), r = v(t.host), o =
|
|
4067
|
+
const e = v(t.popupContentPosition), r = v(t.host), o = V(() => ({
|
|
4068
4068
|
backgroundColor: t.backgroundColor || "",
|
|
4069
4069
|
pointerEvents: "auto"
|
|
4070
4070
|
}));
|
|
4071
|
-
function a(
|
|
4072
|
-
n.emit("click"),
|
|
4071
|
+
function a(s) {
|
|
4072
|
+
n.emit("click"), s.preventDefault(), s.stopPropagation();
|
|
4073
4073
|
}
|
|
4074
|
-
|
|
4075
|
-
const
|
|
4076
|
-
if (
|
|
4077
|
-
const p =
|
|
4074
|
+
V(() => {
|
|
4075
|
+
const s = r.value;
|
|
4076
|
+
if (s) {
|
|
4077
|
+
const p = s.getBoundingClientRect(), {
|
|
4078
4078
|
left: c,
|
|
4079
4079
|
top: d,
|
|
4080
4080
|
height: u
|
|
@@ -4086,7 +4086,7 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
4086
4086
|
}
|
|
4087
4087
|
return e.value;
|
|
4088
4088
|
});
|
|
4089
|
-
const
|
|
4089
|
+
const i = V(() => ({
|
|
4090
4090
|
// position: 'relative',
|
|
4091
4091
|
// left: `${position.value.left}px`,
|
|
4092
4092
|
// top: `${position.value.top}px`
|
|
@@ -4095,14 +4095,14 @@ const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-
|
|
|
4095
4095
|
to: "body"
|
|
4096
4096
|
}, {
|
|
4097
4097
|
default: () => {
|
|
4098
|
-
var
|
|
4098
|
+
var s, p;
|
|
4099
4099
|
return [w("div", {
|
|
4100
4100
|
class: "overlay-container",
|
|
4101
4101
|
onClick: (c) => a(c),
|
|
4102
4102
|
style: o.value
|
|
4103
4103
|
}, [w("div", {
|
|
4104
|
-
style:
|
|
4105
|
-
}, [(p = (
|
|
4104
|
+
style: i.value
|
|
4105
|
+
}, [(p = (s = n.slots).default) == null ? void 0 : p.call(s)])])];
|
|
4106
4106
|
}
|
|
4107
4107
|
});
|
|
4108
4108
|
}
|
|
@@ -4159,11 +4159,11 @@ function lt(t, n) {
|
|
|
4159
4159
|
return { judgeCanOpen: e };
|
|
4160
4160
|
}
|
|
4161
4161
|
function ct(t, n, e, r, o) {
|
|
4162
|
-
const a = v(t.buttonBehavior),
|
|
4162
|
+
const a = v(t.buttonBehavior), i = v(t.popupOnInput), s = V(() => ({
|
|
4163
4163
|
"input-group-append": !0,
|
|
4164
4164
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4165
|
-
})), { judgeCanOpen: p } = lt(t, o), c =
|
|
4166
|
-
async function l(
|
|
4165
|
+
})), { judgeCanOpen: p } = lt(t, o), c = V(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = pe(Ho, null), u = v();
|
|
4166
|
+
async function l(M) {
|
|
4167
4167
|
if (await p() && c.value) {
|
|
4168
4168
|
const O = !!n.slots.default;
|
|
4169
4169
|
if (a.value === "Modal") {
|
|
@@ -4178,17 +4178,17 @@ function ct(t, n, e, r, o) {
|
|
|
4178
4178
|
host: document.body,
|
|
4179
4179
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
4180
4180
|
render: () => n.slots.default && n.slots.default()
|
|
4181
|
-
}), O && a.value === "Popup" && r.togglePopup(!0), O &&
|
|
4181
|
+
}), O && a.value === "Popup" && r.togglePopup(!0), O && i.value && r.hidePopup(), n.emit("clickButton", { origin: M, value: t.modelValue });
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
|
-
function h(
|
|
4185
|
-
n.emit("mouseEnterIcon",
|
|
4184
|
+
function h(M) {
|
|
4185
|
+
n.emit("mouseEnterIcon", M);
|
|
4186
4186
|
}
|
|
4187
|
-
function y(
|
|
4188
|
-
n.emit("mouseLeaveIcon",
|
|
4187
|
+
function y(M) {
|
|
4188
|
+
n.emit("mouseLeaveIcon", M);
|
|
4189
4189
|
}
|
|
4190
4190
|
return {
|
|
4191
|
-
buttonGroupClass:
|
|
4191
|
+
buttonGroupClass: s,
|
|
4192
4192
|
onClickButton: l,
|
|
4193
4193
|
onMouseEnterButton: h,
|
|
4194
4194
|
onMouseLeaveButton: y,
|
|
@@ -4196,19 +4196,19 @@ function ct(t, n, e, r, o) {
|
|
|
4196
4196
|
};
|
|
4197
4197
|
}
|
|
4198
4198
|
function dt(t, n, e, r, o, a) {
|
|
4199
|
-
const
|
|
4199
|
+
const i = v(!1), s = V(() => t.enableClear && !t.readonly && !t.disable), { changeTextBoxValue: p } = a;
|
|
4200
4200
|
function c(h) {
|
|
4201
|
-
|
|
4201
|
+
i.value = h;
|
|
4202
4202
|
}
|
|
4203
4203
|
R(o, () => {
|
|
4204
4204
|
c(!!o.value);
|
|
4205
4205
|
});
|
|
4206
4206
|
function d(h) {
|
|
4207
|
-
const y = !t.readonly && !t.disable && t.editable,
|
|
4208
|
-
h.stopPropagation(), (y ||
|
|
4207
|
+
const y = !t.readonly && !t.disable && t.editable, M = !t.editable;
|
|
4208
|
+
h.stopPropagation(), (y || M) && (p("", !1), c(!i.value), n.emit("clear"));
|
|
4209
4209
|
}
|
|
4210
4210
|
function u(h) {
|
|
4211
|
-
if (
|
|
4211
|
+
if (s.value) {
|
|
4212
4212
|
if (!e.value) {
|
|
4213
4213
|
c(!1);
|
|
4214
4214
|
return;
|
|
@@ -4217,35 +4217,35 @@ function dt(t, n, e, r, o, a) {
|
|
|
4217
4217
|
}
|
|
4218
4218
|
}
|
|
4219
4219
|
function l(h) {
|
|
4220
|
-
|
|
4220
|
+
s.value && c(!1);
|
|
4221
4221
|
}
|
|
4222
4222
|
return {
|
|
4223
|
-
enableClearButton:
|
|
4224
|
-
showClearButton:
|
|
4223
|
+
enableClearButton: s,
|
|
4224
|
+
showClearButton: i,
|
|
4225
4225
|
onClearValue: d,
|
|
4226
4226
|
onMouseEnterTextBox: u,
|
|
4227
4227
|
onMouseLeaveTextBox: l
|
|
4228
4228
|
};
|
|
4229
4229
|
}
|
|
4230
4230
|
function ft(t, n, e, r, o) {
|
|
4231
|
-
const a =
|
|
4231
|
+
const a = V(() => t.popupOnInput), i = V(() => t.popupOnFocus), { shouldPopupContent: s } = o, p = V(() => t.enableTitle ? e.value : ""), c = V(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), d = V(() => t.readonly || !t.editable), u = v(!1), l = V(() => !t.disable && u.value), h = V(() => ({
|
|
4232
4232
|
"text-left": t.textAlign === "left",
|
|
4233
4233
|
"text-center": t.textAlign === "center",
|
|
4234
4234
|
"text-right": t.textAlign === "right",
|
|
4235
4235
|
"form-control": !0,
|
|
4236
4236
|
"f-utils-fill": !0
|
|
4237
|
-
})), y =
|
|
4237
|
+
})), y = V(() => ({
|
|
4238
4238
|
"input-group": !0,
|
|
4239
4239
|
"f-state-disable": t.disable,
|
|
4240
4240
|
"f-state-editable": t.editable && !t.disable && !t.readonly,
|
|
4241
4241
|
"f-state-readonly": t.readonly && !t.disable,
|
|
4242
4242
|
"f-state-focus": l.value
|
|
4243
4243
|
}));
|
|
4244
|
-
function
|
|
4244
|
+
function M(T, j = !0) {
|
|
4245
4245
|
e.value !== T && (e.value = T, j && n.emit("change", T), n.emit("update:modelValue", T));
|
|
4246
4246
|
}
|
|
4247
4247
|
function O(T) {
|
|
4248
|
-
|
|
4248
|
+
s.value = !1, M(T, !0);
|
|
4249
4249
|
}
|
|
4250
4250
|
R(
|
|
4251
4251
|
() => t.modelValue,
|
|
@@ -4260,12 +4260,12 @@ function ft(t, n, e, r, o) {
|
|
|
4260
4260
|
n.emit("click", T);
|
|
4261
4261
|
}
|
|
4262
4262
|
function g(T) {
|
|
4263
|
-
t.disable || (u.value = !0, d.value || (n.emit("focus", T),
|
|
4263
|
+
t.disable || (u.value = !0, d.value || (n.emit("focus", T), i.value && !s.value && o.popup()));
|
|
4264
4264
|
}
|
|
4265
|
-
function
|
|
4265
|
+
function C(T) {
|
|
4266
4266
|
n.emit("input", T.target.value);
|
|
4267
4267
|
const j = T.target.value;
|
|
4268
|
-
r.value = j, e.value !== j &&
|
|
4268
|
+
r.value = j, e.value !== j && M(j, !0), a.value && !s.value && o.popup();
|
|
4269
4269
|
}
|
|
4270
4270
|
function E(T) {
|
|
4271
4271
|
T.target.tagName !== "INPUT" && T.preventDefault(), T.stopPropagation();
|
|
@@ -4274,11 +4274,11 @@ function ft(t, n, e, r, o) {
|
|
|
4274
4274
|
n.emit("keydown", T);
|
|
4275
4275
|
}
|
|
4276
4276
|
function F(T) {
|
|
4277
|
-
T.key === "Enter" && (a.value ||
|
|
4277
|
+
T.key === "Enter" && (a.value || i.value) && o.hidePopup(), n.emit("keyup", T);
|
|
4278
4278
|
}
|
|
4279
4279
|
function H(T) {
|
|
4280
4280
|
const j = T.target.value;
|
|
4281
|
-
T.stopPropagation(),
|
|
4281
|
+
T.stopPropagation(), M(j);
|
|
4282
4282
|
}
|
|
4283
4283
|
return {
|
|
4284
4284
|
hasFocusedTextBox: l,
|
|
@@ -4287,12 +4287,12 @@ function ft(t, n, e, r, o) {
|
|
|
4287
4287
|
textBoxPlaceholder: c,
|
|
4288
4288
|
textBoxTitle: p,
|
|
4289
4289
|
inputGroupClass: y,
|
|
4290
|
-
changeTextBoxValue:
|
|
4290
|
+
changeTextBoxValue: M,
|
|
4291
4291
|
commitValue: O,
|
|
4292
4292
|
onBlurTextBox: Y,
|
|
4293
4293
|
onClickTextBox: _,
|
|
4294
4294
|
onFocusTextBox: g,
|
|
4295
|
-
onInput:
|
|
4295
|
+
onInput: C,
|
|
4296
4296
|
onKeyDownTextBox: k,
|
|
4297
4297
|
onKeyUpTextBox: F,
|
|
4298
4298
|
onMouseDownTextBox: E,
|
|
@@ -4300,23 +4300,23 @@ function ft(t, n, e, r, o) {
|
|
|
4300
4300
|
};
|
|
4301
4301
|
}
|
|
4302
4302
|
function pt(t, n, e, r) {
|
|
4303
|
-
const o = v(), a = v(!1), { judgeCanOpen:
|
|
4304
|
-
function
|
|
4303
|
+
const o = v(), a = v(!1), { judgeCanOpen: i } = lt(t, r);
|
|
4304
|
+
function s() {
|
|
4305
4305
|
const u = o.value;
|
|
4306
4306
|
u && u.show(e.value);
|
|
4307
4307
|
}
|
|
4308
4308
|
async function p(u = !1) {
|
|
4309
4309
|
if (!!n.slots.default) {
|
|
4310
|
-
if (!u && !a.value && !await
|
|
4310
|
+
if (!u && !a.value && !await i())
|
|
4311
4311
|
return;
|
|
4312
|
-
a.value = !a.value, await
|
|
4312
|
+
a.value = !a.value, await Se(), s();
|
|
4313
4313
|
}
|
|
4314
4314
|
}
|
|
4315
4315
|
async function c(u = !1) {
|
|
4316
4316
|
if (!!n.slots.default) {
|
|
4317
|
-
if (!u && !await
|
|
4317
|
+
if (!u && !await i())
|
|
4318
4318
|
return;
|
|
4319
|
-
a.value = !0, await
|
|
4319
|
+
a.value = !0, await Se(), s();
|
|
4320
4320
|
}
|
|
4321
4321
|
}
|
|
4322
4322
|
function d() {
|
|
@@ -4328,8 +4328,8 @@ function mt(t, n, e) {
|
|
|
4328
4328
|
const r = v(), {
|
|
4329
4329
|
isTextBoxReadonly: o,
|
|
4330
4330
|
textBoxClass: a,
|
|
4331
|
-
textBoxPlaceholder:
|
|
4332
|
-
textBoxTitle:
|
|
4331
|
+
textBoxPlaceholder: i,
|
|
4332
|
+
textBoxTitle: s,
|
|
4333
4333
|
onBlurTextBox: p,
|
|
4334
4334
|
onClickTextBox: c,
|
|
4335
4335
|
onFocusTextBox: d,
|
|
@@ -4337,7 +4337,7 @@ function mt(t, n, e) {
|
|
|
4337
4337
|
onKeyDownTextBox: l,
|
|
4338
4338
|
onKeyUpTextBox: h,
|
|
4339
4339
|
onMouseDownTextBox: y,
|
|
4340
|
-
onTextBoxValueChange:
|
|
4340
|
+
onTextBoxValueChange: M
|
|
4341
4341
|
} = e;
|
|
4342
4342
|
return de(() => {
|
|
4343
4343
|
var O, Y;
|
|
@@ -4350,14 +4350,14 @@ function mt(t, n, e) {
|
|
|
4350
4350
|
disabled: t.disable,
|
|
4351
4351
|
maxlength: t.maxLength,
|
|
4352
4352
|
minlength: t.minLength,
|
|
4353
|
-
placeholder:
|
|
4353
|
+
placeholder: i.value,
|
|
4354
4354
|
readonly: o.value,
|
|
4355
4355
|
tabindex: t.tabIndex,
|
|
4356
|
-
title:
|
|
4356
|
+
title: s.value,
|
|
4357
4357
|
type: t.inputType,
|
|
4358
4358
|
value: n.value,
|
|
4359
4359
|
onBlur: p,
|
|
4360
|
-
onChange:
|
|
4360
|
+
onChange: M,
|
|
4361
4361
|
onClick: c,
|
|
4362
4362
|
onFocus: d,
|
|
4363
4363
|
onInput: u,
|
|
@@ -4369,12 +4369,12 @@ function mt(t, n, e) {
|
|
|
4369
4369
|
function ht(t, n, e) {
|
|
4370
4370
|
const r = v(t.separator), {
|
|
4371
4371
|
changeTextBoxValue: o
|
|
4372
|
-
} = e, a =
|
|
4373
|
-
name:
|
|
4372
|
+
} = e, a = V(() => n.value ? n.value.split(r.value).map((s) => ({
|
|
4373
|
+
name: s,
|
|
4374
4374
|
selectable: !0
|
|
4375
4375
|
})) : []);
|
|
4376
|
-
function s
|
|
4377
|
-
o(
|
|
4376
|
+
function i(s) {
|
|
4377
|
+
o(s.map((p) => p.name).join(r.value), !0);
|
|
4378
4378
|
}
|
|
4379
4379
|
return () => w(At, {
|
|
4380
4380
|
id: `${t.id}-tag-editor`,
|
|
@@ -4382,15 +4382,15 @@ function ht(t, n, e) {
|
|
|
4382
4382
|
data: a.value,
|
|
4383
4383
|
showClose: !0,
|
|
4384
4384
|
showInput: !0,
|
|
4385
|
-
onChange:
|
|
4385
|
+
onChange: i
|
|
4386
4386
|
}, null);
|
|
4387
4387
|
}
|
|
4388
4388
|
function yt(t, n, e, r) {
|
|
4389
4389
|
const {
|
|
4390
4390
|
buttonGroupClass: o,
|
|
4391
4391
|
onClickButton: a,
|
|
4392
|
-
onMouseEnterButton:
|
|
4393
|
-
onMouseLeaveButton:
|
|
4392
|
+
onMouseEnterButton: i,
|
|
4393
|
+
onMouseLeaveButton: s
|
|
4394
4394
|
} = e, {
|
|
4395
4395
|
enableClearButton: p,
|
|
4396
4396
|
showClearButton: c,
|
|
@@ -4408,15 +4408,15 @@ function yt(t, n, e, r) {
|
|
|
4408
4408
|
}, null)]), [[Ft, c.value]]), n.slots.buttonContent ? w("span", {
|
|
4409
4409
|
class: "input-group-text input-group-append-button",
|
|
4410
4410
|
onClick: a,
|
|
4411
|
-
onMouseenter:
|
|
4412
|
-
onMouseleave:
|
|
4411
|
+
onMouseenter: i,
|
|
4412
|
+
onMouseleave: s
|
|
4413
4413
|
}, [n.slots.buttonContent()]) : t.buttonContent ? w("span", {
|
|
4414
4414
|
class: "input-group-text input-group-append-button",
|
|
4415
4415
|
innerHTML: t.buttonContent,
|
|
4416
4416
|
ref: u,
|
|
4417
4417
|
onClick: a,
|
|
4418
|
-
onMouseenter:
|
|
4419
|
-
onMouseleave:
|
|
4418
|
+
onMouseenter: i,
|
|
4419
|
+
onMouseleave: s
|
|
4420
4420
|
}, null) : null]),
|
|
4421
4421
|
buttonHandleElement: u
|
|
4422
4422
|
};
|
|
@@ -4426,7 +4426,7 @@ function Bo(t, n, e) {
|
|
|
4426
4426
|
hidePopup: o,
|
|
4427
4427
|
popoverRef: a
|
|
4428
4428
|
} = e;
|
|
4429
|
-
return () => w(
|
|
4429
|
+
return () => w(Wt, {
|
|
4430
4430
|
id: `${t.id}-popover`,
|
|
4431
4431
|
ref: a,
|
|
4432
4432
|
visible: !0,
|
|
@@ -4440,8 +4440,8 @@ function Bo(t, n, e) {
|
|
|
4440
4440
|
onHidden: o
|
|
4441
4441
|
}, {
|
|
4442
4442
|
default: () => {
|
|
4443
|
-
var
|
|
4444
|
-
return [(
|
|
4443
|
+
var i, s;
|
|
4444
|
+
return [(s = (i = n.slots).default) == null ? void 0 : s.call(i)];
|
|
4445
4445
|
}
|
|
4446
4446
|
});
|
|
4447
4447
|
}
|
|
@@ -4451,17 +4451,17 @@ const ce = /* @__PURE__ */ ne({
|
|
|
4451
4451
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4452
4452
|
setup(t, n) {
|
|
4453
4453
|
const e = v(), r = v(t.customClass), o = v(t.modelValue), a = pt(t, n, e, o), {
|
|
4454
|
-
shouldPopupContent:
|
|
4455
|
-
hidePopup:
|
|
4454
|
+
shouldPopupContent: i,
|
|
4455
|
+
hidePopup: s,
|
|
4456
4456
|
togglePopup: p
|
|
4457
4457
|
} = a, c = ct(t, n, e, a, o), d = v(""), u = ft(t, n, o, d, a), {
|
|
4458
4458
|
hasFocusedTextBox: l,
|
|
4459
4459
|
commitValue: h,
|
|
4460
4460
|
inputGroupClass: y
|
|
4461
|
-
} = u,
|
|
4461
|
+
} = u, M = dt(t, n, o, l, d, u), {
|
|
4462
4462
|
onMouseEnterTextBox: O,
|
|
4463
4463
|
onMouseLeaveTextBox: Y
|
|
4464
|
-
} =
|
|
4464
|
+
} = M, _ = V(() => {
|
|
4465
4465
|
const T = {
|
|
4466
4466
|
"f-button-edit": !0,
|
|
4467
4467
|
"f-cmp-inputgroup": !0,
|
|
@@ -4472,18 +4472,18 @@ const ce = /* @__PURE__ */ ne({
|
|
|
4472
4472
|
function g() {
|
|
4473
4473
|
return t.multiSelect && t.inputType === "tag" ? ht(t, o, u) : mt(t, o, u);
|
|
4474
4474
|
}
|
|
4475
|
-
let
|
|
4475
|
+
let C = g();
|
|
4476
4476
|
R([() => t.multiSelect, () => t.inputType], () => {
|
|
4477
|
-
|
|
4477
|
+
C = g();
|
|
4478
4478
|
});
|
|
4479
4479
|
const {
|
|
4480
4480
|
renderButtonGroup: E,
|
|
4481
4481
|
buttonHandleElement: k
|
|
4482
|
-
} = yt(t, n, c,
|
|
4482
|
+
} = yt(t, n, c, M), F = Bo(t, n, a), H = {
|
|
4483
4483
|
commitValue: h,
|
|
4484
4484
|
elementRef: e,
|
|
4485
|
-
hidePopup:
|
|
4486
|
-
shouldPopupContent:
|
|
4485
|
+
hidePopup: s,
|
|
4486
|
+
shouldPopupContent: i,
|
|
4487
4487
|
togglePopup: p,
|
|
4488
4488
|
openDialog: () => {
|
|
4489
4489
|
k.value && t.buttonBehavior === "Modal" && k.value.click();
|
|
@@ -4497,7 +4497,7 @@ const ce = /* @__PURE__ */ ne({
|
|
|
4497
4497
|
e.value.componentInstance = H, window.onresize = () => {
|
|
4498
4498
|
document.body.click();
|
|
4499
4499
|
};
|
|
4500
|
-
}), n.expose(H), () => w(Et, null, [w("div",
|
|
4500
|
+
}), n.expose(H), () => w(Et, null, [w("div", Ce(n.attrs, {
|
|
4501
4501
|
ref: e,
|
|
4502
4502
|
class: _.value,
|
|
4503
4503
|
id: t.id
|
|
@@ -4506,7 +4506,7 @@ const ce = /* @__PURE__ */ ne({
|
|
|
4506
4506
|
class: y.value,
|
|
4507
4507
|
onMouseenter: O,
|
|
4508
4508
|
onMouseleave: Y
|
|
4509
|
-
}, [
|
|
4509
|
+
}, [C(), E()])]), i.value && F()]);
|
|
4510
4510
|
}
|
|
4511
4511
|
});
|
|
4512
4512
|
function gt(t, n, e) {
|
|
@@ -4515,8 +4515,8 @@ function gt(t, n, e) {
|
|
|
4515
4515
|
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
4516
4516
|
}
|
|
4517
4517
|
r();
|
|
4518
|
-
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "",
|
|
4519
|
-
function
|
|
4518
|
+
const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", i = v();
|
|
4519
|
+
function s() {
|
|
4520
4520
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
4521
4521
|
}
|
|
4522
4522
|
function p() {
|
|
@@ -4546,7 +4546,7 @@ function gt(t, n, e) {
|
|
|
4546
4546
|
function y() {
|
|
4547
4547
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
4548
4548
|
}
|
|
4549
|
-
function
|
|
4549
|
+
function M() {
|
|
4550
4550
|
}
|
|
4551
4551
|
function O(k, F) {
|
|
4552
4552
|
F && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(F);
|
|
@@ -4560,7 +4560,7 @@ function gt(t, n, e) {
|
|
|
4560
4560
|
}
|
|
4561
4561
|
function _(k, F) {
|
|
4562
4562
|
const H = String(k.getAttribute("data-controltype")), T = k.getAttribute("data-feature"), j = T ? JSON.parse(T) : {};
|
|
4563
|
-
j.parentComponentInstance =
|
|
4563
|
+
j.parentComponentInstance = i.value;
|
|
4564
4564
|
let Q = ve(H, j);
|
|
4565
4565
|
e && e.onAcceptNewChildElement && (Q = e.onAcceptNewChildElement(k, F, Q));
|
|
4566
4566
|
const J = H.toLowerCase().replace("-", "_");
|
|
@@ -4568,12 +4568,12 @@ function gt(t, n, e) {
|
|
|
4568
4568
|
}
|
|
4569
4569
|
function g(k) {
|
|
4570
4570
|
}
|
|
4571
|
-
function
|
|
4571
|
+
function C(...k) {
|
|
4572
4572
|
if (e && e.getPropsConfig)
|
|
4573
4573
|
return e.getPropsConfig(...k);
|
|
4574
4574
|
}
|
|
4575
|
-
return
|
|
4576
|
-
canMove:
|
|
4575
|
+
return i.value = {
|
|
4576
|
+
canMove: s(),
|
|
4577
4577
|
canSelectParent: p(),
|
|
4578
4578
|
canDelete: c(),
|
|
4579
4579
|
canNested: !d(),
|
|
@@ -4587,8 +4587,8 @@ function gt(t, n, e) {
|
|
|
4587
4587
|
getBelongedComponentInstance: u,
|
|
4588
4588
|
getDraggableDesignItemElement: l,
|
|
4589
4589
|
getDraggingDisplayText: y,
|
|
4590
|
-
getPropConfig:
|
|
4591
|
-
getDragScopeElement:
|
|
4590
|
+
getPropConfig: C,
|
|
4591
|
+
getDragScopeElement: M,
|
|
4592
4592
|
onAcceptMovedChildElement: O,
|
|
4593
4593
|
onAcceptNewChildElement: _,
|
|
4594
4594
|
onChildElementMovedOut: g,
|
|
@@ -4596,40 +4596,40 @@ function gt(t, n, e) {
|
|
|
4596
4596
|
updateDragAndDropRules: r,
|
|
4597
4597
|
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || v(!1),
|
|
4598
4598
|
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
|
|
4599
|
-
},
|
|
4599
|
+
}, i;
|
|
4600
4600
|
}
|
|
4601
4601
|
const Fo = /* @__PURE__ */ ne({
|
|
4602
4602
|
name: "FButtonEdit",
|
|
4603
4603
|
props: Be,
|
|
4604
4604
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4605
4605
|
setup(t, n) {
|
|
4606
|
-
const e = v(), r = pe("design-item-context"), o = gt(e, r), a = v(t.customClass),
|
|
4606
|
+
const e = v(), r = pe("design-item-context"), o = gt(e, r), a = v(t.customClass), i = v(t.modelValue), s = pt(t, n, e, i), p = ct(t, n, e, s, i), c = v(""), d = ft(t, n, i, c, s), {
|
|
4607
4607
|
hasFocusedTextBox: u,
|
|
4608
4608
|
inputGroupClass: l
|
|
4609
|
-
} = d, h = dt(t, n,
|
|
4609
|
+
} = d, h = dt(t, n, i, u, c, d);
|
|
4610
4610
|
de(() => {
|
|
4611
4611
|
e.value.componentInstance = o;
|
|
4612
4612
|
}), n.expose(o.value);
|
|
4613
|
-
const y =
|
|
4613
|
+
const y = V(() => {
|
|
4614
4614
|
const g = {
|
|
4615
4615
|
"f-button-edit": !0,
|
|
4616
4616
|
"f-cmp-inputgroup": !0,
|
|
4617
4617
|
"f-button-edit-nowrap": !t.wrapText
|
|
4618
4618
|
};
|
|
4619
|
-
return a.value && a.value.split(" ").reduce((
|
|
4619
|
+
return a.value && a.value.split(" ").reduce((C, E) => (C[E] = !0, C), g), g;
|
|
4620
4620
|
});
|
|
4621
|
-
function
|
|
4622
|
-
return t.multiSelect && t.inputType === "tag" ? ht(t,
|
|
4621
|
+
function M() {
|
|
4622
|
+
return t.multiSelect && t.inputType === "tag" ? ht(t, i, d) : mt(t, i, d);
|
|
4623
4623
|
}
|
|
4624
|
-
let O =
|
|
4624
|
+
let O = M();
|
|
4625
4625
|
R([() => t.multiSelect, () => t.inputType], () => {
|
|
4626
|
-
O =
|
|
4626
|
+
O = M();
|
|
4627
4627
|
});
|
|
4628
4628
|
const {
|
|
4629
4629
|
renderButtonGroup: Y,
|
|
4630
4630
|
buttonHandleElement: _
|
|
4631
4631
|
} = yt(t, n, p, h);
|
|
4632
|
-
return () => w("div",
|
|
4632
|
+
return () => w("div", Ce(n.attrs, {
|
|
4633
4633
|
ref: e,
|
|
4634
4634
|
class: y.value,
|
|
4635
4635
|
id: t.id
|
|
@@ -4644,10 +4644,11 @@ ce.register = (t, n, e, r) => {
|
|
|
4644
4644
|
ce.registerDesigner = (t, n, e) => {
|
|
4645
4645
|
t["button-edit"] = Fo, n["button-edit"] = ut;
|
|
4646
4646
|
};
|
|
4647
|
-
|
|
4647
|
+
It(ce);
|
|
4648
4648
|
class bt {
|
|
4649
4649
|
static getEditorTypesByMDataType(n) {
|
|
4650
|
-
|
|
4650
|
+
const e = this.fieldControlTypeMapping[n];
|
|
4651
|
+
return e || [{ key: "", value: "" }];
|
|
4651
4652
|
}
|
|
4652
4653
|
}
|
|
4653
4654
|
/**
|
|
@@ -4719,13 +4720,18 @@ class Eo {
|
|
|
4719
4720
|
f(this, "designViewModelField");
|
|
4720
4721
|
f(this, "controlCreatorUtils");
|
|
4721
4722
|
f(this, "designerHostService");
|
|
4723
|
+
f(this, "schemaService", null);
|
|
4722
4724
|
f(this, "metadataService", null);
|
|
4723
4725
|
f(this, "propertyConfig", {
|
|
4724
4726
|
type: "object",
|
|
4725
4727
|
categories: {}
|
|
4726
4728
|
});
|
|
4727
4729
|
var r;
|
|
4728
|
-
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService;
|
|
4730
|
+
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
4731
|
+
}
|
|
4732
|
+
getTableInfo() {
|
|
4733
|
+
var n;
|
|
4734
|
+
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
4729
4735
|
}
|
|
4730
4736
|
setDesignViewModelField(n) {
|
|
4731
4737
|
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
@@ -4740,6 +4746,7 @@ class Eo {
|
|
|
4740
4746
|
changeFieldEditorType(n, e) {
|
|
4741
4747
|
}
|
|
4742
4748
|
getBasicPropConfig(n) {
|
|
4749
|
+
var r, o;
|
|
4743
4750
|
var e = this;
|
|
4744
4751
|
return this.setDesignViewModelField(n), {
|
|
4745
4752
|
description: "Basic Information",
|
|
@@ -4761,7 +4768,8 @@ class Eo {
|
|
|
4761
4768
|
type: "combo-list",
|
|
4762
4769
|
textField: "value",
|
|
4763
4770
|
valueField: "key",
|
|
4764
|
-
data: bt.getEditorTypesByMDataType(e.designViewModelField.type.name)
|
|
4771
|
+
data: bt.getEditorTypesByMDataType(((o = (r = e.designViewModelField) == null ? void 0 : r.type) == null ? void 0 : o.name) || ""),
|
|
4772
|
+
editable: !1
|
|
4765
4773
|
}
|
|
4766
4774
|
},
|
|
4767
4775
|
label: {
|
|
@@ -4770,11 +4778,11 @@ class Eo {
|
|
|
4770
4778
|
$converter: "/converter/form-group-label.converter"
|
|
4771
4779
|
}
|
|
4772
4780
|
},
|
|
4773
|
-
setPropertyRelates(
|
|
4774
|
-
if (
|
|
4775
|
-
switch (
|
|
4781
|
+
setPropertyRelates(a, i) {
|
|
4782
|
+
if (a)
|
|
4783
|
+
switch (a && a.propertyID) {
|
|
4776
4784
|
case "type": {
|
|
4777
|
-
e.changeControlType(n,
|
|
4785
|
+
e.changeControlType(n, a);
|
|
4778
4786
|
break;
|
|
4779
4787
|
}
|
|
4780
4788
|
}
|
|
@@ -4792,7 +4800,7 @@ class Eo {
|
|
|
4792
4800
|
let a = this.getControlParentContainer(n.id, o);
|
|
4793
4801
|
if (!a)
|
|
4794
4802
|
return;
|
|
4795
|
-
const
|
|
4803
|
+
const i = a.contents.findIndex((y) => y.id === n.id), s = a.contents[i];
|
|
4796
4804
|
let p;
|
|
4797
4805
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
4798
4806
|
editor: {
|
|
@@ -4802,19 +4810,19 @@ class Eo {
|
|
|
4802
4810
|
require: this.designViewModelField.require,
|
|
4803
4811
|
readonly: this.designViewModelField.readonly
|
|
4804
4812
|
}, !1), p = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, r)), Object.assign(p, {
|
|
4805
|
-
id:
|
|
4806
|
-
appearance:
|
|
4807
|
-
size:
|
|
4808
|
-
label:
|
|
4813
|
+
id: s.id,
|
|
4814
|
+
appearance: s.appearance,
|
|
4815
|
+
size: s.size,
|
|
4816
|
+
label: s.label
|
|
4809
4817
|
}), Object.assign(p.editor, {
|
|
4810
|
-
isTextArea: p.isTextArea &&
|
|
4818
|
+
isTextArea: p.isTextArea && s.isTextArea,
|
|
4811
4819
|
type: r || "",
|
|
4812
|
-
placeHolder: (c =
|
|
4813
|
-
holdPlace: (d =
|
|
4814
|
-
readonly: (u =
|
|
4815
|
-
require: (l =
|
|
4816
|
-
visible: (h =
|
|
4817
|
-
}), a.contents.splice(
|
|
4820
|
+
placeHolder: (c = s.editor) == null ? void 0 : c.placeHolder,
|
|
4821
|
+
holdPlace: (d = s.editor) == null ? void 0 : d.holdPlace,
|
|
4822
|
+
readonly: (u = s.editor) == null ? void 0 : u.readonly,
|
|
4823
|
+
require: (l = s.editor) == null ? void 0 : l.require,
|
|
4824
|
+
visible: (h = s.editor) == null ? void 0 : h.visible
|
|
4825
|
+
}), a.contents.splice(i, 1, p);
|
|
4818
4826
|
}
|
|
4819
4827
|
getAppearanceConfig(n = null) {
|
|
4820
4828
|
return {
|
|
@@ -4862,29 +4870,8 @@ class Eo {
|
|
|
4862
4870
|
return r;
|
|
4863
4871
|
}
|
|
4864
4872
|
}
|
|
4865
|
-
getBindingFieldEditorOptions(n) {
|
|
4866
|
-
const e = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
4867
|
-
return {
|
|
4868
|
-
type: "field-selector",
|
|
4869
|
-
bindingType: { enable: !1 },
|
|
4870
|
-
editorParams: {
|
|
4871
|
-
propertyData: n,
|
|
4872
|
-
formBasicInfo: e
|
|
4873
|
-
},
|
|
4874
|
-
columns: [
|
|
4875
|
-
{ field: "name", title: "字段名称" },
|
|
4876
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
4877
|
-
{ field: "fieldType", title: "字段类型" }
|
|
4878
|
-
],
|
|
4879
|
-
beforeOpenDialog: (r) => {
|
|
4880
|
-
const o = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
4881
|
-
r.instance.loadData(o);
|
|
4882
|
-
},
|
|
4883
|
-
textField: "bindingField"
|
|
4884
|
-
};
|
|
4885
|
-
}
|
|
4886
4873
|
}
|
|
4887
|
-
class
|
|
4874
|
+
class So extends Eo {
|
|
4888
4875
|
constructor(n, e) {
|
|
4889
4876
|
super(n, e);
|
|
4890
4877
|
}
|
|
@@ -4919,10 +4906,14 @@ class Vo extends Eo {
|
|
|
4919
4906
|
{ field: "bindingField", title: "绑定字段" },
|
|
4920
4907
|
{ field: "fieldType", title: "字段类型" }
|
|
4921
4908
|
],
|
|
4909
|
+
textField: "bindingField",
|
|
4922
4910
|
data: r
|
|
4923
4911
|
}
|
|
4924
4912
|
};
|
|
4925
4913
|
}
|
|
4914
|
+
getBindingOtions(n) {
|
|
4915
|
+
return this.getFieldSelectorOptions(n);
|
|
4916
|
+
}
|
|
4926
4917
|
getComponentConfig(n, e = {}, r = {}) {
|
|
4927
4918
|
const o = Object.assign({
|
|
4928
4919
|
description: "组件信息",
|
|
@@ -4954,7 +4945,7 @@ class Vo extends Eo {
|
|
|
4954
4945
|
return { ...o, properties: { ...a } };
|
|
4955
4946
|
}
|
|
4956
4947
|
}
|
|
4957
|
-
class
|
|
4948
|
+
class Vo extends So {
|
|
4958
4949
|
constructor(n, e) {
|
|
4959
4950
|
super(n, e);
|
|
4960
4951
|
}
|
|
@@ -5003,10 +4994,10 @@ function No(t, n) {
|
|
|
5003
4994
|
function a() {
|
|
5004
4995
|
return !1;
|
|
5005
4996
|
}
|
|
5006
|
-
function
|
|
4997
|
+
function i() {
|
|
5007
4998
|
return !1;
|
|
5008
4999
|
}
|
|
5009
|
-
function
|
|
5000
|
+
function s() {
|
|
5010
5001
|
return !0;
|
|
5011
5002
|
}
|
|
5012
5003
|
function p(u) {
|
|
@@ -5019,8 +5010,8 @@ function No(t, n) {
|
|
|
5019
5010
|
return {
|
|
5020
5011
|
canAccepts: o,
|
|
5021
5012
|
checkCanDeleteComponent: a,
|
|
5022
|
-
checkCanMoveComponent:
|
|
5023
|
-
hideNestedPaddingInDesginerView:
|
|
5013
|
+
checkCanMoveComponent: i,
|
|
5014
|
+
hideNestedPaddingInDesginerView: s,
|
|
5024
5015
|
onAcceptMovedChildElement: p,
|
|
5025
5016
|
resolveComponentContext: c,
|
|
5026
5017
|
triggerBelongedComponentToMoveWhenMoved: e,
|
|
@@ -5034,21 +5025,21 @@ function Lo(t, n) {
|
|
|
5034
5025
|
checkCanDeleteComponent: r,
|
|
5035
5026
|
checkCanMoveComponent: o,
|
|
5036
5027
|
hideNestedPaddingInDesginerView: a,
|
|
5037
|
-
onAcceptMovedChildElement:
|
|
5038
|
-
resolveComponentContext:
|
|
5028
|
+
onAcceptMovedChildElement: i,
|
|
5029
|
+
resolveComponentContext: s,
|
|
5039
5030
|
triggerBelongedComponentToMoveWhenMoved: p,
|
|
5040
5031
|
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
5041
5032
|
} = No(t), d = t.schema;
|
|
5042
5033
|
function u(l) {
|
|
5043
|
-
return new
|
|
5034
|
+
return new Vo(l, n).getPropertyConfig(d);
|
|
5044
5035
|
}
|
|
5045
5036
|
return {
|
|
5046
5037
|
canAccepts: e,
|
|
5047
5038
|
checkCanDeleteComponent: r,
|
|
5048
5039
|
checkCanMoveComponent: o,
|
|
5049
5040
|
hideNestedPaddingInDesginerView: a,
|
|
5050
|
-
onAcceptMovedChildElement:
|
|
5051
|
-
resolveComponentContext:
|
|
5041
|
+
onAcceptMovedChildElement: i,
|
|
5042
|
+
resolveComponentContext: s,
|
|
5052
5043
|
triggerBelongedComponentToMoveWhenMoved: p,
|
|
5053
5044
|
triggerBelongedComponentToDeleteWhenDeleted: c,
|
|
5054
5045
|
getPropsConfig: u
|
|
@@ -5059,7 +5050,7 @@ const Ao = /* @__PURE__ */ ne({
|
|
|
5059
5050
|
props: Pe,
|
|
5060
5051
|
emits: ["datePicked", "update:modelValue"],
|
|
5061
5052
|
setup(t, n) {
|
|
5062
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(),
|
|
5053
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(), i = pe("designer-host-service"), s = pe("design-item-context"), p = Lo(s, i), c = gt(a, s, p);
|
|
5063
5054
|
de(() => {
|
|
5064
5055
|
a.value.componentInstance = c;
|
|
5065
5056
|
}), n.expose(c.value);
|
|
@@ -5075,12 +5066,12 @@ const Ao = /* @__PURE__ */ ne({
|
|
|
5075
5066
|
enableClear: !0,
|
|
5076
5067
|
onClickButton: () => void 0
|
|
5077
5068
|
}, {
|
|
5078
|
-
default: () => [w(
|
|
5069
|
+
default: () => [w(St("f-time-picker-time-view"), null, null)]
|
|
5079
5070
|
})]);
|
|
5080
5071
|
}
|
|
5081
5072
|
});
|
|
5082
5073
|
ee.install = (t) => {
|
|
5083
|
-
t.component(ee.name, ee).component(
|
|
5074
|
+
t.component(ee.name, ee).component(Me.name, Me);
|
|
5084
5075
|
};
|
|
5085
5076
|
ee.register = (t, n, e, r) => {
|
|
5086
5077
|
t["time-picker"] = ee, n["time-picker"] = je;
|
|
@@ -5090,7 +5081,7 @@ ee.registerDesigner = (t, n, e) => {
|
|
|
5090
5081
|
};
|
|
5091
5082
|
export {
|
|
5092
5083
|
ee as FTimePicker,
|
|
5093
|
-
|
|
5084
|
+
Me as FTimePickerTimeView,
|
|
5094
5085
|
ee as default,
|
|
5095
5086
|
je as propsResolver,
|
|
5096
5087
|
Pe as timePickerProps,
|