@ztwoint/z-ui 0.1.65 → 0.1.66
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/table/components/cell/avatar-cell.js +3 -2
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/table-provider.d.ts +0 -2
- package/dist/components/table/table-provider.js +20 -23
- package/dist/components/table/table.type.d.ts +0 -20
- package/dist/components/table-card/table-card.js +50 -49
- package/dist/components/table-card/table-card.type.d.ts +3 -1
- package/dist/components/{table/components/table-filter → table-filter}/close-filter-confirm/filter-confirmation-dialog.js +2 -2
- package/dist/{types/components/table/components → components}/table-filter/close-filter-confirm/filter-confirmation-dialog.utils.d.ts +1 -1
- package/dist/components/{table/components/table-filter → table-filter}/filters/checkbox.js +2 -2
- package/dist/components/{table/components/table-filter → table-filter}/filters/number/filter-input-field.js +1 -1
- package/dist/components/{table/components/table-filter → table-filter}/filters/text.js +3 -3
- package/dist/components/table-filter/index.d.ts +9 -0
- package/dist/components/table-filter/index.js +11 -0
- package/dist/{types/components/table/components → components}/table-filter/selected-filters-display/selected-filters-display.type.d.ts +2 -2
- package/dist/components/{table/components/table-filter → table-filter}/selected-filters-display/selected-filters-display.utils.d.ts +2 -2
- package/dist/components/table-filter/selected-filters-display/selected-filters-display.utils.js +30 -0
- package/dist/components/{table/components/table-filter → table-filter}/table-filter-button.js +71 -67
- package/dist/components/table-filter/table-filter-column-button.js +110 -0
- package/dist/components/table-filter/table-filter-provider.d.ts +3 -0
- package/dist/components/table-filter/table-filter-provider.js +27 -0
- package/dist/components/{table/components/table-filter → table-filter}/table-filter.context.d.ts +2 -4
- package/dist/components/{table/components/table-filter → table-filter}/table-filter.hook.d.ts +2 -4
- package/dist/components/{table/components/table-filter → table-filter}/table-filter.hook.js +23 -24
- package/dist/components/table-filter/table-filter.type.d.ts +44 -0
- package/dist/routes/table.d.ts +3 -0
- package/dist/types/components/table/index.d.ts +1 -1
- package/dist/types/components/table/table-provider.d.ts +0 -2
- package/dist/types/components/table/table.type.d.ts +0 -20
- package/dist/types/components/table-card/table-card.type.d.ts +4 -1
- package/dist/{components/table → types}/components/table-filter/close-filter-confirm/filter-confirmation-dialog.utils.d.ts +1 -1
- package/dist/types/components/table-filter/index.d.ts +9 -0
- package/dist/{components/table → types}/components/table-filter/selected-filters-display/selected-filters-display.type.d.ts +2 -2
- package/dist/types/components/{table/components/table-filter → table-filter}/selected-filters-display/selected-filters-display.utils.d.ts +2 -2
- package/dist/types/components/table-filter/table-filter-provider.d.ts +3 -0
- package/dist/types/components/{table/components/table-filter → table-filter}/table-filter.context.d.ts +3 -3
- package/dist/types/components/{table/components/table-filter → table-filter}/table-filter.hook.d.ts +2 -3
- package/dist/types/components/table-filter/table-filter.type.d.ts +44 -0
- package/dist/types/routes/table.d.ts +3 -0
- package/package.json +1 -1
- package/dist/components/table/components/table-filter/index.d.ts +0 -4
- package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.utils.js +0 -26
- package/dist/components/table/components/table-filter/table-filter-column-button.js +0 -108
- package/dist/components/table/components/table-filter/table-filter-provider.d.ts +0 -14
- package/dist/components/table/components/table-filter/table-filter-provider.js +0 -32
- package/dist/components/table/components/table-filter/table-filter.type.d.ts +0 -19
- package/dist/types/components/table/components/table-filter/index.d.ts +0 -4
- package/dist/types/components/table/components/table-filter/table-filter-provider.d.ts +0 -14
- package/dist/types/components/table/components/table-filter/table-filter.type.d.ts +0 -19
- /package/dist/components/{table/components/table-filter → table-filter}/close-filter-confirm/filter-confirmation-dialog.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/close-filter-confirm/filter-confirmation-dialog.utils.js +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/boolean.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/boolean.js +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/checkbox.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/index.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/number/filter-input-field.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/number/index.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/number/number.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/number/number.hook.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/number/number.hook.js +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/number/number.js +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/filters/text.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/selected-filters-display/index.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/selected-filters-display/selected-filters-display.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/selected-filters-display/selected-filters-display.js +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/table-filter-button.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/table-filter-column-button.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/table-filter-column-button.type.d.ts +0 -0
- /package/dist/components/{table/components/table-filter → table-filter}/table-filter.context.js +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/close-filter-confirm/filter-confirmation-dialog.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/boolean.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/checkbox.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/index.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/number/filter-input-field.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/number/index.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/number/number.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/number/number.hook.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/filters/text.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/selected-filters-display/index.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/selected-filters-display/selected-filters-display.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/table-filter-button.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/table-filter-column-button.d.ts +0 -0
- /package/dist/types/components/{table/components/table-filter → table-filter}/table-filter-column-button.type.d.ts +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FilterRule } from './table-filter.type';
|
|
3
|
+
import type { TableFilter as TableFilterType, FilterSchema } from './table-filter.type';
|
|
3
4
|
import { FilterComponentType } from './table-filter.type';
|
|
4
5
|
export interface TableFilterContextValue {
|
|
5
6
|
selectedColumn: string | null;
|
|
@@ -12,9 +13,8 @@ export interface TableFilterContextValue {
|
|
|
12
13
|
resetToAppliedFilters: () => void;
|
|
13
14
|
applyFilters: () => void;
|
|
14
15
|
hasActiveFilters: boolean;
|
|
15
|
-
filterableFields: TableSchema;
|
|
16
16
|
tempFilters: FilterRule[];
|
|
17
|
-
|
|
17
|
+
filterSchema: FilterSchema;
|
|
18
18
|
filter: TableFilterType;
|
|
19
19
|
filterComponents?: Record<string, FilterComponentType>;
|
|
20
20
|
}
|
package/dist/types/components/{table/components/table-filter → table-filter}/table-filter.hook.d.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableFilterProps } from './table-filter.type';
|
|
3
|
-
import { FilterRule } from '
|
|
4
|
-
declare const useTableFilter: ({ filter,
|
|
3
|
+
import { FilterRule } from './table-filter.type';
|
|
4
|
+
declare const useTableFilter: ({ filter, filterSchema }: TableFilterProps) => {
|
|
5
5
|
selectedColumn: string | null;
|
|
6
6
|
setSelectedColumn: React.Dispatch<React.SetStateAction<string | null>>;
|
|
7
7
|
getFilterForColumn: (columnKey: string) => FilterRule | undefined;
|
|
@@ -13,6 +13,5 @@ declare const useTableFilter: ({ filter, schema }: TableFilterProps) => {
|
|
|
13
13
|
applyFilters: () => void;
|
|
14
14
|
hasActiveFilters: boolean;
|
|
15
15
|
tempFilters: FilterRule[];
|
|
16
|
-
filterableFields: import("../../table.type").TableSchemaColumn[];
|
|
17
16
|
};
|
|
18
17
|
export default useTableFilter;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export type FilterCondition = 'contains' | 'notEqual' | 'equal' | '>' | '<' | '=' | '!=';
|
|
3
|
+
export type FilterRule = {
|
|
4
|
+
field: string;
|
|
5
|
+
condition?: string;
|
|
6
|
+
value: string | string[];
|
|
7
|
+
};
|
|
8
|
+
export type FilterOption = {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
total?: number;
|
|
12
|
+
};
|
|
13
|
+
export type FilterFieldType = 'string' | 'number' | 'boolean' | 'checkbox';
|
|
14
|
+
export type FilterSchemaField = {
|
|
15
|
+
filterKey: string;
|
|
16
|
+
title: string;
|
|
17
|
+
type: FilterFieldType;
|
|
18
|
+
options?: Record<string, number>;
|
|
19
|
+
};
|
|
20
|
+
export type FilterSchema = FilterSchemaField[];
|
|
21
|
+
export type TableFilter = {
|
|
22
|
+
value: FilterRule[];
|
|
23
|
+
onChange: (filters: FilterRule[]) => void;
|
|
24
|
+
};
|
|
25
|
+
export interface TableFilterProps {
|
|
26
|
+
filterSchema: FilterSchema;
|
|
27
|
+
filter: TableFilter;
|
|
28
|
+
filterComponents?: Record<string, FilterComponentType>;
|
|
29
|
+
}
|
|
30
|
+
export type FilterComponentProps = {
|
|
31
|
+
onChange: (input: {
|
|
32
|
+
condition?: string;
|
|
33
|
+
value?: string | string[];
|
|
34
|
+
}) => void;
|
|
35
|
+
value: {
|
|
36
|
+
condition?: string;
|
|
37
|
+
value: string | string[];
|
|
38
|
+
};
|
|
39
|
+
filterOptions?: FilterOption[];
|
|
40
|
+
};
|
|
41
|
+
export interface TableFilterProviderProps extends TableFilterProps {
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export type FilterComponentType = FC<FilterComponentProps>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { TableSchema } from '../components/table';
|
|
2
|
+
import type { FilterSchema } from '../components/table-filter/table-filter.type';
|
|
3
|
+
export declare const createFilterSchemaFromTableSchema: (tableSchema: TableSchema) => FilterSchema;
|
|
1
4
|
declare const TablePage: () => import("react/jsx-runtime").JSX.Element;
|
|
2
5
|
export default TablePage;
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { TableFilterProvider, TableFilter } from './table-filter-provider';
|
|
2
|
-
export { TableFilterButton } from './table-filter-button';
|
|
3
|
-
export { TableFilterColumnButton } from './table-filter-column-button';
|
|
4
|
-
export { useTableFilterContext } from './table-filter.context';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const o = (n, u) => {
|
|
2
|
-
if (!u || u.length === 0) return n.value !== "" ? 1 : 0;
|
|
3
|
-
if (Array.isArray(n.value)) {
|
|
4
|
-
const t = u.filter(
|
|
5
|
-
(r) => n.value.includes(r.value)
|
|
6
|
-
).reduce((r, a) => r + (a.total || 0), 0);
|
|
7
|
-
return t > 0 ? t : void 0;
|
|
8
|
-
} else {
|
|
9
|
-
const e = u.find((t) => t.value === n.value);
|
|
10
|
-
return e == null ? void 0 : e.total;
|
|
11
|
-
}
|
|
12
|
-
}, l = (n, u) => n.filter((e) => Array.isArray(e.value) ? e.value.length > 0 : e.value !== "").map((e) => {
|
|
13
|
-
const t = u.find((a) => a.key === e.field), r = o(e, t == null ? void 0 : t.filterOptions);
|
|
14
|
-
return {
|
|
15
|
-
field: e.field,
|
|
16
|
-
fieldTitle: (t == null ? void 0 : t.title) || e.field,
|
|
17
|
-
value: e.value,
|
|
18
|
-
condition: e.condition,
|
|
19
|
-
count: r
|
|
20
|
-
};
|
|
21
|
-
}), c = (n) => n.reduce((u, e) => u + (e.count || 1), 0);
|
|
22
|
-
export {
|
|
23
|
-
c as calculateTotalCount,
|
|
24
|
-
l as createFilterDisplayItems,
|
|
25
|
-
o as getFilterCount
|
|
26
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import * as m from "react";
|
|
3
|
-
import { Button as u } from "../../../button/button.js";
|
|
4
|
-
import { useTableFilterContext as K } from "./table-filter.context.js";
|
|
5
|
-
import U from "./filters/text.js";
|
|
6
|
-
import I from "./filters/boolean.js";
|
|
7
|
-
import P from "./filters/number/number.js";
|
|
8
|
-
import V from "./filters/checkbox.js";
|
|
9
|
-
import q from "../../../assets/icons/circle-check-filled.js";
|
|
10
|
-
import { useClickOutside as E } from "../../../../hooks/useClickOutside.js";
|
|
11
|
-
import { getFilterCount as G } from "./selected-filters-display/selected-filters-display.utils.js";
|
|
12
|
-
import { FilterConfirmationDialog as H } from "./close-filter-confirm/filter-confirmation-dialog.js";
|
|
13
|
-
import { hasUnsavedFilterChangesForColumn as b } from "./close-filter-confirm/filter-confirmation-dialog.utils.js";
|
|
14
|
-
const oe = ({ filterName: l }) => {
|
|
15
|
-
const [a, t] = m.useState(!1), [x, s] = m.useState(!1), h = m.useRef(null), {
|
|
16
|
-
getFilterForColumn: k,
|
|
17
|
-
hasAppliedFilterForColumn: y,
|
|
18
|
-
updateColumnFilter: C,
|
|
19
|
-
applyFilters: c,
|
|
20
|
-
resetToAppliedFilters: w,
|
|
21
|
-
schema: T,
|
|
22
|
-
filterComponents: d = {},
|
|
23
|
-
tempFilters: F,
|
|
24
|
-
filter: g
|
|
25
|
-
} = K();
|
|
26
|
-
E(h, () => {
|
|
27
|
-
b(l, F, g.value) && a ? s(!0) : t(!1);
|
|
28
|
-
});
|
|
29
|
-
const A = () => {
|
|
30
|
-
c(), t(!1);
|
|
31
|
-
}, O = () => {
|
|
32
|
-
s(!1), t(!1);
|
|
33
|
-
}, $ = () => {
|
|
34
|
-
w(), s(!1), t(!1);
|
|
35
|
-
}, R = () => {
|
|
36
|
-
s(!1);
|
|
37
|
-
}, e = T.find((r) => r.key === l);
|
|
38
|
-
if (!e)
|
|
39
|
-
return console.warn(`Column "${l}" not found in schema`), null;
|
|
40
|
-
if (e.filterable === !1)
|
|
41
|
-
return console.warn(`Column "${l}" is not filterable`), null;
|
|
42
|
-
const z = {
|
|
43
|
-
boolean: I,
|
|
44
|
-
text: U,
|
|
45
|
-
number: P,
|
|
46
|
-
checkbox: V
|
|
47
|
-
}, v = e.cellType && (d == null ? void 0 : d[e.cellType]) || z[e.cellType ?? "text"];
|
|
48
|
-
if (!v)
|
|
49
|
-
return console.warn(
|
|
50
|
-
`No filter component found for column "${e.key}" with cellType "${e.cellType}". Provide a custom filter component or use supported types: "text", "number", "boolean", "checkbox".`
|
|
51
|
-
), null;
|
|
52
|
-
const o = k(l), f = y(l), p = o ? G(o, e.filterOptions) : void 0, D = {
|
|
53
|
-
condition: (o == null ? void 0 : o.condition) || "",
|
|
54
|
-
value: (o == null ? void 0 : o.value) || ""
|
|
55
|
-
}, j = () => {
|
|
56
|
-
C(l, "", ""), c(), t(!1);
|
|
57
|
-
}, B = () => {
|
|
58
|
-
c(), t(!1);
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */ i("div", { className: "relative", ref: h, children: [
|
|
61
|
-
/* @__PURE__ */ n(
|
|
62
|
-
u,
|
|
63
|
-
{
|
|
64
|
-
onClick: () => {
|
|
65
|
-
t(!a);
|
|
66
|
-
},
|
|
67
|
-
variant: f ? "filled" : "stroke",
|
|
68
|
-
shade: f ? "brand" : "neutral",
|
|
69
|
-
size: "small",
|
|
70
|
-
children: /* @__PURE__ */ i("span", { className: "flex items-center gap-2", children: [
|
|
71
|
-
e.title,
|
|
72
|
-
f && /* @__PURE__ */ n(q, { className: "w-4 h-4 text-white flex-shrink-0" })
|
|
73
|
-
] })
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
a && /* @__PURE__ */ i("div", { className: "absolute top-full left-0 mt-2 w-80 bg-surface-neutral-default border border-stroke-solid-light rounded-2xl z-10 overflow-hidden shadow-lg", children: [
|
|
77
|
-
/* @__PURE__ */ n(
|
|
78
|
-
v,
|
|
79
|
-
{
|
|
80
|
-
value: D,
|
|
81
|
-
onChange: ({ condition: r, value: S }) => C(l, r, S),
|
|
82
|
-
filterOptions: e.filterOptions
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
!!p && /* @__PURE__ */ i("div", { className: "flex justify-between gap-2 p-3 border-t border-stroke-solid-medium", children: [
|
|
86
|
-
/* @__PURE__ */ n(u, { onClick: j, variant: "stroke", shade: "neutral", size: "small", children: "Clear All" }),
|
|
87
|
-
/* @__PURE__ */ n(u, { onClick: B, variant: "filled", shade: "neutral", size: "small", children: `Apply${p !== void 0 ? ` ${p}` : ""}` })
|
|
88
|
-
] })
|
|
89
|
-
] }),
|
|
90
|
-
x && /* @__PURE__ */ n(
|
|
91
|
-
H,
|
|
92
|
-
{
|
|
93
|
-
onClose: R,
|
|
94
|
-
onKeepChanges: O,
|
|
95
|
-
onRevertChanges: $,
|
|
96
|
-
onApplyChanges: A,
|
|
97
|
-
hasUnsavedChanges: b(
|
|
98
|
-
l,
|
|
99
|
-
F,
|
|
100
|
-
g.value
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
] });
|
|
105
|
-
};
|
|
106
|
-
export {
|
|
107
|
-
oe as TableFilterColumnButton
|
|
108
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TableFilterProps } from './table-filter.type';
|
|
2
|
-
import { TableFilterButton } from './table-filter-button';
|
|
3
|
-
import { TableFilterColumnButton } from './table-filter-column-button';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
export interface TableFilterProviderProps extends TableFilterProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const TableFilterProvider: React.FC<TableFilterProviderProps>;
|
|
9
|
-
interface TableFilterCompoundComponent extends React.FC<TableFilterProviderProps> {
|
|
10
|
-
FilterButton: typeof TableFilterButton;
|
|
11
|
-
FilterColumnButton: typeof TableFilterColumnButton;
|
|
12
|
-
}
|
|
13
|
-
export declare const TableFilter: TableFilterCompoundComponent;
|
|
14
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import m from "./table-filter.hook.js";
|
|
3
|
-
import { TableFilterContext as a } from "./table-filter.context.js";
|
|
4
|
-
import { TableFilterButton as F } from "./table-filter-button.js";
|
|
5
|
-
import { TableFilterColumnButton as b } from "./table-filter-column-button.js";
|
|
6
|
-
const p = ({
|
|
7
|
-
children: e,
|
|
8
|
-
filterComponents: l = {},
|
|
9
|
-
schema: o,
|
|
10
|
-
filter: t
|
|
11
|
-
}) => {
|
|
12
|
-
const n = m({
|
|
13
|
-
schema: o,
|
|
14
|
-
filter: t || { value: [], onChange: () => {
|
|
15
|
-
} }
|
|
16
|
-
});
|
|
17
|
-
if (!t)
|
|
18
|
-
return null;
|
|
19
|
-
const i = {
|
|
20
|
-
...n,
|
|
21
|
-
schema: o,
|
|
22
|
-
filter: t,
|
|
23
|
-
filterComponents: l
|
|
24
|
-
};
|
|
25
|
-
return /* @__PURE__ */ u(a.Provider, { value: i, children: e });
|
|
26
|
-
}, r = p;
|
|
27
|
-
r.FilterButton = F;
|
|
28
|
-
r.FilterColumnButton = b;
|
|
29
|
-
export {
|
|
30
|
-
r as TableFilter,
|
|
31
|
-
p as TableFilterProvider
|
|
32
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { TableFilter, TableSchema, FilterOption } from '../../table.type';
|
|
3
|
-
export interface TableFilterProps {
|
|
4
|
-
schema: TableSchema;
|
|
5
|
-
filter: TableFilter;
|
|
6
|
-
filterComponents?: Record<string, FilterComponentType>;
|
|
7
|
-
}
|
|
8
|
-
export type FilterComponentProps = {
|
|
9
|
-
onChange: (input: {
|
|
10
|
-
condition?: string;
|
|
11
|
-
value?: string | string[];
|
|
12
|
-
}) => void;
|
|
13
|
-
value: {
|
|
14
|
-
condition?: string;
|
|
15
|
-
value: string | string[];
|
|
16
|
-
};
|
|
17
|
-
filterOptions?: FilterOption[];
|
|
18
|
-
};
|
|
19
|
-
export type FilterComponentType = FC<FilterComponentProps>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { TableFilterProvider, TableFilter } from './table-filter-provider';
|
|
2
|
-
export { TableFilterButton } from './table-filter-button';
|
|
3
|
-
export { TableFilterColumnButton } from './table-filter-column-button';
|
|
4
|
-
export { useTableFilterContext } from './table-filter.context';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TableFilterProps } from './table-filter.type';
|
|
3
|
-
import { TableFilterButton } from './table-filter-button';
|
|
4
|
-
import { TableFilterColumnButton } from './table-filter-column-button';
|
|
5
|
-
export interface TableFilterProviderProps extends TableFilterProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const TableFilterProvider: React.FC<TableFilterProviderProps>;
|
|
9
|
-
interface TableFilterCompoundComponent extends React.FC<TableFilterProviderProps> {
|
|
10
|
-
FilterButton: typeof TableFilterButton;
|
|
11
|
-
FilterColumnButton: typeof TableFilterColumnButton;
|
|
12
|
-
}
|
|
13
|
-
export declare const TableFilter: TableFilterCompoundComponent;
|
|
14
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { TableFilter, TableSchema, FilterOption } from '../../table.type';
|
|
3
|
-
export interface TableFilterProps {
|
|
4
|
-
schema: TableSchema;
|
|
5
|
-
filter: TableFilter;
|
|
6
|
-
filterComponents?: Record<string, FilterComponentType>;
|
|
7
|
-
}
|
|
8
|
-
export type FilterComponentProps = {
|
|
9
|
-
onChange: (input: {
|
|
10
|
-
condition?: string;
|
|
11
|
-
value?: string | string[];
|
|
12
|
-
}) => void;
|
|
13
|
-
value: {
|
|
14
|
-
condition?: string;
|
|
15
|
-
value: string | string[];
|
|
16
|
-
};
|
|
17
|
-
filterOptions?: FilterOption[];
|
|
18
|
-
};
|
|
19
|
-
export type FilterComponentType = FC<FilterComponentProps>;
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{table/components/table-filter → table-filter}/filters/boolean.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/components/{table/components/table-filter → table-filter}/filters/checkbox.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{table/components/table-filter → table-filter}/filters/number/index.d.ts
RENAMED
|
File without changes
|
/package/dist/components/{table/components/table-filter → table-filter}/filters/number/number.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{table/components/table-filter → table-filter}/filters/number/number.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{table/components/table-filter → table-filter}/table-filter-button.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{table/components/table-filter → table-filter}/table-filter.context.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types/components/{table/components/table-filter → table-filter}/filters/boolean.d.ts
RENAMED
|
File without changes
|
/package/dist/types/components/{table/components/table-filter → table-filter}/filters/checkbox.d.ts
RENAMED
|
File without changes
|
/package/dist/types/components/{table/components/table-filter → table-filter}/filters/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/components/{table/components/table-filter → table-filter}/filters/text.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|