@farris/ui-vue 1.5.7 → 1.5.8
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/avatar/index.esm.js +4 -4
- package/components/avatar/index.umd.cjs +1 -1
- package/components/component/index.esm.js +4 -4
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +4 -4
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +4 -4
- package/components/content-container/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1082 -1421
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +4 -4
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +4 -4
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +4 -4
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +4 -4
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +12 -11
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +4 -4
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +4 -4
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +4 -4
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1584 -2320
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +4 -4
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +77 -76
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/response-layout/index.esm.js +4 -4
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +500 -3662
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +3008 -7347
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/section/index.esm.js +1564 -1635
- package/components/section/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +545 -4943
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +100 -5841
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +4 -4
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/video/index.esm.js +4 -4
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +1556 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +207 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +377 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +14332 -0
- package/designer/data-grid/index.umd.cjs +20 -0
- package/designer/data-view/index.esm.js +271 -0
- package/designer/data-view/index.umd.cjs +1 -0
- package/designer/date-picker/index.esm.js +1879 -0
- package/designer/date-picker/index.umd.cjs +1 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +463 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +16815 -0
- package/designer/farris-designer.all.umd.cjs +32 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +647 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +6959 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/response-toolbar/index.esm.js +3015 -0
- package/designer/response-toolbar/index.umd.cjs +1 -0
- package/designer/tabs/index.esm.js +2200 -0
- package/designer/tabs/index.umd.cjs +1 -0
- package/designer/textarea/index.esm.js +249 -0
- package/designer/textarea/index.umd.cjs +1 -0
- package/designer/tree-grid/index.css +1 -0
- package/designer/tree-grid/index.esm.js +1673 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +57107 -57105
- package/farris.all.umd.cjs +16 -16
- package/package.json +1 -1
- package/types/date-picker/designer.d.ts +29 -0
- package/types/date-picker/index.d.ts +2 -1
- package/types/date-picker/src/date-picker.props.d.ts +0 -5
- package/types/date-picker/src/designer/date-picker.design.props.d.ts +22 -0
- package/types/response-toolbar/designer.d.ts +37 -0
- package/types/response-toolbar/index.d.ts +6 -5
- package/types/response-toolbar/src/composition/toolbar-item-dragula.d.ts +1 -2
- package/types/response-toolbar/src/composition/types.d.ts +1 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +13 -0
- package/types/response-toolbar/src/designer/use-designer-item-rules.d.ts +1 -2
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +1 -2
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.props.d.ts +0 -12
- package/types/response-toolbar/src/schema/schema-resolver.d.ts +1 -1
- package/types/tabs/designer.d.ts +28 -0
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/src/components/tab-page.props.d.ts +0 -1
- package/types/tabs/src/designer/tab-page.design.props.d.ts +1 -0
- package/types/tabs/src/designer/tabs.design.props.d.ts +12 -0
- package/types/tabs/src/tabs.props.d.ts +0 -11
- package/types/textarea/designer.d.ts +28 -0
- package/types/textarea/index.d.ts +0 -15
- package/types/textarea/src/designer/textarea.design.props.d.ts +6 -0
- package/types/textarea/src/designer/use-design-rules.d.ts +1 -2
- package/types/textarea/src/property-config/textarea.property-config.d.ts +1 -1
- package/types/textarea/src/schema/schema-resolver.d.ts +1 -1
- package/types/textarea/src/textarea.props.d.ts +0 -5
- /package/{components/textarea → designer/radio-group}/index.css +0 -0
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { FTimePickerTimeView as
|
|
4
|
-
import { FButton as
|
|
5
|
-
import { resolveAppearance as
|
|
6
|
-
import { useDateFormat as
|
|
7
|
-
import
|
|
8
|
-
import { FInputGroup as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import { InputBaseProperty as sa } from "../property-panel/index.esm.js";
|
|
12
|
-
const me = ["日", "一", "二", "三", "四", "五", "六"];
|
|
1
|
+
import { defineComponent as ee, ref as a, computed as Y, watch as G, createVNode as c, Fragment as Fe, watchEffect as Lt, onMounted as He, createTextVNode as ie, mergeProps as ue } from "vue";
|
|
2
|
+
import { cloneDeep as oe } from "lodash-es";
|
|
3
|
+
import { FTimePickerTimeView as Kt } from "../time-picker/index.esm.js";
|
|
4
|
+
import { FButton as _t } from "../button/index.esm.js";
|
|
5
|
+
import { resolveAppearance as zt, createPropsResolver as qt } from "../dynamic-resolver/index.esm.js";
|
|
6
|
+
import { useDateFormat as Pe, formatTime as Ut, getTimeObject as Xt } from "../common/index.esm.js";
|
|
7
|
+
import Gt from "../button-edit/index.esm.js";
|
|
8
|
+
import { FInputGroup as Ie } from "../input-group/index.esm.js";
|
|
9
|
+
import Jt from "../popover/index.esm.js";
|
|
10
|
+
const ce = ["日", "一", "二", "三", "四", "五", "六"];
|
|
13
11
|
var X = /* @__PURE__ */ ((e) => (e[e.previous = 1] = "previous", e[e.current = 2] = "current", e[e.next = 3] = "next", e))(X || {});
|
|
14
|
-
const
|
|
12
|
+
const Qt = {
|
|
15
13
|
dates: { Type: Array, default: [] },
|
|
16
|
-
daysInWeek: { Type: Array, default:
|
|
14
|
+
daysInWeek: { Type: Array, default: ce },
|
|
17
15
|
enableKeyboadNavigate: { Type: Boolean, default: !0 },
|
|
18
16
|
enableMarkCurrent: { Type: Boolean, default: !0 },
|
|
19
17
|
enablePeriod: { Type: Boolean, default: !1 },
|
|
@@ -26,311 +24,311 @@ const ia = {
|
|
|
26
24
|
weekTitle: { Type: String, default: "Week" }
|
|
27
25
|
};
|
|
28
26
|
var J = /* @__PURE__ */ ((e) => (e[e.enter = 13] = "enter", e[e.esc = 27] = "esc", e[e.space = 32] = "space", e[e.leftArrow = 37] = "leftArrow", e[e.upArrow = 38] = "upArrow", e[e.rightArrow = 39] = "rightArrow", e[e.downArrow = 40] = "downArrow", e[e.tab = 9] = "tab", e[e.shift = 16] = "shift", e))(J || {});
|
|
29
|
-
function
|
|
30
|
-
function e(
|
|
31
|
-
const
|
|
32
|
-
return
|
|
27
|
+
function Te() {
|
|
28
|
+
function e(r) {
|
|
29
|
+
const i = r.key || r.keyCode;
|
|
30
|
+
return i === "Enter" || i === 13 ? 13 : i === "Escape" || i === 27 ? 27 : i === " " || i === 32 ? 32 : i === "ArrowLeft" || i === 37 ? 37 : i === "ArrowUp" || i === 38 ? 38 : i === "ArrowRight" || i === 39 ? 39 : i === "ArrowDown" || i === 40 ? 40 : i === "Tab" || i === 9 ? 9 : i === "Shift" || i === 16 ? 16 : -1;
|
|
33
31
|
}
|
|
34
32
|
return { getKeyCodeFromEvent: e };
|
|
35
33
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return e instanceof Date || typeof e == "object" &&
|
|
34
|
+
function Zt(e) {
|
|
35
|
+
const r = Object.prototype.toString.call(e);
|
|
36
|
+
return e instanceof Date || typeof e == "object" && r === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || r === "[object Number]" || typeof e == "string" || r === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
|
|
39
37
|
}
|
|
40
|
-
function
|
|
38
|
+
function ea(e) {
|
|
41
39
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
42
40
|
}
|
|
43
|
-
function
|
|
44
|
-
if (!
|
|
41
|
+
function ta(e) {
|
|
42
|
+
if (!ea(e) && typeof e != "number")
|
|
45
43
|
return !1;
|
|
46
|
-
const
|
|
47
|
-
return !isNaN(Number(
|
|
44
|
+
const r = Zt(e);
|
|
45
|
+
return !isNaN(Number(r));
|
|
48
46
|
}
|
|
49
|
-
function
|
|
47
|
+
function Z() {
|
|
50
48
|
function e() {
|
|
51
49
|
return { year: 0, month: 0, day: 0 };
|
|
52
50
|
}
|
|
53
|
-
function t
|
|
51
|
+
function r(t) {
|
|
54
52
|
return new Date(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
t.year || 0,
|
|
54
|
+
t.month ? t.month - 1 : 0,
|
|
55
|
+
t.day || 0,
|
|
56
|
+
t.hour ? t.hour : 0,
|
|
57
|
+
t.minute ? t.minute : 0,
|
|
58
|
+
t.second ? t.second : 0,
|
|
61
59
|
0
|
|
62
60
|
);
|
|
63
61
|
}
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
function i(t) {
|
|
63
|
+
const l = /* @__PURE__ */ new Date();
|
|
64
|
+
return t.year || (t.year = l.getFullYear()), t.month || (t.month = l.getMonth() + 1), t.day || (t.day = 1), new Date(
|
|
65
|
+
t.year,
|
|
66
|
+
t.month - 1,
|
|
67
|
+
t.day,
|
|
68
|
+
t.hour ? t.hour : 0,
|
|
69
|
+
t.minute ? t.minute : 0,
|
|
70
|
+
t.second ? t.second : 0,
|
|
73
71
|
0
|
|
74
72
|
);
|
|
75
73
|
}
|
|
76
|
-
function
|
|
74
|
+
function p(t) {
|
|
77
75
|
return new Date(
|
|
78
|
-
|
|
79
|
-
(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
t.year || 1,
|
|
77
|
+
(t.month || 1) - 1,
|
|
78
|
+
t.day,
|
|
79
|
+
t.hour ? t.hour : 0,
|
|
80
|
+
t.minute ? t.minute : 0,
|
|
81
|
+
t.second ? t.second : 0,
|
|
84
82
|
0
|
|
85
83
|
).getDay();
|
|
86
84
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
85
|
+
function u(t) {
|
|
86
|
+
return ce.indexOf(t);
|
|
89
87
|
}
|
|
90
|
-
function f(
|
|
91
|
-
return t
|
|
88
|
+
function f(t) {
|
|
89
|
+
return r(t).getTime();
|
|
92
90
|
}
|
|
93
|
-
function
|
|
94
|
-
return Math.round(f(
|
|
91
|
+
function B(t) {
|
|
92
|
+
return Math.round(f(t) / 1e3);
|
|
95
93
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
return
|
|
94
|
+
function k(t, l, P) {
|
|
95
|
+
const v = f(l), h = f(P), m = f(t);
|
|
96
|
+
return h - m > m - v ? l : P;
|
|
99
97
|
}
|
|
100
|
-
function
|
|
101
|
-
const
|
|
98
|
+
function b() {
|
|
99
|
+
const t = /* @__PURE__ */ new Date();
|
|
102
100
|
return {
|
|
103
|
-
year:
|
|
104
|
-
month:
|
|
105
|
-
day:
|
|
106
|
-
hour:
|
|
107
|
-
minute:
|
|
108
|
-
second:
|
|
101
|
+
year: t.getFullYear(),
|
|
102
|
+
month: t.getMonth() + 1,
|
|
103
|
+
day: t.getDate(),
|
|
104
|
+
hour: t.getHours(),
|
|
105
|
+
minute: t.getMinutes(),
|
|
106
|
+
second: t.getSeconds()
|
|
109
107
|
};
|
|
110
108
|
}
|
|
111
|
-
function
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
for (let
|
|
118
|
-
I[
|
|
109
|
+
function M(t, l) {
|
|
110
|
+
const P = l.match(/[^(DdMmYy)]{1,}/g), v = {};
|
|
111
|
+
if (P) {
|
|
112
|
+
let h = P[0];
|
|
113
|
+
P[0] !== P[1] && (h = P[0] + P[1], P[2] && P[1] !== P[2] && (h += P[2]));
|
|
114
|
+
const m = new RegExp("[" + h + "]"), F = t.split(m), I = l.split(m);
|
|
115
|
+
for (let D = 0; D < I.length; D++)
|
|
116
|
+
I[D].indexOf("yyyy") !== -1 && (v.year = Number(F[D])), I[D].indexOf("M") !== -1 && (v.month = Number(F[D] || "1")), I[D].indexOf("d") !== -1 && (v.day = Number(F[D] || "1"));
|
|
119
117
|
} else {
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
const I =
|
|
123
|
-
|
|
118
|
+
const h = (l + "").indexOf("yyyy"), m = (l + "").indexOf("MM"), F = (l + "").indexOf("dd");
|
|
119
|
+
if (h >= 0) {
|
|
120
|
+
const I = t.substring(h, h + 4);
|
|
121
|
+
v.year = Number(I);
|
|
124
122
|
}
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
return
|
|
128
|
-
}
|
|
129
|
-
function
|
|
130
|
-
const
|
|
131
|
-
let
|
|
132
|
-
return
|
|
133
|
-
year:
|
|
134
|
-
month:
|
|
135
|
-
day:
|
|
136
|
-
hour:
|
|
137
|
-
minute:
|
|
138
|
-
second:
|
|
123
|
+
m >= 0 && (v.month = Number(t.substring(m, m + 2) || "1")), F >= 0 && (v.day = Number(t.substring(F, F + 2) || "01"));
|
|
124
|
+
}
|
|
125
|
+
return v.year === void 0 && (v.year = b().year), v;
|
|
126
|
+
}
|
|
127
|
+
function g(t, l = !0) {
|
|
128
|
+
const P = new Date(1900, 1, 1, 0, 0, 0), v = new Date(9999, 12, 31, 23, 59, 59), h = l ? P : v;
|
|
129
|
+
let m;
|
|
130
|
+
return t instanceof Date ? m = t : typeof t == "string" ? m = t.trim() ? new Date(t) : h : m = h, ta(m) || (m = h), {
|
|
131
|
+
year: m.getFullYear(),
|
|
132
|
+
month: m.getMonth() + 1,
|
|
133
|
+
day: m.getDate(),
|
|
134
|
+
hour: m.getHours(),
|
|
135
|
+
minute: m.getMinutes(),
|
|
136
|
+
second: m.getSeconds()
|
|
139
137
|
};
|
|
140
138
|
}
|
|
141
|
-
function o(
|
|
142
|
-
return
|
|
139
|
+
function o(t) {
|
|
140
|
+
return g(t, !0);
|
|
143
141
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
142
|
+
function d(t) {
|
|
143
|
+
return g(t, !1);
|
|
146
144
|
}
|
|
147
145
|
return {
|
|
148
146
|
emptyDate: e,
|
|
149
|
-
getDate:
|
|
150
|
-
getDate2:
|
|
151
|
-
getDayNumber:
|
|
152
|
-
getEpocTime:
|
|
153
|
-
getNearDate:
|
|
154
|
-
getWeekdayIndex:
|
|
147
|
+
getDate: r,
|
|
148
|
+
getDate2: i,
|
|
149
|
+
getDayNumber: p,
|
|
150
|
+
getEpocTime: B,
|
|
151
|
+
getNearDate: k,
|
|
152
|
+
getWeekdayIndex: u,
|
|
155
153
|
getTimeInMilliseconds: f,
|
|
156
|
-
getToday:
|
|
157
|
-
getDateObject:
|
|
154
|
+
getToday: b,
|
|
155
|
+
getDateObject: M,
|
|
158
156
|
getMinDate: o,
|
|
159
|
-
getMaxDate:
|
|
157
|
+
getMaxDate: d
|
|
160
158
|
};
|
|
161
159
|
}
|
|
162
|
-
function
|
|
163
|
-
const { getTimeInMilliseconds: e } =
|
|
164
|
-
function
|
|
160
|
+
function re() {
|
|
161
|
+
const { getTimeInMilliseconds: e } = Z();
|
|
162
|
+
function r(o) {
|
|
165
163
|
return o && o.year !== 0 && o.month !== 0 && o.day !== 0;
|
|
166
164
|
}
|
|
167
|
-
function
|
|
165
|
+
function i(o) {
|
|
168
166
|
return o && o.year !== 0 && o.month !== 0;
|
|
169
167
|
}
|
|
170
|
-
function
|
|
168
|
+
function p(o) {
|
|
171
169
|
return o && o.year !== 0;
|
|
172
170
|
}
|
|
173
|
-
function
|
|
174
|
-
return e(o) < e(
|
|
171
|
+
function u(o, d) {
|
|
172
|
+
return e(o) < e(d);
|
|
175
173
|
}
|
|
176
|
-
function f(o,
|
|
177
|
-
return e(o) <= e(
|
|
174
|
+
function f(o, d) {
|
|
175
|
+
return e(o) <= e(d);
|
|
178
176
|
}
|
|
179
|
-
function
|
|
180
|
-
return e(o) === e(
|
|
177
|
+
function B(o, d) {
|
|
178
|
+
return e(o) === e(d);
|
|
181
179
|
}
|
|
182
|
-
function
|
|
183
|
-
const
|
|
184
|
-
return e(o.from) ===
|
|
180
|
+
function k(o, d) {
|
|
181
|
+
const t = e(d);
|
|
182
|
+
return e(o.from) === t || e(o.to) === t;
|
|
185
183
|
}
|
|
186
|
-
function
|
|
187
|
-
return !
|
|
184
|
+
function b(o, d) {
|
|
185
|
+
return !d || !r(d.to) || !r(d.from) ? !1 : f(d.from, o) && f(o, d.to);
|
|
188
186
|
}
|
|
189
|
-
function
|
|
190
|
-
return
|
|
187
|
+
function M(o, d) {
|
|
188
|
+
return r(d) && e(o) >= e(d);
|
|
191
189
|
}
|
|
192
|
-
function
|
|
193
|
-
return
|
|
190
|
+
function g(o, d) {
|
|
191
|
+
return r(d) && e(o) <= e(d);
|
|
194
192
|
}
|
|
195
193
|
return {
|
|
196
|
-
isDateEarlier:
|
|
197
|
-
equal:
|
|
198
|
-
inPeriod:
|
|
199
|
-
isPoint:
|
|
194
|
+
isDateEarlier: u,
|
|
195
|
+
equal: B,
|
|
196
|
+
inPeriod: b,
|
|
197
|
+
isPoint: k,
|
|
200
198
|
equalOrEarlier: f,
|
|
201
|
-
isInitializedDate:
|
|
202
|
-
isInitializedMonth:
|
|
203
|
-
isInitializedYear:
|
|
204
|
-
isMonthDisabledByDisableSince:
|
|
205
|
-
isMonthDisabledByDisableUntil:
|
|
199
|
+
isInitializedDate: r,
|
|
200
|
+
isInitializedMonth: i,
|
|
201
|
+
isInitializedYear: p,
|
|
202
|
+
isMonthDisabledByDisableSince: M,
|
|
203
|
+
isMonthDisabledByDisableUntil: g
|
|
206
204
|
};
|
|
207
205
|
}
|
|
208
|
-
const
|
|
206
|
+
const ge = /* @__PURE__ */ ee({
|
|
209
207
|
name: "FDatePickerCalendarView",
|
|
210
|
-
props:
|
|
208
|
+
props: Qt,
|
|
211
209
|
emits: ["click", "clickWeek", "keyDown", "mouseEnter", "mouseLeave"],
|
|
212
|
-
setup(e,
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}),
|
|
217
|
-
|
|
218
|
-
}),
|
|
219
|
-
|
|
210
|
+
setup(e, r) {
|
|
211
|
+
const i = a(e.dates), p = a(e.daysInWeek), u = a(e.enableKeyboadNavigate), f = a(e.enableMarkCurrent), B = a(e.enablePeriod), k = a(e.firstDayOfTheWeek), b = a(e.selected), M = a(e.selectedPeriod), g = a(e.selectedWeek), o = a(e.selectMode), d = a(e.showWeekNumber), t = a(e.weekTitle), l = Y(() => d.value && k.value === "Mon");
|
|
212
|
+
G(() => e.dates, () => {
|
|
213
|
+
i.value = e.dates;
|
|
214
|
+
}), G(() => e.selected, () => {
|
|
215
|
+
b.value = e.selected;
|
|
216
|
+
}), G(() => e.enablePeriod, (n, x) => {
|
|
217
|
+
n !== x && (B.value = n);
|
|
220
218
|
});
|
|
221
219
|
const {
|
|
222
|
-
equal:
|
|
223
|
-
inPeriod:
|
|
224
|
-
isInitializedDate:
|
|
225
|
-
equalOrEarlier:
|
|
226
|
-
isPoint:
|
|
227
|
-
} =
|
|
220
|
+
equal: P,
|
|
221
|
+
inPeriod: v,
|
|
222
|
+
isInitializedDate: h,
|
|
223
|
+
equalOrEarlier: m,
|
|
224
|
+
isPoint: F
|
|
225
|
+
} = re(), {
|
|
228
226
|
getKeyCodeFromEvent: I
|
|
229
|
-
} =
|
|
230
|
-
const
|
|
227
|
+
} = Te(), D = (n) => {
|
|
228
|
+
const x = !!g.value && n.numberInTheYear === g.value.numberInTheYear && n.year === g.value.year;
|
|
231
229
|
return {
|
|
232
230
|
"f-datepicker-selectWeek": o.value === "week",
|
|
233
|
-
"f-datepicker-selectedWeek": o.value === "week" &&
|
|
231
|
+
"f-datepicker-selectedWeek": o.value === "week" && x
|
|
234
232
|
};
|
|
235
|
-
},
|
|
236
|
-
function
|
|
237
|
-
return
|
|
238
|
-
}
|
|
239
|
-
function $(
|
|
240
|
-
return !!
|
|
241
|
-
}
|
|
242
|
-
function V(
|
|
243
|
-
return !!
|
|
244
|
-
year:
|
|
245
|
-
month:
|
|
246
|
-
day:
|
|
233
|
+
}, y = Y(() => d.value && k.value === "Mon");
|
|
234
|
+
function T(n) {
|
|
235
|
+
return v(n, M.value);
|
|
236
|
+
}
|
|
237
|
+
function $(n) {
|
|
238
|
+
return !!M.value && F(M.value, n);
|
|
239
|
+
}
|
|
240
|
+
function V(n) {
|
|
241
|
+
return !!b.value && P({
|
|
242
|
+
year: b.value.year,
|
|
243
|
+
month: b.value.month,
|
|
244
|
+
day: b.value.day
|
|
247
245
|
}, {
|
|
248
|
-
year:
|
|
249
|
-
month:
|
|
250
|
-
day:
|
|
246
|
+
year: n.year,
|
|
247
|
+
month: n.month,
|
|
248
|
+
day: n.day
|
|
251
249
|
});
|
|
252
250
|
}
|
|
253
|
-
const z = (
|
|
254
|
-
const S = o.value !== "week" &&
|
|
251
|
+
const z = (n, x, C) => {
|
|
252
|
+
const S = o.value !== "week" && n.tag === X.current && (B.value && T(n.date) && !$(n.date) || n.range), H = n.tag === X.previous || n.tag === X.next, U = {
|
|
255
253
|
"f-datepicker-range": S,
|
|
256
|
-
"f-datepicker-no-currmonth":
|
|
257
|
-
"f-datepicker-disabled":
|
|
258
|
-
"f-datepicker-singledate": !
|
|
259
|
-
},
|
|
260
|
-
return
|
|
261
|
-
},
|
|
262
|
-
const
|
|
254
|
+
"f-datepicker-no-currmonth": H,
|
|
255
|
+
"f-datepicker-disabled": n.disable,
|
|
256
|
+
"f-datepicker-singledate": !n.disable
|
|
257
|
+
}, _ = `d_${x}_${C}`;
|
|
258
|
+
return U[_] = !0, U;
|
|
259
|
+
}, K = (n) => {
|
|
260
|
+
const x = o.value !== "week" && n.tag === X.current && (!B.value && V(n.date) || B.value && $(n.date)), C = n.isCurrent && f.value, S = n.highlight && (n.tag === X.previous || n.tag === X.next || n.disable);
|
|
263
261
|
return {
|
|
264
262
|
"f-datepicker-date": !0,
|
|
265
|
-
"f-datepicker-selected":
|
|
266
|
-
"f-datepicker-current":
|
|
263
|
+
"f-datepicker-selected": x,
|
|
264
|
+
"f-datepicker-current": C,
|
|
267
265
|
"f-datepicker-opacity": S,
|
|
268
|
-
"f-datepicker-highlight":
|
|
269
|
-
"f-datepicker-disabled":
|
|
266
|
+
"f-datepicker-highlight": n.highlight,
|
|
267
|
+
"f-datepicker-disabled": n.disable
|
|
270
268
|
};
|
|
271
269
|
};
|
|
272
|
-
function
|
|
273
|
-
|
|
274
|
-
event:
|
|
275
|
-
dayItem:
|
|
270
|
+
function N(n, x) {
|
|
271
|
+
x.disable || o.value === "week" || (n.stopPropagation(), r.emit("click", {
|
|
272
|
+
event: n,
|
|
273
|
+
dayItem: x
|
|
276
274
|
}));
|
|
277
275
|
}
|
|
278
|
-
function
|
|
279
|
-
o.value === "week" && (
|
|
276
|
+
function R(n, x) {
|
|
277
|
+
o.value === "week" && (n.stopPropagation(), r.emit("clickWeek", x));
|
|
280
278
|
}
|
|
281
|
-
function
|
|
282
|
-
const
|
|
283
|
-
|
|
279
|
+
function A(n, x) {
|
|
280
|
+
const C = I(n);
|
|
281
|
+
C !== J.tab && (n.preventDefault(), C === J.enter || C === J.space ? N(n, x) : u.value && r.emit("keyDown", x.date));
|
|
284
282
|
}
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
function q(n) {
|
|
284
|
+
M.value && h(M.value.from) && !h(M.value.to) && (i.value.forEach((x) => {
|
|
285
|
+
x.days.forEach((C) => {
|
|
286
|
+
C.range = !!M.value && (m(M.value.from, C.date) && m(C.date, n.date) || m(C.date, M.value.from) && m(n.date, C.date));
|
|
289
287
|
});
|
|
290
|
-
}),
|
|
288
|
+
}), r.emit("mouseEnter", n.date));
|
|
291
289
|
}
|
|
292
|
-
function
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
290
|
+
function W() {
|
|
291
|
+
i.value.forEach((n) => {
|
|
292
|
+
n.days.forEach((x) => {
|
|
293
|
+
x.range = !1;
|
|
296
294
|
});
|
|
297
|
-
}),
|
|
295
|
+
}), r.emit("mouseLeave");
|
|
298
296
|
}
|
|
299
|
-
return () =>
|
|
297
|
+
return () => c(Fe, null, [c("div", {
|
|
300
298
|
class: "f-datepicker-table-wrapper"
|
|
301
|
-
}, [
|
|
299
|
+
}, [c("table", {
|
|
302
300
|
class: "f-datepicker-table",
|
|
303
301
|
cellpadding: "0"
|
|
304
|
-
}, [
|
|
302
|
+
}, [c("thead", null, [c("tr", null, [l.value && c("th", {
|
|
305
303
|
class: "f-datepicker-weeknbr-title"
|
|
306
|
-
}, [
|
|
304
|
+
}, [t.value]), p.value && p.value.map((n) => c("th", {
|
|
307
305
|
scope: "col",
|
|
308
306
|
style: "padding-bottom: 8px;padding-top: 4px"
|
|
309
|
-
}, [
|
|
310
|
-
class:
|
|
311
|
-
onClick: (
|
|
312
|
-
}, [
|
|
307
|
+
}, [n]))])]), c("tbody", null, [i.value && i.value.map((n, x) => c("tr", {
|
|
308
|
+
class: D(n),
|
|
309
|
+
onClick: (C) => R(C, n)
|
|
310
|
+
}, [y.value && c("td", {
|
|
313
311
|
class: "f-datepicker-weeknbr"
|
|
314
|
-
}, [
|
|
312
|
+
}, [c("div", {
|
|
315
313
|
class: "f-datepicker-date"
|
|
316
|
-
}, [
|
|
317
|
-
id: `d_${
|
|
314
|
+
}, [n.numberInTheYear])]), n.days && n.days.map((C, S) => c("td", {
|
|
315
|
+
id: `d_${x}_${S}`,
|
|
318
316
|
tabindex: "0",
|
|
319
|
-
class: z(
|
|
320
|
-
onClick: (
|
|
321
|
-
onKeydown: (
|
|
322
|
-
onMouseenter: () =>
|
|
323
|
-
onMouseleave: () =>
|
|
324
|
-
}, [
|
|
317
|
+
class: z(C, x, S),
|
|
318
|
+
onClick: (H) => N(H, C),
|
|
319
|
+
onKeydown: (H) => A(H, C),
|
|
320
|
+
onMouseenter: () => q(C),
|
|
321
|
+
onMouseleave: () => W()
|
|
322
|
+
}, [C.marked && C.marked.marked && c("span", {
|
|
325
323
|
class: "f-datepicker-markdate",
|
|
326
324
|
style: {
|
|
327
|
-
"background-color":
|
|
325
|
+
"background-color": C.marked.color
|
|
328
326
|
}
|
|
329
|
-
}, null),
|
|
330
|
-
class:
|
|
331
|
-
}, [
|
|
327
|
+
}, null), c("div", {
|
|
328
|
+
class: K(C)
|
|
329
|
+
}, [C.date.day])]))]))])])])]);
|
|
332
330
|
}
|
|
333
|
-
}),
|
|
331
|
+
}), aa = {
|
|
334
332
|
activeMonth: { type: Object, require: !0 },
|
|
335
333
|
ariaLabelPrevMonth: { type: String, default: "" },
|
|
336
334
|
ariaLabelNextMonth: { type: String, default: "" },
|
|
@@ -343,127 +341,127 @@ const Pe = /* @__PURE__ */ Z({
|
|
|
343
341
|
selectingMonth: { type: Boolean, default: !1 },
|
|
344
342
|
selectingYear: { type: Boolean, default: !1 },
|
|
345
343
|
selectMode: { type: String, default: "day" }
|
|
346
|
-
},
|
|
344
|
+
}, pe = /* @__PURE__ */ ee({
|
|
347
345
|
name: "FDatePickerCalendarNavbar",
|
|
348
|
-
props:
|
|
346
|
+
props: aa,
|
|
349
347
|
emits: ["clickMonth", "clickYear", "prePage", "preRecord", "nextRecord", "nextPage"],
|
|
350
|
-
setup(e,
|
|
348
|
+
setup(e, r) {
|
|
351
349
|
return () => {
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
var
|
|
355
|
-
|
|
356
|
-
month: (
|
|
357
|
-
year: (
|
|
358
|
-
displayTextOfMonth: (
|
|
350
|
+
const i = a(e.ariaLabelPrevMonth), p = a(e.ariaLabelNextMonth), u = a(e.dateFormat), f = a(e.disablePrePage), B = a(e.disablePreRecord), k = a(e.disableNextRecord), b = a(e.disableNextPage), M = a(e.activeMonth), g = a(e.years), o = a(e.selectingMonth), d = a(e.selectingYear), t = a(e.selectMode), l = a(!0), P = a(!0);
|
|
351
|
+
G(() => e.activeMonth, () => {
|
|
352
|
+
var n, x, C, S;
|
|
353
|
+
M.value = {
|
|
354
|
+
month: (n = e.activeMonth) == null ? void 0 : n.month,
|
|
355
|
+
year: (x = e.activeMonth) == null ? void 0 : x.year,
|
|
356
|
+
displayTextOfMonth: (C = e.activeMonth) == null ? void 0 : C.displayTextOfMonth,
|
|
359
357
|
displayTextOfYear: (S = e.activeMonth) == null ? void 0 : S.displayTextOfMonth
|
|
360
358
|
};
|
|
361
359
|
});
|
|
362
|
-
const
|
|
360
|
+
const v = Y(() => ({
|
|
363
361
|
"f-datepicker-header": !0,
|
|
364
|
-
monthYearSelBarBorder: o.value ||
|
|
365
|
-
})),
|
|
362
|
+
monthYearSelBarBorder: o.value || d.value
|
|
363
|
+
})), h = Y(() => ({
|
|
366
364
|
"f-datepicker-header-btn": !0,
|
|
367
365
|
"f-datepicker-header-btn-disabled": f.value
|
|
368
|
-
})),
|
|
366
|
+
})), m = Y(() => !o.value && !d.value), F = Y(() => ({
|
|
369
367
|
"f-datepicker-header-btn": !0,
|
|
370
|
-
"f-datepicker-header-btn-disabled":
|
|
371
|
-
})), I =
|
|
368
|
+
"f-datepicker-header-btn-disabled": B.value
|
|
369
|
+
})), I = Y(() => ({
|
|
372
370
|
"f-datepicker-header-btn": !0,
|
|
373
|
-
"f-datepicker-header-btn-disabled":
|
|
374
|
-
})),
|
|
371
|
+
"f-datepicker-header-btn-disabled": k.value
|
|
372
|
+
})), D = Y(() => ({
|
|
375
373
|
"f-datepicker-header-btn": !0,
|
|
376
|
-
"f-datepicker-header-btn-disabled":
|
|
377
|
-
})),
|
|
374
|
+
"f-datepicker-header-btn-disabled": b.value
|
|
375
|
+
})), y = Y(() => ({
|
|
378
376
|
"f-datepicker-header-btn": !0,
|
|
379
|
-
"f-datepicker-yearLabel":
|
|
380
|
-
"f-datepicker-labelBtnNotEdit": !
|
|
381
|
-
})),
|
|
377
|
+
"f-datepicker-yearLabel": l.value,
|
|
378
|
+
"f-datepicker-labelBtnNotEdit": !l.value
|
|
379
|
+
})), T = Y(() => ({
|
|
382
380
|
"f-datepicker-header-btn": !0,
|
|
383
|
-
"f-datepicker-monthLabel":
|
|
384
|
-
"f-datepicker-labelBtnNotEdit": !
|
|
385
|
-
})), $ =
|
|
386
|
-
const
|
|
387
|
-
return
|
|
381
|
+
"f-datepicker-monthLabel": P.value,
|
|
382
|
+
"f-datepicker-labelBtnNotEdit": !P.value
|
|
383
|
+
})), $ = Y(() => {
|
|
384
|
+
const n = u.value ? u.value.indexOf("yyyy") : 0, x = u.value ? u.value.indexOf("MM") : 0;
|
|
385
|
+
return n > x ? "MM-yyyy" : "yyyy-MM";
|
|
388
386
|
});
|
|
389
|
-
function V(
|
|
390
|
-
|
|
387
|
+
function V(n) {
|
|
388
|
+
n.stopPropagation(), r.emit("prePage");
|
|
391
389
|
}
|
|
392
|
-
function z(
|
|
393
|
-
|
|
390
|
+
function z(n) {
|
|
391
|
+
n.stopPropagation(), r.emit("preRecord");
|
|
394
392
|
}
|
|
395
|
-
function
|
|
396
|
-
|
|
393
|
+
function K(n) {
|
|
394
|
+
n.stopPropagation(), r.emit("clickYear");
|
|
397
395
|
}
|
|
398
|
-
function
|
|
399
|
-
|
|
396
|
+
function N(n) {
|
|
397
|
+
n.stopPropagation(), r.emit("clickMonth");
|
|
400
398
|
}
|
|
401
|
-
function
|
|
402
|
-
|
|
399
|
+
function R(n) {
|
|
400
|
+
n.stopPropagation(), r.emit("nextRecord");
|
|
403
401
|
}
|
|
404
|
-
function
|
|
405
|
-
|
|
402
|
+
function A(n) {
|
|
403
|
+
n.stopPropagation(), r.emit("nextPage");
|
|
406
404
|
}
|
|
407
|
-
function
|
|
408
|
-
return
|
|
405
|
+
function q() {
|
|
406
|
+
return c("button", {
|
|
409
407
|
type: "button",
|
|
410
|
-
class:
|
|
411
|
-
onClick: (
|
|
412
|
-
|
|
408
|
+
class: y.value,
|
|
409
|
+
onClick: (n) => {
|
|
410
|
+
l.value && K(n);
|
|
413
411
|
},
|
|
414
|
-
tabindex:
|
|
415
|
-
disabled:
|
|
416
|
-
}, [
|
|
412
|
+
tabindex: l.value ? "0" : "-1",
|
|
413
|
+
disabled: t.value === "year"
|
|
414
|
+
}, [d.value ? g.value.length > 3 ? g.value[0][1].year + " - " + g.value[3][1].year : "" : M.value.displayTextOfYear]);
|
|
417
415
|
}
|
|
418
|
-
function
|
|
419
|
-
return !
|
|
416
|
+
function W() {
|
|
417
|
+
return !d.value && t.value !== "month" && c("button", {
|
|
420
418
|
type: "button",
|
|
421
|
-
class:
|
|
422
|
-
onClick: (
|
|
423
|
-
|
|
419
|
+
class: T.value,
|
|
420
|
+
onClick: (n) => {
|
|
421
|
+
P.value && N(n);
|
|
424
422
|
},
|
|
425
|
-
tabindex:
|
|
426
|
-
}, [
|
|
423
|
+
tabindex: P.value ? "0" : "-1"
|
|
424
|
+
}, [M.value.displayTextOfMonth]);
|
|
427
425
|
}
|
|
428
|
-
return
|
|
429
|
-
class:
|
|
426
|
+
return c("div", {
|
|
427
|
+
class: v.value,
|
|
430
428
|
style: "height:40px; overflow:hidden;"
|
|
431
|
-
}, [
|
|
429
|
+
}, [c("div", {
|
|
432
430
|
class: "f-datepicker-prev-btn"
|
|
433
|
-
}, [
|
|
431
|
+
}, [c("button", {
|
|
434
432
|
type: "button",
|
|
435
|
-
class:
|
|
433
|
+
class: h.value,
|
|
436
434
|
onClick: V
|
|
437
|
-
}, [
|
|
435
|
+
}, [c("i", {
|
|
438
436
|
class: "f-icon f-icon-arrow-double-60-left"
|
|
439
|
-
}, null)]),
|
|
437
|
+
}, null)]), m.value && c("button", {
|
|
440
438
|
type: "button",
|
|
441
|
-
"aria-label":
|
|
442
|
-
class:
|
|
439
|
+
"aria-label": i.value,
|
|
440
|
+
class: F.value,
|
|
443
441
|
onClick: z
|
|
444
|
-
}, [
|
|
442
|
+
}, [c("i", {
|
|
445
443
|
class: "f-icon f-icon-arrow-chevron-left"
|
|
446
|
-
}, null)])]),
|
|
444
|
+
}, null)])]), c("div", {
|
|
447
445
|
class: "f-datepicker-monthYearText"
|
|
448
|
-
}, [$.value === "yyyy-MM" ? [
|
|
446
|
+
}, [$.value === "yyyy-MM" ? [q(), W()] : [W(), q()]]), c("div", {
|
|
449
447
|
class: "f-datepicker-next-btn"
|
|
450
|
-
}, [
|
|
448
|
+
}, [m.value && c("button", {
|
|
451
449
|
type: "button",
|
|
452
|
-
"aria-label":
|
|
450
|
+
"aria-label": p.value,
|
|
453
451
|
class: I.value,
|
|
454
|
-
onClick:
|
|
455
|
-
}, [
|
|
452
|
+
onClick: R
|
|
453
|
+
}, [c("i", {
|
|
456
454
|
class: "f-icon f-icon-arrow-chevron-right"
|
|
457
|
-
}, null)]),
|
|
455
|
+
}, null)]), c("button", {
|
|
458
456
|
type: "button",
|
|
459
|
-
class:
|
|
460
|
-
onClick:
|
|
461
|
-
}, [
|
|
457
|
+
class: D.value,
|
|
458
|
+
onClick: A
|
|
459
|
+
}, [c("i", {
|
|
462
460
|
class: "f-icon f-icon-arrow-double-60-right"
|
|
463
461
|
}, null)])])]);
|
|
464
462
|
};
|
|
465
463
|
}
|
|
466
|
-
}),
|
|
464
|
+
}), Ae = {
|
|
467
465
|
1: "一月",
|
|
468
466
|
2: "二月",
|
|
469
467
|
3: "三月",
|
|
@@ -476,13 +474,13 @@ const Pe = /* @__PURE__ */ Z({
|
|
|
476
474
|
10: "十月",
|
|
477
475
|
11: "十一月",
|
|
478
476
|
12: "十二月"
|
|
479
|
-
},
|
|
480
|
-
["appearance",
|
|
477
|
+
}, na = /* @__PURE__ */ new Map([
|
|
478
|
+
["appearance", zt]
|
|
481
479
|
]);
|
|
482
|
-
function
|
|
483
|
-
return
|
|
480
|
+
function oa(e, r, i) {
|
|
481
|
+
return r;
|
|
484
482
|
}
|
|
485
|
-
const
|
|
483
|
+
const la = "https://json-schema.org/draft/2020-12/schema", ra = "https://farris-design.gitee.io/date-view.schema.json", sa = "date-view", ia = "A Farris Input Component", ua = "object", da = {
|
|
486
484
|
id: {
|
|
487
485
|
description: "The unique identifier for date picker",
|
|
488
486
|
type: "string"
|
|
@@ -514,18 +512,18 @@ const fa = "https://json-schema.org/draft/2020-12/schema", ma = "https://farris-
|
|
|
514
512
|
type: "boolean",
|
|
515
513
|
default: !0
|
|
516
514
|
}
|
|
517
|
-
},
|
|
515
|
+
}, ca = [
|
|
518
516
|
"id",
|
|
519
517
|
"type"
|
|
520
|
-
],
|
|
521
|
-
$schema:
|
|
522
|
-
$id:
|
|
523
|
-
title:
|
|
524
|
-
description:
|
|
525
|
-
type:
|
|
526
|
-
properties:
|
|
527
|
-
required:
|
|
528
|
-
},
|
|
518
|
+
], ya = {
|
|
519
|
+
$schema: la,
|
|
520
|
+
$id: ra,
|
|
521
|
+
title: sa,
|
|
522
|
+
description: ia,
|
|
523
|
+
type: ua,
|
|
524
|
+
properties: da,
|
|
525
|
+
required: ca
|
|
526
|
+
}, fa = "date-view", va = "A Farris Component", ha = "object", ma = {
|
|
529
527
|
basic: {
|
|
530
528
|
description: "Basic Infomation",
|
|
531
529
|
title: "基本信息",
|
|
@@ -558,12 +556,12 @@ const fa = "https://json-schema.org/draft/2020-12/schema", ma = "https://farris-
|
|
|
558
556
|
}
|
|
559
557
|
}
|
|
560
558
|
}
|
|
561
|
-
},
|
|
562
|
-
title:
|
|
563
|
-
description:
|
|
564
|
-
type:
|
|
565
|
-
categories:
|
|
566
|
-
},
|
|
559
|
+
}, ba = {
|
|
560
|
+
title: fa,
|
|
561
|
+
description: va,
|
|
562
|
+
type: ha,
|
|
563
|
+
categories: ma
|
|
564
|
+
}, Re = {
|
|
567
565
|
/** */
|
|
568
566
|
top: { type: Number, default: 0 },
|
|
569
567
|
/** */
|
|
@@ -575,7 +573,7 @@ const fa = "https://json-schema.org/draft/2020-12/schema", ma = "https://farris-
|
|
|
575
573
|
dateFormat: { type: String, default: "yyyy-MM-dd" },
|
|
576
574
|
valueFormat: { type: String, default: "yyyy-MM-dd" },
|
|
577
575
|
dates: { type: Array, default: [] },
|
|
578
|
-
daysInWeek: { type: Array, default:
|
|
576
|
+
daysInWeek: { type: Array, default: ce },
|
|
579
577
|
/** 禁用日期 */
|
|
580
578
|
disableDates: { Type: Array, default: [] },
|
|
581
579
|
/** 禁用范围 */
|
|
@@ -609,7 +607,7 @@ const fa = "https://json-schema.org/draft/2020-12/schema", ma = "https://farris-
|
|
|
609
607
|
/** 月份 */
|
|
610
608
|
months: { type: Array, default: [[]] },
|
|
611
609
|
/** 月份名称 */
|
|
612
|
-
nameOfMonths: { Type: Object, default:
|
|
610
|
+
nameOfMonths: { Type: Object, default: Ae },
|
|
613
611
|
/** 二级日期 */
|
|
614
612
|
secondaryDates: { type: Array, default: [] },
|
|
615
613
|
/** 二级月份 */
|
|
@@ -636,1072 +634,877 @@ const fa = "https://json-schema.org/draft/2020-12/schema", ma = "https://farris-
|
|
|
636
634
|
value: { type: String, default: null },
|
|
637
635
|
/** 是否展示时分秒 */
|
|
638
636
|
showTime: { type: Boolean, default: !1 }
|
|
639
|
-
}
|
|
637
|
+
};
|
|
638
|
+
qt(Re, ya, na, oa, ba);
|
|
639
|
+
const Ma = {
|
|
640
640
|
months: { Type: Array, default: [[]] },
|
|
641
641
|
enableMarkCurrent: { Type: Boolean, default: !1 },
|
|
642
642
|
enableKeyboadNavigate: { Type: Boolean, default: !0 },
|
|
643
643
|
enablePeriod: { Type: Boolean, default: !1 },
|
|
644
644
|
selected: { Type: Object, default: null },
|
|
645
645
|
selectedPeriod: { Type: Object, default: null }
|
|
646
|
-
},
|
|
646
|
+
}, ke = /* @__PURE__ */ ee({
|
|
647
647
|
name: "FDatePickerMonthView",
|
|
648
|
-
props:
|
|
648
|
+
props: Ma,
|
|
649
649
|
emits: ["click", "keyDown", "mouseEnter", "mouseLeave"],
|
|
650
|
-
setup(e,
|
|
651
|
-
const
|
|
652
|
-
equal:
|
|
653
|
-
inPeriod:
|
|
654
|
-
isInitializedDate:
|
|
650
|
+
setup(e, r) {
|
|
651
|
+
const i = a(e.months), p = a(e.enableMarkCurrent), u = a(e.enableKeyboadNavigate), f = a(e.enablePeriod), B = a(e.selected), k = a(e.selectedPeriod), {
|
|
652
|
+
equal: b,
|
|
653
|
+
inPeriod: M,
|
|
654
|
+
isInitializedDate: g,
|
|
655
655
|
equalOrEarlier: o
|
|
656
|
-
} =
|
|
657
|
-
getKeyCodeFromEvent:
|
|
658
|
-
} =
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
}),
|
|
662
|
-
|
|
656
|
+
} = re(), {
|
|
657
|
+
getKeyCodeFromEvent: d
|
|
658
|
+
} = Te();
|
|
659
|
+
G(() => e.months, () => {
|
|
660
|
+
i.value = e.months;
|
|
661
|
+
}), G(() => e.selected, () => {
|
|
662
|
+
B.value = e.selected;
|
|
663
663
|
});
|
|
664
|
-
function
|
|
665
|
-
|
|
664
|
+
function t(D, y) {
|
|
665
|
+
D.stopPropagation(), !y.disable && r.emit("click", y.date);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
const
|
|
669
|
-
|
|
667
|
+
function l(D, y) {
|
|
668
|
+
const T = d(D);
|
|
669
|
+
T !== J.tab && (D.preventDefault(), T === J.enter || T === J.space ? t(D, y) : u.value && r.emit("keyDown", y));
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
671
|
+
function P(D) {
|
|
672
|
+
k.value && g(k.value.from) && !g(k.value.to) && (i.value.forEach((y) => {
|
|
673
|
+
y.forEach((T) => {
|
|
674
|
+
T.range = !!k.value && (o(k.value.from, T.date) && o(T.date, D.date) || o(T.date, k.value.from) && o(D.date, T.date));
|
|
675
675
|
});
|
|
676
|
-
}),
|
|
676
|
+
}), r.emit("mouseEnter", D));
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
678
|
+
function v() {
|
|
679
|
+
i.value.forEach((D) => {
|
|
680
|
+
D.forEach((y) => {
|
|
681
|
+
y.range = !1;
|
|
682
682
|
});
|
|
683
|
-
}),
|
|
683
|
+
}), r.emit("mouseLeave");
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return !!
|
|
687
|
-
year:
|
|
688
|
-
month:
|
|
685
|
+
function h(D) {
|
|
686
|
+
return !!B.value && b({
|
|
687
|
+
year: B.value.year,
|
|
688
|
+
month: B.value.month
|
|
689
689
|
}, {
|
|
690
|
-
year:
|
|
691
|
-
month:
|
|
690
|
+
year: D.year,
|
|
691
|
+
month: D.month
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
return !!
|
|
696
|
-
year:
|
|
697
|
-
},
|
|
698
|
-
year:
|
|
699
|
-
},
|
|
694
|
+
function m(D) {
|
|
695
|
+
return !!k.value && (b({
|
|
696
|
+
year: k.value.from.month
|
|
697
|
+
}, D) || b({
|
|
698
|
+
year: k.value.to.month
|
|
699
|
+
}, D));
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
return
|
|
701
|
+
function F(D) {
|
|
702
|
+
return M(D, k.value);
|
|
703
703
|
}
|
|
704
|
-
const I = (
|
|
704
|
+
const I = (D) => ({
|
|
705
705
|
"f-datepicker-month-cell": !0,
|
|
706
|
-
"f-datepicker-current":
|
|
707
|
-
"f-datepicker-selected": !f.value &&
|
|
708
|
-
"f-datepicker-disabled":
|
|
709
|
-
"f-datepicker-range":
|
|
706
|
+
"f-datepicker-current": D.isCurrent && p.value,
|
|
707
|
+
"f-datepicker-selected": !f.value && h(D.date) || f.value && m(D.date),
|
|
708
|
+
"f-datepicker-disabled": D.disable,
|
|
709
|
+
"f-datepicker-range": F(D.date) || D.range
|
|
710
710
|
});
|
|
711
|
-
return () =>
|
|
711
|
+
return () => c("div", {
|
|
712
712
|
class: "f-datepicker-table-wrapper"
|
|
713
|
-
}, [
|
|
713
|
+
}, [c("table", {
|
|
714
714
|
class: "f-datepicker-table"
|
|
715
|
-
}, [
|
|
716
|
-
id: `m_${
|
|
717
|
-
class: `m_${
|
|
718
|
-
onClick: (V) =>
|
|
719
|
-
onKeydown: (V) =>
|
|
720
|
-
onMouseenter: () => T
|
|
721
|
-
onMouseleave: () =>
|
|
715
|
+
}, [c("tbody", null, [i.value && i.value.map((D, y) => c("tr", null, [D.map((T, $) => c("td", {
|
|
716
|
+
id: `m_${y}_${$}`,
|
|
717
|
+
class: `m_${y}_${$}`,
|
|
718
|
+
onClick: (V) => t(V, T),
|
|
719
|
+
onKeydown: (V) => l(V, T),
|
|
720
|
+
onMouseenter: () => P(T),
|
|
721
|
+
onMouseleave: () => v(),
|
|
722
722
|
tabindex: "0",
|
|
723
723
|
style: "width: 33.3%"
|
|
724
|
-
}, [
|
|
724
|
+
}, [c("div", {
|
|
725
725
|
class: "f-datepicker-month"
|
|
726
|
-
}, [
|
|
727
|
-
class: I(
|
|
728
|
-
}, [
|
|
726
|
+
}, [c("span", {
|
|
727
|
+
class: I(T)
|
|
728
|
+
}, [T.displayText])])]))]))])])]);
|
|
729
729
|
}
|
|
730
|
-
}),
|
|
730
|
+
}), ga = {
|
|
731
731
|
years: { Type: Array, default: [[]] },
|
|
732
732
|
enableKeyboadNavigate: { Type: Boolean, default: !0 },
|
|
733
733
|
enableMarkCurrent: { Type: Boolean, default: !0 },
|
|
734
734
|
enablePeriod: { Type: Boolean, default: !1 },
|
|
735
735
|
selected: { Type: Object, default: null },
|
|
736
736
|
selectedPeriod: { Type: Object, default: null }
|
|
737
|
-
}, De = /* @__PURE__ */
|
|
737
|
+
}, De = /* @__PURE__ */ ee({
|
|
738
738
|
name: "FDatePickerYearView",
|
|
739
|
-
props:
|
|
739
|
+
props: ga,
|
|
740
740
|
emits: ["click", "keyDown", "mouseEnter", "mouseLeave"],
|
|
741
|
-
setup(e,
|
|
742
|
-
const
|
|
743
|
-
equal:
|
|
744
|
-
inPeriod:
|
|
745
|
-
isInitializedDate:
|
|
741
|
+
setup(e, r) {
|
|
742
|
+
const i = a(e.years), p = a(e.enableMarkCurrent), u = a(e.enableKeyboadNavigate), f = a(e.enablePeriod), B = a(e.selected), k = a(e.selectedPeriod), {
|
|
743
|
+
equal: b,
|
|
744
|
+
inPeriod: M,
|
|
745
|
+
isInitializedDate: g,
|
|
746
746
|
equalOrEarlier: o
|
|
747
|
-
} =
|
|
748
|
-
getKeyCodeFromEvent:
|
|
749
|
-
} =
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
}),
|
|
753
|
-
|
|
747
|
+
} = re(), {
|
|
748
|
+
getKeyCodeFromEvent: d
|
|
749
|
+
} = Te();
|
|
750
|
+
G(() => e.years, () => {
|
|
751
|
+
i.value = e.years;
|
|
752
|
+
}), G(() => e.selected, () => {
|
|
753
|
+
B.value = e.selected;
|
|
754
754
|
});
|
|
755
|
-
const
|
|
756
|
-
const $ = `y_${
|
|
757
|
-
"f-datepicker-no-currmonth":
|
|
755
|
+
const t = (y, T) => {
|
|
756
|
+
const $ = `y_${y}_${T}`, V = {
|
|
757
|
+
"f-datepicker-no-currmonth": y === 0 && T === 0 || y === 3 && T === 2
|
|
758
758
|
};
|
|
759
759
|
return V[$] = !0, V;
|
|
760
760
|
};
|
|
761
|
-
function
|
|
762
|
-
return
|
|
763
|
-
}
|
|
764
|
-
function
|
|
765
|
-
return !!
|
|
766
|
-
year:
|
|
767
|
-
},
|
|
768
|
-
}
|
|
769
|
-
function
|
|
770
|
-
return !!
|
|
771
|
-
year:
|
|
772
|
-
},
|
|
773
|
-
year:
|
|
774
|
-
},
|
|
775
|
-
}
|
|
776
|
-
const
|
|
761
|
+
function l(y) {
|
|
762
|
+
return M(y, k.value);
|
|
763
|
+
}
|
|
764
|
+
function P(y) {
|
|
765
|
+
return !!B.value && b({
|
|
766
|
+
year: B.value.year
|
|
767
|
+
}, y);
|
|
768
|
+
}
|
|
769
|
+
function v(y) {
|
|
770
|
+
return !!k.value && (b({
|
|
771
|
+
year: k.value.from.year
|
|
772
|
+
}, y) || b({
|
|
773
|
+
year: k.value.to.year
|
|
774
|
+
}, y));
|
|
775
|
+
}
|
|
776
|
+
const h = (y) => ({
|
|
777
777
|
"f-datepicker-year-cell": !0,
|
|
778
|
-
"f-datepicker-current":
|
|
779
|
-
"f-datepicker-selected": !
|
|
780
|
-
"f-datepicker-disabled":
|
|
781
|
-
"f-datepicker-range":
|
|
778
|
+
"f-datepicker-current": y.isCurrent && p.value,
|
|
779
|
+
"f-datepicker-selected": !k.value && P(y.date) || f.value && v(y.date),
|
|
780
|
+
"f-datepicker-disabled": y.disable,
|
|
781
|
+
"f-datepicker-range": l(y.date) || y.range
|
|
782
782
|
});
|
|
783
|
-
function
|
|
784
|
-
|
|
783
|
+
function m(y, T) {
|
|
784
|
+
y.stopPropagation(), !T.disable && r.emit("click", T);
|
|
785
785
|
}
|
|
786
|
-
function
|
|
787
|
-
const $ =
|
|
788
|
-
$ !== J.tab && (
|
|
786
|
+
function F(y, T) {
|
|
787
|
+
const $ = d(y);
|
|
788
|
+
$ !== J.tab && (y.preventDefault(), $ === J.enter || $ === J.space ? m(y, T) : u.value && r.emit("keyDown", T));
|
|
789
789
|
}
|
|
790
|
-
function I(
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
$.range = !!
|
|
790
|
+
function I(y) {
|
|
791
|
+
k.value && g(k.value.from) && !g(k.value.to) && (i.value.forEach((T) => {
|
|
792
|
+
T.forEach(($) => {
|
|
793
|
+
$.range = !!k.value && (o(k.value.from, $.date) && o($.date, y.date) || o($.date, k.value.from) && o(y.date, $.date));
|
|
794
794
|
});
|
|
795
|
-
}),
|
|
795
|
+
}), r.emit("mouseEnter", y));
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
797
|
+
function D() {
|
|
798
|
+
i.value.forEach((y) => {
|
|
799
|
+
y.forEach((T) => {
|
|
800
|
+
T.range = !1;
|
|
801
801
|
});
|
|
802
|
-
}),
|
|
802
|
+
}), r.emit("mouseLeave");
|
|
803
803
|
}
|
|
804
|
-
return () =>
|
|
804
|
+
return () => c("table", {
|
|
805
805
|
class: "f-datepicker-table-wrapper"
|
|
806
|
-
}, [
|
|
806
|
+
}, [c("tbody", {
|
|
807
807
|
class: "f-datepicker-table"
|
|
808
|
-
}, [
|
|
808
|
+
}, [i.value && i.value.map((y, T) => c("tr", null, [y.map(($, V) => c("td", {
|
|
809
809
|
id: "y_{yi}_{i}",
|
|
810
|
-
class:
|
|
811
|
-
onClick: (z) =>
|
|
812
|
-
onKeydown: (z) =>
|
|
810
|
+
class: t(T, V),
|
|
811
|
+
onClick: (z) => m(z, $),
|
|
812
|
+
onKeydown: (z) => F(z, $),
|
|
813
813
|
onMouseenter: () => I($),
|
|
814
|
-
onMouseleave: () =>
|
|
814
|
+
onMouseleave: () => D(),
|
|
815
815
|
tabindex: "0"
|
|
816
|
-
}, [
|
|
816
|
+
}, [c("div", {
|
|
817
817
|
class: "f-datepicker-year"
|
|
818
|
-
}, [
|
|
819
|
-
class:
|
|
818
|
+
}, [c("span", {
|
|
819
|
+
class: h($)
|
|
820
820
|
}, [$.year])])]))]))])]);
|
|
821
821
|
}
|
|
822
822
|
});
|
|
823
|
-
function
|
|
824
|
-
function e(
|
|
823
|
+
function we() {
|
|
824
|
+
function e(u) {
|
|
825
825
|
return new Date(
|
|
826
|
-
|
|
827
|
-
(
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
826
|
+
u.year || 0,
|
|
827
|
+
(u.month || 1) - 1,
|
|
828
|
+
u.day,
|
|
829
|
+
u.hour ? u.hour : 0,
|
|
830
|
+
u.minute ? u.minute : 0,
|
|
831
|
+
u.second ? u.second : 0,
|
|
832
832
|
0
|
|
833
833
|
).getDay();
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
if (!
|
|
835
|
+
function r(u) {
|
|
836
|
+
if (!u)
|
|
837
837
|
return 1;
|
|
838
|
-
if (!/^\d+$/.test(
|
|
838
|
+
if (!/^\d+$/.test(u.value))
|
|
839
839
|
return -1;
|
|
840
|
-
let f = Number(
|
|
841
|
-
return (
|
|
840
|
+
let f = Number(u.value);
|
|
841
|
+
return (u.format.length === 1 && u.value.length !== 1 && f < 10 || u.format.length === 1 && u.value.length !== 2 && f >= 10 || u.format.length === 2 && u.value.length > 2) && (f = -1), f;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
if (
|
|
845
|
-
for (let
|
|
846
|
-
if (
|
|
847
|
-
return
|
|
843
|
+
function i(u, f) {
|
|
844
|
+
if (u.value) {
|
|
845
|
+
for (let B = 1; B <= 12; B++)
|
|
846
|
+
if (u.value.toLowerCase() === f[B].toLowerCase())
|
|
847
|
+
return B;
|
|
848
848
|
}
|
|
849
849
|
return -1;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
const f = new Date(
|
|
851
|
+
function p(u) {
|
|
852
|
+
const f = new Date(u.year || 0, (u.month || 1) - 1, u.day, 0, 0, 0, 0);
|
|
853
853
|
return f.setDate(f.getDate() + (f.getDay() === 0 ? -3 : 4 - f.getDay())), Math.round((f.getTime() - new Date(f.getFullYear(), 0, 4).getTime()) / 864e5 / 7) + 1;
|
|
854
854
|
}
|
|
855
|
-
return { getNumberByValue:
|
|
855
|
+
return { getNumberByValue: r, getDayNumber: e, getMonthNumberByMonthName: i, getWeekNumber: p };
|
|
856
856
|
}
|
|
857
|
-
function
|
|
858
|
-
const { getTimeInMilliseconds:
|
|
859
|
-
function
|
|
860
|
-
if (
|
|
857
|
+
function pa(e, r, i, p, u, f, B, k) {
|
|
858
|
+
const { getTimeInMilliseconds: b, getWeekdayIndex: M } = Z(), { isInitializedDate: g } = re(), { getDayNumber: o } = we();
|
|
859
|
+
function d(t) {
|
|
860
|
+
if (t.year && t.year < e || t.year && t.year > r)
|
|
861
861
|
return !0;
|
|
862
|
-
const
|
|
863
|
-
if (
|
|
862
|
+
const l = b(t), P = t.hour !== void 0;
|
|
863
|
+
if (g(p) && (P ? l : l + 24 * 60 * 60 * 1e3 - 1) < b(p) || g(i) && l > b(i))
|
|
864
864
|
return !0;
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
867
|
-
if (
|
|
865
|
+
if (B) {
|
|
866
|
+
const h = o(t);
|
|
867
|
+
if (h === 0 || h === 6)
|
|
868
868
|
return !0;
|
|
869
869
|
}
|
|
870
|
-
const
|
|
871
|
-
return !!(
|
|
870
|
+
const v = o(t);
|
|
871
|
+
return !!(k.length > 0 && k.find((m) => M(m) === v) || u.length > 0 && u.find((m) => (m.year === 0 || m.year === t.year) && (m.month === 0 || m.month === t.month) && m.day === t.day) || f.length > 0 && f.find((m) => g(m.from) && g(m.to) && l >= b(m.from) && l <= b(m.to)));
|
|
872
872
|
}
|
|
873
|
-
return { isDisabledDate:
|
|
873
|
+
return { isDisabledDate: d };
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
const { getDayNumber: e } =
|
|
877
|
-
function
|
|
878
|
-
let
|
|
879
|
-
|
|
880
|
-
const
|
|
881
|
-
return [...
|
|
882
|
-
},
|
|
883
|
-
const
|
|
884
|
-
if (
|
|
885
|
-
return { marked: !0, color:
|
|
875
|
+
function ka() {
|
|
876
|
+
const { getDayNumber: e } = we();
|
|
877
|
+
function r(p, u, f) {
|
|
878
|
+
let B = [];
|
|
879
|
+
B = u.reduce((b, M) => {
|
|
880
|
+
const g = M.dates.map((o) => ({ date: o, color: M.color }));
|
|
881
|
+
return [...b, ...g];
|
|
882
|
+
}, B);
|
|
883
|
+
const k = B.find((b) => (b.date.year === 0 || b.date.year === p.year) && (b.date.month === 0 || b.date.month === p.month) && b.date.day === p.day);
|
|
884
|
+
if (k)
|
|
885
|
+
return { marked: !0, color: k.color };
|
|
886
886
|
if (f && f.marked) {
|
|
887
|
-
const
|
|
888
|
-
if (
|
|
887
|
+
const b = e(p);
|
|
888
|
+
if (b === 0 || b === 6)
|
|
889
889
|
return { marked: !0, color: f.color };
|
|
890
890
|
}
|
|
891
891
|
return { marked: !1, color: "" };
|
|
892
892
|
}
|
|
893
|
-
function
|
|
894
|
-
const
|
|
895
|
-
return
|
|
893
|
+
function i(p, u, f, B) {
|
|
894
|
+
const k = e(p);
|
|
895
|
+
return u && k === 0 || f && k === 6 ? !0 : !!B.find((M) => (M.year === 0 || M.year === p.year) && (M.month === 0 || M.month === p.month) && M.day === p.day);
|
|
896
896
|
}
|
|
897
|
-
return { isHighlightedDate:
|
|
897
|
+
return { isHighlightedDate: i, isMarkedDate: r };
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
const { getTimeInMilliseconds: e } =
|
|
901
|
-
function
|
|
902
|
-
return
|
|
899
|
+
function Ve() {
|
|
900
|
+
const { getTimeInMilliseconds: e } = Z(), { isInitializedDate: r } = re();
|
|
901
|
+
function i(u, f) {
|
|
902
|
+
return r(f) && e(u) < e(f);
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
904
|
+
function p(u, f) {
|
|
905
|
+
return r(f) && e(u) > e(f);
|
|
906
906
|
}
|
|
907
|
-
return { isMonthDisabledByDisableSince:
|
|
907
|
+
return { isMonthDisabledByDisableSince: p, isMonthDisabledByDisableUntil: i };
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
const { getToday: e } =
|
|
911
|
-
function
|
|
909
|
+
function Le() {
|
|
910
|
+
const { getToday: e } = Z(), { isMonthDisabledByDisableSince: r, isMonthDisabledByDisableUntil: i } = Ve();
|
|
911
|
+
function p(g) {
|
|
912
912
|
const o = { displayTextOfMonth: "", month: 0, year: 0, displayTextOfYear: "" };
|
|
913
|
-
if (
|
|
914
|
-
const
|
|
915
|
-
o.month =
|
|
913
|
+
if (g) {
|
|
914
|
+
const d = g.match(/[^0-9]/), t = d && d.length ? d[0] : "", l = g.split(t);
|
|
915
|
+
o.month = l[0].length === 2 ? Number(l[0]) : Number(l[1]), o.year = l[0].length === 2 ? Number(l[1]) : Number(l[0]);
|
|
916
916
|
}
|
|
917
917
|
return o;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
return new Date(o,
|
|
921
|
-
}
|
|
922
|
-
function f(
|
|
923
|
-
return new Date(
|
|
924
|
-
}
|
|
925
|
-
function g
|
|
926
|
-
const
|
|
927
|
-
return
|
|
928
|
-
}
|
|
929
|
-
function
|
|
930
|
-
const
|
|
931
|
-
for (let I = 1; I <= 12; I +=
|
|
932
|
-
const
|
|
933
|
-
for (let
|
|
934
|
-
const
|
|
935
|
-
|
|
936
|
-
month:
|
|
937
|
-
displayText: y
|
|
938
|
-
isCurrent:
|
|
939
|
-
disable:
|
|
940
|
-
date: { year:
|
|
919
|
+
function u(g, o) {
|
|
920
|
+
return new Date(o, g, 0).getDate();
|
|
921
|
+
}
|
|
922
|
+
function f(g, o, d) {
|
|
923
|
+
return new Date(g, o - 1, d, 0, 0, 0, 0);
|
|
924
|
+
}
|
|
925
|
+
function B(g, o) {
|
|
926
|
+
const d = f(o, g, 1);
|
|
927
|
+
return d.setMonth(d.getMonth() - 1), u(d.getMonth() + 1, d.getFullYear());
|
|
928
|
+
}
|
|
929
|
+
function k(g, o, d, t) {
|
|
930
|
+
const l = e(), P = [], { year: v } = o, h = 3, m = { year: d.year, month: d.month, day: d.day }, F = { year: t.year, month: t.month, day: t.day };
|
|
931
|
+
for (let I = 1; I <= 12; I += h) {
|
|
932
|
+
const D = [];
|
|
933
|
+
for (let y = I; y < I + h; y++) {
|
|
934
|
+
const T = r({ year: v, month: y, day: 1 }, m) || i({ year: v, month: y, day: u(y, v || 0) }, F);
|
|
935
|
+
D.push({
|
|
936
|
+
month: y,
|
|
937
|
+
displayText: g[y],
|
|
938
|
+
isCurrent: y === l.month && v === l.year,
|
|
939
|
+
disable: T,
|
|
940
|
+
date: { year: v, month: y }
|
|
941
941
|
});
|
|
942
942
|
}
|
|
943
|
-
|
|
943
|
+
P.push(D);
|
|
944
944
|
}
|
|
945
|
-
return
|
|
945
|
+
return P;
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
const
|
|
949
|
-
year:
|
|
950
|
-
},
|
|
951
|
-
return
|
|
947
|
+
function b(g, o) {
|
|
948
|
+
const d = {
|
|
949
|
+
year: g === 12 ? o + 1 : o
|
|
950
|
+
}, t = g === 12 ? 1 : g + 1;
|
|
951
|
+
return d.month = t, d;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
954
|
-
const
|
|
955
|
-
year:
|
|
956
|
-
},
|
|
957
|
-
return
|
|
953
|
+
function M(g, o) {
|
|
954
|
+
const d = {
|
|
955
|
+
year: g === 1 ? o - 1 : o
|
|
956
|
+
}, t = g === 1 ? 12 : g - 1;
|
|
957
|
+
return d.month = t, d;
|
|
958
958
|
}
|
|
959
|
-
return { daysInMonth:
|
|
959
|
+
return { daysInMonth: u, daysInPreMonth: B, generateMonths: k, parseDefaultMonth: p, getNextMonth: b, getPreviousMonth: M };
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
const { getToday:
|
|
963
|
-
function
|
|
964
|
-
const
|
|
965
|
-
return
|
|
966
|
-
}
|
|
967
|
-
function
|
|
968
|
-
const
|
|
969
|
-
|
|
970
|
-
const
|
|
971
|
-
return
|
|
972
|
-
}
|
|
973
|
-
function o(
|
|
974
|
-
return
|
|
975
|
-
}
|
|
976
|
-
function
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
for (let
|
|
980
|
-
const
|
|
981
|
-
if (
|
|
982
|
-
const
|
|
983
|
-
for (let
|
|
984
|
-
const
|
|
985
|
-
year:
|
|
986
|
-
month:
|
|
987
|
-
day:
|
|
988
|
-
}, S = o(
|
|
989
|
-
|
|
961
|
+
function Da({ isDisabledDate: e }) {
|
|
962
|
+
const { getToday: r } = Z(), { daysInMonth: i, daysInPreMonth: p, getNextMonth: u, getPreviousMonth: f } = Le(), { isHighlightedDate: B, isMarkedDate: k } = ka(), { getWeekNumber: b } = we();
|
|
963
|
+
function M(t) {
|
|
964
|
+
const l = ce.indexOf(t);
|
|
965
|
+
return l > 0 ? 7 - l : 0;
|
|
966
|
+
}
|
|
967
|
+
function g(t, l, P) {
|
|
968
|
+
const v = /* @__PURE__ */ new Date();
|
|
969
|
+
v.setDate(1), v.setMonth(l - 1), v.setFullYear(t);
|
|
970
|
+
const h = v.getDay() + P;
|
|
971
|
+
return h >= 7 ? h - 7 : h;
|
|
972
|
+
}
|
|
973
|
+
function o(t, l, P, v, h) {
|
|
974
|
+
return t === h.day && l === h.month && P === h.year && v === X.current;
|
|
975
|
+
}
|
|
976
|
+
function d(t, l, P, v, h, m, F, I, D) {
|
|
977
|
+
const y = [], T = r(), $ = g(l, t, M(P)), V = i(t, l), z = p(t, l);
|
|
978
|
+
let K = 1, N = X.previous;
|
|
979
|
+
for (let R = 1; R < 7; R++) {
|
|
980
|
+
const A = [];
|
|
981
|
+
if (R === 1) {
|
|
982
|
+
const W = z - $ + 1;
|
|
983
|
+
for (let x = W; x <= z; x++) {
|
|
984
|
+
const C = {
|
|
985
|
+
year: t === 1 ? l - 1 : l,
|
|
986
|
+
month: t === 1 ? 12 : t - 1,
|
|
987
|
+
day: x
|
|
988
|
+
}, S = o(x, t, l, N, T), H = e(C), U = k(C, v, h), _ = B(C, I, F, m);
|
|
989
|
+
A.push({ date: C, tag: N, isCurrent: S, disable: H, marked: U, highlight: _ });
|
|
990
990
|
}
|
|
991
|
-
|
|
992
|
-
const
|
|
993
|
-
for (let
|
|
994
|
-
const
|
|
995
|
-
|
|
991
|
+
N = X.current;
|
|
992
|
+
const n = 7 - A.length;
|
|
993
|
+
for (let x = 0; x < n; x++) {
|
|
994
|
+
const C = { year: l, month: t, day: K }, S = o(K, t, l, N, T), H = e(C), U = k(C, v, h), _ = B(C, I, F, m);
|
|
995
|
+
A.push({ date: C, tag: N, isCurrent: S, disable: H, marked: U, highlight: _ }), K++;
|
|
996
996
|
}
|
|
997
997
|
} else
|
|
998
|
-
for (let
|
|
999
|
-
|
|
1000
|
-
const
|
|
1001
|
-
year:
|
|
1002
|
-
month:
|
|
1003
|
-
day:
|
|
1004
|
-
},
|
|
1005
|
-
|
|
998
|
+
for (let W = 1; W <= 7; W++) {
|
|
999
|
+
K > V && (K = 1, N = X.next);
|
|
1000
|
+
const n = {
|
|
1001
|
+
year: N === X.next && t === 12 ? l + 1 : l,
|
|
1002
|
+
month: N === X.current ? t : N === X.next && t < 12 ? t + 1 : 1,
|
|
1003
|
+
day: K
|
|
1004
|
+
}, x = o(K, t, l, N, T), C = e(n), S = k(n, v, h), H = B(n, I, F, m);
|
|
1005
|
+
A.push({ date: n, tag: N, isCurrent: x, disable: C, marked: S, highlight: H }), K++;
|
|
1006
1006
|
}
|
|
1007
|
-
const
|
|
1008
|
-
|
|
1007
|
+
const q = D && P === "Mon." ? b(A[0].date) : 0;
|
|
1008
|
+
y.push({ days: A, numberInTheYear: q, year: l });
|
|
1009
1009
|
}
|
|
1010
|
-
return
|
|
1010
|
+
return y;
|
|
1011
1011
|
}
|
|
1012
|
-
return { generateCalendar:
|
|
1012
|
+
return { generateCalendar: d };
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1015
|
-
const { getToday: e } =
|
|
1016
|
-
function
|
|
1017
|
-
const
|
|
1018
|
-
for (let
|
|
1019
|
-
const
|
|
1020
|
-
for (let
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1023
|
-
year:
|
|
1024
|
-
isCurrent:
|
|
1025
|
-
selected:
|
|
1026
|
-
disable:
|
|
1027
|
-
date: { year:
|
|
1014
|
+
function Pa() {
|
|
1015
|
+
const { getToday: e } = Z();
|
|
1016
|
+
function r(i, p, u, f, B, k) {
|
|
1017
|
+
const b = [], M = i - i % 10, { year: g, month: o } = p, d = e(), t = 3, l = M + 10;
|
|
1018
|
+
for (let P = M - 1; P < l; P += t) {
|
|
1019
|
+
const v = [];
|
|
1020
|
+
for (let h = P; h < P + t; h++) {
|
|
1021
|
+
const m = h < u || h > f;
|
|
1022
|
+
v.push({
|
|
1023
|
+
year: h,
|
|
1024
|
+
isCurrent: h === d.year,
|
|
1025
|
+
selected: h === g,
|
|
1026
|
+
disable: m,
|
|
1027
|
+
date: { year: h }
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
|
-
|
|
1030
|
+
b.push(v);
|
|
1031
1031
|
}
|
|
1032
|
-
return
|
|
1032
|
+
return b;
|
|
1033
1033
|
}
|
|
1034
|
-
return { generateYears:
|
|
1034
|
+
return { generateYears: r };
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const de = /* @__PURE__ */ ee({
|
|
1037
1037
|
name: "FDateView",
|
|
1038
|
-
props:
|
|
1038
|
+
props: Re,
|
|
1039
1039
|
emits: ["datePicked", "confirm"],
|
|
1040
|
-
setup(e,
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
const
|
|
1044
|
-
formatTo:
|
|
1045
|
-
parseToDate:
|
|
1046
|
-
} =
|
|
1047
|
-
isMonthDisabledByDisableSince:
|
|
1048
|
-
isMonthDisabledByDisableUntil:
|
|
1049
|
-
} =
|
|
1050
|
-
generateCalendar:
|
|
1051
|
-
} =
|
|
1052
|
-
getToday:
|
|
1053
|
-
getDateObject:
|
|
1054
|
-
} =
|
|
1055
|
-
generateMonths:
|
|
1056
|
-
getNextMonth:
|
|
1057
|
-
getPreviousMonth:
|
|
1058
|
-
daysInMonth:
|
|
1059
|
-
} =
|
|
1060
|
-
generateYears:
|
|
1061
|
-
} =
|
|
1062
|
-
const
|
|
1063
|
-
return
|
|
1040
|
+
setup(e, r) {
|
|
1041
|
+
const i = a(), p = a(""), u = a(e.mode), f = a(e.top), B = a(e.left), k = a(e.position), b = a(e.enablePeriod), M = a(e.selectMode), g = a(e.dateFormat), o = a(e.nameOfMonths), d = a(e.valueFormat), t = a([]), l = a(!1), P = a(""), v = a(!1), h = a(""), m = a(), F = a(!1), I = a(!1), D = a(!1), y = a(!1), T = a(!1), $ = a(!1), V = a(!1), z = a(!1);
|
|
1042
|
+
a(e.secondaryDates);
|
|
1043
|
+
const K = a(e.daysInWeek), N = a(e.enableKeyboadNavigate), R = a(e.enableMarkCurrent), A = a(e.firstDayOfTheWeek), q = a(e.showWeekNumber), W = a(e.selectedDate), n = a(e.selectedSecondDate), x = a(e.value), C = a(e.selectedWeek), S = a(e.selectedPeriod), H = a(e.weekTitle), U = a(e.secondaryMonths), _ = a(e.selectedMonth), ye = a(e.minYear), fe = a(e.maxYear), te = a(e.disableSince), ae = a(e.disableUntil), _e = a(e.disableDates), ze = a(e.disablePeriod), qe = a(e.disableWeekdays), Ue = a(e.disableWeekends), Ce = pa(ye.value, fe.value, te.value, ae.value, _e.value, ze.value, Ue.value, qe.value), {
|
|
1044
|
+
formatTo: Oe,
|
|
1045
|
+
parseToDate: xe
|
|
1046
|
+
} = Pe(), {
|
|
1047
|
+
isMonthDisabledByDisableSince: Xe,
|
|
1048
|
+
isMonthDisabledByDisableUntil: Ge
|
|
1049
|
+
} = Ve(), {
|
|
1050
|
+
generateCalendar: Se
|
|
1051
|
+
} = Da(Ce), {
|
|
1052
|
+
getToday: Je,
|
|
1053
|
+
getDateObject: Qe
|
|
1054
|
+
} = Z(), {
|
|
1055
|
+
generateMonths: Ze,
|
|
1056
|
+
getNextMonth: et,
|
|
1057
|
+
getPreviousMonth: tt,
|
|
1058
|
+
daysInMonth: at
|
|
1059
|
+
} = Le(), {
|
|
1060
|
+
generateYears: nt
|
|
1061
|
+
} = Pa(), E = Je(), Q = Y(() => {
|
|
1062
|
+
const s = oe(E), O = x.value && xe(x.value, d.value);
|
|
1063
|
+
return O ? Qe(Oe(O, "yyyy-MM-dd"), "yyyy-MM-dd") : s;
|
|
1064
1064
|
});
|
|
1065
|
-
|
|
1066
|
-
const
|
|
1065
|
+
W.value = Q.value;
|
|
1066
|
+
const j = a({
|
|
1067
1067
|
year: Q.value.year || 1,
|
|
1068
1068
|
month: Q.value.month || 1,
|
|
1069
1069
|
displayTextOfMonth: o.value[Q.value.month || "1"],
|
|
1070
1070
|
displayTextOfYear: `${Q.value.year}`
|
|
1071
1071
|
});
|
|
1072
|
-
|
|
1072
|
+
_.value = {
|
|
1073
1073
|
year: Q.value.year ? Q.value.year : void 0,
|
|
1074
1074
|
month: Q.value.month ? Q.value.month : void 0
|
|
1075
1075
|
};
|
|
1076
|
-
const
|
|
1077
|
-
year:
|
|
1078
|
-
month:
|
|
1076
|
+
const Ne = E.month === 12 ? (E.year || 1) + 1 : E.year, ot = (E.month || 1) < 12 ? (E.month || 1) + 1 : 1, ve = a({
|
|
1077
|
+
year: Ne,
|
|
1078
|
+
month: ot,
|
|
1079
1079
|
displayTextOfMonth: o.value[E.month || "1"],
|
|
1080
|
-
displayTextOfYear: `${
|
|
1081
|
-
}),
|
|
1080
|
+
displayTextOfYear: `${Ne}`
|
|
1081
|
+
}), lt = Y(() => Se(j.value.month, j.value.year, A.value, [], {
|
|
1082
1082
|
marked: !0,
|
|
1083
1083
|
color: ""
|
|
1084
|
-
}, e.highlightDates, e.highlightSaturday, e.highlightSunday,
|
|
1084
|
+
}, e.highlightDates, e.highlightSaturday, e.highlightSunday, q.value)), rt = Y(() => Se(ve.value.month, ve.value.year, A.value, [], {
|
|
1085
1085
|
marked: !0,
|
|
1086
1086
|
color: ""
|
|
1087
|
-
}, e.highlightDates, e.highlightSaturday, e.highlightSunday,
|
|
1088
|
-
year:
|
|
1089
|
-
month:
|
|
1090
|
-
},
|
|
1091
|
-
year:
|
|
1092
|
-
month:
|
|
1093
|
-
},
|
|
1094
|
-
const
|
|
1087
|
+
}, e.highlightDates, e.highlightSaturday, e.highlightSunday, q.value)), st = Y(() => Ze(o.value, {
|
|
1088
|
+
year: j.value.year,
|
|
1089
|
+
month: j.value.month
|
|
1090
|
+
}, te.value, ae.value)), he = Y(() => nt(j.value.year, {
|
|
1091
|
+
year: j.value.year,
|
|
1092
|
+
month: j.value.month
|
|
1093
|
+
}, ye.value, fe.value, te.value, ae.value)), it = Y(() => {
|
|
1094
|
+
const s = {
|
|
1095
1095
|
"f-datepicker-container": !0
|
|
1096
|
-
},
|
|
1097
|
-
return
|
|
1096
|
+
}, O = `container-position-${k.value}`;
|
|
1097
|
+
return s[O] = !0, s;
|
|
1098
1098
|
});
|
|
1099
|
-
|
|
1100
|
-
|
|
1099
|
+
G(() => e.enablePeriod, (s, O) => {
|
|
1100
|
+
s !== O && (b.value = s);
|
|
1101
1101
|
});
|
|
1102
|
-
function
|
|
1103
|
-
return
|
|
1102
|
+
function ut() {
|
|
1103
|
+
return b.value ? "" : e.showTime ? "487px" : "287px";
|
|
1104
1104
|
}
|
|
1105
|
-
const
|
|
1105
|
+
const dt = Y(() => ({
|
|
1106
1106
|
top: `${f.value}px`,
|
|
1107
|
-
left: `${
|
|
1108
|
-
width:
|
|
1107
|
+
left: `${B.value}px`,
|
|
1108
|
+
width: ut(),
|
|
1109
1109
|
// 'position': displayMode.value === 'Embedded' ? 'relative' : 'absolute',
|
|
1110
1110
|
position: "relative",
|
|
1111
|
-
"z-index":
|
|
1111
|
+
"z-index": u.value === "Embedded" ? 0 : 9999,
|
|
1112
1112
|
"margin-top": "0px"
|
|
1113
1113
|
}));
|
|
1114
|
-
function
|
|
1114
|
+
function xa(s) {
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1117
|
-
|
|
1116
|
+
function ct(s) {
|
|
1117
|
+
s.stopPropagation();
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
const
|
|
1121
|
-
year:
|
|
1122
|
-
month:
|
|
1123
|
-
displayTextOfMonth: o.value[
|
|
1124
|
-
displayTextOfYear: `${
|
|
1119
|
+
function yt(s, O) {
|
|
1120
|
+
const w = j.value.year - (v.value ? 10 : 1), L = {
|
|
1121
|
+
year: w,
|
|
1122
|
+
month: j.value.month,
|
|
1123
|
+
displayTextOfMonth: o.value[j.value.month || "1"],
|
|
1124
|
+
displayTextOfYear: `${w}`
|
|
1125
1125
|
};
|
|
1126
|
-
|
|
1127
|
-
}
|
|
1128
|
-
function
|
|
1129
|
-
const
|
|
1130
|
-
year:
|
|
1131
|
-
month:
|
|
1132
|
-
displayTextOfMonth: o.value[
|
|
1133
|
-
displayTextOfYear: `${
|
|
1126
|
+
j.value = L;
|
|
1127
|
+
}
|
|
1128
|
+
function me(s, O) {
|
|
1129
|
+
const w = tt(j.value.month, j.value.year), L = {
|
|
1130
|
+
year: w.year || 1,
|
|
1131
|
+
month: w.month || 1,
|
|
1132
|
+
displayTextOfMonth: o.value[w.month || "1"],
|
|
1133
|
+
displayTextOfYear: `${w.year}`
|
|
1134
1134
|
};
|
|
1135
|
-
|
|
1136
|
-
}
|
|
1137
|
-
function
|
|
1138
|
-
const
|
|
1139
|
-
year:
|
|
1140
|
-
month:
|
|
1141
|
-
displayTextOfMonth: o.value[
|
|
1142
|
-
displayTextOfYear: `${
|
|
1135
|
+
j.value = L;
|
|
1136
|
+
}
|
|
1137
|
+
function be(s, O) {
|
|
1138
|
+
const w = et(j.value.month, j.value.year), L = {
|
|
1139
|
+
year: w.year || 1,
|
|
1140
|
+
month: w.month || 1,
|
|
1141
|
+
displayTextOfMonth: o.value[w.month || "1"],
|
|
1142
|
+
displayTextOfYear: `${w.year}`
|
|
1143
1143
|
};
|
|
1144
|
-
|
|
1144
|
+
j.value = L;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1147
|
-
let
|
|
1148
|
-
|
|
1146
|
+
function ft(s, O) {
|
|
1147
|
+
let w = j.value.year + 1;
|
|
1148
|
+
v.value && (w = he.value[3][0].year + 2);
|
|
1149
1149
|
const L = {
|
|
1150
|
-
year:
|
|
1151
|
-
month:
|
|
1152
|
-
displayTextOfMonth: o.value[
|
|
1153
|
-
displayTextOfYear: `${
|
|
1150
|
+
year: w,
|
|
1151
|
+
month: j.value.month,
|
|
1152
|
+
displayTextOfMonth: o.value[j.value.month || "1"],
|
|
1153
|
+
displayTextOfYear: `${w}`
|
|
1154
1154
|
};
|
|
1155
|
-
|
|
1155
|
+
j.value = L;
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
|
|
1157
|
+
function vt(s) {
|
|
1158
|
+
l.value = !l.value, v.value = !1;
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1161
|
-
|
|
1160
|
+
function ht(s) {
|
|
1161
|
+
l.value = M.value === "month" ? !l.value : !1, v.value = M.value === "year" ? !0 : !v.value;
|
|
1162
1162
|
}
|
|
1163
|
-
const
|
|
1164
|
-
"active-month":
|
|
1165
|
-
"date-format":
|
|
1166
|
-
"disable-pre-page":
|
|
1163
|
+
const mt = Y(() => ({
|
|
1164
|
+
"active-month": j.value,
|
|
1165
|
+
"date-format": g.value,
|
|
1166
|
+
"disable-pre-page": F.value,
|
|
1167
1167
|
"disable-pre-record": I.value,
|
|
1168
|
-
"disable-next-record":
|
|
1169
|
-
"disable-next-page":
|
|
1170
|
-
years:
|
|
1171
|
-
"selecting-month":
|
|
1172
|
-
"selecting-year":
|
|
1173
|
-
"select-mode":
|
|
1174
|
-
})),
|
|
1175
|
-
"active-month":
|
|
1176
|
-
"date-format":
|
|
1177
|
-
"disable-pre-page":
|
|
1168
|
+
"disable-next-record": D.value,
|
|
1169
|
+
"disable-next-page": y.value,
|
|
1170
|
+
years: he.value,
|
|
1171
|
+
"selecting-month": l.value,
|
|
1172
|
+
"selecting-year": v.value,
|
|
1173
|
+
"select-mode": M.value
|
|
1174
|
+
})), bt = Y(() => ({
|
|
1175
|
+
"active-month": ve.value,
|
|
1176
|
+
"date-format": g.value,
|
|
1177
|
+
"disable-pre-page": T.value,
|
|
1178
1178
|
"disable-pre-record": $.value,
|
|
1179
1179
|
"disable-next-record": V.value,
|
|
1180
1180
|
"disable-next-page": z.value,
|
|
1181
|
-
years:
|
|
1182
|
-
"selecting-month":
|
|
1183
|
-
"selecting-year":
|
|
1184
|
-
"select-mode":
|
|
1181
|
+
years: t.value,
|
|
1182
|
+
"selecting-month": P.value,
|
|
1183
|
+
"selecting-year": h.value,
|
|
1184
|
+
"select-mode": M.value
|
|
1185
1185
|
}));
|
|
1186
|
-
function
|
|
1187
|
-
return
|
|
1188
|
-
onPrePage: (
|
|
1189
|
-
onPreRecord: (
|
|
1190
|
-
onNextRecord: (
|
|
1191
|
-
onNextPage: (
|
|
1192
|
-
onClickMonth: (
|
|
1193
|
-
onClickYear: (
|
|
1186
|
+
function Be(s, O) {
|
|
1187
|
+
return c(pe, ue(O, {
|
|
1188
|
+
onPrePage: (w) => yt(),
|
|
1189
|
+
onPreRecord: (w) => me(),
|
|
1190
|
+
onNextRecord: (w) => be(),
|
|
1191
|
+
onNextPage: (w) => ft(),
|
|
1192
|
+
onClickMonth: (w) => vt(),
|
|
1193
|
+
onClickYear: (w) => ht()
|
|
1194
1194
|
}), null);
|
|
1195
1195
|
}
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
year:
|
|
1200
|
-
month:
|
|
1201
|
-
displayTextOfMonth: o.value[
|
|
1202
|
-
displayTextOfYear: `${
|
|
1196
|
+
const se = Y(() => !l.value && !v.value && !m.value || b.value && M.value !== "week" && !P.value && !h.value && !m.value), Mt = Y(() => l.value && !v.value), gt = Y(() => v.value && !l.value);
|
|
1197
|
+
Lt(() => {
|
|
1198
|
+
se.value && (j.value = {
|
|
1199
|
+
year: _.value.year || 1,
|
|
1200
|
+
month: _.value.month || 1,
|
|
1201
|
+
displayTextOfMonth: o.value[_.value.month || "1"],
|
|
1202
|
+
displayTextOfYear: `${_.value.year}`
|
|
1203
1203
|
});
|
|
1204
1204
|
});
|
|
1205
|
-
const
|
|
1206
|
-
dates:
|
|
1207
|
-
daysInWeek:
|
|
1208
|
-
enableKeyboadNavigate:
|
|
1209
|
-
enableMarkCurrent:
|
|
1210
|
-
enablePeriod:
|
|
1211
|
-
firstDayOfTheWeek:
|
|
1212
|
-
selected:
|
|
1205
|
+
const pt = Y(() => ({
|
|
1206
|
+
dates: lt.value,
|
|
1207
|
+
daysInWeek: K.value,
|
|
1208
|
+
enableKeyboadNavigate: N.value,
|
|
1209
|
+
enableMarkCurrent: R.value,
|
|
1210
|
+
enablePeriod: b.value,
|
|
1211
|
+
firstDayOfTheWeek: A.value,
|
|
1212
|
+
selected: W.value,
|
|
1213
1213
|
selectedPeriod: S.value,
|
|
1214
|
-
selectedWeek:
|
|
1215
|
-
selectMode:
|
|
1216
|
-
showWeekNumber:
|
|
1217
|
-
weekTitle:
|
|
1218
|
-
})),
|
|
1219
|
-
dates:
|
|
1220
|
-
daysInWeek:
|
|
1221
|
-
enableKeyboadNavigate:
|
|
1222
|
-
enableMarkCurrent:
|
|
1223
|
-
enablePeriod:
|
|
1224
|
-
firstDayOfTheWeek:
|
|
1225
|
-
selected:
|
|
1214
|
+
selectedWeek: C.value,
|
|
1215
|
+
selectMode: M.value,
|
|
1216
|
+
showWeekNumber: q.value,
|
|
1217
|
+
weekTitle: H.value
|
|
1218
|
+
})), kt = Y(() => ({
|
|
1219
|
+
dates: rt.value,
|
|
1220
|
+
daysInWeek: K.value,
|
|
1221
|
+
enableKeyboadNavigate: N.value,
|
|
1222
|
+
enableMarkCurrent: R.value,
|
|
1223
|
+
enablePeriod: b.value,
|
|
1224
|
+
firstDayOfTheWeek: A.value,
|
|
1225
|
+
selected: n.value,
|
|
1226
1226
|
selectedPeriod: S.value,
|
|
1227
|
-
selectMode:
|
|
1228
|
-
showWeekNumber:
|
|
1229
|
-
weekTitle:
|
|
1227
|
+
selectMode: M.value,
|
|
1228
|
+
showWeekNumber: q.value,
|
|
1229
|
+
weekTitle: H.value
|
|
1230
1230
|
}));
|
|
1231
|
-
function
|
|
1231
|
+
function Dt(s, O, w) {
|
|
1232
1232
|
const {
|
|
1233
1233
|
event: L,
|
|
1234
|
-
dayItem:
|
|
1235
|
-
} =
|
|
1236
|
-
if (
|
|
1237
|
-
|
|
1234
|
+
dayItem: ne
|
|
1235
|
+
} = s, le = ne.date;
|
|
1236
|
+
if (ne.tag === 1 ? me() : ne.tag === 3 && be(), !e.showTime)
|
|
1237
|
+
w === "start" ? W.value = le : n.value = le, r.emit("datePicked", le);
|
|
1238
1238
|
else {
|
|
1239
1239
|
const {
|
|
1240
|
-
year:
|
|
1241
|
-
month:
|
|
1242
|
-
day:
|
|
1243
|
-
} =
|
|
1244
|
-
|
|
1240
|
+
year: At,
|
|
1241
|
+
month: Rt,
|
|
1242
|
+
day: Vt
|
|
1243
|
+
} = le;
|
|
1244
|
+
W.value.year = At, W.value.month = Rt, W.value.day = Vt;
|
|
1245
1245
|
}
|
|
1246
1246
|
const {
|
|
1247
|
-
year:
|
|
1248
|
-
month:
|
|
1249
|
-
} =
|
|
1250
|
-
|
|
1251
|
-
year:
|
|
1252
|
-
month:
|
|
1247
|
+
year: Ft,
|
|
1248
|
+
month: Ht
|
|
1249
|
+
} = le;
|
|
1250
|
+
_.value = {
|
|
1251
|
+
year: Ft,
|
|
1252
|
+
month: Ht
|
|
1253
1253
|
};
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Sa(s) {
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function Na(s) {
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function Ba(s, O) {
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1261
|
+
function Ya(s, O) {
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1264
|
-
return
|
|
1265
|
-
onClick: (L) =>
|
|
1263
|
+
function Ye(s, O, w = "start") {
|
|
1264
|
+
return se.value && c(ge, ue(O, {
|
|
1265
|
+
onClick: (L) => Dt(L, s, w),
|
|
1266
1266
|
onClickWeek: (L) => void 0,
|
|
1267
1267
|
onKeyDown: (L) => void 0,
|
|
1268
1268
|
onMouseEnter: (L) => void 0,
|
|
1269
1269
|
onMouseLeave: (L) => void 0
|
|
1270
1270
|
}), null);
|
|
1271
1271
|
}
|
|
1272
|
-
const
|
|
1273
|
-
months:
|
|
1274
|
-
enableMarkCurrent:
|
|
1275
|
-
enableKeyboadNavigate:
|
|
1276
|
-
enablePeriod:
|
|
1277
|
-
selected:
|
|
1272
|
+
const Pt = Y(() => ({
|
|
1273
|
+
months: st.value,
|
|
1274
|
+
enableMarkCurrent: R.value,
|
|
1275
|
+
enableKeyboadNavigate: N.value,
|
|
1276
|
+
enablePeriod: b.value,
|
|
1277
|
+
selected: _.value,
|
|
1278
1278
|
selectedPeriod: S.value
|
|
1279
|
-
})),
|
|
1280
|
-
months:
|
|
1281
|
-
enableMarkCurrent:
|
|
1282
|
-
enableKeyboadNavigate:
|
|
1283
|
-
enablePeriod:
|
|
1284
|
-
selected:
|
|
1279
|
+
})), Tt = Y(() => ({
|
|
1280
|
+
months: U.value,
|
|
1281
|
+
enableMarkCurrent: R.value,
|
|
1282
|
+
enableKeyboadNavigate: N.value,
|
|
1283
|
+
enablePeriod: b.value,
|
|
1284
|
+
selected: _.value,
|
|
1285
1285
|
selectedPeriod: S.value
|
|
1286
1286
|
}));
|
|
1287
|
-
function
|
|
1288
|
-
if (
|
|
1289
|
-
month:
|
|
1290
|
-
displayTextOfMonth: o.value[
|
|
1291
|
-
year:
|
|
1292
|
-
displayTextOfYear: `${
|
|
1293
|
-
},
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1287
|
+
function wt(s, O) {
|
|
1288
|
+
if (l.value = !1, v.value = !1, _.value = s, j.value = {
|
|
1289
|
+
month: s.month || 1,
|
|
1290
|
+
displayTextOfMonth: o.value[s.month || "1"],
|
|
1291
|
+
year: s.year || 1,
|
|
1292
|
+
displayTextOfYear: `${s.year}`
|
|
1293
|
+
}, M.value === "month") {
|
|
1294
|
+
const w = oe(s);
|
|
1295
|
+
w.day = 1, r.emit("datePicked", w);
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function Wa(s) {
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1300
|
+
function $a(s, O) {
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function Ea(s, O) {
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return
|
|
1306
|
-
onClick: (
|
|
1307
|
-
onKeyDownMonthView: (
|
|
1308
|
-
onMouseEnterMonthView: (
|
|
1309
|
-
onMouseLeaveMonthView: (
|
|
1304
|
+
function We(s, O) {
|
|
1305
|
+
return c(ke, ue(O, {
|
|
1306
|
+
onClick: (w) => wt(w),
|
|
1307
|
+
onKeyDownMonthView: (w) => void 0,
|
|
1308
|
+
onMouseEnterMonthView: (w) => void 0,
|
|
1309
|
+
onMouseLeaveMonthView: (w) => void 0
|
|
1310
1310
|
}), null);
|
|
1311
1311
|
}
|
|
1312
|
-
const
|
|
1313
|
-
years:
|
|
1314
|
-
enableKeyboadNavigate:
|
|
1315
|
-
enableMarkCurrent:
|
|
1316
|
-
enablePeriod:
|
|
1317
|
-
selected:
|
|
1312
|
+
const Ct = Y(() => ({
|
|
1313
|
+
years: he.value,
|
|
1314
|
+
enableKeyboadNavigate: N.value,
|
|
1315
|
+
enableMarkCurrent: R.value,
|
|
1316
|
+
enablePeriod: b.value,
|
|
1317
|
+
selected: W.value,
|
|
1318
1318
|
selectedPeriod: S.value
|
|
1319
|
-
})),
|
|
1320
|
-
years:
|
|
1321
|
-
enableKeyboadNavigate:
|
|
1322
|
-
enableMarkCurrent:
|
|
1323
|
-
enablePeriod:
|
|
1324
|
-
selected:
|
|
1319
|
+
})), Ot = Y(() => ({
|
|
1320
|
+
years: t.value,
|
|
1321
|
+
enableKeyboadNavigate: N.value,
|
|
1322
|
+
enableMarkCurrent: R.value,
|
|
1323
|
+
enablePeriod: b.value,
|
|
1324
|
+
selected: W.value,
|
|
1325
1325
|
selectedPeriod: S.value
|
|
1326
1326
|
}));
|
|
1327
|
-
function
|
|
1328
|
-
if (
|
|
1329
|
-
month:
|
|
1330
|
-
displayTextOfMonth:
|
|
1331
|
-
year:
|
|
1332
|
-
displayTextOfYear: `${
|
|
1333
|
-
},
|
|
1334
|
-
const
|
|
1335
|
-
|
|
1327
|
+
function xt(s, O) {
|
|
1328
|
+
if (l.value = !0, v.value = !1, j.value = {
|
|
1329
|
+
month: j.value.month,
|
|
1330
|
+
displayTextOfMonth: j.value.displayTextOfMonth,
|
|
1331
|
+
year: s.year || 1,
|
|
1332
|
+
displayTextOfYear: `${s.year}`
|
|
1333
|
+
}, M.value === "year") {
|
|
1334
|
+
const w = oe(s);
|
|
1335
|
+
w.month = 1, w.day = 1, r.emit("datePicked", w);
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1338
|
+
function ja(s) {
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function Ia(s, O) {
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Fa(s, O) {
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function St() {
|
|
1345
1345
|
if (e.showTime)
|
|
1346
|
-
|
|
1346
|
+
r.emit("confirm", W.value);
|
|
1347
1347
|
else {
|
|
1348
|
-
const
|
|
1348
|
+
const s = {
|
|
1349
1349
|
startDate: {},
|
|
1350
1350
|
endDate: {}
|
|
1351
1351
|
};
|
|
1352
|
-
|
|
1352
|
+
W.value && (s.startDate = W.value), n.value && (s.endDate = n.value), r.emit("confirm", s);
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
|
|
1355
|
+
function Nt(s) {
|
|
1356
|
+
j.value = {
|
|
1357
1357
|
year: E.year || 1,
|
|
1358
1358
|
month: E.month || 1,
|
|
1359
1359
|
displayTextOfMonth: o.value[E.month || "1"],
|
|
1360
1360
|
displayTextOfYear: `${E.year}`
|
|
1361
|
-
},
|
|
1361
|
+
}, W.value = oe(E), r.emit("datePicked", E);
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1364
|
-
|
|
1363
|
+
function Bt(s) {
|
|
1364
|
+
j.value = {
|
|
1365
1365
|
year: E.year || 1,
|
|
1366
1366
|
month: E.month || 1,
|
|
1367
1367
|
displayTextOfMonth: o.value[E.month || "1"],
|
|
1368
1368
|
displayTextOfYear: `${E.year}`
|
|
1369
|
-
},
|
|
1369
|
+
}, W.value = oe(E), _.value = {
|
|
1370
1370
|
year: E.year,
|
|
1371
1371
|
month: E.month
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1374
|
+
function Yt(s) {
|
|
1375
|
+
j.value = {
|
|
1376
1376
|
year: E.year || 1,
|
|
1377
1377
|
month: E.month || 1,
|
|
1378
1378
|
displayTextOfMonth: o.value[E.month || "1"],
|
|
1379
1379
|
displayTextOfYear: `${E.year}`
|
|
1380
|
-
},
|
|
1381
|
-
}
|
|
1382
|
-
const
|
|
1383
|
-
function
|
|
1384
|
-
return
|
|
1385
|
-
onClick: (
|
|
1386
|
-
onKeyDownYearView: (
|
|
1387
|
-
onClickPreRecord: (
|
|
1388
|
-
onClickNextRecord: (
|
|
1389
|
-
onMouseEnterYearView: (
|
|
1390
|
-
onMouseLeaveYearView: (
|
|
1380
|
+
}, W.value = oe(E);
|
|
1381
|
+
}
|
|
1382
|
+
const $e = Y(() => b.value && M.value !== "week"), Wt = Y(() => se.value && $e.value || e.showTime);
|
|
1383
|
+
function Ee(s, O) {
|
|
1384
|
+
return c(De, ue(O, {
|
|
1385
|
+
onClick: (w) => xt(w),
|
|
1386
|
+
onKeyDownYearView: (w) => void 0,
|
|
1387
|
+
onClickPreRecord: (w) => me(),
|
|
1388
|
+
onClickNextRecord: (w) => be(),
|
|
1389
|
+
onMouseEnterYearView: (w) => void 0,
|
|
1390
|
+
onMouseLeaveYearView: (w) => void 0
|
|
1391
1391
|
}), null);
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1394
|
-
const
|
|
1395
|
-
if (
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1393
|
+
function $t() {
|
|
1394
|
+
const s = "HH:mm:ss";
|
|
1395
|
+
if (x.value) {
|
|
1396
|
+
const O = xe(x.value, d.value);
|
|
1397
|
+
p.value = Oe(O || "", s) || "00:00:00", W.value && (W.value.hour = (O == null ? void 0 : O.getHours()) || 0, W.value.minute = (O == null ? void 0 : O.getMinutes()) || 0, W.value.second = (O == null ? void 0 : O.getSeconds()) || 0);
|
|
1398
1398
|
} else {
|
|
1399
1399
|
const {
|
|
1400
|
-
hour:
|
|
1401
|
-
minute:
|
|
1400
|
+
hour: O,
|
|
1401
|
+
minute: w,
|
|
1402
1402
|
second: L
|
|
1403
|
-
} =
|
|
1404
|
-
|
|
1403
|
+
} = W.value;
|
|
1404
|
+
p.value = `${O || "0"}:${w || 0}:${L || 0}`, p.value = Ut(p.value);
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
|
-
|
|
1408
|
-
e.showTime &&
|
|
1407
|
+
He(() => {
|
|
1408
|
+
e.showTime && $t(), M.value === "month" ? (l.value = !0, v.value = !1) : M.value === "year" && (v.value = !0, l.value = !1);
|
|
1409
1409
|
});
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1410
|
+
const Et = (s) => {
|
|
1411
|
+
p.value = s.text;
|
|
1412
1412
|
const {
|
|
1413
|
-
hour:
|
|
1414
|
-
minute:
|
|
1413
|
+
hour: O,
|
|
1414
|
+
minute: w,
|
|
1415
1415
|
second: L
|
|
1416
|
-
} =
|
|
1417
|
-
|
|
1418
|
-
},
|
|
1419
|
-
const
|
|
1420
|
-
year:
|
|
1421
|
-
month:
|
|
1422
|
-
day:
|
|
1416
|
+
} = Xt(p.value);
|
|
1417
|
+
W.value && (W.value.hour = O || 0, W.value.minute = w || 0, W.value.second = L || 0);
|
|
1418
|
+
}, je = Y(() => (s) => {
|
|
1419
|
+
const O = s.day == null || Ce.isDisabledDate(e.showTime ? s : {
|
|
1420
|
+
year: s.year,
|
|
1421
|
+
month: s.month,
|
|
1422
|
+
day: s.day
|
|
1423
1423
|
});
|
|
1424
1424
|
return {
|
|
1425
|
-
"pointer-events":
|
|
1426
|
-
opacity:
|
|
1425
|
+
"pointer-events": O ? "none" : "auto",
|
|
1426
|
+
opacity: O ? 0.3 : 1
|
|
1427
1427
|
};
|
|
1428
|
-
}),
|
|
1428
|
+
}), jt = Y(() => {
|
|
1429
1429
|
const {
|
|
1430
|
-
year:
|
|
1431
|
-
month:
|
|
1432
|
-
} = E,
|
|
1430
|
+
year: s,
|
|
1431
|
+
month: O
|
|
1432
|
+
} = E, w = {
|
|
1433
|
+
year: te.value.year,
|
|
1434
|
+
month: te.value.month,
|
|
1435
|
+
day: te.value.day
|
|
1436
|
+
}, L = {
|
|
1433
1437
|
year: ae.value.year,
|
|
1434
1438
|
month: ae.value.month,
|
|
1435
1439
|
day: ae.value.day
|
|
1436
|
-
},
|
|
1437
|
-
year:
|
|
1438
|
-
month:
|
|
1439
|
-
day: ne.value.day
|
|
1440
|
-
}, oe = lt({
|
|
1441
|
-
year: m,
|
|
1442
|
-
month: x,
|
|
1440
|
+
}, ne = Xe({
|
|
1441
|
+
year: s,
|
|
1442
|
+
month: O,
|
|
1443
1443
|
day: 1
|
|
1444
|
-
},
|
|
1445
|
-
year:
|
|
1446
|
-
month:
|
|
1447
|
-
day:
|
|
1444
|
+
}, w) || Ge({
|
|
1445
|
+
year: s,
|
|
1446
|
+
month: O,
|
|
1447
|
+
day: at(O || 0, s || 0)
|
|
1448
1448
|
}, L);
|
|
1449
1449
|
return {
|
|
1450
|
-
"pointer-events":
|
|
1451
|
-
opacity:
|
|
1450
|
+
"pointer-events": ne ? "none" : "auto",
|
|
1451
|
+
opacity: ne ? 0.3 : 1
|
|
1452
1452
|
};
|
|
1453
|
-
}),
|
|
1454
|
-
const
|
|
1453
|
+
}), It = Y(() => {
|
|
1454
|
+
const s = E.year ? E.year >= ye.value && E.year <= fe.value : !1;
|
|
1455
1455
|
return {
|
|
1456
|
-
"pointer-events":
|
|
1457
|
-
opacity:
|
|
1456
|
+
"pointer-events": s ? "auto" : "none",
|
|
1457
|
+
opacity: s ? 1 : 0.3
|
|
1458
1458
|
};
|
|
1459
1459
|
});
|
|
1460
|
-
return () =>
|
|
1461
|
-
class:
|
|
1462
|
-
style:
|
|
1460
|
+
return () => c("div", {
|
|
1461
|
+
class: it.value,
|
|
1462
|
+
style: dt.value,
|
|
1463
1463
|
tabindex: "0",
|
|
1464
|
-
onKeyup: (
|
|
1465
|
-
onClick: (
|
|
1466
|
-
}, [
|
|
1464
|
+
onKeyup: (s) => void 0,
|
|
1465
|
+
onClick: (s) => ct(s)
|
|
1466
|
+
}, [c("div", {
|
|
1467
1467
|
class: "f-datepicker-content",
|
|
1468
1468
|
style: "width:287px"
|
|
1469
|
-
}, [
|
|
1469
|
+
}, [Be(!1, mt.value), Ye(!1, pt.value), l.value && We(!1, Pt.value), v.value && Ee(!1, Ct.value), c("div", {
|
|
1470
1470
|
class: "f-datepicker-footer"
|
|
1471
|
-
}, [
|
|
1471
|
+
}, [c("div", {
|
|
1472
1472
|
class: "f-datepicker-redirect"
|
|
1473
|
-
}, [
|
|
1473
|
+
}, [se.value && c("button", {
|
|
1474
1474
|
class: "btn btn-link",
|
|
1475
|
-
style:
|
|
1476
|
-
onClick:
|
|
1477
|
-
}, [
|
|
1475
|
+
style: je.value(E),
|
|
1476
|
+
onClick: Nt
|
|
1477
|
+
}, [ie("今天")]), Mt.value && c("button", {
|
|
1478
1478
|
class: "btn btn-link",
|
|
1479
|
-
style:
|
|
1480
|
-
onClick:
|
|
1481
|
-
}, [
|
|
1479
|
+
style: jt.value,
|
|
1480
|
+
onClick: Bt
|
|
1481
|
+
}, [ie("本月")]), gt.value && c("button", {
|
|
1482
1482
|
class: "btn btn-link",
|
|
1483
|
-
style:
|
|
1484
|
-
onClick:
|
|
1485
|
-
}, [
|
|
1483
|
+
style: It.value,
|
|
1484
|
+
onClick: Yt
|
|
1485
|
+
}, [ie("今年")])])])]), e.showTime && c("div", {
|
|
1486
1486
|
class: "f-datepicker-content position-relative datepicker-content-has-timer",
|
|
1487
1487
|
style: "width:200px"
|
|
1488
|
-
}, [
|
|
1488
|
+
}, [c("div", {
|
|
1489
1489
|
style: "height: 40px; border-bottom: 1px solid #E4E7EF; text-align: center; line-height: 40px; font-size: 16px; font-weight: 500;"
|
|
1490
|
-
}, [
|
|
1490
|
+
}, [p.value]), c(Kt, {
|
|
1491
1491
|
style: "top:41px;",
|
|
1492
|
-
ref:
|
|
1493
|
-
modelValue:
|
|
1494
|
-
onValueChange:
|
|
1495
|
-
}, null)]),
|
|
1492
|
+
ref: i,
|
|
1493
|
+
modelValue: p.value,
|
|
1494
|
+
onValueChange: Et
|
|
1495
|
+
}, null)]), $e.value && c("div", {
|
|
1496
1496
|
class: "f-datepicker-content"
|
|
1497
|
-
}, [
|
|
1497
|
+
}, [Be(!0, bt.value), Ye(!0, kt.value, "end"), P.value && We(!0, Tt.value), h.value && Ee(!0, Ot.value)]), Wt.value && c("div", {
|
|
1498
1498
|
class: "f-datepicker-commitBtn-wrapper",
|
|
1499
1499
|
style: "justify-content: end;"
|
|
1500
|
-
}, [
|
|
1501
|
-
onClick:
|
|
1502
|
-
style:
|
|
1500
|
+
}, [c(_t, {
|
|
1501
|
+
onClick: St,
|
|
1502
|
+
style: je.value(W.value)
|
|
1503
1503
|
}, {
|
|
1504
|
-
default: () => [
|
|
1504
|
+
default: () => [ie("确定")]
|
|
1505
1505
|
})])]);
|
|
1506
1506
|
}
|
|
1507
|
-
}),
|
|
1508
|
-
function Qe(e) {
|
|
1509
|
-
const { properties: t, title: l, ignore: c } = e, r = c && Array.isArray(c), f = Object.keys(t).reduce((g, v) => ((!r || !c.find((h) => h === v)) && (g[v] = t[v].type === "object" && t[v].properties ? Qe(t[v]) : te(t[v].default)), g), {});
|
|
1510
|
-
if (l && (!r || !c.find((g) => g === "id"))) {
|
|
1511
|
-
const g = l.toLowerCase().replace(/-/g, "_");
|
|
1512
|
-
f.id = `${g}_${Math.random().toString().slice(2, 6)}`;
|
|
1513
|
-
}
|
|
1514
|
-
return f;
|
|
1515
|
-
}
|
|
1516
|
-
function $a(e, t) {
|
|
1517
|
-
const l = Qe(t);
|
|
1518
|
-
return Object.keys(l).reduce((c, r) => (Object.prototype.hasOwnProperty.call(e, r) && (c[r] && Re(c[r]) && Re(e[r] || !e[r]) ? Object.assign(c[r], e[r] || {}) : c[r] = e[r]), c), l), l;
|
|
1519
|
-
}
|
|
1520
|
-
function Ze(e, t) {
|
|
1521
|
-
return Object.keys(e).filter((c) => e[c] != null).reduce((c, r) => {
|
|
1522
|
-
if (t.has(r)) {
|
|
1523
|
-
const f = t.get(r);
|
|
1524
|
-
if (typeof f == "string")
|
|
1525
|
-
c[f] = e[r];
|
|
1526
|
-
else {
|
|
1527
|
-
const g = f(r, e[r], e);
|
|
1528
|
-
Object.assign(c, g);
|
|
1529
|
-
}
|
|
1530
|
-
} else
|
|
1531
|
-
c[r] = e[r];
|
|
1532
|
-
return c;
|
|
1533
|
-
}, {});
|
|
1534
|
-
}
|
|
1535
|
-
function ja(e, t, l = /* @__PURE__ */ new Map()) {
|
|
1536
|
-
const c = $a(e, t);
|
|
1537
|
-
return Ze(c, l);
|
|
1538
|
-
}
|
|
1539
|
-
function Ea(e = {}) {
|
|
1540
|
-
function t(i, y, o, u) {
|
|
1541
|
-
if (typeof o == "number")
|
|
1542
|
-
return u[i].length === o;
|
|
1543
|
-
if (typeof o == "object") {
|
|
1544
|
-
const a = Object.keys(o)[0], d = o[a];
|
|
1545
|
-
if (a === "not")
|
|
1546
|
-
return Number(u[i].length) !== Number(d);
|
|
1547
|
-
if (a === "moreThan")
|
|
1548
|
-
return Number(u[i].length) >= Number(d);
|
|
1549
|
-
if (a === "lessThan")
|
|
1550
|
-
return Number(u[i].length) <= Number(d);
|
|
1551
|
-
}
|
|
1552
|
-
return !1;
|
|
1553
|
-
}
|
|
1554
|
-
function l(i, y, o, u) {
|
|
1555
|
-
return u[i] && u[i].propertyValue && String(u[i].propertyValue.value) === String(o);
|
|
1556
|
-
}
|
|
1557
|
-
const c = /* @__PURE__ */ new Map([
|
|
1558
|
-
["length", t],
|
|
1559
|
-
["getProperty", l]
|
|
1560
|
-
]);
|
|
1561
|
-
Object.keys(e).reduce((i, y) => (i.set(y, e[y]), i), c);
|
|
1562
|
-
function r(i, y) {
|
|
1563
|
-
const o = i;
|
|
1564
|
-
return typeof y == "number" ? [{ target: o, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: o, operator: "getProperty", param: i, value: !!y }] : typeof y == "object" ? Object.keys(y).map((u) => {
|
|
1565
|
-
if (u === "length")
|
|
1566
|
-
return { target: o, operator: "length", param: null, value: y[u] };
|
|
1567
|
-
const a = u, d = y[u];
|
|
1568
|
-
return { target: o, operator: "getProperty", param: a, value: d };
|
|
1569
|
-
}) : [];
|
|
1570
|
-
}
|
|
1571
|
-
function f(i) {
|
|
1572
|
-
return Object.keys(i).reduce((o, u) => {
|
|
1573
|
-
const a = r(u, i[u]);
|
|
1574
|
-
return o.push(...a), o;
|
|
1575
|
-
}, []);
|
|
1576
|
-
}
|
|
1577
|
-
function g(i, y) {
|
|
1578
|
-
if (c.has(i.operator)) {
|
|
1579
|
-
const o = c.get(i.operator);
|
|
1580
|
-
return o && o(i.target, i.param, i.value, y) || !1;
|
|
1581
|
-
}
|
|
1582
|
-
return !1;
|
|
1583
|
-
}
|
|
1584
|
-
function v(i, y) {
|
|
1585
|
-
return f(i).reduce((a, d) => a && g(d, y), !0);
|
|
1586
|
-
}
|
|
1587
|
-
function h(i, y) {
|
|
1588
|
-
const o = Object.keys(i), u = o.includes("allOf"), a = o.includes("anyOf"), d = u || a, p = (d ? i[d ? u ? "allOf" : "anyOf" : "allOf"] : [i]).map((j) => v(j, y));
|
|
1589
|
-
return u ? !p.includes(!1) : p.includes(!0);
|
|
1590
|
-
}
|
|
1591
|
-
return { parseValueSchema: h };
|
|
1592
|
-
}
|
|
1593
|
-
const Ha = {}, Ia = {};
|
|
1594
|
-
Ea();
|
|
1595
|
-
function Wa(e, t, l = /* @__PURE__ */ new Map(), c = (g, v, h, i) => v, r = {}, f = (g) => g) {
|
|
1596
|
-
return Fa[t.title] = t, Ya[t.title] = c, Ha[t.title] = r, Ia[t.title] = f, (g = {}, v = !0) => {
|
|
1597
|
-
if (!v)
|
|
1598
|
-
return Ze(g, l);
|
|
1599
|
-
const h = ja(g, t, l), i = Object.keys(e).reduce((y, o) => (y[o] = e[o].default, y), {});
|
|
1600
|
-
return Object.assign(i, h);
|
|
1601
|
-
};
|
|
1602
|
-
}
|
|
1603
|
-
const Ra = "https://json-schema.org/draft/2020-12/schema", Aa = "https://farris-design.gitee.io/date-picker.schema.json", Va = "date-picker", La = "A Farris Input Component", _a = "object", qa = {
|
|
1604
|
-
id: {
|
|
1605
|
-
description: "The unique identifier for date picker",
|
|
1606
|
-
type: "string"
|
|
1607
|
-
},
|
|
1608
|
-
type: {
|
|
1609
|
-
description: "The type string of date picker",
|
|
1610
|
-
type: "string",
|
|
1611
|
-
default: "date-picker"
|
|
1612
|
-
},
|
|
1613
|
-
appearance: {
|
|
1614
|
-
description: "",
|
|
1615
|
-
type: "object",
|
|
1616
|
-
properties: {
|
|
1617
|
-
class: {
|
|
1618
|
-
type: "string"
|
|
1619
|
-
},
|
|
1620
|
-
style: {
|
|
1621
|
-
type: "string"
|
|
1622
|
-
}
|
|
1623
|
-
},
|
|
1624
|
-
default: {}
|
|
1625
|
-
},
|
|
1626
|
-
binding: {
|
|
1627
|
-
description: "",
|
|
1628
|
-
type: "object",
|
|
1629
|
-
default: {}
|
|
1630
|
-
},
|
|
1631
|
-
disabled: {
|
|
1632
|
-
type: "string",
|
|
1633
|
-
default: !1
|
|
1634
|
-
},
|
|
1635
|
-
editable: {
|
|
1636
|
-
description: "",
|
|
1637
|
-
type: "boolean",
|
|
1638
|
-
default: !1
|
|
1639
|
-
},
|
|
1640
|
-
placeholder: {
|
|
1641
|
-
description: "",
|
|
1642
|
-
type: "string",
|
|
1643
|
-
default: "请选择日期"
|
|
1644
|
-
},
|
|
1645
|
-
readonly: {
|
|
1646
|
-
description: "",
|
|
1647
|
-
type: "boolean",
|
|
1648
|
-
default: !1
|
|
1649
|
-
},
|
|
1650
|
-
required: {
|
|
1651
|
-
description: "",
|
|
1652
|
-
type: "boolean",
|
|
1653
|
-
default: !1
|
|
1654
|
-
},
|
|
1655
|
-
tabindex: {
|
|
1656
|
-
description: "",
|
|
1657
|
-
type: "number",
|
|
1658
|
-
default: -1
|
|
1659
|
-
},
|
|
1660
|
-
visible: {
|
|
1661
|
-
description: "",
|
|
1662
|
-
type: "boolean",
|
|
1663
|
-
default: !0
|
|
1664
|
-
},
|
|
1665
|
-
displayFormat: {
|
|
1666
|
-
description: "",
|
|
1667
|
-
type: "enum",
|
|
1668
|
-
default: "yyyy-MM-dd"
|
|
1669
|
-
},
|
|
1670
|
-
valueFormat: {
|
|
1671
|
-
description: "",
|
|
1672
|
-
type: "enum",
|
|
1673
|
-
default: "yyyy-MM-dd"
|
|
1674
|
-
},
|
|
1675
|
-
maxDate: {
|
|
1676
|
-
description: "",
|
|
1677
|
-
type: "string"
|
|
1678
|
-
},
|
|
1679
|
-
minDate: {
|
|
1680
|
-
description: "",
|
|
1681
|
-
type: "string"
|
|
1682
|
-
},
|
|
1683
|
-
showTime: {
|
|
1684
|
-
description: "",
|
|
1685
|
-
type: "boolean",
|
|
1686
|
-
default: !1
|
|
1687
|
-
}
|
|
1688
|
-
}, za = [
|
|
1689
|
-
"type"
|
|
1690
|
-
], Ua = [
|
|
1691
|
-
"id",
|
|
1692
|
-
"appearance",
|
|
1693
|
-
"binding",
|
|
1694
|
-
"visible"
|
|
1695
|
-
], Ga = {
|
|
1696
|
-
$schema: Ra,
|
|
1697
|
-
$id: Aa,
|
|
1698
|
-
title: Va,
|
|
1699
|
-
description: La,
|
|
1700
|
-
type: _a,
|
|
1701
|
-
properties: qa,
|
|
1702
|
-
required: za,
|
|
1703
|
-
ignore: Ua
|
|
1704
|
-
}, Xa = { year: 9999, month: 12, day: 31, hour: 23, minute: 59, second: 59 }, Ka = { year: 1900, month: 1, day: 1, hour: 0, minute: 0, second: 0 }, ue = {
|
|
1507
|
+
}), Ta = { year: 9999, month: 12, day: 31, hour: 23, minute: 59, second: 59 }, wa = { year: 1900, month: 1, day: 1, hour: 0, minute: 0, second: 0 }, Ke = {
|
|
1705
1508
|
/** 允许编辑 */
|
|
1706
1509
|
editable: { type: Boolean, default: !1 },
|
|
1707
1510
|
/** 禁用 */
|
|
@@ -1735,7 +1538,7 @@ const Ra = "https://json-schema.org/draft/2020-12/schema", Aa = "https://farris-
|
|
|
1735
1538
|
/** 组件值 */
|
|
1736
1539
|
modelValue: { type: String, default: "" },
|
|
1737
1540
|
/** 每月缩写 */
|
|
1738
|
-
nameOfMonths: { Type: Object, default:
|
|
1541
|
+
nameOfMonths: { Type: Object, default: Ae },
|
|
1739
1542
|
/** 定界符 */
|
|
1740
1543
|
// periodDelimiter: { Type: String, default: '' },
|
|
1741
1544
|
/** 显示方式 */
|
|
@@ -1774,10 +1577,8 @@ const Ra = "https://json-schema.org/draft/2020-12/schema", Aa = "https://farris-
|
|
|
1774
1577
|
showPeriod: { type: Boolean, default: !0 },
|
|
1775
1578
|
/** 启用删除 */
|
|
1776
1579
|
enableClear: { type: Boolean, default: !0 }
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1779
|
-
}), et = Wa(ue, Ga, ze, Ue), Qa = {
|
|
1780
|
-
...ue,
|
|
1580
|
+
}, Ca = {
|
|
1581
|
+
...Ke,
|
|
1781
1582
|
/** 显示第二个日期输入框 */
|
|
1782
1583
|
showEndDate: { type: Boolean, default: !0 },
|
|
1783
1584
|
/** 显示中间图标 */
|
|
@@ -1792,79 +1593,79 @@ const Ra = "https://json-schema.org/draft/2020-12/schema", Aa = "https://farris-
|
|
|
1792
1593
|
showPeriod: { type: Boolean, default: !0 },
|
|
1793
1594
|
/** 启用删除 */
|
|
1794
1595
|
enableClear: { type: Boolean, default: !0 }
|
|
1795
|
-
},
|
|
1596
|
+
}, Oa = /* @__PURE__ */ ee({
|
|
1796
1597
|
name: "FDateRange",
|
|
1797
|
-
props:
|
|
1598
|
+
props: Ca,
|
|
1798
1599
|
emits: ["update:modelValue", "confirm"],
|
|
1799
|
-
setup(e,
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
const
|
|
1803
|
-
formatTo:
|
|
1804
|
-
} =
|
|
1805
|
-
var
|
|
1806
|
-
return
|
|
1807
|
-
}),
|
|
1808
|
-
var
|
|
1809
|
-
return
|
|
1810
|
-
}), I =
|
|
1600
|
+
setup(e, r) {
|
|
1601
|
+
const i = a(e.modelValue), p = a(e.maxYear), u = a(e.minYear), f = a(e.highlightSaturday), B = a(e.highlightSunday), k = a(e.nameOfMonths), b = a(e.highlightDates), M = a(e.showWeekNumber), g = a(e.selectMode), o = a(e.disableWeekends), d = a(e.disableWeekdays);
|
|
1602
|
+
a([e.disableSince]);
|
|
1603
|
+
const t = a([e.disableUntil]), l = a(!1), P = a(), v = a(), {
|
|
1604
|
+
formatTo: h
|
|
1605
|
+
} = Pe(), m = Y(() => {
|
|
1606
|
+
var N;
|
|
1607
|
+
return h((N = i.value.split("~")) == null ? void 0 : N[0], e.displayFormat);
|
|
1608
|
+
}), F = Y(() => {
|
|
1609
|
+
var N;
|
|
1610
|
+
return h((N = i.value.split("~")) == null ? void 0 : N[1], e.displayFormat);
|
|
1611
|
+
}), I = Y(() => ({
|
|
1811
1612
|
"f-button-edit": !0,
|
|
1812
1613
|
"f-cmp-inputgroup": !0,
|
|
1813
1614
|
"f-button-edit-nowrap": !0
|
|
1814
|
-
})),
|
|
1615
|
+
})), D = Y(() => ({
|
|
1815
1616
|
"f-cmp-inputgroup": !0,
|
|
1816
1617
|
"input-group": !0,
|
|
1817
1618
|
// 'f-state-disable': disabled.value,
|
|
1818
1619
|
"f-state-editable": !0
|
|
1819
1620
|
// 'f-state-readonly': readonly.value,
|
|
1820
1621
|
// 'f-state-focus': hasFocused.value
|
|
1821
|
-
})),
|
|
1822
|
-
var
|
|
1823
|
-
(
|
|
1824
|
-
},
|
|
1825
|
-
|
|
1826
|
-
|
|
1622
|
+
})), y = () => {
|
|
1623
|
+
var N;
|
|
1624
|
+
(N = P.value) == null || N.show(v.value);
|
|
1625
|
+
}, T = () => {
|
|
1626
|
+
l.value = !l.value, setTimeout(() => {
|
|
1627
|
+
l.value && y();
|
|
1827
1628
|
});
|
|
1828
1629
|
}, $ = () => {
|
|
1829
|
-
|
|
1630
|
+
l.value = !1;
|
|
1830
1631
|
};
|
|
1831
1632
|
function V() {
|
|
1832
1633
|
document.body.click();
|
|
1833
1634
|
}
|
|
1834
|
-
const z = (
|
|
1635
|
+
const z = (N) => {
|
|
1835
1636
|
const {
|
|
1836
|
-
startDate:
|
|
1837
|
-
endDate:
|
|
1838
|
-
} =
|
|
1839
|
-
|
|
1840
|
-
},
|
|
1637
|
+
startDate: R,
|
|
1638
|
+
endDate: A
|
|
1639
|
+
} = N, q = `${R.year}-${R.month}-${R.day}`, W = `${A.year}-${A.month}-${A.day}`, n = h(q, e.valueFormat), x = h(W, e.valueFormat), C = n + "~" + x;
|
|
1640
|
+
i.value = C, r.emit("update:modeValue", C), r.emit("confirm", C), V();
|
|
1641
|
+
}, K = (N) => {
|
|
1841
1642
|
};
|
|
1842
|
-
return () =>
|
|
1843
|
-
ref:
|
|
1643
|
+
return () => c(Fe, null, [c("div", {
|
|
1644
|
+
ref: v,
|
|
1844
1645
|
class: I.value,
|
|
1845
1646
|
id: e.id
|
|
1846
|
-
}, [
|
|
1847
|
-
class:
|
|
1848
|
-
}, [
|
|
1849
|
-
modelValue:
|
|
1850
|
-
"onUpdate:modelValue": (
|
|
1647
|
+
}, [c("div", {
|
|
1648
|
+
class: D.value
|
|
1649
|
+
}, [c(Ie, {
|
|
1650
|
+
modelValue: m.value,
|
|
1651
|
+
"onUpdate:modelValue": (N) => m.value = N,
|
|
1851
1652
|
showBorder: !1,
|
|
1852
|
-
onFocus:
|
|
1853
|
-
}, null),
|
|
1653
|
+
onFocus: T
|
|
1654
|
+
}, null), c("span", {
|
|
1854
1655
|
class: "f-icon f-icon-orientation-arrow sub-input-spliter"
|
|
1855
|
-
}, null),
|
|
1856
|
-
modelValue:
|
|
1857
|
-
"onUpdate:modelValue": (
|
|
1656
|
+
}, null), c(Ie, {
|
|
1657
|
+
modelValue: F.value,
|
|
1658
|
+
"onUpdate:modelValue": (N) => F.value = N,
|
|
1858
1659
|
showBorder: !1,
|
|
1859
|
-
onFocus:
|
|
1860
|
-
}, null),
|
|
1660
|
+
onFocus: T
|
|
1661
|
+
}, null), c("div", {
|
|
1861
1662
|
class: "input-group-append"
|
|
1862
|
-
}, [
|
|
1663
|
+
}, [c("span", {
|
|
1863
1664
|
class: "input-group-text input-group-append-button",
|
|
1864
1665
|
innerHTML: '<span class="f-icon f-icon-date"></span>',
|
|
1865
|
-
onClick:
|
|
1866
|
-
}, null)])])]),
|
|
1867
|
-
ref:
|
|
1666
|
+
onClick: T
|
|
1667
|
+
}, null)])])]), l.value && c(Jt, {
|
|
1668
|
+
ref: P,
|
|
1868
1669
|
id: `${e.id}-popover`,
|
|
1869
1670
|
visible: !0,
|
|
1870
1671
|
placement: "bottom-left",
|
|
@@ -1877,326 +1678,186 @@ const Ra = "https://json-schema.org/draft/2020-12/schema", Aa = "https://farris-
|
|
|
1877
1678
|
onHidden: $
|
|
1878
1679
|
}, {
|
|
1879
1680
|
default: () => {
|
|
1880
|
-
var
|
|
1881
|
-
return [(
|
|
1681
|
+
var N, R;
|
|
1682
|
+
return [(R = (N = r.slots).default) == null ? void 0 : R.call(N), c(de, {
|
|
1882
1683
|
mode: "Popup",
|
|
1883
|
-
value:
|
|
1684
|
+
value: i.value,
|
|
1884
1685
|
valueFormat: e.valueFormat,
|
|
1885
|
-
minYear:
|
|
1886
|
-
maxYear:
|
|
1686
|
+
minYear: u.value,
|
|
1687
|
+
maxYear: p.value,
|
|
1887
1688
|
enablePeriod: !0,
|
|
1888
|
-
highlightSunday:
|
|
1689
|
+
highlightSunday: B.value,
|
|
1889
1690
|
highlightSaturday: f.value,
|
|
1890
|
-
nameOfMonths:
|
|
1891
|
-
highlightDates:
|
|
1892
|
-
showWeekNumber:
|
|
1893
|
-
selectMode:
|
|
1691
|
+
nameOfMonths: k.value,
|
|
1692
|
+
highlightDates: b.value,
|
|
1693
|
+
showWeekNumber: M.value,
|
|
1694
|
+
selectMode: g.value,
|
|
1894
1695
|
disableWeekends: o.value,
|
|
1895
|
-
disableWeekdays:
|
|
1896
|
-
disableUntil:
|
|
1897
|
-
onDatePicked: (
|
|
1898
|
-
onConfirm: (
|
|
1696
|
+
disableWeekdays: d.value,
|
|
1697
|
+
disableUntil: t.value,
|
|
1698
|
+
onDatePicked: (A) => K(),
|
|
1699
|
+
onConfirm: (A) => z(A)
|
|
1899
1700
|
}, null)];
|
|
1900
1701
|
}
|
|
1901
1702
|
})]);
|
|
1902
1703
|
}
|
|
1903
|
-
}),
|
|
1704
|
+
}), Me = /* @__PURE__ */ ee({
|
|
1904
1705
|
name: "FDatePicker",
|
|
1905
|
-
props:
|
|
1706
|
+
props: Ke,
|
|
1906
1707
|
emits: ["update:modelValue", "datePicked"],
|
|
1907
|
-
setup(e,
|
|
1908
|
-
const
|
|
1708
|
+
setup(e, r) {
|
|
1709
|
+
const i = '<span class="f-icon f-icon-date"></span>', p = a(e.modelValue), u = a(null), {
|
|
1909
1710
|
getMinDate: f,
|
|
1910
|
-
getMaxDate:
|
|
1911
|
-
} =
|
|
1711
|
+
getMaxDate: B
|
|
1712
|
+
} = Z(), k = Y(() => e.maxDate ? B(e.maxDate) : Ta), b = Y(() => e.minDate ? f(e.minDate) : wa), M = a(9999), g = a(1900), o = a(e.enablePeriod), d = a(p.value), t = a(e.highlightSaturday), l = a(e.highlightSunday), P = a(e.nameOfMonths), v = a(e.highlightDates), h = a(e.showWeekNumber), m = a(e.selectMode), F = a(e.displayTime), I = a(e.disableWeekends), D = a(e.disableWeekdays), y = a(e.disabled), T = a(e.readonly), $ = a(e.enableClear), V = a(e.editable), {
|
|
1912
1713
|
formatTo: z,
|
|
1913
|
-
parseToDate:
|
|
1914
|
-
} =
|
|
1915
|
-
function
|
|
1714
|
+
parseToDate: K
|
|
1715
|
+
} = Pe();
|
|
1716
|
+
function N() {
|
|
1916
1717
|
}
|
|
1917
|
-
const
|
|
1918
|
-
const S =
|
|
1718
|
+
const R = Y(() => {
|
|
1719
|
+
const S = K(d.value, e.valueFormat);
|
|
1919
1720
|
return z(S, e.displayFormat);
|
|
1920
1721
|
});
|
|
1921
|
-
function
|
|
1922
|
-
const
|
|
1923
|
-
|
|
1722
|
+
function A(S) {
|
|
1723
|
+
const H = z(S, e.valueFormat);
|
|
1724
|
+
d.value !== H && (p.value = H, d.value = H, r.emit("update:modelValue", H), r.emit("datePicked", d.value));
|
|
1924
1725
|
}
|
|
1925
|
-
function
|
|
1926
|
-
|
|
1726
|
+
function q() {
|
|
1727
|
+
u.value && u.value.hidePopup();
|
|
1927
1728
|
}
|
|
1928
|
-
function
|
|
1929
|
-
for (const
|
|
1729
|
+
function W(S) {
|
|
1730
|
+
for (const U in {
|
|
1930
1731
|
...S
|
|
1931
1732
|
})
|
|
1932
|
-
S[
|
|
1933
|
-
let
|
|
1934
|
-
e.showTime && (
|
|
1935
|
-
}
|
|
1936
|
-
function
|
|
1937
|
-
|
|
1938
|
-
}
|
|
1939
|
-
function
|
|
1940
|
-
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
S !==
|
|
1944
|
-
}),
|
|
1945
|
-
|
|
1946
|
-
}),
|
|
1947
|
-
|
|
1948
|
-
}),
|
|
1949
|
-
|
|
1733
|
+
S[U] != null && (S[U] = S[U].toString().padStart(2, "0"));
|
|
1734
|
+
let H = `${S.year}-${S.month}-${S.day}`;
|
|
1735
|
+
e.showTime && (H += ` ${S.hour}:${S.minute}:${S.second}`), A(H), q();
|
|
1736
|
+
}
|
|
1737
|
+
function n() {
|
|
1738
|
+
A("");
|
|
1739
|
+
}
|
|
1740
|
+
function x() {
|
|
1741
|
+
g.value = b.value.year ?? g.value, M.value = k.value.year ?? M.value, g.value > M.value && (M.value = g.value);
|
|
1742
|
+
}
|
|
1743
|
+
G(() => e.modelValue, (S, H) => {
|
|
1744
|
+
S !== H && A(S);
|
|
1745
|
+
}), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.readonly], ([S, H, U, _]) => {
|
|
1746
|
+
y.value = S, V.value = H, $.value = U, T.value = _;
|
|
1747
|
+
}), G([() => e.maxDate, () => e.minDate], ([S, H]) => {
|
|
1748
|
+
x();
|
|
1749
|
+
}), He(() => {
|
|
1750
|
+
p.value && A(p.value), x();
|
|
1950
1751
|
});
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1752
|
+
const C = (S) => {
|
|
1753
|
+
W(S);
|
|
1953
1754
|
};
|
|
1954
|
-
return () => o.value ?
|
|
1955
|
-
ref:
|
|
1956
|
-
modelValue:
|
|
1957
|
-
buttonContent:
|
|
1755
|
+
return () => o.value ? c(Oa, e, null) : c(Gt, {
|
|
1756
|
+
ref: u,
|
|
1757
|
+
modelValue: R.value,
|
|
1758
|
+
buttonContent: i,
|
|
1958
1759
|
placeholder: e.placeholder,
|
|
1959
|
-
disable:
|
|
1960
|
-
readonly:
|
|
1760
|
+
disable: y.value,
|
|
1761
|
+
readonly: T.value,
|
|
1961
1762
|
editable: V.value,
|
|
1962
1763
|
enableClear: $.value,
|
|
1963
1764
|
popupOnClick: !0,
|
|
1964
|
-
onClear:
|
|
1965
|
-
onClickButton:
|
|
1765
|
+
onClear: n,
|
|
1766
|
+
onClickButton: N,
|
|
1966
1767
|
focusOnCreated: e.focusOnCreated,
|
|
1967
1768
|
selectOnCreated: e.selectOnCreated,
|
|
1968
1769
|
keepWidthWithReference: !1,
|
|
1969
1770
|
placement: "auto"
|
|
1970
1771
|
}, {
|
|
1971
|
-
default: () =>
|
|
1772
|
+
default: () => c(de, {
|
|
1972
1773
|
mode: "Popup",
|
|
1973
|
-
value:
|
|
1774
|
+
value: d.value,
|
|
1974
1775
|
valueFormat: e.valueFormat,
|
|
1975
|
-
minYear:
|
|
1976
|
-
maxYear:
|
|
1776
|
+
minYear: g.value,
|
|
1777
|
+
maxYear: M.value,
|
|
1977
1778
|
enablePeriod: o.value,
|
|
1978
|
-
highlightSunday:
|
|
1979
|
-
highlightSaturday:
|
|
1980
|
-
nameOfMonths:
|
|
1981
|
-
highlightDates:
|
|
1982
|
-
showWeekNumber:
|
|
1983
|
-
selectMode:
|
|
1984
|
-
displayTime:
|
|
1779
|
+
highlightSunday: l.value,
|
|
1780
|
+
highlightSaturday: t.value,
|
|
1781
|
+
nameOfMonths: P.value,
|
|
1782
|
+
highlightDates: v.value,
|
|
1783
|
+
showWeekNumber: h.value,
|
|
1784
|
+
selectMode: m.value,
|
|
1785
|
+
displayTime: F.value,
|
|
1985
1786
|
disableWeekends: I.value,
|
|
1986
|
-
disableWeekdays:
|
|
1987
|
-
disableSince:
|
|
1988
|
-
disableUntil:
|
|
1787
|
+
disableWeekdays: D.value,
|
|
1788
|
+
disableSince: k.value,
|
|
1789
|
+
disableUntil: b.value,
|
|
1989
1790
|
showTime: e.showTime,
|
|
1990
|
-
onDatePicked: (S) =>
|
|
1991
|
-
onConfirm:
|
|
1791
|
+
onDatePicked: (S) => W(S),
|
|
1792
|
+
onConfirm: C
|
|
1992
1793
|
}, null)
|
|
1993
1794
|
});
|
|
1994
1795
|
}
|
|
1995
1796
|
});
|
|
1996
|
-
function
|
|
1797
|
+
function Ua() {
|
|
1997
1798
|
let e = "zh-CHS";
|
|
1998
1799
|
window && window.top && window.top.localStorage && window.top.localStorage.languageCode && ({ languageCode: e } = window.top.localStorage);
|
|
1999
|
-
const
|
|
1800
|
+
const r = [
|
|
2000
1801
|
{ id: "yyyy-MM-dd HH:mm:ss", name: "yyyy-MM-dd HH:mm:ss" },
|
|
2001
1802
|
{ id: "yyyy/MM/dd HH:mm:ss", name: "yyyy/MM/dd HH:mm:ss" },
|
|
2002
1803
|
{ id: "yyyyMMddHHmmss", name: "yyyyMMddHHmmss" },
|
|
2003
1804
|
{ id: "yyyy-MM-dd HH:mm", name: "yyyy-MM-dd HH:mm" },
|
|
2004
1805
|
{ id: "yyyy/MM/dd HH:mm", name: "yyyy/MM/dd HH:mm" },
|
|
2005
1806
|
{ id: "yyyyMMddHHmm", name: "yyyyMMddHHmm" }
|
|
2006
|
-
],
|
|
1807
|
+
], i = [
|
|
2007
1808
|
{ id: "yyyy-MM-dd", name: "yyyy-MM-dd" },
|
|
2008
1809
|
{ id: "yyyy/MM/dd", name: "yyyy/MM/dd" },
|
|
2009
1810
|
{ id: "yyyyMMdd", name: "yyyyMMdd" },
|
|
2010
1811
|
{ id: "MM/dd/yyyy", name: "MM/dd/yyyy" }
|
|
2011
|
-
],
|
|
1812
|
+
], p = [
|
|
2012
1813
|
{ id: "yyyy-MM", name: "yyyy-MM" },
|
|
2013
1814
|
{ id: "yyyy/MM", name: "yyyy/MM" },
|
|
2014
1815
|
{ id: "yyyyMM", name: "yyyyMM" }
|
|
2015
|
-
],
|
|
1816
|
+
], u = [
|
|
2016
1817
|
{ id: "MM/dd", name: "MM/dd" },
|
|
2017
1818
|
{ id: "MMdd", name: "MMdd" },
|
|
2018
1819
|
{ id: "MM-dd", name: "MM-dd" }
|
|
2019
1820
|
], f = [
|
|
2020
1821
|
{ id: "yyyy", name: "yyyy" }
|
|
2021
1822
|
];
|
|
2022
|
-
return e === "zh-CHS" && (
|
|
1823
|
+
return e === "zh-CHS" && (r.push(
|
|
2023
1824
|
{ id: "yyyy年MM月dd日 HH时mm分ss秒", name: "yyyy年MM月dd日 HH时mm分ss秒" },
|
|
2024
1825
|
{ id: "yyyy年MM月dd日 HH时mm分", name: "yyyy年MM月dd日 HH时mm分" }
|
|
2025
|
-
),
|
|
1826
|
+
), i.push(
|
|
2026
1827
|
{ id: "yyyy年MM月dd日", name: "yyyy年MM月dd日" }
|
|
2027
|
-
),
|
|
1828
|
+
), p.push(
|
|
2028
1829
|
{ id: "yyyy年MM月", name: "yyyy年MM月" }
|
|
2029
|
-
),
|
|
1830
|
+
), u.push(
|
|
2030
1831
|
{ id: "MM月dd日", name: "MM月dd日" }
|
|
2031
1832
|
), f.push(
|
|
2032
1833
|
{ id: "yyyy年", name: "yyyy年" }
|
|
2033
|
-
)), e === "zh-CHT" && (
|
|
1834
|
+
)), e === "zh-CHT" && (r.push(
|
|
2034
1835
|
{ id: "yyyy年MM月dd日 HH時mm分ss秒", name: "yyyy年MM月dd日 HH時mm分ss秒" },
|
|
2035
1836
|
{ id: "yyyy年MM月dd日 HH時mm分", name: "yyyy年MM月dd日 HH時mm分" }
|
|
2036
|
-
),
|
|
1837
|
+
), i.push(
|
|
2037
1838
|
{ id: "yyyy年MM月dd日", name: "yyyy年MM月dd日" }
|
|
2038
|
-
),
|
|
1839
|
+
), p.push(
|
|
2039
1840
|
{ id: "yyyy年MM月", name: "yyyy年MM月" }
|
|
2040
|
-
),
|
|
1841
|
+
), u.push(
|
|
2041
1842
|
{ id: "MM月dd日", name: "MM月dd日" }
|
|
2042
1843
|
), f.push(
|
|
2043
1844
|
{ id: "yyyy年", name: "yyyy年" }
|
|
2044
|
-
)), { timeFormats:
|
|
2045
|
-
}
|
|
2046
|
-
class tn extends sa {
|
|
2047
|
-
constructor(t, l) {
|
|
2048
|
-
super(t, l);
|
|
2049
|
-
}
|
|
2050
|
-
getEditorProperties(t) {
|
|
2051
|
-
var r, f, g, v, h, i, y, o, u, a;
|
|
2052
|
-
const l = this.getDateFormatOptions(t == null ? void 0 : t.editor), c = this.getValueFormatOptions();
|
|
2053
|
-
return this.getComponentConfig(t, { type: "date-picker" }, {
|
|
2054
|
-
showTime: {
|
|
2055
|
-
description: "",
|
|
2056
|
-
title: "启用时间选择",
|
|
2057
|
-
type: "boolean",
|
|
2058
|
-
readonly: ((r = t == null ? void 0 : t.editor) == null ? void 0 : r.fieldType) === "Date",
|
|
2059
|
-
refreshPanelAfterChanged: !0
|
|
2060
|
-
},
|
|
2061
|
-
displayFormat: {
|
|
2062
|
-
description: "",
|
|
2063
|
-
title: "展示格式",
|
|
2064
|
-
type: "enum",
|
|
2065
|
-
editor: {
|
|
2066
|
-
data: l
|
|
2067
|
-
}
|
|
2068
|
-
},
|
|
2069
|
-
valueFormat: {
|
|
2070
|
-
description: "",
|
|
2071
|
-
title: "存储格式",
|
|
2072
|
-
type: "enum",
|
|
2073
|
-
editor: {
|
|
2074
|
-
data: c
|
|
2075
|
-
},
|
|
2076
|
-
visible: ((f = t == null ? void 0 : t.editor) == null ? void 0 : f.fieldType) === "String"
|
|
2077
|
-
},
|
|
2078
|
-
maxDate: {
|
|
2079
|
-
description: "",
|
|
2080
|
-
title: "最大日期",
|
|
2081
|
-
type: "string",
|
|
2082
|
-
editor: {
|
|
2083
|
-
type: "date-picker",
|
|
2084
|
-
displayFormat: "yyyy-MM-dd" + ((g = t == null ? void 0 : t.editor) != null && g.showTime ? " HH:mm:ss" : ""),
|
|
2085
|
-
valueFormat: "yyyy-MM-dd" + ((v = t == null ? void 0 : t.editor) != null && v.showTime ? " HH:mm:ss" : ""),
|
|
2086
|
-
minDate: ((h = t == null ? void 0 : t.editor) == null ? void 0 : h.minDate) || "1900-01-01",
|
|
2087
|
-
maxDate: "9999-12-31",
|
|
2088
|
-
showTime: (i = t == null ? void 0 : t.editor) == null ? void 0 : i.showTime
|
|
2089
|
-
},
|
|
2090
|
-
refreshPanelAfterChanged: !0
|
|
2091
|
-
},
|
|
2092
|
-
minDate: {
|
|
2093
|
-
description: "",
|
|
2094
|
-
title: "最小日期",
|
|
2095
|
-
type: "string",
|
|
2096
|
-
editor: {
|
|
2097
|
-
type: "date-picker",
|
|
2098
|
-
displayFormat: "yyyy-MM-dd" + ((y = t == null ? void 0 : t.editor) != null && y.showTime ? " HH:mm:ss" : ""),
|
|
2099
|
-
valueFormat: "yyyy-MM-dd" + ((o = t == null ? void 0 : t.editor) != null && o.showTime ? " HH:mm:ss" : ""),
|
|
2100
|
-
minDate: "1900-01-01",
|
|
2101
|
-
maxDate: ((u = t == null ? void 0 : t.editor) == null ? void 0 : u.maxDate) || "9999-12-31",
|
|
2102
|
-
showTime: (a = t == null ? void 0 : t.editor) == null ? void 0 : a.showTime
|
|
2103
|
-
},
|
|
2104
|
-
refreshPanelAfterChanged: !0
|
|
2105
|
-
}
|
|
2106
|
-
}, this.setEditorPropertyRelates);
|
|
2107
|
-
}
|
|
2108
|
-
setEditorPropertyRelates(t, l, c) {
|
|
2109
|
-
if (!(!t || !l.editor))
|
|
2110
|
-
switch (t.propertyID) {
|
|
2111
|
-
case "showTime": {
|
|
2112
|
-
const r = l.editor;
|
|
2113
|
-
t.propertyValue ? (r.displayFormat = "yyyy-MM-dd HH:mm:ss", r.valueFormat = "yyyy-MM-dd HH:mm:ss") : (r.displayFormat = "yyyy-MM-dd", r.valueFormat = "yyyy-MM-dd"), l.formatter && (l.formatter.dateFormat = r.displayFormat);
|
|
2114
|
-
break;
|
|
2115
|
-
}
|
|
2116
|
-
case "displayFormat": {
|
|
2117
|
-
l.formatter && (l.formatter.dateFormat = t.propertyValue);
|
|
2118
|
-
break;
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
getDateFormatOptions(t) {
|
|
2123
|
-
let l = [];
|
|
2124
|
-
const { timeFormats: c, yMdFormats: r, yMFormats: f, mdFormats: g, yFormats: v } = en();
|
|
2125
|
-
return t.showTime && (l = l.concat(c)), l = l.concat(r), l = l.concat(f), l = l.concat(v), l = l.concat(g), l;
|
|
2126
|
-
}
|
|
2127
|
-
getValueFormatOptions() {
|
|
2128
|
-
return [
|
|
2129
|
-
{ id: "yyyy-MM-dd", name: "yyyy-MM-dd" },
|
|
2130
|
-
{ id: "yyyy/MM/dd", name: "yyyy/MM/dd" },
|
|
2131
|
-
{ id: "MM/dd/yyyy", name: "MM/dd/yyyy" },
|
|
2132
|
-
{ id: "yyyy-MM-dd HH:mm:ss", name: "yyyy-MM-dd HH:mm:ss" },
|
|
2133
|
-
{ id: "yyyy/MM/dd HH:mm:ss", name: "yyyy/MM/dd HH:mm:ss" },
|
|
2134
|
-
{ id: "yyyyMM", name: "yyyyMM" },
|
|
2135
|
-
{ id: "yyyy", name: "yyyy" }
|
|
2136
|
-
];
|
|
2137
|
-
}
|
|
1845
|
+
)), { timeFormats: r, yMFormats: p, yMdFormats: i, mdFormats: u, yFormats: f };
|
|
2138
1846
|
}
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
function c(r, f) {
|
|
2142
|
-
return new tn(r, t).getPropertyConfig(l, f);
|
|
2143
|
-
}
|
|
2144
|
-
return { getPropsConfig: c };
|
|
2145
|
-
}
|
|
2146
|
-
const nn = /* @__PURE__ */ Z({
|
|
2147
|
-
name: "FDatePickerDesign",
|
|
2148
|
-
props: Ja,
|
|
2149
|
-
emits: ["update:modelValue", "datePicked"],
|
|
2150
|
-
setup(e, t) {
|
|
2151
|
-
const l = '<span class="f-icon f-icon-date"></span>', c = n(e.modelValue), r = n(), f = ke("designer-host-service"), g = ke("design-item-context"), v = an(g, f), h = _e(r, g, v);
|
|
2152
|
-
return fe(() => {
|
|
2153
|
-
r.value.componentInstance = h;
|
|
2154
|
-
}), t.expose(h.value), () => b(Le, {
|
|
2155
|
-
ref: r,
|
|
2156
|
-
modelValue: c.value,
|
|
2157
|
-
"onUpdate:modelValue": (i) => c.value = i,
|
|
2158
|
-
buttonContent: l,
|
|
2159
|
-
readonly: !0,
|
|
2160
|
-
editable: !1,
|
|
2161
|
-
forcePlaceholder: !0,
|
|
2162
|
-
placeholder: e.placeholder,
|
|
2163
|
-
enableClear: !0
|
|
2164
|
-
}, null);
|
|
2165
|
-
}
|
|
2166
|
-
}), on = /* @__PURE__ */ Z({
|
|
2167
|
-
name: "FDateViewDesign",
|
|
2168
|
-
props: ue,
|
|
2169
|
-
emits: [],
|
|
2170
|
-
setup(e, t) {
|
|
2171
|
-
const l = n(), c = ke("design-item-context"), r = _e(l, c);
|
|
2172
|
-
return fe(() => {
|
|
2173
|
-
l.value.componentInstance = r;
|
|
2174
|
-
}), t.expose(r.value), () => b(re, {
|
|
2175
|
-
ref: l
|
|
2176
|
-
}, null);
|
|
2177
|
-
}
|
|
2178
|
-
});
|
|
2179
|
-
le.install = (e) => {
|
|
2180
|
-
e.component(Pe.name, Pe).component(Te.name, Te).component(re.name, re).component(we.name, we).component(De.name, De).component(le.name, le);
|
|
2181
|
-
};
|
|
2182
|
-
le.register = (e, t, l, c) => {
|
|
2183
|
-
e["date-picker"] = le, e["date-view"] = re, t["date-picker"] = et, t["date-view"] = Xe;
|
|
2184
|
-
};
|
|
2185
|
-
le.registerDesigner = (e, t, l) => {
|
|
2186
|
-
e["date-picker"] = nn, e["date-view"] = on, t["date-picker"] = et, t["date-view"] = Xe;
|
|
1847
|
+
Me.install = (e) => {
|
|
1848
|
+
e.component(ge.name, ge).component(pe.name, pe).component(de.name, de).component(ke.name, ke).component(De.name, De).component(Me.name, Me);
|
|
2187
1849
|
};
|
|
2188
1850
|
export {
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
1851
|
+
Ua as DATE_FORMATS,
|
|
1852
|
+
Me as DatePicker,
|
|
1853
|
+
ge as DatePickerCalendar,
|
|
1854
|
+
de as DatePickerContainer,
|
|
1855
|
+
Ta as MAX_DATE,
|
|
1856
|
+
wa as MIN_DATE,
|
|
2194
1857
|
X as MonthTag,
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
qe as defaultNameOfMonths,
|
|
2201
|
-
me as weekDays
|
|
1858
|
+
Qt as datePickerCalendarProps,
|
|
1859
|
+
Ke as datePickerProps,
|
|
1860
|
+
Me as default,
|
|
1861
|
+
Ae as defaultNameOfMonths,
|
|
1862
|
+
ce as weekDays
|
|
2202
1863
|
};
|