overview-components 1.0.75 → 1.0.76
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/dist/_virtual/FileSaver.min.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +4 -0
- package/dist/components/lit-attachments-tab.js +11 -7
- package/dist/components/lit-badge.js +10 -7
- package/dist/components/lit-case-variables-tab.js +23 -19
- package/dist/components/lit-chart.js +24 -21
- package/dist/components/lit-data-grid-tanstack.js +42 -37
- package/dist/components/lit-filter-modal.js +6 -2
- package/dist/components/lit-multiselect-item.js +7 -3
- package/dist/components/lit-section-tab.js +15 -11
- package/dist/components/lit-tabs-overview.js +9 -5
- package/dist/components/react-wrappers/attachments-tab.js +1 -1
- package/dist/components/react-wrappers/badge.js +1 -1
- package/dist/components/react-wrappers/button.js +3 -3
- package/dist/components/react-wrappers/case-variables-tab.js +3 -3
- package/dist/components/react-wrappers/chart.js +3 -3
- package/dist/components/react-wrappers/data-grid-tanstack.js +1 -1
- package/dist/components/react-wrappers/filter-modal.js +4 -4
- package/dist/components/react-wrappers/progress-bar.js +5 -5
- package/dist/components/react-wrappers/section-tab.js +4 -4
- package/dist/components/react-wrappers/tabs-overview.js +3 -3
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +432 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +306 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +127 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +127 -0
- package/dist/node_modules/@lit/localize/init/install.js +11 -0
- package/dist/node_modules/@lit/localize/init/runtime.js +42 -0
- package/dist/node_modules/@lit/localize/internal/default-msg.js +10 -0
- package/dist/node_modules/@lit/localize/internal/deferred.js +21 -0
- package/dist/node_modules/@lit/localize/internal/fnv1a64.js +17 -0
- package/dist/node_modules/@lit/localize/internal/id-generation.js +14 -0
- package/dist/node_modules/@lit/localize/internal/locale-status-event.js +9 -0
- package/dist/node_modules/@lit/localize/internal/runtime-msg.js +42 -0
- package/dist/node_modules/@lit/localize/internal/str-tag.js +15 -0
- package/dist/node_modules/@lit/react/create-component.js +35 -0
- package/dist/node_modules/@lit/reactive-element/css-tag.js +32 -24
- package/dist/node_modules/@lit/reactive-element/reactive-element.js +4 -3
- package/dist/node_modules/@tanstack/lit-table/build/lib/index.js +104 -0
- package/dist/node_modules/@tanstack/lit-virtual/dist/esm/index.js +40 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1956 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +490 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
- package/dist/node_modules/file-saver/dist/FileSaver.min.js +74 -0
- package/dist/node_modules/lit-element/lit-element.js +51 -0
- package/dist/node_modules/lit-html/lit-html.js +75 -74
- package/dist/node_modules/luxon/src/datetime.js +1793 -0
- package/dist/node_modules/luxon/src/duration.js +723 -0
- package/dist/node_modules/luxon/src/errors.js +40 -0
- package/dist/node_modules/luxon/src/impl/conversions.js +92 -0
- package/dist/node_modules/luxon/src/impl/diff.js +36 -0
- package/dist/node_modules/luxon/src/impl/digits.js +74 -0
- package/dist/node_modules/luxon/src/impl/english.js +138 -0
- package/dist/node_modules/luxon/src/impl/formats.js +150 -0
- package/dist/node_modules/luxon/src/impl/formatter.js +245 -0
- package/dist/node_modules/luxon/src/impl/invalid.js +11 -0
- package/dist/node_modules/luxon/src/impl/locale.js +282 -0
- package/dist/node_modules/luxon/src/impl/regexParser.js +202 -0
- package/dist/node_modules/luxon/src/impl/tokenParser.js +329 -0
- package/dist/node_modules/luxon/src/impl/util.js +206 -0
- package/dist/node_modules/luxon/src/impl/zoneUtil.js +19 -0
- package/dist/node_modules/luxon/src/info.js +180 -0
- package/dist/node_modules/luxon/src/interval.js +466 -0
- package/dist/node_modules/luxon/src/settings.js +150 -0
- package/dist/node_modules/luxon/src/zone.js +88 -0
- package/dist/node_modules/luxon/src/zones/IANAZone.js +178 -0
- package/dist/node_modules/luxon/src/zones/fixedOffsetZone.js +125 -0
- package/dist/node_modules/luxon/src/zones/invalidZone.js +41 -0
- package/dist/node_modules/luxon/src/zones/systemZone.js +47 -0
- package/dist/node_modules/sortablejs/modular/sortable.esm.js +1261 -0
- package/dist/shared/lit-button.js +11 -8
- package/dist/shared/lit-progress-bar.js +10 -7
- package/dist/shared/simple-tooltip.js +33 -31
- package/dist/shared/styles/button-shared-styles.js +6 -3
- package/dist/utils/custom-filters.js +8 -7
- package/dist/utils/date.js +6 -5
- package/dist/utils/getOperatorByType.js +4 -3
- package/dist/utils/localization.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { InvalidArgumentError as a } from "../errors.js";
|
|
2
|
+
import y from "../settings.js";
|
|
3
|
+
import { isoWeekdayToLocal as w, dayOfWeek as h } from "./conversions.js";
|
|
4
|
+
function c(e) {
|
|
5
|
+
return typeof e > "u";
|
|
6
|
+
}
|
|
7
|
+
function L(e) {
|
|
8
|
+
return typeof e == "number";
|
|
9
|
+
}
|
|
10
|
+
function I(e) {
|
|
11
|
+
return typeof e == "number" && e % 1 === 0;
|
|
12
|
+
}
|
|
13
|
+
function g(e) {
|
|
14
|
+
return typeof e == "string";
|
|
15
|
+
}
|
|
16
|
+
function A(e) {
|
|
17
|
+
return Object.prototype.toString.call(e) === "[object Date]";
|
|
18
|
+
}
|
|
19
|
+
function b() {
|
|
20
|
+
try {
|
|
21
|
+
return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
|
|
22
|
+
} catch {
|
|
23
|
+
return !1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function v() {
|
|
27
|
+
try {
|
|
28
|
+
return typeof Intl < "u" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
|
|
29
|
+
} catch {
|
|
30
|
+
return !1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function C(e) {
|
|
34
|
+
return Array.isArray(e) ? e : [e];
|
|
35
|
+
}
|
|
36
|
+
function W(e, n, t) {
|
|
37
|
+
if (e.length !== 0)
|
|
38
|
+
return e.reduce((r, o) => {
|
|
39
|
+
const u = [n(o), o];
|
|
40
|
+
return r && t(r[0], u[0]) === r[0] ? r : u;
|
|
41
|
+
}, null)[1];
|
|
42
|
+
}
|
|
43
|
+
function M(e, n) {
|
|
44
|
+
return n.reduce((t, r) => (t[r] = e[r], t), {});
|
|
45
|
+
}
|
|
46
|
+
function O(e, n) {
|
|
47
|
+
return Object.prototype.hasOwnProperty.call(e, n);
|
|
48
|
+
}
|
|
49
|
+
function Y(e) {
|
|
50
|
+
if (e == null)
|
|
51
|
+
return null;
|
|
52
|
+
if (typeof e != "object")
|
|
53
|
+
throw new a("Week settings must be an object");
|
|
54
|
+
if (!f(e.firstDay, 1, 7) || !f(e.minimalDays, 1, 7) || !Array.isArray(e.weekend) || e.weekend.some((n) => !f(n, 1, 7)))
|
|
55
|
+
throw new a("Invalid week settings");
|
|
56
|
+
return {
|
|
57
|
+
firstDay: e.firstDay,
|
|
58
|
+
minimalDays: e.minimalDays,
|
|
59
|
+
weekend: Array.from(e.weekend)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function f(e, n, t) {
|
|
63
|
+
return I(e) && e >= n && e <= t;
|
|
64
|
+
}
|
|
65
|
+
function k(e, n) {
|
|
66
|
+
return e - n * Math.floor(e / n);
|
|
67
|
+
}
|
|
68
|
+
function i(e, n = 2) {
|
|
69
|
+
const t = e < 0;
|
|
70
|
+
let r;
|
|
71
|
+
return t ? r = "-" + ("" + -e).padStart(n, "0") : r = ("" + e).padStart(n, "0"), r;
|
|
72
|
+
}
|
|
73
|
+
function F(e) {
|
|
74
|
+
if (!(c(e) || e === null || e === ""))
|
|
75
|
+
return parseInt(e, 10);
|
|
76
|
+
}
|
|
77
|
+
function z(e) {
|
|
78
|
+
if (!(c(e) || e === null || e === ""))
|
|
79
|
+
return parseFloat(e);
|
|
80
|
+
}
|
|
81
|
+
function P(e) {
|
|
82
|
+
if (!(c(e) || e === null || e === "")) {
|
|
83
|
+
const n = parseFloat("0." + e) * 1e3;
|
|
84
|
+
return Math.floor(n);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function R(e, n, t = !1) {
|
|
88
|
+
const r = 10 ** n;
|
|
89
|
+
return (t ? Math.trunc : Math.round)(e * r) / r;
|
|
90
|
+
}
|
|
91
|
+
function d(e) {
|
|
92
|
+
return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
|
|
93
|
+
}
|
|
94
|
+
function N(e) {
|
|
95
|
+
return d(e) ? 366 : 365;
|
|
96
|
+
}
|
|
97
|
+
function U(e, n) {
|
|
98
|
+
const t = k(n - 1, 12) + 1, r = e + (n - t) / 12;
|
|
99
|
+
return t === 2 ? d(r) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][t - 1];
|
|
100
|
+
}
|
|
101
|
+
function B(e) {
|
|
102
|
+
let n = Date.UTC(
|
|
103
|
+
e.year,
|
|
104
|
+
e.month - 1,
|
|
105
|
+
e.day,
|
|
106
|
+
e.hour,
|
|
107
|
+
e.minute,
|
|
108
|
+
e.second,
|
|
109
|
+
e.millisecond
|
|
110
|
+
);
|
|
111
|
+
return e.year < 100 && e.year >= 0 && (n = new Date(n), n.setUTCFullYear(e.year, e.month - 1, e.day)), +n;
|
|
112
|
+
}
|
|
113
|
+
function s(e, n, t) {
|
|
114
|
+
return -w(h(e, 1, n), t) + n - 1;
|
|
115
|
+
}
|
|
116
|
+
function E(e, n = 4, t = 1) {
|
|
117
|
+
const r = s(e, n, t), o = s(e + 1, n, t);
|
|
118
|
+
return (N(e) - r + o) / 7;
|
|
119
|
+
}
|
|
120
|
+
function V(e) {
|
|
121
|
+
return e > 99 ? e : e > y.twoDigitCutoffYear ? 1900 + e : 2e3 + e;
|
|
122
|
+
}
|
|
123
|
+
function Z(e, n, t, r = null) {
|
|
124
|
+
const o = new Date(e), u = {
|
|
125
|
+
hourCycle: "h23",
|
|
126
|
+
year: "numeric",
|
|
127
|
+
month: "2-digit",
|
|
128
|
+
day: "2-digit",
|
|
129
|
+
hour: "2-digit",
|
|
130
|
+
minute: "2-digit"
|
|
131
|
+
};
|
|
132
|
+
r && (u.timeZone = r);
|
|
133
|
+
const m = { timeZoneName: n, ...u }, l = new Intl.DateTimeFormat(t, m).formatToParts(o).find((p) => p.type.toLowerCase() === "timezonename");
|
|
134
|
+
return l ? l.value : null;
|
|
135
|
+
}
|
|
136
|
+
function H(e, n) {
|
|
137
|
+
let t = parseInt(e, 10);
|
|
138
|
+
Number.isNaN(t) && (t = 0);
|
|
139
|
+
const r = parseInt(n, 10) || 0, o = t < 0 || Object.is(t, -0) ? -r : r;
|
|
140
|
+
return t * 60 + o;
|
|
141
|
+
}
|
|
142
|
+
function $(e) {
|
|
143
|
+
const n = Number(e);
|
|
144
|
+
if (typeof e == "boolean" || e === "" || Number.isNaN(n))
|
|
145
|
+
throw new a(`Invalid unit value ${e}`);
|
|
146
|
+
return n;
|
|
147
|
+
}
|
|
148
|
+
function q(e, n) {
|
|
149
|
+
const t = {};
|
|
150
|
+
for (const r in e)
|
|
151
|
+
if (O(e, r)) {
|
|
152
|
+
const o = e[r];
|
|
153
|
+
if (o == null) continue;
|
|
154
|
+
t[n(r)] = $(o);
|
|
155
|
+
}
|
|
156
|
+
return t;
|
|
157
|
+
}
|
|
158
|
+
function x(e, n) {
|
|
159
|
+
const t = Math.trunc(Math.abs(e / 60)), r = Math.trunc(Math.abs(e % 60)), o = e >= 0 ? "+" : "-";
|
|
160
|
+
switch (n) {
|
|
161
|
+
case "short":
|
|
162
|
+
return `${o}${i(t, 2)}:${i(r, 2)}`;
|
|
163
|
+
case "narrow":
|
|
164
|
+
return `${o}${t}${r > 0 ? `:${r}` : ""}`;
|
|
165
|
+
case "techie":
|
|
166
|
+
return `${o}${i(t, 2)}${i(r, 2)}`;
|
|
167
|
+
default:
|
|
168
|
+
throw new RangeError(`Value format ${n} is out of range for property format`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function G(e) {
|
|
172
|
+
return M(e, ["hour", "minute", "second", "millisecond"]);
|
|
173
|
+
}
|
|
174
|
+
export {
|
|
175
|
+
$ as asNumber,
|
|
176
|
+
W as bestBy,
|
|
177
|
+
U as daysInMonth,
|
|
178
|
+
N as daysInYear,
|
|
179
|
+
k as floorMod,
|
|
180
|
+
x as formatOffset,
|
|
181
|
+
v as hasLocaleWeekInfo,
|
|
182
|
+
O as hasOwnProperty,
|
|
183
|
+
b as hasRelative,
|
|
184
|
+
f as integerBetween,
|
|
185
|
+
A as isDate,
|
|
186
|
+
I as isInteger,
|
|
187
|
+
d as isLeapYear,
|
|
188
|
+
L as isNumber,
|
|
189
|
+
g as isString,
|
|
190
|
+
c as isUndefined,
|
|
191
|
+
C as maybeArray,
|
|
192
|
+
q as normalizeObject,
|
|
193
|
+
B as objToLocalTS,
|
|
194
|
+
i as padStart,
|
|
195
|
+
z as parseFloating,
|
|
196
|
+
F as parseInteger,
|
|
197
|
+
P as parseMillis,
|
|
198
|
+
Z as parseZoneInfo,
|
|
199
|
+
M as pick,
|
|
200
|
+
R as roundTo,
|
|
201
|
+
H as signedOffset,
|
|
202
|
+
G as timeObject,
|
|
203
|
+
V as untruncateYear,
|
|
204
|
+
Y as validateWeekSettings,
|
|
205
|
+
E as weeksInWeekYear
|
|
206
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import s from "../zone.js";
|
|
2
|
+
import t from "../zones/IANAZone.js";
|
|
3
|
+
import o from "../zones/fixedOffsetZone.js";
|
|
4
|
+
import n from "../zones/invalidZone.js";
|
|
5
|
+
import { isUndefined as i, isString as m, isNumber as l } from "./util.js";
|
|
6
|
+
import c from "../zones/systemZone.js";
|
|
7
|
+
function S(e, f) {
|
|
8
|
+
if (i(e) || e === null)
|
|
9
|
+
return f;
|
|
10
|
+
if (e instanceof s)
|
|
11
|
+
return e;
|
|
12
|
+
if (m(e)) {
|
|
13
|
+
const r = e.toLowerCase();
|
|
14
|
+
return r === "default" ? f : r === "local" || r === "system" ? c.instance : r === "utc" || r === "gmt" ? o.utcInstance : o.parseSpecifier(r) || t.create(e);
|
|
15
|
+
} else return l(e) ? o.instance(e) : typeof e == "object" && "offset" in e && typeof e.offset == "function" ? e : new n(e);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
S as normalizeZone
|
|
19
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import o from "./datetime.js";
|
|
2
|
+
import s from "./settings.js";
|
|
3
|
+
import r from "./impl/locale.js";
|
|
4
|
+
import u from "./zones/IANAZone.js";
|
|
5
|
+
import { normalizeZone as i } from "./impl/zoneUtil.js";
|
|
6
|
+
import { hasLocaleWeekInfo as m, hasRelative as c } from "./impl/util.js";
|
|
7
|
+
class p {
|
|
8
|
+
/**
|
|
9
|
+
* Return whether the specified zone contains a DST.
|
|
10
|
+
* @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
|
|
11
|
+
* @return {boolean}
|
|
12
|
+
*/
|
|
13
|
+
static hasDST(e = s.defaultZone) {
|
|
14
|
+
const t = o.now().setZone(e).set({ month: 12 });
|
|
15
|
+
return !e.isUniversal && t.offset !== t.set({ month: 6 }).offset;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Return whether the specified zone is a valid IANA specifier.
|
|
19
|
+
* @param {string} zone - Zone to check
|
|
20
|
+
* @return {boolean}
|
|
21
|
+
*/
|
|
22
|
+
static isValidIANAZone(e) {
|
|
23
|
+
return u.isValidZone(e);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Converts the input into a {@link Zone} instance.
|
|
27
|
+
*
|
|
28
|
+
* * If `input` is already a Zone instance, it is returned unchanged.
|
|
29
|
+
* * If `input` is a string containing a valid time zone name, a Zone instance
|
|
30
|
+
* with that name is returned.
|
|
31
|
+
* * If `input` is a string that doesn't refer to a known time zone, a Zone
|
|
32
|
+
* instance with {@link Zone#isValid} == false is returned.
|
|
33
|
+
* * If `input is a number, a Zone instance with the specified fixed offset
|
|
34
|
+
* in minutes is returned.
|
|
35
|
+
* * If `input` is `null` or `undefined`, the default zone is returned.
|
|
36
|
+
* @param {string|Zone|number} [input] - the value to be converted
|
|
37
|
+
* @return {Zone}
|
|
38
|
+
*/
|
|
39
|
+
static normalizeZone(e) {
|
|
40
|
+
return i(e, s.defaultZone);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get the weekday on which the week starts according to the given locale.
|
|
44
|
+
* @param {Object} opts - options
|
|
45
|
+
* @param {string} [opts.locale] - the locale code
|
|
46
|
+
* @param {string} [opts.locObj=null] - an existing locale object to use
|
|
47
|
+
* @returns {number} the start of the week, 1 for Monday through 7 for Sunday
|
|
48
|
+
*/
|
|
49
|
+
static getStartOfWeek({ locale: e = null, locObj: t = null } = {}) {
|
|
50
|
+
return (t || r.create(e)).getStartOfWeek();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get the minimum number of days necessary in a week before it is considered part of the next year according
|
|
54
|
+
* to the given locale.
|
|
55
|
+
* @param {Object} opts - options
|
|
56
|
+
* @param {string} [opts.locale] - the locale code
|
|
57
|
+
* @param {string} [opts.locObj=null] - an existing locale object to use
|
|
58
|
+
* @returns {number}
|
|
59
|
+
*/
|
|
60
|
+
static getMinimumDaysInFirstWeek({ locale: e = null, locObj: t = null } = {}) {
|
|
61
|
+
return (t || r.create(e)).getMinDaysInFirstWeek();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get the weekdays, which are considered the weekend according to the given locale
|
|
65
|
+
* @param {Object} opts - options
|
|
66
|
+
* @param {string} [opts.locale] - the locale code
|
|
67
|
+
* @param {string} [opts.locObj=null] - an existing locale object to use
|
|
68
|
+
* @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday
|
|
69
|
+
*/
|
|
70
|
+
static getWeekendWeekdays({ locale: e = null, locObj: t = null } = {}) {
|
|
71
|
+
return (t || r.create(e)).getWeekendDays().slice();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Return an array of standalone month names.
|
|
75
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
|
|
76
|
+
* @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
|
|
77
|
+
* @param {Object} opts - options
|
|
78
|
+
* @param {string} [opts.locale] - the locale code
|
|
79
|
+
* @param {string} [opts.numberingSystem=null] - the numbering system
|
|
80
|
+
* @param {string} [opts.locObj=null] - an existing locale object to use
|
|
81
|
+
* @param {string} [opts.outputCalendar='gregory'] - the calendar
|
|
82
|
+
* @example Info.months()[0] //=> 'January'
|
|
83
|
+
* @example Info.months('short')[0] //=> 'Jan'
|
|
84
|
+
* @example Info.months('numeric')[0] //=> '1'
|
|
85
|
+
* @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'
|
|
86
|
+
* @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'
|
|
87
|
+
* @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'
|
|
88
|
+
* @return {Array}
|
|
89
|
+
*/
|
|
90
|
+
static months(e = "long", { locale: t = null, numberingSystem: n = null, locObj: l = null, outputCalendar: a = "gregory" } = {}) {
|
|
91
|
+
return (l || r.create(t, n, a)).months(e);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Return an array of format month names.
|
|
95
|
+
* Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that
|
|
96
|
+
* changes the string.
|
|
97
|
+
* See {@link Info#months}
|
|
98
|
+
* @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
|
|
99
|
+
* @param {Object} opts - options
|
|
100
|
+
* @param {string} [opts.locale] - the locale code
|
|
101
|
+
* @param {string} [opts.numberingSystem=null] - the numbering system
|
|
102
|
+
* @param {string} [opts.locObj=null] - an existing locale object to use
|
|
103
|
+
* @param {string} [opts.outputCalendar='gregory'] - the calendar
|
|
104
|
+
* @return {Array}
|
|
105
|
+
*/
|
|
106
|
+
static monthsFormat(e = "long", { locale: t = null, numberingSystem: n = null, locObj: l = null, outputCalendar: a = "gregory" } = {}) {
|
|
107
|
+
return (l || r.create(t, n, a)).months(e, !0);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Return an array of standalone week names.
|
|
111
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
|
|
112
|
+
* @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
|
|
113
|
+
* @param {Object} opts - options
|
|
114
|
+
* @param {string} [opts.locale] - the locale code
|
|
115
|
+
* @param {string} [opts.numberingSystem=null] - the numbering system
|
|
116
|
+
* @param {string} [opts.locObj=null] - an existing locale object to use
|
|
117
|
+
* @example Info.weekdays()[0] //=> 'Monday'
|
|
118
|
+
* @example Info.weekdays('short')[0] //=> 'Mon'
|
|
119
|
+
* @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'
|
|
120
|
+
* @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'
|
|
121
|
+
* @return {Array}
|
|
122
|
+
*/
|
|
123
|
+
static weekdays(e = "long", { locale: t = null, numberingSystem: n = null, locObj: l = null } = {}) {
|
|
124
|
+
return (l || r.create(t, n, null)).weekdays(e);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Return an array of format week names.
|
|
128
|
+
* Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that
|
|
129
|
+
* changes the string.
|
|
130
|
+
* See {@link Info#weekdays}
|
|
131
|
+
* @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
|
|
132
|
+
* @param {Object} opts - options
|
|
133
|
+
* @param {string} [opts.locale=null] - the locale code
|
|
134
|
+
* @param {string} [opts.numberingSystem=null] - the numbering system
|
|
135
|
+
* @param {string} [opts.locObj=null] - an existing locale object to use
|
|
136
|
+
* @return {Array}
|
|
137
|
+
*/
|
|
138
|
+
static weekdaysFormat(e = "long", { locale: t = null, numberingSystem: n = null, locObj: l = null } = {}) {
|
|
139
|
+
return (l || r.create(t, n, null)).weekdays(e, !0);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Return an array of meridiems.
|
|
143
|
+
* @param {Object} opts - options
|
|
144
|
+
* @param {string} [opts.locale] - the locale code
|
|
145
|
+
* @example Info.meridiems() //=> [ 'AM', 'PM' ]
|
|
146
|
+
* @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]
|
|
147
|
+
* @return {Array}
|
|
148
|
+
*/
|
|
149
|
+
static meridiems({ locale: e = null } = {}) {
|
|
150
|
+
return r.create(e).meridiems();
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.
|
|
154
|
+
* @param {string} [length='short'] - the length of the era representation, such as "short" or "long".
|
|
155
|
+
* @param {Object} opts - options
|
|
156
|
+
* @param {string} [opts.locale] - the locale code
|
|
157
|
+
* @example Info.eras() //=> [ 'BC', 'AD' ]
|
|
158
|
+
* @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]
|
|
159
|
+
* @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]
|
|
160
|
+
* @return {Array}
|
|
161
|
+
*/
|
|
162
|
+
static eras(e = "short", { locale: t = null } = {}) {
|
|
163
|
+
return r.create(t, null, "gregory").eras(e);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Return the set of available features in this environment.
|
|
167
|
+
* Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
|
|
168
|
+
* Keys:
|
|
169
|
+
* * `relative`: whether this environment supports relative time formatting
|
|
170
|
+
* * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale
|
|
171
|
+
* @example Info.features() //=> { relative: false, localeWeek: true }
|
|
172
|
+
* @return {Object}
|
|
173
|
+
*/
|
|
174
|
+
static features() {
|
|
175
|
+
return { relative: c(), localeWeek: m() };
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export {
|
|
179
|
+
p as default
|
|
180
|
+
};
|