@genexus/genexus-ide-ui 0.0.30 → 0.0.31
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/ch-action-group_2.cjs.entry.js +2 -9
- package/dist/cjs/ch-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ch-dropdown-item.cjs.entry.js +8 -8
- package/dist/cjs/ch-dropdown.cjs.entry.js +11 -10
- package/dist/cjs/ch-suggest_4.cjs.entry.js +1 -0
- package/dist/cjs/ch-test-action-group.cjs.entry.js +2 -2
- package/dist/cjs/ch-test-tree-x.cjs.entry.js +150 -80
- package/dist/cjs/ch-tree-x_3.cjs.entry.js +211 -132
- package/dist/cjs/ch-window_2.cjs.entry.js +28 -12
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +1 -1
- package/dist/cjs/gxg-combo-box_6.cjs.entry.js +10 -4
- package/dist/cjs/gxg-date-picker.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/team-dev-commit/team-dev-commit.js +1 -1
- package/dist/components/action-group-item.js +1 -9
- package/dist/components/action-group.js +1 -1
- package/dist/components/ch-suggest2.js +1 -0
- package/dist/components/ch-test-action-group.js +2 -2
- package/dist/components/ch-test-tree-x.js +157 -83
- package/dist/components/ch-window2.js +31 -13
- package/dist/components/checkbox.js +1 -1
- package/dist/components/combo-box-item.js +2 -2
- package/dist/components/combo-box.js +8 -2
- package/dist/components/dropdown-item.js +8 -8
- package/dist/components/dropdown.js +11 -10
- package/dist/components/gx-ide-team-dev-commit.js +1 -1
- package/dist/components/gxg-date-picker.js +4 -4
- package/dist/components/tree-x-list-item.js +31 -17
- package/dist/components/tree-x-list.js +9 -4
- package/dist/components/tree-x.js +182 -117
- package/dist/esm/ch-action-group_2.entry.js +2 -9
- package/dist/esm/ch-checkbox.entry.js +1 -1
- package/dist/esm/ch-dropdown-item.entry.js +8 -8
- package/dist/esm/ch-dropdown.entry.js +11 -10
- package/dist/esm/ch-suggest_4.entry.js +1 -0
- package/dist/esm/ch-test-action-group.entry.js +2 -2
- package/dist/esm/ch-test-tree-x.entry.js +150 -80
- package/dist/esm/ch-tree-x_3.entry.js +211 -132
- package/dist/esm/ch-window_2.entry.js +28 -12
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +1 -1
- package/dist/esm/gxg-combo-box_6.entry.js +10 -4
- package/dist/esm/gxg-date-picker.entry.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.css +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/p-1fe05a05.entry.js +1 -0
- package/dist/genexus-ide-ui/p-24f47ee2.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-54bab171.entry.js → p-28d0afda.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-6050cdba.entry.js → p-48412811.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-714bd8ea.entry.js +1 -0
- package/dist/genexus-ide-ui/p-8c2ab053.entry.js +1 -0
- package/dist/genexus-ide-ui/p-976e8118.entry.js +1 -0
- package/dist/genexus-ide-ui/p-a5463fc9.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-cda1623a.entry.js → p-b54f448c.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-bb1809cb.entry.js +1 -0
- package/dist/genexus-ide-ui/p-cf41f154.entry.js +1 -0
- package/dist/genexus-ide-ui/p-e8a21ed7.entry.js +1 -0
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/action-group-item/action-group-item.css +0 -1
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/checkbox/checkbox.css +5 -3
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown/dropdown.css +15 -33
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/dropdown-item/dropdown-item.css +0 -4
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/test/test-tree-x.css +0 -10
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/tree-x/tree-x.css +20 -3
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/tree-x-list-item/tree-x-list-item.css +25 -8
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/window/ch-window.css +51 -2
- package/dist/node_modules/@genexus/gemini/dist/collection/components/combo-box-item/combo-box-item.css +1 -1
- package/package.json +3 -3
- package/dist/genexus-ide-ui/p-097a3eeb.entry.js +0 -1
- package/dist/genexus-ide-ui/p-3d9a4ede.entry.js +0 -1
- package/dist/genexus-ide-ui/p-4bbe1c18.entry.js +0 -1
- package/dist/genexus-ide-ui/p-5c64c57f.entry.js +0 -1
- package/dist/genexus-ide-ui/p-5ff04ebe.entry.js +0 -1
- package/dist/genexus-ide-ui/p-757f8567.entry.js +0 -1
- package/dist/genexus-ide-ui/p-8d46f8d8.entry.js +0 -1
- package/dist/genexus-ide-ui/p-a0e85c2a.entry.js +0 -1
- package/dist/genexus-ide-ui/p-f8561da6.entry.js +0 -1
|
@@ -77,9 +77,9 @@ const GxgDatePicker$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
//default date
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
value.getFullYear();
|
|
81
|
+
value.getMonth();
|
|
82
|
+
value.getDate();
|
|
83
83
|
//min date
|
|
84
84
|
const minDate = this.minDate ? new Date(this.minDate) : undefined;
|
|
85
85
|
const minDateYear = minDate === null || minDate === void 0 ? void 0 : minDate.getFullYear();
|
|
@@ -144,7 +144,7 @@ const GxgDatePicker$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
144
144
|
overlayPlaceholder: "Enter a 4-digit year",
|
|
145
145
|
// Settings.
|
|
146
146
|
alwaysShow: this.alwaysShow,
|
|
147
|
-
dateSelected: new Date(valueYear, valueMonth, valueDay),
|
|
147
|
+
//dateSelected: new Date(valueYear, valueMonth, valueDay),
|
|
148
148
|
maxDate: maxDate && new Date(maxDateYear, maxDateMonth, maxDateDay),
|
|
149
149
|
minDate: minDate && new Date(minDateYear, minDateMonth, minDateDay),
|
|
150
150
|
startDate: this.value,
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, writeTask, Host } from
|
|
|
2
2
|
import { m as mouseEventModifierKey } from './helpers.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './checkbox.js';
|
|
4
4
|
|
|
5
|
-
const treeXListItemCss = ":where(button){all:unset;display:flex;cursor:pointer;user-select:none;touch-action:manipulation;-webkit-user-drag:element}*,::before,::after{box-sizing:border-box}:host{--checkbox-size:1em;--expandable-button-width:
|
|
5
|
+
const treeXListItemCss = ":where(button){all:unset;display:flex;cursor:pointer;user-select:none;touch-action:manipulation;-webkit-user-drag:element}*,::before,::after{box-sizing:border-box}:host{--checkbox-size:1em;--expandable-button-width:0.75em;--ch-tree-x-list-item-dashed-line--offset:0px;--tab-width:calc(\n var(--checkbox-size) + var(--expandable-button-width) +\n (5px * 2)\n );display:grid;grid-template-rows:min-content;overflow:hidden}.header{--own-offset:0px;display:flex;align-items:center;min-height:calc(1em + 6px);padding-inline-start:var(--padding-inline-start)}.header--disabled{opacity:0.5;pointer-events:none}.header--even{--padding-inline-start:calc(\n var(--parent-padding-inline-start--odd, 0px) + var(--tab-width)\n )}.header--even+.expandable{--parent-padding-inline-start--even:calc(\n var(--parent-padding-inline-start--odd, 0px) + var(--tab-width)\n )}.header--even .dashed-line{--inset-inline-start:calc(\n var(--parent-padding-inline-start--odd, 0px) +\n var(--parent-checkbox-offset) + var(--parent-expandable-offset)\n )}.header--even-expandable{--padding-inline-start:calc(\n var(--parent-padding-inline-start--odd, 0px) + var(--tab-width) - calc(\n var(--expandable-button-width) + 5px\n )\n )}.header--even-expandable+.expandable{--parent-padding-inline-start--even:calc(\n var(--parent-padding-inline-start--odd, 0px) + var(--tab-width) - calc(\n var(--expandable-button-width) + 5px\n )\n )}.header--odd{--padding-inline-start:calc(\n var(--parent-padding-inline-start--even, 0px) + var(--tab-width)\n )}.header--odd+.expandable{--parent-padding-inline-start--odd:calc(\n var(--parent-padding-inline-start--even, 0px) + var(--tab-width)\n )}.header--odd .dashed-line{--inset-inline-start:calc(\n var(--parent-padding-inline-start--even, 0px) +\n var(--parent-checkbox-offset) + var(--parent-expandable-offset)\n )}.header--odd-expandable{--padding-inline-start:calc(\n var(--parent-padding-inline-start--even, 0px) + var(--tab-width) - calc(\n var(--expandable-button-width) + 5px\n )\n )}.header--odd-expandable+.expandable{--parent-padding-inline-start--odd:calc(\n var(--parent-padding-inline-start--even, 0px) + var(--tab-width) - calc(\n var(--expandable-button-width) + 5px\n )\n )}.header--level-0{--padding-inline-start:0px}.header--level-0+.expandable{--parent-padding-inline-start--even:0px}.header--expandable-offset{--own-offset:calc(\n var(--expandable-button-width) + 5px\n )}.header--expandable-offset+.expandable{--parent-expandable-offset:calc(var(--expandable-button-width) / 2)}.header--checkbox-offset+.expandable{--parent-checkbox-offset:calc(var(--checkbox-size) / 2);--parent-negative-checkbox-offset:calc(var(--checkbox-size) / 2)}.dashed-line{position:absolute;inset-inline-start:calc( var(--inset-inline-start) + var(--ch-tree-x-list-item-dashed-line--offset) );height:1px;width:calc( var(--tab-width) - var(--parent-checkbox-offset) - var(--parent-expandable-offset) - var(--own-offset) - var(--ch-tree-x-list-item-dashed-line--offset) - 4px );border:0 dashed #a9a9a9;border-block-end-width:1px;pointer-events:none;content-visibility:hidden;z-index:1}.last-all-line{inset-block-start:0;height:calc(100% - var(--distance-to-checkbox));border-inline-start-width:1px;border-end-start-radius:2px}.last-line{inset-block-start:0;height:100%;border-inline-start-width:1px;border-style:solid;border-block-end:unset}.expandable-button{display:grid;place-items:center;width:var(--expandable-button-width);height:var(--expandable-button-width);margin-inline-end:5px;z-index:1;content-visibility:auto;contain-intrinsic-size:auto var(--expandable-button-width)}.expandable-button::before{content:\"\";width:calc(100% - 2px);height:calc(100% - 2px);background-color:currentColor;-webkit-mask-size:calc(var(--expandable-button-width) - 2px)}.expandable-button--collapsed::before{-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.15,8.5H8.54v5.61h-1V8.5H1.93v-1H7.54V1.89h1V7.5h5.61Z\"/></svg>')}.expandable-button--expanded::before{-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.15,8.5H1.93v-1H14.15Z\"/></svg>')}.expandable-button:focus-visible{outline:1px solid #000}.checkbox{margin-inline-end:5px}.checkbox::part(container){width:var(--checkbox-size);height:var(--checkbox-size)}.action{display:grid;grid-template:\"left-img text right-img\"/max-content 1fr max-content;align-items:center;height:100%;flex:1}.readonly-mode{padding-block:0.75px}.left-img,.right-img{display:block;width:0.875em;height:0.875em;content-visibility:auto;contain-intrinsic-size:auto 0.875em}.left-img{grid-area:left-img;margin-inline-end:5px}.right-img{grid-area:right-img;margin-inline-start:5px}.edit-name{grid-area:text;width:100%;height:100%;background-color:unset;padding:0;margin:0;border:1px solid currentColor;font:unset;outline:unset}.downloading{width:0.75em;height:0.75em;margin-inline-start:8px;border:2px solid currentColor;border-inline-start-color:transparent;border-radius:50%;opacity:0.75;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.expandable{--parent-expandable-offset:0px;--parent-negative-checkbox-offset:0px;--parent-checkbox-offset:0px;display:grid;grid-template-rows:0fr;content-visibility:auto;contain-intrinsic-size:auto 100px}.expanded{grid-template-rows:1fr}:not(.expanded) ::slotted([slot=tree]){display:none;overflow:hidden;content-visibility:hidden}";
|
|
6
6
|
|
|
7
7
|
const resetDragImage = new Image();
|
|
8
8
|
// Selectors
|
|
@@ -26,7 +26,6 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
26
26
|
this.checkboxChange = createEvent(this, "checkboxChange", 7);
|
|
27
27
|
this.itemDragStart = createEvent(this, "itemDragStart", 7);
|
|
28
28
|
this.itemDragEnd = createEvent(this, "itemDragEnd", 7);
|
|
29
|
-
this.itemDrop = createEvent(this, "itemDrop", 7);
|
|
30
29
|
this.loadLazyContent = createEvent(this, "loadLazyContent", 7);
|
|
31
30
|
this.modifyCaption = createEvent(this, "modifyCaption", 7);
|
|
32
31
|
this.selectedItemChange = createEvent(this, "selectedItemChange", 7);
|
|
@@ -43,6 +42,11 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
43
42
|
* Only works if `checkbox = true`
|
|
44
43
|
*/
|
|
45
44
|
this.checked = false;
|
|
45
|
+
/**
|
|
46
|
+
* Set this attribute if you want to set a custom render for the control, by
|
|
47
|
+
* passing a slot.
|
|
48
|
+
*/
|
|
49
|
+
this.customRender = false;
|
|
46
50
|
/**
|
|
47
51
|
* This attribute lets you specify if the element is disabled.
|
|
48
52
|
* If disabled, it will not fire any user interaction related event
|
|
@@ -108,7 +112,7 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
108
112
|
* `true` to display the relation between tree items and tree lists using
|
|
109
113
|
* lines.
|
|
110
114
|
*/
|
|
111
|
-
this.showLines =
|
|
115
|
+
this.showLines = "none";
|
|
112
116
|
/**
|
|
113
117
|
* Set this attribute if you want all the children item's checkboxes to be
|
|
114
118
|
* checked when the parent item checkbox is checked, or to be unchecked when
|
|
@@ -165,6 +169,7 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
165
169
|
goToReference: false,
|
|
166
170
|
id: this.el.id,
|
|
167
171
|
itemRef: this.el,
|
|
172
|
+
metadata: this.metadata,
|
|
168
173
|
parentId: this.el.parentElement.parentElement.id,
|
|
169
174
|
selected: true
|
|
170
175
|
});
|
|
@@ -217,14 +222,14 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
217
222
|
};
|
|
218
223
|
this.renderImg = (cssClass, src) => (h("img", { "aria-hidden": "true", class: cssClass, part: cssClass, alt: "", src: src, loading: "lazy" }));
|
|
219
224
|
this.handleDragStart = (event) => {
|
|
220
|
-
event.stopPropagation();
|
|
221
225
|
// Disallow drag when editing the caption
|
|
222
226
|
if (this.editing) {
|
|
223
227
|
event.preventDefault();
|
|
224
228
|
return;
|
|
225
229
|
}
|
|
230
|
+
// Remove drag image
|
|
226
231
|
event.dataTransfer.setDragImage(resetDragImage, 0, 0);
|
|
227
|
-
|
|
232
|
+
event.dataTransfer.effectAllowed = "move";
|
|
228
233
|
this.dragState = "start";
|
|
229
234
|
this.itemDragStart.emit({
|
|
230
235
|
elem: this.el,
|
|
@@ -237,13 +242,8 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
237
242
|
this.dragState = "none";
|
|
238
243
|
this.itemDragEnd.emit();
|
|
239
244
|
};
|
|
240
|
-
this.handleDrop = (
|
|
241
|
-
event.stopPropagation();
|
|
245
|
+
this.handleDrop = () => {
|
|
242
246
|
this.dragState = "none";
|
|
243
|
-
this.itemDrop.emit({
|
|
244
|
-
dropItemId: this.el.id,
|
|
245
|
-
dataTransfer: event.dataTransfer
|
|
246
|
-
});
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
249
|
updateChildrenCheckedValue(newValue) {
|
|
@@ -446,6 +446,7 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
446
446
|
goToReference: false,
|
|
447
447
|
id: this.el.id,
|
|
448
448
|
itemRef: this.el,
|
|
449
|
+
metadata: this.metadata,
|
|
449
450
|
parentId: this.el.parentElement.parentElement.id,
|
|
450
451
|
selected: selected
|
|
451
452
|
});
|
|
@@ -458,6 +459,7 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
458
459
|
goToReference: goToReference,
|
|
459
460
|
id: this.el.id,
|
|
460
461
|
itemRef: this.el,
|
|
462
|
+
metadata: this.metadata,
|
|
461
463
|
parentId: this.el.parentElement.parentElement.id,
|
|
462
464
|
selected: true
|
|
463
465
|
});
|
|
@@ -508,11 +510,13 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
508
510
|
const expandableButtonNotVisible = !this.leaf && !this.showExpandableButton;
|
|
509
511
|
const acceptDrop = !this.leaf && this.dragState !== "start";
|
|
510
512
|
const hasContent = !this.leaf && !this.lazyLoad;
|
|
513
|
+
const showAllLines = this.showLines === "all" && this.level !== 0;
|
|
514
|
+
const showLastLine = this.showLines === "last" && this.level !== 0 && this.lastItem;
|
|
511
515
|
return (h(Host, { role: "treeitem", "aria-selected": this.selected ? "true" : null, class: {
|
|
512
516
|
[TREE_ITEM_TAG_NAME + "--downloading"]: this.downloading,
|
|
513
517
|
[TREE_ITEM_TAG_NAME + "--editing"]: this.editing,
|
|
514
518
|
[TREE_ITEM_TAG_NAME + "--drag-" + this.dragState]: this.dragState !== "none" && this.dragState !== "start",
|
|
515
|
-
[TREE_ITEM_TAG_NAME + "--
|
|
519
|
+
[TREE_ITEM_TAG_NAME + "--deny-drop"]: this.leaf
|
|
516
520
|
}, style: { "--level": `${this.level}` },
|
|
517
521
|
// Drag and drop
|
|
518
522
|
onDrop: acceptDrop ? this.handleDrop : null }, h("button", { "aria-controls": hasContent ? EXPANDABLE_ID : null, "aria-expanded": hasContent ? this.expanded.toString() : null, class: {
|
|
@@ -532,10 +536,18 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
532
536
|
"expandable-button": true,
|
|
533
537
|
"expandable-button--expanded": this.expanded,
|
|
534
538
|
"expandable-button--collapsed": !this.expanded
|
|
535
|
-
}, part: `expandable-button${this.disabled ? " disabled" : ""}${this.expanded ? " expanded" : " collapsed"}`, disabled: this.disabled, onClick: this.toggleExpand })), this.checkbox && (h("ch-checkbox", { accessibleName: this.caption, class: "checkbox", part: `checkbox${this.disabled ? " disabled" : ""}${this.checked ? " checked" : ""}${this.indeterminate ? " indeterminate" : ""}`, checkedValue: "true", disabled: this.disabled, indeterminate: this.indeterminate, unCheckedValue: "false", value: `${this.checked}`, onInput: this.handleCheckedChange })), h("
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
+
}, part: `expandable-button${this.disabled ? " disabled" : ""}${this.expanded ? " expanded" : " collapsed"}`, disabled: this.disabled, onClick: this.toggleExpand })), this.checkbox && (h("ch-checkbox", { accessibleName: this.caption, class: "checkbox", part: `checkbox${this.disabled ? " disabled" : ""}${this.checked ? " checked" : ""}${this.indeterminate ? " indeterminate" : ""}`, checkedValue: "true", disabled: this.disabled, indeterminate: this.indeterminate, unCheckedValue: "false", value: `${this.checked}`, onInput: this.handleCheckedChange })), this.customRender ? (h("slot", { name: "custom-content" })) : ([
|
|
540
|
+
h("div", { class: {
|
|
541
|
+
action: true,
|
|
542
|
+
"readonly-mode": !this.editing
|
|
543
|
+
}, part: `action ${!this.editing ? "readonly-mode" : ""}`, onDblClick: !this.leaf && !this.editing ? this.handleActionDblClick : null }, this.leftImgSrc && this.renderImg("left-img", this.leftImgSrc), this.editing ? (h("input", { class: "edit-name", part: "edit-name", disabled: this.disabled, type: "text", value: this.caption, onBlur: this.removeEditMode(false), onKeyDown: this.checkIfShouldRemoveEditMode, ref: el => (this.inputRef = el) })) : (this.caption), this.rightImgSrc &&
|
|
544
|
+
this.renderImg("right-img", this.rightImgSrc)),
|
|
545
|
+
this.showDownloadingSpinner && !this.leaf && this.downloading && (h("div", { class: "downloading", part: "downloading" }))
|
|
546
|
+
]), (showAllLines || showLastLine) && (h("div", { class: {
|
|
547
|
+
"dashed-line": true,
|
|
548
|
+
"last-all-line": showAllLines && this.lastItem,
|
|
549
|
+
"last-line": showLastLine
|
|
550
|
+
}, part: `dashed-line${this.lastItem ? " last-all-line" : ""}` }))), hasContent && (h("div", { "aria-busy": this.downloading.toString(), "aria-live": this.downloading ? "polite" : null, id: EXPANDABLE_ID, class: { expandable: true, expanded: this.expanded }, part: `expandable${this.expanded ? " expanded" : ""}` }, h("slot", { name: "tree" })))));
|
|
539
551
|
}
|
|
540
552
|
get el() { return this; }
|
|
541
553
|
static get watchers() { return {
|
|
@@ -550,6 +562,7 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
550
562
|
"caption": [1],
|
|
551
563
|
"checkbox": [4],
|
|
552
564
|
"checked": [1540],
|
|
565
|
+
"customRender": [4, "custom-render"],
|
|
553
566
|
"disabled": [516],
|
|
554
567
|
"dragState": [1025, "drag-state"],
|
|
555
568
|
"downloading": [4],
|
|
@@ -561,11 +574,12 @@ const ChTreeXListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
561
574
|
"leftImgSrc": [1, "left-img-src"],
|
|
562
575
|
"level": [1026],
|
|
563
576
|
"indeterminate": [1028],
|
|
577
|
+
"metadata": [1],
|
|
564
578
|
"rightImgSrc": [1, "right-img-src"],
|
|
565
579
|
"selected": [1540],
|
|
566
580
|
"showDownloadingSpinner": [4, "show-downloading-spinner"],
|
|
567
581
|
"showExpandableButton": [4, "show-expandable-button"],
|
|
568
|
-
"showLines": [
|
|
582
|
+
"showLines": [1025, "show-lines"],
|
|
569
583
|
"toggleCheckboxes": [4, "toggle-checkboxes"],
|
|
570
584
|
"focusNextItem": [64],
|
|
571
585
|
"focusNextSibling": [64],
|
|
@@ -19,8 +19,13 @@ const ChTreeListX = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
19
19
|
* `true` to display the relation between tree items and tree lists using
|
|
20
20
|
* lines.
|
|
21
21
|
*/
|
|
22
|
-
this.showLines =
|
|
22
|
+
this.showLines = "none";
|
|
23
23
|
this.updateLastItemDashedLine = () => {
|
|
24
|
+
// @todo WA to avoid StencilJS' bug. The showLines Watch is dispatched
|
|
25
|
+
// before the componentDidLoad lifecycle method completes
|
|
26
|
+
if (!this.slotRef) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
24
29
|
const treeItems = this.slotRef.assignedElements();
|
|
25
30
|
if (treeItems.length === 0) {
|
|
26
31
|
return;
|
|
@@ -34,7 +39,7 @@ const ChTreeListX = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
34
39
|
}
|
|
35
40
|
handleShowLinesChange(newValue) {
|
|
36
41
|
// Displayed items may have changed since the last time that `showLines === true`
|
|
37
|
-
if (newValue) {
|
|
42
|
+
if (newValue !== "none" && this.level !== 0) {
|
|
38
43
|
this.updateLastItemDashedLine();
|
|
39
44
|
}
|
|
40
45
|
}
|
|
@@ -51,7 +56,7 @@ const ChTreeListX = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
51
56
|
this.showLines = mainTreeRef.showLines;
|
|
52
57
|
}
|
|
53
58
|
render() {
|
|
54
|
-
return (h(Host, { role: this.level === 0 ? "tree" : "group" }, h("slot", { onSlotchange: this.showLines && this.level !== 0
|
|
59
|
+
return (h(Host, { role: this.level === 0 ? "tree" : "group" }, h("slot", { onSlotchange: this.showLines !== "none" && this.level !== 0
|
|
55
60
|
? this.updateLastItemDashedLine
|
|
56
61
|
: null, ref: el => (this.slotRef = el) })));
|
|
57
62
|
}
|
|
@@ -62,7 +67,7 @@ const ChTreeListX = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
62
67
|
static get style() { return treeXListCss; }
|
|
63
68
|
}, [1, "ch-tree-x-list", {
|
|
64
69
|
"level": [1026],
|
|
65
|
-
"showLines": [
|
|
70
|
+
"showLines": [1025, "show-lines"]
|
|
66
71
|
}]);
|
|
67
72
|
function defineCustomElement() {
|
|
68
73
|
if (typeof customElements === "undefined") {
|