blip-ds 1.188.0 → 1.188.1

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.
@@ -174,7 +174,6 @@ const SelectChips = class {
174
174
  }
175
175
  componentWillRender() {
176
176
  if (this.options.length) {
177
- this.resetFilterOptions();
178
177
  try {
179
178
  this.internalOptions = typeof this.options === 'string' ? JSON.parse(this.options) : this.options;
180
179
  }
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function o(t){try{c(s.next(t))}catch(e){r(e)}}function a(t){try{c(s["throw"](t))}catch(e){r(e)}}function c(t){t.done?i(t.value):n(t.value).then(o,a)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(s)throw new TypeError("Generator is already executing.");while(i)try{if(s=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(a){o=[6,a];n=0}finally{s=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./index-ffd005e3.system.js"],(function(t){"use strict";var e,i,s,n;return{setters:[function(t){e=t.r;i=t.e;s=t.h;n=t.g}],execute:function(){var r='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';var o=t("bds_select_chips",function(){function t(t){var s=this;e(this,t);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.isOpen=false;this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.errorMessage="";this.disabled=false;this.dataTest=null;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.onFocus=function(){s.bdsFocus.emit()};this.onBlur=function(){s.bdsBlur.emit()};this.toggle=function(){if(!s.disabled){s.isOpen=!s.isOpen}};this.handler=function(t){return __awaiter(s,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:e=t.detail.value;i=this.getText(e);return[4,this.addChip(i)];case 1:s.sent();return[2]}}))}))};this.getTextFromOption=function(t){var e,i;if((t===null||t===void 0?void 0:t.status)||(t===null||t===void 0?void 0:t.bulkOption)){if(s.internalOptions){var n=s.internalOptions.find((function(e){return e.value==t.value}));if(n){return n.label}}return t.querySelector("#bds-typo-label-".concat(t.value)).textContent}return(t===null||t===void 0?void 0:t.titleText)?t.titleText:(i=(e=t===null||t===void 0?void 0:t.textContent)===null||e===void 0?void 0:e.trim())!==null&&i!==void 0?i:""};this.getText=function(t){var e=s.childOptions.find((function(e){return e.value===t}));return s.getTextFromOption(e)};this.handlerNewOption=function(t){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.addChip(t)];case 1:e.sent();return[2]}}))}))};this.setFocusWrapper=function(){if(s.nativeInput){s.nativeInput.setFocus()}};this.removeFocusWrapper=function(t){var e=t.relatedTarget.localName==="bds-input-chips";if(s.nativeInput&&!e){s.nativeInput.removeFocus()}};this.keyPressWrapper=function(t){var e=t.target.localName==="bds-select";var i=t.target.localName==="bds-input-chips";switch(t.key){case"Enter":if(s.childOptionsEnabled.length===1){s.nativeInput.add(s.childOptionsEnabled[0].textContent)}else{if(!s.canAddNew){return}s.nativeInput.add(s.nativeInput.value)}s.nativeInput.value="";if(!s.isOpen&&(e||i)){s.toggle()}break}};this.changedInputValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:t.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:t.sent();t.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.handleChangeChipsValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.nativeInput.value="";return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))}}t.prototype.handleWindow=function(t){if(!this.el.contains(t.target)){this.isOpen=false}};t.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.nativeInput.isValid()]}))}))};t.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.nativeInput.get()];case 1:return[2,t.sent()]}}))}))};t.prototype.componentWillRender=function(){if(this.options.length){this.resetFilterOptions();try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(t){this.internalOptions=[]}}};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(s){for(t=0,e=this.childOptions;t<e.length;t++){i=e[t];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});t.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};t.prototype.addChip=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.nativeInput.add(t)];case 1:e.sent();this.nativeInput.value="";this.toggle();return[2]}}))}))};t.prototype.filterOptions=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!t)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:e=0,i=this.childOptions;l.label=3;case 3:if(!(e<i.length))return[3,6];s=i[e];r=this.existsChip;o=[s.textContent];return[4,this.nativeInput.get()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=t.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(t&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(t&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:e++;return[3,3];case 6:return[2]}}))}))};t.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,s,n,r;return __generator(this,(function(o){switch(o.label){case 0:t=0,e=this.childOptions;o.label=1;case 1:if(!(t<e.length))return[3,4];i=e[t];s=i.querySelector("bds-typo").textContent;n=this.existsChip;r=[s];return[4,this.nativeInput.get()];case 2:if(n.apply(this,r.concat([o.sent()]))){i.setAttribute("invisible","invisible")}else{i.removeAttribute("invisible")}o.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};t.prototype.existsChip=function(t,e){return e.some((function(e){return t===e}))};t.prototype.generateKey=function(t){return t.toLowerCase().replace(/ /g,"-")};t.prototype.render=function(){var t=this;var e=this.isOpen?"arrow-up":"arrow-down";var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(n){}}else{i=this.options}}return s("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},s("bds-input-chips",{ref:function(e){return t.nativeInput=e},onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":true,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},s("div",{slot:"input-right",class:"select__icon"},s("bds-icon",{size:"small",name:e,color:"inherit"}))),s("div",{class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(e){return s("bds-select-option",{key:t.generateKey(e.value),onOptionSelected:t.handler,value:e.value,status:e.status},e.label)})),s("slot",null),this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"option-add",value:"add",onClick:function(){return t.handlerNewOption(t.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());o.style=r}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function o(t){try{c(s.next(t))}catch(e){r(e)}}function a(t){try{c(s["throw"](t))}catch(e){r(e)}}function c(t){t.done?i(t.value):n(t.value).then(o,a)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(s)throw new TypeError("Generator is already executing.");while(i)try{if(s=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(a){o=[6,a];n=0}finally{s=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./index-ffd005e3.system.js"],(function(t){"use strict";var e,i,s,n;return{setters:[function(t){e=t.r;i=t.e;s=t.h;n=t.g}],execute:function(){var r='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';var o=t("bds_select_chips",function(){function t(t){var s=this;e(this,t);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.isOpen=false;this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.errorMessage="";this.disabled=false;this.dataTest=null;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.onFocus=function(){s.bdsFocus.emit()};this.onBlur=function(){s.bdsBlur.emit()};this.toggle=function(){if(!s.disabled){s.isOpen=!s.isOpen}};this.handler=function(t){return __awaiter(s,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:e=t.detail.value;i=this.getText(e);return[4,this.addChip(i)];case 1:s.sent();return[2]}}))}))};this.getTextFromOption=function(t){var e,i;if((t===null||t===void 0?void 0:t.status)||(t===null||t===void 0?void 0:t.bulkOption)){if(s.internalOptions){var n=s.internalOptions.find((function(e){return e.value==t.value}));if(n){return n.label}}return t.querySelector("#bds-typo-label-".concat(t.value)).textContent}return(t===null||t===void 0?void 0:t.titleText)?t.titleText:(i=(e=t===null||t===void 0?void 0:t.textContent)===null||e===void 0?void 0:e.trim())!==null&&i!==void 0?i:""};this.getText=function(t){var e=s.childOptions.find((function(e){return e.value===t}));return s.getTextFromOption(e)};this.handlerNewOption=function(t){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.addChip(t)];case 1:e.sent();return[2]}}))}))};this.setFocusWrapper=function(){if(s.nativeInput){s.nativeInput.setFocus()}};this.removeFocusWrapper=function(t){var e=t.relatedTarget.localName==="bds-input-chips";if(s.nativeInput&&!e){s.nativeInput.removeFocus()}};this.keyPressWrapper=function(t){var e=t.target.localName==="bds-select";var i=t.target.localName==="bds-input-chips";switch(t.key){case"Enter":if(s.childOptionsEnabled.length===1){s.nativeInput.add(s.childOptionsEnabled[0].textContent)}else{if(!s.canAddNew){return}s.nativeInput.add(s.nativeInput.value)}s.nativeInput.value="";if(!s.isOpen&&(e||i)){s.toggle()}break}};this.changedInputValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:t.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:t.sent();t.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.handleChangeChipsValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.nativeInput.value="";return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))}}t.prototype.handleWindow=function(t){if(!this.el.contains(t.target)){this.isOpen=false}};t.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.nativeInput.isValid()]}))}))};t.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.nativeInput.get()];case 1:return[2,t.sent()]}}))}))};t.prototype.componentWillRender=function(){if(this.options.length){try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(t){this.internalOptions=[]}}};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(s){for(t=0,e=this.childOptions;t<e.length;t++){i=e[t];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});t.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};t.prototype.addChip=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.nativeInput.add(t)];case 1:e.sent();this.nativeInput.value="";this.toggle();return[2]}}))}))};t.prototype.filterOptions=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!t)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:e=0,i=this.childOptions;l.label=3;case 3:if(!(e<i.length))return[3,6];s=i[e];r=this.existsChip;o=[s.textContent];return[4,this.nativeInput.get()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=t.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(t&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(t&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:e++;return[3,3];case 6:return[2]}}))}))};t.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,s,n,r;return __generator(this,(function(o){switch(o.label){case 0:t=0,e=this.childOptions;o.label=1;case 1:if(!(t<e.length))return[3,4];i=e[t];s=i.querySelector("bds-typo").textContent;n=this.existsChip;r=[s];return[4,this.nativeInput.get()];case 2:if(n.apply(this,r.concat([o.sent()]))){i.setAttribute("invisible","invisible")}else{i.removeAttribute("invisible")}o.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};t.prototype.existsChip=function(t,e){return e.some((function(e){return t===e}))};t.prototype.generateKey=function(t){return t.toLowerCase().replace(/ /g,"-")};t.prototype.render=function(){var t=this;var e=this.isOpen?"arrow-up":"arrow-down";var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(n){}}else{i=this.options}}return s("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},s("bds-input-chips",{ref:function(e){return t.nativeInput=e},onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":true,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},s("div",{slot:"input-right",class:"select__icon"},s("bds-icon",{size:"small",name:e,color:"inherit"}))),s("div",{class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(e){return s("bds-select-option",{key:t.generateKey(e.value),onOptionSelected:t.handler,value:e.value,status:e.status},e.label)})),s("slot",null),this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"option-add",value:"add",onClick:function(){return t.handlerNewOption(t.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());o.style=r}}}));
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as i,g as e}from"./p-30ca8b9c.js";const c=class{constructor(i){s(this,i),this.bdsChange=t(this,"bdsChange",7),this.bdsCancel=t(this,"bdsCancel",7),this.bdsFocus=t(this,"bdsFocus",7),this.bdsBlur=t(this,"bdsBlur",7),this.isOpen=!1,this.options=[],this.chips=[],this.newPrefix="",this.value="",this.danger=!1,this.errorMessage="",this.disabled=!1,this.dataTest=null,this.label="",this.icon="",this.duplicated=!1,this.canAddNew=!0,this.notFoundMessage="No results found",this.onFocus=()=>{this.bdsFocus.emit()},this.onBlur=()=>{this.bdsBlur.emit()},this.toggle=()=>{this.disabled||(this.isOpen=!this.isOpen)},this.handler=async s=>{const{detail:{value:t}}=s,i=this.getText(t);await this.addChip(i)},this.getTextFromOption=s=>{var t,i;if((null==s?void 0:s.status)||(null==s?void 0:s.bulkOption)){if(this.internalOptions){const t=this.internalOptions.find((t=>t.value==s.value));if(t)return t.label}return s.querySelector(`#bds-typo-label-${s.value}`).textContent}return(null==s?void 0:s.titleText)?s.titleText:null!==(i=null===(t=null==s?void 0:s.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:""},this.getText=s=>{const t=this.childOptions.find((t=>t.value===s));return this.getTextFromOption(t)},this.handlerNewOption=async s=>{await this.addChip(s)},this.setFocusWrapper=()=>{this.nativeInput&&this.nativeInput.setFocus()},this.removeFocusWrapper=s=>{this.nativeInput&&"bds-input-chips"!==s.relatedTarget.localName&&this.nativeInput.removeFocus()},this.keyPressWrapper=s=>{const t="bds-select"===s.target.localName,i="bds-input-chips"===s.target.localName;switch(s.key){case"Enter":if(1===this.childOptionsEnabled.length)this.nativeInput.add(this.childOptionsEnabled[0].textContent);else{if(!this.canAddNew)return;this.nativeInput.add(this.nativeInput.value)}this.nativeInput.value="",this.isOpen||!t&&!i||this.toggle()}},this.changedInputValue=async()=>{this.value=this.nativeInput.value,this.nativeInput.value?await this.filterOptions(this.nativeInput.value):await this.resetFilterOptions(),this.value&&!1===this.isOpen&&(this.isOpen=!0)},this.handleChangeChipsValue=async()=>{this.nativeInput.value="",await this.resetFilterOptions()}}handleWindow(s){this.el.contains(s.target)||(this.isOpen=!1)}async isValid(){return this.nativeInput.isValid()}async getChips(){return await this.nativeInput.get()}componentWillRender(){if(this.options.length)try{this.internalOptions="string"==typeof this.options?JSON.parse(this.options):this.options}catch(s){this.internalOptions=[]}}async connectedCallback(){for(const s of this.childOptions)s.addEventListener("optionSelected",this.handler)}async componentDidLoad(){await this.resetFilterOptions()}get childOptions(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))}get childOptionsEnabled(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))}enableCreateOption(){return!(0!==this.childOptionsEnabled.length||!this.nativeInput||!this.nativeInput.value)}async addChip(s){await this.nativeInput.add(s),this.nativeInput.value="",this.toggle()}async filterOptions(s){if(s)for(const t of this.childOptions){const i=this.existsChip(t.textContent,await this.nativeInput.get()),e=t.textContent.toLowerCase(),c=s.toLowerCase();i&&t.setAttribute("invisible","invisible"),s&&e.includes(c)&&!i&&t.removeAttribute("invisible"),!s||e.includes(c)||i||t.setAttribute("invisible","invisible")}else await this.resetFilterOptions()}async resetFilterOptions(){for(const s of this.childOptions){const t=s.querySelector("bds-typo").textContent;this.existsChip(t,await this.nativeInput.get())?s.setAttribute("invisible","invisible"):s.removeAttribute("invisible")}}existsChip(s,t){return t.some((t=>s===t))}generateKey(s){return s.toLowerCase().replace(/ /g,"-")}render(){const s=this.isOpen?"arrow-up":"arrow-down";let t=[];if(this.options)if("string"==typeof this.options)try{t=JSON.parse(this.options)}catch(e){}else t=this.options;return i("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},i("bds-input-chips",{ref:s=>this.nativeInput=s,onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":!0,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},i("div",{slot:"input-right",class:"select__icon"},i("bds-icon",{size:"small",name:s,color:"inherit"}))),i("div",{class:{select__options:!0,"select__options--open":this.isOpen}},t.map((s=>i("bds-select-option",{key:this.generateKey(s.value),onOptionSelected:this.handler,value:s.value,status:s.status},s.label))),i("slot",null),this.canAddNew&&this.enableCreateOption()&&i("bds-select-option",{id:"option-add",value:"add",onClick:()=>this.handlerNewOption(this.nativeInput.value)},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&i("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))}get el(){return e(this)}};c.style='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';export{c as bds_select_chips}
@@ -1 +1 @@
1
- System.register(["./p-045be029.system.js"],(function(e,t){"use strict";var s,a,n,i,o,r;return{setters:[function(e){s=e.p;a=e.w;n=e.d;i=e.N;o=e.a;r=e.b}],execute:function(){var e=function(e){return"__sc_import_".concat(e.replace(/\s|-/g,"_"))};var d=function(){{s.$cssShim$=a.__cssshim}var e=Array.from(n.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(i,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===i}));var r=e["data-opts"]||{};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,a.location.href)).href;{l(r.resourcesUrl,e)}if(!a.customElements){return t.import("./p-45cc362e.system.js").then((function(){return r}))}}return o(r)};var l=function(t,s){var o=e(i);try{a[o]=new Function("w","return import(w);//".concat(Math.random()))}catch(d){var r=new Map;a[o]=function(e){var i=new URL(e,t).href;var d=r.get(i);if(!d){var l=n.createElement("script");l.type="module";l.crossOrigin=s.crossOrigin;l.src=URL.createObjectURL(new Blob(["import * as m from '".concat(i,"'; window.").concat(o,".m = m;")],{type:"application/javascript"}));d=new Promise((function(e){l.onload=function(){e(a[o].m);l.remove()}}));r.set(i,d);n.head.appendChild(l)}return d}}};d().then((function(e){return r(JSON.parse('[["p-da295ea2.system",[[1,"bds-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"theme":[513],"type":[1],"dataTest":[1,"data-test"],"svgContent":[32],"isVisible":[32]}],[1,"bds-typo",{"variant":[1],"lineHeight":[1,"line-height"],"bold":[1],"italic":[4],"noWrap":[4,"no-wrap"],"paragraph":[4],"margin":[4],"tag":[1],"dataTest":[1,"data-test"]}]]],["p-74b71f88.system",[[0,"bds-datepicker",{"typeOfDate":[1,"type-of-date"],"startDateLimit":[1537,"start-date-limit"],"endDateLimit":[1537,"end-date-limit"],"message":[1],"language":[1],"endDateLimitDaysList":[32],"open":[32],"dateSelected":[32],"endDateSelected":[32],"valueDateSelected":[32],"valueEndDateSelected":[32],"errorMsgDate":[32],"errorMsgEndDate":[32]}]]],["p-1d11cf93.system",[[6,"bds-select-chips",{"options":[1025],"chips":[1025],"newPrefix":[513,"new-prefix"],"value":[1025],"danger":[1540],"maxlength":[2],"errorMessage":[1025,"error-message"],"disabled":[516],"dataTest":[1,"data-test"],"label":[1],"icon":[513],"duplicated":[4],"canAddNew":[4,"can-add-new"],"notFoundMessage":[1,"not-found-message"],"internalOptions":[32],"isOpen":[32],"isValid":[64],"getChips":[64]},[[9,"mousedown","handleWindow"]]]]],["p-f6b02ea4.system",[[1,"bds-toast",{"icon":[513],"actionType":[1,"action-type"],"variant":[1],"toastTitle":[1,"toast-title"],"toastText":[1,"toast-text"],"buttonText":[1,"button-text"],"duration":[2],"buttonAction":[1,"button-action"],"show":[4],"hide":[4],"position":[1],"create":[64],"close":[64]}]]],["p-1e95df7e.system",[[2,"bds-input-phone-number",{"options":[16],"text":[1],"value":[1032],"danger":[516],"disabled":[516],"required":[4],"requiredErrorMessage":[1,"required-error-message"],"numberErrorMessage":[1,"number-error-message"],"dataTest":[1,"data-test"],"label":[1],"icon":[513],"isOpen":[32],"selectedCountry":[32],"isPressed":[32]},[[9,"mousedown","handleWindow"]]]]],["p-e422d438.system",[[1,"bds-select",{"options":[1],"value":[1032],"danger":[516],"disabled":[516],"label":[1],"icon":[513],"placeholder":[1],"optionsPosition":[1,"options-position"],"dataTest":[1,"data-test"],"isOpen":[32],"text":[32],"internalOptions":[32]},[[9,"mousedown","handleWindow"]]]]],["p-b1f91540.system",[[1,"bds-input-editable",{"size":[1],"expand":[4],"dataTest":[1,"data-test"],"inputName":[1,"input-name"],"value":[1537],"requiredErrorMessage":[1,"required-error-message"],"minlength":[2],"minlengthErrorMessage":[1,"minlength-error-message"],"maxlength":[2],"errorMessage":[1,"error-message"],"helperMessage":[1,"helper-message"],"danger":[1540],"isEditing":[32],"isValid":[32]}]]],["p-d08b0005.system",[[2,"bds-input-password",{"openEyes":[4,"open-eyes"],"value":[1537],"label":[1],"inputName":[1,"input-name"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"readonly":[4],"helperMessage":[1,"helper-message"],"errorMessage":[1,"error-message"],"danger":[516],"icon":[513],"disabled":[4],"autoCapitalize":[1,"auto-capitalize"],"autoComplete":[1,"auto-complete"],"placeholder":[1],"dataTest":[1,"data-test"]}]]],["p-7a51fa27.system",[[1,"bds-upload",{"language":[1],"titleName":[1,"title-name"],"subtitle":[1],"error":[1],"multiple":[4],"accept":[1],"files":[32],"haveFiles":[32],"hover":[32],"background":[32],"size":[32]}]]],["p-0bb7b5be.system",[[1,"bds-accordion-header",{"accordionTitle":[1,"accordion-title"],"icon":[1],"avatarName":[1,"avatar-name"],"avatarThumb":[1,"avatar-thumb"],"isOpen":[32],"btToggleIsfocus":[32],"numberElement":[32],"toggle":[64],"close":[64]}]]],["p-7ed56484.system",[[1,"bds-autocomplete",{"options":[1],"value":[1025],"selected":[1040],"danger":[516],"disabled":[516],"searchOnlyTitle":[516,"search-only-title"],"label":[1],"icon":[513],"placeholder":[1],"optionsPosition":[1,"options-position"],"clearIconOnFocus":[4,"clear-icon-on-focus"],"dataTest":[1,"data-test"],"isPressed":[32],"isOpen":[32],"text":[32],"internalOptions":[32],"isFocused":[32]},[[9,"mousedown","handleWindow"]]]]],["p-20b47cd7.system",[[4,"bds-avatar-group",{"size":[1],"users":[1],"internalUsers":[32],"leftoversUsers":[32]}]]],["p-122e709a.system",[[1,"bds-menu-exibition",{"avatarName":[1,"avatar-name"],"avatarThumbnail":[1,"avatar-thumbnail"],"avatarSize":[1,"avatar-size"],"value":[1],"subtitle":[1]}]]],["p-525d6374.system",[[1,"bds-alert-header",{"variant":[1],"icon":[513]}]]],["p-336103b3.system",[[1,"bds-checkbox",{"refer":[1],"label":[1],"name":[1],"checked":[1540],"disabled":[4],"checkBoxId":[32],"getInputElement":[64],"getValue":[64]}]]],["p-7adbbbff.system",[[1,"bds-chip-selected",{"icon":[1],"color":[1],"size":[1],"selected":[4],"disabled":[4],"dataTest":[1,"data-test"],"isSelected":[32]},[[2,"click","handleClick"]]]]],["p-ed58147b.system",[[1,"bds-chip-tag",{"icon":[1],"color":[1]}]]],["p-ffd6e270.system",[[1,"bds-menu-action",{"buttonText":[1,"button-text"],"subMenu":[4,"sub-menu"],"iconLeft":[1,"icon-left"],"lipstick":[4],"openSubMenu":[32],"stateSubMenu":[32],"delaySubMenu":[32],"zIndex":[32],"delay":[32]}]]],["p-75d269ef.system",[[1,"bds-menu-list-item",{"color":[1],"icon":[513]}]]],["p-5bac0b42.system",[[1,"bds-step",{"last":[4],"completed":[4],"active":[4],"disabled":[4],"index":[2],"pointer":[4]}]]],["p-f3657858.system",[[4,"bds-tabs",{"align":[1]},[[0,"scrollButtonClick","onScrollButtonClick"],[0,"bdsSelect","onSelectedTab"]]]]],["p-3aea498b.system",[[1,"bds-warning"]]],["p-f8cf325c.system",[[1,"bds-alert-body"]]],["p-b34976ef.system",[[1,"bds-card-color",{"name":[1],"hex":[1],"gradient":[4],"variable":[1],"lightText":[4,"light-text"]}]]],["p-67b01ee5.system",[[1,"bds-chip",{"icon":[1],"size":[1],"variant":[1],"danger":[516],"filter":[4],"clickable":[4],"deletable":[4],"disabled":[4]}]]],["p-6109767c.system",[[1,"bds-expansion-panel-header",{"text":[1]}]]],["p-476d1fb1.system",[[1,"bds-menu-separation",{"value":[1],"size":[1]}]]],["p-e071350c.system",[[1,"bds-modal",{"open":[1540],"closeButton":[1540,"close-button"],"toggle":[64]}]]],["p-4abca248.system",[[1,"bds-modal-close-button",{"active":[1540]}]]],["p-433ca79c.system",[[1,"bds-progress-bar",{"percent":[2],"text":[1]}]]],["p-3580a4c7.system",[[1,"bds-radio",{"refer":[1],"label":[1],"value":[1],"name":[1],"checked":[1540],"disabled":[4],"dataTest":[1,"data-test"],"radioId":[32],"getInputElement":[64],"getValue":[64]}]]],["p-10c34e56.system",[[1,"bds-sidebar",{"isOpen":[1540,"is-open"],"sidebarPosition":[1,"sidebar-position"],"InnerSpacing":[32],"toggle":[64]}]]],["p-10c224c6.system",[[0,"bds-tab",{"group":[1],"label":[1],"active":[4],"getChild":[64]}]]],["p-cd060c89.system",[[4,"bds-tab-panel",{"group":[1],"active":[4],"getChild":[64]}]]],["p-fd364019.system",[[1,"bds-tooltip",{"tooltipText":[1,"tooltip-text"],"disabled":[516],"position":[1],"dataTest":[1,"data-test"],"isMouseOver":[32]}]]],["p-23493eb7.system",[[1,"bds-accordion",{"isOpen":[32],"numberElement":[32],"toggle":[64],"close":[64],"reciveNumber":[64]}]]],["p-b751dcb1.system",[[1,"bds-accordion-body",{"isOpen":[32],"heightContainer":[32],"numberElement":[32],"toggle":[64],"close":[64]}]]],["p-15ccd389.system",[[1,"bds-accordion-group",{"collapse":[1],"closeAll":[64]}]]],["p-965d26cf.system",[[1,"bds-alert",{"open":[1540],"toggle":[64]}]]],["p-583d7a6d.system",[[1,"bds-alert-actions"]]],["p-07d3b212.system",[[1,"bds-banner-link",{"link":[1]}]]],["p-2759ab35.system",[[1,"bds-expansion-panel"]]],["p-127a3d1c.system",[[1,"bds-expansion-panel-body",{"open":[4],"text":[1]}]]],["p-f306dc5c.system",[[1,"bds-illustration",{"type":[1],"name":[1],"dataTest":[1,"data-test"],"IllustrationContent":[32]}]]],["p-143269ad.system",[[1,"bds-loading-page",{"svgContent":[32]}]]],["p-83cb307e.system",[[1,"bds-menu",{"menu":[1],"position":[1],"open":[1540],"menuPositionTopToBottom":[32],"menuPositionLeftToBottom":[32],"menuPositionTopToRight":[32],"menuPositionLeftToRight":[32],"toggle":[64]}]]],["p-5987c94d.system",[[1,"bds-menu-list"]]],["p-415c7b73.system",[[1,"bds-modal-action"]]],["p-c6fccf42.system",[[1,"bds-paper",{"elevation":[1],"dataTest":[1,"data-test"]}]]],["p-899b992a.system",[[6,"bds-radio-group",{"value":[1]}]]],["p-298f6c48.system",[[4,"bds-stepper",{"setActiveStep":[64],"setCompletedStep":[64],"getActiveStep":[64],"resetActiveSteps":[64],"resetCompletedSteps":[64]}]]],["p-e1e125f4.system",[[1,"bds-switch",{"refer":[1],"size":[1],"name":[1],"checked":[1540],"disabled":[4],"dataTest":[1,"data-test"],"switchId":[32],"getInputElement":[64],"getValue":[64]}]]],["p-d893be23.system",[[0,"bds-avatar",{"name":[1],"thumbnail":[1],"size":[1],"upload":[4],"ellipsis":[2],"dataTest":[1,"data-test"]}]]],["p-dde1f579.system",[[1,"bds-input",{"inputName":[1,"input-name"],"type":[513],"label":[1],"placeholder":[1],"autoCapitalize":[1,"auto-capitalize"],"autoComplete":[1,"auto-complete"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"readonly":[4],"required":[4],"pattern":[1],"helperMessage":[1,"helper-message"],"errorMessage":[1025,"error-message"],"icon":[513],"disabled":[1540],"danger":[1540],"value":[1025],"counterLength":[4,"counter-length"],"counterLengthRule":[16],"isSubmit":[4,"is-submit"],"isTextarea":[4,"is-textarea"],"rows":[2],"cols":[2],"requiredErrorMessage":[1,"required-error-message"],"minlengthErrorMessage":[1,"minlength-error-message"],"minErrorMessage":[1,"min-error-message"],"maxErrorMessage":[1,"max-error-message"],"emailErrorMessage":[1,"email-error-message"],"numberErrorMessage":[1,"number-error-message"],"chips":[4],"dataTest":[1,"data-test"],"isPressed":[32],"isPassword":[32],"validationMesage":[32],"validationDanger":[32],"setFocus":[64],"removeFocus":[64],"getInputElement":[64],"isValid":[64],"clear":[64]}],[0,"bds-counter-text",{"length":[1026],"max":[2],"active":[1028],"warning":[1040],"delete":[1040]}]]],["p-24c8c83b.system",[[6,"bds-input-chips",{"chips":[1025],"type":[1],"label":[1],"maxlength":[2],"icon":[513],"delimiters":[16],"errorMessage":[1025,"error-message"],"danger":[1540],"value":[1537],"duplicated":[4],"disableSubmit":[4,"disable-submit"],"disabled":[516],"helperMessage":[1,"helper-message"],"inputName":[1,"input-name"],"placeholder":[1],"dataTest":[1,"data-test"],"internalChips":[32],"isValid":[64],"get":[64],"clear":[64],"add":[64],"setFocus":[64],"removeFocus":[64]}]]],["p-92f842a5.system",[[1,"bds-banner",{"bannerAlign":[1,"banner-align"],"buttonClose":[1,"button-close"],"context":[1],"variant":[1],"visible":[32],"toggle":[64]}]]],["p-b1689ff7.system",[[6,"bds-toast-container"]]],["p-79290ec4.system",[[1,"bds-datepicker-period",{"startDate":[16],"endDate":[16],"startDateSelect":[1040],"endDateSelect":[1040],"language":[1],"week":[32],"months":[32],"years":[32],"monthActivated":[32],"yearActivated":[32],"animatePrev":[32],"animateNext":[32],"activeSelectYear":[32],"openSelectMonth":[32],"openSelectYear":[32],"monthsSlide":[32],"loadingSlide":[32],"clear":[64]}],[1,"bds-datepicker-single",{"endDate":[16],"startDate":[16],"dateSelect":[1040],"language":[1],"week":[32],"months":[32],"years":[32],"monthActivated":[32],"yearActivated":[32],"animatePrev":[32],"animateNext":[32],"openSelectMonth":[32],"openSelectYear":[32],"monthsSlide":[32],"loadingSlide":[32],"clear":[64]}]]],["p-b3c97430.system",[[1,"bds-chip-clickable",{"icon":[1],"avatar":[1],"color":[1],"size":[1],"clickable":[4],"close":[4],"disabled":[4],"dataTest":[1,"data-test"],"visible":[32]}]]],["p-35efefd9.system",[[1,"bds-button-icon",{"disabled":[4],"size":[1],"variant":[1],"icon":[513]}]]],["p-d9da5599.system",[[1,"bds-button",{"disabled":[4],"size":[1],"variant":[1],"icon":[513],"arrow":[4],"type":[1],"typeIcon":[513,"type-icon"],"bdsLoading":[4,"bds-loading"],"bdsLoadingVariant":[1,"bds-loading-variant"],"bdsLoadingColor":[1,"bds-loading-color"],"dataTest":[1,"data-test"]}],[0,"bds-loading-spinner",{"variant":[1],"size":[1],"color":[1],"svgContent":[32]}]]],["p-be77393d.system",[[6,"bds-select-option",{"value":[8],"selected":[4],"disabled":[4],"invisible":[1540],"danger":[1540],"bulkOption":[1,"bulk-option"],"slotAlign":[1,"slot-align"],"titleText":[1,"title-text"],"status":[1],"dataTest":[1,"data-test"]}]]]]'),e)}))}}}));
1
+ System.register(["./p-045be029.system.js"],(function(e,t){"use strict";var s,a,n,i,o,r;return{setters:[function(e){s=e.p;a=e.w;n=e.d;i=e.N;o=e.a;r=e.b}],execute:function(){var e=function(e){return"__sc_import_".concat(e.replace(/\s|-/g,"_"))};var d=function(){{s.$cssShim$=a.__cssshim}var e=Array.from(n.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(i,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===i}));var r=e["data-opts"]||{};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,a.location.href)).href;{l(r.resourcesUrl,e)}if(!a.customElements){return t.import("./p-45cc362e.system.js").then((function(){return r}))}}return o(r)};var l=function(t,s){var o=e(i);try{a[o]=new Function("w","return import(w);//".concat(Math.random()))}catch(d){var r=new Map;a[o]=function(e){var i=new URL(e,t).href;var d=r.get(i);if(!d){var l=n.createElement("script");l.type="module";l.crossOrigin=s.crossOrigin;l.src=URL.createObjectURL(new Blob(["import * as m from '".concat(i,"'; window.").concat(o,".m = m;")],{type:"application/javascript"}));d=new Promise((function(e){l.onload=function(){e(a[o].m);l.remove()}}));r.set(i,d);n.head.appendChild(l)}return d}}};d().then((function(e){return r(JSON.parse('[["p-da295ea2.system",[[1,"bds-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"theme":[513],"type":[1],"dataTest":[1,"data-test"],"svgContent":[32],"isVisible":[32]}],[1,"bds-typo",{"variant":[1],"lineHeight":[1,"line-height"],"bold":[1],"italic":[4],"noWrap":[4,"no-wrap"],"paragraph":[4],"margin":[4],"tag":[1],"dataTest":[1,"data-test"]}]]],["p-74b71f88.system",[[0,"bds-datepicker",{"typeOfDate":[1,"type-of-date"],"startDateLimit":[1537,"start-date-limit"],"endDateLimit":[1537,"end-date-limit"],"message":[1],"language":[1],"endDateLimitDaysList":[32],"open":[32],"dateSelected":[32],"endDateSelected":[32],"valueDateSelected":[32],"valueEndDateSelected":[32],"errorMsgDate":[32],"errorMsgEndDate":[32]}]]],["p-d4f436dc.system",[[6,"bds-select-chips",{"options":[1025],"chips":[1025],"newPrefix":[513,"new-prefix"],"value":[1025],"danger":[1540],"maxlength":[2],"errorMessage":[1025,"error-message"],"disabled":[516],"dataTest":[1,"data-test"],"label":[1],"icon":[513],"duplicated":[4],"canAddNew":[4,"can-add-new"],"notFoundMessage":[1,"not-found-message"],"internalOptions":[32],"isOpen":[32],"isValid":[64],"getChips":[64]},[[9,"mousedown","handleWindow"]]]]],["p-f6b02ea4.system",[[1,"bds-toast",{"icon":[513],"actionType":[1,"action-type"],"variant":[1],"toastTitle":[1,"toast-title"],"toastText":[1,"toast-text"],"buttonText":[1,"button-text"],"duration":[2],"buttonAction":[1,"button-action"],"show":[4],"hide":[4],"position":[1],"create":[64],"close":[64]}]]],["p-1e95df7e.system",[[2,"bds-input-phone-number",{"options":[16],"text":[1],"value":[1032],"danger":[516],"disabled":[516],"required":[4],"requiredErrorMessage":[1,"required-error-message"],"numberErrorMessage":[1,"number-error-message"],"dataTest":[1,"data-test"],"label":[1],"icon":[513],"isOpen":[32],"selectedCountry":[32],"isPressed":[32]},[[9,"mousedown","handleWindow"]]]]],["p-e422d438.system",[[1,"bds-select",{"options":[1],"value":[1032],"danger":[516],"disabled":[516],"label":[1],"icon":[513],"placeholder":[1],"optionsPosition":[1,"options-position"],"dataTest":[1,"data-test"],"isOpen":[32],"text":[32],"internalOptions":[32]},[[9,"mousedown","handleWindow"]]]]],["p-b1f91540.system",[[1,"bds-input-editable",{"size":[1],"expand":[4],"dataTest":[1,"data-test"],"inputName":[1,"input-name"],"value":[1537],"requiredErrorMessage":[1,"required-error-message"],"minlength":[2],"minlengthErrorMessage":[1,"minlength-error-message"],"maxlength":[2],"errorMessage":[1,"error-message"],"helperMessage":[1,"helper-message"],"danger":[1540],"isEditing":[32],"isValid":[32]}]]],["p-d08b0005.system",[[2,"bds-input-password",{"openEyes":[4,"open-eyes"],"value":[1537],"label":[1],"inputName":[1,"input-name"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"readonly":[4],"helperMessage":[1,"helper-message"],"errorMessage":[1,"error-message"],"danger":[516],"icon":[513],"disabled":[4],"autoCapitalize":[1,"auto-capitalize"],"autoComplete":[1,"auto-complete"],"placeholder":[1],"dataTest":[1,"data-test"]}]]],["p-7a51fa27.system",[[1,"bds-upload",{"language":[1],"titleName":[1,"title-name"],"subtitle":[1],"error":[1],"multiple":[4],"accept":[1],"files":[32],"haveFiles":[32],"hover":[32],"background":[32],"size":[32]}]]],["p-0bb7b5be.system",[[1,"bds-accordion-header",{"accordionTitle":[1,"accordion-title"],"icon":[1],"avatarName":[1,"avatar-name"],"avatarThumb":[1,"avatar-thumb"],"isOpen":[32],"btToggleIsfocus":[32],"numberElement":[32],"toggle":[64],"close":[64]}]]],["p-7ed56484.system",[[1,"bds-autocomplete",{"options":[1],"value":[1025],"selected":[1040],"danger":[516],"disabled":[516],"searchOnlyTitle":[516,"search-only-title"],"label":[1],"icon":[513],"placeholder":[1],"optionsPosition":[1,"options-position"],"clearIconOnFocus":[4,"clear-icon-on-focus"],"dataTest":[1,"data-test"],"isPressed":[32],"isOpen":[32],"text":[32],"internalOptions":[32],"isFocused":[32]},[[9,"mousedown","handleWindow"]]]]],["p-20b47cd7.system",[[4,"bds-avatar-group",{"size":[1],"users":[1],"internalUsers":[32],"leftoversUsers":[32]}]]],["p-122e709a.system",[[1,"bds-menu-exibition",{"avatarName":[1,"avatar-name"],"avatarThumbnail":[1,"avatar-thumbnail"],"avatarSize":[1,"avatar-size"],"value":[1],"subtitle":[1]}]]],["p-525d6374.system",[[1,"bds-alert-header",{"variant":[1],"icon":[513]}]]],["p-336103b3.system",[[1,"bds-checkbox",{"refer":[1],"label":[1],"name":[1],"checked":[1540],"disabled":[4],"checkBoxId":[32],"getInputElement":[64],"getValue":[64]}]]],["p-7adbbbff.system",[[1,"bds-chip-selected",{"icon":[1],"color":[1],"size":[1],"selected":[4],"disabled":[4],"dataTest":[1,"data-test"],"isSelected":[32]},[[2,"click","handleClick"]]]]],["p-ed58147b.system",[[1,"bds-chip-tag",{"icon":[1],"color":[1]}]]],["p-ffd6e270.system",[[1,"bds-menu-action",{"buttonText":[1,"button-text"],"subMenu":[4,"sub-menu"],"iconLeft":[1,"icon-left"],"lipstick":[4],"openSubMenu":[32],"stateSubMenu":[32],"delaySubMenu":[32],"zIndex":[32],"delay":[32]}]]],["p-75d269ef.system",[[1,"bds-menu-list-item",{"color":[1],"icon":[513]}]]],["p-5bac0b42.system",[[1,"bds-step",{"last":[4],"completed":[4],"active":[4],"disabled":[4],"index":[2],"pointer":[4]}]]],["p-f3657858.system",[[4,"bds-tabs",{"align":[1]},[[0,"scrollButtonClick","onScrollButtonClick"],[0,"bdsSelect","onSelectedTab"]]]]],["p-3aea498b.system",[[1,"bds-warning"]]],["p-f8cf325c.system",[[1,"bds-alert-body"]]],["p-b34976ef.system",[[1,"bds-card-color",{"name":[1],"hex":[1],"gradient":[4],"variable":[1],"lightText":[4,"light-text"]}]]],["p-67b01ee5.system",[[1,"bds-chip",{"icon":[1],"size":[1],"variant":[1],"danger":[516],"filter":[4],"clickable":[4],"deletable":[4],"disabled":[4]}]]],["p-6109767c.system",[[1,"bds-expansion-panel-header",{"text":[1]}]]],["p-476d1fb1.system",[[1,"bds-menu-separation",{"value":[1],"size":[1]}]]],["p-e071350c.system",[[1,"bds-modal",{"open":[1540],"closeButton":[1540,"close-button"],"toggle":[64]}]]],["p-4abca248.system",[[1,"bds-modal-close-button",{"active":[1540]}]]],["p-433ca79c.system",[[1,"bds-progress-bar",{"percent":[2],"text":[1]}]]],["p-3580a4c7.system",[[1,"bds-radio",{"refer":[1],"label":[1],"value":[1],"name":[1],"checked":[1540],"disabled":[4],"dataTest":[1,"data-test"],"radioId":[32],"getInputElement":[64],"getValue":[64]}]]],["p-10c34e56.system",[[1,"bds-sidebar",{"isOpen":[1540,"is-open"],"sidebarPosition":[1,"sidebar-position"],"InnerSpacing":[32],"toggle":[64]}]]],["p-10c224c6.system",[[0,"bds-tab",{"group":[1],"label":[1],"active":[4],"getChild":[64]}]]],["p-cd060c89.system",[[4,"bds-tab-panel",{"group":[1],"active":[4],"getChild":[64]}]]],["p-fd364019.system",[[1,"bds-tooltip",{"tooltipText":[1,"tooltip-text"],"disabled":[516],"position":[1],"dataTest":[1,"data-test"],"isMouseOver":[32]}]]],["p-23493eb7.system",[[1,"bds-accordion",{"isOpen":[32],"numberElement":[32],"toggle":[64],"close":[64],"reciveNumber":[64]}]]],["p-b751dcb1.system",[[1,"bds-accordion-body",{"isOpen":[32],"heightContainer":[32],"numberElement":[32],"toggle":[64],"close":[64]}]]],["p-15ccd389.system",[[1,"bds-accordion-group",{"collapse":[1],"closeAll":[64]}]]],["p-965d26cf.system",[[1,"bds-alert",{"open":[1540],"toggle":[64]}]]],["p-583d7a6d.system",[[1,"bds-alert-actions"]]],["p-07d3b212.system",[[1,"bds-banner-link",{"link":[1]}]]],["p-2759ab35.system",[[1,"bds-expansion-panel"]]],["p-127a3d1c.system",[[1,"bds-expansion-panel-body",{"open":[4],"text":[1]}]]],["p-f306dc5c.system",[[1,"bds-illustration",{"type":[1],"name":[1],"dataTest":[1,"data-test"],"IllustrationContent":[32]}]]],["p-143269ad.system",[[1,"bds-loading-page",{"svgContent":[32]}]]],["p-83cb307e.system",[[1,"bds-menu",{"menu":[1],"position":[1],"open":[1540],"menuPositionTopToBottom":[32],"menuPositionLeftToBottom":[32],"menuPositionTopToRight":[32],"menuPositionLeftToRight":[32],"toggle":[64]}]]],["p-5987c94d.system",[[1,"bds-menu-list"]]],["p-415c7b73.system",[[1,"bds-modal-action"]]],["p-c6fccf42.system",[[1,"bds-paper",{"elevation":[1],"dataTest":[1,"data-test"]}]]],["p-899b992a.system",[[6,"bds-radio-group",{"value":[1]}]]],["p-298f6c48.system",[[4,"bds-stepper",{"setActiveStep":[64],"setCompletedStep":[64],"getActiveStep":[64],"resetActiveSteps":[64],"resetCompletedSteps":[64]}]]],["p-e1e125f4.system",[[1,"bds-switch",{"refer":[1],"size":[1],"name":[1],"checked":[1540],"disabled":[4],"dataTest":[1,"data-test"],"switchId":[32],"getInputElement":[64],"getValue":[64]}]]],["p-d893be23.system",[[0,"bds-avatar",{"name":[1],"thumbnail":[1],"size":[1],"upload":[4],"ellipsis":[2],"dataTest":[1,"data-test"]}]]],["p-dde1f579.system",[[1,"bds-input",{"inputName":[1,"input-name"],"type":[513],"label":[1],"placeholder":[1],"autoCapitalize":[1,"auto-capitalize"],"autoComplete":[1,"auto-complete"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"readonly":[4],"required":[4],"pattern":[1],"helperMessage":[1,"helper-message"],"errorMessage":[1025,"error-message"],"icon":[513],"disabled":[1540],"danger":[1540],"value":[1025],"counterLength":[4,"counter-length"],"counterLengthRule":[16],"isSubmit":[4,"is-submit"],"isTextarea":[4,"is-textarea"],"rows":[2],"cols":[2],"requiredErrorMessage":[1,"required-error-message"],"minlengthErrorMessage":[1,"minlength-error-message"],"minErrorMessage":[1,"min-error-message"],"maxErrorMessage":[1,"max-error-message"],"emailErrorMessage":[1,"email-error-message"],"numberErrorMessage":[1,"number-error-message"],"chips":[4],"dataTest":[1,"data-test"],"isPressed":[32],"isPassword":[32],"validationMesage":[32],"validationDanger":[32],"setFocus":[64],"removeFocus":[64],"getInputElement":[64],"isValid":[64],"clear":[64]}],[0,"bds-counter-text",{"length":[1026],"max":[2],"active":[1028],"warning":[1040],"delete":[1040]}]]],["p-24c8c83b.system",[[6,"bds-input-chips",{"chips":[1025],"type":[1],"label":[1],"maxlength":[2],"icon":[513],"delimiters":[16],"errorMessage":[1025,"error-message"],"danger":[1540],"value":[1537],"duplicated":[4],"disableSubmit":[4,"disable-submit"],"disabled":[516],"helperMessage":[1,"helper-message"],"inputName":[1,"input-name"],"placeholder":[1],"dataTest":[1,"data-test"],"internalChips":[32],"isValid":[64],"get":[64],"clear":[64],"add":[64],"setFocus":[64],"removeFocus":[64]}]]],["p-92f842a5.system",[[1,"bds-banner",{"bannerAlign":[1,"banner-align"],"buttonClose":[1,"button-close"],"context":[1],"variant":[1],"visible":[32],"toggle":[64]}]]],["p-b1689ff7.system",[[6,"bds-toast-container"]]],["p-79290ec4.system",[[1,"bds-datepicker-period",{"startDate":[16],"endDate":[16],"startDateSelect":[1040],"endDateSelect":[1040],"language":[1],"week":[32],"months":[32],"years":[32],"monthActivated":[32],"yearActivated":[32],"animatePrev":[32],"animateNext":[32],"activeSelectYear":[32],"openSelectMonth":[32],"openSelectYear":[32],"monthsSlide":[32],"loadingSlide":[32],"clear":[64]}],[1,"bds-datepicker-single",{"endDate":[16],"startDate":[16],"dateSelect":[1040],"language":[1],"week":[32],"months":[32],"years":[32],"monthActivated":[32],"yearActivated":[32],"animatePrev":[32],"animateNext":[32],"openSelectMonth":[32],"openSelectYear":[32],"monthsSlide":[32],"loadingSlide":[32],"clear":[64]}]]],["p-b3c97430.system",[[1,"bds-chip-clickable",{"icon":[1],"avatar":[1],"color":[1],"size":[1],"clickable":[4],"close":[4],"disabled":[4],"dataTest":[1,"data-test"],"visible":[32]}]]],["p-35efefd9.system",[[1,"bds-button-icon",{"disabled":[4],"size":[1],"variant":[1],"icon":[513]}]]],["p-d9da5599.system",[[1,"bds-button",{"disabled":[4],"size":[1],"variant":[1],"icon":[513],"arrow":[4],"type":[1],"typeIcon":[513,"type-icon"],"bdsLoading":[4,"bds-loading"],"bdsLoadingVariant":[1,"bds-loading-variant"],"bdsLoadingColor":[1,"bds-loading-color"],"dataTest":[1,"data-test"]}],[0,"bds-loading-spinner",{"variant":[1],"size":[1],"color":[1],"svgContent":[32]}]]],["p-be77393d.system",[[6,"bds-select-option",{"value":[8],"selected":[4],"disabled":[4],"invisible":[1540],"danger":[1540],"bulkOption":[1,"bulk-option"],"slotAlign":[1,"slot-align"],"titleText":[1,"title-text"],"status":[1],"dataTest":[1,"data-test"]}]]]]'),e)}))}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function o(t){try{c(s.next(t))}catch(e){r(e)}}function a(t){try{c(s["throw"](t))}catch(e){r(e)}}function c(t){t.done?i(t.value):n(t.value).then(o,a)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(s)throw new TypeError("Generator is already executing.");while(i)try{if(s=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(a){o=[6,a];n=0}finally{s=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-045be029.system.js"],(function(t){"use strict";var e,i,s,n;return{setters:[function(t){e=t.r;i=t.c;s=t.h;n=t.g}],execute:function(){var r='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';var o=t("bds_select_chips",function(){function t(t){var s=this;e(this,t);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.isOpen=false;this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.errorMessage="";this.disabled=false;this.dataTest=null;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.onFocus=function(){s.bdsFocus.emit()};this.onBlur=function(){s.bdsBlur.emit()};this.toggle=function(){if(!s.disabled){s.isOpen=!s.isOpen}};this.handler=function(t){return __awaiter(s,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:e=t.detail.value;i=this.getText(e);return[4,this.addChip(i)];case 1:s.sent();return[2]}}))}))};this.getTextFromOption=function(t){var e,i;if((t===null||t===void 0?void 0:t.status)||(t===null||t===void 0?void 0:t.bulkOption)){if(s.internalOptions){var n=s.internalOptions.find((function(e){return e.value==t.value}));if(n){return n.label}}return t.querySelector("#bds-typo-label-".concat(t.value)).textContent}return(t===null||t===void 0?void 0:t.titleText)?t.titleText:(i=(e=t===null||t===void 0?void 0:t.textContent)===null||e===void 0?void 0:e.trim())!==null&&i!==void 0?i:""};this.getText=function(t){var e=s.childOptions.find((function(e){return e.value===t}));return s.getTextFromOption(e)};this.handlerNewOption=function(t){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.addChip(t)];case 1:e.sent();return[2]}}))}))};this.setFocusWrapper=function(){if(s.nativeInput){s.nativeInput.setFocus()}};this.removeFocusWrapper=function(t){var e=t.relatedTarget.localName==="bds-input-chips";if(s.nativeInput&&!e){s.nativeInput.removeFocus()}};this.keyPressWrapper=function(t){var e=t.target.localName==="bds-select";var i=t.target.localName==="bds-input-chips";switch(t.key){case"Enter":if(s.childOptionsEnabled.length===1){s.nativeInput.add(s.childOptionsEnabled[0].textContent)}else{if(!s.canAddNew){return}s.nativeInput.add(s.nativeInput.value)}s.nativeInput.value="";if(!s.isOpen&&(e||i)){s.toggle()}break}};this.changedInputValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:t.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:t.sent();t.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.handleChangeChipsValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.nativeInput.value="";return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))}}t.prototype.handleWindow=function(t){if(!this.el.contains(t.target)){this.isOpen=false}};t.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.nativeInput.isValid()]}))}))};t.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.nativeInput.get()];case 1:return[2,t.sent()]}}))}))};t.prototype.componentWillRender=function(){if(this.options.length){this.resetFilterOptions();try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(t){this.internalOptions=[]}}};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(s){for(t=0,e=this.childOptions;t<e.length;t++){i=e[t];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});t.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};t.prototype.addChip=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.nativeInput.add(t)];case 1:e.sent();this.nativeInput.value="";this.toggle();return[2]}}))}))};t.prototype.filterOptions=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!t)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:e=0,i=this.childOptions;l.label=3;case 3:if(!(e<i.length))return[3,6];s=i[e];r=this.existsChip;o=[s.textContent];return[4,this.nativeInput.get()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=t.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(t&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(t&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:e++;return[3,3];case 6:return[2]}}))}))};t.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,s,n,r;return __generator(this,(function(o){switch(o.label){case 0:t=0,e=this.childOptions;o.label=1;case 1:if(!(t<e.length))return[3,4];i=e[t];s=i.querySelector("bds-typo").textContent;n=this.existsChip;r=[s];return[4,this.nativeInput.get()];case 2:if(n.apply(this,r.concat([o.sent()]))){i.setAttribute("invisible","invisible")}else{i.removeAttribute("invisible")}o.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};t.prototype.existsChip=function(t,e){return e.some((function(e){return t===e}))};t.prototype.generateKey=function(t){return t.toLowerCase().replace(/ /g,"-")};t.prototype.render=function(){var t=this;var e=this.isOpen?"arrow-up":"arrow-down";var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(n){}}else{i=this.options}}return s("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},s("bds-input-chips",{ref:function(e){return t.nativeInput=e},onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":true,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},s("div",{slot:"input-right",class:"select__icon"},s("bds-icon",{size:"small",name:e,color:"inherit"}))),s("div",{class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(e){return s("bds-select-option",{key:t.generateKey(e.value),onOptionSelected:t.handler,value:e.value,status:e.status},e.label)})),s("slot",null),this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"option-add",value:"add",onClick:function(){return t.handlerNewOption(t.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());o.style=r}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function o(t){try{c(s.next(t))}catch(e){r(e)}}function a(t){try{c(s["throw"](t))}catch(e){r(e)}}function c(t){t.done?i(t.value):n(t.value).then(o,a)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(s)throw new TypeError("Generator is already executing.");while(i)try{if(s=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(a){o=[6,a];n=0}finally{s=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-045be029.system.js"],(function(t){"use strict";var e,i,s,n;return{setters:[function(t){e=t.r;i=t.c;s=t.h;n=t.g}],execute:function(){var r='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';var o=t("bds_select_chips",function(){function t(t){var s=this;e(this,t);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.isOpen=false;this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.errorMessage="";this.disabled=false;this.dataTest=null;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.onFocus=function(){s.bdsFocus.emit()};this.onBlur=function(){s.bdsBlur.emit()};this.toggle=function(){if(!s.disabled){s.isOpen=!s.isOpen}};this.handler=function(t){return __awaiter(s,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:e=t.detail.value;i=this.getText(e);return[4,this.addChip(i)];case 1:s.sent();return[2]}}))}))};this.getTextFromOption=function(t){var e,i;if((t===null||t===void 0?void 0:t.status)||(t===null||t===void 0?void 0:t.bulkOption)){if(s.internalOptions){var n=s.internalOptions.find((function(e){return e.value==t.value}));if(n){return n.label}}return t.querySelector("#bds-typo-label-".concat(t.value)).textContent}return(t===null||t===void 0?void 0:t.titleText)?t.titleText:(i=(e=t===null||t===void 0?void 0:t.textContent)===null||e===void 0?void 0:e.trim())!==null&&i!==void 0?i:""};this.getText=function(t){var e=s.childOptions.find((function(e){return e.value===t}));return s.getTextFromOption(e)};this.handlerNewOption=function(t){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.addChip(t)];case 1:e.sent();return[2]}}))}))};this.setFocusWrapper=function(){if(s.nativeInput){s.nativeInput.setFocus()}};this.removeFocusWrapper=function(t){var e=t.relatedTarget.localName==="bds-input-chips";if(s.nativeInput&&!e){s.nativeInput.removeFocus()}};this.keyPressWrapper=function(t){var e=t.target.localName==="bds-select";var i=t.target.localName==="bds-input-chips";switch(t.key){case"Enter":if(s.childOptionsEnabled.length===1){s.nativeInput.add(s.childOptionsEnabled[0].textContent)}else{if(!s.canAddNew){return}s.nativeInput.add(s.nativeInput.value)}s.nativeInput.value="";if(!s.isOpen&&(e||i)){s.toggle()}break}};this.changedInputValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:t.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:t.sent();t.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.handleChangeChipsValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.nativeInput.value="";return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))}}t.prototype.handleWindow=function(t){if(!this.el.contains(t.target)){this.isOpen=false}};t.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.nativeInput.isValid()]}))}))};t.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.nativeInput.get()];case 1:return[2,t.sent()]}}))}))};t.prototype.componentWillRender=function(){if(this.options.length){try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(t){this.internalOptions=[]}}};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(s){for(t=0,e=this.childOptions;t<e.length;t++){i=e[t];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});t.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};t.prototype.addChip=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.nativeInput.add(t)];case 1:e.sent();this.nativeInput.value="";this.toggle();return[2]}}))}))};t.prototype.filterOptions=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!t)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:e=0,i=this.childOptions;l.label=3;case 3:if(!(e<i.length))return[3,6];s=i[e];r=this.existsChip;o=[s.textContent];return[4,this.nativeInput.get()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=t.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(t&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(t&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:e++;return[3,3];case 6:return[2]}}))}))};t.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,s,n,r;return __generator(this,(function(o){switch(o.label){case 0:t=0,e=this.childOptions;o.label=1;case 1:if(!(t<e.length))return[3,4];i=e[t];s=i.querySelector("bds-typo").textContent;n=this.existsChip;r=[s];return[4,this.nativeInput.get()];case 2:if(n.apply(this,r.concat([o.sent()]))){i.setAttribute("invisible","invisible")}else{i.removeAttribute("invisible")}o.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};t.prototype.existsChip=function(t,e){return e.some((function(e){return t===e}))};t.prototype.generateKey=function(t){return t.toLowerCase().replace(/ /g,"-")};t.prototype.render=function(){var t=this;var e=this.isOpen?"arrow-up":"arrow-down";var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(n){}}else{i=this.options}}return s("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},s("bds-input-chips",{ref:function(e){return t.nativeInput=e},onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":true,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},s("div",{slot:"input-right",class:"select__icon"},s("bds-icon",{size:"small",name:e,color:"inherit"}))),s("div",{class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(e){return s("bds-select-option",{key:t.generateKey(e.value),onOptionSelected:t.handler,value:e.value,status:e.status},e.label)})),s("slot",null),this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"option-add",value:"add",onClick:function(){return t.handlerNewOption(t.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());o.style=r}}}));
@@ -178,7 +178,6 @@ const SelectChips = class {
178
178
  }
179
179
  componentWillRender() {
180
180
  if (this.options.length) {
181
- this.resetFilterOptions();
182
181
  try {
183
182
  this.internalOptions = typeof this.options === 'string' ? JSON.parse(this.options) : this.options;
184
183
  }
@@ -166,7 +166,6 @@ export class SelectChips {
166
166
  }
167
167
  componentWillRender() {
168
168
  if (this.options.length) {
169
- this.resetFilterOptions();
170
169
  try {
171
170
  this.internalOptions = typeof this.options === 'string' ? JSON.parse(this.options) : this.options;
172
171
  }
@@ -174,7 +174,6 @@ const SelectChips = class {
174
174
  }
175
175
  componentWillRender() {
176
176
  if (this.options.length) {
177
- this.resetFilterOptions();
178
177
  try {
179
178
  this.internalOptions = typeof this.options === 'string' ? JSON.parse(this.options) : this.options;
180
179
  }
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function o(t){try{c(s.next(t))}catch(e){r(e)}}function a(t){try{c(s["throw"](t))}catch(e){r(e)}}function c(t){t.done?i(t.value):n(t.value).then(o,a)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(s)throw new TypeError("Generator is already executing.");while(i)try{if(s=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(a){o=[6,a];n=0}finally{s=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-764473a3.js";var selectCss='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';var SelectChips=function(){function t(t){var e=this;registerInstance(this,t);this.bdsChange=createEvent(this,"bdsChange",7);this.bdsCancel=createEvent(this,"bdsCancel",7);this.bdsFocus=createEvent(this,"bdsFocus",7);this.bdsBlur=createEvent(this,"bdsBlur",7);this.isOpen=false;this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.errorMessage="";this.disabled=false;this.dataTest=null;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.onFocus=function(){e.bdsFocus.emit()};this.onBlur=function(){e.bdsBlur.emit()};this.toggle=function(){if(!e.disabled){e.isOpen=!e.isOpen}};this.handler=function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:e=t.detail.value;i=this.getText(e);return[4,this.addChip(i)];case 1:s.sent();return[2]}}))}))};this.getTextFromOption=function(t){var i,s;if((t===null||t===void 0?void 0:t.status)||(t===null||t===void 0?void 0:t.bulkOption)){if(e.internalOptions){var n=e.internalOptions.find((function(e){return e.value==t.value}));if(n){return n.label}}return t.querySelector("#bds-typo-label-".concat(t.value)).textContent}return(t===null||t===void 0?void 0:t.titleText)?t.titleText:(s=(i=t===null||t===void 0?void 0:t.textContent)===null||i===void 0?void 0:i.trim())!==null&&s!==void 0?s:""};this.getText=function(t){var i=e.childOptions.find((function(e){return e.value===t}));return e.getTextFromOption(i)};this.handlerNewOption=function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.addChip(t)];case 1:e.sent();return[2]}}))}))};this.setFocusWrapper=function(){if(e.nativeInput){e.nativeInput.setFocus()}};this.removeFocusWrapper=function(t){var i=t.relatedTarget.localName==="bds-input-chips";if(e.nativeInput&&!i){e.nativeInput.removeFocus()}};this.keyPressWrapper=function(t){var i=t.target.localName==="bds-select";var s=t.target.localName==="bds-input-chips";switch(t.key){case"Enter":if(e.childOptionsEnabled.length===1){e.nativeInput.add(e.childOptionsEnabled[0].textContent)}else{if(!e.canAddNew){return}e.nativeInput.add(e.nativeInput.value)}e.nativeInput.value="";if(!e.isOpen&&(i||s)){e.toggle()}break}};this.changedInputValue=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:t.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:t.sent();t.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.handleChangeChipsValue=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.nativeInput.value="";return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))}}t.prototype.handleWindow=function(t){if(!this.el.contains(t.target)){this.isOpen=false}};t.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.nativeInput.isValid()]}))}))};t.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.nativeInput.get()];case 1:return[2,t.sent()]}}))}))};t.prototype.componentWillRender=function(){if(this.options.length){this.resetFilterOptions();try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(t){this.internalOptions=[]}}};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(s){for(t=0,e=this.childOptions;t<e.length;t++){i=e[t];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});t.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};t.prototype.addChip=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.nativeInput.add(t)];case 1:e.sent();this.nativeInput.value="";this.toggle();return[2]}}))}))};t.prototype.filterOptions=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!t)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:e=0,i=this.childOptions;l.label=3;case 3:if(!(e<i.length))return[3,6];s=i[e];r=this.existsChip;o=[s.textContent];return[4,this.nativeInput.get()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=t.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(t&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(t&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:e++;return[3,3];case 6:return[2]}}))}))};t.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,s,n,r;return __generator(this,(function(o){switch(o.label){case 0:t=0,e=this.childOptions;o.label=1;case 1:if(!(t<e.length))return[3,4];i=e[t];s=i.querySelector("bds-typo").textContent;n=this.existsChip;r=[s];return[4,this.nativeInput.get()];case 2:if(n.apply(this,r.concat([o.sent()]))){i.setAttribute("invisible","invisible")}else{i.removeAttribute("invisible")}o.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};t.prototype.existsChip=function(t,e){return e.some((function(e){return t===e}))};t.prototype.generateKey=function(t){return t.toLowerCase().replace(/ /g,"-")};t.prototype.render=function(){var t=this;var e=this.isOpen?"arrow-up":"arrow-down";var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(s){}}else{i=this.options}}return h("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},h("bds-input-chips",{ref:function(e){return t.nativeInput=e},onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":true,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},h("div",{slot:"input-right",class:"select__icon"},h("bds-icon",{size:"small",name:e,color:"inherit"}))),h("div",{class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(e){return h("bds-select-option",{key:t.generateKey(e.value),onOptionSelected:t.handler,value:e.value,status:e.status},e.label)})),h("slot",null),this.canAddNew&&this.enableCreateOption()&&h("bds-select-option",{id:"option-add",value:"add",onClick:function(){return t.handlerNewOption(t.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&h("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SelectChips.style=selectCss;export{SelectChips as bds_select_chips};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function o(t){try{c(s.next(t))}catch(e){r(e)}}function a(t){try{c(s["throw"](t))}catch(e){r(e)}}function c(t){t.done?i(t.value):n(t.value).then(o,a)}c((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(o){if(s)throw new TypeError("Generator is already executing.");while(i)try{if(s=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(a){o=[6,a];n=0}finally{s=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-764473a3.js";var selectCss='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';var SelectChips=function(){function t(t){var e=this;registerInstance(this,t);this.bdsChange=createEvent(this,"bdsChange",7);this.bdsCancel=createEvent(this,"bdsCancel",7);this.bdsFocus=createEvent(this,"bdsFocus",7);this.bdsBlur=createEvent(this,"bdsBlur",7);this.isOpen=false;this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.errorMessage="";this.disabled=false;this.dataTest=null;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.onFocus=function(){e.bdsFocus.emit()};this.onBlur=function(){e.bdsBlur.emit()};this.toggle=function(){if(!e.disabled){e.isOpen=!e.isOpen}};this.handler=function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(s){switch(s.label){case 0:e=t.detail.value;i=this.getText(e);return[4,this.addChip(i)];case 1:s.sent();return[2]}}))}))};this.getTextFromOption=function(t){var i,s;if((t===null||t===void 0?void 0:t.status)||(t===null||t===void 0?void 0:t.bulkOption)){if(e.internalOptions){var n=e.internalOptions.find((function(e){return e.value==t.value}));if(n){return n.label}}return t.querySelector("#bds-typo-label-".concat(t.value)).textContent}return(t===null||t===void 0?void 0:t.titleText)?t.titleText:(s=(i=t===null||t===void 0?void 0:t.textContent)===null||i===void 0?void 0:i.trim())!==null&&s!==void 0?s:""};this.getText=function(t){var i=e.childOptions.find((function(e){return e.value===t}));return e.getTextFromOption(i)};this.handlerNewOption=function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.addChip(t)];case 1:e.sent();return[2]}}))}))};this.setFocusWrapper=function(){if(e.nativeInput){e.nativeInput.setFocus()}};this.removeFocusWrapper=function(t){var i=t.relatedTarget.localName==="bds-input-chips";if(e.nativeInput&&!i){e.nativeInput.removeFocus()}};this.keyPressWrapper=function(t){var i=t.target.localName==="bds-select";var s=t.target.localName==="bds-input-chips";switch(t.key){case"Enter":if(e.childOptionsEnabled.length===1){e.nativeInput.add(e.childOptionsEnabled[0].textContent)}else{if(!e.canAddNew){return}e.nativeInput.add(e.nativeInput.value)}e.nativeInput.value="";if(!e.isOpen&&(i||s)){e.toggle()}break}};this.changedInputValue=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:t.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:t.sent();t.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.handleChangeChipsValue=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.nativeInput.value="";return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))}}t.prototype.handleWindow=function(t){if(!this.el.contains(t.target)){this.isOpen=false}};t.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.nativeInput.isValid()]}))}))};t.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.nativeInput.get()];case 1:return[2,t.sent()]}}))}))};t.prototype.componentWillRender=function(){if(this.options.length){try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(t){this.internalOptions=[]}}};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i;return __generator(this,(function(s){for(t=0,e=this.childOptions;t<e.length;t++){i=e[t];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetFilterOptions()];case 1:t.sent();return[2]}}))}))};Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});t.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};t.prototype.addChip=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.nativeInput.add(t)];case 1:e.sent();this.nativeInput.value="";this.toggle();return[2]}}))}))};t.prototype.filterOptions=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!t)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:e=0,i=this.childOptions;l.label=3;case 3:if(!(e<i.length))return[3,6];s=i[e];r=this.existsChip;o=[s.textContent];return[4,this.nativeInput.get()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=t.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(t&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(t&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:e++;return[3,3];case 6:return[2]}}))}))};t.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,s,n,r;return __generator(this,(function(o){switch(o.label){case 0:t=0,e=this.childOptions;o.label=1;case 1:if(!(t<e.length))return[3,4];i=e[t];s=i.querySelector("bds-typo").textContent;n=this.existsChip;r=[s];return[4,this.nativeInput.get()];case 2:if(n.apply(this,r.concat([o.sent()]))){i.setAttribute("invisible","invisible")}else{i.removeAttribute("invisible")}o.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};t.prototype.existsChip=function(t,e){return e.some((function(e){return t===e}))};t.prototype.generateKey=function(t){return t.toLowerCase().replace(/ /g,"-")};t.prototype.render=function(){var t=this;var e=this.isOpen?"arrow-up":"arrow-down";var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(s){}}else{i=this.options}}return h("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},h("bds-input-chips",{ref:function(e){return t.nativeInput=e},onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":true,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},h("div",{slot:"input-right",class:"select__icon"},h("bds-icon",{size:"small",name:e,color:"inherit"}))),h("div",{class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(e){return h("bds-select-option",{key:t.generateKey(e.value),onOptionSelected:t.handler,value:e.value,status:e.status},e.label)})),h("slot",null),this.canAddNew&&this.enableCreateOption()&&h("bds-select-option",{id:"option-add",value:"add",onClick:function(){return t.handlerNewOption(t.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&h("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();SelectChips.style=selectCss;export{SelectChips as bds_select_chips};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blip-ds",
3
- "version": "1.188.0",
3
+ "version": "1.188.1",
4
4
  "description": "Blip Design System",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as i,g as e}from"./p-30ca8b9c.js";const c=class{constructor(i){s(this,i),this.bdsChange=t(this,"bdsChange",7),this.bdsCancel=t(this,"bdsCancel",7),this.bdsFocus=t(this,"bdsFocus",7),this.bdsBlur=t(this,"bdsBlur",7),this.isOpen=!1,this.options=[],this.chips=[],this.newPrefix="",this.value="",this.danger=!1,this.errorMessage="",this.disabled=!1,this.dataTest=null,this.label="",this.icon="",this.duplicated=!1,this.canAddNew=!0,this.notFoundMessage="No results found",this.onFocus=()=>{this.bdsFocus.emit()},this.onBlur=()=>{this.bdsBlur.emit()},this.toggle=()=>{this.disabled||(this.isOpen=!this.isOpen)},this.handler=async s=>{const{detail:{value:t}}=s,i=this.getText(t);await this.addChip(i)},this.getTextFromOption=s=>{var t,i;if((null==s?void 0:s.status)||(null==s?void 0:s.bulkOption)){if(this.internalOptions){const t=this.internalOptions.find((t=>t.value==s.value));if(t)return t.label}return s.querySelector(`#bds-typo-label-${s.value}`).textContent}return(null==s?void 0:s.titleText)?s.titleText:null!==(i=null===(t=null==s?void 0:s.textContent)||void 0===t?void 0:t.trim())&&void 0!==i?i:""},this.getText=s=>{const t=this.childOptions.find((t=>t.value===s));return this.getTextFromOption(t)},this.handlerNewOption=async s=>{await this.addChip(s)},this.setFocusWrapper=()=>{this.nativeInput&&this.nativeInput.setFocus()},this.removeFocusWrapper=s=>{this.nativeInput&&"bds-input-chips"!==s.relatedTarget.localName&&this.nativeInput.removeFocus()},this.keyPressWrapper=s=>{const t="bds-select"===s.target.localName,i="bds-input-chips"===s.target.localName;switch(s.key){case"Enter":if(1===this.childOptionsEnabled.length)this.nativeInput.add(this.childOptionsEnabled[0].textContent);else{if(!this.canAddNew)return;this.nativeInput.add(this.nativeInput.value)}this.nativeInput.value="",this.isOpen||!t&&!i||this.toggle()}},this.changedInputValue=async()=>{this.value=this.nativeInput.value,this.nativeInput.value?await this.filterOptions(this.nativeInput.value):await this.resetFilterOptions(),this.value&&!1===this.isOpen&&(this.isOpen=!0)},this.handleChangeChipsValue=async()=>{this.nativeInput.value="",await this.resetFilterOptions()}}handleWindow(s){this.el.contains(s.target)||(this.isOpen=!1)}async isValid(){return this.nativeInput.isValid()}async getChips(){return await this.nativeInput.get()}componentWillRender(){if(this.options.length){this.resetFilterOptions();try{this.internalOptions="string"==typeof this.options?JSON.parse(this.options):this.options}catch(s){this.internalOptions=[]}}}async connectedCallback(){for(const s of this.childOptions)s.addEventListener("optionSelected",this.handler)}async componentDidLoad(){await this.resetFilterOptions()}get childOptions(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))}get childOptionsEnabled(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))}enableCreateOption(){return!(0!==this.childOptionsEnabled.length||!this.nativeInput||!this.nativeInput.value)}async addChip(s){await this.nativeInput.add(s),this.nativeInput.value="",this.toggle()}async filterOptions(s){if(s)for(const t of this.childOptions){const i=this.existsChip(t.textContent,await this.nativeInput.get()),e=t.textContent.toLowerCase(),c=s.toLowerCase();i&&t.setAttribute("invisible","invisible"),s&&e.includes(c)&&!i&&t.removeAttribute("invisible"),!s||e.includes(c)||i||t.setAttribute("invisible","invisible")}else await this.resetFilterOptions()}async resetFilterOptions(){for(const s of this.childOptions){const t=s.querySelector("bds-typo").textContent;this.existsChip(t,await this.nativeInput.get())?s.setAttribute("invisible","invisible"):s.removeAttribute("invisible")}}existsChip(s,t){return t.some((t=>s===t))}generateKey(s){return s.toLowerCase().replace(/ /g,"-")}render(){const s=this.isOpen?"arrow-up":"arrow-down";let t=[];if(this.options)if("string"==typeof this.options)try{t=JSON.parse(this.options)}catch(e){}else t=this.options;return i("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},i("bds-input-chips",{ref:s=>this.nativeInput=s,onBdsChangeChips:this.handleChangeChipsValue,onBdsChange:this.changedInputValue,icon:this.icon,label:this.label,onFocus:this.onFocus,onBlur:this.onBlur,maxlength:this.maxlength,onClick:this.toggle,danger:this.danger,"error-message":this.errorMessage,chips:this.chips,"disable-submit":!0,delimiters:null,duplicated:this.duplicated,dataTest:this.dataTest},i("div",{slot:"input-right",class:"select__icon"},i("bds-icon",{size:"small",name:s,color:"inherit"}))),i("div",{class:{select__options:!0,"select__options--open":this.isOpen}},t.map((s=>i("bds-select-option",{key:this.generateKey(s.value),onOptionSelected:this.handler,value:s.value,status:s.status},s.label))),i("slot",null),this.canAddNew&&this.enableCreateOption()&&i("bds-select-option",{id:"option-add",value:"add",onClick:()=>this.handlerNewOption(this.nativeInput.value)},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&i("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))}get el(){return e(this)}};c.style='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-select-chips,300.sc-bds-select-chips;0.sc-bds-select-chips,400.sc-bds-select-chips;0.sc-bds-select-chips,600.sc-bds-select-chips;0.sc-bds-select-chips,700.sc-bds-select-chips;0.sc-bds-select-chips,800.sc-bds-select-chips;0.sc-bds-select-chips,900.sc-bds-select-chips;1.sc-bds-select-chips,200.sc-bds-select-chips;1.sc-bds-select-chips,300.sc-bds-select-chips;1.sc-bds-select-chips,400.sc-bds-select-chips;1.sc-bds-select-chips,600.sc-bds-select-chips;1.sc-bds-select-chips,700.sc-bds-select-chips;1.sc-bds-select-chips,800.sc-bds-select-chips;1.sc-bds-select-chips,900&display=swap").sc-bds-select-chips; .sc-bds-select-chips-h{display:block}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:#8ca0b3;display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:#f8fbfb;width:100%;max-height:250px;position:absolute;top:99%;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;margin-top:4px;-webkit-transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s;transition:transform 0.25s, opacity 0.75s, visibility 0.75s, -webkit-transform 0.25s;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:scaleY(0);transform:scaleY(0);visibility:hidden;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{visibility:visible;-webkit-transform:scale(1);transform:scale(1);opacity:1}.select__options--position-top.sc-bds-select-chips{top:auto;bottom:100%;-webkit-transform-origin:bottom left;transform-origin:bottom left}';export{c as bds_select_chips}