@nuralyui/table 0.0.1
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/components/hy-table-actions.d.ts +11 -0
- package/components/hy-table-actions.d.ts.map +1 -0
- package/components/hy-table-actions.js +40 -0
- package/components/hy-table-actions.js.map +1 -0
- package/components/hy-table-content.d.ts +25 -0
- package/components/hy-table-content.d.ts.map +1 -0
- package/components/hy-table-content.js +168 -0
- package/components/hy-table-content.js.map +1 -0
- package/components/hy-table-filter.d.ts +11 -0
- package/components/hy-table-filter.d.ts.map +1 -0
- package/components/hy-table-filter.js +59 -0
- package/components/hy-table-filter.js.map +1 -0
- package/components/hy-table-pagination.d.ts +21 -0
- package/components/hy-table-pagination.d.ts.map +1 -0
- package/components/hy-table-pagination.js +111 -0
- package/components/hy-table-pagination.js.map +1 -0
- package/components/table-actions.style.d.ts +2 -0
- package/components/table-actions.style.d.ts.map +1 -0
- package/components/table-actions.style.js +31 -0
- package/components/table-actions.style.js.map +1 -0
- package/components/table-actions.variables.d.ts +2 -0
- package/components/table-actions.variables.d.ts.map +1 -0
- package/components/table-actions.variables.js +13 -0
- package/components/table-actions.variables.js.map +1 -0
- package/components/table-content.style.d.ts +2 -0
- package/components/table-content.style.d.ts.map +1 -0
- package/components/table-content.style.js +77 -0
- package/components/table-content.style.js.map +1 -0
- package/components/table-content.variables.d.ts +2 -0
- package/components/table-content.variables.d.ts.map +1 -0
- package/components/table-content.variables.js +29 -0
- package/components/table-content.variables.js.map +1 -0
- package/components/table-filter.style.d.ts +2 -0
- package/components/table-filter.style.d.ts.map +1 -0
- package/components/table-filter.style.js +39 -0
- package/components/table-filter.style.js.map +1 -0
- package/components/table-filter.variables.d.ts +2 -0
- package/components/table-filter.variables.d.ts.map +1 -0
- package/components/table-filter.variables.js +17 -0
- package/components/table-filter.variables.js.map +1 -0
- package/components/table-pagination.style.d.ts +2 -0
- package/components/table-pagination.style.d.ts.map +1 -0
- package/components/table-pagination.style.js +102 -0
- package/components/table-pagination.style.js.map +1 -0
- package/components/table-pagination.variables.d.ts +2 -0
- package/components/table-pagination.variables.d.ts.map +1 -0
- package/components/table-pagination.variables.js +17 -0
- package/components/table-pagination.variables.js.map +1 -0
- package/demo/table-demo.d.ts +17 -0
- package/demo/table-demo.d.ts.map +1 -0
- package/demo/table-demo.js +166 -0
- package/demo/table-demo.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +15 -0
- package/table.component.d.ts +39 -0
- package/table.component.d.ts.map +1 -0
- package/table.component.js +245 -0
- package/table.component.js.map +1 -0
- package/table.style.d.ts +3 -0
- package/table.style.d.ts.map +1 -0
- package/table.style.js +14 -0
- package/table.style.js.map +1 -0
- package/table.types.d.ts +29 -0
- package/table.types.d.ts.map +1 -0
- package/table.types.js +25 -0
- package/table.types.js.map +1 -0
- package/test/hy-table-actions_test.d.ts +2 -0
- package/test/hy-table-actions_test.d.ts.map +1 -0
- package/test/hy-table-actions_test.js +32 -0
- package/test/hy-table-actions_test.js.map +1 -0
- package/test/hy-table-content_test.d.ts +2 -0
- package/test/hy-table-content_test.d.ts.map +1 -0
- package/test/hy-table-content_test.js +168 -0
- package/test/hy-table-content_test.js.map +1 -0
- package/test/hy-table-filter_test.d.ts +2 -0
- package/test/hy-table-filter_test.d.ts.map +1 -0
- package/test/hy-table-filter_test.js +80 -0
- package/test/hy-table-filter_test.js.map +1 -0
- package/test/hy-table-pagination_test.d.ts +2 -0
- package/test/hy-table-pagination_test.d.ts.map +1 -0
- package/test/hy-table-pagination_test.js +114 -0
- package/test/hy-table-pagination_test.js.map +1 -0
- package/test/hy-table_test.d.ts +2 -0
- package/test/hy-table_test.d.ts.map +1 -0
- package/test/hy-table_test.js +145 -0
- package/test/hy-table_test.js.map +1 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import { styleVariables } from './table-content.variables.js';
|
|
3
|
+
const tableContentStyle = css `
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
input[type='checkbox'][data-indeterminate='true']::after {
|
|
10
|
+
width: 13px;
|
|
11
|
+
height: 13px;
|
|
12
|
+
background-color: var(--hybrid-table-input-color);
|
|
13
|
+
color: var(--hybrid-table-checkbox-some-checked-sign-color);
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
content: '-';
|
|
18
|
+
}
|
|
19
|
+
table {
|
|
20
|
+
width: 100%;
|
|
21
|
+
border-spacing: 0px;
|
|
22
|
+
color: var(--hybrid-table-text-color);
|
|
23
|
+
}
|
|
24
|
+
td {
|
|
25
|
+
text-align: center;
|
|
26
|
+
border-bottom: var(--hybrid-table-column-border);
|
|
27
|
+
}
|
|
28
|
+
th {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
th span {
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
gap: 10px;
|
|
35
|
+
}
|
|
36
|
+
hy-icon {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
--hybrid-icon-color: var(--hybrid-table-text-color);
|
|
41
|
+
}
|
|
42
|
+
tr {
|
|
43
|
+
background-color: var(--hybrid-table-row-background-color);
|
|
44
|
+
}
|
|
45
|
+
tr:hover {
|
|
46
|
+
background-color: var(--hybrid-table-row-hover-background-color);
|
|
47
|
+
}
|
|
48
|
+
tr:first-child {
|
|
49
|
+
background-color: var(--hybrid-table-header-background-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
tr:has(:not(th) > input:checked) {
|
|
53
|
+
background-color: var(--hybrid-table-row-checked-background-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
td,
|
|
57
|
+
th {
|
|
58
|
+
padding: 10px;
|
|
59
|
+
}
|
|
60
|
+
input,
|
|
61
|
+
.expand-icon {
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
accent-color: var(--hybrid-table-input-color);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([size='small']) td,
|
|
67
|
+
:host([size='small']) th {
|
|
68
|
+
padding: 5px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([size='large']) td,
|
|
72
|
+
:host([size='large']) th {
|
|
73
|
+
padding: 15px;
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
export const styles = [tableContentStyle, styleVariables];
|
|
77
|
+
//# sourceMappingURL=table-content.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-content.style.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-content.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAE5D,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwE5B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {css} from 'lit';\nimport {styleVariables} from './table-content.variables.js';\n\nconst tableContentStyle = css`\n :host {\n display: block;\n overflow: auto;\n }\n\n input[type='checkbox'][data-indeterminate='true']::after {\n width: 13px;\n height: 13px;\n background-color: var(--hybrid-table-input-color);\n color: var(--hybrid-table-checkbox-some-checked-sign-color);\n display: flex;\n justify-content: center;\n align-items: center;\n content: '-';\n }\n table {\n width: 100%;\n border-spacing: 0px;\n color: var(--hybrid-table-text-color);\n }\n td {\n text-align: center;\n border-bottom: var(--hybrid-table-column-border);\n }\n th {\n cursor: pointer;\n }\n th span {\n display: flex;\n justify-content: center;\n gap: 10px;\n }\n hy-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n --hybrid-icon-color: var(--hybrid-table-text-color);\n }\n tr {\n background-color: var(--hybrid-table-row-background-color);\n }\n tr:hover {\n background-color: var(--hybrid-table-row-hover-background-color);\n }\n tr:first-child {\n background-color: var(--hybrid-table-header-background-color);\n }\n\n tr:has(:not(th) > input:checked) {\n background-color: var(--hybrid-table-row-checked-background-color);\n }\n\n td,\n th {\n padding: 10px;\n }\n input,\n .expand-icon {\n cursor: pointer;\n accent-color: var(--hybrid-table-input-color);\n }\n\n :host([size='small']) td,\n :host([size='small']) th {\n padding: 5px;\n }\n\n :host([size='large']) td,\n :host([size='large']) th {\n padding: 15px;\n }\n`;\n\nexport const styles = [tableContentStyle, styleVariables];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-content.variables.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-content.variables.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,yBA0B1B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styleVariables = css `
|
|
3
|
+
:host {
|
|
4
|
+
--hybrid-table-text-color: #161616;
|
|
5
|
+
--hybrid-table-input-color: #161616;
|
|
6
|
+
--hybrid-table-column-border: 1px solid #e0e0e0;
|
|
7
|
+
--hybrid-table-row-background-color: #f4f4f4;
|
|
8
|
+
--hybrid-table-row-checked-background-color: #e5e5e5;
|
|
9
|
+
--hybrid-table-row-hover-background-color: #d3d3d3;
|
|
10
|
+
--hybrid-table-header-background-color: #e0e0e0;
|
|
11
|
+
--hybrid-table-checkbox-some-checked-background-color: #161616;
|
|
12
|
+
--hybrid-table-checkbox-some-checked-sign-color: #ffffff;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
16
|
+
:host {
|
|
17
|
+
--hybrid-table-text-color: #f4f4f4;
|
|
18
|
+
--hybrid-table-input-color: #ffffff;
|
|
19
|
+
--hybrid-table-column-border: 1px solid #8d8d8d;
|
|
20
|
+
--hybrid-table-row-background-color: #393939;
|
|
21
|
+
--hybrid-table-header-background-color: #525252;
|
|
22
|
+
--hybrid-table-row-hover-background-color: #525252;
|
|
23
|
+
--hybrid-table-row-checked-background-color: #6f6f6f;
|
|
24
|
+
--hybrid-table-checkbox-some-checked-background-color: #ffffff;
|
|
25
|
+
--hybrid-table-checkbox-some-checked-sign-color: #161616;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
//# sourceMappingURL=table-content.variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-content.variables.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-content.variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BhC,CAAC","sourcesContent":["import {css} from 'lit';\n\nexport const styleVariables = css`\n :host {\n --hybrid-table-text-color: #161616;\n --hybrid-table-input-color: #161616;\n --hybrid-table-column-border: 1px solid #e0e0e0;\n --hybrid-table-row-background-color: #f4f4f4;\n --hybrid-table-row-checked-background-color: #e5e5e5;\n --hybrid-table-row-hover-background-color: #d3d3d3;\n --hybrid-table-header-background-color: #e0e0e0;\n --hybrid-table-checkbox-some-checked-background-color: #161616;\n --hybrid-table-checkbox-some-checked-sign-color: #ffffff;\n }\n\n @media (prefers-color-scheme: dark) {\n :host {\n --hybrid-table-text-color: #f4f4f4;\n --hybrid-table-input-color: #ffffff;\n --hybrid-table-column-border: 1px solid #8d8d8d;\n --hybrid-table-row-background-color: #393939;\n --hybrid-table-header-background-color: #525252;\n --hybrid-table-row-hover-background-color: #525252;\n --hybrid-table-row-checked-background-color: #6f6f6f;\n --hybrid-table-checkbox-some-checked-background-color: #ffffff;\n --hybrid-table-checkbox-some-checked-sign-color: #161616;\n }\n }\n`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-filter.style.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-filter.style.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,MAAM,2BAAsC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import { styleVariables } from './table-filter.variables.js';
|
|
3
|
+
const tableActionsStyle = css `
|
|
4
|
+
:host([showInput]) {
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.filter-container {
|
|
9
|
+
position: relative;
|
|
10
|
+
margin-bottom: 5px;
|
|
11
|
+
}
|
|
12
|
+
.filter-container input {
|
|
13
|
+
padding: 5px;
|
|
14
|
+
padding-left: 30px;
|
|
15
|
+
width: 100%;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
background-color: var(--hybrid-filter-input-background-color);
|
|
18
|
+
color: var(--hybrid-filter-input-text-color);
|
|
19
|
+
}
|
|
20
|
+
input:focus {
|
|
21
|
+
outline-style: none;
|
|
22
|
+
border: var(--hybrid-filter-focused-input-border);
|
|
23
|
+
}
|
|
24
|
+
.icon-container {
|
|
25
|
+
height: 25px;
|
|
26
|
+
width: 35px;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
.search-icon {
|
|
33
|
+
position: absolute;
|
|
34
|
+
left: 10px;
|
|
35
|
+
top: 25%;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
export const styles = [tableActionsStyle, styleVariables];
|
|
39
|
+
//# sourceMappingURL=table-filter.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-filter.style.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-filter.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAC3D,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC5B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {css} from 'lit';\nimport {styleVariables} from './table-filter.variables.js';\nconst tableActionsStyle = css`\n :host([showInput]) {\n width: 100%;\n }\n\n .filter-container {\n position: relative;\n margin-bottom: 5px;\n }\n .filter-container input {\n padding: 5px;\n padding-left: 30px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--hybrid-filter-input-background-color);\n color: var(--hybrid-filter-input-text-color);\n }\n input:focus {\n outline-style: none;\n border: var(--hybrid-filter-focused-input-border);\n }\n .icon-container {\n height: 25px;\n width: 35px;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .search-icon {\n position: absolute;\n left: 10px;\n top: 25%;\n }\n`;\n\nexport const styles = [tableActionsStyle, styleVariables];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-filter.variables.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-filter.variables.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,yBAc1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styleVariables = css `
|
|
3
|
+
:host {
|
|
4
|
+
--hybrid-filter-input-background-color: #ffffff;
|
|
5
|
+
--hybrid-filter-input-text-color: #000000;
|
|
6
|
+
--hybrid-filter-focused-input-border: 1px solid #e0e0e0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@media (prefers-color-scheme: dark) {
|
|
10
|
+
:host {
|
|
11
|
+
--hybrid-filter-input-background-color: #393939;
|
|
12
|
+
--hybrid-filter-focused-input-border: 1px solid #393939;
|
|
13
|
+
--hybrid-filter-input-text-color: #c6c6c6;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
//# sourceMappingURL=table-filter.variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-filter.variables.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-filter.variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAchC,CAAC","sourcesContent":["import {css} from 'lit';\n\nexport const styleVariables = css`\n :host {\n --hybrid-filter-input-background-color: #ffffff;\n --hybrid-filter-input-text-color: #000000;\n --hybrid-filter-focused-input-border: 1px solid #e0e0e0;\n }\n\n @media (prefers-color-scheme: dark) {\n :host {\n --hybrid-filter-input-background-color: #393939;\n --hybrid-filter-focused-input-border: 1px solid #393939;\n --hybrid-filter-input-text-color: #c6c6c6;\n }\n }\n`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-pagination.style.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-pagination.style.ts"],"names":[],"mappings":"AAsGA,eAAO,MAAM,MAAM,2BAAyC,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import { styleVariables } from './table-pagination.variables.js';
|
|
3
|
+
const tablePaginationStyle = css `
|
|
4
|
+
.pagination-container {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
background-color: var(--hybrid-pagination-background-color);
|
|
8
|
+
color: var(--hybrid-pagination-text-color);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.left-content {
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
}
|
|
15
|
+
.left-content .items-details {
|
|
16
|
+
border-left: var(--hybrid-pagination-borders);
|
|
17
|
+
padding: 10px;
|
|
18
|
+
}
|
|
19
|
+
.right-arrow,
|
|
20
|
+
.left-arrow {
|
|
21
|
+
--hybrid-icon-color: var(--hybrid-pagination-text-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([size='small']) .left-content .items-details {
|
|
25
|
+
padding: 5px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([size='large']) .left-content .items-details {
|
|
29
|
+
padding: 15px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.left-content .select-details {
|
|
33
|
+
padding: 10px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([size='small']) .left-content .select-details {
|
|
37
|
+
padding: 5px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([size='large']) .left-content .select-details {
|
|
41
|
+
padding: 15px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.right-content {
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
border-left: var(--hybrid-pagination-borders);
|
|
48
|
+
}
|
|
49
|
+
.right-content .icon-container {
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
border-left: var(--hybrid-pagination-borders);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.right-content .page-details {
|
|
56
|
+
padding: 10px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([size='small']) .right-content .page-details {
|
|
60
|
+
padding: 5px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([size='large']) .right-content .page-details {
|
|
64
|
+
padding: 15px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.icon-container .left-arrow,
|
|
68
|
+
.icon-container .right-arrow {
|
|
69
|
+
padding: 10px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([size='small']) .icon-container .left-arrow,
|
|
73
|
+
:host([size='small']) .icon-container .right-arrow {
|
|
74
|
+
padding: 5px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([size='large']) .icon-container .left-arrow,
|
|
78
|
+
:host([size='large']) .icon-container .right-arrow {
|
|
79
|
+
padding: 15px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.icon-container .left-arrow {
|
|
83
|
+
border-right: var(--hybrid-pagination-borders);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
select {
|
|
87
|
+
border: none;
|
|
88
|
+
background-color: var(--hybrid-pagination-background-color);
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
color: var(--hybrid-pagination-text-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
hy-icon[data-enabled='false'] {
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
hy-icon[data-enabled='true'] {
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
export const styles = [tablePaginationStyle, styleVariables];
|
|
102
|
+
//# sourceMappingURL=table-pagination.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-pagination.style.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-pagination.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAE/D,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiG/B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {css} from 'lit';\nimport {styleVariables} from './table-pagination.variables.js';\n\nconst tablePaginationStyle = css`\n .pagination-container {\n display: flex;\n justify-content: space-between;\n background-color: var(--hybrid-pagination-background-color);\n color: var(--hybrid-pagination-text-color);\n }\n\n .left-content {\n display: flex;\n justify-content: space-between;\n }\n .left-content .items-details {\n border-left: var(--hybrid-pagination-borders);\n padding: 10px;\n }\n .right-arrow,\n .left-arrow {\n --hybrid-icon-color: var(--hybrid-pagination-text-color);\n }\n\n :host([size='small']) .left-content .items-details {\n padding: 5px;\n }\n\n :host([size='large']) .left-content .items-details {\n padding: 15px;\n }\n\n .left-content .select-details {\n padding: 10px;\n }\n\n :host([size='small']) .left-content .select-details {\n padding: 5px;\n }\n\n :host([size='large']) .left-content .select-details {\n padding: 15px;\n }\n\n .right-content {\n display: flex;\n justify-content: space-between;\n border-left: var(--hybrid-pagination-borders);\n }\n .right-content .icon-container {\n display: flex;\n justify-content: space-between;\n border-left: var(--hybrid-pagination-borders);\n }\n\n .right-content .page-details {\n padding: 10px;\n }\n\n :host([size='small']) .right-content .page-details {\n padding: 5px;\n }\n\n :host([size='large']) .right-content .page-details {\n padding: 15px;\n }\n\n .icon-container .left-arrow,\n .icon-container .right-arrow {\n padding: 10px;\n }\n\n :host([size='small']) .icon-container .left-arrow,\n :host([size='small']) .icon-container .right-arrow {\n padding: 5px;\n }\n\n :host([size='large']) .icon-container .left-arrow,\n :host([size='large']) .icon-container .right-arrow {\n padding: 15px;\n }\n\n .icon-container .left-arrow {\n border-right: var(--hybrid-pagination-borders);\n }\n\n select {\n border: none;\n background-color: var(--hybrid-pagination-background-color);\n cursor: pointer;\n color: var(--hybrid-pagination-text-color);\n }\n\n hy-icon[data-enabled='false'] {\n cursor: not-allowed;\n }\n\n hy-icon[data-enabled='true'] {\n cursor: pointer;\n }\n`;\n\nexport const styles = [tablePaginationStyle, styleVariables];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-pagination.variables.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-pagination.variables.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,yBAc1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styleVariables = css `
|
|
3
|
+
:host {
|
|
4
|
+
--hybrid-pagination-background-color: #f4f4f4;
|
|
5
|
+
--hybrid-pagination-text-color: #161616;
|
|
6
|
+
--hybrid-pagination-borders: 1px solid #e0e0e0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@media (prefers-color-scheme: dark) {
|
|
10
|
+
:host {
|
|
11
|
+
--hybrid-pagination-background-color: #393939;
|
|
12
|
+
--hybrid-pagination-text-color: #f4f4f4;
|
|
13
|
+
--hybrid-pagination-borders: 1px solid #8d8d8d;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
//# sourceMappingURL=table-pagination.variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-pagination.variables.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-pagination.variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAchC,CAAC","sourcesContent":["import {css} from 'lit';\n\nexport const styleVariables = css`\n :host {\n --hybrid-pagination-background-color: #f4f4f4;\n --hybrid-pagination-text-color: #161616;\n --hybrid-pagination-borders: 1px solid #e0e0e0;\n }\n\n @media (prefers-color-scheme: dark) {\n :host {\n --hybrid-pagination-background-color: #393939;\n --hybrid-pagination-text-color: #f4f4f4;\n --hybrid-pagination-borders: 1px solid #8d8d8d;\n }\n }\n`;\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class TableDemo extends LitElement {
|
|
3
|
+
headers: {
|
|
4
|
+
name: string;
|
|
5
|
+
key: string;
|
|
6
|
+
}[];
|
|
7
|
+
rows: {
|
|
8
|
+
id: number;
|
|
9
|
+
status: string;
|
|
10
|
+
priority: string;
|
|
11
|
+
title: string;
|
|
12
|
+
assignee: string;
|
|
13
|
+
}[];
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
render(): import("lit").TemplateResult<1>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=table-demo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/table/demo/table-demo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAG1C,qBAAa,SAAU,SAAQ,UAAU;IAEvC,OAAO;;;QAqBL;IAGF,IAAI;;;;;;QAyDF;IACF,OAAgB,MAAM,4BAOpB;IACO,MAAM;CAyDhB"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, css, html } from 'lit';
|
|
8
|
+
import { state } from 'lit/decorators.js';
|
|
9
|
+
export class TableDemo extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.headers = [
|
|
13
|
+
{
|
|
14
|
+
name: 'Id',
|
|
15
|
+
key: 'id',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'Status',
|
|
19
|
+
key: 'status',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Priority',
|
|
23
|
+
key: 'priority',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Title',
|
|
27
|
+
key: 'title',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Assignee',
|
|
31
|
+
key: 'assignee',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
this.rows = [
|
|
35
|
+
{
|
|
36
|
+
id: 1,
|
|
37
|
+
status: 'Open',
|
|
38
|
+
priority: 'Normal',
|
|
39
|
+
title: 'Product Details Page - Variant Component (1)',
|
|
40
|
+
assignee: 'William Jones',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 2,
|
|
44
|
+
status: 'Open',
|
|
45
|
+
priority: 'High',
|
|
46
|
+
title: 'Product Details Page - Variant Component (2)',
|
|
47
|
+
assignee: 'Natalia Hayward',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 3,
|
|
51
|
+
status: 'Closed',
|
|
52
|
+
priority: 'Normal',
|
|
53
|
+
title: 'Product Details Page - Variant Component (3)',
|
|
54
|
+
assignee: 'Jess Plant',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 4,
|
|
58
|
+
status: 'Open',
|
|
59
|
+
priority: 'Normal',
|
|
60
|
+
title: 'Product Details Page - Variant Component (4)',
|
|
61
|
+
assignee: 'William Jones',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 5,
|
|
65
|
+
status: 'Open',
|
|
66
|
+
priority: 'Normal',
|
|
67
|
+
title: 'Product Details Page - Variant Component (5)',
|
|
68
|
+
assignee: 'Kathleen Knowles',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 6,
|
|
72
|
+
status: 'Open',
|
|
73
|
+
priority: 'High',
|
|
74
|
+
title: 'Product Details Page - Variant Component (6)',
|
|
75
|
+
assignee: 'Mel Young',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 7,
|
|
79
|
+
status: 'Closed',
|
|
80
|
+
priority: 'Normal',
|
|
81
|
+
title: 'Product Details Page - Variant Component (7)',
|
|
82
|
+
assignee: 'Zahid Allison',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 8,
|
|
86
|
+
status: 'Closed',
|
|
87
|
+
priority: 'High',
|
|
88
|
+
title: 'Product Details Page - Variant Component (8)',
|
|
89
|
+
assignee: 'William Jones',
|
|
90
|
+
},
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return html `
|
|
95
|
+
<h1>With selection</h1>
|
|
96
|
+
<h3>Multiple selection</h3>
|
|
97
|
+
<hy-table
|
|
98
|
+
@onSelect=${(e) => {
|
|
99
|
+
console.log('selected', e.detail.value);
|
|
100
|
+
}}
|
|
101
|
+
@onPaginate=${(e) => {
|
|
102
|
+
console.log('page ', e.detail.value);
|
|
103
|
+
}}
|
|
104
|
+
@onSort=${(e) => {
|
|
105
|
+
console.log('sorted ', e.detail.value);
|
|
106
|
+
}}
|
|
107
|
+
.headers="${this.headers}" .rows="${this.rows}" .selectionMode=${'multiple'}></hy-table>
|
|
108
|
+
<h3>Single selection</h3>
|
|
109
|
+
<hy-table .headers="${this.headers}" .rows="${this.rows}" .selectionMode=${'single'}></hy-table>
|
|
110
|
+
<h1>With Expandable attribute (title)</h1>
|
|
111
|
+
<hy-table .headers="${this.headers}" .rows="${this.rows}" .expandable=${'title'}></hy-table>
|
|
112
|
+
<h1>With filter: search</h1>
|
|
113
|
+
<hy-table .headers="${this.headers}" .rows="${this.rows}" .withFilter=${true}></hy-table>
|
|
114
|
+
<h3>filter + expandable attribute (priority)</h3>
|
|
115
|
+
<hy-table
|
|
116
|
+
.headers="${this.headers}"
|
|
117
|
+
.rows="${this.rows}"
|
|
118
|
+
.withFilter=${true}
|
|
119
|
+
.expandable=${'priority'}
|
|
120
|
+
@onSelect=${(e) => {
|
|
121
|
+
console.log('selected', e.detail.value);
|
|
122
|
+
}}
|
|
123
|
+
@onSearch=${(e) => {
|
|
124
|
+
console.log('searched ', e.detail.value);
|
|
125
|
+
}}
|
|
126
|
+
@onSort=${(e) => {
|
|
127
|
+
console.log('sorted ', e.detail.value);
|
|
128
|
+
}}
|
|
129
|
+
></hy-table>
|
|
130
|
+
|
|
131
|
+
<h1>Sizes</h1>
|
|
132
|
+
<h3>Small size with selection</h3>
|
|
133
|
+
<hy-table
|
|
134
|
+
.headers="${this.headers}"
|
|
135
|
+
.rows="${this.rows}"
|
|
136
|
+
.size=${'small'}
|
|
137
|
+
.selectionMode=${'multiple'}
|
|
138
|
+
></hy-table>
|
|
139
|
+
<h3>Large size</h3>
|
|
140
|
+
<hy-table .headers="${this.headers}" .rows="${this.rows}" .size=${'large'}></hy-table>
|
|
141
|
+
<h3>Large size with multiple selection</h3>
|
|
142
|
+
<hy-table
|
|
143
|
+
.headers="${this.headers}"
|
|
144
|
+
.rows="${this.rows}"
|
|
145
|
+
.size=${'large'}
|
|
146
|
+
.selectionMode=${'multiple'}
|
|
147
|
+
></hy-table>
|
|
148
|
+
`;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
TableDemo.styles = [
|
|
152
|
+
css `
|
|
153
|
+
:host {
|
|
154
|
+
display: block;
|
|
155
|
+
width: 90%;
|
|
156
|
+
}
|
|
157
|
+
`,
|
|
158
|
+
];
|
|
159
|
+
__decorate([
|
|
160
|
+
state()
|
|
161
|
+
], TableDemo.prototype, "headers", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
state()
|
|
164
|
+
], TableDemo.prototype, "rows", void 0);
|
|
165
|
+
customElements.define('hy-table-demo', TableDemo);
|
|
166
|
+
//# sourceMappingURL=table-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-demo.js","sourceRoot":"","sources":["../../../../src/components/table/demo/table-demo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC1C,OAAO,EAA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C,CAAC;oBACW,CAAC,CAAa,EAAC,EAAE;YAC3B,OAAO,CAAC,GAAG,CAAC,WAAW,EAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACzC,CAAC;kBACS,CAAC,CAAa,EAAC,EAAE;YACzB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACxC,CAAC;;;;;;oBAMW,IAAI,CAAC,OAAO;iBACf,IAAI,CAAC,IAAI;gBACV,OAAO;yBACE,UAAU;;;4BAGP,IAAI,CAAC,OAAO,YAAY,IAAI,CAAC,IAAI,WAAW,OAAO;;;oBAG3D,IAAI,CAAC,OAAO;iBACf,IAAI,CAAC,IAAI;gBACV,OAAO;yBACE,UAAU;;KAE9B,CAAC;IACJ,CAAC;;AAhEe,gBAAM,GAAG;IACvB,GAAG,CAAA;;;;;KAKF;CACF,CAAC;AAzFF;IADC,KAAK,EAAE;0CAsBN;AAGF;IADC,KAAK,EAAE;uCA0DN;AAmEJ,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import {LitElement, css, html} from 'lit';\nimport {state} from 'lit/decorators.js';\n\nexport class TableDemo extends LitElement {\n @state()\n headers = [\n {\n name: 'Id',\n key: 'id',\n },\n {\n name: 'Status',\n key: 'status',\n },\n {\n name: 'Priority',\n key: 'priority',\n },\n {\n name: 'Title',\n key: 'title',\n },\n {\n name: 'Assignee',\n key: 'assignee',\n },\n ];\n\n @state()\n rows = [\n {\n id: 1,\n status: 'Open',\n priority: 'Normal',\n title: 'Product Details Page - Variant Component (1)',\n assignee: 'William Jones',\n },\n {\n id: 2,\n status: 'Open',\n priority: 'High',\n title: 'Product Details Page - Variant Component (2)',\n assignee: 'Natalia Hayward',\n },\n {\n id: 3,\n status: 'Closed',\n priority: 'Normal',\n title: 'Product Details Page - Variant Component (3)',\n assignee: 'Jess Plant',\n },\n {\n id: 4,\n status: 'Open',\n priority: 'Normal',\n title: 'Product Details Page - Variant Component (4)',\n assignee: 'William Jones',\n },\n {\n id: 5,\n status: 'Open',\n priority: 'Normal',\n title: 'Product Details Page - Variant Component (5)',\n assignee: 'Kathleen Knowles',\n },\n {\n id: 6,\n status: 'Open',\n priority: 'High',\n title: 'Product Details Page - Variant Component (6)',\n assignee: 'Mel Young',\n },\n {\n id: 7,\n status: 'Closed',\n priority: 'Normal',\n title: 'Product Details Page - Variant Component (7)',\n assignee: 'Zahid Allison',\n },\n {\n id: 8,\n status: 'Closed',\n priority: 'High',\n title: 'Product Details Page - Variant Component (8)',\n assignee: 'William Jones',\n },\n ];\n static override styles = [\n css`\n :host {\n display: block;\n width: 90%;\n }\n `,\n ];\n override render() {\n return html`\n <h1>With selection</h1>\n <h3>Multiple selection</h3>\n <hy-table \n @onSelect=${(e:CustomEvent)=>{\n console.log('selected', e.detail.value)\n }} \n @onPaginate=${(e:CustomEvent)=>{\n console.log('page ',e.detail.value)\n }}\n @onSort=${(e:CustomEvent)=>{\n console.log('sorted ', e.detail.value)\n }}\n .headers=\"${this.headers}\" .rows=\"${this.rows}\" .selectionMode=${'multiple'}></hy-table>\n <h3>Single selection</h3>\n <hy-table .headers=\"${this.headers}\" .rows=\"${this.rows}\" .selectionMode=${'single'}></hy-table>\n <h1>With Expandable attribute (title)</h1>\n <hy-table .headers=\"${this.headers}\" .rows=\"${this.rows}\" .expandable=${'title'}></hy-table>\n <h1>With filter: search</h1>\n <hy-table .headers=\"${this.headers}\" .rows=\"${this.rows}\" .withFilter=${true}></hy-table>\n <h3>filter + expandable attribute (priority)</h3>\n <hy-table\n .headers=\"${this.headers}\"\n .rows=\"${this.rows}\"\n .withFilter=${true}\n .expandable=${'priority'}\n @onSelect=${(e:CustomEvent)=>{\n console.log('selected', e.detail.value)\n }}\n @onSearch=${(e:CustomEvent)=>{\n console.log('searched ',e.detail.value)\n }}\n @onSort=${(e:CustomEvent)=>{\n console.log('sorted ', e.detail.value)\n }}\n ></hy-table>\n\n <h1>Sizes</h1>\n <h3>Small size with selection</h3>\n <hy-table\n .headers=\"${this.headers}\"\n .rows=\"${this.rows}\"\n .size=${'small'}\n .selectionMode=${'multiple'}\n ></hy-table>\n <h3>Large size</h3>\n <hy-table .headers=\"${this.headers}\" .rows=\"${this.rows}\" .size=${'large'}></hy-table>\n <h3>Large size with multiple selection</h3>\n <hy-table\n .headers=\"${this.headers}\"\n .rows=\"${this.rows}\"\n .size=${'large'}\n .selectionMode=${'multiple'}\n ></hy-table>\n `;\n }\n}\ncustomElements.define('hy-table-demo', TableDemo);\n"]}
|
package/index.d.ts
ADDED
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
package/index.js
ADDED
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './table.component.js';"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nuralyui/table",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"dayjs": "^1.11.7"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
|
+
},
|
|
13
|
+
"author": "Labidi Aymen",
|
|
14
|
+
"license": "ISC"
|
|
15
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement, PropertyValueMap } from 'lit';
|
|
2
|
+
import './components/hy-table-actions.js';
|
|
3
|
+
import './components/hy-table-filter.js';
|
|
4
|
+
import './components/hy-table-pagination.js';
|
|
5
|
+
import './components/hy-table-content.js';
|
|
6
|
+
import { IHeader, SelectionMode, Sizes, SortAttribute } from './table.types.js';
|
|
7
|
+
export declare class HyTable extends LitElement {
|
|
8
|
+
static styles: import("lit").CSSResult;
|
|
9
|
+
headers: IHeader[];
|
|
10
|
+
rows: [];
|
|
11
|
+
size: Sizes;
|
|
12
|
+
withFilter: boolean;
|
|
13
|
+
expandable: string | undefined;
|
|
14
|
+
selectionMode: SelectionMode | undefined;
|
|
15
|
+
itemPerPage: number[];
|
|
16
|
+
selectedItemPerPage: number;
|
|
17
|
+
displayedRows: never[];
|
|
18
|
+
selectedItems: boolean[];
|
|
19
|
+
currentPage: number;
|
|
20
|
+
rowsCopy: [];
|
|
21
|
+
activeSearch: boolean;
|
|
22
|
+
sortAttribute: SortAttribute;
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
willUpdate(_changedProperties: PropertyValueMap<this>): void;
|
|
25
|
+
_initSelection(): void;
|
|
26
|
+
_initPagination(): void;
|
|
27
|
+
_handleItemPerPage(itemPerPageEvent: CustomEvent): void;
|
|
28
|
+
_handleUpdatePage(updatePageEvent: CustomEvent): void;
|
|
29
|
+
_handleCheckAll(checkAllEvent: CustomEvent): void;
|
|
30
|
+
_handleCheckOne(checkOneEvent: CustomEvent): void;
|
|
31
|
+
_handleSelectOne(selectOneEvent: CustomEvent): void;
|
|
32
|
+
_handleCancelSelection(): void;
|
|
33
|
+
_handleSearch(searchEvent: CustomEvent): void;
|
|
34
|
+
_handleSortOrder(sortOrderEvent: CustomEvent): void;
|
|
35
|
+
_sort(): void;
|
|
36
|
+
_resetSort(): void;
|
|
37
|
+
render(): import("lit").TemplateResult<1>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=table.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.component.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,U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