@descope/web-components-ui 1.0.406 → 1.0.407-2
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 +37 -8
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +37 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-policy-validation-index-js.js +1 -1
- package/dist/umd/descope-recaptcha-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-grid/helpers.js +1 -1
- package/src/components/descope-policy-validation/PolicyValidationClass.js +2 -2
- package/src/components/descope-recaptcha/RecaptchaClass.js +32 -3
- package/src/components/descope-upload-file/UploadFileClass.js +3 -3
package/dist/cjs/index.cjs.js
CHANGED
@@ -9063,9 +9063,9 @@ class RawPolicyValidation extends createBaseClass({ componentName: componentName
|
|
9063
9063
|
updateLabel(val) {
|
9064
9064
|
if (!val) {
|
9065
9065
|
this.classList.add('hide-label');
|
9066
|
-
this.label.
|
9066
|
+
this.label.textContent = '';
|
9067
9067
|
} else {
|
9068
|
-
this.label.
|
9068
|
+
this.label.textContent = val;
|
9069
9069
|
this.classList.remove('hide-label');
|
9070
9070
|
}
|
9071
9071
|
}
|
@@ -9506,15 +9506,15 @@ class RawUploadFile extends BaseInputClass$2 {
|
|
9506
9506
|
}
|
9507
9507
|
|
9508
9508
|
updateTitle(val) {
|
9509
|
-
this.title.
|
9509
|
+
this.title.textContent = val;
|
9510
9510
|
}
|
9511
9511
|
|
9512
9512
|
updateDescription(val) {
|
9513
|
-
this.description.
|
9513
|
+
this.description.textContent = val;
|
9514
9514
|
}
|
9515
9515
|
|
9516
9516
|
updateButtonLabel(val) {
|
9517
|
-
this.button.
|
9517
|
+
this.button.textContent = val;
|
9518
9518
|
}
|
9519
9519
|
|
9520
9520
|
updateButtonSize(val) {
|
@@ -10527,7 +10527,7 @@ const renderCodeSnippet = (value, lang) =>
|
|
10527
10527
|
|
10528
10528
|
const renderText = (text) =>
|
10529
10529
|
`<div class="row-details__value text" title="${text}">${text}</div>`;
|
10530
|
-
const renderJson = (value) => renderCodeSnippet(JSON.stringify(value, null, 2), 'json');
|
10530
|
+
const renderJson = (value) => renderCodeSnippet(escapeXML(JSON.stringify(value, null, 2)), 'json');
|
10531
10531
|
const renderXml = (value) => renderCodeSnippet(escapeXML(value), 'xml');
|
10532
10532
|
|
10533
10533
|
const defaultRowDetailsValueRenderer = (value) => {
|
@@ -17311,6 +17311,11 @@ class RawRecaptcha extends BaseClass {
|
|
17311
17311
|
}
|
17312
17312
|
|
17313
17313
|
renderRecaptcha(enabled) {
|
17314
|
+
if (this.children.length) {
|
17315
|
+
this.updatePreview();
|
17316
|
+
return;
|
17317
|
+
}
|
17318
|
+
|
17314
17319
|
if (enabled) {
|
17315
17320
|
this.recaptchaEle.style.display = '';
|
17316
17321
|
this.mockRecaptchaEle.style.display = 'none';
|
@@ -17328,7 +17333,7 @@ class RawRecaptcha extends BaseClass {
|
|
17328
17333
|
:host {
|
17329
17334
|
display: inline-flex;
|
17330
17335
|
}
|
17331
|
-
:host > div {
|
17336
|
+
:host > div:not(.hidden) {
|
17332
17337
|
display: flex;
|
17333
17338
|
}
|
17334
17339
|
:host #recaptcha .grecaptcha-badge {
|
@@ -17343,16 +17348,40 @@ class RawRecaptcha extends BaseClass {
|
|
17343
17348
|
}
|
17344
17349
|
:host img {
|
17345
17350
|
width: 256px;
|
17351
|
+
}
|
17352
|
+
:host([full-width="true"]) {
|
17353
|
+
width: 100%;
|
17354
|
+
}
|
17355
|
+
.hidden {
|
17356
|
+
display: none;
|
17346
17357
|
}
|
17347
17358
|
</style>
|
17348
|
-
<div>
|
17359
|
+
<div class="badge">
|
17349
17360
|
<span id="recaptcha"></span>
|
17350
17361
|
<img src="https://imgs.descope.com/connectors/templates/recaptcha/recaptcha-big.png" alt="recaptcha"/>
|
17351
17362
|
</div>
|
17363
|
+
<slot></slot>
|
17352
17364
|
`;
|
17353
17365
|
|
17354
17366
|
this.recaptchaEle = this.baseElement.querySelector('#recaptcha');
|
17355
17367
|
this.mockRecaptchaEle = this.baseElement.querySelector('img');
|
17368
|
+
this.badge = this.shadowRoot.querySelector('.badge');
|
17369
|
+
}
|
17370
|
+
|
17371
|
+
init() {
|
17372
|
+
super.init?.();
|
17373
|
+
|
17374
|
+
observeChildren(this, this.updatePreview.bind(this));
|
17375
|
+
}
|
17376
|
+
|
17377
|
+
updatePreview() {
|
17378
|
+
if (this.children.length) {
|
17379
|
+
this.recaptchaEle.style.display = 'none';
|
17380
|
+
this.mockRecaptchaEle.style.display = 'none';
|
17381
|
+
this.badge.classList.add('hidden');
|
17382
|
+
} else {
|
17383
|
+
this.badge.classList.remove('hidden');
|
17384
|
+
}
|
17356
17385
|
}
|
17357
17386
|
|
17358
17387
|
get enterprise() {
|