@descope/web-components-ui 1.111.0 → 1.112.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 +73 -19
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +73 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-button.js +1 -1
- package/dist/umd/descope-button.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-outbound-apps.js +1 -1
- package/dist/umd/descope-outbound-apps.js.map +1 -1
- package/dist/umd/descope-timer-button.js +1 -1
- package/dist/umd/descope-timer-button.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +4 -4
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/package.json +4 -4
- package/src/components/descope-user-auth-method/UserAuthMethodClass.js +72 -18
package/dist/index.esm.js
CHANGED
@@ -5558,7 +5558,7 @@ const ButtonClass = compose(
|
|
5558
5558
|
padding: 0;
|
5559
5559
|
}
|
5560
5560
|
`,
|
5561
|
-
excludeAttrsSync: ['tabindex'],
|
5561
|
+
excludeAttrsSync: ['tabindex', 'class'],
|
5562
5562
|
componentName: componentName$19,
|
5563
5563
|
})
|
5564
5564
|
);
|
@@ -16308,10 +16308,13 @@ class RawUserAuthMethod extends createBaseClass$1({
|
|
16308
16308
|
</div>
|
16309
16309
|
|
16310
16310
|
<div class="btn-wrapper">
|
16311
|
-
<descope-button size="sm" variant="link" mode="primary">
|
16311
|
+
<descope-button class="btn unfulfilled hidden" size="sm" variant="link" mode="primary">
|
16312
16312
|
<slot name="button-icon"></slot>
|
16313
16313
|
</descope-button>
|
16314
|
-
<
|
16314
|
+
<descope-button class="btn fulfilled hidden" size="sm" variant="link" mode="primary">
|
16315
|
+
<slot name="fulfilled-button-icon"></slot>
|
16316
|
+
</descope-button>
|
16317
|
+
<div class="status-indicator hidden">
|
16315
16318
|
<vaadin-icon src=${greenVIcon}></vaadin-icon>
|
16316
16319
|
</div>
|
16317
16320
|
<descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>
|
@@ -16360,7 +16363,7 @@ class RawUserAuthMethod extends createBaseClass$1({
|
|
16360
16363
|
display: inline-flex;
|
16361
16364
|
}
|
16362
16365
|
|
16363
|
-
.
|
16366
|
+
.status-indicator {
|
16364
16367
|
width: 1em;
|
16365
16368
|
height: 1em;
|
16366
16369
|
display: flex;
|
@@ -16375,6 +16378,8 @@ class RawUserAuthMethod extends createBaseClass$1({
|
|
16375
16378
|
.hidden-btn {
|
16376
16379
|
width: 0;
|
16377
16380
|
overflow: hidden;
|
16381
|
+
opacity: 0;
|
16382
|
+
pointer-events: none;
|
16378
16383
|
}
|
16379
16384
|
|
16380
16385
|
slot[name="method-icon"]{
|
@@ -16385,8 +16390,9 @@ class RawUserAuthMethod extends createBaseClass$1({
|
|
16385
16390
|
this
|
16386
16391
|
);
|
16387
16392
|
|
16388
|
-
this.
|
16389
|
-
this.
|
16393
|
+
this.unfulfilledButton = this.shadowRoot.querySelector('.btn.unfulfilled');
|
16394
|
+
this.fulfilledButton = this.shadowRoot.querySelector('.btn.fulfilled');
|
16395
|
+
this.statusIndicator = this.shadowRoot.querySelector('.status-indicator');
|
16390
16396
|
this.labelText = this.shadowRoot.querySelector('descope-text[data-id="label-text"]');
|
16391
16397
|
}
|
16392
16398
|
|
@@ -16395,49 +16401,91 @@ class RawUserAuthMethod extends createBaseClass$1({
|
|
16395
16401
|
this.labelText.setAttribute('title', this.label);
|
16396
16402
|
}
|
16397
16403
|
|
16398
|
-
|
16399
|
-
let textSpanEle =
|
16404
|
+
updateButtonLabel(btnRef, label) {
|
16405
|
+
let textSpanEle = btnRef.querySelector('span');
|
16400
16406
|
|
16401
|
-
if (
|
16407
|
+
if (label) {
|
16402
16408
|
if (!textSpanEle) {
|
16403
16409
|
textSpanEle = document.createElement('span');
|
16404
|
-
|
16410
|
+
btnRef.appendChild(textSpanEle);
|
16405
16411
|
}
|
16406
|
-
textSpanEle.innerText =
|
16412
|
+
textSpanEle.innerText = label;
|
16407
16413
|
} else if (textSpanEle) {
|
16408
|
-
|
16414
|
+
btnRef.removeChild(textSpanEle);
|
16409
16415
|
}
|
16410
16416
|
}
|
16411
16417
|
|
16412
16418
|
onFulfilledChange() {
|
16413
|
-
|
16414
|
-
|
16419
|
+
if (this.isFulfilled) {
|
16420
|
+
this.unfulfilledButton.classList.add('hidden');
|
16421
|
+
this.handleFulfilled();
|
16422
|
+
} else {
|
16423
|
+
this.fulfilledButton.classList.add('hidden');
|
16424
|
+
this.handleUnfulfilled();
|
16425
|
+
}
|
16426
|
+
}
|
16427
|
+
|
16428
|
+
handleFulfilled() {
|
16429
|
+
this.fulfilledButton.classList.toggle('hidden', !this.isFulfilledEditable);
|
16430
|
+
this.statusIndicator.classList.toggle('hidden', this.isFulfilledEditable);
|
16431
|
+
}
|
16432
|
+
|
16433
|
+
handleUnfulfilled() {
|
16434
|
+
this.unfulfilledButton.classList.toggle('hidden', !this.isUnfulfilledEditable);
|
16435
|
+
this.statusIndicator.classList.toggle('hidden', this.isUnfulfilledEditable);
|
16415
16436
|
}
|
16416
16437
|
|
16417
16438
|
get label() {
|
16418
16439
|
return this.getAttribute('label') || '';
|
16419
16440
|
}
|
16420
16441
|
|
16421
|
-
get
|
16442
|
+
get unfulfilledButtonLabel() {
|
16422
16443
|
return this.getAttribute('button-label') || '';
|
16423
16444
|
}
|
16424
16445
|
|
16446
|
+
get fulfilledButtonLabel() {
|
16447
|
+
return this.getAttribute('fulfilled-button-label') || '';
|
16448
|
+
}
|
16449
|
+
|
16425
16450
|
get isFulfilled() {
|
16426
16451
|
return this.getAttribute('fulfilled') === 'true';
|
16427
16452
|
}
|
16428
16453
|
|
16454
|
+
get isFulfilledEditable() {
|
16455
|
+
return this.getAttribute('fulfilled-editable') === 'true';
|
16456
|
+
}
|
16457
|
+
|
16458
|
+
get isUnfulfilledEditable() {
|
16459
|
+
// this is to keep backward compatibility with previous versions
|
16460
|
+
return this.getAttribute('unfulfilled-editable') !== 'false';
|
16461
|
+
}
|
16462
|
+
|
16429
16463
|
init() {
|
16430
16464
|
this.onLabelChange();
|
16431
|
-
this.
|
16465
|
+
this.updateButtonLabel(this.fulfilledButton, this.fulfilledButtonLabel);
|
16466
|
+
this.updateButtonLabel(this.unfulfilledButton, this.unfulfilledButtonLabel);
|
16432
16467
|
this.onFulfilledChange();
|
16433
16468
|
|
16434
|
-
this.
|
16469
|
+
this.unfulfilledButton.addEventListener('click', () =>
|
16435
16470
|
this.dispatchEvent(new CustomEvent('button-clicked', { bubbles: true, composed: true }))
|
16436
16471
|
);
|
16472
|
+
|
16473
|
+
this.fulfilledButton.addEventListener('click', () => {
|
16474
|
+
this.dispatchEvent(
|
16475
|
+
new CustomEvent('fulfilled-button-clicked', { bubbles: true, composed: true })
|
16476
|
+
);
|
16477
|
+
});
|
16437
16478
|
}
|
16438
16479
|
|
16439
16480
|
static get observedAttributes() {
|
16440
|
-
return [
|
16481
|
+
return [
|
16482
|
+
'label',
|
16483
|
+
'fulfilled',
|
16484
|
+
'button-label',
|
16485
|
+
'fulfilled-button-label',
|
16486
|
+
'fulfilled-editable',
|
16487
|
+
'unfulfilled-editable',
|
16488
|
+
].concat(super.observedAttributes);
|
16441
16489
|
}
|
16442
16490
|
|
16443
16491
|
attributeChangedCallback(name, oldValue, newValue) {
|
@@ -16451,7 +16499,13 @@ class RawUserAuthMethod extends createBaseClass$1({
|
|
16451
16499
|
} else if (name === 'fulfilled') {
|
16452
16500
|
this.onFulfilledChange();
|
16453
16501
|
} else if (name === 'button-label') {
|
16454
|
-
this.
|
16502
|
+
this.updateButtonLabel(this.unfulfilledButton, this.unfulfilledButtonLabel);
|
16503
|
+
} else if (name === 'fulfilled-button-label') {
|
16504
|
+
this.updateButtonLabel(this.fulfilledButton, this.fulfilledButtonLabel);
|
16505
|
+
} else if (name === 'fulfilled-editable' && this.isFulfilled) {
|
16506
|
+
this.handleFulfilled();
|
16507
|
+
} else if (name === 'unfulfilled-editable' && !this.isFulfilled) {
|
16508
|
+
this.handleUnfulfilled();
|
16455
16509
|
}
|
16456
16510
|
}
|
16457
16511
|
}
|