@randstad-uca/design-system 1.0.99 → 1.0.101
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/components/Form.d.ts +5 -1
- package/dist/index.js +58 -58
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,23 +9,23 @@ const a=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)}
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2019 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/let p=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=h.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&h.set(e,t))}return t}toString(){return this.cssText}};const u=(t,e)=>{if(d)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=l.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}},g=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,c))(e)})(t):t,{is:b,defineProperty:m,getOwnPropertyDescriptor:y,getOwnPropertyNames:v,getOwnPropertySymbols:f,getPrototypeOf:w}=Object,x=globalThis,k=x.trustedTypes,$=k?k.emptyScript:"",S=x.reactiveElementPolyfillSupport,
|
|
12
|
+
*/let p=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=h.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&h.set(e,t))}return t}toString(){return this.cssText}};const u=(t,e)=>{if(d)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),o=l.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=i.cssText,t.appendChild(e)}},g=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,c))(e)})(t):t,{is:b,defineProperty:m,getOwnPropertyDescriptor:y,getOwnPropertyNames:v,getOwnPropertySymbols:f,getPrototypeOf:w}=Object,x=globalThis,k=x.trustedTypes,$=k?k.emptyScript:"",S=x.reactiveElementPolyfillSupport,E=(t,e)=>t,D={toAttribute(t,e){switch(e){case Boolean:t=t?$:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},C=(t,e)=>!b(t,e),O={attribute:!0,type:String,converter:D,reflect:!1,useDefault:!1,hasChanged:C};
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/Symbol.metadata??=Symbol("metadata"),x.litPropertyMetadata??=new WeakMap;class F extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=
|
|
17
|
+
*/Symbol.metadata??=Symbol("metadata"),x.litPropertyMetadata??=new WeakMap;class F extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=O){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&m(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:r}=y(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=o?.call(this);r?.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??O}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=w(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const t=this.properties,e=[...v(t),...f(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(g(t))}else void 0!==t&&e.push(g(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return u(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:D).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:D;this._$Em=o,this[o]=r.fromAttribute(e,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){const o=this.constructor,r=this[t];if(i??=o.getPropertyOptions(t),!((i.hasChanged??C)(r,e)||i.useDefault&&i.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:o,wrapped:r},s){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==r||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,i,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[E("elementProperties")]=new Map,F[E("finalized")]=new Map,S?.({ReactiveElement:F}),(x.reactiveElementVersions??=[]).push("2.1.0");
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const M={attribute:!0,type:String,converter:
|
|
23
|
+
const M={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:C},T=(t=M,e,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),s.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const r=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];e.call(this,i),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function B(t){return(e,i)=>"object"==typeof i?T(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/function
|
|
28
|
+
*/function L(t){return B({...t,state:!0,attribute:!1})}
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -36,7 +36,7 @@ const M={attribute:!0,type:String,converter:E,reflect:!1,hasChanged:O},T=(t=M,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let
|
|
39
|
+
function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let R=class extends t{constructor(){super(...arguments),this.label="",this.placeholder="",this.labelColor="",this.value="",this.required=!1,this.optional=!1,this.disabled=!1,this.error=!1,this.errorMessage=null,this.helper=null,this.helperAlign="left",this.helpClickable=!1,this._tooltipOpen=!1,this._lastClickTime=0,this._boundCloseTooltip=this._closeTooltip.bind(this)}_handleTooltipClick(t){t.stopPropagation(),t.preventDefault(),this._lastClickTime=Date.now(),this._tooltipOpen=!this._tooltipOpen}_closeTooltip(){this.helpClickable&&this._tooltipOpen&&Date.now()-this._lastClickTime>50&&(this._tooltipOpen=!1)}updated(t){super.updated(t),t.has("helpClickable")&&(this.helpClickable?document.addEventListener("click",this._boundCloseTooltip):document.removeEventListener("click",this._boundCloseTooltip))}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._boundCloseTooltip)}renderLabelContainer(){return e`
|
|
40
40
|
${this.label?e`
|
|
41
41
|
<div class="label-container">
|
|
42
42
|
${this.renderLabel()}
|
|
@@ -85,7 +85,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
85
85
|
${this.helper}
|
|
86
86
|
</p>
|
|
87
87
|
`:i}
|
|
88
|
-
`}};s([
|
|
88
|
+
`}};s([B({type:String}),n("design:type",Object)],R.prototype,"label",void 0),s([B({type:String}),n("design:type",Object)],R.prototype,"placeholder",void 0),s([B({type:String}),n("design:type",Object)],R.prototype,"labelColor",void 0),s([B(),n("design:type",Object)],R.prototype,"value",void 0),s([B({type:Boolean}),n("design:type",Object)],R.prototype,"required",void 0),s([B({type:Boolean}),n("design:type",Object)],R.prototype,"optional",void 0),s([B({type:Boolean}),n("design:type",Object)],R.prototype,"disabled",void 0),s([B({type:Boolean,reflect:!0}),n("design:type",Object)],R.prototype,"error",void 0),s([B({type:String}),n("design:type",Object)],R.prototype,"errorMessage",void 0),s([B({type:String}),n("design:type",Object)],R.prototype,"helper",void 0),s([B({type:String}),n("design:type",String)],R.prototype,"helperAlign",void 0),s([B({type:String}),n("design:type",String)],R.prototype,"help",void 0),s([B({type:Boolean}),n("design:type",Object)],R.prototype,"helpClickable",void 0),s([B({type:String}),n("design:type",String)],R.prototype,"helpLink",void 0),s([B({type:String}),n("design:type",String)],R.prototype,"helpLinkTooltipMessage",void 0),s([L(),n("design:type",Object)],R.prototype,"_tooltipOpen",void 0),R=s([a("base-control")],R);const P=o`
|
|
89
89
|
font-family: 'Graphik', sans-serif;
|
|
90
90
|
font-weight: 400;
|
|
91
91
|
font-size: 12px;
|
|
@@ -243,7 +243,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
243
243
|
<div class="content ${this.isOpen?"open":""}">
|
|
244
244
|
<slot></slot>
|
|
245
245
|
</div>
|
|
246
|
-
`}};s([
|
|
246
|
+
`}};s([B({type:String}),n("design:type",Object)],q.prototype,"title",void 0),s([L(),n("design:type",Object)],q.prototype,"isOpen",void 0),s([L(),n("design:type",Object)],q.prototype,"isDesktop",void 0),q=s([a("accordion-panel")],q);let U=class extends t{static{this.styles=o`
|
|
247
247
|
:host {
|
|
248
248
|
display: flex;
|
|
249
249
|
flex-direction: column;
|
|
@@ -612,7 +612,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
612
612
|
`}
|
|
613
613
|
</div>
|
|
614
614
|
</button>
|
|
615
|
-
`}};s([
|
|
615
|
+
`}};s([B({type:String}),n("design:type",String)],H.prototype,"type",void 0),s([B({type:String}),n("design:type",String)],H.prototype,"variant",void 0),s([B({type:String}),n("design:type",String)],H.prototype,"size",void 0),s([B({type:String}),n("design:type",Object)],H.prototype,"label",void 0),s([B({type:Boolean}),n("design:type",Object)],H.prototype,"loader",void 0),s([B({type:String,attribute:"icon-src"}),n("design:type",String)],H.prototype,"iconSrc",void 0),s([B({type:String}),n("design:type",String)],H.prototype,"iconPosition",void 0),s([B({type:String}),n("design:type",Object)],H.prototype,"iconName",void 0),s([B({type:Boolean,reflect:!0}),n("design:type",Boolean)],H.prototype,"disabled",void 0),s([B({type:String}),n("design:type",Object)],H.prototype,"idevent",void 0),H=s([a("randstad-button")],H);let Y=class extends t{constructor(){super(...arguments),this.img="",this.name="",this.title="",this.description="",this.buttonLabel="",this.cardId="",this.width="",this.height=""}static{this.styles=o`
|
|
616
616
|
:host {
|
|
617
617
|
display: inline-block;
|
|
618
618
|
font-family: "Graphik", sans-serif;
|
|
@@ -749,7 +749,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
749
749
|
</div>
|
|
750
750
|
</div>
|
|
751
751
|
</div>
|
|
752
|
-
`}};s([
|
|
752
|
+
`}};s([B({type:String}),n("design:type",Object)],Y.prototype,"img",void 0),s([B({type:String}),n("design:type",Object)],Y.prototype,"name",void 0),s([B({type:String}),n("design:type",Object)],Y.prototype,"title",void 0),s([B({type:String}),n("design:type",Object)],Y.prototype,"description",void 0),s([B({type:String}),n("design:type",Object)],Y.prototype,"buttonLabel",void 0),s([B({type:String}),n("design:type",Object)],Y.prototype,"cardId",void 0),s([B({type:Object}),n("design:type",Object)],Y.prototype,"onClick",void 0),s([B({type:String}),n("design:type",String)],Y.prototype,"width",void 0),s([B({type:String}),n("design:type",String)],Y.prototype,"height",void 0),Y=s([a("carousel-card")],Y);let G=class extends t{constructor(){super(...arguments),this.checked=!1,this.error=!1,this.disabled=!1,this.checkedColor="var(--primary-color)",this.checkedBgColor="transparent"}static{this.styles=o`
|
|
753
753
|
:host {
|
|
754
754
|
display: block;
|
|
755
755
|
max-width: 100%;
|
|
@@ -877,7 +877,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
877
877
|
<slot></slot>
|
|
878
878
|
</span>
|
|
879
879
|
</label>
|
|
880
|
-
`}};s([
|
|
880
|
+
`}};s([B({type:Boolean,reflect:!0}),n("design:type",Object)],G.prototype,"checked",void 0),s([B({type:Boolean}),n("design:type",Object)],G.prototype,"error",void 0),s([B({type:Boolean}),n("design:type",Object)],G.prototype,"disabled",void 0),s([B({type:String}),n("design:type",Object)],G.prototype,"checkedColor",void 0),s([B({type:String}),n("design:type",Object)],G.prototype,"checkedBgColor",void 0),G=s([a("randstad-checkbox")],G);const K=o`
|
|
881
881
|
.label-container {
|
|
882
882
|
display: flex;
|
|
883
883
|
align-items: center;
|
|
@@ -993,13 +993,13 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
993
993
|
|
|
994
994
|
.optional {
|
|
995
995
|
color: var( --secondary-color-60 );
|
|
996
|
-
${
|
|
996
|
+
${P}
|
|
997
997
|
}
|
|
998
998
|
|
|
999
999
|
randstad-icon {
|
|
1000
1000
|
color: var( --primary-color );
|
|
1001
1001
|
}
|
|
1002
|
-
`,
|
|
1002
|
+
`,Z=o`
|
|
1003
1003
|
:host([error]) .input-wrapper, .form.error .form-input {
|
|
1004
1004
|
border: 1px solid var( --ui-negative, red ) !important;
|
|
1005
1005
|
}
|
|
@@ -1018,7 +1018,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1018
1018
|
color: var(--ui-negative, #E00F0F);
|
|
1019
1019
|
margin-top: 4px;
|
|
1020
1020
|
}
|
|
1021
|
-
`,
|
|
1021
|
+
`,J=new CSSStyleSheet;J.replaceSync(o`
|
|
1022
1022
|
::-webkit-scrollbar {
|
|
1023
1023
|
width: 8px;
|
|
1024
1024
|
height: 8px;
|
|
@@ -1036,9 +1036,9 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1036
1036
|
::-webkit-scrollbar-button {
|
|
1037
1037
|
display: none;
|
|
1038
1038
|
}
|
|
1039
|
-
`.cssText);let
|
|
1039
|
+
`.cssText);const tt=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let et=class extends R{constructor(){super(...arguments),this.keydown=void 0,this.size="md",this.icon=null,this.typing=!1,this.type="text",this.isPasswordVisible=!1,this.cleanButton=!1}static{this.styles=[J,o`
|
|
1040
1040
|
${Q}
|
|
1041
|
-
${
|
|
1041
|
+
${Z}
|
|
1042
1042
|
${K}
|
|
1043
1043
|
|
|
1044
1044
|
.form {
|
|
@@ -1186,7 +1186,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1186
1186
|
height: 24px;
|
|
1187
1187
|
color: var( --primary-color );
|
|
1188
1188
|
}
|
|
1189
|
-
`]}togglePassword(t){this.isPasswordVisible=!this.isPasswordVisible;const e=t.currentTarget.parentElement?.querySelector("input");e&&(e.type=this.isPasswordVisible?"text":"password"),this.requestUpdate()}handleInput(t){this.handleInputCustom(t);const e=t.target.value;void 0!==this.maxLength&&"textarea"!==this.type?this.value=e.slice(0,this.maxLength):this.value=e,this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleClear(){this.value="",this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleLinkClick(t){t.preventDefault(),this.linkRoute&&this.dispatchEvent(new CustomEvent("linkClicked",{detail:this.linkRoute,bubbles:!0,composed:!0}))}handleInputCustom(t){"number"===this.keydown?this.onlyNumeric(t):"text"===this.keydown
|
|
1189
|
+
`]}togglePassword(t){this.isPasswordVisible=!this.isPasswordVisible;const e=t.currentTarget.parentElement?.querySelector("input");e&&(e.type=this.isPasswordVisible?"text":"password"),this.requestUpdate()}handleInput(t){this.handleInputCustom(t);const e=t.target.value;void 0!==this.maxLength&&"textarea"!==this.type?this.value=e.slice(0,this.maxLength):this.value=e,this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleClear(){this.value="",this.dispatchEvent(new CustomEvent("valueChanged",{detail:this.value})),this.dispatchEvent(new Event("input",{bubbles:!0})),this.requestUpdate()}handleLinkClick(t){t.preventDefault(),this.linkRoute&&this.dispatchEvent(new CustomEvent("linkClicked",{detail:this.linkRoute,bubbles:!0,composed:!0}))}_updateValueWithCursor(t,e,i){const o=t.value;if(o!==e){i.preventDefault();const r=t.selectionStart,s=t.selectionEnd;if(t.value=e,null!==r&&null!==s){const i=o.length-e.length,n=Math.max(0,r-i),a=Math.max(0,s-i);t.setSelectionRange(n,a)}}}handleInputCustom(t){const e=t.target;let i=!1;if("number"===this.keydown||"text"===this.keydown||"alfanumeric"===this.keydown)i=!0;else if(this.keydownRegex)try{i=!new RegExp(this.keydownRegex).test("😀")}catch(t){i=!0}if(i){const i=e.value.replace(tt,"");this._updateValueWithCursor(e,i,t)}"number"===this.keydown?this.onlyNumeric(t):"text"===this.keydown?this.onlyText(t):"alfanumeric"===this.keydown?this.onlyAlphanumeric(t):this.keydownRegex&&this.onlyRegex(t)}onlyNumeric(t){const e=t.target,i=e.value.replace(/[^0-9]/g,"");this._updateValueWithCursor(e,i,t)}onlyText(t){const e=t.target,i=e.value.replace(/[^a-zA-Z\sáéíóúüñÁÉÍÓÚÑÜ]/g,"").trimStart();this._updateValueWithCursor(e,i,t)}onlyAlphanumeric(t){const e=t.target,i=e.value.replace(/[^a-zA-Z0-9]/g,"").trimStart();this._updateValueWithCursor(e,i,t)}onlyRegex(t){if(!this.keydownRegex)return;const e=t.target,i=e.value;let o=this.keydownRegex.match(/\[\^?[^\]]+\]/g);o||(o=[`[${this.keydownRegex}]`]);let r="";const s=o.length>=2,n=new RegExp(o[0]),a=s?new RegExp(o[1]):n,l=i.split("");for(let t=0;t<l.length;t++){const e=l[t];0===t?n.test(e)&&(r+=e):a.test(e)&&(r+=e)}const d=r.trimStart();this._updateValueWithCursor(e,d,t)}handleInputKeyDown(t){this.handleKeyDown(t),this.handleInputArrowKey(t)}get _isCleanButtonVisible(){return this.cleanButton&&!!this.value&&"password"!==this.type&&"textarea"!==this.type}handleKeyDown(t){if("Enter"!==t.key)return;const e=new Event("submit",{bubbles:!0,composed:!0,cancelable:!0}),i=this.closest("form");i&&i.dispatchEvent(e)}handleInputArrowKey(t){if("ArrowRight"!==t.key)return;const e=t.target;if(("password"===this.type||this._isCleanButtonVisible)&&e.selectionStart===e.value.length){t.preventDefault();const e=this.shadowRoot?.querySelector(".toggle-password, .clean-button");e?.focus()}}handleButtonArrowKey(t){if("ArrowLeft"!==t.key)return;t.preventDefault();const e=this.shadowRoot?.querySelector(".form-input");e&&(e.focus(),e.selectionStart=e.selectionEnd=e.value.length)}render(){const t="textarea"===this.type?` height: ${this.heightTextArea??"30px"}; max-height: ${this.maxHeightTextArea??"30px"}; overflow-y: auto; `:"",o=this.labelColor?`--label-color: ${this.labelColor};`:"",r=e`
|
|
1190
1190
|
<randstad-icon
|
|
1191
1191
|
name="${this.isPasswordVisible?"eye_crossed":"eye"}"
|
|
1192
1192
|
size="24px"
|
|
@@ -1272,9 +1272,9 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1272
1272
|
|
|
1273
1273
|
${this.renderHelper()}
|
|
1274
1274
|
</div>
|
|
1275
|
-
`}};s([
|
|
1275
|
+
`}};s([B({type:String}),n("design:type",Object)],et.prototype,"keydown",void 0),s([B({type:String}),n("design:type",String)],et.prototype,"keydownRegex",void 0),s([B({type:String}),n("design:type",String)],et.prototype,"size",void 0),s([B({type:String}),n("design:type",Object)],et.prototype,"icon",void 0),s([B({type:Boolean}),n("design:type",Boolean)],et.prototype,"typing",void 0),s([B({type:String}),n("design:type",String)],et.prototype,"type",void 0),s([B({type:String}),n("design:type",String)],et.prototype,"linkText",void 0),s([B({type:String}),n("design:type",String)],et.prototype,"linkRoute",void 0),s([B({type:Boolean,reflect:!0}),n("design:type",Object)],et.prototype,"isPasswordVisible",void 0),s([B({type:Boolean}),n("design:type",Boolean)],et.prototype,"cleanButton",void 0),s([B({type:Number}),n("design:type",Number)],et.prototype,"maxLength",void 0),s([B({type:String}),n("design:type",String)],et.prototype,"heightTextArea",void 0),s([B({type:String}),n("design:type",String)],et.prototype,"maxHeightTextArea",void 0),et=s([a("randstad-form")],et);let it=class extends R{constructor(){super(...arguments),this.rows=""}static{this.styles=o`
|
|
1276
1276
|
${Q}
|
|
1277
|
-
${
|
|
1277
|
+
${Z}
|
|
1278
1278
|
${K}
|
|
1279
1279
|
|
|
1280
1280
|
:host {
|
|
@@ -1307,7 +1307,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1307
1307
|
|
|
1308
1308
|
${this.renderHelper()}
|
|
1309
1309
|
</div>
|
|
1310
|
-
`}};s([
|
|
1310
|
+
`}};s([B({type:String}),n("design:type",String)],it.prototype,"rows",void 0),it=s([a("randstad-form-group")],it);class ot extends t{constructor(){super(...arguments),this.name="",this.size="24px",this.color="",this.svgTemplate=null}static{this.styles=o`
|
|
1311
1311
|
:host {
|
|
1312
1312
|
display: inline-flex;
|
|
1313
1313
|
width: var( --icon-size, 24px );
|
|
@@ -1333,9 +1333,9 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1333
1333
|
<div class="custom-icon" style="color: ${this.color};">
|
|
1334
1334
|
${this.svgTemplate}
|
|
1335
1335
|
</div>
|
|
1336
|
-
`:e``}}s([
|
|
1336
|
+
`:e``}}s([B({type:String}),n("design:type",Object)],ot.prototype,"name",void 0),s([B({type:String}),n("design:type",Object)],ot.prototype,"size",void 0),s([B({type:String}),n("design:type",Object)],ot.prototype,"color",void 0),s([L(),n("design:type",Object)],ot.prototype,"svgTemplate",void 0),customElements.define("randstad-icon",ot);const rt=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let st=class extends R{constructor(){super(...arguments),this.platform="linkedin",this.size="md",this.maxLength=100,this.isPasswordVisible=!1,this.customSanitizeRegex=void 0,this.customUrlValidationRegex=void 0,this.value="",this._inputValue="",this._showFormatError=!1,this._onChangeFn=()=>{},this._onTouchedFn=()=>{}}static{this.styles=[J,o`
|
|
1337
1337
|
${Q}
|
|
1338
|
-
${
|
|
1338
|
+
${Z}
|
|
1339
1339
|
${K}
|
|
1340
1340
|
|
|
1341
1341
|
.linkedin-input-container {
|
|
@@ -1461,7 +1461,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1461
1461
|
.linkedin-input-container.error .input-wrapper:focus-within {
|
|
1462
1462
|
border-width: 1px;
|
|
1463
1463
|
}
|
|
1464
|
-
`]}get _fixedPrefix(){switch(this.platform){case"facebook":return"facebook.com/";case"google":return"@gmail.com";default:return"linkedin.com/in/"}}get _isSuffix(){return"google"===this.platform}get _isPrefix(){return"linkedin"===this.platform||"facebook"===this.platform}get _placeholder(){return this.placeholder||"tu-usuario"}get _sanitizeRegex(){if(this.customSanitizeRegex)try{return new RegExp(this.customSanitizeRegex,"g")}catch{return/[^a-zA-Z0-9-]/g}return/[^a-zA-Z0-9-]/g}get _sentPrefixLength(){switch(this.platform){case"facebook":return 25;case"google":return 10;default:return 28}}get _maxCharsAllowed(){return(Number(this.maxLength)||100)-("facebook"===this.platform?25:"google"===this.platform?10:25)}_handleInputOrPaste(t){const e=t.target;let i=
|
|
1464
|
+
`]}get _fixedPrefix(){switch(this.platform){case"facebook":return"facebook.com/";case"google":return"@gmail.com";default:return"linkedin.com/in/"}}get _isSuffix(){return"google"===this.platform}get _isPrefix(){return"linkedin"===this.platform||"facebook"===this.platform}get _placeholder(){return this.placeholder||"tu-usuario"}get _sanitizeRegex(){if(this.customSanitizeRegex)try{return new RegExp(this.customSanitizeRegex,"g")}catch{return/[^a-zA-Z0-9-]/g}return/[^a-zA-Z0-9-]/g}get _sentPrefixLength(){switch(this.platform){case"facebook":return 25;case"google":return 10;default:return 28}}get _maxCharsAllowed(){return(Number(this.maxLength)||100)-("facebook"===this.platform?25:"google"===this.platform?10:25)}_handleInputOrPaste(t){const e=t.target,i=e.value,o=e.selectionStart||0,r=i.slice(0,o).replace(rt,"").length;let s=i.replace(rt,"");s.startsWith(" ")&&(s=s.trimStart());const n=this._urlValidationRegex;if(n){const t=s.match(n);t&&(s="google"===this.platform?t[1]:t[3],s=s.replace(this._sanitizeRegex,""))}const a=this._maxCharsAllowed;s.length>a&&(s=s.slice(0,a)),e.value=s,this._inputValue=s,this._sanitizeRegex.lastIndex=0,this._showFormatError=this._sanitizeRegex.test(s);const l=!this._showFormatError&&s.length>=3?this._getFullValue(s):s;this.value=l;const d=Math.min(r,s.length);e.setSelectionRange(d,d),this._onChangeFn(l),this.dispatchEvent(new CustomEvent("valueChanged",{detail:l}))}get _urlValidationRegex(){if(this.customUrlValidationRegex)try{return new RegExp(this.customUrlValidationRegex,"i")}catch{return null}switch(this.platform){case"linkedin":return/^(https?:\/\/)?(www\.)?linkedin\.com\/in\/([a-zA-Z0-9-]+)\/?.*$/i;case"facebook":return/^(https?:\/\/)?(www\.)?facebook\.com\/([a-zA-Z0-9-]+)\/?.*$/i;case"google":return/^([a-zA-Z0-9-._]+)@gmail\.com$/i;default:return null}}get _hasMinLengthError(){return this._inputValue.length>0&&this._inputValue.length<3}get _errorMessageToDisplay(){if(this._hasMinLengthError)return"debés ingresar como mínimo 3 caracteres";if(this._showFormatError)switch(this.platform){case"facebook":return"la URL de facebook no es válida";case"google":return"la URL de tu cuenta de Google no es válida";default:return"la URL de linkedIn no es válida"}return this.errorMessage}get _hasError(){return this.error||this._hasMinLengthError||this._showFormatError}_handleKeyDown(t){const e=t.key,i=t.target;if(e.length>1)return;if(rt.test(e))return rt.lastIndex=0,void t.preventDefault();if(0===i.value.length&&" "===e)return void t.preventDefault();const o=/^[a-zA-Z0-9-]$/.test(e);Number(this.maxLength);this._sentPrefixLength,(0!==i.value.length||o)&&(o||o)?i.value.length>=this._maxCharsAllowed&&i.selectionStart===i.selectionEnd&&t.preventDefault():t.preventDefault()}_getFullValue(t){if(!t)return"";switch(this.platform){case"facebook":return`https://www.facebook.com/${t}`;case"google":return`${t}@gmail.com`;default:return`https://www.linkedin.com/in/${t}`}}_extractUsernameFromValue(t){if(!t)return"";const e=this._urlValidationRegex;if(e){const i=t.match(e);if(i)return"google"===this.platform?i[1]:i[3]}return t}updated(t){if(super.updated?.(t),t.has("value")&&this.value){const t=this._extractUsernameFromValue(this.value);t!==this._inputValue&&(this._inputValue=t,this.updateComplete.then((()=>{const e=this._getFullValue(t);this.dispatchEvent(new CustomEvent("valueChanged",{detail:e}))})))}}render(){const t=this.labelColor?`--label-color: ${this.labelColor};`:"",o=(Number(this.maxLength)||100)-this._sentPrefixLength;return e`
|
|
1465
1465
|
<div
|
|
1466
1466
|
class="linkedin-input-container ${this._hasError?"error":""} ${this.disabled?"disabled":""}"
|
|
1467
1467
|
style="${t}"
|
|
@@ -1508,7 +1508,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1508
1508
|
${t}
|
|
1509
1509
|
</p>
|
|
1510
1510
|
`}
|
|
1511
|
-
`}writeValue(t){if(t&&"string"==typeof t){const e=this._extractUsernameFromValue(t);e!==this._inputValue&&(this._inputValue=e,this.value=t,this.requestUpdate())}else t||(this._inputValue="",this.value="",this.requestUpdate())}registerOnChange(t){this._onChangeFn=t}registerOnTouched(t){this._onTouchedFn=t}setDisabledState(t){this.disabled=t}};s([
|
|
1511
|
+
`}writeValue(t){if(t&&"string"==typeof t){const e=this._extractUsernameFromValue(t);e!==this._inputValue&&(this._inputValue=e,this.value=t,this.requestUpdate())}else t||(this._inputValue="",this.value="",this.requestUpdate())}registerOnChange(t){this._onChangeFn=t}registerOnTouched(t){this._onTouchedFn=t}setDisabledState(t){this.disabled=t}};s([B({type:String}),n("design:type",String)],st.prototype,"platform",void 0),s([B({type:String}),n("design:type",String)],st.prototype,"size",void 0),s([B({type:Number}),n("design:type",Number)],st.prototype,"maxLength",void 0),s([B({type:Boolean,reflect:!0}),n("design:type",Object)],st.prototype,"isPasswordVisible",void 0),s([B({type:String}),n("design:type",Object)],st.prototype,"customSanitizeRegex",void 0),s([B({type:String}),n("design:type",Object)],st.prototype,"customUrlValidationRegex",void 0),s([B({type:String,hasChanged:()=>!1}),n("design:type",String)],st.prototype,"value",void 0),s([L(),n("design:type",String)],st.prototype,"_inputValue",void 0),s([L(),n("design:type",Boolean)],st.prototype,"_showFormatError",void 0),st=s([a("randstad-social-input")],st);let nt=class extends t{constructor(){super(...arguments),this.type="informative",this.icon="info",this.message="Este es un mensaje.",this.open=!1}static{this.styles=o`
|
|
1512
1512
|
:host {
|
|
1513
1513
|
display: block;
|
|
1514
1514
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1565,7 +1565,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1565
1565
|
|
|
1566
1566
|
<span class="message">${this.message}</span>
|
|
1567
1567
|
</div>
|
|
1568
|
-
`}};s([
|
|
1568
|
+
`}};s([B({type:String}),n("design:type",String)],nt.prototype,"type",void 0),s([B({type:String}),n("design:type",String)],nt.prototype,"icon",void 0),s([B({type:String}),n("design:type",String)],nt.prototype,"message",void 0),s([B({type:Boolean}),n("design:type",Boolean)],nt.prototype,"open",void 0),nt=s([a("randstad-notice")],nt);let at=class extends t{constructor(){super(...arguments),this.open=!1,this.title="Título del modal",this.showNotice=!1,this.noticeType="informative",this.noticeMessage="",this.noticeIcon="info",this.showPrimaryButton=!1,this.primaryButtonLabel="Aceptar",this.showSecondaryButton=!1,this.secondaryButtonLabel="Cancelar",this.isFooterCustom=!1,this.isPrimaryLoader=!1,this.isPrimaryDisabled=!1,this.modalWidth="500px",this.modalHeight="80dvh",this.maxHeight="90dvh",this.hideFooter=!1,this.scrollable=!1,this.hasDropdownOpen=!1,this.hasCalendarOpen=!1,this.handleDropdownOpen=t=>{const e=t.detail;e&&"boolean"==typeof e.open?this.hasDropdownOpen=e.open:this.hasDropdownOpen=!0},this.handleCalendarOpen=t=>{const e=t.detail;e&&"boolean"==typeof e.open?this.hasCalendarOpen=e.open:this.hasCalendarOpen=!0},this.setScrollableMode=()=>{this.scrollable=window.innerWidth>940}}static{this.styles=[J,o`
|
|
1569
1569
|
${X}
|
|
1570
1570
|
|
|
1571
1571
|
:host {
|
|
@@ -1789,7 +1789,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1789
1789
|
`}
|
|
1790
1790
|
</div>
|
|
1791
1791
|
</div>
|
|
1792
|
-
`}};s([
|
|
1792
|
+
`}};s([B({type:Boolean,reflect:!0}),n("design:type",Object)],at.prototype,"open",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"title",void 0),s([B({type:String}),n("design:type",String)],at.prototype,"subtitle",void 0),s([B({type:Boolean}),n("design:type",Object)],at.prototype,"showNotice",void 0),s([B({type:String}),n("design:type",String)],at.prototype,"noticeType",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"noticeMessage",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"noticeIcon",void 0),s([B({type:Boolean}),n("design:type",Object)],at.prototype,"showPrimaryButton",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"primaryButtonLabel",void 0),s([B({type:Boolean}),n("design:type",Object)],at.prototype,"showSecondaryButton",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"secondaryButtonLabel",void 0),s([B({type:Boolean}),n("design:type",Object)],at.prototype,"isFooterCustom",void 0),s([B({type:Boolean}),n("design:type",Object)],at.prototype,"isPrimaryLoader",void 0),s([B({type:Boolean}),n("design:type",Object)],at.prototype,"isPrimaryDisabled",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"modalWidth",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"modalHeight",void 0),s([B({type:String}),n("design:type",Object)],at.prototype,"maxHeight",void 0),s([B({type:Boolean}),n("design:type",Object)],at.prototype,"hideFooter",void 0),s([L(),n("design:type",Object)],at.prototype,"scrollable",void 0),s([L(),n("design:type",Object)],at.prototype,"hasDropdownOpen",void 0),s([L(),n("design:type",Object)],at.prototype,"hasCalendarOpen",void 0),at=s([a("custom-modal")],at);let lt=class extends t{constructor(){super(...arguments),this.open=!1,this.type="default",this.icon="warning",this.title="",this.description="",this.width="400px",this.height="",this.buttonText="Aceptar",this.confirmText="Sí",this.cancelText="No",this.closeOnOutsideClick=!1,this.stackedActions=[],this._onBackgroundClick=t=>{if(!this.closeOnOutsideClick)return;const e=t.composedPath(),i=this.renderRoot.querySelector(".popup");i&&!e.includes(i)&&(this.dispatchEvent(new CustomEvent("popup-close",{detail:null})),this.open=!1)}}static{this.styles=o`
|
|
1793
1793
|
:host {
|
|
1794
1794
|
display: none;
|
|
1795
1795
|
position: fixed;
|
|
@@ -1985,7 +1985,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1985
1985
|
`}
|
|
1986
1986
|
</div>
|
|
1987
1987
|
</div>
|
|
1988
|
-
`}};s([
|
|
1988
|
+
`}};s([B({type:Boolean,reflect:!0}),n("design:type",Object)],lt.prototype,"open",void 0),s([B({type:String}),n("design:type",String)],lt.prototype,"type",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"icon",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"title",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"description",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"width",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"height",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"buttonText",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"confirmText",void 0),s([B({type:String}),n("design:type",Object)],lt.prototype,"cancelText",void 0),s([B({type:Boolean}),n("design:type",Object)],lt.prototype,"closeOnOutsideClick",void 0),s([B({type:Array}),n("design:type",Array)],lt.prototype,"stackedActions",void 0),lt=s([a("custom-popup")],lt);let dt=class extends t{constructor(){super(...arguments),this.value=0,this.max=5}static{this.styles=o`
|
|
1989
1989
|
:host {
|
|
1990
1990
|
display: inline-block;
|
|
1991
1991
|
width: 64px;
|
|
@@ -1998,7 +1998,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1998
1998
|
}
|
|
1999
1999
|
|
|
2000
2000
|
.circle-text {
|
|
2001
|
-
${
|
|
2001
|
+
${P};
|
|
2002
2002
|
text-align: center;
|
|
2003
2003
|
vertical-align: middle;
|
|
2004
2004
|
fill: var(--randstad-dark-blue-40);
|
|
@@ -2046,7 +2046,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2046
2046
|
${this.value} de ${this.max}
|
|
2047
2047
|
</text>
|
|
2048
2048
|
</svg>
|
|
2049
|
-
`}};s([
|
|
2049
|
+
`}};s([B({type:Number}),n("design:type",Object)],dt.prototype,"value",void 0),s([B({type:Number}),n("design:type",Object)],dt.prototype,"max",void 0),dt=s([a("progress-circle")],dt);let ct=class extends t{constructor(){super(...arguments),this.name="",this.checked=!1,this.disabled=!1,this.error=!1,this.label="",this.value=""}static{this.styles=o`
|
|
2050
2050
|
:host {
|
|
2051
2051
|
font-family: "Graphik", sans-serif;
|
|
2052
2052
|
|
|
@@ -2190,9 +2190,9 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2190
2190
|
|
|
2191
2191
|
<span> ${o} </span>
|
|
2192
2192
|
</label>
|
|
2193
|
-
`}};s([
|
|
2193
|
+
`}};s([B({type:String}),n("design:type",Object)],ct.prototype,"name",void 0),s([B({type:Boolean}),n("design:type",Object)],ct.prototype,"checked",void 0),s([B({type:Boolean}),n("design:type",Object)],ct.prototype,"disabled",void 0),s([B({type:Boolean}),n("design:type",Object)],ct.prototype,"error",void 0),s([B({type:String}),n("design:type",Object)],ct.prototype,"label",void 0),s([B({type:String}),n("design:type",Object)],ct.prototype,"value",void 0),ct=s([a("custom-radio")],ct);const ht=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let pt=class extends R{constructor(){super(...arguments),this.value="",this.defaultValue="",this.options=[],this.filterable=!0,this.textLabelFilterNotResult="",this.textLabelMobileSearch="",this.isRenderClearButton=!1,this.sortable=!0,this.isMobile=!1,this.highlightedIndex=-1,this._isCleared=!1,this.originalHtmlOverflow="",this.originalHtmlPaddingRight="",this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.showNoResults=!1,this.lastElement=!1,this.debounceTimeout=null,this.getOptionLabel=t=>"string"==typeof t?t:t.label,this.handleGlobalOverlayOpen=t=>{t.detail!==this&&this.isOpen&&(this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})))},this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this)}static{this.styles=[J,o`
|
|
2194
2194
|
${Q}
|
|
2195
|
-
${
|
|
2195
|
+
${Z}
|
|
2196
2196
|
${K}
|
|
2197
2197
|
|
|
2198
2198
|
/* --- Own Error Styles --- */
|
|
@@ -2572,7 +2572,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2572
2572
|
.mobile-modal .options-list li.no-results-item.mobile-item {
|
|
2573
2573
|
text-align: center;
|
|
2574
2574
|
}
|
|
2575
|
-
`]}manageScrollElement(t,e){e?t.classList.add("modal-open-no-scroll"):t.classList.remove("modal-open-no-scroll")}toggleDynamicScrollLock(t){const e=document.documentElement;if(t){this.originalHtmlOverflow=e.style.overflow,this.originalHtmlPaddingRight=e.style.paddingRight,e.style.overflow="hidden",this.manageScrollElement(e,!0);if(e.scrollHeight>e.clientHeight){const t=window.innerWidth-e.clientWidth;e.style.paddingRight=`${t}px`}}else e.style.overflow=this.originalHtmlOverflow,e.style.paddingRight=this.originalHtmlPaddingRight,this.manageScrollElement(e,!1)}normalizeText(t){return t?t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""):""}sortOptions(t,e,i){const o=t=>"string"==typeof t?t:"string"==typeof t.value?t.value:"",r=this.getOptionLabel(t),s=this.getOptionLabel(e),n=this.normalizeText(r),a=this.normalizeText(s);if(i&&i.length>0){const t=this.normalizeText(i),e=n.startsWith(t),o=a.startsWith(t);if(e&&!o)return-1;if(!e&&o)return 1}const l=o(t),d=o(e);if("+54"===l)return-1;if("+54"===d)return 1;if("+54"===l&&"+54"===d)return 0;const c=r.match(/^\d+(\.\d+)?/),h=s.match(/^\d+(\.\d+)?/),p=c?Number(c[0]):NaN,u=h?Number(h[0]):NaN;return isNaN(p)||isNaN(u)?r.localeCompare(s,"es",{usage:"sort",sensitivity:"accent"}):p-u}filterAndSortOptions(){if(!this.filterable||!this.filterValue||0===this.filterValue.length)return this.filteredOptions=this.sortable?[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0))):[...this.options],this.highlightedIndex=-1,void(this.showNoResults=!1);const t=this.filterValue,e=this.normalizeText(t);let i=this.options.filter((t=>{const i=this.getOptionLabel(t);return this.normalizeText(i).includes(e)}));this.sortable?this.filteredOptions=i.sort(((e,i)=>this.sortOptions(e,i,t))):this.filteredOptions=i,this.highlightedIndex=this.filteredOptions.length>0?0:-1,this.showNoResults=0===this.filteredOptions.length}handleOptionHover(t){this.highlightedIndex!==t&&(this.highlightedIndex=t)}update(t){if(t.has("options")){if(this.sortable){const t=[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0)));this.options=t}this.filterAndSortOptions();if(this.options.length<=5)this.filterable=!1;else{const t=this.getAttribute("filterable");this.filterable=null===t||"false"!==t}}if((t.has("defaultValue")||t.has("options")||t.has("value")&&this.value)&&!this._isCleared){const t=this.value||this.defaultValue,e=this.options.find((e=>"string"==typeof e?e===t:e.value===t));e?(this.filterValue="string"==typeof e?e:e.label,this.value="string"==typeof e?e:e.value):((this.isOpen||this.filterValue)&&(this.isOpen||""!==this.value)||(this.filterValue=""),this.value="")}this._isCleared&&""===this.value&&(this._isCleared=!1),super.update(t)}willUpdate(t){t.has("filterValue")&&this.filterAndSortOptions()}updated(t){super.updated(t),t.has("isOpen")&&this.isMobile&&this.toggleDynamicScrollLock(this.isOpen);const e=!1===t.get("isOpen");this.isMobile&&this.isOpen&&t.has("isOpen")&&e&&this.updateComplete.then((()=>{const t=this.mobileInputRef;t&&window.setTimeout((()=>{t.focus(),t.setSelectionRange(t.value.length,t.value.length)}),0)}))}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this)),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),this.debounceTimeout&&(clearTimeout(this.debounceTimeout),this.debounceTimeout=null),this.isMobile&&this.toggleDynamicScrollLock(!1),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.disabled||(this.isOpen||(this.notifyOverlayOpened(),this.filteredOptions=[...this.options],this.showNoResults=!1,this.isMobile&&(this.mobileFilterValue="")),this.isOpen=!this.isOpen,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:this.isOpen},bubbles:!0,composed:!0})),this.requestUpdate())}handleInput(t){if(!this.filterable)return;this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength):e;if(this.filterValue=i,this.notifyOverlayOpened(),this.isOpen=!0,""===i)this.value="",this.filteredOptions=[...this.options],this.showNoResults=!1;else{const t=this.normalizeText(i);this.filteredOptions=this.options.filter((e=>{const i="string"==typeof e?e:e.label;return this.normalizeText(i).includes(t)})),this.showNoResults=0===this.filteredOptions.length}this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){this._isCleared=!1;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength):e;this.mobileFilterValue=i;const o=this.normalizeText(i);this.filteredOptions=this.options.filter((t=>{const e="string"==typeof t?t:t.label;return this.normalizeText(e).includes(o)})),this.showNoResults=i.length>0&&0===this.filteredOptions.length,this.requestUpdate(),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2?this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0})):0===i.length&&(this.filteredOptions=[...this.options])}),300)}handleSelect(t){this._isCleared=!1,this.highlightedIndex=-1;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.value=e,this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.mobileFilterValue=this.filterValue,this.filteredOptions=[...this.options],this.showNoResults=!1,this.requestUpdate()}handleIconClick(){if(this.disabled)return;this.highlightedIndex=-1;const t=this.isRenderClearButton,e="string"==typeof this.value&&""!==this.value,i="object"==typeof this.value&&null!==this.value&&Object.keys(this.value).length>0;t&&(e||i)?(this._isCleared=!0,this.filterValue="",this.value="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}))):(this.notifyOverlayOpened(),this.isOpen=!this.isOpen,this.isOpen?(this.mobileFilterValue="",this.showNoResults=!1,this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!0},bubbles:!0,composed:!0})),this.updateComplete.then((()=>{if(this.isMobile)return;const t=this.shadowRoot?.querySelector(".filter-input");t?.focus()}))):(this.mobileFilterValue="",this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})))),this.requestUpdate()}handleClickOutside(t){const e=t.target;e instanceof Node&&(!this.contains(e)&&this.isOpen&&(this.isOpen=!1,this.validateAndCleanOnBlur(),this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()),this.isMobile&&(this.mobileFilterValue="",this.filteredOptions=[...this.options]))}preventInvalidStart(t){const e=t.target;if(e&&"INPUT"===e.tagName&&0===e.selectionStart&&1===t.key.length){if(!/[a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]/.test(t.key))return t.preventDefault(),!0}return!1}handlePaste(t){const e=t.target;if(e&&"INPUT"===e.tagName&&0===e.selectionStart){const i=e.selectionStart,o=e.selectionEnd;if(null===i||null===o)return;t.preventDefault();const r=(t.clipboardData?.getData("text")||"").replace(/^[^a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]+/,"");r&&(e.setRangeText(r,i,o,"end"),e.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}}handleKeyDown(t){if(this.preventInvalidStart(t))return;const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input");if("Backspace"===e&&this.filterable){const t=i?.value||"",e=i&&i.selectionStart!==i.selectionEnd,o=1===t.length&&!e,r=0===t.length;(o||r)&&(this.value="",this.filterValue="",this._isCleared=!0,this.filteredOptions=[...this.options],this.isOpen=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.requestUpdate())}const o=this.filteredOptions.filter((t=>!("object"==typeof t&&t.disabled)));if(!this.isOpen&&("Enter"===e||" "===e)){t.preventDefault(),this.notifyOverlayOpened(),this.isOpen=!0;const e=this.filteredOptions.findIndex((t=>!("object"==typeof t&&t.disabled)));return this.highlightedIndex=-1!==e?e:-1,void this.requestUpdate()}if(this.isOpen){if("ArrowDown"===e){t.preventDefault();let e=this.highlightedIndex+1;for(;e<this.filteredOptions.length;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e++}if(e>=this.filteredOptions.length){const t=this.filteredOptions.length-1;this.highlightedIndex=o.length>0?t:-1}this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("ArrowUp"===e){t.preventDefault();let e=this.highlightedIndex-1;for(;e>=0;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e--}e<0&&(this.highlightedIndex=-1),this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("Enter"===e||" "===e){this.highlightedIndex>=0&&t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];if(this.highlightedIndex>=0&&e&&("object"!=typeof e||!e.disabled)){this.handleSelect(e);const t=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");return t?t.focus():i?.focus(),void(this.highlightedIndex=-1)}}else if("Escape"===e){t.preventDefault(),this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}));const e=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");e?e.focus():i?.focus()}else"Tab"===e?(this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()):!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);if(("ArrowLeft"===e||"ArrowRight"===e)&&this.filterable)return}if("ArrowRight"!==e)this.isOpen&&!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);else{const e=!i||i.selectionStart===i.value.length;if(!this.filterable||e){t.preventDefault();const e=this.shadowRoot?.querySelector(".icon-button");e?.focus()}}}handleButtonKeyDown(t){const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input"),o=this.shadowRoot?.querySelector(".filter-fake"),r=i||o;return"ArrowLeft"===e?(t.preventDefault(),r?.focus(),void(r instanceof HTMLInputElement&&(r.selectionStart=r.selectionEnd=r.value.length))):"Enter"===e||" "===e?(t.preventDefault(),this.filterable&&this.filterValue?(this.handleIconClick(),r?.focus()):(this.isOpen=!this.isOpen,this.isOpen&&(this.highlightedIndex=-1,r?.focus())),void this.requestUpdate()):void("Tab"===e&&this.isOpen&&(this.isOpen=!1,this.highlightedIndex=-1,this.requestUpdate()))}handleBlur(){window.setTimeout((()=>{this.validateAndCleanOnBlur(),this.requestUpdate()}),200)}scrollHighlightedIntoView(){if(this.isMobile||this.highlightedIndex<0)return;const t=this.shadowRoot?.querySelector(".options-list");if(!t)return;const e=t.querySelector("li.highlighted");e&&e.scrollIntoView({block:"nearest"})}renderOptionIcon(t){return t&&"string"==typeof t?e`<span class="icon-list" .innerHTML="${t}"></span>`:i}validateAndCleanOnBlur(){if(!this.filterable)return;const t=this.normalizeText((this.filterValue||"").trim());if(!t)return""!==this.value&&(this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}))),this.filterValue="",this.filteredOptions=[...this.options],void(this.showNoResults=!1);const e=this.options.find((e=>{const i="string"==typeof e?e:e.label;return this.normalizeText(String(i))===t}));if(e){const t="string"==typeof e?e:e.value,i="string"==typeof e?e:e.label;this.value!==t&&(this.value=t,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:t},bubbles:!0,composed:!0}))),this.filterValue=i,this.showNoResults=!1}else this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.filterValue="",this.filteredOptions=[...this.options],this.showNoResults=!1}render(){const t=this.isMobile,o=` --filter-text-color: ${this.value?"var( --secondary-color )":"var( --secondary-color-40 )"}; `,r=e`
|
|
2575
|
+
`]}manageScrollElement(t,e){e?t.classList.add("modal-open-no-scroll"):t.classList.remove("modal-open-no-scroll")}toggleDynamicScrollLock(t){const e=document.documentElement;if(t){this.originalHtmlOverflow=e.style.overflow,this.originalHtmlPaddingRight=e.style.paddingRight,e.style.overflow="hidden",this.manageScrollElement(e,!0);if(e.scrollHeight>e.clientHeight){const t=window.innerWidth-e.clientWidth;e.style.paddingRight=`${t}px`}}else e.style.overflow=this.originalHtmlOverflow,e.style.paddingRight=this.originalHtmlPaddingRight,this.manageScrollElement(e,!1)}normalizeText(t){return t?t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""):""}sortOptions(t,e,i){const o=t=>"string"==typeof t?t:"string"==typeof t.value?t.value:"",r=this.getOptionLabel(t),s=this.getOptionLabel(e),n=this.normalizeText(r),a=this.normalizeText(s);if(i&&i.length>0){const t=this.normalizeText(i),e=n.startsWith(t),o=a.startsWith(t);if(e&&!o)return-1;if(!e&&o)return 1}const l=o(t),d=o(e);if("+54"===l)return-1;if("+54"===d)return 1;if("+54"===l&&"+54"===d)return 0;const c=r.match(/^\d+(\.\d+)?/),h=s.match(/^\d+(\.\d+)?/),p=c?Number(c[0]):NaN,u=h?Number(h[0]):NaN;return isNaN(p)||isNaN(u)?r.localeCompare(s,"es",{usage:"sort",sensitivity:"accent"}):p-u}filterAndSortOptions(){if(!this.filterable||!this.filterValue||0===this.filterValue.length)return this.filteredOptions=this.sortable?[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0))):[...this.options],this.highlightedIndex=-1,void(this.showNoResults=!1);const t=this.filterValue,e=this.normalizeText(t);let i=this.options.filter((t=>{const i=this.getOptionLabel(t);return this.normalizeText(i).includes(e)}));this.sortable?this.filteredOptions=i.sort(((e,i)=>this.sortOptions(e,i,t))):this.filteredOptions=i,this.highlightedIndex=this.filteredOptions.length>0?0:-1,this.showNoResults=0===this.filteredOptions.length}handleOptionHover(t){this.highlightedIndex!==t&&(this.highlightedIndex=t)}update(t){if(t.has("options")){if(this.sortable){const t=[...this.options].sort(((t,e)=>this.sortOptions(t,e,void 0)));this.options=t}this.filterAndSortOptions();if(this.options.length<=5)this.filterable=!1;else{const t=this.getAttribute("filterable");this.filterable=null===t||"false"!==t}}if((t.has("defaultValue")||t.has("options")||t.has("value")&&this.value)&&!this._isCleared){const t=this.value||this.defaultValue,e=this.options.find((e=>"string"==typeof e?e===t:e.value===t));e?(this.filterValue="string"==typeof e?e:e.label,this.value="string"==typeof e?e:e.value):((this.isOpen||this.filterValue)&&(this.isOpen||""!==this.value)||(this.filterValue=""),this.value="")}this._isCleared&&""===this.value&&(this._isCleared=!1),super.update(t)}willUpdate(t){t.has("filterValue")&&this.filterAndSortOptions()}updated(t){super.updated(t),t.has("isOpen")&&this.isMobile&&this.toggleDynamicScrollLock(this.isOpen);const e=!1===t.get("isOpen");this.isMobile&&this.isOpen&&t.has("isOpen")&&e&&this.updateComplete.then((()=>{const t=this.mobileInputRef;t&&window.setTimeout((()=>{t.focus(),t.setSelectionRange(t.value.length,t.value.length)}),0)}))}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this)),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),this.debounceTimeout&&(clearTimeout(this.debounceTimeout),this.debounceTimeout=null),this.isMobile&&this.toggleDynamicScrollLock(!1),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.disabled||(this.isOpen||(this.notifyOverlayOpened(),this.filteredOptions=[...this.options],this.showNoResults=!1,this.isMobile&&(this.mobileFilterValue="")),this.isOpen=!this.isOpen,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:this.isOpen},bubbles:!0,composed:!0})),this.requestUpdate())}handleInput(t){if(!this.filterable)return;this._isCleared=!1;const e=t.target,i=e.value,o=e.selectionStart||0,r=i.slice(0,o).replace(ht,"").length,s=i.replace(ht,"");let n=this.maxLength?s.slice(0,this.maxLength):s;if(n.startsWith(" ")&&(n=n.trimStart()),e.value=n,this.filterValue=n,e.setSelectionRange(r,r),this.notifyOverlayOpened(),this.isOpen=!0,""===n)this.value="",this._isCleared=!0,this.filteredOptions=[...this.options],this.showNoResults=!1,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}));else{const t=this.normalizeText(n);this.filteredOptions=this.options.filter((e=>{const i="string"==typeof e?e:e.label;return this.normalizeText(i).includes(t)})),this.showNoResults=0===this.filteredOptions.length}this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){this._isCleared=!1;const e=t.target,i=e.value,o=e.selectionStart||0,r=i.slice(0,o).replace(ht,"").length,s=i.replace(ht,"");let n=this.maxLength?s.slice(0,this.maxLength):s;n.startsWith(" ")&&(n=n.trimStart()),e.value=n,this.mobileFilterValue=n,e.setSelectionRange(r,r);const a=this.normalizeText(n);""===n?(this.value="",this._isCleared=!0,this.filteredOptions=[...this.options],this.showNoResults=!1,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}))):(this.filteredOptions=this.options.filter((t=>{const e="string"==typeof t?t:t.label;return this.normalizeText(e).includes(a)})),this.showNoResults=0===this.filteredOptions.length),this.requestUpdate(),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{n.length>2?this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:n},bubbles:!0,composed:!0})):0===n.length&&(this.filteredOptions=[...this.options])}),300)}handleSelect(t){this._isCleared=!1,this.highlightedIndex=-1;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.value=e,this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.mobileFilterValue=this.filterValue,this.filteredOptions=[...this.options],this.showNoResults=!1,this.requestUpdate()}handleIconClick(){if(this.disabled)return;this.highlightedIndex=-1;const t=this.isRenderClearButton,e="string"==typeof this.value&&""!==this.value,i="object"==typeof this.value&&null!==this.value&&Object.keys(this.value).length>0;t&&(e||i)?(this._isCleared=!0,this.filterValue="",this.value="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}))):(this.notifyOverlayOpened(),this.isOpen=!this.isOpen,this.isOpen?(this.mobileFilterValue="",this.showNoResults=!1,this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!0},bubbles:!0,composed:!0})),this.updateComplete.then((()=>{if(this.isMobile)return;const t=this.shadowRoot?.querySelector(".filter-input");t?.focus()}))):(this.mobileFilterValue="",this.filteredOptions=[...this.options],this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})))),this.requestUpdate()}handleClickOutside(t){const e=t.target;e instanceof Node&&(!this.contains(e)&&this.isOpen&&(this.isOpen=!1,this.validateAndCleanOnBlur(),this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()),this.isMobile&&(this.mobileFilterValue="",this.filteredOptions=[...this.options]))}preventInvalidStart(t){const e=t.target;if(e&&"INPUT"===e.tagName&&0===e.selectionStart&&1===t.key.length){if(!/[a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]/.test(t.key))return t.preventDefault(),!0}return!1}handlePaste(t){const e=t.target;if(e&&"INPUT"===e.tagName&&0===e.selectionStart){const i=e.selectionStart,o=e.selectionEnd;if(null===i||null===o)return;t.preventDefault();let r=(t.clipboardData?.getData("text")||"").replace(ht,"").replace(/^[^a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]+/,"");r.startsWith(" ")&&(r=r.trimStart()),r&&(e.setRangeText(r,i,o,"end"),e.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))}}handleKeyDown(t){if(this.preventInvalidStart(t))return;const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input");if("Backspace"===e&&this.filterable){const t=i?.value||"",e=i&&i.selectionStart!==i.selectionEnd,o=1===t.length&&!e,r=0===t.length;(o||r)&&(this.value="",this.filterValue="",this._isCleared=!0,this.filteredOptions=[...this.options],this.isOpen=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.requestUpdate())}const o=this.filteredOptions.filter((t=>!("object"==typeof t&&t.disabled)));if(!this.isOpen&&("Enter"===e||" "===e)){t.preventDefault(),this.notifyOverlayOpened(),this.isOpen=!0;const e=this.filteredOptions.findIndex((t=>!("object"==typeof t&&t.disabled)));return this.highlightedIndex=-1!==e?e:-1,void this.requestUpdate()}if(this.isOpen){if("ArrowDown"===e){t.preventDefault();let e=this.highlightedIndex+1;for(;e<this.filteredOptions.length;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e++}if(e>=this.filteredOptions.length){const t=this.filteredOptions.length-1;this.highlightedIndex=o.length>0?t:-1}this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("ArrowUp"===e){t.preventDefault();let e=this.highlightedIndex-1;for(;e>=0;){const t=this.filteredOptions[e];if("object"!=typeof t||!t.disabled){this.highlightedIndex=e;break}e--}e<0&&(this.highlightedIndex=-1),this.requestUpdate(),this.updateComplete.then((()=>this.scrollHighlightedIntoView()))}else if("Enter"===e||" "===e){this.highlightedIndex>=0&&t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];if(this.highlightedIndex>=0&&e&&("object"!=typeof e||!e.disabled)){this.handleSelect(e);const t=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");return t?t.focus():i?.focus(),void(this.highlightedIndex=-1)}}else if("Escape"===e){t.preventDefault(),this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0}));const e=this.shadowRoot?.querySelector(".filter-input"),i=this.shadowRoot?.querySelector(".filter-fake");e?e.focus():i?.focus()}else"Tab"===e?(this.isOpen=!1,this.highlightedIndex=-1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})),this.requestUpdate()):!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);if(("ArrowLeft"===e||"ArrowRight"===e)&&this.filterable)return}if("ArrowRight"!==e)this.isOpen&&!this.isMobile&&this.filterable&&1===e.length&&(this.highlightedIndex=-1);else{const e=!i||i.selectionStart===i.value.length;if(!this.filterable||e){t.preventDefault();const e=this.shadowRoot?.querySelector(".icon-button");e?.focus()}}}handleButtonKeyDown(t){const{key:e}=t,i=this.shadowRoot?.querySelector(".filter-input"),o=this.shadowRoot?.querySelector(".filter-fake"),r=i||o;return"ArrowLeft"===e?(t.preventDefault(),r?.focus(),void(r instanceof HTMLInputElement&&(r.selectionStart=r.selectionEnd=r.value.length))):"Enter"===e||" "===e?(t.preventDefault(),this.filterable&&this.filterValue?(this.handleIconClick(),r?.focus()):(this.isOpen=!this.isOpen,this.isOpen&&(this.highlightedIndex=-1,r?.focus())),void this.requestUpdate()):void("Tab"===e&&this.isOpen&&(this.isOpen=!1,this.highlightedIndex=-1,this.requestUpdate()))}handleBlur(){window.setTimeout((()=>{this.validateAndCleanOnBlur(),this.requestUpdate()}),200)}scrollHighlightedIntoView(){if(this.isMobile||this.highlightedIndex<0)return;const t=this.shadowRoot?.querySelector(".options-list");if(!t)return;const e=t.querySelector("li.highlighted");e&&e.scrollIntoView({block:"nearest"})}renderOptionIcon(t){return t&&"string"==typeof t?e`<span class="icon-list" .innerHTML="${t}"></span>`:i}validateAndCleanOnBlur(){if(!this.filterable)return;const t=this.normalizeText((this.filterValue||"").trim());if(!t)return""!==this.value&&(this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0}))),this.filterValue="",this.filteredOptions=[...this.options],void(this.showNoResults=!1);const e=this.options.find((e=>{const i="string"==typeof e?e:e.label;return this.normalizeText(String(i))===t}));if(e){const t="string"==typeof e?e:e.value,i="string"==typeof e?e:e.label;this.value!==t&&(this.value=t,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:t},bubbles:!0,composed:!0}))),this.filterValue=i,this.showNoResults=!1}else this.value="",this._isCleared=!0,this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.filterValue="",this.filteredOptions=[...this.options],this.showNoResults=!1}render(){const t=this.isMobile,o=` --filter-text-color: ${this.value?"var( --secondary-color )":"var( --secondary-color-40 )"}; `,r=e`
|
|
2576
2576
|
<randstad-icon
|
|
2577
2577
|
name="${this.isOpen&&this.filteredOptions.length>0?"arrow_up":"arrow_down"}"
|
|
2578
2578
|
size="24px"
|
|
@@ -2718,7 +2718,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2718
2718
|
</div>
|
|
2719
2719
|
</div>
|
|
2720
2720
|
`:i}
|
|
2721
|
-
`}};s([
|
|
2721
|
+
`}};s([B({type:Object}),n("design:type",Object)],pt.prototype,"value",void 0),s([B({type:String,attribute:"default-value"}),n("design:type",Object)],pt.prototype,"defaultValue",void 0),s([B({type:Array}),n("design:type",Array)],pt.prototype,"options",void 0),s([B({type:Boolean}),n("design:type",Object)],pt.prototype,"filterable",void 0),s([B({type:Number}),n("design:type",Number)],pt.prototype,"maxLength",void 0),s([B({type:String}),n("design:type",String)],pt.prototype,"textLabelFilterNotResult",void 0),s([B({type:String}),n("design:type",String)],pt.prototype,"textLabelMobileSearch",void 0),s([B({type:Boolean}),n("design:type",Object)],pt.prototype,"isRenderClearButton",void 0),s([B({type:Boolean}),n("design:type",Object)],pt.prototype,"sortable",void 0),s([L(),n("design:type",Boolean)],pt.prototype,"isMobile",void 0),s([L(),n("design:type",Object)],pt.prototype,"highlightedIndex",void 0),s([L(),n("design:type",Boolean)],pt.prototype,"_isCleared",void 0),s([L(),n("design:type",Array)],pt.prototype,"filteredOptions",void 0),s([L(),n("design:type",Object)],pt.prototype,"filterValue",void 0),s([L(),n("design:type",Object)],pt.prototype,"isOpen",void 0),s([L(),n("design:type",Object)],pt.prototype,"mobileFilterValue",void 0),s([L(),n("design:type",Boolean)],pt.prototype,"showNoResults",void 0),s([B({type:Boolean,attribute:"last-element"}),n("design:type",Object)],pt.prototype,"lastElement",void 0),s([_(".mobile-modal .filter-input"),n("design:type",HTMLInputElement)],pt.prototype,"mobileInputRef",void 0),pt=s([a("filterable-select")],pt);const ut=new CSSStyleSheet;ut.replaceSync("\n @font-face {\n font-family: 'Graphik';\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n .body-s {\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n letter-spacing: 0%;\n color: green;\n }\n\n .body-l {\n font-family: Graphik;\n font-size: 18px;\n font-style: normal;\n font-weight: 400;\n line-height: 30px;\n }\n");class gt extends t{static{this.styles=[ut,o`
|
|
2722
2722
|
:host {
|
|
2723
2723
|
display: flex;
|
|
2724
2724
|
position: fixed;
|
|
@@ -2853,7 +2853,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2853
2853
|
<randstad-icon name=${this.icon} size="24px" color="white"></randstad-icon>
|
|
2854
2854
|
<span class="message">${this.message}</span>
|
|
2855
2855
|
</div>
|
|
2856
|
-
`}}customElements.define("randstad-snackbar",
|
|
2856
|
+
`}}customElements.define("randstad-snackbar",gt);let bt=class extends t{constructor(){super(...arguments),this.totalSteps=4,this.currentStep=0}static{this.styles=o`
|
|
2857
2857
|
.stepper {
|
|
2858
2858
|
display: flex;
|
|
2859
2859
|
gap: 20px;
|
|
@@ -2953,7 +2953,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2953
2953
|
</div>
|
|
2954
2954
|
`))}
|
|
2955
2955
|
</div>
|
|
2956
|
-
`}};s([
|
|
2956
|
+
`}};s([B({type:Number}),n("design:type",Object)],bt.prototype,"totalSteps",void 0),s([B({type:Number}),n("design:type",Object)],bt.prototype,"currentStep",void 0),bt=s([a("custom-stepper")],bt);let mt=class extends t{constructor(){super(...arguments),this.tabs=[],this.selected="",this.internalSelected="",this.showPrev=!1,this.showNext=!1,this.SCROLL_OFFSET=56,this.handleScroll=()=>{const t=this.renderRoot.querySelector(".tab-wrapper");if(!t)return;const{scrollLeft:e,scrollWidth:i,clientWidth:o}=t;this.showPrev=e>0,this.showNext=e+o<i-1}}static{this.styles=o`
|
|
2957
2957
|
:host {
|
|
2958
2958
|
display: block;
|
|
2959
2959
|
border-bottom: 1px solid #E7E8EC;
|
|
@@ -3092,7 +3092,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3092
3092
|
</button>
|
|
3093
3093
|
`:null}
|
|
3094
3094
|
</div>
|
|
3095
|
-
`}};s([
|
|
3095
|
+
`}};s([B({type:Array}),n("design:type",Array)],mt.prototype,"tabs",void 0),s([B({type:String}),n("design:type",String)],mt.prototype,"selected",void 0),s([L(),n("design:type",String)],mt.prototype,"internalSelected",void 0),s([L(),n("design:type",Object)],mt.prototype,"showPrev",void 0),s([L(),n("design:type",Object)],mt.prototype,"showNext",void 0),mt=s([a("tabs-bar")],mt);let yt=class extends R{constructor(){super(...arguments),this.files=[],this.simulatedDelay=0,this.showAlertInError=!1,this.typeTextFile="",this.loading=!1,this.progress=0,this.errorTextMessage=null,this.isMultiple=!1,this.TEXT_SNACKBAR_ERROR_TYPE=()=>"El formato del archivo no es válido",this.TEXT_SNACKBAR_ERROR_SIZE=t=>`El archivo es muy grande. Máximo ${t}`,this.TEXT_SNACKBAR_ERROR_DELETE=t=>`Tu ${this.typeTextFile?this.typeTextFile:"file"===t?"archivo":"imagen"} fue ${"file"===t?"eliminado":"eliminada"}`}showSnackbar(t,e=5e3,i){const o=document.querySelector("randstad-snackbar");o?(clearTimeout(o.timer),o.open&&(o.open=!1),setTimeout((()=>{o.type=i,o.icon="error"===i?"warning":"check",o.message=t,o.open=!0,o.timer=setTimeout((()=>o.open=!1),e)}),150)):console.warn("randstad-snackbar component not found in the DOM. Cannot show alert.")}baseGetTextMaxFileSize(t){const e=1048576;if(t>=e){return`${parseFloat((t/e).toPrecision(3)).toString()} MB`}return`${Math.round(t/1024)} KB`}getReadableFileTypes(t,e){const i=t.map((t=>e[t]||t));if(i.length<=1)return i.join("");const o=i.pop();return`${i.join(", ")} y ${o}`}validateFiles(t,e,i,o,r,s){const n=e>0,a=i.length>0;for(const l of t){const t="."+l.name.split(".").pop()?.toLowerCase(),d=i.includes(l.type),c=i.some((e=>{const i=e.split("/")[1];return"jpeg"===i?".jpeg"===t||".jpg"===t:t===`.${i}`}));if(a&&(!d||!c))return this.setError(s,o,this.TEXT_SNACKBAR_ERROR_TYPE()),!1;if(n&&l.size>e)return this.setError(s,r,this.TEXT_SNACKBAR_ERROR_SIZE(this.baseGetTextMaxFileSize(e))),!1}return!0}async baseHandleFiles(t,e){const{baseMaxFiles:i,maxFileSize:o,acceptedFileTypes:r,errorMessageType:s,errorMessageSize:n,typeError:a}=e;if(this.setError(a,null,null),!t||this.disabled||this.loading)return;const l=Array.isArray(this.files)?this.files:[],d=(Number.isFinite(i)&&i>0?i:1)-l.length;if(d<=0){const t="Alcanzaste el número máximo de archivos";return void this.setError(a,t,t)}const c=Array.from(t).slice(0,d);if(0===c.length)return;if(!this.validateFiles(c,o,r,s,n,a))return;const h=this.simulatedDelay??0;if(h<=0)return this.files=[...l,...c],void this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files}));this.loading=!0,this.progress=0,await this.updateComplete;const p=Date.now(),u=setInterval((()=>{const t=Date.now()-p,e=Math.min(Math.round(t/h*100),100);this.progress=e,this.progress>=100&&(clearInterval(u),this.files=[...l,...c],this.loading=!1,this.progress=0,this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})))}),10);this.fileInput&&(this.fileInput.value="")}baseOnFileInputChange(t,e){const i=t.target;this.baseHandleFiles(i.files,e),this.fileInput&&(this.fileInput.value="")}removeFile(t,e){this.files=this.files.filter(((e,i)=>i!==t)),this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})),0===this.files.length&&this.setError(e,null,null),this.showAlertInError&&this.showSnackbar(this.TEXT_SNACKBAR_ERROR_DELETE(e),5e3,"success")}setError(t="file",e,i){"file"===t&&(this.error=!!e,this.errorMessage=e),"image"===t&&(this.errorTextMessage=e),this.showAlertInError&&i&&this.showSnackbar(i,5e3,"error")}renderLoadingContainer(t){return e`
|
|
3096
3096
|
${this.loading?e`
|
|
3097
3097
|
<div class="progress-bar-container">
|
|
3098
3098
|
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
@@ -3102,7 +3102,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3102
3102
|
`:e`
|
|
3103
3103
|
${t}
|
|
3104
3104
|
`}
|
|
3105
|
-
`}};s([
|
|
3105
|
+
`}};s([B({type:Array}),n("design:type",Array)],yt.prototype,"files",void 0),s([B({type:Number}),n("design:type",Object)],yt.prototype,"simulatedDelay",void 0),s([B({type:Boolean}),n("design:type",Object)],yt.prototype,"showAlertInError",void 0),s([B({type:String}),n("design:type",Object)],yt.prototype,"typeTextFile",void 0),s([L(),n("design:type",Object)],yt.prototype,"loading",void 0),s([L(),n("design:type",Object)],yt.prototype,"progress",void 0),s([L(),n("design:type",Object)],yt.prototype,"errorTextMessage",void 0),s([_('input[ type="file" ]'),n("design:type",HTMLInputElement)],yt.prototype,"fileInput",void 0),yt=s([a("base-upload")],yt);const vt={"image/jpg":".jpg","image/jpeg":".jpeg","image/png":".png"},ft={"application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx",...vt,"text/plain":".txt"},wt=o`
|
|
3106
3106
|
.progress-bar-container {
|
|
3107
3107
|
min-height: 23px;
|
|
3108
3108
|
display: flex;
|
|
@@ -3122,9 +3122,9 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3122
3122
|
background-color: var( --primary-color );
|
|
3123
3123
|
transition: width 0.1s ease;
|
|
3124
3124
|
}
|
|
3125
|
-
`;let
|
|
3125
|
+
`;let xt=class extends yt{constructor(){super(...arguments),this.acceptedFileTypes=[],this.maxFiles=3,this.maxFileSize=0,this.isShowInfoSize=!0,this.isChangeStyleError=!1,this.isDragging=!1,this.imageUrls=[],this.isMaxFilesReached=!1}static{this.styles=o`
|
|
3126
3126
|
${Q}
|
|
3127
|
-
${
|
|
3127
|
+
${wt}
|
|
3128
3128
|
|
|
3129
3129
|
:host {
|
|
3130
3130
|
font-family: 'Graphik', sans-serif;
|
|
@@ -3178,21 +3178,21 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3178
3178
|
}
|
|
3179
3179
|
|
|
3180
3180
|
.text-secondary {
|
|
3181
|
-
${
|
|
3181
|
+
${P};
|
|
3182
3182
|
text-align: center;
|
|
3183
3183
|
vertical-align: middle;
|
|
3184
3184
|
color: var( --secondary-color-60 );
|
|
3185
3185
|
}
|
|
3186
3186
|
|
|
3187
3187
|
.text-tertiary {
|
|
3188
|
-
${
|
|
3188
|
+
${P};
|
|
3189
3189
|
text-align: center;
|
|
3190
3190
|
vertical-align: middle;
|
|
3191
3191
|
color: var( --secondary-color-40 );
|
|
3192
3192
|
}
|
|
3193
3193
|
|
|
3194
3194
|
.button {
|
|
3195
|
-
${
|
|
3195
|
+
${P};
|
|
3196
3196
|
background-color: var( --primary-color );
|
|
3197
3197
|
border: none;
|
|
3198
3198
|
padding: 4px 16px;
|
|
@@ -3251,7 +3251,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3251
3251
|
.text-main.error {
|
|
3252
3252
|
color: var(--ui-negative, #E00F0F);
|
|
3253
3253
|
}
|
|
3254
|
-
`}getFileConfig(){const t="tu archivo no es válido",e=this.maxFileSize>0,i=this.acceptedFileTypes.length>0;return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:i?t:"",errorMessageSize:e?t:"",typeError:"image"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,
|
|
3254
|
+
`}getFileConfig(){const t="tu archivo no es válido",e=this.maxFileSize>0,i=this.acceptedFileTypes.length>0;return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:i?t:"",errorMessageSize:e?t:"",typeError:"image"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,vt)}getTextMaxFileSize(){return this.baseGetTextMaxFileSize(this.maxFileSize)}updated(t){t.has("files")&&this.files&&(this.imageUrls.forEach((t=>URL.revokeObjectURL(t))),this.imageUrls=this.files.map((t=>URL.createObjectURL(t))))}disconnectedCallback(){super.disconnectedCallback(),this.imageUrls.forEach((t=>URL.revokeObjectURL(t)))}async handleFiles(t){await this.baseHandleFiles(t,this.getFileConfig())}onFileInputChange(t){this.baseOnFileInputChange(t,this.getFileConfig())}onDrop(t){t.preventDefault(),this.disabled||(this.isDragging=!1,this.handleFiles(t.dataTransfer?.files||null))}onDragOver(t){t.preventDefault(),this.disabled||(this.isDragging=!0)}onDragLeave(t){t.preventDefault(),this.disabled||(this.isDragging=!1)}willUpdate(t){t.has("files")&&(this.isMaxFilesReached=(this.files||[]).length>=3,(t.has("maxFiles")||0===t.size)&&(this.isMultiple=this.maxFiles>1))}handleButtonKeydown(t,e){if(!e&&("Enter"===t.key||" "===t.key)){t.preventDefault();const e=t.currentTarget?.querySelector('input[type="file"]');e&&!e.disabled&&e.click()}}render(){const t=this.disabled||this.isMaxFilesReached,o=this.disabled,r=this.maxFileSize>0,s=this.acceptedFileTypes.length>0,n=!1!==this.isShowInfoSize,a=r&&n?` / max. ${this.getTextMaxFileSize()}`:"",l=s?this.getTextAcceptedFileTypes():"",d=!0===this.isChangeStyleError,c=!!this.errorTextMessage&&d,h=c&&this.errorTextMessage?this.errorTextMessage:`subí hasta ${this.maxFiles} imágenes`,p=c?"assets/img/image-upload-error.svg":t?"assets/img/image-upload-disabled.svg":"assets/img/image-upload-circle.svg",u=`container ${this.isDragging?"dragging":""} ${c?"error":""}`,g=e`
|
|
3255
3255
|
<label class="button"
|
|
3256
3256
|
tabindex="0"
|
|
3257
3257
|
@keydown=${e=>this.handleButtonKeydown(e,t)}
|
|
@@ -3317,7 +3317,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3317
3317
|
</div>
|
|
3318
3318
|
</div>
|
|
3319
3319
|
</div>
|
|
3320
|
-
`}};s([L({type:Array}),n("design:type",Array)],vt.prototype,"acceptedFileTypes",void 0),s([L({type:Number}),n("design:type",Object)],vt.prototype,"maxFiles",void 0),s([L({type:Number}),n("design:type",Object)],vt.prototype,"maxFileSize",void 0),s([L({type:Boolean}),n("design:type",Object)],vt.prototype,"isShowInfoSize",void 0),s([L({type:Boolean}),n("design:type",Object)],vt.prototype,"isChangeStyleError",void 0),s([B(),n("design:type",Object)],vt.prototype,"isDragging",void 0),s([B(),n("design:type",Array)],vt.prototype,"imageUrls",void 0),s([B(),n("design:type",Boolean)],vt.prototype,"isMaxFilesReached",void 0),vt=s([a("upload-image")],vt);const ft=6048e5,wt=Symbol.for("constructDateFrom");function xt(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&wt in t?t[wt](e):t instanceof Date?new t.constructor(e):new Date(e)}function kt(t,e){return xt(e||t,t)}function $t(t,e,i){const o=kt(t,i?.in);if(isNaN(e))return xt(t,NaN);if(!e)return o;const r=o.getDate(),s=xt(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let St={};function Dt(){return St}function Et(t,e){const i=Dt(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=kt(t,e?.in),s=r.getDay(),n=(s<o?7:0)+s-o;return r.setDate(r.getDate()-n),r.setHours(0,0,0,0),r}function Ot(t,e){return Et(t,{...e,weekStartsOn:1})}function Ct(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=xt(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Ot(r),n=xt(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Ot(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Ft(t){const e=kt(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Mt(t,...e){const i=xt.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function Tt(t,e){const i=kt(t,e?.in);return i.setHours(0,0,0,0),i}function Lt(t,e,i){return $t(t,12*e,i)}function Bt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+kt(t)));var e}function _t(t,e){const i=kt(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const Pt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Rt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const jt={date:Rt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Rt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Rt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},At={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function zt(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=i?.width?String(i.width):e;o=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=i?.width?String(i.width):t.defaultWidth;o=t.values[r]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Nt(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=e.match(r);if(!s)return null;const n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(a,(t=>t.test(n))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(a,(t=>t.test(n)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(n.length)}}}var Wt;const It={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=Pt[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:jt,formatRelative:(t,e,i,o)=>At[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:zt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:zt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:zt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:zt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:zt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Wt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(Wt.matchPattern);if(!i)return null;const o=i[0],r=t.match(Wt.parsePattern);if(!r)return null;let s=Wt.valueCallback?Wt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Nt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Nt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Nt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Nt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Nt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Vt(t,e){const i=kt(t,e?.in),o=function(t,e){const[i,o]=Mt(0,t,e),r=Tt(i),s=Tt(o),n=+r-Ft(r),a=+s-Ft(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=kt(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function qt(t,e){const i=kt(t,e?.in),o=+Ot(i)-+function(t,e){const i=Ct(t,e),o=xt(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Ot(o)}(i);return Math.round(o/ft)+1}function Ut(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=Dt(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=xt(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Et(n,e),l=xt(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Et(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Ht(t,e){const i=kt(t,e?.in),o=+Et(i,e)-+function(t,e){const i=Dt(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Ut(t,e),s=xt(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Et(s,e)}(i,e);return Math.round(o/ft)+1}function Yt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Gt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Yt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Yt(i+1,2)},d:(t,e)=>Yt(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>Yt(t.getHours()%12||12,e.length),H:(t,e)=>Yt(t.getHours(),e.length),m:(t,e)=>Yt(t.getMinutes(),e.length),s:(t,e)=>Yt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Yt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Kt="midnight",Xt="noon",Qt="morning",Jt="afternoon",Zt="evening",te="night",ee={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return Gt.y(t,e)},Y:function(t,e,i,o){const r=Ut(t,o),s=r>0?r:1-r;if("YY"===e){return Yt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Yt(s,e.length)},R:function(t,e){return Yt(Ct(t),e.length)},u:function(t,e){return Yt(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Yt(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Yt(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return Gt.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return Yt(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const r=Ht(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Yt(r,e.length)},I:function(t,e,i){const o=qt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Yt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Gt.d(t,e)},D:function(t,e,i){const o=Vt(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Yt(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Yt(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Yt(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Yt(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let r;switch(r=12===o?Xt:0===o?Kt:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let r;switch(r=o>=17?Zt:o>=12?Jt:o>=4?Qt:te,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return Gt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Gt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Yt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Yt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Gt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Gt.s(t,e)},S:function(t,e){return Gt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return oe(o);case"XXXX":case"XX":return re(o);default:return re(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return oe(o);case"xxxx":case"xx":return re(o);default:return re(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ie(o,":");default:return"GMT"+re(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ie(o,":");default:return"GMT"+re(o,":")}},t:function(t,e,i){return Yt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Yt(+t,e.length)}};function ie(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),s=o%60;return 0===s?i+String(r):i+String(r)+e+Yt(s,2)}function oe(t,e){if(t%60==0){return(t>0?"-":"+")+Yt(Math.abs(t)/60,2)}return re(t,e)}function re(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Yt(Math.trunc(o/60),2)+e+Yt(o%60,2)}const se=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},ne=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ae={p:ne,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return se(t,e);let s;switch(o){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",se(o,e)).replace("{{time}}",ne(r,e))}},le=/^D+$/,de=/^Y+$/,ce=["D","DD","YY","YYYY"];const he=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ue=/^'([^]*?)'?$/,ge=/''/g,be=/[a-zA-Z]/;function me(t,e,i){const o=Dt(),r=o.locale??It,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=kt(t,i?.in);if(!Bt(a))throw new RangeError("Invalid time value");let l=e.match(pe).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ae[e])(t,r.formatLong)}return t})).join("").match(he).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:ye(t)};if(ee[e])return{isToken:!0,value:t};if(e.match(be))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const d={firstWeekContainsDate:s,weekStartsOn:n,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return de.test(t)}(o)||function(t){return le.test(t)}(o))&&function(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),ce.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,ee[o[0]])(a,o,r.localize,d)})).join("")}function ye(t){const e=t.match(ue);return e?e[1].replace(ge,"'"):t}function ve(t,e){return kt(t,e?.in).getDate()}function fe(t,e){const i=kt(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=xt(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function we(t,e){return+kt(t)>+kt(e)}function xe(t,e){return+kt(t)<+kt(e)}function ke(t,e,i){const[o,r]=Mt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function $e(t,e,i){const[o,r]=Mt(0,t,e);return o.getFullYear()===r.getFullYear()}function Se(t,e){return function(t,e){const[i,o]=Mt(0,t,e);return+Tt(i)===+Tt(o)}(xt(t,t),function(t){return xt(t,Date.now())}(t))}function De(t,e,i){const o=kt(t,i?.in);return o.setDate(e),o}let Ee=class extends t{static{this.styles=[Z,o`
|
|
3320
|
+
`}};s([B({type:Array}),n("design:type",Array)],xt.prototype,"acceptedFileTypes",void 0),s([B({type:Number}),n("design:type",Object)],xt.prototype,"maxFiles",void 0),s([B({type:Number}),n("design:type",Object)],xt.prototype,"maxFileSize",void 0),s([B({type:Boolean}),n("design:type",Object)],xt.prototype,"isShowInfoSize",void 0),s([B({type:Boolean}),n("design:type",Object)],xt.prototype,"isChangeStyleError",void 0),s([L(),n("design:type",Object)],xt.prototype,"isDragging",void 0),s([L(),n("design:type",Array)],xt.prototype,"imageUrls",void 0),s([L(),n("design:type",Boolean)],xt.prototype,"isMaxFilesReached",void 0),xt=s([a("upload-image")],xt);const kt=6048e5,$t=Symbol.for("constructDateFrom");function St(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&$t in t?t[$t](e):t instanceof Date?new t.constructor(e):new Date(e)}function Et(t,e){return St(e||t,t)}function Dt(t,e,i){const o=Et(t,i?.in);if(isNaN(e))return St(t,NaN);if(!e)return o;const r=o.getDate(),s=St(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let Ct={};function Ot(){return Ct}function Ft(t,e){const i=Ot(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Et(t,e?.in),s=r.getDay(),n=(s<o?7:0)+s-o;return r.setDate(r.getDate()-n),r.setHours(0,0,0,0),r}function Mt(t,e){return Ft(t,{...e,weekStartsOn:1})}function Tt(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=St(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Mt(r),n=St(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Mt(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Bt(t){const e=Et(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Lt(t,...e){const i=St.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function _t(t,e){const i=Et(t,e?.in);return i.setHours(0,0,0,0),i}function Rt(t,e,i){return Dt(t,12*e,i)}function Pt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+Et(t)));var e}function jt(t,e){const i=Et(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const At={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function zt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const Nt={date:zt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:zt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:zt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Wt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function It(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=i?.width?String(i.width):e;o=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=i?.width?String(i.width):t.defaultWidth;o=t.values[r]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Vt(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=e.match(r);if(!s)return null;const n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(a,(t=>t.test(n))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(a,(t=>t.test(n)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(n.length)}}}var qt;const Ut={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=At[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:Nt,formatRelative:(t,e,i,o)=>Wt[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:It({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:It({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:It({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:It({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:It({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(qt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(qt.matchPattern);if(!i)return null;const o=i[0],r=t.match(qt.parsePattern);if(!r)return null;let s=qt.valueCallback?qt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Vt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Vt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Vt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Vt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Vt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ht(t,e){const i=Et(t,e?.in),o=function(t,e){const[i,o]=Lt(0,t,e),r=_t(i),s=_t(o),n=+r-Bt(r),a=+s-Bt(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=Et(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function Yt(t,e){const i=Et(t,e?.in),o=+Mt(i)-+function(t,e){const i=Tt(t,e),o=St(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Mt(o)}(i);return Math.round(o/kt)+1}function Gt(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=Ot(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=St(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Ft(n,e),l=St(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Ft(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Kt(t,e){const i=Et(t,e?.in),o=+Ft(i,e)-+function(t,e){const i=Ot(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Gt(t,e),s=St(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Ft(s,e)}(i,e);return Math.round(o/kt)+1}function Xt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Qt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Xt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Xt(i+1,2)},d:(t,e)=>Xt(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>Xt(t.getHours()%12||12,e.length),H:(t,e)=>Xt(t.getHours(),e.length),m:(t,e)=>Xt(t.getMinutes(),e.length),s:(t,e)=>Xt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Xt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Zt="midnight",Jt="noon",te="morning",ee="afternoon",ie="evening",oe="night",re={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return Qt.y(t,e)},Y:function(t,e,i,o){const r=Gt(t,o),s=r>0?r:1-r;if("YY"===e){return Xt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Xt(s,e.length)},R:function(t,e){return Xt(Tt(t),e.length)},u:function(t,e){return Xt(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Xt(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Xt(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return Qt.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return Xt(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const r=Kt(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Xt(r,e.length)},I:function(t,e,i){const o=Yt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Xt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Qt.d(t,e)},D:function(t,e,i){const o=Ht(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Xt(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Xt(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Xt(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Xt(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let r;switch(r=12===o?Jt:0===o?Zt:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let r;switch(r=o>=17?ie:o>=12?ee:o>=4?te:oe,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return Qt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Qt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Qt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Qt.s(t,e)},S:function(t,e){return Qt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ne(o);case"XXXX":case"XX":return ae(o);default:return ae(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return ne(o);case"xxxx":case"xx":return ae(o);default:return ae(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},t:function(t,e,i){return Xt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Xt(+t,e.length)}};function se(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),s=o%60;return 0===s?i+String(r):i+String(r)+e+Xt(s,2)}function ne(t,e){if(t%60==0){return(t>0?"-":"+")+Xt(Math.abs(t)/60,2)}return ae(t,e)}function ae(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Xt(Math.trunc(o/60),2)+e+Xt(o%60,2)}const le=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},de=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ce={p:de,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return le(t,e);let s;switch(o){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",le(o,e)).replace("{{time}}",de(r,e))}},he=/^D+$/,pe=/^Y+$/,ue=["D","DD","YY","YYYY"];const ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,me=/^'([^]*?)'?$/,ye=/''/g,ve=/[a-zA-Z]/;function fe(t,e,i){const o=Ot(),r=o.locale??Ut,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Et(t,i?.in);if(!Pt(a))throw new RangeError("Invalid time value");let l=e.match(be).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ce[e])(t,r.formatLong)}return t})).join("").match(ge).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:we(t)};if(re[e])return{isToken:!0,value:t};if(e.match(ve))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const d={firstWeekContainsDate:s,weekStartsOn:n,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return pe.test(t)}(o)||function(t){return he.test(t)}(o))&&function(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),ue.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,re[o[0]])(a,o,r.localize,d)})).join("")}function we(t){const e=t.match(me);return e?e[1].replace(ye,"'"):t}function xe(t,e){return Et(t,e?.in).getDate()}function ke(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=St(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function $e(t,e){return+Et(t)>+Et(e)}function Se(t,e){return+Et(t)<+Et(e)}function Ee(t,e,i){const[o,r]=Lt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function De(t,e,i){const[o,r]=Lt(0,t,e);return o.getFullYear()===r.getFullYear()}function Ce(t,e){return function(t,e){const[i,o]=Lt(0,t,e);return+_t(i)===+_t(o)}(St(t,t),function(t){return St(t,Date.now())}(t))}function Oe(t,e,i){const o=Et(t,i?.in);return o.setDate(e),o}let Fe=class extends t{static{this.styles=[J,o`
|
|
3321
3321
|
${X}
|
|
3322
3322
|
|
|
3323
3323
|
/* Estilos generales del contenedor del calendario (escritorio) */
|
|
@@ -3748,7 +3748,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3748
3748
|
border-radius: 9999px;
|
|
3749
3749
|
}
|
|
3750
3750
|
/* */
|
|
3751
|
-
`]}constructor(){super(),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.type="date",this.lastElement=!1,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},this._boundHandleCalendarKeydown=this.handleCalendarKeydown.bind(this),this._boundHandleFocusout=t=>{const e=t.relatedTarget;e&&!this.contains(e)&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}firstUpdated(){this.shadowRoot?.addEventListener("keydown",this._boundHandleCalendarKeydown),this.addEventListener("focusout",this._boundHandleFocusout)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focus-input",this.handleFocusInput)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.shadowRoot?.removeEventListener("keydown",this._boundHandleCalendarKeydown),this.removeEventListener("focusout",this._boundHandleFocusout)}handleFocusInput(){const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}handleHeaderClick(){"month"===this.type?this.currentView="months"===this.currentView?"years":"months":"days"===this.currentView?this.currentView="years":this.currentView="days"}_updateView(t,e=null){this.viewDate=t,e&&(this.currentView=e),this.dispatchEvent(new CustomEvent("view-date-change",{detail:{date:this.viewDate}}))}handleNavClick(t){let e=this.viewDate;e="days"===this.currentView
|
|
3751
|
+
`]}constructor(){super(),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.type="date",this.lastElement=!1,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},this._boundHandleCalendarKeydown=this.handleCalendarKeydown.bind(this),this._boundHandleFocusout=t=>{const e=t.relatedTarget;e&&!this.contains(e)&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}firstUpdated(){this.shadowRoot?.addEventListener("keydown",this._boundHandleCalendarKeydown),this.addEventListener("focusout",this._boundHandleFocusout)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focus-input",this.handleFocusInput)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.shadowRoot?.removeEventListener("keydown",this._boundHandleCalendarKeydown),this.removeEventListener("focusout",this._boundHandleFocusout)}handleFocusInput(){const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}handleHeaderClick(){"month"===this.type?this.currentView="months"===this.currentView?"years":"months":"days"===this.currentView?this.currentView="years":this.currentView="days"}_updateView(t,e=null){this.viewDate=t,e&&(this.currentView=e),this.dispatchEvent(new CustomEvent("view-date-change",{detail:{date:this.viewDate}}))}handleNavClick(t){let e=this.viewDate;e="days"===this.currentView?Dt(this.viewDate,t):"months"===this.currentView?Rt(this.viewDate,t):Rt(this.viewDate,21*t),this._updateView(e)}handleYearSelect(t){const e=function(t,e,i){const o=Et(t,i?.in);return isNaN(+o)?St(t,NaN):(o.setFullYear(e),o)}(this.viewDate,t);this._updateView(e,"months"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?.focus()}))}handleMonthSelect(t){const e=function(t,e,i){const o=Et(t,i?.in),r=o.getFullYear(),s=o.getDate(),n=St(t,0);n.setFullYear(r,e,15),n.setHours(0,0,0,0);const a=ke(n);return o.setMonth(e,Math.min(s,a)),o}(this.viewDate,t);"month"===this.type?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0}))):(this._updateView(e,"days"),this.updateComplete.then((()=>{const t=this.initialFocusElement||this.shadowRoot?.querySelector(".month-year-button");t?.focus()})))}handleDayClick(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}getFullMonthNames(){return["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]}getShortMonthNames(){return this.getFullMonthNames().map((t=>t.substring(0,3)))}getShortWeekdays(){return["lu","ma","mi","ju","vi","sa","do"]}focusCalendar(){this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?t.focus():this.initialFocusElement?.focus()}))}focusFirstElement(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("button:not([disabled])");t?.focus()}))}))}focusYearsView(){this.updateComplete.then((()=>{this.currentView="years";const t=this.shadowRoot?.querySelector(".year-button:not([disabled])");t&&t.focus()}))}focusMonthsView(){this.updateComplete.then((()=>{"months"!==this.currentView&&(this.currentView="months");const t=this.shadowRoot?.querySelector(".month-button:not([disabled])");t&&t.focus()}))}focusDaysView(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days");const t=this.shadowRoot?.querySelector(".day:not([disabled])");t&&t.focus()}))}_findAndFocusDayButton(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;const i=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")),o=i.findIndex((t=>t===e));if(-1===o)return;let r=o+t;r<0&&(r=0),r>=i.length&&(r=i.length-1);const s=i[r];s&&s.focus()}_focusDayOfWeekEdge(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;if(-1===Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===e)))return;const i=Array.from(this.shadowRoot.querySelectorAll(".days-grid > *")).findIndex((t=>t===e));if(-1===i)return;const o=i%7;let r=null;if("start"===t){const t=i-o;r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e<=i;)e++,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}else{const t=i+(6-o);r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e>=i;)e--,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}r?.focus()}handleCalendarKeydown(t){const{key:e}=t,i=this.shadowRoot?.activeElement;if("Escape"===e)return t.preventDefault(),void this.dispatchEvent(new CustomEvent("close"));if("Tab"!==e)if(i&&(i.classList.contains("month-year-button")||i.classList.contains("nav-button"))){t.preventDefault();const o=this.shadowRoot?.querySelector(".month-year-button"),r=this.shadowRoot?.querySelector(".header-right button:first-child"),s=this.shadowRoot?.querySelector(".header-right button:last-child");if("Enter"===e||" "===e)return i===o?this.handleHeaderClick():i===r?this.handleNavClick(-1):i===s&&this.handleNavClick(1),void this.updateComplete.then((()=>i.focus()));switch(e){case"ArrowUp":return t.preventDefault(),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));case"ArrowRight":(i===o||i===r)&&s?.focus();break;case"ArrowLeft":i===s?r?.focus():i===r&&o?.focus();break;case"ArrowDown":if("days"===this.currentView){const t=this.initialFocusElement||this.shadowRoot?.querySelector(".day:not([disabled])");t?.focus()}else if("months"===this.currentView||"years"===this.currentView){const t=this.shadowRoot?.querySelector(`.${"months"===this.currentView?"month":"year"}-grid button:not([disabled])`);t?.focus()}}}else if(i&&i.classList.contains("day")&&"days"===this.currentView){t.preventDefault();const o=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===i)),r=this.shadowRoot?.querySelector(".month-year-button");switch(e){case"ArrowLeft":this._findAndFocusDayButton(-1);break;case"ArrowRight":this._findAndFocusDayButton(1);break;case"ArrowDown":this._findAndFocusDayButton(7);break;case"ArrowUp":o-7<0?r?.focus():this._findAndFocusDayButton(-7);break;case"Home":this._focusDayOfWeekEdge("start");break;case"End":this._focusDayOfWeekEdge("end");break;case"Enter":i.click()}}else if(i&&(i.classList.contains("month-button")||i.classList.contains("year-button"))){t.preventDefault();const o="months"===this.currentView?".month-button:not([disabled])":".year-button:not([disabled])",r=Array.from(this.shadowRoot.querySelectorAll(o)),s=r.findIndex((t=>t===i)),n=this.shadowRoot?.querySelector(".month-year-button");if(-1===s)return;let a=s;switch(e){case"ArrowDown":a+=3,a>=r.length&&(a=r.length-1);break;case"ArrowUp":if(a-=3,a<0)return void n?.focus();break;case"ArrowLeft":a-=1,a<0&&(a=0);break;case"ArrowRight":a+=1,a>=r.length&&(a=r.length-1);break;case"Enter":i.click()}a!==s&&r[a]?.focus()}else(e.startsWith("Arrow")||"Enter"===e)&&t.preventDefault();else{const e=Array.from(this.shadowRoot.querySelectorAll("button:not([disabled])"));if(!e.includes(i))return;if(e.length>0){const o=e[0],r=e[e.length-1];if(t.shiftKey&&i===o)return t.preventDefault(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));t.shiftKey||i!==r||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}}renderHeader(){const t=this.getFullMonthNames();let i="",o=!1,r=!1;if("years"===this.currentView){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,e=t+20;i=`${t} - ${e}`;o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=e>=(this.maxDate?this.maxDate.getFullYear():1/0)}else if("months"===this.currentView){i=`${this.viewDate.getFullYear()}`;const t=this.viewDate.getFullYear();o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=t>=(this.maxDate?this.maxDate.getFullYear():1/0)}else{i=` ${t[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()} `,this.minDate&&(o=Ee(jt(this.viewDate),jt(this.minDate))||Se(this.viewDate,this.minDate)),this.maxDate&&(r=Ee(jt(this.viewDate),jt(this.maxDate))||$e(this.viewDate,this.maxDate))}return e`
|
|
3752
3752
|
<div class="header">
|
|
3753
3753
|
<div class="header-left">
|
|
3754
3754
|
<button class="month-year-button" @click=${this.handleHeaderClick}>
|
|
@@ -3779,7 +3779,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3779
3779
|
</div>
|
|
3780
3780
|
`}renderMonthsView(){const t=this.getShortMonthNames(),i=this.selectedDate?.getMonth(),o=(new Date).getMonth(),r=this.viewDate.getFullYear();return e`
|
|
3781
3781
|
<div class="month-grid">
|
|
3782
|
-
${t.map(((t,s)=>{const n=s===o,a=s===i&&this.selectedDate
|
|
3782
|
+
${t.map(((t,s)=>{const n=s===o,a=s===i&&this.selectedDate&&De(this.viewDate,this.selectedDate),l=s===i&&this.selectedDate&&!De(this.viewDate,this.selectedDate);let d=!1;this.minDate&&r===this.minDate.getFullYear()&&(d=s<this.minDate.getMonth()),this.maxDate&&r===this.maxDate.getFullYear()&&(d=d||s>this.maxDate.getMonth());return e`
|
|
3783
3783
|
<button
|
|
3784
3784
|
class="${"month-button "+(a?"selected":l?"secondary-selected":n?"current":"")}"
|
|
3785
3785
|
?disabled=${d}
|
|
@@ -3789,20 +3789,20 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3789
3789
|
</button>
|
|
3790
3790
|
`}))}
|
|
3791
3791
|
</div>
|
|
3792
|
-
`}renderDayView(){const t=
|
|
3792
|
+
`}renderDayView(){const t=ke(this.viewDate),i=jt(this.viewDate),o=Et(i,r?.in).getDay();var r;const s=Array.from({length:0===o?6:o-1},(()=>null)),n=Array.from({length:t},((t,e)=>Oe(i,e+1))),a=this.getShortWeekdays();return e`
|
|
3793
3793
|
<div class="weekdays">
|
|
3794
3794
|
${a.map((t=>e`<div>${t}</div>`))}
|
|
3795
3795
|
</div>
|
|
3796
3796
|
|
|
3797
3797
|
<div class="days-grid">
|
|
3798
3798
|
${s.map((()=>e`<div></div>`))}
|
|
3799
|
-
${n.map((t=>{const i=
|
|
3799
|
+
${n.map((t=>{const i=_t(t),o=this.selectedDate?_t(this.selectedDate):null,r=this.minDate&&Se(i,_t(this.minDate))||this.maxDate&&$e(i,_t(this.maxDate)),s=Ce(i),n=o&&xe(i)===xe(o),a=n&&o&&Ee(i,o)&&De(i,o);return e`
|
|
3800
3800
|
<button
|
|
3801
3801
|
class="${`day ${s?"today":""} ${a?"selected":n&&!a?"secondary-selected":""}`}"
|
|
3802
3802
|
?disabled=${r}
|
|
3803
3803
|
@click=${()=>this.handleDayClick(t)}
|
|
3804
3804
|
>
|
|
3805
|
-
${
|
|
3805
|
+
${fe(t,"d")}
|
|
3806
3806
|
</button>
|
|
3807
3807
|
`}))}
|
|
3808
3808
|
</div>
|
|
@@ -3820,9 +3820,9 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3820
3820
|
<div class="calendar-container" style="width: ${this.calendarWidth}px;">
|
|
3821
3821
|
${r}
|
|
3822
3822
|
</div>
|
|
3823
|
-
`}};s([
|
|
3823
|
+
`}};s([B({type:Object}),n("design:type",Object)],Fe.prototype,"selectedDate",void 0),s([B({type:Object}),n("design:type",Date)],Fe.prototype,"viewDate",void 0),s([B({type:Boolean}),n("design:type",Object)],Fe.prototype,"isMobile",void 0),s([B({type:Number}),n("design:type",Number)],Fe.prototype,"calendarWidth",void 0),s([B({type:Object}),n("design:type",Object)],Fe.prototype,"minDate",void 0),s([B({type:Object}),n("design:type",Object)],Fe.prototype,"maxDate",void 0),s([B({type:String}),n("design:type",String)],Fe.prototype,"type",void 0),s([B({type:Boolean}),n("design:type",Object)],Fe.prototype,"lastElement",void 0),s([L(),n("design:type",String)],Fe.prototype,"currentView",void 0),s([_(".day.selected, .day.today:not(.selected)"),n("design:type",HTMLButtonElement)],Fe.prototype,"initialFocusElement",void 0),Fe=s([a("calendar-overlay"),n("design:paramtypes",[])],Fe);let Me=class extends R{constructor(){super(...arguments),this.isRenderClearButton=!0,this.readonly=!1,this.type="date",this.eighteenOrOlder=!1,this.maxLength=10,this.isOpen=!1,this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.inputValue=null,this.lastElement=!1,this.handleGlobalOverlayOpen=t=>{t.detail!==this&&this.isOpen&&(this.isOpen=!1,this._emitDropdownToggle(!1))},this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this),this.handleClickOutside=t=>{t.composedPath().includes(this)||(this.isOpen&&(this._emitToggle(!1),this._emitDropdownToggle(!1)),this.isOpen=!1)}}static{this.styles=o`
|
|
3824
3824
|
${Q}
|
|
3825
|
-
${
|
|
3825
|
+
${Z}
|
|
3826
3826
|
${K}
|
|
3827
3827
|
|
|
3828
3828
|
/* Si se proporciona una propiedad width (ej. width="600px"), se usa ese valor. */
|
|
@@ -3947,7 +3947,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3947
3947
|
.calendar-button randstad-icon {
|
|
3948
3948
|
font-size: 18px;
|
|
3949
3949
|
}
|
|
3950
|
-
`}setMessageErrorFormatInvalid(){return`formato de fecha inválido, se esperaba '${"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}'`}get _currentFormat(){return"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}handleFocusInput(){this.shadowRoot?.querySelector(".date-input")?.focus()}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside),this.addEventListener("focus-input",this.handleFocusInput),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside),this.removeEventListener("focus-input",this.handleFocusInput),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}firstUpdated(){this.setInitialWidth()}setInitialWidth(){if(!this.inputContainer)return;const t=this.inputContainer.getBoundingClientRect().width;this.calendarWidth!==t&&(this.calendarWidth=t)}updateResponsiveMode(){this.isMobile=window.innerWidth<=940,this.setInitialWidth()}handleInput(t){this.onlyNumericAndDash(t);const e=t.target,i=e.value.substring(0,this.maxLength);e.value!==i&&(e.value=i),this.inputValue=e.value,this._parseAndValidateDate(e.value,!0)}handleCalendarButtonClick(t){if(!this.disabled)if(t.stopPropagation(),this.isOpen){this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}else this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}))}handleClearDate(){this.inputValue=null,this.selectedDate=null,this.error=!1,this.errorMessage=null,this.closeOverlay(null)}handleDateSelect(t){let e=t.detail.date;if(!e)return;"month"===this.type&&(e=
|
|
3950
|
+
`}setMessageErrorFormatInvalid(){return`formato de fecha inválido, se esperaba '${"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}'`}get _currentFormat(){return"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}handleFocusInput(){this.shadowRoot?.querySelector(".date-input")?.focus()}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside),this.addEventListener("focus-input",this.handleFocusInput),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside),this.removeEventListener("focus-input",this.handleFocusInput),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}firstUpdated(){this.setInitialWidth()}setInitialWidth(){if(!this.inputContainer)return;const t=this.inputContainer.getBoundingClientRect().width;this.calendarWidth!==t&&(this.calendarWidth=t)}updateResponsiveMode(){this.isMobile=window.innerWidth<=940,this.setInitialWidth()}handleInput(t){this.onlyNumericAndDash(t);const e=t.target,i=e.value.substring(0,this.maxLength);e.value!==i&&(e.value=i),this.inputValue=e.value,this._parseAndValidateDate(e.value,!0)}handleCalendarButtonClick(t){if(!this.disabled)if(t.stopPropagation(),this.isOpen){this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}else this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}))}handleClearDate(){this.inputValue=null,this.selectedDate=null,this.error=!1,this.errorMessage=null,this.closeOverlay(null)}handleDateSelect(t){let e=t.detail.date;if(!e)return;"month"===this.type&&(e=Oe(e,1));if(this._validateDate(e)){this.selectedDate=e,this.viewDate=e;const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.closeOverlay(t)}else{const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.selectedDate=null,this.closeOverlay(null)}}_emitToggle(t){this.dispatchEvent(new CustomEvent("calendar-toggle",{detail:{open:t},bubbles:!0,composed:!0}))}_isLastFocusableInModal(){const t=this.parentElement;if(!t)return!1;const e=["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]",'[tabindex]:not([tabindex="-1"])',"randstad-button:not([disabled])","datepicker-component:not([disabled])","randstad-select:not([disabled])"].join(", "),i=t.querySelectorAll(e),o=Array.from(i),r=o.indexOf(this);return-1!==r&&r===o.length-1}_emitDropdownToggle(t){t?this.isOpen&&this.lastElement&&this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!0},bubbles:!0,composed:!0}))})):this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!1},bubbles:!0,composed:!0}))}))}willUpdate(t){if(t.has("width")&&this.style.setProperty("width",this.width||"100%"),t.has("value")){const e=t.get("value");this.value!==e&&this._syncValue(this.value)}t.has("type")&&("month"===this.type?this.maxLength=7:this.maxLength=10)}updated(t){(t.has("isOpen")||t.has("value"))&&this.isOpen&&this.updateComplete.then((()=>{this.setInitialWidth()})),super.updated(t)}handleViewDateChange(t){this.viewDate=t.detail.date}closeOverlay(t){this.value=t,this.inputValue=t?t.replace(/-/g,"/"):null,this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:t}})),this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const e=this.shadowRoot?.querySelector(".date-input");e?.focus()}_syncValue(t){if(""===t||null===t)return void(null===this.selectedDate&&null===this.inputValue||(this.selectedDate=null,this.inputValue=null,this.errorMessage=null,this.error=!1));let e=this._parseDate(t);e&&this._validateDate(e)?("month"===this.type&&(e=Oe(e,1)),this.selectedDate=e,this.viewDate=e,this.error=!1,this.errorMessage=null,this.inputValue=fe(e,this._currentFormat).replace(/-/g,"/")):this.selectedDate=e}_validateDate(t){if(!t)return!1;if(this.error=!1,this.errorMessage=null,this.eighteenOrOlder){const e=function(t,e,i){return Rt(t,-18,i)}(new Date);if($e(t,e))return this.error=!0,this.errorMessage="tenés que ser mayor de 18 años",!1}return!!this._isWithinBounds(t)||(this._getValidDateRange(),this.error=!0,!1)}_parseAndValidateDate(t,e){if(this.disabled)return;if(""===t||null===t)return this.selectedDate=null,this.error=!1,this.errorMessage=null,void(e&&this.closeOverlay(null));const i=this._parseDate(t);if(i){this._validateDate(i)?(this.selectedDate=i,this.viewDate=i,this.error=!1,this.errorMessage=null,e&&this.closeOverlay(fe(i,this._currentFormat))):(this.error=!0,this.selectedDate=null,e&&this.closeOverlay(null))}else this.error=!0,this.errorMessage=this.setMessageErrorFormatInvalid(),this.selectedDate=null,e&&this.closeOverlay(null)}_parseDate(t){const e=t.split("-").map(Number);if("month"===this.type&&2===e.length){const[t,i]=e;if(t>=1&&t<=12&&i>1e3){const e=new Date(i,t-1,1,12);if(Pt(e))return e}return null}if(3===e.length){const[i,o,r]=e;if(i&&o&&r&&o>=1&&o<=12&&r>1e3){const e=new Date(r,o-1,i,12);if(Pt(e)&&fe(e,"dd-MM-yyyy")===t)return e}}const i=t.split("-").map(Number);if(3===i.length){const[e,o,r]=i;if(e&&o&&r&&o>=1&&o<=12&&e>1e3){const i=new Date(e,o-1,r,12);if(Pt(i)&&fe(i,"yyyy-MM-dd")===t)return i}}return null}_parseDateString(t){if(!t)return null;const e=t.split("-").map(Number);if(3===e.length&&!isNaN(e[0])&&!isNaN(e[1])&&!isNaN(e[2])){return new Date(e[0],e[1]-1,e[2],12)}return null}_getValidDateRange(){const t=this._parseDateString(this.minDate),e=this._parseDateString(this.maxDate);return t||e?t&&e&&$e(t,e)?null:{minDate:t,maxDate:e}:{minDate:null,maxDate:null}}_isWithinBounds(t){const e=this._getValidDateRange();return!e||(!e.minDate||!Se(t,e.minDate))&&(!e.maxDate||!$e(t,e.maxDate))}handleKeyDown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input");if("Enter"===e||" "===e)t.preventDefault(),this.isOpen?(this.closeOverlay(this.value),this._emitDropdownToggle(!1)):(this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date);else if("Escape"===e){if(!this.isOpen)return;t.preventDefault(),this.closeOverlay(this.value),this._emitDropdownToggle(!1)}else"ArrowDown"===e&&(t.preventDefault(),this.isOpen||(this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("calendar-overlay");t&&"function"==typeof t.focusCalendar&&t.focusCalendar()})));const o=this.shadowRoot?.querySelector(".clear-button"),r=this.shadowRoot?.querySelector(".calendar-button");"ArrowRight"===e&&(t.preventDefault(),this.shadowRoot?.activeElement===i&&(o?o.focus():r?.focus()))}handleClearButtonKeydown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input"),o=this.shadowRoot?.querySelector(".calendar-button");"ArrowLeft"===e?(t.preventDefault(),i?.focus()):"ArrowRight"===e&&(t.preventDefault(),o?.focus())}handleCalendarButtonKeydown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input"),o=this.shadowRoot?.querySelector(".clear-button");if("Tab"===e){if(!t.shiftKey&&!this.isOpen)return t.preventDefault(),this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,void this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("calendar-overlay");t&&"function"==typeof t.focusFirstElement&&t.focusFirstElement()}));if(this.isOpen)return t.preventDefault(),void this.closeOverlay(this.value)}"ArrowLeft"===e?(t.preventDefault(),o?o.focus():i?.focus()):("Enter"!==e&&" "!==e||t.preventDefault(),this.handleCalendarButtonClick(t))}onlyNumericAndDash(t){const e=t.target,i=e.value.replace(/[^0-9-]/g,"");e.value=i}render(){const t=r({"input-wrapper":!0,active:this.isOpen,error:this.error,disabled:this.disabled,readonly:this.readonly}),o=this._getValidDateRange();return e`
|
|
3951
3951
|
<div class="datepicker-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
3952
3952
|
${this.renderLabelContainer()}
|
|
3953
3953
|
|
|
@@ -4009,11 +4009,11 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4009
4009
|
|
|
4010
4010
|
${this.renderHelper()}
|
|
4011
4011
|
</div>
|
|
4012
|
-
`}};s([
|
|
4012
|
+
`}};s([B({type:String}),n("design:type",String)],Me.prototype,"width",void 0),s([B({type:Boolean}),n("design:type",Object)],Me.prototype,"isRenderClearButton",void 0),s([B({type:Boolean}),n("design:type",Object)],Me.prototype,"readonly",void 0),s([B({type:String}),n("design:type",String)],Me.prototype,"minDate",void 0),s([B({type:String}),n("design:type",String)],Me.prototype,"maxDate",void 0),s([B({type:String}),n("design:type",String)],Me.prototype,"type",void 0),s([B({type:Boolean}),n("design:type",Object)],Me.prototype,"eighteenOrOlder",void 0),s([B({type:Number}),n("design:type",Number)],Me.prototype,"maxLength",void 0),s([L(),n("design:type",Object)],Me.prototype,"isOpen",void 0),s([L(),n("design:type",Object)],Me.prototype,"selectedDate",void 0),s([L(),n("design:type",Date)],Me.prototype,"viewDate",void 0),s([L(),n("design:type",Object)],Me.prototype,"isMobile",void 0),s([L(),n("design:type",Number)],Me.prototype,"calendarWidth",void 0),s([L(),n("design:type",Object)],Me.prototype,"inputValue",void 0),s([_(".input-container"),n("design:type",HTMLDivElement)],Me.prototype,"inputContainer",void 0),s([B({type:Boolean,attribute:"last-element"}),n("design:type",Object)],Me.prototype,"lastElement",void 0),Me=s([a("datepicker-component")],Me);let Te=class extends yt{constructor(){super(...arguments),this.maxFiles=1,this.acceptedFileTypes=[],this.maxFileSize=0,this.buttonText="Agregar archivo",this.showDeleteConfirmation=!1,this.showInternalError=!0,this.isRemovePopupOpen=!1,this.fileIndexToRemove=-1,this.fileNameToRemove=""}static{this.styles=o`
|
|
4013
4013
|
${Q}
|
|
4014
|
-
${
|
|
4014
|
+
${Z}
|
|
4015
4015
|
${K}
|
|
4016
|
-
${
|
|
4016
|
+
${wt}
|
|
4017
4017
|
|
|
4018
4018
|
:host([width]) {
|
|
4019
4019
|
width: var( --upload-file-width );
|
|
@@ -4075,7 +4075,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4075
4075
|
outline: 2px solid rgb( 0, 215, 255 ) !important;
|
|
4076
4076
|
outline-offset: 1px;
|
|
4077
4077
|
}
|
|
4078
|
-
`}getFileConfig(){const t=this.acceptedFileTypes.length>0,e=this.maxFileSize>0;return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:t&&this.showInternalError?`formato de archivo no válido, se aceptan: ${this.getTextAcceptedFileTypes()}`:"",errorMessageSize:e&&this.showInternalError?`el archivo es demasiado grande, el máximo es de ${this.getTextMaxFileSize()}`:"",typeError:"file"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,
|
|
4078
|
+
`}getFileConfig(){const t=this.acceptedFileTypes.length>0,e=this.maxFileSize>0;return{baseMaxFiles:this.maxFiles,maxFileSize:this.maxFileSize,acceptedFileTypes:this.acceptedFileTypes,errorMessageType:t&&this.showInternalError?`formato de archivo no válido, se aceptan: ${this.getTextAcceptedFileTypes()}`:"",errorMessageSize:e&&this.showInternalError?`el archivo es demasiado grande, el máximo es de ${this.getTextMaxFileSize()}`:"",typeError:"file"}}getTextAcceptedFileTypes(){return this.getReadableFileTypes(this.acceptedFileTypes,ft)}getTextMaxFileSize(){return this.baseGetTextMaxFileSize(this.maxFileSize)}updated(t){super.updated(t),this.applyWidth()}applyWidth(){this.width&&this.style.setProperty("--upload-file-width",this.width)}onFileInputChange(t){this.baseOnFileInputChange(t,this.getFileConfig())}willUpdate(t){(t.has("maxFiles")||0===t.size)&&(this.isMultiple=this.maxFiles>1)}handleRemoveFile(t,e){this.showDeleteConfirmation?this.confirmRemoveFile(t,e):this.removeFile(t,"file")}confirmRemoveFile(t,e){this.fileIndexToRemove=t,this.fileNameToRemove=e,this.isRemovePopupOpen=!0}handlePopupClose(t){!1===t.detail&&this.removeFile(this.fileIndexToRemove,"file"),this.isRemovePopupOpen=!1,this.fileIndexToRemove=-1,this.fileNameToRemove=""}render(){const t=this.files.length>=this.maxFiles,o=this.disabled||t,r=e`
|
|
4079
4079
|
<randstad-button
|
|
4080
4080
|
.label=${this.buttonText}
|
|
4081
4081
|
.variant=${"button-primary"}
|
|
@@ -4136,7 +4136,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4136
4136
|
</custom-popup>
|
|
4137
4137
|
`:i}
|
|
4138
4138
|
</div>
|
|
4139
|
-
`}};s([
|
|
4139
|
+
`}};s([B({type:String}),n("design:type",String)],Te.prototype,"width",void 0),s([B({type:Number}),n("design:type",Object)],Te.prototype,"maxFiles",void 0),s([B({type:Array}),n("design:type",Array)],Te.prototype,"acceptedFileTypes",void 0),s([B({type:Number}),n("design:type",Object)],Te.prototype,"maxFileSize",void 0),s([B({type:String}),n("design:type",Object)],Te.prototype,"buttonText",void 0),s([B({type:Boolean}),n("design:type",Object)],Te.prototype,"showDeleteConfirmation",void 0),s([B({type:Boolean}),n("design:type",Object)],Te.prototype,"showInternalError",void 0),s([L(),n("design:type",Boolean)],Te.prototype,"isRemovePopupOpen",void 0),s([L(),n("design:type",Number)],Te.prototype,"fileIndexToRemove",void 0),s([L(),n("design:type",String)],Te.prototype,"fileNameToRemove",void 0),Te=s([a("upload-file")],Te);let Be=class extends t{constructor(){super(),this.cards=[],this.cardWidth="",this.cardHeight="",this.navWidth=112,this.showNavButtons=!0,this.isDynamicWidth=!0,this.isInfiniteScrollPartial=!0,this.autoPlayDelayMs=0,this.showPrevButton=!1,this.showNextButton=!0,this.isDraggingWithButtons=!1,this.isDownWithButtons=!1,this.startXWithButtons=0,this.scrollLeftPositionWithButtons=0,this.isScrollingByButton=!1,this.isDownDrag=!1,this.prevXDrag=0,this.isDraggingDrag=!1,this.scrollLeftDrag=0,this.observer=null,this.scrollTimeout=null,this.autoPlayTimer=null,this.handleResize=()=>{},this.DESKTOP_GAP=40,this.TABLET_GAP=24,this.MOBILE_GAP=24,this.handleMouseDownWithButtons=this.handleMouseDownWithButtons.bind(this),this.handleMouseLeaveWithButtons=this.handleMouseLeaveWithButtons.bind(this),this.handleMouseUpWithButtons=this.handleMouseUpWithButtons.bind(this),this.handleMouseMoveWithButtons=this.handleMouseMoveWithButtons.bind(this),this.handleScrollWithButtons=this.handleScrollWithButtons.bind(this),this.handleMouseDownDrag=this.handleMouseDownDrag.bind(this),this.handleMouseLeaveDrag=this.handleMouseLeaveDrag.bind(this),this.handleMouseUpDrag=this.handleMouseUpDrag.bind(this),this.handleMouseMoveDrag=this.handleMouseMoveDrag.bind(this),this.handleResize=this.resizeHandler.bind(this)}static{this.styles=o`
|
|
4140
4140
|
:host {
|
|
4141
4141
|
display: block;
|
|
4142
4142
|
width: 100%;
|
|
@@ -4456,7 +4456,7 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4456
4456
|
|
|
4457
4457
|
${this.renderNavButtons()}
|
|
4458
4458
|
</div>
|
|
4459
|
-
`}};s([
|
|
4459
|
+
`}};s([B({type:Array}),n("design:type",Array)],Be.prototype,"cards",void 0),s([B({type:String}),n("design:type",String)],Be.prototype,"cardWidth",void 0),s([B({type:String}),n("design:type",String)],Be.prototype,"cardHeight",void 0),s([B({type:Number}),n("design:type",Number)],Be.prototype,"navWidth",void 0),s([B({type:Boolean}),n("design:type",Boolean)],Be.prototype,"showNavButtons",void 0),s([B({type:Boolean}),n("design:type",Boolean)],Be.prototype,"isDynamicWidth",void 0),s([B({type:Boolean}),n("design:type",Boolean)],Be.prototype,"isInfiniteScrollPartial",void 0),s([B({type:Number}),n("design:type",Number)],Be.prototype,"autoPlayDelayMs",void 0),s([L(),n("design:type",Object)],Be.prototype,"showPrevButton",void 0),s([L(),n("design:type",Object)],Be.prototype,"showNextButton",void 0),s([_(".carousel-wrapper"),n("design:type",HTMLElement)],Be.prototype,"slider",void 0),s([_("slot"),n("design:type",HTMLSlotElement)],Be.prototype,"slotElement",void 0),Be=s([a("carousel-component"),n("design:paramtypes",[])],Be);let Le=class extends t{constructor(){super(...arguments),this.message="",this.position="top",this.variant="bubble",this.visible=!0,this.arrowAlign="15px",this.isAnimating=!1}static{this.styles=o`
|
|
4460
4460
|
:host {
|
|
4461
4461
|
display: inline-block;
|
|
4462
4462
|
position: relative;
|
|
@@ -4568,5 +4568,5 @@ function _(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4568
4568
|
<slot></slot>
|
|
4569
4569
|
`:""}
|
|
4570
4570
|
</div>
|
|
4571
|
-
`}};s([
|
|
4571
|
+
`}};s([B({type:String}),n("design:type",Object)],Le.prototype,"message",void 0),s([B({type:Number}),n("design:type",Number)],Le.prototype,"duration",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"position",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"variant",void 0),s([B({type:Boolean}),n("design:type",Object)],Le.prototype,"visible",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"icon",void 0),s([B({type:String}),n("design:type",Object)],Le.prototype,"arrowAlign",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"backgroundColor",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"textColor",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"fontFamily",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"width",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"height",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"top",void 0),s([B({type:String}),n("design:type",String)],Le.prototype,"left",void 0),s([L(),n("design:type",Object)],Le.prototype,"isAnimating",void 0),Le=s([a("randstad-bubble")],Le);export{U as AccordionList,q as AccordionPanel,R as BaseControl,Fe as CalendarOverlay,Be as Carousel,Y as CarouselCard,G as Checkbox,at as CustomModal,lt as CustomPopup,ct as CustomRadio,bt as CustomStepper,Me as DatePickerComponent,pt as FilterableSelect,it as FormGroup,ot as IconComponent,dt as ProgressCircle,Le as RandstadBubble,H as RandstadButton,et as RandstadForm,nt as RandstadNotice,st as RandstadSocialMediaInput,mt as TabsBar,Te as UploadFile,xt as UploadImage,J as scrollbarStyles};
|
|
4572
4572
|
//# sourceMappingURL=index.js.map
|