@kwiz/fluentui 1.0.154 → 1.0.155
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/LICENSE +21 -21
- package/README.md +53 -53
- package/dist/controls/svg.js +21 -21
- package/dist/controls/svg.js.map +1 -1
- package/dist/controls/table.d.ts +25 -13
- package/dist/controls/table.js +245 -68
- package/dist/controls/table.js.map +1 -1
- package/dist/controls/vertical.d.ts +3 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/use-highlight.js +8 -8
- package/dist/helpers/use-reload.d.ts +8 -0
- package/dist/helpers/use-reload.js +9 -0
- package/dist/helpers/use-reload.js.map +1 -0
- package/dist/styles/styles.d.ts +2 -0
- package/dist/styles/styles.js +12 -1
- package/dist/styles/styles.js.map +1 -1
- package/package.json +88 -88
- package/dist/@types/forwardRef.d.ts +0 -0
- package/dist/@types/forwardRef.js +0 -1
- package/dist/@types/forwardRef.js.map +0 -1
- package/dist/_modules/config.d.ts +0 -1
- package/dist/_modules/config.js +0 -9
- package/dist/_modules/config.js.map +0 -1
- package/dist/_modules/constants.d.ts +0 -2
- package/dist/_modules/constants.js +0 -3
- package/dist/_modules/constants.js.map +0 -1
- package/dist/controls/date copy.d.ts +0 -14
- package/dist/controls/date copy.js +0 -49
- package/dist/controls/date copy.js.map +0 -1
- package/dist/controls/error-boundary copy.d.ts +0 -23
- package/dist/controls/error-boundary copy.js +0 -33
- package/dist/controls/error-boundary copy.js.map +0 -1
- package/dist/controls/kwizoverflow copy.d.ts +0 -14
- package/dist/controls/kwizoverflow copy.js +0 -47
- package/dist/controls/kwizoverflow copy.js.map +0 -1
- package/dist/helpers/common.d.ts +0 -4
- package/dist/helpers/common.js +0 -2
- package/dist/helpers/common.js.map +0 -1
- package/dist/helpers/context.d.ts +0 -26
- package/dist/helpers/context.js +0 -15
- package/dist/helpers/context.js.map +0 -1
- package/dist/helpers/drag-drop/exports.d.ts +0 -12
- package/dist/helpers/drag-drop/exports.js +0 -3
- package/dist/helpers/drag-drop/exports.js.map +0 -1
- package/dist/helpers/exports.d.ts +0 -7
- package/dist/helpers/exports.js +0 -8
- package/dist/helpers/exports.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 KWIZ Corp
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 KWIZ Corp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
# fluentui
|
|
2
|
-
|
|
3
|
-
For local debugging, if you plan to use `npm link` - there is a known issue with react that will potentially break your application.
|
|
4
|
-
|
|
5
|
-
To fix that, you must mark react and fluentui imports as external.
|
|
6
|
-
The best way of doing it is using webpack to build your app, and adding this:
|
|
7
|
-
```json
|
|
8
|
-
resolve: {
|
|
9
|
-
...
|
|
10
|
-
modules: [path.resolve(__dirname, 'node_modules'), 'node_modules']//important! needed for @kwiz/fluentui to work correctly when linked
|
|
11
|
-
}
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Otherwise during dev, you'll have to link the react package in this project to load the react from node_modules in your caller application. For example:
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
npm link ..\\test-project\\node_modules\\react\\ ..\\..test-project\\node_modules\\@types\\react\\
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
To successfully use these controls you should create a context, and wrapt it in a drag/drop provider.
|
|
21
|
-
|
|
22
|
-
We recommend using the provider control:
|
|
23
|
-
|
|
24
|
-
```ts
|
|
25
|
-
<KWIZFluentProvider ctx={{ buttonShape: "rounded" }}>
|
|
26
|
-
<FluentProvider theme={webLightTheme}>
|
|
27
|
-
{content}
|
|
28
|
-
</FluentProvider>
|
|
29
|
-
</KWIZFluentProvider>
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Or you can use the following code:
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
|
-
// it is no longer needed to send in a root node const root = React.useRef<HTMLDivElement>(null);
|
|
37
|
-
const { KWIZFluentContext, value: kwizFluentContext } =
|
|
38
|
-
useKWIZFluentContextProvider({
|
|
39
|
-
ctx: {
|
|
40
|
-
buttonShape: "rounded",
|
|
41
|
-
},
|
|
42
|
-
//root,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
//...
|
|
46
|
-
<KWIZFluentContext.Provider value={kwizFluentContext}>
|
|
47
|
-
<DragDropContextProvider>
|
|
48
|
-
<FluentProvider theme={webLightTheme} /*ref={root}*/>
|
|
49
|
-
{content}
|
|
50
|
-
</FluentProvider>
|
|
51
|
-
</DragDropContextProvider>
|
|
52
|
-
</KWIZFluentContext.Provider>;
|
|
53
|
-
```
|
|
1
|
+
# fluentui
|
|
2
|
+
|
|
3
|
+
For local debugging, if you plan to use `npm link` - there is a known issue with react that will potentially break your application.
|
|
4
|
+
|
|
5
|
+
To fix that, you must mark react and fluentui imports as external.
|
|
6
|
+
The best way of doing it is using webpack to build your app, and adding this:
|
|
7
|
+
```json
|
|
8
|
+
resolve: {
|
|
9
|
+
...
|
|
10
|
+
modules: [path.resolve(__dirname, 'node_modules'), 'node_modules']//important! needed for @kwiz/fluentui to work correctly when linked
|
|
11
|
+
}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Otherwise during dev, you'll have to link the react package in this project to load the react from node_modules in your caller application. For example:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
npm link ..\\test-project\\node_modules\\react\\ ..\\..test-project\\node_modules\\@types\\react\\
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
To successfully use these controls you should create a context, and wrapt it in a drag/drop provider.
|
|
21
|
+
|
|
22
|
+
We recommend using the provider control:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
<KWIZFluentProvider ctx={{ buttonShape: "rounded" }}>
|
|
26
|
+
<FluentProvider theme={webLightTheme}>
|
|
27
|
+
{content}
|
|
28
|
+
</FluentProvider>
|
|
29
|
+
</KWIZFluentProvider>
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or you can use the following code:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
// it is no longer needed to send in a root node const root = React.useRef<HTMLDivElement>(null);
|
|
37
|
+
const { KWIZFluentContext, value: kwizFluentContext } =
|
|
38
|
+
useKWIZFluentContextProvider({
|
|
39
|
+
ctx: {
|
|
40
|
+
buttonShape: "rounded",
|
|
41
|
+
},
|
|
42
|
+
//root,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
//...
|
|
46
|
+
<KWIZFluentContext.Provider value={kwizFluentContext}>
|
|
47
|
+
<DragDropContextProvider>
|
|
48
|
+
<FluentProvider theme={webLightTheme} /*ref={root}*/>
|
|
49
|
+
{content}
|
|
50
|
+
</FluentProvider>
|
|
51
|
+
</DragDropContextProvider>
|
|
52
|
+
</KWIZFluentContext.Provider>;
|
|
53
|
+
```
|
package/dist/controls/svg.js
CHANGED
|
@@ -10,7 +10,7 @@ function getProps(props) {
|
|
|
10
10
|
}
|
|
11
11
|
export const YouTubeIcon = (props) => {
|
|
12
12
|
const { size } = getProps(props);
|
|
13
|
-
return (_jsx("svg", { height: size, width: size, version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: "0 0 461.001 461.001", xmlSpace: "preserve", children: _jsx("g", { children: _jsx("path", { style: { fill: "#F61C0D" }, d: "M365.257,67.393H95.744C42.866,67.393,0,110.259,0,163.137v134.728\
|
|
13
|
+
return (_jsx("svg", { height: size, width: size, version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: "0 0 461.001 461.001", xmlSpace: "preserve", children: _jsx("g", { children: _jsx("path", { style: { fill: "#F61C0D" }, d: "M365.257,67.393H95.744C42.866,67.393,0,110.259,0,163.137v134.728\nc0,52.878,42.866,95.744,95.744,95.744h269.513c52.878,0,95.744-42.866,95.744-95.744V163.137\nC461.001,110.259,418.135,67.393,365.257,67.393z M300.506,237.056l-126.06,60.123c-3.359,1.602-7.239-0.847-7.239-4.568V168.607\nc0-3.774,3.982-6.22,7.348-4.514l126.06,63.881C304.363,229.873,304.298,235.248,300.506,237.056z" }) }) }));
|
|
14
14
|
};
|
|
15
15
|
export const MermaidIcon = (props) => {
|
|
16
16
|
const { size } = getProps(props);
|
|
@@ -22,7 +22,7 @@ export const TeamsIcon = (props) => {
|
|
|
22
22
|
};
|
|
23
23
|
export const SVGLinkIcon = (props) => {
|
|
24
24
|
const { color, size } = getProps(props);
|
|
25
|
-
return (_jsx("svg", { fill: color, height: size, width: size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 490.16 490.16", children: _jsx("g", { children: _jsxs("g", { children: [_jsx("path", { d: "M409.657,32.474c-43.146-43.146-113.832-43.146-156.978,0l-84.763,84.762c29.07-8.262,60.589-6.12,88.129,6.732\
|
|
25
|
+
return (_jsx("svg", { fill: color, height: size, width: size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 490.16 490.16", children: _jsx("g", { children: _jsxs("g", { children: [_jsx("path", { d: "M409.657,32.474c-43.146-43.146-113.832-43.146-156.978,0l-84.763,84.762c29.07-8.262,60.589-6.12,88.129,6.732\n\t\t\tl44.063-44.064c17.136-17.136,44.982-17.136,62.118,0c17.136,17.136,17.136,44.982,0,62.118l-55.386,55.386l-36.414,36.414\n\t\t\tc-17.136,17.136-44.982,17.136-62.119,0l-47.43,47.43c11.016,11.017,23.868,19.278,37.332,24.48\n\t\t\tc36.415,14.382,78.643,8.874,110.467-16.219c3.06-2.447,6.426-5.201,9.18-8.262l57.222-57.222l34.578-34.578\n\t\t\tC453.109,146.306,453.109,75.926,409.657,32.474z" }), _jsx("path", { d: "M184.135,320.114l-42.228,42.228c-17.136,17.137-44.982,17.137-62.118,0c-17.136-17.136-17.136-44.981,0-62.118\n\t\t\tl91.8-91.799c17.136-17.136,44.982-17.136,62.119,0l47.43-47.43c-11.016-11.016-23.868-19.278-37.332-24.48\n\t\t\tc-38.25-15.3-83.232-8.262-115.362,20.502c-1.53,1.224-3.06,2.754-4.284,3.978l-91.8,91.799\n\t\t\tc-43.146,43.146-43.146,113.832,0,156.979c43.146,43.146,113.832,43.146,156.978,0l82.927-83.845\n\t\t\tC230.035,335.719,220.243,334.496,184.135,320.114z" })] }) }) }));
|
|
26
26
|
};
|
|
27
27
|
export const SVGSplitIcon = (props) => {
|
|
28
28
|
const { color, size } = getProps(props);
|
|
@@ -35,33 +35,33 @@ export const HubSpotIcon = (props) => {
|
|
|
35
35
|
//get icons as html
|
|
36
36
|
export const GetSVGLinkIcon = (props) => {
|
|
37
37
|
const { color, size } = getProps(props);
|
|
38
|
-
return (`<svg fill="${color}" height="${size}" width="${size}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 490.16 490.16">
|
|
39
|
-
<g>
|
|
40
|
-
<g>
|
|
41
|
-
<path d="M409.657,32.474c-43.146-43.146-113.832-43.146-156.978,0l-84.763,84.762c29.07-8.262,60.589-6.12,88.129,6.732
|
|
42
|
-
l44.063-44.064c17.136-17.136,44.982-17.136,62.118,0c17.136,17.136,17.136,44.982,0,62.118l-55.386,55.386l-36.414,36.414
|
|
43
|
-
c-17.136,17.136-44.982,17.136-62.119,0l-47.43,47.43c11.016,11.017,23.868,19.278,37.332,24.48
|
|
44
|
-
c36.415,14.382,78.643,8.874,110.467-16.219c3.06-2.447,6.426-5.201,9.18-8.262l57.222-57.222l34.578-34.578
|
|
45
|
-
C453.109,146.306,453.109,75.926,409.657,32.474z"/>
|
|
46
|
-
<path d="M184.135,320.114l-42.228,42.228c-17.136,17.137-44.982,17.137-62.118,0c-17.136-17.136-17.136-44.981,0-62.118
|
|
47
|
-
l91.8-91.799c17.136-17.136,44.982-17.136,62.119,0l47.43-47.43c-11.016-11.016-23.868-19.278-37.332-24.48
|
|
48
|
-
c-38.25-15.3-83.232-8.262-115.362,20.502c-1.53,1.224-3.06,2.754-4.284,3.978l-91.8,91.799
|
|
49
|
-
c-43.146,43.146-43.146,113.832,0,156.979c43.146,43.146,113.832,43.146,156.978,0l82.927-83.845
|
|
50
|
-
C230.035,335.719,220.243,334.496,184.135,320.114z"/>
|
|
51
|
-
</g>
|
|
52
|
-
</g>
|
|
38
|
+
return (`<svg fill="${color}" height="${size}" width="${size}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 490.16 490.16">
|
|
39
|
+
<g>
|
|
40
|
+
<g>
|
|
41
|
+
<path d="M409.657,32.474c-43.146-43.146-113.832-43.146-156.978,0l-84.763,84.762c29.07-8.262,60.589-6.12,88.129,6.732
|
|
42
|
+
l44.063-44.064c17.136-17.136,44.982-17.136,62.118,0c17.136,17.136,17.136,44.982,0,62.118l-55.386,55.386l-36.414,36.414
|
|
43
|
+
c-17.136,17.136-44.982,17.136-62.119,0l-47.43,47.43c11.016,11.017,23.868,19.278,37.332,24.48
|
|
44
|
+
c36.415,14.382,78.643,8.874,110.467-16.219c3.06-2.447,6.426-5.201,9.18-8.262l57.222-57.222l34.578-34.578
|
|
45
|
+
C453.109,146.306,453.109,75.926,409.657,32.474z"/>
|
|
46
|
+
<path d="M184.135,320.114l-42.228,42.228c-17.136,17.137-44.982,17.137-62.118,0c-17.136-17.136-17.136-44.981,0-62.118
|
|
47
|
+
l91.8-91.799c17.136-17.136,44.982-17.136,62.119,0l47.43-47.43c-11.016-11.016-23.868-19.278-37.332-24.48
|
|
48
|
+
c-38.25-15.3-83.232-8.262-115.362,20.502c-1.53,1.224-3.06,2.754-4.284,3.978l-91.8,91.799
|
|
49
|
+
c-43.146,43.146-43.146,113.832,0,156.979c43.146,43.146,113.832,43.146,156.978,0l82.927-83.845
|
|
50
|
+
C230.035,335.719,220.243,334.496,184.135,320.114z"/>
|
|
51
|
+
</g>
|
|
52
|
+
</g>
|
|
53
53
|
</svg>`);
|
|
54
54
|
};
|
|
55
55
|
export const GetSVGSplitIcon = (props) => {
|
|
56
56
|
const { color, size } = getProps(props);
|
|
57
|
-
return `<svg fill="${color}" height="${size}" width="${size}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17">
|
|
58
|
-
<path d="M10.646 13.146l0.707 0.707-2.853 2.854-2.854-2.854 0.707-0.707 1.647 1.647v-3.772h1v3.772l1.646-1.647zM8 2.207v3.772h1v-3.772l1.646 1.646 0.707-0.707-2.853-2.853-2.854 2.853 0.707 0.707 1.647-1.646zM0 8v1h17v-1h-17z" />
|
|
57
|
+
return `<svg fill="${color}" height="${size}" width="${size}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17">
|
|
58
|
+
<path d="M10.646 13.146l0.707 0.707-2.853 2.854-2.854-2.854 0.707-0.707 1.647 1.647v-3.772h1v3.772l1.646-1.647zM8 2.207v3.772h1v-3.772l1.646 1.646 0.707-0.707-2.853-2.853-2.854 2.853 0.707 0.707 1.647-1.646zM0 8v1h17v-1h-17z" />
|
|
59
59
|
</svg>`;
|
|
60
60
|
};
|
|
61
61
|
export function GetSVGCopyIcon(props) {
|
|
62
62
|
const { color, size } = getProps(props);
|
|
63
|
-
return (`<svg fill="${color}" width="${size}" height="${size}" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
64
|
-
<path d="M8 2a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8ZM7 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4ZM4 6a2 2 0 0 1 1-1.73V14.5A2.5 2.5 0 0 0 7.5 17h6.23A2 2 0 0 1 12 18H7.5A3.5 3.5 0 0 1 4 14.5V6Z"></path>
|
|
63
|
+
return (`<svg fill="${color}" width="${size}" height="${size}" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
64
|
+
<path d="M8 2a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8ZM7 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4ZM4 6a2 2 0 0 1 1-1.73V14.5A2.5 2.5 0 0 0 7.5 17h6.23A2 2 0 0 1 12 18H7.5A3.5 3.5 0 0 1 4 14.5V6Z"></path>
|
|
65
65
|
</svg>`);
|
|
66
66
|
}
|
|
67
67
|
export const SalesforceIcon = (props) => {
|
package/dist/controls/svg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg.js","sourceRoot":"","sources":["../../src/controls/svg.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C,SAAS,QAAQ,CAAC,KAAa;IAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,uBAAuB,CAAC;IAC5D,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI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IAAI,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,SAAS,CAAC;AAC7B,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,IAAiB;IAC5C,6EAA6E;IAC7E,OAAO,IAAI,OAAO,CAAS,OAAO,CAAC,EAAE;QACjC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YACnB,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7B,CAAC,EAAE,CAAC,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AAEP,CAAC"}
|
package/dist/controls/table.d.ts
CHANGED
|
@@ -1,31 +1,45 @@
|
|
|
1
|
-
import { IDictionary } from "@kwiz/common";
|
|
1
|
+
import { IDictionary, primitiveTypes } from "@kwiz/common";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { iMenuItemEX } from "./menu";
|
|
4
|
-
type
|
|
4
|
+
type expandedColType = {
|
|
5
5
|
/** key used for getting the column value, and for sorting/filtering */
|
|
6
6
|
key: string;
|
|
7
7
|
renderer?: string | (() => ReactNode);
|
|
8
8
|
headerCss?: string[];
|
|
9
9
|
css?: string[];
|
|
10
10
|
nowrap?: boolean;
|
|
11
|
+
sortable?: boolean;
|
|
12
|
+
/** should match the type of primitiveValue or tableItemValueType */
|
|
13
|
+
filter?: "string" | "bool" | "number" | "date";
|
|
14
|
+
primary?: boolean;
|
|
11
15
|
};
|
|
12
|
-
type
|
|
16
|
+
type colType = string | expandedColType;
|
|
17
|
+
export type tableItemExpandedValueType = {
|
|
18
|
+
/** pass in any object you can access in your actions */
|
|
13
19
|
raw?: object;
|
|
14
|
-
|
|
20
|
+
/** if your renderer does not return a simple string, use this to provide a sort/filter value */
|
|
21
|
+
primitiveValue?: primitiveTypes;
|
|
15
22
|
renderer?: string | (() => ReactNode);
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
media?: JSX.Element;
|
|
24
|
+
description?: string;
|
|
25
|
+
};
|
|
26
|
+
export type tableItemValueType = primitiveTypes | tableItemExpandedValueType;
|
|
27
|
+
type itemTypeBase = IDictionary<tableItemValueType>;
|
|
28
|
+
interface iPropsBase<ItemType extends itemTypeBase> {
|
|
18
29
|
columns: colType[];
|
|
19
|
-
/** item is a dictionary. Values are primitives, or
|
|
30
|
+
/** item is a dictionary. Values are primitives, or tableItemExpandedValueType */
|
|
20
31
|
items: ItemType[];
|
|
21
32
|
css?: string[];
|
|
22
33
|
rowCss?: string[];
|
|
23
34
|
getItemMenu?: (item: ItemType, index: number) => iMenuItemEX[];
|
|
35
|
+
selectionMode?: "single" | "multiselect";
|
|
36
|
+
selection?: number[];
|
|
37
|
+
onSelectionChange?: (selected: number[]) => void;
|
|
24
38
|
}
|
|
25
|
-
interface iPropsUnfreezed<ItemType extends
|
|
39
|
+
interface iPropsUnfreezed<ItemType extends itemTypeBase> extends iPropsBase<ItemType> {
|
|
26
40
|
maxHeight: never;
|
|
27
41
|
}
|
|
28
|
-
interface iPropsFreezed<ItemType extends
|
|
42
|
+
interface iPropsFreezed<ItemType extends itemTypeBase> extends iPropsBase<ItemType> {
|
|
29
43
|
stickyTop?: true;
|
|
30
44
|
stickyLeft?: true | 1 | 2;
|
|
31
45
|
/** default: small - keep 40px of first cell visible. medium=80px cover=none */
|
|
@@ -35,8 +49,6 @@ interface iPropsFreezed<ItemType extends itemType> extends iPropsBase<ItemType>
|
|
|
35
49
|
*/
|
|
36
50
|
maxHeight?: string;
|
|
37
51
|
}
|
|
38
|
-
type iProps<ItemType extends
|
|
39
|
-
export declare function TableEX<ItemType extends
|
|
40
|
-
/** calls mergeClasses handle string[] that might have multi class (split by space) elements */
|
|
41
|
-
export declare function mergeClassesEX(...css: (string | string[])[]): string;
|
|
52
|
+
type iProps<ItemType extends itemTypeBase> = iPropsUnfreezed<ItemType> | iPropsFreezed<ItemType>;
|
|
53
|
+
export declare function TableEX<ItemType extends itemTypeBase>(props: iProps<ItemType>): import("react/jsx-runtime").JSX.Element;
|
|
42
54
|
export {};
|