@alfalab/core-components-table 4.0.7 → 4.0.8
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/component.d.ts +21 -22
- package/components/pagination/Component.d.ts +1 -1
- package/components/pagination/Component.js.map +1 -1
- package/components/pagination/index.css +8 -8
- package/components/pagination/index.module.css.js +1 -1
- package/components/pagination/index.module.css.js.map +1 -1
- package/components/pagination/select-field/index.css +3 -3
- package/components/pagination/select-field/index.module.css.js +1 -1
- package/components/pagination/select-field/index.module.css.js.map +1 -1
- package/components/table/Component.d.ts +7 -7
- package/components/table/index.css +6 -6
- package/components/table/index.module.css.js +1 -1
- package/components/table/index.module.css.js.map +1 -1
- package/components/table/utils.js.map +1 -1
- package/components/table-context/index.d.ts +2 -2
- package/components/tbody/Component.d.ts +3 -3
- package/components/tbody/index.css +1 -1
- package/components/tbody/index.module.css.js +1 -1
- package/components/tbody/index.module.css.js.map +1 -1
- package/components/tcell/Component.d.ts +1 -1
- package/components/tcell/index.css +5 -5
- package/components/tcell/index.module.css.js +1 -1
- package/components/tcell/index.module.css.js.map +1 -1
- package/components/texpandable-row/Component.d.ts +9 -9
- package/components/texpandable-row/Component.js.map +1 -1
- package/components/texpandable-row/index.css +4 -4
- package/components/texpandable-row/index.module.css.js +1 -1
- package/components/texpandable-row/index.module.css.js.map +1 -1
- package/components/thead/Component.d.ts +1 -1
- package/components/thead/index.css +5 -5
- package/components/thead/index.module.css.js +1 -1
- package/components/thead/index.module.css.js.map +1 -1
- package/components/thead-cell/Component.d.ts +1 -1
- package/components/thead-cell/index.css +8 -8
- package/components/thead-cell/index.module.css.js +1 -1
- package/components/thead-cell/index.module.css.js.map +1 -1
- package/components/trow/Component.d.ts +6 -6
- package/components/trow/index.css +7 -7
- package/components/trow/index.module.css.js +1 -1
- package/components/trow/index.module.css.js.map +1 -1
- package/components/tsortable-head-cell/Component.d.ts +1 -1
- package/components/tsortable-head-cell/index.css +7 -7
- package/components/tsortable-head-cell/index.module.css.js +1 -1
- package/components/tsortable-head-cell/index.module.css.js.map +1 -1
- package/cssm/component.d.ts +21 -22
- package/cssm/components/pagination/Component.d.ts +1 -1
- package/cssm/components/pagination/Component.js.map +1 -1
- package/cssm/components/table/Component.d.ts +7 -7
- package/cssm/components/table/utils.js.map +1 -1
- package/cssm/components/table-context/index.d.ts +2 -2
- package/cssm/components/tbody/Component.d.ts +3 -3
- package/cssm/components/tcell/Component.d.ts +1 -1
- package/cssm/components/texpandable-row/Component.d.ts +9 -9
- package/cssm/components/texpandable-row/Component.js.map +1 -1
- package/cssm/components/thead/Component.d.ts +1 -1
- package/cssm/components/thead-cell/Component.d.ts +1 -1
- package/cssm/components/trow/Component.d.ts +6 -6
- package/cssm/components/tsortable-head-cell/Component.d.ts +1 -1
- package/cssm/typings.d.ts +1 -1
- package/cssm/utils.d.ts +4 -1
- package/cssm/utils.js +1 -1
- package/cssm/utils.js.map +1 -1
- package/esm/component.d.ts +21 -22
- package/esm/components/pagination/Component.d.ts +1 -1
- package/esm/components/pagination/Component.js.map +1 -1
- package/esm/components/pagination/index.css +8 -8
- package/esm/components/pagination/index.module.css.js +1 -1
- package/esm/components/pagination/index.module.css.js.map +1 -1
- package/esm/components/pagination/select-field/index.css +3 -3
- package/esm/components/pagination/select-field/index.module.css.js +1 -1
- package/esm/components/pagination/select-field/index.module.css.js.map +1 -1
- package/esm/components/table/Component.d.ts +7 -7
- package/esm/components/table/index.css +6 -6
- package/esm/components/table/index.module.css.js +1 -1
- package/esm/components/table/index.module.css.js.map +1 -1
- package/esm/components/table/utils.js.map +1 -1
- package/esm/components/table-context/index.d.ts +2 -2
- package/esm/components/tbody/Component.d.ts +3 -3
- package/esm/components/tbody/index.css +1 -1
- package/esm/components/tbody/index.module.css.js +1 -1
- package/esm/components/tbody/index.module.css.js.map +1 -1
- package/esm/components/tcell/Component.d.ts +1 -1
- package/esm/components/tcell/index.css +5 -5
- package/esm/components/tcell/index.module.css.js +1 -1
- package/esm/components/tcell/index.module.css.js.map +1 -1
- package/esm/components/texpandable-row/Component.d.ts +9 -9
- package/esm/components/texpandable-row/Component.js.map +1 -1
- package/esm/components/texpandable-row/index.css +4 -4
- package/esm/components/texpandable-row/index.module.css.js +1 -1
- package/esm/components/texpandable-row/index.module.css.js.map +1 -1
- package/esm/components/thead/Component.d.ts +1 -1
- package/esm/components/thead/index.css +5 -5
- package/esm/components/thead/index.module.css.js +1 -1
- package/esm/components/thead/index.module.css.js.map +1 -1
- package/esm/components/thead-cell/Component.d.ts +1 -1
- package/esm/components/thead-cell/index.css +8 -8
- package/esm/components/thead-cell/index.module.css.js +1 -1
- package/esm/components/thead-cell/index.module.css.js.map +1 -1
- package/esm/components/trow/Component.d.ts +6 -6
- package/esm/components/trow/index.css +7 -7
- package/esm/components/trow/index.module.css.js +1 -1
- package/esm/components/trow/index.module.css.js.map +1 -1
- package/esm/components/tsortable-head-cell/Component.d.ts +1 -1
- package/esm/components/tsortable-head-cell/index.css +7 -7
- package/esm/components/tsortable-head-cell/index.module.css.js +1 -1
- package/esm/components/tsortable-head-cell/index.module.css.js.map +1 -1
- package/esm/typings.d.ts +1 -1
- package/esm/utils.d.ts +4 -1
- package/esm/utils.js +1 -1
- package/esm/utils.js.map +1 -1
- package/modern/component.d.ts +21 -22
- package/modern/components/pagination/Component.d.ts +1 -1
- package/modern/components/pagination/Component.js.map +1 -1
- package/modern/components/pagination/index.css +8 -8
- package/modern/components/pagination/index.module.css.js +1 -1
- package/modern/components/pagination/index.module.css.js.map +1 -1
- package/modern/components/pagination/select-field/index.css +3 -3
- package/modern/components/pagination/select-field/index.module.css.js +1 -1
- package/modern/components/pagination/select-field/index.module.css.js.map +1 -1
- package/modern/components/table/Component.d.ts +7 -7
- package/modern/components/table/index.css +6 -6
- package/modern/components/table/index.module.css.js +1 -1
- package/modern/components/table/index.module.css.js.map +1 -1
- package/modern/components/table/utils.js.map +1 -1
- package/modern/components/table-context/index.d.ts +2 -2
- package/modern/components/tbody/Component.d.ts +3 -3
- package/modern/components/tbody/index.css +1 -1
- package/modern/components/tbody/index.module.css.js +1 -1
- package/modern/components/tbody/index.module.css.js.map +1 -1
- package/modern/components/tcell/Component.d.ts +1 -1
- package/modern/components/tcell/index.css +5 -5
- package/modern/components/tcell/index.module.css.js +1 -1
- package/modern/components/tcell/index.module.css.js.map +1 -1
- package/modern/components/texpandable-row/Component.d.ts +9 -9
- package/modern/components/texpandable-row/Component.js.map +1 -1
- package/modern/components/texpandable-row/index.css +4 -4
- package/modern/components/texpandable-row/index.module.css.js +1 -1
- package/modern/components/texpandable-row/index.module.css.js.map +1 -1
- package/modern/components/thead/Component.d.ts +1 -1
- package/modern/components/thead/index.css +5 -5
- package/modern/components/thead/index.module.css.js +1 -1
- package/modern/components/thead/index.module.css.js.map +1 -1
- package/modern/components/thead-cell/Component.d.ts +1 -1
- package/modern/components/thead-cell/index.css +8 -8
- package/modern/components/thead-cell/index.module.css.js +1 -1
- package/modern/components/thead-cell/index.module.css.js.map +1 -1
- package/modern/components/trow/Component.d.ts +6 -6
- package/modern/components/trow/index.css +7 -7
- package/modern/components/trow/index.module.css.js +1 -1
- package/modern/components/trow/index.module.css.js.map +1 -1
- package/modern/components/tsortable-head-cell/Component.d.ts +1 -1
- package/modern/components/tsortable-head-cell/index.css +7 -7
- package/modern/components/tsortable-head-cell/index.module.css.js +1 -1
- package/modern/components/tsortable-head-cell/index.module.css.js.map +1 -1
- package/modern/typings.d.ts +1 -1
- package/modern/utils.d.ts +4 -1
- package/modern/utils.js +1 -1
- package/modern/utils.js.map +1 -1
- package/moderncssm/component.d.ts +21 -22
- package/moderncssm/components/pagination/Component.d.ts +1 -1
- package/moderncssm/components/pagination/Component.js.map +1 -1
- package/moderncssm/components/table/Component.d.ts +7 -7
- package/moderncssm/components/table/utils.js.map +1 -1
- package/moderncssm/components/table-context/index.d.ts +2 -2
- package/moderncssm/components/tbody/Component.d.ts +3 -3
- package/moderncssm/components/tcell/Component.d.ts +1 -1
- package/moderncssm/components/texpandable-row/Component.d.ts +9 -9
- package/moderncssm/components/texpandable-row/Component.js.map +1 -1
- package/moderncssm/components/thead/Component.d.ts +1 -1
- package/moderncssm/components/thead-cell/Component.d.ts +1 -1
- package/moderncssm/components/trow/Component.d.ts +6 -6
- package/moderncssm/components/tsortable-head-cell/Component.d.ts +1 -1
- package/moderncssm/typings.d.ts +1 -1
- package/moderncssm/utils.d.ts +4 -1
- package/moderncssm/utils.js +1 -1
- package/moderncssm/utils.js.map +1 -1
- package/package.json +5 -5
- package/src/components/pagination/index.module.css +1 -1
- package/src/components/pagination/select-field/index.module.css +1 -1
- package/src/components/table/index.module.css +1 -1
- package/src/components/tbody/index.module.css +1 -1
- package/src/components/tcell/index.module.css +1 -1
- package/src/components/texpandable-row/index.module.css +1 -1
- package/src/components/thead/index.module.css +1 -1
- package/src/components/thead-cell/index.module.css +1 -1
- package/src/components/trow/index.module.css +1 -1
- package/src/components/tsortable-head-cell/index.module.css +1 -1
- package/src/utils.ts +8 -2
- package/typings.d.ts +1 -1
- package/utils.d.ts +4 -1
- package/utils.js +1 -1
- package/utils.js.map +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
2
|
import { type TextAlignProperty } from '../../typings';
|
|
3
|
-
export
|
|
3
|
+
export type ColumnConfiguration = {
|
|
4
4
|
width?: string | number;
|
|
5
5
|
textAlign?: TextAlignProperty;
|
|
6
6
|
hidden?: boolean;
|
|
7
7
|
index: number;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type TableContextType = {
|
|
10
10
|
columnsConfiguration: ColumnConfiguration[];
|
|
11
11
|
stickyHeader: boolean;
|
|
12
12
|
compactView: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type HTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
|
|
3
3
|
/**
|
|
4
4
|
* Дополнительный класс
|
|
5
5
|
*/
|
|
@@ -13,9 +13,9 @@ export declare const TBody: React.ForwardRefExoticComponent<React.HTMLAttributes
|
|
|
13
13
|
/**
|
|
14
14
|
* Дополнительный класс
|
|
15
15
|
*/
|
|
16
|
-
className?: string
|
|
16
|
+
className?: string;
|
|
17
17
|
/**
|
|
18
18
|
* Идентификатор для систем автоматизированного тестирования
|
|
19
19
|
*/
|
|
20
|
-
dataTestId?: string
|
|
20
|
+
dataTestId?: string;
|
|
21
21
|
} & React.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type ReactNode, type Ref } from 'react';
|
|
2
2
|
import { type TRowProps } from '../trow';
|
|
3
|
-
export
|
|
3
|
+
export type TExpandableRowProps = TRowProps & {
|
|
4
4
|
defaultExpanded?: boolean;
|
|
5
5
|
expanded?: boolean;
|
|
6
6
|
onToggle?: (expanded: boolean) => void;
|
|
@@ -9,14 +9,14 @@ export declare type TExpandableRowProps = TRowProps & {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const TExpandableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
|
|
11
11
|
children: React.ReactElement<import("..").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("..").TCellProps) => React.JSX.Element | null> | React.ReactElement<import("..").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("..").TCellProps) => React.JSX.Element | null>[];
|
|
12
|
-
className?: string
|
|
13
|
-
selected?: boolean
|
|
14
|
-
withoutBorder?: boolean
|
|
15
|
-
dataTestId?: string
|
|
12
|
+
className?: string;
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
withoutBorder?: boolean;
|
|
15
|
+
dataTestId?: string;
|
|
16
16
|
} & {
|
|
17
|
-
defaultExpanded?: boolean
|
|
18
|
-
expanded?: boolean
|
|
19
|
-
onToggle?: (
|
|
17
|
+
defaultExpanded?: boolean;
|
|
18
|
+
expanded?: boolean;
|
|
19
|
+
onToggle?: (expanded: boolean) => void;
|
|
20
20
|
renderContent: (expanded: boolean) => ReactNode;
|
|
21
|
-
rowRef?:
|
|
21
|
+
rowRef?: Ref<HTMLTableRowElement>;
|
|
22
22
|
} & React.RefAttributes<HTMLTableRowElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/texpandable-row/Component.tsx"],"sourcesContent":["import React, { forwardRef, type ReactNode, type Ref, useState } from 'react';\nimport cn from 'classnames';\n\nimport { TRow, type TRowProps } from '../trow';\n\nimport styles from './index.module.css';\n\nexport type TExpandableRowProps = TRowProps & {\n defaultExpanded?: boolean;\n\n expanded?: boolean;\n\n onToggle?: (expanded: boolean) => void;\n\n renderContent: (expanded: boolean) => ReactNode;\n\n rowRef?: Ref<HTMLTableRowElement>;\n};\n\nexport const TExpandableRow = forwardRef<HTMLTableRowElement, TExpandableRowProps>(\n (\n {\n className,\n selected,\n expanded,\n defaultExpanded = false,\n onToggle = () => null,\n renderContent = () => null,\n rowRef,\n ...restProps\n }: TExpandableRowProps,\n ref,\n ) => {\n const [expandedState, setExpandedState] = useState<boolean>(defaultExpanded);\n\n const uncontrolled = expanded === undefined;\n\n const isExpanded = uncontrolled ? expandedState : expanded;\n\n const handleToggle = () => {\n if (uncontrolled) {\n setExpandedState(!isExpanded);\n }\n\n onToggle(isExpanded);\n };\n\n return (\n <React.Fragment>\n <TRow\n className={cn(styles.row, className, {\n [styles.selected]: selected,\n [styles.expanded]: isExpanded,\n })}\n selected={selected}\n onClick={handleToggle}\n ref={rowRef}\n {...restProps}\n />\n\n <tr ref={ref} className={cn(styles.expandable, { [styles.expanded]: isExpanded })}>\n {renderContent(isExpanded)}\n </tr>\n </React.Fragment>\n );\n },\n);\n\nTExpandableRow.displayName = 'TExpandableRow';\n"],"names":[],"mappings":";;;;;AAmBa,MAAA,cAAc,GAAG,UAAU,CACpC,CACI,EACI,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,GAAG,KAAK,EACvB,QAAQ,GAAG,MAAM,IAAI,EACrB,aAAa,GAAG,MAAM,IAAI,EAC1B,MAAM,EACN,GAAG,SAAS,EACM,EACtB,GAAG,KACH;IACA,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAU,eAAe,CAAC;AAE5E,IAAA,MAAM,YAAY,GAAG,QAAQ,KAAK,SAAS;IAE3C,MAAM,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ;IAE1D,MAAM,YAAY,GAAG,MAAK;
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/texpandable-row/Component.tsx"],"sourcesContent":["import React, { forwardRef, type ReactNode, type Ref, useState } from 'react';\nimport cn from 'classnames';\n\nimport { TRow, type TRowProps } from '../trow';\n\nimport styles from './index.module.css';\n\nexport type TExpandableRowProps = TRowProps & {\n defaultExpanded?: boolean;\n\n expanded?: boolean;\n\n onToggle?: (expanded: boolean) => void;\n\n renderContent: (expanded: boolean) => ReactNode;\n\n rowRef?: Ref<HTMLTableRowElement>;\n};\n\nexport const TExpandableRow = forwardRef<HTMLTableRowElement, TExpandableRowProps>(\n (\n {\n className,\n selected,\n expanded,\n defaultExpanded = false,\n onToggle = () => null,\n renderContent = () => null,\n rowRef,\n ...restProps\n }: TExpandableRowProps,\n ref,\n ) => {\n const [expandedState, setExpandedState] = useState<boolean>(defaultExpanded);\n\n const uncontrolled = expanded === undefined;\n\n const isExpanded = uncontrolled ? expandedState : expanded;\n\n const handleToggle = () => {\n if (uncontrolled) {\n setExpandedState(!isExpanded);\n }\n\n onToggle(isExpanded);\n };\n\n return (\n <React.Fragment>\n <TRow\n className={cn(styles.row, className, {\n [styles.selected]: selected,\n [styles.expanded]: isExpanded,\n })}\n selected={selected}\n onClick={handleToggle}\n ref={rowRef}\n {...restProps}\n />\n\n <tr ref={ref} className={cn(styles.expandable, { [styles.expanded]: isExpanded })}>\n {renderContent(isExpanded)}\n </tr>\n </React.Fragment>\n );\n },\n);\n\nTExpandableRow.displayName = 'TExpandableRow';\n"],"names":[],"mappings":";;;;;AAmBa,MAAA,cAAc,GAAG,UAAU,CACpC,CACI,EACI,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,eAAe,GAAG,KAAK,EACvB,QAAQ,GAAG,MAAM,IAAI,EACrB,aAAa,GAAG,MAAM,IAAI,EAC1B,MAAM,EACN,GAAG,SAAS,EACM,EACtB,GAAG,KACH;IACA,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAU,eAAe,CAAC;AAE5E,IAAA,MAAM,YAAY,GAAG,QAAQ,KAAK,SAAS;IAE3C,MAAM,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ;IAE1D,MAAM,YAAY,GAAG,MAAK;QACtB,IAAI,YAAY,EAAE;AACd,YAAA,gBAAgB,CAAC,CAAC,UAAU,CAAC;;QAGjC,QAAQ,CAAC,UAAU,CAAC;AACxB,KAAC;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,IAAA;QACX,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,EAAA,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE;AACjC,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;AAC3B,gBAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU;AAChC,aAAA,CAAC,EACF,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,MAAM,EAAA,GACP,SAAS,EACf,CAAA;AAEF,QAAA,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU,EAAE,CAAC,EAAA,EAC5E,aAAa,CAAC,UAAU,CAAC,CACzB,CACQ;AAEzB,CAAC;AAGL,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type ThHTMLAttributes } from 'react';
|
|
2
2
|
import { type TextAlignProperty } from '../../typings';
|
|
3
|
-
export
|
|
3
|
+
export type THeadCellProps = ThHTMLAttributes<HTMLHeadingElement> & {
|
|
4
4
|
/**
|
|
5
5
|
* Дополнительный класс
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type HTMLAttributes } from 'react';
|
|
2
2
|
import { type TCell, type TCellProps } from '../tcell';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type TCellElement = React.ReactElement<TCellProps, typeof TCell>;
|
|
4
|
+
export type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
|
|
5
5
|
/**
|
|
6
6
|
* Компоненты ячеек
|
|
7
7
|
*/
|
|
@@ -31,18 +31,18 @@ export declare const TRow: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
31
31
|
/**
|
|
32
32
|
* Дополнительный класс
|
|
33
33
|
*/
|
|
34
|
-
className?: string
|
|
34
|
+
className?: string;
|
|
35
35
|
/**
|
|
36
36
|
* Стиль выбранной строки
|
|
37
37
|
*/
|
|
38
|
-
selected?: boolean
|
|
38
|
+
selected?: boolean;
|
|
39
39
|
/**
|
|
40
40
|
* Убирает нижнюю границу
|
|
41
41
|
*/
|
|
42
|
-
withoutBorder?: boolean
|
|
42
|
+
withoutBorder?: boolean;
|
|
43
43
|
/**
|
|
44
44
|
* Идентификатор для систем автоматизированного тестирования
|
|
45
45
|
*/
|
|
46
|
-
dataTestId?: string
|
|
46
|
+
dataTestId?: string;
|
|
47
47
|
} & React.RefAttributes<HTMLTableRowElement>>;
|
|
48
48
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type THeadCellProps } from '../thead-cell';
|
|
3
|
-
export
|
|
3
|
+
export type TSortableHeadCellProps = THeadCellProps & {
|
|
4
4
|
isSortedDesc?: boolean;
|
|
5
5
|
defaultIsSortedDesc?: boolean;
|
|
6
6
|
onSort?: () => void;
|
package/moderncssm/typings.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type TextAlignProperty = 'center' | 'end' | 'justify' | 'left' | 'match-parent' | 'right' | 'start';
|
package/moderncssm/utils.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface EmptyProps {
|
|
3
|
+
}
|
|
4
|
+
export declare function isChildInstanceOf<P extends EmptyProps>(child: React.ReactElement, Component: React.ComponentType<P>): boolean;
|
|
5
|
+
export {};
|
package/moderncssm/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
function isChildInstanceOf(child, Component) {
|
|
4
4
|
// мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304
|
|
5
|
-
return child.type === React.createElement(Component).type;
|
|
5
|
+
return child.type === React.createElement(Component, {}).type;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export { isChildInstanceOf };
|
package/moderncssm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import React from 'react';\n\nexport function isChildInstanceOf<P>(child: React.ReactElement
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import React from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface EmptyProps {}\n\nexport function isChildInstanceOf<P extends EmptyProps>(\n child: React.ReactElement,\n Component: React.ComponentType<P>,\n) {\n // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304\n return child.type === React.createElement(Component, {} as P).type;\n}\n"],"names":[],"mappings":";;AAKgB,SAAA,iBAAiB,CAC7B,KAAyB,EACzB,SAAiC,EAAA;;AAGjC,IAAA,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAO,CAAC,CAAC,IAAI;AACtE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-table",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"main": "index.js",
|
|
11
11
|
"module": "./esm/index.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@alfalab/core-components-button": "^13.1.
|
|
14
|
-
"@alfalab/core-components-pagination": "^4.0.
|
|
15
|
-
"@alfalab/core-components-select": "^19.1.
|
|
13
|
+
"@alfalab/core-components-button": "^13.1.1",
|
|
14
|
+
"@alfalab/core-components-pagination": "^4.0.3",
|
|
15
|
+
"@alfalab/core-components-select": "^19.1.1",
|
|
16
16
|
"classnames": "^2.5.1",
|
|
17
17
|
"tslib": "^2.4.0"
|
|
18
18
|
},
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"directory": "dist"
|
|
26
26
|
},
|
|
27
27
|
"themesVersion": "15.0.2",
|
|
28
|
-
"varsVersion": "11.0.
|
|
28
|
+
"varsVersion": "11.0.2"
|
|
29
29
|
}
|
package/src/utils.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
4
|
+
interface EmptyProps {}
|
|
5
|
+
|
|
6
|
+
export function isChildInstanceOf<P extends EmptyProps>(
|
|
7
|
+
child: React.ReactElement,
|
|
8
|
+
Component: React.ComponentType<P>,
|
|
9
|
+
) {
|
|
4
10
|
// мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304
|
|
5
|
-
return child.type === React.createElement(Component).type;
|
|
11
|
+
return child.type === React.createElement(Component, {} as P).type;
|
|
6
12
|
}
|
package/typings.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type TextAlignProperty = 'center' | 'end' | 'justify' | 'left' | 'match-parent' | 'right' | 'start';
|
package/utils.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface EmptyProps {
|
|
3
|
+
}
|
|
4
|
+
export declare function isChildInstanceOf<P extends EmptyProps>(child: React.ReactElement, Component: React.ComponentType<P>): boolean;
|
|
5
|
+
export {};
|
package/utils.js
CHANGED
|
@@ -10,7 +10,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
10
10
|
|
|
11
11
|
function isChildInstanceOf(child, Component) {
|
|
12
12
|
// мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304
|
|
13
|
-
return child.type === React__default.default.createElement(Component).type;
|
|
13
|
+
return child.type === React__default.default.createElement(Component, {}).type;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
exports.isChildInstanceOf = isChildInstanceOf;
|
package/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["src/utils.ts"],"sourcesContent":["import React from 'react';\n\nexport function isChildInstanceOf<P>(child: React.ReactElement
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["src/utils.ts"],"sourcesContent":["import React from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface EmptyProps {}\n\nexport function isChildInstanceOf<P extends EmptyProps>(\n child: React.ReactElement,\n Component: React.ComponentType<P>,\n) {\n // мы не можем полагаться на child.type === Component, см. https://github.com/gaearon/react-hot-loader/issues/304\n return child.type === React.createElement(Component, {} as P).type;\n}\n"],"names":["React"],"mappings":";;;;;;;;;;AAKgB,SAAA,iBAAiB,CAC7B,KAAyB,EACzB,SAAiC,EAAA;;AAGjC,IAAA,OAAO,KAAK,CAAC,IAAI,KAAKA,sBAAK,CAAC,aAAa,CAAC,SAAS,EAAE,EAAO,CAAC,CAAC,IAAI;AACtE;;;;"}
|