PageSourceSearch

https://joinqatch.com/8354.8478b301e2f7f05c.js

js joinqatch.com collected 2026-09-28 05:50:31 UTC 22,182 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[8354],{8354:(Ne,b,p)=>{p.r(b),p.d(b,{HSS_UIKIT_SHARED_MODULE:()=>Ie,MetadataModule:()=>Te});var _=p(5485),r=p(496),u=p(9136),d=p(6280),h=p(7799),c=p(316),S=p(5079),C=p(9204),a=p(7659);const I=[{fieldId:"brandName",label:"Name",type:a.Q0.textinput,validators:[r.k0.required,r.k0.maxLength(100),r.k0.minLength(2)]},{fieldId:"alias",label:"Alias",type:a.Q0.textinput,validators:[r.k0.maxLength(100),r.k0.minLength(2)]},{fieldId:"notes",label:"Notes",type:a.Q0.textarea,validators:[r.k0.maxLength(1e3),r.k0.minLength(2)]}],T=[{key:"brandId",label:"Id",style:"min-width:12rem",hasSorting:!0,hasFilter:!0,fixed:!0,sortOrder:-1},{key:"brandName",label:"Name",style:"min-width:15rem;max-width:20rem;",hasSorting:!0,hasFilter:!1},{key:"notes",label:"Notes",style:"min-width:15rem;max-width:20rem;",hasSorting:!0,hasFilter:!1},{key:"alias",label:"Alias",style:"min-width:15rem;max-width:20rem;",hasSorting:!0,hasFilter:!1},{key:"action",label:"Actions",hasCenter:!0,hasSorting:!1,hasFilter:!1}];var y=p(4924),w=p(6227),e=p(8559),k=p(8659);const N=["dt"],D=["filter"],B=()=>({label:"Metadata"}),j=()=>({label:"Brands"}),L=(n,l)=>[n,l];function O(n,l){if(1&n&&(e.j41(0,"th",11),e.nrm(1,"uikit-table-column",12),e.k0s()),2&n){const t=l.$implicit;e.Aen(t.style),e.Y8G("pSortableColumnDisabled",!t.hasSorting)("pSortableColumn",!1===t.hasSorting?null:t.sortKey||t.remoteKey||t.key),e.R7$(),e.Y8G("column",t)}}function $(n,l){if(1&n&&(e.j41(0,"tr"),e.DNE(1,O,2,5,"th",10),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngForOf",t.filteredColumns)}}function X(n,l){if(1&n){const t=e.RV6();e.j41(0,"uikit-table-actions",18),e.bIt("onOpenMenu",function(){e.eBV(t);const i=e.XpG(3).$implicit,s=e.XpG();return e.Njj(s.selectedRow=i)}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("actions",t.tableActions)("selectedRow",t.selectedRow)}}function Y(n,l){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(2).$implicit;e.R7$(),e.SpI(" ",o[t.key]," ")}}function E(n,l){if(1&n&&(e.j41(0,"td"),e.qex(1,15),e.DNE(2,X,1,2,"uikit-table-actions",16)(3,Y,2,1,"span",17),e.bVm(),e.k0s()),2&n){const t=l.$implicit;e.Aen(t.style),e.R7$(),e.Y8G("ngSwitch",t.key),e.R7$(),e.Y8G("ngSwitchCase","action")}}function x(n,l){if(1&n&&(e.j41(0,"tr"),e.DNE(1,E,4,4,"td",14),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t.filteredColumns)}}function M(n,l){1&n&&(e.j41(0,"td"),e.nrm(1,"uikit-skeleton"),e.k0s())}function A(n,l){if(1&n&&(e.j41(0,"tr"),e.DNE(1,M,2,0,"td",19),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t.filteredColumns)}}function P(n,l){if(1&n&&e.DNE(0,x,2,1,"tr",13)(1,A,2,1,"tr",13),2&n){const t=e.XpG();e.Y8G("ngIf",!t.loading),e.R7$(),e.Y8G("ngIf",t.loading)}}function U(n,l){if(1&n&&e.nrm(0,"uikit-empty-state",21),2&n){const t=e.XpG(2);e.Y8G("message",t.emptyMessage)}}function V(n,l){if(1&n&&e.DNE(0,U,1,1,"uikit-empty-state",20),2&n){const t=e.XpG();e.Y8G("ngIf",!t.loading)}}function K(n,l){if(1&n&&e.EFF(0),2&n){const t=e.XpG();e.SpI(" Total Records : ",t.totalRecords," ")}}function Q(n,l){if(1&n){const t=e.RV6();e.j41(0,"brand-form",22),e.bIt("onClose",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onCloseForm(i))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("isNew",!t.selectedRow)("formData",t.selectedRow)}}let R=(()=>{class n extends y.s{constructor(t,o){super(t),this.activatedRoute=t,this.brandService=o,this.tableKey="brands",this.headerButtons=(n=>[{label:"Add Brands",icon:"pi pi-plus-circle",click:n.openForm.bind(n,!0)}])(this),this.onInit()}fetch(t){this.afterFetch(this.brandService.list(t))}afterPermissionApply(){return this.tableActions.filter(t=>"Duplicate"!==t.label&&"View"!==t.label)}setColumns(){return(0,C.A)(function*(){return(0,w.cloneDeep)(T)})()}clone(){throw new Error("Operation not supported")}delete(){return this.brandService.delete(this.selectedRow.brandId)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.nX),e.rXU(k.m))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-brands"]],viewQuery:function(o,i){if(1&o&&(e.GBs(N,5),e.GBs(D,5)),2&o){let s;e.mGM(s=e.lsd())&&(i.table=s.first),e.mGM(s=e.lsd())&&(i.filter=s.first)}},features:[e.Vt3],decls:10,vars:23,consts:[[1,"layout-main"],[3,"items"],[1,"card","card-plain","mb-0","p-0"],[3,"onGlobalFilter","columnsChange","onResetColumns","buttons","columns","tableKey"],["styleClass","p-datatable-striped p-datatable-gridlines","dataKey","id","responsiveLayout","scroll",3,"onLazyLoad","totalRecords","value","lazy","rows","rowHover","paginator","showCurrentPageReport","showFirstLastIcon","pageLinks","rowsPerPageOptions","scrollable","stateKey","stateStorage"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["pTemplate","paginatorleft"],[3,"isNew","formData","onClose",4,"ngIf"],[3,"pSortableColumnDisabled","pSortableColumn","style",4,"ngFor","ngForOf"],[3,"pSortableColumnDisabled","pSortableColumn"],[3,"column"],[4,"ngIf"],[3,"style",4,"ngFor","ngForOf"],[3,"ngSwitch"],["class","flex justify-content-center",3,"actions","selectedRow","onOpenMenu",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"flex","justify-content-center",3,"onOpenMenu","actions","selectedRow"],[4,"ngFor","ngForOf"],[3,"message",4,"ngIf"],[3,"message"],[3,"onClose","isNew","formData"]],template:function(o,i){1&o&&(e.j41(0,"section",0),e.nrm(1,"uikit-breadcrumb",1),e.j41(2,"section",2)(3,"table-header",3),e.bIt("onGlobalFilter",function(m){return i.onGlobalFilter(m)})("columnsChange",function(m){return i.columnsConfigChange(m)})("onResetColumns",function(){return i.resetColumns()}),e.k0s(),e.j41(4,"p-table",4),e.bIt("onLazyLoad",function(m){return i.fetchList(m)}),e.DNE(5,$,2,1,"ng-template",5)(6,P,2,2,"ng-template",6)(7,V,1,1,"ng-template",7)(8,K,1,1,"ng-template",8),e.k0s()()(),e.DNE(9,Q,1,2,"brand-form",9)),2&o&&(e.R7$(),e.Y8G("items",e.l_i(20,L,e.lJ4(18,B),e.lJ4(19,j))),e.R7$(2),e.Y8G("buttons",i.headerButtons)("columns",i.columns)("tableKey",i.tableKey),e.R7$(),e.Y8G("totalRecords",i.totalRecords)("value",i.list)("lazy",!0)("rows",i.rowsPerPageOptions[0])("rowHover",!0)("paginator",!0)("showCurrentPageReport",null==i.paginatorData?null:i.paginatorData.showCurrentPageReport)("showFirstLastIcon",null==i.paginatorData?null:i.paginatorData.showFirstLastIcon)("pageLinks",null==i.paginatorData?null:i.paginatorData.pageLinks)("rowsPerPageOptions",i.rowsPerPageOptions)("scrollable",!0)("stateKey",i.getSessionKey())("stateStorage",i.stateStorage),e.R7$(5),e.Y8G("ngIf",i.showForm))}})}}return n})();const J=[{key:"retailerId",label:"Id",style:"min-width:8rem",hasSorting:!0,hasFilter:!0,fixed:!0,sortOrder:-1},{key:"retailerName",label:"Name",style:"min-width:12rem",hasSorting:!0,hasFilter:!0,fixed:!0},{key:"network",remoteKey:"affn.network_name",label:"Network",style:"min-width:12rem",hasSorting:!0,hasFilter:!1},{key:"affiliateRetailerId",label:"Affiliate Retailer Id",style:"min-width:14rem",hasSorting:!0,hasFilter:!1},{key:"commission",label:"Commission",style:"min-width:15rem",hasSorting:!0,hasFilter:!1},{key:"notes",label:"Notes",style:"min-width:10rem",hasSorting:!0,hasFilter:!1},{key:"logoImageUrl",label:"Logo",style:"min-width:12rem",hasSorting:!1,hasFilter:!1},{key:"firstLetter",label:"First Letter",style:"min-width:9rem",hasSorting:!0,hasFilter:!1},{key:"webOnly",label:"Web Only",style:"min-width:12rem",hasSorting:!0,hasFilter:!1},{key:"isPromoting",label:"Is Promoting",style:"min-width:12rem",hasSorting:!0,hasFilter:!1},{key:"alias",label:"Alias",style:"min-width:10rem",hasSorting:!0,hasFilter:!1},{key:"action",label:"Actions",hasCenter:!0,hasSorting:!1,hasFilter:!1}];var v=p(4337);const W=["dt"],q=["filter"],Z=()=>({label:"Metadata"}),ee=()=>({label:"Retailers"}),te=(n,l)=>[n,l];function ne(n,l){if(1&n&&(e.j41(0,"th",11),e.nrm(1,"uikit-table-column",12),e.k0s()),2&n){const t=l.$implicit;e.Aen(t.style),e.Y8G("pSortableColumnDisabled",!t.hasSorting)("pSortableColumn",!1===t.hasSorting?null:t.sortKey||t.remoteKey||t.key),e.R7$(),e.Y8G("column",t)}}function ie(n,l){if(1&n&&(e.j41(0,"tr"),e.DNE(1,ne,2,5,"th",10),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngForOf",t.filteredColumns)}}function oe(n,l){if(1&n&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3).$implicit;e.R7$(),e.SpI(" ",null==t||null==t.network?null:t.network.networkName," ")}}function ae(n,l){if(1&n&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3).$implicit;e.R7$(),e.SpI(" ",t.addUtm?"Yes":""," ")}}function le(n,l){if(1&n&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3).$implicit;e.R7$(),e.SpI(" ",t.webOnly?"Yes":""," ")}}function se(n,l){if(1&n&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3).$implicit;e.R7$(),e.SpI(" ",t.isPromoting?"Yes":""," ")}}function re(n,l){if(1&n&&(e.j41(0,"div",20),e.nrm(1,"img",21),e.k0s()),2&n){const t=e.XpG(3).$implicit;e.R7$(),e.Y8G("src",null==t?null:t.logoImageUrl,e.B4B)}}function me(n,l){if(1&n){const t=e.RV6();e.j41(0,"uikit-table-actions",22),e.bIt("onOpenMenu",function(){e.eBV(t);const i=e.XpG(3).$implicit,s=e.XpG();return e.Njj(s.selectedRow=i)}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("actions",t.tableActions)("selectedRow",t.selectedRow)}}function pe(n,l){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(2).$implicit;e.R7$(),e.SpI(" ",o[t.key]," ")}}function ce(n,l){if(1&n&&(e.j41(0,"td"),e.qex(1,15),e.DNE(2,oe,2,1,"div",16)(3,ae,2,1,"div",16)(4,le,2,1,"div",16)(5,se,2,1,"div",16)(6,re,2,1,"div",17)(7,me,1,2,"uikit-table-actions",18)(8,pe,2,1,"span",19),e.bVm(),e.k0s()),2&n){const t=l.$implicit;e.Aen(t.style),e.R7$(),e.Y8G("ngSwitch",t.key),e.R7$(),e.Y8G("ngSwitchCase","network"),e.R7$(),e.Y8G("ngSwitchCase","addUtm"),e.R7$(),e.Y8G("ngSwitchCase","webOnly"),e.R7$(),e.Y8G("ngSwitchCase","isPromoting"),e.R7$(),e.Y8G("ngSwitchCase","logoImageUrl"),e.R7$(),e.Y8G("ngSwitchCase","action")}}function _e(n,l){if(1&n&&(e.j41(0,"tr"),e.DNE(1,ce,9,9,"td",14),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t.filteredColumns)}}function ue(n,l){1&n&&(e.j41(0,"td"),e.nrm(1,"uikit-skeleton"),e.k0s())}function de(n,l){if(1&n&&(e.j41(0,"tr"),e.DNE(1,ue,2,0,"td",23),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t.filteredColumns)}}function fe(n,l){if(1&n&&e.DNE(0,_e,2,1,"tr",13)(1,de,2,1,"tr",13),2&n){const t=e.XpG();e.Y8G("ngIf",!t.loading),e.R7$(),e.Y8G("ngIf",t.loading)}}function ge(n,l){if(1&n&&e.nrm(0,"uikit-empty-state",25),2&n){const t=e.XpG(2);e.Y8G("message",t.emptyMessage)}}function he(n,l){if(1&n&&e.DNE(0,ge,1,1,"uikit-empty-state",24),2&n){const t=e.XpG();e.Y8G("ngIf",!t.loading)}}function be(n,l){if(1&n&&e.EFF(0),2&n){const t=e.XpG();e.SpI(" Total Records : ",t.totalRecords," ")}}function Ce(n,l){if(1&n){const t=e.RV6();e.j41(0,"retailer-form",26),e.bIt("onClose",function(i){e.eBV(t);const s=e.XpG();return e.Njj(s.onCloseForm(i))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("isNew",!t.selectedRow)("formData",t.selectedRow)}}let F=(()=>{class n extends y.s{constructor(t,o){super(t),this.activatedRoute=t,this.retailerService=o,this.tableKey="retailers",this.headerButtons=(n=>[{label:"Add Retailer",icon:"pi pi-plus-circle",click:n.openForm.bind(n,!0)}])(this),this.onInit()}fetch(t){this.afterFetch(this.retailerService.list(t))}afterPermissionApply(){return this.tableActions.filter(t=>"Duplicate"!==t.label&&"View"!==t.label)}setColumns(){return(0,C.A)(function*(){return(0,w.cloneDeep)(J)})()}clone(){throw new Error("Operation not supported")}delete(){return this.retailerService.delete(this.selectedRow.retailerId)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.nX),e.rXU(v.l))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-retailers"]],viewQuery:function(o,i){if(1&o&&(e.GBs(W,5),e.GBs(q,5)),2&o){let s;e.mGM(s=e.lsd())&&(i.table=s.first),e.mGM(s=e.lsd())&&(i.filter=s.first)}},features:[e.Vt3],decls:10,vars:23,consts:[[1,"layout-main"],[3,"items"],[1,"card","card-plain","mb-0","p-0"],[3,"onGlobalFilter","columnsChange","onResetColumns","buttons","columns","tableKey"],["styleClass","p-datatable-striped p-datatable-gridlines","dataKey","id","responsiveLayout","scroll",3,"onLazyLoad","totalRecords","value","lazy","rows","rowHover","paginator","showCurrentPageReport","showFirstLastIcon","pageLinks","rowsPerPageOptions","scrollable","stateKey","stateStorage"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["pTemplate","paginatorleft"],[3,"isNew","formData","onClose",4,"ngIf"],[3,"pSortableColumnDisabled","pSortableColumn","style",4,"ngFor","ngForOf"],[3,"pSortableColumnDisabled","pSortableColumn"],[3,"column"],[4,"ngIf"],[3,"style",4,"ngFor","ngForOf"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","d-flex align-items-center justify-content-center my-1 overflow-hidden",4,"ngSwitchCase"],["class","flex justify-content-center",3,"actions","selectedRow","onOpenMenu",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"d-flex","align-items-center","justify-content-center","my-1","overflow-hidden"],["alt","img","width","100%","height","100%",1,"",3,"src"],[1,"flex","justify-content-center",3,"onOpenMenu","actions","selectedRow"],[4,"ngFor","ngForOf"],[3,"message",4,"ngIf"],[3,"message"],[3,"onClose","isNew","formData"]],template:function(o,i){1&o&&(e.j41(0,"section",0),e.nrm(1,"uikit-breadcrumb",1),e.j41(2,"section",2)(3,"table-header",3),e.bIt("onGlobalFilter",function(m){return i.onGlobalFilter(m)})("columnsChange",function(m){return i.columnsConfigChange(m)})("onResetColumns",function(){return i.resetColumns()}),e.k0s(),e.j41(4,"p-table",4),e.bIt("onLazyLoad",function(m){return i.fetchList(m)}),e.DNE(5,ie,2,1,"ng-template",5)(6,fe,2,2,"ng-template",6)(7,he,1,1,"ng-template",7)(8,be,1,1,"ng-template",8),e.k0s()()(),e.DNE(9,Ce,1,2,"retailer-form",9)),2&o&&(e.R7$(),e.Y8G("items",e.l_i(20,te,e.lJ4(18,Z),e.lJ4(19,ee))),e.R7$(2),e.Y8G("buttons",i.headerButtons)("columns",i.columns)("tableKey",i.tableKey),e.R7$(),e.Y8G("totalRecords",i.totalRecords)("value",i.list)("lazy",!0)("rows",i.rowsPerPageOptions[0])("rowHover",!0)("paginator",!0)("showCurrentPageReport",null==i.paginatorData?null:i.paginatorData.showCurrentPageReport)("showFirstLastIcon",null==i.paginatorData?null:i.paginatorData.showFirstLastIcon)("pageLinks",null==i.paginatorData?null:i.paginatorData.pageLinks)("rowsPerPageOptions",i.rowsPerPageOptions)("scrollable",!0)("stateKey",i.getSessionKey())("stateStorage",i.stateStorage),e.R7$(5),e.Y8G("ngIf",i.showForm))}})}}return n})();var f=p(7780);const ye=()=>({width:"40vw"}),we=()=>
1({"1000px":"50vw","800px":"75vw","575px":"90vw"});function ke(n,l){if(1&n){const t=e.RV6();e.j41(0,"div",4)(1,"button",5),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.close())}),e.k0s(),e.j41(2,"button",6),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onSubmit())}),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(2),e.Mz_("label"," ",t.isNew?"Create":"Update",""),e.Y8G("loading",t.loading)("disabled",(null==t.uikitForm||null==t.uikitForm.form?null:t.uikitForm.form.invalid)||t.loading)}}let Re=(()=>{class n{constructor(t,o){this.toastService=t,this.brandService=o,this.isNew=!0,this.visible=!0,this.onClose=new e.bkB,this.loading=!1,this.formFields=I}onSubmit(){this.loading=!0,this.toastService.clear();let t=this.uikitForm?.form.getRawValue();(this.isNew?this.brandService.create(t):this.brandService.update(this.formData.brandId,t)).then(i=>{this.toastService.success({message:"Successfully "+(this.isNew?"Created":"Updated"),sticky:!1}),this.loading=!1,this.close(!0)}).catch(({message:i}
1)=>{this.loading=!1,this.toastService.warn({message:i,sticky:!1})})}close(t=!1){this.onClose.next(t),this.visible=!1}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(a.fw),e.rXU(k.m))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["brand-form"]],viewQuery:function(o,i){if(1&o&&e.GBs(a.q1,5),2&o){let s;e.mGM(s=e.lsd())&&(i.uikitForm=s.first)}},inputs:{formData:"formData",isNew:"isNew",visible:"visible"},outputs:{onClose:"onClose"},decls:4,vars:12,consts:[[3,"visibleChange","onHide","header","visible","breakpoints","modal"],[1,""],[3,"keyup.enter","isNew","fields","formData"],["pTemplate","footer"],[1,"flex","justify-content-end"],["pButton","","pRipple","","label"," Close",1,"p-button-outlined","mr-2",3,"click"],["pButton","","pRipple","",3,"click","loading","disabled","label"]],template:function(o,i){1&o&&(e.j41(0,"p-dialog",0),e.mxI("visibleChange",function(m){return e.DH7(i.visible,m)||(i.visible=m),m}),e.bIt("onHide",function(){return i.close()}),e.j41(1,"div",1)(2,"uikit-dform",2),e.bIt("keyup.enter",function(){return null!=i.uikitForm&&null!=i.uikitForm.form&&i.uikitForm.form.valid?i.onSubmit():""}),e.k0s()(),e.DNE(3,ke,3,4,"ng-template",3),e.k0s()),2&o&&(e.Aen(e.lJ4(10,ye)),e.Mz_("header","",i.isNew?"New":"Edit"," Brand"),e.R50("visible",i.visible),e.Y8G("breakpoints",e.lJ4(11,we))("modal",!0),e.R7$(2),e.Y8G("isNew",i.isNew)("fields",i.formFields)("formData",i.formData))},dependencies:[f.Ei,u._f,d.l,a.q1]})}}return n})();const ve=()=>({width:"50vw"}),Fe=()=>({"1100px":"70vw","800px":"75vw","575px":"90vw"});function Se(n,l){if(1&n){const t=e.RV6();e.j41(0,"div",3)(1,"button",4),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.close())}),e.k0s(),e.j41(2,"button",5),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onSubmit())}),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(2),e.Mz_("label"," ",t.isNew?"Create":"Update",""),e.Y8G("loading",t.loading)("disabled",(null==t.uikitForm||null==t.uikitForm.form?null:t.uikitForm.form.invalid)||t.loading)}}let Ge=(()=>{class n{constructor(t,o){this.toastService=t,this.retailerService=o,this.isNew=!0,this.visible=!0,this.onClose=new e.bkB,this.loading=!1,this.formFields=(n=>[{fieldId:"retailerName",label:"Name",type:a.Q0.textinput,validators:[r.k0.required,r.k0.maxLength(100),r.k0.minLength(2)]},{fieldId:"network",label:"Network",type:a.Q0.dropdown,settings:{options:[],optionValue:null,fetchOptions:n?.retailerService?.getAffiliateNetwork.bind(n?.retailerService),optionLabel:"networkName",dataKey:"networkId"},validators:[r.k0.required]},{fieldId:"affiliateRetailerId",label:"Affiliated Retailer Id",type:a.Q0.numberinput,numberinput:{prefix:"",min:1},validators:[]},{fieldId:"commission",label:"Commission",type:a.Q0.numberinput,numberinput:{prefix:"",min:1},validators:[]},{fieldId:"logoImageUrl",label:"Logo",type:a.Q0.textinput,validators:[r.k0.pattern("^(https?:\\/\\/)?([\\w\\-]+\\.)+[\\w\\-]+(\\/[^\\s]*)?$")]},{fieldId:"firstLetter",label:"First Letter",type:a.Q0.textinput,validators:[r.k0.maxLength(1),r.k0.minLength(1)]},{fieldId:"alias",label:"Alias",type:a.Q0.textinput,validators:[r.k0.minLength(2),r.k0.maxLength(100)]},{fieldId:"webOnly",label:"Web Only",type:a.Q0.toggle_switch,validators:[r.k0.required],toggleSwitch:{onLabel:" ",offLabel:"Web Only",onValue:"true",offValue:"false"},defaultValue:!1},{fieldId:"isPromoting",label:"Is Promoting",type:a.Q0.toggle_switch,toggleSwitch:{onLabel:" ",offLabel:"Is Promoting",onValue:"true",offValue:"false"},defaultValue:!1},{fieldId:"notes",label:"Notes",type:a.Q0.textarea,validators:[r.k0.minLength(2),r.k0.maxLength(1e3)]}])(this)}ngOnInit(){this.isNew||(this.formData={...this.formData,addUtm:this.formData.addUtm||!1,webOnly:this.formData.webOnly||!1})}onSubmit(){this.loading=!0,this.toastService.clear();let t=this.uikitForm?.form.getRawValue();(this.isNew?this.retailerService.create(t):this.retailerService.update(this.formData.retailerId,t)).then(i=>{this.toastService.success({message:"Successfully "+(this.isNew?"Created":"Updated"),sticky:!1}),this.loading=!1,this.close(!0)}).catch(({message:i})=>{this.loading=!1,this.toastService.warn({message:i,sticky:!1})})}close(t=!1){this.onClose.next(t),this.visible=!1}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(a.fw),e.rXU(v.l))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["retailer-form"]],viewQuery:function(o,i){if(1&o&&e.GBs(a.q1,5),2&o){let s;e.mGM(s=e.lsd())&&(i.uikitForm=s.first)}},inputs:{formData:"formData",isNew:"isNew",visible:"visible"},outputs:{onClose:"onClose"},decls:4,vars:12,consts:[[3,"visibleChange","onHide","header","visible","breakpoints","modal"],[3,"keyup.enter","isNew","fields","formData"],["pTemplate","footer"],[1,"flex","justify-content-end"],["pButton","","pRipple","","label"," Close",1,"p-button-outlined","mr-2",3,"click"],["pButton","","pRipple","",3,"click","loading","disabled","label"]],template:function(o,i){1&o&&(e.j41(0,"p-dialog",0),e.mxI("visibleChange",function(m){return e.DH7(i.visible,m)||(i.visible=m),m}),e.bIt("onHide",function(){return i.close()}),e.j41(1,"div")(2,"uikit-dform",1),e.bIt("keyup.enter",function(){return null!=i.uikitForm&&null!=i.uikitForm.form&&i.uikitForm.form.valid?i.onSubmit():""}),e.k0s()(),e.DNE(3,Se,3,4,"ng-template",2),e.k0s()),2&o&&(e.Aen(e.lJ4(10,ve)),e.Mz_("header","",i.isNew?"New":"Edit"," Retailer"),e.R50("visible",i.visible),e.Y8G("breakpoints",e.lJ4(11,Fe))("modal",!0),e.R7$(2),e.Y8G("isNew",
1i.isNew)("fields",i.formFields)("formData",i.formData))},dependencies:[f.Ei,u._f,d.l,a.q1],styles:["@media screen and (min-width: 600px){[_nghost-%COMP%]  uikit-dform form .uikit-dform-item:not(.form-control-notes):not(.form-control-webOnly):not(.form-control-addUtm){flex-basis:47%!important}[_nghost-%COMP%]  uikit-dform form .form-control-webOnly, [_nghost-%COMP%]  uikit-dform form .form-control-addUtm{flex-basis:20%!important}}"]})}}return n})();var g=p(9682);const Ie=[a.LI,_.bG,c.MD,g.z,a.Ro,a.rm,a.eT,a.Sw,a.jJ,r.YN,u.tm,d.P,a.q1];let Te=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({providers:[S.o3,a.fw],imports:[_.bG,c.MD,g.z,a.Ro,a.rm,a.eT,a.Sw,a.jJ,r.YN,u.tm,d.P,a.q1,h.iI.forChild([{path:"",redirectTo:"retailers",pathMatch:"full"},{path:"retailers",component:F,data:{title:"Retailers",featureCode:"RTLRS"}},{path:"brands",component:R,data:{title:"Brands",featureCode:"BRANDS"}}])]})}}return n})();e.wjB(F,function(){return[_.XI,f.Ei,_.Tg,c.Sq,c.bT,c.ux,c.e1,c.fG,g.z,a.Ro,a.rm,a.eT,a.Sw,a.jJ,Ge]},[]),e.wjB(R,function(){return[_.XI,f.Ei,_.Tg,c.Sq,c.bT,c.ux,c.e1,c.fG,g.z,a.Ro,a.rm,a.eT,a.Sw,a.jJ,Re]},[])}}]);
2//# sourceMappingURL=8354.8478b301e2f7f05c.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.