ab-ui-library 1.61.0 → 1.62.1

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.
@@ -43,7 +43,7 @@ import '../SVGIcons/IconEyeOff.js';
43
43
  import '../SVGIcons/IconEyeOn.js';
44
44
  import '../Divider/Divider.js';
45
45
  import '../Tooltip/Tooltip.js';
46
- import '../../index-afc5608a.js';
46
+ import '../../index-2a17a96a.js';
47
47
 
48
48
  var _excluded = ["value", "currentDates", "setFieldValue", "name", "changeHandler", "dataId", "format", "maxDate", "minDate", "locale", "dayjsLocale", "disabled", "placeholderText", "label", "hasError", "required"];
49
49
  var RangeDatePicker = /*#__PURE__*/forwardRef(function (props) {
@@ -82,7 +82,7 @@ import '../SVGIcons/IconCaretDownFilled.js';
82
82
  import '../SVGIcons/IconCaretUpFilled.js';
83
83
  import '../../hooks/useGetHasBottomSpace.js';
84
84
  import '../../hooks/useChangePositionsOnScroll.js';
85
- import '../../index-afc5608a.js';
85
+ import '../../index-2a17a96a.js';
86
86
 
87
87
  var _excluded = ["value", "currentDate", "setFieldValue", "name", "label", "size", "locale", "changeHandler", "format", "dayjsLocale", "required", "dataId", "hasError", "placeholderText", "months", "minDate", "maxDate", "dataIdPrefix", "helperText"];
88
88
  var SimpleDatePicker = function SimpleDatePicker(props) {
@@ -42,7 +42,7 @@ import '../SVGIcons/IconEyeOff.js';
42
42
  import '../SVGIcons/IconEyeOn.js';
43
43
  import '../Divider/Divider.js';
44
44
  import '../Tooltip/Tooltip.js';
45
- import '../../index-afc5608a.js';
45
+ import '../../index-2a17a96a.js';
46
46
 
47
47
  var _excluded = ["value", "currentTime", "name", "setFieldValue", "label", "size", "dataId", "changeHandler", "required", "format", "locale", "dayjsLocale", "placeholderText", "hasError"];
48
48
  var TimePicker = function TimePicker(props) {
@@ -1,4 +1,4 @@
1
- import { _ as _asyncToGenerator, r as regenerator } from '../../index-afc5608a.js';
1
+ import { _ as _asyncToGenerator, r as regenerator } from '../../index-2a17a96a.js';
2
2
  import { _ as _slicedToArray } from '../../slicedToArray-f3514e7f.js';
3
3
  import { useState, useEffect } from 'react';
4
4
  import { registerLocale } from 'react-datepicker';
@@ -44,7 +44,7 @@ import '../SVGIcons/IconEyeOn.js';
44
44
  import '../Divider/Divider.js';
45
45
  import '../Tooltip/Tooltip.js';
46
46
  import './hooks.js';
47
- import '../../index-afc5608a.js';
47
+ import '../../index-2a17a96a.js';
48
48
  import '../SVGIcons/IconClock.js';
49
49
  import './CustomHeader/CustomHeader.js';
50
50
  import 'react-dom';
@@ -1,5 +1,5 @@
1
1
  import { _ as _extends } from '../../extends-2419b4fb.js';
2
- import { _ as _asyncToGenerator, r as regenerator } from '../../index-afc5608a.js';
2
+ import { _ as _asyncToGenerator, r as regenerator } from '../../index-2a17a96a.js';
3
3
  import React from 'react';
4
4
  import { appendErrors, useForm } from 'react-hook-form';
5
5
  import classNames from 'classnames';
@@ -1,6 +1,6 @@
1
1
  export { FormContainer } from './FormContainer.js';
2
2
  import '../../extends-2419b4fb.js';
3
- import '../../index-afc5608a.js';
3
+ import '../../index-2a17a96a.js';
4
4
  import 'react';
5
5
  import 'react-hook-form';
6
6
  import 'classnames';
@@ -56,6 +56,8 @@ var MultiTextareaWithChipsComponent = function MultiTextareaWithChipsComponent(_
56
56
  availableOptions = _ref$availableOptions === void 0 ? [] : _ref$availableOptions,
57
57
  _ref$allowCustomValue = _ref.allowCustomValues,
58
58
  allowCustomValues = _ref$allowCustomValue === void 0 ? true : _ref$allowCustomValue,
59
+ _ref$allowDuplicates = _ref.allowDuplicates,
60
+ allowDuplicates = _ref$allowDuplicates === void 0 ? false : _ref$allowDuplicates,
59
61
  searchPlaceholder = _ref.searchPlaceholder,
60
62
  chipValidationSchema = _ref.chipValidationSchema,
61
63
  chipValidationErrorMessage = _ref.chipValidationErrorMessage,
@@ -108,7 +110,7 @@ var MultiTextareaWithChipsComponent = function MultiTextareaWithChipsComponent(_
108
110
  containerRef: containerRef
109
111
  });
110
112
  var handleSelectOption = function handleSelectOption(option) {
111
- if (chipManagement.getChipTexts().includes(option)) return;
113
+ if (!allowDuplicates && chipManagement.getChipTexts().includes(option)) return;
112
114
  try {
113
115
  var valueToValidate = transformToUppercase ? option.toUpperCase() : option;
114
116
  var validatedChip = chipValidation.createValidatedChip(valueToValidate);
@@ -123,7 +125,7 @@ var MultiTextareaWithChipsComponent = function MultiTextareaWithChipsComponent(_
123
125
  }
124
126
  };
125
127
  var handleAddCustomValue = useCallback(function (value) {
126
- if (chipManagement.getChipTexts().includes(value)) return;
128
+ if (!allowDuplicates && chipManagement.getChipTexts().includes(value)) return;
127
129
  try {
128
130
  var valueToValidate = transformToUppercase ? value.toUpperCase() : value;
129
131
  var validatedChip = chipValidation.createValidatedChip(valueToValidate);
@@ -135,7 +137,7 @@ var MultiTextareaWithChipsComponent = function MultiTextareaWithChipsComponent(_
135
137
  setChipError(error instanceof Error ? error.message : 'Invalid value');
136
138
  }
137
139
  }
138
- }, [chipManagement, chipValidation, allowInvalidChips, transformToUppercase]);
140
+ }, [chipManagement, chipValidation, allowInvalidChips, transformToUppercase, allowDuplicates]);
139
141
  var onBlurLogic = useOnBlurLogic({
140
142
  inputValue: inputValue,
141
143
  disabled: disabled,
@@ -149,10 +151,9 @@ var MultiTextareaWithChipsComponent = function MultiTextareaWithChipsComponent(_
149
151
  allowInvalidChips: allowInvalidChips
150
152
  });
151
153
  var handleRemoveLastChip = function handleRemoveLastChip() {
152
- var lastChip = chipManagement.chips[chipManagement.chips.length - 1];
153
- if (lastChip) {
154
- var chipText = typeof lastChip === 'string' ? lastChip : lastChip.text;
155
- chipManagement.removeChip(chipText);
154
+ var lastChipIndex = chipManagement.chips.length - 1;
155
+ if (lastChipIndex >= 0) {
156
+ chipManagement.removeChip(lastChipIndex);
156
157
  }
157
158
  };
158
159
  var handleInputChange = function handleInputChange(e) {
@@ -225,7 +226,8 @@ var MultiTextareaWithChipsComponent = function MultiTextareaWithChipsComponent(_
225
226
  text: text,
226
227
  withAction: !disabled,
227
228
  onClick: function onClick() {
228
- chipManagement.removeChip(text);
229
+ // Pass index instead of text to remove specific chip
230
+ chipManagement.removeChip(index);
229
231
  setTimeout(function () {
230
232
  var _inputRef$current;
231
233
  (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
@@ -8,12 +8,13 @@ interface UseChipManagementProps {
8
8
  };
9
9
  setValue?: (fieldName: string, value: TFormValue) => void;
10
10
  onAddChip?: (chip: string) => void;
11
- onRemoveChip?: (chip: string) => void;
11
+ onRemoveChip?: (chip: string, index: number) => void;
12
12
  }
13
13
  export declare const useChipManagement: ({ initialChips, fieldName, formProps, setValue, onAddChip, onRemoveChip }: UseChipManagementProps) => {
14
14
  chips: ChipValue[];
15
15
  addChip: (chip: ChipValue) => void;
16
- removeChip: (chipText: string) => void;
16
+ removeChip: (index: number) => void;
17
+ removeChipByText: (chipText: string) => void;
17
18
  getChipTexts: () => string[];
18
19
  hasErrorChips: boolean;
19
20
  getErrorMessage: () => string;
@@ -41,15 +41,31 @@ var useChipManagement = function useChipManagement(_ref) {
41
41
  onAddChip === null || onAddChip === void 0 || onAddChip(chip.text);
42
42
  }
43
43
  }, [chips, updateFormValue, onAddChip]);
44
- var removeChip = useCallback(function (chipText) {
44
+ var removeChip = useCallback(function (index) {
45
45
  isUserInteraction.current = true;
46
- var newChips = chips.filter(function (chip) {
47
- var text = typeof chip === 'string' ? chip : chip.text;
48
- return text !== chipText;
46
+ var chipToRemove = chips[index];
47
+ var chipText = typeof chipToRemove === 'string' ? chipToRemove : chipToRemove.text;
48
+ var newChips = chips.filter(function (_, i) {
49
+ return i !== index;
49
50
  });
50
51
  setChips(newChips);
51
52
  updateFormValue(newChips);
52
- onRemoveChip === null || onRemoveChip === void 0 || onRemoveChip(chipText);
53
+ onRemoveChip === null || onRemoveChip === void 0 || onRemoveChip(chipText, index);
54
+ }, [chips, updateFormValue, onRemoveChip]);
55
+ var removeChipByText = useCallback(function (chipText) {
56
+ isUserInteraction.current = true;
57
+ var index = chips.findIndex(function (chip) {
58
+ var text = typeof chip === 'string' ? chip : chip.text;
59
+ return text === chipText;
60
+ });
61
+ if (index !== -1) {
62
+ var newChips = chips.filter(function (_, i) {
63
+ return i !== index;
64
+ });
65
+ setChips(newChips);
66
+ updateFormValue(newChips);
67
+ onRemoveChip === null || onRemoveChip === void 0 || onRemoveChip(chipText, index);
68
+ }
53
69
  }, [chips, updateFormValue, onRemoveChip]);
54
70
  var getChipTexts = useCallback(function () {
55
71
  return chips.map(function (chip) {
@@ -72,6 +88,7 @@ var useChipManagement = function useChipManagement(_ref) {
72
88
  chips: chips,
73
89
  addChip: addChip,
74
90
  removeChip: removeChip,
91
+ removeChipByText: removeChipByText,
75
92
  getChipTexts: getChipTexts,
76
93
  hasErrorChips: hasErrorChips,
77
94
  getErrorMessage: getErrorMessage
@@ -18,11 +18,12 @@ export interface TMultiTextareaWithChipsProps extends IFormCompProps {
18
18
  helperText?: string;
19
19
  chips?: ChipValue[];
20
20
  onAddChip?: (chip: string) => void;
21
- onRemoveChip?: (chip: string) => void;
21
+ onRemoveChip?: (chipText: string, index: number) => void;
22
22
  className?: string;
23
23
  disabled?: boolean;
24
24
  availableOptions?: string[];
25
25
  allowCustomValues?: boolean;
26
+ allowDuplicates?: boolean;
26
27
  searchPlaceholder?: string;
27
28
  chipValidationSchema?: AnySchema;
28
29
  chipValidationErrorMessage?: string;
@@ -0,0 +1,370 @@
1
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
2
+ try {
3
+ var i = n[a](c),
4
+ u = i.value;
5
+ } catch (n) {
6
+ return void e(n);
7
+ }
8
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
9
+ }
10
+ function _asyncToGenerator(n) {
11
+ return function () {
12
+ var t = this,
13
+ e = arguments;
14
+ return new Promise(function (r, o) {
15
+ var a = n.apply(t, e);
16
+ function _next(n) {
17
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
18
+ }
19
+ function _throw(n) {
20
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
21
+ }
22
+ _next(void 0);
23
+ });
24
+ };
25
+ }
26
+
27
+ var regeneratorRuntime$1 = {exports: {}};
28
+
29
+ var OverloadYield = {exports: {}};
30
+
31
+ (function (module) {
32
+ function _OverloadYield(e, d) {
33
+ this.v = e, this.k = d;
34
+ }
35
+ module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
36
+ } (OverloadYield));
37
+
38
+ var regenerator$1 = {exports: {}};
39
+
40
+ var regeneratorDefine = {exports: {}};
41
+
42
+ (function (module) {
43
+ function _regeneratorDefine(e, r, n, t) {
44
+ var i = Object.defineProperty;
45
+ try {
46
+ i({}, "", {});
47
+ } catch (e) {
48
+ i = 0;
49
+ }
50
+ module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
51
+ function o(r, n) {
52
+ _regeneratorDefine(e, r, function (e) {
53
+ return this._invoke(r, n, e);
54
+ });
55
+ }
56
+ r ? i ? i(e, r, {
57
+ value: n,
58
+ enumerable: !t,
59
+ configurable: !t,
60
+ writable: !t
61
+ }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
62
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
63
+ }
64
+ module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;
65
+ } (regeneratorDefine));
66
+
67
+ (function (module) {
68
+ var regeneratorDefine$1 = regeneratorDefine.exports;
69
+ function _regenerator() {
70
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
71
+ var e,
72
+ t,
73
+ r = "function" == typeof Symbol ? Symbol : {},
74
+ n = r.iterator || "@@iterator",
75
+ o = r.toStringTag || "@@toStringTag";
76
+ function i(r, n, o, i) {
77
+ var c = n && n.prototype instanceof Generator ? n : Generator,
78
+ u = Object.create(c.prototype);
79
+ return regeneratorDefine$1(u, "_invoke", function (r, n, o) {
80
+ var i,
81
+ c,
82
+ u,
83
+ f = 0,
84
+ p = o || [],
85
+ y = !1,
86
+ G = {
87
+ p: 0,
88
+ n: 0,
89
+ v: e,
90
+ a: d,
91
+ f: d.bind(e, 4),
92
+ d: function d(t, r) {
93
+ return i = t, c = 0, u = e, G.n = r, a;
94
+ }
95
+ };
96
+ function d(r, n) {
97
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
98
+ var o,
99
+ i = p[t],
100
+ d = G.p,
101
+ l = i[2];
102
+ r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
103
+ }
104
+ if (o || r > 1) return a;
105
+ throw y = !0, n;
106
+ }
107
+ return function (o, p, l) {
108
+ if (f > 1) throw TypeError("Generator is already running");
109
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
110
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
111
+ try {
112
+ if (f = 2, i) {
113
+ if (c || (o = "next"), t = i[o]) {
114
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
115
+ if (!t.done) return t;
116
+ u = t.value, c < 2 && (c = 0);
117
+ } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
118
+ i = e;
119
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
120
+ } catch (t) {
121
+ i = e, c = 1, u = t;
122
+ } finally {
123
+ f = 1;
124
+ }
125
+ }
126
+ return {
127
+ value: t,
128
+ done: y
129
+ };
130
+ };
131
+ }(r, o, i), !0), u;
132
+ }
133
+ var a = {};
134
+ function Generator() {}
135
+ function GeneratorFunction() {}
136
+ function GeneratorFunctionPrototype() {}
137
+ t = Object.getPrototypeOf;
138
+ var c = [][n] ? t(t([][n]())) : (regeneratorDefine$1(t = {}, n, function () {
139
+ return this;
140
+ }), t),
141
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
142
+ function f(e) {
143
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine$1(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
144
+ }
145
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine$1(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine$1(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine$1(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine$1(u), regeneratorDefine$1(u, o, "Generator"), regeneratorDefine$1(u, n, function () {
146
+ return this;
147
+ }), regeneratorDefine$1(u, "toString", function () {
148
+ return "[object Generator]";
149
+ }), (module.exports = _regenerator = function _regenerator() {
150
+ return {
151
+ w: i,
152
+ m: f
153
+ };
154
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
155
+ }
156
+ module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
157
+ } (regenerator$1));
158
+
159
+ var regeneratorAsync = {exports: {}};
160
+
161
+ var regeneratorAsyncGen = {exports: {}};
162
+
163
+ var regeneratorAsyncIterator = {exports: {}};
164
+
165
+ (function (module) {
166
+ var OverloadYield$1 = OverloadYield.exports;
167
+ var regeneratorDefine$1 = regeneratorDefine.exports;
168
+ function AsyncIterator(t, e) {
169
+ function n(r, o, i, f) {
170
+ try {
171
+ var c = t[r](o),
172
+ u = c.value;
173
+ return u instanceof OverloadYield$1 ? e.resolve(u.v).then(function (t) {
174
+ n("next", t, i, f);
175
+ }, function (t) {
176
+ n("throw", t, i, f);
177
+ }) : e.resolve(u).then(function (t) {
178
+ c.value = t, i(c);
179
+ }, function (t) {
180
+ return n("throw", t, i, f);
181
+ });
182
+ } catch (t) {
183
+ f(t);
184
+ }
185
+ }
186
+ var r;
187
+ this.next || (regeneratorDefine$1(AsyncIterator.prototype), regeneratorDefine$1(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
188
+ return this;
189
+ })), regeneratorDefine$1(this, "_invoke", function (t, o, i) {
190
+ function f() {
191
+ return new e(function (e, r) {
192
+ n(t, i, e, r);
193
+ });
194
+ }
195
+ return r = r ? r.then(f, f) : f();
196
+ }, !0);
197
+ }
198
+ module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;
199
+ } (regeneratorAsyncIterator));
200
+
201
+ (function (module) {
202
+ var regenerator = regenerator$1.exports;
203
+ var regeneratorAsyncIterator$1 = regeneratorAsyncIterator.exports;
204
+ function _regeneratorAsyncGen(r, e, t, o, n) {
205
+ return new regeneratorAsyncIterator$1(regenerator().w(r, e, t, o), n || Promise);
206
+ }
207
+ module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
208
+ } (regeneratorAsyncGen));
209
+
210
+ (function (module) {
211
+ var regeneratorAsyncGen$1 = regeneratorAsyncGen.exports;
212
+ function _regeneratorAsync(n, e, r, t, o) {
213
+ var a = regeneratorAsyncGen$1(n, e, r, t, o);
214
+ return a.next().then(function (n) {
215
+ return n.done ? n.value : a.next();
216
+ });
217
+ }
218
+ module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
219
+ } (regeneratorAsync));
220
+
221
+ var regeneratorKeys = {exports: {}};
222
+
223
+ (function (module) {
224
+ function _regeneratorKeys(e) {
225
+ var n = Object(e),
226
+ r = [];
227
+ for (var t in n) r.unshift(t);
228
+ return function e() {
229
+ for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
230
+ return e.done = !0, e;
231
+ };
232
+ }
233
+ module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
234
+ } (regeneratorKeys));
235
+
236
+ var regeneratorValues = {exports: {}};
237
+
238
+ var _typeof = {exports: {}};
239
+
240
+ (function (module) {
241
+ function _typeof(o) {
242
+ "@babel/helpers - typeof";
243
+
244
+ return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
245
+ return typeof o;
246
+ } : function (o) {
247
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
248
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
249
+ }
250
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
251
+ } (_typeof));
252
+
253
+ (function (module) {
254
+ var _typeof$1 = _typeof.exports["default"];
255
+ function _regeneratorValues(e) {
256
+ if (null != e) {
257
+ var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
258
+ r = 0;
259
+ if (t) return t.call(e);
260
+ if ("function" == typeof e.next) return e;
261
+ if (!isNaN(e.length)) return {
262
+ next: function next() {
263
+ return e && r >= e.length && (e = void 0), {
264
+ value: e && e[r++],
265
+ done: !e
266
+ };
267
+ }
268
+ };
269
+ }
270
+ throw new TypeError(_typeof$1(e) + " is not iterable");
271
+ }
272
+ module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;
273
+ } (regeneratorValues));
274
+
275
+ (function (module) {
276
+ var OverloadYield$1 = OverloadYield.exports;
277
+ var regenerator = regenerator$1.exports;
278
+ var regeneratorAsync$1 = regeneratorAsync.exports;
279
+ var regeneratorAsyncGen$1 = regeneratorAsyncGen.exports;
280
+ var regeneratorAsyncIterator$1 = regeneratorAsyncIterator.exports;
281
+ var regeneratorKeys$1 = regeneratorKeys.exports;
282
+ var regeneratorValues$1 = regeneratorValues.exports;
283
+ function _regeneratorRuntime() {
284
+
285
+ var r = regenerator(),
286
+ e = r.m(_regeneratorRuntime),
287
+ t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
288
+ function n(r) {
289
+ var e = "function" == typeof r && r.constructor;
290
+ return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
291
+ }
292
+ var o = {
293
+ "throw": 1,
294
+ "return": 2,
295
+ "break": 3,
296
+ "continue": 3
297
+ };
298
+ function a(r) {
299
+ var e, t;
300
+ return function (n) {
301
+ e || (e = {
302
+ stop: function stop() {
303
+ return t(n.a, 2);
304
+ },
305
+ "catch": function _catch() {
306
+ return n.v;
307
+ },
308
+ abrupt: function abrupt(r, e) {
309
+ return t(n.a, o[r], e);
310
+ },
311
+ delegateYield: function delegateYield(r, o, a) {
312
+ return e.resultName = o, t(n.d, regeneratorValues$1(r), a);
313
+ },
314
+ finish: function finish(r) {
315
+ return t(n.f, r);
316
+ }
317
+ }, t = function t(r, _t, o) {
318
+ n.p = e.prev, n.n = e.next;
319
+ try {
320
+ return r(_t, o);
321
+ } finally {
322
+ e.next = n.n;
323
+ }
324
+ }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
325
+ try {
326
+ return r.call(this, e);
327
+ } finally {
328
+ n.p = e.prev, n.n = e.next;
329
+ }
330
+ };
331
+ }
332
+ return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
333
+ return {
334
+ wrap: function wrap(e, t, n, o) {
335
+ return r.w(a(e), t, n, o && o.reverse());
336
+ },
337
+ isGeneratorFunction: n,
338
+ mark: r.m,
339
+ awrap: function awrap(r, e) {
340
+ return new OverloadYield$1(r, e);
341
+ },
342
+ AsyncIterator: regeneratorAsyncIterator$1,
343
+ async: function async(r, e, t, o, u) {
344
+ return (n(e) ? regeneratorAsyncGen$1 : regeneratorAsync$1)(a(r), e, t, o, u);
345
+ },
346
+ keys: regeneratorKeys$1,
347
+ values: regeneratorValues$1
348
+ };
349
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
350
+ }
351
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
352
+ } (regeneratorRuntime$1));
353
+
354
+ // TODO(Babel 8): Remove this file.
355
+
356
+ var runtime = regeneratorRuntime$1.exports();
357
+ var regenerator = runtime;
358
+
359
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
360
+ try {
361
+ regeneratorRuntime = runtime;
362
+ } catch (accidentalStrictMode) {
363
+ if (typeof globalThis === "object") {
364
+ globalThis.regeneratorRuntime = runtime;
365
+ } else {
366
+ Function("r", "regeneratorRuntime = r")(runtime);
367
+ }
368
+ }
369
+
370
+ export { _asyncToGenerator as _, regenerator as r };
package/index.js CHANGED
@@ -570,7 +570,7 @@ import './components/CardSelect/components/CardDescription.js';
570
570
  import './components/CardSelect/components/CardAdditionalInfo.js';
571
571
  import 'react-datepicker';
572
572
  import './components/DatePicker/hooks.js';
573
- import './index-afc5608a.js';
573
+ import './index-2a17a96a.js';
574
574
  import './components/DatePicker/CustomHeader/CustomHeader.js';
575
575
  import './components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js';
576
576
  import './components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ab-ui-library",
3
- "version": "1.61.0",
3
+ "version": "1.62.1",
4
4
  "description": "UI library for AM",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
@@ -30,7 +30,7 @@
30
30
  "react-loading-skeleton": "^3.5.0",
31
31
  "react-number-format": "^5.3.1",
32
32
  "react-paginate": "^8.2.0",
33
- "react-syntax-highlighter": "^15.5.0",
33
+ "react-syntax-highlighter": "^16.1.0",
34
34
  "react-table": "^7.8.0",
35
35
  "react-toastify": "10.0.5"
36
36
  },
package/index-afc5608a.js DELETED
@@ -1,334 +0,0 @@
1
- function asyncGeneratorStep(n, t, e, r, o, a, c) {
2
- try {
3
- var i = n[a](c),
4
- u = i.value;
5
- } catch (n) {
6
- return void e(n);
7
- }
8
- i.done ? t(u) : Promise.resolve(u).then(r, o);
9
- }
10
- function _asyncToGenerator(n) {
11
- return function () {
12
- var t = this,
13
- e = arguments;
14
- return new Promise(function (r, o) {
15
- var a = n.apply(t, e);
16
- function _next(n) {
17
- asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
18
- }
19
- function _throw(n) {
20
- asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
21
- }
22
- _next(void 0);
23
- });
24
- };
25
- }
26
-
27
- var regeneratorRuntime$1 = {exports: {}};
28
-
29
- var _typeof = {exports: {}};
30
-
31
- (function (module) {
32
- function _typeof(o) {
33
- "@babel/helpers - typeof";
34
-
35
- return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
36
- return typeof o;
37
- } : function (o) {
38
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
39
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
40
- }
41
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
42
- } (_typeof));
43
-
44
- (function (module) {
45
- var _typeof$1 = _typeof.exports["default"];
46
- function _regeneratorRuntime() {
47
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
48
- return r;
49
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
50
- var t,
51
- r = {},
52
- e = Object.prototype,
53
- n = e.hasOwnProperty,
54
- o = "function" == typeof Symbol ? Symbol : {},
55
- i = o.iterator || "@@iterator",
56
- a = o.asyncIterator || "@@asyncIterator",
57
- u = o.toStringTag || "@@toStringTag";
58
- function c(t, r, e, n) {
59
- return Object.defineProperty(t, r, {
60
- value: e,
61
- enumerable: !n,
62
- configurable: !n,
63
- writable: !n
64
- });
65
- }
66
- try {
67
- c({}, "");
68
- } catch (t) {
69
- c = function c(t, r, e) {
70
- return t[r] = e;
71
- };
72
- }
73
- function h(r, e, n, o) {
74
- var i = e && e.prototype instanceof Generator ? e : Generator,
75
- a = Object.create(i.prototype);
76
- return c(a, "_invoke", function (r, e, n) {
77
- var o = 1;
78
- return function (i, a) {
79
- if (3 === o) throw Error("Generator is already running");
80
- if (4 === o) {
81
- if ("throw" === i) throw a;
82
- return {
83
- value: t,
84
- done: !0
85
- };
86
- }
87
- for (n.method = i, n.arg = a;;) {
88
- var u = n.delegate;
89
- if (u) {
90
- var c = d(u, n);
91
- if (c) {
92
- if (c === f) continue;
93
- return c;
94
- }
95
- }
96
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
97
- if (1 === o) throw o = 4, n.arg;
98
- n.dispatchException(n.arg);
99
- } else "return" === n.method && n.abrupt("return", n.arg);
100
- o = 3;
101
- var h = s(r, e, n);
102
- if ("normal" === h.type) {
103
- if (o = n.done ? 4 : 2, h.arg === f) continue;
104
- return {
105
- value: h.arg,
106
- done: n.done
107
- };
108
- }
109
- "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
110
- }
111
- };
112
- }(r, n, new Context(o || [])), !0), a;
113
- }
114
- function s(t, r, e) {
115
- try {
116
- return {
117
- type: "normal",
118
- arg: t.call(r, e)
119
- };
120
- } catch (t) {
121
- return {
122
- type: "throw",
123
- arg: t
124
- };
125
- }
126
- }
127
- r.wrap = h;
128
- var f = {};
129
- function Generator() {}
130
- function GeneratorFunction() {}
131
- function GeneratorFunctionPrototype() {}
132
- var l = {};
133
- c(l, i, function () {
134
- return this;
135
- });
136
- var p = Object.getPrototypeOf,
137
- y = p && p(p(x([])));
138
- y && y !== e && n.call(y, i) && (l = y);
139
- var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
140
- function g(t) {
141
- ["next", "throw", "return"].forEach(function (r) {
142
- c(t, r, function (t) {
143
- return this._invoke(r, t);
144
- });
145
- });
146
- }
147
- function AsyncIterator(t, r) {
148
- function e(o, i, a, u) {
149
- var c = s(t[o], t, i);
150
- if ("throw" !== c.type) {
151
- var h = c.arg,
152
- f = h.value;
153
- return f && "object" == _typeof$1(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
154
- e("next", t, a, u);
155
- }, function (t) {
156
- e("throw", t, a, u);
157
- }) : r.resolve(f).then(function (t) {
158
- h.value = t, a(h);
159
- }, function (t) {
160
- return e("throw", t, a, u);
161
- });
162
- }
163
- u(c.arg);
164
- }
165
- var o;
166
- c(this, "_invoke", function (t, n) {
167
- function i() {
168
- return new r(function (r, o) {
169
- e(t, n, r, o);
170
- });
171
- }
172
- return o = o ? o.then(i, i) : i();
173
- }, !0);
174
- }
175
- function d(r, e) {
176
- var n = e.method,
177
- o = r.i[n];
178
- if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f;
179
- var i = s(o, r.i, e.arg);
180
- if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
181
- var a = i.arg;
182
- return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f);
183
- }
184
- function w(t) {
185
- this.tryEntries.push(t);
186
- }
187
- function m(r) {
188
- var e = r[4] || {};
189
- e.type = "normal", e.arg = t, r[4] = e;
190
- }
191
- function Context(t) {
192
- this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0);
193
- }
194
- function x(r) {
195
- if (null != r) {
196
- var e = r[i];
197
- if (e) return e.call(r);
198
- if ("function" == typeof r.next) return r;
199
- if (!isNaN(r.length)) {
200
- var o = -1,
201
- a = function e() {
202
- for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e;
203
- return e.value = t, e.done = !0, e;
204
- };
205
- return a.next = a;
206
- }
207
- }
208
- throw new TypeError(_typeof$1(r) + " is not iterable");
209
- }
210
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) {
211
- var r = "function" == typeof t && t.constructor;
212
- return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
213
- }, r.mark = function (t) {
214
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
215
- }, r.awrap = function (t) {
216
- return {
217
- __await: t
218
- };
219
- }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
220
- return this;
221
- }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
222
- void 0 === i && (i = Promise);
223
- var a = new AsyncIterator(h(t, e, n, o), i);
224
- return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
225
- return t.done ? t.value : a.next();
226
- });
227
- }, g(v), c(v, u, "Generator"), c(v, i, function () {
228
- return this;
229
- }), c(v, "toString", function () {
230
- return "[object Generator]";
231
- }), r.keys = function (t) {
232
- var r = Object(t),
233
- e = [];
234
- for (var n in r) e.unshift(n);
235
- return function t() {
236
- for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t;
237
- return t.done = !0, t;
238
- };
239
- }, r.values = x, Context.prototype = {
240
- constructor: Context,
241
- reset: function reset(r) {
242
- if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t);
243
- },
244
- stop: function stop() {
245
- this.done = !0;
246
- var t = this.tryEntries[0][4];
247
- if ("throw" === t.type) throw t.arg;
248
- return this.rval;
249
- },
250
- dispatchException: function dispatchException(r) {
251
- if (this.done) throw r;
252
- var e = this;
253
- function n(t) {
254
- a.type = "throw", a.arg = r, e.next = t;
255
- }
256
- for (var o = e.tryEntries.length - 1; o >= 0; --o) {
257
- var i = this.tryEntries[o],
258
- a = i[4],
259
- u = this.prev,
260
- c = i[1],
261
- h = i[2];
262
- if (-1 === i[0]) return n("end"), !1;
263
- if (!c && !h) throw Error("try statement without catch or finally");
264
- if (null != i[0] && i[0] <= u) {
265
- if (u < c) return this.method = "next", this.arg = t, n(c), !0;
266
- if (u < h) return n(h), !1;
267
- }
268
- }
269
- },
270
- abrupt: function abrupt(t, r) {
271
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
272
- var n = this.tryEntries[e];
273
- if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
274
- var o = n;
275
- break;
276
- }
277
- }
278
- o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
279
- var i = o ? o[4] : {};
280
- return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
281
- },
282
- complete: function complete(t, r) {
283
- if ("throw" === t.type) throw t.arg;
284
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f;
285
- },
286
- finish: function finish(t) {
287
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
288
- var e = this.tryEntries[r];
289
- if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
290
- }
291
- },
292
- "catch": function _catch(t) {
293
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
294
- var e = this.tryEntries[r];
295
- if (e[0] === t) {
296
- var n = e[4];
297
- if ("throw" === n.type) {
298
- var o = n.arg;
299
- m(e);
300
- }
301
- return o;
302
- }
303
- }
304
- throw Error("illegal catch attempt");
305
- },
306
- delegateYield: function delegateYield(r, e, n) {
307
- return this.delegate = {
308
- i: x(r),
309
- r: e,
310
- n: n
311
- }, "next" === this.method && (this.arg = t), f;
312
- }
313
- }, r;
314
- }
315
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
316
- } (regeneratorRuntime$1));
317
-
318
- // TODO(Babel 8): Remove this file.
319
-
320
- var runtime = regeneratorRuntime$1.exports();
321
- var regenerator = runtime;
322
-
323
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
324
- try {
325
- regeneratorRuntime = runtime;
326
- } catch (accidentalStrictMode) {
327
- if (typeof globalThis === "object") {
328
- globalThis.regeneratorRuntime = runtime;
329
- } else {
330
- Function("r", "regeneratorRuntime = r")(runtime);
331
- }
332
- }
333
-
334
- export { _asyncToGenerator as _, regenerator as r };