@redsift/dashboard 7.2.1 → 7.3.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/index.js +378 -31
- package/index.js.map +1 -1
- package/package.json +5 -4
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColorTheme, getColorScale, scheme, StyledHorizontalBarChartTitle, StyledHorizontalBarChartCaption, PieChartLabelVariant, PieChartSize, PieChartTheme, PieChartVariant, StyledPieChartTitle, StyledPieChartCenterText, StyledPieChartLabel, StyledPieChartCaption } from '@redsift/charts';
|
|
2
2
|
export { ColorTheme, PieChartLabelVariant, PieChartSize, PieChartTheme, PieChartVariant } from '@redsift/charts';
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { useContext, useState, useLayoutEffect, useMemo, useEffect, useRef, useCallback, forwardRef, useReducer, useId } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
5
|
import crossfilter from 'crossfilter2';
|
|
6
6
|
import { useGridApiRef, gridFilteredSortedRowEntriesSelector, gridVisibleColumnDefinitionsSelector, gridColumnsTotalWidthSelector } from '@mui/x-data-grid-pro';
|
|
@@ -21,14 +21,6 @@ const SUM = groupReduceSum;
|
|
|
21
21
|
var mdiRefresh = "M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";
|
|
22
22
|
|
|
23
23
|
/** Component Type. */
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* JS falsy values.
|
|
27
|
-
* (excluding `NaN` as it can't be distinguished from `number`)
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/** Get types of the values of a record. */
|
|
31
|
-
|
|
32
24
|
/**
|
|
33
25
|
* Color palette.
|
|
34
26
|
*/
|
|
@@ -52,11 +44,365 @@ const ProductColorPalette = {
|
|
|
52
44
|
|
|
53
45
|
/**
|
|
54
46
|
* Do not edit directly
|
|
55
|
-
* Generated on
|
|
47
|
+
* Generated on Thu, 26 Jan 2023 14:28:56 GMT
|
|
56
48
|
*/
|
|
57
49
|
|
|
58
50
|
const RedsiftColorDefaultPrimary = '#0079e1';
|
|
59
51
|
|
|
52
|
+
/*
|
|
53
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
54
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
55
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
56
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
57
|
+
*
|
|
58
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
59
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
60
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
61
|
+
* governing permissions and limitations under the License.
|
|
62
|
+
*/ /*
|
|
63
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
64
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
65
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
66
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
67
|
+
*
|
|
68
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
69
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
70
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
71
|
+
* governing permissions and limitations under the License.
|
|
72
|
+
*/ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is
|
|
73
|
+
// guarded by a check that it only runs on the client side.
|
|
74
|
+
// eslint-disable-next-line rulesdir/useLayoutEffectRule
|
|
75
|
+
|
|
76
|
+
// Default context value to use in case there is no SSRProvider. This is fine for
|
|
77
|
+
// client-only apps. In order to support multiple copies of React Aria potentially
|
|
78
|
+
// being on the page at once, the prefix is set to a random number. SSRProvider
|
|
79
|
+
// will reset this to zero for consistency between server and client, so in the
|
|
80
|
+
// SSR case multiple copies of React Aria is not supported.
|
|
81
|
+
const $704cf1d3b684cc5c$var$defaultContext = {
|
|
82
|
+
prefix: String(Math.round(Math.random() * 10000000000)),
|
|
83
|
+
current: 0
|
|
84
|
+
};
|
|
85
|
+
const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/ (React).createContext($704cf1d3b684cc5c$var$defaultContext);
|
|
86
|
+
function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
|
|
87
|
+
let cur = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
88
|
+
let isInSSRContext = cur !== $704cf1d3b684cc5c$var$defaultContext;
|
|
89
|
+
let [isSSR, setIsSSR] = (useState)(isInSSRContext);
|
|
90
|
+
// If on the client, and the component was initially server rendered,
|
|
91
|
+
// then schedule a layout effect to update the component after hydration.
|
|
92
|
+
if (typeof window !== "undefined" && isInSSRContext) // This if statement technically breaks the rules of hooks, but is safe
|
|
93
|
+
// because the condition never changes after mounting.
|
|
94
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
95
|
+
(useLayoutEffect)(()=>{
|
|
96
|
+
setIsSSR(false);
|
|
97
|
+
}, []);
|
|
98
|
+
return isSSR;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
103
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
104
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
105
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
106
|
+
*
|
|
107
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
108
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
109
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
110
|
+
* governing permissions and limitations under the License.
|
|
111
|
+
*/ /*
|
|
112
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
113
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
114
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
115
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
116
|
+
*
|
|
117
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
118
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
119
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
120
|
+
* governing permissions and limitations under the License.
|
|
121
|
+
*/ class $5b160d28a433310d$export$c17fa47878dc55b6 {
|
|
122
|
+
/** Returns a localized string for the given key and locale. */ getStringForLocale(key, locale) {
|
|
123
|
+
let strings = this.strings[locale];
|
|
124
|
+
if (!strings) {
|
|
125
|
+
strings = $5b160d28a433310d$var$getStringsForLocale(locale, this.strings, this.defaultLocale);
|
|
126
|
+
this.strings[locale] = strings;
|
|
127
|
+
}
|
|
128
|
+
let string = strings[key];
|
|
129
|
+
if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);
|
|
130
|
+
return string;
|
|
131
|
+
}
|
|
132
|
+
constructor(messages, defaultLocale = "en-US"){
|
|
133
|
+
// Clone messages so we don't modify the original object.
|
|
134
|
+
this.strings = {
|
|
135
|
+
...messages
|
|
136
|
+
};
|
|
137
|
+
this.defaultLocale = defaultLocale;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") {
|
|
141
|
+
// If there is an exact match, use it.
|
|
142
|
+
if (strings[locale]) return strings[locale];
|
|
143
|
+
// Attempt to find the closest match by language.
|
|
144
|
+
// For example, if the locale is fr-CA (French Canadian), but there is only
|
|
145
|
+
// an fr-FR (France) set of strings, use that.
|
|
146
|
+
// This could be replaced with Intl.LocaleMatcher once it is supported.
|
|
147
|
+
// https://github.com/tc39/proposal-intl-localematcher
|
|
148
|
+
let language = $5b160d28a433310d$var$getLanguage(locale);
|
|
149
|
+
if (strings[language]) return strings[language];
|
|
150
|
+
for(let key in strings){
|
|
151
|
+
if (key.startsWith(language + "-")) return strings[key];
|
|
152
|
+
}
|
|
153
|
+
// Nothing close, use english.
|
|
154
|
+
return strings[defaultLocale];
|
|
155
|
+
}
|
|
156
|
+
function $5b160d28a433310d$var$getLanguage(locale) {
|
|
157
|
+
// @ts-ignore
|
|
158
|
+
if (Intl.Locale) // @ts-ignore
|
|
159
|
+
return new Intl.Locale(locale).language;
|
|
160
|
+
return locale.split("-")[0];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
/*
|
|
165
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
166
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
167
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
168
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
169
|
+
*
|
|
170
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
171
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
172
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
173
|
+
* governing permissions and limitations under the License.
|
|
174
|
+
*/ const $6db58dc88e78b024$var$pluralRulesCache = new Map();
|
|
175
|
+
const $6db58dc88e78b024$var$numberFormatCache = new Map();
|
|
176
|
+
class $6db58dc88e78b024$export$2f817fcdc4b89ae0 {
|
|
177
|
+
/** Formats a localized string for the given key with the provided variables. */ format(key, variables) {
|
|
178
|
+
let message = this.strings.getStringForLocale(key, this.locale);
|
|
179
|
+
return typeof message === "function" ? message(variables, this) : message;
|
|
180
|
+
}
|
|
181
|
+
plural(count, options, type = "cardinal") {
|
|
182
|
+
let opt = options["=" + count];
|
|
183
|
+
if (opt) return typeof opt === "function" ? opt() : opt;
|
|
184
|
+
let key = this.locale + ":" + type;
|
|
185
|
+
let pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);
|
|
186
|
+
if (!pluralRules) {
|
|
187
|
+
pluralRules = new Intl.PluralRules(this.locale, {
|
|
188
|
+
type: type
|
|
189
|
+
});
|
|
190
|
+
$6db58dc88e78b024$var$pluralRulesCache.set(key, pluralRules);
|
|
191
|
+
}
|
|
192
|
+
let selected = pluralRules.select(count);
|
|
193
|
+
opt = options[selected] || options.other;
|
|
194
|
+
return typeof opt === "function" ? opt() : opt;
|
|
195
|
+
}
|
|
196
|
+
number(value) {
|
|
197
|
+
let numberFormat = $6db58dc88e78b024$var$numberFormatCache.get(this.locale);
|
|
198
|
+
if (!numberFormat) {
|
|
199
|
+
numberFormat = new Intl.NumberFormat(this.locale);
|
|
200
|
+
$6db58dc88e78b024$var$numberFormatCache.set(this.locale, numberFormat);
|
|
201
|
+
}
|
|
202
|
+
return numberFormat.format(value);
|
|
203
|
+
}
|
|
204
|
+
select(options, value) {
|
|
205
|
+
let opt = options[value] || options.other;
|
|
206
|
+
return typeof opt === "function" ? opt() : opt;
|
|
207
|
+
}
|
|
208
|
+
constructor(locale, strings){
|
|
209
|
+
this.locale = locale;
|
|
210
|
+
this.strings = strings;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function _defineProperty$1(obj, key, value) {
|
|
215
|
+
if (key in obj) {
|
|
216
|
+
Object.defineProperty(obj, key, {
|
|
217
|
+
value: value,
|
|
218
|
+
enumerable: true,
|
|
219
|
+
configurable: true,
|
|
220
|
+
writable: true
|
|
221
|
+
});
|
|
222
|
+
} else {
|
|
223
|
+
obj[key] = value;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return obj;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/*
|
|
230
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
231
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
232
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
233
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
234
|
+
*
|
|
235
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
236
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
237
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
238
|
+
* governing permissions and limitations under the License.
|
|
239
|
+
*/ /*
|
|
240
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
241
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
242
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
243
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
244
|
+
*
|
|
245
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
246
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
247
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
248
|
+
* governing permissions and limitations under the License.
|
|
249
|
+
*/ /*
|
|
250
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
251
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
252
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
253
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
254
|
+
*
|
|
255
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
256
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
257
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
258
|
+
* governing permissions and limitations under the License.
|
|
259
|
+
*/ // https://en.wikipedia.org/wiki/Right-to-left
|
|
260
|
+
const $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([
|
|
261
|
+
"Arab",
|
|
262
|
+
"Syrc",
|
|
263
|
+
"Samr",
|
|
264
|
+
"Mand",
|
|
265
|
+
"Thaa",
|
|
266
|
+
"Mend",
|
|
267
|
+
"Nkoo",
|
|
268
|
+
"Adlm",
|
|
269
|
+
"Rohg",
|
|
270
|
+
"Hebr"
|
|
271
|
+
]);
|
|
272
|
+
const $148a7a147e38ea7f$var$RTL_LANGS = new Set([
|
|
273
|
+
"ae",
|
|
274
|
+
"ar",
|
|
275
|
+
"arc",
|
|
276
|
+
"bcc",
|
|
277
|
+
"bqi",
|
|
278
|
+
"ckb",
|
|
279
|
+
"dv",
|
|
280
|
+
"fa",
|
|
281
|
+
"glk",
|
|
282
|
+
"he",
|
|
283
|
+
"ku",
|
|
284
|
+
"mzn",
|
|
285
|
+
"nqo",
|
|
286
|
+
"pnb",
|
|
287
|
+
"ps",
|
|
288
|
+
"sd",
|
|
289
|
+
"ug",
|
|
290
|
+
"ur",
|
|
291
|
+
"yi"
|
|
292
|
+
]);
|
|
293
|
+
function $148a7a147e38ea7f$export$702d680b21cbd764(locale) {
|
|
294
|
+
// If the Intl.Locale API is available, use it to get the script for the locale.
|
|
295
|
+
// This is more accurate than guessing by language, since languages can be written in multiple scripts.
|
|
296
|
+
// @ts-ignore
|
|
297
|
+
if (Intl.Locale) {
|
|
298
|
+
// @ts-ignore
|
|
299
|
+
let script = new Intl.Locale(locale).maximize().script;
|
|
300
|
+
return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(script);
|
|
301
|
+
}
|
|
302
|
+
// If not, just guess by the language (first part of the locale)
|
|
303
|
+
let lang = locale.split("-")[0];
|
|
304
|
+
return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
310
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
311
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
312
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
313
|
+
*
|
|
314
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
315
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
316
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
317
|
+
* governing permissions and limitations under the License.
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
|
|
322
|
+
// @ts-ignore
|
|
323
|
+
let locale = typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
324
|
+
try {
|
|
325
|
+
// @ts-ignore
|
|
326
|
+
Intl.DateTimeFormat.supportedLocalesOf([
|
|
327
|
+
locale
|
|
328
|
+
]);
|
|
329
|
+
} catch (_err) {
|
|
330
|
+
locale = "en-US";
|
|
331
|
+
}
|
|
332
|
+
return {
|
|
333
|
+
locale: locale,
|
|
334
|
+
direction: ($148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? "rtl" : "ltr"
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
let $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
|
|
338
|
+
let $1e5a04cdaf7d1af8$var$listeners = new Set();
|
|
339
|
+
function $1e5a04cdaf7d1af8$var$updateLocale() {
|
|
340
|
+
$1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
|
|
341
|
+
for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);
|
|
342
|
+
}
|
|
343
|
+
function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
|
|
344
|
+
let isSSR = ($704cf1d3b684cc5c$export$535bd6ca7f90a273)();
|
|
345
|
+
let [defaultLocale, setDefaultLocale] = (useState)($1e5a04cdaf7d1af8$var$currentLocale);
|
|
346
|
+
(useEffect)(()=>{
|
|
347
|
+
if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
|
|
348
|
+
$1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);
|
|
349
|
+
return ()=>{
|
|
350
|
+
$1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);
|
|
351
|
+
if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener("languagechange", $1e5a04cdaf7d1af8$var$updateLocale);
|
|
352
|
+
};
|
|
353
|
+
}, []);
|
|
354
|
+
// We cannot determine the browser's language on the server, so default to
|
|
355
|
+
// en-US. This will be updated after hydration on the client to the correct value.
|
|
356
|
+
if (isSSR) return {
|
|
357
|
+
locale: "en-US",
|
|
358
|
+
direction: "ltr"
|
|
359
|
+
};
|
|
360
|
+
return defaultLocale;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
const $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (React).createContext(null);
|
|
366
|
+
function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {
|
|
367
|
+
let defaultLocale = ($1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();
|
|
368
|
+
let context = (useContext)($18f2051aff69b9bf$var$I18nContext);
|
|
369
|
+
return context || defaultLocale;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
/*
|
|
374
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
375
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
376
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
377
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
378
|
+
*
|
|
379
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
380
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
381
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
382
|
+
* governing permissions and limitations under the License.
|
|
383
|
+
*/
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
const $fca6afa0e843324b$var$cache = new WeakMap();
|
|
387
|
+
function $fca6afa0e843324b$var$getCachedDictionary(strings) {
|
|
388
|
+
let dictionary = $fca6afa0e843324b$var$cache.get(strings);
|
|
389
|
+
if (!dictionary) {
|
|
390
|
+
dictionary = new ($5b160d28a433310d$export$c17fa47878dc55b6)(strings);
|
|
391
|
+
$fca6afa0e843324b$var$cache.set(strings, dictionary);
|
|
392
|
+
}
|
|
393
|
+
return dictionary;
|
|
394
|
+
}
|
|
395
|
+
function $fca6afa0e843324b$export$f12b703ca79dfbb1(strings) {
|
|
396
|
+
let { locale: locale } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
397
|
+
let dictionary = (useMemo)(()=>$fca6afa0e843324b$var$getCachedDictionary(strings), [
|
|
398
|
+
strings
|
|
399
|
+
]);
|
|
400
|
+
return (useMemo)(()=>new ($6db58dc88e78b024$export$2f817fcdc4b89ae0)(locale, dictionary), [
|
|
401
|
+
locale,
|
|
402
|
+
dictionary
|
|
403
|
+
]);
|
|
404
|
+
}
|
|
405
|
+
|
|
60
406
|
function ownKeys(object, enumerableOnly) {
|
|
61
407
|
var keys = Object.keys(object);
|
|
62
408
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -71,14 +417,14 @@ function _objectSpread2(target) {
|
|
|
71
417
|
for (var i = 1; i < arguments.length; i++) {
|
|
72
418
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
73
419
|
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
74
|
-
_defineProperty
|
|
420
|
+
_defineProperty(target, key, source[key]);
|
|
75
421
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
76
422
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
77
423
|
});
|
|
78
424
|
}
|
|
79
425
|
return target;
|
|
80
426
|
}
|
|
81
|
-
function _defineProperty
|
|
427
|
+
function _defineProperty(obj, key, value) {
|
|
82
428
|
key = _toPropertyKey(key);
|
|
83
429
|
if (key in obj) {
|
|
84
430
|
Object.defineProperty(obj, key, {
|
|
@@ -630,21 +976,6 @@ function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
|
|
|
630
976
|
return event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
|
|
631
977
|
}
|
|
632
978
|
|
|
633
|
-
function _defineProperty(obj, key, value) {
|
|
634
|
-
if (key in obj) {
|
|
635
|
-
Object.defineProperty(obj, key, {
|
|
636
|
-
value: value,
|
|
637
|
-
enumerable: true,
|
|
638
|
-
configurable: true,
|
|
639
|
-
writable: true
|
|
640
|
-
});
|
|
641
|
-
} else {
|
|
642
|
-
obj[key] = value;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
return obj;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
979
|
/*
|
|
649
980
|
* Copyright 2020 Adobe. All rights reserved.
|
|
650
981
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1637,7 +1968,7 @@ class $9bf71ea28793e738$var$Tree {
|
|
|
1637
1968
|
return newTree;
|
|
1638
1969
|
}
|
|
1639
1970
|
constructor(){
|
|
1640
|
-
(_defineProperty)(this, "fastMap", new Map());
|
|
1971
|
+
(_defineProperty$1)(this, "fastMap", new Map());
|
|
1641
1972
|
this.root = new $9bf71ea28793e738$var$TreeNode({
|
|
1642
1973
|
scopeRef: null
|
|
1643
1974
|
});
|
|
@@ -1654,8 +1985,8 @@ class $9bf71ea28793e738$var$TreeNode {
|
|
|
1654
1985
|
node.parent = undefined;
|
|
1655
1986
|
}
|
|
1656
1987
|
constructor(props){
|
|
1657
|
-
(_defineProperty)(this, "children", []);
|
|
1658
|
-
(_defineProperty)(this, "contain", false);
|
|
1988
|
+
(_defineProperty$1)(this, "children", []);
|
|
1989
|
+
(_defineProperty$1)(this, "contain", false);
|
|
1659
1990
|
this.scopeRef = props.scopeRef;
|
|
1660
1991
|
}
|
|
1661
1992
|
}
|
|
@@ -2144,6 +2475,21 @@ Button.className = CLASSNAME$7;
|
|
|
2144
2475
|
Button.defaultProps = DEFAULT_PROPS$6;
|
|
2145
2476
|
Button.displayName = COMPONENT_NAME$7;
|
|
2146
2477
|
|
|
2478
|
+
var loading$1 = "Loading...";
|
|
2479
|
+
var enUS = {
|
|
2480
|
+
loading: loading$1
|
|
2481
|
+
};
|
|
2482
|
+
|
|
2483
|
+
var loading = "Chargement...";
|
|
2484
|
+
var frFR = {
|
|
2485
|
+
loading: loading
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2488
|
+
var intlMessages = {
|
|
2489
|
+
'en-US': enUS,
|
|
2490
|
+
'fr-FR': frFR
|
|
2491
|
+
};
|
|
2492
|
+
|
|
2147
2493
|
/**
|
|
2148
2494
|
* Component size.
|
|
2149
2495
|
*/
|
|
@@ -2238,8 +2584,9 @@ const Spinner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2238
2584
|
width,
|
|
2239
2585
|
height
|
|
2240
2586
|
} = sizeToDimension$3(size);
|
|
2587
|
+
const stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1(intlMessages);
|
|
2241
2588
|
return /*#__PURE__*/React.createElement(StyledSpinner, _extends({
|
|
2242
|
-
alt:
|
|
2589
|
+
alt: stringFormatter.format('loading')
|
|
2243
2590
|
}, forwardedProps, {
|
|
2244
2591
|
"aria-hidden": ariaLabel ? ariaHidden ? ariaHidden : undefined : true,
|
|
2245
2592
|
"aria-label": ariaLabel,
|