@blueking/date-picker 0.0.17 → 0.0.18

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.
@@ -1,3 +1,5 @@
1
+ import dayjs from "dayjs";
2
+ import { Dayjs, default as default2 } from "dayjs";
1
3
  import * as t$4 from "vue";
2
4
  import { provide, inject, defineComponent, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString, createCommentVNode, shallowRef, watch, createElementVNode, normalizeClass, withModifiers, ref, withDirectives, withKeys, computed, vShow, KeepAlive, resolveDynamicComponent, onBeforeUnmount, normalizeStyle } from "vue";
3
5
  import { Tab, Button, Checkbox, Popover, Select, Input, Exception, provideGlobalConfig } from "bkui-vue";
@@ -5,298 +7,6 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
5
7
  function getDefaultExportFromCjs(x2) {
6
8
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
7
9
  }
8
- var dayjs_min = { exports: {} };
9
- (function(module, exports) {
10
- !function(t2, e2) {
11
- module.exports = e2();
12
- }(commonjsGlobal, function() {
13
- var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
14
- var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
15
- return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
16
- } }, m2 = function(t3, e3, n3) {
17
- var r3 = String(t3);
18
- return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
19
- }, v2 = { s: m2, z: function(t3) {
20
- var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
21
- return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
22
- }, m: function t3(e3, n3) {
23
- if (e3.date() < n3.date())
24
- return -t3(n3, e3);
25
- var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u3 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
26
- return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
27
- }, a: function(t3) {
28
- return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
29
- }, p: function(t3) {
30
- return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
31
- }, u: function(t3) {
32
- return void 0 === t3;
33
- } }, g2 = "en", D2 = {};
34
- D2[g2] = M2;
35
- var p2 = "$isDayjsObject", S2 = function(t3) {
36
- return t3 instanceof _2 || !(!t3 || !t3[p2]);
37
- }, w2 = function t3(e3, n3, r3) {
38
- var i3;
39
- if (!e3)
40
- return g2;
41
- if ("string" == typeof e3) {
42
- var s3 = e3.toLowerCase();
43
- D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
44
- var u3 = e3.split("-");
45
- if (!i3 && u3.length > 1)
46
- return t3(u3[0]);
47
- } else {
48
- var a3 = e3.name;
49
- D2[a3] = e3, i3 = a3;
50
- }
51
- return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
52
- }, O2 = function(t3, e3) {
53
- if (S2(t3))
54
- return t3.clone();
55
- var n3 = "object" == typeof e3 ? e3 : {};
56
- return n3.date = t3, n3.args = arguments, new _2(n3);
57
- }, b2 = v2;
58
- b2.l = w2, b2.i = S2, b2.w = function(t3, e3) {
59
- return O2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
60
- };
61
- var _2 = function() {
62
- function M3(t3) {
63
- this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
64
- }
65
- var m3 = M3.prototype;
66
- return m3.parse = function(t3) {
67
- this.$d = function(t4) {
68
- var e3 = t4.date, n3 = t4.utc;
69
- if (null === e3)
70
- return /* @__PURE__ */ new Date(NaN);
71
- if (b2.u(e3))
72
- return /* @__PURE__ */ new Date();
73
- if (e3 instanceof Date)
74
- return new Date(e3);
75
- if ("string" == typeof e3 && !/Z$/i.test(e3)) {
76
- var r3 = e3.match($2);
77
- if (r3) {
78
- var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
79
- return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
80
- }
81
- }
82
- return new Date(e3);
83
- }(t3), this.init();
84
- }, m3.init = function() {
85
- var t3 = this.$d;
86
- this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
87
- }, m3.$utils = function() {
88
- return b2;
89
- }, m3.isValid = function() {
90
- return !(this.$d.toString() === l2);
91
- }, m3.isSame = function(t3, e3) {
92
- var n3 = O2(t3);
93
- return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
94
- }, m3.isAfter = function(t3, e3) {
95
- return O2(t3) < this.startOf(e3);
96
- }, m3.isBefore = function(t3, e3) {
97
- return this.endOf(e3) < O2(t3);
98
- }, m3.$g = function(t3, e3, n3) {
99
- return b2.u(t3) ? this[e3] : this.set(n3, t3);
100
- }, m3.unix = function() {
101
- return Math.floor(this.valueOf() / 1e3);
102
- }, m3.valueOf = function() {
103
- return this.$d.getTime();
104
- }, m3.startOf = function(t3, e3) {
105
- var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t3), l3 = function(t4, e4) {
106
- var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
107
- return r3 ? i3 : i3.endOf(a2);
108
- }, $3 = function(t4, e4) {
109
- return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
110
- }, y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
111
- switch (f3) {
112
- case h2:
113
- return r3 ? l3(1, 0) : l3(31, 11);
114
- case c2:
115
- return r3 ? l3(1, M4) : l3(0, M4 + 1);
116
- case o2:
117
- var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
118
- return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
119
- case a2:
120
- case d2:
121
- return $3(v3 + "Hours", 0);
122
- case u2:
123
- return $3(v3 + "Minutes", 1);
124
- case s2:
125
- return $3(v3 + "Seconds", 2);
126
- case i2:
127
- return $3(v3 + "Milliseconds", 3);
128
- default:
129
- return this.clone();
130
- }
131
- }, m3.endOf = function(t3) {
132
- return this.startOf(t3, false);
133
- }, m3.$set = function(t3, e3) {
134
- var n3, o3 = b2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $3 = o3 === a2 ? this.$D + (e3 - this.$W) : e3;
135
- if (o3 === c2 || o3 === h2) {
136
- var y3 = this.clone().set(d2, 1);
137
- y3.$d[l3]($3), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
138
- } else
139
- l3 && this.$d[l3]($3);
140
- return this.init(), this;
141
- }, m3.set = function(t3, e3) {
142
- return this.clone().$set(t3, e3);
143
- }, m3.get = function(t3) {
144
- return this[b2.p(t3)]();
145
- }, m3.add = function(r3, f3) {
146
- var d3, l3 = this;
147
- r3 = Number(r3);
148
- var $3 = b2.p(f3), y3 = function(t3) {
149
- var e3 = O2(l3);
150
- return b2.w(e3.date(e3.date() + Math.round(t3 * r3)), l3);
151
- };
152
- if ($3 === c2)
153
- return this.set(c2, this.$M + r3);
154
- if ($3 === h2)
155
- return this.set(h2, this.$y + r3);
156
- if ($3 === a2)
157
- return y3(1);
158
- if ($3 === o2)
159
- return y3(7);
160
- var M4 = (d3 = {}, d3[s2] = e2, d3[u2] = n2, d3[i2] = t2, d3)[$3] || 1, m4 = this.$d.getTime() + r3 * M4;
161
- return b2.w(m4, this);
162
- }, m3.subtract = function(t3, e3) {
163
- return this.add(-1 * t3, e3);
164
- }, m3.format = function(t3) {
165
- var e3 = this, n3 = this.$locale();
166
- if (!this.isValid())
167
- return n3.invalidDate || l2;
168
- var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = function(t4, n4, i4, s4) {
169
- return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
170
- }, d3 = function(t4) {
171
- return b2.s(s3 % 12 || 12, t4, "0");
172
- }, $3 = f3 || function(t4, e4, n4) {
173
- var r4 = t4 < 12 ? "AM" : "PM";
174
- return n4 ? r4.toLowerCase() : r4;
175
- };
176
- return r3.replace(y2, function(t4, r4) {
177
- return r4 || function(t5) {
178
- switch (t5) {
179
- case "YY":
180
- return String(e3.$y).slice(-2);
181
- case "YYYY":
182
- return b2.s(e3.$y, 4, "0");
183
- case "M":
184
- return a3 + 1;
185
- case "MM":
186
- return b2.s(a3 + 1, 2, "0");
187
- case "MMM":
188
- return h3(n3.monthsShort, a3, c3, 3);
189
- case "MMMM":
190
- return h3(c3, a3);
191
- case "D":
192
- return e3.$D;
193
- case "DD":
194
- return b2.s(e3.$D, 2, "0");
195
- case "d":
196
- return String(e3.$W);
197
- case "dd":
198
- return h3(n3.weekdaysMin, e3.$W, o3, 2);
199
- case "ddd":
200
- return h3(n3.weekdaysShort, e3.$W, o3, 3);
201
- case "dddd":
202
- return o3[e3.$W];
203
- case "H":
204
- return String(s3);
205
- case "HH":
206
- return b2.s(s3, 2, "0");
207
- case "h":
208
- return d3(1);
209
- case "hh":
210
- return d3(2);
211
- case "a":
212
- return $3(s3, u3, true);
213
- case "A":
214
- return $3(s3, u3, false);
215
- case "m":
216
- return String(u3);
217
- case "mm":
218
- return b2.s(u3, 2, "0");
219
- case "s":
220
- return String(e3.$s);
221
- case "ss":
222
- return b2.s(e3.$s, 2, "0");
223
- case "SSS":
224
- return b2.s(e3.$ms, 3, "0");
225
- case "Z":
226
- return i3;
227
- }
228
- return null;
229
- }(t4) || i3.replace(":", "");
230
- });
231
- }, m3.utcOffset = function() {
232
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
233
- }, m3.diff = function(r3, d3, l3) {
234
- var $3, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D3 = function() {
235
- return b2.m(y3, m4);
236
- };
237
- switch (M4) {
238
- case h2:
239
- $3 = D3() / 12;
240
- break;
241
- case c2:
242
- $3 = D3();
243
- break;
244
- case f2:
245
- $3 = D3() / 3;
246
- break;
247
- case o2:
248
- $3 = (g3 - v3) / 6048e5;
249
- break;
250
- case a2:
251
- $3 = (g3 - v3) / 864e5;
252
- break;
253
- case u2:
254
- $3 = g3 / n2;
255
- break;
256
- case s2:
257
- $3 = g3 / e2;
258
- break;
259
- case i2:
260
- $3 = g3 / t2;
261
- break;
262
- default:
263
- $3 = g3;
264
- }
265
- return l3 ? $3 : b2.a($3);
266
- }, m3.daysInMonth = function() {
267
- return this.endOf(c2).$D;
268
- }, m3.$locale = function() {
269
- return D2[this.$L];
270
- }, m3.locale = function(t3, e3) {
271
- if (!t3)
272
- return this.$L;
273
- var n3 = this.clone(), r3 = w2(t3, e3, true);
274
- return r3 && (n3.$L = r3), n3;
275
- }, m3.clone = function() {
276
- return b2.w(this.$d, this);
277
- }, m3.toDate = function() {
278
- return new Date(this.valueOf());
279
- }, m3.toJSON = function() {
280
- return this.isValid() ? this.toISOString() : null;
281
- }, m3.toISOString = function() {
282
- return this.$d.toISOString();
283
- }, m3.toString = function() {
284
- return this.$d.toUTCString();
285
- }, M3;
286
- }(), k2 = _2.prototype;
287
- return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
288
- k2[t3[1]] = function(e3) {
289
- return this.$g(e3, t3[0], t3[1]);
290
- };
291
- }), O2.extend = function(t3, e3) {
292
- return t3.$i || (t3(e3, _2, O2), t3.$i = true), O2;
293
- }, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) {
294
- return O2(1e3 * t3);
295
- }, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
296
- });
297
- })(dayjs_min);
298
- var dayjs_minExports = dayjs_min.exports;
299
- const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
300
10
  var customParseFormat$1 = { exports: {} };
301
11
  (function(module, exports) {
302
12
  !function(e2, t2) {
@@ -12273,7 +11983,7 @@ const en = /* @__PURE__ */ getDefaultExportFromCjs(enExports);
12273
11983
  var zhCn = { exports: {} };
12274
11984
  (function(module, exports) {
12275
11985
  !function(e2, _2) {
12276
- module.exports = _2(dayjs_minExports);
11986
+ module.exports = _2(dayjs);
12277
11987
  }(commonjsGlobal, function(e2) {
12278
11988
  function _2(e3) {
12279
11989
  return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
@@ -15354,12 +15064,11 @@ dayjs.extend(customParseFormat);
15354
15064
  dayjs.extend(localizedFormat);
15355
15065
  dayjs.extend(tz);
15356
15066
  dayjs.extend(utc);
15357
- const Dayjs = dayjs_minExports.Dayjs;
15358
15067
  export {
15359
15068
  DATE_PICKER_PROVIDER_KEY,
15360
15069
  _sfc_main as DatePicker,
15361
15070
  Dayjs,
15362
- dayjs,
15071
+ default2 as dayjs,
15363
15072
  _sfc_main as default,
15364
15073
  getDateValueMode,
15365
15074
  getDateValueToString,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/date-picker",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "蓝鲸监控平台日期时间选择",
5
5
  "license": "MIT",
6
6
  "author": "Tencent BlueKing",
@@ -35,8 +35,8 @@
35
35
  "typesVersions": {
36
36
  "*": {
37
37
  ".": ["./dist/vue3.d.ts"],
38
- "./vue3": ["./dist/vue3.d.ts"],
39
- "./vue2": ["./dist/vue2.d.ts"]
38
+ "vue3": ["./dist/vue3.d.ts"],
39
+ "vue2": ["./dist/vue2.d.ts"]
40
40
  }
41
41
  },
42
42
  "main": "dist/vue3-light.es.js",
@@ -49,7 +49,9 @@
49
49
  "registry": "https://registry.npmjs.org/"
50
50
  },
51
51
  "peerDependencies": {
52
- "vue": "^3.2.0"
52
+ "vue": "^3.2.0",
53
+ "bkui-vue": "^0.0.2-beta.77",
54
+ "dayjs": "^1.11.10"
53
55
  },
54
56
  "devDependencies": {
55
57
  "@types/node": "^20.8.7",