master-components-react-ts 2.0.1 → 2.1.2

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 (70) hide show
  1. package/dist/assets/Icons/IconErrorDash.d.ts +2 -3
  2. package/dist/assets/Inter_24pt-SemiBold-DIQUEucn.woff2 +0 -0
  3. package/dist/components/Dropdown/Dropdown.types.d.ts +2 -2
  4. package/dist/components/InlineLoading/InlineLoading.d.ts +3 -0
  5. package/dist/components/InlineLoading/InlineLoading.types.d.ts +24 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +3983 -1080
  8. package/dist/types/css-modules.d.ts +9 -0
  9. package/package.json +62 -60
  10. package/dist/_virtual/_commonjsHelpers.js +0 -8
  11. package/dist/_virtual/customParseFormat.js +0 -4
  12. package/dist/_virtual/jsx-runtime.js +0 -4
  13. package/dist/_virtual/react-jsx-runtime.production.js +0 -4
  14. package/dist/assets/Icons/IconArrowUp.js +0 -13
  15. package/dist/assets/Icons/IconCalendar.js +0 -32
  16. package/dist/assets/Icons/IconCheck.js +0 -15
  17. package/dist/assets/Icons/IconCheckCircle.js +0 -16
  18. package/dist/assets/Icons/IconCheckmark.js +0 -15
  19. package/dist/assets/Icons/IconCircularLoading.js +0 -36
  20. package/dist/assets/Icons/IconClose.js +0 -31
  21. package/dist/assets/Icons/IconCloseBackground.js +0 -15
  22. package/dist/assets/Icons/IconCloseCircle.js +0 -15
  23. package/dist/assets/Icons/IconExclamation.js +0 -15
  24. package/dist/assets/Icons/IconLeft.js +0 -13
  25. package/dist/assets/Icons/IconMinus.js +0 -7
  26. package/dist/assets/Icons/IconRadioChecked.js +0 -19
  27. package/dist/assets/Icons/IconRadioCheckedDisabled.js +0 -19
  28. package/dist/assets/Icons/IconRadioUnchecked.js +0 -16
  29. package/dist/assets/Icons/IconRadioUncheckedDisabled.js +0 -16
  30. package/dist/assets/Icons/IconRight.js +0 -13
  31. package/dist/assets/Icons/IconSave.js +0 -16
  32. package/dist/assets/Icons/IconSearch.js +0 -26
  33. package/dist/assets/Icons/IconTrash.js +0 -16
  34. package/dist/components/ActionDropdown/ActionDropdown.js +0 -74
  35. package/dist/components/ActionDropdown/ActionDropdown.module.scss.js +0 -29
  36. package/dist/components/Checkbox/Checkbox.js +0 -54
  37. package/dist/components/Checkbox/Checkbox.module.scss.js +0 -26
  38. package/dist/components/DatePicker/Calendar.js +0 -437
  39. package/dist/components/DatePicker/Calendar.module.scss.js +0 -83
  40. package/dist/components/DatePicker/DatePicker.js +0 -211
  41. package/dist/components/DatePicker/Datepicker.module.scss.js +0 -17
  42. package/dist/components/Dropdown/Dropdown.js +0 -336
  43. package/dist/components/Dropdown/Dropdown.module.scss.js +0 -74
  44. package/dist/components/FormInput/FormInput.js +0 -144
  45. package/dist/components/FormInput/FormInput.module.scss.js +0 -62
  46. package/dist/components/MainButton/MainButton.js +0 -72
  47. package/dist/components/MainButton/MainButton.module.scss.js +0 -56
  48. package/dist/components/NotificationToast/NotificationContext.js +0 -57
  49. package/dist/components/NotificationToast/NotificationToast.js +0 -66
  50. package/dist/components/NotificationToast/NotificationToast.module.scss.js +0 -59
  51. package/dist/components/NotificationToast/createNotificationToast.js +0 -10
  52. package/dist/components/Popup/Popup.js +0 -116
  53. package/dist/components/Popup/Popup.module.scss.js +0 -41
  54. package/dist/components/Radio/Radio.js +0 -46
  55. package/dist/components/Radio/Radio.module.scss.js +0 -8
  56. package/dist/components/Skeleton/Skeleton.js +0 -8
  57. package/dist/components/Skeleton/Skeleton.module.scss.js +0 -20
  58. package/dist/components/Textarea/Textarea.js +0 -149
  59. package/dist/components/Textarea/Textarea.module.scss.js +0 -41
  60. package/dist/components/TimePicker/TimePicker.js +0 -172
  61. package/dist/components/TimePicker/TimePicker.module.scss.js +0 -50
  62. package/dist/components/Toggle/Toggle.js +0 -20
  63. package/dist/components/Toggle/Toggle.module.scss.js +0 -29
  64. package/dist/components/Tooltip/Tooltip.js +0 -153
  65. package/dist/components/Tooltip/Tooltip.module.scss.js +0 -35
  66. package/dist/context/NamespaceContext.js +0 -7
  67. package/dist/node_modules/dayjs/plugin/customParseFormat.js +0 -129
  68. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -35
  69. package/dist/node_modules/react/jsx-runtime.js +0 -10
  70. package/dist/utils/Helpers.js +0 -15
@@ -1,29 +0,0 @@
1
- const toggleWrapper = "Toggle-module__toggleWrapper";
2
- const checked = "Toggle-module__checked";
3
- const error = "Toggle-module__error";
4
- const disabled = "Toggle-module__disabled";
5
- const sm = "Toggle-module__sm";
6
- const toggleState = "Toggle-module__toggleState";
7
- const md = "Toggle-module__md";
8
- const lg = "Toggle-module__lg";
9
- const style = {
10
- toggleWrapper,
11
- checked,
12
- error,
13
- disabled,
14
- sm,
15
- toggleState,
16
- md,
17
- lg
18
- };
19
- export {
20
- checked,
21
- style as default,
22
- disabled,
23
- error,
24
- lg,
25
- md,
26
- sm,
27
- toggleState,
28
- toggleWrapper
29
- };
@@ -1,153 +0,0 @@
1
- import { j as jsxRuntimeExports } from "../../node_modules/react/jsx-runtime.js";
2
- import { useRef, useState, useEffect } from "react";
3
- import style from "./Tooltip.module.scss.js";
4
- const Tooltip = ({
5
- children,
6
- tooltipSlot,
7
- delay = 400,
8
- placement = "top",
9
- trigger = "hover",
10
- title,
11
- text,
12
- customText,
13
- tooltipContentStyle,
14
- tooltipTitlestyle,
15
- tooltipTextStyle,
16
- tooltipContainerStyle,
17
- pointerPosition = "10%",
18
- withPointer = false,
19
- theme,
20
- topCustomOffset = 0,
21
- bottomCustomOffset = 0,
22
- leftCustomOffset = 0,
23
- rightCustomOffset = 0,
24
- forceClose = false,
25
- onClick
26
- }) => {
27
- const ComponentRef = useRef(null);
28
- const TooltipRef = useRef(null);
29
- let timeout;
30
- const [Active, setActive] = useState(false);
31
- const hasContent = tooltipSlot || title || text || customText;
32
- const ShowTip = () => {
33
- if (trigger === "hover" && hasContent) {
34
- timeout = setTimeout(() => {
35
- setActive(true);
36
- }, delay);
37
- }
38
- };
39
- const HideTip = () => {
40
- if (trigger === "hover") {
41
- clearTimeout(timeout);
42
- setTimeout(() => {
43
- setActive(false);
44
- }, delay);
45
- }
46
- };
47
- const HandleActive = () => {
48
- if (trigger === "click") {
49
- onClick?.();
50
- setActive((state) => !state);
51
- }
52
- };
53
- const CalculatePos = () => {
54
- const componentEl = ComponentRef.current;
55
- const tooltipEl = TooltipRef.current;
56
- if (!tooltipEl || !componentEl) return;
57
- const componentRect = componentEl.getBoundingClientRect();
58
- tooltipEl.style.position = "fixed";
59
- switch (placement) {
60
- case "top":
61
- tooltipEl.style.top = `${componentRect.top - tooltipEl.offsetHeight - 8}px`;
62
- tooltipEl.style.left = `${componentRect.left + topCustomOffset}px`;
63
- break;
64
- case "bottom":
65
- tooltipEl.style.top = `${componentRect.bottom + 8}px`;
66
- tooltipEl.style.left = `${componentRect.left + bottomCustomOffset}px`;
67
- break;
68
- case "left":
69
- tooltipEl.style.top = `${componentRect.top + componentRect.height / 2 - tooltipEl.offsetHeight / 2}px`;
70
- tooltipEl.style.left = `${componentRect.left - tooltipEl.offsetWidth - 8 + leftCustomOffset}px`;
71
- break;
72
- case "right":
73
- tooltipEl.style.top = `${componentRect.top + componentRect.height / 2 - tooltipEl.offsetHeight / 2}px`;
74
- tooltipEl.style.left = `${componentRect.right + 8 + rightCustomOffset}px`;
75
- break;
76
- }
77
- };
78
- useEffect(() => {
79
- CalculatePos();
80
- }, [ComponentRef, Active, children, placement, tooltipSlot, customText, title, text]);
81
- useEffect(() => {
82
- const handleScroll = (e) => {
83
- const isInsideTooltip = ComponentRef.current?.contains(e.target);
84
- if (!isInsideTooltip) {
85
- setActive(false);
86
- }
87
- };
88
- const ClickHandler = (event) => {
89
- if (event.composedPath().includes(ComponentRef.current)) return;
90
- setActive(false);
91
- };
92
- document.addEventListener("click", ClickHandler);
93
- document.addEventListener("scroll", handleScroll, true);
94
- return () => {
95
- document.removeEventListener("scroll", handleScroll, true);
96
- document.removeEventListener("click", ClickHandler);
97
- };
98
- }, []);
99
- useEffect(() => {
100
- if (forceClose) {
101
- setActive(false);
102
- }
103
- }, [forceClose]);
104
- useEffect(() => {
105
- const element = TooltipRef.current;
106
- if (element) {
107
- element.style.setProperty("--pointer-position", `${pointerPosition}`);
108
- if (!withPointer) {
109
- element.classList.add(style.withoutPointer);
110
- }
111
- }
112
- }, [Active]);
113
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
114
- "div",
115
- {
116
- ref: ComponentRef,
117
- className: `${theme === "dark" ? style.dark : ""} ${style.tooltipContainer}`,
118
- onClick: HandleActive,
119
- onMouseEnter: ShowTip,
120
- onMouseLeave: HideTip,
121
- style: tooltipContainerStyle ?? {},
122
- children: [
123
- children,
124
- Active && tooltipSlot ? /* @__PURE__ */ jsxRuntimeExports.jsx(
125
- "div",
126
- {
127
- style: tooltipContentStyle ?? {},
128
- onClick: (e) => e.stopPropagation(),
129
- ref: TooltipRef,
130
- className: `${style.tooltipContent} ${placement ? style[placement] : style.bottom}`,
131
- children: tooltipSlot
132
- }
133
- ) : Active && /* @__PURE__ */ jsxRuntimeExports.jsxs(
134
- "div",
135
- {
136
- style: tooltipContentStyle ?? {},
137
- onClick: (e) => e.stopPropagation(),
138
- ref: TooltipRef,
139
- className: `${style.tooltipContent} ${placement ? style[placement] : style.bottom}`,
140
- children: [
141
- customText && typeof customText === "string" && customText,
142
- title && title.length > 0 && typeof title === "string" && /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: style.tooltipTitle, style: tooltipTitlestyle ?? {}, children: title }),
143
- text && text.length > 0 && typeof text === "string" && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: style.tooltipText, style: tooltipTextStyle ?? {}, children: text })
144
- ]
145
- }
146
- )
147
- ]
148
- }
149
- );
150
- };
151
- export {
152
- Tooltip as default
153
- };
@@ -1,35 +0,0 @@
1
- const tooltipContainer = "Tooltip-module__tooltipContainer";
2
- const tooltipContent = "Tooltip-module__tooltipContent";
3
- const withoutPointer = "Tooltip-module__withoutPointer";
4
- const top = "Tooltip-module__top";
5
- const right = "Tooltip-module__right";
6
- const bottom = "Tooltip-module__bottom";
7
- const left = "Tooltip-module__left";
8
- const tooltipTitle = "Tooltip-module__tooltipTitle";
9
- const tooltipText = "Tooltip-module__tooltipText";
10
- const dark = "Tooltip-module__dark";
11
- const style = {
12
- tooltipContainer,
13
- tooltipContent,
14
- withoutPointer,
15
- top,
16
- right,
17
- bottom,
18
- left,
19
- tooltipTitle,
20
- tooltipText,
21
- dark
22
- };
23
- export {
24
- bottom,
25
- dark,
26
- style as default,
27
- left,
28
- right,
29
- tooltipContainer,
30
- tooltipContent,
31
- tooltipText,
32
- tooltipTitle,
33
- top,
34
- withoutPointer
35
- };
@@ -1,7 +0,0 @@
1
- import { useContext, createContext } from "react";
2
- const NamespaceContext = createContext("namespaceNebi");
3
- const useNamespace = () => useContext(NamespaceContext);
4
- export {
5
- NamespaceContext as default,
6
- useNamespace
7
- };
@@ -1,129 +0,0 @@
1
- import { getDefaultExportFromCjs, commonjsGlobal } from "../../../_virtual/_commonjsHelpers.js";
2
- import { __module as customParseFormat$1 } from "../../../_virtual/customParseFormat.js";
3
- (function(module, exports) {
4
- !function(e, t) {
5
- module.exports = t();
6
- }(commonjsGlobal, function() {
7
- var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
8
- return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
9
- };
10
- var f = function(e2) {
11
- return function(t2) {
12
- this[e2] = +t2;
13
- };
14
- }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
15
- (this.zone || (this.zone = {})).offset = function(e3) {
16
- if (!e3) return 0;
17
- if ("Z" === e3) return 0;
18
- var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
19
- return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
20
- }(e2);
21
- }], u = function(e2) {
22
- var t2 = s[e2];
23
- return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
24
- }, d = function(e2, t2) {
25
- var n2, r2 = s.meridiem;
26
- if (r2) {
27
- for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
28
- n2 = i2 > 12;
29
- break;
30
- }
31
- } else n2 = e2 === (t2 ? "pm" : "PM");
32
- return n2;
33
- }, c = { A: [o, function(e2) {
34
- this.afternoon = d(e2, false);
35
- }], a: [o, function(e2) {
36
- this.afternoon = d(e2, true);
37
- }], Q: [n, function(e2) {
38
- this.month = 3 * (e2 - 1) + 1;
39
- }], S: [n, function(e2) {
40
- this.milliseconds = 100 * +e2;
41
- }], SS: [r, function(e2) {
42
- this.milliseconds = 10 * +e2;
43
- }], SSS: [/\d{3}/, function(e2) {
44
- this.milliseconds = +e2;
45
- }], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
46
- var t2 = s.ordinal, n2 = e2.match(/\d+/);
47
- if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
48
- }], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
49
- var t2 = u("months"), n2 = (u("monthsShort") || t2.map(function(e3) {
50
- return e3.slice(0, 3);
51
- })).indexOf(e2) + 1;
52
- if (n2 < 1) throw new Error();
53
- this.month = n2 % 12 || n2;
54
- }], MMMM: [o, function(e2) {
55
- var t2 = u("months").indexOf(e2) + 1;
56
- if (t2 < 1) throw new Error();
57
- this.month = t2 % 12 || t2;
58
- }], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
59
- this.year = a(e2);
60
- }], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
61
- function l(n2) {
62
- var r2, i2;
63
- r2 = n2, i2 = s && s.formats;
64
- for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
65
- var o3 = r3 && r3.toUpperCase();
66
- return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
67
- return t3 || n4.slice(1);
68
- });
69
- })).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
70
- var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
71
- o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
72
- }
73
- return function(e2) {
74
- for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
75
- var i3 = o2[n3];
76
- if ("string" == typeof i3) r3 += i3.length;
77
- else {
78
- var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
79
- f3.call(t2, u3), e2 = e2.replace(u3, "");
80
- }
81
- }
82
- return function(e3) {
83
- var t3 = e3.afternoon;
84
- if (void 0 !== t3) {
85
- var n4 = e3.hours;
86
- t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
87
- }
88
- }(t2), t2;
89
- };
90
- }
91
- return function(e2, t2, n2) {
92
- n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
93
- var r2 = t2.prototype, i2 = r2.parse;
94
- r2.parse = function(e3) {
95
- var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
96
- this.$u = r3;
97
- var a2 = o2[1];
98
- if ("string" == typeof a2) {
99
- var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
100
- h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = function(e4, t4, n3, r4) {
101
- try {
102
- if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
103
- var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
104
- o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
105
- var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
106
- return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
107
- } catch (e5) {
108
- return /* @__PURE__ */ new Date("");
109
- }
110
- }(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
111
- } else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
112
- o2[1] = a2[m - 1];
113
- var M = n2.apply(this, o2);
114
- if (M.isValid()) {
115
- this.$d = M.$d, this.$L = M.$L, this.init();
116
- break;
117
- }
118
- m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
119
- }
120
- else i2.call(this, e3);
121
- };
122
- };
123
- });
124
- })(customParseFormat$1);
125
- var customParseFormatExports = customParseFormat$1.exports;
126
- const customParseFormat = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports);
127
- export {
128
- customParseFormat as default
129
- };
@@ -1,35 +0,0 @@
1
- import { __exports as reactJsxRuntime_production } from "../../../_virtual/react-jsx-runtime.production.js";
2
- /**
3
- * @license React
4
- * react-jsx-runtime.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
12
- function jsxProd(type, config, maybeKey) {
13
- var key = null;
14
- void 0 !== maybeKey && (key = "" + maybeKey);
15
- void 0 !== config.key && (key = "" + config.key);
16
- if ("key" in config) {
17
- maybeKey = {};
18
- for (var propName in config)
19
- "key" !== propName && (maybeKey[propName] = config[propName]);
20
- } else maybeKey = config;
21
- config = maybeKey.ref;
22
- return {
23
- $$typeof: REACT_ELEMENT_TYPE,
24
- type,
25
- key,
26
- ref: void 0 !== config ? config : null,
27
- props: maybeKey
28
- };
29
- }
30
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
31
- reactJsxRuntime_production.jsx = jsxProd;
32
- reactJsxRuntime_production.jsxs = jsxProd;
33
- export {
34
- reactJsxRuntime_production as default
35
- };
@@ -1,10 +0,0 @@
1
- import { __module as jsxRuntime } from "../../_virtual/jsx-runtime.js";
2
- import { __exports as reactJsxRuntime_production } from "../../_virtual/react-jsx-runtime.production.js";
3
- import "./cjs/react-jsx-runtime.production.js";
4
- {
5
- jsxRuntime.exports = reactJsxRuntime_production;
6
- }
7
- var jsxRuntimeExports = jsxRuntime.exports;
8
- export {
9
- jsxRuntimeExports as j
10
- };
@@ -1,15 +0,0 @@
1
- location.href.indexOf(".upgaming.dev") > 0 || location.href.indexOf(".upgaming.com") > 0;
2
- const _filterUnique = (arr, key) => {
3
- const uniqueKeys = /* @__PURE__ */ new Set();
4
- return arr.filter((item) => {
5
- if (uniqueKeys.has(item[key])) {
6
- return false;
7
- } else {
8
- uniqueKeys.add(item[key]);
9
- return true;
10
- }
11
- });
12
- };
13
- export {
14
- _filterUnique
15
- };