From 0e71368eaf9037e392408098d7bfc5aaabdec746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sko=C4=8D=C3=ADk?= Date: Sun, 3 Apr 2022 15:44:49 +0200 Subject: [PATCH] v3.7.0 --- dist/svelecte-element.js | 2 +- dist/svelecte.css | 2 +- dist/svelecte.mjs | 2 +- docs/build/app.css | 2 +- docs/build/app.js | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/svelecte-element.js b/dist/svelecte-element.js index 4a1fadb..be27936 100644 --- a/dist/svelecte-element.js +++ b/dist/svelecte-element.js @@ -1 +1 @@ -var Svelecte=function(e){"use strict";function t(){}const n=e=>e;function i(e){return e()}function l(){return Object.create(null)}function r(e){e.forEach(i)}function o(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function a(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function c(e,t,n){e.$$.on_destroy.push(a(t,n))}function d(e,t,n,i){if(e){const l=u(e,t,n,i);return e[0](l)}}function u(e,t,n,i){return e[1]&&i?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](i(t))):n.ctx}function h(e,t,n,i){if(e[2]&&i){const l=e[2](i(n));if(void 0===t.dirty)return l;if("object"==typeof l){const e=[],n=Math.max(t.dirty.length,l.length);for(let i=0;i32){const t=[],n=e.ctx.length/32;for(let e=0;ewindow.performance.now():()=>Date.now(),y=b?e=>requestAnimationFrame(e):t;const x=new Set;function w(e){x.forEach((t=>{t.c(e)||(x.delete(t),t.f())})),0!==x.size&&y(w)}function S(e,t){e.appendChild(t)}function k(e,t,n){const i=A(e);if(!i.getElementById(t)){const e=F("style");e.id=t,e.textContent=n,z(i,e)}}function A(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function z(e,t){S(e.head||e,t)}function I(e,t,n){e.insertBefore(t,n||null)}function C(e){e.parentNode.removeChild(e)}function O(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function q(e){return function(t){return t.preventDefault(),e.call(this,t)}}function _(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function H(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function P(e,t){e.value=null==t?"":t}let L;function R(){if(void 0===L){L=!1;try{"undefined"!=typeof window&&window.parent&&window.parent.document}catch(e){L=!0}}return L}function V(e,t,n){e.classList[n?"add":"remove"](t)}class B{constructor(){this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.e=F(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t>>0}(d)}_${s}`,h=A(e);N.add(h);const p=h.__svelte_stylesheet||(h.__svelte_stylesheet=function(e){const t=F("style");return z(A(e),t),t}(e).sheet),f=h.__svelte_rules||(h.__svelte_rules={});f[u]||(f[u]=!0,p.insertRule(`@keyframes ${u} ${d}`,p.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${u} ${i}ms linear ${l}ms 1 both`,G+=1,u}function K(e,t){const n=(e.style.animation||"").split(", "),i=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),l=n.length-i.length;l&&(e.style.animation=i.join(", "),G-=l,G||y((()=>{G||(N.forEach((e=>{const t=e.__svelte_stylesheet;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.__svelte_rules={}})),N.clear())})))}function Q(e,i,l,r){if(!i)return t;const o=e.getBoundingClientRect();if(i.left===o.left&&i.right===o.right&&i.top===o.top&&i.bottom===o.bottom)return t;const{delay:s=0,duration:a=300,easing:c=n,start:d=$()+s,end:u=d+a,tick:h=t,css:p}=l(e,{from:i,to:o},r);let f,m=!0,v=!1;function g(){p&&K(e,f),m=!1}return function(e){let t;0===x.size&&y(w),new Promise((n=>{x.add(t={c:e,f:n})}))}((e=>{if(!v&&e>=d&&(v=!0),v&&e>=u&&(h(1,0),g()),!m)return!1;if(v){const t=0+1*c((e-d)/a);h(t,1-t)}return!0})),p&&(f=W(e,0,1,a,s,c,p)),s||(v=!0),h(0,1),g}function U(e){const t=getComputedStyle(e);if("absolute"!==t.position&&"fixed"!==t.position){const{width:n,height:i}=t,l=e.getBoundingClientRect();e.style.position="absolute",e.style.width=n,e.style.height=i,function(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const i=getComputedStyle(e),l="none"===i.transform?"":i.transform;e.style.transform=`${l} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}(e,l)}}function J(e){j=e}function X(){if(!j)throw new Error("Function called outside component initialization");return j}function Z(e){X().$$.on_mount.push(e)}function Y(e){X().$$.on_destroy.push(e)}function ee(){const e=X();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const l=function(e,t,n=!1){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}(t,n);i.slice().forEach((t=>{t.call(e,l)}))}}}function te(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const ne=[],ie=[],le=[],re=[],oe=Promise.resolve();let se=!1;function ae(){se||(se=!0,oe.then(pe))}function ce(){return ae(),oe}function de(e){le.push(e)}let ue=!1;const he=new Set;function pe(){if(!ue){ue=!0;do{for(let e=0;e{me.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function xe(e,t){ye(e,1,1,(()=>{t.delete(e.key)}))}function we(e,t){e.f(),xe(e,t)}function Se(e,t,n,i,l,r,o,s,a,c,d,u){let h=e.length,p=r.length,f=h;const m={};for(;f--;)m[e[f].key]=f;const v=[],g=new Map,b=new Map;for(f=p;f--;){const e=u(l,r,f),s=n(e);let a=o.get(s);a?i&&a.p(e,t):(a=c(s,e),a.c()),g.set(s,v[f]=a),s in m&&b.set(s,Math.abs(f-m[s]))}const $=new Set,y=new Set;function x(e){$e(e,1),e.m(s,d),o.set(e.key,e),d=e.first,p--}for(;h&&p;){const t=v[p-1],n=e[h-1],i=t.key,l=n.key;t===n?(d=t.first,h--,p--):g.has(l)?!o.has(i)||$.has(i)?x(t):y.has(l)?h--:b.get(i)>b.get(l)?(y.add(i),x(t)):($.add(l),h--):(a(n,o),h--)}for(;h--;){const t=e[h];g.has(t.key)||a(t,o)}for(;p;)x(v[p-1]);return v}function ke(e){e&&e.c()}function Ae(e,t,n,l){const{fragment:s,on_mount:a,on_destroy:c,after_update:d}=e.$$;s&&s.m(t,n),l||de((()=>{const t=a.map(i).filter(o);c?c.push(...t):r(t),e.$$.on_mount=[]})),d.forEach(de)}function ze(e,t){const n=e.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ie(e,n,i,o,s,a,c,d=[-1]){const u=j;J(e);const h=e.$$={fragment:null,ctx:null,props:a,update:t,not_equal:s,bound:l(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:l(),dirty:d,skip_bound:!1,root:n.target||u.$$.root};c&&c(h.root);let p=!1;if(h.ctx=i?i(e,n.props||{},((t,n,...i)=>{const l=i.length?i[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=l)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](l),p&&function(e,t){-1===e.$$.dirty[0]&&(ne.push(e),ae(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var Oe=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};Oe.prototype.tokenize=function(e,t){if(!(e=Te(String(e||"").toLowerCase()))||!e.length)return[];var n,i,l,r,o=[],s=e.split(/ +/);for(n=0,i=s.length;n0)&&i.items.push({score:n,id:l})})):o.iterator(o.items,(function(e,t){i.items.push({score:1,id:t})})),(l=o.getSortFunction(i,t))&&i.items.sort(l),i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i};var Fe=function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e(t=_e(String(t||"")))?1:t>e?-1:0},Ee=function(e,t){var n,i,l,r;for(n=1,i=arguments.length;n'+r+"";He||(He=document.createElement("div"),He.className="sv-item-content"),He.innerHTML=r;return _e(n).split(" ").filter((e=>e)).forEach((e=>{Re(He,e)})),He.outerHTML}const Re=function(e,t){let n=0;if(3===e.nodeType){const i=_e(e.data);let l=i.indexOf(t);if(l-=i.substr(0,l).toUpperCase().length-i.substr(0,l).length,l>=0){const i=document.createElement("span");i.className="highlight";const r=e.splitText(l);r.splitText(t.length);const o=r.cloneNode(!0);i.appendChild(o),r.parentNode.replaceChild(i,r),n=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&("highlight"!==e.className||"SPAN"!==e.tagName))for(var i=0;ir.includes(e))).concat([Object.keys(e)[n]]).shift()}return l}function Be(e,t){return(e||"").trim().split(" ").filter((e=>e)).join(" ")}const Ne={disabled:!1,valueField:null,labelField:null,disabledField:"$disabled",placeholder:"Select",valueAsObject:!1,searchable:!0,clearable:!1,selectOnTab:!1,resetOnBlur:!0,fetchResetOnBlur:!0,multiple:!1,max:0,collapseSelection:!1,creatable:!1,creatablePrefix:"*",keepCreated:!0,allowEditing:!1,delimiter:",",fetchCallback:null,minQuery:1,lazyDropdown:!0,virtualList:!1,vlItemSize:null,vlHeight:null,i18n:{empty:"No options",nomatch:"No matching options",max:e=>`Maximum items ${e} selected`,fetchBefore:"Type to start searching",fetchQuery:(e,t)=>`Type ${e>1&&e>t?`at least ${e-t} characters `:""}to start searching`,fetchInit:"Fetching data, please wait...",fetchEmpty:"No data related to your search",collapsedSelection:e=>`${e} selected`,createRowLabel:e=>`Create '${e}'`},collapseSelectionFn:function(e,t){return Ne.i18n.collapsedSelection(e)}},je=[];function Ge(e,n=t){let i;const l=new Set;function r(t){if(s(e,t)&&(e=t,i)){const t=!je.length;for(const t of l)t[1](),je.push(t,e);if(t){for(let e=0;e{l.delete(a),0===l.size&&(i(),i=null)}}}}function We(e,t,n){if(t)return Array.isArray(e)?e:[e];const i=Array.isArray(e)?e:[e],l=n.labelAsValue?n.labelField:n.valueField;return this.reduce(((e,t,r)=>{if(t.options){const n=t.options.reduce(((e,t)=>(i.includes(t[l])&&e.push(t),e)),[]);if(n.length)return e.push(...n),e}return i.includes("object"==typeof t?t[l]:t)&&(n.isOptionArray&&(t={[n.valueField]:r,[n.labelField]:t}),e.push(t)),e}),[])}function Ke(e,t){const n=e.reduce(((e,n,i)=>t.isOptionArray?(e.push({[t.valueField]:i,[t.labelField]:n}),e):n.options&&n.options.length?(t.optionsWithGroups=!0,e.push({label:n.label,$isGroupHeader:!0}),e.push(...n.options.map((e=>(e.$isGroupItem=!0,e)))),e):(e.push(n),e)),[]);return function(e,t){t.isOptionArray&&(t.optionProps||(t.optionProps=["value","label"]));e.some((e=>!e.$isGroupHeader&&(t.optionProps=Qe(e),!0)))}(n,t),n}function Qe(e){e.options&&(e=e.options[0]);const t=["$disabled","$isGroupHeader","$isGroupItem"];return Object.keys(e).filter((e=>!t.includes(e)))}function Ue(e){const t=e-1;return t*t*t+1}function Je(e,{from:t,to:n},i={}){const l=getComputedStyle(e),r="none"===l.transform?"":l.transform,[s,a]=l.transformOrigin.split(" ").map(parseFloat),c=t.left+t.width*s/n.width-(n.left+s),d=t.top+t.height*a/n.height-(n.top+a),{delay:u=0,duration:h=(e=>120*Math.sqrt(e)),easing:p=Ue}=i;return{delay:u,duration:o(h)?h(Math.sqrt(c*c+d*d)):h,easing:p,css:(e,i)=>{const l=i*c,o=i*d,s=e+i*t.width/n.width,a=e+i*t.height/n.height;return`transform: ${r} translate(${l}px, ${o}px) scale(${s}, ${a});`}}}function Xe(e){k(e,"svelte-x1t6fd",".inputBox.svelte-x1t6fd{box-sizing:content-box;width:19px;background:rgba(0, 0, 0, 0) none repeat scroll 0px center;border:0px none;font-size:inherit;font-family:inherit;opacity:1;outline:currentcolor none 0px;padding:0px;color:inherit;margin:-2px 0 0;height:20px}.inputBox.svelte-x1t6fd::placeholder{color:var(--sv-placeholder-color, #ccccd6)}.inputBox.svelte-x1t6fd:read-only{width:100%}.shadow-text.svelte-x1t6fd{opacity:0;position:absolute;left:100%;z-index:-100;min-width:24px;white-space:nowrap;top:0;left:0}")}function Ze(e){let n,i,l,o,s,a,c,d;return{c(){n=F("input"),l=D(),o=F("div"),s=E(e[10]),_(n,"type","text"),_(n,"class","inputBox svelte-x1t6fd"),n.disabled=e[2],n.readOnly=i=!e[1],_(n,"id",e[0]),_(n,"style",e[9]),_(n,"placeholder",e[6]),_(o,"class","shadow-text svelte-x1t6fd"),de((()=>e[25].call(o)))},m(t,i){var r;I(t,n,i),e[23](n),P(n,e[7]),I(t,l,i),I(t,o,i),S(o,s),a=function(e,t){"static"===getComputedStyle(e).position&&(e.style.position="relative");const n=F("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const i=R();let l;return i?(n.src="data:text/html,