@shelf/global-renderer 1.0.1-beta.3 → 1.0.2-beta.0
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/CHANGELOG.md +16 -0
- package/lib/DecisionTreeContent/helpers.js +15 -17
- package/package.json +4 -6
- package/lib/_virtual/_commonjsHelpers.js +0 -4
- package/lib/_virtual/advancedFormat.js +0 -4
- package/lib/_virtual/dayjs.min.js +0 -4
- package/lib/_virtual/localeData.js +0 -4
- package/lib/_virtual/localizedFormat.js +0 -4
- package/lib/node_modules/@shelf/datetime/lib/getDateFormatTemplates.js +0 -15
- package/lib/node_modules/@shelf/datetime/lib/getDateWithCustomFormat.js +0 -10
- package/lib/node_modules/@shelf/datetime/lib/getTimeFormatTemplates.js +0 -17
- package/lib/node_modules/@shelf/datetime/lib/isDate.js +0 -4
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/dayjs.min.js +0 -295
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/advancedFormat.js +0 -54
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/localeData.js +0 -82
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/localizedFormat.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.30.49](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.30.48...@shelf/global-renderer@0.30.49) (2023-10-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @shelf/global-renderer
|
|
9
|
+
|
|
10
|
+
### [0.30.48](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.30.47...@shelf/global-renderer@0.30.48) (2023-10-25)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @shelf/global-renderer
|
|
13
|
+
|
|
14
|
+
### [0.30.47](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.30.46...@shelf/global-renderer@0.30.47) (2023-10-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @shelf/global-renderer
|
|
17
|
+
|
|
18
|
+
### [0.30.46](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.30.45...@shelf/global-renderer@0.30.46) (2023-10-25)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @shelf/global-renderer
|
|
21
|
+
|
|
6
22
|
### [0.30.45](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.30.44...@shelf/global-renderer@0.30.45) (2023-10-19)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @shelf/global-renderer
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { isEmpty as d, mapKeys as c, compact as x, uniq as l, sortBy as f } from "lodash";
|
|
2
|
-
import b from "
|
|
3
|
-
|
|
4
|
-
import y from "../node_modules/@shelf/datetime/lib/getTimeFormatTemplates.js";
|
|
5
|
-
const g = ["Question", "Condition"], F = (r) => r.map((o) => {
|
|
2
|
+
import { getDateFormatTemplates as b, getTimeFormatTemplates as T, getDateWithCustomFormat as y } from "@shelf/datetime";
|
|
3
|
+
const g = ["Question", "Condition"], F = (r) => r.map((i) => {
|
|
6
4
|
const m = r.filter(
|
|
7
|
-
(n) => n.linkedSteps?.map((
|
|
8
|
-
), s = l(m.map(({ id: n, number:
|
|
5
|
+
(n) => n.linkedSteps?.map((o) => o.id).includes(i.id)
|
|
6
|
+
), s = l(m.map(({ id: n, number: o }) => ({ id: n, number: o })));
|
|
9
7
|
return {
|
|
10
|
-
...
|
|
8
|
+
...i,
|
|
11
9
|
parentSteps: f(s, "number")
|
|
12
10
|
};
|
|
13
|
-
}),
|
|
11
|
+
}), k = (r) => {
|
|
14
12
|
if (d(r))
|
|
15
13
|
return [];
|
|
16
|
-
const
|
|
14
|
+
const i = r.find(({ isFirstStep: t }) => !!t), s = (i ? [i, ...r.filter(({ isFirstStep: t }) => !t)] : [...r]).map((t, p) => ({
|
|
17
15
|
...t,
|
|
18
16
|
number: p + 1
|
|
19
|
-
})), n = c(s, "id"),
|
|
17
|
+
})), n = c(s, "id"), o = s.map((t) => {
|
|
20
18
|
const p = t?.question?.answers, a = t?.conditions;
|
|
21
19
|
if (!g.includes(t?.type) || d(p) && d(a))
|
|
22
20
|
return t;
|
|
@@ -40,17 +38,17 @@ const g = ["Question", "Condition"], F = (r) => r.map((o) => {
|
|
|
40
38
|
} : {}
|
|
41
39
|
};
|
|
42
40
|
});
|
|
43
|
-
return F(
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
-
return
|
|
41
|
+
return F(o);
|
|
42
|
+
}, q = (r) => {
|
|
43
|
+
const i = b()?.medium ?? "MMM d, yyyy", m = T()?.short ?? "h:m a";
|
|
44
|
+
return y({
|
|
47
45
|
date: r,
|
|
48
|
-
dateFormat: `${
|
|
46
|
+
dateFormat: `${i} ${m}`
|
|
49
47
|
});
|
|
50
48
|
};
|
|
51
49
|
export {
|
|
52
50
|
g as TYPES_TO_LINK,
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
k as convertStepToRenderFormat,
|
|
52
|
+
q as getDateAndTime,
|
|
55
53
|
F as getTreeWithParentSteps
|
|
56
54
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelf/global-renderer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2-beta.0",
|
|
4
4
|
"description": "The package exposes entrypoints with window's function(-s) to render React component",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,11 +29,8 @@
|
|
|
29
29
|
"coverage": "yarn test --coverage",
|
|
30
30
|
"start": "storybook dev -p 3001"
|
|
31
31
|
},
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"@shelf/datetime": "^1.2.1"
|
|
34
|
-
},
|
|
35
32
|
"devDependencies": {
|
|
36
|
-
"@shelf/decision-tree-editor-components": "^1.0.
|
|
33
|
+
"@shelf/decision-tree-editor-components": "^1.0.2-beta.0",
|
|
37
34
|
"@shelf/i18n": "10.11.0",
|
|
38
35
|
"@shelf/types": "^44.82.1",
|
|
39
36
|
"@types/react-dom": "18.0.6",
|
|
@@ -43,11 +40,12 @@
|
|
|
43
40
|
},
|
|
44
41
|
"peerDependencies": {
|
|
45
42
|
"@shelf/client-helpers": "4.x.x",
|
|
43
|
+
"@shelf/datetime": "^2.0.0",
|
|
46
44
|
"@shelf/icons": "^7.14.10",
|
|
47
45
|
"@shelf/rich-text-editor": "4.x.x",
|
|
48
46
|
"@shelf/types": "^44.82.1",
|
|
49
47
|
"lodash": "4.17.x",
|
|
50
48
|
"react": "18.x.x"
|
|
51
49
|
},
|
|
52
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "22d7d63954692099d7f193d4afdb7c8dd31d42a9"
|
|
53
51
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import a from "../node_modules/dayjs/dayjs.min.js";
|
|
2
|
-
import o from "../node_modules/dayjs/plugin/localeData.js";
|
|
3
|
-
a.extend(o);
|
|
4
|
-
const r = () => {
|
|
5
|
-
const t = a().localeData();
|
|
6
|
-
return {
|
|
7
|
-
full: t.longDateFormat("LL"),
|
|
8
|
-
long: t.longDateFormat("LL"),
|
|
9
|
-
medium: t.longDateFormat("LL"),
|
|
10
|
-
short: t.longDateFormat("L")
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
r as default
|
|
15
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import t from "../node_modules/dayjs/dayjs.min.js";
|
|
2
|
-
import m from "../node_modules/dayjs/plugin/localizedFormat.js";
|
|
3
|
-
import e from "../node_modules/dayjs/plugin/advancedFormat.js";
|
|
4
|
-
import a from "./isDate.js";
|
|
5
|
-
t.extend(m);
|
|
6
|
-
t.extend(e);
|
|
7
|
-
const p = ({ date: r, dateFormat: o }) => a(r) ? t(r).format(o).toString() : "";
|
|
8
|
-
export {
|
|
9
|
-
p as default
|
|
10
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import o from "../node_modules/dayjs/dayjs.min.js";
|
|
2
|
-
import a from "../node_modules/dayjs/plugin/localeData.js";
|
|
3
|
-
import e from "../node_modules/dayjs/plugin/localizedFormat.js";
|
|
4
|
-
o.extend(a);
|
|
5
|
-
o.extend(e);
|
|
6
|
-
const n = () => {
|
|
7
|
-
const t = o().localeData();
|
|
8
|
-
return {
|
|
9
|
-
full: t.longDateFormat("LTS"),
|
|
10
|
-
long: t.longDateFormat("LTS"),
|
|
11
|
-
medium: t.longDateFormat("LTS"),
|
|
12
|
-
short: t.longDateFormat("LT")
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
n as default
|
|
17
|
-
};
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import { commonjsGlobal as P } from "../../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
-
import { d as z } from "../../../../../_virtual/dayjs.min.js";
|
|
3
|
-
(function(V, Q) {
|
|
4
|
-
(function(A, k) {
|
|
5
|
-
V.exports = k();
|
|
6
|
-
})(P, function() {
|
|
7
|
-
var A = 1e3, k = 6e4, U = 36e5, j = "millisecond", S = "second", w = "minute", O = "hour", M = "day", x = "week", m = "month", F = "quarter", v = "year", _ = "date", J = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|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(i) {
|
|
8
|
-
var n = ["th", "st", "nd", "rd"], t = i % 100;
|
|
9
|
-
return "[" + i + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
10
|
-
} }, I = function(i, n, t) {
|
|
11
|
-
var r = String(i);
|
|
12
|
-
return !r || r.length >= n ? i : "" + Array(n + 1 - r.length).join(t) + i;
|
|
13
|
-
}, G = { s: I, z: function(i) {
|
|
14
|
-
var n = -i.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
|
|
15
|
-
return (n <= 0 ? "+" : "-") + I(r, 2, "0") + ":" + I(e, 2, "0");
|
|
16
|
-
}, m: function i(n, t) {
|
|
17
|
-
if (n.date() < t.date())
|
|
18
|
-
return -i(t, n);
|
|
19
|
-
var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), s = t - e < 0, u = n.clone().add(r + (s ? -1 : 1), m);
|
|
20
|
-
return +(-(r + (t - e) / (s ? e - u : u - e)) || 0);
|
|
21
|
-
}, a: function(i) {
|
|
22
|
-
return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
|
|
23
|
-
}, p: function(i) {
|
|
24
|
-
return { M: m, y: v, w: x, d: M, D: _, h: O, m: w, s: S, ms: j, Q: F }[i] || String(i || "").toLowerCase().replace(/s$/, "");
|
|
25
|
-
}, u: function(i) {
|
|
26
|
-
return i === void 0;
|
|
27
|
-
} }, Y = "en", g = {};
|
|
28
|
-
g[Y] = E;
|
|
29
|
-
var N = function(i) {
|
|
30
|
-
return i instanceof W;
|
|
31
|
-
}, L = function i(n, t, r) {
|
|
32
|
-
var e;
|
|
33
|
-
if (!n)
|
|
34
|
-
return Y;
|
|
35
|
-
if (typeof n == "string") {
|
|
36
|
-
var s = n.toLowerCase();
|
|
37
|
-
g[s] && (e = s), t && (g[s] = t, e = s);
|
|
38
|
-
var u = n.split("-");
|
|
39
|
-
if (!e && u.length > 1)
|
|
40
|
-
return i(u[0]);
|
|
41
|
-
} else {
|
|
42
|
-
var o = n.name;
|
|
43
|
-
g[o] = n, e = o;
|
|
44
|
-
}
|
|
45
|
-
return !r && e && (Y = e), e || !r && Y;
|
|
46
|
-
}, f = function(i, n) {
|
|
47
|
-
if (N(i))
|
|
48
|
-
return i.clone();
|
|
49
|
-
var t = typeof n == "object" ? n : {};
|
|
50
|
-
return t.date = i, t.args = arguments, new W(t);
|
|
51
|
-
}, a = G;
|
|
52
|
-
a.l = L, a.i = N, a.w = function(i, n) {
|
|
53
|
-
return f(i, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
|
54
|
-
};
|
|
55
|
-
var W = function() {
|
|
56
|
-
function i(t) {
|
|
57
|
-
this.$L = L(t.locale, null, !0), this.parse(t);
|
|
58
|
-
}
|
|
59
|
-
var n = i.prototype;
|
|
60
|
-
return n.parse = function(t) {
|
|
61
|
-
this.$d = function(r) {
|
|
62
|
-
var e = r.date, s = r.utc;
|
|
63
|
-
if (e === null)
|
|
64
|
-
return new Date(NaN);
|
|
65
|
-
if (a.u(e))
|
|
66
|
-
return new Date();
|
|
67
|
-
if (e instanceof Date)
|
|
68
|
-
return new Date(e);
|
|
69
|
-
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
70
|
-
var u = e.match(q);
|
|
71
|
-
if (u) {
|
|
72
|
-
var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
|
|
73
|
-
return s ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return new Date(e);
|
|
77
|
-
}(t), this.$x = t.x || {}, this.init();
|
|
78
|
-
}, n.init = function() {
|
|
79
|
-
var t = this.$d;
|
|
80
|
-
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();
|
|
81
|
-
}, n.$utils = function() {
|
|
82
|
-
return a;
|
|
83
|
-
}, n.isValid = function() {
|
|
84
|
-
return this.$d.toString() !== J;
|
|
85
|
-
}, n.isSame = function(t, r) {
|
|
86
|
-
var e = f(t);
|
|
87
|
-
return this.startOf(r) <= e && e <= this.endOf(r);
|
|
88
|
-
}, n.isAfter = function(t, r) {
|
|
89
|
-
return f(t) < this.startOf(r);
|
|
90
|
-
}, n.isBefore = function(t, r) {
|
|
91
|
-
return this.endOf(r) < f(t);
|
|
92
|
-
}, n.$g = function(t, r, e) {
|
|
93
|
-
return a.u(t) ? this[r] : this.set(e, t);
|
|
94
|
-
}, n.unix = function() {
|
|
95
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
96
|
-
}, n.valueOf = function() {
|
|
97
|
-
return this.$d.getTime();
|
|
98
|
-
}, n.startOf = function(t, r) {
|
|
99
|
-
var e = this, s = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
|
|
100
|
-
var y = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
|
|
101
|
-
return s ? y : y.endOf(M);
|
|
102
|
-
}, c = function(p, $) {
|
|
103
|
-
return a.w(e.toDate()[p].apply(e.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
|
|
104
|
-
}, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
|
|
105
|
-
switch (u) {
|
|
106
|
-
case v:
|
|
107
|
-
return s ? o(1, 0) : o(31, 11);
|
|
108
|
-
case m:
|
|
109
|
-
return s ? o(1, d) : o(0, d + 1);
|
|
110
|
-
case x:
|
|
111
|
-
var D = this.$locale().weekStart || 0, H = (h < D ? h + 7 : h) - D;
|
|
112
|
-
return o(s ? l - H : l + (6 - H), d);
|
|
113
|
-
case M:
|
|
114
|
-
case _:
|
|
115
|
-
return c(b + "Hours", 0);
|
|
116
|
-
case O:
|
|
117
|
-
return c(b + "Minutes", 1);
|
|
118
|
-
case w:
|
|
119
|
-
return c(b + "Seconds", 2);
|
|
120
|
-
case S:
|
|
121
|
-
return c(b + "Milliseconds", 3);
|
|
122
|
-
default:
|
|
123
|
-
return this.clone();
|
|
124
|
-
}
|
|
125
|
-
}, n.endOf = function(t) {
|
|
126
|
-
return this.startOf(t, !1);
|
|
127
|
-
}, n.$set = function(t, r) {
|
|
128
|
-
var e, s = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[v] = u + "FullYear", e[O] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[j] = u + "Milliseconds", e)[s], c = s === M ? this.$D + (r - this.$W) : r;
|
|
129
|
-
if (s === m || s === v) {
|
|
130
|
-
var h = this.clone().set(_, 1);
|
|
131
|
-
h.$d[o](c), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
|
|
132
|
-
} else
|
|
133
|
-
o && this.$d[o](c);
|
|
134
|
-
return this.init(), this;
|
|
135
|
-
}, n.set = function(t, r) {
|
|
136
|
-
return this.clone().$set(t, r);
|
|
137
|
-
}, n.get = function(t) {
|
|
138
|
-
return this[a.p(t)]();
|
|
139
|
-
}, n.add = function(t, r) {
|
|
140
|
-
var e, s = this;
|
|
141
|
-
t = Number(t);
|
|
142
|
-
var u = a.p(r), o = function(d) {
|
|
143
|
-
var l = f(s);
|
|
144
|
-
return a.w(l.date(l.date() + Math.round(d * t)), s);
|
|
145
|
-
};
|
|
146
|
-
if (u === m)
|
|
147
|
-
return this.set(m, this.$M + t);
|
|
148
|
-
if (u === v)
|
|
149
|
-
return this.set(v, this.$y + t);
|
|
150
|
-
if (u === M)
|
|
151
|
-
return o(1);
|
|
152
|
-
if (u === x)
|
|
153
|
-
return o(7);
|
|
154
|
-
var c = (e = {}, e[w] = k, e[O] = U, e[S] = A, e)[u] || 1, h = this.$d.getTime() + t * c;
|
|
155
|
-
return a.w(h, this);
|
|
156
|
-
}, n.subtract = function(t, r) {
|
|
157
|
-
return this.add(-1 * t, r);
|
|
158
|
-
}, n.format = function(t) {
|
|
159
|
-
var r = this, e = this.$locale();
|
|
160
|
-
if (!this.isValid())
|
|
161
|
-
return e.invalidDate || J;
|
|
162
|
-
var s = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, D = function($, y, T, C) {
|
|
163
|
-
return $ && ($[y] || $(r, s)) || T[y].slice(0, C);
|
|
164
|
-
}, H = function($) {
|
|
165
|
-
return a.s(o % 12 || 12, $, "0");
|
|
166
|
-
}, p = b || function($, y, T) {
|
|
167
|
-
var C = $ < 12 ? "AM" : "PM";
|
|
168
|
-
return T ? C.toLowerCase() : C;
|
|
169
|
-
};
|
|
170
|
-
return s.replace(B, function($, y) {
|
|
171
|
-
return y || function(T) {
|
|
172
|
-
switch (T) {
|
|
173
|
-
case "YY":
|
|
174
|
-
return String(r.$y).slice(-2);
|
|
175
|
-
case "YYYY":
|
|
176
|
-
return a.s(r.$y, 4, "0");
|
|
177
|
-
case "M":
|
|
178
|
-
return h + 1;
|
|
179
|
-
case "MM":
|
|
180
|
-
return a.s(h + 1, 2, "0");
|
|
181
|
-
case "MMM":
|
|
182
|
-
return D(e.monthsShort, h, l, 3);
|
|
183
|
-
case "MMMM":
|
|
184
|
-
return D(l, h);
|
|
185
|
-
case "D":
|
|
186
|
-
return r.$D;
|
|
187
|
-
case "DD":
|
|
188
|
-
return a.s(r.$D, 2, "0");
|
|
189
|
-
case "d":
|
|
190
|
-
return String(r.$W);
|
|
191
|
-
case "dd":
|
|
192
|
-
return D(e.weekdaysMin, r.$W, d, 2);
|
|
193
|
-
case "ddd":
|
|
194
|
-
return D(e.weekdaysShort, r.$W, d, 3);
|
|
195
|
-
case "dddd":
|
|
196
|
-
return d[r.$W];
|
|
197
|
-
case "H":
|
|
198
|
-
return String(o);
|
|
199
|
-
case "HH":
|
|
200
|
-
return a.s(o, 2, "0");
|
|
201
|
-
case "h":
|
|
202
|
-
return H(1);
|
|
203
|
-
case "hh":
|
|
204
|
-
return H(2);
|
|
205
|
-
case "a":
|
|
206
|
-
return p(o, c, !0);
|
|
207
|
-
case "A":
|
|
208
|
-
return p(o, c, !1);
|
|
209
|
-
case "m":
|
|
210
|
-
return String(c);
|
|
211
|
-
case "mm":
|
|
212
|
-
return a.s(c, 2, "0");
|
|
213
|
-
case "s":
|
|
214
|
-
return String(r.$s);
|
|
215
|
-
case "ss":
|
|
216
|
-
return a.s(r.$s, 2, "0");
|
|
217
|
-
case "SSS":
|
|
218
|
-
return a.s(r.$ms, 3, "0");
|
|
219
|
-
case "Z":
|
|
220
|
-
return u;
|
|
221
|
-
}
|
|
222
|
-
return null;
|
|
223
|
-
}($) || u.replace(":", "");
|
|
224
|
-
});
|
|
225
|
-
}, n.utcOffset = function() {
|
|
226
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
227
|
-
}, n.diff = function(t, r, e) {
|
|
228
|
-
var s, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * k, d = this - c, l = function() {
|
|
229
|
-
return a.m(u, c);
|
|
230
|
-
};
|
|
231
|
-
switch (o) {
|
|
232
|
-
case v:
|
|
233
|
-
s = l() / 12;
|
|
234
|
-
break;
|
|
235
|
-
case m:
|
|
236
|
-
s = l();
|
|
237
|
-
break;
|
|
238
|
-
case F:
|
|
239
|
-
s = l() / 3;
|
|
240
|
-
break;
|
|
241
|
-
case x:
|
|
242
|
-
s = (d - h) / 6048e5;
|
|
243
|
-
break;
|
|
244
|
-
case M:
|
|
245
|
-
s = (d - h) / 864e5;
|
|
246
|
-
break;
|
|
247
|
-
case O:
|
|
248
|
-
s = d / U;
|
|
249
|
-
break;
|
|
250
|
-
case w:
|
|
251
|
-
s = d / k;
|
|
252
|
-
break;
|
|
253
|
-
case S:
|
|
254
|
-
s = d / A;
|
|
255
|
-
break;
|
|
256
|
-
default:
|
|
257
|
-
s = d;
|
|
258
|
-
}
|
|
259
|
-
return e ? s : a.a(s);
|
|
260
|
-
}, n.daysInMonth = function() {
|
|
261
|
-
return this.endOf(m).$D;
|
|
262
|
-
}, n.$locale = function() {
|
|
263
|
-
return g[this.$L];
|
|
264
|
-
}, n.locale = function(t, r) {
|
|
265
|
-
if (!t)
|
|
266
|
-
return this.$L;
|
|
267
|
-
var e = this.clone(), s = L(t, r, !0);
|
|
268
|
-
return s && (e.$L = s), e;
|
|
269
|
-
}, n.clone = function() {
|
|
270
|
-
return a.w(this.$d, this);
|
|
271
|
-
}, n.toDate = function() {
|
|
272
|
-
return new Date(this.valueOf());
|
|
273
|
-
}, n.toJSON = function() {
|
|
274
|
-
return this.isValid() ? this.toISOString() : null;
|
|
275
|
-
}, n.toISOString = function() {
|
|
276
|
-
return this.$d.toISOString();
|
|
277
|
-
}, n.toString = function() {
|
|
278
|
-
return this.$d.toUTCString();
|
|
279
|
-
}, i;
|
|
280
|
-
}(), Z = W.prototype;
|
|
281
|
-
return f.prototype = Z, [["$ms", j], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", v], ["$D", _]].forEach(function(i) {
|
|
282
|
-
Z[i[1]] = function(n) {
|
|
283
|
-
return this.$g(n, i[0], i[1]);
|
|
284
|
-
};
|
|
285
|
-
}), f.extend = function(i, n) {
|
|
286
|
-
return i.$i || (i(n, W, f), i.$i = !0), f;
|
|
287
|
-
}, f.locale = L, f.isDayjs = N, f.unix = function(i) {
|
|
288
|
-
return f(1e3 * i);
|
|
289
|
-
}, f.en = g[Y], f.Ls = g, f.p = {}, f;
|
|
290
|
-
});
|
|
291
|
-
})(z);
|
|
292
|
-
const X = z.exports;
|
|
293
|
-
export {
|
|
294
|
-
X as default
|
|
295
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { commonjsGlobal as l } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
-
import { a as i } from "../../../../../../_virtual/advancedFormat.js";
|
|
3
|
-
(function(u, d) {
|
|
4
|
-
(function(f, t) {
|
|
5
|
-
u.exports = t();
|
|
6
|
-
})(l, function() {
|
|
7
|
-
return function(f, t) {
|
|
8
|
-
var s = t.prototype, n = s.format;
|
|
9
|
-
s.format = function(o) {
|
|
10
|
-
var e = this, c = this.$locale();
|
|
11
|
-
if (!this.isValid())
|
|
12
|
-
return n.bind(this)(o);
|
|
13
|
-
var a = this.$utils(), m = (o || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(r) {
|
|
14
|
-
switch (r) {
|
|
15
|
-
case "Q":
|
|
16
|
-
return Math.ceil((e.$M + 1) / 3);
|
|
17
|
-
case "Do":
|
|
18
|
-
return c.ordinal(e.$D);
|
|
19
|
-
case "gggg":
|
|
20
|
-
return e.weekYear();
|
|
21
|
-
case "GGGG":
|
|
22
|
-
return e.isoWeekYear();
|
|
23
|
-
case "wo":
|
|
24
|
-
return c.ordinal(e.week(), "W");
|
|
25
|
-
case "w":
|
|
26
|
-
case "ww":
|
|
27
|
-
return a.s(e.week(), r === "w" ? 1 : 2, "0");
|
|
28
|
-
case "W":
|
|
29
|
-
case "WW":
|
|
30
|
-
return a.s(e.isoWeek(), r === "W" ? 1 : 2, "0");
|
|
31
|
-
case "k":
|
|
32
|
-
case "kk":
|
|
33
|
-
return a.s(String(e.$H === 0 ? 24 : e.$H), r === "k" ? 1 : 2, "0");
|
|
34
|
-
case "X":
|
|
35
|
-
return Math.floor(e.$d.getTime() / 1e3);
|
|
36
|
-
case "x":
|
|
37
|
-
return e.$d.getTime();
|
|
38
|
-
case "z":
|
|
39
|
-
return "[" + e.offsetName() + "]";
|
|
40
|
-
case "zzz":
|
|
41
|
-
return "[" + e.offsetName("long") + "]";
|
|
42
|
-
default:
|
|
43
|
-
return r;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
return n.bind(this)(m);
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
})(i);
|
|
51
|
-
const k = i.exports;
|
|
52
|
-
export {
|
|
53
|
-
k as default
|
|
54
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { commonjsGlobal as v } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
-
import { l as h } from "../../../../../../_virtual/localeData.js";
|
|
3
|
-
(function(k, x) {
|
|
4
|
-
(function(w, u) {
|
|
5
|
-
k.exports = u();
|
|
6
|
-
})(v, function() {
|
|
7
|
-
return function(w, u, r) {
|
|
8
|
-
var y = u.prototype, c = function(n) {
|
|
9
|
-
return n && (n.indexOf ? n : n.s);
|
|
10
|
-
}, e = function(n, t, i, m, s) {
|
|
11
|
-
var a = n.name ? n : n.$locale(), S = c(a[t]), p = c(a[i]), f = S || p.map(function(l) {
|
|
12
|
-
return l.slice(0, m);
|
|
13
|
-
});
|
|
14
|
-
if (!s)
|
|
15
|
-
return f;
|
|
16
|
-
var D = a.weekStart;
|
|
17
|
-
return f.map(function(l, $) {
|
|
18
|
-
return f[($ + (D || 0)) % 7];
|
|
19
|
-
});
|
|
20
|
-
}, o = function() {
|
|
21
|
-
return r.Ls[r.locale()];
|
|
22
|
-
}, d = function(n, t) {
|
|
23
|
-
return n.formats[t] || function(i) {
|
|
24
|
-
return i.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(m, s, a) {
|
|
25
|
-
return s || a.slice(1);
|
|
26
|
-
});
|
|
27
|
-
}(n.formats[t.toUpperCase()]);
|
|
28
|
-
}, M = function() {
|
|
29
|
-
var n = this;
|
|
30
|
-
return { months: function(t) {
|
|
31
|
-
return t ? t.format("MMMM") : e(n, "months");
|
|
32
|
-
}, monthsShort: function(t) {
|
|
33
|
-
return t ? t.format("MMM") : e(n, "monthsShort", "months", 3);
|
|
34
|
-
}, firstDayOfWeek: function() {
|
|
35
|
-
return n.$locale().weekStart || 0;
|
|
36
|
-
}, weekdays: function(t) {
|
|
37
|
-
return t ? t.format("dddd") : e(n, "weekdays");
|
|
38
|
-
}, weekdaysMin: function(t) {
|
|
39
|
-
return t ? t.format("dd") : e(n, "weekdaysMin", "weekdays", 2);
|
|
40
|
-
}, weekdaysShort: function(t) {
|
|
41
|
-
return t ? t.format("ddd") : e(n, "weekdaysShort", "weekdays", 3);
|
|
42
|
-
}, longDateFormat: function(t) {
|
|
43
|
-
return d(n.$locale(), t);
|
|
44
|
-
}, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
|
|
45
|
-
};
|
|
46
|
-
y.localeData = function() {
|
|
47
|
-
return M.bind(this)();
|
|
48
|
-
}, r.localeData = function() {
|
|
49
|
-
var n = o();
|
|
50
|
-
return { firstDayOfWeek: function() {
|
|
51
|
-
return n.weekStart || 0;
|
|
52
|
-
}, weekdays: function() {
|
|
53
|
-
return r.weekdays();
|
|
54
|
-
}, weekdaysShort: function() {
|
|
55
|
-
return r.weekdaysShort();
|
|
56
|
-
}, weekdaysMin: function() {
|
|
57
|
-
return r.weekdaysMin();
|
|
58
|
-
}, months: function() {
|
|
59
|
-
return r.months();
|
|
60
|
-
}, monthsShort: function() {
|
|
61
|
-
return r.monthsShort();
|
|
62
|
-
}, longDateFormat: function(t) {
|
|
63
|
-
return d(n, t);
|
|
64
|
-
}, meridiem: n.meridiem, ordinal: n.ordinal };
|
|
65
|
-
}, r.months = function() {
|
|
66
|
-
return e(o(), "months");
|
|
67
|
-
}, r.monthsShort = function() {
|
|
68
|
-
return e(o(), "monthsShort", "months", 3);
|
|
69
|
-
}, r.weekdays = function(n) {
|
|
70
|
-
return e(o(), "weekdays", null, null, n);
|
|
71
|
-
}, r.weekdaysShort = function(n) {
|
|
72
|
-
return e(o(), "weekdaysShort", "weekdays", 3, n);
|
|
73
|
-
}, r.weekdaysMin = function(n) {
|
|
74
|
-
return e(o(), "weekdaysMin", "weekdays", 2, n);
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
});
|
|
78
|
-
})(h);
|
|
79
|
-
const b = h.exports;
|
|
80
|
-
export {
|
|
81
|
-
b as default
|
|
82
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { commonjsGlobal as D } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
-
import { l as a } from "../../../../../../_virtual/localizedFormat.js";
|
|
3
|
-
(function(Y, h) {
|
|
4
|
-
(function(t, e) {
|
|
5
|
-
Y.exports = e();
|
|
6
|
-
})(D, function() {
|
|
7
|
-
var t = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
8
|
-
return function(e, i, c) {
|
|
9
|
-
var n = i.prototype, s = n.format;
|
|
10
|
-
c.en.formats = t, n.format = function(r) {
|
|
11
|
-
r === void 0 && (r = "YYYY-MM-DDTHH:mm:ssZ");
|
|
12
|
-
var m = this.$locale().formats, l = function(f, M) {
|
|
13
|
-
return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(v, u, o) {
|
|
14
|
-
var L = o && o.toUpperCase();
|
|
15
|
-
return u || M[o] || t[o] || M[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(x, d, p) {
|
|
16
|
-
return d || p.slice(1);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
}(r, m === void 0 ? {} : m);
|
|
20
|
-
return s.call(this, l);
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
})(a);
|
|
25
|
-
const g = a.exports;
|
|
26
|
-
export {
|
|
27
|
-
g as default
|
|
28
|
-
};
|