@getflip/swirl-components 0.38.1 → 0.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.json +1 -1
- package/dist/cjs/swirl-icon-check-small_4.cjs.entry.js +5 -2
- package/dist/cjs/swirl-table.cjs.entry.js +19 -0
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-option-list/swirl-option-list.js +5 -2
- package/dist/collection/components/swirl-table/swirl-table.js +19 -0
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-option-list2.js +5 -2
- package/dist/components/swirl-table.js +19 -0
- package/dist/esm/swirl-icon-check-small_4.entry.js +5 -2
- package/dist/esm/swirl-table.entry.js +19 -0
- package/dist/swirl-components/p-514fcbf9.entry.js +1 -0
- package/dist/swirl-components/p-ac1d5642.entry.js +8 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-table/swirl-table.d.ts +4 -0
- package/package.json +1 -1
- package/dist/swirl-components/p-4c3c8ce8.entry.js +0 -8
- package/dist/swirl-components/p-b5bcf47f.entry.js +0 -1
package/components.json
CHANGED
|
@@ -3211,7 +3211,9 @@ const SwirlOptionList = class {
|
|
|
3211
3211
|
this.items = utils.querySelectorAllDeep(this.el, "swirl-option-list-item");
|
|
3212
3212
|
}
|
|
3213
3213
|
setItemDisabledState() {
|
|
3214
|
-
|
|
3214
|
+
if (this.disabled) {
|
|
3215
|
+
this.items.forEach((item) => (item.disabled = true));
|
|
3216
|
+
}
|
|
3215
3217
|
}
|
|
3216
3218
|
setItemContext() {
|
|
3217
3219
|
if (this.multiSelect) {
|
|
@@ -3309,7 +3311,8 @@ const SwirlOptionList = class {
|
|
|
3309
3311
|
}
|
|
3310
3312
|
}
|
|
3311
3313
|
syncItemsWithValue() {
|
|
3312
|
-
|
|
3314
|
+
var _a;
|
|
3315
|
+
(_a = this.items) === null || _a === void 0 ? void 0 : _a.forEach((item) => (item.selected = this.value.includes(item.value)));
|
|
3313
3316
|
}
|
|
3314
3317
|
focusItem(index) {
|
|
3315
3318
|
var _a;
|
|
@@ -107,6 +107,13 @@ const SwirlTable = class {
|
|
|
107
107
|
this.scrolled = undefined;
|
|
108
108
|
this.scrolledToEnd = undefined;
|
|
109
109
|
}
|
|
110
|
+
componentDidLoad() {
|
|
111
|
+
this.observeColumnChanges();
|
|
112
|
+
}
|
|
113
|
+
disconnectedCallback() {
|
|
114
|
+
var _a;
|
|
115
|
+
(_a = this.columnObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
116
|
+
}
|
|
110
117
|
async componentDidRender() {
|
|
111
118
|
await this.updateLayout();
|
|
112
119
|
this.updateScrolledState();
|
|
@@ -116,6 +123,18 @@ const SwirlTable = class {
|
|
|
116
123
|
await this.updateLayout();
|
|
117
124
|
this.updateScrolledState();
|
|
118
125
|
}
|
|
126
|
+
observeColumnChanges() {
|
|
127
|
+
var _a, _b, _c;
|
|
128
|
+
this.columnObserver = new MutationObserver(this.onSlotChange);
|
|
129
|
+
const columnsContainer = (_c = (_b = (_a = this.el.shadowRoot
|
|
130
|
+
.querySelector('slot[name="columns"]')).assignedElements) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c[0];
|
|
131
|
+
if (!Boolean(columnsContainer)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.columnObserver.observe(columnsContainer, {
|
|
135
|
+
childList: true,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
119
138
|
updateScrolledState() {
|
|
120
139
|
const isMobile = utils.isMobileViewport();
|
|
121
140
|
const scrollable = this.container.scrollWidth > this.container.clientWidth;
|