@univerjs/design 0.9.2 → 0.9.3
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/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/es/index.js +6 -1
- package/lib/es/locale/ca-ES.js +469 -0
- package/lib/es/locale/es-ES.js +469 -0
- package/lib/es/locale/fa-IR.js +409 -129
- package/lib/index.js +6 -1
- package/lib/locale/ca-ES.js +469 -0
- package/lib/locale/es-ES.js +469 -0
- package/lib/locale/fa-IR.js +409 -129
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -1
- package/package.json +5 -5
package/lib/locale/fa-IR.js
CHANGED
|
@@ -1,175 +1,455 @@
|
|
|
1
|
-
function
|
|
2
|
-
return
|
|
1
|
+
function le(i) {
|
|
2
|
+
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
3
3
|
}
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
7
|
-
(function(
|
|
8
|
-
|
|
9
|
-
})(
|
|
10
|
-
|
|
11
|
-
var r = ["th", "st", "nd", "rd"],
|
|
12
|
-
return "[" +
|
|
13
|
-
} }
|
|
4
|
+
var E = { exports: {} }, K = { exports: {} }, ve = K.exports, re;
|
|
5
|
+
function $e() {
|
|
6
|
+
return re || (re = 1, function(i, _) {
|
|
7
|
+
(function(l, a) {
|
|
8
|
+
i.exports = a();
|
|
9
|
+
})(ve, function() {
|
|
10
|
+
var l = 1e3, a = 6e4, h = 36e5, p = "millisecond", f = "second", $ = "minute", S = "hour", g = "day", F = "week", b = "month", G = "quarter", O = "year", k = "date", X = "Invalid Date", he = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ye = /\[([^\]]+)]|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, _e = { 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(o) {
|
|
11
|
+
var r = ["th", "st", "nd", "rd"], e = o % 100;
|
|
12
|
+
return "[" + o + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
|
|
13
|
+
} }, N = function(o, r, e) {
|
|
14
|
+
var n = String(o);
|
|
15
|
+
return !n || n.length >= r ? o : "" + Array(r + 1 - n.length).join(e) + o;
|
|
16
|
+
}, me = { s: N, z: function(o) {
|
|
17
|
+
var r = -o.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), t = e % 60;
|
|
18
|
+
return (r <= 0 ? "+" : "-") + N(n, 2, "0") + ":" + N(t, 2, "0");
|
|
19
|
+
}, m: function o(r, e) {
|
|
20
|
+
if (r.date() < e.date()) return -o(e, r);
|
|
21
|
+
var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(n, b), s = e - t < 0, u = r.clone().add(n + (s ? -1 : 1), b);
|
|
22
|
+
return +(-(n + (e - t) / (s ? t - u : u - t)) || 0);
|
|
23
|
+
}, a: function(o) {
|
|
24
|
+
return o < 0 ? Math.ceil(o) || 0 : Math.floor(o);
|
|
25
|
+
}, p: function(o) {
|
|
26
|
+
return { M: b, y: O, w: F, d: g, D: k, h: S, m: $, s: f, ms: p, Q: G }[o] || String(o || "").toLowerCase().replace(/s$/, "");
|
|
27
|
+
}, u: function(o) {
|
|
28
|
+
return o === void 0;
|
|
29
|
+
} }, L = "en", Y = {};
|
|
30
|
+
Y[L] = _e;
|
|
31
|
+
var ee = "$isDayjsObject", U = function(o) {
|
|
32
|
+
return o instanceof W || !(!o || !o[ee]);
|
|
33
|
+
}, I = function o(r, e, n) {
|
|
34
|
+
var t;
|
|
35
|
+
if (!r) return L;
|
|
36
|
+
if (typeof r == "string") {
|
|
37
|
+
var s = r.toLowerCase();
|
|
38
|
+
Y[s] && (t = s), e && (Y[s] = e, t = s);
|
|
39
|
+
var u = r.split("-");
|
|
40
|
+
if (!t && u.length > 1) return o(u[0]);
|
|
41
|
+
} else {
|
|
42
|
+
var d = r.name;
|
|
43
|
+
Y[d] = r, t = d;
|
|
44
|
+
}
|
|
45
|
+
return !n && t && (L = t), t || !n && L;
|
|
46
|
+
}, m = function(o, r) {
|
|
47
|
+
if (U(o)) return o.clone();
|
|
48
|
+
var e = typeof r == "object" ? r : {};
|
|
49
|
+
return e.date = o, e.args = arguments, new W(e);
|
|
50
|
+
}, c = me;
|
|
51
|
+
c.l = I, c.i = U, c.w = function(o, r) {
|
|
52
|
+
return m(o, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
|
|
53
|
+
};
|
|
54
|
+
var W = function() {
|
|
55
|
+
function o(e) {
|
|
56
|
+
this.$L = I(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[ee] = !0;
|
|
57
|
+
}
|
|
58
|
+
var r = o.prototype;
|
|
59
|
+
return r.parse = function(e) {
|
|
60
|
+
this.$d = function(n) {
|
|
61
|
+
var t = n.date, s = n.utc;
|
|
62
|
+
if (t === null) return /* @__PURE__ */ new Date(NaN);
|
|
63
|
+
if (c.u(t)) return /* @__PURE__ */ new Date();
|
|
64
|
+
if (t instanceof Date) return new Date(t);
|
|
65
|
+
if (typeof t == "string" && !/Z$/i.test(t)) {
|
|
66
|
+
var u = t.match(he);
|
|
67
|
+
if (u) {
|
|
68
|
+
var d = u[2] - 1 || 0, y = (u[7] || "0").substring(0, 3);
|
|
69
|
+
return s ? new Date(Date.UTC(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, y)) : new Date(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, y);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return new Date(t);
|
|
73
|
+
}(e), this.init();
|
|
74
|
+
}, r.init = function() {
|
|
75
|
+
var e = this.$d;
|
|
76
|
+
this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
|
|
77
|
+
}, r.$utils = function() {
|
|
78
|
+
return c;
|
|
79
|
+
}, r.isValid = function() {
|
|
80
|
+
return this.$d.toString() !== X;
|
|
81
|
+
}, r.isSame = function(e, n) {
|
|
82
|
+
var t = m(e);
|
|
83
|
+
return this.startOf(n) <= t && t <= this.endOf(n);
|
|
84
|
+
}, r.isAfter = function(e, n) {
|
|
85
|
+
return m(e) < this.startOf(n);
|
|
86
|
+
}, r.isBefore = function(e, n) {
|
|
87
|
+
return this.endOf(n) < m(e);
|
|
88
|
+
}, r.$g = function(e, n, t) {
|
|
89
|
+
return c.u(e) ? this[n] : this.set(t, e);
|
|
90
|
+
}, r.unix = function() {
|
|
91
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
92
|
+
}, r.valueOf = function() {
|
|
93
|
+
return this.$d.getTime();
|
|
94
|
+
}, r.startOf = function(e, n) {
|
|
95
|
+
var t = this, s = !!c.u(n) || n, u = c.p(e), d = function(j, x) {
|
|
96
|
+
var w = c.w(t.$u ? Date.UTC(t.$y, x, j) : new Date(t.$y, x, j), t);
|
|
97
|
+
return s ? w : w.endOf(g);
|
|
98
|
+
}, y = function(j, x) {
|
|
99
|
+
return c.w(t.toDate()[j].apply(t.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(x)), t);
|
|
100
|
+
}, v = this.$W, M = this.$M, D = this.$D, q = "set" + (this.$u ? "UTC" : "");
|
|
101
|
+
switch (u) {
|
|
102
|
+
case O:
|
|
103
|
+
return s ? d(1, 0) : d(31, 11);
|
|
104
|
+
case b:
|
|
105
|
+
return s ? d(1, M) : d(0, M + 1);
|
|
106
|
+
case F:
|
|
107
|
+
var P = this.$locale().weekStart || 0, T = (v < P ? v + 7 : v) - P;
|
|
108
|
+
return d(s ? D - T : D + (6 - T), M);
|
|
109
|
+
case g:
|
|
110
|
+
case k:
|
|
111
|
+
return y(q + "Hours", 0);
|
|
112
|
+
case S:
|
|
113
|
+
return y(q + "Minutes", 1);
|
|
114
|
+
case $:
|
|
115
|
+
return y(q + "Seconds", 2);
|
|
116
|
+
case f:
|
|
117
|
+
return y(q + "Milliseconds", 3);
|
|
118
|
+
default:
|
|
119
|
+
return this.clone();
|
|
120
|
+
}
|
|
121
|
+
}, r.endOf = function(e) {
|
|
122
|
+
return this.startOf(e, !1);
|
|
123
|
+
}, r.$set = function(e, n) {
|
|
124
|
+
var t, s = c.p(e), u = "set" + (this.$u ? "UTC" : ""), d = (t = {}, t[g] = u + "Date", t[k] = u + "Date", t[b] = u + "Month", t[O] = u + "FullYear", t[S] = u + "Hours", t[$] = u + "Minutes", t[f] = u + "Seconds", t[p] = u + "Milliseconds", t)[s], y = s === g ? this.$D + (n - this.$W) : n;
|
|
125
|
+
if (s === b || s === O) {
|
|
126
|
+
var v = this.clone().set(k, 1);
|
|
127
|
+
v.$d[d](y), v.init(), this.$d = v.set(k, Math.min(this.$D, v.daysInMonth())).$d;
|
|
128
|
+
} else d && this.$d[d](y);
|
|
129
|
+
return this.init(), this;
|
|
130
|
+
}, r.set = function(e, n) {
|
|
131
|
+
return this.clone().$set(e, n);
|
|
132
|
+
}, r.get = function(e) {
|
|
133
|
+
return this[c.p(e)]();
|
|
134
|
+
}, r.add = function(e, n) {
|
|
135
|
+
var t, s = this;
|
|
136
|
+
e = Number(e);
|
|
137
|
+
var u = c.p(n), d = function(M) {
|
|
138
|
+
var D = m(s);
|
|
139
|
+
return c.w(D.date(D.date() + Math.round(M * e)), s);
|
|
140
|
+
};
|
|
141
|
+
if (u === b) return this.set(b, this.$M + e);
|
|
142
|
+
if (u === O) return this.set(O, this.$y + e);
|
|
143
|
+
if (u === g) return d(1);
|
|
144
|
+
if (u === F) return d(7);
|
|
145
|
+
var y = (t = {}, t[$] = a, t[S] = h, t[f] = l, t)[u] || 1, v = this.$d.getTime() + e * y;
|
|
146
|
+
return c.w(v, this);
|
|
147
|
+
}, r.subtract = function(e, n) {
|
|
148
|
+
return this.add(-1 * e, n);
|
|
149
|
+
}, r.format = function(e) {
|
|
150
|
+
var n = this, t = this.$locale();
|
|
151
|
+
if (!this.isValid()) return t.invalidDate || X;
|
|
152
|
+
var s = e || "YYYY-MM-DDTHH:mm:ssZ", u = c.z(this), d = this.$H, y = this.$m, v = this.$M, M = t.weekdays, D = t.months, q = t.meridiem, P = function(x, w, H, A) {
|
|
153
|
+
return x && (x[w] || x(n, s)) || H[w].slice(0, A);
|
|
154
|
+
}, T = function(x) {
|
|
155
|
+
return c.s(d % 12 || 12, x, "0");
|
|
156
|
+
}, j = q || function(x, w, H) {
|
|
157
|
+
var A = x < 12 ? "AM" : "PM";
|
|
158
|
+
return H ? A.toLowerCase() : A;
|
|
159
|
+
};
|
|
160
|
+
return s.replace(ye, function(x, w) {
|
|
161
|
+
return w || function(H) {
|
|
162
|
+
switch (H) {
|
|
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 v + 1;
|
|
169
|
+
case "MM":
|
|
170
|
+
return c.s(v + 1, 2, "0");
|
|
171
|
+
case "MMM":
|
|
172
|
+
return P(t.monthsShort, v, D, 3);
|
|
173
|
+
case "MMMM":
|
|
174
|
+
return P(D, v);
|
|
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 P(t.weekdaysMin, n.$W, M, 2);
|
|
183
|
+
case "ddd":
|
|
184
|
+
return P(t.weekdaysShort, n.$W, M, 3);
|
|
185
|
+
case "dddd":
|
|
186
|
+
return M[n.$W];
|
|
187
|
+
case "H":
|
|
188
|
+
return String(d);
|
|
189
|
+
case "HH":
|
|
190
|
+
return c.s(d, 2, "0");
|
|
191
|
+
case "h":
|
|
192
|
+
return T(1);
|
|
193
|
+
case "hh":
|
|
194
|
+
return T(2);
|
|
195
|
+
case "a":
|
|
196
|
+
return j(d, y, !0);
|
|
197
|
+
case "A":
|
|
198
|
+
return j(d, 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
|
+
}(x) || u.replace(":", "");
|
|
214
|
+
});
|
|
215
|
+
}, r.utcOffset = function() {
|
|
216
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
217
|
+
}, r.diff = function(e, n, t) {
|
|
218
|
+
var s, u = this, d = c.p(n), y = m(e), v = (y.utcOffset() - this.utcOffset()) * a, M = this - y, D = function() {
|
|
219
|
+
return c.m(u, y);
|
|
220
|
+
};
|
|
221
|
+
switch (d) {
|
|
222
|
+
case O:
|
|
223
|
+
s = D() / 12;
|
|
224
|
+
break;
|
|
225
|
+
case b:
|
|
226
|
+
s = D();
|
|
227
|
+
break;
|
|
228
|
+
case G:
|
|
229
|
+
s = D() / 3;
|
|
230
|
+
break;
|
|
231
|
+
case F:
|
|
232
|
+
s = (M - v) / 6048e5;
|
|
233
|
+
break;
|
|
234
|
+
case g:
|
|
235
|
+
s = (M - v) / 864e5;
|
|
236
|
+
break;
|
|
237
|
+
case S:
|
|
238
|
+
s = M / h;
|
|
239
|
+
break;
|
|
240
|
+
case $:
|
|
241
|
+
s = M / a;
|
|
242
|
+
break;
|
|
243
|
+
case f:
|
|
244
|
+
s = M / l;
|
|
245
|
+
break;
|
|
246
|
+
default:
|
|
247
|
+
s = M;
|
|
248
|
+
}
|
|
249
|
+
return t ? s : c.a(s);
|
|
250
|
+
}, r.daysInMonth = function() {
|
|
251
|
+
return this.endOf(b).$D;
|
|
252
|
+
}, r.$locale = function() {
|
|
253
|
+
return Y[this.$L];
|
|
254
|
+
}, r.locale = function(e, n) {
|
|
255
|
+
if (!e) return this.$L;
|
|
256
|
+
var t = this.clone(), s = I(e, n, !0);
|
|
257
|
+
return s && (t.$L = s), t;
|
|
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
|
+
}, o;
|
|
269
|
+
}(), te = W.prototype;
|
|
270
|
+
return m.prototype = te, [["$ms", p], ["$s", f], ["$m", $], ["$H", S], ["$W", g], ["$M", b], ["$y", O], ["$D", k]].forEach(function(o) {
|
|
271
|
+
te[o[1]] = function(r) {
|
|
272
|
+
return this.$g(r, o[0], o[1]);
|
|
273
|
+
};
|
|
274
|
+
}), m.extend = function(o, r) {
|
|
275
|
+
return o.$i || (o(r, W, m), o.$i = !0), m;
|
|
276
|
+
}, m.locale = I, m.isDayjs = U, m.unix = function(o) {
|
|
277
|
+
return m(1e3 * o);
|
|
278
|
+
}, m.en = Y[L], m.Ls = Y, m.p = {}, m;
|
|
279
|
+
});
|
|
280
|
+
}(K)), K.exports;
|
|
281
|
+
}
|
|
282
|
+
var Me = E.exports, ne;
|
|
283
|
+
function xe() {
|
|
284
|
+
return ne || (ne = 1, function(i, _) {
|
|
285
|
+
(function(l, a) {
|
|
286
|
+
i.exports = a($e());
|
|
287
|
+
})(Me, function(l) {
|
|
288
|
+
function a(f) {
|
|
289
|
+
return f && typeof f == "object" && "default" in f ? f : { default: f };
|
|
290
|
+
}
|
|
291
|
+
var h = a(l), p = { name: "fa", weekdays: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysShort: "یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"), weekdaysMin: "ی_د_س_چ_پ_ج_ش".split("_"), weekStart: 6, months: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), monthsShort: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"), ordinal: function(f) {
|
|
292
|
+
return f;
|
|
293
|
+
}, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D MMMM YYYY", LLL: "D MMMM YYYY HH:mm", LLLL: "dddd, D MMMM YYYY HH:mm" }, relativeTime: { future: "در %s", past: "%s پیش", s: "چند ثانیه", m: "یک دقیقه", mm: "%d دقیقه", h: "یک ساعت", hh: "%d ساعت", d: "یک روز", dd: "%d روز", M: "یک ماه", MM: "%d ماه", y: "یک سال", yy: "%d سال" } };
|
|
294
|
+
return h.default.locale(p, null, !0), p;
|
|
14
295
|
});
|
|
15
|
-
}(
|
|
296
|
+
}(E)), E.exports;
|
|
16
297
|
}
|
|
17
|
-
var
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
function
|
|
23
|
-
return
|
|
24
|
-
default:
|
|
298
|
+
var De = xe();
|
|
299
|
+
const be = /* @__PURE__ */ le(De);
|
|
300
|
+
var R = {}, J = { exports: {} }, ie;
|
|
301
|
+
function Se() {
|
|
302
|
+
return ie || (ie = 1, function(i) {
|
|
303
|
+
function _(l) {
|
|
304
|
+
return l && l.__esModule ? l : {
|
|
305
|
+
default: l
|
|
25
306
|
};
|
|
26
307
|
}
|
|
27
|
-
|
|
28
|
-
}(
|
|
308
|
+
i.exports = _, i.exports.__esModule = !0, i.exports.default = i.exports;
|
|
309
|
+
}(J)), J.exports;
|
|
29
310
|
}
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
return
|
|
33
|
-
function
|
|
311
|
+
var Z = { exports: {} }, z = { exports: {} }, V = { exports: {} }, B = { exports: {} }, oe;
|
|
312
|
+
function pe() {
|
|
313
|
+
return oe || (oe = 1, function(i) {
|
|
314
|
+
function _(l) {
|
|
34
315
|
"@babel/helpers - typeof";
|
|
35
|
-
return
|
|
36
|
-
return typeof
|
|
37
|
-
} : function(
|
|
38
|
-
return
|
|
39
|
-
},
|
|
316
|
+
return i.exports = _ = 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, _(l);
|
|
40
321
|
}
|
|
41
|
-
|
|
42
|
-
}(
|
|
322
|
+
i.exports = _, i.exports.__esModule = !0, i.exports.default = i.exports;
|
|
323
|
+
}(B)), B.exports;
|
|
43
324
|
}
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
if (
|
|
50
|
-
var
|
|
51
|
-
if (
|
|
52
|
-
var
|
|
53
|
-
if (
|
|
325
|
+
var Q = { exports: {} }, se;
|
|
326
|
+
function ge() {
|
|
327
|
+
return se || (se = 1, function(i) {
|
|
328
|
+
var _ = pe().default;
|
|
329
|
+
function l(a, h) {
|
|
330
|
+
if (_(a) != "object" || !a) return a;
|
|
331
|
+
var p = a[Symbol.toPrimitive];
|
|
332
|
+
if (p !== void 0) {
|
|
333
|
+
var f = p.call(a, h || "default");
|
|
334
|
+
if (_(f) != "object") return f;
|
|
54
335
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
55
336
|
}
|
|
56
|
-
return (
|
|
337
|
+
return (h === "string" ? String : Number)(a);
|
|
57
338
|
}
|
|
58
|
-
|
|
59
|
-
}(
|
|
339
|
+
i.exports = l, i.exports.__esModule = !0, i.exports.default = i.exports;
|
|
340
|
+
}(Q)), Q.exports;
|
|
60
341
|
}
|
|
61
|
-
var
|
|
62
|
-
function
|
|
63
|
-
return
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
var
|
|
67
|
-
return
|
|
342
|
+
var ue;
|
|
343
|
+
function Oe() {
|
|
344
|
+
return ue || (ue = 1, function(i) {
|
|
345
|
+
var _ = pe().default, l = ge();
|
|
346
|
+
function a(h) {
|
|
347
|
+
var p = l(h, "string");
|
|
348
|
+
return _(p) == "symbol" ? p : p + "";
|
|
68
349
|
}
|
|
69
|
-
|
|
70
|
-
}(
|
|
350
|
+
i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
|
|
351
|
+
}(V)), V.exports;
|
|
71
352
|
}
|
|
72
|
-
var
|
|
73
|
-
function
|
|
74
|
-
return
|
|
75
|
-
var
|
|
76
|
-
function
|
|
77
|
-
return (
|
|
78
|
-
value:
|
|
353
|
+
var ae;
|
|
354
|
+
function we() {
|
|
355
|
+
return ae || (ae = 1, function(i) {
|
|
356
|
+
var _ = Oe();
|
|
357
|
+
function l(a, h, p) {
|
|
358
|
+
return (h = _(h)) in a ? Object.defineProperty(a, h, {
|
|
359
|
+
value: p,
|
|
79
360
|
enumerable: !0,
|
|
80
361
|
configurable: !0,
|
|
81
362
|
writable: !0
|
|
82
|
-
}) :
|
|
363
|
+
}) : a[h] = p, a;
|
|
83
364
|
}
|
|
84
|
-
|
|
85
|
-
}(
|
|
365
|
+
i.exports = l, i.exports.__esModule = !0, i.exports.default = i.exports;
|
|
366
|
+
}(z)), z.exports;
|
|
86
367
|
}
|
|
87
|
-
var
|
|
88
|
-
function
|
|
89
|
-
return
|
|
90
|
-
var
|
|
91
|
-
function
|
|
92
|
-
var
|
|
368
|
+
var ce;
|
|
369
|
+
function Ye() {
|
|
370
|
+
return ce || (ce = 1, function(i) {
|
|
371
|
+
var _ = we();
|
|
372
|
+
function l(h, p) {
|
|
373
|
+
var f = Object.keys(h);
|
|
93
374
|
if (Object.getOwnPropertySymbols) {
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
return Object.getOwnPropertyDescriptor(
|
|
97
|
-
})),
|
|
375
|
+
var $ = Object.getOwnPropertySymbols(h);
|
|
376
|
+
p && ($ = $.filter(function(S) {
|
|
377
|
+
return Object.getOwnPropertyDescriptor(h, S).enumerable;
|
|
378
|
+
})), f.push.apply(f, $);
|
|
98
379
|
}
|
|
99
|
-
return
|
|
380
|
+
return f;
|
|
100
381
|
}
|
|
101
|
-
function
|
|
102
|
-
for (var
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
107
|
-
Object.defineProperty(
|
|
382
|
+
function a(h) {
|
|
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($) {
|
|
386
|
+
_(h, $, f[$]);
|
|
387
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(f)) : l(Object(f)).forEach(function($) {
|
|
388
|
+
Object.defineProperty(h, $, Object.getOwnPropertyDescriptor(f, $));
|
|
108
389
|
});
|
|
109
390
|
}
|
|
110
|
-
return
|
|
391
|
+
return h;
|
|
111
392
|
}
|
|
112
|
-
|
|
113
|
-
}(
|
|
393
|
+
i.exports = a, i.exports.__esModule = !0, i.exports.default = i.exports;
|
|
394
|
+
}(Z)), Z.exports;
|
|
114
395
|
}
|
|
115
|
-
var
|
|
116
|
-
function
|
|
117
|
-
return
|
|
396
|
+
var C = {}, fe;
|
|
397
|
+
function Pe() {
|
|
398
|
+
return fe || (fe = 1, Object.defineProperty(C, "__esModule", {
|
|
118
399
|
value: !0
|
|
119
|
-
}),
|
|
400
|
+
}), C.commonLocale = void 0, C.commonLocale = {
|
|
120
401
|
yearFormat: "YYYY",
|
|
121
402
|
dayFormat: "D",
|
|
122
403
|
cellMeridiemFormat: "A",
|
|
123
404
|
monthBeforeYear: !0
|
|
124
|
-
}),
|
|
405
|
+
}), C;
|
|
125
406
|
}
|
|
126
|
-
var
|
|
127
|
-
function
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
var
|
|
131
|
-
Object.defineProperty(
|
|
407
|
+
var de;
|
|
408
|
+
function je() {
|
|
409
|
+
if (de) return R;
|
|
410
|
+
de = 1;
|
|
411
|
+
var i = Se().default;
|
|
412
|
+
Object.defineProperty(R, "__esModule", {
|
|
132
413
|
value: !0
|
|
133
|
-
}),
|
|
134
|
-
var
|
|
135
|
-
locale: "
|
|
136
|
-
today: "
|
|
137
|
-
now: "
|
|
138
|
-
backToToday: "
|
|
139
|
-
ok: "
|
|
140
|
-
clear: "
|
|
141
|
-
week: "
|
|
142
|
-
month: "
|
|
143
|
-
year: "
|
|
144
|
-
timeSelect: "
|
|
145
|
-
dateSelect: "
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
decadeSelect: "Choose a decade",
|
|
414
|
+
}), R.default = void 0;
|
|
415
|
+
var _ = i(Ye()), l = Pe(), a = (0, _.default)((0, _.default)({}, l.commonLocale), {}, {
|
|
416
|
+
locale: "fa_IR",
|
|
417
|
+
today: "امروز",
|
|
418
|
+
now: "اکنون",
|
|
419
|
+
backToToday: "بازگشت به روز",
|
|
420
|
+
ok: "باشه",
|
|
421
|
+
clear: "پاک کردن",
|
|
422
|
+
week: "هفته",
|
|
423
|
+
month: "ماه",
|
|
424
|
+
year: "سال",
|
|
425
|
+
timeSelect: "انتخاب زمان",
|
|
426
|
+
dateSelect: "انتخاب تاریخ",
|
|
427
|
+
monthSelect: "یک ماه را انتخاب کنید",
|
|
428
|
+
yearSelect: "یک سال را انتخاب کنید",
|
|
429
|
+
decadeSelect: "یک دهه را انتخاب کنید",
|
|
150
430
|
dateFormat: "M/D/YYYY",
|
|
151
431
|
dateTimeFormat: "M/D/YYYY HH:mm:ss",
|
|
152
|
-
previousMonth: "
|
|
153
|
-
nextMonth: "
|
|
154
|
-
previousYear: "
|
|
155
|
-
nextYear: "
|
|
156
|
-
previousDecade: "
|
|
157
|
-
nextDecade: "
|
|
158
|
-
previousCentury: "
|
|
159
|
-
nextCentury: "
|
|
432
|
+
previousMonth: "ماه قبل (PageUp)",
|
|
433
|
+
nextMonth: "ماه بعد (PageDown)",
|
|
434
|
+
previousYear: "سال قبل (Control + left)",
|
|
435
|
+
nextYear: "سال بعد (Control + right)",
|
|
436
|
+
previousDecade: "دهه قبل",
|
|
437
|
+
nextDecade: "دهه بعد",
|
|
438
|
+
previousCentury: "قرن قبل",
|
|
439
|
+
nextCentury: "قرن بعد"
|
|
160
440
|
});
|
|
161
|
-
return
|
|
441
|
+
return R.default = a, R;
|
|
162
442
|
}
|
|
163
|
-
var
|
|
164
|
-
const
|
|
443
|
+
var ke = je();
|
|
444
|
+
const qe = /* @__PURE__ */ le(ke), Le = {
|
|
165
445
|
design: {
|
|
166
446
|
Confirm: {
|
|
167
447
|
cancel: "لغو",
|
|
168
448
|
confirm: "باشه"
|
|
169
449
|
},
|
|
170
450
|
Picker: {
|
|
171
|
-
...
|
|
172
|
-
...
|
|
451
|
+
...be,
|
|
452
|
+
...qe
|
|
173
453
|
},
|
|
174
454
|
CascaderList: {
|
|
175
455
|
empty: "هیچ کدام"
|
|
@@ -185,5 +465,5 @@ const A = /* @__PURE__ */ g(N), J = {
|
|
|
185
465
|
}
|
|
186
466
|
};
|
|
187
467
|
export {
|
|
188
|
-
|
|
468
|
+
Le as default
|
|
189
469
|
};
|
package/lib/umd/index.js
CHANGED
|
@@ -115,7 +115,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
115
115
|
hsl(300, 100%, 50%),
|
|
116
116
|
hsl(360, 100%, 50%))`},onPointerDown:h=>{o(!0),u(h.clientX)},children:P.jsx("div",{ref:i,className:"univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform",style:{left:l(),transform:"translateY(-50%)",transition:r?"none":"all 0.1s ease-out"}})})})}const Gy=D.memo(Uy),Ky=D.memo(qy),Xy=D.memo(By),Zy=D.memo(Yy);function Qy({format:e="hex",value:t="#000000",onChange:n}){if(!va)return null;const{locale:r}=D.useContext(mn),[o,a]=D.useState([0,100,100]),[i,s]=D.useState(!1),u=D.useCallback((h,m,y)=>Pa(h,m,y),[]);D.useEffect(()=>{try{if(e==="hex"){const[h,m,y]=t?Es(t):o;a([h,m,y])}}catch(h){console.error("Invalid value:",h)}},[t]);function c(h,m,y){a([h,m,y])}function f(h,m,y){const[w,v,p]=u(h,m,y);if(e==="hex"){const g=sd(w,v,p);n==null||n(g)}}function l(){const[h,m,y]=o,w=Da(h,m,y);n==null||n(w),s(!1)}return P.jsxs("div",{"data-u-comp":"color-picker",className:"univer-cursor-default univer-space-y-2 univer-rounded-lg univer-bg-white dark:!univer-bg-gray-700",onClick:h=>h.stopPropagation(),children:[P.jsx(Zy,{hsv:o,onChange:(h,m,y)=>{c(h,m,y),f(h,m,y)}}),P.jsx("div",{className:"univer-flex univer-h-7 univer-items-center",children:P.jsx("a",{className:"univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity hover:univer-opacity-80 dark:!univer-text-white",onClick:()=>s(!0),children:r==null?void 0:r.ColorPicker.more})}),P.jsx(Ss,{className:"!univer-w-fit !univer-p-2.5",closable:!1,maskClosable:!1,open:i,onOpenChange:s,children:P.jsxs("div",{className:"univer-grid univer-w-64 univer-gap-2",children:[P.jsx(Gy,{hsv:o,onChange:c}),P.jsxs("div",{className:"univer-flex univer-items-center univer-gap-2",children:[P.jsx("div",{className:"univer-size-6 univer-flex-shrink-0 univer-rounded-sm",style:{backgroundColor:Da(...o)}}),P.jsx(Ky,{hsv:o,onChange:c})]}),P.jsx(Xy,{hsv:o,onChange:c}),P.jsxs("footer",{className:"univer-flex univer-items-center univer-justify-end univer-gap-2",children:[P.jsx(kn,{onClick:()=>s(!1),children:r==null?void 0:r.ColorPicker.cancel}),P.jsx(kn,{variant:"primary",onClick:l,children:r==null?void 0:r.ColorPicker.confirm})]})]})})]})}function Jy(e){const{locale:t,cancelText:n,confirmText:r,onClose:o,onConfirm:a}=e;return P.jsxs("footer",{className:"univer-flex univer-items-center univer-justify-end univer-gap-2",children:[P.jsx(kn,{onClick:o,children:n!=null?n:t==null?void 0:t.Confirm.cancel}),P.jsx(kn,{variant:"primary",onClick:a,children:r!=null?r:t==null?void 0:t.Confirm.confirm})]})}function eb(e){const{children:t,visible:n=!1,title:r,cancelText:o,confirmText:a,width:i,onClose:s,onConfirm:u}=e,{locale:c}=D.useContext(mn);return P.jsx(Ss,{open:n,title:r,maskClosable:!1,footer:P.jsx(Jy,{locale:c,cancelText:o,confirmText:a,onClose:s,onConfirm:u}),onClose:s,width:i,children:t})}function Ne(){return Ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ne.apply(null,arguments)}function Ms(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tb(e){if(Array.isArray(e))return Ms(e)}function nb(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ud(e,t){if(e){if(typeof e=="string")return Ms(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ms(e,t):void 0}}function rb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
117
117
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wt(e){return tb(e)||nb(e)||ud(e)||rb()}function Ct(e){"@babel/helpers - typeof";return Ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(e)}function ob(e,t){if(Ct(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ct(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cd(e){var t=ob(e,"string");return Ct(t)=="symbol"?t:t+""}function ce(e,t,n){return(t=cd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dd(Object(n),!0).forEach(function(r){ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ab(e){if(Array.isArray(e))return e}function ib(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(f){c=!0,o=f}finally{try{if(!u&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function sb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
118
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(e,t){return ab(e)||ib(e,t)||ud(e,t)||sb()}function ct(e){var t=d.useRef();t.current=e;var n=d.useCallback(function(){for(var r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(a))},[]);return n}function Bn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var fd=Bn()?d.useLayoutEffect:d.useEffect,ht=function(t,n){var r=d.useRef(!0);fd(function(){return t(r.current)},n),fd(function(){return r.current=!1,function(){r.current=!0}},[])},Ps=function(t,n){ht(function(r){if(!r)return t()},n)};function mo(e){var t=d.useRef(!1),n=d.useState(e),r=X(n,2),o=r[0],a=r[1];d.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(s,u){u&&t.current||a(s)}return[o,i]}function Ds(e){return e!==void 0}function ln(e,t){var n=t||{},r=n.defaultValue,o=n.value,a=n.onChange,i=n.postState,s=mo(function(){return Ds(o)?o:Ds(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),u=X(s,2),c=u[0],f=u[1],l=o!==void 0?o:c,h=i?i(l):l,m=ct(a),y=mo([l]),w=X(y,2),v=w[0],p=w[1];Ps(function(){var b=v[0];c!==b&&m(c,b)},[v]),Ps(function(){Ds(o)||f(o)},[o]);var g=ct(function(b,C){f(b,C),p([l],C)});return[h,g]}function ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){
|
|
118
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(e,t){return ab(e)||ib(e,t)||ud(e,t)||sb()}function ct(e){var t=d.useRef();t.current=e;var n=d.useCallback(function(){for(var r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(a))},[]);return n}function Bn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var fd=Bn()?d.useLayoutEffect:d.useEffect,ht=function(t,n){var r=d.useRef(!0);fd(function(){return t(r.current)},n),fd(function(){return r.current=!1,function(){r.current=!0}},[])},Ps=function(t,n){ht(function(r){if(!r)return t()},n)};function mo(e){var t=d.useRef(!1),n=d.useState(e),r=X(n,2),o=r[0],a=r[1];d.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(s,u){u&&t.current||a(s)}return[o,i]}function Ds(e){return e!==void 0}function ln(e,t){var n=t||{},r=n.defaultValue,o=n.value,a=n.onChange,i=n.postState,s=mo(function(){return Ds(o)?o:Ds(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),u=X(s,2),c=u[0],f=u[1],l=o!==void 0?o:c,h=i?i(l):l,m=ct(a),y=mo([l]),w=X(y,2),v=w[0],p=w[1];Ps(function(){var b=v[0];c!==b&&m(c,b)},[v]),Ps(function(){Ds(o)||f(o)},[o]);var g=ct(function(b,C){f(b,C),p([l],C)});return[h,g]}function ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vd(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var _s={exports:{}},vt={};/**
|
|
119
119
|
* @license React
|
|
120
120
|
* react-is.production.min.js
|
|
121
121
|
*
|