@true-engineering/true-react-common-ui-kit 4.0.0-alpha32 → 4.0.0-alpha34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "4.0.0-alpha32",
3
+ "version": "4.0.0-alpha34",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -25,6 +25,9 @@
25
25
  "src",
26
26
  "dist"
27
27
  ],
28
+ "engines": {
29
+ "node": ">=22.0.0"
30
+ },
28
31
  "exports": {
29
32
  ".": {
30
33
  "require": "./dist/true-react-common-ui-kit.umd.cjs",
@@ -42,18 +45,18 @@
42
45
  "types-check": "tsc --noEmit"
43
46
  },
44
47
  "dependencies": {
45
- "@floating-ui/react": "0.27.13",
46
- "@true-engineering/true-react-platform-helpers": "0.4.4",
47
- "clsx": "1.2.1",
48
+ "@floating-ui/react": "^0.27.13",
49
+ "@true-engineering/true-react-platform-helpers": "^1.0.0",
50
+ "clsx": "^2.1.1",
48
51
  "country-flag-icons": "1.5.5",
49
- "date-fns": "4.1.0",
52
+ "date-fns": "^4.1.0",
50
53
  "filesize": "10.1.1",
51
54
  "hex-to-rgba": "2.0.1",
52
55
  "jss": "10.10.0",
53
56
  "lodash-es": "4.17.21",
54
- "react": "18.2.0",
57
+ "react": "^18.2.0",
55
58
  "react-datepicker": "8.4.0",
56
- "react-dom": "18.2.0",
59
+ "react-dom": "^18.2.0",
57
60
  "react-input-mask": "3.0.0-alpha.2",
58
61
  "react-jss": "10.10.0",
59
62
  "react-overlays": "5.2.1",
@@ -1,4 +1,4 @@
1
- import { isObject } from 'lodash-es';
1
+ import { isObject } from '@true-engineering/true-react-platform-helpers';
2
2
  import { IIcon } from '../Icon';
3
3
  import { IControlWrapperIcon } from './types';
4
4
 
@@ -1,4 +1,3 @@
1
- import cloneDeep from 'lodash-es/cloneDeep';
2
1
  import { colors, createThemedStyles, ITweakStyles } from '../../../../theme';
3
2
  import { IButtonStyles } from '../../../Button';
4
3
  import { IInputStyles } from '../../../Input';
@@ -52,7 +51,7 @@ export const inputStyles: IInputStyles = {
52
51
  },
53
52
  };
54
53
 
55
- export const clearButtonStyles = cloneDeep(innerTextButtonStyles);
54
+ export const clearButtonStyles = structuredClone(innerTextButtonStyles);
56
55
 
57
56
  export type IFilterIntervalStyles = ITweakStyles<
58
57
  typeof useStyles,
@@ -1,4 +1,3 @@
1
- import cloneDeep from 'lodash-es/cloneDeep';
2
1
  import { animations, colors, createThemedStyles, helpers, ITweakStyles } from '../../../../theme';
3
2
  import { IButtonStyles } from '../../../Button';
4
3
  import { ISearchInputStyles } from '../../../SearchInput';
@@ -132,7 +131,7 @@ export const searchInputStyles: ISearchInputStyles = {
132
131
  },
133
132
  };
134
133
 
135
- export const clearButtonStyles = cloneDeep(innerTextButtonStyles);
134
+ export const clearButtonStyles = structuredClone(innerTextButtonStyles);
136
135
 
137
136
  export type IFilterSelectStyles = ITweakStyles<
138
137
  typeof useStyles,
@@ -1,4 +1,3 @@
1
- import cloneDeep from 'lodash-es/cloneDeep';
2
1
  import { colors, createThemedStyles, ITweakStyles } from '../../../../theme';
3
2
  import { IButtonStyles } from '../../../Button';
4
3
  import { IDatePickerStyles } from '../../../DatePicker';
@@ -33,7 +32,7 @@ export const useStyles = createThemedStyles('FilterWithDates', {
33
32
  datepicker: {},
34
33
  });
35
34
 
36
- export const clearButtonStyles = cloneDeep(innerTextButtonStyles);
35
+ export const clearButtonStyles = structuredClone(innerTextButtonStyles);
37
36
 
38
37
  export const backButtonStyles = innerTextButtonStyles;
39
38
 
@@ -1,4 +1,4 @@
1
- import merge from 'lodash-es/merge';
1
+ import { merge } from '@true-engineering/true-react-platform-helpers';
2
2
  import { DEFAULT_LOCALE, DEFAULT_SELECT_LOCALE, FilterLocales, SelectLocales } from './constants';
3
3
  import {
4
4
  type IFilterLocale,
@@ -12,13 +12,13 @@ export const getLocale = (
12
12
  key: IFilterLocaleKey = DEFAULT_LOCALE,
13
13
  custom?: IPartialFilterLocale,
14
14
  custom2?: IPartialFilterLocale,
15
- ): IFilterLocale => merge({}, FilterLocales[key], custom, custom2);
15
+ ): IFilterLocale => merge(FilterLocales[key], custom, custom2);
16
16
 
17
17
  export const getSelectLocale = (
18
18
  key: ISelectLocaleKey = DEFAULT_SELECT_LOCALE,
19
19
  custom?: Partial<ISelectLocale>,
20
20
  custom2?: Partial<ISelectLocale>,
21
- ): ISelectLocale => merge({}, SelectLocales[key], custom, custom2);
21
+ ): ISelectLocale => merge(SelectLocales[key], custom, custom2);
22
22
 
23
23
  export const sortValues = (arr: Array<number | undefined>): Array<number | undefined> =>
24
24
  arr.includes(undefined) ? arr : (arr as number[]).sort((a, b) => (a < b ? -1 : 1));
@@ -1,5 +1,6 @@
1
1
  export * from './FiltersPane';
2
2
  export type { IFiltersPaneStyles } from './FiltersPane.styles';
3
3
  export * from './types';
4
+ export { PERIODS, PERIODS_GETTERS } from './constants';
4
5
  // TODO : подумать над тем чтобы вынести это все наружу
5
6
  export * from './components';
@@ -48,7 +48,7 @@ export type MultiSelectOptionType<Value> = Value | undefined extends
48
48
  : unknown;
49
49
 
50
50
  export interface IConfigItemBasicBase<Value> {
51
- name: string;
51
+ name: ReactNode;
52
52
  isInline?: boolean;
53
53
  isClearable?: boolean;
54
54
  requiredFilledFilters?: string[];
@@ -59,6 +59,7 @@ export interface IConfigItemBasicBase<Value> {
59
59
 
60
60
  export type IIntervalConfigItem<Value> = IConfigItemBasicBase<Value> & {
61
61
  type: 'interval';
62
+ name: string;
62
63
  } & Omit<IFilterIntervalProps, 'value' | 'onChange' | 'labelName'>;
63
64
 
64
65
  export interface IBooleanConfigItem<Value> extends IConfigItemBasicBase<Value> {
@@ -1,4 +1,4 @@
1
- import merge from 'lodash-es/merge';
1
+ import { merge } from '@true-engineering/true-react-platform-helpers';
2
2
  import { DEFAULT_LOCALE, MultiSelectLocales } from './constants';
3
3
  import type { IMultiSelectLocale, IMultiSelectLocaleKey } from './types';
4
4
 
@@ -8,4 +8,4 @@ export const getLocale = (
8
8
  key: IMultiSelectLocaleKey = DEFAULT_LOCALE,
9
9
  custom?: Partial<IMultiSelectLocale>,
10
10
  custom2?: Partial<IMultiSelectLocale>,
11
- ): IMultiSelectLocale => merge({}, MultiSelectLocales[key], custom, custom2);
11
+ ): IMultiSelectLocale => merge(MultiSelectLocales[key], custom, custom2);
@@ -1,6 +1,6 @@
1
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
2
1
  import { IExtendableProps } from '../../types';
3
2
 
3
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
4
4
  export interface ITextAreaCounterPositions extends IExtendableProps<'default'> {}
5
5
 
6
6
  export type ITextAreaCounterPosition = keyof ITextAreaCounterPositions;