@descope/web-components-ui 1.0.297 → 1.0.299

Sign up to get free protection for your applications and to get access to all the features.
package/dist/umd/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.DescopeUI=o():e.DescopeUI=o()}(self,(()=>(()=>{var e,o,s,n={534:(e,o,s)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,5910,4978,769],"./boolean-fields/descope-checkbox/index.js":[3483,5910,7531,2362,1621,1224,8191,4978,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,5910,7531,2362,1621,1224,8191,4978,4483],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[6793,5910,4978,9122],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[3795,5910,7531,2362,1224,4024,4978,5263],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[8901,5910,4978,2313],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[4873,5910,7531,2362,1224,4024,4978,6656],"./button-selection-group-fields/descope-button-selection-group/index.js":[4887,5910,7531,2362,1224,4024,4978,2861],"./descope-avatar/index.js":[3120,5910,7531,2362,4746,7911,6594,4028,4978,8873],"./descope-badge/index.js":[4021,5910,4978,8012],"./descope-button/index.js":[2018,5910,7531,2362,1224,4978,9662],"./descope-combo-box/index.js":[1294,5910,7531,2362,1621,4746,3830,8866,4978,9483],"./descope-container/index.js":[7107,5910,4978,7317],"./descope-date-picker/index.js":[2552,5910,7531,2362,1621,1224,4746,9092,4978,8017],"./descope-divider/index.js":[6162,5910,4978,4178],"./descope-email-field/index.js":[7840,5910,7531,2362,1621,4978,9760],"./descope-grid/descope-grid-custom-column/index.js":[9278,7531,5517,5988],"./descope-grid/descope-grid-selection-column/index.js":[2238,5910,7531,2362,1621,1224,5517,8191,4978,7487],"./descope-grid/descope-grid-text-column/index.js":[2356,7531,5517,3705],"./descope-grid/index.js":[9950,5910,7531,2362,1621,1224,3830,5517,8191,5135,4978,9461],"./descope-image/index.js":[8278,5910,4978,6772],"./descope-link/index.js":[5846,5910,4978,58],"./descope-loader-linear/index.js":[7845,5910,4978,6453],"./descope-loader-radial/index.js":[5747,5910,4978,3072],"./descope-logo/index.js":[1034,5910,4978,1984],"./descope-modal/index.js":[958,5910,7531,4746,9314,4978,4641],"./descope-multi-select-combo-box/index.js":[9393,5910,7531,2362,1621,4746,3830,8866,1438,4978,3840],"./descope-new-password/descope-new-password-internal/index.js":[1545,5910,4978,1842],"./descope-new-password/index.js":[8974,5910,7531,2362,1621,1224,7056,4978,7055],"./descope-notification/descope-notification-card/index.js":[5400,5910,7531,3951,4978,7401],"./descope-notification/index.js":[1845,5910,7531,3951,4978,9655],"./descope-notp-image/index.js":[6016,5910,4978,869],"./descope-number-field/index.js":[6916,5910,7531,2362,1621,5806,4978,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,5910,4978,1841],"./descope-passcode/index.js":[4919,5910,7531,2362,1621,4978,939],"./descope-password/index.js":[9279,5910,7531,2362,1621,1224,7056,4978,8106],"./descope-policy-validation/index.js":[8558,5910,4978,4570],"./descope-recaptcha/index.js":[8164,5910,4978,964],"./descope-text-area/index.js":[1962,5910,7531,2362,1621,6770,4978,3322],"./descope-text-field/index.js":[9357,5910,7531,2362,1621,4978,2934],"./descope-totp-image/index.js":[1331,5910,4978,5364],"./descope-upload-file/index.js":[6667,5910,7531,2362,1224,4052,4978,5874],"./descope-user-attribute/index.js":[4199,5910,7531,2362,1224,7911,1612,4978,1722],"./descope-user-auth-method/index.js":[9449,5910,7531,2362,1224,7911,9562,4978,1711],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[6751,5910,4978,3172],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[3820,5910,4978,5130],"./mapping-fields/descope-mappings-field/index.js":[9227,5910,7531,2362,1621,1224,4746,3830,8866,7911,6594,9423,4978,9299],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[4115,5910,4978,9656],"./mapping-fields/descope-saml-group-mappings/index.js":[3277,5910,7531,2362,1621,1224,4746,3830,8866,7911,6594,9423,4978,9476],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,5910,7531,2362,1621,4746,3830,8866,63,4978,4392,9288],"./phone-fields/descope-phone-field/index.js":[6581,5910,7531,2362,1621,4746,3830,8866,63,4978,4392,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,5910,7531,2362,1621,4978,4392,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,5910,7531,2362,1621,4746,3830,8866,7164,4978,4392,5119],"./text-components/descope-markdown-content/index.js":[5666,5910,4569,4978,9631],"./text-components/descope-text/index.js":[4803,5910,4978,7433]};function i(e){if(!s.o(n,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=n[e],i=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(i)))}i.keys=()=>Object.keys(n),i.id=534,e.exports=i},5561:(e,o,s)=>{"use strict";s.r(o),s.d(o,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#o="light";#s=new Set;#n(){this.#s.forEach((e=>e?.()))}get currentThemeName(){return this.#o}set currentThemeName(e){this.#o=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#s.add(e),()=>{this.#s.delete(e)}}set themes(e){this.#e=e,this.#n()}get hasThemes(){return!!Object.keys(this.#e).length}}},7507:(e,o,s)=>{const{componentsThemeManager:n}=s(5561),i=s(534);e.exports=i.keys().reduce(((e,o)=>{const s=o.replace(/.*?([^\/]+)\/index\.js$/,"$1");return s.endsWith("-internal")||(e[s]=()=>i(o)),e}),{}),e.exports.componentsThemeManager=n}},i={};function d(e){var o=i[e];if(void 0!==o)return o.exports;var s=i[e]={exports:{}};return n[e](s,s.exports,d),s.exports}d.m=n,e=[],d.O=(o,s,n,i)=>{if(!s){var t=1/0;for(a=0;a<e.length;a++){for(var[s,n,i]=e[a],p=!0,c=0;c<s.length;c++)(!1&i||t>=i)&&Object.keys(d.O).every((e=>d.O[e](s[c])))?s.splice(c--,1):(p=!1,i<t&&(t=i));if(p){e.splice(a--,1);var r=n();void 0!==r&&(o=r)}}return o}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[s,n,i]},d.F={},d.E=e=>{Object.keys(d.F).map((o=>{d.F[o](e)}))},d.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return d.d(o,{a:o}),o},d.d=(e,o)=>{for(var s in o)d.o(o,s)&&!d.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((o,s)=>(d.f[s](e,o),o)),[])),d.u=e=>(({58:"descope-link-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",869:"descope-notp-image-index-js",939:"descope-passcode-index-js",964:"descope-recaptcha-index-js",1711:"descope-user-auth-method-index-js",1722:"descope-user-attribute-index-js",1841:"descope-passcode-descope-passcode-internal-index-js",1842:"descope-new-password-descope-new-password-internal-index-js",1984:"descope-logo-index-js",2142:"descope-number-field-index-js",2313:"button-selection-group-fields-descope-button-selection-group-internal-index-js",2861:"button-selection-group-fields-descope-button-selection-group-index-js",2934:"descope-text-field-index-js",3072:"descope-loader-radial-index-js",3172:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",3322:"descope-text-area-index-js",3705:"descope-grid-descope-grid-text-column-index-js",3726:"boolean-fields-descope-checkbox-index-js",3840:"descope-multi-select-combo-box-index-js",4178:"descope-divider-index-js",4483:"boolean-fields-descope-switch-toggle-index-js",4570:"descope-policy-validation-index-js",4641:"descope-modal-index-js",4981:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",5119:"phone-fields-descope-phone-input-box-field-index-js",5130:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",5263:"button-selection-group-fields-descope-button-multi-selection-group-index-js",5364:"descope-totp-image-index-js",5874:"descope-upload-file-index-js",5988:"descope-grid-descope-grid-custom-column-index-js",6453:"descope-loader-linear-index-js",6656:"button-selection-group-fields-descope-button-selection-group-item-index-js",6772:"descope-image-index-js",7055:"descope-new-password-index-js",7317:"descope-container-index-js",7401:"descope-notification-descope-notification-card-index-js",7433:"text-components-descope-text-index-js",7487:"descope-grid-descope-grid-selection-column-index-js",8012:"descope-badge-index-js",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",8873:"descope-avatar-index-js",9122:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",9288:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",9299:"mapping-fields-descope-mappings-field-index-js",9461:"descope-grid-index-js",9476:"mapping-fields-descope-saml-group-mappings-index-js",9483:"descope-combo-box-index-js",9631:"text-components-descope-markdown-content-index-js",9655:"descope-notification-index-js",9656:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},s="@descope/web-components-ui:",d.l=(e,n,i,t)=>{if(o[e])o[e].push(n);else{var p,c;if(void 0!==i)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==s+i){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,d.nc&&p.setAttribute("nonce",d.nc),p.setAttribute("data-webpack",s+i),p.src=e),o[e]=[n];var u=(s,n)=>{p.onerror=p.onload=null,clearTimeout(m);var i=o[e];if(delete o[e],p.parentNode&&p.parentNode.removeChild(p),i&&i.forEach((e=>e(n))),s)return s(n)},m=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var o=d.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var s=o.getElementsByTagName("script");if(s.length)for(var n=s.length-1;n>-1&&!e;)e=s[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),(()=>{var e={5524:0};d.f.j=(o,s)=>{var n=d.o(e,o)?e[o]:void 0;if(0!==n)if(n)s.push(n[2]);else{var i=new Promise(((s,i)=>n=e[o]=[s,i]));s.push(n[2]=i);var t=d.p+d.u(o),p=new Error;d.l(t,(s=>{if(d.o(e,o)&&(0!==(n=e[o])&&(e[o]=void 0),n)){var i=s&&("load"===s.type?"missing":s.type),t=s&&s.target&&s.target.src;p.message="Loading chunk "+o+" failed.\n("+i+": "+t+")",p.name="ChunkLoadError",p.type=i,p.request=t,n[1](p)}}),"chunk-"+o,o)}},d.F.j=o=>{if(!d.o(e,o)||void 0===e[o]){e[o]=null;var s=document.createElement("link");d.nc&&s.setAttribute("nonce",d.nc),s.rel="prefetch",s.as="script",s.href=d.p+d.u(o),document.head.appendChild(s)}},d.O.j=o=>0===e[o];var o=(o,s)=>{var n,i,[t,p,c]=s,r=0;if(t.some((o=>0!==e[o]))){for(n in p)d.o(p,n)&&(d.m[n]=p[n]);if(c)var a=c(d)}for(o&&o(s);r<t.length;r++)i=t[r],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(a)},s=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];s.forEach(o.bind(null,0)),s.push=o.bind(null,s.push.bind(s))})(),d.O(0,[5524],(()=>{[5910,4978,769,7531,2362,1621,1224,8191,3726,4483,9122,4024,5263,2313,6656,2861,4746,7911,6594,4028,8873,8012,9662,3830,8866,9483,7317,9092,8017,4178,9760,5517,5988,7487,3705,5135,9461,6772,58,6453,3072,1984,9314,4641,1438,3840,1842,7056,7055,3951,7401,9655,869,5806,2142,1841,939,8106,4570,964,6770,3322,2934,5364,4052,5874,1612,1722,9562,1711,3172,5130,9423,9299,9656,9476,63,4392,9288,9806,4981,7164,5119,4569,9631,7433].map(d.E)}),5);var t=d(7507);return d.O(t)})()));
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.DescopeUI=o():e.DescopeUI=o()}(self,(()=>(()=>{var e,o,s,n={534:(e,o,s)=>{var n={"./boolean-fields/descope-boolean-field-internal/index.js":[6676,5910,4978,769],"./boolean-fields/descope-checkbox/index.js":[3483,5910,7531,2362,1621,1224,8191,4978,3726],"./boolean-fields/descope-switch-toggle/index.js":[9203,5910,7531,2362,1621,1224,8191,4978,4483],"./button-selection-group-fields/descope-button-multi-selection-group-internal/index.js":[6793,5910,4978,9122],"./button-selection-group-fields/descope-button-multi-selection-group/index.js":[3795,5910,7531,2362,1224,4024,4978,5263],"./button-selection-group-fields/descope-button-selection-group-internal/index.js":[8901,5910,4978,2313],"./button-selection-group-fields/descope-button-selection-group-item/index.js":[4873,5910,7531,2362,1224,4024,4978,6656],"./button-selection-group-fields/descope-button-selection-group/index.js":[4887,5910,7531,2362,1224,4024,4978,2861],"./descope-avatar/index.js":[3120,5910,7531,2362,4746,7911,6594,4028,4978,8873],"./descope-badge/index.js":[4021,5910,4978,8012],"./descope-button/index.js":[2018,5910,7531,2362,1224,4978,9662],"./descope-combo-box/index.js":[1294,5910,7531,2362,1621,4746,3830,8866,4978,9483],"./descope-container/index.js":[7107,5910,4978,7317],"./descope-date-picker/index.js":[2552,5910,7531,2362,1621,1224,4746,9092,4978,8017],"./descope-divider/index.js":[6162,5910,4978,4178],"./descope-email-field/index.js":[7840,5910,7531,2362,1621,4978,9760],"./descope-grid/descope-grid-custom-column/index.js":[9278,7531,5517,5988],"./descope-grid/descope-grid-selection-column/index.js":[2238,5910,7531,2362,1621,1224,5517,8191,4978,7487],"./descope-grid/descope-grid-text-column/index.js":[2356,7531,5517,3705],"./descope-grid/index.js":[9950,5910,7531,2362,1621,1224,3830,5517,8191,5135,4978,9461],"./descope-image/index.js":[8278,5910,4978,6772],"./descope-link/index.js":[5846,5910,4978,58],"./descope-loader-linear/index.js":[7845,5910,4978,6453],"./descope-loader-radial/index.js":[5747,5910,4978,3072],"./descope-logo/index.js":[1034,5910,4978,1984],"./descope-modal/index.js":[958,5910,7531,4746,9314,4978,4641],"./descope-multi-select-combo-box/index.js":[9393,5910,7531,2362,1621,4746,3830,8866,1438,4978,3840],"./descope-new-password/descope-new-password-internal/index.js":[1545,5910,4978,1842],"./descope-new-password/index.js":[8974,5910,7531,2362,1621,1224,7056,4978,7055],"./descope-notification/descope-notification-card/index.js":[5400,5910,7531,3951,4978,7401],"./descope-notification/index.js":[1845,5910,7531,3951,4978,9655],"./descope-notp-image/index.js":[6016,5910,4978,869],"./descope-number-field/index.js":[6916,5910,7531,2362,1621,5806,4978,2142],"./descope-passcode/descope-passcode-internal/index.js":[4775,5910,4978,1841],"./descope-passcode/index.js":[4919,5910,7531,2362,1621,4978,939],"./descope-password/index.js":[9279,5910,7531,2362,1621,1224,7056,4978,8106],"./descope-policy-validation/index.js":[8558,5910,4978,4570],"./descope-recaptcha/index.js":[8164,5910,4978,964],"./descope-text-area/index.js":[1962,5910,7531,2362,1621,6770,4978,3322],"./descope-text-field/index.js":[9357,5910,7531,2362,1621,4978,2934],"./descope-totp-image/index.js":[1331,5910,4978,5364],"./descope-upload-file/index.js":[6667,5910,7531,2362,1224,4052,4978,5874],"./descope-user-attribute/index.js":[4199,5910,7531,2362,1224,7911,1612,4978,1722],"./descope-user-auth-method/index.js":[9449,5910,7531,2362,1224,7911,9562,4978,1711],"./mapping-fields/descope-mappings-field/descope-mapping-item/index.js":[6751,5910,4978,3172],"./mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js":[3820,5910,4978,5130],"./mapping-fields/descope-mappings-field/index.js":[9227,5910,7531,2362,1621,1224,4746,3830,8866,7911,6594,9423,4978,9299],"./mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js":[4115,5910,4978,9656],"./mapping-fields/descope-saml-group-mappings/index.js":[3277,5910,7531,2362,1621,1224,4746,3830,8866,7911,6594,9423,4978,9476],"./phone-fields/descope-phone-field/descope-phone-field-internal/index.js":[9240,5910,7531,2362,1621,4746,3830,8866,63,4978,4392,9288],"./phone-fields/descope-phone-field/index.js":[6581,5910,7531,2362,1621,4746,3830,8866,63,4978,4392,9806],"./phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js":[3067,5910,7531,2362,1621,4978,4392,4981],"./phone-fields/descope-phone-input-box-field/index.js":[9423,5910,7531,2362,1621,4746,3830,8866,7164,4978,4392,5119],"./text-components/descope-enriched-text/index.js":[1655,5910,4569,4978,657],"./text-components/descope-text/index.js":[4803,5910,4978,7433]};function i(e){if(!s.o(n,e))return Promise.resolve().then((()=>{var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}));var o=n[e],i=o[0];return Promise.all(o.slice(1).map(s.e)).then((()=>s(i)))}i.keys=()=>Object.keys(n),i.id=534,e.exports=i},5561:(e,o,s)=>{"use strict";s.r(o),s.d(o,{componentsThemeManager:()=>n});const n=new class{static mountOnPropName="DescopeThemeManager";#e={};#o="light";#s=new Set;#n(){this.#s.forEach((e=>e?.()))}get currentThemeName(){return this.#o}set currentThemeName(e){this.#o=e,this.#n()}get currentTheme(){return this.#e[this.currentThemeName]}onCurrentThemeChange(e){return this.#s.add(e),()=>{this.#s.delete(e)}}set themes(e){this.#e=e,this.#n()}get hasThemes(){return!!Object.keys(this.#e).length}}},7507:(e,o,s)=>{const{componentsThemeManager:n}=s(5561),i=s(534);e.exports=i.keys().reduce(((e,o)=>{const s=o.replace(/.*?([^\/]+)\/index\.js$/,"$1");return s.endsWith("-internal")||(e[s]=()=>i(o)),e}),{}),e.exports.componentsThemeManager=n}},i={};function d(e){var o=i[e];if(void 0!==o)return o.exports;var s=i[e]={exports:{}};return n[e](s,s.exports,d),s.exports}d.m=n,e=[],d.O=(o,s,n,i)=>{if(!s){var t=1/0;for(a=0;a<e.length;a++){for(var[s,n,i]=e[a],p=!0,c=0;c<s.length;c++)(!1&i||t>=i)&&Object.keys(d.O).every((e=>d.O[e](s[c])))?s.splice(c--,1):(p=!1,i<t&&(t=i));if(p){e.splice(a--,1);var r=n();void 0!==r&&(o=r)}}return o}i=i||0;for(var a=e.length;a>0&&e[a-1][2]>i;a--)e[a]=e[a-1];e[a]=[s,n,i]},d.F={},d.E=e=>{Object.keys(d.F).map((o=>{d.F[o](e)}))},d.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return d.d(o,{a:o}),o},d.d=(e,o)=>{for(var s in o)d.o(o,s)&&!d.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:o[s]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((o,s)=>(d.f[s](e,o),o)),[])),d.u=e=>(({58:"descope-link-index-js",657:"text-components-descope-enriched-text-index-js",769:"boolean-fields-descope-boolean-field-internal-index-js",869:"descope-notp-image-index-js",939:"descope-passcode-index-js",964:"descope-recaptcha-index-js",1711:"descope-user-auth-method-index-js",1722:"descope-user-attribute-index-js",1841:"descope-passcode-descope-passcode-internal-index-js",1842:"descope-new-password-descope-new-password-internal-index-js",1984:"descope-logo-index-js",2142:"descope-number-field-index-js",2313:"button-selection-group-fields-descope-button-selection-group-internal-index-js",2861:"button-selection-group-fields-descope-button-selection-group-index-js",2934:"descope-text-field-index-js",3072:"descope-loader-radial-index-js",3172:"mapping-fields-descope-mappings-field-descope-mapping-item-index-js",3322:"descope-text-area-index-js",3705:"descope-grid-descope-grid-text-column-index-js",3726:"boolean-fields-descope-checkbox-index-js",3840:"descope-multi-select-combo-box-index-js",4178:"descope-divider-index-js",4483:"boolean-fields-descope-switch-toggle-index-js",4570:"descope-policy-validation-index-js",4641:"descope-modal-index-js",4981:"phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js",5119:"phone-fields-descope-phone-input-box-field-index-js",5130:"mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js",5263:"button-selection-group-fields-descope-button-multi-selection-group-index-js",5364:"descope-totp-image-index-js",5874:"descope-upload-file-index-js",5988:"descope-grid-descope-grid-custom-column-index-js",6453:"descope-loader-linear-index-js",6656:"button-selection-group-fields-descope-button-selection-group-item-index-js",6772:"descope-image-index-js",7055:"descope-new-password-index-js",7317:"descope-container-index-js",7401:"descope-notification-descope-notification-card-index-js",7433:"text-components-descope-text-index-js",7487:"descope-grid-descope-grid-selection-column-index-js",8012:"descope-badge-index-js",8017:"descope-date-picker-index-js",8106:"descope-password-index-js",8873:"descope-avatar-index-js",9122:"button-selection-group-fields-descope-button-multi-selection-group-internal-index-js",9288:"phone-fields-descope-phone-field-descope-phone-field-internal-index-js",9299:"mapping-fields-descope-mappings-field-index-js",9461:"descope-grid-index-js",9476:"mapping-fields-descope-saml-group-mappings-index-js",9483:"descope-combo-box-index-js",9655:"descope-notification-index-js",9656:"mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js",9662:"descope-button-index-js",9760:"descope-email-field-index-js",9806:"phone-fields-descope-phone-field-index-js"}[e]||e)+".js"),d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),o={},s="@descope/web-components-ui:",d.l=(e,n,i,t)=>{if(o[e])o[e].push(n);else{var p,c;if(void 0!==i)for(var r=document.getElementsByTagName("script"),a=0;a<r.length;a++){var l=r[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==s+i){p=l;break}}p||(c=!0,(p=document.createElement("script")).charset="utf-8",p.timeout=120,d.nc&&p.setAttribute("nonce",d.nc),p.setAttribute("data-webpack",s+i),p.src=e),o[e]=[n];var u=(s,n)=>{p.onerror=p.onload=null,clearTimeout(x);var i=o[e];if(delete o[e],p.parentNode&&p.parentNode.removeChild(p),i&&i.forEach((e=>e(n))),s)return s(n)},x=setTimeout(u.bind(null,void 0,{type:"timeout",target:p}),12e4);p.onerror=u.bind(null,p.onerror),p.onload=u.bind(null,p.onload),c&&document.head.appendChild(p)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var o=d.g.document;if(!e&&o&&(o.currentScript&&(e=o.currentScript.src),!e)){var s=o.getElementsByTagName("script");if(s.length)for(var n=s.length-1;n>-1&&!e;)e=s[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),(()=>{var e={5524:0};d.f.j=(o,s)=>{var n=d.o(e,o)?e[o]:void 0;if(0!==n)if(n)s.push(n[2]);else{var i=new Promise(((s,i)=>n=e[o]=[s,i]));s.push(n[2]=i);var t=d.p+d.u(o),p=new Error;d.l(t,(s=>{if(d.o(e,o)&&(0!==(n=e[o])&&(e[o]=void 0),n)){var i=s&&("load"===s.type?"missing":s.type),t=s&&s.target&&s.target.src;p.message="Loading chunk "+o+" failed.\n("+i+": "+t+")",p.name="ChunkLoadError",p.type=i,p.request=t,n[1](p)}}),"chunk-"+o,o)}},d.F.j=o=>{if(!d.o(e,o)||void 0===e[o]){e[o]=null;var s=document.createElement("link");d.nc&&s.setAttribute("nonce",d.nc),s.rel="prefetch",s.as="script",s.href=d.p+d.u(o),document.head.appendChild(s)}},d.O.j=o=>0===e[o];var o=(o,s)=>{var n,i,[t,p,c]=s,r=0;if(t.some((o=>0!==e[o]))){for(n in p)d.o(p,n)&&(d.m[n]=p[n]);if(c)var a=c(d)}for(o&&o(s);r<t.length;r++)i=t[r],d.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return d.O(a)},s=self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[];s.forEach(o.bind(null,0)),s.push=o.bind(null,s.push.bind(s))})(),d.O(0,[5524],(()=>{[5910,4978,769,7531,2362,1621,1224,8191,3726,4483,9122,4024,5263,2313,6656,2861,4746,7911,6594,4028,8873,8012,9662,3830,8866,9483,7317,9092,8017,4178,9760,5517,5988,7487,3705,5135,9461,6772,58,6453,3072,1984,9314,4641,1438,3840,1842,7056,7055,3951,7401,9655,869,5806,2142,1841,939,8106,4570,964,6770,3322,2934,5364,4052,5874,1612,1722,9562,1711,3172,5130,9423,9299,9656,9476,63,4392,9288,9806,4981,7164,5119,4569,657,7433].map(d.E)}),5);var t=d(7507);return d.O(t)})()));
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[657],{2663:(e,t,n)=>{n.d(t,{T:()=>i});var s=n(3346);const i=e=>{class t extends((0,s.s)({componentName:e,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n ',this.textSlot=this.shadowRoot.querySelector("slot")}}return t}},1655:(e,t,n)=>{n.r(t),n.d(t,{EnrichedTextClass:()=>g});var s=n(4569),i=n(4978),r=n(2061),o=n(4567),l=n(5753),a=n(2663);const d={a:"descope-link"},h=e=>e.map((e=>{const t=(e=>d[e.tag]||e.tag)(e);return(e=>"image"===e?.children?.[0].type)(e)?(e.children[0].attrs.push(["style","width:100%"]),{...e,tag:t}):e?.children?.length>0?{...e,tag:t,children:h(e.children)}:{...e,tag:t}})),c=e=>{const t=document.getSelection().toString(),n=e.clipboardData||window.clipboardData;n.setData("text/plain",t),n.setData("text/html",t),e.preventDefault()},p=(0,o.iY)("enriched-text"),u=(0,a.T)(p),g=(0,r.qC)((0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},marginReset:{selector:"*",property:"margin"},textAlign:{}}}),i.e4,i.Ae,(e=>class extends e{static get observedAttributes(){return["disabled-rules","line-break","readonly"]}get lineBreak(){return this.getAttribute("line-break")}get disabledRules(){return(this.getAttribute("disabled-rules")||"").split(",").filter(Boolean)}init(){super.init(),this.#e(),this.textSlot.addEventListener("slotchange",this.#t.bind(this))}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"disabled-rules"===e&&n!==t&&(this.#e(n),this.#t()),"readonly"===e&&this.onReadOnlyChange(null!==n)}#e(){this.processor=(0,s.Z)({breaks:this.lineBreak}).disable(this.disabledRules)}#t(){const e=this.textSlot.assignedNodes({flatten:!0})?.[0];if(e&&e.nodeType===Node.TEXT_NODE){const t=this.processor.parse(e.textContent,{references:void 0}),n=this.processor.renderer.render(h(t),{breaks:this.lineBreak});if(n!==e.textContent){const t=document.createElement("div");t.classList.add("enriched-text"),t.innerHTML=`\n <style>\n .enriched-text > * { margin:0 }\n .enriched-text > *:not(:only-child):not(:last-child) {\n margin-bottom: var(${g.cssVarList.textLineHeight})\n }\n </style>\n ${n}`,t.addEventListener("copy",c),e.parentNode.replaceChild(t,e)}}}onReadOnlyChange(e){this.setAttribute("inert",e)}}),l.y)(u);customElements.define(p,g)},5753:(e,t,n)=>{n.d(t,{y:()=>i});var s=n(4567);const i=e=>class extends e{get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.P$)(this,(()=>{const e=!!this.childNodes.length;this.style.display=!e&&this.hideWhenEmpty?"none":""}))}}}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.297",
3
+ "version": "1.0.299",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -6,14 +6,14 @@ import { hideWhenEmptyMixin } from '../hideWhenEmptyMixin';
6
6
  import { createBaseTextClass } from '../createBaseTextClass';
7
7
  import { enrichTokens, onClipboardCopy } from './helpers';
8
8
 
9
- export const componentName = getComponentName('markdown-content');
9
+ export const componentName = getComponentName('enriched-text');
10
10
 
11
- const BaseMarkdownContentClass = createBaseTextClass(componentName);
11
+ const BaseEnrichedTextClass = createBaseTextClass(componentName);
12
12
 
13
- const markdownContentMixin = (superclass) =>
14
- class MarkdownContentMixinClass extends superclass {
13
+ const EnrichedTextMixin = (superclass) =>
14
+ class EnrichedTextMixinClass extends superclass {
15
15
  static get observedAttributes() {
16
- return ['disabled-rules', 'line-break'];
16
+ return ['disabled-rules', 'line-break', 'readonly'];
17
17
  }
18
18
 
19
19
  get lineBreak() {
@@ -26,7 +26,7 @@ const markdownContentMixin = (superclass) =>
26
26
 
27
27
  init() {
28
28
  super.init();
29
- this.#initMarkdown();
29
+ this.#initProcessor();
30
30
  this.textSlot.addEventListener('slotchange', this.#parseChildren.bind(this));
31
31
  }
32
32
 
@@ -35,28 +35,32 @@ const markdownContentMixin = (superclass) =>
35
35
 
36
36
  if (attrName === 'disabled-rules') {
37
37
  if (newValue !== oldValue) {
38
- this.#initMarkdown(newValue);
38
+ this.#initProcessor(newValue);
39
39
  this.#parseChildren();
40
40
  }
41
41
  }
42
+
43
+ if (attrName === 'readonly') {
44
+ this.onReadOnlyChange(newValue !== null);
45
+ }
42
46
  }
43
47
 
44
- #initMarkdown() {
45
- this.markdown = markdownit({ breaks: this.lineBreak }).disable(this.disabledRules);
48
+ #initProcessor() {
49
+ this.processor = markdownit({ breaks: this.lineBreak }).disable(this.disabledRules);
46
50
  }
47
51
 
48
52
  #parseChildren() {
49
53
  const node = this.textSlot.assignedNodes({ flatten: true })?.[0];
50
54
 
51
55
  if (node && node.nodeType === Node.TEXT_NODE) {
52
- const tokens = this.markdown.parse(node.textContent, { references: undefined });
53
- const result = this.markdown.renderer.render(enrichTokens(tokens), {
56
+ const tokens = this.processor.parse(node.textContent, { references: undefined });
57
+ const result = this.processor.renderer.render(enrichTokens(tokens), {
54
58
  breaks: this.lineBreak,
55
59
  });
56
60
 
57
61
  if (result !== node.textContent) {
58
62
  const span = document.createElement('div');
59
- span.classList.add('markdown-wrapper');
63
+ span.classList.add('enriched-text');
60
64
  // eslint-disable-next-line no-use-before-define
61
65
  span.innerHTML = `${getStyleReset()}${result}`;
62
66
  span.addEventListener('copy', onClipboardCopy);
@@ -64,9 +68,13 @@ const markdownContentMixin = (superclass) =>
64
68
  }
65
69
  }
66
70
  }
71
+
72
+ onReadOnlyChange(val) {
73
+ this.setAttribute('inert', val);
74
+ }
67
75
  };
68
76
 
69
- export const MarkdownContentClass = compose(
77
+ export const EnrichedTextClass = compose(
70
78
  createStyleMixin({
71
79
  mappings: {
72
80
  hostWidth: { selector: () => ':host', property: 'width' },
@@ -82,16 +90,16 @@ export const MarkdownContentClass = compose(
82
90
  }),
83
91
  draggableMixin,
84
92
  componentNameValidationMixin,
85
- markdownContentMixin,
93
+ EnrichedTextMixin,
86
94
  hideWhenEmptyMixin
87
- )(BaseMarkdownContentClass);
95
+ )(BaseEnrichedTextClass);
88
96
 
89
97
  function getStyleReset() {
90
98
  return `
91
99
  <style>
92
- .markdown-wrapper > * { margin:0 }
93
- .markdown-wrapper > *:not(:only-child):not(:last-child) {
94
- margin-bottom: var(${MarkdownContentClass.cssVarList.textLineHeight})
100
+ .enriched-text > * { margin:0 }
101
+ .enriched-text > *:not(:only-child):not(:last-child) {
102
+ margin-bottom: var(${EnrichedTextClass.cssVarList.textLineHeight})
95
103
  }
96
104
  </style>
97
105
  `;
@@ -0,0 +1,5 @@
1
+ import { componentName, EnrichedTextClass } from './EnrichedTextClass';
2
+
3
+ customElements.define(componentName, EnrichedTextClass);
4
+
5
+ export { EnrichedTextClass };
package/src/index.cjs.js CHANGED
@@ -21,7 +21,7 @@ export { NumberFieldClass } from './components/descope-number-field/NumberFieldC
21
21
  export { PasscodeClass } from './components/descope-passcode/PasscodeClass';
22
22
  export { PasswordClass } from './components/descope-password/PasswordClass';
23
23
  export { TextClass } from './components/text-components/descope-text/TextClass';
24
- export { MarkdownContentClass } from './components/text-components/descope-markdown-content/MarkdownContentClass';
24
+ export { EnrichedTextClass } from './components/text-components/descope-enriched-text/EnrichedTextClass';
25
25
  export { TextAreaClass } from './components/descope-text-area/TextAreaClass';
26
26
  export { TextFieldClass } from './components/descope-text-field/TextFieldClass';
27
27
  export { ImageClass } from './components/descope-image/ImageClass';
package/src/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export { NumberFieldClass } from './components/descope-number-field';
25
25
  export { PasscodeClass } from './components/descope-passcode';
26
26
  export { PasswordClass } from './components/descope-password';
27
27
  export { TextClass } from './components/text-components/descope-text';
28
- export { MarkdownContentClass } from './components/text-components/descope-markdown-content';
28
+ export { EnrichedTextClass } from './components/text-components/descope-enriched-text';
29
29
  export { TextAreaClass } from './components/descope-text-area';
30
30
  export { TextFieldClass } from './components/descope-text-field';
31
31
  export { ImageClass } from './components/descope-image';
package/src/index.js CHANGED
@@ -15,7 +15,7 @@ export * from './components/descope-number-field';
15
15
  export * from './components/descope-passcode';
16
16
  export * from './components/descope-password';
17
17
  export * from './components/text-components/descope-text';
18
- export * from './components/text-components/descope-markdown-content';
18
+ export * from './components/text-components/descope-enriched-text';
19
19
  export * from './components/descope-text-area';
20
20
  export * from './components/descope-text-field';
21
21
  export * from './components/descope-image';
@@ -1,11 +1,11 @@
1
1
  import globals from '../globals';
2
2
  import { getThemeRefs } from '../../helpers/themeHelpers';
3
- import { MarkdownContentClass } from '../../components/text-components/descope-markdown-content/MarkdownContentClass';
3
+ import { EnrichedTextClass } from '../../components/text-components/descope-enriched-text/EnrichedTextClass';
4
4
 
5
5
  const globalRefs = getThemeRefs(globals);
6
- const vars = MarkdownContentClass.cssVarList;
6
+ const vars = EnrichedTextClass.cssVarList;
7
7
 
8
- const markdownContent = {
8
+ const EnrichedText = {
9
9
  [vars.hostDirection]: globalRefs.direction,
10
10
 
11
11
  [vars.fontSize]: globalRefs.typography.body1.size,
@@ -80,5 +80,5 @@ const markdownContent = {
80
80
  },
81
81
  };
82
82
 
83
- export default markdownContent;
83
+ export default EnrichedText;
84
84
  export { vars };
@@ -11,7 +11,7 @@ import * as logo from './logo';
11
11
  import * as totpImage from './totpImage';
12
12
  import * as notpImage from './notpImage';
13
13
  import * as text from './text';
14
- import * as markdownContent from './markdownContent';
14
+ import * as EnrichedText from './enrichedText';
15
15
  import * as link from './link';
16
16
  import * as divider from './divider';
17
17
  import * as passcode from './passcode';
@@ -52,7 +52,7 @@ const components = {
52
52
  totpImage,
53
53
  notpImage,
54
54
  text,
55
- markdownContent,
55
+ EnrichedText,
56
56
  link,
57
57
  divider,
58
58
  passcode,
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9631],{2663:(t,e,n)=>{n.d(e,{T:()=>i});var s=n(3346);const i=t=>{class e extends((0,s.s)({componentName:t,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <style>\n :host {\n display: inline-block;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n </style>\n <slot part="text-wrapper"></slot>\n ',this.textSlot=this.shadowRoot.querySelector("slot")}}return e}},5666:(t,e,n)=>{n.r(e),n.d(e,{MarkdownContentClass:()=>g});var s=n(4569),i=n(4978),r=n(2061),o=n(4567),a=n(5753),l=n(2663);const d={a:"descope-link"},h=t=>t.map((t=>{const e=(t=>d[t.tag]||t.tag)(t);return(t=>"image"===t?.children?.[0].type)(t)?(t.children[0].attrs.push(["style","width:100%"]),{...t,tag:e}):t?.children?.length>0?{...t,tag:e,children:h(t.children)}:{...t,tag:e}})),c=t=>{const e=document.getSelection().toString(),n=t.clipboardData||window.clipboardData;n.setData("text/plain",e),n.setData("text/html",e),t.preventDefault()},p=(0,o.iY)("markdown-content"),u=(0,l.T)(p),g=(0,r.qC)((0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},marginReset:{selector:"*",property:"margin"},textAlign:{}}}),i.e4,i.Ae,(t=>class extends t{static get observedAttributes(){return["disabled-rules","line-break"]}get lineBreak(){return this.getAttribute("line-break")}get disabledRules(){return(this.getAttribute("disabled-rules")||"").split(",").filter(Boolean)}init(){super.init(),this.#t(),this.textSlot.addEventListener("slotchange",this.#e.bind(this))}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"disabled-rules"===t&&n!==e&&(this.#t(n),this.#e())}#t(){this.markdown=(0,s.Z)({breaks:this.lineBreak}).disable(this.disabledRules)}#e(){const t=this.textSlot.assignedNodes({flatten:!0})?.[0];if(t&&t.nodeType===Node.TEXT_NODE){const e=this.markdown.parse(t.textContent,{references:void 0}),n=this.markdown.renderer.render(h(e),{breaks:this.lineBreak});if(n!==t.textContent){const e=document.createElement("div");e.classList.add("markdown-wrapper"),e.innerHTML=`\n <style>\n .markdown-wrapper > * { margin:0 }\n .markdown-wrapper > *:not(:only-child):not(:last-child) {\n margin-bottom: var(${g.cssVarList.textLineHeight})\n }\n </style>\n ${n}`,e.addEventListener("copy",c),t.parentNode.replaceChild(e,t)}}}}),a.y)(u);customElements.define(p,g)},5753:(t,e,n)=>{n.d(e,{y:()=>i});var s=n(4567);const i=t=>class extends t{get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}}}]);
@@ -1,5 +0,0 @@
1
- import { componentName, MarkdownContentClass } from './MarkdownContentClass';
2
-
3
- customElements.define(componentName, MarkdownContentClass);
4
-
5
- export { MarkdownContentClass };