@farris/ui-vue 1.2.5 → 1.2.6
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/package.json +1 -1
- package/components/avatar/index.esm.js +124 -116
- 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 +219 -209
- 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 +36 -28
- 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 +318 -316
- 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 +3771 -3622
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2408 -2405
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +250 -242
- 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 +575 -565
- 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 +281 -277
- 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 +1795 -1783
- 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 +3914 -3769
- 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 +475 -465
- 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 +256 -248
- 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 +1445 -1446
- 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 +4347 -4145
- 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 +4657 -4475
- 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 +353 -345
- 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 +917 -893
- 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 +108 -101
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +394 -384
- 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 +72 -64
- 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 +404 -393
- 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 +610 -592
- 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 +3654 -3408
- 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 +79 -71
- 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 +1448 -1406
- 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 +86 -78
- 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 +387 -379
- 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/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +3769 -3620
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2041 -2038
- 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 +12423 -11981
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- 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/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 +8 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
- 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 -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,13 +1,13 @@
|
|
|
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 S, onMounted as de, createVNode as w, createTextVNode as be, mergeProps as
|
|
4
|
+
import { ref as v, defineComponent as ne, watch as R, computed as S, 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 Ve, withDirectives as Bt, vShow as Ft, Fragment as Et, resolveComponent as Vt } from "vue";
|
|
5
5
|
import { cloneDeep as St } from "lodash-es";
|
|
6
6
|
import Nt from "@farris/ui-vue/components/button-edit";
|
|
7
7
|
import "bignumber.js";
|
|
8
|
-
import { resolveAppearance as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import { resolveAppearance as It } from "@farris/ui-vue/components/dynamic-resolver";
|
|
9
|
+
import Lt from "@farris/ui-vue/components/tags";
|
|
10
|
+
import At from "@farris/ui-vue/components/popover";
|
|
11
11
|
import { withInstall as Wt } from "@farris/ui-vue/components/common";
|
|
12
12
|
const qe = {}, _e = {};
|
|
13
13
|
function ke(t) {
|
|
@@ -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) {
|
|
@@ -402,12 +402,12 @@ function q(t) {
|
|
|
402
402
|
const n = Object.prototype.toString.call(t);
|
|
403
403
|
return t instanceof Date || typeof t == "object" && n === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || n === "[object Number]" || typeof t == "string" || n === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function I(t, n) {
|
|
406
406
|
return t instanceof Date ? new t.constructor(n) : new Date(n);
|
|
407
407
|
}
|
|
408
408
|
function Qe(t, n) {
|
|
409
409
|
const e = q(t);
|
|
410
|
-
return isNaN(n) ?
|
|
410
|
+
return isNaN(n) ? I(t, NaN) : (n && e.setDate(e.getDate() + n), e);
|
|
411
411
|
}
|
|
412
412
|
const $e = 6048e5, on = 864e5, an = 6e4, sn = 36e5, un = 1e3;
|
|
413
413
|
let ln = {};
|
|
@@ -415,20 +415,20 @@ 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 });
|
|
424
424
|
}
|
|
425
425
|
function Ge(t) {
|
|
426
|
-
const n = q(t), e = n.getFullYear(), r =
|
|
426
|
+
const n = q(t), e = n.getFullYear(), r = I(t, 0);
|
|
427
427
|
r.setFullYear(e + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
428
|
-
const o = te(r), a =
|
|
428
|
+
const o = te(r), a = I(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
433
|
function Se(t) {
|
|
434
434
|
const n = q(t);
|
|
@@ -453,7 +453,7 @@ function cn(t, n) {
|
|
|
453
453
|
return Math.round((o - a) / on);
|
|
454
454
|
}
|
|
455
455
|
function dn(t) {
|
|
456
|
-
const n = Ge(t), e =
|
|
456
|
+
const n = Ge(t), e = I(t, 0);
|
|
457
457
|
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), te(e);
|
|
458
458
|
}
|
|
459
459
|
function fn(t) {
|
|
@@ -466,7 +466,7 @@ function Ue(t) {
|
|
|
466
466
|
return !isNaN(Number(n));
|
|
467
467
|
}
|
|
468
468
|
function pn(t) {
|
|
469
|
-
const n = q(t), e =
|
|
469
|
+
const n = q(t), e = I(t, 0);
|
|
470
470
|
return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
471
471
|
}
|
|
472
472
|
const mn = {
|
|
@@ -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,23 +778,23 @@ 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
787
|
const Vn = /^(\d+)(th|st|nd|rd)?/i, Sn = /\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
|
|
791
|
-
},
|
|
791
|
+
}, In = {
|
|
792
792
|
any: [/^b/i, /^(a|c)/i]
|
|
793
|
-
},
|
|
793
|
+
}, Ln = {
|
|
794
794
|
narrow: /^[1234]/i,
|
|
795
795
|
abbreviated: /^q[1234]/i,
|
|
796
796
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
797
|
-
},
|
|
797
|
+
}, An = {
|
|
798
798
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
799
799
|
}, Wn = {
|
|
800
800
|
narrow: /^[jfmasond]/i,
|
|
@@ -860,13 +860,13 @@ const Vn = /^(\d+)(th|st|nd|rd)?/i, Sn = /\d+/i, Nn = {
|
|
|
860
860
|
era: le({
|
|
861
861
|
matchPatterns: Nn,
|
|
862
862
|
defaultMatchWidth: "wide",
|
|
863
|
-
parsePatterns:
|
|
863
|
+
parsePatterns: In,
|
|
864
864
|
defaultParseWidth: "any"
|
|
865
865
|
}),
|
|
866
866
|
quarter: le({
|
|
867
|
-
matchPatterns:
|
|
867
|
+
matchPatterns: Ln,
|
|
868
868
|
defaultMatchWidth: "wide",
|
|
869
|
-
parsePatterns:
|
|
869
|
+
parsePatterns: An,
|
|
870
870
|
defaultParseWidth: "any",
|
|
871
871
|
valueCallback: (t) => t + 1
|
|
872
872
|
}),
|
|
@@ -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 = I(t, 0);
|
|
914
|
+
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
915
|
+
const s = z(i, n), p = I(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 = I(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
|
},
|
|
@@ -1419,7 +1419,7 @@ const X = {
|
|
|
1419
1419
|
return "Z";
|
|
1420
1420
|
switch (n) {
|
|
1421
1421
|
case "X":
|
|
1422
|
-
return
|
|
1422
|
+
return Le(r);
|
|
1423
1423
|
case "XXXX":
|
|
1424
1424
|
case "XX":
|
|
1425
1425
|
return Z(r);
|
|
@@ -1434,7 +1434,7 @@ const X = {
|
|
|
1434
1434
|
const r = t.getTimezoneOffset();
|
|
1435
1435
|
switch (n) {
|
|
1436
1436
|
case "x":
|
|
1437
|
-
return
|
|
1437
|
+
return Le(r);
|
|
1438
1438
|
case "xxxx":
|
|
1439
1439
|
case "xx":
|
|
1440
1440
|
return Z(r);
|
|
@@ -1451,7 +1451,7 @@ const X = {
|
|
|
1451
1451
|
case "O":
|
|
1452
1452
|
case "OO":
|
|
1453
1453
|
case "OOO":
|
|
1454
|
-
return "GMT" +
|
|
1454
|
+
return "GMT" + Ie(r, ":");
|
|
1455
1455
|
case "OOOO":
|
|
1456
1456
|
default:
|
|
1457
1457
|
return "GMT" + Z(r, ":");
|
|
@@ -1464,7 +1464,7 @@ const X = {
|
|
|
1464
1464
|
case "z":
|
|
1465
1465
|
case "zz":
|
|
1466
1466
|
case "zzz":
|
|
1467
|
-
return "GMT" +
|
|
1467
|
+
return "GMT" + Ie(r, ":");
|
|
1468
1468
|
case "zzzz":
|
|
1469
1469
|
default:
|
|
1470
1470
|
return "GMT" + Z(r, ":");
|
|
@@ -1481,18 +1481,18 @@ const X = {
|
|
|
1481
1481
|
return D(r, n.length);
|
|
1482
1482
|
}
|
|
1483
1483
|
};
|
|
1484
|
-
function
|
|
1484
|
+
function Ie(t, n = "") {
|
|
1485
1485
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
1486
1486
|
return a === 0 ? e + String(o) : e + String(o) + n + D(a, 2);
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1488
|
+
function Le(t, n) {
|
|
1489
1489
|
return t % 60 === 0 ? (t > 0 ? "-" : "+") + D(Math.abs(t) / 60, 2) : Z(t, n);
|
|
1490
1490
|
}
|
|
1491
1491
|
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 Ae = (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 Ae(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}}", Ae(r, n)).replace("{{time}}", Je(o, n));
|
|
1540
1540
|
}, xe = {
|
|
1541
1541
|
p: Je,
|
|
1542
1542
|
P: Un
|
|
@@ -1558,42 +1558,42 @@ function Jn(t, n, e) {
|
|
|
1558
1558
|
const Kn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, er = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, tr = /^'([^]*?)'?$/, nr = /''/g, rr = /[a-zA-Z]/;
|
|
1559
1559
|
function We(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) {
|
|
@@ -1608,7 +1608,7 @@ function ir(t) {
|
|
|
1608
1608
|
return e === 0 && (e = 7), e;
|
|
1609
1609
|
}
|
|
1610
1610
|
function sr(t, n) {
|
|
1611
|
-
const e = n instanceof Date ?
|
|
1611
|
+
const e = n instanceof Date ? I(n, 0) : new n(0);
|
|
1612
1612
|
return e.setFullYear(
|
|
1613
1613
|
t.getFullYear(),
|
|
1614
1614
|
t.getMonth(),
|
|
@@ -1647,7 +1647,7 @@ class cr extends tt {
|
|
|
1647
1647
|
f(this, "subPriority", -1);
|
|
1648
1648
|
}
|
|
1649
1649
|
set(e, r) {
|
|
1650
|
-
return r.timestampIsSet ? e :
|
|
1650
|
+
return r.timestampIsSet ? e : I(e, sr(e, Date));
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
1653
|
class P {
|
|
@@ -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 A = {
|
|
1695
1695
|
month: /^(1[0-2]|0?\d)/,
|
|
1696
1696
|
// 0 to 12
|
|
1697
1697
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -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(A.anyDigitsSigned, t);
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function L(t, n) {
|
|
1771
1771
|
switch (t) {
|
|
1772
1772
|
case 1:
|
|
1773
|
-
return N(
|
|
1773
|
+
return N(A.singleDigit, n);
|
|
1774
1774
|
case 2:
|
|
1775
|
-
return N(
|
|
1775
|
+
return N(A.twoDigits, n);
|
|
1776
1776
|
case 3:
|
|
1777
|
-
return N(
|
|
1777
|
+
return N(A.threeDigits, n);
|
|
1778
1778
|
case 4:
|
|
1779
|
-
return N(
|
|
1779
|
+
return N(A.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(A.singleDigitSigned, n);
|
|
1788
1788
|
case 2:
|
|
1789
|
-
return N(
|
|
1789
|
+
return N(A.twoDigitsSigned, n);
|
|
1790
1790
|
case 3:
|
|
1791
|
-
return N(
|
|
1791
|
+
return N(A.threeDigitsSigned, n);
|
|
1792
1792
|
case 4:
|
|
1793
|
-
return N(
|
|
1793
|
+
return N(A.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,13 +1833,13 @@ 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 W(
|
|
1842
|
+
return W(L(4, e), a);
|
|
1843
1843
|
case "yo":
|
|
1844
1844
|
return W(
|
|
1845
1845
|
o.ordinalNumber(e, {
|
|
@@ -1848,7 +1848,7 @@ class fr extends P {
|
|
|
1848
1848
|
a
|
|
1849
1849
|
);
|
|
1850
1850
|
default:
|
|
1851
|
-
return W(
|
|
1851
|
+
return W(L(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,13 +1888,13 @@ 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 W(
|
|
1897
|
+
return W(L(4, e), a);
|
|
1898
1898
|
case "Yo":
|
|
1899
1899
|
return W(
|
|
1900
1900
|
o.ordinalNumber(e, {
|
|
@@ -1903,18 +1903,18 @@ class pr extends P {
|
|
|
1903
1903
|
a
|
|
1904
1904
|
);
|
|
1905
1905
|
default:
|
|
1906
|
-
return W(
|
|
1906
|
+
return W(L(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 {
|
|
@@ -1952,7 +1952,7 @@ class mr extends P {
|
|
|
1952
1952
|
return he(r === "R" ? 4 : r.length, e);
|
|
1953
1953
|
}
|
|
1954
1954
|
set(e, r, o) {
|
|
1955
|
-
const a =
|
|
1955
|
+
const a = I(e, 0);
|
|
1956
1956
|
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0), te(a);
|
|
1957
1957
|
}
|
|
1958
1958
|
}
|
|
@@ -1994,7 +1994,7 @@ class yr extends P {
|
|
|
1994
1994
|
switch (r) {
|
|
1995
1995
|
case "Q":
|
|
1996
1996
|
case "QQ":
|
|
1997
|
-
return
|
|
1997
|
+
return L(r.length, e);
|
|
1998
1998
|
case "Qo":
|
|
1999
1999
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
2000
2000
|
case "QQQ":
|
|
@@ -2056,7 +2056,7 @@ class gr extends P {
|
|
|
2056
2056
|
switch (r) {
|
|
2057
2057
|
case "q":
|
|
2058
2058
|
case "qq":
|
|
2059
|
-
return
|
|
2059
|
+
return L(r.length, e);
|
|
2060
2060
|
case "qo":
|
|
2061
2061
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
2062
2062
|
case "qqq":
|
|
@@ -2114,15 +2114,15 @@ 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
2120
|
return W(
|
|
2121
|
-
N(
|
|
2121
|
+
N(A.month, e),
|
|
2122
2122
|
a
|
|
2123
2123
|
);
|
|
2124
2124
|
case "MM":
|
|
2125
|
-
return W(
|
|
2125
|
+
return W(L(2, e), a);
|
|
2126
2126
|
case "Mo":
|
|
2127
2127
|
return W(
|
|
2128
2128
|
o.ordinalNumber(e, {
|
|
@@ -2176,15 +2176,15 @@ 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
2182
|
return W(
|
|
2183
|
-
N(
|
|
2183
|
+
N(A.month, e),
|
|
2184
2184
|
a
|
|
2185
2185
|
);
|
|
2186
2186
|
case "LL":
|
|
2187
|
-
return W(
|
|
2187
|
+
return W(L(2, e), a);
|
|
2188
2188
|
case "Lo":
|
|
2189
2189
|
return W(
|
|
2190
2190
|
o.ordinalNumber(e, {
|
|
@@ -2244,11 +2244,11 @@ class xr extends P {
|
|
|
2244
2244
|
parse(e, r, o) {
|
|
2245
2245
|
switch (r) {
|
|
2246
2246
|
case "w":
|
|
2247
|
-
return N(
|
|
2247
|
+
return N(A.week, e);
|
|
2248
2248
|
case "wo":
|
|
2249
2249
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2250
2250
|
default:
|
|
2251
|
-
return
|
|
2251
|
+
return L(r.length, e);
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
2254
|
validate(e, r) {
|
|
@@ -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,11 +2286,11 @@ class Cr extends P {
|
|
|
2286
2286
|
parse(e, r, o) {
|
|
2287
2287
|
switch (r) {
|
|
2288
2288
|
case "I":
|
|
2289
|
-
return N(
|
|
2289
|
+
return N(A.week, e);
|
|
2290
2290
|
case "Io":
|
|
2291
2291
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2292
2292
|
default:
|
|
2293
|
-
return
|
|
2293
|
+
return L(r.length, e);
|
|
2294
2294
|
}
|
|
2295
2295
|
}
|
|
2296
2296
|
validate(e, r) {
|
|
@@ -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,16 +2337,16 @@ class Pr extends P {
|
|
|
2337
2337
|
parse(e, r, o) {
|
|
2338
2338
|
switch (r) {
|
|
2339
2339
|
case "d":
|
|
2340
|
-
return N(
|
|
2340
|
+
return N(A.date, e);
|
|
2341
2341
|
case "do":
|
|
2342
2342
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2343
2343
|
default:
|
|
2344
|
-
return
|
|
2344
|
+
return L(r.length, e);
|
|
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,11 +2379,11 @@ class Dr extends P {
|
|
|
2379
2379
|
switch (r) {
|
|
2380
2380
|
case "D":
|
|
2381
2381
|
case "DD":
|
|
2382
|
-
return N(
|
|
2382
|
+
return N(A.dayOfYear, e);
|
|
2383
2383
|
case "Do":
|
|
2384
2384
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2385
2385
|
default:
|
|
2386
|
-
return
|
|
2386
|
+
return L(r.length, e);
|
|
2387
2387
|
}
|
|
2388
2388
|
}
|
|
2389
2389
|
validate(e, r) {
|
|
@@ -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 W(
|
|
2469
|
+
return W(L(r.length, e), i);
|
|
2470
2470
|
case "eo":
|
|
2471
2471
|
return W(
|
|
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 W(
|
|
2534
|
+
return W(L(r.length, e), i);
|
|
2535
2535
|
case "co":
|
|
2536
2536
|
return W(
|
|
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,11 +2593,11 @@ 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":
|
|
2600
|
-
return
|
|
2600
|
+
return L(r.length, e);
|
|
2601
2601
|
case "io":
|
|
2602
2602
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2603
2603
|
case "iii":
|
|
@@ -2783,7 +2783,7 @@ class Nr extends P {
|
|
|
2783
2783
|
return e.setHours(Oe(o), 0, 0, 0), e;
|
|
2784
2784
|
}
|
|
2785
2785
|
}
|
|
2786
|
-
class
|
|
2786
|
+
class Ir extends P {
|
|
2787
2787
|
constructor() {
|
|
2788
2788
|
super(...arguments);
|
|
2789
2789
|
f(this, "priority", 70);
|
|
@@ -2792,11 +2792,11 @@ class Lr extends P {
|
|
|
2792
2792
|
parse(e, r, o) {
|
|
2793
2793
|
switch (r) {
|
|
2794
2794
|
case "h":
|
|
2795
|
-
return N(
|
|
2795
|
+
return N(A.hour12h, e);
|
|
2796
2796
|
case "ho":
|
|
2797
2797
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2798
2798
|
default:
|
|
2799
|
-
return
|
|
2799
|
+
return L(r.length, e);
|
|
2800
2800
|
}
|
|
2801
2801
|
}
|
|
2802
2802
|
validate(e, r) {
|
|
@@ -2807,7 +2807,7 @@ class Lr extends P {
|
|
|
2807
2807
|
return a && o < 12 ? e.setHours(o + 12, 0, 0, 0) : !a && o === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
class
|
|
2810
|
+
class Lr extends P {
|
|
2811
2811
|
constructor() {
|
|
2812
2812
|
super(...arguments);
|
|
2813
2813
|
f(this, "priority", 70);
|
|
@@ -2816,11 +2816,11 @@ class Ar extends P {
|
|
|
2816
2816
|
parse(e, r, o) {
|
|
2817
2817
|
switch (r) {
|
|
2818
2818
|
case "H":
|
|
2819
|
-
return N(
|
|
2819
|
+
return N(A.hour23h, e);
|
|
2820
2820
|
case "Ho":
|
|
2821
2821
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2822
2822
|
default:
|
|
2823
|
-
return
|
|
2823
|
+
return L(r.length, e);
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
2826
2826
|
validate(e, r) {
|
|
@@ -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 Ar extends P {
|
|
2834
2834
|
constructor() {
|
|
2835
2835
|
super(...arguments);
|
|
2836
2836
|
f(this, "priority", 70);
|
|
@@ -2839,11 +2839,11 @@ class Ir extends P {
|
|
|
2839
2839
|
parse(e, r, o) {
|
|
2840
2840
|
switch (r) {
|
|
2841
2841
|
case "K":
|
|
2842
|
-
return N(
|
|
2842
|
+
return N(A.hour11h, e);
|
|
2843
2843
|
case "Ko":
|
|
2844
2844
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2845
2845
|
default:
|
|
2846
|
-
return
|
|
2846
|
+
return L(r.length, e);
|
|
2847
2847
|
}
|
|
2848
2848
|
}
|
|
2849
2849
|
validate(e, r) {
|
|
@@ -2862,11 +2862,11 @@ class Wr extends P {
|
|
|
2862
2862
|
parse(e, r, o) {
|
|
2863
2863
|
switch (r) {
|
|
2864
2864
|
case "k":
|
|
2865
|
-
return N(
|
|
2865
|
+
return N(A.hour24h, e);
|
|
2866
2866
|
case "ko":
|
|
2867
2867
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2868
2868
|
default:
|
|
2869
|
-
return
|
|
2869
|
+
return L(r.length, e);
|
|
2870
2870
|
}
|
|
2871
2871
|
}
|
|
2872
2872
|
validate(e, r) {
|
|
@@ -2886,11 +2886,11 @@ class Yr extends P {
|
|
|
2886
2886
|
parse(e, r, o) {
|
|
2887
2887
|
switch (r) {
|
|
2888
2888
|
case "m":
|
|
2889
|
-
return N(
|
|
2889
|
+
return N(A.minute, e);
|
|
2890
2890
|
case "mo":
|
|
2891
2891
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2892
2892
|
default:
|
|
2893
|
-
return
|
|
2893
|
+
return L(r.length, e);
|
|
2894
2894
|
}
|
|
2895
2895
|
}
|
|
2896
2896
|
validate(e, r) {
|
|
@@ -2909,11 +2909,11 @@ class qr extends P {
|
|
|
2909
2909
|
parse(e, r, o) {
|
|
2910
2910
|
switch (r) {
|
|
2911
2911
|
case "s":
|
|
2912
|
-
return N(
|
|
2912
|
+
return N(A.second, e);
|
|
2913
2913
|
case "so":
|
|
2914
2914
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2915
2915
|
default:
|
|
2916
|
-
return
|
|
2916
|
+
return L(r.length, e);
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
2919
|
validate(e, r) {
|
|
@@ -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 W(
|
|
2934
|
+
return W(L(r.length, e), o);
|
|
2935
2935
|
}
|
|
2936
2936
|
set(e, r, o) {
|
|
2937
2937
|
return e.setMilliseconds(o), e;
|
|
@@ -2968,7 +2968,7 @@ class Rr extends P {
|
|
|
2968
2968
|
}
|
|
2969
2969
|
}
|
|
2970
2970
|
set(e, r, o) {
|
|
2971
|
-
return r.timestampIsSet ? e :
|
|
2971
|
+
return r.timestampIsSet ? e : I(
|
|
2972
2972
|
e,
|
|
2973
2973
|
e.getTime() - me(e) - o
|
|
2974
2974
|
);
|
|
@@ -3005,7 +3005,7 @@ class jr extends P {
|
|
|
3005
3005
|
}
|
|
3006
3006
|
}
|
|
3007
3007
|
set(e, r, o) {
|
|
3008
|
-
return r.timestampIsSet ? e :
|
|
3008
|
+
return r.timestampIsSet ? e : I(
|
|
3009
3009
|
e,
|
|
3010
3010
|
e.getTime() - me(e) - o
|
|
3011
3011
|
);
|
|
@@ -3021,7 +3021,7 @@ class Qr extends P {
|
|
|
3021
3021
|
return nt(e);
|
|
3022
3022
|
}
|
|
3023
3023
|
set(e, r, o) {
|
|
3024
|
-
return [
|
|
3024
|
+
return [I(e, o * 1e3), { timestampIsSet: !0 }];
|
|
3025
3025
|
}
|
|
3026
3026
|
}
|
|
3027
3027
|
class $r extends P {
|
|
@@ -3034,7 +3034,7 @@ class $r extends P {
|
|
|
3034
3034
|
return nt(e);
|
|
3035
3035
|
}
|
|
3036
3036
|
set(e, r, o) {
|
|
3037
|
-
return [
|
|
3037
|
+
return [I(e, o), { timestampIsSet: !0 }];
|
|
3038
3038
|
}
|
|
3039
3039
|
}
|
|
3040
3040
|
const Gr = {
|
|
@@ -3048,7 +3048,7 @@ 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(),
|
|
@@ -3058,9 +3058,9 @@ const Gr = {
|
|
|
3058
3058
|
a: new Vr(),
|
|
3059
3059
|
b: new Sr(),
|
|
3060
3060
|
B: new Nr(),
|
|
3061
|
-
h: new
|
|
3062
|
-
H: new
|
|
3063
|
-
K: new
|
|
3061
|
+
h: new Ir(),
|
|
3062
|
+
H: new Lr(),
|
|
3063
|
+
K: new Ar(),
|
|
3064
3064
|
k: new Wr(),
|
|
3065
3065
|
m: new Yr(),
|
|
3066
3066
|
s: new qr(),
|
|
@@ -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
|
-
return t === "" ? q(e) :
|
|
3077
|
+
return t === "" ? q(e) : I(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,
|
|
@@ -3112,35 +3112,35 @@ function Ye(t, n, e, r) {
|
|
|
3112
3112
|
p
|
|
3113
3113
|
);
|
|
3114
3114
|
if (!F)
|
|
3115
|
-
return
|
|
3115
|
+
return I(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
|
-
return
|
|
3125
|
+
return I(e, NaN);
|
|
3126
3126
|
}
|
|
3127
3127
|
}
|
|
3128
3128
|
if (t.length > 0 && Jr.test(t))
|
|
3129
|
-
return
|
|
3130
|
-
const l = c.map((g) => g.priority).sort((g,
|
|
3131
|
-
(g) => c.filter((
|
|
3129
|
+
return I(e, NaN);
|
|
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()))
|
|
3135
|
-
return
|
|
3135
|
+
return I(e, NaN);
|
|
3136
3136
|
const y = {};
|
|
3137
3137
|
for (const g of l) {
|
|
3138
3138
|
if (!g.validate(h, p))
|
|
3139
|
-
return
|
|
3140
|
-
const
|
|
3141
|
-
Array.isArray(
|
|
3139
|
+
return I(e, NaN);
|
|
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
|
-
return
|
|
3143
|
+
return I(e, h);
|
|
3144
3144
|
}
|
|
3145
3145
|
function eo(t) {
|
|
3146
3146
|
return t.match(zr)[1].replace(Zr, "'");
|
|
@@ -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,13 +3449,13 @@ 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;
|
|
@@ -3466,25 +3466,25 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3466
3466
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
3467
3467
|
"f-area-show": !0
|
|
3468
3468
|
})), Q = S(() => ({
|
|
3469
|
-
width:
|
|
3469
|
+
width: C.value ? `${r.value}px` : "100%"
|
|
3470
3470
|
})), J = S(() => T("hour")), oe = S(() => T("minute")), ae = S(() => T("second"));
|
|
3471
3471
|
function ye(m, x = 1, $ = 0) {
|
|
3472
3472
|
return x = Math.ceil(x), new Array(Math.ceil(m / x)).fill(0).map((V, 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,
|
|
3484
|
+
if (o.value = ye(m, M.value, x).map((V) => ({
|
|
3485
3485
|
index: V,
|
|
3486
3486
|
disabled: $.length > 0 && $.indexOf(V) !== -1
|
|
3487
|
-
})),
|
|
3487
|
+
})), C.value && o.value[o.value.length - 1].index === 12) {
|
|
3488
3488
|
const V = [...o.value];
|
|
3489
3489
|
V.unshift(V[V.length - 1]), V.splice(V.length - 1, 1), o.value = V;
|
|
3490
3490
|
}
|
|
@@ -3497,20 +3497,20 @@ 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) {
|
|
@@ -3534,7 +3534,7 @@ 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 $ =
|
|
3537
|
+
const $ = i.value.filter((V) => !V.disabled);
|
|
3538
3538
|
if (!$.find((V) => V.index === l.seconds)) {
|
|
3539
3539
|
const {
|
|
3540
3540
|
index: V,
|
|
@@ -3544,18 +3544,18 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
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 = S(() => 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
|
|
@@ -3662,7 +3662,7 @@ const Ce = /* @__PURE__ */ ne({
|
|
|
3662
3662
|
});
|
|
3663
3663
|
}
|
|
3664
3664
|
}), uo = /* @__PURE__ */ new Map([
|
|
3665
|
-
["appearance",
|
|
3665
|
+
["appearance", It]
|
|
3666
3666
|
]);
|
|
3667
3667
|
function lo(t, n, e) {
|
|
3668
3668
|
return n;
|
|
@@ -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
4067
|
const e = v(t.popupContentPosition), r = v(t.host), o = S(() => ({
|
|
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
4074
|
S(() => {
|
|
4075
|
-
const
|
|
4076
|
-
if (
|
|
4077
|
-
const p =
|
|
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 = S(() => ({
|
|
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 = S(() => ({
|
|
4163
4163
|
"input-group-append": !0,
|
|
4164
4164
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4165
4165
|
})), { judgeCanOpen: p } = lt(t, o), c = S(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = pe(Ho, null), u = v();
|
|
4166
|
-
async function l(
|
|
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 = S(() => 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,18 +4217,18 @@ 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 = S(() => t.popupOnInput),
|
|
4231
|
+
const a = S(() => t.popupOnInput), i = S(() => t.popupOnFocus), { shouldPopupContent: s } = o, p = S(() => t.enableTitle ? e.value : ""), c = S(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), d = S(() => t.readonly || !t.editable), u = v(!1), l = S(() => !t.disable && u.value), h = S(() => ({
|
|
4232
4232
|
"text-left": t.textAlign === "left",
|
|
4233
4233
|
"text-center": t.textAlign === "center",
|
|
4234
4234
|
"text-right": t.textAlign === "right",
|
|
@@ -4241,11 +4241,11 @@ function ft(t, n, e, r, o) {
|
|
|
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 Ve(),
|
|
4312
|
+
a.value = !a.value, await Ve(), 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 Ve(),
|
|
4319
|
+
a.value = !0, await Ve(), 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,28 +4369,28 @@ 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 = S(() => n.value ? n.value.split(r.value).map((
|
|
4373
|
-
name:
|
|
4372
|
+
} = e, a = S(() => 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
|
-
return () => w(
|
|
4379
|
+
return () => w(Lt, {
|
|
4380
4380
|
id: `${t.id}-tag-editor`,
|
|
4381
4381
|
class: "form-control",
|
|
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(At, {
|
|
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, _ = S(() => {
|
|
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,17 +4596,17 @@ 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);
|
|
@@ -4616,20 +4616,20 @@ const Fo = /* @__PURE__ */ ne({
|
|
|
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
|
|
@@ -4647,7 +4647,8 @@ ce.registerDesigner = (t, n, e) => {
|
|
|
4647
4647
|
Wt(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 {
|
|
@@ -5003,10 +5011,10 @@ function No(t, n) {
|
|
|
5003
5011
|
function a() {
|
|
5004
5012
|
return !1;
|
|
5005
5013
|
}
|
|
5006
|
-
function
|
|
5014
|
+
function i() {
|
|
5007
5015
|
return !1;
|
|
5008
5016
|
}
|
|
5009
|
-
function
|
|
5017
|
+
function s() {
|
|
5010
5018
|
return !0;
|
|
5011
5019
|
}
|
|
5012
5020
|
function p(u) {
|
|
@@ -5019,8 +5027,8 @@ function No(t, n) {
|
|
|
5019
5027
|
return {
|
|
5020
5028
|
canAccepts: o,
|
|
5021
5029
|
checkCanDeleteComponent: a,
|
|
5022
|
-
checkCanMoveComponent:
|
|
5023
|
-
hideNestedPaddingInDesginerView:
|
|
5030
|
+
checkCanMoveComponent: i,
|
|
5031
|
+
hideNestedPaddingInDesginerView: s,
|
|
5024
5032
|
onAcceptMovedChildElement: p,
|
|
5025
5033
|
resolveComponentContext: c,
|
|
5026
5034
|
triggerBelongedComponentToMoveWhenMoved: e,
|
|
@@ -5028,14 +5036,14 @@ function No(t, n) {
|
|
|
5028
5036
|
getPropsConfig: d
|
|
5029
5037
|
};
|
|
5030
5038
|
}
|
|
5031
|
-
function
|
|
5039
|
+
function Io(t, n) {
|
|
5032
5040
|
const {
|
|
5033
5041
|
canAccepts: e,
|
|
5034
5042
|
checkCanDeleteComponent: r,
|
|
5035
5043
|
checkCanMoveComponent: o,
|
|
5036
5044
|
hideNestedPaddingInDesginerView: a,
|
|
5037
|
-
onAcceptMovedChildElement:
|
|
5038
|
-
resolveComponentContext:
|
|
5045
|
+
onAcceptMovedChildElement: i,
|
|
5046
|
+
resolveComponentContext: s,
|
|
5039
5047
|
triggerBelongedComponentToMoveWhenMoved: p,
|
|
5040
5048
|
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
5041
5049
|
} = No(t), d = t.schema;
|
|
@@ -5047,19 +5055,19 @@ function Lo(t, n) {
|
|
|
5047
5055
|
checkCanDeleteComponent: r,
|
|
5048
5056
|
checkCanMoveComponent: o,
|
|
5049
5057
|
hideNestedPaddingInDesginerView: a,
|
|
5050
|
-
onAcceptMovedChildElement:
|
|
5051
|
-
resolveComponentContext:
|
|
5058
|
+
onAcceptMovedChildElement: i,
|
|
5059
|
+
resolveComponentContext: s,
|
|
5052
5060
|
triggerBelongedComponentToMoveWhenMoved: p,
|
|
5053
5061
|
triggerBelongedComponentToDeleteWhenDeleted: c,
|
|
5054
5062
|
getPropsConfig: u
|
|
5055
5063
|
};
|
|
5056
5064
|
}
|
|
5057
|
-
const
|
|
5065
|
+
const Lo = /* @__PURE__ */ ne({
|
|
5058
5066
|
name: "FTimePickerDesign",
|
|
5059
5067
|
props: Pe,
|
|
5060
5068
|
emits: ["datePicked", "update:modelValue"],
|
|
5061
5069
|
setup(t, n) {
|
|
5062
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = v(t.modelValue), o = v(), a = v(),
|
|
5070
|
+
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 = Io(s, i), c = gt(a, s, p);
|
|
5063
5071
|
de(() => {
|
|
5064
5072
|
a.value.componentInstance = c;
|
|
5065
5073
|
}), n.expose(c.value);
|
|
@@ -5080,17 +5088,17 @@ const Ao = /* @__PURE__ */ ne({
|
|
|
5080
5088
|
}
|
|
5081
5089
|
});
|
|
5082
5090
|
ee.install = (t) => {
|
|
5083
|
-
t.component(ee.name, ee).component(
|
|
5091
|
+
t.component(ee.name, ee).component(Me.name, Me);
|
|
5084
5092
|
};
|
|
5085
5093
|
ee.register = (t, n, e, r) => {
|
|
5086
5094
|
t["time-picker"] = ee, n["time-picker"] = je;
|
|
5087
5095
|
};
|
|
5088
5096
|
ee.registerDesigner = (t, n, e) => {
|
|
5089
|
-
t["time-picker"] =
|
|
5097
|
+
t["time-picker"] = Lo, n["time-picker"] = je;
|
|
5090
5098
|
};
|
|
5091
5099
|
export {
|
|
5092
5100
|
ee as FTimePicker,
|
|
5093
|
-
|
|
5101
|
+
Me as FTimePickerTimeView,
|
|
5094
5102
|
ee as default,
|
|
5095
5103
|
je as propsResolver,
|
|
5096
5104
|
Pe as timePickerProps,
|