@descope/web-components-ui 1.38.0 → 1.39.0
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/index.cjs.js +4 -50
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -50
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/8961.js +1 -1
- package/dist/umd/8961.js.map +1 -1
- package/dist/umd/9365.js +1 -1
- package/dist/umd/9365.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/package.json +9 -9
- package/src/mixins/draggableMixin.js +1 -23
package/dist/cjs/index.cjs.js
CHANGED
@@ -1435,26 +1435,10 @@ const createStyleMixin$1 =
|
|
1435
1435
|
|
1436
1436
|
const draggableMixin$1 = (superclass) =>
|
1437
1437
|
class DraggableMixinClass extends superclass {
|
1438
|
-
#styleEle = null;
|
1439
|
-
|
1440
|
-
static get observedAttributes() {
|
1441
|
-
const superAttrs = superclass.observedAttributes || [];
|
1442
|
-
return [...superAttrs, 'draggable'];
|
1443
|
-
}
|
1444
|
-
|
1445
1438
|
constructor() {
|
1446
1439
|
super();
|
1447
1440
|
|
1448
|
-
|
1449
|
-
this.#styleEle.innerText = `* { cursor: inherit!important }`;
|
1450
|
-
}
|
1451
|
-
|
1452
|
-
#handleDraggableStyle(isDraggable) {
|
1453
|
-
if (isDraggable) {
|
1454
|
-
this.shadowRoot.appendChild(this.#styleEle);
|
1455
|
-
} else {
|
1456
|
-
this.#styleEle.remove();
|
1457
|
-
}
|
1441
|
+
injectStyle(`:host([draggable="true"]) * { cursor: inherit!important }`, this);
|
1458
1442
|
}
|
1459
1443
|
|
1460
1444
|
get isDraggable() {
|
@@ -1472,9 +1456,8 @@ const draggableMixin$1 = (superclass) =>
|
|
1472
1456
|
this.baseElement.setAttribute('tabindex', '-1');
|
1473
1457
|
|
1474
1458
|
const onComplete = () => {
|
1475
|
-
prevTabIndex
|
1476
|
-
|
1477
|
-
: this.baseElement.removeAttribute('tabindex');
|
1459
|
+
if (prevTabIndex) this.baseElement.setAttribute('tabindex', prevTabIndex);
|
1460
|
+
else this.baseElement.removeAttribute('tabindex');
|
1478
1461
|
|
1479
1462
|
e.target.removeEventListener('mouseup', onComplete);
|
1480
1463
|
e.target.removeEventListener('dragend', onComplete);
|
@@ -1487,13 +1470,6 @@ const draggableMixin$1 = (superclass) =>
|
|
1487
1470
|
|
1488
1471
|
super.init?.();
|
1489
1472
|
}
|
1490
|
-
|
1491
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
1492
|
-
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
1493
|
-
if (attrName === 'draggable') {
|
1494
|
-
this.#handleDraggableStyle(newValue === 'true');
|
1495
|
-
}
|
1496
|
-
}
|
1497
1473
|
};
|
1498
1474
|
|
1499
1475
|
const componentNameValidationMixin$1 = (superclass) =>
|
@@ -3216,25 +3192,10 @@ const createStyleMixin =
|
|
3216
3192
|
|
3217
3193
|
const draggableMixin = (superclass) =>
|
3218
3194
|
class DraggableMixinClass extends superclass {
|
3219
|
-
#styleEle = null;
|
3220
|
-
|
3221
|
-
static get observedAttributes() {
|
3222
|
-
const superAttrs = superclass.observedAttributes || [];
|
3223
|
-
return [...superAttrs, 'draggable'];
|
3224
|
-
}
|
3225
|
-
|
3226
3195
|
constructor() {
|
3227
3196
|
super();
|
3228
3197
|
|
3229
|
-
injectStyle(
|
3230
|
-
}
|
3231
|
-
|
3232
|
-
#handleDraggableStyle(isDraggable) {
|
3233
|
-
if (isDraggable) {
|
3234
|
-
this.shadowRoot.appendChild(this.#styleEle);
|
3235
|
-
} else {
|
3236
|
-
this.#styleEle.remove();
|
3237
|
-
}
|
3198
|
+
injectStyle(`:host([draggable="true"]) * { cursor: inherit!important }`, this);
|
3238
3199
|
}
|
3239
3200
|
|
3240
3201
|
get isDraggable() {
|
@@ -3267,13 +3228,6 @@ const draggableMixin = (superclass) =>
|
|
3267
3228
|
|
3268
3229
|
super.init?.();
|
3269
3230
|
}
|
3270
|
-
|
3271
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
3272
|
-
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
3273
|
-
if (attrName === 'draggable') {
|
3274
|
-
this.#handleDraggableStyle(newValue === 'true');
|
3275
|
-
}
|
3276
|
-
}
|
3277
3231
|
};
|
3278
3232
|
|
3279
3233
|
const componentNameValidationMixin = (superclass) =>
|