xv-webcomponents 0.1.26 → 0.1.28
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/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/index-782b9733.js +1535 -0
- package/dist/cjs/index-782b9733.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/utils-aa46f72a.js +50 -0
- package/dist/cjs/utils-aa46f72a.js.map +1 -0
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js +1358 -0
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +22 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-webcomponents.cjs.js +27 -0
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-brands-400.svg +3717 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-duotone-900.svg +15326 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-light-300.svg +12420 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-regular-400.svg +11323 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-solid-900.svg +9653 -0
- package/dist/collection/collection-manifest.json +39 -0
- package/dist/collection/components/xv-accordion/xv-accordion.css +3 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js +163 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js.map +1 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.css +68 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +132 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js.map +1 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.css +3 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +19 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js.map +1 -0
- package/dist/collection/components/xv-button/xv-button-v2.css +154 -0
- package/dist/collection/components/xv-button/xv-button.js +138 -0
- package/dist/collection/components/xv-button/xv-button.js.map +1 -0
- package/dist/collection/components/xv-card/xv-card.css +63 -0
- package/dist/collection/components/xv-card/xv-card.js +122 -0
- package/dist/collection/components/xv-card/xv-card.js.map +1 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +132 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +402 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -0
- package/dist/collection/components/xv-dropdown/_vars.js +2 -0
- package/dist/collection/components/xv-dropdown/_vars.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.css +14 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +151 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +227 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +340 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -0
- package/dist/collection/components/xv-footer/xv-footer.css +230 -0
- package/dist/collection/components/xv-footer/xv-footer.js +37 -0
- package/dist/collection/components/xv-footer/xv-footer.js.map +1 -0
- package/dist/collection/components/xv-header/xv-header.css +22587 -0
- package/dist/collection/components/xv-header/xv-header.js +46 -0
- package/dist/collection/components/xv-header/xv-header.js.map +1 -0
- package/dist/collection/components/xv-link/xv-link.css +61 -0
- package/dist/collection/components/xv-link/xv-link.js +132 -0
- package/dist/collection/components/xv-link/xv-link.js.map +1 -0
- package/dist/collection/components/xv-loader/xv-loader.css +65 -0
- package/dist/collection/components/xv-loader/xv-loader.js +106 -0
- package/dist/collection/components/xv-loader/xv-loader.js.map +1 -0
- package/dist/collection/components/xv-modal/xv-modal.css +98 -0
- package/dist/collection/components/xv-modal/xv-modal.js +202 -0
- package/dist/collection/components/xv-modal/xv-modal.js.map +1 -0
- package/dist/collection/components/xv-notification/_vars.js +8 -0
- package/dist/collection/components/xv-notification/_vars.js.map +1 -0
- package/dist/collection/components/xv-notification/xv-notification.css +112 -0
- package/dist/collection/components/xv-notification/xv-notification.js +118 -0
- package/dist/collection/components/xv-notification/xv-notification.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js +6 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css +45 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +137 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +102 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +202 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/_vars.js +12 -0
- package/dist/collection/components/xv-progress-indicator/_vars.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.css +96 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +54 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.css +45 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +157 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -0
- package/dist/collection/components/xv-table/defs.js +28 -0
- package/dist/collection/components/xv-table/defs.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.css +13 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js +111 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +116 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +199 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.css +80 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js +172 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +46 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +275 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.css +47 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js +78 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table.css +165 -0
- package/dist/collection/components/xv-table/xv-table.js +284 -0
- package/dist/collection/components/xv-table/xv-table.js.map +1 -0
- package/dist/collection/components/xv-tabs/_vars.js +11 -0
- package/dist/collection/components/xv-tabs/_vars.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.css +3 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +65 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tabs.css +79 -0
- package/dist/collection/components/xv-tabs/xv-tabs.js +158 -0
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -0
- package/dist/collection/components/xv-tag/xv-tag.css +97 -0
- package/dist/collection/components/xv-tag/xv-tag.js +158 -0
- package/dist/collection/components/xv-tag/xv-tag.js.map +1 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +154 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +70 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -0
- package/dist/collection/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/scss/xv/images/xv-sprite.svg +1 -0
- package/dist/collection/scss/xv/sprite/images/xv-sprite.svg +1 -0
- package/dist/collection/types/enum.js +9 -0
- package/dist/collection/types/enum.js.map +1 -0
- package/dist/collection/utils/utils.js +46 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/index-83ab73b7.js +1506 -0
- package/dist/esm/index-83ab73b7.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/utils-0d1c18d5.js +44 -0
- package/dist/esm/utils-0d1c18d5.js.map +1 -0
- package/dist/esm/xv-accordion-v2_27.entry.js +1328 -0
- package/dist/esm/xv-accordion-v2_27.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +18 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js.map +1 -0
- package/dist/esm/xv-webcomponents.js +22 -0
- package/dist/esm/xv-webcomponents.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/xv-accordion/xv-accordion.d.ts +20 -0
- package/dist/types/components/xv-accordion-item/xv-accordion-item.d.ts +15 -0
- package/dist/types/components/xv-breadcrumbs/xv-breadcrumbs.d.ts +3 -0
- package/dist/types/components/xv-button/xv-button.d.ts +16 -0
- package/dist/types/components/xv-card/xv-card.d.ts +8 -0
- package/dist/types/components/xv-checkbox/xv-checkbox.d.ts +74 -0
- package/dist/types/components/xv-dropdown/_vars.d.ts +5 -0
- package/dist/types/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.d.ts +17 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +28 -0
- package/dist/types/components/xv-footer/xv-footer.d.ts +6 -0
- package/dist/types/components/xv-header/xv-header.d.ts +6 -0
- package/dist/types/components/xv-link/xv-link.d.ts +9 -0
- package/dist/types/components/xv-loader/xv-loader.d.ts +16 -0
- package/dist/types/components/xv-modal/xv-modal.d.ts +26 -0
- package/dist/types/components/xv-notification/_vars.d.ts +6 -0
- package/dist/types/components/xv-notification/xv-notification.d.ts +11 -0
- package/dist/types/components/xv-overflow-menu/_vars.d.ts +8 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.d.ts +10 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu.d.ts +21 -0
- package/dist/types/components/xv-progress-indicator/_vars.d.ts +9 -0
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.d.ts +6 -0
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator.d.ts +25 -0
- package/dist/types/components/xv-table/defs.d.ts +38 -0
- package/dist/types/components/xv-table/xv-table-col/xv-table-col.d.ts +9 -0
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +24 -0
- package/dist/types/components/xv-table/xv-table-header-row/xv-table-header-row.d.ts +28 -0
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +52 -0
- package/dist/types/components/xv-table/xv-table-toolbar/xv-table-toolbar.d.ts +6 -0
- package/dist/types/components/xv-table/xv-table.d.ts +37 -0
- package/dist/types/components/xv-tabs/_vars.d.ts +7 -0
- package/dist/types/components/xv-tabs/xv-tab/xv-tab.d.ts +5 -0
- package/dist/types/components/xv-tabs/xv-tabs.d.ts +36 -0
- package/dist/types/components/xv-tag/xv-tag.d.ts +11 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +11 -0
- package/dist/types/components.d.ts +1217 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/types/enum.d.ts +7 -0
- package/dist/types/utils/utils.d.ts +17 -0
- package/dist/xv-webcomponents/index.esm.js +2 -0
- package/dist/xv-webcomponents/index.esm.js.map +1 -0
- package/dist/xv-webcomponents/p-07dfeba3.entry.js +2 -0
- package/dist/xv-webcomponents/p-07dfeba3.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-39bf1511.js +2 -0
- package/dist/xv-webcomponents/p-39bf1511.js.map +1 -0
- package/dist/xv-webcomponents/p-5f18d718.entry.js +2 -0
- package/dist/xv-webcomponents/p-5f18d718.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-840929c5.js +3 -0
- package/dist/xv-webcomponents/p-840929c5.js.map +1 -0
- package/dist/xv-webcomponents/p-e1255160.js +2 -0
- package/dist/xv-webcomponents/p-e1255160.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +2 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
:host {
|
|
3
|
+
display: grid;
|
|
4
|
+
align-items: center;
|
|
5
|
+
background-color: var(--layer-accent-01, #F7F7F7);
|
|
6
|
+
transition: height 0.15s cubic-bezier(0.2, 0, 0.38, 0.9), padding 0.15s ease-in-out, background-color 0.2ms ease-in-out;
|
|
7
|
+
color: var(--text-primary, #333);
|
|
8
|
+
font-family: var(--ff-body, Tahoma);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: 700;
|
|
11
|
+
line-height: 128.571%;
|
|
12
|
+
letter-spacing: 0.16px;
|
|
13
|
+
grid-template-columns: var(--xv-table-first-col-size, 0) repeat(var(--xv-table-cols, 1), 1fr);
|
|
14
|
+
}
|
|
15
|
+
:host .left-container {
|
|
16
|
+
height: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: flex-end;
|
|
20
|
+
gap: 16px;
|
|
21
|
+
padding: 0 16px;
|
|
22
|
+
}
|
|
23
|
+
:host ::slotted(xv-table-v2-col) {
|
|
24
|
+
padding: var(--xv-table-padding, 16px);
|
|
25
|
+
box-sizing: content-box !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]) {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
position: relative;
|
|
31
|
+
}
|
|
32
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]):before, :host([sortable]) ::slotted(xv-table-v2-col[sort]):after {
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
line-height: 10px;
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
position: absolute;
|
|
40
|
+
right: 8px;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
transition: 350ms ease-in-out opacity;
|
|
43
|
+
opacity: 0;
|
|
44
|
+
}
|
|
45
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]):before {
|
|
46
|
+
content: "▲";
|
|
47
|
+
top: 50%;
|
|
48
|
+
transform: translateY(calc(-50% - 5px));
|
|
49
|
+
}
|
|
50
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort])::after {
|
|
51
|
+
content: "▼";
|
|
52
|
+
top: 50%;
|
|
53
|
+
transform: translateY(calc(-50% + 5px));
|
|
54
|
+
}
|
|
55
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]:hover),
|
|
56
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]:focus-within),
|
|
57
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort=asc]),
|
|
58
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort=desc]) {
|
|
59
|
+
background-color: var(--layer-accent-hover-01, #E3E3E3);
|
|
60
|
+
}
|
|
61
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]:hover)::before,
|
|
62
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]:focus-within)::before {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]:hover)::after,
|
|
66
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort]:focus-within)::after {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort=asc])::before {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
}
|
|
72
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort=asc])::after {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort=desc])::before {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
:host([sortable]) ::slotted(xv-table-v2-col[sort=desc])::after {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { TABLE_TAG } from "../defs";
|
|
3
|
+
import { forEach, setAttr } from "../../../utils/utils";
|
|
4
|
+
export class XvTableHeaderRow {
|
|
5
|
+
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* Checkbox row selected partially
|
|
8
|
+
*/
|
|
9
|
+
this.partial = false;
|
|
10
|
+
/**
|
|
11
|
+
* Checkbox row checked
|
|
12
|
+
*/
|
|
13
|
+
this.checked = false;
|
|
14
|
+
this.cols = 1;
|
|
15
|
+
this.sortChangeHandle = ({ detail, target }) => {
|
|
16
|
+
// Reset prev selected sort
|
|
17
|
+
forEach(this.el.children, (col) => {
|
|
18
|
+
if (col !== target && col.hasAttribute('sort')) {
|
|
19
|
+
col.setAttribute('sort', 'none');
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
this.sortChange.emit(detail);
|
|
23
|
+
};
|
|
24
|
+
this.slotChangeHandle = () => {
|
|
25
|
+
this.cols = this.el.childElementCount;
|
|
26
|
+
if (this.sortable) {
|
|
27
|
+
this.el.removeEventListener('sortColChange', this.sortChangeHandle.bind(this));
|
|
28
|
+
this.el.addEventListener('sortColChange', this.sortChangeHandle.bind(this));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
this.checkboxChange = (e) => {
|
|
32
|
+
this.checked = e.detail;
|
|
33
|
+
this.partial = false;
|
|
34
|
+
forEach(this.el.parentElement.querySelectorAll(TABLE_TAG.ROW), (row) => {
|
|
35
|
+
if (!row.hasAttribute('disabled')) {
|
|
36
|
+
setAttr(row, 'checked', this.checked);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
return (h(Host, { key: 'caee6dd4e34bd546e779da904c2ade00aca65541', role: "row", cols: this.cols }, h("div", { key: '780da58526356bb241e1af14aee3be693076f8c9', class: "left-container" }, this.selectionName !== undefined && (h("xv-checkbox-v2", { key: 'a91c0b981008fb4808af1dda2d6adf6a6aa9fb53', partial: this.partial, name: this.selectionName, checked: this.checked, onEventChange: this.checkboxChange }))), h("slot", { key: '8e49ed42174d8a393624b8393485a951910713df', onSlotchange: this.slotChangeHandle })));
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
this.el.removeEventListener('sortColChange', this.sortChangeHandle.bind(this));
|
|
46
|
+
}
|
|
47
|
+
static get is() { return "xv-table-v2-header-row"; }
|
|
48
|
+
static get encapsulation() { return "shadow"; }
|
|
49
|
+
static get originalStyleUrls() {
|
|
50
|
+
return {
|
|
51
|
+
"$": ["xv-table-header-row.scss"]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
static get styleUrls() {
|
|
55
|
+
return {
|
|
56
|
+
"$": ["xv-table-header-row.css"]
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static get properties() {
|
|
60
|
+
return {
|
|
61
|
+
"sortable": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "boolean",
|
|
66
|
+
"resolved": "boolean",
|
|
67
|
+
"references": {}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": true,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": "Is sort enabled"
|
|
74
|
+
},
|
|
75
|
+
"getter": false,
|
|
76
|
+
"setter": false,
|
|
77
|
+
"attribute": "sortable",
|
|
78
|
+
"reflect": true
|
|
79
|
+
},
|
|
80
|
+
"selectionName": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "string",
|
|
85
|
+
"resolved": "string",
|
|
86
|
+
"references": {}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": true,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": "Checkbox row name"
|
|
93
|
+
},
|
|
94
|
+
"getter": false,
|
|
95
|
+
"setter": false,
|
|
96
|
+
"attribute": "selection-name",
|
|
97
|
+
"reflect": true
|
|
98
|
+
},
|
|
99
|
+
"partial": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"mutable": true,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "boolean",
|
|
104
|
+
"resolved": "boolean",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "Checkbox row selected partially"
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"attribute": "partial",
|
|
116
|
+
"reflect": true,
|
|
117
|
+
"defaultValue": "false"
|
|
118
|
+
},
|
|
119
|
+
"checked": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"mutable": true,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "boolean",
|
|
124
|
+
"resolved": "boolean",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "Checkbox row checked"
|
|
132
|
+
},
|
|
133
|
+
"getter": false,
|
|
134
|
+
"setter": false,
|
|
135
|
+
"attribute": "checked",
|
|
136
|
+
"reflect": true,
|
|
137
|
+
"defaultValue": "false"
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
static get states() {
|
|
142
|
+
return {
|
|
143
|
+
"cols": {}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
static get events() {
|
|
147
|
+
return [{
|
|
148
|
+
"method": "sortChange",
|
|
149
|
+
"name": "sortChange",
|
|
150
|
+
"bubbles": true,
|
|
151
|
+
"cancelable": true,
|
|
152
|
+
"composed": true,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": ""
|
|
156
|
+
},
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "TableSortData",
|
|
159
|
+
"resolved": "TableSortData",
|
|
160
|
+
"references": {
|
|
161
|
+
"TableSortData": {
|
|
162
|
+
"location": "import",
|
|
163
|
+
"path": "../defs",
|
|
164
|
+
"id": "src/components/xv-table/defs.ts::TableSortData"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}];
|
|
169
|
+
}
|
|
170
|
+
static get elementRef() { return "el"; }
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=xv-table-header-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-table-header-row.js","sourceRoot":"","sources":["../../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cesContent":["import { Component, Host, h, Element, Prop, State, Event, EventEmitter } from '@stencil/core';\nimport { TABLE_TAG, TableSortData } from '../defs';\nimport { forEach, setAttr } from '../../../utils/utils';\n\n@Component({\n tag: 'xv-table-v2-header-row',\n styleUrl: 'xv-table-header-row.scss',\n shadow: true,\n})\nexport class XvTableHeaderRow {\n @Element() el: HTMLElement;\n /**\n * Is sort enabled\n */\n @Prop({ reflect: true }) sortable?: boolean;\n /**\n * Checkbox row name\n */\n @Prop({ reflect: true, attribute: 'selection-name' }) selectionName?: string;\n /**\n * Checkbox row selected partially\n */\n @Prop({ reflect: true, mutable: true }) partial: boolean = false;\n /**\n * Checkbox row checked\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n\n @State() cols: number = 1;\n\n @Event() sortChange: EventEmitter<TableSortData>;\n\n private sortChangeHandle = ({ detail, target }: CustomEvent<TableSortData>) => {\n // Reset prev selected sort\n forEach(this.el.children, (col) => {\n if (col !== target && col.hasAttribute('sort')) {\n col.setAttribute('sort', 'none');\n }\n });\n this.sortChange.emit(detail);\n };\n\n private slotChangeHandle = () => {\n this.cols = this.el.childElementCount;\n if (this.sortable) {\n this.el.removeEventListener('sortColChange', this.sortChangeHandle.bind(this));\n this.el.addEventListener('sortColChange', this.sortChangeHandle.bind(this));\n }\n }\n\n private checkboxChange = (e: CustomEvent<boolean>) => {\n this.checked = e.detail;\n this.partial = false;\n\n forEach(\n this.el.parentElement.querySelectorAll(TABLE_TAG.ROW),\n (row) => {\n if (!row.hasAttribute('disabled')) {\n setAttr(row, 'checked', this.checked);\n }\n },\n );\n }\n\n render() {\n return (\n <Host role=\"row\" cols={this.cols}>\n <div class=\"left-container\">\n {this.selectionName !== undefined && (\n <xv-checkbox-v2\n partial={this.partial}\n name={this.selectionName}\n checked={this.checked}\n onEventChange={this.checkboxChange}\n />\n )}\n </div>\n <slot onSlotchange={this.slotChangeHandle}></slot>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.el.removeEventListener('sortColChange', this.sortChangeHandle.bind(this));\n }\n}\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
:host(xv-table-v2-row) {
|
|
2
|
+
display: grid;
|
|
3
|
+
align-items: center;
|
|
4
|
+
transition: height 0.15s cubic-bezier(0.2, 0, 0.38, 0.9), padding 0.15s ease-in-out, background-color 0.2ms ease-in-out;
|
|
5
|
+
background-color: var(--xv-table-row-bg-color);
|
|
6
|
+
box-shadow: 0 0 0 1px #E3E3E3 inset;
|
|
7
|
+
padding-top: var(--xv-table-padding, 16px);
|
|
8
|
+
padding-bottom: var(--xv-table-padding, 16px);
|
|
9
|
+
grid-template-columns: var(--xv-table-first-col-size, 0) repeat(var(--xv-table-cols, 1), 1fr);
|
|
10
|
+
}
|
|
11
|
+
:host(xv-table-v2-row) .left-container {
|
|
12
|
+
height: 100%;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: flex-end;
|
|
16
|
+
gap: 16px;
|
|
17
|
+
padding: 0 16px;
|
|
18
|
+
}
|
|
19
|
+
:host(xv-table-v2-row) .expand-btn {
|
|
20
|
+
outline: none;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
display: block;
|
|
23
|
+
margin: 0 auto;
|
|
24
|
+
border: solid var(--icon-primary, #131313);
|
|
25
|
+
border-width: 0 1px 1px 0;
|
|
26
|
+
padding: 3px;
|
|
27
|
+
transform: rotate(45deg);
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: opacity 300ms ease-in-out, transform 200ms ease-in-out;
|
|
30
|
+
}
|
|
31
|
+
:host(xv-table-v2-row) .expand-btn:active {
|
|
32
|
+
opacity: 0.5;
|
|
33
|
+
}
|
|
34
|
+
:host(xv-table-v2-row) .expand-btn.expanded {
|
|
35
|
+
margin-top: 4px;
|
|
36
|
+
transform: rotate(225deg);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([disabled]) {
|
|
40
|
+
opacity: 0.4;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
}
|
|
44
|
+
:host([disabled]) ::slotted(xv-table-v2-col) {
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { TABLE_TAG } from "../defs";
|
|
3
|
+
export class XvTableRow {
|
|
4
|
+
constructor() {
|
|
5
|
+
/**
|
|
6
|
+
* Is row will be expandable
|
|
7
|
+
* If it's true then the next row will be collapsed
|
|
8
|
+
*/
|
|
9
|
+
this.expandable = false;
|
|
10
|
+
/**
|
|
11
|
+
* Default state of expandable
|
|
12
|
+
*/
|
|
13
|
+
this.expanded = false;
|
|
14
|
+
/**
|
|
15
|
+
* Disabled status
|
|
16
|
+
*/
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
this.cols = 1;
|
|
19
|
+
this.hovered = false;
|
|
20
|
+
this.checkboxChange = (e) => {
|
|
21
|
+
this.checked = e.detail;
|
|
22
|
+
};
|
|
23
|
+
this.onExpandHandle = async () => {
|
|
24
|
+
this.expanded = !this.expanded;
|
|
25
|
+
const parent = this.el.parentElement;
|
|
26
|
+
if (parent.tagName === TABLE_TAG.EXPAND) {
|
|
27
|
+
await (parent === null || parent === void 0 ? void 0 : parent.toggleExpand(this.expanded));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
checkedChangeHandle() {
|
|
32
|
+
const changeData = {
|
|
33
|
+
name: this.selectionName,
|
|
34
|
+
value: this.value,
|
|
35
|
+
checked: this.checked,
|
|
36
|
+
};
|
|
37
|
+
if (this.expandable || this.groupId) {
|
|
38
|
+
changeData.group = { id: this.groupId, isMainRow: !!this.expandable };
|
|
39
|
+
}
|
|
40
|
+
if (changeData.group) {
|
|
41
|
+
this.checkedGroupChange.emit(changeData);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.checkedChange.emit(changeData);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async componentWillLoad() {
|
|
48
|
+
this.id = this.el.id;
|
|
49
|
+
this.cols = this.el.childElementCount;
|
|
50
|
+
// TODO: with initial checked values
|
|
51
|
+
this.checked && this.checkedChangeHandle();
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
return (h(Host, { key: '0ecaf319abeb4d74f304ce9c87c150d0aafb61f8', role: "row", cols: this.cols }, h("div", { key: '4e5737a8bbb29863419a2eb91cb197fbe5e55d82', class: "left-container" }, this.expandable && (h("button", { key: '66298e7b69b89720a08160d0c922d04edef792c1', onClick: this.onExpandHandle, class: `expand-btn ${this.expanded ? 'expanded' : ''}` })), this.selectionName && (h("xv-checkbox-v2", { key: '4c01f35c763a00cb5f60330307a0be2ab6321db6', disabled: this.disabled, name: this.selectionName, value: this.value, checked: !!(this.checked || this.partial), partial: this.partial, onEventChange: this.checkboxChange }))), h("slot", { key: 'd559c89935cc9de78b712e238a1a08c537b67a5d' })));
|
|
55
|
+
}
|
|
56
|
+
static get is() { return "xv-table-v2-row"; }
|
|
57
|
+
static get encapsulation() { return "shadow"; }
|
|
58
|
+
static get originalStyleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["xv-table-row.scss"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get styleUrls() {
|
|
64
|
+
return {
|
|
65
|
+
"$": ["xv-table-row.css"]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static get properties() {
|
|
69
|
+
return {
|
|
70
|
+
"expandable": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "boolean",
|
|
75
|
+
"resolved": "boolean",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": "Is row will be expandable\nIf it's true then the next row will be collapsed"
|
|
83
|
+
},
|
|
84
|
+
"getter": false,
|
|
85
|
+
"setter": false,
|
|
86
|
+
"attribute": "expandable",
|
|
87
|
+
"reflect": true,
|
|
88
|
+
"defaultValue": "false"
|
|
89
|
+
},
|
|
90
|
+
"expanded": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"mutable": true,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "boolean",
|
|
95
|
+
"resolved": "boolean",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": false,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": "Default state of expandable"
|
|
103
|
+
},
|
|
104
|
+
"getter": false,
|
|
105
|
+
"setter": false,
|
|
106
|
+
"attribute": "expanded",
|
|
107
|
+
"reflect": true,
|
|
108
|
+
"defaultValue": "false"
|
|
109
|
+
},
|
|
110
|
+
"disabled": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "boolean",
|
|
115
|
+
"resolved": "boolean",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Disabled status"
|
|
123
|
+
},
|
|
124
|
+
"getter": false,
|
|
125
|
+
"setter": false,
|
|
126
|
+
"attribute": "disabled",
|
|
127
|
+
"reflect": true,
|
|
128
|
+
"defaultValue": "false"
|
|
129
|
+
},
|
|
130
|
+
"selectionName": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "string",
|
|
135
|
+
"resolved": "string",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": true,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "Checkbox row name"
|
|
143
|
+
},
|
|
144
|
+
"getter": false,
|
|
145
|
+
"setter": false,
|
|
146
|
+
"attribute": "selection-name",
|
|
147
|
+
"reflect": true
|
|
148
|
+
},
|
|
149
|
+
"value": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "string",
|
|
154
|
+
"resolved": "string",
|
|
155
|
+
"references": {}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": true,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": "Checkbox row value"
|
|
162
|
+
},
|
|
163
|
+
"getter": false,
|
|
164
|
+
"setter": false,
|
|
165
|
+
"attribute": "value",
|
|
166
|
+
"reflect": true
|
|
167
|
+
},
|
|
168
|
+
"checked": {
|
|
169
|
+
"type": "boolean",
|
|
170
|
+
"mutable": true,
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "boolean",
|
|
173
|
+
"resolved": "boolean",
|
|
174
|
+
"references": {}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": true,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [],
|
|
180
|
+
"text": "Checkbox row status"
|
|
181
|
+
},
|
|
182
|
+
"getter": false,
|
|
183
|
+
"setter": false,
|
|
184
|
+
"attribute": "checked",
|
|
185
|
+
"reflect": true
|
|
186
|
+
},
|
|
187
|
+
"partial": {
|
|
188
|
+
"type": "boolean",
|
|
189
|
+
"mutable": false,
|
|
190
|
+
"complexType": {
|
|
191
|
+
"original": "boolean",
|
|
192
|
+
"resolved": "boolean",
|
|
193
|
+
"references": {}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": true,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": "Checkbox row with minus icon"
|
|
200
|
+
},
|
|
201
|
+
"getter": false,
|
|
202
|
+
"setter": false,
|
|
203
|
+
"attribute": "partial",
|
|
204
|
+
"reflect": true
|
|
205
|
+
},
|
|
206
|
+
"groupId": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"mutable": false,
|
|
209
|
+
"complexType": {
|
|
210
|
+
"original": "string",
|
|
211
|
+
"resolved": "string",
|
|
212
|
+
"references": {}
|
|
213
|
+
},
|
|
214
|
+
"required": false,
|
|
215
|
+
"optional": true,
|
|
216
|
+
"docs": {
|
|
217
|
+
"tags": [],
|
|
218
|
+
"text": ""
|
|
219
|
+
},
|
|
220
|
+
"getter": false,
|
|
221
|
+
"setter": false,
|
|
222
|
+
"attribute": "group-id",
|
|
223
|
+
"reflect": true
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
static get states() {
|
|
228
|
+
return {
|
|
229
|
+
"id": {},
|
|
230
|
+
"cols": {},
|
|
231
|
+
"hovered": {}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
static get events() {
|
|
235
|
+
return [{
|
|
236
|
+
"method": "checkedChange",
|
|
237
|
+
"name": "checkedChange",
|
|
238
|
+
"bubbles": true,
|
|
239
|
+
"cancelable": true,
|
|
240
|
+
"composed": true,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": ""
|
|
244
|
+
},
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "{ name: string, value?: string; checked: boolean }",
|
|
247
|
+
"resolved": "{ name: string; value?: string; checked: boolean; }",
|
|
248
|
+
"references": {}
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
"method": "checkedGroupChange",
|
|
252
|
+
"name": "checkedGroupChange",
|
|
253
|
+
"bubbles": true,
|
|
254
|
+
"cancelable": true,
|
|
255
|
+
"composed": true,
|
|
256
|
+
"docs": {
|
|
257
|
+
"tags": [],
|
|
258
|
+
"text": ""
|
|
259
|
+
},
|
|
260
|
+
"complexType": {
|
|
261
|
+
"original": "{ name: string, value?: string; checked: boolean }",
|
|
262
|
+
"resolved": "{ name: string; value?: string; checked: boolean; }",
|
|
263
|
+
"references": {}
|
|
264
|
+
}
|
|
265
|
+
}];
|
|
266
|
+
}
|
|
267
|
+
static get elementRef() { return "el"; }
|
|
268
|
+
static get watchers() {
|
|
269
|
+
return [{
|
|
270
|
+
"propName": "checked",
|
|
271
|
+
"methodName": "checkedChangeHandle"
|
|
272
|
+
}];
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=xv-table-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-table-row.js","sourceRoot":"","sources":["../../../../src/components/xv-table/xv-table-row/xv-table-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAErG,OAAO,EAAE,SAAS,EAA2B,MAAM,SAAS,CAAC;AAO7D,MAAM,OAAO,UAAU;IALvB;QAOE;;;WAGG;QACsB,eAAU,GAAY,KAAK,CAAC;QACrD;;WAEG;QACqC,aAAQ,GAAY,KAAK,CAAC;QAClE;;WAEG;QACsB,aAAQ,GAAY,KAAK,CAAC;QAoB1C,SAAI,GAAW,CAAC,CAAC;QACjB,YAAO,GAAY,KAAK,CAAC;QAwB1B,mBAAc,GAAG,CAAC,CAAuB,EAAE,EAAE;YACnD,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;QAC1B,CAAC,CAAA;QAEO,mBAAc,GAAG,KAAK,IAAI,EAAE;YAClC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;YAErC,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,MAAM,EAAE,CAAC;gBACxC,MAAM,CAAC,MAAmC,aAAnC,MAAM,uBAAN,MAA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tD,CACH;gBACA,IAAI,CAAC,aAAa,IAAI,CACrB,uEACE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAE,IAAI,CAAC,aAAa,EACxB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,EACzC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,aAAa,EAAE,IAAI,CAAC,cAAc,GAClC,CACH,CACG;YACN,8DAAQ,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop, State, Event, EventEmitter, Watch } from '@stencil/core';\nimport { XvTableExpand } from '../xv-table-expand/xv-table-expand';\nimport { TABLE_TAG, TableSelectionEventData } from '../defs';\n\n@Component({\n tag: 'xv-table-v2-row',\n styleUrl: 'xv-table-row.scss',\n shadow: true,\n})\nexport class XvTableRow {\n @Element() el: HTMLElement;\n /**\n * Is row will be expandable\n * If it's true then the next row will be collapsed\n */\n @Prop({ reflect: true }) expandable: boolean = false;\n /**\n * Default state of expandable\n */\n @Prop({ reflect: true, mutable: true }) expanded: boolean = false;\n /**\n * Disabled status\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Checkbox row name\n */\n @Prop({ reflect: true, attribute: 'selection-name' }) selectionName?: string;\n /**\n * Checkbox row value\n */\n @Prop({ reflect: true }) value?: string;\n /**\n * Checkbox row status\n */\n @Prop({ reflect: true, mutable: true }) checked?: boolean;\n /**\n * Checkbox row with minus icon\n */\n @Prop({ reflect: true }) partial?: boolean;\n @Prop({ reflect: true, attribute: 'group-id' }) groupId?: string;\n\n @State() id?: string;\n @State() cols: number = 1;\n @State() hovered: boolean = false;\n\n @Event() checkedChange: EventEmitter<{ name: string, value?: string; checked: boolean }>;\n @Event() checkedGroupChange: EventEmitter<{ name: string, value?: string; checked: boolean }>;\n\n @Watch('checked')\n checkedChangeHandle() {\n const changeData: TableSelectionEventData = {\n name: this.selectionName,\n value: this.value,\n checked: this.checked,\n };\n\n if (this.expandable || this.groupId) {\n changeData.group = { id: this.groupId, isMainRow: !!this.expandable };\n }\n\n if (changeData.group) {\n this.checkedGroupChange.emit(changeData);\n } else {\n this.checkedChange.emit(changeData);\n }\n }\n\n private checkboxChange = (e: CustomEvent<boolean>) => {\n this.checked = e.detail;\n }\n\n private onExpandHandle = async () => {\n this.expanded = !this.expanded;\n const parent = this.el.parentElement;\n\n if (parent.tagName === TABLE_TAG.EXPAND) {\n await (parent as unknown as XvTableExpand)?.toggleExpand(this.expanded);\n }\n };\n\n async componentWillLoad(){\n this.id = this.el.id;\n this.cols = this.el.childElementCount;\n // TODO: with initial checked values\n this.checked && this.checkedChangeHandle();\n }\n\n render() {\n return (\n <Host\n role=\"row\"\n cols={this.cols}\n >\n <div class=\"left-container\">\n {this.expandable && (\n <button\n onClick={this.onExpandHandle}\n class={`expand-btn ${this.expanded ? 'expanded' : ''}`}\n />\n )}\n {this.selectionName && (\n <xv-checkbox-v2\n disabled={this.disabled}\n name={this.selectionName}\n value={this.value}\n checked={!!(this.checked || this.partial)}\n partial={this.partial}\n onEventChange={this.checkboxChange}\n />\n )}\n </div>\n <slot />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
font-family: var(--ff-body, Tahoma);
|
|
4
|
+
font-size: var(--fz-md, 14px);
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
line-height: 128.571%;
|
|
8
|
+
letter-spacing: 0.16px;
|
|
9
|
+
}
|
|
10
|
+
:host .toolbar {
|
|
11
|
+
transition: max-height 0.2s ease;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
max-height: 96px;
|
|
14
|
+
margin-bottom: 8px;
|
|
15
|
+
}
|
|
16
|
+
:host .butch-editing {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
flex-wrap: nowrap;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
border-radius: 3px;
|
|
23
|
+
column-gap: var(--gap-md, 16px);
|
|
24
|
+
background-color: var(--interactive-01, #273435);
|
|
25
|
+
color: var(--text-on-color, var(--Text-text-on-color, #FFF));
|
|
26
|
+
transition: max-height 0.2s ease;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
max-height: 0;
|
|
29
|
+
}
|
|
30
|
+
:host .butch-editing_content {
|
|
31
|
+
flex: 1;
|
|
32
|
+
padding: var(--gap-md, 16px) 0 var(--gap-md, 16px) var(--gap-md, 16px);
|
|
33
|
+
}
|
|
34
|
+
:host .butch-editing_selected {
|
|
35
|
+
padding: var(--gap-md, 16px) var(--gap-md, 16px) var(--gap-md, 16px) 0;
|
|
36
|
+
align-self: center;
|
|
37
|
+
text-align: right;
|
|
38
|
+
min-width: 117px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host(.active) .toolbar {
|
|
42
|
+
max-height: 0;
|
|
43
|
+
margin-bottom: 0;
|
|
44
|
+
}
|
|
45
|
+
:host(.active) .butch-editing {
|
|
46
|
+
max-height: 96px;
|
|
47
|
+
}
|