@natoora-libs/core 0.2.41 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TableDesktop-4tjwQjmc.d.cts → TableDesktop-BQk0gStR.d.cts} +23 -13
- package/dist/{TableDesktop-4tjwQjmc.d.ts → TableDesktop-BQk0gStR.d.ts} +23 -13
- package/dist/chunk-3UDYWCV6.js +67 -0
- package/dist/chunk-3UDYWCV6.js.map +1 -0
- package/dist/components/index.cjs +3828 -2283
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +209 -116
- package/dist/components/index.d.ts +209 -116
- package/dist/components/index.js +3487 -1965
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs +49 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +14 -2
- package/dist/utils/index.d.ts +14 -2
- package/dist/utils/index.js +5 -3
- package/package.json +30 -37
- package/dist/chunk-N3IUZVB7.js +0 -21
- package/dist/chunk-N3IUZVB7.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -17,10 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
19
|
// src/index.ts
|
|
20
|
-
var
|
|
21
|
-
__export(
|
|
22
|
-
default: () =>
|
|
20
|
+
var src_exports = {};
|
|
21
|
+
__export(src_exports, {
|
|
22
|
+
default: () => src_default
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
24
|
+
module.exports = __toCommonJS(src_exports);
|
|
25
|
+
var src_default = "@natoora-libs/core";
|
|
26
26
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export default '@natoora-libs/core';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAO,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export default '@natoora-libs/core';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAO,cAAQ;","names":[]}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export default '@natoora-libs/core';\n"],"mappings":";;;AAAA,IAAO,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export default '@natoora-libs/core';\n"],"mappings":";;;AAAA,IAAO,cAAQ;","names":[]}
|
package/dist/utils/index.cjs
CHANGED
|
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var utils_exports = {};
|
|
21
21
|
__export(utils_exports, {
|
|
22
22
|
getFlattenedFiltersIds: () => getFlattenedFiltersIds,
|
|
23
|
-
getFlattenedFiltersLabels: () => getFlattenedFiltersLabels
|
|
23
|
+
getFlattenedFiltersLabels: () => getFlattenedFiltersLabels,
|
|
24
|
+
getSelectOptionFromKeyPress: () => getSelectOptionFromKeyPress
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(utils_exports);
|
|
26
27
|
|
|
@@ -39,9 +40,55 @@ var getFlattenedFiltersIds = (filters) => Object.fromEntries(
|
|
|
39
40
|
values.map((value) => typeof value === "object" ? value.id : value)
|
|
40
41
|
])
|
|
41
42
|
);
|
|
43
|
+
|
|
44
|
+
// src/utils/getSelectOptionFromKeyPress/getSelectOptionFromKeyPress.ts
|
|
45
|
+
var getNextCircularIndex = ({
|
|
46
|
+
isArrowUp,
|
|
47
|
+
currentIndex,
|
|
48
|
+
numOptions,
|
|
49
|
+
iteration
|
|
50
|
+
}) => {
|
|
51
|
+
const step = isArrowUp ? -iteration : iteration;
|
|
52
|
+
return (currentIndex + step + numOptions) % numOptions;
|
|
53
|
+
};
|
|
54
|
+
var getSelectOptionFromKeyPress = ({
|
|
55
|
+
key,
|
|
56
|
+
options,
|
|
57
|
+
currentValue
|
|
58
|
+
}) => {
|
|
59
|
+
const numOptions = options.length;
|
|
60
|
+
const isArrowUp = key === "ArrowUp";
|
|
61
|
+
const isArrowDown = key === "ArrowDown";
|
|
62
|
+
const isArrow = isArrowUp || isArrowDown;
|
|
63
|
+
const searchKey = key.toLowerCase();
|
|
64
|
+
if (!isArrow && searchKey.length !== 1) {
|
|
65
|
+
return void 0;
|
|
66
|
+
}
|
|
67
|
+
if (!numOptions) {
|
|
68
|
+
return void 0;
|
|
69
|
+
}
|
|
70
|
+
const currentIndex = options.findIndex((o) => o.value === currentValue);
|
|
71
|
+
const indicesToCheck = Array.from({ length: numOptions }).map(
|
|
72
|
+
(_, i) => getNextCircularIndex({
|
|
73
|
+
isArrowUp,
|
|
74
|
+
currentIndex,
|
|
75
|
+
numOptions,
|
|
76
|
+
iteration: i + 1
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
const nextMatchIndex = indicesToCheck.find((indexToCheck) => {
|
|
80
|
+
const option = options[indexToCheck];
|
|
81
|
+
return !option.disabled && (isArrow || option.label?.toLowerCase().startsWith(searchKey));
|
|
82
|
+
});
|
|
83
|
+
if (nextMatchIndex !== void 0 && nextMatchIndex !== currentIndex) {
|
|
84
|
+
return options[nextMatchIndex];
|
|
85
|
+
}
|
|
86
|
+
return void 0;
|
|
87
|
+
};
|
|
42
88
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
89
|
0 && (module.exports = {
|
|
44
90
|
getFlattenedFiltersIds,
|
|
45
|
-
getFlattenedFiltersLabels
|
|
91
|
+
getFlattenedFiltersLabels,
|
|
92
|
+
getSelectOptionFromKeyPress
|
|
46
93
|
});
|
|
47
94
|
//# sourceMappingURL=index.cjs.map
|
package/dist/utils/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/index.ts","../../src/utils/flattenTableFilters/flattenTableFilters.ts"],"sourcesContent":["export {\n getFlattenedFiltersLabels,\n getFlattenedFiltersIds,\n type FlattenedFilterIds,\n} from './flattenTableFilters/flattenTableFilters';\n","import {\n HeaderFilterObject,\n HeaderFilters,\n} from '@/components/TableDesktop/TableDesktop';\n\nexport type FlattenedFilterIds = {\n [key: string]: (string | number)[];\n};\n\nexport const getFlattenedFiltersLabels = (\n filters: string[] | HeaderFilterObject[],\n fieldName: string,\n): (string | number)[] => {\n return filters.map((value: string | HeaderFilterObject) => {\n if (typeof value === 'object') {\n return value[fieldName] ?? '';\n }\n return value;\n });\n};\n\nexport const getFlattenedFiltersIds = (\n filters: HeaderFilters,\n): FlattenedFilterIds =>\n Object.fromEntries(\n Object.entries(filters).map(([id, values]) => [\n id,\n values.map((value) => (typeof value === 'object' ? value.id : value)),\n ]),\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,4BAA4B,CACvC,SACA,cACwB;AACxB,SAAO,QAAQ,IAAI,CAAC,UAAuC;AACzD,QAAI,OAAO,UAAU,UAAU;AAC7B,aAAO,MAAM,SAAS,KAAK;AAAA,IAC7B;AACA,WAAO;AAAA,EACT,CAAC;AACH;AAEO,IAAM,yBAAyB,CACpC,YAEA,OAAO;AAAA,EACL,OAAO,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,MAAM,MAAM;AAAA,IAC5C;AAAA,IACA,OAAO,IAAI,CAAC,UAAW,OAAO,UAAU,WAAW,MAAM,KAAK,KAAM;AAAA,EACtE,CAAC;AACH;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/utils/flattenTableFilters/flattenTableFilters.ts","../../src/utils/getSelectOptionFromKeyPress/getSelectOptionFromKeyPress.ts"],"sourcesContent":["export {\n getFlattenedFiltersLabels,\n getFlattenedFiltersIds,\n type FlattenedFilterIds,\n} from './flattenTableFilters/flattenTableFilters';\nexport { getSelectOptionFromKeyPress } from './getSelectOptionFromKeyPress/getSelectOptionFromKeyPress';\n","import {\n HeaderFilterObject,\n HeaderFilters,\n} from '@/components/TableDesktop/TableDesktop';\n\nexport type FlattenedFilterIds = {\n [key: string]: (string | number)[];\n};\n\nexport const getFlattenedFiltersLabels = (\n filters: string[] | HeaderFilterObject[],\n fieldName: string,\n): (string | number)[] => {\n return filters.map((value: string | HeaderFilterObject) => {\n if (typeof value === 'object') {\n return value[fieldName] ?? '';\n }\n return value;\n });\n};\n\nexport const getFlattenedFiltersIds = (\n filters: HeaderFilters,\n): FlattenedFilterIds =>\n Object.fromEntries(\n Object.entries(filters).map(([id, values]) => [\n id,\n values.map((value) => (typeof value === 'object' ? value.id : value)),\n ]),\n );\n","export interface NavigableOption {\n value?: string | number | null;\n label?: string;\n disabled?: boolean;\n}\n\nexport interface GetSelectOptionFromKeyPressParams<T extends NavigableOption> {\n key: string;\n options: T[];\n currentValue?: string | number | null;\n}\n\nconst getNextCircularIndex = ({\n isArrowUp,\n currentIndex,\n numOptions,\n iteration,\n}: {\n isArrowUp: boolean;\n currentIndex: number;\n numOptions: number;\n iteration: number;\n}) => {\n const step = isArrowUp ? -iteration : iteration;\n return (currentIndex + step + numOptions) % numOptions;\n};\n\nexport const getSelectOptionFromKeyPress = <T extends NavigableOption>({\n key,\n options,\n currentValue,\n}: GetSelectOptionFromKeyPressParams<T>): T | undefined => {\n const numOptions = options.length;\n const isArrowUp = key === 'ArrowUp';\n const isArrowDown = key === 'ArrowDown';\n const isArrow = isArrowUp || isArrowDown;\n const searchKey = key.toLowerCase();\n\n // Ignores any input that is not ArrowUp, ArrowDown or a single character.\n if (!isArrow && searchKey.length !== 1) {\n return undefined;\n }\n\n if (!numOptions) {\n return undefined;\n }\n\n const currentIndex = options.findIndex((o) => o.value === currentValue);\n\n // Generates a circular sequence of indices starting from the next item.\n // This ensures that pressing the same key repeatedly cycles through all matching options.\n const indicesToCheck = Array.from({ length: numOptions }).map((_, i) =>\n getNextCircularIndex({\n isArrowUp,\n currentIndex,\n numOptions,\n iteration: i + 1,\n }),\n );\n\n const nextMatchIndex = indicesToCheck.find((indexToCheck) => {\n const option = options[indexToCheck];\n return (\n !option.disabled &&\n (isArrow || option.label?.toLowerCase().startsWith(searchKey))\n );\n });\n\n if (nextMatchIndex !== undefined && nextMatchIndex !== currentIndex) {\n return options[nextMatchIndex];\n }\n\n return undefined;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,4BAA4B,CACvC,SACA,cACwB;AACxB,SAAO,QAAQ,IAAI,CAAC,UAAuC;AACzD,QAAI,OAAO,UAAU,UAAU;AAC7B,aAAO,MAAM,SAAS,KAAK;AAAA,IAC7B;AACA,WAAO;AAAA,EACT,CAAC;AACH;AAEO,IAAM,yBAAyB,CACpC,YAEA,OAAO;AAAA,EACL,OAAO,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,MAAM,MAAM;AAAA,IAC5C;AAAA,IACA,OAAO,IAAI,CAAC,UAAW,OAAO,UAAU,WAAW,MAAM,KAAK,KAAM;AAAA,EACtE,CAAC;AACH;;;ACjBF,IAAM,uBAAuB,CAAC;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAKM;AACJ,QAAM,OAAO,YAAY,CAAC,YAAY;AACtC,UAAQ,eAAe,OAAO,cAAc;AAC9C;AAEO,IAAM,8BAA8B,CAA4B;AAAA,EACrE;AAAA,EACA;AAAA,EACA;AACF,MAA2D;AACzD,QAAM,aAAa,QAAQ;AAC3B,QAAM,YAAY,QAAQ;AAC1B,QAAM,cAAc,QAAQ;AAC5B,QAAM,UAAU,aAAa;AAC7B,QAAM,YAAY,IAAI,YAAY;AAGlC,MAAI,CAAC,WAAW,UAAU,WAAW,GAAG;AACtC,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,YAAY;AACf,WAAO;AAAA,EACT;AAEA,QAAM,eAAe,QAAQ,UAAU,CAAC,MAAM,EAAE,UAAU,YAAY;AAItE,QAAM,iBAAiB,MAAM,KAAK,EAAE,QAAQ,WAAW,CAAC,EAAE;AAAA,IAAI,CAAC,GAAG,MAChE,qBAAqB;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,IAAI;AAAA,IACjB,CAAC;AAAA,EACH;AAEA,QAAM,iBAAiB,eAAe,KAAK,CAAC,iBAAiB;AAC3D,UAAM,SAAS,QAAQ,YAAY;AACnC,WACE,CAAC,OAAO,aACP,WAAW,OAAO,OAAO,YAAY,EAAE,WAAW,SAAS;AAAA,EAEhE,CAAC;AAED,MAAI,mBAAmB,UAAa,mBAAmB,cAAc;AACnE,WAAO,QAAQ,cAAc;AAAA,EAC/B;AAEA,SAAO;AACT;","names":[]}
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as HeaderFilters, c as HeaderFilterObject } from '../TableDesktop-BQk0gStR.cjs';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@mui/material';
|
|
@@ -9,4 +9,16 @@ type FlattenedFilterIds = {
|
|
|
9
9
|
declare const getFlattenedFiltersLabels: (filters: string[] | HeaderFilterObject[], fieldName: string) => (string | number)[];
|
|
10
10
|
declare const getFlattenedFiltersIds: (filters: HeaderFilters) => FlattenedFilterIds;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
interface NavigableOption {
|
|
13
|
+
value?: string | number | null;
|
|
14
|
+
label?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface GetSelectOptionFromKeyPressParams<T extends NavigableOption> {
|
|
18
|
+
key: string;
|
|
19
|
+
options: T[];
|
|
20
|
+
currentValue?: string | number | null;
|
|
21
|
+
}
|
|
22
|
+
declare const getSelectOptionFromKeyPress: <T extends NavigableOption>({ key, options, currentValue, }: GetSelectOptionFromKeyPressParams<T>) => T | undefined;
|
|
23
|
+
|
|
24
|
+
export { type FlattenedFilterIds, getFlattenedFiltersIds, getFlattenedFiltersLabels, getSelectOptionFromKeyPress };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as HeaderFilters, c as HeaderFilterObject } from '../TableDesktop-BQk0gStR.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@mui/material';
|
|
@@ -9,4 +9,16 @@ type FlattenedFilterIds = {
|
|
|
9
9
|
declare const getFlattenedFiltersLabels: (filters: string[] | HeaderFilterObject[], fieldName: string) => (string | number)[];
|
|
10
10
|
declare const getFlattenedFiltersIds: (filters: HeaderFilters) => FlattenedFilterIds;
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
interface NavigableOption {
|
|
13
|
+
value?: string | number | null;
|
|
14
|
+
label?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface GetSelectOptionFromKeyPressParams<T extends NavigableOption> {
|
|
18
|
+
key: string;
|
|
19
|
+
options: T[];
|
|
20
|
+
currentValue?: string | number | null;
|
|
21
|
+
}
|
|
22
|
+
declare const getSelectOptionFromKeyPress: <T extends NavigableOption>({ key, options, currentValue, }: GetSelectOptionFromKeyPressParams<T>) => T | undefined;
|
|
23
|
+
|
|
24
|
+
export { type FlattenedFilterIds, getFlattenedFiltersIds, getFlattenedFiltersLabels, getSelectOptionFromKeyPress };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFlattenedFiltersIds,
|
|
3
|
-
getFlattenedFiltersLabels
|
|
4
|
-
|
|
3
|
+
getFlattenedFiltersLabels,
|
|
4
|
+
getSelectOptionFromKeyPress
|
|
5
|
+
} from "../chunk-3UDYWCV6.js";
|
|
5
6
|
import "../chunk-5WRI5ZAA.js";
|
|
6
7
|
export {
|
|
7
8
|
getFlattenedFiltersIds,
|
|
8
|
-
getFlattenedFiltersLabels
|
|
9
|
+
getFlattenedFiltersLabels,
|
|
10
|
+
getSelectOptionFromKeyPress
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natoora-libs/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.43",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"types": "dist/index.d.ts",
|
|
14
14
|
"module": "dist/index.js",
|
|
15
15
|
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
},
|
|
16
21
|
"./components": {
|
|
17
22
|
"types": "./dist/components/index.d.ts",
|
|
18
23
|
"import": "./dist/components/index.js",
|
|
@@ -39,7 +44,7 @@
|
|
|
39
44
|
},
|
|
40
45
|
"packageManager": "pnpm@10.14.0",
|
|
41
46
|
"scripts": {
|
|
42
|
-
"dev": "yalc publish && tsup --watch --onSuccess
|
|
47
|
+
"dev": "yalc publish && NODE_OPTIONS=\"--max-old-space-size=8192\" tsup --watch --onSuccess \"yalc push --changed\"",
|
|
43
48
|
"build": "tsup",
|
|
44
49
|
"build-storybook": "storybook build",
|
|
45
50
|
"storybook": "storybook dev -p 6006",
|
|
@@ -50,80 +55,68 @@
|
|
|
50
55
|
"test": "jest --watchAll=false --maxWorkers=50% --logHeapUsage",
|
|
51
56
|
"test:no-parallel": "jest --watchAll=false --runInBand --logHeapUsage",
|
|
52
57
|
"test:watch": "jest --watch --maxWorkers=50% --logHeapUsage",
|
|
53
|
-
"test:coverage": "jest --coverage --coverageReporters=text-summary --maxWorkers=25% --logHeapUsage"
|
|
58
|
+
"test:coverage": "jest --coverage --coverageReporters=text-summary --maxWorkers=25% --logHeapUsage",
|
|
59
|
+
"test:coverage:solo": "node ../../../test-fe-solo-coverage.mjs"
|
|
54
60
|
},
|
|
55
61
|
"dependencies": {
|
|
56
62
|
"classnames": "^2.3.2",
|
|
57
|
-
"mdi-material-ui": "^7.9.3",
|
|
58
63
|
"moment": "^2.29.4",
|
|
59
64
|
"react-dates": "^21.8.0",
|
|
65
|
+
"react-google-places-autocomplete": "4.1.0",
|
|
60
66
|
"react-phone-input-material-ui": "^2.18.1",
|
|
61
67
|
"react-window": "^1.8.6",
|
|
62
68
|
"tss-react": "^4.9.15",
|
|
63
|
-
"uuid": "^9.0.0"
|
|
64
|
-
"yup": "^0.32.9"
|
|
69
|
+
"uuid": "^9.0.0"
|
|
65
70
|
},
|
|
66
71
|
"devDependencies": {
|
|
67
72
|
"@emotion/react": "^11.14.0",
|
|
68
73
|
"@emotion/styled": "^11.14.0",
|
|
69
74
|
"@mui/icons-material": "^7.3.2",
|
|
70
|
-
"@mui/lab": "^7.0.0-beta.17",
|
|
71
75
|
"@mui/material": "^7.3.2",
|
|
72
|
-
"@mui/types": "^7.4.6",
|
|
73
76
|
"@mui/x-data-grid": "^8.11.3",
|
|
74
77
|
"@mui/x-date-pickers": "^8.11.3",
|
|
75
|
-
"@storybook/addon-docs": "^10.
|
|
76
|
-
"@storybook/addon-links": "^10.
|
|
77
|
-
"@storybook/addon-onboarding": "^10.
|
|
78
|
-
"@storybook/builder-webpack5": "^10.
|
|
79
|
-
"@storybook/react-webpack5": "^10.
|
|
80
|
-
"@storybook/testing-library": "^0.2.0",
|
|
78
|
+
"@storybook/addon-docs": "^10.2.10",
|
|
79
|
+
"@storybook/addon-links": "^10.2.10",
|
|
80
|
+
"@storybook/addon-onboarding": "^10.2.10",
|
|
81
|
+
"@storybook/builder-webpack5": "^10.2.10",
|
|
82
|
+
"@storybook/react-webpack5": "^10.2.10",
|
|
81
83
|
"@testing-library/jest-dom": "^6.6.3",
|
|
82
84
|
"@testing-library/react": "16.3.0",
|
|
83
85
|
"@testing-library/user-event": "^14.4.3",
|
|
84
|
-
"@types/classnames": "^2.3.1",
|
|
85
86
|
"@types/jest": "^30.0.0",
|
|
86
|
-
"@types/
|
|
87
|
-
"@types/
|
|
88
|
-
"@types/
|
|
89
|
-
"@types/react": "^19.0.0",
|
|
90
|
-
"@types/react-dom": "^19.0.0",
|
|
91
|
-
"@types/react-test-renderer": "^19.1.0",
|
|
92
|
-
"@types/redux": "^3.6.0",
|
|
87
|
+
"@types/node": "^25.0.9",
|
|
88
|
+
"@types/react": "^19.2.8",
|
|
89
|
+
"@types/react-dom": "^19.1.7",
|
|
93
90
|
"@types/uuid": "^10.0.0",
|
|
94
91
|
"babel-jest": "^30.2.0",
|
|
95
92
|
"babel-plugin-named-exports-order": "^0.0.2",
|
|
96
93
|
"jest": "^30.0.4",
|
|
97
94
|
"jest-environment-jsdom": "^30.0.4",
|
|
98
95
|
"mdi-material-ui": "^7.9.3",
|
|
99
|
-
"react": "19.
|
|
100
|
-
"react-dom": "19.
|
|
101
|
-
"react-hook-form": "^7.
|
|
96
|
+
"react": "19.2.4",
|
|
97
|
+
"react-dom": "19.2.4",
|
|
98
|
+
"react-hook-form": "^7.71.1",
|
|
102
99
|
"react-query": "^3.19.6",
|
|
103
|
-
"react-router": "^7.
|
|
104
|
-
"
|
|
105
|
-
"storybook": "^10.0.8",
|
|
100
|
+
"react-router": "^7.12.0",
|
|
101
|
+
"storybook": "^10.2.10",
|
|
106
102
|
"ts-jest": "^29.4.0",
|
|
107
103
|
"ts-loader": "^9.5.2",
|
|
108
|
-
"tsup": "
|
|
104
|
+
"tsup": "8.3.0",
|
|
109
105
|
"typescript": "^5.8.3",
|
|
110
|
-
"yalc": "^1.0.0-pre.53"
|
|
111
|
-
"yup": "^0.32.9"
|
|
106
|
+
"yalc": "^1.0.0-pre.53"
|
|
112
107
|
},
|
|
113
108
|
"peerDependencies": {
|
|
114
109
|
"@emotion/react": "^11.14.0",
|
|
115
110
|
"@emotion/styled": "^11.14.0",
|
|
116
111
|
"@mui/icons-material": "^7.3.2",
|
|
117
|
-
"@mui/lab": "^7.0.0-beta.17",
|
|
118
112
|
"@mui/material": "^7.3.2",
|
|
119
113
|
"@mui/x-data-grid": "^8.11.3",
|
|
120
114
|
"@mui/x-date-pickers": "^8.11.3",
|
|
121
115
|
"mdi-material-ui": "^7.9.3",
|
|
122
|
-
"react": "19.
|
|
123
|
-
"react-dom": "19.
|
|
124
|
-
"react-hook-form": "^7.
|
|
116
|
+
"react": "19.2.3",
|
|
117
|
+
"react-dom": "19.2.3",
|
|
118
|
+
"react-hook-form": "^7.71.1",
|
|
125
119
|
"react-query": "^3.19.6",
|
|
126
|
-
"react-router": "^7.
|
|
127
|
-
"yup": "^0.32.9"
|
|
120
|
+
"react-router": "^7.12.0"
|
|
128
121
|
}
|
|
129
122
|
}
|
package/dist/chunk-N3IUZVB7.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// src/utils/flattenTableFilters/flattenTableFilters.ts
|
|
2
|
-
var getFlattenedFiltersLabels = (filters, fieldName) => {
|
|
3
|
-
return filters.map((value) => {
|
|
4
|
-
if (typeof value === "object") {
|
|
5
|
-
return value[fieldName] ?? "";
|
|
6
|
-
}
|
|
7
|
-
return value;
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var getFlattenedFiltersIds = (filters) => Object.fromEntries(
|
|
11
|
-
Object.entries(filters).map(([id, values]) => [
|
|
12
|
-
id,
|
|
13
|
-
values.map((value) => typeof value === "object" ? value.id : value)
|
|
14
|
-
])
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
getFlattenedFiltersLabels,
|
|
19
|
-
getFlattenedFiltersIds
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=chunk-N3IUZVB7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/flattenTableFilters/flattenTableFilters.ts"],"sourcesContent":["import {\n HeaderFilterObject,\n HeaderFilters,\n} from '@/components/TableDesktop/TableDesktop';\n\nexport type FlattenedFilterIds = {\n [key: string]: (string | number)[];\n};\n\nexport const getFlattenedFiltersLabels = (\n filters: string[] | HeaderFilterObject[],\n fieldName: string,\n): (string | number)[] => {\n return filters.map((value: string | HeaderFilterObject) => {\n if (typeof value === 'object') {\n return value[fieldName] ?? '';\n }\n return value;\n });\n};\n\nexport const getFlattenedFiltersIds = (\n filters: HeaderFilters,\n): FlattenedFilterIds =>\n Object.fromEntries(\n Object.entries(filters).map(([id, values]) => [\n id,\n values.map((value) => (typeof value === 'object' ? value.id : value)),\n ]),\n );\n"],"mappings":";AASO,IAAM,4BAA4B,CACvC,SACA,cACwB;AACxB,SAAO,QAAQ,IAAI,CAAC,UAAuC;AACzD,QAAI,OAAO,UAAU,UAAU;AAC7B,aAAO,MAAM,SAAS,KAAK;AAAA,IAC7B;AACA,WAAO;AAAA,EACT,CAAC;AACH;AAEO,IAAM,yBAAyB,CACpC,YAEA,OAAO;AAAA,EACL,OAAO,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,MAAM,MAAM;AAAA,IAC5C;AAAA,IACA,OAAO,IAAI,CAAC,UAAW,OAAO,UAAU,WAAW,MAAM,KAAK,KAAM;AAAA,EACtE,CAAC;AACH;","names":[]}
|