xv-webcomponents 0.1.41 → 0.1.42
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/loader.cjs.js +1 -1
- package/dist/cjs/{xv-accordion-v2_33.cjs.entry.js → xv-accordion-v2_34.cjs.entry.js} +142 -43
- package/dist/cjs/xv-accordion-v2_34.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/xv-data-table/_vars.js +3 -0
- package/dist/collection/components/xv-data-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.css +61 -1
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +104 -2
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js.map +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.css +7 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +101 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.css +67 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +313 -1
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js.map +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table.css +67 -14
- package/dist/collection/components/xv-data-table/xv-data-table.js +19 -35
- package/dist/collection/components/xv-data-table/xv-data-table.js.map +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +1 -1
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +2 -2
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-link/xv-link.css +1 -0
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-number-input/xv-number-input.js +2 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
- package/dist/collection/components/xv-table/_vars.js +0 -6
- package/dist/collection/components/xv-table/_vars.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +4 -4
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
- package/dist/collection/components/xv-table/xv-table.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +1 -1
- package/dist/collection/types/enum.js +6 -0
- package/dist/collection/types/enum.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{xv-accordion-v2_33.entry.js → xv-accordion-v2_34.entry.js} +142 -44
- package/dist/esm/xv-accordion-v2_34.entry.js.map +1 -0
- package/dist/esm/xv-webcomponents.js +1 -1
- package/dist/types/components/xv-data-table/_vars.d.ts +11 -0
- package/dist/types/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.d.ts +7 -0
- package/dist/types/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.d.ts +9 -0
- package/dist/types/components/xv-data-table/xv-data-table-row/xv-data-table-row.d.ts +21 -0
- package/dist/types/components/xv-data-table/xv-data-table.d.ts +2 -2
- package/dist/types/components/xv-table/_vars.d.ts +1 -5
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +2 -1
- package/dist/types/components.d.ts +160 -8
- package/dist/types/types/enum.d.ts +5 -0
- package/dist/xv-webcomponents/p-9c06f44c.entry.js +2 -0
- package/dist/xv-webcomponents/p-9c06f44c.entry.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/xv-accordion-v2_33.cjs.entry.js.map +0 -1
- package/dist/esm/xv-accordion-v2_33.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-ec72208c.entry.js +0 -2
- package/dist/xv-webcomponents/p-ec72208c.entry.js.map +0 -1
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["xv-breadcrumbs-v2.cjs",[[1,"xv-breadcrumbs-v2"]]],["xv-accordion-
|
|
22
|
+
return index.bootstrapLazy([["xv-breadcrumbs-v2.cjs",[[1,"xv-breadcrumbs-v2"]]],["xv-accordion-v2_34.cjs",[[1,"xv-data-table-row",{"variant":[1],"name":[1025],"collapse":[1],"collapsable":[516],"checked":[1028],"partial":[1028],"hover":[1028],"header":[4],"footer":[4],"disabled":[4],"readonly":[4],"required":[4],"value":[8],"collapsed":[32]}],[1,"xv-dropdown-v2",{"disabled":[516],"multiple":[516],"required":[516],"loading":[516],"open":[1540],"error":[513],"label":[513],"helper":[513],"warning":[513],"placeholder":[513],"info":[1],"size":[1],"defaultValue":[8,"default-value"],"selected":[32],"selectedMap":[32]},[[0,"itemSelected","handleItemSelected"]],{"open":["openChangeHandle"]}],[1,"xv-file-uploader",{"label":[1],"description":[1],"addText":[1,"add-text"],"variant":[1],"size":[1],"accept":[16],"maxFileSizeMB":[2,"max-file-size-mb"],"maxFiles":[2,"max-files"],"multiple":[4],"disabled":[516],"files":[1040],"loadingStates":[1040,"loading-states"],"error":[1537],"errors":[1040],"dragActive":[32],"errorMessages":[32]}],[65,"xv-number-input-v2",{"label":[1],"placeholder":[513],"name":[513],"value":[1538],"helper":[1],"error":[8],"warning":[8],"step":[2],"max":[2],"min":[2],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513]}],[1,"xv-table-v2-row",{"checked":[1540],"partial":[1540],"name":[1537],"value":[520],"hover":[1540],"readonly":[516],"required":[516],"disabled":[516],"header":[516],"variant":[1537]},null,{"checked":["checkedChangeHandle"]}],[0,"xv-header",{"htmlContent":[32],"showLoginModal":[32]}],[1,"xv-tab-v2",{"label":[513],"disabled":[516],"loading":[516],"name":[8]}],[1,"xv-table-v2",{"size":[513],"hover":[516],"loading":[516],"colsSize":[16,"colssize"],"selected":[32],"selectedCount":[32]},[[0,"checkedChange","handleCheckedChange"]],{"colsSize":["setColsSizeTemplate"]}],[1,"xv-tabs-v2",{"active":[1544],"loading":[516],"variant":[1],"emptyMessage":[1,"empty-message"],"tabElements":[32],"showArrows":[32]},[[9,"resize","updateArrowVisibility"]]],[65,"xv-text-input-v2",{"type":[1],"label":[1],"placeholder":[513],"name":[513],"value":[1025],"helper":[1],"error":[8],"warning":[8],"readonly":[4],"disabled":[4],"loading":[4],"block":[4],"size":[513]}],[1,"xv-accordion-v2",{"multiple":[4],"xvId":[1,"xv-id"],"value":[1025],"opened":[32],"toggleItem":[64]}],[1,"xv-accordion-v2-item",{"disabled":[4],"label":[1],"value":[1],"isOpen":[32]},[[16,"accordionChange","handleAccordionChange"]]],[1,"xv-card-v2",{"variant":[1],"media":[1],"header":[1],"body":[1],"footer":[1]}],[1,"xv-data-table",{"size":[1],"block":[4],"columnWidths":[16,"column-widths"],"hover":[4]}],[1,"xv-data-table-collapse",{"collapsed":[1540],"setCollapsed":[64]}],[1,"xv-dropdown-v2-item",{"disabled":[4],"value":[1544],"selected":[1540]},[[0,"click","handleClick"]]],[0,"xv-footer",{"htmlContent":[32]}],[1,"xv-link-v2",{"href":[1],"target":[1],"disabled":[4],"size":[1],"variant":[1]}],[1,"xv-modal-v2",{"open":[1540],"permanent":[516],"size":[513],"overflow":[516],"openModal":[64],"closeModal":[64]}],[1,"xv-notification-v2",{"variant":[513],"dismissible":[516]}],[1,"xv-overflow-menu-v2",{"open":[1540],"disabled":[516],"position":[1],"size":[1]},[[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[1,"xv-overflow-menu-v2-item",{"disabled":[516],"value":[520],"variant":[1]},[[0,"click","handleClick"]]],[1,"xv-progress-indicator-v2",{"progress":[514],"variant":[1],"size":[1]},null,{"progress":["updateChildItems"]}],[1,"xv-progress-indicator-v2-item",{"status":[1]}],[1,"xv-table-v2-expand",{"open":[1540],"disabled":[516]}],[1,"xv-tag-v2",{"size":[1],"color":[1],"bg":[1],"disabled":[4],"closeable":[4]}],[1,"xv-toggle-tip",{"open":[1540],"position":[1],"setPopover":[64]},[[4,"click","handleClickOutside"],[0,"keydown","handleKeyDown"]],{"open":["openChangeHandle"]}],[1,"xv-data-table-cell",{"name":[1025],"sort":[1537],"multiline":[2],"width":[1],"align":[1]},[[0,"click","handleSort"]]],[1,"xv-login-modal",{"visible":[4],"oauthProviders":[32],"bookNow":[32],"returnUrl":[32],"passwordLoginEnabled":[32],"oauthLoginEnabled":[32],"passwordRegistrationEnabled":[32],"configurationName":[32],"xvMvcConfigName":[32],"contactUrl":[32]}],[1,"xv-table-v2-cell",{"multiline":[516],"name":[1537],"align":[513],"sort":[1537]},[[0,"click","handleSort"]]],[4,"xv-tooltip-v2",{"message":[1],"position":[1],"visible":[32]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]],[65,"xv-button-v2",{"label":[513],"variant":[513],"size":[513],"disabled":[516],"loading":[516],"block":[516],"type":[513],"hasLeftIcon":[32],"hasRightIcon":[32],"hasContent":[32]}],[65,"xv-checkbox-v2",{"checked":[1540],"indeterminate":[516],"disabled":[516],"name":[513],"value":[513],"readonly":[516],"required":[516],"partial":[516],"label":[1],"size":[513],"error":[520],"hasFocus":[32]},null,{"checked":["onCheckedChange"]}],[1,"xv-loader-v2",{"show":[4],"variant":[1],"size":[1]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"components/xv-checkbox/xv-checkbox.js",
|
|
9
9
|
"components/xv-data-table/xv-data-table.js",
|
|
10
10
|
"components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js",
|
|
11
|
+
"components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js",
|
|
11
12
|
"components/xv-data-table/xv-data-table-row/xv-data-table-row.js",
|
|
12
13
|
"components/xv-dropdown/xv-dropdown.js",
|
|
13
14
|
"components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_vars.js","sourceRoot":"","sources":["../../../src/components/xv-data-table/_vars.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC","sourcesContent":["\nexport interface XvDataTableCheck {\n name: string;\n checked: boolean;\n value?: string | number | object;\n partial?: boolean;\n header?: boolean;\n footer?: boolean;\n expandable?: boolean;\n}\n\nexport const XV_DATA_TABLE_TAG = 'xv-data-table';\nexport const XV_DATA_TABLE_ROW_TAG = 'xv-data-table-row';\n"]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
:host {
|
|
2
3
|
display: table-cell;
|
|
3
4
|
border-style: solid;
|
|
4
|
-
border-width:
|
|
5
|
+
border-left-width: 0;
|
|
6
|
+
border-right-width: 0;
|
|
7
|
+
border-top-width: var(--xv-data-table-border-width, 0);
|
|
8
|
+
border-bottom-width: var(--xv-data-table-border-width, 0);
|
|
5
9
|
border-color: var(--xv-data-table-border-color, transparent);
|
|
6
10
|
padding-inline: var(--xv-data-table-padding-x, 0);
|
|
7
11
|
padding-block: var(--xv-data-table-padding-y, 0);
|
|
@@ -27,4 +31,60 @@
|
|
|
27
31
|
white-space: nowrap;
|
|
28
32
|
overflow: hidden;
|
|
29
33
|
text-overflow: ellipsis;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([sort]) {
|
|
37
|
+
position: relative;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
user-select: none;
|
|
40
|
+
}
|
|
41
|
+
:host([sort]):before, :host([sort]):after {
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
line-height: 10px;
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
position: absolute;
|
|
49
|
+
right: 8px;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
transition: 350ms ease-in-out opacity;
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
:host([sort]):before {
|
|
55
|
+
content: "▲";
|
|
56
|
+
top: 50%;
|
|
57
|
+
transform: translateY(calc(-50% - 5px));
|
|
58
|
+
}
|
|
59
|
+
:host([sort])::after {
|
|
60
|
+
content: "▼";
|
|
61
|
+
top: 50%;
|
|
62
|
+
transform: translateY(calc(-50% + 5px));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host([sort]:hover) {
|
|
66
|
+
background-color: var(--layer-accent-hover-01, #E3E3E3);
|
|
67
|
+
}
|
|
68
|
+
:host([sort]:hover)::before, :host([sort]:hover)::after {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([sort=asc]) {
|
|
73
|
+
background-color: var(--layer-accent-active-01, #D1D1D1);
|
|
74
|
+
}
|
|
75
|
+
:host([sort=asc])::before {
|
|
76
|
+
opacity: 1;
|
|
77
|
+
}
|
|
78
|
+
:host([sort=asc])::after {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([sort=desc]) {
|
|
83
|
+
background-color: var(--layer-accent-active-01, #D1D1D1);
|
|
84
|
+
}
|
|
85
|
+
:host([sort=desc])::before {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
:host([sort=desc])::after {
|
|
89
|
+
opacity: 1;
|
|
30
90
|
}
|
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { forEach, uidGenerator } from "../../../utils/utils";
|
|
3
|
+
import { XV_SORT_DIR } from "../../../types/enum";
|
|
2
4
|
export class XvDataTableCell {
|
|
5
|
+
handleSort() {
|
|
6
|
+
if (this.sort === undefined)
|
|
7
|
+
return;
|
|
8
|
+
let sort = this.sort;
|
|
9
|
+
if (this.sort === '')
|
|
10
|
+
sort = XV_SORT_DIR.NONE;
|
|
11
|
+
this.sort = sort === XV_SORT_DIR.NONE ?
|
|
12
|
+
XV_SORT_DIR.ASC : sort === XV_SORT_DIR.ASC ?
|
|
13
|
+
XV_SORT_DIR.DESC : XV_SORT_DIR.NONE;
|
|
14
|
+
forEach(this.el.parentElement.children, (cell) => {
|
|
15
|
+
if (cell !== this.el && cell.hasAttribute('sort')) {
|
|
16
|
+
cell.setAttribute('sort', 'none');
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
if (!this.name)
|
|
20
|
+
this.name = uidGenerator();
|
|
21
|
+
this.sortChange.emit(this.sort);
|
|
22
|
+
}
|
|
23
|
+
;
|
|
3
24
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: 'bfc254739fa56d47210d43d134ba6c3534c5e567', role: "cell", style: { width: this.width }, class: {
|
|
26
|
+
multiline: this.multiline !== undefined,
|
|
27
|
+
[`align--${this.align}`]: !!this.align
|
|
28
|
+
} }, !this.multiline || isNaN(this.multiline) ? h("slot", null) : (h("div", { class: "line-clamp", style: { ['-webkit-line-clamp']: `${this.multiline}` } }, h("slot", null)))));
|
|
5
29
|
}
|
|
6
30
|
static get is() { return "xv-data-table-cell"; }
|
|
7
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,7 +44,7 @@ export class XvDataTableCell {
|
|
|
20
44
|
"name": {
|
|
21
45
|
"type": "string",
|
|
22
46
|
"attribute": "name",
|
|
23
|
-
"mutable":
|
|
47
|
+
"mutable": true,
|
|
24
48
|
"complexType": {
|
|
25
49
|
"original": "string",
|
|
26
50
|
"resolved": "string",
|
|
@@ -36,6 +60,31 @@ export class XvDataTableCell {
|
|
|
36
60
|
"setter": false,
|
|
37
61
|
"reflect": false
|
|
38
62
|
},
|
|
63
|
+
"sort": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"attribute": "sort",
|
|
66
|
+
"mutable": true,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "XV_SORT_DIR | ''",
|
|
69
|
+
"resolved": "\"\" | XV_SORT_DIR.ASC | XV_SORT_DIR.DESC | XV_SORT_DIR.NONE",
|
|
70
|
+
"references": {
|
|
71
|
+
"XV_SORT_DIR": {
|
|
72
|
+
"location": "import",
|
|
73
|
+
"path": "../../../types/enum",
|
|
74
|
+
"id": "src/types/enum.ts::XV_SORT_DIR"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": true,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": ""
|
|
83
|
+
},
|
|
84
|
+
"getter": false,
|
|
85
|
+
"setter": false,
|
|
86
|
+
"reflect": true
|
|
87
|
+
},
|
|
39
88
|
"multiline": {
|
|
40
89
|
"type": "number",
|
|
41
90
|
"attribute": "multiline",
|
|
@@ -73,8 +122,61 @@ export class XvDataTableCell {
|
|
|
73
122
|
"getter": false,
|
|
74
123
|
"setter": false,
|
|
75
124
|
"reflect": false
|
|
125
|
+
},
|
|
126
|
+
"align": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"attribute": "align",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "'left' | 'right' | 'center'",
|
|
132
|
+
"resolved": "\"center\" | \"left\" | \"right\"",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": true,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": ""
|
|
140
|
+
},
|
|
141
|
+
"getter": false,
|
|
142
|
+
"setter": false,
|
|
143
|
+
"reflect": false
|
|
76
144
|
}
|
|
77
145
|
};
|
|
78
146
|
}
|
|
147
|
+
static get events() {
|
|
148
|
+
return [{
|
|
149
|
+
"method": "sortChange",
|
|
150
|
+
"name": "sortChange",
|
|
151
|
+
"bubbles": true,
|
|
152
|
+
"cancelable": true,
|
|
153
|
+
"composed": true,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [],
|
|
156
|
+
"text": ""
|
|
157
|
+
},
|
|
158
|
+
"complexType": {
|
|
159
|
+
"original": "XV_SORT_DIR",
|
|
160
|
+
"resolved": "XV_SORT_DIR.ASC | XV_SORT_DIR.DESC | XV_SORT_DIR.NONE",
|
|
161
|
+
"references": {
|
|
162
|
+
"XV_SORT_DIR": {
|
|
163
|
+
"location": "import",
|
|
164
|
+
"path": "../../../types/enum",
|
|
165
|
+
"id": "src/types/enum.ts::XV_SORT_DIR"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}];
|
|
170
|
+
}
|
|
171
|
+
static get elementRef() { return "el"; }
|
|
172
|
+
static get listeners() {
|
|
173
|
+
return [{
|
|
174
|
+
"name": "click",
|
|
175
|
+
"method": "handleSort",
|
|
176
|
+
"target": undefined,
|
|
177
|
+
"capture": false,
|
|
178
|
+
"passive": false
|
|
179
|
+
}];
|
|
180
|
+
}
|
|
79
181
|
}
|
|
80
182
|
//# sourceMappingURL=xv-data-table-cell.js.map
|
package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xv-data-table-cell.js","sourceRoot":"","sources":["../../../../src/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"xv-data-table-cell.js","sourceRoot":"","sources":["../../../../src/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,OAAO,eAAe;IAW1B,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO;QACpC,IAAI,IAAI,GAAqB,IAAI,CAAC,IAAI,CAAC;QACvC,IAAI,IAAI,CAAC,IAAI,KAAK,EAAE;YAAE,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;QAE9C,IAAI,CAAC,IAAI,GAAG,IAAI,KAAK,WAAW,CAAC,IAAI,CAAC,CAAC;YACrC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,GAAG,CAAC,CAAC;YAC1C,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;QAExC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/C,IAAI,IAAI,KAAK,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClD,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,IAAI,GAAG,YAAY,EAAE,CAAC;QAC3C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAAA,CAAC;IAEF,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAC5B,KAAK,EAAE;gBACL,SAAS,EAAE,IAAI,CAAC,SAAS,KAAK,SAAS;gBACvC,CAAC,UAAU,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK;aACvC,IAEA,CAAC,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,eAAQ,CAAC,CAAC,CAAC,CACrD,WAAK,KAAK,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,EAAE;YAC5E,eAAQ,CACJ,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Element, h, Host, Listen, Prop } from '@stencil/core';\nimport { forEach, uidGenerator } from '../../../utils/utils';\nimport { XV_SORT_DIR } from '../../../types/enum';\n\n@Component({\n tag: 'xv-data-table-cell',\n styleUrl: 'xv-data-table-cell.scss',\n shadow: true,\n})\nexport class XvDataTableCell {\n @Element() el: HTMLElement;\n @Prop({ mutable: true }) name?: string;\n @Prop({ reflect: true, mutable: true }) sort?: XV_SORT_DIR | '';\n @Prop() multiline: number;\n @Prop() width?: string;\n @Prop() align?: 'left' | 'right' | 'center';\n\n @Event({ eventName: 'sortChange' }) sortChange: EventEmitter<XV_SORT_DIR>;\n\n @Listen('click')\n handleSort() {\n if (this.sort === undefined) return;\n let sort: XV_SORT_DIR | '' = this.sort;\n if (this.sort === '') sort = XV_SORT_DIR.NONE;\n\n this.sort = sort === XV_SORT_DIR.NONE ?\n XV_SORT_DIR.ASC : sort === XV_SORT_DIR.ASC ?\n XV_SORT_DIR.DESC : XV_SORT_DIR.NONE;\n\n forEach(this.el.parentElement.children, (cell) => {\n if (cell !== this.el && cell.hasAttribute('sort')) {\n cell.setAttribute('sort', 'none');\n }\n });\n\n if (!this.name) this.name = uidGenerator();\n this.sortChange.emit(this.sort);\n };\n\n render() {\n return (\n <Host\n role=\"cell\"\n style={{ width: this.width }}\n class={{\n multiline: this.multiline !== undefined,\n [`align--${this.align}`]: !!this.align\n }}\n >\n {!this.multiline || isNaN(this.multiline) ? <slot /> : (\n <div class=\"line-clamp\" style={{ ['-webkit-line-clamp']: `${this.multiline}` }}>\n <slot />\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { XV_DATA_TABLE_ROW_TAG, XV_DATA_TABLE_TAG } from "../_vars";
|
|
3
|
+
export class XvDataTableCollapse {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.collapsed = false;
|
|
6
|
+
}
|
|
7
|
+
async setCollapsed(collapsed) {
|
|
8
|
+
this.collapsed = collapsed;
|
|
9
|
+
this.collapsedChange.emit(this.collapsed);
|
|
10
|
+
return this.collapsed;
|
|
11
|
+
}
|
|
12
|
+
componentWillLoad() {
|
|
13
|
+
const table = this.el.closest(XV_DATA_TABLE_TAG);
|
|
14
|
+
const rows = table.querySelectorAll(XV_DATA_TABLE_ROW_TAG);
|
|
15
|
+
rows.forEach((row) => row === null || row === void 0 ? void 0 : row.setAttribute('collapsable', ''));
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (h(Host, { key: '7704e9d073c449d3efd35bada4f632129378308e', id: this.el.id, part: "xv-collapse", class: this.el.className, collapsed: this.collapsed, expanded: !this.collapsed }, h("slot", { key: 'a9684bbe4c0bf29fdf12c81344236d1b38865fd3' })));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "xv-data-table-collapse"; }
|
|
21
|
+
static get encapsulation() { return "shadow"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["xv-data-table-collapse.scss"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["xv-data-table-collapse.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get properties() {
|
|
33
|
+
return {
|
|
34
|
+
"collapsed": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"attribute": "collapsed",
|
|
37
|
+
"mutable": true,
|
|
38
|
+
"complexType": {
|
|
39
|
+
"original": "boolean",
|
|
40
|
+
"resolved": "boolean",
|
|
41
|
+
"references": {}
|
|
42
|
+
},
|
|
43
|
+
"required": false,
|
|
44
|
+
"optional": false,
|
|
45
|
+
"docs": {
|
|
46
|
+
"tags": [],
|
|
47
|
+
"text": ""
|
|
48
|
+
},
|
|
49
|
+
"getter": false,
|
|
50
|
+
"setter": false,
|
|
51
|
+
"reflect": true,
|
|
52
|
+
"defaultValue": "false"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get events() {
|
|
57
|
+
return [{
|
|
58
|
+
"method": "collapsedChange",
|
|
59
|
+
"name": "collapsedChange",
|
|
60
|
+
"bubbles": true,
|
|
61
|
+
"cancelable": true,
|
|
62
|
+
"composed": true,
|
|
63
|
+
"docs": {
|
|
64
|
+
"tags": [],
|
|
65
|
+
"text": ""
|
|
66
|
+
},
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "boolean",
|
|
69
|
+
"resolved": "boolean",
|
|
70
|
+
"references": {}
|
|
71
|
+
}
|
|
72
|
+
}];
|
|
73
|
+
}
|
|
74
|
+
static get methods() {
|
|
75
|
+
return {
|
|
76
|
+
"setCollapsed": {
|
|
77
|
+
"complexType": {
|
|
78
|
+
"signature": "(collapsed: boolean) => Promise<boolean>",
|
|
79
|
+
"parameters": [{
|
|
80
|
+
"name": "collapsed",
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"docs": ""
|
|
83
|
+
}],
|
|
84
|
+
"references": {
|
|
85
|
+
"Promise": {
|
|
86
|
+
"location": "global",
|
|
87
|
+
"id": "global::Promise"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"return": "Promise<boolean>"
|
|
91
|
+
},
|
|
92
|
+
"docs": {
|
|
93
|
+
"text": "",
|
|
94
|
+
"tags": []
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static get elementRef() { return "el"; }
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=xv-data-table-collapse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-data-table-collapse.js","sourceRoot":"","sources":["../../../../src/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOpE,MAAM,OAAO,mBAAmB;IALhC;QAO0C,cAAS,GAAY,KAAK,CAAC;KA4BpE;IAxBC,KAAK,CAAC,YAAY,CAAC,SAAkB;QACnC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAE1C,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,iBAAiB;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,KAAK,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;QAC3D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,YAAY,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,EACd,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,SAAS,EACxB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS;YAC7B,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, Method, Event, EventEmitter } from '@stencil/core';\nimport { XV_DATA_TABLE_ROW_TAG, XV_DATA_TABLE_TAG } from '../_vars';\n\n@Component({\n tag: 'xv-data-table-collapse',\n styleUrl: 'xv-data-table-collapse.scss',\n shadow: true,\n})\nexport class XvDataTableCollapse {\n @Element() el: HTMLElement;\n @Prop({ reflect: true, mutable: true }) collapsed: boolean = false;\n @Event({ eventName: 'collapsedChange' }) collapsedChange: EventEmitter<boolean>;\n\n @Method()\n async setCollapsed(collapsed: boolean): Promise<boolean> {\n this.collapsed = collapsed;\n this.collapsedChange.emit(this.collapsed);\n\n return this.collapsed;\n }\n\n componentWillLoad() {\n const table = this.el.closest(XV_DATA_TABLE_TAG);\n const rows = table.querySelectorAll(XV_DATA_TABLE_ROW_TAG);\n rows.forEach((row) => row?.setAttribute('collapsable', ''));\n }\n\n render() {\n return (\n <Host id={this.el.id}\n part=\"xv-collapse\"\n class={this.el.className}\n collapsed={this.collapsed}\n expanded={!this.collapsed}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,4 +1,71 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: table-row;
|
|
3
3
|
background-color: var(--xv-data-table-row-bg, transparent);
|
|
4
|
+
transition: 0.2s ease-in-out background-color;
|
|
5
|
+
}
|
|
6
|
+
:host .cell-control {
|
|
7
|
+
font-size: 8px;
|
|
8
|
+
max-width: 16px;
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-left: calc(var(--xv-data-table-padding-x) + var(--xv-data-table-padding-x) + 10px + 1em);
|
|
11
|
+
overflow: visible;
|
|
12
|
+
}
|
|
13
|
+
:host .cell-control_collapse {
|
|
14
|
+
font-size: inherit;
|
|
15
|
+
width: 1em;
|
|
16
|
+
height: 1em;
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
position: absolute;
|
|
20
|
+
overflow: visible;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
outline: none;
|
|
23
|
+
top: calc(50% - 0.7em);
|
|
24
|
+
left: var(--xv-data-table-padding-x);
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
border-top: none;
|
|
27
|
+
border-left: none;
|
|
28
|
+
border-right: 2px solid var(--icon-primary, #333);
|
|
29
|
+
border-bottom: 2px solid var(--icon-primary, #333);
|
|
30
|
+
transform: rotate(45deg);
|
|
31
|
+
transform-origin: center center;
|
|
32
|
+
transition: 0.2s ease-in-out transform, 0.2s ease-in-out opacity;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
box-sizing: content-box;
|
|
35
|
+
}
|
|
36
|
+
:host .cell-control_collapse:active {
|
|
37
|
+
opacity: 0.4;
|
|
38
|
+
}
|
|
39
|
+
:host .cell-control_collapse.open {
|
|
40
|
+
transform: rotate(-135deg);
|
|
41
|
+
}
|
|
42
|
+
:host .cell-control_checkbox {
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(.hover:not([header]):hover) {
|
|
47
|
+
background-color: var(--layer-hover-01, #E9E9E9);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([header]) {
|
|
51
|
+
background-color: var(--layer-accent-01, #F7F7F7);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host(.checked) {
|
|
55
|
+
background-color: var(--layer-selected-01, #E3E3E3);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host(.hover.checked:hover) {
|
|
59
|
+
background-color: var(--layer-selected-hover-01, #DADADA);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([footer]),
|
|
63
|
+
:host([footer]:hover),
|
|
64
|
+
:host([footer].hover),
|
|
65
|
+
:host([footer].hover:hover) {
|
|
66
|
+
background-color: var(--layer-accent-02, #E3E3E3);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:host([disabled]) {
|
|
70
|
+
opacity: 0.5;
|
|
4
71
|
}
|