@avakhula/ui 0.0.353 → 0.0.354
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/index.js +3 -3
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Form/Input/Input.vue +2 -2
package/dist/index.js
CHANGED
|
@@ -3116,7 +3116,7 @@ function hd(t, n, e, r, o, i) {
|
|
|
3116
3116
|
key: 1,
|
|
3117
3117
|
kind: "ghost",
|
|
3118
3118
|
class: "button-clear",
|
|
3119
|
-
disabled: e.disabled,
|
|
3119
|
+
disabled: e.readonly || e.disabled,
|
|
3120
3120
|
"help-text": e.clearButtonMessage,
|
|
3121
3121
|
"prevent-default": "",
|
|
3122
3122
|
type: "button",
|
|
@@ -3136,7 +3136,7 @@ function hd(t, n, e, r, o, i) {
|
|
|
3136
3136
|
class: "toggle-password",
|
|
3137
3137
|
"prevent-default": "",
|
|
3138
3138
|
type: "button",
|
|
3139
|
-
disabled: e.
|
|
3139
|
+
disabled: e.disabled,
|
|
3140
3140
|
"help-text": o.showPassword ? e.hidePasswordMessage : e.showPasswordMessage,
|
|
3141
3141
|
onClick: rt(i.toggleShowPassword, ["prevent"])
|
|
3142
3142
|
}, {
|
|
@@ -3178,7 +3178,7 @@ function hd(t, n, e, r, o, i) {
|
|
|
3178
3178
|
], 2)
|
|
3179
3179
|
]);
|
|
3180
3180
|
}
|
|
3181
|
-
const Fa = /* @__PURE__ */ Se(dd, [["render", hd], ["__scopeId", "data-v-
|
|
3181
|
+
const Fa = /* @__PURE__ */ Se(dd, [["render", hd], ["__scopeId", "data-v-fc2aa8c0"]]);
|
|
3182
3182
|
const pd = {
|
|
3183
3183
|
name: "IbCheckbox",
|
|
3184
3184
|
model: {
|
package/dist/index.umd.cjs
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
top: ${a-p-f/2+h+12}px!important`;break;case"rightCenter":d=d+`left: ${l+5}px!important;
|
|
20
20
|
top: ${a+h-p/2-f/2}px!important;`;break;case"rightBottom":d=d+`left: ${l+5}px!important;
|
|
21
21
|
top: ${a+h-f/2-12}px!important`;break;default:d=d+`left: ${r+s/2-c/2}px!important;
|
|
22
|
-
top: ${o-p+h-5}px!important`;break}return d}getClassList(n){return n?wo[n]:wo.topCenter}}const Ht=new ko,pd=(t,n)=>{var a;Ht.getTooltipContainer()&&Ht.destroyTooltip();const e=Object.keys(n.modifiers)[0]||n.arg,o={title:((a=n.value)==null?void 0:a.title)||"",text:typeof n.value=="object"?n.value.text:n.value};Ht.createTooltip(t,o,e)},md=(t,n)=>{const e=Ht.getId();if(n.getAttribute("aria-describedby")!==e)return;const o=Ht.getTooltipContainer();if(t.type==="blur"){n.contains(t.relatedTarget)||Ht.destroyTooltip(n);return}const a=n!==t.target&&!n.contains(t.target),r=o!==t.target&&!(o!=null&&o.contains(t.target));a&&r&&Ht.destroyTooltip(n)},Co=(t,n)=>{t.__tooltip_create=()=>pd(t,n),t.__tooltip_destroy=e=>md(e,t),t.addEventListener("mouseenter",t.__tooltip_create),document.addEventListener("mousemove",t.__tooltip_destroy),t.addEventListener("focus",t.__tooltip_create),t.addEventListener("blur",t.__tooltip_destroy,!0)},Oo=t=>{Ht.destroyTooltip(t),t.removeEventListener("mouseenter",t.__tooltip_create),document.removeEventListener("mousemove",t.__tooltip_destroy),t.removeEventListener("focus",t.__tooltip_create),t.removeEventListener("blur",t.__tooltip_destroy,!0)},or={mounted(t,n){Co(t,n)},updated(t,n){Oo(t),Co(t,n)},beforeUnmount(t){Oo(t)}},dp="",gd={name:"IbSorting",props:{tooltipTitle:{type:String,default:""},hideSortingButton:{type:Boolean,default:!1},tooltipText:{type:String},tooltipPosition:{type:String},tooltipIconPosition:{type:String},tooltipIconSorting:{type:String},toggleTipTitle:{type:String},title:{type:String,default:""},sort:{type:String,default:null},view:{type:String,required:!0},disable:{type:Boolean,default:!1},tableName:{type:String,required:!0}},mounted(){this.$globalEvents.$on(`sorting:update:${this.tableName}`,t=>{this.$el.contains(t.$el)||(this.currentTypeSort=null)})},data(){return{isOpenToggleTip:!1,sortingTypes:hd,sortingTypesView:fd,currentTypeSort:this.sort}},methods:{clickHandler(){this.currentTypeSort?this.currentTypeSort===this.sortingTypes.TYPE_ASC?this.currentTypeSort=this.sortingTypes.TYPE_DESC:this.currentTypeSort=null:this.currentTypeSort=this.sortingTypes.TYPE_ASC,this.updateTypeSorting()},updateTypeSorting(){this.$globalEvents.$emit(`sorting:update:${this.tableName}`,this),this.$emit("update-sorting",this.currentTypeSort)}},computed:{iconType(){return this.currentTypeSort===this.sortingTypes.TYPE_ASC?"arrow-up":this.currentTypeSort===this.sortingTypes.TYPE_DESC?"arrow-down":this.view!==this.sortingTypesView.GRID_VIEW?"swap-vertical":null},sortingTooltipPosition(){return this.hasToggleTip?"bottomCenter":this.tooltipPosition},sortingTooltipContent(){var t;return this.hasToggleTip?lang("click_to_view_details",(t=this.langComponents)==null?void 0:t.COMPONENT_SYSTEM):this.tooltipContent},tooltipIconText(){var t,n,e;return this.currentTypeSort===this.sortingTypes.TYPE_ASC?lang("sort_descending",(t=this.langComponents)==null?void 0:t.COMPONENT_SELECT):this.currentTypeSort===this.sortingTypes.TYPE_DESC?lang("reset_sorting",(n=this.langComponents)==null?void 0:n.COMPONENT_SELECT):this.view!==this.sortingTypesView.GRID_VIEW?lang("sort_ascending",(e=this.langComponents)==null?void 0:e.COMPONENT_SELECT):""},tooltipContent(){return this.tooltipTitle.length?{title:this.tooltipTitle,text:this.tooltipText}:this.tooltipText},hasToggleTip(){return this.toggleTipTitle&&this.$slots.toggleTipBody&&this.$slots.toggleTipButtons}},directives:{Tooltip:or},components:{IbIcon:Be,IbIconButton:ct,IbToggleTip:mo}},yd={class:"sorting-wrapper"},vd=["name"],bd=["aria-label"];function _d(t,n,e,o,a,r){var p;const l=i.resolveComponent("ib-toggle-tip"),s=i.resolveComponent("ib-icon-button"),f=i.resolveComponent("ib-icon"),c=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",yd,[e.view===a.sortingTypesView.TABLE_VIEW?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["table-sorting-wrapper",{active:a.currentTypeSort,disabled:e.disable}])},[i.createElementVNode("div",null,[i.withDirectives((i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["sorting-label",{"sorting-label-active":a.isOpenToggleTip&&r.hasToggleTip,"has-action":((p=e.tooltipText)==null?void 0:p.length)||r.hasToggleTip}]),type:"button",onClick:n[0]||(n[0]=h=>a.isOpenToggleTip=!a.isOpenToggleTip)},[i.createTextVNode(i.toDisplayString(e.title),1)],2)),[[c,r.sortingTooltipContent,r.sortingTooltipPosition]]),r.hasToggleTip?(i.openBlock(),i.createBlock(l,{key:0,position:"bottom-center","is-open":a.isOpenToggleTip,title:e.toggleTipTitle,onClose:n[1]||(n[1]=h=>a.isOpenToggleTip=!1)},{buttons:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipButtons",{},void 0,!0)]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipBody",{},void 0,!0)]),_:3},8,["is-open","title"])):i.createCommentVNode("",!0)]),e.hideSortingButton?i.createCommentVNode("",!0):i.withDirectives((i.openBlock(),i.createBlock(s,{key:0,kind:"white",size:"s",onClick:r.clickHandler},{default:i.withCtx(()=>[i.createElementVNode("ion-icon",{name:r.iconType},null,8,vd)]),_:1},8,["onClick"])),[[c,r.tooltipIconText,e.tooltipIconPosition]])],2)):i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:1,class:i.normalizeClass(["sorting-button",{active:a.currentTypeSort,disabled:e.disable}]),type:"button",onClick:n[2]||(n[2]=(...h)=>r.clickHandler&&r.clickHandler(...h)),"aria-label":e.sort},[i.createTextVNode(i.toDisplayString(e.title)+" ",1),r.iconType?(i.openBlock(),i.createBlock(f,{key:0,name:r.iconType},null,8,["name"])):i.createCommentVNode("",!0)],10,bd)),[[c,e.tooltipText,e.tooltipPosition]])])}const $d=_e(gd,[["render",_d],["__scopeId","data-v-a4394881"]]),cp="",wd={name:"IbBreadcrumbs",props:{items:{type:Array,default:()=>[]},tooltipTextContext:{type:String}},computed:{last(){return this.items.length?this.items.length-1:null},initContextMenu(){return this.items.length>4},setItemsContextMenu(){return this.items.slice(0,-3)}},components:{IbIcon:Be,IbIconButton:ct,IbDropdownItem:jr,IbDropdownList:ir,IbTooltip:an}},kd={"aria-label":"breadcrumb"},Cd={class:"breadcrumb"},Od=["href"],Ed={key:1},Sd=["href"];function xd(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown-item"),p=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("nav",kd,[i.createElementVNode("ul",Cd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.items,(h,d)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(["breadcrumb-item",d===r.last?"active":""]),"aria-current":"page",key:d},[d!==r.last&&d>e.items.length-4||d===0?(i.openBlock(),i.createElementBlock("a",{key:0,class:"ib-link",href:h.url},i.toDisplayString(h.title),9,Od)):i.createCommentVNode("",!0),d===r.last?(i.openBlock(),i.createElementBlock("p",Ed,i.toDisplayString(h.title),1)):i.createCommentVNode("",!0),r.initContextMenu&&d===e.items.length-4?(i.openBlock(),i.createBlock(p,{key:2,horizontal:"center"},{trigger:i.withCtx(()=>[i.createVNode(f,{kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(l,{name:"ellipsis-horizontal-sharp"}),e.tooltipTextContext?(i.openBlock(),i.createBlock(s,{key:0,text:e.tooltipTextContext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1})]),body:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.setItemsContextMenu,(u,_)=>(i.openBlock(),i.createBlock(c,{key:_},{default:i.withCtx(()=>[i.createElementVNode("a",{class:"context-breadcrums",href:u.url},i.toDisplayString(u.title),9,Sd)]),_:2},1024))),128))]),_:2},1024)):i.createCommentVNode("",!0),d!==r.last&&d>e.items.length-5||d===0?(i.openBlock(),i.createBlock(l,{key:3,name:"chevron-forward-outline"})):i.createCommentVNode("",!0)],2))),128))])])}const Td=_e(wd,[["render",xd],["__scopeId","data-v-5ef772a9"]]),up="",Nd={name:"IbLabel",props:{for:{type:String},required:{type:Boolean,default:!1},infoText:{type:String,default:""},tooltipPosition:{type:String}},mounted(){this.$globalEvents.$on(`label:disabled:${this.for}`,t=>{this.disabled=t})},data(){return{disabled:!1}},computed:{classes(){const t=["ib-label"];return this.infoText.length&&t.push("has-info-text"),this.disabled&&t.push("label-disabled"),t}},components:{IbIconButton:ct,IbIcon:Be},directives:{Tooltip:or}},Ad=["for"],Dd={key:0,class:"required"};function Id(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),f=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(r.classes),for:e.for},[e.required?(i.openBlock(),i.createElementBlock("span",Dd,"* ")):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0),e.infoText.length?i.withDirectives((i.openBlock(),i.createBlock(s,{key:1,size:"xs",class:"info-button",kind:"ghost",type:"button"},{default:i.withCtx(()=>[i.createVNode(l,{name:"information-circle-outline"})]),_:1})),[[f,e.infoText,e.tooltipPosition]]):i.createCommentVNode("",!0)],10,Ad)}const wn=_e(Nd,[["render",Id],["__scopeId","data-v-4e464a62"]]),Vr={text:"text",password:"password",email:"email",number:"number"},fp="",Pd={name:"IbInput",props:{type:{type:String,default:Vr.text,validator:t=>Object.keys(Vr).includes(t)},disabled:{type:Boolean,required:!1,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},id:{type:[String],default(){return gt()}},debounce:{type:[Number,String]},showIcon:{type:Boolean,default:!1},showClearButton:{type:Boolean,default:!0},clearButtonMessage:{type:String,default:""},settingsButtonMessage:{type:String,default:""},showPasswordMessage:{type:String,default:""},hidePasswordMessage:{type:String,default:""},value:{type:[String,Number],default:""},modelValue:{type:[String,Number]},settingsVerticalPosition:{type:String,default:nr.bottom},settingsHorizontalPosition:{type:String,default:$n.right},readonly:{type:Boolean,default:!1},autocomplete:{type:String}},data(){return{actualValue:this.modelValue||this.value,showPassword:!1}},mounted(){setTimeout(()=>{this.$globalEvents.$emit(`label:disabled:${this.id}`,this.disabled)},10)},methods:{toggleShowPassword(){this.showPassword=!this.showPassword},clearInput(){this.actualValue="",this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("clear")},onBlur(){this.$emit("blur",this.actualValue)},onFocus(){this.$emit("focus",this.actualValue)},onInput(){this.debounce?this.delayedInput(this.actualValue):(this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue))},delayedInput(t){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(()=>{this.$emit("update:modelValue",t),this.$emit("input",t)},this.debounce)},focus(){this.$refs.field.focus()}},computed:{hasSettings(){return!!this.$slots.settings},classes(){const t=["ib-input"];return this.hasErrorState&&t.push("ib-error"),this.showIcon&&t.push("ib-input-has-icon"),t},attrs(){let t=Ir({...this.$attrs},["onInput","onBlur"]);return t.type=this.type===Vr.password?this.showPassword?"text":"password":this.type,t},hasErrorState(){return this.error||this.errorMessage.length}},watch:{value(t){this.actualValue=t},modelValue(t){this.actualValue=t},disabled(t){this.$globalEvents.$emit(`label:disabled:${this.id}`,t)}},emits:["input","blur","focus","clear","update:modelValue",`label:disabled:${globalThis==null?void 0:globalThis.id}`],components:{IbAlert:Ft,IbIconButton:ct,IbIcon:Be,IbDropdown:rr},inheritAttrs:!1},Md=["aria-invalid","readonly","disabled","id","autocomplete"],Bd={class:"settings-wrapper"};function Ld(t,n,e,o,a,r){var p,h;const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),f=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock("div",null,[e.errorMessage?(i.openBlock(),i.createBlock(l,{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["ib-input-wrapper",{"has-settings":r.hasSettings}])},[e.showIcon?(i.openBlock(),i.createBlock(s,{key:0,class:"icon-search",name:"search-outline"})):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("input",i.mergeProps(r.attrs,{"onUpdate:modelValue":n[0]||(n[0]=d=>a.actualValue=d),ref:"field","aria-invalid":!!r.hasErrorState,readonly:e.readonly,disabled:e.disabled,id:e.id,autocomplete:e.autocomplete,class:r.classes,onInput:n[1]||(n[1]=d=>r.onInput(d)),onBlur:n[2]||(n[2]=d=>r.onBlur(d)),onFocus:n[3]||(n[3]=d=>r.onFocus(d))}),null,16,Md),[[i.vModelDynamic,a.actualValue,void 0,{trim:!0}]]),e.type!=="password"&&e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(f,{key:1,kind:"ghost",class:"button-clear",disabled:e.disabled,"help-text":e.clearButtonMessage,"prevent-default":"",type:"button",onClick:r.clearInput,onKeypress:i.withKeys(r.clearInput,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"close-outline"})]),_:1},8,["disabled","help-text","onClick","onKeypress"])),[[i.vShow,(p=a.actualValue)==null?void 0:p.toString().length]]):i.createCommentVNode("",!0),e.type==="password"?i.withDirectives((i.openBlock(),i.createBlock(f,{key:2,kind:"ghost",class:"toggle-password","prevent-default":"",type:"button",disabled:e.readonly||e.disabled,"help-text":a.showPassword?e.hidePasswordMessage:e.showPasswordMessage,onClick:i.withModifiers(r.toggleShowPassword,["prevent"])},{default:i.withCtx(()=>[i.createVNode(s,{name:a.showPassword?"eye-off-outline":"eye-outline"},null,8,["name"])]),_:1},8,["disabled","help-text","onClick"])),[[i.vShow,(h=a.actualValue)==null?void 0:h.length]]):i.createCommentVNode("",!0),r.hasSettings?(i.openBlock(),i.createBlock(c,{key:3,class:"settings-dropdown-wrapper",horizontal:e.settingsHorizontalPosition,vertical:e.settingsVerticalPosition},{trigger:i.withCtx(()=>[i.createVNode(f,{"prevent-default":"","help-text":e.settingsButtonMessage,class:"options-trigger",kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(s,{name:"options"})]),_:1},8,["help-text"])]),body:i.withCtx(()=>[i.createElementVNode("div",Bd,[i.renderSlot(t.$slots,"settings",{},void 0,!0)])]),_:3},8,["horizontal","vertical"])):i.createCommentVNode("",!0)],2)])}const qr=_e(Pd,[["render",Ld],["__scopeId","data-v-19017a8f"]]),hp="",Rd={name:"IbCheckbox",model:{event:"input"},props:{label:String,error:{type:[Boolean,null],default:!1},name:String,id:{type:String,default(){return gt()}},value:{type:[String,Number]},modelValue:{type:[Boolean,String]},isChecked:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disableFocus:{type:Boolean,default:!1},required:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"}},watch:{isChecked(t){this.checked=t},modelValue(t){this.$emit("update:modelValue",this.modelValue),this.checked=t==="0"?!1:!!t}},data(){return{checked:this.modelValue?this.modelValue==="0"?!1:!!this.modelValue:this.isChecked}},methods:{onChange(t){this.disabled||this.readonly||(this.checked=!this.checked,this.$emit("update:modelValue",this.checked),this.$emit("input",this.checked))}},computed:{classes(){return{"ib-checkbox":!0,"ib-has-error":this.error,"ib-checkbox-filled":this.checked,"ib-checkbox-disabled":this.disabled,"ib-checkbox-readonly":this.readonly,"ib-checkbox-indeterminate":this.indeterminate}},indeterminate(){return this.isChecked===null},attrs(){const t={...Ir({...this.$attrs})};return delete t.class,t.class=this.classes,t}},components:{IbIcon:Be},inheritAttrs:!1},jd=["for","tabindex","aria-checked"],Vd=["name","id","value","disabled","required"],qd=["name","disabled","required"],Fd={class:"ib-checkbox-body"},Hd={key:0,class:"required"},zd={class:"ib-checkbox-input"},Ud={key:1,class:"ib-checkbox-label"},Kd={key:0,class:"required"};function Gd(t,n,e,o,a,r){var s;const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{role:"checkbox",class:i.normalizeClass(["ib-checkbox-wrapper",this.$attrs.class])},[i.createElementVNode("label",i.mergeProps(r.attrs,{for:e.id,tabindex:e.disabled|e.disableFocus?-1:0,"aria-checked":!!a.checked,onClick:n[2]||(n[2]=i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent","stop"])),onKeypress:n[3]||(n[3]=i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"]))}),[i.withDirectives(i.createElementVNode("input",{tabindex:"-1",type:"checkbox",name:e.name,id:e.id,value:e.value??1,disabled:e.disabled,required:e.required,"onUpdate:modelValue":n[0]||(n[0]=f=>a.checked=f),onClick:n[1]||(n[1]=(...f)=>r.onChange&&r.onChange(...f))},null,8,Vd),[[i.vModelCheckbox,a.checked]]),!e.value&&!a.checked?(i.openBlock(),i.createElementBlock("input",{key:0,value:"0",type:"hidden",name:e.name,disabled:e.disabled,required:e.required},null,8,qd)):i.createCommentVNode("",!0),i.createElementVNode("div",Fd,[e.labelPosition==="left"&&e.label.length?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["ib-checkbox-label",{"ib-checkbox-label-left":e.labelPosition==="left"}])},[e.required?(i.openBlock(),i.createElementBlock("span",Hd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)],2)):i.createCommentVNode("",!0),i.createElementVNode("span",zd,[i.withDirectives(i.createVNode(l,{name:"checkmark-sharp"},null,512),[[i.vShow,a.checked&&!r.indeterminate]]),i.withDirectives(i.createVNode(l,{class:i.normalizeClass("checkbox-undeterminate-icon"),name:"remove-sharp"},null,512),[[i.vShow,r.indeterminate]])]),e.labelPosition==="right"&&((s=e.label)!=null&&s.length)?(i.openBlock(),i.createElementBlock("span",Ud,[e.required?(i.openBlock(),i.createElementBlock("span",Kd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)])):i.createCommentVNode("",!0)])],16,jd)],2)}const Fr=_e(Rd,[["render",Gd],["__scopeId","data-v-cb198d37"]]),pp="",Wd={name:"IbToggle",model:{prop:"isChecked",event:"input"},props:{isChecked:{type:Boolean,required:!1},id:{type:String,default:()=>gt()},disabled:{type:Boolean,default:!1},name:{type:String,default:"active"},label:{type:String,default:""},error:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"},helpMessage:{type:String,default:""},helpMessageOff:{type:String,default:""}},watch:{isChecked(t){this.checked=t}},data(){return{checked:this.isChecked}},methods:{onChange(){this.disabled||(this.checked=!this.checked,this.$emit("input",this.checked))}},computed:{classes(){return{"ib-toggle-container":!0,"has-error":this.error,"toggle-on":this.checked,"toggle-disabled":this.disabled,"label-position-left":this.labelPosition==="left"}}},components:{IbIcon:Be,IbTooltip:an}},Yd=["aria-checked","tabindex"],Zd={class:"toggle-wrapper",ref:"wrapper"},Jd={class:"toggle",ref:"toggle"},Xd=["name","checked","id","disabled"],Qd=i.createElementVNode("span",{class:"toggle-slider round"},null,-1),ec={key:0,class:"toggle-label"};function tc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip");return i.openBlock(),i.createElementBlock("label",{role:"switch","aria-checked":a.checked,tabindex:e.disabled?-1:0,class:i.normalizeClass(r.classes),onKeypress:[n[2]||(n[2]=i.withKeys(i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"]),["space"])),n[3]||(n[3]=i.withKeys(i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"]),["enter"]))]},[i.createElementVNode("div",Zd,[i.createElementVNode("div",Jd,[i.createElementVNode("input",{tabindex:"-1",type:"checkbox",value:"1",name:e.name,checked:a.checked,id:e.id,disabled:e.disabled,onClick:n[0]||(n[0]=(...f)=>r.onChange&&r.onChange(...f)),onInput:n[1]||(n[1]=i.withModifiers(()=>{},["stop"]))},null,40,Xd),Qd,i.createVNode(l,{class:"checked-icon",name:"checkmark"}),i.createVNode(l,{class:"unchecked-icon",name:"close"})],512)],512),e.label.length?(i.openBlock(),i.createElementBlock("span",ec,i.toDisplayString(e.label),1)):i.createCommentVNode("",!0),e.helpMessage.length?(i.openBlock(),i.createBlock(s,{key:1,text:a.checked?e.helpMessage:e.helpMessageOff.length?e.helpMessageOff:e.helpMessage},null,8,["text"])):i.createCommentVNode("",!0)],42,Yd)}const Eo=_e(Wd,[["render",tc]]);function So(t){return t.scrollHeight>t.clientHeight}const mp="",nc={name:"select-option",props:{option:{type:Object},name:String,parentAutoCheck:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:!0},uid:{type:String,default:""},onlyEndNodes:{type:Boolean,default:!1},htmlTitle:{type:Boolean,default:!1},showInput:{type:Boolean,default:!0},isBookmarkable:{type:Boolean,default:!1},isBookmarked:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1}},mounted(){this.option.hasOwnProperty("children")&&this.option.children&&this.checkParent(),this.option.showTooltipByDefault&&(this.showTooltip=!0)},updated(){this.$nextTick(()=>{this.option.showTooltipByDefault?this.showTooltip=!0:So(this.$el.querySelector(".option-label"))&&(this.showTooltip=!0)})},data(){return{showTooltip:!1}},methods:{onKeydown(t){t.keyCode===go&&(t.preventDefault(),this.onChange()),this.hasVisibleChildren&&(t.keyCode===ys&&(this.option.isChildrenVisible=!0),t.keyCode===gs&&(this.option.isChildrenVisible=!1))},onChange(){var t,n;!this.isMultiple&&!this.isChecked(this.option)&&((t=this.$refs.component)==null||t.onChange()),this.isMultiple&&((n=this.$refs.component)==null||n.onChange())},toggle(t,n=!0){this.check(this.option,t,!0,n)},check(t,n,e,o){this.$emit("check",t,n,e),o&&t.children&&t.children.forEach(a=>{this.check(a,n,!1,!0)})},toggleChildrenVisibility(){this.option.isChildrenVisible=!this.option.isChildrenVisible},checkChildren(t,n,e){e&&this.isMultiple&&this.$nextTick(()=>{this.checkParent()}),this.$emit("check",t,n,!1)},checkParent(){const t=this.option.children.filter(e=>e.checked).length,n=t>=this.option.children.length;(!this.option.checked&&n&&this.parentAutoCheck||this.option.checked&&!n)&&this.toggle(!this.option.checked,!1)},calculateChildren(t,n,e=!1){let o=0;return t.children&&t.children.forEach(a=>{(!n||n(a))&&o++,e&&(o+=this.calculateChildren(a,n,e))}),o},isChecked(t){if(this.hasChildren)if(this.childrenSelectedCount){if(this.childrenSelectedCount>0&&this.countOfAllChildren>this.childrenSelectedCount)return null}else return!1;return t.checked?!0:t.isIndeterminate?null:!1}},computed:{component(){return this.isMultiple&&this.isToggle?Eo:Fr},hasChildren(){return!!(this.option.children&&this.option.children.length)},hasVisibleChildren(){return this.calculateChildren(this.option,t=>t.visible)},iconName(){return this.option.isChildrenVisible?"chevron-down":"chevron-forward"},id(){return this.uid+"_"+this.option.id},actualName(){return this.onlyEndNodes&&this.option.children&&this.option.children.length?"":this.name},childrenSelectedCount(){return this.calculateChildren(this.option,t=>t.checked,!0)},countOfAllChildren(){return this.calculateChildren(this.option,()=>!0,!0)}},components:{IbIcon:Be,List:Rr,IbIconButton:ct},directives:{Tooltip:or}},rc=["aria-selected","aria-label","id"],ic={key:0,class:"option-label"},oc={key:1,class:"option-label"},ac=["innerHTML"],lc=["innerHTML"],sc={key:2,class:"option-label"};function dc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),f=i.resolveComponent("select-option"),c=i.resolveComponent("list"),p=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("li",null,[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["tree-select-option",{"tree-select-option-checked":r.isChecked(e.option),"tree-select-option-margin":r.hasVisibleChildren,active:e.option.isChildrenVisible,"is-multiple":e.isMultiple,"is-not-multiple":!e.isMultiple,"tree-select-option-toggle":this.isToggle&&this.isMultiple}]),tabindex:"0",role:"option","aria-selected":r.isChecked(e.option),"aria-label":e.option.title,id:"option-"+r.id,onKeydown:n[3]||(n[3]=i.withModifiers((...h)=>r.onKeydown&&r.onKeydown(...h),["self"])),onFocus:n[4]||(n[4]=h=>t.$emit("onFocus",`option-${r.id}`))},[i.withDirectives(i.createVNode(s,{"disabled-focus":!0,kind:"ghost",class:"toggle-children",onClick:r.toggleChildrenVisibility},{default:i.withCtx(()=>[i.createVNode(l,{name:r.iconName},null,8,["name"])]),_:1},8,["onClick"]),[[i.vShow,r.hasVisibleChildren]]),i.createElementVNode("div",{onClick:n[1]||(n[1]=i.withModifiers((...h)=>r.onChange&&r.onChange(...h),["prevent"])),class:i.normalizeClass({disabled:e.option.isDisabled,"tree-select-option-label":!0,"tree-select-option-has-children":r.hasVisibleChildren,active:!e.showInput&&e.option.checked})},[i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.component),{ref:"component",tabindex:"-1","disable-focus":"","aria-label":e.option.title,name:r.actualName,value:e.option.id,id:"input"+r.id,"is-checked":r.isChecked(e.option),disabled:e.option.isDisabled,readonly:e.option.readonly,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onInput:r.toggle},null,40,["aria-label","name","value","id","is-checked","disabled","readonly","onInput"])),[[i.vShow,e.showInput]]),e.isBookmarkable?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass("bookmarkable-option-title "+(e.isBookmarked?"bookmarked":""))},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",oc,i.toDisplayString(e.option.title),1)):(i.openBlock(),i.createElementBlock("span",ic,[i.createTextVNode(i.toDisplayString(e.option.title)+" ",1),i.createVNode(l,{name:"star",onClick:n[0]||(n[0]=i.withModifiers(h=>t.$emit("toggle-bookmark",e.option),["stop","prevent"]))})]))],2)):e.htmlTitle?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",{key:1,class:"option-label",innerHTML:e.option.title},null,8,lc)):(i.openBlock(),i.createElementBlock("span",{key:0,class:"option-label",innerHTML:e.option.title},null,8,ac))],64)):(i.openBlock(),i.createElementBlock("span",sc,i.toDisplayString(e.option.title),1))],2),r.hasChildren?i.withDirectives((i.openBlock(),i.createBlock(c,{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.option.children,h=>i.withDirectives((i.openBlock(),i.createBlock(f,{key:h.value,option:h,name:e.name,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"show-input":e.showInput,onCheck:r.checkChildren,onToggleBookmark:n[2]||(n[2]=d=>t.$emit("toggle-bookmark",d)),uid:e.uid,"is-bookmarkable":e.isBookmarkable},null,8,["option","name","parent-auto-check","is-multiple","show-input","onCheck","uid","is-bookmarkable"])),[[i.vShow,h.visible]])),128))]),_:1},512)),[[i.vShow,r.hasVisibleChildren&&e.option.isChildrenVisible]]):i.createCommentVNode("",!0)],42,rc)),[[p,a.showTooltip?e.option.isDisabled?e.option.disableTooltip:e.option.title:""]])])}const cc=_e(nc,[["render",dc]]);var Re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xo={exports:{}};/*!***************************************************
|
|
22
|
+
top: ${o-p+h-5}px!important`;break}return d}getClassList(n){return n?wo[n]:wo.topCenter}}const Ht=new ko,pd=(t,n)=>{var a;Ht.getTooltipContainer()&&Ht.destroyTooltip();const e=Object.keys(n.modifiers)[0]||n.arg,o={title:((a=n.value)==null?void 0:a.title)||"",text:typeof n.value=="object"?n.value.text:n.value};Ht.createTooltip(t,o,e)},md=(t,n)=>{const e=Ht.getId();if(n.getAttribute("aria-describedby")!==e)return;const o=Ht.getTooltipContainer();if(t.type==="blur"){n.contains(t.relatedTarget)||Ht.destroyTooltip(n);return}const a=n!==t.target&&!n.contains(t.target),r=o!==t.target&&!(o!=null&&o.contains(t.target));a&&r&&Ht.destroyTooltip(n)},Co=(t,n)=>{t.__tooltip_create=()=>pd(t,n),t.__tooltip_destroy=e=>md(e,t),t.addEventListener("mouseenter",t.__tooltip_create),document.addEventListener("mousemove",t.__tooltip_destroy),t.addEventListener("focus",t.__tooltip_create),t.addEventListener("blur",t.__tooltip_destroy,!0)},Oo=t=>{Ht.destroyTooltip(t),t.removeEventListener("mouseenter",t.__tooltip_create),document.removeEventListener("mousemove",t.__tooltip_destroy),t.removeEventListener("focus",t.__tooltip_create),t.removeEventListener("blur",t.__tooltip_destroy,!0)},or={mounted(t,n){Co(t,n)},updated(t,n){Oo(t),Co(t,n)},beforeUnmount(t){Oo(t)}},dp="",gd={name:"IbSorting",props:{tooltipTitle:{type:String,default:""},hideSortingButton:{type:Boolean,default:!1},tooltipText:{type:String},tooltipPosition:{type:String},tooltipIconPosition:{type:String},tooltipIconSorting:{type:String},toggleTipTitle:{type:String},title:{type:String,default:""},sort:{type:String,default:null},view:{type:String,required:!0},disable:{type:Boolean,default:!1},tableName:{type:String,required:!0}},mounted(){this.$globalEvents.$on(`sorting:update:${this.tableName}`,t=>{this.$el.contains(t.$el)||(this.currentTypeSort=null)})},data(){return{isOpenToggleTip:!1,sortingTypes:hd,sortingTypesView:fd,currentTypeSort:this.sort}},methods:{clickHandler(){this.currentTypeSort?this.currentTypeSort===this.sortingTypes.TYPE_ASC?this.currentTypeSort=this.sortingTypes.TYPE_DESC:this.currentTypeSort=null:this.currentTypeSort=this.sortingTypes.TYPE_ASC,this.updateTypeSorting()},updateTypeSorting(){this.$globalEvents.$emit(`sorting:update:${this.tableName}`,this),this.$emit("update-sorting",this.currentTypeSort)}},computed:{iconType(){return this.currentTypeSort===this.sortingTypes.TYPE_ASC?"arrow-up":this.currentTypeSort===this.sortingTypes.TYPE_DESC?"arrow-down":this.view!==this.sortingTypesView.GRID_VIEW?"swap-vertical":null},sortingTooltipPosition(){return this.hasToggleTip?"bottomCenter":this.tooltipPosition},sortingTooltipContent(){var t;return this.hasToggleTip?lang("click_to_view_details",(t=this.langComponents)==null?void 0:t.COMPONENT_SYSTEM):this.tooltipContent},tooltipIconText(){var t,n,e;return this.currentTypeSort===this.sortingTypes.TYPE_ASC?lang("sort_descending",(t=this.langComponents)==null?void 0:t.COMPONENT_SELECT):this.currentTypeSort===this.sortingTypes.TYPE_DESC?lang("reset_sorting",(n=this.langComponents)==null?void 0:n.COMPONENT_SELECT):this.view!==this.sortingTypesView.GRID_VIEW?lang("sort_ascending",(e=this.langComponents)==null?void 0:e.COMPONENT_SELECT):""},tooltipContent(){return this.tooltipTitle.length?{title:this.tooltipTitle,text:this.tooltipText}:this.tooltipText},hasToggleTip(){return this.toggleTipTitle&&this.$slots.toggleTipBody&&this.$slots.toggleTipButtons}},directives:{Tooltip:or},components:{IbIcon:Be,IbIconButton:ct,IbToggleTip:mo}},yd={class:"sorting-wrapper"},vd=["name"],bd=["aria-label"];function _d(t,n,e,o,a,r){var p;const l=i.resolveComponent("ib-toggle-tip"),s=i.resolveComponent("ib-icon-button"),f=i.resolveComponent("ib-icon"),c=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("div",yd,[e.view===a.sortingTypesView.TABLE_VIEW?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["table-sorting-wrapper",{active:a.currentTypeSort,disabled:e.disable}])},[i.createElementVNode("div",null,[i.withDirectives((i.openBlock(),i.createElementBlock("button",{class:i.normalizeClass(["sorting-label",{"sorting-label-active":a.isOpenToggleTip&&r.hasToggleTip,"has-action":((p=e.tooltipText)==null?void 0:p.length)||r.hasToggleTip}]),type:"button",onClick:n[0]||(n[0]=h=>a.isOpenToggleTip=!a.isOpenToggleTip)},[i.createTextVNode(i.toDisplayString(e.title),1)],2)),[[c,r.sortingTooltipContent,r.sortingTooltipPosition]]),r.hasToggleTip?(i.openBlock(),i.createBlock(l,{key:0,position:"bottom-center","is-open":a.isOpenToggleTip,title:e.toggleTipTitle,onClose:n[1]||(n[1]=h=>a.isOpenToggleTip=!1)},{buttons:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipButtons",{},void 0,!0)]),default:i.withCtx(()=>[i.renderSlot(t.$slots,"toggleTipBody",{},void 0,!0)]),_:3},8,["is-open","title"])):i.createCommentVNode("",!0)]),e.hideSortingButton?i.createCommentVNode("",!0):i.withDirectives((i.openBlock(),i.createBlock(s,{key:0,kind:"white",size:"s",onClick:r.clickHandler},{default:i.withCtx(()=>[i.createElementVNode("ion-icon",{name:r.iconType},null,8,vd)]),_:1},8,["onClick"])),[[c,r.tooltipIconText,e.tooltipIconPosition]])],2)):i.withDirectives((i.openBlock(),i.createElementBlock("button",{key:1,class:i.normalizeClass(["sorting-button",{active:a.currentTypeSort,disabled:e.disable}]),type:"button",onClick:n[2]||(n[2]=(...h)=>r.clickHandler&&r.clickHandler(...h)),"aria-label":e.sort},[i.createTextVNode(i.toDisplayString(e.title)+" ",1),r.iconType?(i.openBlock(),i.createBlock(f,{key:0,name:r.iconType},null,8,["name"])):i.createCommentVNode("",!0)],10,bd)),[[c,e.tooltipText,e.tooltipPosition]])])}const $d=_e(gd,[["render",_d],["__scopeId","data-v-a4394881"]]),cp="",wd={name:"IbBreadcrumbs",props:{items:{type:Array,default:()=>[]},tooltipTextContext:{type:String}},computed:{last(){return this.items.length?this.items.length-1:null},initContextMenu(){return this.items.length>4},setItemsContextMenu(){return this.items.slice(0,-3)}},components:{IbIcon:Be,IbIconButton:ct,IbDropdownItem:jr,IbDropdownList:ir,IbTooltip:an}},kd={"aria-label":"breadcrumb"},Cd={class:"breadcrumb"},Od=["href"],Ed={key:1},Sd=["href"];function xd(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown-item"),p=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("nav",kd,[i.createElementVNode("ul",Cd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.items,(h,d)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(["breadcrumb-item",d===r.last?"active":""]),"aria-current":"page",key:d},[d!==r.last&&d>e.items.length-4||d===0?(i.openBlock(),i.createElementBlock("a",{key:0,class:"ib-link",href:h.url},i.toDisplayString(h.title),9,Od)):i.createCommentVNode("",!0),d===r.last?(i.openBlock(),i.createElementBlock("p",Ed,i.toDisplayString(h.title),1)):i.createCommentVNode("",!0),r.initContextMenu&&d===e.items.length-4?(i.openBlock(),i.createBlock(p,{key:2,horizontal:"center"},{trigger:i.withCtx(()=>[i.createVNode(f,{kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(l,{name:"ellipsis-horizontal-sharp"}),e.tooltipTextContext?(i.openBlock(),i.createBlock(s,{key:0,text:e.tooltipTextContext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1})]),body:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.setItemsContextMenu,(u,_)=>(i.openBlock(),i.createBlock(c,{key:_},{default:i.withCtx(()=>[i.createElementVNode("a",{class:"context-breadcrums",href:u.url},i.toDisplayString(u.title),9,Sd)]),_:2},1024))),128))]),_:2},1024)):i.createCommentVNode("",!0),d!==r.last&&d>e.items.length-5||d===0?(i.openBlock(),i.createBlock(l,{key:3,name:"chevron-forward-outline"})):i.createCommentVNode("",!0)],2))),128))])])}const Td=_e(wd,[["render",xd],["__scopeId","data-v-5ef772a9"]]),up="",Nd={name:"IbLabel",props:{for:{type:String},required:{type:Boolean,default:!1},infoText:{type:String,default:""},tooltipPosition:{type:String}},mounted(){this.$globalEvents.$on(`label:disabled:${this.for}`,t=>{this.disabled=t})},data(){return{disabled:!1}},computed:{classes(){const t=["ib-label"];return this.infoText.length&&t.push("has-info-text"),this.disabled&&t.push("label-disabled"),t}},components:{IbIconButton:ct,IbIcon:Be},directives:{Tooltip:or}},Ad=["for"],Dd={key:0,class:"required"};function Id(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),f=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(r.classes),for:e.for},[e.required?(i.openBlock(),i.createElementBlock("span",Dd,"* ")):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default",{},void 0,!0),e.infoText.length?i.withDirectives((i.openBlock(),i.createBlock(s,{key:1,size:"xs",class:"info-button",kind:"ghost",type:"button"},{default:i.withCtx(()=>[i.createVNode(l,{name:"information-circle-outline"})]),_:1})),[[f,e.infoText,e.tooltipPosition]]):i.createCommentVNode("",!0)],10,Ad)}const wn=_e(Nd,[["render",Id],["__scopeId","data-v-4e464a62"]]),Vr={text:"text",password:"password",email:"email",number:"number"},fp="",Pd={name:"IbInput",props:{type:{type:String,default:Vr.text,validator:t=>Object.keys(Vr).includes(t)},disabled:{type:Boolean,required:!1,default:!1},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},id:{type:[String],default(){return gt()}},debounce:{type:[Number,String]},showIcon:{type:Boolean,default:!1},showClearButton:{type:Boolean,default:!0},clearButtonMessage:{type:String,default:""},settingsButtonMessage:{type:String,default:""},showPasswordMessage:{type:String,default:""},hidePasswordMessage:{type:String,default:""},value:{type:[String,Number],default:""},modelValue:{type:[String,Number]},settingsVerticalPosition:{type:String,default:nr.bottom},settingsHorizontalPosition:{type:String,default:$n.right},readonly:{type:Boolean,default:!1},autocomplete:{type:String}},data(){return{actualValue:this.modelValue||this.value,showPassword:!1}},mounted(){setTimeout(()=>{this.$globalEvents.$emit(`label:disabled:${this.id}`,this.disabled)},10)},methods:{toggleShowPassword(){this.showPassword=!this.showPassword},clearInput(){this.actualValue="",this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue),this.$emit("clear")},onBlur(){this.$emit("blur",this.actualValue)},onFocus(){this.$emit("focus",this.actualValue)},onInput(){this.debounce?this.delayedInput(this.actualValue):(this.$emit("update:modelValue",this.actualValue),this.$emit("input",this.actualValue))},delayedInput(t){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(()=>{this.$emit("update:modelValue",t),this.$emit("input",t)},this.debounce)},focus(){this.$refs.field.focus()}},computed:{hasSettings(){return!!this.$slots.settings},classes(){const t=["ib-input"];return this.hasErrorState&&t.push("ib-error"),this.showIcon&&t.push("ib-input-has-icon"),t},attrs(){let t=Ir({...this.$attrs},["onInput","onBlur"]);return t.type=this.type===Vr.password?this.showPassword?"text":"password":this.type,t},hasErrorState(){return this.error||this.errorMessage.length}},watch:{value(t){this.actualValue=t},modelValue(t){this.actualValue=t},disabled(t){this.$globalEvents.$emit(`label:disabled:${this.id}`,t)}},emits:["input","blur","focus","clear","update:modelValue",`label:disabled:${globalThis==null?void 0:globalThis.id}`],components:{IbAlert:Ft,IbIconButton:ct,IbIcon:Be,IbDropdown:rr},inheritAttrs:!1},Md=["aria-invalid","readonly","disabled","id","autocomplete"],Bd={class:"settings-wrapper"};function Ld(t,n,e,o,a,r){var p,h;const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),f=i.resolveComponent("ib-icon-button"),c=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock("div",null,[e.errorMessage?(i.openBlock(),i.createBlock(l,{key:0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["ib-input-wrapper",{"has-settings":r.hasSettings}])},[e.showIcon?(i.openBlock(),i.createBlock(s,{key:0,class:"icon-search",name:"search-outline"})):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("input",i.mergeProps(r.attrs,{"onUpdate:modelValue":n[0]||(n[0]=d=>a.actualValue=d),ref:"field","aria-invalid":!!r.hasErrorState,readonly:e.readonly,disabled:e.disabled,id:e.id,autocomplete:e.autocomplete,class:r.classes,onInput:n[1]||(n[1]=d=>r.onInput(d)),onBlur:n[2]||(n[2]=d=>r.onBlur(d)),onFocus:n[3]||(n[3]=d=>r.onFocus(d))}),null,16,Md),[[i.vModelDynamic,a.actualValue,void 0,{trim:!0}]]),e.type!=="password"&&e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(f,{key:1,kind:"ghost",class:"button-clear",disabled:e.readonly||e.disabled,"help-text":e.clearButtonMessage,"prevent-default":"",type:"button",onClick:r.clearInput,onKeypress:i.withKeys(r.clearInput,["enter"])},{default:i.withCtx(()=>[i.createVNode(s,{name:"close-outline"})]),_:1},8,["disabled","help-text","onClick","onKeypress"])),[[i.vShow,(p=a.actualValue)==null?void 0:p.toString().length]]):i.createCommentVNode("",!0),e.type==="password"?i.withDirectives((i.openBlock(),i.createBlock(f,{key:2,kind:"ghost",class:"toggle-password","prevent-default":"",type:"button",disabled:e.disabled,"help-text":a.showPassword?e.hidePasswordMessage:e.showPasswordMessage,onClick:i.withModifiers(r.toggleShowPassword,["prevent"])},{default:i.withCtx(()=>[i.createVNode(s,{name:a.showPassword?"eye-off-outline":"eye-outline"},null,8,["name"])]),_:1},8,["disabled","help-text","onClick"])),[[i.vShow,(h=a.actualValue)==null?void 0:h.length]]):i.createCommentVNode("",!0),r.hasSettings?(i.openBlock(),i.createBlock(c,{key:3,class:"settings-dropdown-wrapper",horizontal:e.settingsHorizontalPosition,vertical:e.settingsVerticalPosition},{trigger:i.withCtx(()=>[i.createVNode(f,{"prevent-default":"","help-text":e.settingsButtonMessage,class:"options-trigger",kind:"ghost"},{default:i.withCtx(()=>[i.createVNode(s,{name:"options"})]),_:1},8,["help-text"])]),body:i.withCtx(()=>[i.createElementVNode("div",Bd,[i.renderSlot(t.$slots,"settings",{},void 0,!0)])]),_:3},8,["horizontal","vertical"])):i.createCommentVNode("",!0)],2)])}const qr=_e(Pd,[["render",Ld],["__scopeId","data-v-fc2aa8c0"]]),hp="",Rd={name:"IbCheckbox",model:{event:"input"},props:{label:String,error:{type:[Boolean,null],default:!1},name:String,id:{type:String,default(){return gt()}},value:{type:[String,Number]},modelValue:{type:[Boolean,String]},isChecked:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disableFocus:{type:Boolean,default:!1},required:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"}},watch:{isChecked(t){this.checked=t},modelValue(t){this.$emit("update:modelValue",this.modelValue),this.checked=t==="0"?!1:!!t}},data(){return{checked:this.modelValue?this.modelValue==="0"?!1:!!this.modelValue:this.isChecked}},methods:{onChange(t){this.disabled||this.readonly||(this.checked=!this.checked,this.$emit("update:modelValue",this.checked),this.$emit("input",this.checked))}},computed:{classes(){return{"ib-checkbox":!0,"ib-has-error":this.error,"ib-checkbox-filled":this.checked,"ib-checkbox-disabled":this.disabled,"ib-checkbox-readonly":this.readonly,"ib-checkbox-indeterminate":this.indeterminate}},indeterminate(){return this.isChecked===null},attrs(){const t={...Ir({...this.$attrs})};return delete t.class,t.class=this.classes,t}},components:{IbIcon:Be},inheritAttrs:!1},jd=["for","tabindex","aria-checked"],Vd=["name","id","value","disabled","required"],qd=["name","disabled","required"],Fd={class:"ib-checkbox-body"},Hd={key:0,class:"required"},zd={class:"ib-checkbox-input"},Ud={key:1,class:"ib-checkbox-label"},Kd={key:0,class:"required"};function Gd(t,n,e,o,a,r){var s;const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{role:"checkbox",class:i.normalizeClass(["ib-checkbox-wrapper",this.$attrs.class])},[i.createElementVNode("label",i.mergeProps(r.attrs,{for:e.id,tabindex:e.disabled|e.disableFocus?-1:0,"aria-checked":!!a.checked,onClick:n[2]||(n[2]=i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent","stop"])),onKeypress:n[3]||(n[3]=i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"]))}),[i.withDirectives(i.createElementVNode("input",{tabindex:"-1",type:"checkbox",name:e.name,id:e.id,value:e.value??1,disabled:e.disabled,required:e.required,"onUpdate:modelValue":n[0]||(n[0]=f=>a.checked=f),onClick:n[1]||(n[1]=(...f)=>r.onChange&&r.onChange(...f))},null,8,Vd),[[i.vModelCheckbox,a.checked]]),!e.value&&!a.checked?(i.openBlock(),i.createElementBlock("input",{key:0,value:"0",type:"hidden",name:e.name,disabled:e.disabled,required:e.required},null,8,qd)):i.createCommentVNode("",!0),i.createElementVNode("div",Fd,[e.labelPosition==="left"&&e.label.length?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["ib-checkbox-label",{"ib-checkbox-label-left":e.labelPosition==="left"}])},[e.required?(i.openBlock(),i.createElementBlock("span",Hd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)],2)):i.createCommentVNode("",!0),i.createElementVNode("span",zd,[i.withDirectives(i.createVNode(l,{name:"checkmark-sharp"},null,512),[[i.vShow,a.checked&&!r.indeterminate]]),i.withDirectives(i.createVNode(l,{class:i.normalizeClass("checkbox-undeterminate-icon"),name:"remove-sharp"},null,512),[[i.vShow,r.indeterminate]])]),e.labelPosition==="right"&&((s=e.label)!=null&&s.length)?(i.openBlock(),i.createElementBlock("span",Ud,[e.required?(i.openBlock(),i.createElementBlock("span",Kd,"*")):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(e.label),1)])):i.createCommentVNode("",!0)])],16,jd)],2)}const Fr=_e(Rd,[["render",Gd],["__scopeId","data-v-cb198d37"]]),pp="",Wd={name:"IbToggle",model:{prop:"isChecked",event:"input"},props:{isChecked:{type:Boolean,required:!1},id:{type:String,default:()=>gt()},disabled:{type:Boolean,default:!1},name:{type:String,default:"active"},label:{type:String,default:""},error:{type:Boolean,default:!1},labelPosition:{type:String,default:"right"},helpMessage:{type:String,default:""},helpMessageOff:{type:String,default:""}},watch:{isChecked(t){this.checked=t}},data(){return{checked:this.isChecked}},methods:{onChange(){this.disabled||(this.checked=!this.checked,this.$emit("input",this.checked))}},computed:{classes(){return{"ib-toggle-container":!0,"has-error":this.error,"toggle-on":this.checked,"toggle-disabled":this.disabled,"label-position-left":this.labelPosition==="left"}}},components:{IbIcon:Be,IbTooltip:an}},Yd=["aria-checked","tabindex"],Zd={class:"toggle-wrapper",ref:"wrapper"},Jd={class:"toggle",ref:"toggle"},Xd=["name","checked","id","disabled"],Qd=i.createElementVNode("span",{class:"toggle-slider round"},null,-1),ec={key:0,class:"toggle-label"};function tc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-tooltip");return i.openBlock(),i.createElementBlock("label",{role:"switch","aria-checked":a.checked,tabindex:e.disabled?-1:0,class:i.normalizeClass(r.classes),onKeypress:[n[2]||(n[2]=i.withKeys(i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"]),["space"])),n[3]||(n[3]=i.withKeys(i.withModifiers((...f)=>r.onChange&&r.onChange(...f),["prevent"]),["enter"]))]},[i.createElementVNode("div",Zd,[i.createElementVNode("div",Jd,[i.createElementVNode("input",{tabindex:"-1",type:"checkbox",value:"1",name:e.name,checked:a.checked,id:e.id,disabled:e.disabled,onClick:n[0]||(n[0]=(...f)=>r.onChange&&r.onChange(...f)),onInput:n[1]||(n[1]=i.withModifiers(()=>{},["stop"]))},null,40,Xd),Qd,i.createVNode(l,{class:"checked-icon",name:"checkmark"}),i.createVNode(l,{class:"unchecked-icon",name:"close"})],512)],512),e.label.length?(i.openBlock(),i.createElementBlock("span",ec,i.toDisplayString(e.label),1)):i.createCommentVNode("",!0),e.helpMessage.length?(i.openBlock(),i.createBlock(s,{key:1,text:a.checked?e.helpMessage:e.helpMessageOff.length?e.helpMessageOff:e.helpMessage},null,8,["text"])):i.createCommentVNode("",!0)],42,Yd)}const Eo=_e(Wd,[["render",tc]]);function So(t){return t.scrollHeight>t.clientHeight}const mp="",nc={name:"select-option",props:{option:{type:Object},name:String,parentAutoCheck:{type:Boolean,default:!1},isMultiple:{type:Boolean,default:!0},uid:{type:String,default:""},onlyEndNodes:{type:Boolean,default:!1},htmlTitle:{type:Boolean,default:!1},showInput:{type:Boolean,default:!0},isBookmarkable:{type:Boolean,default:!1},isBookmarked:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1}},mounted(){this.option.hasOwnProperty("children")&&this.option.children&&this.checkParent(),this.option.showTooltipByDefault&&(this.showTooltip=!0)},updated(){this.$nextTick(()=>{this.option.showTooltipByDefault?this.showTooltip=!0:So(this.$el.querySelector(".option-label"))&&(this.showTooltip=!0)})},data(){return{showTooltip:!1}},methods:{onKeydown(t){t.keyCode===go&&(t.preventDefault(),this.onChange()),this.hasVisibleChildren&&(t.keyCode===ys&&(this.option.isChildrenVisible=!0),t.keyCode===gs&&(this.option.isChildrenVisible=!1))},onChange(){var t,n;!this.isMultiple&&!this.isChecked(this.option)&&((t=this.$refs.component)==null||t.onChange()),this.isMultiple&&((n=this.$refs.component)==null||n.onChange())},toggle(t,n=!0){this.check(this.option,t,!0,n)},check(t,n,e,o){this.$emit("check",t,n,e),o&&t.children&&t.children.forEach(a=>{this.check(a,n,!1,!0)})},toggleChildrenVisibility(){this.option.isChildrenVisible=!this.option.isChildrenVisible},checkChildren(t,n,e){e&&this.isMultiple&&this.$nextTick(()=>{this.checkParent()}),this.$emit("check",t,n,!1)},checkParent(){const t=this.option.children.filter(e=>e.checked).length,n=t>=this.option.children.length;(!this.option.checked&&n&&this.parentAutoCheck||this.option.checked&&!n)&&this.toggle(!this.option.checked,!1)},calculateChildren(t,n,e=!1){let o=0;return t.children&&t.children.forEach(a=>{(!n||n(a))&&o++,e&&(o+=this.calculateChildren(a,n,e))}),o},isChecked(t){if(this.hasChildren)if(this.childrenSelectedCount){if(this.childrenSelectedCount>0&&this.countOfAllChildren>this.childrenSelectedCount)return null}else return!1;return t.checked?!0:t.isIndeterminate?null:!1}},computed:{component(){return this.isMultiple&&this.isToggle?Eo:Fr},hasChildren(){return!!(this.option.children&&this.option.children.length)},hasVisibleChildren(){return this.calculateChildren(this.option,t=>t.visible)},iconName(){return this.option.isChildrenVisible?"chevron-down":"chevron-forward"},id(){return this.uid+"_"+this.option.id},actualName(){return this.onlyEndNodes&&this.option.children&&this.option.children.length?"":this.name},childrenSelectedCount(){return this.calculateChildren(this.option,t=>t.checked,!0)},countOfAllChildren(){return this.calculateChildren(this.option,()=>!0,!0)}},components:{IbIcon:Be,List:Rr,IbIconButton:ct},directives:{Tooltip:or}},rc=["aria-selected","aria-label","id"],ic={key:0,class:"option-label"},oc={key:1,class:"option-label"},ac=["innerHTML"],lc=["innerHTML"],sc={key:2,class:"option-label"};function dc(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),f=i.resolveComponent("select-option"),c=i.resolveComponent("list"),p=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("li",null,[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["tree-select-option",{"tree-select-option-checked":r.isChecked(e.option),"tree-select-option-margin":r.hasVisibleChildren,active:e.option.isChildrenVisible,"is-multiple":e.isMultiple,"is-not-multiple":!e.isMultiple,"tree-select-option-toggle":this.isToggle&&this.isMultiple}]),tabindex:"0",role:"option","aria-selected":r.isChecked(e.option),"aria-label":e.option.title,id:"option-"+r.id,onKeydown:n[3]||(n[3]=i.withModifiers((...h)=>r.onKeydown&&r.onKeydown(...h),["self"])),onFocus:n[4]||(n[4]=h=>t.$emit("onFocus",`option-${r.id}`))},[i.withDirectives(i.createVNode(s,{"disabled-focus":!0,kind:"ghost",class:"toggle-children",onClick:r.toggleChildrenVisibility},{default:i.withCtx(()=>[i.createVNode(l,{name:r.iconName},null,8,["name"])]),_:1},8,["onClick"]),[[i.vShow,r.hasVisibleChildren]]),i.createElementVNode("div",{onClick:n[1]||(n[1]=i.withModifiers((...h)=>r.onChange&&r.onChange(...h),["prevent"])),class:i.normalizeClass({disabled:e.option.isDisabled,"tree-select-option-label":!0,"tree-select-option-has-children":r.hasVisibleChildren,active:!e.showInput&&e.option.checked})},[i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.component),{ref:"component",tabindex:"-1","disable-focus":"","aria-label":e.option.title,name:r.actualName,value:e.option.id,id:"input"+r.id,"is-checked":r.isChecked(e.option),disabled:e.option.isDisabled,readonly:e.option.readonly,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",onInput:r.toggle},null,40,["aria-label","name","value","id","is-checked","disabled","readonly","onInput"])),[[i.vShow,e.showInput]]),e.isBookmarkable?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass("bookmarkable-option-title "+(e.isBookmarked?"bookmarked":""))},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",oc,i.toDisplayString(e.option.title),1)):(i.openBlock(),i.createElementBlock("span",ic,[i.createTextVNode(i.toDisplayString(e.option.title)+" ",1),i.createVNode(l,{name:"star",onClick:n[0]||(n[0]=i.withModifiers(h=>t.$emit("toggle-bookmark",e.option),["stop","prevent"]))})]))],2)):e.htmlTitle?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[r.hasChildren?(i.openBlock(),i.createElementBlock("span",{key:1,class:"option-label",innerHTML:e.option.title},null,8,lc)):(i.openBlock(),i.createElementBlock("span",{key:0,class:"option-label",innerHTML:e.option.title},null,8,ac))],64)):(i.openBlock(),i.createElementBlock("span",sc,i.toDisplayString(e.option.title),1))],2),r.hasChildren?i.withDirectives((i.openBlock(),i.createBlock(c,{key:0},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.option.children,h=>i.withDirectives((i.openBlock(),i.createBlock(f,{key:h.value,option:h,name:e.name,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"show-input":e.showInput,onCheck:r.checkChildren,onToggleBookmark:n[2]||(n[2]=d=>t.$emit("toggle-bookmark",d)),uid:e.uid,"is-bookmarkable":e.isBookmarkable},null,8,["option","name","parent-auto-check","is-multiple","show-input","onCheck","uid","is-bookmarkable"])),[[i.vShow,h.visible]])),128))]),_:1},512)),[[i.vShow,r.hasVisibleChildren&&e.option.isChildrenVisible]]):i.createCommentVNode("",!0)],42,rc)),[[p,a.showTooltip?e.option.isDisabled?e.option.disableTooltip:e.option.title:""]])])}const cc=_e(nc,[["render",dc]]);var Re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xo={exports:{}};/*!***************************************************
|
|
23
23
|
* mark.js v8.11.1
|
|
24
24
|
* https://markjs.io/
|
|
25
25
|
* Copyright (c) 2014–2018, Julian Kühnel
|