diff --git a/build/index.esm.js b/build/index.esm.js index f9bc460b..e7346d5b 100644 --- a/build/index.esm.js +++ b/build/index.esm.js @@ -6,5 +6,5 @@ import{c as t,a as i,b as s,o}from"./p-85d057f0.js";export{C as CatI18nRegistry, * * Copyright (C) 2018 Varun A P */ -(function(i,s){if(t.exports){t.exports=s()}else{i.Toastify=s()}})(i,(function(t){var i=function(t){return new i.lib.init(t)},s="1.12.0";i.defaults={oldestFirst:true,text:"Toastify is awesome!",node:undefined,duration:3e3,selector:undefined,callback:function(){},destination:undefined,newWindow:false,close:false,gravity:"toastify-top",positionLeft:false,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:true,onClick:function(){},offset:{x:0,y:0},escapeMarkup:true,ariaLive:"polite",style:{background:""}};i.lib=i.prototype={toastify:s,constructor:i,init:function(t){if(!t){t={}}this.options={};this.toastElement=null;this.options.text=t.text||i.defaults.text;this.options.node=t.node||i.defaults.node;this.options.duration=t.duration===0?0:t.duration||i.defaults.duration;this.options.selector=t.selector||i.defaults.selector;this.options.callback=t.callback||i.defaults.callback;this.options.destination=t.destination||i.defaults.destination;this.options.newWindow=t.newWindow||i.defaults.newWindow;this.options.close=t.close||i.defaults.close;this.options.gravity=t.gravity==="bottom"?"toastify-bottom":i.defaults.gravity;this.options.positionLeft=t.positionLeft||i.defaults.positionLeft;this.options.position=t.position||i.defaults.position;this.options.backgroundColor=t.backgroundColor||i.defaults.backgroundColor;this.options.avatar=t.avatar||i.defaults.avatar;this.options.className=t.className||i.defaults.className;this.options.stopOnFocus=t.stopOnFocus===undefined?i.defaults.stopOnFocus:t.stopOnFocus;this.options.onClick=t.onClick||i.defaults.onClick;this.options.offset=t.offset||i.defaults.offset;this.options.escapeMarkup=t.escapeMarkup!==undefined?t.escapeMarkup:i.defaults.escapeMarkup;this.options.ariaLive=t.ariaLive||i.defaults.ariaLive;this.options.style=t.style||i.defaults.style;if(t.backgroundColor){this.options.style.background=t.backgroundColor}return this},buildToast:function(){if(!this.options){throw"Toastify is not initialized"}var t=document.createElement("div");t.className="toastify on "+this.options.className;if(!!this.options.position){t.className+=" toastify-"+this.options.position}else{if(this.options.positionLeft===true){t.className+=" toastify-left";console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")}else{t.className+=" toastify-right"}}t.className+=" "+this.options.gravity;if(this.options.backgroundColor){console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.')}for(var i in this.options.style){t.style[i]=this.options.style[i]}if(this.options.ariaLive){t.setAttribute("aria-live",this.options.ariaLive)}if(this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE){t.appendChild(this.options.node)}else{if(this.options.escapeMarkup){t.innerText=this.options.text}else{t.innerHTML=this.options.text}if(this.options.avatar!==""){var s=document.createElement("img");s.src=this.options.avatar;s.className="toastify-avatar";if(this.options.position=="left"||this.options.positionLeft===true){t.appendChild(s)}else{t.insertAdjacentElement("afterbegin",s)}}}if(this.options.close===true){var o=document.createElement("button");o.type="button";o.setAttribute("aria-label","Close");o.className="toast-close";o.innerHTML="✖";o.addEventListener("click",function(t){t.stopPropagation();this.removeElement(this.toastElement);window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;if((this.options.position=="left"||this.options.positionLeft===true)&&n>360){t.insertAdjacentElement("afterbegin",o)}else{t.appendChild(o)}}if(this.options.stopOnFocus&&this.options.duration>0){var a=this;t.addEventListener("mouseover",(function(i){window.clearTimeout(t.timeOutValue)}));t.addEventListener("mouseleave",(function(){t.timeOutValue=window.setTimeout((function(){a.removeElement(t)}),a.options.duration)}))}if(typeof this.options.destination!=="undefined"){t.addEventListener("click",function(t){t.stopPropagation();if(this.options.newWindow===true){window.open(this.options.destination,"_blank")}else{window.location=this.options.destination}}.bind(this))}if(typeof this.options.onClick==="function"&&typeof this.options.destination==="undefined"){t.addEventListener("click",function(t){t.stopPropagation();this.options.onClick()}.bind(this))}if(typeof this.options.offset==="object"){var r=e("x",this.options);var f=e("y",this.options);var c=this.options.position=="left"?r:"-"+r;var h=this.options.gravity=="toastify-top"?f:"-"+f;t.style.transform="translate("+c+","+h+")"}return t},showToast:function(){this.toastElement=this.buildToast();var t;if(typeof this.options.selector==="string"){t=document.getElementById(this.options.selector)}else if(this.options.selector instanceof HTMLElement||typeof ShadowRoot!=="undefined"&&this.options.selector instanceof ShadowRoot){t=this.options.selector}else{t=document.body}if(!t){throw"Root element is not defined"}var s=i.defaults.oldestFirst?t.firstChild:t.lastChild;t.insertBefore(this.toastElement,s);i.reposition();if(this.options.duration>0){this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)}return this},hideToast:function(){if(this.toastElement.timeOutValue){clearTimeout(this.toastElement.timeOutValue)}this.removeElement(this.toastElement)},removeElement:function(t){t.className=t.className.replace(" on","");window.setTimeout(function(){if(this.options.node&&this.options.node.parentNode){this.options.node.parentNode.removeChild(this.options.node)}if(t.parentNode){t.parentNode.removeChild(t)}this.options.callback.call(t);i.reposition()}.bind(this),400)}};i.reposition=function(){var t={top:15,bottom:15};var i={top:15,bottom:15};var s={top:15,bottom:15};var e=document.getElementsByClassName("toastify");var n;for(var a=0;a0?window.innerWidth:screen.width;if(c<=360){e[a].style[n]=s[n]+"px";s[n]+=r+f}else{if(o(e[a],"toastify-left")===true){e[a].style[n]=t[n]+"px";t[n]+=r+f}else{e[a].style[n]=i[n]+"px";i[n]+=r+f}}}return this};function e(t,i){if(i.offset[t]){if(isNaN(i.offset[t])){return i.offset[t]}else{return i.offset[t]+"px"}}return"0px"}function o(t,i){if(!t||typeof i!=="string"){return false}else if(t.className&&t.className.trim().split(/\s+/gi).indexOf(i)>-1){return true}else{return false}}i.lib.init.prototype=i.lib;return i}))}));class a{constructor(){}static getInstance(){if(!a.instance){a.instance=new a}return a.instance}show(t,i){const s={};const e=this.getNode(t,s,i);const o=this.getOptions(e,s,i);const a=n(o);s.toast=a;a.showToast();return()=>a.hideToast()}getNode(t,i,e){const o=document.createElement("template");o.innerHTML=`
\n ${e?.icon?``:""}\n
\n
\n ${e?.action?`${e.action}`:""}\n
\n ${e?.autoClose===false?``:""}\n
`;const n=o.content.firstElementChild;n.querySelector(".cat-toastify-close")?.addEventListener("click",(()=>i.toast?.hideToast()));n.querySelector(".cat-toastify-action")?.addEventListener("click",(()=>e?.onAction?.(i)));const a=n.querySelector(".cat-toastify-inner");if(a){if(typeof t!=="string"){a.replaceChildren(t)}else if(e?.escapeMarkup===false){a.innerHTML=t}else{a.innerText=t}}return n}getOptions(t,i,s){const[e,o]=s?.placement?.split("-")??["bottom","left"];const n=s?.duration??(s?.autoClose===false?-1:a.duration);return{gravity:e,position:o,node:t,duration:n,close:false,className:s?.mode==="light"?"cat-toastify":"cat-toastify cat-toastify-dark",stopOnFocus:true,onClick:()=>s?.onClick?.(i),callback:()=>s?.onDismiss?.(i),offset:{x:"1rem",y:"1rem"}}}}a.duration=3e3;const r=a.getInstance();function f(t){const i=t=>({id:t,name:t});return{resolve:s=>o(t.filter((t=>s.includes(t))).map(i)),retrieve:s=>o({content:t.filter((t=>t.toLowerCase().includes(s.toLowerCase()))).map(i),last:true,totalElements:t.length}),render:t=>({label:t.name})}}export{a as CatNotificationService,r as catNotificationService,f as stringArrayConnector}; +(function(i,s){if(t.exports){t.exports=s()}else{i.Toastify=s()}})(i,(function(t){var i=function(t){return new i.lib.init(t)},s="1.12.0";i.defaults={oldestFirst:true,text:"Toastify is awesome!",node:undefined,duration:3e3,selector:undefined,callback:function(){},destination:undefined,newWindow:false,close:false,gravity:"toastify-top",positionLeft:false,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:true,onClick:function(){},offset:{x:0,y:0},escapeMarkup:true,ariaLive:"polite",style:{background:""}};i.lib=i.prototype={toastify:s,constructor:i,init:function(t){if(!t){t={}}this.options={};this.toastElement=null;this.options.text=t.text||i.defaults.text;this.options.node=t.node||i.defaults.node;this.options.duration=t.duration===0?0:t.duration||i.defaults.duration;this.options.selector=t.selector||i.defaults.selector;this.options.callback=t.callback||i.defaults.callback;this.options.destination=t.destination||i.defaults.destination;this.options.newWindow=t.newWindow||i.defaults.newWindow;this.options.close=t.close||i.defaults.close;this.options.gravity=t.gravity==="bottom"?"toastify-bottom":i.defaults.gravity;this.options.positionLeft=t.positionLeft||i.defaults.positionLeft;this.options.position=t.position||i.defaults.position;this.options.backgroundColor=t.backgroundColor||i.defaults.backgroundColor;this.options.avatar=t.avatar||i.defaults.avatar;this.options.className=t.className||i.defaults.className;this.options.stopOnFocus=t.stopOnFocus===undefined?i.defaults.stopOnFocus:t.stopOnFocus;this.options.onClick=t.onClick||i.defaults.onClick;this.options.offset=t.offset||i.defaults.offset;this.options.escapeMarkup=t.escapeMarkup!==undefined?t.escapeMarkup:i.defaults.escapeMarkup;this.options.ariaLive=t.ariaLive||i.defaults.ariaLive;this.options.style=t.style||i.defaults.style;if(t.backgroundColor){this.options.style.background=t.backgroundColor}return this},buildToast:function(){if(!this.options){throw"Toastify is not initialized"}var t=document.createElement("div");t.className="toastify on "+this.options.className;if(!!this.options.position){t.className+=" toastify-"+this.options.position}else{if(this.options.positionLeft===true){t.className+=" toastify-left";console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")}else{t.className+=" toastify-right"}}t.className+=" "+this.options.gravity;if(this.options.backgroundColor){console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.')}for(var i in this.options.style){t.style[i]=this.options.style[i]}if(this.options.ariaLive){t.setAttribute("aria-live",this.options.ariaLive)}if(this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE){t.appendChild(this.options.node)}else{if(this.options.escapeMarkup){t.innerText=this.options.text}else{t.innerHTML=this.options.text}if(this.options.avatar!==""){var s=document.createElement("img");s.src=this.options.avatar;s.className="toastify-avatar";if(this.options.position=="left"||this.options.positionLeft===true){t.appendChild(s)}else{t.insertAdjacentElement("afterbegin",s)}}}if(this.options.close===true){var o=document.createElement("button");o.type="button";o.setAttribute("aria-label","Close");o.className="toast-close";o.innerHTML="✖";o.addEventListener("click",function(t){t.stopPropagation();this.removeElement(this.toastElement);window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;if((this.options.position=="left"||this.options.positionLeft===true)&&n>360){t.insertAdjacentElement("afterbegin",o)}else{t.appendChild(o)}}if(this.options.stopOnFocus&&this.options.duration>0){var a=this;t.addEventListener("mouseover",(function(i){window.clearTimeout(t.timeOutValue)}));t.addEventListener("mouseleave",(function(){t.timeOutValue=window.setTimeout((function(){a.removeElement(t)}),a.options.duration)}))}if(typeof this.options.destination!=="undefined"){t.addEventListener("click",function(t){t.stopPropagation();if(this.options.newWindow===true){window.open(this.options.destination,"_blank")}else{window.location=this.options.destination}}.bind(this))}if(typeof this.options.onClick==="function"&&typeof this.options.destination==="undefined"){t.addEventListener("click",function(t){t.stopPropagation();this.options.onClick()}.bind(this))}if(typeof this.options.offset==="object"){var r=e("x",this.options);var f=e("y",this.options);var c=this.options.position=="left"?r:"-"+r;var l=this.options.gravity=="toastify-top"?f:"-"+f;t.style.transform="translate("+c+","+l+")"}return t},showToast:function(){this.toastElement=this.buildToast();var t;if(typeof this.options.selector==="string"){t=document.getElementById(this.options.selector)}else if(this.options.selector instanceof HTMLElement||typeof ShadowRoot!=="undefined"&&this.options.selector instanceof ShadowRoot){t=this.options.selector}else{t=document.body}if(!t){throw"Root element is not defined"}var s=i.defaults.oldestFirst?t.firstChild:t.lastChild;t.insertBefore(this.toastElement,s);i.reposition();if(this.options.duration>0){this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)}return this},hideToast:function(){if(this.toastElement.timeOutValue){clearTimeout(this.toastElement.timeOutValue)}this.removeElement(this.toastElement)},removeElement:function(t){t.className=t.className.replace(" on","");window.setTimeout(function(){if(this.options.node&&this.options.node.parentNode){this.options.node.parentNode.removeChild(this.options.node)}if(t.parentNode){t.parentNode.removeChild(t)}this.options.callback.call(t);i.reposition()}.bind(this),400)}};i.reposition=function(){var t={top:15,bottom:15};var i={top:15,bottom:15};var s={top:15,bottom:15};var e=document.getElementsByClassName("toastify");var n;for(var a=0;a0?window.innerWidth:screen.width;if(c<=360){e[a].style[n]=s[n]+"px";s[n]+=r+f}else{if(o(e[a],"toastify-left")===true){e[a].style[n]=t[n]+"px";t[n]+=r+f}else{e[a].style[n]=i[n]+"px";i[n]+=r+f}}}return this};function e(t,i){if(i.offset[t]){if(isNaN(i.offset[t])){return i.offset[t]}else{return i.offset[t]+"px"}}return"0px"}function o(t,i){if(!t||typeof i!=="string"){return false}else if(t.className&&t.className.trim().split(/\s+/gi).indexOf(i)>-1){return true}else{return false}}i.lib.init.prototype=i.lib;return i}))}));class a{constructor(){}static getInstance(){if(!a.instance){a.instance=new a}return a.instance}show(t,i){const s={};const e=this.getNode(t,s,i);const o=this.getOptions(e,s,i);const a=n(o);s.toast=a;a.showToast();return()=>a.hideToast()}getNode(t,i,e){const o=document.createElement("template");o.innerHTML=`
\n ${e?.icon?``:""}\n
\n
\n ${e?.action?`${e.action}`:""}\n
\n ${e?.autoClose===false?``:""}\n
`;const n=o.content.firstElementChild;n.querySelector(".cat-toastify-close")?.addEventListener("click",(()=>i.toast?.hideToast()));n.querySelector(".cat-toastify-action")?.addEventListener("click",(()=>e?.onAction?.(i)));const a=n.querySelector(".cat-toastify-inner");if(a){if(typeof t!=="string"){a.replaceChildren(t)}else if(e?.escapeMarkup===false){a.innerHTML=t}else{a.innerText=t}}return n}getOptions(t,i,s){const[e,o]=s?.placement?.split("-")??["bottom","left"];const n=s?.duration??(s?.autoClose===false?-1:a.duration);return{gravity:e,position:o,node:t,duration:n,close:false,className:s?.mode==="light"?"cat-toastify":"cat-toastify cat-toastify-dark",stopOnFocus:true,onClick:()=>s?.onClick?.(i),callback:()=>s?.onDismiss?.(i),offset:{x:"1rem",y:"1rem"}}}}a.duration=3e3;const r=a.getInstance();function f(t){return{resolve:i=>o(t.filter((({id:t})=>i.includes(t)))),retrieve:i=>o({content:t.filter((({id:t})=>t.toLowerCase().includes(i.toLowerCase()))),last:true,totalElements:t.length}),render:({label:t})=>({label:t})}}function c(t){const i=t.map((t=>({id:t,label:t})));return f(i)}function l(t){const i=Array.from(t).map((([t,i])=>({id:t,label:i})));return f(i)}export{a as CatNotificationService,r as catNotificationService,f as objectArrayConnector,c as stringArrayConnector,l as stringMapConnector}; //# sourceMappingURL=index.esm.js.map \ No newline at end of file diff --git a/build/index.esm.js.map b/build/index.esm.js.map index c9c0dbda..3003794e 100644 --- a/build/index.esm.js.map +++ b/build/index.esm.js.map @@ -1 +1 @@ -{"version":3,"names":["root","factory","module","exports","Toastify","this","global","options","lib","init","version","defaults","oldestFirst","text","node","undefined","duration","selector","callback","destination","newWindow","close","gravity","positionLeft","position","backgroundColor","avatar","className","stopOnFocus","onClick","offset","x","y","escapeMarkup","ariaLive","style","background","prototype","toastify","constructor","toastElement","buildToast","divElement","document","createElement","console","warn","property","setAttribute","nodeType","Node","ELEMENT_NODE","appendChild","innerText","innerHTML","avatarElement","src","insertAdjacentElement","closeElement","type","addEventListener","event","stopPropagation","removeElement","window","clearTimeout","timeOutValue","bind","width","innerWidth","screen","self","setTimeout","open","location","getAxisOffsetAValue","xOffset","yOffset","transform","showToast","rootElement","getElementById","HTMLElement","ShadowRoot","body","elementToInsert","firstChild","lastChild","insertBefore","reposition","hideToast","replace","parentNode","removeChild","call","topLeftOffsetSize","top","bottom","topRightOffsetSize","offsetSize","allToasts","getElementsByClassName","classUsed","i","length","containsClass","height","offsetHeight","substr","axis","isNaN","elem","yourClass","trim","split","indexOf","CatNotificationService","getInstance","instance","show","content","ref","toastContent","getNode","toastOptions","getOptions","toast","template","icon","action","autoClose","i18n","t","firstElementChild","querySelector","onAction","inner","replaceChildren","placement","mode","onDismiss","catNotificationService","stringArrayConnector","data","toItem","id","name","resolve","ids","of","filter","includes","map","retrieve","term","toLowerCase","last","totalElements","render","item","label"],"sources":["../node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.js","src/components/cat-notification/cat-notification.tsx","src/components/cat-select/connectors.ts"],"sourcesContent":["/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n(function(root, factory) {\n if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.Toastify = factory();\n }\n})(this, function(global) {\n // Object initialization\n var Toastify = function(options) {\n // Returning a new init object\n return new Toastify.lib.init(options);\n },\n // Library version\n version = \"1.12.0\";\n\n // Set the default global options\n Toastify.defaults = {\n oldestFirst: true,\n text: \"Toastify is awesome!\",\n node: undefined,\n duration: 3000,\n selector: undefined,\n callback: function () {\n },\n destination: undefined,\n newWindow: false,\n close: false,\n gravity: \"toastify-top\",\n positionLeft: false,\n position: '',\n backgroundColor: '',\n avatar: \"\",\n className: \"\",\n stopOnFocus: true,\n onClick: function () {\n },\n offset: {x: 0, y: 0},\n escapeMarkup: true,\n ariaLive: 'polite',\n style: {background: ''}\n };\n\n // Defining the prototype of the object\n Toastify.lib = Toastify.prototype = {\n toastify: version,\n\n constructor: Toastify,\n\n // Initializing the object with required parameters\n init: function(options) {\n // Verifying and validating the input object\n if (!options) {\n options = {};\n }\n\n // Creating the options object\n this.options = {};\n\n this.toastElement = null;\n\n // Validating the options\n this.options.text = options.text || Toastify.defaults.text; // Display message\n this.options.node = options.node || Toastify.defaults.node; // Display content as node\n this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration\n this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector\n this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display\n this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination\n this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window\n this.options.close = options.close || Toastify.defaults.close; // Show toast close icon\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : Toastify.defaults.gravity; // toast position - top or bottom\n this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right\n this.options.position = options.position || Toastify.defaults.position; // toast position - left or right\n this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color\n this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path\n this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast\n this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus\n this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click\n this.options.offset = options.offset || Toastify.defaults.offset; // toast offset\n this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;\n this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;\n this.options.style = options.style || Toastify.defaults.style;\n if(options.backgroundColor) {\n this.options.style.background = options.backgroundColor;\n }\n\n // Returning the current object for chaining functions\n return this;\n },\n\n // Building the DOM element\n buildToast: function() {\n // Validating if the options are defined\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n\n // Creating the DOM object\n var divElement = document.createElement(\"div\");\n divElement.className = \"toastify on \" + this.options.className;\n\n // Positioning toast to left or right or center\n if (!!this.options.position) {\n divElement.className += \" toastify-\" + this.options.position;\n } else {\n // To be depreciated in further versions\n if (this.options.positionLeft === true) {\n divElement.className += \" toastify-left\";\n console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')\n } else {\n // Default position\n divElement.className += \" toastify-right\";\n }\n }\n\n // Assigning gravity of element\n divElement.className += \" \" + this.options.gravity;\n\n if (this.options.backgroundColor) {\n // This is being deprecated in favor of using the style HTML DOM property\n console.warn('DEPRECATION NOTICE: \"backgroundColor\" is being deprecated. Please use the \"style.background\" property.');\n }\n\n // Loop through our style object and apply styles to divElement\n for (var property in this.options.style) {\n divElement.style[property] = this.options.style[property];\n }\n\n // Announce the toast to screen readers\n if (this.options.ariaLive) {\n divElement.setAttribute('aria-live', this.options.ariaLive)\n }\n\n // Adding the toast message/node\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n // If we have a valid node, we insert it\n divElement.appendChild(this.options.node)\n } else {\n if (this.options.escapeMarkup) {\n divElement.innerText = this.options.text;\n } else {\n divElement.innerHTML = this.options.text;\n }\n\n if (this.options.avatar !== \"\") {\n var avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n\n avatarElement.className = \"toastify-avatar\";\n\n if (this.options.position == \"left\" || this.options.positionLeft === true) {\n // Adding close icon on the left of content\n divElement.appendChild(avatarElement);\n } else {\n // Adding close icon on the right of content\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n\n // Adding a close icon to the toast\n if (this.options.close === true) {\n // Create a span for close element\n var closeElement = document.createElement(\"button\");\n closeElement.type = \"button\";\n closeElement.setAttribute(\"aria-label\", \"Close\");\n closeElement.className = \"toast-close\";\n closeElement.innerHTML = \"✖\";\n\n // Triggering the removal of toast from DOM on close click\n closeElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }.bind(this)\n );\n\n //Calculating screen width\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Adding the close icon to the toast element\n // Display on the right if screen width is less than or equal to 360px\n if ((this.options.position == \"left\" || this.options.positionLeft === true) && width > 360) {\n // Adding close icon on the left of content\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n // Adding close icon on the right of content\n divElement.appendChild(closeElement);\n }\n }\n\n // Clear timeout while toast is focused\n if (this.options.stopOnFocus && this.options.duration > 0) {\n var self = this;\n // stop countdown\n divElement.addEventListener(\n \"mouseover\",\n function(event) {\n window.clearTimeout(divElement.timeOutValue);\n }\n )\n // add back the timeout\n divElement.addEventListener(\n \"mouseleave\",\n function() {\n divElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n self.removeElement(divElement);\n },\n self.options.duration\n )\n }\n )\n }\n\n // Adding an on-click destination path\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }.bind(this)\n );\n }\n\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.options.onClick();\n }.bind(this)\n );\n }\n\n // Adding offset\n if(typeof this.options.offset === \"object\") {\n\n var x = getAxisOffsetAValue(\"x\", this.options);\n var y = getAxisOffsetAValue(\"y\", this.options);\n\n var xOffset = this.options.position == \"left\" ? x : \"-\" + x;\n var yOffset = this.options.gravity == \"toastify-top\" ? y : \"-\" + y;\n\n divElement.style.transform = \"translate(\" + xOffset + \",\" + yOffset + \")\";\n\n }\n\n // Returning the generated element\n return divElement;\n },\n\n // Displaying the toast\n showToast: function() {\n // Creating the DOM object for the toast\n this.toastElement = this.buildToast();\n\n // Getting the root element to with the toast needs to be added\n var rootElement;\n if (typeof this.options.selector === \"string\") {\n rootElement = document.getElementById(this.options.selector);\n } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {\n rootElement = this.options.selector;\n } else {\n rootElement = document.body;\n }\n\n // Validating if root element is present in DOM\n if (!rootElement) {\n throw \"Root element is not defined\";\n }\n\n // Adding the DOM element\n var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;\n rootElement.insertBefore(this.toastElement, elementToInsert);\n\n // Repositioning the toasts in case multiple toasts are present\n Toastify.reposition();\n\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n this.removeElement(this.toastElement);\n }.bind(this),\n this.options.duration\n ); // Binding `this` for function invocation\n }\n\n // Supporting function chaining\n return this;\n },\n\n hideToast: function() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this.removeElement(this.toastElement);\n },\n\n // Removing the element from the DOM\n removeElement: function(toastElement) {\n // Hiding the element\n // toastElement.classList.remove(\"on\");\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n\n // Removing the element from DOM after transition end\n window.setTimeout(\n function() {\n // remove options node if any\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n\n // Remove the element from the DOM, only when the parent node was not removed before.\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n\n // Calling the callback function\n this.options.callback.call(toastElement);\n\n // Repositioning the toasts again\n Toastify.reposition();\n }.bind(this),\n 400\n ); // Binding `this` for function invocation\n },\n };\n\n // Positioning the toasts on the DOM\n Toastify.reposition = function() {\n\n // Top margins with gravity\n var topLeftOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var topRightOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var offsetSize = {\n top: 15,\n bottom: 15,\n };\n\n // Get all toast messages on the DOM\n var allToasts = document.getElementsByClassName(\"toastify\");\n\n var classUsed;\n\n // Modifying the position of each toast element\n for (var i = 0; i < allToasts.length; i++) {\n // Getting the applied gravity\n if (containsClass(allToasts[i], \"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n\n var height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length-1)\n // Spacing between toasts\n var offset = 15;\n\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Show toast in center if screen with less than or equal to 360px\n if (width <= 360) {\n // Setting the position\n allToasts[i].style[classUsed] = offsetSize[classUsed] + \"px\";\n\n offsetSize[classUsed] += height + offset;\n } else {\n if (containsClass(allToasts[i], \"toastify-left\") === true) {\n // Setting the position\n allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + \"px\";\n\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n // Setting the position\n allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + \"px\";\n\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n\n // Supporting function chaining\n return this;\n };\n\n // Helper function to get offset.\n function getAxisOffsetAValue(axis, options) {\n\n if(options.offset[axis]) {\n if(isNaN(options.offset[axis])) {\n return options.offset[axis];\n }\n else {\n return options.offset[axis] + 'px';\n }\n }\n\n return '0px';\n\n }\n\n function containsClass(elem, yourClass) {\n if (!elem || typeof yourClass !== \"string\") {\n return false;\n } else if (\n elem.className &&\n elem.className\n .trim()\n .split(/\\s+/gi)\n .indexOf(yourClass) > -1\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n // Setting up the prototype for the init object\n Toastify.lib.init.prototype = Toastify.lib;\n\n // Returning the Toastify function to be assigned to the window object/module\n return Toastify;\n});\n","import Toastify, { Options } from 'toastify-js';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\ninterface ToastRef {\n toast?: {\n showToast: () => void;\n hideToast: () => void;\n };\n}\n\nexport interface ToastOptions {\n /** The appearance mode of the notification. (Default: `dark`) */\n mode: 'dark' | 'light';\n /** An optional icon to appear in the notification. */\n icon: string;\n /** The placement of the notification on screen. (Default: `bottom-left`) */\n placement: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';\n /** Enables auto-closing of the notification. (Default: `true`) */\n autoClose: boolean;\n /** The duration in ms for the notification to be visible on screen. (Default: `3000`) */\n duration: number;\n /** An optional label for an action button. */\n action: string;\n /** Enable markup escape and sanitise HTML input. (Default: true) */\n escapeMarkup: boolean;\n /** Callback executed when the action button is clicked. Receives a reference to the notification as first argument. */\n onAction: (toast: ToastRef) => void;\n /** Callback executed when the notification is clicked. Receives a reference to the notification as first argument. */\n onClick: (toast: ToastRef) => void;\n /** Callback executed when the notification is dismissed. Receives a reference to the notification as first argument. */\n onDismiss: (toast: ToastRef) => void;\n}\n\nexport class CatNotificationService {\n private static instance: CatNotificationService;\n private static duration = 3000;\n\n private constructor() {\n // hide constructor\n }\n\n static getInstance(): CatNotificationService {\n if (!CatNotificationService.instance) {\n CatNotificationService.instance = new CatNotificationService();\n }\n return CatNotificationService.instance;\n }\n\n show(content: string | Node, options?: Partial): () => void {\n const ref: ToastRef = {};\n const toastContent = this.getNode(content, ref, options);\n const toastOptions = this.getOptions(toastContent, ref, options);\n const toast = Toastify(toastOptions);\n ref.toast = toast;\n toast.showToast();\n return () => toast.hideToast();\n }\n\n private getNode(content: string | Node, ref: ToastRef, options?: Partial): HTMLElement {\n const template = document.createElement('template');\n template.innerHTML = `
\n ${options?.icon ? `` : ''}\n
\n
\n ${\n options?.action\n ? `${options.action}`\n : ''\n }\n
\n ${\n options?.autoClose === false\n ? ``\n : ''\n }\n
`;\n\n const node = template.content.firstElementChild as HTMLElement;\n node.querySelector('.cat-toastify-close')?.addEventListener('click', () => ref.toast?.hideToast());\n node.querySelector('.cat-toastify-action')?.addEventListener('click', () => options?.onAction?.(ref));\n const inner = node.querySelector('.cat-toastify-inner');\n if (inner) {\n if (typeof content !== 'string') {\n inner.replaceChildren(content);\n } else if (options?.escapeMarkup === false) {\n inner.innerHTML = content;\n } else {\n inner.innerText = content;\n }\n }\n\n return node;\n }\n\n private getOptions(node: Node, ref: ToastRef, options?: Partial): Options {\n const [gravity, position] = (options?.placement?.split('-') ?? ['bottom', 'left']) as [\n Options['gravity'],\n Options['position']\n ];\n const duration = options?.duration ?? (options?.autoClose === false ? -1 : CatNotificationService.duration);\n return {\n gravity,\n position,\n node,\n duration,\n close: false,\n className: options?.mode === 'light' ? 'cat-toastify' : 'cat-toastify cat-toastify-dark',\n stopOnFocus: true,\n onClick: () => options?.onClick?.(ref),\n callback: () => options?.onDismiss?.(ref),\n offset: {\n x: '1rem',\n y: '1rem'\n }\n };\n }\n}\n\nexport const catNotificationService = CatNotificationService.getInstance();\n","import { of } from 'rxjs';\nimport { CatSelectConnector } from './cat-select';\n\n/**\n * Creates a connector that resolves local string array data.\n *\n * @param data the string array to connect to\n * @returns a connector that resolves local string array data\n */\nexport function stringArrayConnector(data: string[]): CatSelectConnector {\n const toItem = (id: string) => ({ id, name: id });\n return {\n resolve: ids => of(data.filter(id => ids.includes(id)).map(toItem)),\n retrieve: term =>\n of({\n content: data.filter(id => id.toLowerCase().includes(term.toLowerCase())).map(toItem),\n last: true,\n totalElements: data.length\n }),\n render: item => ({ label: item.name })\n };\n}\n"],"mappings":";;;;;;;;CAOA,SAAUA,EAAMC,GACd,GAAkCC,EAAOC,QAAS,CAChDD,EAAAC,QAAiBF,GACrB,KAAS,CACLD,EAAKI,SAAWH,GACpB,CACC,EAND,CAMGI,GAAM,SAASC,GAEhB,IAAIF,EAAW,SAASG,GAEpB,OAAO,IAAIH,EAASI,IAAIC,KAAKF,EACnC,EAEIG,EAAU,SAGZN,EAASO,SAAW,CAClBC,YAAa,KACbC,KAAM,uBACNC,KAAMC,UACNC,SAAU,IACVC,SAAUF,UACVG,SAAU,WACd,EACIC,YAAaJ,UACbK,UAAW,MACXC,MAAO,MACPC,QAAS,eACTC,aAAc,MACdC,SAAU,GACVC,gBAAiB,GACjBC,OAAQ,GACRC,UAAW,GACXC,YAAa,KACbC,QAAS,WACb,EACIC,OAAQ,CAACC,EAAG,EAAGC,EAAG,GAClBC,aAAc,KACdC,SAAU,SACVC,MAAO,CAACC,WAAY,KAItBhC,EAASI,IAAMJ,EAASiC,UAAY,CAClCC,SAAU5B,EAEV6B,YAAanC,EAGbK,KAAM,SAASF,GAEb,IAAKA,EAAS,CACZA,EAAU,EAClB,CAGMF,KAAKE,QAAU,GAEfF,KAAKmC,aAAe,KAGpBnC,KAAKE,QAAQM,KAAON,EAAQM,MAAQT,EAASO,SAASE,KACtDR,KAAKE,QAAQO,KAAOP,EAAQO,MAAQV,EAASO,SAASG,KACtDT,KAAKE,QAAQS,SAAWT,EAAQS,WAAa,EAAI,EAAIT,EAAQS,UAAYZ,EAASO,SAASK,SAC3FX,KAAKE,QAAQU,SAAWV,EAAQU,UAAYb,EA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AAKwH,cAAc,yBAAyB1E,iBAAiB,SAAS,IAAMrD,GAASgI,WAAWd,KAChG,MAAMe,EAAQ1H,EAAKwH,cAA8B,uBACjD,GAAIE,EAAO,CACT,UAAWhB,IAAY,SAAU,CAC/BgB,EAAMC,gBAAgBjB,E,MACjB,GAAIjH,GAAS0B,eAAiB,MAAO,CAC1CuG,EAAMlF,UAAYkE,C,KACb,CACLgB,EAAMnF,UAAYmE,C,EAItB,OAAO1G,C,CAGD,UAAA+G,CAAW/G,EAAY2G,EAAelH,GAC5C,MAAOe,EAASE,GAAajB,GAASmI,WAAWxB,MAAM,MAAQ,CAAC,SAAU,QAI1E,MAAMlG,EAAWT,GAASS,WAAaT,GAAS2H,YAAc,OAAS,EAAId,EAAuBpG,UAClG,MAAO,CACLM,UACAE,WACAV,OACAE,WACAK,MAAO,MACPM,UAAWpB,GAASoI,OAAS,QAAU,eAAiB,iCACxD/G,YAAa,KACbC,QAAS,IAAMtB,GAASsB,UAAU4F,GAClCvG,SAAU,IAAMX,GAASqI,YAAYnB,GACrC3F,OAAQ,CACNC,EAAG,OACHC,EAAG,Q,EA/EMoF,EAAApG,SAAW,I,MAqFf6H,EAAyBzB,EAAuBC,c,SC/G7CyB,EAAqBC,GACnC,MAAMC,EAAUC,IAAU,CAAQA,KAAIC,KAAMD,IAC5C,MAAO,CACLE,QAASC,GAAOC,EAAGN,EAAKO,QAAOL,GAAMG,EAAIG,SAASN,KAAKO,IAAIR,IAC3DS,SAAUC,GACRL,EAAG,CACD7B,QAASuB,EAAKO,QAAOL,GAAMA,EAAGU,cAAcJ,SAASG,EAAKC,iBAAgBH,IAAIR,GAC9EY,KAAM,KACNC,cAAed,EAAKvC,SAExBsD,OAAQC,IAAI,CAAOC,MAAOD,EAAKb,OAEnC,Q"} \ No newline at end of file +{"version":3,"names":["root","factory","module","exports","Toastify","this","global","options","lib","init","version","defaults","oldestFirst","text","node","undefined","duration","selector","callback","destination","newWindow","close","gravity","positionLeft","position","backgroundColor","avatar","className","stopOnFocus","onClick","offset","x","y","escapeMarkup","ariaLive","style","background","prototype","toastify","constructor","toastElement","buildToast","divElement","document","createElement","console","warn","property","setAttribute","nodeType","Node","ELEMENT_NODE","appendChild","innerText","innerHTML","avatarElement","src","insertAdjacentElement","closeElement","type","addEventListener","event","stopPropagation","removeElement","window","clearTimeout","timeOutValue","bind","width","innerWidth","screen","self","setTimeout","open","location","getAxisOffsetAValue","xOffset","yOffset","transform","showToast","rootElement","getElementById","HTMLElement","ShadowRoot","body","elementToInsert","firstChild","lastChild","insertBefore","reposition","hideToast","replace","parentNode","removeChild","call","topLeftOffsetSize","top","bottom","topRightOffsetSize","offsetSize","allToasts","getElementsByClassName","classUsed","i","length","containsClass","height","offsetHeight","substr","axis","isNaN","elem","yourClass","trim","split","indexOf","CatNotificationService","getInstance","instance","show","content","ref","toastContent","getNode","toastOptions","getOptions","toast","template","icon","action","autoClose","i18n","t","firstElementChild","querySelector","onAction","inner","replaceChildren","placement","mode","onDismiss","catNotificationService","objectArrayConnector","data","resolve","ids","of","filter","id","includes","retrieve","term","toLowerCase","last","totalElements","render","label","stringArrayConnector","items","map","stringMapConnector","Array","from"],"sources":["../node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.js","src/components/cat-notification/cat-notification.tsx","src/components/cat-select/connectors.ts"],"sourcesContent":["/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n(function(root, factory) {\n if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.Toastify = factory();\n }\n})(this, function(global) {\n // Object initialization\n var Toastify = function(options) {\n // Returning a new init object\n return new Toastify.lib.init(options);\n },\n // Library version\n version = \"1.12.0\";\n\n // Set the default global options\n Toastify.defaults = {\n oldestFirst: true,\n text: \"Toastify is awesome!\",\n node: undefined,\n duration: 3000,\n selector: undefined,\n callback: function () {\n },\n destination: undefined,\n newWindow: false,\n close: false,\n gravity: \"toastify-top\",\n positionLeft: false,\n position: '',\n backgroundColor: '',\n avatar: \"\",\n className: \"\",\n stopOnFocus: true,\n onClick: function () {\n },\n offset: {x: 0, y: 0},\n escapeMarkup: true,\n ariaLive: 'polite',\n style: {background: ''}\n };\n\n // Defining the prototype of the object\n Toastify.lib = Toastify.prototype = {\n toastify: version,\n\n constructor: Toastify,\n\n // Initializing the object with required parameters\n init: function(options) {\n // Verifying and validating the input object\n if (!options) {\n options = {};\n }\n\n // Creating the options object\n this.options = {};\n\n this.toastElement = null;\n\n // Validating the options\n this.options.text = options.text || Toastify.defaults.text; // Display message\n this.options.node = options.node || Toastify.defaults.node; // Display content as node\n this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration\n this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector\n this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display\n this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination\n this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window\n this.options.close = options.close || Toastify.defaults.close; // Show toast close icon\n this.options.gravity = options.gravity === \"bottom\" ? \"toastify-bottom\" : Toastify.defaults.gravity; // toast position - top or bottom\n this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right\n this.options.position = options.position || Toastify.defaults.position; // toast position - left or right\n this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color\n this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path\n this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast\n this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus\n this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click\n this.options.offset = options.offset || Toastify.defaults.offset; // toast offset\n this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;\n this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;\n this.options.style = options.style || Toastify.defaults.style;\n if(options.backgroundColor) {\n this.options.style.background = options.backgroundColor;\n }\n\n // Returning the current object for chaining functions\n return this;\n },\n\n // Building the DOM element\n buildToast: function() {\n // Validating if the options are defined\n if (!this.options) {\n throw \"Toastify is not initialized\";\n }\n\n // Creating the DOM object\n var divElement = document.createElement(\"div\");\n divElement.className = \"toastify on \" + this.options.className;\n\n // Positioning toast to left or right or center\n if (!!this.options.position) {\n divElement.className += \" toastify-\" + this.options.position;\n } else {\n // To be depreciated in further versions\n if (this.options.positionLeft === true) {\n divElement.className += \" toastify-left\";\n console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.')\n } else {\n // Default position\n divElement.className += \" toastify-right\";\n }\n }\n\n // Assigning gravity of element\n divElement.className += \" \" + this.options.gravity;\n\n if (this.options.backgroundColor) {\n // This is being deprecated in favor of using the style HTML DOM property\n console.warn('DEPRECATION NOTICE: \"backgroundColor\" is being deprecated. Please use the \"style.background\" property.');\n }\n\n // Loop through our style object and apply styles to divElement\n for (var property in this.options.style) {\n divElement.style[property] = this.options.style[property];\n }\n\n // Announce the toast to screen readers\n if (this.options.ariaLive) {\n divElement.setAttribute('aria-live', this.options.ariaLive)\n }\n\n // Adding the toast message/node\n if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {\n // If we have a valid node, we insert it\n divElement.appendChild(this.options.node)\n } else {\n if (this.options.escapeMarkup) {\n divElement.innerText = this.options.text;\n } else {\n divElement.innerHTML = this.options.text;\n }\n\n if (this.options.avatar !== \"\") {\n var avatarElement = document.createElement(\"img\");\n avatarElement.src = this.options.avatar;\n\n avatarElement.className = \"toastify-avatar\";\n\n if (this.options.position == \"left\" || this.options.positionLeft === true) {\n // Adding close icon on the left of content\n divElement.appendChild(avatarElement);\n } else {\n // Adding close icon on the right of content\n divElement.insertAdjacentElement(\"afterbegin\", avatarElement);\n }\n }\n }\n\n // Adding a close icon to the toast\n if (this.options.close === true) {\n // Create a span for close element\n var closeElement = document.createElement(\"button\");\n closeElement.type = \"button\";\n closeElement.setAttribute(\"aria-label\", \"Close\");\n closeElement.className = \"toast-close\";\n closeElement.innerHTML = \"✖\";\n\n // Triggering the removal of toast from DOM on close click\n closeElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.removeElement(this.toastElement);\n window.clearTimeout(this.toastElement.timeOutValue);\n }.bind(this)\n );\n\n //Calculating screen width\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Adding the close icon to the toast element\n // Display on the right if screen width is less than or equal to 360px\n if ((this.options.position == \"left\" || this.options.positionLeft === true) && width > 360) {\n // Adding close icon on the left of content\n divElement.insertAdjacentElement(\"afterbegin\", closeElement);\n } else {\n // Adding close icon on the right of content\n divElement.appendChild(closeElement);\n }\n }\n\n // Clear timeout while toast is focused\n if (this.options.stopOnFocus && this.options.duration > 0) {\n var self = this;\n // stop countdown\n divElement.addEventListener(\n \"mouseover\",\n function(event) {\n window.clearTimeout(divElement.timeOutValue);\n }\n )\n // add back the timeout\n divElement.addEventListener(\n \"mouseleave\",\n function() {\n divElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n self.removeElement(divElement);\n },\n self.options.duration\n )\n }\n )\n }\n\n // Adding an on-click destination path\n if (typeof this.options.destination !== \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n if (this.options.newWindow === true) {\n window.open(this.options.destination, \"_blank\");\n } else {\n window.location = this.options.destination;\n }\n }.bind(this)\n );\n }\n\n if (typeof this.options.onClick === \"function\" && typeof this.options.destination === \"undefined\") {\n divElement.addEventListener(\n \"click\",\n function(event) {\n event.stopPropagation();\n this.options.onClick();\n }.bind(this)\n );\n }\n\n // Adding offset\n if(typeof this.options.offset === \"object\") {\n\n var x = getAxisOffsetAValue(\"x\", this.options);\n var y = getAxisOffsetAValue(\"y\", this.options);\n\n var xOffset = this.options.position == \"left\" ? x : \"-\" + x;\n var yOffset = this.options.gravity == \"toastify-top\" ? y : \"-\" + y;\n\n divElement.style.transform = \"translate(\" + xOffset + \",\" + yOffset + \")\";\n\n }\n\n // Returning the generated element\n return divElement;\n },\n\n // Displaying the toast\n showToast: function() {\n // Creating the DOM object for the toast\n this.toastElement = this.buildToast();\n\n // Getting the root element to with the toast needs to be added\n var rootElement;\n if (typeof this.options.selector === \"string\") {\n rootElement = document.getElementById(this.options.selector);\n } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {\n rootElement = this.options.selector;\n } else {\n rootElement = document.body;\n }\n\n // Validating if root element is present in DOM\n if (!rootElement) {\n throw \"Root element is not defined\";\n }\n\n // Adding the DOM element\n var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;\n rootElement.insertBefore(this.toastElement, elementToInsert);\n\n // Repositioning the toasts in case multiple toasts are present\n Toastify.reposition();\n\n if (this.options.duration > 0) {\n this.toastElement.timeOutValue = window.setTimeout(\n function() {\n // Remove the toast from DOM\n this.removeElement(this.toastElement);\n }.bind(this),\n this.options.duration\n ); // Binding `this` for function invocation\n }\n\n // Supporting function chaining\n return this;\n },\n\n hideToast: function() {\n if (this.toastElement.timeOutValue) {\n clearTimeout(this.toastElement.timeOutValue);\n }\n this.removeElement(this.toastElement);\n },\n\n // Removing the element from the DOM\n removeElement: function(toastElement) {\n // Hiding the element\n // toastElement.classList.remove(\"on\");\n toastElement.className = toastElement.className.replace(\" on\", \"\");\n\n // Removing the element from DOM after transition end\n window.setTimeout(\n function() {\n // remove options node if any\n if (this.options.node && this.options.node.parentNode) {\n this.options.node.parentNode.removeChild(this.options.node);\n }\n\n // Remove the element from the DOM, only when the parent node was not removed before.\n if (toastElement.parentNode) {\n toastElement.parentNode.removeChild(toastElement);\n }\n\n // Calling the callback function\n this.options.callback.call(toastElement);\n\n // Repositioning the toasts again\n Toastify.reposition();\n }.bind(this),\n 400\n ); // Binding `this` for function invocation\n },\n };\n\n // Positioning the toasts on the DOM\n Toastify.reposition = function() {\n\n // Top margins with gravity\n var topLeftOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var topRightOffsetSize = {\n top: 15,\n bottom: 15,\n };\n var offsetSize = {\n top: 15,\n bottom: 15,\n };\n\n // Get all toast messages on the DOM\n var allToasts = document.getElementsByClassName(\"toastify\");\n\n var classUsed;\n\n // Modifying the position of each toast element\n for (var i = 0; i < allToasts.length; i++) {\n // Getting the applied gravity\n if (containsClass(allToasts[i], \"toastify-top\") === true) {\n classUsed = \"toastify-top\";\n } else {\n classUsed = \"toastify-bottom\";\n }\n\n var height = allToasts[i].offsetHeight;\n classUsed = classUsed.substr(9, classUsed.length-1)\n // Spacing between toasts\n var offset = 15;\n\n var width = window.innerWidth > 0 ? window.innerWidth : screen.width;\n\n // Show toast in center if screen with less than or equal to 360px\n if (width <= 360) {\n // Setting the position\n allToasts[i].style[classUsed] = offsetSize[classUsed] + \"px\";\n\n offsetSize[classUsed] += height + offset;\n } else {\n if (containsClass(allToasts[i], \"toastify-left\") === true) {\n // Setting the position\n allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + \"px\";\n\n topLeftOffsetSize[classUsed] += height + offset;\n } else {\n // Setting the position\n allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + \"px\";\n\n topRightOffsetSize[classUsed] += height + offset;\n }\n }\n }\n\n // Supporting function chaining\n return this;\n };\n\n // Helper function to get offset.\n function getAxisOffsetAValue(axis, options) {\n\n if(options.offset[axis]) {\n if(isNaN(options.offset[axis])) {\n return options.offset[axis];\n }\n else {\n return options.offset[axis] + 'px';\n }\n }\n\n return '0px';\n\n }\n\n function containsClass(elem, yourClass) {\n if (!elem || typeof yourClass !== \"string\") {\n return false;\n } else if (\n elem.className &&\n elem.className\n .trim()\n .split(/\\s+/gi)\n .indexOf(yourClass) > -1\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n // Setting up the prototype for the init object\n Toastify.lib.init.prototype = Toastify.lib;\n\n // Returning the Toastify function to be assigned to the window object/module\n return Toastify;\n});\n","import Toastify, { Options } from 'toastify-js';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\ninterface ToastRef {\n toast?: {\n showToast: () => void;\n hideToast: () => void;\n };\n}\n\nexport interface ToastOptions {\n /** The appearance mode of the notification. (Default: `dark`) */\n mode: 'dark' | 'light';\n /** An optional icon to appear in the notification. */\n icon: string;\n /** The placement of the notification on screen. (Default: `bottom-left`) */\n placement: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';\n /** Enables auto-closing of the notification. (Default: `true`) */\n autoClose: boolean;\n /** The duration in ms for the notification to be visible on screen. (Default: `3000`) */\n duration: number;\n /** An optional label for an action button. */\n action: string;\n /** Enable markup escape and sanitise HTML input. (Default: true) */\n escapeMarkup: boolean;\n /** Callback executed when the action button is clicked. Receives a reference to the notification as first argument. */\n onAction: (toast: ToastRef) => void;\n /** Callback executed when the notification is clicked. Receives a reference to the notification as first argument. */\n onClick: (toast: ToastRef) => void;\n /** Callback executed when the notification is dismissed. Receives a reference to the notification as first argument. */\n onDismiss: (toast: ToastRef) => void;\n}\n\nexport class CatNotificationService {\n private static instance: CatNotificationService;\n private static duration = 3000;\n\n private constructor() {\n // hide constructor\n }\n\n static getInstance(): CatNotificationService {\n if (!CatNotificationService.instance) {\n CatNotificationService.instance = new CatNotificationService();\n }\n return CatNotificationService.instance;\n }\n\n show(content: string | Node, options?: Partial): () => void {\n const ref: ToastRef = {};\n const toastContent = this.getNode(content, ref, options);\n const toastOptions = this.getOptions(toastContent, ref, options);\n const toast = Toastify(toastOptions);\n ref.toast = toast;\n toast.showToast();\n return () => toast.hideToast();\n }\n\n private getNode(content: string | Node, ref: ToastRef, options?: Partial): HTMLElement {\n const template = document.createElement('template');\n template.innerHTML = `
\n ${options?.icon ? `` : ''}\n
\n
\n ${\n options?.action\n ? `${options.action}`\n : ''\n }\n
\n ${\n options?.autoClose === false\n ? ``\n : ''\n }\n
`;\n\n const node = template.content.firstElementChild as HTMLElement;\n node.querySelector('.cat-toastify-close')?.addEventListener('click', () => ref.toast?.hideToast());\n node.querySelector('.cat-toastify-action')?.addEventListener('click', () => options?.onAction?.(ref));\n const inner = node.querySelector('.cat-toastify-inner');\n if (inner) {\n if (typeof content !== 'string') {\n inner.replaceChildren(content);\n } else if (options?.escapeMarkup === false) {\n inner.innerHTML = content;\n } else {\n inner.innerText = content;\n }\n }\n\n return node;\n }\n\n private getOptions(node: Node, ref: ToastRef, options?: Partial): Options {\n const [gravity, position] = (options?.placement?.split('-') ?? ['bottom', 'left']) as [\n Options['gravity'],\n Options['position']\n ];\n const duration = options?.duration ?? (options?.autoClose === false ? -1 : CatNotificationService.duration);\n return {\n gravity,\n position,\n node,\n duration,\n close: false,\n className: options?.mode === 'light' ? 'cat-toastify' : 'cat-toastify cat-toastify-dark',\n stopOnFocus: true,\n onClick: () => options?.onClick?.(ref),\n callback: () => options?.onDismiss?.(ref),\n offset: {\n x: '1rem',\n y: '1rem'\n }\n };\n }\n}\n\nexport const catNotificationService = CatNotificationService.getInstance();\n","import { of } from 'rxjs';\nimport { CatSelectConnector } from './cat-select';\n\n/**\n * Creates a connector that resolves local object array data.\n *\n * @param data the object array to connect to\n * @returns a connector that resolves local object array data\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function objectArrayConnector(data: T[]): CatSelectConnector {\n return {\n resolve: ids => of(data.filter(({ id }) => ids.includes(id))),\n retrieve: term =>\n of({\n content: data.filter(({ id }) => id.toLowerCase().includes(term.toLowerCase())),\n last: true,\n totalElements: data.length\n }),\n render: ({ label }) => ({ label })\n };\n}\n\n/**\n * Creates a connector that resolves local string array data.\n *\n * @param data the string array to connect to\n * @returns a connector that resolves local string array data\n */\nexport function stringArrayConnector(data: string[]): CatSelectConnector<{ id: string; label: string }> {\n const items = data.map(id => ({ id, label: id }));\n return objectArrayConnector(items);\n}\n\n/**\n * Creates a connector that resolves local string map data.\n *\n * @param data the string map to connect to\n * @returns a connector that resolves local string map data\n */\nexport function stringMapConnector(data: Map): CatSelectConnector<{ id: string; label: string }> {\n const items = Array.from(data).map(([id, label]) => ({ id, label }));\n return objectArrayConnector(items);\n}\n"],"mappings":";;;;;;;;CAOA,SAAUA,EAAMC,GACd,GAAkCC,EAAOC,QAAS,CAChDD,EAAAC,QAAiBF,GACrB,KAAS,CACLD,EAAKI,SAAWH,GACpB,CACC,EAND,CAMGI,GAAM,SAASC,GAEhB,IAAIF,EAAW,SAASG,GAEpB,OAAO,IAAIH,EAASI,IAAIC,KAAKF,EACnC,EAEIG,EAAU,SAGZN,EAASO,SAAW,CAClBC,YAAa,KACbC,KAAM,uBACNC,KAAMC,UACNC,SAAU,IACVC,SAAUF,UACVG,SAAU,WACd,EACIC,YAAaJ,UACbK,UAAW,MACXC,MAAO,MACPC,QAAS,eACTC,aAAc,MACdC,SAAU,GACVC,gBAAiB,GACjBC,OAAQ,GACRC,UAAW,GACXC,YAAa,KACbC,QAAS,WACb,EACIC,OAAQ,CAACC,EAAG,EAAGC,EAAG,GAClBC,aAAc,KACdC,SAAU,SACVC,MAAO,CAACC,WAAY,KAItBhC,EAASI,IAAMJ,EAASiC,UAAY,CAClCC,SAAU5B,EAEV6B,YAAanC,EAGbK,KAAM,SAASF,GAEb,IAAKA,EAAS,CACZA,EAAU,EAClB,CAGMF,KAAKE,QAAU,GAEfF,KAAKmC,aAAe,KAGpBnC,KAAKE,QAAQM,KAAON,EAAQM,MAAQT,EAASO,SAASE,KACtDR,KAAKE,QAAQO,KAAOP,EAAQO,MAAQV,EAASO,SAASG,KACtDT,KAAKE,QAAQS,SAAWT,EAAQS,WAAa,EAAI,EAAIT,EAAQS,UAAYZ,EAASO,SAASK,SAC3FX,KAAKE,QAAQU,SAAWV,EAAQU,UAAYb,EAASO,SAASM,SAC9DZ,KAAKE,QAAQW,SAAWX,EAAQW,UAAYd,EAASO,SAASO,SAC9Db,KAAKE,QAAQY,YAAcZ,EAAQY,aAAef,EAASO,SAASQ,YACpEd,KAAK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