@tsed/react-formio 1.10.14 → 1.11.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.
- package/dist/components/card/card.component.d.ts +2 -1
- package/dist/components/loader/loader.component.d.ts +3 -3
- package/dist/components/loader/loader.stories.d.ts +15 -0
- package/dist/components/pagination/pagination.component.spec.d.ts +1 -0
- package/dist/components/pagination/pagination.stories.d.ts +0 -27
- package/dist/components/table/filters/selectColumnFilter.component.spec.d.ts +1 -0
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +10 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -4
- package/src/components/card/card.component.tsx +1 -0
- package/src/components/loader/loader.component.spec.tsx +7 -6
- package/src/components/loader/loader.component.tsx +3 -3
- package/src/components/loader/loader.stories.tsx +17 -0
- package/src/components/pagination/pagination.component.spec.tsx +137 -0
- package/src/components/pagination/pagination.component.tsx +2 -1
- package/src/components/pagination/pagination.stories.tsx +13 -29
- package/src/components/table/filters/selectColumnFilter.component.spec.tsx +54 -0
- package/src/components/table/filters/selectColumnFilter.component.tsx +8 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import PropTypes from "prop-types";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
3
|
export interface LoaderProps {
|
|
4
4
|
isActive?: boolean;
|
|
5
5
|
color?: string;
|
|
6
6
|
icon?: string;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function Loader({ isActive, color, icon, className }: LoaderProps): JSX.Element;
|
|
9
|
+
export declare function Loader({ isActive, color, icon, className }: PropsWithChildren<LoaderProps>): JSX.Element;
|
|
10
10
|
export declare namespace Loader {
|
|
11
11
|
var propTypes: {
|
|
12
12
|
isActive: PropTypes.Requireable<boolean>;
|
|
13
|
-
icon: PropTypes.Requireable<
|
|
13
|
+
icon: PropTypes.Requireable<string>;
|
|
14
14
|
color: PropTypes.Requireable<string>;
|
|
15
15
|
className: PropTypes.Requireable<string>;
|
|
16
16
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Loader } from "./loader.component";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Loader;
|
|
6
|
+
argTypes: {};
|
|
7
|
+
parameters: {};
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Sandbox: {
|
|
11
|
+
(args: any): JSX.Element;
|
|
12
|
+
args: {
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,33 +3,6 @@ import { Pagination } from "./pagination.component";
|
|
|
3
3
|
declare const _default: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: typeof Pagination;
|
|
6
|
-
argTypes: {
|
|
7
|
-
pageSizes: {
|
|
8
|
-
control: {
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
pageCount: {
|
|
13
|
-
control: {
|
|
14
|
-
type: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
pageIndex: {
|
|
18
|
-
control: {
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
canPreviousPage: {
|
|
23
|
-
control: {
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
canNextPage: {
|
|
28
|
-
control: {
|
|
29
|
-
type: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
6
|
parameters: {};
|
|
34
7
|
};
|
|
35
8
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/extend-expect";
|
package/dist/index.js
CHANGED
|
@@ -1857,6 +1857,7 @@ function PaginationButton(props) {
|
|
|
1857
1857
|
otherProps = _objectWithoutPropertiesLoose(props, ["component", "children", "disabled", "active"]);
|
|
1858
1858
|
|
|
1859
1859
|
return React__default['default'].createElement(Component, Object.assign({}, otherProps, {
|
|
1860
|
+
"data-testid": 'pagination-button',
|
|
1860
1861
|
disabled: disabled,
|
|
1861
1862
|
className: classnames("page-link", disabled ? "disabled" : "", active ? "" : "", props.className)
|
|
1862
1863
|
}), children);
|
|
@@ -1872,7 +1873,8 @@ function Pagination(props) {
|
|
|
1872
1873
|
nextPage = props.nextPage,
|
|
1873
1874
|
canNextPage = props.canNextPage,
|
|
1874
1875
|
pageCount = props.pageCount,
|
|
1875
|
-
pageIndex = props.pageIndex,
|
|
1876
|
+
_props$pageIndex = props.pageIndex,
|
|
1877
|
+
pageIndex = _props$pageIndex === void 0 ? 1 : _props$pageIndex,
|
|
1876
1878
|
pageOptions = props.pageOptions,
|
|
1877
1879
|
pageSize = props.pageSize,
|
|
1878
1880
|
setPageSize = props.setPageSize,
|
|
@@ -3892,10 +3894,21 @@ function FormSettings(props) {
|
|
|
3892
3894
|
|
|
3893
3895
|
function SelectColumnFilter(_ref) {
|
|
3894
3896
|
var column = _ref.column;
|
|
3895
|
-
var
|
|
3897
|
+
var id = column.id,
|
|
3898
|
+
preFilteredRows = column.preFilteredRows,
|
|
3899
|
+
filterValue = column.filterValue,
|
|
3896
3900
|
setFilter = column.setFilter;
|
|
3897
|
-
var
|
|
3898
|
-
|
|
3901
|
+
var customChoices = column.choices;
|
|
3902
|
+
var choices = customChoices || [].concat(new Set(preFilteredRows.map(function (row) {
|
|
3903
|
+
return row.values[id];
|
|
3904
|
+
}))).filter(function (value) {
|
|
3905
|
+
return value;
|
|
3906
|
+
}).map(function (value) {
|
|
3907
|
+
return {
|
|
3908
|
+
label: value,
|
|
3909
|
+
value: value
|
|
3910
|
+
};
|
|
3911
|
+
});
|
|
3899
3912
|
return React__default['default'].createElement(Select, {
|
|
3900
3913
|
key: "filter-" + column.id,
|
|
3901
3914
|
name: "filter-" + column.id,
|
|
@@ -9656,7 +9669,7 @@ function Loader(_ref) {
|
|
|
9656
9669
|
}
|
|
9657
9670
|
Loader.propTypes = {
|
|
9658
9671
|
isActive: PropTypes__default['default'].bool,
|
|
9659
|
-
icon: PropTypes__default['default'].
|
|
9672
|
+
icon: PropTypes__default['default'].string,
|
|
9660
9673
|
color: PropTypes__default['default'].string,
|
|
9661
9674
|
className: PropTypes__default['default'].string
|
|
9662
9675
|
};
|