marketplacepos 5.46.3 → 5.46.5
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/Marketplace/3rdpartylicenses.txt +43 -43
- package/Marketplace/{chunk-PQQSREEC.js → chunk-3PPLPXAX.js} +2 -2
- package/Marketplace/chunk-4BWA3J6V.js +1 -0
- package/Marketplace/chunk-5EDCBXCE.js +1 -0
- package/Marketplace/{chunk-53AH4SKO.js → chunk-5X2M3HM4.js} +1 -1
- package/Marketplace/{chunk-HAJDTNAW.js → chunk-5ZR5WIHG.js} +1 -1
- package/Marketplace/{chunk-B3RO2S3D.js → chunk-6NZJ2XKE.js} +1 -1
- package/Marketplace/{chunk-YIKOIRZU.js → chunk-6RCPPNMX.js} +1 -1
- package/Marketplace/{chunk-ER3SGZ7B.js → chunk-6WE2RKUX.js} +1 -1
- package/Marketplace/chunk-6YBD22SK.js +1 -0
- package/Marketplace/{chunk-TG5SFCNG.js → chunk-74AYYW2T.js} +1 -1
- package/Marketplace/{chunk-CTDSVBZQ.js → chunk-74WQHBVN.js} +1 -1
- package/Marketplace/{chunk-LSSYGFVV.js → chunk-774TVUXT.js} +1 -1
- package/Marketplace/{chunk-M7DDFDPD.js → chunk-7ES3PHES.js} +1 -1
- package/Marketplace/{chunk-4PL4XC3C.js → chunk-7IOOG3TG.js} +8 -8
- package/Marketplace/{chunk-EOYO5KJW.js → chunk-7QKEL4DD.js} +1 -1
- package/Marketplace/{chunk-3NCIMELL.js → chunk-7TQWJCUW.js} +1 -1
- package/Marketplace/{chunk-XSCE2K6J.js → chunk-AY25KXUA.js} +1 -1
- package/Marketplace/chunk-BVV5R6HN.js +1 -0
- package/Marketplace/{chunk-WIMLQM6B.js → chunk-CAK6MZUW.js} +2 -2
- package/Marketplace/chunk-CO5XZENC.js +1 -0
- package/Marketplace/{chunk-25N6ECN7.js → chunk-DRVWJPA2.js} +1 -1
- package/Marketplace/{chunk-GQXYHXWJ.js → chunk-DXPLB6OB.js} +1 -1
- package/Marketplace/chunk-EMJTQYVO.js +1 -0
- package/Marketplace/{chunk-BXXJEM76.js → chunk-FYB62QQV.js} +1 -1
- package/Marketplace/{chunk-6EMUVAZD.js → chunk-GVXBDVLX.js} +1 -1
- package/Marketplace/chunk-HVA57ZPZ.js +1 -0
- package/Marketplace/{chunk-QPC5ZTYC.js → chunk-HZPILY4V.js} +1 -1
- package/Marketplace/chunk-JX63Y4CW.js +1 -0
- package/Marketplace/{chunk-W4MTON2T.js → chunk-KEW73FTY.js} +1 -1
- package/Marketplace/{chunk-WBKGEDL6.js → chunk-KUYNX5QT.js} +1 -1
- package/Marketplace/{chunk-XSJBP4EN.js → chunk-L74PANZ5.js} +1 -1
- package/Marketplace/{chunk-QTTNQJAK.js → chunk-LEM7ESKJ.js} +1 -1
- package/Marketplace/{chunk-SBLG2UP7.js → chunk-LRBJ5RU5.js} +1 -1
- package/Marketplace/{chunk-V54LZUEC.js → chunk-LS2KMKMD.js} +1 -1
- package/Marketplace/chunk-LSWILW54.js +1 -0
- package/Marketplace/chunk-MACYDQHW.js +1 -0
- package/Marketplace/{chunk-ZC7VX6UG.js → chunk-OFEZTCJA.js} +1 -1
- package/Marketplace/{chunk-VHOREEP5.js → chunk-OG4QM5FO.js} +1 -1
- package/Marketplace/{chunk-RTF4FRXW.js → chunk-OLVWSY6L.js} +1 -1
- package/Marketplace/{chunk-2O4IEGGR.js → chunk-PGP3WHIS.js} +3 -3
- package/Marketplace/{chunk-DSAVJZIH.js → chunk-QUEDQBZU.js} +1 -1
- package/Marketplace/{chunk-B3HL4DNT.js → chunk-R5WARQUS.js} +1 -1
- package/Marketplace/chunk-RNZC6DAM.js +1 -0
- package/Marketplace/{chunk-E42O4ZCH.js → chunk-RT3SMV6M.js} +10 -10
- package/Marketplace/{chunk-JUHGMPX2.js → chunk-RUXJCVKX.js} +1 -1
- package/Marketplace/{chunk-EPCXMVX3.js → chunk-SXFLJBXI.js} +1 -1
- package/Marketplace/{chunk-6GQN3CZ7.js → chunk-U23D2EPE.js} +1 -1
- package/Marketplace/{chunk-CJ4F7QUO.js → chunk-UGYIOLBR.js} +1 -1
- package/Marketplace/{chunk-OCJXLFB4.js → chunk-UQFILVPA.js} +2 -2
- package/Marketplace/{chunk-XMZNTZ72.js → chunk-UQL42ODX.js} +1 -1
- package/Marketplace/{chunk-WHBI5II7.js → chunk-VEYUDPOA.js} +1 -1
- package/Marketplace/{chunk-764WEWDX.js → chunk-VIXNFSMT.js} +1 -1
- package/Marketplace/{chunk-ESDWGP24.js → chunk-VQIT62HE.js} +1 -1
- package/Marketplace/{chunk-PBHJGJHF.js → chunk-WBCI5HV5.js} +1 -1
- package/Marketplace/{chunk-QSERFP5U.js → chunk-WHV5AYGI.js} +1 -1
- package/Marketplace/{chunk-K5YVT6CU.js → chunk-WREH3C74.js} +2 -2
- package/Marketplace/{chunk-V33UHV5X.js → chunk-XANN3R5J.js} +1 -1
- package/Marketplace/{chunk-7NGIEICQ.js → chunk-XHBBUUIF.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-CVD4P432.js → main-KIV2XNXR.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-6L24E3SM.js +0 -1
- package/Marketplace/chunk-A44LN77B.js +0 -1
- package/Marketplace/chunk-ACNBNSCK.js +0 -1
- package/Marketplace/chunk-JGKNYWZY.js +0 -1
- package/Marketplace/chunk-JOZJZEGN.js +0 -1
- package/Marketplace/chunk-MP3G42LL.js +0 -1
- package/Marketplace/chunk-O73TXSTZ.js +0 -1
- package/Marketplace/chunk-QOG52KD3.js +0 -1
- package/Marketplace/chunk-THMNZQLX.js +0 -1
- package/Marketplace/chunk-TYSVSEYQ.js +0 -1
- package/Marketplace/chunk-UDXV6RW2.js +0 -1
- package/Marketplace/chunk-VODHIYRA.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ze}from"./chunk-VFATXJRG.js";import{a as qe}from"./chunk-EPBVNII2.js";import{b as Ke}from"./chunk-UZWED4UK.js";import{a as Le,b as Ue,c as Re,d as He}from"./chunk-5CKVZBHM.js";import{a as Be}from"./chunk-BKRCW7SH.js";import{a as ye,b as Qe}from"./chunk-T2OSIFLN.js";import{a as se,b as $e,c as ce,d as Ae}from"./chunk-QW4EOJRM.js";import{a as Pe}from"./chunk-Q4N2QUV6.js";import{a as X}from"./chunk-YFDFIBAG.js";import{$ as me,R as fe,S as De,a as L,aa as Me,fa as le,na as ae,oa as U,p as he,pa as Oe,q as Ee,qa as Fe,r as Q,t as J,u as ke,z as Ve}from"./chunk-RC5PUUVM.js";import{A as _e,a as Ne,h as Ie,m as we}from"./chunk-5PS6ZS3N.js";import{d as q,f as K,g as j,h as W,i as G,n as Y}from"./chunk-FXQKRJWU.js";import{$b as ie,Ac as E,Bc as _,Ca as A,Cc as h,Fc as ge,Gb as P,Gc as R,Hb as pe,Hc as ne,Ic as oe,Ka as b,Kb as H,Kc as ve,Lc as Se,Mb as d,Mc as Ce,Qc as re,Sc as D,Tc as $,Xb as N,Yb as a,Zb as te,ac as O,cd as k,dc as ue,ia as Z,ic as f,ja as ee,jc as m,ka as de,kc as I,lc as S,mc as C,nc as w,oc as V,od as y,pa as B,pd as z,rb as c,tc as x,uc as s,xa as be,xb as xe,ya as u,za as g,zc as T}from"./chunk-OJMQBH6T.js";import{a as F}from"./chunk-66YHNWRR.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&I(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&I(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),I(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&I(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),R(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&w(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&I(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function It(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,It,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],At=t=>({options:t});function Rt(t,l){if(t&1&&I(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&I(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&w(0)}function Wt(t,l){t&1&&w(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&I(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&I(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&w(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,At,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&I(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&w(0)}var yi=({dt:t})=>`
|
|
1
|
+
import{a as ze}from"./chunk-VFATXJRG.js";import{a as Ke}from"./chunk-EPBVNII2.js";import{b as qe}from"./chunk-UZWED4UK.js";import{a as Le,b as Ue,c as Re,d as He}from"./chunk-5CKVZBHM.js";import{a as Be}from"./chunk-BKRCW7SH.js";import{a as ye,b as Qe}from"./chunk-T2OSIFLN.js";import{a as se,b as $e,c as ce,d as Ae}from"./chunk-QW4EOJRM.js";import{a as Pe}from"./chunk-Q4N2QUV6.js";import{a as X}from"./chunk-YFDFIBAG.js";import{$ as me,R as fe,S as De,a as L,aa as Me,fa as le,na as ae,oa as U,p as he,pa as Oe,q as Ee,qa as Fe,r as Q,t as J,u as ke,z as Ve}from"./chunk-RC5PUUVM.js";import{A as _e,a as Ne,h as Ie,m as we}from"./chunk-5PS6ZS3N.js";import{d as q,f as K,g as j,h as W,i as G,n as Y}from"./chunk-FXQKRJWU.js";import{$b as ie,Ac as E,Bc as _,Ca as A,Cc as h,Fc as ge,Gb as P,Gc as R,Hb as pe,Hc as ne,Ic as oe,Ka as b,Kb as H,Kc as ve,Lc as Se,Mb as d,Mc as Ce,Qc as re,Sc as D,Tc as $,Xb as N,Yb as a,Zb as te,ac as O,cd as k,dc as ue,ia as Z,ic as f,ja as ee,jc as m,ka as de,kc as I,lc as S,mc as C,nc as w,oc as V,od as y,pa as B,pd as z,rb as c,tc as x,uc as s,xa as be,xb as xe,ya as u,za as g,zc as T}from"./chunk-OJMQBH6T.js";import{a as F}from"./chunk-66YHNWRR.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&I(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&I(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),I(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&I(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),R(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&w(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&I(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function It(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,It,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],At=t=>({options:t});function Rt(t,l){if(t&1&&I(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&I(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&w(0)}function Wt(t,l){t&1&&w(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&I(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&I(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&w(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,At,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&I(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&w(0)}var yi=({dt:t})=>`
|
|
2
2
|
.p-tree {
|
|
3
3
|
background: ${t("tree.background")};
|
|
4
4
|
color: ${t("tree.color")};
|
|
@@ -220,7 +220,7 @@ import{a as ze}from"./chunk-VFATXJRG.js";import{a as qe}from"./chunk-EPBVNII2.js
|
|
|
220
220
|
.p-tree.p-tree-horizontal table {
|
|
221
221
|
height: 0;
|
|
222
222
|
}
|
|
223
|
-
`,Ti={root:({instance:t})=>({"p-tree p-component":!0,"p-tree-selectable":t.selectionMode!=null,"p-tree-loading":t.loading,"p-tree-flex-scrollable":t.scrollHeight==="flex","p-tree-node-dragover":t.dragHover}),mask:"p-tree-mask p-overlay-mask",loadingIcon:"p-tree-loading-icon",pcFilterInput:"p-tree-filter-input",wrapper:"p-tree-root",rootChildren:"p-tree-root-children",node:({instance:t})=>({"p-tree-node":!0,"p-tree-node-leaf":t.isLeaf()}),nodeContent:({instance:t})=>({"p-tree-node-content":!0,[t.styleClass]:!!t.styleClass,"p-tree-node-selectable":t.selectable,"p-tree-node-dragover":t.draghoverNode,"p-tree-node-selected":t.selectionMode==="checkbox"&&t.tree.highlightOnSelect?t.checked:t.selected}),nodeToggleButton:"p-tree-node-toggle-button",nodeToggleIcon:"p-tree-node-toggle-icon",nodeCheckbox:"p-tree-node-checkbox",nodeIcon:"p-tree-node-icon",nodeLabel:"p-tree-node-label",nodeChildren:"p-tree-node-children"},We=(()=>{class t extends le{name="tree";theme=yi;classes=Ti;static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275prov=ee({token:t,factory:t.\u0275fac})}return t})();var bi=(()=>{class t extends X{static ICON_CLASS="p-tree-node-icon ";rowNode;node;parentNode;root;index;firstChild;lastChild;level;indentation;itemSize;loadingMode;tree=B(Z(()=>Te));timeout;draghoverPrev;draghoverNext;draghoverNode;get selected(){return this.tree.selectionMode==="single"||this.tree.selectionMode==="multiple"?this.isSelected():void 0}get checked(){return this.tree.selectionMode==="checkbox"?this.isSelected():void 0}get nodeClass(){return this.tree._componentStyle.classes.node({instance:this})}get nodeContentClass(){return this.tree._componentStyle.classes.nodeContent({instance:this})}get selectable(){return this.node.selectable===!1?!1:this.tree.selectionMode!=null}ngOnInit(){super.ngOnInit(),this.node.parent=this.parentNode;let n=this.tree.el.nativeElement.closest("p-dialog");this.parentNode&&!n&&(this.setAllNodesTabIndexes(),this.tree.syncNodeOption(this.node,this.tree.value,"parent",this.tree.getNodeWithKey(this.parentNode.key,this.tree.value)))}getIcon(){let e;return this.node.icon?e=this.node.icon:e=this.node.expanded&&this.node.children&&this.node.children?.length?this.node.expandedIcon:this.node.collapsedIcon,t.ICON_CLASS+" "+e+" p-tree-node-icon"}isLeaf(){return this.tree.isNodeLeaf(this.node)}toggle(e){this.node.expanded?this.collapse(e):this.expand(e),e.stopPropagation()}expand(e){this.node.expanded=!0,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeExpand.emit({originalEvent:e,node:this.node})}collapse(e){this.node.expanded=!1,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeCollapse.emit({originalEvent:e,node:this.node})}onNodeClick(e){this.tree.onNodeClick(e,this.node)}onNodeKeydown(e){e.key==="Enter"&&this.tree.onNodeClick(e,this.node)}onNodeTouchEnd(){this.tree.onNodeTouchEnd()}onNodeRightClick(e){this.tree.onNodeRightClick(e,this.node)}onNodeDblClick(e){this.tree.onNodeDblClick(e,this.node)}isSelected(){return this.tree.isSelected(this.node)}isSameNode(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[role="treeitem"]')))}onDropPoint(e,n){e.preventDefault();let i=this.tree.dragNode,o=this.tree.dragNodeIndex,r=this.tree.dragNodeScope,p=this.tree.dragNodeTree===this.tree?n===1||o!==this.index-1:!0;if(this.tree.allowDrop(i,this.node,r)&&p){let v=F({},this.createDropPointEventMetadata(n));this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index,accept:()=>{this.processPointDrop(v)}}):(this.processPointDrop(v),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index}))}this.draghoverPrev=!1,this.draghoverNext=!1}processPointDrop(e){let n=e.dropNode.parent?e.dropNode.parent.children:this.tree.value;e.dragNodeSubNodes.splice(e.dragNodeIndex,1);let i=this.index;e.position<0?(i=e.dragNodeSubNodes===n?e.dragNodeIndex>e.index?e.index:e.index-1:e.index,n.splice(i,0,e.dragNode)):(i=n.length,n.push(e.dragNode)),this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:e.dragNodeIndex})}createDropPointEventMetadata(e){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node,index:this.index,position:e}}onDropPointDragOver(e){e.dataTransfer.dropEffect="move",e.preventDefault()}onDropPointDragEnter(e,n){this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(n<0?this.draghoverPrev=!0:this.draghoverNext=!0)}onDropPointDragLeave(e){this.draghoverPrev=!1,this.draghoverNext=!1}onDragStart(e){this.tree.draggableNodes&&this.node.draggable!==!1?(e.dataTransfer.setData("text","data"),this.tree.dragDropService.startDrag({tree:this,node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index,scope:this.tree.draggableScope})):e.preventDefault()}onDragStop(e){this.tree.dragDropService.stopDrag({node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index})}onDropNodeDragOver(e){e.dataTransfer.dropEffect="move",this.tree.droppableNodes&&(e.preventDefault(),e.stopPropagation())}onDropNode(e){if(this.tree.droppableNodes&&this.node?.droppable!==!1){let n=this.tree.dragNode;if(this.tree.allowDrop(n,this.node,this.tree.dragNodeScope)){let i=F({},this.createDropNodeEventMetadata());this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index,accept:()=>{this.processNodeDrop(i)}}):(this.processNodeDrop(i),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index}))}}e.preventDefault(),e.stopPropagation(),this.draghoverNode=!1}createDropNodeEventMetadata(){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node}}processNodeDrop(e){let n=e.dragNodeIndex;e.dragNodeSubNodes.splice(n,1),e.dropNode.children?e.dropNode.children.push(e.dragNode):e.dropNode.children=[e.dragNode],this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:n})}onDropNodeDragEnter(e){this.tree.droppableNodes&&this.node?.droppable!==!1&&this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(this.draghoverNode=!0)}onDropNodeDragLeave(e){if(this.tree.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>=Math.floor(n.top+n.height)||e.y<n.top)&&(this.draghoverNode=!1)}}onKeyDown(e){if(!(!this.isSameNode(e)||this.tree.contextMenu&&this.tree.contextMenu.containerViewChild?.nativeElement.style.display==="block"))switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowRight":this.onArrowRight(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"Enter":case"Space":case"NumpadEnter":this.onEnter(e);break;case"Tab":this.setAllNodesTabIndexes();break;default:break}}onArrowUp(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target.parentElement;if(n.previousElementSibling)this.focusRowChange(n,n.previousElementSibling,this.findLastVisibleDescendant(n.previousElementSibling));else{let i=this.getParentNodeElement(n);i&&this.focusRowChange(n,i)}e.preventDefault()}onArrowDown(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target,i=n.children[1];if(i&&i.children.length>0)this.focusRowChange(n,i.children[0]);else if(n.parentElement.nextElementSibling)this.focusRowChange(n,n.parentElement.nextElementSibling);else{let o=this.findNextSiblingOfAncestor(n.parentElement);o&&this.focusRowChange(n,o)}e.preventDefault()}onArrowRight(e){!this.node?.expanded&&!this.tree.isNodeLeaf(this.node)&&(this.expand(e),e.currentTarget.tabIndex=-1,setTimeout(()=>{this.onArrowDown(e)},1)),e.preventDefault()}onArrowLeft(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target;if(this.level===0&&!this.node?.expanded)return!1;if(this.node?.expanded){this.collapse(e);return}let i=this.getParentNodeElement(n.parentElement);i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onEnter(e){this.tree.onNodeClick(e,this.node),this.setTabIndexForSelectionMode(e,this.tree.nodeTouched),e.preventDefault()}setAllNodesTabIndexes(){let e=he(this.tree.el.nativeElement,".p-tree-node"),n=[...e].some(i=>i.getAttribute("aria-selected")==="true"||i.getAttribute("aria-checked")==="true");if([...e].forEach(i=>{i.tabIndex=-1}),n){let i=[...e].filter(o=>o.getAttribute("aria-selected")==="true"||o.getAttribute("aria-checked")==="true");i[0].tabIndex=0;return}e.length&&([...e][0].tabIndex=0)}setTabIndexForSelectionMode(e,n){if(this.tree.selectionMode!==null){let i=[...he(this.tree.el.nativeElement,'[role="treeitem"]')];e.currentTarget.tabIndex=n===!1?-1:0,i.every(o=>o.tabIndex===-1)&&(i[0].tabIndex=0)}}findNextSiblingOfAncestor(e){let n=this.getParentNodeElement(e);return n?n.nextElementSibling?n.nextElementSibling:this.findNextSiblingOfAncestor(n):null}findLastVisibleDescendant(e){let i=Array.from(e.children).find(o=>L(o,"p-tree-node"))?.children[1];if(i&&i.children.length>0){let o=i.children[i.children.length-1];return this.findLastVisibleDescendant(o)}else return e}getParentNodeElement(e){let n=e.parentElement?.parentElement?.parentElement;return n?.tagName==="P-TREENODE"?n:null}focusNode(e){this.tree.droppableNodes?e.children[1].focus():e.children[0].focus()}focusRowChange(e,n,i){e.tabIndex="-1",n.children[0].tabIndex="0",this.focusNode(i||n)}focusVirtualNode(){this.timeout=setTimeout(()=>{let e=Ee(document.body,`[data-id="${this.node?.key??this.node?.data}"]`);Q(e)},1)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeNode"]],inputs:{rowNode:"rowNode",node:"node",parentNode:"parentNode",root:[2,"root","root",y],index:[2,"index","index",z],firstChild:[2,"firstChild","firstChild",y],lastChild:[2,"lastChild","lastChild",y],level:[2,"level","level",z],indentation:[2,"indentation","indentation",z],itemSize:[2,"itemSize","itemSize",z],loadingMode:"loadingMode"},features:[H],decls:1,vars:1,consts:[["icon",""],["class","p-tree-node-droppoint",3,"ngClass","drop","dragover","dragenter","dragleave",4,"ngIf"],["role","treeitem",3,"keydown","ngClass","ngStyle"],[3,"click","contextmenu","dblclick","touchend","drop","dragover","dragenter","dragleave","dragstart","dragend","ngClass","draggable"],["type","button","pRipple","","tabindex","-1",1,"p-tree-node-toggle-button",3,"click"],[4,"ngIf"],["class","p-tree-node-toggle-icon",4,"ngIf"],["styleClass","p-tree-node-checkbox",3,"ngModel","binary","indeterminate","disabled","variant","tabindex","click",4,"ngIf"],[3,"class",4,"ngIf"],[1,"p-tree-node-label"],["class","p-tree-node-children","style","display: none;","role","group",3,"display",4,"ngIf"],[1,"p-tree-node-droppoint",3,"drop","dragover","dragenter","dragleave","ngClass"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-tree-node-toggle-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["styleClass","p-tree-node-checkbox",3,"click","ngModel","binary","indeterminate","disabled","variant","tabindex"],["role","group",1,"p-tree-node-children",2,"display","none"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode"]],template:function(n,i){n&1&&d(0,wt,13,31),n&2&&ue(i.node?0:-1)},dependencies:[t,Y,q,K,j,G,W,Pe,Ke,_e,Ie,we,ze,ce,ye,U],encapsulation:2})}return t})(),Te=(()=>{class t extends X{dragDropService;value;selectionMode;loadingMode="mask";selection;style;styleClass;contextMenu;draggableScope;droppableScope;draggableNodes;droppableNodes;metaKeySelection=!1;propagateSelectionUp=!0;propagateSelectionDown=!0;loading;loadingIcon;emptyMessage="";ariaLabel;togglerAriaLabel;ariaLabelledBy;validateDrop;filter;filterInputAutoFocus=!1;filterBy="label";filterMode="lenient";filterOptions;filterPlaceholder;filteredNodes;filterLocale;scrollHeight;lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;indentation=1.5;_templateMap;trackBy=(e,n)=>n;highlightOnSelect=!1;_virtualNodeHeight;get virtualNodeHeight(){return this._virtualNodeHeight}set virtualNodeHeight(e){this._virtualNodeHeight=e,console.log("The virtualNodeHeight property is deprecated, use virtualScrollItemSize property instead.")}selectionChange=new b;onNodeSelect=new b;onNodeUnselect=new b;onNodeExpand=new b;onNodeCollapse=new b;onNodeContextMenuSelect=new b;onNodeDoubleClick=new b;onNodeDrop=new b;onLazyLoad=new b;onScroll=new b;onScrollIndexChange=new b;onFilter=new b;filterTemplate;nodeTemplate;headerTemplate;footerTemplate;loaderTemplate;emptyMessageTemplate;togglerIconTemplate;checkboxIconTemplate;loadingIconTemplate;filterIconTemplate;filterViewChild;scroller;wrapperViewChild;templates;_headerTemplate;_emptyMessageTemplate;_footerTemplate;_loaderTemplate;_togglerIconTemplate;_checkboxIconTemplate;_loadingIconTemplate;_filterIconTemplate;_filterTemplate;ngAfterContentInit(){this.templates.length&&(this._templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"empty":this._emptyMessageTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"togglericon":this._togglerIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;default:this._templateMap[e.name]=e.template;break}})}serializedValue;nodeTouched;dragNodeTree;dragNode;dragNodeSubNodes;dragNodeIndex;dragNodeScope;dragHover;dragStartSubscription;dragStopSubscription;_componentStyle=B(We);constructor(e){super(),this.dragDropService=e}ngOnInit(){super.ngOnInit(),this.filterBy&&(this.filterOptions={filter:e=>this._filter(e),reset:()=>this.resetFilter()}),this.droppableNodes&&(this.dragStartSubscription=this.dragDropService.dragStart$.subscribe(e=>{this.dragNodeTree=e.tree,this.dragNode=e.node,this.dragNodeSubNodes=e.subNodes,this.dragNodeIndex=e.index,this.dragNodeScope=e.scope}),this.dragStopSubscription=this.dragDropService.dragStop$.subscribe(e=>{this.dragNodeTree=null,this.dragNode=null,this.dragNodeSubNodes=null,this.dragNodeIndex=null,this.dragNodeScope=null,this.dragHover=!1}))}ngOnChanges(e){super.ngOnChanges(e),e.value&&(this.updateSerializedValue(),this.hasFilterActive()&&this._filter(this.filterViewChild.nativeElement.value))}get containerClass(){return this._componentStyle.classes.root({instance:this})}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Oe.EMPTY_MESSAGE)}updateSerializedValue(){this.serializedValue=[],this.serializeNodes(null,this.getRootNode(),0,!0)}serializeNodes(e,n,i,o){if(n&&n.length)for(let r of n){r.parent=e;let p={node:r,parent:e,level:i,visible:o&&(e?e.expanded:!0)};this.serializedValue.push(p),p.visible&&r.expanded&&this.serializeNodes(r,r.children,i+1,p.visible)}}onNodeClick(e,n){let i=e.target;if(!(L(i,"p-tree-toggler")||L(i,"p-tree-toggler-icon"))){if(this.selectionMode){if(n.selectable===!1){n.style="--p-focus-ring-color: none;";return}else n.style?.includes("--p-focus-ring-color")||(n.style=n.style?`${n.style}--p-focus-ring-color: var(--primary-color)`:"--p-focus-ring-color: var(--primary-color)");if(this.hasFilteredNodes()&&(n=this.getNodeWithKey(n.key,this.filteredNodes),!n))return;let o=this.findIndexInSelection(n),r=o>=0;if(this.isCheckboxSelectionMode())r?(this.propagateSelectionDown?this.propagateDown(n,!1):this.selection=this.selection.filter((p,v)=>v!=o),this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.propagateSelectionDown?this.propagateDown(n,!0):this.selection=[...this.selection||[],n],this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:n}));else if(this.nodeTouched?!1:this.metaKeySelection){let v=e.metaKey||e.ctrlKey;r&&v?(this.isSingleSelectionMode()?this.selectionChange.emit(null):(this.selection=this.selection.filter((M,tt)=>tt!=o),this.selectionChange.emit(this.selection)),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.isMultipleSelectionMode()&&(this.selection=v?this.selection||[]:[],this.selection=[...this.selection,n],this.selectionChange.emit(this.selection)),this.onNodeSelect.emit({originalEvent:e,node:n}))}else this.isSingleSelectionMode()?r?(this.selection=null,this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=n,setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})):r?(this.selection=this.selection.filter((v,M)=>M!=o),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=[...this.selection||[],n],setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})),this.selectionChange.emit(this.selection)}this.nodeTouched=!1}}onNodeTouchEnd(){this.nodeTouched=!0}onNodeRightClick(e,n){if(this.contextMenu){let i=e.target;if(i.className&&i.className.indexOf("p-tree-toggler")===0)return;this.findIndexInSelection(n)>=0||(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.selectionChange.emit([n])),this.contextMenu.show(e),this.onNodeContextMenuSelect.emit({originalEvent:e,node:n})}}onNodeDblClick(e,n){this.onNodeDoubleClick.emit({originalEvent:e,node:n})}findIndexInSelection(e){let n=-1;if(this.selectionMode&&this.selection)if(this.isSingleSelectionMode())n=this.selection.key&&this.selection.key===e.key||this.selection==e?0:-1;else for(let i=0;i<this.selection.length;i++){let o=this.selection[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}syncNodeOption(e,n,i,o){let r=this.hasFilteredNodes()?this.getNodeWithKey(e.key,n):null;r&&(r[i]=o||e[i])}hasFilteredNodes(){return this.filter&&this.filteredNodes&&this.filteredNodes.length}hasFilterActive(){return this.filter&&this.filterViewChild?.nativeElement?.value.length>0}getNodeWithKey(e,n){for(let i of n){if(i.key===e)return i;if(i.children){let o=this.getNodeWithKey(e,i.children);if(o)return o}}}propagateUp(e,n){if(e.children&&e.children.length){let o=0,r=!1;for(let p of e.children)this.isSelected(p)?o++:p.partialSelected&&(r=!0);if(n&&o==e.children.length)this.selection=[...this.selection||[],e],e.partialSelected=!1;else{if(!n){let p=this.findIndexInSelection(e);p>=0&&(this.selection=this.selection.filter((v,M)=>M!=p))}r||o>0&&o!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}this.syncNodeOption(e,this.filteredNodes,"partialSelected")}let i=e.parent;i&&this.propagateUp(i,n)}propagateDown(e,n){let i=this.findIndexInSelection(e);if(n&&i==-1?this.selection=[...this.selection||[],e]:!n&&i>-1&&(this.selection=this.selection.filter((o,r)=>r!=i)),e.partialSelected=!1,this.syncNodeOption(e,this.filteredNodes,"partialSelected"),e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,n)}isSelected(e){return this.findIndexInSelection(e)!=-1}isSingleSelectionMode(){return this.selectionMode&&this.selectionMode=="single"}isMultipleSelectionMode(){return this.selectionMode&&this.selectionMode=="multiple"}isCheckboxSelectionMode(){return this.selectionMode&&this.selectionMode=="checkbox"}isNodeLeaf(e){return e.leaf==!1?!1:!(e.children&&e.children.length)}getRootNode(){return this.filteredNodes?this.filteredNodes:this.value}getTemplateForNode(e){return this._templateMap?e.type?this._templateMap[e.type]:this._templateMap.default:null}onDragOver(e){this.droppableNodes&&(!this.value||this.value.length===0)&&(e.dataTransfer.dropEffect="move",e.preventDefault())}onDrop(e){if(this.droppableNodes&&(!this.value||this.value.length===0)){e.preventDefault();let n=this.dragNode;if(this.allowDrop(n,null,this.dragNodeScope)){let i=this.dragNodeIndex;this.value=this.value||[],this.validateDrop?this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i,accept:()=>{this.processTreeDrop(n,i)}}):(this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i}),this.processTreeDrop(n,i))}}}processTreeDrop(e,n){this.dragNodeSubNodes.splice(n,1),this.value.push(e),this.dragDropService.stopDrag({node:e})}onDragEnter(){this.droppableNodes&&this.allowDrop(this.dragNode,null,this.dragNodeScope)&&(this.dragHover=!0)}onDragLeave(e){if(this.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>n.top+n.height||e.y<n.top)&&(this.dragHover=!1)}}allowDrop(e,n,i){if(e)if(this.isValidDragScope(i)){let o=!0;if(n)if(e===n)o=!1;else{let r=n.parent;for(;r!=null;){if(r===e){o=!1;break}r=r.parent}}return o}else return!1;else return!1}isValidDragScope(e){let n=this.droppableScope;if(n){if(typeof n=="string"){if(typeof e=="string")return n===e;if(Array.isArray(e))return e.indexOf(n)!=-1}else if(Array.isArray(n)){if(typeof e=="string")return n.indexOf(e)!=-1;if(Array.isArray(e)){for(let i of n)for(let o of e)if(i===o)return!0}}return!1}else return!0}_filter(e){let n=e;if(n==="")this.filteredNodes=null;else{this.filteredNodes=[];let i=this.filterBy.split(","),o=me(n).toLocaleLowerCase(this.filterLocale),r=this.filterMode==="strict";for(let p of this.value){let v=F({},p),M={searchFields:i,filterText:o,isStrictMode:r};(r&&(this.findFilteredNodes(v,M)||this.isFilterMatched(v,M))||!r&&(this.isFilterMatched(v,M)||this.findFilteredNodes(v,M)))&&this.filteredNodes.push(v)}}this.updateSerializedValue(),this.onFilter.emit({filter:n,filteredValue:this.filteredNodes})}resetFilter(){this.filteredNodes=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}scrollToVirtualIndex(e){this.virtualScroll&&this.scroller?.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}findFilteredNodes(e,n){if(e){let i=!1;if(e.children){let o=[...e.children];e.children=[];for(let r of o){let p=F({},r);this.isFilterMatched(p,n)&&(i=!0,e.children.push(p))}}if(i)return e.expanded=!0,!0}}isFilterMatched(e,n){let{searchFields:i,filterText:o,isStrictMode:r}=n,p=!1;for(let v of i)me(String(De(e,v))).toLocaleLowerCase(this.filterLocale).indexOf(o)>-1&&(p=!0);return(!p||r&&!this.isNodeLeaf(e))&&(p=this.findFilteredNodes(e,{searchFields:i,filterText:o,isStrictMode:r})||p),p}getIndex(e,n){let i=e.getItemOptions;return i?i(n).index:n}getBlockableElement(){return this.el.nativeElement.children[0]}ngOnDestroy(){this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragStopSubscription&&this.dragStopSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(xe(Fe,8))};static \u0275cmp=P({type:t,selectors:[["p-tree"]],contentQueries:function(n,i,o){if(n&1&&(T(o,je,4),T(o,Et,4),T(o,kt,4),T(o,Vt,4),T(o,Dt,4),T(o,Mt,4),T(o,Ot,4),T(o,Ft,4),T(o,$t,4),T(o,Lt,4),T(o,ae,4)),n&2){let r;_(r=h())&&(i.filterTemplate=r.first),_(r=h())&&(i.nodeTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.loaderTemplate=r.first),_(r=h())&&(i.emptyMessageTemplate=r.first),_(r=h())&&(i.togglerIconTemplate=r.first),_(r=h())&&(i.checkboxIconTemplate=r.first),_(r=h())&&(i.loadingIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(je,5),E(zt,5),E(Ut,5)),n&2){let o;_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.scroller=o.first),_(o=h())&&(i.wrapperViewChild=o.first)}},inputs:{value:"value",selectionMode:"selectionMode",loadingMode:"loadingMode",selection:"selection",style:"style",styleClass:"styleClass",contextMenu:"contextMenu",draggableScope:"draggableScope",droppableScope:"droppableScope",draggableNodes:[2,"draggableNodes","draggableNodes",y],droppableNodes:[2,"droppableNodes","droppableNodes",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],loading:[2,"loading","loading",y],loadingIcon:"loadingIcon",emptyMessage:"emptyMessage",ariaLabel:"ariaLabel",togglerAriaLabel:"togglerAriaLabel",ariaLabelledBy:"ariaLabelledBy",validateDrop:[2,"validateDrop","validateDrop",y],filter:[2,"filter","filter",y],filterInputAutoFocus:[2,"filterInputAutoFocus","filterInputAutoFocus",y],filterBy:"filterBy",filterMode:"filterMode",filterOptions:"filterOptions",filterPlaceholder:"filterPlaceholder",filteredNodes:"filteredNodes",filterLocale:"filterLocale",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",y],virtualScroll:[2,"virtualScroll","virtualScroll",y],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",z],virtualScrollOptions:"virtualScrollOptions",indentation:[2,"indentation","indentation",z],_templateMap:"_templateMap",trackBy:"trackBy",highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",y],virtualNodeHeight:"virtualNodeHeight"},outputs:{selectionChange:"selectionChange",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onNodeContextMenuSelect:"onNodeContextMenuSelect",onNodeDoubleClick:"onNodeDoubleClick",onNodeDrop:"onNodeDrop",onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange",onFilter:"onFilter"},features:[re([We]),H,be],decls:8,vars:10,consts:[["filter",""],["scroller",""],["content",""],["treeNode",""],["loader",""],["wrapper",""],["emptyFilter",""],[3,"drop","dragover","dragenter","dragleave","ngClass","ngStyle"],["class","p-tree-mask p-overlay-mask",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-tree-empty-message",4,"ngIf"],[1,"p-tree-mask","p-overlay-mask"],[3,"class",4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-tree-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-tree-loading-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pInputText","","type","search","autocomplete","off",1,"p-tree-filter-input",3,"keydown.enter","input","pAutoFocus"],["class","p-tree-filter-icon",4,"ngIf"],[1,"p-tree-filter-icon"],["styleClass","p-tree-root",3,"items","tabindex","style","scrollHeight","itemSize","lazy","options","onScroll","onScrollIndexChange","onLazyLoad",4,"ngIf"],["styleClass","p-tree-root",3,"onScroll","onScrollIndexChange","onLazyLoad","items","tabindex","scrollHeight","itemSize","lazy","options"],["class","p-tree-root-children","role","tree",3,"ngClass","style",4,"ngIf"],["role","tree",1,"p-tree-root-children",3,"ngClass"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode"],[1,"p-tree-root"],["class","p-tree-root-children","role","tree",4,"ngIf"],["role","tree",1,"p-tree-root-children"],[3,"node","firstChild","lastChild","index","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","firstChild","lastChild","index","level","loadingMode"],[1,"p-tree-empty-message"],[4,"ngIf","ngIfElse"]],template:function(n,i){if(n&1&&(f(0,"div",7),x("drop",function(r){return i.onDrop(r)})("dragover",function(r){return i.onDragOver(r)})("dragenter",function(){return i.onDragEnter()})("dragleave",function(r){return i.onDragLeave(r)}),d(1,Kt,3,2,"div",8)(2,jt,1,0,"ng-container",9)(3,Gt,1,4,"ng-container")(4,ti,1,1,"p-iconField")(5,ui,3,2,"ng-container",10)(6,fi,3,3,"div",11)(7,mi,1,0,"ng-container",9),m()),n&2){let o;O(i.styleClass),a("ngClass",i.containerClass)("ngStyle",i.style),c(),a("ngIf",i.loading&&i.loadingMode==="mask"),c(),a("ngTemplateOutlet",i.headerTemplate||i._headerTemplate),c(),ue(i.filterTemplate||i._filterTemplate?3:4),c(2),a("ngIf",(o=i.getRootNode())==null?null:o.length),c(),a("ngIf",!i.loading&&(i.getRootNode()==null||i.getRootNode().length===0)),c(),a("ngTemplateOutlet",i.footerTemplate||i._footerTemplate)}},dependencies:[Y,q,K,j,G,W,He,U,Ue,ye,Qe,_e,Le,Re,bi,$e,se],encapsulation:2})}return t})();var xi=["value"],vi=["header"],Si=["empty"],Ci=["footer"],Ni=["clearicon"],Ii=["triggericon"],wi=["dropdownicon"],Ei=["filtericon"],ki=["closeicon"],Vi=["itemtogglericon"],Di=["itemcheckboxicon"],Mi=["itemloadingicon"],Oi=["container"],Fi=["focusInput"],$i=["filter"],Li=["tree"],zi=["panel"],Ui=["overlay"],Ai=["firstHiddenFocusableEl"],Ri=["lastHiddenFocusableEl"],Qi=(t,l)=>({$implicit:t,placeholder:l}),Xe=(t,l)=>({$implicit:t,options:l}),Bi=t=>({"max-height":t}),Pi=t=>({$implicit:t}),Hi=(t,l)=>({$implicit:t,partialSelected:l});function qi(t,l){t&1&&w(0)}function Ki(t,l){if(t&1&&(S(0),d(1,qi,1,0,"ng-container",25),C()),t&2){let e=s();c(),a("ngTemplateOutlet",e.valueTemplate||e._valueTemplate)("ngTemplateOutletContext",$(2,Qi,e.value,e.placeholder))}}function ji(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.label||"empty"," ")}}function Wi(t,l){if(t&1&&(f(0,"div",27),I(1,"p-chip",28),m()),t&2){let e=l.$implicit;c(),a("label",e.label)}}function Gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(3);c(),ne(e.placeholder||"empty")}}function Yi(t,l){if(t&1&&d(0,Wi,2,1,"div",26)(1,Gi,2,1,"ng-container",20),t&2){let e=s(2);a("ngForOf",e.value),c(),a("ngIf",e.emptyValue)}}function Ji(t,l){if(t&1&&d(0,ji,2,1,"ng-container",19)(1,Yi,2,2,"ng-template",null,5,k),t&2){let e=ge(2),n=s();a("ngIf",n.display==="comma")("ngIfElse",e)}}function Xi(t,l){if(t&1){let e=V();f(0,"TimesIcon",31),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),m()}t&2&&O("p-treeselect-clear-icon")}function Zi(t,l){}function en(t,l){t&1&&d(0,Zi,0,0,"ng-template")}function tn(t,l){if(t&1){let e=V();f(0,"span",32),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),d(1,en,1,0,null,33),m()}if(t&2){let e=s(2);c(),a("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function nn(t,l){if(t&1&&(S(0),d(1,Xi,1,2,"TimesIcon",29)(2,tn,2,1,"span",30),C()),t&2){let e=s();c(),a("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),a("ngIf",e.clearIconTemplate||e.clearIconTemplate)}}function on(t,l){t&1&&I(0,"ChevronDownIcon",34),t&2&&a("styleClass","p-treeselect-dropdown-icon")}function rn(t,l){}function ln(t,l){t&1&&d(0,rn,0,0,"ng-template")}function an(t,l){if(t&1&&(f(0,"span",35),d(1,ln,1,0,null,33),m()),t&2){let e=s();c(),a("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate||e.dropdownIconTemplate||e._dropdownIconTemplate)}}function sn(t,l){t&1&&w(0)}function cn(t,l){t&1&&w(0)}function dn(t,l){if(t&1&&d(0,cn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function pn(t,l){t&1&&(S(0),d(1,dn,1,1,"ng-template",null,10,k),C())}function un(t,l){t&1&&w(0)}function gn(t,l){if(t&1&&d(0,un,1,0,"ng-container",25),t&2){let e=l.$implicit,n=s(3);a("ngTemplateOutlet",n.itemTogglerIconTemplate||n._itemTogglerIconTemplate)("ngTemplateOutletContext",D(2,Pi,e))}}function _n(t,l){t&1&&d(0,gn,1,4,"ng-template",null,11,k)}function hn(t,l){t&1&&w(0)}function fn(t,l){if(t&1&&d(0,hn,1,0,"ng-container",25),t&2){let e=l.$implicit,n=l.partialSelected,i=s(3);a("ngTemplateOutlet",i.itemCheckboxIconTemplate||i._itemCheckboxIconTemplate)("ngTemplateOutletContext",$(2,Hi,e,n))}}function mn(t,l){t&1&&d(0,fn,1,5,"ng-template",null,12,k)}function yn(t,l){t&1&&w(0)}function Tn(t,l){if(t&1&&d(0,yn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate)}}function bn(t,l){t&1&&d(0,Tn,1,1,"ng-template",null,13,k)}function xn(t,l){t&1&&w(0)}function vn(t,l){if(t&1){let e=V();f(0,"div",36,6)(2,"span",37,7),x("focus",function(i){u(e);let o=s();return g(o.onFirstHiddenFocus(i))}),m(),d(4,sn,1,0,"ng-container",25),f(5,"div",38)(6,"p-tree",39,8),x("selectionChange",function(i){u(e);let o=s();return g(o.onSelectionChange(i))})("onNodeExpand",function(i){u(e);let o=s();return g(o.nodeExpand(i))})("onNodeCollapse",function(i){u(e);let o=s();return g(o.nodeCollapse(i))})("onNodeSelect",function(i){u(e);let o=s();return g(o.onSelect(i))})("onNodeUnselect",function(i){u(e);let o=s();return g(o.onUnselect(i))}),d(8,pn,3,0,"ng-container",20)(9,_n,2,0,null,20)(10,mn,2,0,null,20)(11,bn,2,0,null,20),m()(),d(12,xn,1,0,"ng-container",25),f(13,"span",37,9),x("focus",function(i){u(e);let o=s();return g(o.onLastHiddenFocus(i))}),m()()}if(t&2){let e=s();O(e.panelStyleClass),a("ngStyle",e.panelStyle)("ngClass",e.panelClass),N("id",e.listId),c(2),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),c(2),a("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",$(39,Xe,e.value,e.options)),c(),a("ngStyle",D(42,Bi,e.scrollHeight)),c(),a("value",e.options)("propagateSelectionDown",e.propagateSelectionDown)("propagateSelectionUp",e.propagateSelectionUp)("selectionMode",e.selectionMode)("selection",e.value)("metaKeySelection",e.metaKeySelection)("emptyMessage",e.emptyMessage)("filter",e.filter)("filterBy",e.filterBy)("filterMode",e.filterMode)("filterPlaceholder",e.filterPlaceholder)("filterLocale",e.filterLocale)("filteredNodes",e.filteredNodes)("virtualScroll",e.virtualScroll)("virtualScrollItemSize",e.virtualScrollItemSize)("virtualScrollOptions",e.virtualScrollOptions)("_templateMap",e.templateMap)("loading",e.loading)("filterInputAutoFocus",e.filterInputAutoFocus),c(2),a("ngIf",e.emptyTemplate||e._emptyTemplate),c(),a("ngIf",e.itemTogglerIconTemplate||e._itemTogglerIconTemplate),c(),a("ngIf",e.itemCheckboxIconTemplate||e._itemCheckboxIconTemplate),c(),a("ngIf",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate),c(),a("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",$(44,Xe,e.value,e.options)),c(),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var Sn=({dt:t})=>`
|
|
223
|
+
`,Ti={root:({instance:t})=>({"p-tree p-component":!0,"p-tree-selectable":t.selectionMode!=null,"p-tree-loading":t.loading,"p-tree-flex-scrollable":t.scrollHeight==="flex","p-tree-node-dragover":t.dragHover}),mask:"p-tree-mask p-overlay-mask",loadingIcon:"p-tree-loading-icon",pcFilterInput:"p-tree-filter-input",wrapper:"p-tree-root",rootChildren:"p-tree-root-children",node:({instance:t})=>({"p-tree-node":!0,"p-tree-node-leaf":t.isLeaf()}),nodeContent:({instance:t})=>({"p-tree-node-content":!0,[t.styleClass]:!!t.styleClass,"p-tree-node-selectable":t.selectable,"p-tree-node-dragover":t.draghoverNode,"p-tree-node-selected":t.selectionMode==="checkbox"&&t.tree.highlightOnSelect?t.checked:t.selected}),nodeToggleButton:"p-tree-node-toggle-button",nodeToggleIcon:"p-tree-node-toggle-icon",nodeCheckbox:"p-tree-node-checkbox",nodeIcon:"p-tree-node-icon",nodeLabel:"p-tree-node-label",nodeChildren:"p-tree-node-children"},We=(()=>{class t extends le{name="tree";theme=yi;classes=Ti;static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275prov=ee({token:t,factory:t.\u0275fac})}return t})();var bi=(()=>{class t extends X{static ICON_CLASS="p-tree-node-icon ";rowNode;node;parentNode;root;index;firstChild;lastChild;level;indentation;itemSize;loadingMode;tree=B(Z(()=>Te));timeout;draghoverPrev;draghoverNext;draghoverNode;get selected(){return this.tree.selectionMode==="single"||this.tree.selectionMode==="multiple"?this.isSelected():void 0}get checked(){return this.tree.selectionMode==="checkbox"?this.isSelected():void 0}get nodeClass(){return this.tree._componentStyle.classes.node({instance:this})}get nodeContentClass(){return this.tree._componentStyle.classes.nodeContent({instance:this})}get selectable(){return this.node.selectable===!1?!1:this.tree.selectionMode!=null}ngOnInit(){super.ngOnInit(),this.node.parent=this.parentNode;let n=this.tree.el.nativeElement.closest("p-dialog");this.parentNode&&!n&&(this.setAllNodesTabIndexes(),this.tree.syncNodeOption(this.node,this.tree.value,"parent",this.tree.getNodeWithKey(this.parentNode.key,this.tree.value)))}getIcon(){let e;return this.node.icon?e=this.node.icon:e=this.node.expanded&&this.node.children&&this.node.children?.length?this.node.expandedIcon:this.node.collapsedIcon,t.ICON_CLASS+" "+e+" p-tree-node-icon"}isLeaf(){return this.tree.isNodeLeaf(this.node)}toggle(e){this.node.expanded?this.collapse(e):this.expand(e),e.stopPropagation()}expand(e){this.node.expanded=!0,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeExpand.emit({originalEvent:e,node:this.node})}collapse(e){this.node.expanded=!1,this.tree.virtualScroll&&(this.tree.updateSerializedValue(),this.focusVirtualNode()),this.tree.onNodeCollapse.emit({originalEvent:e,node:this.node})}onNodeClick(e){this.tree.onNodeClick(e,this.node)}onNodeKeydown(e){e.key==="Enter"&&this.tree.onNodeClick(e,this.node)}onNodeTouchEnd(){this.tree.onNodeTouchEnd()}onNodeRightClick(e){this.tree.onNodeRightClick(e,this.node)}onNodeDblClick(e){this.tree.onNodeDblClick(e,this.node)}isSelected(){return this.tree.isSelected(this.node)}isSameNode(e){return e.currentTarget&&(e.currentTarget.isSameNode(e.target)||e.currentTarget.isSameNode(e.target.closest('[role="treeitem"]')))}onDropPoint(e,n){e.preventDefault();let i=this.tree.dragNode,o=this.tree.dragNodeIndex,r=this.tree.dragNodeScope,p=this.tree.dragNodeTree===this.tree?n===1||o!==this.index-1:!0;if(this.tree.allowDrop(i,this.node,r)&&p){let v=F({},this.createDropPointEventMetadata(n));this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index,accept:()=>{this.processPointDrop(v)}}):(this.processPointDrop(v),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:i,dropNode:this.node,index:this.index}))}this.draghoverPrev=!1,this.draghoverNext=!1}processPointDrop(e){let n=e.dropNode.parent?e.dropNode.parent.children:this.tree.value;e.dragNodeSubNodes.splice(e.dragNodeIndex,1);let i=this.index;e.position<0?(i=e.dragNodeSubNodes===n?e.dragNodeIndex>e.index?e.index:e.index-1:e.index,n.splice(i,0,e.dragNode)):(i=n.length,n.push(e.dragNode)),this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:e.dragNodeIndex})}createDropPointEventMetadata(e){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node,index:this.index,position:e}}onDropPointDragOver(e){e.dataTransfer.dropEffect="move",e.preventDefault()}onDropPointDragEnter(e,n){this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(n<0?this.draghoverPrev=!0:this.draghoverNext=!0)}onDropPointDragLeave(e){this.draghoverPrev=!1,this.draghoverNext=!1}onDragStart(e){this.tree.draggableNodes&&this.node.draggable!==!1?(e.dataTransfer.setData("text","data"),this.tree.dragDropService.startDrag({tree:this,node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index,scope:this.tree.draggableScope})):e.preventDefault()}onDragStop(e){this.tree.dragDropService.stopDrag({node:this.node,subNodes:this.node?.parent?this.node.parent.children:this.tree.value,index:this.index})}onDropNodeDragOver(e){e.dataTransfer.dropEffect="move",this.tree.droppableNodes&&(e.preventDefault(),e.stopPropagation())}onDropNode(e){if(this.tree.droppableNodes&&this.node?.droppable!==!1){let n=this.tree.dragNode;if(this.tree.allowDrop(n,this.node,this.tree.dragNodeScope)){let i=F({},this.createDropNodeEventMetadata());this.tree.validateDrop?this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index,accept:()=>{this.processNodeDrop(i)}}):(this.processNodeDrop(i),this.tree.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:this.node,index:this.index}))}}e.preventDefault(),e.stopPropagation(),this.draghoverNode=!1}createDropNodeEventMetadata(){return{dragNode:this.tree.dragNode,dragNodeIndex:this.tree.dragNodeIndex,dragNodeSubNodes:this.tree.dragNodeSubNodes,dropNode:this.node}}processNodeDrop(e){let n=e.dragNodeIndex;e.dragNodeSubNodes.splice(n,1),e.dropNode.children?e.dropNode.children.push(e.dragNode):e.dropNode.children=[e.dragNode],this.tree.dragDropService.stopDrag({node:e.dragNode,subNodes:e.dropNode.parent?e.dropNode.parent.children:this.tree.value,index:n})}onDropNodeDragEnter(e){this.tree.droppableNodes&&this.node?.droppable!==!1&&this.tree.allowDrop(this.tree.dragNode,this.node,this.tree.dragNodeScope)&&(this.draghoverNode=!0)}onDropNodeDragLeave(e){if(this.tree.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>=Math.floor(n.top+n.height)||e.y<n.top)&&(this.draghoverNode=!1)}}onKeyDown(e){if(!(!this.isSameNode(e)||this.tree.contextMenu&&this.tree.contextMenu.containerViewChild?.nativeElement.style.display==="block"))switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowRight":this.onArrowRight(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"Enter":case"Space":case"NumpadEnter":this.onEnter(e);break;case"Tab":this.setAllNodesTabIndexes();break;default:break}}onArrowUp(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target.parentElement;if(n.previousElementSibling)this.focusRowChange(n,n.previousElementSibling,this.findLastVisibleDescendant(n.previousElementSibling));else{let i=this.getParentNodeElement(n);i&&this.focusRowChange(n,i)}e.preventDefault()}onArrowDown(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target,i=n.children[1];if(i&&i.children.length>0)this.focusRowChange(n,i.children[0]);else if(n.parentElement.nextElementSibling)this.focusRowChange(n,n.parentElement.nextElementSibling);else{let o=this.findNextSiblingOfAncestor(n.parentElement);o&&this.focusRowChange(n,o)}e.preventDefault()}onArrowRight(e){!this.node?.expanded&&!this.tree.isNodeLeaf(this.node)&&(this.expand(e),e.currentTarget.tabIndex=-1,setTimeout(()=>{this.onArrowDown(e)},1)),e.preventDefault()}onArrowLeft(e){let n=e.target.getAttribute("data-pc-section")==="toggler"?e.target.closest('[role="treeitem"]'):e.target;if(this.level===0&&!this.node?.expanded)return!1;if(this.node?.expanded){this.collapse(e);return}let i=this.getParentNodeElement(n.parentElement);i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onEnter(e){this.tree.onNodeClick(e,this.node),this.setTabIndexForSelectionMode(e,this.tree.nodeTouched),e.preventDefault()}setAllNodesTabIndexes(){let e=he(this.tree.el.nativeElement,".p-tree-node"),n=[...e].some(i=>i.getAttribute("aria-selected")==="true"||i.getAttribute("aria-checked")==="true");if([...e].forEach(i=>{i.tabIndex=-1}),n){let i=[...e].filter(o=>o.getAttribute("aria-selected")==="true"||o.getAttribute("aria-checked")==="true");i[0].tabIndex=0;return}e.length&&([...e][0].tabIndex=0)}setTabIndexForSelectionMode(e,n){if(this.tree.selectionMode!==null){let i=[...he(this.tree.el.nativeElement,'[role="treeitem"]')];e.currentTarget.tabIndex=n===!1?-1:0,i.every(o=>o.tabIndex===-1)&&(i[0].tabIndex=0)}}findNextSiblingOfAncestor(e){let n=this.getParentNodeElement(e);return n?n.nextElementSibling?n.nextElementSibling:this.findNextSiblingOfAncestor(n):null}findLastVisibleDescendant(e){let i=Array.from(e.children).find(o=>L(o,"p-tree-node"))?.children[1];if(i&&i.children.length>0){let o=i.children[i.children.length-1];return this.findLastVisibleDescendant(o)}else return e}getParentNodeElement(e){let n=e.parentElement?.parentElement?.parentElement;return n?.tagName==="P-TREENODE"?n:null}focusNode(e){this.tree.droppableNodes?e.children[1].focus():e.children[0].focus()}focusRowChange(e,n,i){e.tabIndex="-1",n.children[0].tabIndex="0",this.focusNode(i||n)}focusVirtualNode(){this.timeout=setTimeout(()=>{let e=Ee(document.body,`[data-id="${this.node?.key??this.node?.data}"]`);Q(e)},1)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeNode"]],inputs:{rowNode:"rowNode",node:"node",parentNode:"parentNode",root:[2,"root","root",y],index:[2,"index","index",z],firstChild:[2,"firstChild","firstChild",y],lastChild:[2,"lastChild","lastChild",y],level:[2,"level","level",z],indentation:[2,"indentation","indentation",z],itemSize:[2,"itemSize","itemSize",z],loadingMode:"loadingMode"},features:[H],decls:1,vars:1,consts:[["icon",""],["class","p-tree-node-droppoint",3,"ngClass","drop","dragover","dragenter","dragleave",4,"ngIf"],["role","treeitem",3,"keydown","ngClass","ngStyle"],[3,"click","contextmenu","dblclick","touchend","drop","dragover","dragenter","dragleave","dragstart","dragend","ngClass","draggable"],["type","button","pRipple","","tabindex","-1",1,"p-tree-node-toggle-button",3,"click"],[4,"ngIf"],["class","p-tree-node-toggle-icon",4,"ngIf"],["styleClass","p-tree-node-checkbox",3,"ngModel","binary","indeterminate","disabled","variant","tabindex","click",4,"ngIf"],[3,"class",4,"ngIf"],[1,"p-tree-node-label"],["class","p-tree-node-children","style","display: none;","role","group",3,"display",4,"ngIf"],[1,"p-tree-node-droppoint",3,"drop","dragover","dragenter","dragleave","ngClass"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-tree-node-toggle-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["styleClass","p-tree-node-checkbox",3,"click","ngModel","binary","indeterminate","disabled","variant","tabindex"],["role","group",1,"p-tree-node-children",2,"display","none"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","parentNode","firstChild","lastChild","index","itemSize","level","loadingMode"]],template:function(n,i){n&1&&d(0,wt,13,31),n&2&&ue(i.node?0:-1)},dependencies:[t,Y,q,K,j,G,W,Pe,qe,_e,Ie,we,ze,ce,ye,U],encapsulation:2})}return t})(),Te=(()=>{class t extends X{dragDropService;value;selectionMode;loadingMode="mask";selection;style;styleClass;contextMenu;draggableScope;droppableScope;draggableNodes;droppableNodes;metaKeySelection=!1;propagateSelectionUp=!0;propagateSelectionDown=!0;loading;loadingIcon;emptyMessage="";ariaLabel;togglerAriaLabel;ariaLabelledBy;validateDrop;filter;filterInputAutoFocus=!1;filterBy="label";filterMode="lenient";filterOptions;filterPlaceholder;filteredNodes;filterLocale;scrollHeight;lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;indentation=1.5;_templateMap;trackBy=(e,n)=>n;highlightOnSelect=!1;_virtualNodeHeight;get virtualNodeHeight(){return this._virtualNodeHeight}set virtualNodeHeight(e){this._virtualNodeHeight=e,console.log("The virtualNodeHeight property is deprecated, use virtualScrollItemSize property instead.")}selectionChange=new b;onNodeSelect=new b;onNodeUnselect=new b;onNodeExpand=new b;onNodeCollapse=new b;onNodeContextMenuSelect=new b;onNodeDoubleClick=new b;onNodeDrop=new b;onLazyLoad=new b;onScroll=new b;onScrollIndexChange=new b;onFilter=new b;filterTemplate;nodeTemplate;headerTemplate;footerTemplate;loaderTemplate;emptyMessageTemplate;togglerIconTemplate;checkboxIconTemplate;loadingIconTemplate;filterIconTemplate;filterViewChild;scroller;wrapperViewChild;templates;_headerTemplate;_emptyMessageTemplate;_footerTemplate;_loaderTemplate;_togglerIconTemplate;_checkboxIconTemplate;_loadingIconTemplate;_filterIconTemplate;_filterTemplate;ngAfterContentInit(){this.templates.length&&(this._templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"header":this._headerTemplate=e.template;break;case"empty":this._emptyMessageTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"togglericon":this._togglerIconTemplate=e.template;break;case"checkboxicon":this._checkboxIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;default:this._templateMap[e.name]=e.template;break}})}serializedValue;nodeTouched;dragNodeTree;dragNode;dragNodeSubNodes;dragNodeIndex;dragNodeScope;dragHover;dragStartSubscription;dragStopSubscription;_componentStyle=B(We);constructor(e){super(),this.dragDropService=e}ngOnInit(){super.ngOnInit(),this.filterBy&&(this.filterOptions={filter:e=>this._filter(e),reset:()=>this.resetFilter()}),this.droppableNodes&&(this.dragStartSubscription=this.dragDropService.dragStart$.subscribe(e=>{this.dragNodeTree=e.tree,this.dragNode=e.node,this.dragNodeSubNodes=e.subNodes,this.dragNodeIndex=e.index,this.dragNodeScope=e.scope}),this.dragStopSubscription=this.dragDropService.dragStop$.subscribe(e=>{this.dragNodeTree=null,this.dragNode=null,this.dragNodeSubNodes=null,this.dragNodeIndex=null,this.dragNodeScope=null,this.dragHover=!1}))}ngOnChanges(e){super.ngOnChanges(e),e.value&&(this.updateSerializedValue(),this.hasFilterActive()&&this._filter(this.filterViewChild.nativeElement.value))}get containerClass(){return this._componentStyle.classes.root({instance:this})}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Oe.EMPTY_MESSAGE)}updateSerializedValue(){this.serializedValue=[],this.serializeNodes(null,this.getRootNode(),0,!0)}serializeNodes(e,n,i,o){if(n&&n.length)for(let r of n){r.parent=e;let p={node:r,parent:e,level:i,visible:o&&(e?e.expanded:!0)};this.serializedValue.push(p),p.visible&&r.expanded&&this.serializeNodes(r,r.children,i+1,p.visible)}}onNodeClick(e,n){let i=e.target;if(!(L(i,"p-tree-toggler")||L(i,"p-tree-toggler-icon"))){if(this.selectionMode){if(n.selectable===!1){n.style="--p-focus-ring-color: none;";return}else n.style?.includes("--p-focus-ring-color")||(n.style=n.style?`${n.style}--p-focus-ring-color: var(--primary-color)`:"--p-focus-ring-color: var(--primary-color)");if(this.hasFilteredNodes()&&(n=this.getNodeWithKey(n.key,this.filteredNodes),!n))return;let o=this.findIndexInSelection(n),r=o>=0;if(this.isCheckboxSelectionMode())r?(this.propagateSelectionDown?this.propagateDown(n,!1):this.selection=this.selection.filter((p,v)=>v!=o),this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.propagateSelectionDown?this.propagateDown(n,!0):this.selection=[...this.selection||[],n],this.propagateSelectionUp&&n.parent&&this.propagateUp(n.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:n}));else if(this.nodeTouched?!1:this.metaKeySelection){let v=e.metaKey||e.ctrlKey;r&&v?(this.isSingleSelectionMode()?this.selectionChange.emit(null):(this.selection=this.selection.filter((M,tt)=>tt!=o),this.selectionChange.emit(this.selection)),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.isMultipleSelectionMode()&&(this.selection=v?this.selection||[]:[],this.selection=[...this.selection,n],this.selectionChange.emit(this.selection)),this.onNodeSelect.emit({originalEvent:e,node:n}))}else this.isSingleSelectionMode()?r?(this.selection=null,this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=n,setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})):r?(this.selection=this.selection.filter((v,M)=>M!=o),this.onNodeUnselect.emit({originalEvent:e,node:n})):(this.selection=[...this.selection||[],n],setTimeout(()=>{this.onNodeSelect.emit({originalEvent:e,node:n})})),this.selectionChange.emit(this.selection)}this.nodeTouched=!1}}onNodeTouchEnd(){this.nodeTouched=!0}onNodeRightClick(e,n){if(this.contextMenu){let i=e.target;if(i.className&&i.className.indexOf("p-tree-toggler")===0)return;this.findIndexInSelection(n)>=0||(this.isSingleSelectionMode()?this.selectionChange.emit(n):this.selectionChange.emit([n])),this.contextMenu.show(e),this.onNodeContextMenuSelect.emit({originalEvent:e,node:n})}}onNodeDblClick(e,n){this.onNodeDoubleClick.emit({originalEvent:e,node:n})}findIndexInSelection(e){let n=-1;if(this.selectionMode&&this.selection)if(this.isSingleSelectionMode())n=this.selection.key&&this.selection.key===e.key||this.selection==e?0:-1;else for(let i=0;i<this.selection.length;i++){let o=this.selection[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}syncNodeOption(e,n,i,o){let r=this.hasFilteredNodes()?this.getNodeWithKey(e.key,n):null;r&&(r[i]=o||e[i])}hasFilteredNodes(){return this.filter&&this.filteredNodes&&this.filteredNodes.length}hasFilterActive(){return this.filter&&this.filterViewChild?.nativeElement?.value.length>0}getNodeWithKey(e,n){for(let i of n){if(i.key===e)return i;if(i.children){let o=this.getNodeWithKey(e,i.children);if(o)return o}}}propagateUp(e,n){if(e.children&&e.children.length){let o=0,r=!1;for(let p of e.children)this.isSelected(p)?o++:p.partialSelected&&(r=!0);if(n&&o==e.children.length)this.selection=[...this.selection||[],e],e.partialSelected=!1;else{if(!n){let p=this.findIndexInSelection(e);p>=0&&(this.selection=this.selection.filter((v,M)=>M!=p))}r||o>0&&o!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}this.syncNodeOption(e,this.filteredNodes,"partialSelected")}let i=e.parent;i&&this.propagateUp(i,n)}propagateDown(e,n){let i=this.findIndexInSelection(e);if(n&&i==-1?this.selection=[...this.selection||[],e]:!n&&i>-1&&(this.selection=this.selection.filter((o,r)=>r!=i)),e.partialSelected=!1,this.syncNodeOption(e,this.filteredNodes,"partialSelected"),e.children&&e.children.length)for(let o of e.children)this.propagateDown(o,n)}isSelected(e){return this.findIndexInSelection(e)!=-1}isSingleSelectionMode(){return this.selectionMode&&this.selectionMode=="single"}isMultipleSelectionMode(){return this.selectionMode&&this.selectionMode=="multiple"}isCheckboxSelectionMode(){return this.selectionMode&&this.selectionMode=="checkbox"}isNodeLeaf(e){return e.leaf==!1?!1:!(e.children&&e.children.length)}getRootNode(){return this.filteredNodes?this.filteredNodes:this.value}getTemplateForNode(e){return this._templateMap?e.type?this._templateMap[e.type]:this._templateMap.default:null}onDragOver(e){this.droppableNodes&&(!this.value||this.value.length===0)&&(e.dataTransfer.dropEffect="move",e.preventDefault())}onDrop(e){if(this.droppableNodes&&(!this.value||this.value.length===0)){e.preventDefault();let n=this.dragNode;if(this.allowDrop(n,null,this.dragNodeScope)){let i=this.dragNodeIndex;this.value=this.value||[],this.validateDrop?this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i,accept:()=>{this.processTreeDrop(n,i)}}):(this.onNodeDrop.emit({originalEvent:e,dragNode:n,dropNode:null,index:i}),this.processTreeDrop(n,i))}}}processTreeDrop(e,n){this.dragNodeSubNodes.splice(n,1),this.value.push(e),this.dragDropService.stopDrag({node:e})}onDragEnter(){this.droppableNodes&&this.allowDrop(this.dragNode,null,this.dragNodeScope)&&(this.dragHover=!0)}onDragLeave(e){if(this.droppableNodes){let n=e.currentTarget.getBoundingClientRect();(e.x>n.left+n.width||e.x<n.left||e.y>n.top+n.height||e.y<n.top)&&(this.dragHover=!1)}}allowDrop(e,n,i){if(e)if(this.isValidDragScope(i)){let o=!0;if(n)if(e===n)o=!1;else{let r=n.parent;for(;r!=null;){if(r===e){o=!1;break}r=r.parent}}return o}else return!1;else return!1}isValidDragScope(e){let n=this.droppableScope;if(n){if(typeof n=="string"){if(typeof e=="string")return n===e;if(Array.isArray(e))return e.indexOf(n)!=-1}else if(Array.isArray(n)){if(typeof e=="string")return n.indexOf(e)!=-1;if(Array.isArray(e)){for(let i of n)for(let o of e)if(i===o)return!0}}return!1}else return!0}_filter(e){let n=e;if(n==="")this.filteredNodes=null;else{this.filteredNodes=[];let i=this.filterBy.split(","),o=me(n).toLocaleLowerCase(this.filterLocale),r=this.filterMode==="strict";for(let p of this.value){let v=F({},p),M={searchFields:i,filterText:o,isStrictMode:r};(r&&(this.findFilteredNodes(v,M)||this.isFilterMatched(v,M))||!r&&(this.isFilterMatched(v,M)||this.findFilteredNodes(v,M)))&&this.filteredNodes.push(v)}}this.updateSerializedValue(),this.onFilter.emit({filter:n,filteredValue:this.filteredNodes})}resetFilter(){this.filteredNodes=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}scrollToVirtualIndex(e){this.virtualScroll&&this.scroller?.scrollToIndex(e)}scrollTo(e){this.virtualScroll?this.scroller?.scrollTo(e):this.wrapperViewChild&&this.wrapperViewChild.nativeElement&&(this.wrapperViewChild.nativeElement.scrollTo?this.wrapperViewChild.nativeElement.scrollTo(e):(this.wrapperViewChild.nativeElement.scrollLeft=e.left,this.wrapperViewChild.nativeElement.scrollTop=e.top))}findFilteredNodes(e,n){if(e){let i=!1;if(e.children){let o=[...e.children];e.children=[];for(let r of o){let p=F({},r);this.isFilterMatched(p,n)&&(i=!0,e.children.push(p))}}if(i)return e.expanded=!0,!0}}isFilterMatched(e,n){let{searchFields:i,filterText:o,isStrictMode:r}=n,p=!1;for(let v of i)me(String(De(e,v))).toLocaleLowerCase(this.filterLocale).indexOf(o)>-1&&(p=!0);return(!p||r&&!this.isNodeLeaf(e))&&(p=this.findFilteredNodes(e,{searchFields:i,filterText:o,isStrictMode:r})||p),p}getIndex(e,n){let i=e.getItemOptions;return i?i(n).index:n}getBlockableElement(){return this.el.nativeElement.children[0]}ngOnDestroy(){this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragStopSubscription&&this.dragStopSubscription.unsubscribe(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(xe(Fe,8))};static \u0275cmp=P({type:t,selectors:[["p-tree"]],contentQueries:function(n,i,o){if(n&1&&(T(o,je,4),T(o,Et,4),T(o,kt,4),T(o,Vt,4),T(o,Dt,4),T(o,Mt,4),T(o,Ot,4),T(o,Ft,4),T(o,$t,4),T(o,Lt,4),T(o,ae,4)),n&2){let r;_(r=h())&&(i.filterTemplate=r.first),_(r=h())&&(i.nodeTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.loaderTemplate=r.first),_(r=h())&&(i.emptyMessageTemplate=r.first),_(r=h())&&(i.togglerIconTemplate=r.first),_(r=h())&&(i.checkboxIconTemplate=r.first),_(r=h())&&(i.loadingIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(je,5),E(zt,5),E(Ut,5)),n&2){let o;_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.scroller=o.first),_(o=h())&&(i.wrapperViewChild=o.first)}},inputs:{value:"value",selectionMode:"selectionMode",loadingMode:"loadingMode",selection:"selection",style:"style",styleClass:"styleClass",contextMenu:"contextMenu",draggableScope:"draggableScope",droppableScope:"droppableScope",draggableNodes:[2,"draggableNodes","draggableNodes",y],droppableNodes:[2,"droppableNodes","droppableNodes",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],loading:[2,"loading","loading",y],loadingIcon:"loadingIcon",emptyMessage:"emptyMessage",ariaLabel:"ariaLabel",togglerAriaLabel:"togglerAriaLabel",ariaLabelledBy:"ariaLabelledBy",validateDrop:[2,"validateDrop","validateDrop",y],filter:[2,"filter","filter",y],filterInputAutoFocus:[2,"filterInputAutoFocus","filterInputAutoFocus",y],filterBy:"filterBy",filterMode:"filterMode",filterOptions:"filterOptions",filterPlaceholder:"filterPlaceholder",filteredNodes:"filteredNodes",filterLocale:"filterLocale",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",y],virtualScroll:[2,"virtualScroll","virtualScroll",y],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",z],virtualScrollOptions:"virtualScrollOptions",indentation:[2,"indentation","indentation",z],_templateMap:"_templateMap",trackBy:"trackBy",highlightOnSelect:[2,"highlightOnSelect","highlightOnSelect",y],virtualNodeHeight:"virtualNodeHeight"},outputs:{selectionChange:"selectionChange",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onNodeContextMenuSelect:"onNodeContextMenuSelect",onNodeDoubleClick:"onNodeDoubleClick",onNodeDrop:"onNodeDrop",onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange",onFilter:"onFilter"},features:[re([We]),H,be],decls:8,vars:10,consts:[["filter",""],["scroller",""],["content",""],["treeNode",""],["loader",""],["wrapper",""],["emptyFilter",""],[3,"drop","dragover","dragenter","dragleave","ngClass","ngStyle"],["class","p-tree-mask p-overlay-mask",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-tree-empty-message",4,"ngIf"],[1,"p-tree-mask","p-overlay-mask"],[3,"class",4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-tree-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-tree-loading-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["pInputText","","type","search","autocomplete","off",1,"p-tree-filter-input",3,"keydown.enter","input","pAutoFocus"],["class","p-tree-filter-icon",4,"ngIf"],[1,"p-tree-filter-icon"],["styleClass","p-tree-root",3,"items","tabindex","style","scrollHeight","itemSize","lazy","options","onScroll","onScrollIndexChange","onLazyLoad",4,"ngIf"],["styleClass","p-tree-root",3,"onScroll","onScrollIndexChange","onLazyLoad","items","tabindex","scrollHeight","itemSize","lazy","options"],["class","p-tree-root-children","role","tree",3,"ngClass","style",4,"ngIf"],["role","tree",1,"p-tree-root-children",3,"ngClass"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"level","rowNode","node","parentNode","firstChild","lastChild","index","itemSize","indentation","loadingMode"],[1,"p-tree-root"],["class","p-tree-root-children","role","tree",4,"ngIf"],["role","tree",1,"p-tree-root-children"],[3,"node","firstChild","lastChild","index","level","loadingMode",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","firstChild","lastChild","index","level","loadingMode"],[1,"p-tree-empty-message"],[4,"ngIf","ngIfElse"]],template:function(n,i){if(n&1&&(f(0,"div",7),x("drop",function(r){return i.onDrop(r)})("dragover",function(r){return i.onDragOver(r)})("dragenter",function(){return i.onDragEnter()})("dragleave",function(r){return i.onDragLeave(r)}),d(1,Kt,3,2,"div",8)(2,jt,1,0,"ng-container",9)(3,Gt,1,4,"ng-container")(4,ti,1,1,"p-iconField")(5,ui,3,2,"ng-container",10)(6,fi,3,3,"div",11)(7,mi,1,0,"ng-container",9),m()),n&2){let o;O(i.styleClass),a("ngClass",i.containerClass)("ngStyle",i.style),c(),a("ngIf",i.loading&&i.loadingMode==="mask"),c(),a("ngTemplateOutlet",i.headerTemplate||i._headerTemplate),c(),ue(i.filterTemplate||i._filterTemplate?3:4),c(2),a("ngIf",(o=i.getRootNode())==null?null:o.length),c(),a("ngIf",!i.loading&&(i.getRootNode()==null||i.getRootNode().length===0)),c(),a("ngTemplateOutlet",i.footerTemplate||i._footerTemplate)}},dependencies:[Y,q,K,j,G,W,He,U,Ue,ye,Qe,_e,Le,Re,bi,$e,se],encapsulation:2})}return t})();var xi=["value"],vi=["header"],Si=["empty"],Ci=["footer"],Ni=["clearicon"],Ii=["triggericon"],wi=["dropdownicon"],Ei=["filtericon"],ki=["closeicon"],Vi=["itemtogglericon"],Di=["itemcheckboxicon"],Mi=["itemloadingicon"],Oi=["container"],Fi=["focusInput"],$i=["filter"],Li=["tree"],zi=["panel"],Ui=["overlay"],Ai=["firstHiddenFocusableEl"],Ri=["lastHiddenFocusableEl"],Qi=(t,l)=>({$implicit:t,placeholder:l}),Xe=(t,l)=>({$implicit:t,options:l}),Bi=t=>({"max-height":t}),Pi=t=>({$implicit:t}),Hi=(t,l)=>({$implicit:t,partialSelected:l});function qi(t,l){t&1&&w(0)}function Ki(t,l){if(t&1&&(S(0),d(1,qi,1,0,"ng-container",25),C()),t&2){let e=s();c(),a("ngTemplateOutlet",e.valueTemplate||e._valueTemplate)("ngTemplateOutletContext",$(2,Qi,e.value,e.placeholder))}}function ji(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.label||"empty"," ")}}function Wi(t,l){if(t&1&&(f(0,"div",27),I(1,"p-chip",28),m()),t&2){let e=l.$implicit;c(),a("label",e.label)}}function Gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(3);c(),ne(e.placeholder||"empty")}}function Yi(t,l){if(t&1&&d(0,Wi,2,1,"div",26)(1,Gi,2,1,"ng-container",20),t&2){let e=s(2);a("ngForOf",e.value),c(),a("ngIf",e.emptyValue)}}function Ji(t,l){if(t&1&&d(0,ji,2,1,"ng-container",19)(1,Yi,2,2,"ng-template",null,5,k),t&2){let e=ge(2),n=s();a("ngIf",n.display==="comma")("ngIfElse",e)}}function Xi(t,l){if(t&1){let e=V();f(0,"TimesIcon",31),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),m()}t&2&&O("p-treeselect-clear-icon")}function Zi(t,l){}function en(t,l){t&1&&d(0,Zi,0,0,"ng-template")}function tn(t,l){if(t&1){let e=V();f(0,"span",32),x("click",function(i){u(e);let o=s(2);return g(o.clear(i))}),d(1,en,1,0,null,33),m()}if(t&2){let e=s(2);c(),a("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function nn(t,l){if(t&1&&(S(0),d(1,Xi,1,2,"TimesIcon",29)(2,tn,2,1,"span",30),C()),t&2){let e=s();c(),a("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),a("ngIf",e.clearIconTemplate||e.clearIconTemplate)}}function on(t,l){t&1&&I(0,"ChevronDownIcon",34),t&2&&a("styleClass","p-treeselect-dropdown-icon")}function rn(t,l){}function ln(t,l){t&1&&d(0,rn,0,0,"ng-template")}function an(t,l){if(t&1&&(f(0,"span",35),d(1,ln,1,0,null,33),m()),t&2){let e=s();c(),a("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate||e.dropdownIconTemplate||e._dropdownIconTemplate)}}function sn(t,l){t&1&&w(0)}function cn(t,l){t&1&&w(0)}function dn(t,l){if(t&1&&d(0,cn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function pn(t,l){t&1&&(S(0),d(1,dn,1,1,"ng-template",null,10,k),C())}function un(t,l){t&1&&w(0)}function gn(t,l){if(t&1&&d(0,un,1,0,"ng-container",25),t&2){let e=l.$implicit,n=s(3);a("ngTemplateOutlet",n.itemTogglerIconTemplate||n._itemTogglerIconTemplate)("ngTemplateOutletContext",D(2,Pi,e))}}function _n(t,l){t&1&&d(0,gn,1,4,"ng-template",null,11,k)}function hn(t,l){t&1&&w(0)}function fn(t,l){if(t&1&&d(0,hn,1,0,"ng-container",25),t&2){let e=l.$implicit,n=l.partialSelected,i=s(3);a("ngTemplateOutlet",i.itemCheckboxIconTemplate||i._itemCheckboxIconTemplate)("ngTemplateOutletContext",$(2,Hi,e,n))}}function mn(t,l){t&1&&d(0,fn,1,5,"ng-template",null,12,k)}function yn(t,l){t&1&&w(0)}function Tn(t,l){if(t&1&&d(0,yn,1,0,"ng-container",33),t&2){let e=s(3);a("ngTemplateOutlet",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate)}}function bn(t,l){t&1&&d(0,Tn,1,1,"ng-template",null,13,k)}function xn(t,l){t&1&&w(0)}function vn(t,l){if(t&1){let e=V();f(0,"div",36,6)(2,"span",37,7),x("focus",function(i){u(e);let o=s();return g(o.onFirstHiddenFocus(i))}),m(),d(4,sn,1,0,"ng-container",25),f(5,"div",38)(6,"p-tree",39,8),x("selectionChange",function(i){u(e);let o=s();return g(o.onSelectionChange(i))})("onNodeExpand",function(i){u(e);let o=s();return g(o.nodeExpand(i))})("onNodeCollapse",function(i){u(e);let o=s();return g(o.nodeCollapse(i))})("onNodeSelect",function(i){u(e);let o=s();return g(o.onSelect(i))})("onNodeUnselect",function(i){u(e);let o=s();return g(o.onUnselect(i))}),d(8,pn,3,0,"ng-container",20)(9,_n,2,0,null,20)(10,mn,2,0,null,20)(11,bn,2,0,null,20),m()(),d(12,xn,1,0,"ng-container",25),f(13,"span",37,9),x("focus",function(i){u(e);let o=s();return g(o.onLastHiddenFocus(i))}),m()()}if(t&2){let e=s();O(e.panelStyleClass),a("ngStyle",e.panelStyle)("ngClass",e.panelClass),N("id",e.listId),c(2),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),c(2),a("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",$(39,Xe,e.value,e.options)),c(),a("ngStyle",D(42,Bi,e.scrollHeight)),c(),a("value",e.options)("propagateSelectionDown",e.propagateSelectionDown)("propagateSelectionUp",e.propagateSelectionUp)("selectionMode",e.selectionMode)("selection",e.value)("metaKeySelection",e.metaKeySelection)("emptyMessage",e.emptyMessage)("filter",e.filter)("filterBy",e.filterBy)("filterMode",e.filterMode)("filterPlaceholder",e.filterPlaceholder)("filterLocale",e.filterLocale)("filteredNodes",e.filteredNodes)("virtualScroll",e.virtualScroll)("virtualScrollItemSize",e.virtualScrollItemSize)("virtualScrollOptions",e.virtualScrollOptions)("_templateMap",e.templateMap)("loading",e.loading)("filterInputAutoFocus",e.filterInputAutoFocus),c(2),a("ngIf",e.emptyTemplate||e._emptyTemplate),c(),a("ngIf",e.itemTogglerIconTemplate||e._itemTogglerIconTemplate),c(),a("ngIf",e.itemCheckboxIconTemplate||e._itemCheckboxIconTemplate),c(),a("ngIf",e.itemLoadingIconTemplate||e._itemLoadingIconTemplate),c(),a("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",$(44,Xe,e.value,e.options)),c(),N("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var Sn=({dt:t})=>`
|
|
224
224
|
.p-treeselect {
|
|
225
225
|
display: inline-flex;
|
|
226
226
|
cursor: pointer;
|
|
@@ -394,4 +394,4 @@ p-treeselect.ng-invalid.ng-dirty .p-treeselect-label.p-placeholder {
|
|
|
394
394
|
flex-shrink: 0;
|
|
395
395
|
background: transparent;
|
|
396
396
|
color: ${t("treeselect.clear.icon.color")};
|
|
397
|
-
}`,Cn={root:({instance:t})=>({position:t.appendTo==="self"?"relative":void 0})},Nn={root:({instance:t})=>({"p-treeselect p-component p-inputwrapper":!0,"p-treeselect-display-chip":t.display==="chip","p-disabled":t.disabled,"p-invalid":t.invalid,"p-focus":t.focused,"p-variant-filled":t.variant==="filled"||t.config.inputVariant()==="filled"||t.config.inputStyle()==="filled","p-inputwrapper-filled":!t.emptyValue,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-treeselect-open":t.overlayVisible,"p-treeselect-clearable":t.showClear,"p-treeselect-fluid":t.hasFluid,"p-treeselect-sm p-inputfield-sm":t.size==="small","p-treeselect-lg p-inputfield-lg":t.size==="large"}),labelContainer:"p-treeselect-label-container",label:({instance:t})=>({"p-treeselect-label":!0,"p-placeholder":t.label===t.placeholder,"p-treeselect-label-empty":!t.placeholder&&t.emptyValue}),chip:"p-treeselect-chip-item",pcChip:"p-treeselect-chip",dropdown:"p-treeselect-dropdown",dropdownIcon:"p-treeselect-dropdown-icon",panel:"p-treeselect-overlay p-component",treeContainer:"p-treeselect-tree-container",emptyMessage:"p-treeselect-empty-message"},Ze=(()=>{class t extends le{name="treeselect";theme=Sn;classes=Nn;inlineStyles=Cn;static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275prov=ee({token:t,factory:t.\u0275fac})}return t})();var In={provide:Ne,useExisting:Z(()=>et),multi:!0},et=(()=>{class t extends X{inputId;scrollHeight="400px";disabled;metaKeySelection=!1;variant;display="comma";selectionMode="single";tabindex="0";ariaLabel;ariaLabelledBy;placeholder;panelClass;panelStyle;fluid=!1;panelStyleClass;set containerStyle(e){let n=this._componentStyle.inlineStyles.root({instance:this});this._containerStyle=F(F({},n),e)}get containerStyle(){return this._containerStyle}_containerStyle;containerStyleClass;labelStyle;labelStyleClass;overlayOptions;emptyMessage="";appendTo;filter=!1;filterBy="label";filterMode="lenient";filterPlaceholder;filterLocale;filterInputAutoFocus=!0;propagateSelectionDown=!0;propagateSelectionUp=!0;showClear=!1;resetFilterOnHide=!0;virtualScroll;virtualScrollItemSize;size;virtualScrollOptions;autofocus;get options(){return this._options}set options(e){this._options=e,this.updateTreeState()}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}loading;onNodeExpand=new b;onNodeCollapse=new b;onShow=new b;onHide=new b;onClear=new b;onFilter=new b;onFocus=new b;onBlur=new b;onNodeUnselect=new b;onNodeSelect=new b;_showTransitionOptions;_hideTransitionOptions;containerEl;focusInput;filterViewChild;treeViewChild;panelEl;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;filteredNodes;filterValue=null;serializedValue;valueTemplate;headerTemplate;emptyTemplate;footerTemplate;clearIconTemplate;triggerIconTemplate;dropdownIconTemplate;filterIconTemplate;closeIconTemplate;itemTogglerIconTemplate;itemCheckboxIconTemplate;itemLoadingIconTemplate;templates;_valueTemplate;_headerTemplate;_emptyTemplate;_footerTemplate;_clearIconTemplate;_triggerIconTemplate;_filterIconTemplate;_closeIconTemplate;_itemTogglerIconTemplate;_itemCheckboxIconTemplate;_itemLoadingIconTemplate;_dropdownIconTemplate;focused;overlayVisible;selfChange;value;expandedNodes=[];_options;templateMap;onModelChange=()=>{};onModelTouched=()=>{};listId="";_componentStyle=B(Ze);ngOnInit(){super.ngOnInit(),this.listId=Me("pn_id_")+"_list",this.updateTreeState()}ngAfterContentInit(){this.templates.length&&(this.templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"value":this._valueTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break;case"itemtogglericon":this._itemTogglerIconTemplate=e.template;break;case"itemcheckboxicon":this._itemCheckboxIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"itemloadingicon":this._itemLoadingIconTemplate=e.template;break;default:e.name?this.templateMap[e.name]=e.template:this.valueTemplate=e.template;break}})}onOverlayAnimationStart(e){switch(e.toState){case"visible":if(this.filter)fe(this.filterValue)&&this.treeViewChild?._filter(this.filterValue),this.filterInputAutoFocus&&this.filterViewChild?.nativeElement.focus();else{let n=J(this.panelEl.nativeElement);n&&n.length>0&&n[0].focus()}break}}onOverlayBeforeHide(e){let n=J(this.containerEl.nativeElement);n&&n.length>0&&n[0].focus()}onSelectionChange(e){this.value=e,this.onModelChange(this.value),this.cd.markForCheck()}onClick(e){this.disabled||!this.overlayViewChild?.el?.nativeElement?.contains(e.target)&&!L(e.target,"p-treeselect-close")&&!L(e.target,"p-checkbox-box")&&!L(e.target,"p-checkbox-icon")&&(this.overlayVisible?this.hide():this.show(),this.focusInput?.nativeElement.focus())}onKeyDown(e){switch(e.code){case"ArrowDown":this.overlayVisible||(this.show(),e.preventDefault()),this.onArrowDown(e),e.preventDefault();break;case"Space":case"Enter":this.overlayVisible||(this.show(),e.preventDefault());break;case"Escape":this.overlayVisible&&(this.hide(),this.focusInput?.nativeElement.focus(),e.preventDefault());break;case"Tab":this.onTabKey(e);break;default:break}}onFilterInput(e){this.filterValue=e.target.value,this.treeViewChild?._filter(this.filterValue),this.onFilter.emit({filter:this.filterValue,filteredValue:this.treeViewChild?.filteredNodes}),setTimeout(()=>{this.overlayViewChild.alignOverlay()})}onArrowDown(e){if(this.overlayVisible&&this.panelEl?.nativeElement){let n=J(this.panelEl.nativeElement,".p-tree-node");n&&n.length>0&&n[0].focus(),e.preventDefault()}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?ke(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;Q(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?Ve(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;Q(n)}show(){this.overlayVisible=!0}hide(e){this.overlayVisible=!1,this.resetFilter(),this.onHide.emit(e),this.cd.markForCheck()}clear(e){this.value=null,this.resetExpandedNodes(),this.resetPartialSelected(),this.onModelChange(this.value),this.onClear.emit(),e.stopPropagation()}checkValue(){return this.value!==null&&fe(this.value)}onTabKey(e,n=!1){n||(this.overlayVisible&&this.hasFocusableElements()?(Q(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault()):this.overlayVisible&&this.hide(this.filter))}hasFocusableElements(){return J(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}resetFilter(){this.filter&&!this.resetFilterOnHide?(this.filteredNodes=this.treeViewChild?.filteredNodes,this.treeViewChild?.resetFilter()):this.filterValue=null}updateTreeState(){if(this.value){let e=this.selectionMode==="single"?[this.value]:[...this.value];this.resetExpandedNodes(),this.resetPartialSelected(),e&&this.options&&this.updateTreeBranchState(null,null,e)}}updateTreeBranchState(e,n,i){if(e){if(this.isSelected(e)&&(this.expandPath(n),i.splice(i.indexOf(e),1)),i.length>0&&e.children)for(let o of e.children)this.updateTreeBranchState(o,[...n,e],i)}else for(let o of this.options)this.updateTreeBranchState(o,[],i)}expandPath(e){for(let n of e)n.expanded=!0;this.expandedNodes=[...e]}nodeExpand(e){this.onNodeExpand.emit(e),this.expandedNodes.push(e.node)}nodeCollapse(e){this.onNodeCollapse.emit(e),this.expandedNodes.splice(this.expandedNodes.indexOf(e.node),1)}resetExpandedNodes(){for(let e of this.expandedNodes)e.expanded=!1;this.expandedNodes=[]}resetPartialSelected(e=this.options){if(e)for(let n of e)n.partialSelected=!1,n.children&&n.children?.length>0&&this.resetPartialSelected(n.children)}findSelectedNodes(e,n,i){if(e){if(this.isSelected(e)&&(i.push(e),delete n[e.key]),Object.keys(n).length&&e.children)for(let o of e.children)this.findSelectedNodes(o,n,i)}else for(let o of this.options)this.findSelectedNodes(o,n,i)}isSelected(e){return this.findIndexInSelection(e)!=-1}findIndexInSelection(e){let n=-1;if(this.value)if(this.selectionMode==="single")n=this.value.key&&this.value.key===e.key||this.value==e?0:-1;else for(let i=0;i<this.value.length;i++){let o=this.value[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}onSelect(e){this.onNodeSelect.emit(e),this.selectionMode==="single"&&(this.hide(),this.focusInput?.nativeElement.focus())}onUnselect(e){this.onNodeUnselect.emit(e)}onInputFocus(e){this.disabled||(this.focused=!0,this.onFocus.emit(e))}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}writeValue(e){this.value=e,this.updateTreeState(),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){setTimeout(()=>{this.disabled=e,this.cd.markForCheck()})}get containerClass(){return this._componentStyle.classes.root({instance:this})}get hasFluid(){let n=this.el.nativeElement.closest("p-fluid");return this.fluid||!!n}get labelClass(){return this._componentStyle.classes.label({instance:this})}get emptyValue(){return!this.value||Object.keys(this.value).length===0}get emptyOptions(){return!this.options||this.options.length===0}get label(){let e=this.value||[];return e.length?e.map(n=>n.label).join(", "):this.selectionMode==="single"&&this.value?e.label:this.placeholder}static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeSelect"],["p-treeselect"],["p-tree-select"]],contentQueries:function(n,i,o){if(n&1&&(T(o,xi,4),T(o,vi,4),T(o,Si,4),T(o,Ci,4),T(o,Ni,4),T(o,Ii,4),T(o,wi,4),T(o,Ei,4),T(o,ki,4),T(o,Vi,4),T(o,Di,4),T(o,Mi,4),T(o,ae,4)),n&2){let r;_(r=h())&&(i.valueTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.emptyTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.clearIconTemplate=r.first),_(r=h())&&(i.triggerIconTemplate=r.first),_(r=h())&&(i.dropdownIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.closeIconTemplate=r.first),_(r=h())&&(i.itemTogglerIconTemplate=r.first),_(r=h())&&(i.itemCheckboxIconTemplate=r.first),_(r=h())&&(i.itemLoadingIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(Oi,5),E(Fi,5),E($i,5),E(Li,5),E(zi,5),E(Ui,5),E(Ai,5),E(Ri,5)),n&2){let o;_(o=h())&&(i.containerEl=o.first),_(o=h())&&(i.focusInput=o.first),_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.treeViewChild=o.first),_(o=h())&&(i.panelEl=o.first),_(o=h())&&(i.overlayViewChild=o.first),_(o=h())&&(i.firstHiddenFocusableElementOnOverlay=o.first),_(o=h())&&(i.lastHiddenFocusableElementOnOverlay=o.first)}},inputs:{inputId:"inputId",scrollHeight:"scrollHeight",disabled:[2,"disabled","disabled",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],variant:"variant",display:"display",selectionMode:"selectionMode",tabindex:"tabindex",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",placeholder:"placeholder",panelClass:"panelClass",panelStyle:"panelStyle",fluid:[2,"fluid","fluid",y],panelStyleClass:"panelStyleClass",containerStyle:"containerStyle",containerStyleClass:"containerStyleClass",labelStyle:"labelStyle",labelStyleClass:"labelStyleClass",overlayOptions:"overlayOptions",emptyMessage:"emptyMessage",appendTo:"appendTo",filter:[2,"filter","filter",y],filterBy:"filterBy",filterMode:"filterMode",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",filterInputAutoFocus:[2,"filterInputAutoFocus","filterInputAutoFocus",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],showClear:[2,"showClear","showClear",y],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",y],virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",size:"size",virtualScrollOptions:"virtualScrollOptions",autofocus:[2,"autofocus","autofocus",y],options:"options",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",loading:[2,"loading","loading",y]},outputs:{onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onShow:"onShow",onHide:"onHide",onClear:"onClear",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onNodeUnselect:"onNodeUnselect",onNodeSelect:"onNodeSelect"},features:[re([In,Ze]),H],decls:18,vars:30,consts:[["container",""],["focusInput",""],["defaultValueTemplate",""],["overlay",""],["content",""],["chipsValueTemplate",""],["panel",""],["firstHiddenFocusableEl",""],["tree",""],["lastHiddenFocusableEl",""],["empty",""],["togglericon",""],["checkboxicon",""],["loadingicon",""],[3,"click","ngClass","ngStyle"],[1,"p-hidden-accessible"],["type","text","role","combobox","readonly","",3,"focus","blur","keydown","disabled","pAutoFocus"],[1,"p-treeselect-label-container"],[3,"ngClass","ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["role","button","aria-haspopup","tree",1,"p-treeselect-dropdown"],[3,"styleClass",4,"ngIf"],["class","p-treeselect-dropdown-icon",4,"ngIf"],[3,"visibleChange","onAnimationStart","onBeforeHide","onShow","onHide","visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-treeselect-chip-item",4,"ngFor","ngForOf"],[1,"p-treeselect-chip-item"],["styleClass","p-treeselect-chip",3,"label"],[3,"class","click",4,"ngIf"],["class","p-treeselect-clear-icon",3,"click",4,"ngIf"],[3,"click"],[1,"p-treeselect-clear-icon",3,"click"],[4,"ngTemplateOutlet"],[3,"styleClass"],[1,"p-treeselect-dropdown-icon"],[1,"p-treeselect-overlay","p-component",3,"ngStyle","ngClass"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[1,"p-treeselect-tree-container",3,"ngStyle"],[3,"selectionChange","onNodeExpand","onNodeCollapse","onNodeSelect","onNodeUnselect","value","propagateSelectionDown","propagateSelectionUp","selectionMode","selection","metaKeySelection","emptyMessage","filter","filterBy","filterMode","filterPlaceholder","filterLocale","filteredNodes","virtualScroll","virtualScrollItemSize","virtualScrollOptions","_templateMap","loading","filterInputAutoFocus"]],template:function(n,i){if(n&1){let o=V();f(0,"div",14,0),x("click",function(p){return u(o),g(i.onClick(p))}),f(2,"div",15)(3,"input",16,1),x("focus",function(p){return u(o),g(i.onInputFocus(p))})("blur",function(p){return u(o),g(i.onInputBlur(p))})("keydown",function(p){return u(o),g(i.onKeyDown(p))}),m()(),f(5,"div",17)(6,"div",18),d(7,Ki,2,5,"ng-container",19)(8,Ji,3,2,"ng-template",null,2,k),m()(),d(10,nn,3,2,"ng-container",20),f(11,"div",21),d(12,on,1,1,"ChevronDownIcon",22)(13,an,2,1,"span",23),m(),f(14,"p-overlay",24,3),Ce("visibleChange",function(p){return u(o),Se(i.overlayVisible,p)||(i.overlayVisible=p),g(p)}),x("onAnimationStart",function(p){return u(o),g(i.onOverlayAnimationStart(p))})("onBeforeHide",function(p){return u(o),g(i.onOverlayBeforeHide(p))})("onShow",function(p){return u(o),g(i.onShow.emit(p))})("onHide",function(p){return u(o),g(i.hide(p))}),d(16,vn,15,47,"ng-template",null,4,k),m()()}if(n&2){let o,r,p=ge(9);O(i.containerStyleClass),a("ngClass",i.containerClass)("ngStyle",i.containerStyle),c(3),a("disabled",i.disabled)("pAutoFocus",i.autofocus),N("id",i.inputId)("tabindex",i.disabled?-1:i.tabindex)("aria-controls",i.overlayVisible?i.listId:null)("aria-haspopup","tree")("aria-expanded",(o=i.overlayVisible)!==null&&o!==void 0?o:!1)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel||(i.label==="p-emptylabel"?void 0:i.label)),c(3),O(i.labelStyleClass),a("ngClass",i.labelClass)("ngStyle",i.labelStyle),c(),a("ngIf",i.valueTemplate||i._valueTemplate)("ngIfElse",p),c(3),a("ngIf",i.checkValue()&&!i.disabled&&i.showClear),c(),N("aria-expanded",(r=i.overlayVisible)!==null&&r!==void 0?r:!1)("aria-label","treeselect trigger"),c(),a("ngIf",!i.triggerIconTemplate&&!i._triggerIconTemplate&&!i.dropdownIconTemplate&&!i._dropdownIconTemplate),c(),a("ngIf",i.triggerIconTemplate||i._triggerIconTemplate||i.dropdownIconTemplate||i._dropdownIconTemplate),c(),ve("visible",i.overlayVisible),a("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions)}},dependencies:[Y,q,K,j,G,W,Be,U,Te,se,Ae,ce,qe],encapsulation:2,changeDetection:0})}return t})(),wo=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=pe({type:t});static \u0275inj=de({imports:[et,U,U]})}return t})();export{et as a,wo as b};
|
|
397
|
+
}`,Cn={root:({instance:t})=>({position:t.appendTo==="self"?"relative":void 0})},Nn={root:({instance:t})=>({"p-treeselect p-component p-inputwrapper":!0,"p-treeselect-display-chip":t.display==="chip","p-disabled":t.disabled,"p-invalid":t.invalid,"p-focus":t.focused,"p-variant-filled":t.variant==="filled"||t.config.inputVariant()==="filled"||t.config.inputStyle()==="filled","p-inputwrapper-filled":!t.emptyValue,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-treeselect-open":t.overlayVisible,"p-treeselect-clearable":t.showClear,"p-treeselect-fluid":t.hasFluid,"p-treeselect-sm p-inputfield-sm":t.size==="small","p-treeselect-lg p-inputfield-lg":t.size==="large"}),labelContainer:"p-treeselect-label-container",label:({instance:t})=>({"p-treeselect-label":!0,"p-placeholder":t.label===t.placeholder,"p-treeselect-label-empty":!t.placeholder&&t.emptyValue}),chip:"p-treeselect-chip-item",pcChip:"p-treeselect-chip",dropdown:"p-treeselect-dropdown",dropdownIcon:"p-treeselect-dropdown-icon",panel:"p-treeselect-overlay p-component",treeContainer:"p-treeselect-tree-container",emptyMessage:"p-treeselect-empty-message"},Ze=(()=>{class t extends le{name="treeselect";theme=Sn;classes=Nn;inlineStyles=Cn;static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275prov=ee({token:t,factory:t.\u0275fac})}return t})();var In={provide:Ne,useExisting:Z(()=>et),multi:!0},et=(()=>{class t extends X{inputId;scrollHeight="400px";disabled;metaKeySelection=!1;variant;display="comma";selectionMode="single";tabindex="0";ariaLabel;ariaLabelledBy;placeholder;panelClass;panelStyle;fluid=!1;panelStyleClass;set containerStyle(e){let n=this._componentStyle.inlineStyles.root({instance:this});this._containerStyle=F(F({},n),e)}get containerStyle(){return this._containerStyle}_containerStyle;containerStyleClass;labelStyle;labelStyleClass;overlayOptions;emptyMessage="";appendTo;filter=!1;filterBy="label";filterMode="lenient";filterPlaceholder;filterLocale;filterInputAutoFocus=!0;propagateSelectionDown=!0;propagateSelectionUp=!0;showClear=!1;resetFilterOnHide=!0;virtualScroll;virtualScrollItemSize;size;virtualScrollOptions;autofocus;get options(){return this._options}set options(e){this._options=e,this.updateTreeState()}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}loading;onNodeExpand=new b;onNodeCollapse=new b;onShow=new b;onHide=new b;onClear=new b;onFilter=new b;onFocus=new b;onBlur=new b;onNodeUnselect=new b;onNodeSelect=new b;_showTransitionOptions;_hideTransitionOptions;containerEl;focusInput;filterViewChild;treeViewChild;panelEl;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;filteredNodes;filterValue=null;serializedValue;valueTemplate;headerTemplate;emptyTemplate;footerTemplate;clearIconTemplate;triggerIconTemplate;dropdownIconTemplate;filterIconTemplate;closeIconTemplate;itemTogglerIconTemplate;itemCheckboxIconTemplate;itemLoadingIconTemplate;templates;_valueTemplate;_headerTemplate;_emptyTemplate;_footerTemplate;_clearIconTemplate;_triggerIconTemplate;_filterIconTemplate;_closeIconTemplate;_itemTogglerIconTemplate;_itemCheckboxIconTemplate;_itemLoadingIconTemplate;_dropdownIconTemplate;focused;overlayVisible;selfChange;value;expandedNodes=[];_options;templateMap;onModelChange=()=>{};onModelTouched=()=>{};listId="";_componentStyle=B(Ze);ngOnInit(){super.ngOnInit(),this.listId=Me("pn_id_")+"_list",this.updateTreeState()}ngAfterContentInit(){this.templates.length&&(this.templateMap={}),this.templates.forEach(e=>{switch(e.getType()){case"value":this._valueTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"triggericon":this._triggerIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break;case"itemtogglericon":this._itemTogglerIconTemplate=e.template;break;case"itemcheckboxicon":this._itemCheckboxIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"itemloadingicon":this._itemLoadingIconTemplate=e.template;break;default:e.name?this.templateMap[e.name]=e.template:this.valueTemplate=e.template;break}})}onOverlayAnimationStart(e){switch(e.toState){case"visible":if(this.filter)fe(this.filterValue)&&this.treeViewChild?._filter(this.filterValue),this.filterInputAutoFocus&&this.filterViewChild?.nativeElement.focus();else{let n=J(this.panelEl.nativeElement);n&&n.length>0&&n[0].focus()}break}}onOverlayBeforeHide(e){let n=J(this.containerEl.nativeElement);n&&n.length>0&&n[0].focus()}onSelectionChange(e){this.value=e,this.onModelChange(this.value),this.cd.markForCheck()}onClick(e){this.disabled||!this.overlayViewChild?.el?.nativeElement?.contains(e.target)&&!L(e.target,"p-treeselect-close")&&!L(e.target,"p-checkbox-box")&&!L(e.target,"p-checkbox-icon")&&(this.overlayVisible?this.hide():this.show(),this.focusInput?.nativeElement.focus())}onKeyDown(e){switch(e.code){case"ArrowDown":this.overlayVisible||(this.show(),e.preventDefault()),this.onArrowDown(e),e.preventDefault();break;case"Space":case"Enter":this.overlayVisible||(this.show(),e.preventDefault());break;case"Escape":this.overlayVisible&&(this.hide(),this.focusInput?.nativeElement.focus(),e.preventDefault());break;case"Tab":this.onTabKey(e);break;default:break}}onFilterInput(e){this.filterValue=e.target.value,this.treeViewChild?._filter(this.filterValue),this.onFilter.emit({filter:this.filterValue,filteredValue:this.treeViewChild?.filteredNodes}),setTimeout(()=>{this.overlayViewChild.alignOverlay()})}onArrowDown(e){if(this.overlayVisible&&this.panelEl?.nativeElement){let n=J(this.panelEl.nativeElement,".p-tree-node");n&&n.length>0&&n[0].focus(),e.preventDefault()}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?ke(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;Q(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInput?.nativeElement?Ve(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInput?.nativeElement;Q(n)}show(){this.overlayVisible=!0}hide(e){this.overlayVisible=!1,this.resetFilter(),this.onHide.emit(e),this.cd.markForCheck()}clear(e){this.value=null,this.resetExpandedNodes(),this.resetPartialSelected(),this.onModelChange(this.value),this.onClear.emit(),e.stopPropagation()}checkValue(){return this.value!==null&&fe(this.value)}onTabKey(e,n=!1){n||(this.overlayVisible&&this.hasFocusableElements()?(Q(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault()):this.overlayVisible&&this.hide(this.filter))}hasFocusableElements(){return J(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}resetFilter(){this.filter&&!this.resetFilterOnHide?(this.filteredNodes=this.treeViewChild?.filteredNodes,this.treeViewChild?.resetFilter()):this.filterValue=null}updateTreeState(){if(this.value){let e=this.selectionMode==="single"?[this.value]:[...this.value];this.resetExpandedNodes(),this.resetPartialSelected(),e&&this.options&&this.updateTreeBranchState(null,null,e)}}updateTreeBranchState(e,n,i){if(e){if(this.isSelected(e)&&(this.expandPath(n),i.splice(i.indexOf(e),1)),i.length>0&&e.children)for(let o of e.children)this.updateTreeBranchState(o,[...n,e],i)}else for(let o of this.options)this.updateTreeBranchState(o,[],i)}expandPath(e){for(let n of e)n.expanded=!0;this.expandedNodes=[...e]}nodeExpand(e){this.onNodeExpand.emit(e),this.expandedNodes.push(e.node)}nodeCollapse(e){this.onNodeCollapse.emit(e),this.expandedNodes.splice(this.expandedNodes.indexOf(e.node),1)}resetExpandedNodes(){for(let e of this.expandedNodes)e.expanded=!1;this.expandedNodes=[]}resetPartialSelected(e=this.options){if(e)for(let n of e)n.partialSelected=!1,n.children&&n.children?.length>0&&this.resetPartialSelected(n.children)}findSelectedNodes(e,n,i){if(e){if(this.isSelected(e)&&(i.push(e),delete n[e.key]),Object.keys(n).length&&e.children)for(let o of e.children)this.findSelectedNodes(o,n,i)}else for(let o of this.options)this.findSelectedNodes(o,n,i)}isSelected(e){return this.findIndexInSelection(e)!=-1}findIndexInSelection(e){let n=-1;if(this.value)if(this.selectionMode==="single")n=this.value.key&&this.value.key===e.key||this.value==e?0:-1;else for(let i=0;i<this.value.length;i++){let o=this.value[i];if(o.key&&o.key===e.key||o==e){n=i;break}}return n}onSelect(e){this.onNodeSelect.emit(e),this.selectionMode==="single"&&(this.hide(),this.focusInput?.nativeElement.focus())}onUnselect(e){this.onNodeUnselect.emit(e)}onInputFocus(e){this.disabled||(this.focused=!0,this.onFocus.emit(e))}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.onModelTouched()}writeValue(e){this.value=e,this.updateTreeState(),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){setTimeout(()=>{this.disabled=e,this.cd.markForCheck()})}get containerClass(){return this._componentStyle.classes.root({instance:this})}get hasFluid(){let n=this.el.nativeElement.closest("p-fluid");return this.fluid||!!n}get labelClass(){return this._componentStyle.classes.label({instance:this})}get emptyValue(){return!this.value||Object.keys(this.value).length===0}get emptyOptions(){return!this.options||this.options.length===0}get label(){let e=this.value||[];return e.length?e.map(n=>n.label).join(", "):this.selectionMode==="single"&&this.value?e.label:this.placeholder}static \u0275fac=(()=>{let e;return function(i){return(e||(e=A(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-treeSelect"],["p-treeselect"],["p-tree-select"]],contentQueries:function(n,i,o){if(n&1&&(T(o,xi,4),T(o,vi,4),T(o,Si,4),T(o,Ci,4),T(o,Ni,4),T(o,Ii,4),T(o,wi,4),T(o,Ei,4),T(o,ki,4),T(o,Vi,4),T(o,Di,4),T(o,Mi,4),T(o,ae,4)),n&2){let r;_(r=h())&&(i.valueTemplate=r.first),_(r=h())&&(i.headerTemplate=r.first),_(r=h())&&(i.emptyTemplate=r.first),_(r=h())&&(i.footerTemplate=r.first),_(r=h())&&(i.clearIconTemplate=r.first),_(r=h())&&(i.triggerIconTemplate=r.first),_(r=h())&&(i.dropdownIconTemplate=r.first),_(r=h())&&(i.filterIconTemplate=r.first),_(r=h())&&(i.closeIconTemplate=r.first),_(r=h())&&(i.itemTogglerIconTemplate=r.first),_(r=h())&&(i.itemCheckboxIconTemplate=r.first),_(r=h())&&(i.itemLoadingIconTemplate=r.first),_(r=h())&&(i.templates=r)}},viewQuery:function(n,i){if(n&1&&(E(Oi,5),E(Fi,5),E($i,5),E(Li,5),E(zi,5),E(Ui,5),E(Ai,5),E(Ri,5)),n&2){let o;_(o=h())&&(i.containerEl=o.first),_(o=h())&&(i.focusInput=o.first),_(o=h())&&(i.filterViewChild=o.first),_(o=h())&&(i.treeViewChild=o.first),_(o=h())&&(i.panelEl=o.first),_(o=h())&&(i.overlayViewChild=o.first),_(o=h())&&(i.firstHiddenFocusableElementOnOverlay=o.first),_(o=h())&&(i.lastHiddenFocusableElementOnOverlay=o.first)}},inputs:{inputId:"inputId",scrollHeight:"scrollHeight",disabled:[2,"disabled","disabled",y],metaKeySelection:[2,"metaKeySelection","metaKeySelection",y],variant:"variant",display:"display",selectionMode:"selectionMode",tabindex:"tabindex",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",placeholder:"placeholder",panelClass:"panelClass",panelStyle:"panelStyle",fluid:[2,"fluid","fluid",y],panelStyleClass:"panelStyleClass",containerStyle:"containerStyle",containerStyleClass:"containerStyleClass",labelStyle:"labelStyle",labelStyleClass:"labelStyleClass",overlayOptions:"overlayOptions",emptyMessage:"emptyMessage",appendTo:"appendTo",filter:[2,"filter","filter",y],filterBy:"filterBy",filterMode:"filterMode",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",filterInputAutoFocus:[2,"filterInputAutoFocus","filterInputAutoFocus",y],propagateSelectionDown:[2,"propagateSelectionDown","propagateSelectionDown",y],propagateSelectionUp:[2,"propagateSelectionUp","propagateSelectionUp",y],showClear:[2,"showClear","showClear",y],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",y],virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",size:"size",virtualScrollOptions:"virtualScrollOptions",autofocus:[2,"autofocus","autofocus",y],options:"options",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",loading:[2,"loading","loading",y]},outputs:{onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onShow:"onShow",onHide:"onHide",onClear:"onClear",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onNodeUnselect:"onNodeUnselect",onNodeSelect:"onNodeSelect"},features:[re([In,Ze]),H],decls:18,vars:30,consts:[["container",""],["focusInput",""],["defaultValueTemplate",""],["overlay",""],["content",""],["chipsValueTemplate",""],["panel",""],["firstHiddenFocusableEl",""],["tree",""],["lastHiddenFocusableEl",""],["empty",""],["togglericon",""],["checkboxicon",""],["loadingicon",""],[3,"click","ngClass","ngStyle"],[1,"p-hidden-accessible"],["type","text","role","combobox","readonly","",3,"focus","blur","keydown","disabled","pAutoFocus"],[1,"p-treeselect-label-container"],[3,"ngClass","ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["role","button","aria-haspopup","tree",1,"p-treeselect-dropdown"],[3,"styleClass",4,"ngIf"],["class","p-treeselect-dropdown-icon",4,"ngIf"],[3,"visibleChange","onAnimationStart","onBeforeHide","onShow","onHide","visible","options","target","appendTo","showTransitionOptions","hideTransitionOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-treeselect-chip-item",4,"ngFor","ngForOf"],[1,"p-treeselect-chip-item"],["styleClass","p-treeselect-chip",3,"label"],[3,"class","click",4,"ngIf"],["class","p-treeselect-clear-icon",3,"click",4,"ngIf"],[3,"click"],[1,"p-treeselect-clear-icon",3,"click"],[4,"ngTemplateOutlet"],[3,"styleClass"],[1,"p-treeselect-dropdown-icon"],[1,"p-treeselect-overlay","p-component",3,"ngStyle","ngClass"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],[1,"p-treeselect-tree-container",3,"ngStyle"],[3,"selectionChange","onNodeExpand","onNodeCollapse","onNodeSelect","onNodeUnselect","value","propagateSelectionDown","propagateSelectionUp","selectionMode","selection","metaKeySelection","emptyMessage","filter","filterBy","filterMode","filterPlaceholder","filterLocale","filteredNodes","virtualScroll","virtualScrollItemSize","virtualScrollOptions","_templateMap","loading","filterInputAutoFocus"]],template:function(n,i){if(n&1){let o=V();f(0,"div",14,0),x("click",function(p){return u(o),g(i.onClick(p))}),f(2,"div",15)(3,"input",16,1),x("focus",function(p){return u(o),g(i.onInputFocus(p))})("blur",function(p){return u(o),g(i.onInputBlur(p))})("keydown",function(p){return u(o),g(i.onKeyDown(p))}),m()(),f(5,"div",17)(6,"div",18),d(7,Ki,2,5,"ng-container",19)(8,Ji,3,2,"ng-template",null,2,k),m()(),d(10,nn,3,2,"ng-container",20),f(11,"div",21),d(12,on,1,1,"ChevronDownIcon",22)(13,an,2,1,"span",23),m(),f(14,"p-overlay",24,3),Ce("visibleChange",function(p){return u(o),Se(i.overlayVisible,p)||(i.overlayVisible=p),g(p)}),x("onAnimationStart",function(p){return u(o),g(i.onOverlayAnimationStart(p))})("onBeforeHide",function(p){return u(o),g(i.onOverlayBeforeHide(p))})("onShow",function(p){return u(o),g(i.onShow.emit(p))})("onHide",function(p){return u(o),g(i.hide(p))}),d(16,vn,15,47,"ng-template",null,4,k),m()()}if(n&2){let o,r,p=ge(9);O(i.containerStyleClass),a("ngClass",i.containerClass)("ngStyle",i.containerStyle),c(3),a("disabled",i.disabled)("pAutoFocus",i.autofocus),N("id",i.inputId)("tabindex",i.disabled?-1:i.tabindex)("aria-controls",i.overlayVisible?i.listId:null)("aria-haspopup","tree")("aria-expanded",(o=i.overlayVisible)!==null&&o!==void 0?o:!1)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel||(i.label==="p-emptylabel"?void 0:i.label)),c(3),O(i.labelStyleClass),a("ngClass",i.labelClass)("ngStyle",i.labelStyle),c(),a("ngIf",i.valueTemplate||i._valueTemplate)("ngIfElse",p),c(3),a("ngIf",i.checkValue()&&!i.disabled&&i.showClear),c(),N("aria-expanded",(r=i.overlayVisible)!==null&&r!==void 0?r:!1)("aria-label","treeselect trigger"),c(),a("ngIf",!i.triggerIconTemplate&&!i._triggerIconTemplate&&!i.dropdownIconTemplate&&!i._dropdownIconTemplate),c(),a("ngIf",i.triggerIconTemplate||i._triggerIconTemplate||i.dropdownIconTemplate||i._dropdownIconTemplate),c(),ve("visible",i.overlayVisible),a("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions)}},dependencies:[Y,q,K,j,G,W,Be,U,Te,se,Ae,ce,Ke],encapsulation:2,changeDetection:0})}return t})(),wo=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=pe({type:t});static \u0275inj=de({imports:[et,U,U]})}return t})();export{et as a,wo as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as Et}from"./chunk-B3HL4DNT.js";import"./chunk-OXWPLJEW.js";import{a as kt}from"./chunk-PFY5UG5D.js";import{a as Te,b as ht,c as gt,d as xe,e as Ie}from"./chunk-6EMUVAZD.js";import"./chunk-DGIH7HSJ.js";import{a as ut,b as be,c as ft,d as ye,f as yt,g as vt,h as Fe,i as Tt,o as ae}from"./chunk-KS7ACI26.js";import{b as It}from"./chunk-PHUHUFYL.js";import{a as Ct}from"./chunk-2WHJU6CS.js";import"./chunk-3GDM5JNY.js";import{b as bt,d as Se}from"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{b as St}from"./chunk-2O4IEGGR.js";import"./chunk-VFATXJRG.js";import{a as Ft,b as At}from"./chunk-LYPHZP72.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-4YRBARG2.js";import"./chunk-5CKVZBHM.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import{a as xt}from"./chunk-RHHHL4OR.js";import"./chunk-M7DDFDPD.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import{a as _t,b as ve}from"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import{a as Ce}from"./chunk-HIC5QC3Y.js";import{a as st,b as mt,f as dt}from"./chunk-JBT7GBCM.js";import"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-JVNHFIYT.js";import"./chunk-C7YK5TDP.js";import{a as pt}from"./chunk-GHFADTRR.js";import"./chunk-HAJDTNAW.js";import"./chunk-ACIMXBIC.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as ot,e as re}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{d as H,e as Y}from"./chunk-PYXL7UF7.js";import{b as De,c as h}from"./chunk-RXQX7567.js";import{m as lt,n as ct}from"./chunk-HJXYT6MI.js";import{A as oe,B as G,a as Qe,c as ne,e as me,h as $,i as W,l as ge,m as Ze,n as X,q as K,r as et,s as J,t as tt,u as it,v as nt,z as q}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as rt,s as at}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as A,j as k,n as T}from"./chunk-FXQKRJWU.js";import{$ as Ye,$c as x,Fc as _e,Gb as v,Gc as f,Hb as fe,Hc as ie,Ic as Q,K as Ge,Ka as D,Kc as Ke,Lc as Je,M as He,Mb as _,Mc as qe,Na as je,Oa as Me,Qc as F,Rc as he,Xb as We,Yb as p,Z as te,Zb as Oe,ad as I,ca as se,dc as S,ea as U,ec as B,f as de,g as $e,gc as L,hc as R,ic as s,ja as M,jc as a,jd as ze,ka as ue,kc as d,lc as N,mc as w,oc as E,pa as u,rb as c,tc as y,uc as l,v as V,xa as O,xb as j,xc as Xe,ya as C,za as b}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var z=function(t){return t[t.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",t[t.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",t[t.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",t[t.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",t[t.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",t}(z||{});var le=function(t){return t[t.FORMAT_NORMAL=1]="FORMAT_NORMAL",t[t.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",t}(le||{});var ce=function(t){return t[t.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",t[t.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",t[t.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",t[t.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",t[t.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",t}(ce||{});var Ne=class extends ge{setValue(m,e){if(m instanceof Date){let i=Math.floor(m.getTime()/1e3);super.setValue(i,e)}else super.setValue(m,e)}},we=(()=>{class t{constructor(){this.shopeeUploadService=u(Te),this.formBuilder=u(q)}getAttributes(e){return this.shopeeUploadService.getAttributes(e.channelId,e.categoryId).pipe(V(i=>this.setLabelToIndonesian(i)))}setLabelToIndonesian(e=[]){let i,n;return e=e.map(o=>(i=o?.multi_lang?.find(r=>r.language=="id"),o.attribute_value_list=o?.attribute_value_list?.map(r=>(n=r?.multi_lang?.find(g=>g.language=="id"),r.name=n?.value,r)),o.name=i?.value?i?.value:o.name,o)),e}createFormGroup(e){let i=this.formBuilder.group({}),n=[];return e.forEach(o=>{if(n=[],o.mandatory&&n.push(me.required),o?.attribute_info?.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT&&o?.attribute_info?.input_type==z.FREE_TEXT_FILED){let r=this.formBuilder.group({unit:new ge(null),value:new ge(null,n)});i.addControl(JSON.stringify(o.attribute_id),r)}else o?.attribute_info?.input_type==z.FREE_TEXT_FILED&&o?.attribute_info?.input_validation_type==ce.VALIDATOR_DATE_TYPE?i.addControl(JSON.stringify(o.attribute_id),new Ne(null,n)):i.addControl(JSON.stringify(o.attribute_id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(e,i){let n=JSON.parse(JSON.stringify(e)),o=Object.keys(i),r=n.filter(g=>o.findIndex(Pe=>parseInt(Pe)==g.attribute_id||g.mandatory)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(e,i){return e.map(o=>{switch(o.attribute_info.input_type){case z.MULTI_COMBO_BOX:h.IsNotEmpty(i[o.attribute_id])?o.attribute_value_list=o.attribute_value_list.filter(r=>i[o.attribute_id]?.findIndex(g=>g==r.value_id)!=-1):o.attribute_value_list=[];break;case z.FREE_TEXT_FILED:o.attribute_info.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT?o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]?.value,i[o.attribute_id]?.unit):o.attribute_info.input_validation_type==ce.VALIDATOR_DATE_TYPE?o.attribute_value_list=this.setSelectedDateAttr(i[o.attribute_id]):o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]);break;default:o.attribute_value_list=o.attribute_value_list.filter(r=>r.value_id==i[o.attribute_id])}return o}).filter(o=>o?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(e,i){let n=[];if(h.IsNotEmpty(e)){let o={value_id:0,original_value_name:JSON.stringify(e)};h.IsNotEmpty(i)&&(o.value_unit=i),n=[o]}return n}setSelectedDateAttr(e){let i=[];return h.IsNotEmpty(e)&&(i=[{value_id:0,original_value_name:JSON.stringify(e)}]),i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac})}}return t})();var Ae=(()=>{class t{constructor(){this._calendarHeaderConfig=new $e({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $t=["class","component ts"];function Gt(t,m){if(t&1){let e=E();s(0,"button",3),y("click",function(){C(e);let n=l(2);return b(n.todayClicked())}),d(1,"i",4),a()}}function Ht(t,m){if(t&1){let e=E();s(0,"button",5),y("click",function(){C(e);let n=l(2);return b(n.clearClicked())}),d(1,"i",6),a()}}function Yt(t,m){if(t&1&&(N(0),_(1,Gt,2,0,"button",1)(2,Ht,2,0,"button",2),w()),t&2){let e=m.ngIf;c(),p("ngIf",!e.hideBtnToday),c(),p("ngIf",!e.hideBtnClear)}}var Mt=(()=>{class t{constructor(e,i,n,o,r){this._datePicker=e,this._calendar=i,this._dateAdapter=n,this.calendarService=o,this._destroyed=new de,i.stateChanges.pipe(se(this._destroyed)).subscribe(g=>r.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(j(Fe),j(vt),j(be),j(Ae),j(ze))}}static{this.\u0275cmp=v({type:t,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[O],attrs:$t,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(i,n){i&1&&(s(0,"mat-calendar-header"),_(1,Yt,3,2,"ng-container",0),x(2,"async"),a()),i&2&&(c(),p("ngIf",I(2,1,n.calendarConfig$)))},dependencies:[A,bt,yt,k],encapsulation:2})}}return t})(),Ot=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=fe({type:t})}static{this.\u0275inj=ue({providers:[ae],imports:[T,Se,ye,ae,Ce,ve]})}}return t})();function jt(t,m){if(t&1&&(s(0,"mat-label",7)(1,"span"),f(2),a()()),t&2){let e=l();p("show",e.placeholder),c(2),ie(e.placeholder)}}var Wt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"dddd, D MMMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"dddd, D MMMM YYYY",monthYearA11yLabel:"MMMM YYYY"}},Dt=(()=>{class t{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let i=null;e&&(i=e.toDate(),i.setHours(0,0,0,0)),this.onChange(i),this.dateChange.emit(i)}constructor(e){this.calendarService=e,this.headerComponent=Mt,this.appearance="outline",this.isFloatingLabel=!0,this.disabled=!1,this.readOnly=!1,this.dateChange=new D,this.minDate=h.MinDate,this.onChange=i=>{},this.displayToggle=!0}writeValue(e){this.date=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(i){return new(i||t)(j(Ae))}}static{this.\u0275cmp=v({type:t,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},standalone:!1,features:[F([{provide:be,useClass:kt,deps:[ut]},{provide:ft,useValue:Wt},{provide:Qe,multi:!0,useExisting:t}])],decls:7,vars:16,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show",4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","","aria-hidden","true",1,"datepicker-toggle-icon",3,"click"],[1,"fa-regular","fa-angle-down"],[3,"opened","closed","calendarHeaderComponent"],[3,"show"]],template:function(i,n){if(i&1){let o=E();s(0,"mat-form-field",1),_(1,jt,3,2,"mat-label",2),s(2,"input",3),y("dateChange",function(g){return C(o),b(n.change(g.value))})("click",function(){C(o);let g=_e(6);return b(g.open())}),a(),s(3,"span",4),y("click",function(){C(o);let g=_e(6);return b(g.open())}),d(4,"i",5),a(),s(5,"mat-datepicker",6,0),y("opened",function(){return C(o),b(n.onOpenDatepicker())})("closed",function(){return C(o),b(n.onCloseDatepicker())}),a()()}if(i&2){let o=_e(6);Oe("width",n.width||100,"%"),p("disabled",n.disabled)("appearance",n.appearance),c(),p("ngIf",n.isFloatingLabel&&n.placeholder),c(),Xe("placeholder",n.placeholder||""),p("matDatepicker",o)("min",n.minDateValidation)("max",n.maxDateValidation)("value",n.date==n.minDate?null:n.date)("disabled",n.disabled)("readonly",n.readOnly),We("data-cy",n.data_cy),c(),Oe("display",n.displayToggle?"unset":"none"),c(2),p("calendarHeaderComponent",n.headerComponent)}},dependencies:[A,Fe,Tt,dt,st,mt,_t],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:3px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}.datepicker .datepicker-toggle-icon{width:28px;height:36px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-right:6px}.datepicker .datepicker-toggle-icon i{font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:400;font-size:16px;line-height:1;color:#6b7280}
|
|
1
|
+
import{b as Et}from"./chunk-R5WARQUS.js";import{a as kt}from"./chunk-PFY5UG5D.js";import{a as Te,b as ht,c as gt,d as xe,e as Ie}from"./chunk-GVXBDVLX.js";import"./chunk-DGIH7HSJ.js";import{a as ut,b as be,c as ft,d as ye,f as yt,g as vt,h as Fe,i as Tt,o as ae}from"./chunk-KS7ACI26.js";import{b as It}from"./chunk-PHUHUFYL.js";import{a as Ct}from"./chunk-2WHJU6CS.js";import"./chunk-3GDM5JNY.js";import{b as bt,d as Se}from"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{b as St}from"./chunk-PGP3WHIS.js";import"./chunk-VFATXJRG.js";import{a as Ft,b as At}from"./chunk-LYPHZP72.js";import{a as xt}from"./chunk-RHHHL4OR.js";import"./chunk-7ES3PHES.js";import{a as _t,b as ve}from"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import{a as Ce}from"./chunk-HIC5QC3Y.js";import{a as st,b as mt,f as dt}from"./chunk-JBT7GBCM.js";import"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-C7YK5TDP.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{a as pt}from"./chunk-GHFADTRR.js";import"./chunk-5ZR5WIHG.js";import"./chunk-ACIMXBIC.js";import{d as H,e as Y}from"./chunk-PYXL7UF7.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as ot,e as re}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as De,c as h}from"./chunk-RXQX7567.js";import{m as lt,n as ct}from"./chunk-HJXYT6MI.js";import{A as oe,B as G,a as Qe,c as ne,e as me,h as $,i as W,l as ge,m as Ze,n as X,q as K,r as et,s as J,t as tt,u as it,v as nt,z as q}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as rt,s as at}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as A,j as k,n as T}from"./chunk-FXQKRJWU.js";import{$ as Ye,$c as x,Fc as _e,Gb as v,Gc as f,Hb as fe,Hc as ie,Ic as Q,K as Ge,Ka as D,Kc as Ke,Lc as Je,M as He,Mb as _,Mc as qe,Na as je,Oa as Me,Qc as F,Rc as he,Xb as We,Yb as p,Z as te,Zb as Oe,ad as I,ca as se,dc as S,ea as U,ec as B,f as de,g as $e,gc as L,hc as R,ic as s,ja as M,jc as a,jd as ze,ka as ue,kc as d,lc as N,mc as w,oc as E,pa as u,rb as c,tc as y,uc as l,v as V,xa as O,xb as j,xc as Xe,ya as C,za as b}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var z=function(t){return t[t.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",t[t.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",t[t.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",t[t.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",t[t.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",t}(z||{});var le=function(t){return t[t.FORMAT_NORMAL=1]="FORMAT_NORMAL",t[t.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",t}(le||{});var ce=function(t){return t[t.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",t[t.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",t[t.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",t[t.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",t[t.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",t}(ce||{});var Ne=class extends ge{setValue(m,e){if(m instanceof Date){let i=Math.floor(m.getTime()/1e3);super.setValue(i,e)}else super.setValue(m,e)}},we=(()=>{class t{constructor(){this.shopeeUploadService=u(Te),this.formBuilder=u(q)}getAttributes(e){return this.shopeeUploadService.getAttributes(e.channelId,e.categoryId).pipe(V(i=>this.setLabelToIndonesian(i)))}setLabelToIndonesian(e=[]){let i,n;return e=e.map(o=>(i=o?.multi_lang?.find(r=>r.language=="id"),o.attribute_value_list=o?.attribute_value_list?.map(r=>(n=r?.multi_lang?.find(g=>g.language=="id"),r.name=n?.value,r)),o.name=i?.value?i?.value:o.name,o)),e}createFormGroup(e){let i=this.formBuilder.group({}),n=[];return e.forEach(o=>{if(n=[],o.mandatory&&n.push(me.required),o?.attribute_info?.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT&&o?.attribute_info?.input_type==z.FREE_TEXT_FILED){let r=this.formBuilder.group({unit:new ge(null),value:new ge(null,n)});i.addControl(JSON.stringify(o.attribute_id),r)}else o?.attribute_info?.input_type==z.FREE_TEXT_FILED&&o?.attribute_info?.input_validation_type==ce.VALIDATOR_DATE_TYPE?i.addControl(JSON.stringify(o.attribute_id),new Ne(null,n)):i.addControl(JSON.stringify(o.attribute_id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(e,i){let n=JSON.parse(JSON.stringify(e)),o=Object.keys(i),r=n.filter(g=>o.findIndex(Pe=>parseInt(Pe)==g.attribute_id||g.mandatory)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(e,i){return e.map(o=>{switch(o.attribute_info.input_type){case z.MULTI_COMBO_BOX:h.IsNotEmpty(i[o.attribute_id])?o.attribute_value_list=o.attribute_value_list.filter(r=>i[o.attribute_id]?.findIndex(g=>g==r.value_id)!=-1):o.attribute_value_list=[];break;case z.FREE_TEXT_FILED:o.attribute_info.format_type==le.FORMAT_QUANTITATIVE_WITH_UNIT?o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]?.value,i[o.attribute_id]?.unit):o.attribute_info.input_validation_type==ce.VALIDATOR_DATE_TYPE?o.attribute_value_list=this.setSelectedDateAttr(i[o.attribute_id]):o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]);break;default:o.attribute_value_list=o.attribute_value_list.filter(r=>r.value_id==i[o.attribute_id])}return o}).filter(o=>o?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(e,i){let n=[];if(h.IsNotEmpty(e)){let o={value_id:0,original_value_name:JSON.stringify(e)};h.IsNotEmpty(i)&&(o.value_unit=i),n=[o]}return n}setSelectedDateAttr(e){let i=[];return h.IsNotEmpty(e)&&(i=[{value_id:0,original_value_name:JSON.stringify(e)}]),i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac})}}return t})();var Ae=(()=>{class t{constructor(){this._calendarHeaderConfig=new $e({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $t=["class","component ts"];function Gt(t,m){if(t&1){let e=E();s(0,"button",3),y("click",function(){C(e);let n=l(2);return b(n.todayClicked())}),d(1,"i",4),a()}}function Ht(t,m){if(t&1){let e=E();s(0,"button",5),y("click",function(){C(e);let n=l(2);return b(n.clearClicked())}),d(1,"i",6),a()}}function Yt(t,m){if(t&1&&(N(0),_(1,Gt,2,0,"button",1)(2,Ht,2,0,"button",2),w()),t&2){let e=m.ngIf;c(),p("ngIf",!e.hideBtnToday),c(),p("ngIf",!e.hideBtnClear)}}var Mt=(()=>{class t{constructor(e,i,n,o,r){this._datePicker=e,this._calendar=i,this._dateAdapter=n,this.calendarService=o,this._destroyed=new de,i.stateChanges.pipe(se(this._destroyed)).subscribe(g=>r.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(j(Fe),j(vt),j(be),j(Ae),j(ze))}}static{this.\u0275cmp=v({type:t,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[O],attrs:$t,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(i,n){i&1&&(s(0,"mat-calendar-header"),_(1,Yt,3,2,"ng-container",0),x(2,"async"),a()),i&2&&(c(),p("ngIf",I(2,1,n.calendarConfig$)))},dependencies:[A,bt,yt,k],encapsulation:2})}}return t})(),Ot=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=fe({type:t})}static{this.\u0275inj=ue({providers:[ae],imports:[T,Se,ye,ae,Ce,ve]})}}return t})();function jt(t,m){if(t&1&&(s(0,"mat-label",7)(1,"span"),f(2),a()()),t&2){let e=l();p("show",e.placeholder),c(2),ie(e.placeholder)}}var Wt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"dddd, D MMMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"dddd, D MMMM YYYY",monthYearA11yLabel:"MMMM YYYY"}},Dt=(()=>{class t{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let i=null;e&&(i=e.toDate(),i.setHours(0,0,0,0)),this.onChange(i),this.dateChange.emit(i)}constructor(e){this.calendarService=e,this.headerComponent=Mt,this.appearance="outline",this.isFloatingLabel=!0,this.disabled=!1,this.readOnly=!1,this.dateChange=new D,this.minDate=h.MinDate,this.onChange=i=>{},this.displayToggle=!0}writeValue(e){this.date=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(i){return new(i||t)(j(Ae))}}static{this.\u0275cmp=v({type:t,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},standalone:!1,features:[F([{provide:be,useClass:kt,deps:[ut]},{provide:ft,useValue:Wt},{provide:Qe,multi:!0,useExisting:t}])],decls:7,vars:16,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show",4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","","aria-hidden","true",1,"datepicker-toggle-icon",3,"click"],[1,"fa-regular","fa-angle-down"],[3,"opened","closed","calendarHeaderComponent"],[3,"show"]],template:function(i,n){if(i&1){let o=E();s(0,"mat-form-field",1),_(1,jt,3,2,"mat-label",2),s(2,"input",3),y("dateChange",function(g){return C(o),b(n.change(g.value))})("click",function(){C(o);let g=_e(6);return b(g.open())}),a(),s(3,"span",4),y("click",function(){C(o);let g=_e(6);return b(g.open())}),d(4,"i",5),a(),s(5,"mat-datepicker",6,0),y("opened",function(){return C(o),b(n.onOpenDatepicker())})("closed",function(){return C(o),b(n.onCloseDatepicker())}),a()()}if(i&2){let o=_e(6);Oe("width",n.width||100,"%"),p("disabled",n.disabled)("appearance",n.appearance),c(),p("ngIf",n.isFloatingLabel&&n.placeholder),c(),Xe("placeholder",n.placeholder||""),p("matDatepicker",o)("min",n.minDateValidation)("max",n.maxDateValidation)("value",n.date==n.minDate?null:n.date)("disabled",n.disabled)("readonly",n.readOnly),We("data-cy",n.data_cy),c(),Oe("display",n.displayToggle?"unset":"none"),c(2),p("calendarHeaderComponent",n.headerComponent)}},dependencies:[A,Fe,Tt,dt,st,mt,_t],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:3px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}.datepicker .datepicker-toggle-icon{width:28px;height:36px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-right:6px}.datepicker .datepicker-toggle-icon i{font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:400;font-size:16px;line-height:1;color:#6b7280}
|
|
2
2
|
`],encapsulation:2})}}return t})(),Nt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=fe({type:t})}static{this.\u0275inj=ue({providers:[ae],imports:[T,Se,ye,ae,Ce,ve,Ot,It]})}}return t})();var Ve=()=>[];function Kt(t,m){t&1&&(s(0,"span",5),f(1,"*"),a())}function Jt(t,m){if(t&1&&d(0,"ng-select",6),t&2){let e=l().$implicit;p("multiple",!0)("formControlName",e.attribute_id)("items",e.attribute_value_list?e.attribute_value_list:he(4,Ve))("placeholder","Pilih "+(e==null?null:e.name))}}function qt(t,m){if(t&1&&d(0,"input",8),t&2){let e=l(2).$implicit;p("formControlName",e.attribute_id)("placeholder","Isi "+(e==null?null:e.name))}}function zt(t,m){if(t&1&&(s(0,"option",15),f(1),a()),t&2){let e=m.$implicit;p("value",e),c(),ie(e)}}function Qt(t,m){if(t&1&&(s(0,"div",10),d(1,"input",12),s(2,"select",13)(3,"option",14),f(4,"Unit"),a(),L(5,zt,2,2,"option",15,B),a()()),t&2){let e=l(3).$implicit;p("formGroupName",e.attribute_id),c(),p("placeholder","Isi "+(e==null?null:e.name)),c(2),p("value",null),c(2),R(e==null||e.attribute_info==null?null:e.attribute_info.attribute_unit_list)}}function Zt(t,m){if(t&1&&d(0,"input",11),t&2){let e=l(3).$implicit;p("formControlName",e.attribute_id)("placeholder","Isi "+(e==null?null:e.name))}}function ei(t,m){if(t&1&&_(0,Qt,7,3,"div",10)(1,Zt,1,2,"input",11),t&2){let e=l(2).$implicit,i=l(2);S((e==null||e.attribute_info==null?null:e.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function ti(t,m){if(t&1&&d(0,"datepicker",9),t&2){let e=l(2).$implicit;p("formControlName",e.attribute_id)}}function ii(t,m){if(t&1&&_(0,qt,1,2,"input",8)(1,ei,2,1)(2,ti,1,1,"datepicker",9),t&2){let e,i=l().$implicit,n=l(2);S((e=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===n.validationType.VALIDATOR_STRING_TYPE?0:e===n.validationType.VALIDATOR_FLOAT_TYPE?1:e===n.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function ni(t,m){if(t&1&&d(0,"ng-select",7),t&2){let e=l().$implicit;p("formControlName",e.attribute_id)("items",e.attribute_value_list?e.attribute_value_list:he(3,Ve))("placeholder","Pilih "+(e==null?null:e.name))}}function oi(t,m){if(t&1&&d(0,"ng-select",7),t&2){let e=l().$implicit;p("formControlName",e.attribute_id)("items",e.attribute_value_list?e.attribute_value_list:he(3,Ve))("placeholder","Pilih "+(e==null?null:e.name))}}function ri(t,m){if(t&1&&(s(0,"div",3)(1,"div",4),_(2,Kt,2,0,"span",5),s(3,"span"),f(4),a()(),_(5,Jt,1,5,"ng-select",6)(6,ii,3,1)(7,ni,1,4,"ng-select",7)(8,oi,1,4,"ng-select",7),a()),t&2){let e,i=m.$implicit,n=l(2);c(2),S(i.mandatory?2:-1),c(2),Q(" ",i==null?null:i.name," "),c(),S((e=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===n.inputType.MULTI_COMBO_BOX?5:e===n.inputType.FREE_TEXT_FILED?6:e===n.inputType.SINGLE_COMBO_BOX?7:8)}}function ai(t,m){if(t&1&&(N(0),s(1,"form",1)(2,"div",2),L(3,ri,9,3,"div",3,B),a()(),w()),t&2){let e=m.ngIf,i=l();c(),p("formGroup",i.form),c(2),R(e)}}var wt=(()=>{class t{constructor(){this.formCategoryService=u(we),this.attributesChanges=new D,this.inputType=z,this.formatType=le,this.validationType=ce}ngOnChanges(){h.IsNotEmpty(this.categoryId)&&h.IsNotEmpty(this.channelId)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:this.categoryId,channelId:this.channelId,channelType:this.channelType}).pipe(U(e=>{this.form=this.formCategoryService.createFormGroup(e),this.listenToFormChange(e)}),te(1)))}listenToFormChange(e){let i=[];this.formSubscription=this.form.valueChanges.subscribe(n=>{i=this.formCategoryService.getFilteredAttributes(e,n),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["shopee-attribute-form"]],inputs:{channelType:"channelType",categoryId:"categoryId",channelId:"channelId",channelProductUpload:"channelProductUpload"},outputs:{attributesChanges:"attributesChanges"},features:[F([we]),O],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","value_id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","value_id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"],[1,"attribute-datepicker",3,"formControlName"],[1,"d-flex","align-items-center",3,"formGroupName"],["type","text","autoNum","",1,"form-control",3,"formControlName","placeholder"],["formControlName","value","type","text","autoNum","",1,"form-control","me-1",2,"width","200px",3,"placeholder"],["name","unit","id","unit","formControlName","unit",1,"form-control"],["disabled","","selected","",3,"value"],[3,"value"]],template:function(i,n){i&1&&(_(0,ai,5,1,"ng-container",0),x(1,"async")),i&2&&p("ngIf",I(1,1,n.attributes$))},dependencies:[T,A,k,Y,H,G,X,it,nt,ne,tt,$,W,K,J,et,xt,Nt,Dt],styles:["input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:36px;border-radius:4px} datepicker.attribute-datepicker>mat-form-field.mat-mdc-form-field>.mat-mdc-text-field-wrapper{height:36px} datepicker.attribute-datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:11px!important;padding-bottom:11px!important;height:36px;min-height:36px!important} datepicker.attribute-datepicker mat-datepicker-toggle>button.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 36px}"]})}}return t})();var ee=function(t){return t.TIKTOK_SHOP="TIKTOK_SHOP",t.TOKOPEDIA="TOKOPEDIA",t}(ee||{});var Ue=(()=>{class t{constructor(){this.httpService=u(re),this.formBuilder=u(q),this.uploadProductService=u(Ie)}getAttributes(e,i){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:e},{key:"CategoryID",value:i}]).pipe(Ge(o=>this.uploadProductService.selectedProduct$.pipe(V(r=>(o=this.mappingAttributeSalesProperty(o,r),o)))))}mappingAttributeSalesProperty(e,i){let n=0;return e.filter(o=>(o.type=="SALES_PROPERTY"&&(n+=1),n>1?(n=0,!1):!0)).map(o=>(o.type=="SALES_PROPERTY"&&(o.name="Jenis Variant",o.is_multiple_selection=!1,o.is_required=this.isProductHasMoreVariant(i),o.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),o))}isProductHasMoreVariant(e){let i=!1,n=[];return e.forEach(o=>{o.Variants&&n.push(o.Variants.length)}),i=n.some(o=>o>1),i}createFormGroup(e){let i=this.formBuilder.group({}),n=[];return e.forEach(o=>{n=[],o.is_required&&n.push(me.required),i.addControl(o.id,this.formBuilder.control(null,n))}),i.addControl("listingPlatform",this.formBuilder.control([ee.TIKTOK_SHOP,ee.TOKOPEDIA],[me.required])),i}getFilteredAttributes(e,i){let n=JSON.parse(JSON.stringify(e)),o=Object.keys(i),r=n.filter(g=>o.findIndex(Pe=>parseInt(Pe)==g.id)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(e,i){return e.map(o=>(h.IsNotEmpty(o.values)?o.is_multiple_selection?o.values=o.values.filter(r=>i[o.id]?.includes(r.id)):o.values=o.values.filter(r=>r.id==i[o.id]):i[o.id]&&(o.values=[{id:null,name:i[o.id]}]),o)).filter(o=>o?.values?.length>0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac})}}return t})();function li(t,m){t&1&&(s(0,"small",6),f(1," Platform is required "),a())}function ci(t,m){t&1&&(s(0,"span",6),f(1,"*"),a())}function pi(t,m){if(t&1&&d(0,"ng-select",7),t&2){let e=l().$implicit;p("multiple",!0)("formControlName",e.id)("items",e.values)("placeholder","Pilih "+(e==null?null:e.name))}}function si(t,m){if(t&1&&d(0,"ng-select",8),t&2){let e=l().$implicit;p("formControlName",e.id)("items",e.values)("placeholder","Pilih "+(e==null?null:e.name))}}function mi(t,m){if(t&1&&d(0,"input",9),t&2){let e=l().$implicit;p("formControlName",e.id)("placeholder",e==null?null:e.name)}}function di(t,m){if(t&1&&(s(0,"small",6),f(1),a()),t&2){let e=l().$implicit;c(),Q(" ",e==null?null:e.name," is mandatory ")}}function ui(t,m){if(t&1&&(s(0,"div",3)(1,"div",4),_(2,ci,2,0,"span",6),s(3,"span"),f(4),a()(),_(5,pi,1,4,"ng-select",7)(6,si,1,3,"ng-select",8)(7,mi,1,2,"input",9)(8,di,2,1,"small",6),a()),t&2){let e=m.$implicit;c(2),S(e.is_required?2:-1),c(2),Q(" ",e==null?null:e.name," "),c(),S(e.is_multiple_selection?5:e.values!==null&&e.values.length>0?6:7),c(3),S(e.is_required?8:-1)}}function fi(t,m){if(t&1&&(N(0),s(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"span"),f(6," Platform Options"),a()(),d(7,"ng-select",5),_(8,li,2,0,"small",6),a(),L(9,ui,9,4,"div",3,B),a()(),w()),t&2){let e,i=m.ngIf,n=l();c(),p("formGroup",n.form),c(6),p("multiple",!0)("items",n.platformOptions)("clearable",!1),c(),S(!(n.form==null||(e=n.form.get("listingPlatform").errors)==null)&&e.required?8:-1),c(),R(i)}}var Vt=(()=>{class t{constructor(){this.tiktokAttributeFormService=u(Ue),this.platformChange=je({alias:"onPlatformChanges"}),this.formSubscription=new de,this.attributesChanges=new D,this.platformOptions=[{label:"TikTok Shop",value:ee.TIKTOK_SHOP},{label:"Tokopedia",value:ee.TOKOPEDIA}]}ngOnChanges(){h.IsNotEmpty(this.categoryId)&&h.IsNotEmpty(this.channelId)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(this.channelId,this.categoryId).pipe(V(e=>e.filter(i=>!(i.type=="PRODUCT_PROPERTY"&&(h.IsEmpty(i.values)||i.values?.length==0)&&i.is_customizable==!1))),U(e=>{this.form=this.tiktokAttributeFormService.createFormGroup(e),this.listenToFormChange(e)}),te(1)))}listenToFormChange(e){let i=[];this.form.valueChanges.pipe(se(this.formSubscription)).subscribe(n=>{delete n.listingPlatform,i=this.tiktokAttributeFormService.getFilteredAttributes(e,n),this.attributesChanges.emit(i)}),this.form.get("listingPlatform").valueChanges.pipe(Ye(this.form.get("listingPlatform").value),se(this.formSubscription)).subscribe(n=>{this.platformChange.emit(n)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["tiktok-attribute-form"]],inputs:{channelId:"channelId",categoryId:"categoryId"},outputs:{platformChange:"onPlatformChanges",attributesChanges:"attributesChanges"},features:[F([Ue]),O],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","listingPlatform","bindLabel","label","bindValue","value","placeholder","Platform Options",3,"multiple","items","clearable"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(i,n){i&1&&(_(0,fi,11,5,"ng-container",0),x(1,"async")),i&2&&p("ngIf",I(1,1,n.attributes$))},dependencies:[T,A,k,Y,H,G,X,ne,$,W,K,J,oe],encapsulation:2})}}return t})();var Be=(()=>{class t{constructor(){this.woocommerceUploadService=u(xe)}getAttributes(e,i){return this.woocommerceUploadService.getAttributes(e,i).pipe(V(n=>n.map(o=>({key:o.name,label:o.name}))))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac})}}return t})();var Ut=(()=>{class t{constructor(){this.wooAttributeFormService=u(Be),this.channelId=Me(),this.categoryId=Me(),this.attributesChanges=new D}ngOnChanges(){h.IsNotEmpty(this.categoryId())&&h.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(e){this.attributesChanges.emit([e.key])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[F([Be]),O],decls:6,vars:3,consts:[[1,"row"],[1,"col-6"],[1,"mb-1"],["bindLabel","label","bindValue","id","placeholder","Pilih Atribut",3,"change","items"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),f(3,"Atribut"),a(),s(4,"ng-select",3),x(5,"async"),y("change",function(r){return n.onSelectAttribute(r)}),a()()()),i&2&&(c(4),p("items",I(5,1,n.attributes$)))},dependencies:[T,k,oe,Y,H,G],encapsulation:2})}}return t})();var Le=(()=>{class t{constructor(){this.httpService=u(re),this.formBuilder=u(q)}getAttributes(e,i){return this.httpService.get("api/product/tokopedia/GetAttributes",[{key:"ID",value:e},{key:"CategoryID",value:i}]).pipe(V(o=>o))}createFormGroup(e){let i=this.formBuilder.group({});return e.forEach(n=>{i.addControl(n.variant,this.formBuilder.control(null))}),i}convertAttributes(e={}){return Object.values(e).filter(n=>n!==null).map(n=>JSON.stringify(n))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac})}}return t})();function _i(t,m){if(t&1&&(s(0,"div",3)(1,"div",4),f(2),a(),d(3,"ng-select",5),a()),t&2){let e=m.$implicit;c(2),Q(" ",e==null?null:e.variant," "),c(),p("formControlName",e.variant)("items",e.values)("placeholder","Pilih "+(e==null?null:e.variant))}}function hi(t,m){if(t&1&&(N(0),s(1,"form",1)(2,"div",2),L(3,_i,4,4,"div",3,B),a()(),w()),t&2){let e=m.ngIf,i=l();c(),p("formGroup",i.form),c(2),R(e)}}var Bt=(()=>{class t{constructor(){this.tokpedAttrFormService=u(Le),this.attributesChanges=new D}ngOnInit(){}ngOnChanges(e){h.IsNotEmpty(this.categoryId)&&h.IsNotEmpty(this.channelId)&&(this.attributes$=this.tokpedAttrFormService.getAttributes(this.channelId,this.categoryId).pipe(U(i=>{this.form=this.tokpedAttrFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){let e=[];this.formSubscription=this.form.valueChanges.subscribe(i=>{e=this.tokpedAttrFormService.convertAttributes(i),this.attributesChanges.emit(e)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["tokopedia-attribute-form"]],inputs:{channelId:"channelId",categoryId:"categoryId"},outputs:{attributesChanges:"attributesChanges"},features:[F([Le]),O],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"]],template:function(i,n){i&1&&(_(0,hi,5,1,"ng-container",0),x(1,"async")),i&2&&p("ngIf",I(1,1,n.attributes$))},dependencies:[T,A,k,Y,H,G,X,$,W,K,J],encapsulation:2})}}return t})();var Re=(()=>{class t{constructor(){this.httpService=u(re),this.formBuilder=u(q)}getAttributes(e){return this.httpService.get("api/product/shopify/GetAttributes",[{key:"ID",value:e}]).pipe(U(n=>(n.Options.StatusOptions=n.Options.Status.map(o=>({id:o,name:o})),n)))}createFormGroup(e){let i=this.formBuilder.group({});return Object.keys(e.Attribute).forEach(o=>{i.addControl(o,this.formBuilder.control(null))}),i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=M({token:t,factory:t.\u0275fac})}}return t})();function gi(t,m){if(t&1&&(N(0),s(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4),f(5," Brand "),a(),d(6,"input",5),a(),s(7,"div",6)(8,"div",4),f(9," Product Type "),a(),d(10,"input",7),a(),s(11,"div",6)(12,"div",4),f(13," Status "),a(),d(14,"ng-select",8),a()()(),w()),t&2){let e=m.ngIf,i=l();c(),p("formGroup",i.form),c(13),p("items",e.Options.StatusOptions)}}var Lt=(()=>{class t{constructor(){this.attributesChanges=new D,this.shopifyFormService=u(Re)}ngOnChanges(e){e.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId).pipe(U(i=>{this.form=this.shopifyFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe(He(500)).subscribe(e=>{this.attributesChanges.emit([e])})}ngOnDestroy(){this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["shopify-attribute-form"]],inputs:{channelId:"channelId"},outputs:{attributesChanges:"attributesChanges"},features:[F([Re]),O],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","Brand","type","text","placeholder","brand",1,"form-control"],[1,"col-6"],["formControlName","ProductType","type","text","placeholder","Product Type",1,"form-control"],["formControlName","Status","bindLabel","name","bindValue","id","placeholder","Status",3,"items"]],template:function(i,n){i&1&&(_(0,gi,15,2,"ng-container",0),x(1,"async")),i&2&&p("ngIf",I(1,1,n.attributes$))},dependencies:[T,A,k,G,X,ne,$,W,K,J,Y,H],encapsulation:2})}}return t})();function Ci(t,m){if(t&1&&(s(0,"div",6),d(1,"app-product-card",9),a()),t&2){let e=m.$implicit;c(),p("productId",e==null?null:e.ID)("title",e==null?null:e.Name)("image",e==null?null:e.ThumbnailUrl)("description",(e==null||e.Variants==null?null:e.Variants.length)>1?(e==null||e.Variants==null?null:e.Variants.length)+" Variants":null)("imageForZoom",e==null?null:e.ImageUrl)("code",e==null||e.Variants[0]==null?null:e.Variants[0].Code)("showFooter",!1)}}function bi(t,m){if(t&1){let e=E();N(0),s(1,"mat-checkbox",21),qe("ngModelChange",function(n){C(e);let o=l().$implicit;return Je(o.selected,n)||(o.selected=n),b(n)}),y("ngModelChange",function(){let n=C(e).ngIf,o=l(),r=o.$implicit,g=o.$index,pe=l();return b(pe.onSelectChannel(r,g,n))}),a(),w()}if(t&2){let e=l().$implicit;c(),Ke("ngModel",e.selected)}}function yi(t,m){if(t&1&&(s(0,"div",18),d(1,"input",22),a()),t&2){let e=l().$implicit,i=l();p("matTooltip",e.type==i.channelType.Shopify||e.type==i.channelType.ShopifyV2?"Cannot change category, please change category in admin.shopify.com":e.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function vi(t,m){if(t&1){let e=E();s(0,"app-channel-category-select",23),y("selectedCategory",function(n){C(e);let o=l().$index,r=l();return b(r.onCategoryChange(o,n))}),a()}if(t&2){let e=l().$implicit,i=l();p("disabled",!e.selected||e.selected&&e.type==i.channelType.Lazada)("channelId",e.id)("channelType",e.type)("categoryId",e.categoryId)}}function Ti(t,m){if(t&1){let e=E();s(0,"shopee-attribute-form",27),y("attributesChanges",function(n){C(e);let o=l(2).$index,r=l();return b(r.onAttributesChange(o,n))}),a()}if(t&2){let e=l(2).$implicit;p("categoryId",e.categoryId)("channelId",e.id)("channelType",e.type)}}function xi(t,m){if(t&1){let e=E();s(0,"tiktok-attribute-form",28),y("attributesChanges",function(n){C(e);let o=l(2).$index,r=l();return b(r.onAttributesChange(o,n))})("onPlatformChanges",function(n){C(e);let o=l(2).$index,r=l();return b(r.onPlatformChange(o,n))}),a()}if(t&2){let e=l(2).$implicit;p("categoryId",e.categoryId)("channelId",e.id)}}function Ii(t,m){if(t&1){let e=E();s(0,"wooocommerce-attribute-form",29),y("attributesChanges",function(n){C(e);let o=l(2).$index,r=l();return b(r.onAttributesChange(o,n))}),a()}if(t&2){let e=l(2).$implicit;p("categoryId",e.categoryId)("channelId",e.id)}}function Si(t,m){if(t&1){let e=E();s(0,"tokopedia-attribute-form",29),y("attributesChanges",function(n){C(e);let o=l(2).$index,r=l();return b(r.onAttributesChange(o,n))}),a()}if(t&2){let e=l(2).$implicit;p("categoryId",e.categoryId)("channelId",e.id)}}function Fi(t,m){if(t&1&&(s(0,"div",20)(1,"div",24),_(2,Ti,1,3,"shopee-attribute-form",25)(3,xi,1,2,"tiktok-attribute-form",26)(4,Ii,1,2,"wooocommerce-attribute-form",26)(5,Si,1,2,"tokopedia-attribute-form",26),a()()),t&2){let e,i=l().$implicit,n=l();c(2),S((e=i.type)===n.channelType.Shopee?2:e===n.channelType.Tiktok?3:e===n.channelType.WooCommerce?4:e===n.channelType.Tokopedia?5:-1)}}function Ai(t,m){if(t&1){let e=E();s(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",30),y("attributesChanges",function(n){C(e);let o=l().$index,r=l();return b(r.onAttributesChange(o,n))}),a()()()}if(t&2){let e=l().$implicit;c(2),p("channelId",e.id)}}function ki(t,m){if(t&1&&(s(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),_(6,bi,2,1,"ng-container",14),x(7,"async"),a(),s(8,"div"),d(9,"app-channel-logo",15),a(),s(10,"div",16)(11,"span"),f(12),a()()()(),s(13,"div",12)(14,"div",17),_(15,yi,2,1,"div",18)(16,vi,1,4,"app-channel-category-select",19),a()()(),_(17,Fi,6,1,"div",20)(18,Ai,3,1,"div",20),a()()),t&2){let e=m.$implicit,i=l();c(6),p("ngIf",I(7,8,i.defaultCategories$)),c(3),p("typeId",e.type)("showChannelName",!1),c(),p("matTooltip",e.name)("matTooltipShowDelay",2500),c(2),ie(e.name),c(3),S(e.type==i.channelType.Shopify||e.type==i.channelType.Plugo||e.type==i.channelType.ShopifyV2?15:16),c(2),S(e.categoryId&&i.channelType.Lazada!=e.type&&e.selected?17:(i.channelType.Shopify==e.type||e.type==i.channelType.ShopifyV2)&&e.selected?18:-1)}}var Ar=(()=>{class t{constructor(){this.toastr=u(ot),this.uploadProductService=u(Ie),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=De,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(te(1))}onCategoryChange(e,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==e&&(o.categoryId=i,o.attributes=[]),o)))}onPlatformChange(e,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==e&&(o.listing_platforms=i),o)))}onAttributesChange(e,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==e&&(o.attributes=i),o)))}tiktokPlatformChanges(e,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==e&&(o.listing_platforms=i),o)))}onSelectChannel(e,i,n){this.channelProductUploads.update(o=>o.map((r,g)=>{if(g==i&&e.selected){let pe=this.findCategoryByChannelId(e.id,n);r.categoryId=pe?.DefaultCategoryID}return g==i&&!e.selected&&(r.categoryId=null),r}))}findCategoryByChannelId(e,i){return i.find(n=>n.ID===e)}onUploadProduct(){if(this.checkTiktokPlatform()==!1){this.toastr.error("Please select at least one platform for TikTok channel","Platform is Required");return}this.uploadProductService.onUploadProduct(this.channelProductUploads())}checkTiktokPlatform(){return this.channelProductUploads().every(i=>i.type==De.Tiktok&&h.IsNotEmpty(i?.categoryId)?i.listing_platforms.length>0:!0)}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["app-product-upload"]],features:[F([Te,ht,gt,xe])],decls:17,vars:5,consts:[["headerTitle","Upload Product To Channel",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-upload"],[1,"container-fluid","mt-6"],[1,"ps-3","mt-8","pb-5","fw-medium"],[1,"row","mb-10","ps-3"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"ps-3","mb-8","border-bottom","pb-5","fw-medium"],[1,"row","mb-6"],[3,"productId","title","image","description","imageForZoom","code","showFooter"],[1,"col-12"],[1,"row"],[1,"col-3"],[1,"d-flex","align-items-center"],[4,"ngIf"],[3,"typeId","showChannelName"],[2,"overflow","hidden","text-overflow","ellipsis","white-space","nowrap",3,"matTooltip","matTooltipShowDelay"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[3,"disabled","channelId","channelType","categoryId"],[1,"row","my-3"],["color","primary",1,"example-margin",3,"ngModelChange","ngModel"],["disabled","","type","text","placeholder","Category Unavailable",1,"form-control","rounded-1",2,"height","35px"],[3,"selectedCategory","disabled","channelId","channelType","categoryId"],[1,"col-12","ps-11"],[3,"categoryId","channelId","channelType"],[3,"categoryId","channelId"],[3,"attributesChanges","categoryId","channelId","channelType"],[3,"attributesChanges","onPlatformChanges","categoryId","channelId"],[3,"attributesChanges","categoryId","channelId"],[3,"attributesChanges","channelId"]],template:function(i,n){if(i&1&&(s(0,"mainpanel",0)(1,"actions")(2,"button",1),y("click",function(){return n.onUploadProduct()}),d(3,"i",2),f(4," Upload "),a()(),s(5,"content")(6,"div",3)(7,"h3",4),f(8,"Product To Upload"),a(),s(9,"div",5),L(10,Ci,2,7,"div",6,B),x(12,"async"),a(),s(13,"h3",7),f(14,"Channel To Upload"),a(),L(15,ki,19,10,"div",8,B),a()()()),i&2){let o;p("hideSearchBox",!0)("hideSearchDropdown",!0),c(2),p("disabled",((o=n.channelProductUploads())==null?null:o.length)==0),c(8),R(I(12,3,n.selectedProducts$)),c(5),R(n.channelProductUploads())}},dependencies:[T,A,k,St,ct,lt,At,Ft,pt,oe,$,Ze,at,rt,Vt,Ut,Bt,Lt,Ct,Et,wt],encapsulation:2})}}return t})();export{Ar as ProductUploadComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ie,b as oe}from"./chunk-
|
|
1
|
+
import{a as ie,b as oe}from"./chunk-PGP3WHIS.js";import{a as ee,b as te}from"./chunk-OXWPLJEW.js";import{na as Z}from"./chunk-RC5PUUVM.js";import{e as Q}from"./chunk-WN5DZGA4.js";import{b as g,c as r}from"./chunk-RXQX7567.js";import{A as K,a as H,h as J,m as $}from"./chunk-5PS6ZS3N.js";import{r as X,s as Y}from"./chunk-MFQQEEHJ.js";import{i as R,j as U,n as q}from"./chunk-FXQKRJWU.js";import{$c as G,Fc as L,Gb as A,Gc as x,Ic as V,Ka as F,Kc as D,Lc as P,Mb as m,Mc as z,Qc as W,Ra as b,Yb as u,Z as S,aa as p,ad as j,cd as B,dc as M,ea as s,g as c,ia as k,ic as y,ja as I,jc as _,nc as w,oc as O,pa as f,q as l,rb as T,tc as E,uc as n,xa as N,ya as C,za as h}from"./chunk-OJMQBH6T.js";var ae=(()=>{class o{constructor(){this.httpService=f(Q),this.shopeeCategories=new c({data:[],isFirstLoad:!1}),this.tiktokCategories=new c({data:[],isFirstLoad:!1}),this.lazadaCategories=new c({data:[],isFirstLoad:!1}),this.tokopediaCategories=new c({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new c({data:[],isFirstLoad:!1})}getCategories(e,i){switch(e){case g.Shopee:return this.shopeeCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getShopeeCategories(i)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTiktokCategories(i)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getLazadaCategories(i)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTokopediaCategories(i)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getWooCommerceCategories(i)));default:return l([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.shopeeCategories.next(a)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tiktokCategories.next(a)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.lazadaCategories.next(a)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tokopediaCategories.next(a)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.wooCommerceCategories.next(a)}))}searchByIdWithParentDFS(e,i){let t=[...e];for(;t.length>0;){let a=t.pop();if(a.id===JSON.stringify(i))return a;if(a.children&&a.children.length>0)for(let v of a.children)v.parent=a,t.push(v)}return null}searchSelectAbleNode(e){let i=null;if(e.selectable)return e;let t=e.children?e.children:[];if(t.length==0)return e;for(let a of t){if(a.children.length==0&&a.selectable)return a;if(i=this.searchSelectAbleNode(a),i)return i}return i}generateCategoryLabel(e){let i="";return e?i=r.getLabelPathTree(e):i="Select a Category",i}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=I({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function ne(o,d){o&1&&w(0)}function se(o,d){if(o&1&&(y(0,"p-floatLabel",1),m(1,ne,1,0,"ng-container",2),y(2,"label",3),x(3,"Category"),_()()),o&2){n();let e=L(3);T(),u("ngTemplateOutlet",e)}}function le(o,d){o&1&&w(0)}function ce(o,d){if(o&1&&m(0,le,1,0,"ng-container",2),o&2){n();let e=L(3);u("ngTemplateOutlet",e)}}function pe(o,d){if(o&1&&(y(0,"div",6),x(1),_()),o&2){let e=n(2);u("matTooltip",e.selectedCategoryLabel()),T(),V(" ",e.selectedCategoryLabel()," ")}}function ge(o,d){if(o&1){let e=O();y(0,"p-treeSelect",4),G(1,"async"),z("ngModelChange",function(t){C(e);let a=n();return P(a.selectedNode,t)||(a.selectedNode=t),h(t)}),E("click",function(){C(e);let t=n();return h(t.onClickSelect())})("onNodeSelect",function(t){C(e);let a=n();return h(a.onNodeSelect(t))})("onClear",function(){C(e);let t=n();return h(t.onNodeUnselect())}),m(2,pe,2,2,"ng-template",5),_()}if(o&2){let e=n();D("ngModel",e.selectedNode),u("filter",!0)("options",j(1,5,e.categories$))("showClear",e.showClear)("disabled",e.disabled)}}var Pe=(()=>{class o{constructor(){this.categoryService=f(ae),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new F,this.selectedCategoryLabel=b("Select a Category"),this.selectedNode=b(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let i=e?.categoryId?.previousValue,t=e?.categoryId?.currentValue;r.IsEmpty(i)&&r.IsNotEmpty(t)&&this.initCategories(),r.IsEmpty(t)&&r.IsNotEmpty(i)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(s(e=>this.setDefaultCategory(e)),S(1))}setDefaultCategory(e){try{let i=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);i&&(this.generateCategoryLabel(i),this.selectedNode.set(i))}catch(i){console.error(i)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(S(1)))}onNodeSelect(e){let i=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(r.getLabelPathTree(i));let t=parseInt(i.id);this.onChange(t),this.selectedCategory.emit(t)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(r.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){r.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275cmp=A({type:o,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},features:[W([{provide:H,useExisting:k(()=>o),multi:!0}]),N],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&m(0,se,4,1,"p-floatLabel",1)(1,ce,1,1,"ng-container")(2,ge,3,7,"ng-template",null,0,B),i&2&&M(t.showLabel?0:1)},dependencies:[q,R,U,oe,ie,Z,Y,X,K,J,$,te,ee],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})}}return o})();export{ae as a,Pe as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as G}from"./chunk-CO5XZENC.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as F}from"./chunk-CGOB6Y3X.js";import{e as j}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import{m as H,n as J}from"./chunk-HJXYT6MI.js";import{A as R,c as B,h as W,m as I}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as P,l as k,n as D}from"./chunk-FXQKRJWU.js";import{$c as b,Gb as S,Gc as i,Hc as T,Kc as g,Lc as f,Mb as x,Mc as C,Nc as V,Oc as O,Pc as _,Ra as u,Yb as w,Z as y,ad as v,dc as M,ic as e,jc as t,kc as L,oc as A,pa as E,rb as d,tc as h,uc as N,ya as s,za as c}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(n,U){if(n&1&&(e(0,"pre",21),i(1),b(2,"json"),t()),n&2){N();let l=_(25);d(),T(v(2,1,l))}}function q(n,U){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var de=(()=>{class n{constructor(){this.httpService=E(j),this.selectedChannel=u(null),this.orderNumber=u(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(F.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),alert("Copied to clipboard!")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-escrow-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,o){if(p&1){let a=A();e(0,"mainpanel",0)(1,"actions")(2,"button",1),h("click",function(){return s(a),c(o.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),C("ngModelChange",function(r){return s(a),f(o.selectedChannel,r)||(o.selectedChannel=r),c(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),C("ngModelChange",function(r){return s(a),f(o.orderNumber,r)||(o.orderNumber=r),c(r)}),t()()()()(),V(25),b(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),h("click",function(){s(a);let r=_(25);return c(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(p&2){w("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),g("ngModel",o.selectedChannel),d(8),g("ngModel",o.orderNumber),d();let a=O(v(26,6,o.escrowLog$));d(8),w("disabled",!a),d(5),M(a?38:39)}},dependencies:[D,P,k,R,B,W,I,J,H,G],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]})}}return n})();export{de as EscrowApiComponent};
|