@avakhula/ui 0.0.34 → 0.0.36

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.
@@ -8,4 +8,5 @@
8
8
  ></script>
9
9
  <script>
10
10
  window.global = window;
11
+ window.lang = (key, component, params = {}) => key
11
12
  </script>
package/dist/index.js CHANGED
@@ -3002,6 +3002,13 @@ const Vs = /* @__PURE__ */ Sr(Hs);
3002
3002
  const Us = {
3003
3003
  name: "IbTreeSelect",
3004
3004
  props: {
3005
+ // lang: {
3006
+ // type: Function,
3007
+ // default: (key) => key,
3008
+ // },
3009
+ // LANG_COMPONENTS: {
3010
+ // type: Object,
3011
+ // },
3005
3012
  placeholder: {
3006
3013
  type: String,
3007
3014
  default: ""
@@ -3184,7 +3191,7 @@ const Us = {
3184
3191
  }
3185
3192
  },
3186
3193
  mounted() {
3187
- this.marker = new Vs(this.$refs.list.$el), this.registerDependency(), this.$globalEvents.$on("select:refresh", () => {
3194
+ console.log(lang, typeof lang, "lang"), this.marker = new Vs(this.$refs.list.$el), this.registerDependency(), this.$globalEvents.$on("select:refresh", () => {
3188
3195
  this.setPreparedValues();
3189
3196
  }), document.addEventListener("mousemove", this.onResize), document.addEventListener("mouseup", this.endResizing);
3190
3197
  },
@@ -3218,37 +3225,39 @@ const Us = {
3218
3225
  uid: `f${(~~(Math.random() * 1e8)).toString(16)}`,
3219
3226
  actualStrings: {
3220
3227
  searchPlaceholder: "Search placeholder",
3221
- // this.lang(
3228
+ // searchPlaceholder: this.lang(
3222
3229
  // this.searchPlaceholderText.length
3223
3230
  // ? this.searchPlaceholderText
3224
3231
  // : "search_placeholder",
3225
- // LANG_COMPONENTS.COMPONENT_SELECT
3232
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
3226
3233
  // ),
3227
3234
  emptyTitle: "Empty title",
3228
- // this.lang(
3235
+ // emptyTitle: this.lang(
3229
3236
  // "empty_title",
3230
- // LANG_COMPONENTS.COMPONENT_SELECT
3237
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
3231
3238
  // ),
3232
3239
  selectAllOptions: "All Options",
3233
- // this.lang(
3240
+ // selectAllOptions: this.lang(
3234
3241
  // "all_options",
3235
- // LANG_COMPONENTS.COMPONENT_SELECT
3242
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
3236
3243
  // ),
3237
3244
  allSelected: "All selected",
3238
- // this.lang(
3239
- // "all_selected",
3240
- // LANG_COMPONENTS.COMPONENT_SELECT
3245
+ // allSelected: this.lang(
3246
+ // "all_selected",
3247
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
3241
3248
  // ),
3242
3249
  loading: "loading",
3243
- // this.lang("loading", LANG_COMPONENTS.COMPONENT_SELECT) + "...",
3250
+ // loading:
3251
+ // this.lang("loading", this.LANG_COMPONENTS?.COMPONENT_SELECT) + "...",
3244
3252
  selectedCount: "Selected {selected} of {all} items",
3245
- // this.lang(
3253
+ // selectedCount: this.lang(
3246
3254
  // "selected_count",
3247
- // LANG_COMPONENTS.COMPONENT_SELECT
3255
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
3248
3256
  // ),
3249
3257
  buttonTitle: "Button title",
3250
- // this.buttonTitle ||
3251
- // this.lang("button_title", LANG_COMPONENTS.COMPONENT_SELECT),
3258
+ // buttonTitle:
3259
+ // this.buttonTitle ||
3260
+ // this.lang("button_title", this.LANG_COMPONENTS?.COMPONENT_SELECT),
3252
3261
  requiredDependencyNotFilled: "Required dependency are not filled",
3253
3262
  ...this.strings
3254
3263
  },
@@ -3,7 +3,7 @@
3
3
  * https://markjs.io/
4
4
  * Copyright (c) 2014–2018, Julian Kühnel
5
5
  * Released under the MIT license https://git.io/vwTVl
6
- *****************************************************/(function(t,n){(function(e,o){t.exports=o()})(qe,function(){class e{constructor(r,d=!0,l=[],u=5e3){this.ctx=r,this.iframes=d,this.exclude=l,this.iframesTimeout=u}static matches(r,d){const l=typeof d=="string"?[d]:d,u=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(u){let p=!1;return l.every(h=>!u.call(r,h)||(p=!0,!1)),p}return!1}getContexts(){let r=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(d=>{const l=r.filter(u=>u.contains(d)).length>0;r.indexOf(d)!==-1||l||r.push(d)}),r}getIframeContents(r,d,l=()=>{}){let u;try{const p=r.contentWindow;if(u=p.document,!p||!u)throw new Error("iframe inaccessible")}catch{l()}u&&d(u)}isIframeBlank(r){const d="about:blank",l=r.getAttribute("src").trim();return r.contentWindow.location.href===d&&l!==d&&l}observeIframeLoad(r,d,l){let u=!1,p=null;const h=()=>{if(!u){u=!0,clearTimeout(p);try{this.isIframeBlank(r)||(r.removeEventListener("load",h),this.getIframeContents(r,d,l))}catch{l()}}};r.addEventListener("load",h),p=setTimeout(h,this.iframesTimeout)}onIframeReady(r,d,l){try{r.contentWindow.document.readyState==="complete"?this.isIframeBlank(r)?this.observeIframeLoad(r,d,l):this.getIframeContents(r,d,l):this.observeIframeLoad(r,d,l)}catch{l()}}waitForIframes(r,d){let l=0;this.forEachIframe(r,()=>!0,u=>{l++,this.waitForIframes(u.querySelector("html"),()=>{--l||d()})},u=>{u||d()})}forEachIframe(r,d,l,u=()=>{}){let p=r.querySelectorAll("iframe"),h=p.length,f=0;p=Array.prototype.slice.call(p);const s=()=>{--h<=0&&u(f)};h||s(),p.forEach(c=>{e.matches(c,this.exclude)?s():this.onIframeReady(c,_=>{d(c)&&(f++,l(_)),s()},s)})}createIterator(r,d,l){return document.createNodeIterator(r,d,l,!1)}createInstanceOnIframe(r){return new e(r.querySelector("html"),this.iframes)}compareNodeIframe(r,d,l){const u=r.compareDocumentPosition(l),p=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&p&&(d===null||d.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(r){const d=r.previousNode();return{prevNode:d,node:(d===null||r.nextNode())&&r.nextNode()}}checkIframeFilter(r,d,l,u){let p=!1,h=!1;return u.forEach((f,s)=>{f.val===l&&(p=s,h=f.handled)}),this.compareNodeIframe(r,d,l)?(p!==!1||h?p===!1||h||(u[p].handled=!0):u.push({val:l,handled:!0}),!0):(p===!1&&u.push({val:l,handled:!1}),!1)}handleOpenIframes(r,d,l,u){r.forEach(p=>{p.handled||this.getIframeContents(p.val,h=>{this.createInstanceOnIframe(h).forEachNode(d,l,u)})})}iterateThroughNodes(r,d,l,u,p){const h=this.createIterator(d,r,u);let f,s,c=[],_=[],v=()=>({prevNode:s,node:f}=this.getIteratorNode(h),f);for(;v();)this.iframes&&this.forEachIframe(d,b=>this.checkIframeFilter(f,s,b,c),b=>{this.createInstanceOnIframe(b).forEachNode(r,g=>_.push(g),u)}),_.push(f);_.forEach(b=>{l(b)}),this.iframes&&this.handleOpenIframes(c,r,l,u),p()}forEachNode(r,d,l,u=()=>{}){const p=this.getContexts();let h=p.length;h||u(),p.forEach(f=>{const s=()=>{this.iterateThroughNodes(r,f,d,l,()=>{--h<=0&&u()})};this.iframes?this.waitForIframes(f,s):s()})}}class o{constructor(r){this.ctx=r,this.ie=!1;const d=window.navigator.userAgent;(d.indexOf("MSIE")>-1||d.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(r){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},r)}get opt(){return this._opt}get iterator(){return new e(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(r,d="debug"){const l=this.opt.log;this.opt.debug&&typeof l=="object"&&typeof l[d]=="function"&&l[d](`mark.js: ${r}`)}escapeStr(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(r){return this.opt.wildcards!=="disabled"&&(r=this.setupWildcardsRegExp(r)),r=this.escapeStr(r),Object.keys(this.opt.synonyms).length&&(r=this.createSynonymsRegExp(r)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),this.opt.diacritics&&(r=this.createDiacriticsRegExp(r)),r=this.createMergedBlanksRegExp(r),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.createJoinersRegExp(r)),this.opt.wildcards!=="disabled"&&(r=this.createWildcardsRegExp(r)),r=this.createAccuracyRegExp(r)}createSynonymsRegExp(r){const d=this.opt.synonyms,l=this.opt.caseSensitive?"":"i",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let p in d)if(d.hasOwnProperty(p)){const h=d[p],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p),s=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(h):this.escapeStr(h);f!==""&&s!==""&&(r=r.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(s)})`,`gm${l}`),u+`(${this.processSynomyms(f)}|${this.processSynomyms(s)})`+u))}return r}processSynomyms(r){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),r}setupWildcardsRegExp(r){return(r=r.replace(/(?:\\)*\?/g,d=>d.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,d=>d.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(r){let d=this.opt.wildcards==="withSpaces";return r.replace(/\u0001/g,d?"[\\S\\s]?":"\\S?").replace(/\u0002/g,d?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(r){return r.replace(/[^(|)\\]/g,(d,l,u)=>{let p=u.charAt(l+1);return/[(|)\\]/.test(p)||p===""?d:d+"\0"})}createJoinersRegExp(r){let d=[];const l=this.opt.ignorePunctuation;return Array.isArray(l)&&l.length&&d.push(this.escapeStr(l.join(""))),this.opt.ignoreJoiners&&d.push("\\u00ad\\u200b\\u200c\\u200d"),d.length?r.split(/\u0000+/).join(`[${d.join("")}]*`):r}createDiacriticsRegExp(r){const d=this.opt.caseSensitive?"":"i",l=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let u=[];return r.split("").forEach(p=>{l.every(h=>{if(h.indexOf(p)!==-1){if(u.indexOf(h)>-1)return!1;r=r.replace(new RegExp(`[${h}]`,`gm${d}`),`[${h}]`),u.push(h)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const d="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let l=this.opt.accuracy,u=typeof l=="string"?l:l.value,p=typeof l=="string"?[]:l.limiters,h="";switch(p.forEach(f=>{h+=`|${this.escapeStr(f)}`}),u){case"partially":default:return`()(${r})`;case"complementary":return`()([^${h="\\s"+(h||this.escapeStr(d))}]*${r}[^${h}]*)`;case"exactly":return`(^|\\s${h})(${r})(?=$|\\s${h})`}}getSeparatedKeywords(r){let d=[];return r.forEach(l=>{this.opt.separateWordSearch?l.split(" ").forEach(u=>{u.trim()&&d.indexOf(u)===-1&&d.push(u)}):l.trim()&&d.indexOf(l)===-1&&d.push(l)}),{keywords:d.sort((l,u)=>u.length-l.length),length:d.length}}isNumeric(r){return Number(parseFloat(r))==r}checkRanges(r){if(!Array.isArray(r)||Object.prototype.toString.call(r[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(r),[];const d=[];let l=0;return r.sort((u,p)=>u.start-p.start).forEach(u=>{let{start:p,end:h,valid:f}=this.callNoMatchOnInvalidRanges(u,l);f&&(u.start=p,u.length=h-p,d.push(u),l=h)}),d}callNoMatchOnInvalidRanges(r,d){let l,u,p=!1;return r&&r.start!==void 0?(u=(l=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&u-d>0&&u-l>0?p=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(r)}`),this.opt.noMatch(r))):(this.log(`Ignoring invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)),{start:l,end:u,valid:p}}checkWhitespaceRanges(r,d,l){let u,p=!0,h=l.length,f=d-h,s=parseInt(r.start,10)-f;return(u=(s=s>h?h:s)+parseInt(r.length,10))>h&&(u=h,this.log(`End range automatically set to the max value of ${h}`)),s<0||u-s<0||s>h||u>h?(p=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):l.substring(s,u).replace(/\s+/g,"")===""&&(p=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:s,end:u,valid:p}}getTextNodes(r){let d="",l=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{l.push({start:d.length,end:(d+=u.textContent).length,node:u})},u=>this.matchesExclude(u.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{r({value:d,nodes:l})})}matchesExclude(r){return e.matches(r,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(r,d,l){const u=this.opt.element?this.opt.element:"mark",p=r.splitText(d),h=p.splitText(l-d);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=p.textContent,p.parentNode.replaceChild(f,p),h}wrapRangeInMappedTextNode(r,d,l,u,p){r.nodes.every((h,f)=>{const s=r.nodes[f+1];if(s===void 0||s.start>d){if(!u(h.node))return!1;const c=d-h.start,_=(l>h.end?h.end:l)-h.start,v=r.value.substr(0,h.start),b=r.value.substr(_+h.start);if(h.node=this.wrapRangeInTextNode(h.node,c,_),r.value=v+b,r.nodes.forEach((g,y)=>{y>=f&&(r.nodes[y].start>0&&y!==f&&(r.nodes[y].start-=_),r.nodes[y].end-=_)}),l-=_,p(h.node.previousSibling,h.start),!(l>h.end))return!1;d=h.end}return!0})}wrapMatches(r,d,l,u,p){const h=d===0?0:d+1;this.getTextNodes(f=>{f.nodes.forEach(s=>{let c;for(s=s.node;(c=r.exec(s.textContent))!==null&&c[h]!=="";){if(!l(c[h],s))continue;let _=c.index;if(h!==0)for(let v=1;v<h;v++)_+=c[v].length;s=this.wrapRangeInTextNode(s,_,_+c[h].length),u(s.previousSibling),r.lastIndex=0}}),p()})}wrapMatchesAcrossElements(r,d,l,u,p){const h=d===0?0:d+1;this.getTextNodes(f=>{let s;for(;(s=r.exec(f.value))!==null&&s[h]!=="";){let c=s.index;if(h!==0)for(let v=1;v<h;v++)c+=s[v].length;const _=c+s[h].length;this.wrapRangeInMappedTextNode(f,c,_,v=>l(s[h],v),(v,b)=>{r.lastIndex=b,u(v)})}p()})}wrapRangeFromIndex(r,d,l,u){this.getTextNodes(p=>{const h=p.value.length;r.forEach((f,s)=>{let{start:c,end:_,valid:v}=this.checkWhitespaceRanges(f,h,p.value);v&&this.wrapRangeInMappedTextNode(p,c,_,b=>d(b,f,p.value.substring(c,_),s),b=>{l(b,f)})}),u()})}unwrapMatches(r){const d=r.parentNode;let l=document.createDocumentFragment();for(;r.firstChild;)l.appendChild(r.removeChild(r.firstChild));d.replaceChild(l,r),this.ie?this.normalizeTextNode(d):d.normalize()}normalizeTextNode(r){if(r){if(r.nodeType===3)for(;r.nextSibling&&r.nextSibling.nodeType===3;)r.nodeValue+=r.nextSibling.nodeValue,r.parentNode.removeChild(r.nextSibling);else this.normalizeTextNode(r.firstChild);this.normalizeTextNode(r.nextSibling)}}markRegExp(r,d){this.opt=d,this.log(`Searching with expression "${r}"`);let l=0,u="wrapMatches";const p=h=>{l++,this.opt.each(h)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](r,this.opt.ignoreGroups,(h,f)=>this.opt.filter(f,h,l),p,()=>{l===0&&this.opt.noMatch(r),this.opt.done(l)})}mark(r,d){this.opt=d;let l=0,u="wrapMatches";const{keywords:p,length:h}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",s=c=>{let _=new RegExp(this.createRegExp(c),`gm${f}`),v=0;this.log(`Searching with expression "${_}"`),this[u](_,1,(b,g)=>this.opt.filter(g,c,l,v),b=>{v++,l++,this.opt.each(b)},()=>{v===0&&this.opt.noMatch(c),p[h-1]===c?this.opt.done(l):s(p[p.indexOf(c)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),h===0?this.opt.done(l):s(p[0])}markRanges(r,d){this.opt=d;let l=0,u=this.checkRanges(r);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(p,h,f,s)=>this.opt.filter(p,h,f,s),(p,h)=>{l++,this.opt.each(p,h)},()=>{this.opt.done(l)})):this.opt.done(l)}unmark(r){this.opt=r;let d=this.opt.element?this.opt.element:"*";d+="[data-markjs]",this.opt.className&&(d+=`.${this.opt.className}`),this.log(`Removal selector "${d}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,l=>{this.unwrapMatches(l)},l=>{const u=e.matches(l,d),p=this.matchesExclude(l);return!u||p?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new o(a);return this.mark=(d,l)=>(r.mark(d,l),this),this.markRegExp=(d,l)=>(r.markRegExp(d,l),this),this.markRanges=(d,l)=>(r.markRanges(d,l),this),this.unmark=d=>(r.unmark(d),this),this}})})(xi);var bs=xi.exports;const $s=jn(bs),t1="",_s={name:"IbTreeSelect",props:{placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return It()}},options:{default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return It()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1}},watch:{value(t){this.val=t,this.setPreparedValues()},modelValue(t){this.val=t,this.setPreparedValues()},val(t){this.watchClearValue&&(!t||Array.isArray(t)&&!t.length)&&this.setPreparedValues(this.actualOptions).then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},options(){let t=!0;if(typeof this.options=="function")t=!1;else{const n=[],e=this.options;Array.prototype.forEach.call(e,o=>{o.id!==void 0&&n.push(o.id)}),t=JSON.stringify(n)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=n}(this.isInitialized&&!t||this.isWatching)&&this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){this.marker=new $s(this.$refs.list.$el),this.registerDependency(),this.$globalEvents.$on("select:refresh",()=>{this.setPreparedValues()}),document.addEventListener("mousemove",this.onResize),document.addEventListener("mouseup",this.endResizing)},data(){return this.defaultFilter=t=>{this.marker.unmark();const n=this.filterString.toLowerCase().trim();this.countVisibleChildren=this.filterFunc.call(this,t,n),n&&this.marker.mark(n)},{val:this.modelValue?this.modelValue:this.value,size:{left:this.initialSize&&this.initialSize.left||0,right:this.initialSize&&this.initialSize.right||0},resizingProp:null,isInitialized:!1,optionsIdsWatch:[],isLoading:!1,actualName:this.isMultiple?this.name+"[]":this.name,filterString:"",actualOptions:[],actualBookmarkedOptions:{},selected:[],allOptionsIsChecked:!0,countVisibleChildren:0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,actualStrings:{searchPlaceholder:"Search placeholder",emptyTitle:"Empty title",selectAllOptions:"All Options",allSelected:"All selected",loading:"loading",selectedCount:"Selected {selected} of {all} items",buttonTitle:"Button title",requiredDependencyNotFilled:"Required dependency are not filled",...this.strings},dependencyValue:null}},methods:{startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",{search:this.filterString}),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.options;return this.alphabetSort&&(n=n.sort((e,o)=>e.title.toLowerCase().localeCompare(o.title.toLowerCase()))),this.prepare(n).then(([e,o])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.countVisibleChildren=e.length,this.isInitialized=!0,this.selected=o,this.setBookmarkedOptions(e)})},clear(){this.actualOptions=[],this.allOptionsIsChecked=!1,this.countVisibleChildren=0,this.selected=[],this.$emit("update:modelValue",null)},clearValue(){this.clear(),this.setPreparedValues()},prepare(t){return new Promise(n=>{const e={},o=[];let a=Promise.resolve();typeof t=="function"?(this.isLoading=!0,this.dependency&&(t=t.bind(null,this.dependencyValue)),a=a.then(t)):a=a.then(()=>t),a.then(r=>(this.isLoading=!1,r.forEach(d=>{d.initiallyVisible=typeof d.visible>"u"?!0:d.visible,d.visible=d.initiallyVisible,d.isDisabled=!1,d.checked=this.isMultiple?this.val!==null&&this.val.findIndex(l=>d.id==l)>-1:this.val!==null&&this.val==d.id,d.checked&&(!this.onlyEndNodes||!d.children)&&(e[d.id]=d),d.children&&(this.hasTreeChildren=!0,d.isChildrenVisible=!1),o.push(new Promise(l=>{d.children?this.prepare(d.children).then(([u,p])=>{d.children=u,Object.assign(e,p),l(d)}):l(d)}))}),Promise.all(o).then(d=>{n([d,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){let e=0;return t.forEach(o=>{let a=o.initiallyVisible&&o.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[o.id];if(o.children&&o.children.length){let r=this.filterFunc(o.children,n);e+=r,r&&(o.isChildrenVisible=!!n||!!Object.keys(this.actualBookmarkedOptions).length,o.isDisabled=r<o.children.length&&!this.isBookmarkable),a?r||(a=!1):a=!!r}o.visible=a,a&&e++}),e},submit(){this.change();const t=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":submit",{values:t,filter:this.filterId}),this.$emit("submit")},change(){const t=Object.keys(this.selected);this.isMultiple?(this.$emit("update:modelValue",t),this.$emit("input",t)):(this.$emit("update:modelValue",t[0]),this.$emit("input",t[0])),this.$globalEvents.$emit("select-"+this.filterId+":update",{values:t,filter:this.filterId}),this.$refs.dropdown.close()},checkIfOptionsChecked(t){return t.every(n=>n.checked)},registerCheck(t,n,e){if(n)if(t.checked=!0,this.isMultiple)this.onlyEndNodes&&t.children&&t.children.length||(this.selected[t.id]=t,this.$emit("input",Object.keys(this.selected)),this.$emit("update:modelValue",Object.keys(this.selected)));else{const o=Object.keys(this.selected)[0];o&&(this.selected[o].checked=!1),this.selected={[t.id]:t},this.change()}else delete this.selected[t.id],t.checked=!1,this.$emit("input",Object.keys(this.selected)),this.$emit("update:modelValue",Object.keys(this.selected));this.toggleDuplicateOptions(this.actualOptions,t.id,n),e&&(this.allOptionsIsChecked=this.checkIfOptionsChecked(this.actualOptions))},toggleDuplicateOptions(t,n,e){for(let o of t)o.id===n&&(o.checked=e),o.children&&this.toggleDuplicateOptions(o.children,n,e)},manageAll(){this.allOptionsIsChecked=!this.allOptionsIsChecked,this.traverseTree(this.actualOptions,t=>{this.registerCheck(t,this.allOptionsIsChecked,!1)})},traverseTree(t,n){t.forEach(e=>{n(e),e.children&&e.children.length&&this.traverseTree(e.children,n)})},getArrayOptions(t){let n=[];for(let e of t)n.push(e),e.children&&(n=n.concat(this.getArrayOptions(e.children)));return n},toggleBookmark(t){this.actualBookmarkedOptions[t.id]?delete this.actualBookmarkedOptions[t.id]:this.actualBookmarkedOptions[t.id]=t,this.$emit("toggle-bookmarked-option",t.id),this.filter(this.filterString,this.actualOptions)},setBookmarkedOptions(t){t.forEach(n=>{n.children&&n.children.length?this.setBookmarkedOptions(n.children):this.initBookmarks.includes(n.id)&&(this.actualBookmarkedOptions[n.id]=n)}),this.filter(this.filterString,t)},onClose(){this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0])}},computed:{hasTrigger(){return!!this.$slots.trigger},hasEmptyMessage(){return!!this.$slots.emptyMessage},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbIconButton:ft,IbIcon:Le,IbDropdown:Ln,IbInput:vr,List:mr,"select-option":vs},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)}},ws={class:"tree-select"},ks={key:0,class:"tree-select-empty"},Cs={key:1,class:"tree-select-default-empty tree-select-empty"};function Os(t,n,e,o,a,r){const d=i.resolveComponent("ib-icon"),l=i.resolveComponent("ib-icon-button"),u=i.resolveComponent("select-option"),p=i.resolveComponent("list"),h=i.resolveComponent("ib-input"),f=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock("div",ws,[i.createVNode(f,{disabled:a.isLoading,"is-resizable":e.isResizable,vertical:e.vertical,onClose:r.onClose,ref:"dropdown"},i.createSlots({body:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:i.normalizeStyle({width:"auto",position:"absolute",left:-a.size.left+"px",right:-a.size.right+"px"})},[e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[1]||(n[1]=s=>r.startResizing("left"))},null,32)):i.createCommentVNode("",!0),e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[2]||(n[2]=s=>r.startResizing("right"))},null,32)):i.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(i.openBlock(),i.createBlock(p,{key:2,class:i.normalizeClass({"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualBookmarkedOptions,s=>(i.openBlock(),i.createBlock(u,{key:"bookmark"+s.id,option:s,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128))]),_:1},8,["class"])):i.createCommentVNode("",!0),r.showSearch?(i.openBlock(),i.createBlock(h,{key:3,class:"tree-search","show-icon":!0,value:a.filterString,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[3]||(n[3]=s=>r.filter(s,a.actualOptions))},null,8,["value","placeholder"])):i.createCommentVNode("",!0),i.createVNode(p,{ref:"list",class:i.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[!r.requiredDependencyNotFilled&&!a.countVisibleChildren&&r.hasEmptyMessage?(i.openBlock(),i.createElementBlock("div",ks,[i.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!a.countVisibleChildren?(i.openBlock(),i.createElementBlock("div",Cs,i.toDisplayString(a.actualStrings.emptyTitle),1)):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",{class:"tree-select-empty"},i.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[i.vShow,r.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(i.openBlock(),i.createBlock(u,{key:2,option:{title:t.lang("none","select"),id:null,checked:r.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),r.requiredDependencyNotFilled?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[e.allOptions&&e.isMultiple&&a.countVisibleChildren&&!r.requiredDependencyNotFilled?(i.openBlock(),i.createBlock(u,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:r.visibleOptionsCount<r.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,onCheck:r.manageAll,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","is-toggle","name","is-multiple","onCheck","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualOptions,s=>i.renderSlot(t.$slots,a.actualName,{key:s.value,option:s,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[i.withDirectives(i.createVNode(u,{option:s,"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]),[[i.vShow,s.visible]])])),128))],64))]),_:3},8,["class"])],6)]),_:2},[r.hasTrigger?{name:"trigger",fn:i.withCtx(()=>[i.renderSlot(t.$slots,"trigger",{selectedCount:r.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:i.withCtx(({isOpened:s})=>[i.createElementVNode("div",{role:"combobox",tabindex:"0",class:i.normalizeClass(["tree-choice",{"tree-choice-opened":s,"has-clear-button":!e.showClearButton}]),onClick:n[0]||(n[0]=i.withModifiers(()=>{},["prevent"])),"aria-label":e.ariaLabel,"aria-expanded":s},[e.htmlOptionTitle?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass({placeholder:!r.selectStatus}),innerHTML:r.selectStatus||e.placeholder},null,10,["innerHTML"])):(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass({placeholder:!r.selectStatus})},i.toDisplayString(r.selectStatus||e.placeholder),3))],10,["aria-label","aria-expanded"]),e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(l,{key:0,kind:"ghost",class:"button-clear",onClick:i.withModifiers(r.clearValue,["prevent"]),"help-text":e.clearButtonMessage},{default:i.withCtx(()=>[i.createVNode(d,{name:"close-outline"})]),_:1},8,["onClick","help-text"])),[[i.vShow,Object.keys(a.selected).length]]):i.createCommentVNode("",!0),i.createVNode(d,{name:s?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","onClose"])])}const Ni=_e(_s,[["render",Os]]),n1="",Es={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:dn,IbSelect:Ni}},Ss={class:"report-limit-selector"};function xs(t,n,e,o,a,r){const d=i.resolveComponent("ib-label"),l=i.resolveComponent("ib-select");return i.openBlock(),i.createElementBlock("div",Ss,[i.createVNode(d,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelSelect),1)]),_:1}),i.createVNode(l,{class:"report-limit-selector-select",value:e.value,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,onInput:r.selectItem},null,8,["value","options","onInput"])])}const Ti=_e(Es,[["render",xs]]),r1="",Ns={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},limitValue(){this.currentPage=1}},methods:{changeLimit(t){Number.isInteger(t)&&(this.limitValue=t,this.$emit("set-limit",t))},onInput(t){if(t<1){this.onSelect(1);return}if(t>this.countPagePagination){this.onSelect(this.countPagePagination);return}this.onSelect(Number(t))},onSelect(t){Number.isInteger(t)&&(this.currentPage=t,this.$emit("select",t))},showItem(t){if(this.countPagePagination<=5)return this.indexSpaceLeft=null,this.indexSpaceRight=null,!0;if(t===1||t===this.countPagePagination)return!0;if(this.countPagePagination>=7){if(this.currentPage<=3&&t<=5)return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=null,!0;if(this.currentPage>=this.countPagePagination-2&&t>=this.countPagePagination-4)return this.indexSpaceLeft=null,this.indexSpaceRight=1,!0;if(3<this.currentPage<this.countPagePagination-3&&(t===this.currentPage+1||t===this.currentPage-1||t===this.currentPage))return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=1,!0}else return!0;return!1}},computed:{setCountOfRows(){return this.currentPage===1||this.countPagePagination===1?"1 - "+(this.countPagePagination>1?this.limitValue:this.countRows):this.countPagePagination===this.currentPage?(this.currentPage-1)*this.limitValue+" - "+this.countRows:(this.currentPage-1)*this.limitValue+1+" - "+this.currentPage*this.limitValue},countPagePagination(){return Math.ceil(this.countRows/this.limitValue)}},components:{IbIconButton:ft,IbIcon:Le,IbInput:vr,IbLabel:dn,IbLimitSelector:Ti,IbTooltip:gt}},Ts={class:"report-controls"},As={class:"repot-pagination"},Ds={class:"pagination-input"},Is={class:"row-count"},Ps={class:"pagination-wrapper"},Ms=["onClick"];function Bs(t,n,e,o,a,r){const d=i.resolveComponent("ib-limit-selector"),l=i.resolveComponent("ib-label"),u=i.resolveComponent("ib-input"),p=i.resolveComponent("ib-icon"),h=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",Ts,[i.createVNode(d,{onSelect:r.changeLimit,value:a.limitValue,"label-select":e.labelSelect},null,8,["onSelect","value","label-select"]),i.createElementVNode("div",As,[e.showPaginationInput?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(l,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelInput),1)]),_:1}),i.createElementVNode("div",Ds,[i.createVNode(u,{type:"number",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",Is,i.toDisplayString(r.setCountOfRows+" of "+e.countRows),1),i.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-prev",disabled:a.currentPage===1,onClick:n[0]||(n[0]=s=>r.onSelect(a.currentPage-1))},{default:i.withCtx(()=>[i.createVNode(p,{name:"chevron-back-outline"}),e.tooltipTextPrev?(i.openBlock(),i.createBlock(h,{key:0,text:e.tooltipTextPrev},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"]),i.createElementVNode("ul",Ps,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.countPagePagination,(s,c)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:c,class:i.normalizeClass(["pagination-item",{active:c+1===a.currentPage,"dots-left":a.indexSpaceLeft===c+1,"dots-right":a.indexSpaceRight===c+1}]),onClick:_=>r.onSelect(c+1)},[i.createElementVNode("button",null,i.toDisplayString(c+1),1)],10,Ms)),[[i.vShow,r.showItem(c+1)]])),128))]),i.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-next",disabled:a.currentPage===r.countPagePagination,onClick:n[1]||(n[1]=s=>r.onSelect(a.currentPage+1))},{default:i.withCtx(()=>[i.createVNode(p,{name:"chevron-forward-outline"}),e.tooltipTextNext?(i.openBlock(),i.createBlock(h,{key:0,text:e.tooltipTextNext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Ls=_e(Ns,[["render",Bs]]),Vn={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELED:"canceled"},i1="",Rs={props:{states:{type:String,default:Vn.PROGRESS},progress:{type:[String,Number],default:0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===Vn.SUCCESS?"checkmark-circle":this.states===Vn.FAILED||this.states===Vn.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Ai=t=>(i.pushScopeId("data-v-abce14de"),t=t(),i.popScopeId(),t),js={class:"ib-progress-bar-wrapper"},Vs=[Ai(()=>i.createElementVNode("div",{class:"gradient"},null,-1))],qs=Ai(()=>i.createElementVNode("div",null,null,-1));function Fs(t,n,e,o,a,r){const d=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",js,[i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",{class:"progress",style:i.normalizeStyle({width:e.progress+"%"})},Vs,4),qs],2),i.withDirectives(i.createVNode(d,{class:"status-icon",name:r.iconName},null,8,["name"]),[[i.vShow,r.iconName.length]])])}const Hs=_e(Rs,[["render",Fs],["__scopeId","data-v-abce14de"]]),zs={new:`<svg width="9" height="9" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ *****************************************************/(function(t,n){(function(e,o){t.exports=o()})(qe,function(){class e{constructor(r,d=!0,l=[],u=5e3){this.ctx=r,this.iframes=d,this.exclude=l,this.iframesTimeout=u}static matches(r,d){const l=typeof d=="string"?[d]:d,u=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector;if(u){let p=!1;return l.every(h=>!u.call(r,h)||(p=!0,!1)),p}return!1}getContexts(){let r=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(d=>{const l=r.filter(u=>u.contains(d)).length>0;r.indexOf(d)!==-1||l||r.push(d)}),r}getIframeContents(r,d,l=()=>{}){let u;try{const p=r.contentWindow;if(u=p.document,!p||!u)throw new Error("iframe inaccessible")}catch{l()}u&&d(u)}isIframeBlank(r){const d="about:blank",l=r.getAttribute("src").trim();return r.contentWindow.location.href===d&&l!==d&&l}observeIframeLoad(r,d,l){let u=!1,p=null;const h=()=>{if(!u){u=!0,clearTimeout(p);try{this.isIframeBlank(r)||(r.removeEventListener("load",h),this.getIframeContents(r,d,l))}catch{l()}}};r.addEventListener("load",h),p=setTimeout(h,this.iframesTimeout)}onIframeReady(r,d,l){try{r.contentWindow.document.readyState==="complete"?this.isIframeBlank(r)?this.observeIframeLoad(r,d,l):this.getIframeContents(r,d,l):this.observeIframeLoad(r,d,l)}catch{l()}}waitForIframes(r,d){let l=0;this.forEachIframe(r,()=>!0,u=>{l++,this.waitForIframes(u.querySelector("html"),()=>{--l||d()})},u=>{u||d()})}forEachIframe(r,d,l,u=()=>{}){let p=r.querySelectorAll("iframe"),h=p.length,f=0;p=Array.prototype.slice.call(p);const s=()=>{--h<=0&&u(f)};h||s(),p.forEach(c=>{e.matches(c,this.exclude)?s():this.onIframeReady(c,_=>{d(c)&&(f++,l(_)),s()},s)})}createIterator(r,d,l){return document.createNodeIterator(r,d,l,!1)}createInstanceOnIframe(r){return new e(r.querySelector("html"),this.iframes)}compareNodeIframe(r,d,l){const u=r.compareDocumentPosition(l),p=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&p&&(d===null||d.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(r){const d=r.previousNode();return{prevNode:d,node:(d===null||r.nextNode())&&r.nextNode()}}checkIframeFilter(r,d,l,u){let p=!1,h=!1;return u.forEach((f,s)=>{f.val===l&&(p=s,h=f.handled)}),this.compareNodeIframe(r,d,l)?(p!==!1||h?p===!1||h||(u[p].handled=!0):u.push({val:l,handled:!0}),!0):(p===!1&&u.push({val:l,handled:!1}),!1)}handleOpenIframes(r,d,l,u){r.forEach(p=>{p.handled||this.getIframeContents(p.val,h=>{this.createInstanceOnIframe(h).forEachNode(d,l,u)})})}iterateThroughNodes(r,d,l,u,p){const h=this.createIterator(d,r,u);let f,s,c=[],_=[],v=()=>({prevNode:s,node:f}=this.getIteratorNode(h),f);for(;v();)this.iframes&&this.forEachIframe(d,b=>this.checkIframeFilter(f,s,b,c),b=>{this.createInstanceOnIframe(b).forEachNode(r,g=>_.push(g),u)}),_.push(f);_.forEach(b=>{l(b)}),this.iframes&&this.handleOpenIframes(c,r,l,u),p()}forEachNode(r,d,l,u=()=>{}){const p=this.getContexts();let h=p.length;h||u(),p.forEach(f=>{const s=()=>{this.iterateThroughNodes(r,f,d,l,()=>{--h<=0&&u()})};this.iframes?this.waitForIframes(f,s):s()})}}class o{constructor(r){this.ctx=r,this.ie=!1;const d=window.navigator.userAgent;(d.indexOf("MSIE")>-1||d.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(r){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},r)}get opt(){return this._opt}get iterator(){return new e(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(r,d="debug"){const l=this.opt.log;this.opt.debug&&typeof l=="object"&&typeof l[d]=="function"&&l[d](`mark.js: ${r}`)}escapeStr(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(r){return this.opt.wildcards!=="disabled"&&(r=this.setupWildcardsRegExp(r)),r=this.escapeStr(r),Object.keys(this.opt.synonyms).length&&(r=this.createSynonymsRegExp(r)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),this.opt.diacritics&&(r=this.createDiacriticsRegExp(r)),r=this.createMergedBlanksRegExp(r),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.createJoinersRegExp(r)),this.opt.wildcards!=="disabled"&&(r=this.createWildcardsRegExp(r)),r=this.createAccuracyRegExp(r)}createSynonymsRegExp(r){const d=this.opt.synonyms,l=this.opt.caseSensitive?"":"i",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let p in d)if(d.hasOwnProperty(p)){const h=d[p],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p),s=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(h):this.escapeStr(h);f!==""&&s!==""&&(r=r.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(s)})`,`gm${l}`),u+`(${this.processSynomyms(f)}|${this.processSynomyms(s)})`+u))}return r}processSynomyms(r){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(r=this.setupIgnoreJoinersRegExp(r)),r}setupWildcardsRegExp(r){return(r=r.replace(/(?:\\)*\?/g,d=>d.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,d=>d.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(r){let d=this.opt.wildcards==="withSpaces";return r.replace(/\u0001/g,d?"[\\S\\s]?":"\\S?").replace(/\u0002/g,d?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(r){return r.replace(/[^(|)\\]/g,(d,l,u)=>{let p=u.charAt(l+1);return/[(|)\\]/.test(p)||p===""?d:d+"\0"})}createJoinersRegExp(r){let d=[];const l=this.opt.ignorePunctuation;return Array.isArray(l)&&l.length&&d.push(this.escapeStr(l.join(""))),this.opt.ignoreJoiners&&d.push("\\u00ad\\u200b\\u200c\\u200d"),d.length?r.split(/\u0000+/).join(`[${d.join("")}]*`):r}createDiacriticsRegExp(r){const d=this.opt.caseSensitive?"":"i",l=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let u=[];return r.split("").forEach(p=>{l.every(h=>{if(h.indexOf(p)!==-1){if(u.indexOf(h)>-1)return!1;r=r.replace(new RegExp(`[${h}]`,`gm${d}`),`[${h}]`),u.push(h)}return!0})}),r}createMergedBlanksRegExp(r){return r.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(r){const d="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let l=this.opt.accuracy,u=typeof l=="string"?l:l.value,p=typeof l=="string"?[]:l.limiters,h="";switch(p.forEach(f=>{h+=`|${this.escapeStr(f)}`}),u){case"partially":default:return`()(${r})`;case"complementary":return`()([^${h="\\s"+(h||this.escapeStr(d))}]*${r}[^${h}]*)`;case"exactly":return`(^|\\s${h})(${r})(?=$|\\s${h})`}}getSeparatedKeywords(r){let d=[];return r.forEach(l=>{this.opt.separateWordSearch?l.split(" ").forEach(u=>{u.trim()&&d.indexOf(u)===-1&&d.push(u)}):l.trim()&&d.indexOf(l)===-1&&d.push(l)}),{keywords:d.sort((l,u)=>u.length-l.length),length:d.length}}isNumeric(r){return Number(parseFloat(r))==r}checkRanges(r){if(!Array.isArray(r)||Object.prototype.toString.call(r[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(r),[];const d=[];let l=0;return r.sort((u,p)=>u.start-p.start).forEach(u=>{let{start:p,end:h,valid:f}=this.callNoMatchOnInvalidRanges(u,l);f&&(u.start=p,u.length=h-p,d.push(u),l=h)}),d}callNoMatchOnInvalidRanges(r,d){let l,u,p=!1;return r&&r.start!==void 0?(u=(l=parseInt(r.start,10))+parseInt(r.length,10),this.isNumeric(r.start)&&this.isNumeric(r.length)&&u-d>0&&u-l>0?p=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(r)}`),this.opt.noMatch(r))):(this.log(`Ignoring invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)),{start:l,end:u,valid:p}}checkWhitespaceRanges(r,d,l){let u,p=!0,h=l.length,f=d-h,s=parseInt(r.start,10)-f;return(u=(s=s>h?h:s)+parseInt(r.length,10))>h&&(u=h,this.log(`End range automatically set to the max value of ${h}`)),s<0||u-s<0||s>h||u>h?(p=!1,this.log(`Invalid range: ${JSON.stringify(r)}`),this.opt.noMatch(r)):l.substring(s,u).replace(/\s+/g,"")===""&&(p=!1,this.log("Skipping whitespace only range: "+JSON.stringify(r)),this.opt.noMatch(r)),{start:s,end:u,valid:p}}getTextNodes(r){let d="",l=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{l.push({start:d.length,end:(d+=u.textContent).length,node:u})},u=>this.matchesExclude(u.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{r({value:d,nodes:l})})}matchesExclude(r){return e.matches(r,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(r,d,l){const u=this.opt.element?this.opt.element:"mark",p=r.splitText(d),h=p.splitText(l-d);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=p.textContent,p.parentNode.replaceChild(f,p),h}wrapRangeInMappedTextNode(r,d,l,u,p){r.nodes.every((h,f)=>{const s=r.nodes[f+1];if(s===void 0||s.start>d){if(!u(h.node))return!1;const c=d-h.start,_=(l>h.end?h.end:l)-h.start,v=r.value.substr(0,h.start),b=r.value.substr(_+h.start);if(h.node=this.wrapRangeInTextNode(h.node,c,_),r.value=v+b,r.nodes.forEach((g,y)=>{y>=f&&(r.nodes[y].start>0&&y!==f&&(r.nodes[y].start-=_),r.nodes[y].end-=_)}),l-=_,p(h.node.previousSibling,h.start),!(l>h.end))return!1;d=h.end}return!0})}wrapMatches(r,d,l,u,p){const h=d===0?0:d+1;this.getTextNodes(f=>{f.nodes.forEach(s=>{let c;for(s=s.node;(c=r.exec(s.textContent))!==null&&c[h]!=="";){if(!l(c[h],s))continue;let _=c.index;if(h!==0)for(let v=1;v<h;v++)_+=c[v].length;s=this.wrapRangeInTextNode(s,_,_+c[h].length),u(s.previousSibling),r.lastIndex=0}}),p()})}wrapMatchesAcrossElements(r,d,l,u,p){const h=d===0?0:d+1;this.getTextNodes(f=>{let s;for(;(s=r.exec(f.value))!==null&&s[h]!=="";){let c=s.index;if(h!==0)for(let v=1;v<h;v++)c+=s[v].length;const _=c+s[h].length;this.wrapRangeInMappedTextNode(f,c,_,v=>l(s[h],v),(v,b)=>{r.lastIndex=b,u(v)})}p()})}wrapRangeFromIndex(r,d,l,u){this.getTextNodes(p=>{const h=p.value.length;r.forEach((f,s)=>{let{start:c,end:_,valid:v}=this.checkWhitespaceRanges(f,h,p.value);v&&this.wrapRangeInMappedTextNode(p,c,_,b=>d(b,f,p.value.substring(c,_),s),b=>{l(b,f)})}),u()})}unwrapMatches(r){const d=r.parentNode;let l=document.createDocumentFragment();for(;r.firstChild;)l.appendChild(r.removeChild(r.firstChild));d.replaceChild(l,r),this.ie?this.normalizeTextNode(d):d.normalize()}normalizeTextNode(r){if(r){if(r.nodeType===3)for(;r.nextSibling&&r.nextSibling.nodeType===3;)r.nodeValue+=r.nextSibling.nodeValue,r.parentNode.removeChild(r.nextSibling);else this.normalizeTextNode(r.firstChild);this.normalizeTextNode(r.nextSibling)}}markRegExp(r,d){this.opt=d,this.log(`Searching with expression "${r}"`);let l=0,u="wrapMatches";const p=h=>{l++,this.opt.each(h)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](r,this.opt.ignoreGroups,(h,f)=>this.opt.filter(f,h,l),p,()=>{l===0&&this.opt.noMatch(r),this.opt.done(l)})}mark(r,d){this.opt=d;let l=0,u="wrapMatches";const{keywords:p,length:h}=this.getSeparatedKeywords(typeof r=="string"?[r]:r),f=this.opt.caseSensitive?"":"i",s=c=>{let _=new RegExp(this.createRegExp(c),`gm${f}`),v=0;this.log(`Searching with expression "${_}"`),this[u](_,1,(b,g)=>this.opt.filter(g,c,l,v),b=>{v++,l++,this.opt.each(b)},()=>{v===0&&this.opt.noMatch(c),p[h-1]===c?this.opt.done(l):s(p[p.indexOf(c)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),h===0?this.opt.done(l):s(p[0])}markRanges(r,d){this.opt=d;let l=0,u=this.checkRanges(r);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(p,h,f,s)=>this.opt.filter(p,h,f,s),(p,h)=>{l++,this.opt.each(p,h)},()=>{this.opt.done(l)})):this.opt.done(l)}unmark(r){this.opt=r;let d=this.opt.element?this.opt.element:"*";d+="[data-markjs]",this.opt.className&&(d+=`.${this.opt.className}`),this.log(`Removal selector "${d}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,l=>{this.unwrapMatches(l)},l=>{const u=e.matches(l,d),p=this.matchesExclude(l);return!u||p?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const r=new o(a);return this.mark=(d,l)=>(r.mark(d,l),this),this.markRegExp=(d,l)=>(r.markRegExp(d,l),this),this.markRanges=(d,l)=>(r.markRanges(d,l),this),this.unmark=d=>(r.unmark(d),this),this}})})(xi);var bs=xi.exports;const $s=jn(bs),t1="",_s={name:"IbTreeSelect",props:{placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return It()}},options:{default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return It()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1}},watch:{value(t){this.val=t,this.setPreparedValues()},modelValue(t){this.val=t,this.setPreparedValues()},val(t){this.watchClearValue&&(!t||Array.isArray(t)&&!t.length)&&this.setPreparedValues(this.actualOptions).then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},options(){let t=!0;if(typeof this.options=="function")t=!1;else{const n=[],e=this.options;Array.prototype.forEach.call(e,o=>{o.id!==void 0&&n.push(o.id)}),t=JSON.stringify(n)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=n}(this.isInitialized&&!t||this.isWatching)&&this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){console.log(lang,typeof lang,"lang"),this.marker=new $s(this.$refs.list.$el),this.registerDependency(),this.$globalEvents.$on("select:refresh",()=>{this.setPreparedValues()}),document.addEventListener("mousemove",this.onResize),document.addEventListener("mouseup",this.endResizing)},data(){return this.defaultFilter=t=>{this.marker.unmark();const n=this.filterString.toLowerCase().trim();this.countVisibleChildren=this.filterFunc.call(this,t,n),n&&this.marker.mark(n)},{val:this.modelValue?this.modelValue:this.value,size:{left:this.initialSize&&this.initialSize.left||0,right:this.initialSize&&this.initialSize.right||0},resizingProp:null,isInitialized:!1,optionsIdsWatch:[],isLoading:!1,actualName:this.isMultiple?this.name+"[]":this.name,filterString:"",actualOptions:[],actualBookmarkedOptions:{},selected:[],allOptionsIsChecked:!0,countVisibleChildren:0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,actualStrings:{searchPlaceholder:"Search placeholder",emptyTitle:"Empty title",selectAllOptions:"All Options",allSelected:"All selected",loading:"loading",selectedCount:"Selected {selected} of {all} items",buttonTitle:"Button title",requiredDependencyNotFilled:"Required dependency are not filled",...this.strings},dependencyValue:null}},methods:{startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",{search:this.filterString}),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.options;return this.alphabetSort&&(n=n.sort((e,o)=>e.title.toLowerCase().localeCompare(o.title.toLowerCase()))),this.prepare(n).then(([e,o])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.countVisibleChildren=e.length,this.isInitialized=!0,this.selected=o,this.setBookmarkedOptions(e)})},clear(){this.actualOptions=[],this.allOptionsIsChecked=!1,this.countVisibleChildren=0,this.selected=[],this.$emit("update:modelValue",null)},clearValue(){this.clear(),this.setPreparedValues()},prepare(t){return new Promise(n=>{const e={},o=[];let a=Promise.resolve();typeof t=="function"?(this.isLoading=!0,this.dependency&&(t=t.bind(null,this.dependencyValue)),a=a.then(t)):a=a.then(()=>t),a.then(r=>(this.isLoading=!1,r.forEach(d=>{d.initiallyVisible=typeof d.visible>"u"?!0:d.visible,d.visible=d.initiallyVisible,d.isDisabled=!1,d.checked=this.isMultiple?this.val!==null&&this.val.findIndex(l=>d.id==l)>-1:this.val!==null&&this.val==d.id,d.checked&&(!this.onlyEndNodes||!d.children)&&(e[d.id]=d),d.children&&(this.hasTreeChildren=!0,d.isChildrenVisible=!1),o.push(new Promise(l=>{d.children?this.prepare(d.children).then(([u,p])=>{d.children=u,Object.assign(e,p),l(d)}):l(d)}))}),Promise.all(o).then(d=>{n([d,e])}))).catch(r=>{throw this.isLoading=!1,r})})},filterFunc(t,n){let e=0;return t.forEach(o=>{let a=o.initiallyVisible&&o.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[o.id];if(o.children&&o.children.length){let r=this.filterFunc(o.children,n);e+=r,r&&(o.isChildrenVisible=!!n||!!Object.keys(this.actualBookmarkedOptions).length,o.isDisabled=r<o.children.length&&!this.isBookmarkable),a?r||(a=!1):a=!!r}o.visible=a,a&&e++}),e},submit(){this.change();const t=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":submit",{values:t,filter:this.filterId}),this.$emit("submit")},change(){const t=Object.keys(this.selected);this.isMultiple?(this.$emit("update:modelValue",t),this.$emit("input",t)):(this.$emit("update:modelValue",t[0]),this.$emit("input",t[0])),this.$globalEvents.$emit("select-"+this.filterId+":update",{values:t,filter:this.filterId}),this.$refs.dropdown.close()},checkIfOptionsChecked(t){return t.every(n=>n.checked)},registerCheck(t,n,e){if(n)if(t.checked=!0,this.isMultiple)this.onlyEndNodes&&t.children&&t.children.length||(this.selected[t.id]=t,this.$emit("input",Object.keys(this.selected)),this.$emit("update:modelValue",Object.keys(this.selected)));else{const o=Object.keys(this.selected)[0];o&&(this.selected[o].checked=!1),this.selected={[t.id]:t},this.change()}else delete this.selected[t.id],t.checked=!1,this.$emit("input",Object.keys(this.selected)),this.$emit("update:modelValue",Object.keys(this.selected));this.toggleDuplicateOptions(this.actualOptions,t.id,n),e&&(this.allOptionsIsChecked=this.checkIfOptionsChecked(this.actualOptions))},toggleDuplicateOptions(t,n,e){for(let o of t)o.id===n&&(o.checked=e),o.children&&this.toggleDuplicateOptions(o.children,n,e)},manageAll(){this.allOptionsIsChecked=!this.allOptionsIsChecked,this.traverseTree(this.actualOptions,t=>{this.registerCheck(t,this.allOptionsIsChecked,!1)})},traverseTree(t,n){t.forEach(e=>{n(e),e.children&&e.children.length&&this.traverseTree(e.children,n)})},getArrayOptions(t){let n=[];for(let e of t)n.push(e),e.children&&(n=n.concat(this.getArrayOptions(e.children)));return n},toggleBookmark(t){this.actualBookmarkedOptions[t.id]?delete this.actualBookmarkedOptions[t.id]:this.actualBookmarkedOptions[t.id]=t,this.$emit("toggle-bookmarked-option",t.id),this.filter(this.filterString,this.actualOptions)},setBookmarkedOptions(t){t.forEach(n=>{n.children&&n.children.length?this.setBookmarkedOptions(n.children):this.initBookmarks.includes(n.id)&&(this.actualBookmarkedOptions[n.id]=n)}),this.filter(this.filterString,t)},onClose(){this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0])}},computed:{hasTrigger(){return!!this.$slots.trigger},hasEmptyMessage(){return!!this.$slots.emptyMessage},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbIconButton:ft,IbIcon:Le,IbDropdown:Ln,IbInput:vr,List:mr,"select-option":vs},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)}},ws={class:"tree-select"},ks={key:0,class:"tree-select-empty"},Cs={key:1,class:"tree-select-default-empty tree-select-empty"};function Os(t,n,e,o,a,r){const d=i.resolveComponent("ib-icon"),l=i.resolveComponent("ib-icon-button"),u=i.resolveComponent("select-option"),p=i.resolveComponent("list"),h=i.resolveComponent("ib-input"),f=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock("div",ws,[i.createVNode(f,{disabled:a.isLoading,"is-resizable":e.isResizable,vertical:e.vertical,onClose:r.onClose,ref:"dropdown"},i.createSlots({body:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:i.normalizeStyle({width:"auto",position:"absolute",left:-a.size.left+"px",right:-a.size.right+"px"})},[e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[1]||(n[1]=s=>r.startResizing("left"))},null,32)):i.createCommentVNode("",!0),e.isResizable?(i.openBlock(),i.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[2]||(n[2]=s=>r.startResizing("right"))},null,32)):i.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(i.openBlock(),i.createBlock(p,{key:2,class:i.normalizeClass({"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualBookmarkedOptions,s=>(i.openBlock(),i.createBlock(u,{key:"bookmark"+s.id,option:s,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128))]),_:1},8,["class"])):i.createCommentVNode("",!0),r.showSearch?(i.openBlock(),i.createBlock(h,{key:3,class:"tree-search","show-icon":!0,value:a.filterString,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[3]||(n[3]=s=>r.filter(s,a.actualOptions))},null,8,["value","placeholder"])):i.createCommentVNode("",!0),i.createVNode(p,{ref:"list",class:i.normalizeClass({"tree-select-list":!0,"has-hierarchy":r.hasHierarchy})},{default:i.withCtx(()=>[!r.requiredDependencyNotFilled&&!a.countVisibleChildren&&r.hasEmptyMessage?(i.openBlock(),i.createElementBlock("div",ks,[i.renderSlot(t.$slots,"emptyMessage")])):!r.requiredDependencyNotFilled&&!a.countVisibleChildren?(i.openBlock(),i.createElementBlock("div",Cs,i.toDisplayString(a.actualStrings.emptyTitle),1)):i.createCommentVNode("",!0),i.withDirectives(i.createElementVNode("div",{class:"tree-select-empty"},i.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[i.vShow,r.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(i.openBlock(),i.createBlock(u,{key:2,option:{title:t.lang("none","select"),id:null,checked:r.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),r.requiredDependencyNotFilled?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:3},[e.allOptions&&e.isMultiple&&a.countVisibleChildren&&!r.requiredDependencyNotFilled?(i.openBlock(),i.createBlock(u,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:r.visibleOptionsCount<r.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,onCheck:r.manageAll,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","is-toggle","name","is-multiple","onCheck","uid","only-end-nodes","show-input"])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.actualOptions,s=>i.renderSlot(t.$slots,a.actualName,{key:s.value,option:s,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[i.withDirectives(i.createVNode(u,{option:s,"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,onCheck:r.registerCheck,onToggleBookmark:r.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]),[[i.vShow,s.visible]])])),128))],64))]),_:3},8,["class"])],6)]),_:2},[r.hasTrigger?{name:"trigger",fn:i.withCtx(()=>[i.renderSlot(t.$slots,"trigger",{selectedCount:r.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:i.withCtx(({isOpened:s})=>[i.createElementVNode("div",{role:"combobox",tabindex:"0",class:i.normalizeClass(["tree-choice",{"tree-choice-opened":s,"has-clear-button":!e.showClearButton}]),onClick:n[0]||(n[0]=i.withModifiers(()=>{},["prevent"])),"aria-label":e.ariaLabel,"aria-expanded":s},[e.htmlOptionTitle?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass({placeholder:!r.selectStatus}),innerHTML:r.selectStatus||e.placeholder},null,10,["innerHTML"])):(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass({placeholder:!r.selectStatus})},i.toDisplayString(r.selectStatus||e.placeholder),3))],10,["aria-label","aria-expanded"]),e.showClearButton?i.withDirectives((i.openBlock(),i.createBlock(l,{key:0,kind:"ghost",class:"button-clear",onClick:i.withModifiers(r.clearValue,["prevent"]),"help-text":e.clearButtonMessage},{default:i.withCtx(()=>[i.createVNode(d,{name:"close-outline"})]),_:1},8,["onClick","help-text"])),[[i.vShow,Object.keys(a.selected).length]]):i.createCommentVNode("",!0),i.createVNode(d,{name:s?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","onClose"])])}const Ni=_e(_s,[["render",Os]]),n1="",Es={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:dn,IbSelect:Ni}},Ss={class:"report-limit-selector"};function xs(t,n,e,o,a,r){const d=i.resolveComponent("ib-label"),l=i.resolveComponent("ib-select");return i.openBlock(),i.createElementBlock("div",Ss,[i.createVNode(d,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelSelect),1)]),_:1}),i.createVNode(l,{class:"report-limit-selector-select",value:e.value,options:r.prepareOptions,"is-multiple":!1,"show-clear-button":!1,onInput:r.selectItem},null,8,["value","options","onInput"])])}const Ti=_e(Es,[["render",xs]]),r1="",Ns={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},limitValue(){this.currentPage=1}},methods:{changeLimit(t){Number.isInteger(t)&&(this.limitValue=t,this.$emit("set-limit",t))},onInput(t){if(t<1){this.onSelect(1);return}if(t>this.countPagePagination){this.onSelect(this.countPagePagination);return}this.onSelect(Number(t))},onSelect(t){Number.isInteger(t)&&(this.currentPage=t,this.$emit("select",t))},showItem(t){if(this.countPagePagination<=5)return this.indexSpaceLeft=null,this.indexSpaceRight=null,!0;if(t===1||t===this.countPagePagination)return!0;if(this.countPagePagination>=7){if(this.currentPage<=3&&t<=5)return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=null,!0;if(this.currentPage>=this.countPagePagination-2&&t>=this.countPagePagination-4)return this.indexSpaceLeft=null,this.indexSpaceRight=1,!0;if(3<this.currentPage<this.countPagePagination-3&&(t===this.currentPage+1||t===this.currentPage-1||t===this.currentPage))return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=1,!0}else return!0;return!1}},computed:{setCountOfRows(){return this.currentPage===1||this.countPagePagination===1?"1 - "+(this.countPagePagination>1?this.limitValue:this.countRows):this.countPagePagination===this.currentPage?(this.currentPage-1)*this.limitValue+" - "+this.countRows:(this.currentPage-1)*this.limitValue+1+" - "+this.currentPage*this.limitValue},countPagePagination(){return Math.ceil(this.countRows/this.limitValue)}},components:{IbIconButton:ft,IbIcon:Le,IbInput:vr,IbLabel:dn,IbLimitSelector:Ti,IbTooltip:gt}},Ts={class:"report-controls"},As={class:"repot-pagination"},Ds={class:"pagination-input"},Is={class:"row-count"},Ps={class:"pagination-wrapper"},Ms=["onClick"];function Bs(t,n,e,o,a,r){const d=i.resolveComponent("ib-limit-selector"),l=i.resolveComponent("ib-label"),u=i.resolveComponent("ib-input"),p=i.resolveComponent("ib-icon"),h=i.resolveComponent("ib-tooltip"),f=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",Ts,[i.createVNode(d,{onSelect:r.changeLimit,value:a.limitValue,"label-select":e.labelSelect},null,8,["onSelect","value","label-select"]),i.createElementVNode("div",As,[e.showPaginationInput?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(l,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.labelInput),1)]),_:1}),i.createElementVNode("div",Ds,[i.createVNode(u,{type:"number",debounce:500,onInput:r.onInput},null,8,["onInput"])])],64)):i.createCommentVNode("",!0),i.createElementVNode("div",Is,i.toDisplayString(r.setCountOfRows+" of "+e.countRows),1),i.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-prev",disabled:a.currentPage===1,onClick:n[0]||(n[0]=s=>r.onSelect(a.currentPage-1))},{default:i.withCtx(()=>[i.createVNode(p,{name:"chevron-back-outline"}),e.tooltipTextPrev?(i.openBlock(),i.createBlock(h,{key:0,text:e.tooltipTextPrev},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"]),i.createElementVNode("ul",Ps,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.countPagePagination,(s,c)=>i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:c,class:i.normalizeClass(["pagination-item",{active:c+1===a.currentPage,"dots-left":a.indexSpaceLeft===c+1,"dots-right":a.indexSpaceRight===c+1}]),onClick:_=>r.onSelect(c+1)},[i.createElementVNode("button",null,i.toDisplayString(c+1),1)],10,Ms)),[[i.vShow,r.showItem(c+1)]])),128))]),i.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-next",disabled:a.currentPage===r.countPagePagination,onClick:n[1]||(n[1]=s=>r.onSelect(a.currentPage+1))},{default:i.withCtx(()=>[i.createVNode(p,{name:"chevron-forward-outline"}),e.tooltipTextNext?(i.openBlock(),i.createBlock(h,{key:0,text:e.tooltipTextNext},null,8,["text"])):i.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Ls=_e(Ns,[["render",Bs]]),Vn={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELED:"canceled"},i1="",Rs={props:{states:{type:String,default:Vn.PROGRESS},progress:{type:[String,Number],default:0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===Vn.SUCCESS?"checkmark-circle":this.states===Vn.FAILED||this.states===Vn.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Ai=t=>(i.pushScopeId("data-v-abce14de"),t=t(),i.popScopeId(),t),js={class:"ib-progress-bar-wrapper"},Vs=[Ai(()=>i.createElementVNode("div",{class:"gradient"},null,-1))],qs=Ai(()=>i.createElementVNode("div",null,null,-1));function Fs(t,n,e,o,a,r){const d=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",js,[i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",{class:"progress",style:i.normalizeStyle({width:e.progress+"%"})},Vs,4),qs],2),i.withDirectives(i.createVNode(d,{class:"status-icon",name:r.iconName},null,8,["name"]),[[i.vShow,r.iconName.length]])])}const Hs=_e(Rs,[["render",Fs],["__scopeId","data-v-abce14de"]]),zs={new:`<svg width="9" height="9" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <circle cx="4.5" cy="4.5" r="4" fill="#0369E8"/>
8
8
  </svg>
9
9
  `,success:`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
package/src/App.vue CHANGED
@@ -1,32 +1,90 @@
1
1
  <template>
2
- test
3
- <ib-panel>
4
- <template #title>
5
- Some title
6
- </template>
7
- <template #head-content>Some long long description</template>
8
- <template #body>
9
- <p>tests</p>
10
- <p>tests</p>
11
- <p>tests</p>
12
- <p>tests</p>
13
- <p>tests</p>
14
- <p>tests</p>
15
- <p>tests</p>
16
- <p>tests</p>
17
- <p>tests</p>
18
- </template>
19
- </ib-panel>
2
+ <ib-select
3
+ :options="connections"
4
+ :is-required="true"
5
+ :is-multiple="false"
6
+ :show-clear-button="false"
7
+ >
8
+ </ib-select>
9
+
10
+ <ib-select
11
+ :options="roles"
12
+ :is-required="true"
13
+ :is-multiple="false"
14
+ :show-clear-button="false"
15
+ :model-value="val"
16
+ >
17
+ </ib-select>
20
18
  </template>
21
19
 
22
20
  <script>
23
- // import IbPanel from "./components/Panel/Panel.vue"
24
- import { IbPanel } from "./index";
21
+ import IbSelect from "./components/TreeSelect/Select.vue";
22
+
25
23
  export default {
24
+ data() {
25
+ return {
26
+ val: 1,
27
+ connections: [
28
+ {
29
+ id: 5,
30
+ title: "Blackboard Demo",
31
+ lms_connection_type: 3,
32
+ initiallyVisible: true,
33
+ visible: true,
34
+ isDisabled: false,
35
+ checked: false,
36
+ },
37
+ {
38
+ id: 3,
39
+ title: "Ilias",
40
+ lms_connection_type: 16,
41
+ initiallyVisible: true,
42
+ visible: true,
43
+ isDisabled: false,
44
+ checked: true,
45
+ },
46
+ {
47
+ id: 9,
48
+ title: "Ilias Don't Delete Pol",
49
+ lms_connection_type: 16,
50
+ initiallyVisible: true,
51
+ visible: true,
52
+ isDisabled: false,
53
+ checked: false,
54
+ },
55
+ {
56
+ id: 10,
57
+ title: "Sakai Demo",
58
+ lms_connection_type: 18,
59
+ initiallyVisible: true,
60
+ visible: true,
61
+ isDisabled: false,
62
+ checked: false,
63
+ },
64
+ ],
65
+ roles: [
66
+ {
67
+ id: 1,
68
+ title: "test role",
69
+ initiallyVisible: true,
70
+ visible: true,
71
+ isDisabled: false,
72
+ checked: false,
73
+ },
74
+ {
75
+ id: 2,
76
+ title: "testset",
77
+ initiallyVisible: true,
78
+ visible: true,
79
+ isDisabled: false,
80
+ checked: false,
81
+ },
82
+ ],
83
+ };
84
+ },
26
85
  components: {
27
- IbPanel,
86
+ IbSelect,
28
87
  },
29
88
  };
30
89
  </script>
31
- <style lang="scss">
32
- </style>
90
+
@@ -234,6 +234,13 @@ import List from "../List.vue";
234
234
  export default {
235
235
  name: "IbTreeSelect",
236
236
  props: {
237
+ // lang: {
238
+ // type: Function,
239
+ // default: (key) => key,
240
+ // },
241
+ // LANG_COMPONENTS: {
242
+ // type: Object,
243
+ // },
237
244
  placeholder: {
238
245
  type: String,
239
246
  default: "",
@@ -434,6 +441,7 @@ export default {
434
441
  },
435
442
  },
436
443
  mounted() {
444
+ console.log(lang, typeof(lang), 'lang')
437
445
  this.marker = new Mark(this.$refs.list.$el);
438
446
 
439
447
  this.registerDependency();
@@ -482,43 +490,46 @@ export default {
482
490
  actualStrings: {
483
491
  ...{
484
492
  searchPlaceholder: "Search placeholder",
485
- // this.lang(
493
+ // searchPlaceholder: this.lang(
486
494
  // this.searchPlaceholderText.length
487
495
  // ? this.searchPlaceholderText
488
496
  // : "search_placeholder",
489
- // LANG_COMPONENTS.COMPONENT_SELECT
497
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
490
498
  // ),
491
499
  emptyTitle: "Empty title",
492
- // this.lang(
500
+ // emptyTitle: this.lang(
493
501
  // "empty_title",
494
- // LANG_COMPONENTS.COMPONENT_SELECT
502
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
495
503
  // ),
496
504
  selectAllOptions: "All Options",
497
- // this.lang(
505
+ // selectAllOptions: this.lang(
498
506
  // "all_options",
499
- // LANG_COMPONENTS.COMPONENT_SELECT
507
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
500
508
  // ),
501
509
  allSelected: "All selected",
502
- // this.lang(
503
- // "all_selected",
504
- // LANG_COMPONENTS.COMPONENT_SELECT
510
+ // allSelected: this.lang(
511
+ // "all_selected",
512
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
505
513
  // ),
506
514
  loading: "loading",
507
- // this.lang("loading", LANG_COMPONENTS.COMPONENT_SELECT) + "...",
515
+ // loading:
516
+ // this.lang("loading", this.LANG_COMPONENTS?.COMPONENT_SELECT) + "...",
508
517
  selectedCount: "Selected {selected} of {all} items",
509
- // this.lang(
518
+ // selectedCount: this.lang(
510
519
  // "selected_count",
511
- // LANG_COMPONENTS.COMPONENT_SELECT
520
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
512
521
  // ),
513
522
  buttonTitle: "Button title",
514
- // this.buttonTitle ||
515
- // this.lang("button_title", LANG_COMPONENTS.COMPONENT_SELECT),
523
+ // buttonTitle:
524
+ // this.buttonTitle ||
525
+ // this.lang("button_title", this.LANG_COMPONENTS?.COMPONENT_SELECT),
516
526
  requiredDependencyNotFilled: "Required dependency are not filled",
517
- // // eslint-disable-next-line vue/no-computed-properties-in-data
518
- // this.requiredDependencyNotFilled ||
519
- // this.lang(
520
- // "required_dependency_are_not_filled",
521
- // LANG_COMPONENTS.COMPONENT_SELECT
527
+ // requiredDependencyNotFilled:
528
+ // // eslint-disable-next-line vue/no-computed-properties-in-data
529
+ // this.requiredDependencyNotFilled ||
530
+ // this.lang(
531
+ // "required_dependency_are_not_filled",
532
+ // this.LANG_COMPONENTS?.COMPONENT_SELECT
522
533
  // ),
523
534
  },
524
535
  ...this.strings,