@sankhyalabs/ezui 5.22.0-dev.141 → 5.22.0-dev.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-double-list.cjs.entry.js +114 -53
- package/dist/cjs/{ez-tooltip.cjs.entry.js → ez-filter-input_2.cjs.entry.js} +123 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +3510 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-double-list/doubleListHelper.js +9 -10
- package/dist/collection/components/ez-double-list/ez-double-list.css +6 -38
- package/dist/collection/components/ez-double-list/ez-double-list.js +168 -50
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.css +226 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +582 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +3636 -68
- package/dist/esm/ez-double-list.entry.js +115 -54
- package/dist/esm/{ez-tooltip.entry.js → ez-filter-input_2.entry.js} +124 -3
- package/dist/esm/ez-sortable-list.entry.js +3506 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-59561756.entry.js +7 -0
- package/dist/ezui/p-63cb493e.entry.js +1 -0
- package/dist/ezui/p-e4528470.entry.js +1 -0
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +4 -2
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +60 -24
- package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +91 -0
- package/dist/types/components.d.ts +185 -3
- package/package.json +5 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +0 -129
- package/dist/esm/ez-filter-input.entry.js +0 -125
- package/dist/ezui/p-20c024f7.entry.js +0 -1
- package/dist/ezui/p-79044c3e.entry.js +0 -1
- package/dist/ezui/p-7e677b7b.entry.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,g as n}from"./p-23a36bb6.js";import{ArrayUtils as r}from"@sankhyalabs/core";
|
|
2
|
+
/**!
|
|
3
|
+
* Sortable 1.15.6
|
|
4
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
5
|
+
* @author owenm <owen23355@gmail.com>
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function a(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach((function(e){l(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function l(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function u(){return u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},u.apply(this,arguments)}function c(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function d(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var f=d(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=d(/Edge/i),m=d(/firefox/i),b=d(/safari/i)&&!d(/chrome/i)&&!d(/android/i),g=d(/iP(ad|od|hone)/i),p=d(/chrome/i)&&d(/android/i),w={capture:!1,passive:!1};function y(t,e,i){t.addEventListener(e,i,!f&&w)}function x(t,e,i){t.removeEventListener(e,i,!f&&w)}function _(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function E(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function z(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&_(t,e):_(t,e))||n&&t===i)return t;if(t===i)break}while(t=E(t))}return null}var k,S=/\s+/g;function I(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(S," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(S," ")}}function D(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function T(t,e){var i="";if("string"==typeof t)i=t;else do{var n=D(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function C(t,e,i){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(i)for(;r<o;r++)i(n[r],r);return n}return[]}function O(){return document.scrollingElement||document.documentElement}function M(t,e,i,n,r){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,c,h;if(t!==window&&t.parentNode&&t!==O()?(a=(o=t.getBoundingClientRect()).top,s=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||i)&&t!==window&&(r=r||t.parentNode,!f))do{if(r&&r.getBoundingClientRect&&("none"!==D(r,"transform")||i&&"static"!==D(r,"position"))){var d=r.getBoundingClientRect();a-=d.top+parseInt(D(r,"border-top-width")),s-=d.left+parseInt(D(r,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(r=r.parentNode);if(n&&t!==window){var v=T(r||t),m=v&&v.a,b=v&&v.d;v&&(l=(a/=b)+(c/=b),u=(s/=m)+(h/=m))}return{top:a,left:s,bottom:l,right:u,width:h,height:c}}}function A(t,e,i){for(var n=$(t,!0),r=M(t)[e];n;){var o=M(n)[i];if(!("top"===i||"left"===i?r>=o:r<=o))return n;if(n===O())break;n=$(n,!1)}return!1}function j(t,e,i,n){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Rt.ghost&&(n||a[o]!==Rt.dragged)&&z(a[o],i.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function F(t,e){for(var i=t.lastElementChild;i&&(i===Rt.ghost||"none"===D(i,"display")||e&&!_(i,e));)i=i.previousElementSibling;return i||null}function B(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Rt.clone||e&&!_(t,e)||i++;return i}function N(t){var e=0,i=0,n=O();if(t)do{var r=T(t);e+=t.scrollLeft*r.a,i+=t.scrollTop*r.d}while(t!==n&&(t=t.parentNode));return[e,i]}function $(t,e){if(!t||!t.getBoundingClientRect)return O();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var r=D(i);if(i.clientWidth<i.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!i.getBoundingClientRect||i===document.body)return O();if(n||e)return i;n=!0}}}while(i=i.parentNode);return O()}function P(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function G(t,e){return function(){if(!k){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),k=setTimeout((function(){k=void 0}),e)}}}function H(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function L(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function K(t,e){D(t,"position","absolute"),D(t,"top",e.top),D(t,"left",e.left),D(t,"width",e.width),D(t,"height",e.height)}function R(t){D(t,"position",""),D(t,"top",""),D(t,"left",""),D(t,"width",""),D(t,"height","")}function U(t,e,i){var n={};return Array.from(t.children).forEach((function(r){var o,a,s,l;if(z(r,e.draggable,t,!1)&&!r.animated&&r!==i){var u=M(r);n.left=Math.min(null!==(o=n.left)&&void 0!==o?o:1/0,u.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,u.top),n.right=Math.max(null!==(s=n.right)&&void 0!==s?s:-1/0,u.right),n.bottom=Math.max(null!==(l=n.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Y="Sortable"+(new Date).getTime();var W=[],X={initializeByDefault:!0},V={mount:function(t){for(var e in X)X.hasOwnProperty(e)&&!(e in t)&&(t[e]=X[e]);W.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),W.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";W.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][r]&&e[n.pluginName][r](a({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](a({sortable:e},i)))}))},initializePlugins:function(t,e,i){for(var n in W.forEach((function(n){var r=n.pluginName;if(t.options[r]||n.initializeByDefault){var o=new n(t,e,t.options);o.sortable=t,o.options=t.options,t[r]=o,u(i,o.defaults)}})),t.options)if(t.options.hasOwnProperty(n)){var r=this.modifyOption(t,n,t.options[n]);void 0!==r&&(t.options[n]=r)}},getEventProperties:function(t,e){var i={};return W.forEach((function(n){"function"==typeof n.eventProperties&&u(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return W.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(n=r.optionListeners[e].call(t[r.pluginName],i))})),n}};function Z(t){var e=t.sortable,i=t.rootEl,n=t.name,r=t.targetEl,o=t.cloneEl,s=t.toEl,l=t.fromEl,u=t.oldIndex,c=t.newIndex,h=t.oldDraggableIndex,d=t.newDraggableIndex,m=t.originalEvent,b=t.putSortable,g=t.extraEventProperties;if(e=e||i&&i[Y]){var p,w=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||f||v?(p=document.createEvent("Event")).initEvent(n,!0,!0):p=new CustomEvent(n,{bubbles:!0,cancelable:!0}),p.to=s||i,p.from=l||i,p.item=r||i,p.clone=o,p.oldIndex=u,p.newIndex=c,p.oldDraggableIndex=h,p.newDraggableIndex=d,p.originalEvent=m,p.pullMode=b?b.lastPutMode:void 0;var x=a(a({},g),V.getEventProperties(n,e));for(var _ in x)p[_]=x[_];i&&i.dispatchEvent(p),w[y]&&w[y].call(e,p)}}var q=["evt"],J=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,r=c(i,q);V.pluginEvent.bind(Rt)(t,e,a({dragEl:tt,parentEl:et,ghostEl:it,rootEl:nt,nextEl:rt,lastDownEl:ot,cloneEl:at,cloneHidden:st,dragStarted:yt,putSortable:ft,activeSortable:Rt.active,originalEvent:n,oldIndex:lt,oldDraggableIndex:ct,newIndex:ut,newDraggableIndex:ht,hideGhostForTarget:Gt,unhideGhostForTarget:Ht,cloneNowHidden:function(){st=!0},cloneNowShown:function(){st=!1},dispatchSortableEvent:function(t){Q({sortable:e,name:t,originalEvent:n})}},r))};function Q(t){Z(a({putSortable:ft,cloneEl:at,targetEl:tt,rootEl:nt,oldIndex:lt,oldDraggableIndex:ct,newIndex:ut,newDraggableIndex:ht},t))}var tt,et,it,nt,rt,ot,at,st,lt,ut,ct,ht,dt,ft,vt,mt,bt,gt,pt,wt,yt,xt,_t,Et,zt,kt=!1,St=!1,It=[],Dt=!1,Tt=!1,Ct=[],Ot=!1,Mt=[],At="undefined"!=typeof document,jt=g,Ft=v||f?"cssFloat":"float",Bt=At&&!p&&!g&&"draggable"in document.createElement("div"),Nt=function(){if(At){if(f)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),$t=function(t,e){var i=D(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=j(t,0,e),o=j(t,1,e),a=r&&D(r),s=o&&D(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+M(r).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+M(o).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&a.float&&"none"!==a.float?!o||"both"!==s.clear&&s.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===i[Ft]||o&&"none"===i[Ft]&&l+u>n)?"vertical":"horizontal"},Pt=function(t){function e(t,i){return function(n,r,o,a){if(null==t&&(i||n.options.group.name&&r.options.group.name&&n.options.group.name===r.options.group.name))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,r,o,a),i)(n,r,o,a);var s=(i?n:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var i={},n=t.group;n&&"object"==s(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},Gt=function(){!Nt&&it&&D(it,"display","none")},Ht=function(){!Nt&&it&&D(it,"display","")};At&&!p&&document.addEventListener("click",(function(t){if(St)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),St=!1,!1}),!0);var Lt=function(t){if(tt){var e=(r=(t=t.touches?t.touches[0]:t).clientX,o=t.clientY,It.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!F(t)){var i=M(t);return r>=i.left-e&&r<=i.right+e&&o>=i.top-e&&o<=i.bottom+e?a=t:void 0}})),a);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var r,o,a},Kt=function(t){tt&&tt.parentNode[Y]._isOutsideThisEl(t.target)};function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=u({},e),t[Y]=this;var i,n,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return $t(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Rt.supportPointer&&"PointerEvent"in window&&(!b||g),emptyInsertThreshold:5};for(var o in V.initializePlugins(this,t,r),r)!(o in e)&&(e[o]=r[o]);for(var s in Pt(e),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!e.forceFallback&&Bt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?y(t,"pointerdown",this._onTapStart):(y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),It.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),u(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==D(t,"display")&&t!==Rt.ghost){n.push({target:t,rect:M(t)});var e=a({},n[n.length-1].rect);if(t.thisAnimationDuration){var i=T(t,!0);i&&(e.top-=i.f,e.left-=i.e)}t.fromRect=e}}))},addAnimationState:function(t){n.push(t)},removeAnimationState:function(t){n.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(n,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(i),void("function"==typeof t&&t());var r=!1,o=0;n.forEach((function(t){var i=0,n=t.target,a=n.fromRect,s=M(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,h=T(n,!0);h&&(s.top-=h.f,s.left-=h.e),n.toRect=s,n.thisAnimationDuration&&P(l,s)&&!P(a,s)&&(c.top-s.top)/(c.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(i=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,l,u,e.options)),P(s,a)||(n.prevFromRect=a,n.prevToRect=s,i||(i=e.options.animation),e.animate(n,c,s,i)),i&&(r=!0,o=Math.max(o,i),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),i),n.thisAnimationDuration=i)})),clearTimeout(i),r?i=setTimeout((function(){"function"==typeof t&&t()}),o):"function"==typeof t&&t(),n=[]},animate:function(t,e,i,n){if(n){D(t,"transition",""),D(t,"transform","");var r=T(this.el),o=(e.left-i.left)/(r&&r.a||1),a=(e.top-i.top)/(r&&r.d||1);t.animatingX=!!o,t.animatingY=!!a,D(t,"transform","translate3d("+o+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),D(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),D(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){D(t,"transition",""),D(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}))}function Ut(t,e,i,n,r,o,a,s){var l,u,c=t[Y],h=c.options.onMove;return!window.CustomEvent||f||v?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=r||e,l.relatedRect=o||M(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),h&&(u=h.call(c,l,a)),u}function Yt(t){t.draggable=!1}function Wt(){Ot=!1}function Xt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Vt(t){return setTimeout(t,0)}function Zt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(xt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,tt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=n.filter;if(function(t){Mt.length=0;for(var e=t.getElementsByTagName("input"),i=e.length;i--;){var n=e[i];n.checked&&Mt.push(n)}}(i),!tt&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!b||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=z(s,n.draggable,i,!1))&&s.animated||ot===s)){if(lt=B(s),ct=B(s,n.draggable),"function"==typeof u){if(u.call(this,t,s,this))return Q({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),J("filter",e,{evt:t}),void(r&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(n){if(n=z(l,n.trim(),i,!1))return Q({sortable:e,rootEl:n,name:"filter",targetEl:s,fromEl:i,toEl:i}),J("filter",e,{evt:t}),!0}))))return void(r&&t.preventDefault());n.handle&&!z(l,n.handle,i,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,i){var n,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(i&&!tt&&i.parentNode===o){var l=M(i);if(nt=o,et=(tt=i).parentNode,rt=tt.nextSibling,ot=i,dt=a.group,Rt.dragged=tt,pt=(vt={target:tt,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-l.left,wt=vt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,tt.style["will-change"]="all",n=function(){J("delayEnded",r,{evt:t}),Rt.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!m&&r.nativeDraggable&&(tt.draggable=!0),r._triggerDragStart(t,e),Q({sortable:r,name:"choose",originalEvent:t}),I(tt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){C(tt,t.trim(),Yt)})),y(s,"dragover",Lt),y(s,"mousemove",Lt),y(s,"touchmove",Lt),a.supportPointer?(y(s,"pointerup",r._onDrop),!this.nativeDraggable&&y(s,"pointercancel",r._onDrop)):(y(s,"mouseup",r._onDrop),y(s,"touchend",r._onDrop),y(s,"touchcancel",r._onDrop)),m&&this.nativeDraggable&&(this.options.touchStartThreshold=4,tt.draggable=!0),J("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(v||f))n();else{if(Rt.eventCanceled)return void this._onDrop();a.supportPointer?(y(s,"pointerup",r._disableDelayedDrag),y(s,"pointercancel",r._disableDelayedDrag)):(y(s,"mouseup",r._disableDelayedDrag),y(s,"touchend",r._disableDelayedDrag),y(s,"touchcancel",r._disableDelayedDrag)),y(s,"mousemove",r._delayedDragTouchMoveHandler),y(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&y(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){tt&&Yt(tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;x(t,"mouseup",this._disableDelayedDrag),x(t,"touchend",this._disableDelayedDrag),x(t,"touchcancel",this._disableDelayedDrag),x(t,"pointerup",this._disableDelayedDrag),x(t,"pointercancel",this._disableDelayedDrag),x(t,"mousemove",this._delayedDragTouchMoveHandler),x(t,"touchmove",this._delayedDragTouchMoveHandler),x(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?y(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(y(tt,"dragend",this),y(nt,"dragstart",this._onDragStart));try{document.selection?Vt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(kt=!1,nt&&tt){J("dragStarted",this,{evt:e}),this.nativeDraggable&&y(document,"dragover",Kt);var i=this.options;!t&&I(tt,i.dragClass,!1),I(tt,i.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),Q({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(mt){this._lastX=mt.clientX,this._lastY=mt.clientY,Gt();for(var t=document.elementFromPoint(mt.clientX,mt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(mt.clientX,mt.clientY))!==e;)e=t;if(tt.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]&&e[Y]._onDragOver({clientX:mt.clientX,clientY:mt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=E(e));Ht()}},_onTouchMove:function(t){if(vt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=it&&T(it,!0),a=it&&o&&o.a,s=it&&o&&o.d,l=jt&&zt&&N(zt),u=(r.clientX-vt.clientX+n.x)/(a||1)+(l?l[0]-Ct[0]:0)/(a||1),c=(r.clientY-vt.clientY+n.y)/(s||1)+(l?l[1]-Ct[1]:0)/(s||1);if(!Rt.active&&!kt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(it){o?(o.e+=u-(bt||0),o.f+=c-(gt||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");D(it,"webkitTransform",h),D(it,"mozTransform",h),D(it,"msTransform",h),D(it,"transform",h),bt=u,gt=c,mt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!it){var t=this.options.fallbackOnBody?document.body:nt,e=M(tt,!0,jt,!0,t),i=this.options;if(jt){for(zt=t;"static"===D(zt,"position")&&"none"===D(zt,"transform")&&zt!==document;)zt=zt.parentNode;zt!==document.body&&zt!==document.documentElement?(zt===document&&(zt=O()),e.top+=zt.scrollTop,e.left+=zt.scrollLeft):zt=O(),Ct=N(zt)}I(it=tt.cloneNode(!0),i.ghostClass,!1),I(it,i.fallbackClass,!0),I(it,i.dragClass,!0),D(it,"transition",""),D(it,"transform",""),D(it,"box-sizing","border-box"),D(it,"margin",0),D(it,"top",e.top),D(it,"left",e.left),D(it,"width",e.width),D(it,"height",e.height),D(it,"opacity","0.8"),D(it,"position",jt?"absolute":"fixed"),D(it,"zIndex","100000"),D(it,"pointerEvents","none"),Rt.ghost=it,t.appendChild(it),D(it,"transform-origin",pt/parseInt(it.style.width)*100+"% "+wt/parseInt(it.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;J("dragStart",this,{evt:t}),Rt.eventCanceled?this._onDrop():(J("setupClone",this),Rt.eventCanceled||((at=L(tt)).removeAttribute("id"),at.draggable=!1,at.style["will-change"]="",this._hideClone(),I(at,this.options.chosenClass,!1),Rt.clone=at),i.cloneId=Vt((function(){J("clone",i),Rt.eventCanceled||(i.options.removeCloneOnHide||nt.insertBefore(at,tt),i._hideClone(),Q({sortable:i,name:"clone"}))})),!e&&I(tt,r.dragClass,!0),e?(St=!0,i._loopId=setInterval(i._emulateDragOver,50)):(x(document,"mouseup",i._onDrop),x(document,"touchend",i._onDrop),x(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,tt)),y(document,"drop",i),D(tt,"transform","translateZ(0)")),kt=!0,i._dragStartId=Vt(i._dragStarted.bind(i,e,t)),y(document,"selectstart",i),yt=!0,window.getSelection().removeAllRanges(),b&&D(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,r,o=this.el,s=t.target,l=this.options,u=l.group,c=Rt.active,h=dt===u,d=l.sort,f=ft||c,v=this,m=!1;if(!Ot){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=z(s,l.draggable,o,!0),$("dragOver"),Rt.eventCanceled)return m;if(tt.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||v._ignoreWhileAnimating===s)return G(!1);if(St=!1,c&&!l.disabled&&(h?d||(n=et!==nt):ft===this||(this.lastPutMode=dt.checkPull(this,c,tt,t))&&u.checkPut(this,c,tt,t))){if(r="vertical"===this._getDirection(t,s),e=M(tt),$("dragOverValid"),Rt.eventCanceled)return m;if(n)return et=nt,P(),this._hideClone(),$("revert"),Rt.eventCanceled||(rt?nt.insertBefore(tt,rt):nt.appendChild(tt)),G(!0);var b=F(o,l.draggable);if(!b||function(t,e,i){var n=M(F(i.el,i.options.draggable)),r=U(i.el,i.options,it);return e?t.clientX>r.right+10||t.clientY>n.bottom&&t.clientX>n.left:t.clientY>r.bottom+10||t.clientX>n.right&&t.clientY>n.top}(t,r,this)&&!b.animated){if(b===tt)return G(!1);if(b&&o===t.target&&(s=b),s&&(i=M(s)),!1!==Ut(nt,o,tt,e,s,i,t,!!s))return P(),b&&b.nextSibling?o.insertBefore(tt,b.nextSibling):o.appendChild(tt),et=o,L(),G(!0)}else if(b&&function(t,e,i){var n=M(j(i.el,0,i.options,!0)),r=U(i.el,i.options,it);return e?t.clientX<r.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<r.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,r,this)){var g=j(o,0,l,!0);if(g===tt)return G(!1);if(i=M(s=g),!1!==Ut(nt,o,tt,e,s,i,t,!1))return P(),o.insertBefore(tt,g),et=o,L(),G(!0)}else if(s.parentNode===o){i=M(s);var p,w,y,x=tt.parentNode!==o,_=!function(t,e,i){var n=i?t.left:t.top,r=i?e.left:e.top;return n===r||(i?t.right:t.bottom)===(i?e.right:e.bottom)||n+(i?t.width:t.height)/2===r+(i?e.width:e.height)/2}(tt.animated&&tt.toRect||e,s.animated&&s.toRect||i,r),E=r?"top":"left",k=A(s,"top","top")||A(tt,"top","top"),S=k?k.scrollTop:void 0;if(xt!==s&&(w=i[E],Dt=!1,Tt=!_&&l.invertSwap||x),p=function(t,e,i,n,r,o,a,s){var l=n?t.clientY:t.clientX,u=n?i.height:i.width,c=n?i.top:i.left,h=n?i.bottom:i.right,d=!1;if(!a)if(s&&Et<u*r){if(!Dt&&(1===_t?l>c+u*o/2:l<h-u*o/2)&&(Dt=!0),Dt)d=!0;else if(1===_t?l<c+Et:l>h-Et)return-_t}else if(l>c+u*(1-r)/2&&l<h-u*(1-r)/2)return function(t){return B(tt)<B(t)?1:-1}(e);return(d=d||a)&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}(t,s,i,r,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Tt,xt===s),0!==p){var T=B(tt);do{y=et.children[T-=p]}while(y&&("none"===D(y,"display")||y===it))}if(0===p||y===s)return G(!1);xt=s,_t=p;var C=s.nextElementSibling,O=!1,N=Ut(nt,o,tt,e,s,i,t,O=1===p);if(!1!==N)return 1!==N&&-1!==N||(O=1===N),Ot=!0,setTimeout(Wt,30),P(),O&&!C?o.appendChild(tt):s.parentNode.insertBefore(tt,O?C:s),k&&H(k,0,S-k.scrollTop),et=tt.parentNode,void 0===w||Tt||(Et=Math.abs(w-M(s)[E])),L(),G(!0)}if(o.contains(tt))return G(!1)}return!1}function $(l,u){J(l,v,a({evt:t,isOwner:h,axis:r?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:d,fromSortable:f,target:s,completed:G,onMove:function(i,n){return Ut(nt,o,tt,e,i,M(i),t,n)},changed:L},u))}function P(){$("dragOverAnimationCapture"),v.captureAnimationState(),v!==f&&f.captureAnimationState()}function G(e){return $("dragOverCompleted",{insertion:e}),e&&(h?c._hideClone():c._showClone(v),v!==f&&(I(tt,ft?ft.options.ghostClass:c.options.ghostClass,!1),I(tt,l.ghostClass,!0)),ft!==v&&v!==Rt.active?ft=v:v===Rt.active&&ft&&(ft=null),f===v&&(v._ignoreWhileAnimating=s),v.animateAll((function(){$("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===tt&&!tt.animated||s===o&&!s.animated)&&(xt=null),l.dragoverBubble||t.rootEl||s===document||(tt.parentNode[Y]._isOutsideThisEl(t.target),!e&&Lt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function L(){ut=B(tt),ht=B(tt,l.draggable),Q({sortable:v,name:"change",toEl:o,newIndex:ut,newDraggableIndex:ht,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){x(document,"mousemove",this._onTouchMove),x(document,"touchmove",this._onTouchMove),x(document,"pointermove",this._onTouchMove),x(document,"dragover",Lt),x(document,"mousemove",Lt),x(document,"touchmove",Lt)},_offUpEvents:function(){var t=this.el.ownerDocument;x(t,"mouseup",this._onDrop),x(t,"touchend",this._onDrop),x(t,"pointerup",this._onDrop),x(t,"pointercancel",this._onDrop),x(t,"touchcancel",this._onDrop),x(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;ut=B(tt),ht=B(tt,i.draggable),J("drop",this,{evt:t}),et=tt&&tt.parentNode,ut=B(tt),ht=B(tt,i.draggable),Rt.eventCanceled||(kt=!1,Tt=!1,Dt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zt(this.cloneId),Zt(this._dragStartId),this.nativeDraggable&&(x(document,"drop",this),x(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),b&&D(document.body,"user-select",""),D(tt,"transform",""),t&&(yt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),it&&it.parentNode&&it.parentNode.removeChild(it),(nt===et||ft&&"clone"!==ft.lastPutMode)&&at&&at.parentNode&&at.parentNode.removeChild(at),tt&&(this.nativeDraggable&&x(tt,"dragend",this),Yt(tt),tt.style["will-change"]="",yt&&!kt&&I(tt,ft?ft.options.ghostClass:this.options.ghostClass,!1),I(tt,this.options.chosenClass,!1),Q({sortable:this,name:"unchoose",toEl:et,newIndex:null,newDraggableIndex:null,originalEvent:t}),nt!==et?(ut>=0&&(Q({rootEl:et,name:"add",toEl:et,fromEl:nt,originalEvent:t}),Q({sortable:this,name:"remove",toEl:et,originalEvent:t}),Q({rootEl:et,name:"sort",toEl:et,fromEl:nt,originalEvent:t}),Q({sortable:this,name:"sort",toEl:et,originalEvent:t})),ft&&ft.save()):ut!==lt&&ut>=0&&(Q({sortable:this,name:"update",toEl:et,originalEvent:t}),Q({sortable:this,name:"sort",toEl:et,originalEvent:t})),Rt.active&&(null!=ut&&-1!==ut||(ut=lt,ht=ct),Q({sortable:this,name:"end",toEl:et,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){J("nulling",this),nt=tt=et=it=rt=at=ot=st=vt=mt=yt=ut=ht=lt=ct=xt=_t=ft=dt=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,Mt.forEach((function(t){t.checked=!0})),Mt.length=bt=gt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":tt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,r=i.length,o=this.options;n<r;n++)z(t=i[n],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Xt(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var r=n.children[e];z(r,this.options.draggable,n,!1)&&(i[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return z(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=V.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&Pt(i)},destroy:function(){J("destroy",this);var t=this.el;t[Y]=null,x(t,"mousedown",this._onTapStart),x(t,"touchstart",this._onTapStart),x(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(x(t,"dragover",this),x(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),It.splice(It.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!st){if(J("hideClone",this),Rt.eventCanceled)return;D(at,"display","none"),this.options.removeCloneOnHide&&at.parentNode&&at.parentNode.removeChild(at),st=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(st){if(J("showClone",this),Rt.eventCanceled)return;tt.parentNode!=nt||this.options.group.revertClone?rt?nt.insertBefore(at,rt):nt.appendChild(at):nt.insertBefore(at,tt),this.options.group.revertClone&&this.animate(tt,at),D(at,"display",""),st=!1}}else this._hideClone()}},At&&y(document,"touchmove",(function(t){(Rt.active||kt)&&t.cancelable&&t.preventDefault()})),Rt.utils={on:y,off:x,css:D,find:C,is:function(t,e){return!!z(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:G,closest:z,toggleClass:I,clone:L,index:B,nextTick:Vt,cancelNextTick:Zt,detectDirection:$t,getChild:j,expando:Y},Rt.get=function(t){return t[Y]},Rt.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Rt.utils=a(a({},Rt.utils),t.utils)),V.mount(t)}))},Rt.create=function(t,e){return new Rt(t,e)},Rt.version="1.15.6";var qt,Jt,Qt,te,ee,ie,ne=[],re=!1;function oe(){ne.forEach((function(t){clearInterval(t.pid)})),ne=[]}function ae(){clearInterval(ie)}var se=G((function(t,e,i,n){if(e.scroll){var r,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=O(),c=!1;Jt!==i&&(Jt=i,oe(),r=e.scrollFn,!0===(qt=e.scroll)&&(qt=$(i,!0)));var h=0,d=qt;do{var f=d,v=M(f),m=v.top,b=v.bottom,g=v.left,p=v.right,w=v.width,y=v.height,x=void 0,_=void 0,E=f.scrollWidth,z=f.scrollHeight,k=D(f),S=f.scrollLeft,I=f.scrollTop;f===u?(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(x=w<E&&("auto"===k.overflowX||"scroll"===k.overflowX),_=y<z&&("auto"===k.overflowY||"scroll"===k.overflowY));var T=x&&(Math.abs(p-o)<=s&&S+w<E)-(Math.abs(g-o)<=s&&!!S),C=_&&(Math.abs(b-a)<=s&&I+y<z)-(Math.abs(m-a)<=s&&!!I);if(!ne[h])for(var A=0;A<=h;A++)ne[A]||(ne[A]={});ne[h].vx==T&&ne[h].vy==C&&ne[h].el===f||(ne[h].el=f,ne[h].vx=T,ne[h].vy=C,clearInterval(ne[h].pid),0==T&&0==C||(c=!0,ne[h].pid=setInterval(function(){n&&0===this.layer&&Rt.active._onTouchMove(ee);var e=ne[this.layer].vy?ne[this.layer].vy*l:0,i=ne[this.layer].vx?ne[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Rt.dragged.parentNode[Y],i,e,t,ee,ne[this.layer].el)||H(ne[this.layer].el,i,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&d!==u&&(d=$(d,!1)));re=c}}),30),le=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.dispatchSortableEvent,o=t.unhideGhostForTarget;if(e){var a=i||t.activeSortable;(0,t.hideGhostForTarget)();var s=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,l=document.elementFromPoint(s.clientX,s.clientY);o(),a&&!a.el.contains(l)&&(r("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function ue(){}function ce(){}ue.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=j(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:le},u(ue,{pluginName:"revertOnSpill"}),ce.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:le},u(ce,{pluginName:"removeOnSpill"});var he,de,fe,ve,me,be=[],ge=[],pe=!1,we=!1,ye=!1;function xe(t,e){ge.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}function _e(){be.forEach((function(t){t!==fe&&t.parentNode&&t.parentNode.removeChild(t)}))}Rt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):y(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?x(document,"dragover",this._handleAutoScroll):(x(document,"pointermove",this._handleFallbackAutoScroll),x(document,"touchmove",this._handleFallbackAutoScroll),x(document,"mousemove",this._handleFallbackAutoScroll)),ae(),oe(),clearTimeout(k),k=void 0},nulling:function(){ee=Jt=qt=re=ie=Qt=te=null,ne.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(n,r);if(ee=t,e||this.options.forceAutoScrollFallback||v||f||b){se(t,this.options,o,e);var a=$(o,!0);!re||ie&&n===Qt&&r===te||(ie&&ae(),ie=setInterval((function(){var o=$(document.elementFromPoint(n,r),!0);o!==a&&(a=o,oe()),se(t,i.options,o,e)}),10),Qt=n,te=r)}else{if(!this.options.bubbleScroll||$(o,!0)===O())return void oe();se(t,this.options,$(o,!1),!1)}}},u(t,{pluginName:"scroll",initializeByDefault:!0})}),Rt.mount(ce,ue),Rt.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?y(document,"pointerup",this._deselectMultiDrag):(y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag))),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,i){var n="";be.length&&de===t?be.forEach((function(t,e){n+=(e?", ":"")+t.textContent})):n=i.textContent,e.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){fe=t.dragEl},delayEnded:function(){this.isMultiDrag=~be.indexOf(fe)},setupClone:function(t){var e=t.sortable,i=t.cancel;if(this.isMultiDrag){for(var n=0;n<be.length;n++)ge.push(L(be[n])),ge[n].sortableIndex=be[n].sortableIndex,ge[n].draggable=!1,ge[n].style["will-change"]="",I(ge[n],this.options.selectedClass,!1),be[n]===fe&&I(ge[n],this.options.chosenClass,!1);e._hideClone(),i()}},clone:function(t){var e=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||be.length&&de===t.sortable&&(xe(!0,t.rootEl),e("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,i=t.cancel;this.isMultiDrag&&(xe(!1,t.rootEl),ge.forEach((function(t){D(t,"display","")})),e(),me=!1,i())},hideClone:function(t){var e=this,i=t.cloneNowHidden,n=t.cancel;this.isMultiDrag&&(ge.forEach((function(t){D(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),i(),me=!0,n())},dragStartGlobal:function(){!this.isMultiDrag&&de&&de.multiDrag._deselectMultiDrag(),be.forEach((function(t){t.sortableIndex=B(t)})),be=be.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ye=!0},dragStarted:function(t){var e=this,i=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){be.forEach((function(t){t!==fe&&D(t,"position","absolute")}));var n=M(fe,!1,!0,!0);be.forEach((function(t){t!==fe&&K(t,n)})),we=!0,pe=!0}i.animateAll((function(){we=!1,pe=!1,e.options.animation&&be.forEach((function(t){R(t)})),e.options.sort&&_e()}))}},dragOver:function(t){var e=t.completed,i=t.cancel;we&&~be.indexOf(t.target)&&(e(!1),i())},revert:function(t){var e=t.fromSortable,i=t.rootEl,n=t.sortable,r=t.dragRect;be.length>1&&(be.forEach((function(t){n.addAnimationState({target:t,rect:we?M(t):r}),R(t),t.fromRect=r,e.removeAnimationState(t)})),we=!1,function(t,e){be.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.activeSortable,r=t.parentEl,o=t.putSortable,a=this.options;if(t.insertion){if(i&&n._hideClone(),pe=!1,a.animation&&be.length>1&&(we||!i&&!n.options.sort&&!o)){var s=M(fe,!1,!0,!0);be.forEach((function(t){t!==fe&&(K(t,s),r.appendChild(t))})),we=!0}if(!i)if(we||_e(),be.length>1){var l=me;n._showClone(e),n.options.animation&&!me&&l&&ge.forEach((function(t){n.addAnimationState({target:t,rect:ve}),t.fromRect=ve,t.thisAnimationDuration=null}))}else n._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(be.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){ve=u({},e);var r=T(fe,!0);ve.top-=r.f,ve.left-=r.e}},dragOverAnimationComplete:function(){we&&(we=!1,_e())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,r=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,l=s||this.sortable;if(e){var u=this.options,c=n.children;if(!ye)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),I(fe,u.selectedClass,!~be.indexOf(fe)),~be.indexOf(fe))be.splice(be.indexOf(fe),1),he=null,Z({sortable:r,rootEl:i,name:"deselect",targetEl:fe,originalEvent:e});else{if(be.push(fe),Z({sortable:r,rootEl:i,name:"select",targetEl:fe,originalEvent:e}),e.shiftKey&&he&&r.el.contains(he)){var h=B(he),d=B(fe);~h&&~d&&h!==d&&function(){var t,o;d>h?(o=h,t=d):(o=d,t=h+1);for(var a=u.filter;o<t;o++)~be.indexOf(c[o])||z(c[o],u.draggable,n,!1)&&(a&&("function"==typeof a?a.call(r,e,c[o],r):a.split(",").some((function(t){return z(c[o],t.trim(),n,!1)})))||(I(c[o],u.selectedClass,!0),be.push(c[o]),Z({sortable:r,rootEl:i,name:"select",targetEl:c[o],originalEvent:e})))}()}else he=fe;de=l}if(ye&&this.isMultiDrag){if(we=!1,(n[Y].options.sort||n!==i)&&be.length>1){var f=M(fe),v=B(fe,":not(."+this.options.selectedClass+")");if(!pe&&u.animation&&(fe.thisAnimationDuration=null),l.captureAnimationState(),!pe&&(u.animation&&(fe.fromRect=f,be.forEach((function(t){if(t.thisAnimationDuration=null,t!==fe){var e=we?M(t):f;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),_e(),be.forEach((function(t){c[v]?n.insertBefore(t,c[v]):n.appendChild(t),v++})),a===B(fe))){var m=!1;be.forEach((function(t){t.sortableIndex===B(t)||(m=!0)})),m&&(o("update"),o("sort"))}be.forEach((function(t){R(t)})),l.animateAll()}de=l}(i===n||s&&"clone"!==s.lastPutMode)&&ge.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ye=!1,ge.length=0},destroyGlobal:function(){this._deselectMultiDrag(),x(document,"pointerup",this._deselectMultiDrag),x(document,"mouseup",this._deselectMultiDrag),x(document,"touchend",this._deselectMultiDrag),x(document,"keydown",this._checkKeyDown),x(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ye&&ye||de!==this.sortable||t&&z(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;be.length;){var e=be[0];I(e,this.options.selectedClass,!1),be.shift(),Z({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},u(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Y];e&&e.options.multiDrag&&!~be.indexOf(t)&&(de&&de!==e&&(de.multiDrag._deselectMultiDrag(),de=e),I(t,e.options.selectedClass,!0),be.push(t))},deselect:function(t){var e=t.parentNode[Y],i=be.indexOf(t);e&&e.options.multiDrag&&~i&&(I(t,e.options.selectedClass,!1),be.splice(i,1))}},eventProperties:function(){var t,e=this,i=[],n=[];return be.forEach((function(t){var r;i.push({multiDragElement:t,index:t.sortableIndex}),r=we&&t!==fe?-1:we?B(t,":not(."+e.options.selectedClass+")"):B(t),n.push({multiDragElement:t,index:r})})),{items:(t=be,function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?h(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(ge),oldIndicies:i,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})});const Ee=class{constructor(i){t(this,i),this.itemsReordered=e(this,"itemsReordered",7),this.ezSelectItens=e(this,"ezSelectItens",7),this.ezDoubleClick=e(this,"ezDoubleClick",7),this.ezChoose=e(this,"ezChoose",7),this.filterTerm="",this.title=void 0,this.hideHeader=!1,this.hideTotalizer=!1,this.group="default",this.dataSource=[],this.idSortableList="DEFAULT_LIST",this.entityLabel="item",this.entityLabelPlural="itens",this.emptyMessage="Nenhum item na lista",this.hoverFeedback=!0,this.enableMultipleSelection=!1,this.removeItensMoved=!1,this.itemRightSlotBuilder=void 0,this.itemLeftSlotBuilder=void 0,this.selectedItems=new Set}async clearSelection(){this.selectedItems.clear(),this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(Rt.utils.deselect(i),t.selected=!1)})),this.ezSelectItens.emit([])}componentDidLoad(){this.initSortable()}componentDidRender(){this.selectPredefinedItens()}initSortable(){this._sortableInstance&&this._sortableInstance.destroy(),this._sortableInstance=new Rt(this.el.shadowRoot.querySelector(`#${this.idSortableList}`),{group:{name:this.group,pull:!0,put:!0},ghostClass:"ghost",dragClass:"dragging",animation:15,multiDrag:this.enableMultipleSelection,avoidImplicitDeselect:this.enableMultipleSelection,selectedClass:"selected",filter:".filtered",swapThreshold:.5,multiDragKey:"Control",removeCloneOnHide:!0,onEnd:t=>this.handleReorderEvent(t),onSelect:t=>this.handleSelect(t),onDeselect:t=>this.handleDeselect(t),onSort:t=>this.handleSortItem(t),onChoose:t=>this.ezChoose.emit(t)})}selectPredefinedItens(){this.dataSource.forEach((t=>{var e;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(`[data-key="${t.id}"]`);i&&(this.selectedItems.has(t.id)||!0===t.selected?Rt.utils.select(i):Rt.utils.deselect(i))}))}handleSortItem(t){var e;if(!this.removeItensMoved)return;const i=t.from.getAttribute("id");t.to.getAttribute("id")!==i?((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).forEach((t=>t.remove())):t.items=this.removeDuplicateElements(t.items)}removeDuplicateElements(t){const e=new Set;return t.filter((t=>{const i=t.getAttribute("data-key");if(i){if(e.has(i))return t.remove(),!1;e.add(i)}return!0}))}handleSelect(t){this.updateSelection(t.item,!0)}handleDeselect(t){this.updateSelection(t.item,!1)}updateSelection(t,e){const i=t.getAttribute("data-key");if(!i)return;const n=this.dataSource.find((t=>t.id===i));n&&(n.selected=e,e?this.selectedItems.add(i):this.selectedItems.delete(i),this.emitSelectedItems())}emitSelectedItems(){this.ezSelectItens.emit(Array.from(this.selectedItems).map((t=>this.dataSource.find((e=>e.id===t)))).filter(Boolean))}handleReorderEvent(t){var e;const i=((null===(e=t.items)||void 0===e?void 0:e.length)>0?t.items:[t.item]).map((t=>t.getAttribute("data-key"))).filter(Boolean);this.itemsReordered.emit({dataSource:this.dataSource,selectItens:i,from:t.from,to:t.to,newIndex:t.newIndex,newIndicies:t.newIndicies})}handleDoubleClick(t){var e;const i=this.dataSource.find((e=>e.id===t));i&&(null===(e=this.ezDoubleClick)||void 0===e||e.emit(i))}getContainerItemBuilder(t,e,n){var r,o;const a="left"===t?null===(r=this.itemLeftSlotBuilder)||void 0===r?void 0:r.call(this,e):null===(o=this.itemRightSlotBuilder)||void 0===o?void 0:o.call(this,e);if(null!=a)return"string"!=typeof a?i("div",{class:n},a):i("div",{class:n,innerHTML:a})}disconnectedCallback(){this._sortableInstance&&(this._sortableInstance.destroy(),this._sortableInstance=null)}buildTotalizer(){return`Total de ${this.dataSource.length} ${1===this.dataSource.length?this.entityLabel:this.entityLabelPlural}`}renderItems(){return r.applyStringFilter(this.filterTerm,this.dataSource).map((t=>i("div",{id:`ID_${t.id}`,key:`KEY_${t.id}`,class:{"sortable-item":!0,"hover-feedback":this.hoverFeedback},"data-key":t.id,onDblClick:()=>this.handleDoubleClick(t.id)},!!this.itemLeftSlotBuilder&&this.getContainerItemBuilder("left",t),i("div",{class:"item-content"},i("span",{class:"draggable-icon"}),t.label),!!this.itemRightSlotBuilder&&this.getContainerItemBuilder("right",t))))}handleFilterChanged(t){t.stopPropagation(),t.preventDefault(),this.filterTerm=t.detail}renderTotalizer(){if(!this.hideTotalizer)return i("div",{class:"sortable-totalizer"},this.buildTotalizer())}renderHeader(){if(!this.hideHeader)return i("div",{class:"sortable-header"},i("span",{class:"sortable-label"},this.title),i("ez-filter-input",{label:`Buscar ${this.entityLabel}`,mode:"slim",onEzChange:t=>this.handleFilterChanged(t)}))}render(){return i("div",{class:"sortable-content"},this.renderHeader(),i("div",{class:`sortable-list ${this.dataSource.length<1?"empty-content":""} list-scroller--fix`,"data-content":this.emptyMessage,style:{"--empty-content":`"${this.emptyMessage}"`},id:this.idSortableList,key:this.idSortableList},this.renderItems()),this.renderTotalizer())}get el(){return n(this)}};Ee.style=':host{--ez-sortable-list__host--z-index:var(--visible, 1);--ez-sortable-list__host--border-radius:var(--border--radius-medium, 12px);--ez-sortable-list__host--padding:var(--space--medium, 12px);--ez-sortable-list__item--margin:0 var(--space--small, 6px);--ez-sortable-list__item--padding:var(--space--3xs, 6px);--ez-sortable-list__item--color:var(--title--primary, #2b3a54);--ez-sortable-list__item--font-family:var(--font-pattern, "Roboto");--ez-sortable-list__item--font-size:var(--text--medium, 14px);--ez-sortable-list__selected-item--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__selected-item--background-color:var(--color--primary-300, #E2F4EF);--ez-sortable-list__selectable--padding-right:var(--space--small, 6px);--ez-sortable-list__selectable--padding-left:var(--space--small, 6px);--ez-sortable-list__icon--color:#AFB6C0;--ez-sortable-list__draggable-icon--image:url(\'data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><path d="m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z"/></svg>\');--ez-sortable-list__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-sortable-list--color-background:var(--scrollbar--background, #E5EAF0);--ez-sortable-list__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-sortable-list__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-sortable-list--border-radius:var(--border--radius-small, 6px);--ez-sortable-list__scrollbar--width:var(--space--small, 6px);max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-sortable-list__host--z-index)}.sortable-item{display:flex;justify-content:space-between;font-family:var(--ez-sortable-list__item--font-family);font-size:var(--ez-sortable-list__item--font-size);padding:var(--ez-sortable-list__item--padding) 0px;margin:var(--ez-sortable-list__item--margin)}.hover-feedback:hover{background-color:var(--background--medium);border-radius:var(--border--radius-regular)}.sortable-item.dragging{background:#FFFFFF;border:1px solid #008561;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.sortable-list{padding:0;margin:0;width:100%;height:100%;max-height:100%;display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;color:var(--text-color);scrollbar-color:var(--ez-sortable-list__scrollbar--color-clicked) var(--ez-sortable-list--color-background)}.sortable-list.empty-content::after{content:attr(data-content);display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.list-scroller--fix{scrollbar-width:thin}.list-scroller--hover{scrollbar-width:none}.item-content{display:flex;flex-grow:1;flex-direction:row}.empty-message{font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);margin:auto}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:\'\';display:flex;width:18px;height:18px;background-color:var(--ez-sortable-list__icon--color);-webkit-mask-image:var(--ez-sortable-list__draggable-icon--image);mask-image:var(--ez-sortable-list__draggable-icon--image)}.selectable{cursor:pointer;padding-right:var(--ez-sortable-list__selectable--padding-right);padding-left:var(--ez-sortable-list__selectable--padding-left)}.selected{background:var(--ez-sortable-list__selected-item--background-color);border-radius:var(--ez-sortable-list__selected-item--border-radius)}.list-fix::-webkit-scrollbar-thumb{background-color:var(--ez-sortable-list__scrollbar--color-default);border-radius:var(--ez-sortable-list--border-radius)}.list-fix::-webkit-scrollbar-thumb:active{background-color:var(--ez-sortable-list__scrollbar--color-clicked)}.list-fix::-webkit-scrollbar{width:var(--ez-sortable-list__scrollbar--width);display:none}.list-hover::-webkit-scrollbar-thumb:hover{background-color:var(--ez-sortable-list__scrollbar--color-hover)}.list-hover:hover{scrollbar-width:thin}.list-hover:hover::-webkit-scrollbar{display:block}.ghost{opacity:.5;background:#589f7b}.sortable-content{display:flex;justify-content:space-between;gap:10px;flex-direction:column;border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-medium);width:100%;height:400px;min-width:40%}@media (max-height: 630px){.sortable-content{height:290px}}.sortable-header{background:var(--background--body);padding:10px;border-radius:var(--border--radius-medium) var(--border--radius-medium) 0 0}.sortable-label{font-weight:var(--text-weight--large);font-size:var(--text--medium);color:var(--title--primary);margin-bottom:10px;display:block}.sortable-totalizer{padding:5px 10px;background:var(--background--body);font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--primary);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium)}';export{Ee as ez_sortable_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,g as e,H as o}from"./p-23a36bb6.js";import{ElementIDUtils as r}from"@sankhyalabs/core";import{C as a}from"./p-ec7db713.js";import{c as h,o as n,f as l,s as c,a as d}from"./p-e07e4671.js";const p=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.ezSearching=s(this,"ezSearching",7),this.ezFocusIn=s(this,"ezFocusIn",7),this._searchingText="",this.handleFocus=()=>{this._textInput.value=""===this._searchingText?"":this._searchingText,this.ezFocusIn.emit()},this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.restrict=void 0,this.mode="regular",this.asyncSearch=!1,this.canShowError=!0,this.autoFocus=!1}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){this._textInput&&(this._textInput.errorMessage=this.errorMessage)}observeValue(t,s){this._textInput&&t!=s&&(this._textInput.value=t,this.ezChange.emit(t))}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async setValue(t){this.asyncSearch&&null!=this._textInput&&(t!==this.value?(this.value=t,this._searchingText=""):this._textInput.value=t)}async endSearch(){this.asyncSearch&&null!=this._textInput&&this._textInput.value!==this.value&&(this._textInput.value=this.value)}handleChange(t){const s=t.detail;this.errorMessage="",this.asyncSearch?(this._searchingText=s,this.ezSearching.emit(s)):s!==this.value&&(this.value=s)}componentDidLoad(){a.applyVarsTextInput(this._elem,this._textInput),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return r.addIDInfoIfNotExists(this._elem,"input"),i("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,label:this.label,onEzChange:t=>this.handleChange(t),value:this.value,enabled:this.enabled,errorMessage:this.errorMessage,restrict:this.restrict,mode:this.mode,onFocusin:this.handleFocus,canShowError:this.canShowError},i("ez-icon",{slot:"leftIcon",iconName:"search"}))}get _elem(){return e(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};p.style=":host{display:block;width:100%}";const u=class{constructor(s){t(this,s),this._opened=!1,this.message=void 0,this.anchoringElement=void 0,this.placement="bottom",this.gapOptions={horizontalGap:0,verticalGap:0},this.type="default",this.debouncingTime=500,this.active=!0,this.maxWidth=200,this.useAnchorSize=!1}watchAnchoringElement(t,s){t&&(this.setEvents(t),this.removeEvents(s))}watchMessage(t){t?this.updatePosition():this.closeTooltip()}openTooltip(){this.message&&this.active&&(this._debouncingTimeout&&clearTimeout(this._debouncingTimeout),this._debouncingTimeout=setTimeout((()=>{this._opened=!0,this._tooltipElement.style.display="block",this.updatePosition()}),this.debouncingTime))}closeTooltip(){clearTimeout(this._debouncingTimeout),this._tooltipElement.style.display="none",this._opened=!1}async updatePosition(t=this.anchoringElement){if(t&&this._opened){if(this.useAnchorSize){const s=t.getBoundingClientRect().width;this._tooltipElement.style.width=`${s}px`}await h(t,this._tooltipElement,{placement:this.placement,middleware:[n(5),l(),c(),d({element:this._arrowElement})]}).then((({x:t,y:s,placement:i,middlewareData:e})=>{const o=i.includes("bottom")?s+this.gapOptions.verticalGap:s-this.gapOptions.verticalGap,r=i.includes("start")?t+this.gapOptions.horizontalGap:t-this.gapOptions.horizontalGap;if(Object.assign(this._tooltipElement.style,{top:`${o}px`,left:`${r}px`}),e.arrow){const{x:t}=e.arrow,s=i.includes("bottom");Object.assign(this._arrowElement.style,{left:`${t}px`,top:s?-this._arrowElement.offsetHeight/2+"px":"",bottom:s?"":-this._arrowElement.offsetHeight/2+"px"})}}))}}handleSlotChange(t){const s=t.target.assignedElements()[0];this.anchoringElement=s}setEvents(t=this.anchoringElement){t&&(t.addEventListener("mouseenter",(()=>{this.openTooltip()})),t.addEventListener("mouseleave",(()=>{this.closeTooltip()})))}removeEvents(t=this.anchoringElement){t&&(t.removeEventListener("mouseenter",(()=>{this.openTooltip()})),t.removeEventListener("mouseleave",(()=>{this.closeTooltip()})))}componentDidLoad(){this.setEvents()}render(){return i(o,null,i("div",Object.assign({ref:t=>this._tooltipElement=t},{inert:!0},{class:{tooltip:!0,[`${this.type}-tooltip`]:!0},style:{maxWidth:this.maxWidth&&!this.useAnchorSize?`${this.maxWidth}px`:void 0},role:"tooltip","data-element-id":r.getInternalIDInfo("tooltip")}),this.message,i("div",{ref:t=>this._arrowElement=t,class:"arrow"})),i("slot",{onSlotchange:t=>{this.handleSlotChange(t)}}))}get _element(){return e(this)}static get watchers(){return{anchoringElement:["watchAnchoringElement"],message:["watchMessage"]}}};u.style=":host{--triangle-size:8px;width:100%}.tooltip{position:absolute;z-index:var(--elevation--24);padding:var(--space--extra-small, 3px) var(--space--small, 6px);border-radius:var(--border--radius-small);box-sizing:border-box;font-family:var(--font-pattern\t, 'Roboto', sans-serif);font-size:var(--text--small, 12px);font-weight:var(--text-weight--medium, 400);text-align:center;width:max-content;display:none}.arrow{position:absolute;width:var(--triangle-size);height:var(--triangle-size);transform:rotate(45deg)}.default-tooltip{background:var(--title--primary, #2b3a54);color:var(--color--inverted)}.default-tooltip .arrow{background:var(--title--primary, #2b3a54)}.error-tooltip{background:var(--color-alert--error-800, #BD0025);color:var(--color--error-200, #F7E0E5)}.error-tooltip .arrow{background:var(--color-alert--error-800, #BD0025)}.success-tooltip{background:var(--color--success, #00cb94);color:var(--color--success-200, #EBFFFA)}.success-tooltip .arrow{background:var(--color--success, #00cb94)}.warning-tooltip{background:var(--color--warning, #f2d410);color:var(--color--warning-200, #FDF8D8)}.warning-tooltip .arrow{background:var(--color--warning, #f2d410)}";export{p as ez_filter_input,u as ez_tooltip}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as s}from"./p-23a36bb6.js";import{ObjectUtils as o}from"@sankhyalabs/core";import{i as n}from"./p-80dfc50b.js";function h(t,e,i){if(!t.length)return[...e];if(!e.length)return[];const s=function(t,e){return t.map((t=>e.findIndex((e=>e.id===t))))}(t,e),o=0===(n=s).length?0:n.reduce(((t,e)=>e<t?e:t),n[0]);var n;const h=function(t){return 0===t.length?0:t.reduce(((t,e)=>e>t?e:t),t[0])}(s);return function(t,e,i,s){return t<0||e>=s.length||t>e?s:i?function(t,e,i){if(t===i.length-1)return i;const s=i.slice(0,e),o=i.slice(e,t+1),n=i.slice(t+1),h=n.shift();return h?[...s,h,...o,...n]:i}(e,t,s):function(t,e,i){if(0===t)return i;const s=i.slice(0,t-1),o=i.slice(t,e+1),n=i.slice(e+1);return[...s,...o,i[t-1],...n]}(t,e,s)}(o,h,i,e)}function l({from:t,to:e,selectedFrom:i,selectedTo:s}){return e=[...e.map((t=>a(t,!1))),...t.map((t=>a(t,!0)))],i=[],s=[...t.map((({id:t})=>t))],{from:t=[],to:e,selectedFrom:i,selectedTo:s}}function r({from:t,to:e,selectedFrom:i,selectedTo:s,insertIndex:o=e.length}){if(!t.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};const n=function(t,e,i){const s=t.map((t=>t.id)),o=e.filter((t=>!s.includes(t)));return i.filter((({id:t})=>o.includes(t)))}(e,i,t);if(!n.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};let h=e.map((t=>a(t,!1)));return h.splice(o,0,...n.map((t=>a(t,!0)))),{from:t.filter((t=>!i.includes(t.id))),to:h,selectedFrom:[],selectedTo:[...i]}}function a(t,e){return Object.assign(Object.assign({},t),{selected:e})}const d=class{constructor(i){t(this,i),this.ezLeftListChanged=e(this,"ezLeftListChanged",7),this.ezRightListChanged=e(this,"ezRightListChanged",7),this.LEFT_LIST_ID="LEFT-LIST-ID",this.RIGHT_LIST_ID="RIGHT-LIST-ID",this.leftList=[],this.leftTitle=void 0,this.rightList=[],this.entityLabel="item",this.entityLabelPlural="itens",this.leftListLabel="disponíveis",this.rightListLabel="selecionados",this.useOnlyRightList=!1,this.rightTitle=void 0,this.emptyMessage=void 0,this.slotsListBuilder=void 0,this.leftFilteredList=[],this.rightFilteredList=[],this.selectedLeftList=[],this.selectedRightList=[],this.isFilteringLeft=!1,this.isFilteringRight=!1}async resetSelectedLists(){this.selectedLeftList=[],this.selectedRightList=[]}observeLeftList(t,e){o.equals(t,e)||this.ezLeftListChanged.emit(t)}observeRightList(t,e){o.equals(t,e)||this.ezRightListChanged.emit(t)}async handleChangeLeft({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.RIGHT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.rightList.every((e=>e.id!==t)))),this.leftList=[...t.dataSource],this.selectedLeftList=[...t.selectItens],this.transferToRight(null==t?void 0:t.newIndex)):this.leftList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}async handleChangeRight({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.LEFT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.leftList.every((e=>e.id!==t)))),this.rightList=[...t.dataSource],this.selectedRightList=[...t.selectItens],this.transferToLeft(null==t?void 0:t.newIndex)):this.rightList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}reorderArray(t,e,i){const s=t.filter((t=>!e.includes(t.id))),o=t.filter((t=>e.includes(t.id)));return s.splice(i,0,...o),s}enableTransferAllToRight(){return this.leftList.length>0}enableTransferAllToLeft(){return this.rightList.length>0}enableTransferToRight(){return this.selectedLeftList.length>0}enableTransferToLeft(){return this.selectedRightList.length>0}enableMoveUp(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(0)&&(!!t||n(e))}enableMoveDown(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(this.rightList.length-1)&&(!!t||n(e))}getRightSelectedItemsIndex(){return this.selectedRightList.map((t=>this.rightList.findIndex((e=>e.id===t))))}transferToRight(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=r(Object.assign(Object.assign({},this.buildTransferToRightConfig()),{insertIndex:null!=t?t:0}));this.leftList=[],requestAnimationFrame((()=>this.leftList=[...e])),this.rightList=[...i],this.selectedLeftList=[...s],this.selectedRightList=[...o]}transferToLeft(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=r(Object.assign(Object.assign({},this.buildTransferToLeftConfig()),{insertIndex:null!=t?t:0}));this.rightList=[],requestAnimationFrame((()=>this.rightList=[...e])),this.leftList=[...i],this.selectedRightList=[...s],this.selectedLeftList=[...o]}async handleTransferAllToRight(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=l(this.buildTransferToRightConfig());this.leftList=[...t],this.rightList=[...e],this.selectedLeftList=[...i],this.selectedRightList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}async handleTransferAllToLeft(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=l(this.buildTransferToLeftConfig());this.rightList=[...t],this.leftList=[...e],this.selectedRightList=[...i],this.selectedLeftList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}buildTransferToRightConfig(){return{from:this.leftList,to:this.rightList,selectedFrom:this.selectedLeftList,selectedTo:this.selectedRightList}}buildTransferToLeftConfig(){return{from:this.rightList,to:this.leftList,selectedFrom:this.selectedRightList,selectedTo:this.selectedLeftList}}handleMoveUp(){this.rightList=[...h(this.selectedRightList,this.rightList,!1)]}handleMoveDown(){this.rightList=[...h(this.selectedRightList,this.rightList,!0)]}handleMoveToTop(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...e,...t]}handleMoveToBottom(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...t,...e]}handleSelectLeftItem({detail:t}){this.selectedLeftList=[...t.map((({id:t})=>t))]}handleSelectRightItem({detail:t}){this.selectedRightList=[...t.map((({id:t})=>t))]}getItemsToKeepAndToMove(){return{itemsToKeep:this.rightList.filter((t=>!this.selectedRightList.includes(t.id))),itemsToMove:this.rightList.filter((t=>this.selectedRightList.includes(t.id)))}}async handleTransferToRight(){this.transferToRight(),this.leftFilteredList=[],await this.leftEzListInstance.clearSelection()}async handleTransferToLeft(){this.transferToLeft(),this.rightFilteredList=[],await this.rightEzListInstance.clearSelection()}async clearSelectionAll(){await this.rightEzListInstance.clearSelection(),await this.leftEzListInstance.clearSelection()}handleChooseLeft(){requestAnimationFrame((async()=>{await this.rightEzListInstance.clearSelection()}))}handleChooseRight(){this.useOnlyRightList||requestAnimationFrame((async()=>{await this.leftEzListInstance.clearSelection()}))}renderList(t){const{idSortableList:e,list:s,isFiltering:o,filteredList:n,emptyMessage:h,slotConfig:l,callbacks:r,title:a}=t;return i("ez-sortable-list",{ref:null==r?void 0:r.setRef,title:a,idSortableList:e,emptyMessage:h,class:"ez-size-height--full",dataSource:o?n:s,hoverFeedback:!0,enableMultipleSelection:!0,removeItensMoved:!0,entityLabel:this.entityLabel,entityLabelPlural:this.entityLabelPlural,itemRightSlotBuilder:null==l?void 0:l.itemRightSlotBuilder,itemLeftSlotBuilder:null==l?void 0:l.itemLeftSlotBuilder,onItemsReordered:null==r?void 0:r.onChange.bind(this),onEzSelectItens:null==r?void 0:r.onSelect.bind(this),onEzDoubleClick:null==r?void 0:r.onDoubleClick.bind(this),onEzChoose:null==r?void 0:r.onChoose.bind(this)})}render(){var t,e,o,n,h,l,r,a,d,c;return i(s,null,!this.useOnlyRightList&&i("div",{class:"list__container"},this.leftList&&this.renderList({idSortableList:this.LEFT_LIST_ID,list:this.leftList,title:this.leftTitle,isFiltering:this.isFilteringLeft,filteredList:this.leftFilteredList,emptyMessage:(null===(t=this.emptyMessage)||void 0===t?void 0:t.LEFT_LIST)?this.emptyMessage.LEFT_LIST:`Nenhum ${this.entityLabel} disponível`,slotConfig:{itemRightSlotBuilder:null===(o=null===(e=this.slotsListBuilder)||void 0===e?void 0:e.LEFT_LIST)||void 0===o?void 0:o.itemRightSlotBuilder,itemLeftSlotBuilder:null===(h=null===(n=this.slotsListBuilder)||void 0===n?void 0:n.LEFT_LIST)||void 0===h?void 0:h.itemLeftSlotBuilder},callbacks:{setRef:t=>this.leftEzListInstance=t,onChange:t=>this.handleChangeLeft(t),onSelect:this.handleSelectLeftItem.bind(this),onDoubleClick:this.handleTransferToRight.bind(this),onChoose:this.handleChooseLeft.bind(this)}})),!this.useOnlyRightList&&i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-right",enabled:this.enableTransferAllToRight(),title:`Mover todos para ${this.rightListLabel}`,size:"small",onClick:this.handleTransferAllToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-right",enabled:this.enableTransferToRight(),title:`Mover para ${this.rightListLabel}`,size:"small",onClick:this.handleTransferToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-left",enabled:this.enableTransferToLeft(),title:`Mover para ${this.leftListLabel}`,size:"small",onClick:this.handleTransferToLeft.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-left",enabled:this.enableTransferAllToLeft(),title:`Mover todos para ${this.leftListLabel}`,size:"small",onClick:this.handleTransferAllToLeft.bind(this)})),i("div",{class:"list__container"},this.rightList&&this.renderList({idSortableList:this.RIGHT_LIST_ID,list:this.rightList,title:this.rightTitle,isFiltering:this.isFilteringRight,filteredList:this.rightFilteredList,emptyMessage:(null===(l=this.emptyMessage)||void 0===l?void 0:l.RIGHT_LIST)?this.emptyMessage.RIGHT_LIST:`Nenhum ${this.entityLabel} selecionado`,slotConfig:{itemRightSlotBuilder:null===(a=null===(r=this.slotsListBuilder)||void 0===r?void 0:r.RIGHT_LIST)||void 0===a?void 0:a.itemRightSlotBuilder,itemLeftSlotBuilder:null===(c=null===(d=this.slotsListBuilder)||void 0===d?void 0:d.RIGHT_LIST)||void 0===c?void 0:c.itemLeftSlotBuilder},callbacks:{setRef:t=>this.rightEzListInstance=t,onChange:t=>this.handleChangeRight(t),onSelect:this.handleSelectRightItem.bind(this),onDoubleClick:this.handleTransferToLeft.bind(this),onChoose:this.handleChooseRight.bind(this)}})),i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-up",enabled:this.enableMoveUp(!0),title:"Mover para primeira posição",size:"small",onClick:this.handleMoveToTop.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-up",enabled:this.enableMoveUp(),title:"Mover para cima",size:"small",onClick:this.handleMoveUp.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-down",enabled:this.enableMoveDown(),title:"Mover para baixo",size:"small",onClick:this.handleMoveDown.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-down",enabled:this.enableMoveDown(!0),title:"Mover para última posição",size:"small",onClick:this.handleMoveToBottom.bind(this)})))}static get watchers(){return{leftList:["observeLeftList"],rightList:["observeRightList"]}}};d.style='.sc-ez-double-list-h{display:flex;flex-direction:row;gap:8px;align-items:center;font-family:var(--font-pattern, "Roboto");width:100%}@media screen and (max-width: 1366px){.group.sc-ez-double-list{height:350px}}.list__container.sc-ez-double-list{height:100%;width:100%;min-height:150px;overflow:auto;display:flex}.actions__column.sc-ez-double-list{display:flex;flex-direction:column;gap:4px}';export{d as ez_double_list}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ListItem } from
|
|
1
|
+
import { ListItem } from "../ez-sortable-list/ez-sortable-list";
|
|
2
2
|
export declare function moveItems(selectedItemsList: string[], itemsList: ListItem[], foward: boolean): ListItem[];
|
|
3
3
|
export declare function transferAll({ from, to, selectedFrom, selectedTo }: TransferConfig): TransferConfig;
|
|
4
|
-
export declare function transferItems({ from, to, selectedFrom, selectedTo }: TransferConfig
|
|
4
|
+
export declare function transferItems({ from, to, selectedFrom, selectedTo, insertIndex, }: TransferConfig & {
|
|
5
|
+
insertIndex?: number;
|
|
6
|
+
}): TransferConfig;
|
|
5
7
|
export interface TransferConfig {
|
|
6
8
|
from: ListItem[];
|
|
7
9
|
to: ListItem[];
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { ListItem } from '../ez-list/ez-list';
|
|
2
|
+
import { ListItem } from '../ez-sortable-list/ez-sortable-list';
|
|
3
|
+
export interface DoubleListSlotConfig {
|
|
4
|
+
itemLeftSlotBuilder?: (item: any) => HTMLElement | string;
|
|
5
|
+
itemRightSlotBuilder?: (item: any) => HTMLElement | string;
|
|
6
|
+
}
|
|
7
|
+
export interface DoubleListSlots {
|
|
8
|
+
LEFT_LIST?: DoubleListSlotConfig;
|
|
9
|
+
RIGHT_LIST?: DoubleListSlotConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface EmptyMessage {
|
|
12
|
+
LEFT_LIST?: string;
|
|
13
|
+
RIGHT_LIST?: string;
|
|
14
|
+
}
|
|
3
15
|
export declare class EzDoubleList {
|
|
4
16
|
readonly LEFT_LIST_ID = "LEFT-LIST-ID";
|
|
5
17
|
readonly RIGHT_LIST_ID = "RIGHT-LIST-ID";
|
|
6
|
-
readonly LEFT_FILTER_ID = "LEFT-FILTER-ID";
|
|
7
|
-
readonly RIGHT_FILTER_ID = "RIGHT-FILTER-ID";
|
|
8
18
|
/**
|
|
9
19
|
* Define a lista origem.
|
|
10
20
|
*/
|
|
@@ -23,7 +33,7 @@ export declare class EzDoubleList {
|
|
|
23
33
|
*/
|
|
24
34
|
entityLabel: string;
|
|
25
35
|
/**
|
|
26
|
-
* Variação
|
|
36
|
+
* Variação plural do nome da entidade listada.
|
|
27
37
|
* Exemplo: "Campos", "Itens", "Empresas".
|
|
28
38
|
*/
|
|
29
39
|
entityLabelPlural: string;
|
|
@@ -35,29 +45,51 @@ export declare class EzDoubleList {
|
|
|
35
45
|
* Rótulo da lista direita.
|
|
36
46
|
*/
|
|
37
47
|
rightListLabel: string;
|
|
48
|
+
/**
|
|
49
|
+
* Define se irá exibir apenas a lista da direita.
|
|
50
|
+
*/
|
|
51
|
+
useOnlyRightList: boolean;
|
|
38
52
|
/**
|
|
39
53
|
* Define o título da lista destino.
|
|
40
54
|
*/
|
|
41
55
|
rightTitle: string;
|
|
56
|
+
/** Objeto que define as mensagens a serem exibidas quando a lista está vazia
|
|
57
|
+
* Exemplo:
|
|
58
|
+
* {
|
|
59
|
+
* LEFT_LIST?: "Lista lado esquerdo vazia.",
|
|
60
|
+
* RIGHT_LIST?: "Lista lado direito vazia.";
|
|
61
|
+
* }
|
|
62
|
+
*/
|
|
63
|
+
emptyMessage: EmptyMessage;
|
|
64
|
+
/**
|
|
65
|
+
* Objeto que define os métodos de construção dos elementos visuais para os itens de cada lista.
|
|
66
|
+
*
|
|
67
|
+
* Este objeto permite configurar dinamicamente os elementos HTML que serão exibidos ao lado
|
|
68
|
+
* esquerdo e direito dos itens em ambas as listas (`LEFT_LIST` e `RIGHT_LIST`).
|
|
69
|
+
*/
|
|
70
|
+
slotsListBuilder: DoubleListSlots;
|
|
42
71
|
leftFilteredList: ListItem[];
|
|
43
72
|
rightFilteredList: ListItem[];
|
|
44
73
|
selectedLeftList: string[];
|
|
45
74
|
selectedRightList: string[];
|
|
46
75
|
isFilteringLeft: boolean;
|
|
47
76
|
isFilteringRight: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Emitido ao realizar uma alteração na lista esquerda do componente.
|
|
79
|
+
*/
|
|
48
80
|
ezLeftListChanged: EventEmitter<Array<ListItem>>;
|
|
81
|
+
/**
|
|
82
|
+
* Emitido ao realizar uma alteração na lista direita do componente.
|
|
83
|
+
*/
|
|
49
84
|
ezRightListChanged: EventEmitter<Array<ListItem>>;
|
|
50
85
|
resetSelectedLists(): Promise<void>;
|
|
51
86
|
observeLeftList(newValue: any, oldValue: any): void;
|
|
52
87
|
observeRightList(newValue: any, oldValue: any): void;
|
|
53
88
|
private leftEzListInstance;
|
|
54
89
|
private rightEzListInstance;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
private
|
|
58
|
-
private handleFilterChangeRight;
|
|
59
|
-
private handleChangeLeft;
|
|
60
|
-
private handleChangeRight;
|
|
90
|
+
handleChangeLeft({ detail }: CustomEvent): Promise<void>;
|
|
91
|
+
handleChangeRight({ detail }: CustomEvent): Promise<void>;
|
|
92
|
+
private reorderArray;
|
|
61
93
|
private enableTransferAllToRight;
|
|
62
94
|
private enableTransferAllToLeft;
|
|
63
95
|
private enableTransferToRight;
|
|
@@ -67,21 +99,25 @@ export declare class EzDoubleList {
|
|
|
67
99
|
private getRightSelectedItemsIndex;
|
|
68
100
|
private transferToRight;
|
|
69
101
|
private transferToLeft;
|
|
70
|
-
|
|
71
|
-
|
|
102
|
+
handleTransferAllToRight(): Promise<void>;
|
|
103
|
+
handleTransferAllToLeft(): Promise<void>;
|
|
72
104
|
private buildTransferToRightConfig;
|
|
73
105
|
private buildTransferToLeftConfig;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
106
|
+
handleMoveUp(): void;
|
|
107
|
+
handleMoveDown(): void;
|
|
108
|
+
handleMoveToTop(): void;
|
|
109
|
+
handleMoveToBottom(): void;
|
|
110
|
+
handleSelectLeftItem({ detail }: CustomEvent): void;
|
|
111
|
+
handleSelectRightItem({ detail }: CustomEvent): void;
|
|
112
|
+
getItemsToKeepAndToMove(): {
|
|
113
|
+
itemsToKeep: ListItem[];
|
|
114
|
+
itemsToMove: ListItem[];
|
|
115
|
+
};
|
|
116
|
+
handleTransferToRight(): Promise<void>;
|
|
117
|
+
handleTransferToLeft(): Promise<void>;
|
|
118
|
+
clearSelectionAll(): Promise<void>;
|
|
119
|
+
handleChooseLeft(): void;
|
|
120
|
+
handleChooseRight(): void;
|
|
121
|
+
private renderList;
|
|
86
122
|
render(): any;
|
|
87
123
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import Sortable from 'sortablejs';
|
|
3
|
+
import { SlotBuilder } from '../ez-list/ez-list';
|
|
4
|
+
export interface ListItem {
|
|
5
|
+
label: string;
|
|
6
|
+
id: string;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
sort?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class EzSortableList {
|
|
11
|
+
el: HTMLElement;
|
|
12
|
+
_sortableInstance: Sortable;
|
|
13
|
+
filterTerm: string;
|
|
14
|
+
/**
|
|
15
|
+
* Define o título da lista.
|
|
16
|
+
*/
|
|
17
|
+
title: string;
|
|
18
|
+
/**
|
|
19
|
+
* Define se o cabeçalho deve ficar oculto.
|
|
20
|
+
*/
|
|
21
|
+
hideHeader: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Define se o totalizador deve ser escondido.
|
|
24
|
+
*/
|
|
25
|
+
hideTotalizer: boolean;
|
|
26
|
+
/** Grupo ao qual o ez-sortable-list pertence */
|
|
27
|
+
group: string;
|
|
28
|
+
/** Lista de itens para serem renderizados */
|
|
29
|
+
dataSource: Array<ListItem>;
|
|
30
|
+
/** ID do sortable list */
|
|
31
|
+
idSortableList: string;
|
|
32
|
+
/**
|
|
33
|
+
* Nome da entidade listada.
|
|
34
|
+
* Exemplo: "Campo", "Item", "Empresa".
|
|
35
|
+
*/
|
|
36
|
+
entityLabel: string;
|
|
37
|
+
/**
|
|
38
|
+
* Variação plural do nome da entidade listada.
|
|
39
|
+
* Exemplo: "Campos", "Itens", "Empresas".
|
|
40
|
+
*/
|
|
41
|
+
entityLabelPlural: string;
|
|
42
|
+
/** Mensagem exibida quando a lista está vazia */
|
|
43
|
+
emptyMessage: string;
|
|
44
|
+
/** Quando verdadeiro, ativa o feedback visual ao efetuar hover nos itens da lista */
|
|
45
|
+
hoverFeedback: boolean;
|
|
46
|
+
/** Habilita seleção de múltiplos itens utilizando as teclas 'Ctrl/Command' ou 'Shift' */
|
|
47
|
+
enableMultipleSelection: boolean;
|
|
48
|
+
/** Remove itens arrastados de uma lista para outra */
|
|
49
|
+
removeItensMoved: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Função builder que possibilita alterar como o item da lista vai ser apresentado.
|
|
52
|
+
* Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
53
|
+
*/
|
|
54
|
+
itemRightSlotBuilder: SlotBuilder;
|
|
55
|
+
/**
|
|
56
|
+
* Função builder que possibilita gerar conteúdo dinâmico à esquerda do item da lista.
|
|
57
|
+
* * Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
58
|
+
*/
|
|
59
|
+
itemLeftSlotBuilder: SlotBuilder;
|
|
60
|
+
/** Evento emitido quando a ordem dos itens muda */
|
|
61
|
+
itemsReordered: EventEmitter<any>;
|
|
62
|
+
/** Emitido sempre que um ou vários itens da lista forem selecionados */
|
|
63
|
+
ezSelectItens: EventEmitter<ListItem[] | ListItem>;
|
|
64
|
+
/** Emitido quando ocorre um duplo clique em um item da lista */
|
|
65
|
+
ezDoubleClick?: EventEmitter<ListItem>;
|
|
66
|
+
/** Emitido quando ocorre a escolha de um item da lista */
|
|
67
|
+
ezChoose?: EventEmitter<ListItem[] | ListItem>;
|
|
68
|
+
/** Remove a seleção de todos os itens da lista */
|
|
69
|
+
clearSelection(): Promise<void>;
|
|
70
|
+
selectedItems: Set<string>;
|
|
71
|
+
componentDidLoad(): void;
|
|
72
|
+
componentDidRender(): void;
|
|
73
|
+
private initSortable;
|
|
74
|
+
private selectPredefinedItens;
|
|
75
|
+
private handleSortItem;
|
|
76
|
+
private removeDuplicateElements;
|
|
77
|
+
private handleSelect;
|
|
78
|
+
private handleDeselect;
|
|
79
|
+
private updateSelection;
|
|
80
|
+
private emitSelectedItems;
|
|
81
|
+
private handleReorderEvent;
|
|
82
|
+
private handleDoubleClick;
|
|
83
|
+
getContainerItemBuilder(slotPosition: 'left' | 'right', item: ListItem, className?: string): HTMLElement;
|
|
84
|
+
disconnectedCallback(): void;
|
|
85
|
+
private buildTotalizer;
|
|
86
|
+
private renderItems;
|
|
87
|
+
private handleFilterChanged;
|
|
88
|
+
private renderTotalizer;
|
|
89
|
+
private renderHeader;
|
|
90
|
+
render(): any;
|
|
91
|
+
}
|