@pushwoosh/smart-components-kit 1.7.0 → 1.8.0
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/Table/components/DataTableSearchInput/DataTableSearchInput.js +2 -2
- package/Table/components/DataTableSortableCell/DataTableSortableCell.js +3 -1
- package/Table/components/DataTableSortableCell/types.d.ts +2 -0
- package/Table/components/ItemDetailLink/ItemDetailLink.d.ts +13 -3
- package/package.json +3 -3
|
@@ -14,14 +14,14 @@ export function DataTableSearchInput(props) {
|
|
|
14
14
|
return _jsx(SearchInput, {
|
|
15
15
|
...props,
|
|
16
16
|
value: inputValue,
|
|
17
|
-
"$onClear": () => {
|
|
17
|
+
"$onClear": inputValue ? () => {
|
|
18
18
|
setInputValue('');
|
|
19
19
|
context.onChangeParams({
|
|
20
20
|
...context.params,
|
|
21
21
|
search: '',
|
|
22
22
|
page: 1
|
|
23
23
|
});
|
|
24
|
-
},
|
|
24
|
+
} : undefined,
|
|
25
25
|
onChange: event => {
|
|
26
26
|
const value = event.target.value;
|
|
27
27
|
setInputValue(value);
|
|
@@ -5,6 +5,7 @@ import { DataTableContext } from '../../context';
|
|
|
5
5
|
export function DataTableSortableCell(props) {
|
|
6
6
|
const {
|
|
7
7
|
name,
|
|
8
|
+
isReversed,
|
|
8
9
|
children
|
|
9
10
|
} = props;
|
|
10
11
|
const {
|
|
@@ -14,11 +15,12 @@ export function DataTableSortableCell(props) {
|
|
|
14
15
|
return _jsx(SortButton, {
|
|
15
16
|
name: name,
|
|
16
17
|
order: params.order === name ? params.direction : null,
|
|
18
|
+
isReversed: isReversed,
|
|
17
19
|
onClick: sortParams => {
|
|
18
20
|
onChangeParams({
|
|
19
21
|
...params,
|
|
20
22
|
order: sortParams.name,
|
|
21
|
-
direction: sortParams.order || 'asc',
|
|
23
|
+
direction: sortParams.order || (isReversed ? 'desc' : 'asc'),
|
|
22
24
|
page: 1
|
|
23
25
|
});
|
|
24
26
|
},
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import { type ComponentProps } from 'react';
|
|
1
|
+
import { type ComponentProps, type ComponentType, type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
declare const StyledItemDetailLink: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "style"> & {
|
|
3
3
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
4
4
|
}> & string;
|
|
5
|
-
|
|
5
|
+
type ItemDetailLinkProps = ComponentProps<typeof StyledItemDetailLink> & {
|
|
6
6
|
withChevron?: boolean;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export declare function ItemDetailLink<AS extends keyof JSX.IntrinsicElements>(props: JSX.IntrinsicElements[AS] & {
|
|
9
|
+
as: AS;
|
|
10
|
+
withChevron?: boolean;
|
|
11
|
+
}): ReactElement;
|
|
12
|
+
export declare function ItemDetailLink<OuterProps extends object>(props: OuterProps & {
|
|
13
|
+
as: ComponentType<OuterProps>;
|
|
14
|
+
withChevron?: boolean;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}): ReactElement;
|
|
17
|
+
export declare function ItemDetailLink(props: ItemDetailLinkProps): ReactElement;
|
|
8
18
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/smart-components-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Stateful, data-connected React components shared by Pushwoosh micro-frontends",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@floating-ui/react-dom": "^2.1.2",
|
|
20
|
-
"@pushwoosh/dumb-components": "^2.10.
|
|
20
|
+
"@pushwoosh/dumb-components": "^2.10.1",
|
|
21
21
|
"@pushwoosh/kit-constants": "^2.1.1",
|
|
22
22
|
"@pushwoosh/kit-helpers": "^4.13.0",
|
|
23
|
-
"@pushwoosh/kit-icons": "^2.3.
|
|
23
|
+
"@pushwoosh/kit-icons": "^2.3.10",
|
|
24
24
|
"@pushwoosh/kit-typography": "^1.9.0",
|
|
25
25
|
"@pushwoosh/rpc-v2-http-api-data": "^0.2.389",
|
|
26
26
|
"@pushwoosh/spa-context": "^1.8.1",
|