@univerjs/design 0.6.7 → 0.6.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.
@@ -0,0 +1,464 @@
1
+ function lt(i) {
2
+ return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
3
+ }
4
+ var W = { exports: {} }, A = { exports: {} }, _t = A.exports, rt;
5
+ function Mt() {
6
+ return rt || (rt = 1, function(i, m) {
7
+ (function(l, a) {
8
+ i.exports = a();
9
+ })(_t, function() {
10
+ var l = 1e3, a = 6e4, d = 36e5, p = "millisecond", f = "second", M = "minute", b = "hour", Y = "day", V = "week", D = "month", Q = "quarter", S = "year", P = "date", G = "Invalid Date", dt = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, yt = /\[([^\]]+)]|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, mt = { 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(s) {
11
+ var r = ["th", "st", "nd", "rd"], t = s % 100;
12
+ return "[" + s + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
13
+ } }, I = function(s, r, t) {
14
+ var n = String(s);
15
+ return !n || n.length >= r ? s : "" + Array(r + 1 - n.length).join(t) + s;
16
+ }, vt = { s: I, z: function(s) {
17
+ var r = -s.utcOffset(), t = Math.abs(r), n = Math.floor(t / 60), e = t % 60;
18
+ return (r <= 0 ? "+" : "-") + I(n, 2, "0") + ":" + I(e, 2, "0");
19
+ }, m: function s(r, t) {
20
+ if (r.date() < t.date()) return -s(t, r);
21
+ var n = 12 * (t.year() - r.year()) + (t.month() - r.month()), e = r.clone().add(n, D), o = t - e < 0, u = r.clone().add(n + (o ? -1 : 1), D);
22
+ return +(-(n + (t - e) / (o ? e - u : u - e)) || 0);
23
+ }, a: function(s) {
24
+ return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
25
+ }, p: function(s) {
26
+ return { M: D, y: S, w: V, d: Y, D: P, h: b, m: M, s: f, ms: p, Q }[s] || String(s || "").toLowerCase().replace(/s$/, "");
27
+ }, u: function(s) {
28
+ return s === void 0;
29
+ } }, H = "en", O = {};
30
+ O[H] = mt;
31
+ var tt = "$isDayjsObject", E = function(s) {
32
+ return s instanceof F || !(!s || !s[tt]);
33
+ }, R = function s(r, t, n) {
34
+ var e;
35
+ if (!r) return H;
36
+ if (typeof r == "string") {
37
+ var o = r.toLowerCase();
38
+ O[o] && (e = o), t && (O[o] = t, e = o);
39
+ var u = r.split("-");
40
+ if (!e && u.length > 1) return s(u[0]);
41
+ } else {
42
+ var h = r.name;
43
+ O[h] = r, e = h;
44
+ }
45
+ return !n && e && (H = e), e || !n && H;
46
+ }, v = function(s, r) {
47
+ if (E(s)) return s.clone();
48
+ var t = typeof r == "object" ? r : {};
49
+ return t.date = s, t.args = arguments, new F(t);
50
+ }, c = vt;
51
+ c.l = R, c.i = E, c.w = function(s, r) {
52
+ return v(s, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
53
+ };
54
+ var F = function() {
55
+ function s(t) {
56
+ this.$L = R(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[tt] = !0;
57
+ }
58
+ var r = s.prototype;
59
+ return r.parse = function(t) {
60
+ this.$d = function(n) {
61
+ var e = n.date, o = n.utc;
62
+ if (e === null) return /* @__PURE__ */ new Date(NaN);
63
+ if (c.u(e)) return /* @__PURE__ */ new Date();
64
+ if (e instanceof Date) return new Date(e);
65
+ if (typeof e == "string" && !/Z$/i.test(e)) {
66
+ var u = e.match(dt);
67
+ if (u) {
68
+ var h = u[2] - 1 || 0, y = (u[7] || "0").substring(0, 3);
69
+ return o ? new Date(Date.UTC(u[1], h, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, y)) : new Date(u[1], h, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, y);
70
+ }
71
+ }
72
+ return new Date(e);
73
+ }(t), this.init();
74
+ }, r.init = function() {
75
+ var t = this.$d;
76
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
77
+ }, r.$utils = function() {
78
+ return c;
79
+ }, r.isValid = function() {
80
+ return this.$d.toString() !== G;
81
+ }, r.isSame = function(t, n) {
82
+ var e = v(t);
83
+ return this.startOf(n) <= e && e <= this.endOf(n);
84
+ }, r.isAfter = function(t, n) {
85
+ return v(t) < this.startOf(n);
86
+ }, r.isBefore = function(t, n) {
87
+ return this.endOf(n) < v(t);
88
+ }, r.$g = function(t, n, e) {
89
+ return c.u(t) ? this[n] : this.set(e, t);
90
+ }, r.unix = function() {
91
+ return Math.floor(this.valueOf() / 1e3);
92
+ }, r.valueOf = function() {
93
+ return this.$d.getTime();
94
+ }, r.startOf = function(t, n) {
95
+ var e = this, o = !!c.u(n) || n, u = c.p(t), h = function(j, g) {
96
+ var T = c.w(e.$u ? Date.UTC(e.$y, g, j) : new Date(e.$y, g, j), e);
97
+ return o ? T : T.endOf(Y);
98
+ }, y = function(j, g) {
99
+ return c.w(e.toDate()[j].apply(e.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(g)), e);
100
+ }, _ = this.$W, $ = this.$M, x = this.$D, k = "set" + (this.$u ? "UTC" : "");
101
+ switch (u) {
102
+ case S:
103
+ return o ? h(1, 0) : h(31, 11);
104
+ case D:
105
+ return o ? h(1, $) : h(0, $ + 1);
106
+ case V:
107
+ var w = this.$locale().weekStart || 0, q = (_ < w ? _ + 7 : _) - w;
108
+ return h(o ? x - q : x + (6 - q), $);
109
+ case Y:
110
+ case P:
111
+ return y(k + "Hours", 0);
112
+ case b:
113
+ return y(k + "Minutes", 1);
114
+ case M:
115
+ return y(k + "Seconds", 2);
116
+ case f:
117
+ return y(k + "Milliseconds", 3);
118
+ default:
119
+ return this.clone();
120
+ }
121
+ }, r.endOf = function(t) {
122
+ return this.startOf(t, !1);
123
+ }, r.$set = function(t, n) {
124
+ var e, o = c.p(t), u = "set" + (this.$u ? "UTC" : ""), h = (e = {}, e[Y] = u + "Date", e[P] = u + "Date", e[D] = u + "Month", e[S] = u + "FullYear", e[b] = u + "Hours", e[M] = u + "Minutes", e[f] = u + "Seconds", e[p] = u + "Milliseconds", e)[o], y = o === Y ? this.$D + (n - this.$W) : n;
125
+ if (o === D || o === S) {
126
+ var _ = this.clone().set(P, 1);
127
+ _.$d[h](y), _.init(), this.$d = _.set(P, Math.min(this.$D, _.daysInMonth())).$d;
128
+ } else h && this.$d[h](y);
129
+ return this.init(), this;
130
+ }, r.set = function(t, n) {
131
+ return this.clone().$set(t, n);
132
+ }, r.get = function(t) {
133
+ return this[c.p(t)]();
134
+ }, r.add = function(t, n) {
135
+ var e, o = this;
136
+ t = Number(t);
137
+ var u = c.p(n), h = function($) {
138
+ var x = v(o);
139
+ return c.w(x.date(x.date() + Math.round($ * t)), o);
140
+ };
141
+ if (u === D) return this.set(D, this.$M + t);
142
+ if (u === S) return this.set(S, this.$y + t);
143
+ if (u === Y) return h(1);
144
+ if (u === V) return h(7);
145
+ var y = (e = {}, e[M] = a, e[b] = d, e[f] = l, e)[u] || 1, _ = this.$d.getTime() + t * y;
146
+ return c.w(_, this);
147
+ }, r.subtract = function(t, n) {
148
+ return this.add(-1 * t, n);
149
+ }, r.format = function(t) {
150
+ var n = this, e = this.$locale();
151
+ if (!this.isValid()) return e.invalidDate || G;
152
+ var o = t || "YYYY-MM-DDTHH:mm:ssZ", u = c.z(this), h = this.$H, y = this.$m, _ = this.$M, $ = e.weekdays, x = e.months, k = e.meridiem, w = function(g, T, C, K) {
153
+ return g && (g[T] || g(n, o)) || C[T].slice(0, K);
154
+ }, q = function(g) {
155
+ return c.s(h % 12 || 12, g, "0");
156
+ }, j = k || function(g, T, C) {
157
+ var K = g < 12 ? "AM" : "PM";
158
+ return C ? K.toLowerCase() : K;
159
+ };
160
+ return o.replace(yt, function(g, T) {
161
+ return T || function(C) {
162
+ switch (C) {
163
+ case "YY":
164
+ return String(n.$y).slice(-2);
165
+ case "YYYY":
166
+ return c.s(n.$y, 4, "0");
167
+ case "M":
168
+ return _ + 1;
169
+ case "MM":
170
+ return c.s(_ + 1, 2, "0");
171
+ case "MMM":
172
+ return w(e.monthsShort, _, x, 3);
173
+ case "MMMM":
174
+ return w(x, _);
175
+ case "D":
176
+ return n.$D;
177
+ case "DD":
178
+ return c.s(n.$D, 2, "0");
179
+ case "d":
180
+ return String(n.$W);
181
+ case "dd":
182
+ return w(e.weekdaysMin, n.$W, $, 2);
183
+ case "ddd":
184
+ return w(e.weekdaysShort, n.$W, $, 3);
185
+ case "dddd":
186
+ return $[n.$W];
187
+ case "H":
188
+ return String(h);
189
+ case "HH":
190
+ return c.s(h, 2, "0");
191
+ case "h":
192
+ return q(1);
193
+ case "hh":
194
+ return q(2);
195
+ case "a":
196
+ return j(h, y, !0);
197
+ case "A":
198
+ return j(h, y, !1);
199
+ case "m":
200
+ return String(y);
201
+ case "mm":
202
+ return c.s(y, 2, "0");
203
+ case "s":
204
+ return String(n.$s);
205
+ case "ss":
206
+ return c.s(n.$s, 2, "0");
207
+ case "SSS":
208
+ return c.s(n.$ms, 3, "0");
209
+ case "Z":
210
+ return u;
211
+ }
212
+ return null;
213
+ }(g) || u.replace(":", "");
214
+ });
215
+ }, r.utcOffset = function() {
216
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
+ }, r.diff = function(t, n, e) {
218
+ var o, u = this, h = c.p(n), y = v(t), _ = (y.utcOffset() - this.utcOffset()) * a, $ = this - y, x = function() {
219
+ return c.m(u, y);
220
+ };
221
+ switch (h) {
222
+ case S:
223
+ o = x() / 12;
224
+ break;
225
+ case D:
226
+ o = x();
227
+ break;
228
+ case Q:
229
+ o = x() / 3;
230
+ break;
231
+ case V:
232
+ o = ($ - _) / 6048e5;
233
+ break;
234
+ case Y:
235
+ o = ($ - _) / 864e5;
236
+ break;
237
+ case b:
238
+ o = $ / d;
239
+ break;
240
+ case M:
241
+ o = $ / a;
242
+ break;
243
+ case f:
244
+ o = $ / l;
245
+ break;
246
+ default:
247
+ o = $;
248
+ }
249
+ return e ? o : c.a(o);
250
+ }, r.daysInMonth = function() {
251
+ return this.endOf(D).$D;
252
+ }, r.$locale = function() {
253
+ return O[this.$L];
254
+ }, r.locale = function(t, n) {
255
+ if (!t) return this.$L;
256
+ var e = this.clone(), o = R(t, n, !0);
257
+ return o && (e.$L = o), e;
258
+ }, r.clone = function() {
259
+ return c.w(this.$d, this);
260
+ }, r.toDate = function() {
261
+ return new Date(this.valueOf());
262
+ }, r.toJSON = function() {
263
+ return this.isValid() ? this.toISOString() : null;
264
+ }, r.toISOString = function() {
265
+ return this.$d.toISOString();
266
+ }, r.toString = function() {
267
+ return this.$d.toUTCString();
268
+ }, s;
269
+ }(), et = F.prototype;
270
+ return v.prototype = et, [["$ms", p], ["$s", f], ["$m", M], ["$H", b], ["$W", Y], ["$M", D], ["$y", S], ["$D", P]].forEach(function(s) {
271
+ et[s[1]] = function(r) {
272
+ return this.$g(r, s[0], s[1]);
273
+ };
274
+ }), v.extend = function(s, r) {
275
+ return s.$i || (s(r, F, v), s.$i = !0), v;
276
+ }, v.locale = R, v.isDayjs = E, v.unix = function(s) {
277
+ return v(1e3 * s);
278
+ }, v.en = O[H], v.Ls = O, v.p = {}, v;
279
+ });
280
+ }(A)), A.exports;
281
+ }
282
+ var $t = W.exports, nt;
283
+ function gt() {
284
+ return nt || (nt = 1, function(i, m) {
285
+ (function(l, a) {
286
+ i.exports = a(Mt());
287
+ })($t, function(l) {
288
+ function a(f) {
289
+ return f && typeof f == "object" && "default" in f ? f : { default: f };
290
+ }
291
+ var d = a(l), p = { name: "vi", weekdays: "chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"), months: "tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"), weekStart: 1, weekdaysShort: "CN_T2_T3_T4_T5_T6_T7".split("_"), monthsShort: "Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"), weekdaysMin: "CN_T2_T3_T4_T5_T6_T7".split("_"), ordinal: function(f) {
292
+ return f;
293
+ }, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM [năm] YYYY", LLL: "D MMMM [năm] YYYY HH:mm", LLLL: "dddd, D MMMM [năm] YYYY HH:mm", l: "DD/M/YYYY", ll: "D MMM YYYY", lll: "D MMM YYYY HH:mm", llll: "ddd, D MMM YYYY HH:mm" }, relativeTime: { future: "%s tới", past: "%s trước", s: "vài giây", m: "một phút", mm: "%d phút", h: "một giờ", hh: "%d giờ", d: "một ngày", dd: "%d ngày", M: "một tháng", MM: "%d tháng", y: "một năm", yy: "%d năm" } };
294
+ return d.default.locale(p, null, !0), p;
295
+ });
296
+ }(W)), W.exports;
297
+ }
298
+ var xt = gt();
299
+ const Dt = /* @__PURE__ */ lt(xt);
300
+ var L = {}, U = { exports: {} }, it;
301
+ function bt() {
302
+ return it || (it = 1, function(i) {
303
+ function m(l) {
304
+ return l && l.__esModule ? l : {
305
+ default: l
306
+ };
307
+ }
308
+ i.exports = m, i.exports.__esModule = !0, i.exports.default = i.exports;
309
+ }(U)), U.exports;
310
+ }
311
+ var J = { exports: {} }, Z = { exports: {} }, z = { exports: {} }, B = { exports: {} }, st;
312
+ function pt() {
313
+ return st || (st = 1, function(i) {
314
+ function m(l) {
315
+ "@babel/helpers - typeof";
316
+ return i.exports = m = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
317
+ return typeof a;
318
+ } : function(a) {
319
+ return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
320
+ }, i.exports.__esModule = !0, i.exports.default = i.exports, m(l);
321
+ }
322
+ i.exports = m, i.exports.__esModule = !0, i.exports.default = i.exports;
323
+ }(B)), B.exports;
324
+ }
325
+ var X = { exports: {} }, ot;
326
+ function Yt() {
327
+ return ot || (ot = 1, function(i) {
328
+ var m = pt().default;
329
+ function l(a, d) {
330
+ if (m(a) != "object" || !a) return a;
331
+ var p = a[Symbol.toPrimitive];
332
+ if (p !== void 0) {
333
+ var f = p.call(a, d || "default");
334
+ if (m(f) != "object") return f;
335
+ throw new TypeError("@@toPrimitive must return a primitive value.");
336
+ }
337
+ return (d === "string" ? String : Number)(a);
338
+ }
339
+ i.exports = l, i.exports.__esModule = !0, i.exports.default = i.exports;
340
+ }(X)), X.exports;
341
+ }
342
+ var ut;
343
+ function St() {
344
+ return ut || (ut = 1, function(i) {
345
+ var m = pt().default, l = Yt();
346
+ function a(d) {
347
+ var p = l(d, "string");
348
+ return m(p) == "symbol" ? p : p + "";
349
+ }
350
+ i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
351
+ }(z)), z.exports;
352
+ }
353
+ var at;
354
+ function Tt() {
355
+ return at || (at = 1, function(i) {
356
+ var m = St();
357
+ function l(a, d, p) {
358
+ return (d = m(d)) in a ? Object.defineProperty(a, d, {
359
+ value: p,
360
+ enumerable: !0,
361
+ configurable: !0,
362
+ writable: !0
363
+ }) : a[d] = p, a;
364
+ }
365
+ i.exports = l, i.exports.__esModule = !0, i.exports.default = i.exports;
366
+ }(Z)), Z.exports;
367
+ }
368
+ var ct;
369
+ function Ot() {
370
+ return ct || (ct = 1, function(i) {
371
+ var m = Tt();
372
+ function l(d, p) {
373
+ var f = Object.keys(d);
374
+ if (Object.getOwnPropertySymbols) {
375
+ var M = Object.getOwnPropertySymbols(d);
376
+ p && (M = M.filter(function(b) {
377
+ return Object.getOwnPropertyDescriptor(d, b).enumerable;
378
+ })), f.push.apply(f, M);
379
+ }
380
+ return f;
381
+ }
382
+ function a(d) {
383
+ for (var p = 1; p < arguments.length; p++) {
384
+ var f = arguments[p] != null ? arguments[p] : {};
385
+ p % 2 ? l(Object(f), !0).forEach(function(M) {
386
+ m(d, M, f[M]);
387
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(d, Object.getOwnPropertyDescriptors(f)) : l(Object(f)).forEach(function(M) {
388
+ Object.defineProperty(d, M, Object.getOwnPropertyDescriptor(f, M));
389
+ });
390
+ }
391
+ return d;
392
+ }
393
+ i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
394
+ }(J)), J.exports;
395
+ }
396
+ var N = {}, ft;
397
+ function wt() {
398
+ return ft || (ft = 1, Object.defineProperty(N, "__esModule", {
399
+ value: !0
400
+ }), N.commonLocale = void 0, N.commonLocale = {
401
+ yearFormat: "YYYY",
402
+ dayFormat: "D",
403
+ cellMeridiemFormat: "A",
404
+ monthBeforeYear: !0
405
+ }), N;
406
+ }
407
+ var ht;
408
+ function jt() {
409
+ if (ht) return L;
410
+ ht = 1;
411
+ var i = bt().default;
412
+ Object.defineProperty(L, "__esModule", {
413
+ value: !0
414
+ }), L.default = void 0;
415
+ var m = i(Ot()), l = wt(), a = (0, m.default)((0, m.default)({}, l.commonLocale), {}, {
416
+ locale: "vi_VN",
417
+ today: "Hôm nay",
418
+ now: "Bây giờ",
419
+ backToToday: "Trở về hôm nay",
420
+ ok: "OK",
421
+ clear: "Xóa",
422
+ month: "Tháng",
423
+ year: "Năm",
424
+ timeSelect: "Chọn thời gian",
425
+ dateSelect: "Chọn ngày",
426
+ weekSelect: "Chọn tuần",
427
+ monthSelect: "Chọn tháng",
428
+ yearSelect: "Chọn năm",
429
+ decadeSelect: "Chọn thập kỷ",
430
+ dateFormat: "D/M/YYYY",
431
+ dateTimeFormat: "D/M/YYYY HH:mm:ss",
432
+ previousMonth: "Tháng trước (PageUp)",
433
+ nextMonth: "Tháng sau (PageDown)",
434
+ previousYear: "Năm trước (Control + left)",
435
+ nextYear: "Năm sau (Control + right)",
436
+ previousDecade: "Thập kỷ trước",
437
+ nextDecade: "Thập kỷ sau",
438
+ previousCentury: "Thế kỷ trước",
439
+ nextCentury: "Thế kỷ sau"
440
+ });
441
+ return L.default = a, L;
442
+ }
443
+ var Pt = jt();
444
+ const kt = /* @__PURE__ */ lt(Pt), Ht = {
445
+ design: {
446
+ Confirm: {
447
+ cancel: "Hủy bỏ",
448
+ confirm: "Xác nhận"
449
+ },
450
+ Picker: {
451
+ ...Dt,
452
+ ...kt
453
+ },
454
+ CascaderList: {
455
+ empty: "Không có"
456
+ },
457
+ Select: {
458
+ empty: "Không có"
459
+ }
460
+ }
461
+ };
462
+ export {
463
+ Ht as default
464
+ };