@farris/ui-vue 1.3.4 → 1.3.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/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +9 -7
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +746 -730
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +9 -7
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3096 -3069
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +78 -82
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +501 -487
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +487 -472
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +440 -433
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +594 -587
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2766 -2739
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +314 -298
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +862 -843
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1031 -1015
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +776 -770
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +296 -283
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +634 -619
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +383 -376
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +595 -575
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +5492 -5470
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
|
@@ -1,36 +1,50 @@
|
|
|
1
1
|
var kt = Object.defineProperty;
|
|
2
2
|
var Ct = (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) => Ct(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
-
import { ref as x, defineComponent as te, watch as
|
|
5
|
-
import { isPlainObject as
|
|
4
|
+
import { ref as x, defineComponent as te, watch as $, computed as I, onMounted as ce, createVNode as w, createTextVNode as ve, mergeProps as Te, Teleport as Tt, createApp as Pt, onUnmounted as Ot, inject as me, nextTick as Ie, withDirectives as Dt, vShow as Ht, Fragment as Et, resolveComponent as Bt } from "vue";
|
|
5
|
+
import { isPlainObject as Ne, cloneDeep as Pe } from "lodash-es";
|
|
6
6
|
import Ft from "../button-edit/index.esm.js";
|
|
7
7
|
import "bignumber.js";
|
|
8
8
|
import { resolveAppearance as Vt } from "../dynamic-resolver/index.esm.js";
|
|
9
9
|
import St from "../tags/index.esm.js";
|
|
10
10
|
import It from "../popover/index.esm.js";
|
|
11
|
-
import { useDesignerComponent as Nt, DgControl as
|
|
11
|
+
import { useDesignerComponent as Nt, DgControl as Le } from "../designer-canvas/index.esm.js";
|
|
12
12
|
import { withInstall as Lt } from "../common/index.esm.js";
|
|
13
13
|
const je = {}, Re = {};
|
|
14
|
-
function
|
|
15
|
-
const { properties: n, title: e, ignore: r } = t, o = r && Array.isArray(r), a = Object.keys(n).reduce((i, u) => ((!o || !r.find((p) => p === u)) && (i[u] = n[u].type === "object" && n[u].properties ?
|
|
14
|
+
function Oe(t) {
|
|
15
|
+
const { properties: n, title: e, ignore: r } = t, o = r && Array.isArray(r), a = Object.keys(n).reduce((i, u) => ((!o || !r.find((p) => p === u)) && (i[u] = n[u].type === "object" && n[u].properties ? Oe(n[u]) : Pe(n[u].default)), i), {});
|
|
16
16
|
if (e && (!o || !r.find((i) => i === "id"))) {
|
|
17
17
|
const i = e.toLowerCase().replace(/-/g, "_");
|
|
18
18
|
a.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
19
19
|
}
|
|
20
20
|
return a;
|
|
21
21
|
}
|
|
22
|
+
function Wt(t) {
|
|
23
|
+
const { properties: n, title: e, required: r } = t;
|
|
24
|
+
if (r && Array.isArray(r)) {
|
|
25
|
+
const o = r.reduce((a, i) => (a[i] = n[i].type === "object" && n[i].properties ? Oe(n[i]) : Pe(n[i].default), a), {});
|
|
26
|
+
if (e && r.find((a) => a === "id")) {
|
|
27
|
+
const a = e.toLowerCase().replace(/-/g, "_");
|
|
28
|
+
o.id = `${a}_${Math.random().toString().slice(2, 6)}`;
|
|
29
|
+
}
|
|
30
|
+
return o;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
type: e
|
|
34
|
+
};
|
|
35
|
+
}
|
|
22
36
|
function Qe(t, n = {}, e) {
|
|
23
37
|
const r = je[t];
|
|
24
38
|
if (r) {
|
|
25
|
-
let o =
|
|
39
|
+
let o = Wt(r);
|
|
26
40
|
const a = Re[t];
|
|
27
41
|
return o = a ? a({ getSchemaByType: Qe }, o, n, e) : o, o;
|
|
28
42
|
}
|
|
29
43
|
return null;
|
|
30
44
|
}
|
|
31
|
-
function
|
|
32
|
-
const e =
|
|
33
|
-
return Object.keys(e).reduce((r, o) => (r[o] &&
|
|
45
|
+
function qt(t, n) {
|
|
46
|
+
const e = Oe(n);
|
|
47
|
+
return Object.keys(e).reduce((r, o) => (Object.prototype.hasOwnProperty.call(t, o) && (r[o] && Ne(r[o]) && Ne(t[o] || !t[o]) ? Object.assign(r[o], t[o] || {}) : r[o] = t[o]), r), e), e;
|
|
34
48
|
}
|
|
35
49
|
function Yt(t, n) {
|
|
36
50
|
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
@@ -47,11 +61,11 @@ function Yt(t, n) {
|
|
|
47
61
|
return r;
|
|
48
62
|
}, {});
|
|
49
63
|
}
|
|
50
|
-
function
|
|
51
|
-
const r =
|
|
64
|
+
function At(t, n, e = /* @__PURE__ */ new Map()) {
|
|
65
|
+
const r = qt(t, n);
|
|
52
66
|
return Yt(r, e);
|
|
53
67
|
}
|
|
54
|
-
function
|
|
68
|
+
function _t(t = {}) {
|
|
55
69
|
function n(c, d, s, l) {
|
|
56
70
|
if (typeof s == "number")
|
|
57
71
|
return l[c].length === s;
|
|
@@ -145,20 +159,20 @@ const T = {
|
|
|
145
159
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
146
160
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
147
161
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
148
|
-
},
|
|
149
|
-
|
|
162
|
+
}, $t = {}, Gt = {};
|
|
163
|
+
_t();
|
|
150
164
|
function Ue(t, n, e = /* @__PURE__ */ new Map(), r = (i, u, p, c) => u, o = {}, a = (i) => i) {
|
|
151
|
-
return je[n.title] = n, Re[n.title] = r,
|
|
152
|
-
const u =
|
|
165
|
+
return je[n.title] = n, Re[n.title] = r, $t[n.title] = o, Gt[n.title] = a, (i = {}) => {
|
|
166
|
+
const u = At(i, n, e), p = Object.keys(t).reduce((c, d) => (c[d] = t[d].default, c), {});
|
|
153
167
|
return Object.assign(p, u);
|
|
154
168
|
};
|
|
155
169
|
}
|
|
156
|
-
function
|
|
170
|
+
function jt(t, n) {
|
|
157
171
|
return { customClass: n.class, customStyle: n.style };
|
|
158
172
|
}
|
|
159
|
-
const
|
|
160
|
-
["appearance",
|
|
161
|
-
]),
|
|
173
|
+
const Rt = /* @__PURE__ */ new Map([
|
|
174
|
+
["appearance", jt]
|
|
175
|
+
]), Qt = "https://json-schema.org/draft/2020-12/schema", Ut = "https://farris-design.gitee.io/time-picker.schema.json", Xt = "time-picker", zt = "A Farris Input Component", Jt = "object", Zt = {
|
|
162
176
|
id: {
|
|
163
177
|
description: "The unique identifier for a time picker",
|
|
164
178
|
type: "string"
|
|
@@ -235,28 +249,27 @@ const jt = /* @__PURE__ */ new Map([
|
|
|
235
249
|
type: "boolean",
|
|
236
250
|
default: !1
|
|
237
251
|
}
|
|
238
|
-
},
|
|
239
|
-
"id",
|
|
252
|
+
}, Kt = [
|
|
240
253
|
"type"
|
|
241
|
-
],
|
|
254
|
+
], en = [
|
|
242
255
|
"id",
|
|
243
256
|
"appearance",
|
|
244
257
|
"binding",
|
|
245
258
|
"visible"
|
|
246
|
-
],
|
|
247
|
-
$schema:
|
|
248
|
-
$id:
|
|
249
|
-
title:
|
|
250
|
-
description:
|
|
251
|
-
type:
|
|
252
|
-
properties:
|
|
253
|
-
required:
|
|
254
|
-
ignore:
|
|
259
|
+
], tn = {
|
|
260
|
+
$schema: Qt,
|
|
261
|
+
$id: Ut,
|
|
262
|
+
title: Xt,
|
|
263
|
+
description: zt,
|
|
264
|
+
type: Jt,
|
|
265
|
+
properties: Zt,
|
|
266
|
+
required: Kt,
|
|
267
|
+
ignore: en
|
|
255
268
|
};
|
|
256
|
-
function
|
|
269
|
+
function nn(t, n, e) {
|
|
257
270
|
return n;
|
|
258
271
|
}
|
|
259
|
-
const
|
|
272
|
+
const De = {
|
|
260
273
|
/**
|
|
261
274
|
* 组件值,这个是与指定的format格式相对应的值
|
|
262
275
|
*/
|
|
@@ -284,7 +297,7 @@ const Oe = {
|
|
|
284
297
|
disabled: { type: Boolean, default: !1 },
|
|
285
298
|
readonly: { type: Boolean, default: !1 },
|
|
286
299
|
editable: { type: Boolean, default: !0 }
|
|
287
|
-
}, Xe = Ue(
|
|
300
|
+
}, Xe = Ue(De, tn, Rt, nn), rn = {
|
|
288
301
|
modelValue: {
|
|
289
302
|
type: String,
|
|
290
303
|
default: ""
|
|
@@ -349,10 +362,10 @@ function ze(t, n) {
|
|
|
349
362
|
const e = _(t);
|
|
350
363
|
return isNaN(n) ? W(t, NaN) : (n && e.setDate(e.getDate() + n), e);
|
|
351
364
|
}
|
|
352
|
-
const Je = 6048e5,
|
|
353
|
-
let
|
|
365
|
+
const Je = 6048e5, on = 864e5, an = 6e4, sn = 36e5, un = 1e3;
|
|
366
|
+
let ln = {};
|
|
354
367
|
function ne() {
|
|
355
|
-
return
|
|
368
|
+
return ln;
|
|
356
369
|
}
|
|
357
370
|
function X(t, n) {
|
|
358
371
|
var u, p, c, d;
|
|
@@ -370,7 +383,7 @@ function Ze(t) {
|
|
|
370
383
|
const i = ee(a);
|
|
371
384
|
return n.getTime() >= o.getTime() ? e + 1 : n.getTime() >= i.getTime() ? e : e - 1;
|
|
372
385
|
}
|
|
373
|
-
function
|
|
386
|
+
function We(t) {
|
|
374
387
|
const n = _(t);
|
|
375
388
|
return n.setHours(0, 0, 0, 0), n;
|
|
376
389
|
}
|
|
@@ -388,28 +401,28 @@ function he(t) {
|
|
|
388
401
|
);
|
|
389
402
|
return e.setUTCFullYear(n.getFullYear()), +t - +e;
|
|
390
403
|
}
|
|
391
|
-
function
|
|
392
|
-
const e =
|
|
393
|
-
return Math.round((o - a) /
|
|
404
|
+
function cn(t, n) {
|
|
405
|
+
const e = We(t), r = We(n), o = +e - he(e), a = +r - he(r);
|
|
406
|
+
return Math.round((o - a) / on);
|
|
394
407
|
}
|
|
395
|
-
function
|
|
408
|
+
function dn(t) {
|
|
396
409
|
const n = Ze(t), e = W(t, 0);
|
|
397
410
|
return e.setFullYear(n, 0, 4), e.setHours(0, 0, 0, 0), ee(e);
|
|
398
411
|
}
|
|
399
|
-
function
|
|
412
|
+
function fn(t) {
|
|
400
413
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
401
414
|
}
|
|
402
415
|
function Ke(t) {
|
|
403
|
-
if (!
|
|
416
|
+
if (!fn(t) && typeof t != "number")
|
|
404
417
|
return !1;
|
|
405
418
|
const n = _(t);
|
|
406
419
|
return !isNaN(Number(n));
|
|
407
420
|
}
|
|
408
|
-
function
|
|
421
|
+
function pn(t) {
|
|
409
422
|
const n = _(t), e = W(t, 0);
|
|
410
423
|
return e.setFullYear(n.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
411
424
|
}
|
|
412
|
-
const
|
|
425
|
+
const mn = {
|
|
413
426
|
lessThanXSeconds: {
|
|
414
427
|
one: "less than a second",
|
|
415
428
|
other: "less than {{count}} seconds"
|
|
@@ -471,9 +484,9 @@ const pn = {
|
|
|
471
484
|
one: "almost 1 year",
|
|
472
485
|
other: "almost {{count}} years"
|
|
473
486
|
}
|
|
474
|
-
},
|
|
487
|
+
}, hn = (t, n, e) => {
|
|
475
488
|
let r;
|
|
476
|
-
const o =
|
|
489
|
+
const o = mn[t];
|
|
477
490
|
return typeof o == "string" ? r = o : n === 1 ? r = o.one : r = o.other.replace("{{count}}", n.toString()), e != null && e.addSuffix ? e.comparison && e.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
478
491
|
};
|
|
479
492
|
function xe(t) {
|
|
@@ -482,42 +495,42 @@ function xe(t) {
|
|
|
482
495
|
return t.formats[e] || t.formats[t.defaultWidth];
|
|
483
496
|
};
|
|
484
497
|
}
|
|
485
|
-
const
|
|
498
|
+
const yn = {
|
|
486
499
|
full: "EEEE, MMMM do, y",
|
|
487
500
|
long: "MMMM do, y",
|
|
488
501
|
medium: "MMM d, y",
|
|
489
502
|
short: "MM/dd/yyyy"
|
|
490
|
-
},
|
|
503
|
+
}, gn = {
|
|
491
504
|
full: "h:mm:ss a zzzz",
|
|
492
505
|
long: "h:mm:ss a z",
|
|
493
506
|
medium: "h:mm:ss a",
|
|
494
507
|
short: "h:mm a"
|
|
495
|
-
},
|
|
508
|
+
}, bn = {
|
|
496
509
|
full: "{{date}} 'at' {{time}}",
|
|
497
510
|
long: "{{date}} 'at' {{time}}",
|
|
498
511
|
medium: "{{date}}, {{time}}",
|
|
499
512
|
short: "{{date}}, {{time}}"
|
|
500
|
-
},
|
|
513
|
+
}, wn = {
|
|
501
514
|
date: xe({
|
|
502
|
-
formats:
|
|
515
|
+
formats: yn,
|
|
503
516
|
defaultWidth: "full"
|
|
504
517
|
}),
|
|
505
518
|
time: xe({
|
|
506
|
-
formats:
|
|
519
|
+
formats: gn,
|
|
507
520
|
defaultWidth: "full"
|
|
508
521
|
}),
|
|
509
522
|
dateTime: xe({
|
|
510
|
-
formats:
|
|
523
|
+
formats: bn,
|
|
511
524
|
defaultWidth: "full"
|
|
512
525
|
})
|
|
513
|
-
},
|
|
526
|
+
}, vn = {
|
|
514
527
|
lastWeek: "'last' eeee 'at' p",
|
|
515
528
|
yesterday: "'yesterday at' p",
|
|
516
529
|
today: "'today at' p",
|
|
517
530
|
tomorrow: "'tomorrow at' p",
|
|
518
531
|
nextWeek: "eeee 'at' p",
|
|
519
532
|
other: "P"
|
|
520
|
-
},
|
|
533
|
+
}, xn = (t, n, e, r) => vn[t];
|
|
521
534
|
function ie(t) {
|
|
522
535
|
return (n, e) => {
|
|
523
536
|
const r = e != null && e.context ? String(e.context) : "standalone";
|
|
@@ -533,15 +546,15 @@ function ie(t) {
|
|
|
533
546
|
return o[a];
|
|
534
547
|
};
|
|
535
548
|
}
|
|
536
|
-
const
|
|
549
|
+
const Mn = {
|
|
537
550
|
narrow: ["B", "A"],
|
|
538
551
|
abbreviated: ["BC", "AD"],
|
|
539
552
|
wide: ["Before Christ", "Anno Domini"]
|
|
540
|
-
},
|
|
553
|
+
}, kn = {
|
|
541
554
|
narrow: ["1", "2", "3", "4"],
|
|
542
555
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
543
556
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
544
|
-
},
|
|
557
|
+
}, Cn = {
|
|
545
558
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
546
559
|
abbreviated: [
|
|
547
560
|
"Jan",
|
|
@@ -571,7 +584,7 @@ const xn = {
|
|
|
571
584
|
"November",
|
|
572
585
|
"December"
|
|
573
586
|
]
|
|
574
|
-
},
|
|
587
|
+
}, Tn = {
|
|
575
588
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
576
589
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
577
590
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -584,7 +597,7 @@ const xn = {
|
|
|
584
597
|
"Friday",
|
|
585
598
|
"Saturday"
|
|
586
599
|
]
|
|
587
|
-
},
|
|
600
|
+
}, Pn = {
|
|
588
601
|
narrow: {
|
|
589
602
|
am: "a",
|
|
590
603
|
pm: "p",
|
|
@@ -615,7 +628,7 @@ const xn = {
|
|
|
615
628
|
evening: "evening",
|
|
616
629
|
night: "night"
|
|
617
630
|
}
|
|
618
|
-
},
|
|
631
|
+
}, On = {
|
|
619
632
|
narrow: {
|
|
620
633
|
am: "a",
|
|
621
634
|
pm: "p",
|
|
@@ -646,7 +659,7 @@ const xn = {
|
|
|
646
659
|
evening: "in the evening",
|
|
647
660
|
night: "at night"
|
|
648
661
|
}
|
|
649
|
-
},
|
|
662
|
+
}, Dn = (t, n) => {
|
|
650
663
|
const e = Number(t), r = e % 100;
|
|
651
664
|
if (r > 20 || r < 10)
|
|
652
665
|
switch (r % 10) {
|
|
@@ -658,29 +671,29 @@ const xn = {
|
|
|
658
671
|
return e + "rd";
|
|
659
672
|
}
|
|
660
673
|
return e + "th";
|
|
661
|
-
},
|
|
662
|
-
ordinalNumber:
|
|
674
|
+
}, Hn = {
|
|
675
|
+
ordinalNumber: Dn,
|
|
663
676
|
era: ie({
|
|
664
|
-
values:
|
|
677
|
+
values: Mn,
|
|
665
678
|
defaultWidth: "wide"
|
|
666
679
|
}),
|
|
667
680
|
quarter: ie({
|
|
668
|
-
values:
|
|
681
|
+
values: kn,
|
|
669
682
|
defaultWidth: "wide",
|
|
670
683
|
argumentCallback: (t) => t - 1
|
|
671
684
|
}),
|
|
672
685
|
month: ie({
|
|
673
|
-
values:
|
|
686
|
+
values: Cn,
|
|
674
687
|
defaultWidth: "wide"
|
|
675
688
|
}),
|
|
676
689
|
day: ie({
|
|
677
|
-
values:
|
|
690
|
+
values: Tn,
|
|
678
691
|
defaultWidth: "wide"
|
|
679
692
|
}),
|
|
680
693
|
dayPeriod: ie({
|
|
681
|
-
values:
|
|
694
|
+
values: Pn,
|
|
682
695
|
defaultWidth: "wide",
|
|
683
|
-
formattingValues:
|
|
696
|
+
formattingValues: On,
|
|
684
697
|
defaultFormattingWidth: "wide"
|
|
685
698
|
})
|
|
686
699
|
};
|
|
@@ -689,9 +702,9 @@ function ue(t) {
|
|
|
689
702
|
const r = e.width, o = r && t.matchPatterns[r] || t.matchPatterns[t.defaultMatchWidth], a = n.match(o);
|
|
690
703
|
if (!a)
|
|
691
704
|
return null;
|
|
692
|
-
const i = a[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], p = Array.isArray(u) ?
|
|
705
|
+
const i = a[0], u = r && t.parsePatterns[r] || t.parsePatterns[t.defaultParseWidth], p = Array.isArray(u) ? Bn(u, (s) => s.test(i)) : (
|
|
693
706
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
694
|
-
|
|
707
|
+
En(u, (s) => s.test(i))
|
|
695
708
|
);
|
|
696
709
|
let c;
|
|
697
710
|
c = t.valueCallback ? t.valueCallback(p) : p, c = e.valueCallback ? (
|
|
@@ -702,17 +715,17 @@ function ue(t) {
|
|
|
702
715
|
return { value: c, rest: d };
|
|
703
716
|
};
|
|
704
717
|
}
|
|
705
|
-
function
|
|
718
|
+
function En(t, n) {
|
|
706
719
|
for (const e in t)
|
|
707
720
|
if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
|
|
708
721
|
return e;
|
|
709
722
|
}
|
|
710
|
-
function
|
|
723
|
+
function Bn(t, n) {
|
|
711
724
|
for (let e = 0; e < t.length; e++)
|
|
712
725
|
if (n(t[e]))
|
|
713
726
|
return e;
|
|
714
727
|
}
|
|
715
|
-
function
|
|
728
|
+
function Fn(t) {
|
|
716
729
|
return (n, e = {}) => {
|
|
717
730
|
const r = n.match(t.matchPattern);
|
|
718
731
|
if (!r) return null;
|
|
@@ -724,19 +737,19 @@ function Bn(t) {
|
|
|
724
737
|
return { value: i, rest: u };
|
|
725
738
|
};
|
|
726
739
|
}
|
|
727
|
-
const
|
|
740
|
+
const Vn = /^(\d+)(th|st|nd|rd)?/i, Sn = /\d+/i, In = {
|
|
728
741
|
narrow: /^(b|a)/i,
|
|
729
742
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
730
743
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
731
|
-
}, In = {
|
|
732
|
-
any: [/^b/i, /^(a|c)/i]
|
|
733
744
|
}, Nn = {
|
|
745
|
+
any: [/^b/i, /^(a|c)/i]
|
|
746
|
+
}, Ln = {
|
|
734
747
|
narrow: /^[1234]/i,
|
|
735
748
|
abbreviated: /^q[1234]/i,
|
|
736
749
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
737
|
-
}, Ln = {
|
|
738
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
739
750
|
}, Wn = {
|
|
751
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
752
|
+
}, qn = {
|
|
740
753
|
narrow: /^[jfmasond]/i,
|
|
741
754
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
742
755
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
@@ -769,15 +782,15 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Sn = {
|
|
|
769
782
|
/^n/i,
|
|
770
783
|
/^d/i
|
|
771
784
|
]
|
|
772
|
-
},
|
|
785
|
+
}, An = {
|
|
773
786
|
narrow: /^[smtwf]/i,
|
|
774
787
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
775
788
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
776
789
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
777
|
-
},
|
|
790
|
+
}, _n = {
|
|
778
791
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
779
792
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
780
|
-
},
|
|
793
|
+
}, $n = {
|
|
781
794
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
782
795
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
783
796
|
}, Gn = {
|
|
@@ -791,64 +804,64 @@ const Fn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Sn = {
|
|
|
791
804
|
evening: /evening/i,
|
|
792
805
|
night: /night/i
|
|
793
806
|
}
|
|
794
|
-
},
|
|
795
|
-
ordinalNumber:
|
|
796
|
-
matchPattern:
|
|
797
|
-
parsePattern:
|
|
807
|
+
}, jn = {
|
|
808
|
+
ordinalNumber: Fn({
|
|
809
|
+
matchPattern: Vn,
|
|
810
|
+
parsePattern: Sn,
|
|
798
811
|
valueCallback: (t) => parseInt(t, 10)
|
|
799
812
|
}),
|
|
800
813
|
era: ue({
|
|
801
|
-
matchPatterns:
|
|
814
|
+
matchPatterns: In,
|
|
802
815
|
defaultMatchWidth: "wide",
|
|
803
|
-
parsePatterns:
|
|
816
|
+
parsePatterns: Nn,
|
|
804
817
|
defaultParseWidth: "any"
|
|
805
818
|
}),
|
|
806
819
|
quarter: ue({
|
|
807
|
-
matchPatterns:
|
|
820
|
+
matchPatterns: Ln,
|
|
808
821
|
defaultMatchWidth: "wide",
|
|
809
|
-
parsePatterns:
|
|
822
|
+
parsePatterns: Wn,
|
|
810
823
|
defaultParseWidth: "any",
|
|
811
824
|
valueCallback: (t) => t + 1
|
|
812
825
|
}),
|
|
813
826
|
month: ue({
|
|
814
|
-
matchPatterns:
|
|
827
|
+
matchPatterns: qn,
|
|
815
828
|
defaultMatchWidth: "wide",
|
|
816
829
|
parsePatterns: Yn,
|
|
817
830
|
defaultParseWidth: "any"
|
|
818
831
|
}),
|
|
819
832
|
day: ue({
|
|
820
|
-
matchPatterns:
|
|
833
|
+
matchPatterns: An,
|
|
821
834
|
defaultMatchWidth: "wide",
|
|
822
|
-
parsePatterns:
|
|
835
|
+
parsePatterns: _n,
|
|
823
836
|
defaultParseWidth: "any"
|
|
824
837
|
}),
|
|
825
838
|
dayPeriod: ue({
|
|
826
|
-
matchPatterns:
|
|
839
|
+
matchPatterns: $n,
|
|
827
840
|
defaultMatchWidth: "any",
|
|
828
841
|
parsePatterns: Gn,
|
|
829
842
|
defaultParseWidth: "any"
|
|
830
843
|
})
|
|
831
844
|
}, et = {
|
|
832
845
|
code: "en-US",
|
|
833
|
-
formatDistance:
|
|
834
|
-
formatLong:
|
|
835
|
-
formatRelative:
|
|
836
|
-
localize:
|
|
837
|
-
match:
|
|
846
|
+
formatDistance: hn,
|
|
847
|
+
formatLong: wn,
|
|
848
|
+
formatRelative: xn,
|
|
849
|
+
localize: Hn,
|
|
850
|
+
match: jn,
|
|
838
851
|
options: {
|
|
839
852
|
weekStartsOn: 0,
|
|
840
853
|
firstWeekContainsDate: 1
|
|
841
854
|
}
|
|
842
855
|
};
|
|
843
|
-
function
|
|
856
|
+
function Rn(t) {
|
|
844
857
|
const n = _(t);
|
|
845
|
-
return
|
|
858
|
+
return cn(n, pn(n)) + 1;
|
|
846
859
|
}
|
|
847
860
|
function tt(t) {
|
|
848
|
-
const n = _(t), e = +ee(n) - +
|
|
861
|
+
const n = _(t), e = +ee(n) - +dn(n);
|
|
849
862
|
return Math.round(e / Je) + 1;
|
|
850
863
|
}
|
|
851
|
-
function
|
|
864
|
+
function He(t, n) {
|
|
852
865
|
var d, s, l, m;
|
|
853
866
|
const e = _(t), r = e.getFullYear(), o = ne(), a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((s = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : s.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((m = (l = o.locale) == null ? void 0 : l.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, i = W(t, 0);
|
|
854
867
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
@@ -857,13 +870,13 @@ function De(t, n) {
|
|
|
857
870
|
const c = X(p, n);
|
|
858
871
|
return e.getTime() >= u.getTime() ? r + 1 : e.getTime() >= c.getTime() ? r : r - 1;
|
|
859
872
|
}
|
|
860
|
-
function
|
|
873
|
+
function Qn(t, n) {
|
|
861
874
|
var u, p, c, d;
|
|
862
|
-
const e = ne(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((p = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : p.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o =
|
|
875
|
+
const e = ne(), r = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((p = (u = n == null ? void 0 : n.locale) == null ? void 0 : u.options) == null ? void 0 : p.firstWeekContainsDate) ?? e.firstWeekContainsDate ?? ((d = (c = e.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = He(t, n), a = W(t, 0);
|
|
863
876
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), X(a, n);
|
|
864
877
|
}
|
|
865
878
|
function nt(t, n) {
|
|
866
|
-
const e = _(t), r = +X(e, n) - +
|
|
879
|
+
const e = _(t), r = +X(e, n) - +Qn(e, n);
|
|
867
880
|
return Math.round(r / Je) + 1;
|
|
868
881
|
}
|
|
869
882
|
function B(t, n) {
|
|
@@ -933,7 +946,7 @@ const U = {
|
|
|
933
946
|
afternoon: "afternoon",
|
|
934
947
|
evening: "evening",
|
|
935
948
|
night: "night"
|
|
936
|
-
},
|
|
949
|
+
}, qe = {
|
|
937
950
|
// Era
|
|
938
951
|
G: function(t, n, e) {
|
|
939
952
|
const r = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -959,7 +972,7 @@ const U = {
|
|
|
959
972
|
},
|
|
960
973
|
// Local week-numbering year
|
|
961
974
|
Y: function(t, n, e, r) {
|
|
962
|
-
const o =
|
|
975
|
+
const o = He(t, r), a = o > 0 ? o : 1 - o;
|
|
963
976
|
if (n === "YY") {
|
|
964
977
|
const i = a % 100;
|
|
965
978
|
return B(i, 2);
|
|
@@ -1105,7 +1118,7 @@ const U = {
|
|
|
1105
1118
|
},
|
|
1106
1119
|
// Day of year
|
|
1107
1120
|
D: function(t, n, e) {
|
|
1108
|
-
const r =
|
|
1121
|
+
const r = Rn(t);
|
|
1109
1122
|
return n === "Do" ? e.ordinalNumber(r, { unit: "dayOfYear" }) : B(r, n.length);
|
|
1110
1123
|
},
|
|
1111
1124
|
// Day of week
|
|
@@ -1359,7 +1372,7 @@ const U = {
|
|
|
1359
1372
|
return "Z";
|
|
1360
1373
|
switch (n) {
|
|
1361
1374
|
case "X":
|
|
1362
|
-
return
|
|
1375
|
+
return Ae(r);
|
|
1363
1376
|
case "XXXX":
|
|
1364
1377
|
case "XX":
|
|
1365
1378
|
return z(r);
|
|
@@ -1374,7 +1387,7 @@ const U = {
|
|
|
1374
1387
|
const r = t.getTimezoneOffset();
|
|
1375
1388
|
switch (n) {
|
|
1376
1389
|
case "x":
|
|
1377
|
-
return
|
|
1390
|
+
return Ae(r);
|
|
1378
1391
|
case "xxxx":
|
|
1379
1392
|
case "xx":
|
|
1380
1393
|
return z(r);
|
|
@@ -1425,14 +1438,14 @@ function Ye(t, n = "") {
|
|
|
1425
1438
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = Math.trunc(r / 60), a = r % 60;
|
|
1426
1439
|
return a === 0 ? e + String(o) : e + String(o) + n + B(a, 2);
|
|
1427
1440
|
}
|
|
1428
|
-
function
|
|
1441
|
+
function Ae(t, n) {
|
|
1429
1442
|
return t % 60 === 0 ? (t > 0 ? "-" : "+") + B(Math.abs(t) / 60, 2) : z(t, n);
|
|
1430
1443
|
}
|
|
1431
1444
|
function z(t, n = "") {
|
|
1432
1445
|
const e = t > 0 ? "-" : "+", r = Math.abs(t), o = B(Math.trunc(r / 60), 2), a = B(r % 60, 2);
|
|
1433
1446
|
return e + o + n + a;
|
|
1434
1447
|
}
|
|
1435
|
-
const
|
|
1448
|
+
const _e = (t, n) => {
|
|
1436
1449
|
switch (t) {
|
|
1437
1450
|
case "P":
|
|
1438
1451
|
return n.date({ width: "short" });
|
|
@@ -1456,10 +1469,10 @@ const Ae = (t, n) => {
|
|
|
1456
1469
|
default:
|
|
1457
1470
|
return n.time({ width: "full" });
|
|
1458
1471
|
}
|
|
1459
|
-
},
|
|
1472
|
+
}, Un = (t, n) => {
|
|
1460
1473
|
const e = t.match(/(P+)(p+)?/) || [], r = e[1], o = e[2];
|
|
1461
1474
|
if (!o)
|
|
1462
|
-
return
|
|
1475
|
+
return _e(t, n);
|
|
1463
1476
|
let a;
|
|
1464
1477
|
switch (r) {
|
|
1465
1478
|
case "P":
|
|
@@ -1476,47 +1489,47 @@ const Ae = (t, n) => {
|
|
|
1476
1489
|
a = n.dateTime({ width: "full" });
|
|
1477
1490
|
break;
|
|
1478
1491
|
}
|
|
1479
|
-
return a.replace("{{date}}",
|
|
1492
|
+
return a.replace("{{date}}", _e(r, n)).replace("{{time}}", rt(o, n));
|
|
1480
1493
|
}, Me = {
|
|
1481
1494
|
p: rt,
|
|
1482
|
-
P:
|
|
1483
|
-
},
|
|
1495
|
+
P: Un
|
|
1496
|
+
}, Xn = /^D+$/, zn = /^Y+$/, Jn = ["D", "DD", "YY", "YYYY"];
|
|
1484
1497
|
function ot(t) {
|
|
1485
|
-
return
|
|
1498
|
+
return Xn.test(t);
|
|
1486
1499
|
}
|
|
1487
1500
|
function at(t) {
|
|
1488
|
-
return
|
|
1501
|
+
return zn.test(t);
|
|
1489
1502
|
}
|
|
1490
1503
|
function ke(t, n, e) {
|
|
1491
|
-
const r =
|
|
1492
|
-
if (console.warn(r),
|
|
1504
|
+
const r = Zn(t, n, e);
|
|
1505
|
+
if (console.warn(r), Jn.includes(t)) throw new RangeError(r);
|
|
1493
1506
|
}
|
|
1494
|
-
function
|
|
1507
|
+
function Zn(t, n, e) {
|
|
1495
1508
|
const r = t[0] === "Y" ? "years" : "days of the month";
|
|
1496
1509
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1497
1510
|
}
|
|
1498
|
-
const
|
|
1499
|
-
function
|
|
1511
|
+
const Kn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, er = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, tr = /^'([^]*?)'?$/, nr = /''/g, rr = /[a-zA-Z]/;
|
|
1512
|
+
function $e(t, n, e) {
|
|
1500
1513
|
var d, s, l, m;
|
|
1501
1514
|
const r = ne(), o = r.locale ?? et, a = r.firstWeekContainsDate ?? ((s = (d = r.locale) == null ? void 0 : d.options) == null ? void 0 : s.firstWeekContainsDate) ?? 1, i = r.weekStartsOn ?? ((m = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : m.weekStartsOn) ?? 0, u = _(t);
|
|
1502
1515
|
if (!Ke(u))
|
|
1503
1516
|
throw new RangeError("Invalid time value");
|
|
1504
|
-
let p = n.match(
|
|
1517
|
+
let p = n.match(er).map((h) => {
|
|
1505
1518
|
const g = h[0];
|
|
1506
1519
|
if (g === "p" || g === "P") {
|
|
1507
1520
|
const P = Me[g];
|
|
1508
1521
|
return P(h, o.formatLong);
|
|
1509
1522
|
}
|
|
1510
1523
|
return h;
|
|
1511
|
-
}).join("").match(
|
|
1524
|
+
}).join("").match(Kn).map((h) => {
|
|
1512
1525
|
if (h === "''")
|
|
1513
1526
|
return { isToken: !1, value: "'" };
|
|
1514
1527
|
const g = h[0];
|
|
1515
1528
|
if (g === "'")
|
|
1516
|
-
return { isToken: !1, value:
|
|
1517
|
-
if (
|
|
1529
|
+
return { isToken: !1, value: or(h) };
|
|
1530
|
+
if (qe[g])
|
|
1518
1531
|
return { isToken: !0, value: h };
|
|
1519
|
-
if (g.match(
|
|
1532
|
+
if (g.match(rr))
|
|
1520
1533
|
throw new RangeError(
|
|
1521
1534
|
"Format string contains an unescaped latin alphabet character `" + g + "`"
|
|
1522
1535
|
);
|
|
@@ -1532,22 +1545,22 @@ function _e(t, n, e) {
|
|
|
1532
1545
|
if (!h.isToken) return h.value;
|
|
1533
1546
|
const g = h.value;
|
|
1534
1547
|
(at(g) || ot(g)) && ke(g, n, String(t));
|
|
1535
|
-
const P =
|
|
1548
|
+
const P = qe[g[0]];
|
|
1536
1549
|
return P(u, g, o.localize, c);
|
|
1537
1550
|
}).join("");
|
|
1538
1551
|
}
|
|
1539
|
-
function
|
|
1540
|
-
const n = t.match(
|
|
1541
|
-
return n ? n[1].replace(
|
|
1552
|
+
function or(t) {
|
|
1553
|
+
const n = t.match(tr);
|
|
1554
|
+
return n ? n[1].replace(nr, "'") : t;
|
|
1542
1555
|
}
|
|
1543
|
-
function
|
|
1556
|
+
function ar() {
|
|
1544
1557
|
return Object.assign({}, ne());
|
|
1545
1558
|
}
|
|
1546
|
-
function
|
|
1559
|
+
function sr(t) {
|
|
1547
1560
|
let e = _(t).getDay();
|
|
1548
1561
|
return e === 0 && (e = 7), e;
|
|
1549
1562
|
}
|
|
1550
|
-
function
|
|
1563
|
+
function ir(t, n) {
|
|
1551
1564
|
const e = n instanceof Date ? W(n, 0) : new n(0);
|
|
1552
1565
|
return e.setFullYear(
|
|
1553
1566
|
t.getFullYear(),
|
|
@@ -1560,7 +1573,7 @@ function sr(t, n) {
|
|
|
1560
1573
|
t.getMilliseconds()
|
|
1561
1574
|
), e;
|
|
1562
1575
|
}
|
|
1563
|
-
const
|
|
1576
|
+
const ur = 10;
|
|
1564
1577
|
class st {
|
|
1565
1578
|
constructor() {
|
|
1566
1579
|
f(this, "subPriority", 0);
|
|
@@ -1569,7 +1582,7 @@ class st {
|
|
|
1569
1582
|
return !0;
|
|
1570
1583
|
}
|
|
1571
1584
|
}
|
|
1572
|
-
class
|
|
1585
|
+
class lr extends st {
|
|
1573
1586
|
constructor(n, e, r, o, a) {
|
|
1574
1587
|
super(), this.value = n, this.validateValue = e, this.setValue = r, this.priority = o, a && (this.subPriority = a);
|
|
1575
1588
|
}
|
|
@@ -1580,21 +1593,21 @@ class ur extends st {
|
|
|
1580
1593
|
return this.setValue(n, e, this.value, r);
|
|
1581
1594
|
}
|
|
1582
1595
|
}
|
|
1583
|
-
class
|
|
1596
|
+
class cr extends st {
|
|
1584
1597
|
constructor() {
|
|
1585
1598
|
super(...arguments);
|
|
1586
|
-
f(this, "priority",
|
|
1599
|
+
f(this, "priority", ur);
|
|
1587
1600
|
f(this, "subPriority", -1);
|
|
1588
1601
|
}
|
|
1589
1602
|
set(e, r) {
|
|
1590
|
-
return r.timestampIsSet ? e : W(e,
|
|
1603
|
+
return r.timestampIsSet ? e : W(e, ir(e, Date));
|
|
1591
1604
|
}
|
|
1592
1605
|
}
|
|
1593
1606
|
class H {
|
|
1594
1607
|
run(n, e, r, o) {
|
|
1595
1608
|
const a = this.parse(n, e, r, o);
|
|
1596
1609
|
return a ? {
|
|
1597
|
-
setter: new
|
|
1610
|
+
setter: new lr(
|
|
1598
1611
|
a.value,
|
|
1599
1612
|
this.validate,
|
|
1600
1613
|
this.set,
|
|
@@ -1608,7 +1621,7 @@ class H {
|
|
|
1608
1621
|
return !0;
|
|
1609
1622
|
}
|
|
1610
1623
|
}
|
|
1611
|
-
class
|
|
1624
|
+
class dr extends H {
|
|
1612
1625
|
constructor() {
|
|
1613
1626
|
super(...arguments);
|
|
1614
1627
|
f(this, "priority", 140);
|
|
@@ -1631,7 +1644,7 @@ class cr extends H {
|
|
|
1631
1644
|
return r.era = o, e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1632
1645
|
}
|
|
1633
1646
|
}
|
|
1634
|
-
const
|
|
1647
|
+
const Y = {
|
|
1635
1648
|
month: /^(1[0-2]|0?\d)/,
|
|
1636
1649
|
// 0 to 12
|
|
1637
1650
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -1700,23 +1713,23 @@ function Q(t, n) {
|
|
|
1700
1713
|
};
|
|
1701
1714
|
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;
|
|
1702
1715
|
return {
|
|
1703
|
-
value: r * (o *
|
|
1716
|
+
value: r * (o * sn + a * an + i * un),
|
|
1704
1717
|
rest: n.slice(e[0].length)
|
|
1705
1718
|
};
|
|
1706
1719
|
}
|
|
1707
1720
|
function it(t) {
|
|
1708
|
-
return N(
|
|
1721
|
+
return N(Y.anyDigitsSigned, t);
|
|
1709
1722
|
}
|
|
1710
|
-
function
|
|
1723
|
+
function q(t, n) {
|
|
1711
1724
|
switch (t) {
|
|
1712
1725
|
case 1:
|
|
1713
|
-
return N(
|
|
1726
|
+
return N(Y.singleDigit, n);
|
|
1714
1727
|
case 2:
|
|
1715
|
-
return N(
|
|
1728
|
+
return N(Y.twoDigits, n);
|
|
1716
1729
|
case 3:
|
|
1717
|
-
return N(
|
|
1730
|
+
return N(Y.threeDigits, n);
|
|
1718
1731
|
case 4:
|
|
1719
|
-
return N(
|
|
1732
|
+
return N(Y.fourDigits, n);
|
|
1720
1733
|
default:
|
|
1721
1734
|
return N(new RegExp("^\\d{1," + t + "}"), n);
|
|
1722
1735
|
}
|
|
@@ -1724,18 +1737,18 @@ function Y(t, n) {
|
|
|
1724
1737
|
function ye(t, n) {
|
|
1725
1738
|
switch (t) {
|
|
1726
1739
|
case 1:
|
|
1727
|
-
return N(
|
|
1740
|
+
return N(Y.singleDigitSigned, n);
|
|
1728
1741
|
case 2:
|
|
1729
|
-
return N(
|
|
1742
|
+
return N(Y.twoDigitsSigned, n);
|
|
1730
1743
|
case 3:
|
|
1731
|
-
return N(
|
|
1744
|
+
return N(Y.threeDigitsSigned, n);
|
|
1732
1745
|
case 4:
|
|
1733
|
-
return N(
|
|
1746
|
+
return N(Y.fourDigitsSigned, n);
|
|
1734
1747
|
default:
|
|
1735
1748
|
return N(new RegExp("^-?\\d{1," + t + "}"), n);
|
|
1736
1749
|
}
|
|
1737
1750
|
}
|
|
1738
|
-
function
|
|
1751
|
+
function Ee(t) {
|
|
1739
1752
|
switch (t) {
|
|
1740
1753
|
case "morning":
|
|
1741
1754
|
return 4;
|
|
@@ -1766,7 +1779,7 @@ function ut(t, n) {
|
|
|
1766
1779
|
function lt(t) {
|
|
1767
1780
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
1768
1781
|
}
|
|
1769
|
-
class
|
|
1782
|
+
class fr extends H {
|
|
1770
1783
|
constructor() {
|
|
1771
1784
|
super(...arguments);
|
|
1772
1785
|
f(this, "priority", 130);
|
|
@@ -1779,7 +1792,7 @@ class dr extends H {
|
|
|
1779
1792
|
});
|
|
1780
1793
|
switch (r) {
|
|
1781
1794
|
case "y":
|
|
1782
|
-
return A(
|
|
1795
|
+
return A(q(4, e), a);
|
|
1783
1796
|
case "yo":
|
|
1784
1797
|
return A(
|
|
1785
1798
|
o.ordinalNumber(e, {
|
|
@@ -1788,7 +1801,7 @@ class dr extends H {
|
|
|
1788
1801
|
a
|
|
1789
1802
|
);
|
|
1790
1803
|
default:
|
|
1791
|
-
return A(
|
|
1804
|
+
return A(q(r.length, e), a);
|
|
1792
1805
|
}
|
|
1793
1806
|
}
|
|
1794
1807
|
validate(e, r) {
|
|
@@ -1807,7 +1820,7 @@ class dr extends H {
|
|
|
1807
1820
|
return e.setFullYear(i, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1808
1821
|
}
|
|
1809
1822
|
}
|
|
1810
|
-
class
|
|
1823
|
+
class pr extends H {
|
|
1811
1824
|
constructor() {
|
|
1812
1825
|
super(...arguments);
|
|
1813
1826
|
f(this, "priority", 130);
|
|
@@ -1834,7 +1847,7 @@ class fr extends H {
|
|
|
1834
1847
|
});
|
|
1835
1848
|
switch (r) {
|
|
1836
1849
|
case "Y":
|
|
1837
|
-
return A(
|
|
1850
|
+
return A(q(4, e), a);
|
|
1838
1851
|
case "Yo":
|
|
1839
1852
|
return A(
|
|
1840
1853
|
o.ordinalNumber(e, {
|
|
@@ -1843,14 +1856,14 @@ class fr extends H {
|
|
|
1843
1856
|
a
|
|
1844
1857
|
);
|
|
1845
1858
|
default:
|
|
1846
|
-
return A(
|
|
1859
|
+
return A(q(r.length, e), a);
|
|
1847
1860
|
}
|
|
1848
1861
|
}
|
|
1849
1862
|
validate(e, r) {
|
|
1850
1863
|
return r.isTwoDigitYear || r.year > 0;
|
|
1851
1864
|
}
|
|
1852
1865
|
set(e, r, o, a) {
|
|
1853
|
-
const i =
|
|
1866
|
+
const i = He(e, a);
|
|
1854
1867
|
if (o.isTwoDigitYear) {
|
|
1855
1868
|
const p = ut(
|
|
1856
1869
|
o.year,
|
|
@@ -1866,7 +1879,7 @@ class fr extends H {
|
|
|
1866
1879
|
return e.setFullYear(u, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), X(e, a);
|
|
1867
1880
|
}
|
|
1868
1881
|
}
|
|
1869
|
-
class
|
|
1882
|
+
class mr extends H {
|
|
1870
1883
|
constructor() {
|
|
1871
1884
|
super(...arguments);
|
|
1872
1885
|
f(this, "priority", 130);
|
|
@@ -1896,7 +1909,7 @@ class pr extends H {
|
|
|
1896
1909
|
return a.setFullYear(o, 0, 4), a.setHours(0, 0, 0, 0), ee(a);
|
|
1897
1910
|
}
|
|
1898
1911
|
}
|
|
1899
|
-
class
|
|
1912
|
+
class hr extends H {
|
|
1900
1913
|
constructor() {
|
|
1901
1914
|
super(...arguments);
|
|
1902
1915
|
f(this, "priority", 130);
|
|
@@ -1909,7 +1922,7 @@ class mr extends H {
|
|
|
1909
1922
|
return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1910
1923
|
}
|
|
1911
1924
|
}
|
|
1912
|
-
class
|
|
1925
|
+
class yr extends H {
|
|
1913
1926
|
constructor() {
|
|
1914
1927
|
super(...arguments);
|
|
1915
1928
|
f(this, "priority", 120);
|
|
@@ -1934,7 +1947,7 @@ class hr extends H {
|
|
|
1934
1947
|
switch (r) {
|
|
1935
1948
|
case "Q":
|
|
1936
1949
|
case "QQ":
|
|
1937
|
-
return
|
|
1950
|
+
return q(r.length, e);
|
|
1938
1951
|
case "Qo":
|
|
1939
1952
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
1940
1953
|
case "QQQ":
|
|
@@ -1971,7 +1984,7 @@ class hr extends H {
|
|
|
1971
1984
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
1972
1985
|
}
|
|
1973
1986
|
}
|
|
1974
|
-
class
|
|
1987
|
+
class gr extends H {
|
|
1975
1988
|
constructor() {
|
|
1976
1989
|
super(...arguments);
|
|
1977
1990
|
f(this, "priority", 120);
|
|
@@ -1996,7 +2009,7 @@ class yr extends H {
|
|
|
1996
2009
|
switch (r) {
|
|
1997
2010
|
case "q":
|
|
1998
2011
|
case "qq":
|
|
1999
|
-
return
|
|
2012
|
+
return q(r.length, e);
|
|
2000
2013
|
case "qo":
|
|
2001
2014
|
return o.ordinalNumber(e, { unit: "quarter" });
|
|
2002
2015
|
case "qqq":
|
|
@@ -2033,7 +2046,7 @@ class yr extends H {
|
|
|
2033
2046
|
return e.setMonth((o - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
2034
2047
|
}
|
|
2035
2048
|
}
|
|
2036
|
-
class
|
|
2049
|
+
class br extends H {
|
|
2037
2050
|
constructor() {
|
|
2038
2051
|
super(...arguments);
|
|
2039
2052
|
f(this, "incompatibleTokens", [
|
|
@@ -2058,11 +2071,11 @@ class gr extends H {
|
|
|
2058
2071
|
switch (r) {
|
|
2059
2072
|
case "M":
|
|
2060
2073
|
return A(
|
|
2061
|
-
N(
|
|
2074
|
+
N(Y.month, e),
|
|
2062
2075
|
a
|
|
2063
2076
|
);
|
|
2064
2077
|
case "MM":
|
|
2065
|
-
return A(
|
|
2078
|
+
return A(q(2, e), a);
|
|
2066
2079
|
case "Mo":
|
|
2067
2080
|
return A(
|
|
2068
2081
|
o.ordinalNumber(e, {
|
|
@@ -2095,7 +2108,7 @@ class gr extends H {
|
|
|
2095
2108
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2096
2109
|
}
|
|
2097
2110
|
}
|
|
2098
|
-
class
|
|
2111
|
+
class wr extends H {
|
|
2099
2112
|
constructor() {
|
|
2100
2113
|
super(...arguments);
|
|
2101
2114
|
f(this, "priority", 110);
|
|
@@ -2120,11 +2133,11 @@ class br extends H {
|
|
|
2120
2133
|
switch (r) {
|
|
2121
2134
|
case "L":
|
|
2122
2135
|
return A(
|
|
2123
|
-
N(
|
|
2136
|
+
N(Y.month, e),
|
|
2124
2137
|
a
|
|
2125
2138
|
);
|
|
2126
2139
|
case "LL":
|
|
2127
|
-
return A(
|
|
2140
|
+
return A(q(2, e), a);
|
|
2128
2141
|
case "Lo":
|
|
2129
2142
|
return A(
|
|
2130
2143
|
o.ordinalNumber(e, {
|
|
@@ -2157,11 +2170,11 @@ class br extends H {
|
|
|
2157
2170
|
return e.setMonth(o, 1), e.setHours(0, 0, 0, 0), e;
|
|
2158
2171
|
}
|
|
2159
2172
|
}
|
|
2160
|
-
function
|
|
2173
|
+
function vr(t, n, e) {
|
|
2161
2174
|
const r = _(t), o = nt(r, e) - n;
|
|
2162
2175
|
return r.setDate(r.getDate() - o * 7), r;
|
|
2163
2176
|
}
|
|
2164
|
-
class
|
|
2177
|
+
class xr extends H {
|
|
2165
2178
|
constructor() {
|
|
2166
2179
|
super(...arguments);
|
|
2167
2180
|
f(this, "priority", 100);
|
|
@@ -2184,25 +2197,25 @@ class vr extends H {
|
|
|
2184
2197
|
parse(e, r, o) {
|
|
2185
2198
|
switch (r) {
|
|
2186
2199
|
case "w":
|
|
2187
|
-
return N(
|
|
2200
|
+
return N(Y.week, e);
|
|
2188
2201
|
case "wo":
|
|
2189
2202
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2190
2203
|
default:
|
|
2191
|
-
return
|
|
2204
|
+
return q(r.length, e);
|
|
2192
2205
|
}
|
|
2193
2206
|
}
|
|
2194
2207
|
validate(e, r) {
|
|
2195
2208
|
return r >= 1 && r <= 53;
|
|
2196
2209
|
}
|
|
2197
2210
|
set(e, r, o, a) {
|
|
2198
|
-
return X(
|
|
2211
|
+
return X(vr(e, o, a), a);
|
|
2199
2212
|
}
|
|
2200
2213
|
}
|
|
2201
|
-
function
|
|
2214
|
+
function Mr(t, n) {
|
|
2202
2215
|
const e = _(t), r = tt(e) - n;
|
|
2203
2216
|
return e.setDate(e.getDate() - r * 7), e;
|
|
2204
2217
|
}
|
|
2205
|
-
class
|
|
2218
|
+
class kr extends H {
|
|
2206
2219
|
constructor() {
|
|
2207
2220
|
super(...arguments);
|
|
2208
2221
|
f(this, "priority", 100);
|
|
@@ -2226,21 +2239,21 @@ class Mr extends H {
|
|
|
2226
2239
|
parse(e, r, o) {
|
|
2227
2240
|
switch (r) {
|
|
2228
2241
|
case "I":
|
|
2229
|
-
return N(
|
|
2242
|
+
return N(Y.week, e);
|
|
2230
2243
|
case "Io":
|
|
2231
2244
|
return o.ordinalNumber(e, { unit: "week" });
|
|
2232
2245
|
default:
|
|
2233
|
-
return
|
|
2246
|
+
return q(r.length, e);
|
|
2234
2247
|
}
|
|
2235
2248
|
}
|
|
2236
2249
|
validate(e, r) {
|
|
2237
2250
|
return r >= 1 && r <= 53;
|
|
2238
2251
|
}
|
|
2239
2252
|
set(e, r, o) {
|
|
2240
|
-
return ee(
|
|
2253
|
+
return ee(Mr(e, o));
|
|
2241
2254
|
}
|
|
2242
2255
|
}
|
|
2243
|
-
const
|
|
2256
|
+
const Cr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Tr = [
|
|
2244
2257
|
31,
|
|
2245
2258
|
29,
|
|
2246
2259
|
31,
|
|
@@ -2254,7 +2267,7 @@ const kr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = [
|
|
|
2254
2267
|
30,
|
|
2255
2268
|
31
|
|
2256
2269
|
];
|
|
2257
|
-
class
|
|
2270
|
+
class Pr extends H {
|
|
2258
2271
|
constructor() {
|
|
2259
2272
|
super(...arguments);
|
|
2260
2273
|
f(this, "priority", 90);
|
|
@@ -2277,22 +2290,22 @@ class Tr extends H {
|
|
|
2277
2290
|
parse(e, r, o) {
|
|
2278
2291
|
switch (r) {
|
|
2279
2292
|
case "d":
|
|
2280
|
-
return N(
|
|
2293
|
+
return N(Y.date, e);
|
|
2281
2294
|
case "do":
|
|
2282
2295
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2283
2296
|
default:
|
|
2284
|
-
return
|
|
2297
|
+
return q(r.length, e);
|
|
2285
2298
|
}
|
|
2286
2299
|
}
|
|
2287
2300
|
validate(e, r) {
|
|
2288
2301
|
const o = e.getFullYear(), a = lt(o), i = e.getMonth();
|
|
2289
|
-
return a ? r >= 1 && r <=
|
|
2302
|
+
return a ? r >= 1 && r <= Tr[i] : r >= 1 && r <= Cr[i];
|
|
2290
2303
|
}
|
|
2291
2304
|
set(e, r, o) {
|
|
2292
2305
|
return e.setDate(o), e.setHours(0, 0, 0, 0), e;
|
|
2293
2306
|
}
|
|
2294
2307
|
}
|
|
2295
|
-
class
|
|
2308
|
+
class Or extends H {
|
|
2296
2309
|
constructor() {
|
|
2297
2310
|
super(...arguments);
|
|
2298
2311
|
f(this, "priority", 90);
|
|
@@ -2319,11 +2332,11 @@ class Pr extends H {
|
|
|
2319
2332
|
switch (r) {
|
|
2320
2333
|
case "D":
|
|
2321
2334
|
case "DD":
|
|
2322
|
-
return N(
|
|
2335
|
+
return N(Y.dayOfYear, e);
|
|
2323
2336
|
case "Do":
|
|
2324
2337
|
return o.ordinalNumber(e, { unit: "date" });
|
|
2325
2338
|
default:
|
|
2326
|
-
return
|
|
2339
|
+
return q(r.length, e);
|
|
2327
2340
|
}
|
|
2328
2341
|
}
|
|
2329
2342
|
validate(e, r) {
|
|
@@ -2334,12 +2347,12 @@ class Pr extends H {
|
|
|
2334
2347
|
return e.setMonth(0, o), e.setHours(0, 0, 0, 0), e;
|
|
2335
2348
|
}
|
|
2336
2349
|
}
|
|
2337
|
-
function
|
|
2350
|
+
function Be(t, n, e) {
|
|
2338
2351
|
var s, l, m, h;
|
|
2339
2352
|
const r = ne(), o = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (s = e == null ? void 0 : e.locale) == null ? void 0 : s.options) == null ? void 0 : l.weekStartsOn) ?? r.weekStartsOn ?? ((h = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : h.weekStartsOn) ?? 0, a = _(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;
|
|
2340
2353
|
return ze(a, d);
|
|
2341
2354
|
}
|
|
2342
|
-
class
|
|
2355
|
+
class Dr extends H {
|
|
2343
2356
|
constructor() {
|
|
2344
2357
|
super(...arguments);
|
|
2345
2358
|
f(this, "priority", 90);
|
|
@@ -2373,10 +2386,10 @@ class Or extends H {
|
|
|
2373
2386
|
return r >= 0 && r <= 6;
|
|
2374
2387
|
}
|
|
2375
2388
|
set(e, r, o, a) {
|
|
2376
|
-
return e =
|
|
2389
|
+
return e = Be(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2377
2390
|
}
|
|
2378
2391
|
}
|
|
2379
|
-
class
|
|
2392
|
+
class Hr extends H {
|
|
2380
2393
|
constructor() {
|
|
2381
2394
|
super(...arguments);
|
|
2382
2395
|
f(this, "priority", 90);
|
|
@@ -2406,7 +2419,7 @@ class Dr extends H {
|
|
|
2406
2419
|
switch (r) {
|
|
2407
2420
|
case "e":
|
|
2408
2421
|
case "ee":
|
|
2409
|
-
return A(
|
|
2422
|
+
return A(q(r.length, e), i);
|
|
2410
2423
|
case "eo":
|
|
2411
2424
|
return A(
|
|
2412
2425
|
o.ordinalNumber(e, {
|
|
@@ -2438,10 +2451,10 @@ class Dr extends H {
|
|
|
2438
2451
|
return r >= 0 && r <= 6;
|
|
2439
2452
|
}
|
|
2440
2453
|
set(e, r, o, a) {
|
|
2441
|
-
return e =
|
|
2454
|
+
return e = Be(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2442
2455
|
}
|
|
2443
2456
|
}
|
|
2444
|
-
class
|
|
2457
|
+
class Er extends H {
|
|
2445
2458
|
constructor() {
|
|
2446
2459
|
super(...arguments);
|
|
2447
2460
|
f(this, "priority", 90);
|
|
@@ -2471,7 +2484,7 @@ class Hr extends H {
|
|
|
2471
2484
|
switch (r) {
|
|
2472
2485
|
case "c":
|
|
2473
2486
|
case "cc":
|
|
2474
|
-
return A(
|
|
2487
|
+
return A(q(r.length, e), i);
|
|
2475
2488
|
case "co":
|
|
2476
2489
|
return A(
|
|
2477
2490
|
o.ordinalNumber(e, {
|
|
@@ -2503,14 +2516,14 @@ class Hr extends H {
|
|
|
2503
2516
|
return r >= 0 && r <= 6;
|
|
2504
2517
|
}
|
|
2505
2518
|
set(e, r, o, a) {
|
|
2506
|
-
return e =
|
|
2519
|
+
return e = Be(e, o, a), e.setHours(0, 0, 0, 0), e;
|
|
2507
2520
|
}
|
|
2508
2521
|
}
|
|
2509
|
-
function
|
|
2510
|
-
const e = _(t), r =
|
|
2522
|
+
function Br(t, n) {
|
|
2523
|
+
const e = _(t), r = sr(e), o = n - r;
|
|
2511
2524
|
return ze(e, o);
|
|
2512
2525
|
}
|
|
2513
|
-
class
|
|
2526
|
+
class Fr extends H {
|
|
2514
2527
|
constructor() {
|
|
2515
2528
|
super(...arguments);
|
|
2516
2529
|
f(this, "priority", 90);
|
|
@@ -2537,7 +2550,7 @@ class Br extends H {
|
|
|
2537
2550
|
switch (r) {
|
|
2538
2551
|
case "i":
|
|
2539
2552
|
case "ii":
|
|
2540
|
-
return
|
|
2553
|
+
return q(r.length, e);
|
|
2541
2554
|
case "io":
|
|
2542
2555
|
return o.ordinalNumber(e, { unit: "day" });
|
|
2543
2556
|
case "iii":
|
|
@@ -2597,10 +2610,10 @@ class Br extends H {
|
|
|
2597
2610
|
return r >= 1 && r <= 7;
|
|
2598
2611
|
}
|
|
2599
2612
|
set(e, r, o) {
|
|
2600
|
-
return e =
|
|
2613
|
+
return e = Br(e, o), e.setHours(0, 0, 0, 0), e;
|
|
2601
2614
|
}
|
|
2602
2615
|
}
|
|
2603
|
-
class
|
|
2616
|
+
class Vr extends H {
|
|
2604
2617
|
constructor() {
|
|
2605
2618
|
super(...arguments);
|
|
2606
2619
|
f(this, "priority", 80);
|
|
@@ -2638,10 +2651,10 @@ class Fr extends H {
|
|
|
2638
2651
|
}
|
|
2639
2652
|
}
|
|
2640
2653
|
set(e, r, o) {
|
|
2641
|
-
return e.setHours(
|
|
2654
|
+
return e.setHours(Ee(o), 0, 0, 0), e;
|
|
2642
2655
|
}
|
|
2643
2656
|
}
|
|
2644
|
-
class
|
|
2657
|
+
class Sr extends H {
|
|
2645
2658
|
constructor() {
|
|
2646
2659
|
super(...arguments);
|
|
2647
2660
|
f(this, "priority", 80);
|
|
@@ -2679,10 +2692,10 @@ class Vr extends H {
|
|
|
2679
2692
|
}
|
|
2680
2693
|
}
|
|
2681
2694
|
set(e, r, o) {
|
|
2682
|
-
return e.setHours(
|
|
2695
|
+
return e.setHours(Ee(o), 0, 0, 0), e;
|
|
2683
2696
|
}
|
|
2684
2697
|
}
|
|
2685
|
-
class
|
|
2698
|
+
class Ir extends H {
|
|
2686
2699
|
constructor() {
|
|
2687
2700
|
super(...arguments);
|
|
2688
2701
|
f(this, "priority", 80);
|
|
@@ -2720,10 +2733,10 @@ class Sr extends H {
|
|
|
2720
2733
|
}
|
|
2721
2734
|
}
|
|
2722
2735
|
set(e, r, o) {
|
|
2723
|
-
return e.setHours(
|
|
2736
|
+
return e.setHours(Ee(o), 0, 0, 0), e;
|
|
2724
2737
|
}
|
|
2725
2738
|
}
|
|
2726
|
-
class
|
|
2739
|
+
class Nr extends H {
|
|
2727
2740
|
constructor() {
|
|
2728
2741
|
super(...arguments);
|
|
2729
2742
|
f(this, "priority", 70);
|
|
@@ -2732,11 +2745,11 @@ class Ir extends H {
|
|
|
2732
2745
|
parse(e, r, o) {
|
|
2733
2746
|
switch (r) {
|
|
2734
2747
|
case "h":
|
|
2735
|
-
return N(
|
|
2748
|
+
return N(Y.hour12h, e);
|
|
2736
2749
|
case "ho":
|
|
2737
2750
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2738
2751
|
default:
|
|
2739
|
-
return
|
|
2752
|
+
return q(r.length, e);
|
|
2740
2753
|
}
|
|
2741
2754
|
}
|
|
2742
2755
|
validate(e, r) {
|
|
@@ -2747,7 +2760,7 @@ class Ir extends H {
|
|
|
2747
2760
|
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;
|
|
2748
2761
|
}
|
|
2749
2762
|
}
|
|
2750
|
-
class
|
|
2763
|
+
class Lr extends H {
|
|
2751
2764
|
constructor() {
|
|
2752
2765
|
super(...arguments);
|
|
2753
2766
|
f(this, "priority", 70);
|
|
@@ -2756,11 +2769,11 @@ class Nr extends H {
|
|
|
2756
2769
|
parse(e, r, o) {
|
|
2757
2770
|
switch (r) {
|
|
2758
2771
|
case "H":
|
|
2759
|
-
return N(
|
|
2772
|
+
return N(Y.hour23h, e);
|
|
2760
2773
|
case "Ho":
|
|
2761
2774
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2762
2775
|
default:
|
|
2763
|
-
return
|
|
2776
|
+
return q(r.length, e);
|
|
2764
2777
|
}
|
|
2765
2778
|
}
|
|
2766
2779
|
validate(e, r) {
|
|
@@ -2770,7 +2783,7 @@ class Nr extends H {
|
|
|
2770
2783
|
return e.setHours(o, 0, 0, 0), e;
|
|
2771
2784
|
}
|
|
2772
2785
|
}
|
|
2773
|
-
class
|
|
2786
|
+
class Wr extends H {
|
|
2774
2787
|
constructor() {
|
|
2775
2788
|
super(...arguments);
|
|
2776
2789
|
f(this, "priority", 70);
|
|
@@ -2779,11 +2792,11 @@ class Lr extends H {
|
|
|
2779
2792
|
parse(e, r, o) {
|
|
2780
2793
|
switch (r) {
|
|
2781
2794
|
case "K":
|
|
2782
|
-
return N(
|
|
2795
|
+
return N(Y.hour11h, e);
|
|
2783
2796
|
case "Ko":
|
|
2784
2797
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2785
2798
|
default:
|
|
2786
|
-
return
|
|
2799
|
+
return q(r.length, e);
|
|
2787
2800
|
}
|
|
2788
2801
|
}
|
|
2789
2802
|
validate(e, r) {
|
|
@@ -2793,7 +2806,7 @@ class Lr extends H {
|
|
|
2793
2806
|
return e.getHours() >= 12 && o < 12 ? e.setHours(o + 12, 0, 0, 0) : e.setHours(o, 0, 0, 0), e;
|
|
2794
2807
|
}
|
|
2795
2808
|
}
|
|
2796
|
-
class
|
|
2809
|
+
class qr extends H {
|
|
2797
2810
|
constructor() {
|
|
2798
2811
|
super(...arguments);
|
|
2799
2812
|
f(this, "priority", 70);
|
|
@@ -2802,11 +2815,11 @@ class Wr extends H {
|
|
|
2802
2815
|
parse(e, r, o) {
|
|
2803
2816
|
switch (r) {
|
|
2804
2817
|
case "k":
|
|
2805
|
-
return N(
|
|
2818
|
+
return N(Y.hour24h, e);
|
|
2806
2819
|
case "ko":
|
|
2807
2820
|
return o.ordinalNumber(e, { unit: "hour" });
|
|
2808
2821
|
default:
|
|
2809
|
-
return
|
|
2822
|
+
return q(r.length, e);
|
|
2810
2823
|
}
|
|
2811
2824
|
}
|
|
2812
2825
|
validate(e, r) {
|
|
@@ -2826,11 +2839,11 @@ class Yr extends H {
|
|
|
2826
2839
|
parse(e, r, o) {
|
|
2827
2840
|
switch (r) {
|
|
2828
2841
|
case "m":
|
|
2829
|
-
return N(
|
|
2842
|
+
return N(Y.minute, e);
|
|
2830
2843
|
case "mo":
|
|
2831
2844
|
return o.ordinalNumber(e, { unit: "minute" });
|
|
2832
2845
|
default:
|
|
2833
|
-
return
|
|
2846
|
+
return q(r.length, e);
|
|
2834
2847
|
}
|
|
2835
2848
|
}
|
|
2836
2849
|
validate(e, r) {
|
|
@@ -2840,7 +2853,7 @@ class Yr extends H {
|
|
|
2840
2853
|
return e.setMinutes(o, 0, 0), e;
|
|
2841
2854
|
}
|
|
2842
2855
|
}
|
|
2843
|
-
class
|
|
2856
|
+
class Ar extends H {
|
|
2844
2857
|
constructor() {
|
|
2845
2858
|
super(...arguments);
|
|
2846
2859
|
f(this, "priority", 50);
|
|
@@ -2849,11 +2862,11 @@ class qr extends H {
|
|
|
2849
2862
|
parse(e, r, o) {
|
|
2850
2863
|
switch (r) {
|
|
2851
2864
|
case "s":
|
|
2852
|
-
return N(
|
|
2865
|
+
return N(Y.second, e);
|
|
2853
2866
|
case "so":
|
|
2854
2867
|
return o.ordinalNumber(e, { unit: "second" });
|
|
2855
2868
|
default:
|
|
2856
|
-
return
|
|
2869
|
+
return q(r.length, e);
|
|
2857
2870
|
}
|
|
2858
2871
|
}
|
|
2859
2872
|
validate(e, r) {
|
|
@@ -2863,7 +2876,7 @@ class qr extends H {
|
|
|
2863
2876
|
return e.setSeconds(o, 0), e;
|
|
2864
2877
|
}
|
|
2865
2878
|
}
|
|
2866
|
-
class
|
|
2879
|
+
class _r extends H {
|
|
2867
2880
|
constructor() {
|
|
2868
2881
|
super(...arguments);
|
|
2869
2882
|
f(this, "priority", 30);
|
|
@@ -2871,13 +2884,13 @@ class Ar extends H {
|
|
|
2871
2884
|
}
|
|
2872
2885
|
parse(e, r) {
|
|
2873
2886
|
const o = (a) => Math.trunc(a * Math.pow(10, -r.length + 3));
|
|
2874
|
-
return A(
|
|
2887
|
+
return A(q(r.length, e), o);
|
|
2875
2888
|
}
|
|
2876
2889
|
set(e, r, o) {
|
|
2877
2890
|
return e.setMilliseconds(o), e;
|
|
2878
2891
|
}
|
|
2879
2892
|
}
|
|
2880
|
-
class
|
|
2893
|
+
class $r extends H {
|
|
2881
2894
|
constructor() {
|
|
2882
2895
|
super(...arguments);
|
|
2883
2896
|
f(this, "priority", 10);
|
|
@@ -2951,7 +2964,7 @@ class Gr extends H {
|
|
|
2951
2964
|
);
|
|
2952
2965
|
}
|
|
2953
2966
|
}
|
|
2954
|
-
class
|
|
2967
|
+
class jr extends H {
|
|
2955
2968
|
constructor() {
|
|
2956
2969
|
super(...arguments);
|
|
2957
2970
|
f(this, "priority", 40);
|
|
@@ -2964,7 +2977,7 @@ class $r extends H {
|
|
|
2964
2977
|
return [W(e, o * 1e3), { timestampIsSet: !0 }];
|
|
2965
2978
|
}
|
|
2966
2979
|
}
|
|
2967
|
-
class
|
|
2980
|
+
class Rr extends H {
|
|
2968
2981
|
constructor() {
|
|
2969
2982
|
super(...arguments);
|
|
2970
2983
|
f(this, "priority", 20);
|
|
@@ -2977,59 +2990,59 @@ class jr extends H {
|
|
|
2977
2990
|
return [W(e, o), { timestampIsSet: !0 }];
|
|
2978
2991
|
}
|
|
2979
2992
|
}
|
|
2980
|
-
const
|
|
2981
|
-
G: new
|
|
2982
|
-
y: new
|
|
2983
|
-
Y: new
|
|
2984
|
-
R: new
|
|
2985
|
-
u: new
|
|
2986
|
-
Q: new
|
|
2987
|
-
q: new
|
|
2988
|
-
M: new
|
|
2989
|
-
L: new
|
|
2990
|
-
w: new
|
|
2991
|
-
I: new
|
|
2992
|
-
d: new
|
|
2993
|
-
D: new
|
|
2994
|
-
E: new
|
|
2995
|
-
e: new
|
|
2996
|
-
c: new
|
|
2997
|
-
i: new
|
|
2998
|
-
a: new
|
|
2999
|
-
b: new
|
|
3000
|
-
B: new
|
|
3001
|
-
h: new
|
|
3002
|
-
H: new
|
|
3003
|
-
K: new
|
|
3004
|
-
k: new
|
|
2993
|
+
const Qr = {
|
|
2994
|
+
G: new dr(),
|
|
2995
|
+
y: new fr(),
|
|
2996
|
+
Y: new pr(),
|
|
2997
|
+
R: new mr(),
|
|
2998
|
+
u: new hr(),
|
|
2999
|
+
Q: new yr(),
|
|
3000
|
+
q: new gr(),
|
|
3001
|
+
M: new br(),
|
|
3002
|
+
L: new wr(),
|
|
3003
|
+
w: new xr(),
|
|
3004
|
+
I: new kr(),
|
|
3005
|
+
d: new Pr(),
|
|
3006
|
+
D: new Or(),
|
|
3007
|
+
E: new Dr(),
|
|
3008
|
+
e: new Hr(),
|
|
3009
|
+
c: new Er(),
|
|
3010
|
+
i: new Fr(),
|
|
3011
|
+
a: new Vr(),
|
|
3012
|
+
b: new Sr(),
|
|
3013
|
+
B: new Ir(),
|
|
3014
|
+
h: new Nr(),
|
|
3015
|
+
H: new Lr(),
|
|
3016
|
+
K: new Wr(),
|
|
3017
|
+
k: new qr(),
|
|
3005
3018
|
m: new Yr(),
|
|
3006
|
-
s: new
|
|
3007
|
-
S: new
|
|
3008
|
-
X: new
|
|
3019
|
+
s: new Ar(),
|
|
3020
|
+
S: new _r(),
|
|
3021
|
+
X: new $r(),
|
|
3009
3022
|
x: new Gr(),
|
|
3010
|
-
t: new
|
|
3011
|
-
T: new
|
|
3012
|
-
},
|
|
3023
|
+
t: new jr(),
|
|
3024
|
+
T: new Rr()
|
|
3025
|
+
}, Ur = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Xr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, zr = /^'([^]*?)'?$/, Jr = /''/g, Zr = /\S/, Kr = /[a-zA-Z]/;
|
|
3013
3026
|
function Ge(t, n, e, r) {
|
|
3014
3027
|
var g, P, O, D;
|
|
3015
|
-
const o =
|
|
3028
|
+
const o = ar(), a = o.locale ?? et, i = o.firstWeekContainsDate ?? ((P = (g = o.locale) == null ? void 0 : g.options) == null ? void 0 : P.firstWeekContainsDate) ?? 1, u = o.weekStartsOn ?? ((D = (O = o.locale) == null ? void 0 : O.options) == null ? void 0 : D.weekStartsOn) ?? 0;
|
|
3016
3029
|
if (n === "")
|
|
3017
3030
|
return t === "" ? _(e) : W(e, NaN);
|
|
3018
3031
|
const p = {
|
|
3019
3032
|
firstWeekContainsDate: i,
|
|
3020
3033
|
weekStartsOn: u,
|
|
3021
3034
|
locale: a
|
|
3022
|
-
}, c = [new
|
|
3035
|
+
}, c = [new cr()], d = n.match(Xr).map((b) => {
|
|
3023
3036
|
const k = b[0];
|
|
3024
3037
|
if (k in Me) {
|
|
3025
3038
|
const v = Me[k];
|
|
3026
3039
|
return v(b, a.formatLong);
|
|
3027
3040
|
}
|
|
3028
3041
|
return b;
|
|
3029
|
-
}).join("").match(
|
|
3042
|
+
}).join("").match(Ur), s = [];
|
|
3030
3043
|
for (let b of d) {
|
|
3031
3044
|
at(b) && ke(b, n, t), ot(b) && ke(b, n, t);
|
|
3032
|
-
const k = b[0], v =
|
|
3045
|
+
const k = b[0], v = Qr[k];
|
|
3033
3046
|
if (v) {
|
|
3034
3047
|
const { incompatibleTokens: E } = v;
|
|
3035
3048
|
if (Array.isArray(E)) {
|
|
@@ -3055,17 +3068,17 @@ function Ge(t, n, e, r) {
|
|
|
3055
3068
|
return W(e, NaN);
|
|
3056
3069
|
c.push(F.setter), t = F.rest;
|
|
3057
3070
|
} else {
|
|
3058
|
-
if (k.match(
|
|
3071
|
+
if (k.match(Kr))
|
|
3059
3072
|
throw new RangeError(
|
|
3060
3073
|
"Format string contains an unescaped latin alphabet character `" + k + "`"
|
|
3061
3074
|
);
|
|
3062
|
-
if (b === "''" ? b = "'" : k === "'" && (b =
|
|
3075
|
+
if (b === "''" ? b = "'" : k === "'" && (b = eo(b)), t.indexOf(b) === 0)
|
|
3063
3076
|
t = t.slice(b.length);
|
|
3064
3077
|
else
|
|
3065
3078
|
return W(e, NaN);
|
|
3066
3079
|
}
|
|
3067
3080
|
}
|
|
3068
|
-
if (t.length > 0 &&
|
|
3081
|
+
if (t.length > 0 && Zr.test(t))
|
|
3069
3082
|
return W(e, NaN);
|
|
3070
3083
|
const l = c.map((b) => b.priority).sort((b, k) => k - b).filter((b, k, v) => v.indexOf(b) === k).map(
|
|
3071
3084
|
(b) => c.filter((k) => k.priority === b).sort((k, v) => v.subPriority - k.subPriority)
|
|
@@ -3082,8 +3095,8 @@ function Ge(t, n, e, r) {
|
|
|
3082
3095
|
}
|
|
3083
3096
|
return W(e, m);
|
|
3084
3097
|
}
|
|
3085
|
-
function
|
|
3086
|
-
return t.match(
|
|
3098
|
+
function eo(t) {
|
|
3099
|
+
return t.match(zr)[1].replace(Jr, "'");
|
|
3087
3100
|
}
|
|
3088
3101
|
function V(t) {
|
|
3089
3102
|
return typeof t < "u" && t !== null;
|
|
@@ -3093,13 +3106,13 @@ function ct(t, n = "hh:mm:ss") {
|
|
|
3093
3106
|
return n.indexOf("ss") === -1 && t.split(":").length === 3 && (n = n + ":ss"), n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), Ge(t.toLowerCase(), n, /* @__PURE__ */ new Date())) : Ge(t, n, /* @__PURE__ */ new Date());
|
|
3094
3107
|
}
|
|
3095
3108
|
function dt(t, n = "hh:mm:ss", e = "AM") {
|
|
3096
|
-
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"),
|
|
3109
|
+
return !t || isNaN(t.getTime()) ? "" : n.indexOf("A") > -1 ? (n = n.replace(/A/g, "a"), $e(t, n).toUpperCase()) : $e(t, n);
|
|
3097
3110
|
}
|
|
3098
3111
|
function ft(t, n) {
|
|
3099
3112
|
let e = t || "hh:mm:ss";
|
|
3100
3113
|
return n ? (e = e ? e.replace(/H/g, "h") : "hh:mm:ss a", e.indexOf("a") === -1 && e.indexOf("A") === -1 && (e = e + " a")) : e = e ? e.replace(/h/g, "H") : "HH:mm:ss", e;
|
|
3101
3114
|
}
|
|
3102
|
-
class
|
|
3115
|
+
class to {
|
|
3103
3116
|
constructor() {
|
|
3104
3117
|
f(this, "hourStep", 1);
|
|
3105
3118
|
f(this, "minuteStep", 1);
|
|
@@ -3265,8 +3278,8 @@ class eo {
|
|
|
3265
3278
|
return e === "PM" && n > 12 ? n - 12 : e === "AM" && n === 0 ? 12 : n;
|
|
3266
3279
|
}
|
|
3267
3280
|
}
|
|
3268
|
-
const
|
|
3269
|
-
function
|
|
3281
|
+
const no = ["moz", "ms", "webkit"];
|
|
3282
|
+
function ro() {
|
|
3270
3283
|
let t = 0;
|
|
3271
3284
|
return (n) => {
|
|
3272
3285
|
const e = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (e - t)), o = setTimeout(() => {
|
|
@@ -3275,16 +3288,16 @@ function no() {
|
|
|
3275
3288
|
return t = e + r, o;
|
|
3276
3289
|
};
|
|
3277
3290
|
}
|
|
3278
|
-
function
|
|
3291
|
+
function oo() {
|
|
3279
3292
|
if (typeof window > "u")
|
|
3280
3293
|
return () => 0;
|
|
3281
3294
|
if (window.requestAnimationFrame)
|
|
3282
3295
|
return window.requestAnimationFrame.bind(window);
|
|
3283
|
-
const t =
|
|
3284
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
3296
|
+
const t = no.filter((n) => `${n}RequestAnimationFrame` in window)[0];
|
|
3297
|
+
return t ? window[`${t}RequestAnimationFrame`] : ro();
|
|
3285
3298
|
}
|
|
3286
|
-
const
|
|
3287
|
-
function
|
|
3299
|
+
const ao = oo();
|
|
3300
|
+
function so(t, n, e, r, o, a) {
|
|
3288
3301
|
function i(d, s, l = 0, m, h) {
|
|
3289
3302
|
const g = u(s, m, h), P = d.children[0].children[g] || d.children[0].children[0];
|
|
3290
3303
|
p(d, P.offsetTop, l);
|
|
@@ -3322,7 +3335,7 @@ function ao(t, n, e, r, o, a) {
|
|
|
3322
3335
|
return;
|
|
3323
3336
|
}
|
|
3324
3337
|
const h = (s - d.scrollTop) / l * 10;
|
|
3325
|
-
|
|
3338
|
+
ao(() => {
|
|
3326
3339
|
d.scrollTop += h, d.scrollTop !== s && p(d, s, l - 10);
|
|
3327
3340
|
});
|
|
3328
3341
|
}
|
|
@@ -3331,7 +3344,7 @@ function ao(t, n, e, r, o, a) {
|
|
|
3331
3344
|
}
|
|
3332
3345
|
return { scrollToSelected: i };
|
|
3333
3346
|
}
|
|
3334
|
-
function
|
|
3347
|
+
function io(t, n) {
|
|
3335
3348
|
function e(u) {
|
|
3336
3349
|
return u.index === t.viewHours || !V(t.viewHours) && u.index === t.defaultViewHours;
|
|
3337
3350
|
}
|
|
@@ -3354,42 +3367,42 @@ function so(t, n) {
|
|
|
3354
3367
|
}
|
|
3355
3368
|
const Ce = /* @__PURE__ */ te({
|
|
3356
3369
|
name: "FTimePickerTimeView",
|
|
3357
|
-
props:
|
|
3370
|
+
props: rn,
|
|
3358
3371
|
emits: ["valueChange", "formatedValueChange"],
|
|
3359
3372
|
setup(t, n) {
|
|
3360
|
-
const e = "time-picker-panel", r = x(0), o = x([]), a = x([]), i = x([]), u = x([]), p = x(), c = x(), d = x(), s = x(), l = new
|
|
3373
|
+
const e = "time-picker-panel", r = x(0), o = x([]), a = x([]), i = x([]), u = x([]), p = x(), c = x(), d = x(), s = x(), l = new to(), {
|
|
3361
3374
|
scrollToSelected: m
|
|
3362
|
-
} =
|
|
3375
|
+
} = so(t, n, o, a, i, u), {
|
|
3363
3376
|
getSelectedClass: h
|
|
3364
|
-
} =
|
|
3365
|
-
|
|
3377
|
+
} = io(l, e), g = x(t.hourStep), P = x(t.minuteStep), O = x(t.secondStep), D = x(), b = x(""), k = x(), v = x(t.hideDisabledElements), E = x(0);
|
|
3378
|
+
$(() => t.defaultOpenValue, (y) => {
|
|
3366
3379
|
V(y) && (D.value = y);
|
|
3367
|
-
}),
|
|
3380
|
+
}), $(D, (y) => {
|
|
3368
3381
|
V(y) && l.setDefaultOpenValue(y);
|
|
3369
|
-
}), D.value = t.defaultOpenValue,
|
|
3382
|
+
}), D.value = t.defaultOpenValue, $(l.changedValue, (y) => {
|
|
3370
3383
|
n.emit("valueChange", y);
|
|
3371
|
-
}),
|
|
3384
|
+
}), $(() => t.modelValue, (y) => {
|
|
3372
3385
|
F(y);
|
|
3373
|
-
}),
|
|
3386
|
+
}), $(() => t.format, (y) => {
|
|
3374
3387
|
V(y) ? b.value = y : b.value = "HH:mm:ss";
|
|
3375
|
-
}),
|
|
3376
|
-
V(y) && (l.setFormat(b.value), E.value = 0, fe.value && E.value++, re.value && E.value++, oe.value && E.value++, k.value && (E.value++,
|
|
3377
|
-
}),
|
|
3388
|
+
}), $(b, (y) => {
|
|
3389
|
+
V(y) && (l.setFormat(b.value), E.value = 0, fe.value && E.value++, re.value && E.value++, oe.value && E.value++, k.value && (E.value++, Ve()), r.value = E.value * 66);
|
|
3390
|
+
}), $(() => t.use12Hours, (y) => {
|
|
3378
3391
|
k.value = y;
|
|
3379
|
-
}),
|
|
3392
|
+
}), $(k, (y) => {
|
|
3380
3393
|
b.value = ft(b.value, y), l.setUse12Hours(y);
|
|
3381
|
-
}),
|
|
3394
|
+
}), $(() => t.disabledHours, () => {
|
|
3382
3395
|
we();
|
|
3383
|
-
}),
|
|
3396
|
+
}), $(() => t.disabledMinutes, () => {
|
|
3384
3397
|
pe();
|
|
3385
|
-
}),
|
|
3398
|
+
}), $(() => t.disabledSeconds, () => {
|
|
3386
3399
|
ae();
|
|
3387
3400
|
});
|
|
3388
3401
|
function F(y) {
|
|
3389
3402
|
if (V(y)) {
|
|
3390
3403
|
l.text = y;
|
|
3391
3404
|
const M = ct(l.text, b.value);
|
|
3392
|
-
l.setValue(M, k.value),
|
|
3405
|
+
l.setValue(M, k.value), Se();
|
|
3393
3406
|
} else
|
|
3394
3407
|
l.setUse12Hours(k.value);
|
|
3395
3408
|
}
|
|
@@ -3400,7 +3413,7 @@ const Ce = /* @__PURE__ */ te({
|
|
|
3400
3413
|
function C(y = "hour") {
|
|
3401
3414
|
return b.value ? b.value.indexOf(y[0].toUpperCase()) > -1 || b.value.indexOf(y[0].toLowerCase()) > -1 : !1;
|
|
3402
3415
|
}
|
|
3403
|
-
const
|
|
3416
|
+
const G = I(() => ({
|
|
3404
3417
|
"time-picker-panel": !0,
|
|
3405
3418
|
"time-picker-panel-column-3": !0,
|
|
3406
3419
|
"time-picker-panel-placement-bottomLeft": !0,
|
|
@@ -3442,7 +3455,7 @@ const Ce = /* @__PURE__ */ te({
|
|
|
3442
3455
|
disabled: !!t.disabledSeconds && t.disabledSeconds(l.hours, l.minutes).indexOf(y) !== -1
|
|
3443
3456
|
})), i.value = i.value.filter((y) => !(v.value && y.disabled));
|
|
3444
3457
|
}
|
|
3445
|
-
function
|
|
3458
|
+
function Ve() {
|
|
3446
3459
|
const y = b.value.includes("A");
|
|
3447
3460
|
u.value = [{
|
|
3448
3461
|
index: 0,
|
|
@@ -3487,11 +3500,11 @@ const Ce = /* @__PURE__ */ te({
|
|
|
3487
3500
|
function xt(y, M) {
|
|
3488
3501
|
y.stopPropagation(), l.setSeconds(M.index, M.disabled), !M.disabled && m(d.value, M.index, 120, "second", l);
|
|
3489
3502
|
}
|
|
3490
|
-
function
|
|
3491
|
-
we(), pe(), ae(),
|
|
3503
|
+
function Se() {
|
|
3504
|
+
we(), pe(), ae(), Ve();
|
|
3492
3505
|
}
|
|
3493
3506
|
ce(() => {
|
|
3494
|
-
b.value = t.format, k.value = t.use12Hours, F(t.modelValue),
|
|
3507
|
+
b.value = t.format, k.value = t.use12Hours, F(t.modelValue), Se(), setTimeout(() => {
|
|
3495
3508
|
gt();
|
|
3496
3509
|
}, 10);
|
|
3497
3510
|
});
|
|
@@ -3522,7 +3535,7 @@ const Ce = /* @__PURE__ */ te({
|
|
|
3522
3535
|
}, null)])])]) : null;
|
|
3523
3536
|
}
|
|
3524
3537
|
return () => w("div", {
|
|
3525
|
-
class:
|
|
3538
|
+
class: G.value
|
|
3526
3539
|
}, [w("div", {
|
|
3527
3540
|
class: "farris-timer-picker"
|
|
3528
3541
|
}, [w("div", {
|
|
@@ -3558,7 +3571,7 @@ const Ce = /* @__PURE__ */ te({
|
|
|
3558
3571
|
}
|
|
3559
3572
|
}), K = /* @__PURE__ */ te({
|
|
3560
3573
|
name: "FTimePicker",
|
|
3561
|
-
props:
|
|
3574
|
+
props: De,
|
|
3562
3575
|
emits: ["update:modelValue", "valueChange", "clear"],
|
|
3563
3576
|
setup(t, n) {
|
|
3564
3577
|
const e = '<span class="f-icon f-icon-timepicker"></span>', r = x(t.modelValue), o = x(null), a = x(), i = I(() => ft(t.format, t.use12Hours));
|
|
@@ -3577,9 +3590,9 @@ const Ce = /* @__PURE__ */ te({
|
|
|
3577
3590
|
function d(s) {
|
|
3578
3591
|
r.value = s.text;
|
|
3579
3592
|
}
|
|
3580
|
-
return p(),
|
|
3593
|
+
return p(), $(() => t.modelValue, (s) => {
|
|
3581
3594
|
r.value = s;
|
|
3582
|
-
}),
|
|
3595
|
+
}), $(r, (s) => {
|
|
3583
3596
|
n.emit("valueChange", s), n.emit("update:modelValue", s);
|
|
3584
3597
|
}), () => w(Ft, {
|
|
3585
3598
|
ref: o,
|
|
@@ -3601,13 +3614,13 @@ const Ce = /* @__PURE__ */ te({
|
|
|
3601
3614
|
}), null)]
|
|
3602
3615
|
});
|
|
3603
3616
|
}
|
|
3604
|
-
}),
|
|
3617
|
+
}), uo = /* @__PURE__ */ new Map([
|
|
3605
3618
|
["appearance", Vt]
|
|
3606
3619
|
]);
|
|
3607
|
-
function
|
|
3620
|
+
function lo(t, n, e) {
|
|
3608
3621
|
return n;
|
|
3609
3622
|
}
|
|
3610
|
-
const
|
|
3623
|
+
const co = "https://json-schema.org/draft/2020-12/schema", fo = "https://farris-design.gitee.io/button-edit.schema.json", po = "button-edit", mo = "A Farris Input Component", ho = "object", yo = {
|
|
3611
3624
|
id: {
|
|
3612
3625
|
description: "The unique identifier for a Input Group",
|
|
3613
3626
|
type: "string"
|
|
@@ -3791,18 +3804,18 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
3791
3804
|
type: "string",
|
|
3792
3805
|
default: ""
|
|
3793
3806
|
}
|
|
3794
|
-
},
|
|
3807
|
+
}, go = [
|
|
3795
3808
|
"id",
|
|
3796
3809
|
"type"
|
|
3797
|
-
],
|
|
3798
|
-
$schema:
|
|
3799
|
-
$id:
|
|
3800
|
-
title:
|
|
3801
|
-
description:
|
|
3802
|
-
type:
|
|
3803
|
-
properties:
|
|
3804
|
-
required:
|
|
3805
|
-
},
|
|
3810
|
+
], bo = {
|
|
3811
|
+
$schema: co,
|
|
3812
|
+
$id: fo,
|
|
3813
|
+
title: po,
|
|
3814
|
+
description: mo,
|
|
3815
|
+
type: ho,
|
|
3816
|
+
properties: yo,
|
|
3817
|
+
required: go
|
|
3818
|
+
}, wo = "buttonEdit", vo = "A Farris Component", xo = "object", Mo = {
|
|
3806
3819
|
basic: {
|
|
3807
3820
|
description: "Basic Infomation",
|
|
3808
3821
|
title: "基本信息",
|
|
@@ -3884,12 +3897,12 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
3884
3897
|
}
|
|
3885
3898
|
}
|
|
3886
3899
|
}
|
|
3887
|
-
},
|
|
3888
|
-
title:
|
|
3889
|
-
description:
|
|
3890
|
-
type:
|
|
3891
|
-
categories:
|
|
3892
|
-
},
|
|
3900
|
+
}, ko = {
|
|
3901
|
+
title: wo,
|
|
3902
|
+
description: vo,
|
|
3903
|
+
type: xo,
|
|
3904
|
+
categories: Mo
|
|
3905
|
+
}, Fe = {
|
|
3893
3906
|
/**
|
|
3894
3907
|
* 组件标识
|
|
3895
3908
|
*/
|
|
@@ -3997,13 +4010,13 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
3997
4010
|
beforeOpen: { type: Function, default: null },
|
|
3998
4011
|
/** 更新方式 blur | change */
|
|
3999
4012
|
updateOn: { type: String, default: "change" }
|
|
4000
|
-
}, pt = Ue(
|
|
4013
|
+
}, pt = Ue(Fe, bo, uo, lo, ko), Co = {
|
|
4001
4014
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
4002
4015
|
host: { type: Object },
|
|
4003
4016
|
backgroundColor: { type: String, default: "" }
|
|
4004
|
-
},
|
|
4017
|
+
}, To = /* @__PURE__ */ te({
|
|
4005
4018
|
name: "FOverlay",
|
|
4006
|
-
props:
|
|
4019
|
+
props: Co,
|
|
4007
4020
|
emits: ["click"],
|
|
4008
4021
|
setup(t, n) {
|
|
4009
4022
|
const e = x(t.popupContentPosition), r = x(t.host), o = I(() => ({
|
|
@@ -4049,13 +4062,13 @@ const lo = "https://json-schema.org/draft/2020-12/schema", co = "https://farris-
|
|
|
4049
4062
|
});
|
|
4050
4063
|
}
|
|
4051
4064
|
});
|
|
4052
|
-
function
|
|
4065
|
+
function Po(t) {
|
|
4053
4066
|
if (t.content && t.content.render)
|
|
4054
4067
|
return t.content.render;
|
|
4055
4068
|
if (t.render && typeof t.render == "function")
|
|
4056
4069
|
return t.render;
|
|
4057
4070
|
}
|
|
4058
|
-
function
|
|
4071
|
+
function Oo(t) {
|
|
4059
4072
|
const n = document.createElement("div");
|
|
4060
4073
|
n.style.display = "contents";
|
|
4061
4074
|
let e;
|
|
@@ -4068,8 +4081,8 @@ function Po(t) {
|
|
|
4068
4081
|
Ot(() => {
|
|
4069
4082
|
document.body.removeChild(n);
|
|
4070
4083
|
});
|
|
4071
|
-
const a =
|
|
4072
|
-
return () => w(
|
|
4084
|
+
const a = Po(t);
|
|
4085
|
+
return () => w(To, {
|
|
4073
4086
|
"popup-content-position": t.popupPosition,
|
|
4074
4087
|
host: t.host,
|
|
4075
4088
|
onClick: o,
|
|
@@ -4080,12 +4093,12 @@ function Po(t) {
|
|
|
4080
4093
|
}
|
|
4081
4094
|
}), document.body.appendChild(n), e.mount(n), e;
|
|
4082
4095
|
}
|
|
4083
|
-
class
|
|
4096
|
+
class Do {
|
|
4084
4097
|
static show(n) {
|
|
4085
|
-
return
|
|
4098
|
+
return Oo(n);
|
|
4086
4099
|
}
|
|
4087
4100
|
}
|
|
4088
|
-
const
|
|
4101
|
+
const Ho = Symbol("FModalService");
|
|
4089
4102
|
function mt(t, n) {
|
|
4090
4103
|
function e() {
|
|
4091
4104
|
const r = t.beforeOpen || t.beforeClickButton || null;
|
|
@@ -4104,7 +4117,7 @@ function ht(t, n, e, r, o) {
|
|
|
4104
4117
|
const a = x(t.buttonBehavior), i = x(t.popupOnInput), u = I(() => ({
|
|
4105
4118
|
"input-group-append": !0,
|
|
4106
4119
|
"append-force-show": t.showButtonWhenDisabled && (t.readonly || t.disable)
|
|
4107
|
-
})), { judgeCanOpen: p } = mt(t, o), c = I(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = me(
|
|
4120
|
+
})), { judgeCanOpen: p } = mt(t, o), c = I(() => t.showButtonWhenDisabled || (!t.editable || !t.readonly) && !t.disable), d = me(Ho, null), s = x();
|
|
4108
4121
|
async function l(g) {
|
|
4109
4122
|
if (await p() && c.value) {
|
|
4110
4123
|
const P = !!n.slots.default;
|
|
@@ -4115,7 +4128,7 @@ function ht(t, n, e, r, o) {
|
|
|
4115
4128
|
});
|
|
4116
4129
|
s.value = D == null ? void 0 : D.modalRef;
|
|
4117
4130
|
}
|
|
4118
|
-
a.value === "Overlay" &&
|
|
4131
|
+
a.value === "Overlay" && Do.show({
|
|
4119
4132
|
// host: buttonEditRef.value,
|
|
4120
4133
|
host: document.body,
|
|
4121
4134
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
@@ -4137,12 +4150,12 @@ function ht(t, n, e, r, o) {
|
|
|
4137
4150
|
modalRef: s
|
|
4138
4151
|
};
|
|
4139
4152
|
}
|
|
4140
|
-
function
|
|
4153
|
+
function Eo(t, n, e, r, o, a) {
|
|
4141
4154
|
const i = x(!1), u = I(() => t.enableClear && !t.readonly && !t.disable), { changeTextBoxValue: p } = a;
|
|
4142
4155
|
function c(m) {
|
|
4143
4156
|
i.value = m;
|
|
4144
4157
|
}
|
|
4145
|
-
|
|
4158
|
+
$(o, () => {
|
|
4146
4159
|
c(!!o.value);
|
|
4147
4160
|
});
|
|
4148
4161
|
function d(m) {
|
|
@@ -4169,7 +4182,7 @@ function Ho(t, n, e, r, o, a) {
|
|
|
4169
4182
|
onMouseLeaveTextBox: l
|
|
4170
4183
|
};
|
|
4171
4184
|
}
|
|
4172
|
-
function
|
|
4185
|
+
function Bo(t, n, e, r, o) {
|
|
4173
4186
|
const a = I(() => t.popupOnInput), i = I(() => t.popupOnFocus), { shouldPopupContent: u } = o, p = I(() => t.enableTitle ? e.value : ""), c = I(() => (t.disable || t.readonly) && !t.forcePlaceholder ? "" : t.placeholder), d = I(() => t.readonly || !t.editable), s = x(!1), l = I(() => !t.disable && s.value), m = I(() => ({
|
|
4174
4187
|
"text-left": t.textAlign === "left",
|
|
4175
4188
|
"text-center": t.textAlign === "center",
|
|
@@ -4183,13 +4196,13 @@ function Eo(t, n, e, r, o) {
|
|
|
4183
4196
|
"f-state-readonly": t.readonly && !t.disable,
|
|
4184
4197
|
"f-state-focus": l.value
|
|
4185
4198
|
}));
|
|
4186
|
-
function g(C,
|
|
4187
|
-
e.value !== C && (e.value = C,
|
|
4199
|
+
function g(C, G = !0) {
|
|
4200
|
+
e.value !== C && (e.value = C, G && (n.emit("change", C), n.emit("update:modelValue", C)));
|
|
4188
4201
|
}
|
|
4189
4202
|
function P(C) {
|
|
4190
4203
|
u.value = !1, g(C, !0);
|
|
4191
4204
|
}
|
|
4192
|
-
|
|
4205
|
+
$(
|
|
4193
4206
|
() => t.modelValue,
|
|
4194
4207
|
(C) => {
|
|
4195
4208
|
e.value = C;
|
|
@@ -4206,8 +4219,8 @@ function Eo(t, n, e, r, o) {
|
|
|
4206
4219
|
}
|
|
4207
4220
|
function k(C) {
|
|
4208
4221
|
n.emit("input", C.target.value);
|
|
4209
|
-
const
|
|
4210
|
-
r.value =
|
|
4222
|
+
const G = C.target.value;
|
|
4223
|
+
r.value = G, e.value !== G && g(G, t.updateOn === "change"), a.value && !u.value && o.popup();
|
|
4211
4224
|
}
|
|
4212
4225
|
function v(C) {
|
|
4213
4226
|
C.target.tagName !== "INPUT" && C.preventDefault(), C.stopPropagation();
|
|
@@ -4219,8 +4232,8 @@ function Eo(t, n, e, r, o) {
|
|
|
4219
4232
|
C.key === "Enter" && (a.value || i.value) && o.hidePopup(), n.emit("keyup", C);
|
|
4220
4233
|
}
|
|
4221
4234
|
function L(C) {
|
|
4222
|
-
const
|
|
4223
|
-
C.stopPropagation(), g(
|
|
4235
|
+
const G = C.target.value;
|
|
4236
|
+
C.stopPropagation(), g(G);
|
|
4224
4237
|
}
|
|
4225
4238
|
return {
|
|
4226
4239
|
hasFocusedTextBox: l,
|
|
@@ -4251,14 +4264,14 @@ function yt(t, n, e, r) {
|
|
|
4251
4264
|
if (!!n.slots.default) {
|
|
4252
4265
|
if (!s && !a.value && !await i())
|
|
4253
4266
|
return;
|
|
4254
|
-
a.value = !a.value, await
|
|
4267
|
+
a.value = !a.value, await Ie(), u();
|
|
4255
4268
|
}
|
|
4256
4269
|
}
|
|
4257
4270
|
async function c(s = !1) {
|
|
4258
4271
|
if (!!n.slots.default) {
|
|
4259
4272
|
if (!s && !await i())
|
|
4260
4273
|
return;
|
|
4261
|
-
a.value = !0, await
|
|
4274
|
+
a.value = !0, await Ie(), u();
|
|
4262
4275
|
}
|
|
4263
4276
|
}
|
|
4264
4277
|
function d() {
|
|
@@ -4266,7 +4279,7 @@ function yt(t, n, e, r) {
|
|
|
4266
4279
|
}
|
|
4267
4280
|
return { hidePopup: d, popup: c, shouldPopupContent: a, togglePopup: p, popoverRef: o };
|
|
4268
4281
|
}
|
|
4269
|
-
function
|
|
4282
|
+
function Fo(t, n, e) {
|
|
4270
4283
|
const r = x(), {
|
|
4271
4284
|
isTextBoxReadonly: o,
|
|
4272
4285
|
textBoxClass: a,
|
|
@@ -4308,7 +4321,7 @@ function Bo(t, n, e) {
|
|
|
4308
4321
|
onMousedown: h
|
|
4309
4322
|
}, null);
|
|
4310
4323
|
}
|
|
4311
|
-
function
|
|
4324
|
+
function Vo(t, n, e) {
|
|
4312
4325
|
const r = x(t.separator), {
|
|
4313
4326
|
changeTextBoxValue: o
|
|
4314
4327
|
} = e, a = I(() => n.value ? n.value.split(r.value).map((u) => ({
|
|
@@ -4327,7 +4340,7 @@ function Fo(t, n, e) {
|
|
|
4327
4340
|
onChange: i
|
|
4328
4341
|
}, null);
|
|
4329
4342
|
}
|
|
4330
|
-
function
|
|
4343
|
+
function So(t, n, e, r) {
|
|
4331
4344
|
const {
|
|
4332
4345
|
buttonGroupClass: o,
|
|
4333
4346
|
onClickButton: a,
|
|
@@ -4363,7 +4376,7 @@ function Vo(t, n, e, r) {
|
|
|
4363
4376
|
buttonHandleElement: s
|
|
4364
4377
|
};
|
|
4365
4378
|
}
|
|
4366
|
-
function
|
|
4379
|
+
function Io(t, n, e) {
|
|
4367
4380
|
const r = x(t.popupMinWidth), {
|
|
4368
4381
|
hidePopup: o,
|
|
4369
4382
|
popoverRef: a
|
|
@@ -4389,18 +4402,18 @@ function So(t, n, e) {
|
|
|
4389
4402
|
}
|
|
4390
4403
|
const le = /* @__PURE__ */ te({
|
|
4391
4404
|
name: "FButtonEdit",
|
|
4392
|
-
props:
|
|
4405
|
+
props: Fe,
|
|
4393
4406
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4394
4407
|
setup(t, n) {
|
|
4395
4408
|
const e = x(), r = x(t.customClass), o = x(t.modelValue), a = yt(t, n, e, o), {
|
|
4396
4409
|
shouldPopupContent: i,
|
|
4397
4410
|
hidePopup: u,
|
|
4398
4411
|
togglePopup: p
|
|
4399
|
-
} = a, c = ht(t, n, e, a, o), d = x(""), s =
|
|
4412
|
+
} = a, c = ht(t, n, e, a, o), d = x(""), s = Bo(t, n, o, d, a), {
|
|
4400
4413
|
hasFocusedTextBox: l,
|
|
4401
4414
|
commitValue: m,
|
|
4402
4415
|
inputGroupClass: h
|
|
4403
|
-
} = s, g =
|
|
4416
|
+
} = s, g = Eo(t, n, o, l, d, s), {
|
|
4404
4417
|
onMouseEnterTextBox: P,
|
|
4405
4418
|
onMouseLeaveTextBox: O
|
|
4406
4419
|
} = g, D = I(() => {
|
|
@@ -4409,19 +4422,19 @@ const le = /* @__PURE__ */ te({
|
|
|
4409
4422
|
"f-cmp-inputgroup": !0,
|
|
4410
4423
|
"f-button-edit-nowrap": !t.wrapText
|
|
4411
4424
|
};
|
|
4412
|
-
return r.value && r.value.split(" ").reduce((
|
|
4425
|
+
return r.value && r.value.split(" ").reduce((G, de) => (G[de] = !0, G), C), C;
|
|
4413
4426
|
});
|
|
4414
4427
|
function b() {
|
|
4415
|
-
return t.multiSelect && t.inputType === "tag" ?
|
|
4428
|
+
return t.multiSelect && t.inputType === "tag" ? Vo(t, o, s) : Fo(t, o, s);
|
|
4416
4429
|
}
|
|
4417
4430
|
let k = b();
|
|
4418
|
-
|
|
4431
|
+
$([() => t.multiSelect, () => t.inputType], () => {
|
|
4419
4432
|
k = b();
|
|
4420
4433
|
});
|
|
4421
4434
|
const {
|
|
4422
4435
|
renderButtonGroup: v,
|
|
4423
4436
|
buttonHandleElement: E
|
|
4424
|
-
} =
|
|
4437
|
+
} = So(t, n, c, g), F = Io(t, n, a), L = {
|
|
4425
4438
|
commitValue: m,
|
|
4426
4439
|
elementRef: e,
|
|
4427
4440
|
hidePopup: u,
|
|
@@ -4451,7 +4464,7 @@ const le = /* @__PURE__ */ te({
|
|
|
4451
4464
|
}, [k(), v()])]), i.value && F()]);
|
|
4452
4465
|
}
|
|
4453
4466
|
});
|
|
4454
|
-
function
|
|
4467
|
+
function No(t, n, e) {
|
|
4455
4468
|
const {
|
|
4456
4469
|
buttonGroupClass: r
|
|
4457
4470
|
} = e, o = x();
|
|
@@ -4469,9 +4482,9 @@ function Io(t, n, e) {
|
|
|
4469
4482
|
buttonHandleElement: o
|
|
4470
4483
|
};
|
|
4471
4484
|
}
|
|
4472
|
-
const
|
|
4485
|
+
const Lo = /* @__PURE__ */ te({
|
|
4473
4486
|
name: "FButtonEdit",
|
|
4474
|
-
props:
|
|
4487
|
+
props: Fe,
|
|
4475
4488
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
4476
4489
|
setup(t, n) {
|
|
4477
4490
|
const e = x(), r = me("design-item-context"), o = Nt(e, r), a = x(t.customClass), i = x(t.modelValue), u = yt(t, n, e, i), p = ht(t, n, e, u, i), c = x(), d = I(() => ({
|
|
@@ -4493,7 +4506,7 @@ const No = /* @__PURE__ */ te({
|
|
|
4493
4506
|
return a.value && a.value.split(" ").reduce((h, g) => (h[g] = !0, h), m), m;
|
|
4494
4507
|
}), {
|
|
4495
4508
|
renderButtonGroup: l
|
|
4496
|
-
} =
|
|
4509
|
+
} = No(t, n, p);
|
|
4497
4510
|
return () => w("div", Te(n.attrs, {
|
|
4498
4511
|
ref: e,
|
|
4499
4512
|
class: s.value,
|
|
@@ -4512,10 +4525,10 @@ le.register = (t, n, e, r) => {
|
|
|
4512
4525
|
t["button-edit"] = le, n["button-edit"] = pt;
|
|
4513
4526
|
};
|
|
4514
4527
|
le.registerDesigner = (t, n, e) => {
|
|
4515
|
-
t["button-edit"] =
|
|
4528
|
+
t["button-edit"] = Lo, n["button-edit"] = pt;
|
|
4516
4529
|
};
|
|
4517
4530
|
Lt(le);
|
|
4518
|
-
function
|
|
4531
|
+
function Wo(t, n, e) {
|
|
4519
4532
|
var k;
|
|
4520
4533
|
const r = e && e.getStyles && e.getStyles() || "", o = e && e.getDesignerClass && e.getDesignerClass() || "", a = x();
|
|
4521
4534
|
function i() {
|
|
@@ -4600,7 +4613,7 @@ function Lo(t, n, e) {
|
|
|
4600
4613
|
onRemoveComponent: b
|
|
4601
4614
|
}, a;
|
|
4602
4615
|
}
|
|
4603
|
-
class
|
|
4616
|
+
class qo {
|
|
4604
4617
|
constructor(n, e) {
|
|
4605
4618
|
f(this, "componentId");
|
|
4606
4619
|
f(this, "viewModelId");
|
|
@@ -4692,7 +4705,7 @@ class Wo {
|
|
|
4692
4705
|
const r = e && e.parent && e.parent.schema;
|
|
4693
4706
|
if (!r)
|
|
4694
4707
|
return;
|
|
4695
|
-
const o = r.contents.findIndex((i) => i.id === n), a =
|
|
4708
|
+
const o = r.contents.findIndex((i) => i.id === n), a = Pe(r.contents[o]);
|
|
4696
4709
|
r.contents.splice(o, 1), r.contents.splice(o, 0, a);
|
|
4697
4710
|
}
|
|
4698
4711
|
}
|
|
@@ -4768,7 +4781,7 @@ f(Z, "fieldControlTypeMapping", {
|
|
|
4768
4781
|
});
|
|
4769
4782
|
let ge = Z;
|
|
4770
4783
|
const Yo = x(0);
|
|
4771
|
-
class
|
|
4784
|
+
class Ao {
|
|
4772
4785
|
constructor() {
|
|
4773
4786
|
/** 控件标题 */
|
|
4774
4787
|
f(this, "label", "");
|
|
@@ -4798,7 +4811,7 @@ class qo {
|
|
|
4798
4811
|
f(this, "fieldSetId", "");
|
|
4799
4812
|
}
|
|
4800
4813
|
}
|
|
4801
|
-
function
|
|
4814
|
+
function _o(t) {
|
|
4802
4815
|
let n, e;
|
|
4803
4816
|
const r = /* @__PURE__ */ new Map();
|
|
4804
4817
|
let o = [];
|
|
@@ -4819,7 +4832,7 @@ function Ao(t) {
|
|
|
4819
4832
|
return;
|
|
4820
4833
|
}
|
|
4821
4834
|
h && (l += 1, h = !1);
|
|
4822
|
-
const P = g.appearance && g.appearance.class, O = new
|
|
4835
|
+
const P = g.appearance && g.appearance.class, O = new Ao();
|
|
4823
4836
|
P ? a(P, O) : O.isSupportedClass = !1, O.label = g.label || g.id, O.id = g.id, O.group = l, m && (O.fieldSetId = d.id), e === g.id && (n = l), r.set(g.id, g), s.push(O);
|
|
4824
4837
|
});
|
|
4825
4838
|
}
|
|
@@ -4827,7 +4840,7 @@ function Ao(t) {
|
|
|
4827
4840
|
const s = t.getComponentById(d);
|
|
4828
4841
|
if (!s || !s.componentType || !s.componentType.startsWith("form"))
|
|
4829
4842
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
4830
|
-
const l = t.selectNode(s, (m) => m.type ===
|
|
4843
|
+
const l = t.selectNode(s, (m) => m.type === Le["response-form"].type);
|
|
4831
4844
|
return !l || !l.contents || l.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: l };
|
|
4832
4845
|
}
|
|
4833
4846
|
function p(d, s) {
|
|
@@ -4836,7 +4849,7 @@ function Ao(t) {
|
|
|
4836
4849
|
if (!l)
|
|
4837
4850
|
return { result: l, message: m };
|
|
4838
4851
|
e = d.id, o = [], r.clear();
|
|
4839
|
-
const g = h.contents[0].type ===
|
|
4852
|
+
const g = h.contents[0].type === Le.fieldset.type ? 0 : 1;
|
|
4840
4853
|
i(h, o, g);
|
|
4841
4854
|
const P = o.find((D) => !D.isSupportedClass);
|
|
4842
4855
|
return {
|
|
@@ -4857,7 +4870,7 @@ function Ao(t) {
|
|
|
4857
4870
|
var D;
|
|
4858
4871
|
const P = r.get(g.id), O = P.appearance && P.appearance.class;
|
|
4859
4872
|
if (O) {
|
|
4860
|
-
const k = O.split(" ").filter((
|
|
4873
|
+
const k = O.split(" ").filter((G) => !G.startsWith("col-")), v = "col-" + g.columnInSM, E = "col-md-" + g.columnInMD, F = "col-xl-" + g.columnInLG, L = "col-el-" + g.columnInEL, C = [v, E, F, L].concat(k);
|
|
4861
4874
|
P.appearance.class = C.join(" ");
|
|
4862
4875
|
}
|
|
4863
4876
|
if (g.fieldSetId) {
|
|
@@ -4874,11 +4887,11 @@ function Ao(t) {
|
|
|
4874
4887
|
getResonseFormLayoutConfig: i
|
|
4875
4888
|
};
|
|
4876
4889
|
}
|
|
4877
|
-
class
|
|
4890
|
+
class $o extends qo {
|
|
4878
4891
|
constructor(e, r) {
|
|
4879
4892
|
super(e, r);
|
|
4880
4893
|
f(this, "responseLayoutEditorFunction");
|
|
4881
|
-
this.responseLayoutEditorFunction =
|
|
4894
|
+
this.responseLayoutEditorFunction = _o(this.formSchemaUtils);
|
|
4882
4895
|
}
|
|
4883
4896
|
getPropertyConfig(e, r) {
|
|
4884
4897
|
return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
@@ -4886,7 +4899,7 @@ class _o extends Wo {
|
|
|
4886
4899
|
getBasicProperties(e, r) {
|
|
4887
4900
|
var a;
|
|
4888
4901
|
const o = this;
|
|
4889
|
-
return this.setDesignViewModelField(e),
|
|
4902
|
+
return this.setDesignViewModelField(e), {
|
|
4890
4903
|
description: "Basic Information",
|
|
4891
4904
|
title: "基本信息",
|
|
4892
4905
|
properties: {
|
|
@@ -5109,7 +5122,7 @@ class _o extends Wo {
|
|
|
5109
5122
|
return Array.from(r).length === 1;
|
|
5110
5123
|
}
|
|
5111
5124
|
}
|
|
5112
|
-
class Go extends
|
|
5125
|
+
class Go extends $o {
|
|
5113
5126
|
constructor(n, e) {
|
|
5114
5127
|
super(n, e);
|
|
5115
5128
|
}
|
|
@@ -5149,19 +5162,19 @@ class Go extends _o {
|
|
|
5149
5162
|
});
|
|
5150
5163
|
}
|
|
5151
5164
|
}
|
|
5152
|
-
function
|
|
5165
|
+
function jo(t, n) {
|
|
5153
5166
|
const e = t.schema;
|
|
5154
5167
|
function r(o, a) {
|
|
5155
5168
|
return new Go(o, n).getPropertyConfig(e, a);
|
|
5156
5169
|
}
|
|
5157
5170
|
return { getPropsConfig: r };
|
|
5158
5171
|
}
|
|
5159
|
-
const
|
|
5172
|
+
const Ro = /* @__PURE__ */ te({
|
|
5160
5173
|
name: "FTimePickerDesign",
|
|
5161
|
-
props:
|
|
5174
|
+
props: De,
|
|
5162
5175
|
emits: ["datePicked", "update:modelValue"],
|
|
5163
5176
|
setup(t, n) {
|
|
5164
|
-
const e = '<span class="f-icon f-icon-timepicker"></span>', r = x(t.modelValue), o = x(), a = x(), i = me("designer-host-service"), u = me("design-item-context"), p =
|
|
5177
|
+
const e = '<span class="f-icon f-icon-timepicker"></span>', r = x(t.modelValue), o = x(), a = x(), i = me("designer-host-service"), u = me("design-item-context"), p = jo(u, i), c = Wo(a, u, p);
|
|
5165
5178
|
ce(() => {
|
|
5166
5179
|
a.value.componentInstance = c;
|
|
5167
5180
|
}), n.expose(c.value);
|
|
@@ -5188,13 +5201,13 @@ K.register = (t, n, e, r) => {
|
|
|
5188
5201
|
t["time-picker"] = K, n["time-picker"] = Xe;
|
|
5189
5202
|
};
|
|
5190
5203
|
K.registerDesigner = (t, n, e) => {
|
|
5191
|
-
t["time-picker"] =
|
|
5204
|
+
t["time-picker"] = Ro, n["time-picker"] = Xe;
|
|
5192
5205
|
};
|
|
5193
5206
|
export {
|
|
5194
5207
|
K as FTimePicker,
|
|
5195
5208
|
Ce as FTimePickerTimeView,
|
|
5196
5209
|
K as default,
|
|
5197
5210
|
Xe as propsResolver,
|
|
5198
|
-
|
|
5199
|
-
|
|
5211
|
+
De as timePickerProps,
|
|
5212
|
+
rn as timeProps
|
|
5200
5213
|
};
|