hrm_ui_lib 2.0.0-alpha.11 → 2.0.0-alpha.13

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.
Files changed (119) hide show
  1. package/components/Alert/Alert.js +1 -1
  2. package/components/Alert/index.js +1 -1
  3. package/components/Avatar/Avatar.js +1 -1
  4. package/components/Avatar/AvatarGroup.js +1 -1
  5. package/components/Avatar/index.js +1 -1
  6. package/components/Button/Button.js +1 -1
  7. package/components/Button/index.js +1 -1
  8. package/components/Card/Card.js +1 -1
  9. package/components/Card/CardComponent/CardHead.js +1 -1
  10. package/components/Card/index.js +1 -1
  11. package/components/Checkbox/Checkbox.js +1 -1
  12. package/components/Checkbox/index.js +1 -1
  13. package/components/Copy/Copy.js +1 -1
  14. package/components/Copy/index.js +1 -1
  15. package/components/Counter/Counter.js +1 -1
  16. package/components/Counter/index.js +1 -1
  17. package/components/DatePicker/CustomHeader/CustomHeader.js +1 -1
  18. package/components/DatePicker/RangeDatePicker/RangeDatePicker.js +1 -1
  19. package/components/DatePicker/RangeDatePicker/RangeDatePickerDesktop.js +1 -1
  20. package/components/DatePicker/RangeDatePicker/RangeDatePickerMobile.js +1 -1
  21. package/components/DatePicker/RangeDatePicker/index.js +1 -1
  22. package/components/DatePicker/SimpleDatePicker/SimpleDatePicker.js +1 -1
  23. package/components/DatePicker/SimpleDatePicker/SimpleDatePickerDesktop.js +1 -1
  24. package/components/DatePicker/SimpleDatePicker/SimpleDatePickerMobile.js +1 -1
  25. package/components/DatePicker/SimpleDatePicker/index.js +1 -1
  26. package/components/DatePicker/TimePicker/MobileModalContent.js +1 -1
  27. package/components/DatePicker/TimePicker/TimePicker.js +1 -1
  28. package/components/DatePicker/TimePicker/TimePickerDesktop.js +1 -1
  29. package/components/DatePicker/TimePicker/TimePickerMobile.js +1 -1
  30. package/components/DatePicker/TimePicker/index.js +1 -1
  31. package/components/DatePicker/index.js +1 -1
  32. package/components/Empty/Empty.js +1 -1
  33. package/components/Empty/index.js +1 -1
  34. package/components/FileUpload/DropzoneFileUpload/DropzoneFileUpload.js +1 -1
  35. package/components/FileUpload/DropzoneFileUpload/ErrorItem.js +1 -1
  36. package/components/FileUpload/DropzoneFileUpload/PreviewItem.js +1 -1
  37. package/components/FileUpload/DropzoneFileUpload/helpers.js +1 -1
  38. package/components/FileUpload/DropzoneFileUpload/index.js +1 -1
  39. package/components/FileUpload/FileUpload.js +1 -1
  40. package/components/FileUpload/UploadItems.js +1 -1
  41. package/components/FileUpload/index.js +1 -1
  42. package/components/FormContainer/FormContainer.js +3 -481
  43. package/components/FormContainer/index.js +1 -1
  44. package/components/FormField/FormField.js +1 -1
  45. package/components/FormField/index.js +1 -1
  46. package/components/Input/Input.js +1 -1
  47. package/components/Input/index.js +1 -1
  48. package/components/Menu/Menu.js +1 -1
  49. package/components/Menu/NestedMenu.js +1 -1
  50. package/components/Menu/index.js +1 -1
  51. package/components/Modal/Modal.js +1 -1
  52. package/components/Modal/ModalConfirmation.js +1 -1
  53. package/components/Modal/ModalContent.js +1 -1
  54. package/components/Modal/index.js +1 -1
  55. package/components/More/More.js +1 -1
  56. package/components/More/index.js +1 -1
  57. package/components/Popover/Popover.js +1 -1
  58. package/components/Popover/PopoverMobile.js +1 -1
  59. package/components/Popover/index.js +1 -1
  60. package/components/Radio/RadioGroup.js +1 -1
  61. package/components/Radio/index.js +1 -1
  62. package/components/Select/ButtonSelect/ButtonSelect.js +1 -1
  63. package/components/Select/FilterSelect/FilterDropdown.js +1 -1
  64. package/components/Select/FilterSelect/FilterGroupDropdown.js +1 -1
  65. package/components/Select/FilterSelect/FilterSelect.js +1 -1
  66. package/components/Select/MultiSelect/MobileWrapper.js +1 -1
  67. package/components/Select/MultiSelect/MultiBase/MultiBase.js +1 -1
  68. package/components/Select/MultiSelect/MultiSelect.js +1 -1
  69. package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +1 -1
  70. package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +1 -1
  71. package/components/Select/MultiSelect/OptionsWrapper.js +1 -1
  72. package/components/Select/NestedSelect/NestedSelect.js +1 -1
  73. package/components/Select/Select/Select.js +1 -1
  74. package/components/Select/Select/SelectDesktop/index.js +1 -1
  75. package/components/Select/Select/SelectMobile/MobileTopContent.js +1 -1
  76. package/components/Select/Select/SelectMobile/index.js +1 -1
  77. package/components/Select/SharedComponents/Actions.js +1 -1
  78. package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +1 -1
  79. package/components/Select/SharedComponents/ContentTop.js +1 -1
  80. package/components/Select/SharedComponents/Footer.js +1 -1
  81. package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +1 -1
  82. package/components/Select/SharedComponents/index.js +1 -1
  83. package/components/Select/index.js +1 -1
  84. package/components/SideSheet/Footer/Footer.js +1 -1
  85. package/components/SideSheet/SideSheet.js +1 -1
  86. package/components/SideSheet/index.js +1 -1
  87. package/components/Snackbar/Snackbar.js +2 -5
  88. package/components/Snackbar/index.js +1 -1
  89. package/components/Switcher/Switcher.js +1 -1
  90. package/components/Switcher/index.js +1 -1
  91. package/components/Table/Header.js +1 -1
  92. package/components/Table/IndeterminateCheckbox.js +1 -1
  93. package/components/Table/Row.js +1 -1
  94. package/components/Table/Table.js +1 -1
  95. package/components/Table/index.js +1 -1
  96. package/components/Table/utils.js +1 -1
  97. package/components/TableV2/AdvancedPagination.js +1 -1
  98. package/components/TableV2/ColumnSettings.js +1 -1
  99. package/components/TableV2/IndeterminateCheckbox.js +1 -1
  100. package/components/TableV2/Table.js +1 -1
  101. package/components/TableV2/hooks/useTableControl.js +1 -1
  102. package/components/TableV2/index.js +1 -1
  103. package/components/Textarea/Textarea.js +1 -1
  104. package/components/Textarea/index.js +1 -1
  105. package/helperComponents/GoToWebPage/GoToWebPage.js +1 -1
  106. package/helperComponents/OptionItem/OptionItem.js +1 -1
  107. package/helperComponents/OptionItem/index.js +1 -1
  108. package/helperComponents/index.js +1 -1
  109. package/helpers/check-authorization.js +1 -1
  110. package/helpers/index.js +1 -1
  111. package/index.js +1 -1
  112. package/package.json +1 -1
  113. package/helperComponents/IconDynamicComponent/IconDynamicComponent.d.ts +0 -9
  114. package/helperComponents/IconDynamicComponent/IconDynamicComponent.js +0 -12
  115. package/helperComponents/IconDynamicComponent/constants.d.ts +0 -3
  116. package/helperComponents/IconDynamicComponent/constants.js +0 -12
  117. package/helperComponents/IconDynamicComponent/index.d.ts +0 -1
  118. package/helperComponents/IconDynamicComponent/index.js +0 -1
  119. /package/{Alert--0rz5XL1.js → Alert-Ocpfzvmz.js} +0 -0
@@ -1,10 +1,10 @@
1
1
  import _extends from '@babel/runtime/helpers/extends';
2
- import React, { createContext, useContext, useMemo, useRef, useCallback, useState, useEffect } from 'react';
2
+ import React from 'react';
3
3
  import { useForm } from 'react-hook-form';
4
4
  import { yupResolver } from '@hookform/resolvers/yup';
5
5
  import classNames from 'classnames';
6
6
  import { FormContext } from '../../context/types.js';
7
- import { B as Button } from '../../Alert--0rz5XL1.js';
7
+ import { B as Button } from '../../Alert-Ocpfzvmz.js';
8
8
  import '../../utils/helpers.js';
9
9
  import 'dayjs';
10
10
  import '../Alert/consts.js';
@@ -55,471 +55,6 @@ import '../SVGIcons/IconArrowDownloadFilled.js';
55
55
  import '../../helpers/download-file.js';
56
56
  import '../Button/consts.js';
57
57
 
58
- const warn = (i18n, code, msg, rest) => {
59
- const args = [msg, {
60
- code,
61
- ...(rest || {})
62
- }];
63
- if (i18n?.services?.logger?.forward) {
64
- return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);
65
- }
66
- if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
67
- if (i18n?.services?.logger?.warn) {
68
- i18n.services.logger.warn(...args);
69
- } else if (console?.warn) {
70
- console.warn(...args);
71
- }
72
- };
73
- const alreadyWarned = {};
74
- const warnOnce = (i18n, code, msg, rest) => {
75
- if (isString(msg) && alreadyWarned[msg]) return;
76
- if (isString(msg)) alreadyWarned[msg] = new Date();
77
- warn(i18n, code, msg, rest);
78
- };
79
- const loadedClb = (i18n, cb) => () => {
80
- if (i18n.isInitialized) {
81
- cb();
82
- } else {
83
- const initialized = () => {
84
- setTimeout(() => {
85
- i18n.off('initialized', initialized);
86
- }, 0);
87
- cb();
88
- };
89
- i18n.on('initialized', initialized);
90
- }
91
- };
92
- const loadNamespaces = (i18n, ns, cb) => {
93
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
94
- };
95
- const loadLanguages = (i18n, lng, ns, cb) => {
96
- if (isString(ns)) ns = [ns];
97
- if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
98
- ns.forEach(n => {
99
- if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
100
- });
101
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
102
- };
103
- const hasLoadedNamespace = (ns, i18n, options = {}) => {
104
- if (!i18n.languages || !i18n.languages.length) {
105
- warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {
106
- languages: i18n.languages
107
- });
108
- return true;
109
- }
110
- return i18n.hasLoadedNamespace(ns, {
111
- lng: options.lng,
112
- precheck: (i18nInstance, loadNotPending) => {
113
- if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
114
- }
115
- });
116
- };
117
- const isString = obj => typeof obj === 'string';
118
- const isObject = obj => typeof obj === 'object' && obj !== null;
119
-
120
- const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
121
- const htmlEntities = {
122
- '&amp;': '&',
123
- '&#38;': '&',
124
- '&lt;': '<',
125
- '&#60;': '<',
126
- '&gt;': '>',
127
- '&#62;': '>',
128
- '&apos;': "'",
129
- '&#39;': "'",
130
- '&quot;': '"',
131
- '&#34;': '"',
132
- '&nbsp;': ' ',
133
- '&#160;': ' ',
134
- '&copy;': '©',
135
- '&#169;': '©',
136
- '&reg;': '®',
137
- '&#174;': '®',
138
- '&hellip;': '…',
139
- '&#8230;': '…',
140
- '&#x2F;': '/',
141
- '&#47;': '/'
142
- };
143
- const unescapeHtmlEntity = m => htmlEntities[m];
144
- const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);
145
-
146
- let defaultOptions = {
147
- bindI18n: 'languageChanged',
148
- bindI18nStore: '',
149
- transEmptyNodeValue: '',
150
- transSupportBasicHtmlNodes: true,
151
- transWrapTextNodes: '',
152
- transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
153
- useSuspense: true,
154
- unescape
155
- };
156
- const getDefaults = () => defaultOptions;
157
-
158
- let i18nInstance;
159
- const getI18n = () => i18nInstance;
160
-
161
- const I18nContext = createContext();
162
- class ReportNamespaces {
163
- constructor() {
164
- this.usedNamespaces = {};
165
- }
166
- addUsedNamespaces(namespaces) {
167
- namespaces.forEach(ns => {
168
- if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
169
- });
170
- }
171
- getUsedNamespaces() {
172
- return Object.keys(this.usedNamespaces);
173
- }
174
- }
175
-
176
- var shim = {exports: {}};
177
-
178
- var useSyncExternalStoreShim_production = {};
179
-
180
- /**
181
- * @license React
182
- * use-sync-external-store-shim.production.js
183
- *
184
- * Copyright (c) Meta Platforms, Inc. and affiliates.
185
- *
186
- * This source code is licensed under the MIT license found in the
187
- * LICENSE file in the root directory of this source tree.
188
- */
189
-
190
- var hasRequiredUseSyncExternalStoreShim_production;
191
-
192
- function requireUseSyncExternalStoreShim_production () {
193
- if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
194
- hasRequiredUseSyncExternalStoreShim_production = 1;
195
- var React$1 = React;
196
- function is(x, y) {
197
- return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
198
- }
199
- var objectIs = "function" === typeof Object.is ? Object.is : is,
200
- useState = React$1.useState,
201
- useEffect = React$1.useEffect,
202
- useLayoutEffect = React$1.useLayoutEffect,
203
- useDebugValue = React$1.useDebugValue;
204
- function useSyncExternalStore$2(subscribe, getSnapshot) {
205
- var value = getSnapshot(),
206
- _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
207
- inst = _useState[0].inst,
208
- forceUpdate = _useState[1];
209
- useLayoutEffect(
210
- function () {
211
- inst.value = value;
212
- inst.getSnapshot = getSnapshot;
213
- checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
214
- },
215
- [subscribe, value, getSnapshot]
216
- );
217
- useEffect(
218
- function () {
219
- checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
220
- return subscribe(function () {
221
- checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
222
- });
223
- },
224
- [subscribe]
225
- );
226
- useDebugValue(value);
227
- return value;
228
- }
229
- function checkIfSnapshotChanged(inst) {
230
- var latestGetSnapshot = inst.getSnapshot;
231
- inst = inst.value;
232
- try {
233
- var nextValue = latestGetSnapshot();
234
- return !objectIs(inst, nextValue);
235
- } catch (error) {
236
- return true;
237
- }
238
- }
239
- function useSyncExternalStore$1(subscribe, getSnapshot) {
240
- return getSnapshot();
241
- }
242
- var shim =
243
- "undefined" === typeof window ||
244
- "undefined" === typeof window.document ||
245
- "undefined" === typeof window.document.createElement
246
- ? useSyncExternalStore$1
247
- : useSyncExternalStore$2;
248
- useSyncExternalStoreShim_production.useSyncExternalStore =
249
- void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
250
- return useSyncExternalStoreShim_production;
251
- }
252
-
253
- var useSyncExternalStoreShim_development = {};
254
-
255
- /**
256
- * @license React
257
- * use-sync-external-store-shim.development.js
258
- *
259
- * Copyright (c) Meta Platforms, Inc. and affiliates.
260
- *
261
- * This source code is licensed under the MIT license found in the
262
- * LICENSE file in the root directory of this source tree.
263
- */
264
-
265
- var hasRequiredUseSyncExternalStoreShim_development;
266
-
267
- function requireUseSyncExternalStoreShim_development () {
268
- if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
269
- hasRequiredUseSyncExternalStoreShim_development = 1;
270
- "production" !== process.env.NODE_ENV &&
271
- (function () {
272
- function is(x, y) {
273
- return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
274
- }
275
- function useSyncExternalStore$2(subscribe, getSnapshot) {
276
- didWarnOld18Alpha ||
277
- void 0 === React$1.startTransition ||
278
- ((didWarnOld18Alpha = true),
279
- console.error(
280
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
281
- ));
282
- var value = getSnapshot();
283
- if (!didWarnUncachedGetSnapshot) {
284
- var cachedValue = getSnapshot();
285
- objectIs(value, cachedValue) ||
286
- (console.error(
287
- "The result of getSnapshot should be cached to avoid an infinite loop"
288
- ),
289
- (didWarnUncachedGetSnapshot = true));
290
- }
291
- cachedValue = useState({
292
- inst: { value: value, getSnapshot: getSnapshot }
293
- });
294
- var inst = cachedValue[0].inst,
295
- forceUpdate = cachedValue[1];
296
- useLayoutEffect(
297
- function () {
298
- inst.value = value;
299
- inst.getSnapshot = getSnapshot;
300
- checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
301
- },
302
- [subscribe, value, getSnapshot]
303
- );
304
- useEffect(
305
- function () {
306
- checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
307
- return subscribe(function () {
308
- checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
309
- });
310
- },
311
- [subscribe]
312
- );
313
- useDebugValue(value);
314
- return value;
315
- }
316
- function checkIfSnapshotChanged(inst) {
317
- var latestGetSnapshot = inst.getSnapshot;
318
- inst = inst.value;
319
- try {
320
- var nextValue = latestGetSnapshot();
321
- return !objectIs(inst, nextValue);
322
- } catch (error) {
323
- return true;
324
- }
325
- }
326
- function useSyncExternalStore$1(subscribe, getSnapshot) {
327
- return getSnapshot();
328
- }
329
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
330
- "function" ===
331
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
332
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
333
- var React$1 = React,
334
- objectIs = "function" === typeof Object.is ? Object.is : is,
335
- useState = React$1.useState,
336
- useEffect = React$1.useEffect,
337
- useLayoutEffect = React$1.useLayoutEffect,
338
- useDebugValue = React$1.useDebugValue,
339
- didWarnOld18Alpha = false,
340
- didWarnUncachedGetSnapshot = false,
341
- shim =
342
- "undefined" === typeof window ||
343
- "undefined" === typeof window.document ||
344
- "undefined" === typeof window.document.createElement
345
- ? useSyncExternalStore$1
346
- : useSyncExternalStore$2;
347
- useSyncExternalStoreShim_development.useSyncExternalStore =
348
- void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
349
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
350
- "function" ===
351
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
352
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
353
- })();
354
- return useSyncExternalStoreShim_development;
355
- }
356
-
357
- var hasRequiredShim;
358
-
359
- function requireShim () {
360
- if (hasRequiredShim) return shim.exports;
361
- hasRequiredShim = 1;
362
-
363
- if (process.env.NODE_ENV === 'production') {
364
- shim.exports = requireUseSyncExternalStoreShim_production();
365
- } else {
366
- shim.exports = requireUseSyncExternalStoreShim_development();
367
- }
368
- return shim.exports;
369
- }
370
-
371
- var shimExports = requireShim();
372
-
373
- const notReadyT = (k, optsOrDefaultValue) => {
374
- if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
375
- if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
376
- return Array.isArray(k) ? k[k.length - 1] : k;
377
- };
378
- const notReadySnapshot = {
379
- t: notReadyT,
380
- ready: false
381
- };
382
- const dummySubscribe = () => () => {};
383
- const useTranslation = (ns, props = {}) => {
384
- const {
385
- i18n: i18nFromProps
386
- } = props;
387
- const {
388
- i18n: i18nFromContext,
389
- defaultNS: defaultNSFromContext
390
- } = useContext(I18nContext) || {};
391
- const i18n = i18nFromProps || i18nFromContext || getI18n();
392
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
393
- if (!i18n) {
394
- warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');
395
- }
396
- const i18nOptions = useMemo(() => ({
397
- ...getDefaults(),
398
- ...i18n?.options?.react,
399
- ...props
400
- }), [i18n, props]);
401
- const {
402
- useSuspense,
403
- keyPrefix
404
- } = i18nOptions;
405
- const namespaces = useMemo(() => {
406
- const nsOrContext = defaultNSFromContext || i18n?.options?.defaultNS;
407
- return isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];
408
- }, [ns, defaultNSFromContext, i18n]);
409
- i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);
410
- const revisionRef = useRef(0);
411
- const subscribe = useCallback(callback => {
412
- if (!i18n) return dummySubscribe;
413
- const {
414
- bindI18n,
415
- bindI18nStore
416
- } = i18nOptions;
417
- const wrappedCallback = () => {
418
- revisionRef.current += 1;
419
- callback();
420
- };
421
- if (bindI18n) i18n.on(bindI18n, wrappedCallback);
422
- if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);
423
- return () => {
424
- if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));
425
- if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));
426
- };
427
- }, [i18n, i18nOptions]);
428
- const snapshotRef = useRef();
429
- const getSnapshot = useCallback(() => {
430
- if (!i18n) {
431
- return notReadySnapshot;
432
- }
433
- const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));
434
- const currentLng = props.lng || i18n.language;
435
- const currentRevision = revisionRef.current;
436
- const lastSnapshot = snapshotRef.current;
437
- if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {
438
- return lastSnapshot;
439
- }
440
- const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
441
- const newSnapshot = {
442
- t: calculatedT,
443
- ready: calculatedReady,
444
- lng: currentLng,
445
- keyPrefix,
446
- revision: currentRevision
447
- };
448
- snapshotRef.current = newSnapshot;
449
- return newSnapshot;
450
- }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);
451
- const [loadCount, setLoadCount] = useState(0);
452
- const {
453
- t,
454
- ready
455
- } = shimExports.useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
456
- useEffect(() => {
457
- if (i18n && !ready && !useSuspense) {
458
- const onLoaded = () => setLoadCount(c => c + 1);
459
- if (props.lng) {
460
- loadLanguages(i18n, props.lng, namespaces, onLoaded);
461
- } else {
462
- loadNamespaces(i18n, namespaces, onLoaded);
463
- }
464
- }
465
- }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);
466
- const finalI18n = i18n || {};
467
- const wrapperRef = useRef(null);
468
- const wrapperLangRef = useRef();
469
- const createI18nWrapper = original => {
470
- const descriptors = Object.getOwnPropertyDescriptors(original);
471
- if (descriptors.__original) delete descriptors.__original;
472
- const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);
473
- if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {
474
- try {
475
- Object.defineProperty(wrapper, '__original', {
476
- value: original,
477
- writable: false,
478
- enumerable: false,
479
- configurable: false
480
- });
481
- } catch (_) {}
482
- }
483
- return wrapper;
484
- };
485
- const ret = useMemo(() => {
486
- const original = finalI18n;
487
- const lang = original?.language;
488
- let i18nWrapper = original;
489
- if (original) {
490
- if (wrapperRef.current && wrapperRef.current.__original === original) {
491
- if (wrapperLangRef.current !== lang) {
492
- i18nWrapper = createI18nWrapper(original);
493
- wrapperRef.current = i18nWrapper;
494
- wrapperLangRef.current = lang;
495
- } else {
496
- i18nWrapper = wrapperRef.current;
497
- }
498
- } else {
499
- i18nWrapper = createI18nWrapper(original);
500
- wrapperRef.current = i18nWrapper;
501
- wrapperLangRef.current = lang;
502
- }
503
- }
504
- const arr = [t, i18nWrapper, ready];
505
- arr.t = t;
506
- arr.i18n = i18nWrapper;
507
- arr.ready = ready;
508
- return arr;
509
- }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);
510
- if (i18n && useSuspense && !ready) {
511
- throw new Promise(resolve => {
512
- const onLoaded = () => resolve();
513
- if (props.lng) {
514
- loadLanguages(i18n, props.lng, namespaces, onLoaded);
515
- } else {
516
- loadNamespaces(i18n, namespaces, onLoaded);
517
- }
518
- });
519
- }
520
- return ret;
521
- };
522
-
523
58
  var FormContainer = function FormContainer(props) {
524
59
  var children = props.children,
525
60
  _props$className = props.className,
@@ -534,18 +69,9 @@ var FormContainer = function FormContainer(props) {
534
69
  buttonConfigs = props.buttonConfigs,
535
70
  formId = props.formId,
536
71
  onSubmit = props.onSubmit;
537
- var _useTranslation = useTranslation(),
538
- i18n = _useTranslation.i18n;
539
- var schema = useMemo(function () {
540
- return validationScheme;
541
- }, [i18n.language, validationScheme]);
542
- var resolver = useMemo(function () {
543
- return yupResolver(schema);
544
- }, [schema]);
545
- "form-".concat(i18n.language);
546
72
  var _useForm = useForm({
547
73
  mode: mode,
548
- resolver: resolver,
74
+ resolver: yupResolver(validationScheme),
549
75
  defaultValues: initialValues,
550
76
  shouldFocusError: shouldFocusError,
551
77
  shouldUnregister: shouldUnregister
@@ -573,10 +99,6 @@ var FormContainer = function FormContainer(props) {
573
99
  onSubmit(data, formState, dirtyFields);
574
100
  }
575
101
  };
576
- useEffect(function () {
577
- console.log('Language changed, updating validation messages', i18n.language);
578
- trigger(); // re-run validation with new messages
579
- }, [i18n.language]);
580
102
  return /*#__PURE__*/React.createElement("form", {
581
103
  onSubmit: handleSubmit(customSubmit),
582
104
  id: formId,
@@ -7,7 +7,7 @@ import 'classnames';
7
7
  import '../../context/types.js';
8
8
  import '../../utils/helpers.js';
9
9
  import 'dayjs';
10
- import '../../Alert--0rz5XL1.js';
10
+ import '../../Alert-Ocpfzvmz.js';
11
11
  import '../Alert/consts.js';
12
12
  import '../Text/Text.js';
13
13
  import '@babel/runtime/helpers/defineProperty';
@@ -12,7 +12,7 @@ import '../../consts/index.js';
12
12
  import { FormContext } from '../../context/types.js';
13
13
  import '../../hooks/useScreenSize.js';
14
14
  import { Controller } from 'react-hook-form';
15
- import '../../Alert--0rz5XL1.js';
15
+ import '../../Alert-Ocpfzvmz.js';
16
16
  import 'react-syntax-highlighter';
17
17
  import 'react-syntax-highlighter/dist/esm/styles/prism';
18
18
  import '../Text/Text.js';
@@ -17,7 +17,7 @@ import '../../type/file-upload.js';
17
17
  import '../../context/types.js';
18
18
  import '../../hooks/useScreenSize.js';
19
19
  import 'react-hook-form';
20
- import '../../Alert--0rz5XL1.js';
20
+ import '../../Alert-Ocpfzvmz.js';
21
21
  import '../Alert/consts.js';
22
22
  import '../../helperComponents/Loader/Loader.js';
23
23
  import 'react-dropzone';
@@ -14,7 +14,7 @@ import '../../consts/index.js';
14
14
  import 'dayjs';
15
15
  import '../../hooks/useScreenSize.js';
16
16
  import 'react-hook-form';
17
- import '../../Alert--0rz5XL1.js';
17
+ import '../../Alert-Ocpfzvmz.js';
18
18
  import 'react-syntax-highlighter';
19
19
  import 'react-syntax-highlighter/dist/esm/styles/prism';
20
20
  import { IconCheckmarkCircleFilled } from '../SVGIcons/IconCheckmarkCircleFilled.js';
@@ -18,7 +18,7 @@ import '../../consts/index.js';
18
18
  import '../../type/file-upload.js';
19
19
  import '../../hooks/useScreenSize.js';
20
20
  import 'react-hook-form';
21
- import '../../Alert--0rz5XL1.js';
21
+ import '../../Alert-Ocpfzvmz.js';
22
22
  import '../Alert/consts.js';
23
23
  import '../../helperComponents/Loader/Loader.js';
24
24
  import 'react-dropzone';
@@ -22,7 +22,7 @@ import '../Avatar/Avatar.js';
22
22
  import '../FileUpload/FileUpload.js';
23
23
  import '@babel/runtime/helpers/toConsumableArray';
24
24
  import '../FileUpload/types.js';
25
- import '../../Alert--0rz5XL1.js';
25
+ import '../../Alert-Ocpfzvmz.js';
26
26
  import '../Alert/consts.js';
27
27
  import '../Text/Text.js';
28
28
  import '../../utils/helpers.js';
@@ -31,7 +31,7 @@ import '../SVGIcons/IconChevronDown.js';
31
31
  import '../Avatar/Avatar.js';
32
32
  import '../FileUpload/FileUpload.js';
33
33
  import '../FileUpload/types.js';
34
- import '../../Alert--0rz5XL1.js';
34
+ import '../../Alert-Ocpfzvmz.js';
35
35
  import '../Alert/consts.js';
36
36
  import '../../helperComponents/Loader/Loader.js';
37
37
  import 'react-dropzone';
@@ -22,7 +22,7 @@ import '../Avatar/Avatar.js';
22
22
  import '../FileUpload/FileUpload.js';
23
23
  import '@babel/runtime/helpers/toConsumableArray';
24
24
  import '../FileUpload/types.js';
25
- import '../../Alert--0rz5XL1.js';
25
+ import '../../Alert-Ocpfzvmz.js';
26
26
  import '../Alert/consts.js';
27
27
  import '../Text/Text.js';
28
28
  import '../../utils/helpers.js';
@@ -11,7 +11,7 @@ import '../../hooks/useOnOutsideClick.js';
11
11
  import '../../hooks/useScreenSize.js';
12
12
  import '../../hooks/useHideBodyScroll.js';
13
13
  import 'react-hook-form';
14
- export { M as MOBILE_ANIMATION, a as Modal } from '../../Alert--0rz5XL1.js';
14
+ export { M as MOBILE_ANIMATION, a as Modal } from '../../Alert-Ocpfzvmz.js';
15
15
  import '../../hooks/useGetIsMobile.js';
16
16
  import '@babel/runtime/helpers/defineProperty';
17
17
  import '../../type/file-upload.js';
@@ -10,7 +10,7 @@ import { useOnOutsideClick } from '../../hooks/useOnOutsideClick.js';
10
10
  import '../../hooks/useScreenSize.js';
11
11
  import { useHideBodyScroll } from '../../hooks/useHideBodyScroll.js';
12
12
  import 'react-hook-form';
13
- import { B as Button } from '../../Alert--0rz5XL1.js';
13
+ import { B as Button } from '../../Alert-Ocpfzvmz.js';
14
14
  import { Text } from '../Text/Text.js';
15
15
  import '@babel/runtime/helpers/defineProperty';
16
16
  import '../../type/file-upload.js';
@@ -2,7 +2,7 @@ import '@babel/runtime/helpers/extends';
2
2
  import 'react';
3
3
  import '../SVGIcons/IconDismiss.js';
4
4
  import '../Tooltip/types.js';
5
- export { d as ModalContent } from '../../Alert--0rz5XL1.js';
5
+ export { d as ModalContent } from '../../Alert-Ocpfzvmz.js';
6
6
  import '../Text/Text.js';
7
7
  import '../Tooltip/Tooltip.js';
8
8
  import '../../utils/helpers.js';
@@ -1,4 +1,4 @@
1
- export { M as MOBILE_ANIMATION, a as Modal } from '../../Alert--0rz5XL1.js';
1
+ export { M as MOBILE_ANIMATION, a as Modal } from '../../Alert-Ocpfzvmz.js';
2
2
  export { ModalConfirmation } from './ModalConfirmation.js';
3
3
  import '@babel/runtime/helpers/extends';
4
4
  import 'react';
@@ -2,7 +2,7 @@ import _extends from '@babel/runtime/helpers/extends';
2
2
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
3
  import React, { useState } from 'react';
4
4
  import { Text } from '../Text/Text.js';
5
- import { B as Button } from '../../Alert--0rz5XL1.js';
5
+ import { B as Button } from '../../Alert-Ocpfzvmz.js';
6
6
  import 'classnames';
7
7
  import '../../utils/helpers.js';
8
8
  import 'dayjs';
@@ -6,7 +6,7 @@ import '../Text/Text.js';
6
6
  import 'classnames';
7
7
  import '../../utils/helpers.js';
8
8
  import 'dayjs';
9
- import '../../Alert--0rz5XL1.js';
9
+ import '../../Alert-Ocpfzvmz.js';
10
10
  import '../Alert/consts.js';
11
11
  import '@babel/runtime/helpers/defineProperty';
12
12
  import '@babel/runtime/helpers/objectWithoutProperties';
@@ -3,7 +3,7 @@ import '@babel/runtime/helpers/slicedToArray';
3
3
  import '@babel/runtime/helpers/objectWithoutProperties';
4
4
  import 'react';
5
5
  import '../../hooks/useGetIsMobile.js';
6
- export { P as Popover } from '../../Alert--0rz5XL1.js';
6
+ export { P as Popover } from '../../Alert-Ocpfzvmz.js';
7
7
  import './PopoverDesktop.js';
8
8
  import '../../consts/index.js';
9
9
  import '@babel/runtime/helpers/defineProperty';
@@ -1,5 +1,5 @@
1
1
  import 'react';
2
- export { e as PopoverMobile } from '../../Alert--0rz5XL1.js';
2
+ export { e as PopoverMobile } from '../../Alert-Ocpfzvmz.js';
3
3
  import '@babel/runtime/helpers/extends';
4
4
  import '@babel/runtime/helpers/slicedToArray';
5
5
  import 'classnames';
@@ -1,4 +1,4 @@
1
- export { P as Popover } from '../../Alert--0rz5XL1.js';
1
+ export { P as Popover } from '../../Alert-Ocpfzvmz.js';
2
2
  import '@babel/runtime/helpers/extends';
3
3
  import 'react';
4
4
  import '../Alert/consts.js';