UNPKG

@lxlib/seed

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.

16 lines (14 loc) 49 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/platform-browser"),require("@lxlib/acl"),require("@lxlib/theme"),require("@lxlib/util"),require("@angular/common"),require("rxjs"),require("rxjs/operators"),require("@lxlib/seed/xlsx"),require("@angular/router"),require("ng-zorro-antd/table"),require("@angular/forms"),require("ng-zorro-antd/badge"),require("ng-zorro-antd/checkbox"),require("ng-zorro-antd/divider"),require("ng-zorro-antd/dropdown"),require("ng-zorro-antd/icon"),require("ng-zorro-antd/input"),require("ng-zorro-antd/menu"),require("ng-zorro-antd/popconfirm"),require("ng-zorro-antd/radio"),require("ng-zorro-antd/tag"),require("ng-zorro-antd/tooltip")):"function"==typeof define&&define.amd?define("@lxlib/seed/st",["exports","@angular/core","@angular/platform-browser","@lxlib/acl","@lxlib/theme","@lxlib/util","@angular/common","rxjs","rxjs/operators","@lxlib/seed/xlsx","@angular/router","ng-zorro-antd/table","@angular/forms","ng-zorro-antd/badge","ng-zorro-antd/checkbox","ng-zorro-antd/divider","ng-zorro-antd/dropdown","ng-zorro-antd/icon","ng-zorro-antd/input","ng-zorro-antd/menu","ng-zorro-antd/popconfirm","ng-zorro-antd/radio","ng-zorro-antd/tag","ng-zorro-antd/tooltip"],e):e(((t=t||self).lxlib=t.lxlib||{},t.lxlib.seed=t.lxlib.seed||{},t.lxlib.seed.st={}),t.ng.core,t.ng.platformBrowser,t.lxlib.acl,t.lxlib.theme,t.lxlib.util,t.ng.common,t.rxjs,t.rxjs.operators,t.lxlib.seed.xlsx,t.ng.router,t["ng-zorro-antd/table"],t.ng.forms,t["ng-zorro-antd/badge"],t["ng-zorro-antd/checkbox"],t["ng-zorro-antd/divider"],t["ng-zorro-antd/dropdown"],t["ng-zorro-antd/icon"],t["ng-zorro-antd/input"],t["ng-zorro-antd/menu"],t["ng-zorro-antd/popconfirm"],t["ng-zorro-antd/radio"],t["ng-zorro-antd/tag"],t["ng-zorro-antd/tooltip"])}(this,(function(t,e,n,r,i,o,a,l,c,s,p,u,d,f,h,g,m,y,b,x,v,_,z,w){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var C=function(){return(C=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function S(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function k(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function T(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function l(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}c((r=r.apply(t,e||[])).next())}))}function I(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}function O(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function M(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function N(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(M(arguments[e]));return t}var P=function(){function t(){this.titles={},this.rows={}}return t.prototype.add=function(t,e,n){this["title"===t?"titles":"rows"][e]=n},t.prototype.getTitle=function(t){return this.titles[t]},t.prototype.getRow=function(t){return this.rows[t]},t.decorators=[{type:e.Injectable}],t}();var D=function(){function t(t,e){this.ref=t,this.source=e}return t.prototype.ngOnInit=function(){this.source.add(this.type,this.id,this.ref)},t.decorators=[{type:e.Directive,args:[{selector:"[st-row]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef},{type:P,decorators:[{type:e.Host}]}]},t.propDecorators={id:[{type:e.Input,args:["st-row"]}],type:[{type:e.Input}]},t}();var E=function(){function t(){this.size="default",this.responsive=!0,this.responsiveHideHeaderFooter=!1,this.req={type:"page",method:"GET",allInBody:!1,lazyLoad:!1,reName:{pi:"pi",ps:"ps",skip:"skip",limit:"limit"}},this.res={reName:{list:["list"],total:["total"]}},this.page={front:!0,zeroIndexed:!1,position:"bottom",placement:"right",show:!0,showSize:!1,pageSizes:[10,20,30,40,50],showQuickJumper:!1,total:!0,toTop:!0,toTopOffset:100},this.singleSort=null,this.multiSort=null,this.modal={paramsName:"record",size:"lg",exact:!0},this.drawer={paramsName:"record",size:"md",footer:!0,footerHeight:55},this.pop={title:"确认删除吗?"},this.rowClickTime=200,this.btnIcon={type:"",theme:"outline",spin:!1},this.noIndex=1,this.expandRowByClick=!1,this.expandAccordion=!1,this.widthMode={type:"default",strictBehavior:"truncate"},this.virtualItemSize=54,this.virtualMaxBufferPx=200,this.virtualMinBufferPx=100,this.iifBehavior="hide"}return t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var B=function(){function t(t,e,n,r,i){this.dom=t,this.rowSource=e,this.acl=n,this.i18nSrv=r,this.cog=i}return t.prototype.fixPop=function(t,e){if(null!=t.pop&&!1!==t.pop){var n=C({},e);"string"==typeof t.pop?n.title=t.pop:"object"==typeof t.pop&&(n=C(C({},n),t.pop)),"function"!=typeof n.condition&&(n.condition=function(){return!1}),t.pop=n}else t.pop=!1},t.prototype.btnCoerce=function(t){var e,n;if(!t)return[];var r=[],i=this.cog,o=i.modal,a=i.drawer,l=i.pop,c=i.btnIcon;try{for(var s=O(t),p=s.next();!p.done;p=s.next()){var u=p.value;this.acl&&u.acl&&!this.acl.can(u.acl)||("modal"!==u.type&&"static"!==u.type||(null==u.modal||null==u.modal.component?(console.warn("[st] Should specify modal parameter"),u.type="none"):u.modal=C(C({paramsName:"record",size:"lg"},o),u.modal)),"drawer"===u.type&&(null==u.drawer||null==u.drawer.component?(console.warn("[st] Should specify drawer parameter"),u.type="none"):u.drawer=C(C({paramsName:"record",size:"lg"},a),u.drawer)),"del"===u.type&&void 0===u.pop&&(u.pop=!0),this.fixPop(u,l),u.icon&&(u.icon=C(C({},c),"string"==typeof u.icon?{type:u.icon}:u.icon)),u.children=u.children&&u.children.length>0?this.btnCoerce(u.children):[],u.i18n&&this.i18nSrv&&(u.text=this.i18nSrv.fanyi(u.i18n)),r.push(u))}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return this.btnCoerceIf(r),r},t.prototype.btnCoerceIf=function(t){var e,n;try{for(var r=O(t),i=r.next();!i.done;i=r.next()){var o=i.value;o.iif||(o.iif=function(){return!0}),o.iifBehavior=o.iifBehavior||this.cog.iifBehavior,o.children&&o.children.length>0?this.btnCoerceIf(o.children):o.children=[]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.fixedCoerce=function(t){var e=function(t,e){return t+ +e.width.toString().replace("px","")};t.filter((function(t){return t.fixed&&"left"===t.fixed&&t.width})).forEach((function(n,r){return n._left=t.slice(0,r).reduce(e,0)+"px"})),t.filter((function(t){return t.fixed&&"right"===t.fixed&&t.width})).reverse().forEach((function(n,r){return n._right=(r>0?t.slice(-r).reduce(e,0):0)+"px"}))},t.prototype.sortCoerce=function(t){var e=this.fixCoerce(t);return e.reName=C(C({},this.cog.sortReName),e.reName),e},t.prototype.fixCoerce=function(t){if(void 0===t.sort)return{enabled:!1};var e={};return"string"==typeof t.sort?e.key=t.sort:"boolean"!=typeof t.sort&&(e=t.sort),e.key||(e.key=t.indexKey),e.enabled=!0,e},t.prototype.filterCoerce=function(t){var e=this;if(null==t.filter)return null;var n=t.filter;n.type=n.type||"default";var r="filter",i="fill";if("keyword"===n.type&&(null!=n.menus&&0!==n.menus.length||(n.menus=[{value:""}]),r="search",i="outline"),0===n.menus.length)return null;void 0===n.multiple&&(n.multiple=!0),n.confirmText=n.confirmText||this.cog.filterConfirmText,n.clearText=n.clearText||this.cog.filterClearText,n.key=n.key||t.indexKey,n.icon=n.icon||r;var o={type:r,theme:i};return"string"==typeof n.icon?n.icon=C(C({},o),{type:n.icon}):n.icon=C(C({},o),n.icon),this.updateDefault(n),this.acl&&(n.menus=n.menus.filter((function(t){return e.acl.can(t.acl)}))),n.menus.length<=0&&(n=null),n},t.prototype.restoreRender=function(t){t.renderTitle&&(t.__renderTitle=this.rowSource.getTitle(t.renderTitle)),t.render&&(t.__render=this.rowSource.getRow(t.render))},t.prototype.process=function(t){var e,n,r=this;if(!t||0===t.length)throw new Error("[st]: the columns property muse be define!");var i=this.cog.noIndex,a=0,l=0,c=0,s=[],p=o.deepCopy(t);try{for(var u=O(p),d=u.next();!d.done;d=u.next()){var f=d.value;if((!f.iif||f.iif(f))&&(!this.acl||!f.acl||this.acl.can(f.acl))){f.index&&(Array.isArray(f.index)||(f.index=f.index.split(".")),f.indexKey=f.index.join("."));var h=("string"==typeof f.title?{text:f.title}:f.title)||{};h.i18n&&this.i18nSrv&&(h.text=this.i18nSrv.fanyi(h.i18n)),h.text&&(h._text=this.dom.bypassSecurityTrustHtml(h.text)),f.title=h,"no"===f.type&&(f.noIndex=null==f.noIndex?i:f.noIndex),null==f.selections&&(f.selections=[]),"checkbox"===f.type&&(++a,f.width||(f.width=(f.selections.length>0?62:50)+"px")),this.acl&&(f.selections=f.selections.filter((function(t){return r.acl.can(t.acl)}))),"radio"===f.type&&(++l,f.selections=[],f.width||(f.width="50px")),"yn"===f.type&&(f.yn=C({truth:!0},f.yn)),("link"===f.type&&"function"!=typeof f.click||"badge"===f.type&&null==f.badge||"tag"===f.type&&null==f.tag)&&(f.type=""),f.className||(f.className={number:"text-right",currency:"text-right",date:"text-center"}[f.type]),"number"==typeof f.width&&(f.width=f.width+"px"),f._sort=this.sortCoerce(f),f.filter=this.filterCoerce(f),f.buttons=this.btnCoerce(f.buttons),this.restoreRender(f),f.__point=c++,s.push(f)}}}catch(t){e={error:t}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}if(a>1)throw new Error("[st]: just only one column checkbox");if(l>1)throw new Error("[st]: just only one column radio");return this.fixedCoerce(s),s},t.prototype.restoreAllRender=function(t){var e=this;t.forEach((function(t){return e.restoreRender(t)}))},t.prototype.updateDefault=function(t){return"default"===t.type?t.default=-1!==t.menus.findIndex((function(t){return t.checked})):t.default=!!t.menus[0].value,this},t.prototype.cleanFilter=function(t){var e=t.filter;return e.default=!1,"default"===e.type?e.menus.forEach((function(t){return t.checked=!1})):e.menus[0].value=void 0,this},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:n.DomSanitizer},{type:P,decorators:[{type:e.Host}]},{type:r.ACLService,decorators:[{type:e.Optional}]},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[i.LXLIB_I18N_TOKEN]}]},{type:E}]},t}();var j=function(){function t(t,e,n,r,i,o){this.http=t,this.currentyPipe=e,this.datePipe=n,this.ynPipe=r,this.numberPipe=i,this.dom=o,this.sortTick=0}return t.prototype.process=function(t){var e,n,r,i,a,s,p=this,u=!1,d=t.data,f=t.res,h=t.total,g=t.page,m=t.pi,y=t.ps,b=t.paginator,x=t.columns,v=g.show;return"string"==typeof d?(u=!0,e=this.getByHttp(d,t).pipe(c.map((function(t){var e;if(s=t,Array.isArray(t))n=(e=t).length,r=n,v=!1;else{null!=(e=o.deepGet(t,f.reName.list,[]))&&Array.isArray(e)||(e=[]);var i=f.reName.total&&o.deepGet(t,f.reName.total,null);n=null==i?h||0:+i}return o.deepCopy(e)})))):e=Array.isArray(d)?l.of(d):d,u||(e=e.pipe(c.map((function(t){s=t;var e=o.deepCopy(t),n=p.getSorterFn(x);return n&&(e=e.sort(n)),e})),c.map((function(t){return x.filter((function(t){return t.filter})).forEach((function(e){var n=e.filter,r=p.getFilteredData(n);if(0!==r.length){var i=n.fn;"function"==typeof i?t=t.filter((function(t){return r.some((function(e){return i(e,t)}))})):console.warn("[st] Muse provide the fn function in filter")}})),t})),c.map((function(t){if(b&&g.front){var e=Math.ceil(t.length/y);if(a=Math.max(1,m>e?e:m),n=t.length,!0===g.show)return t.slice((a-1)*y,a*y)}return t})))),"function"==typeof f.process&&(e=e.pipe(c.map((function(t){return f.process(t,s)})))),(e=e.pipe(c.map((function(e){return p.optimizeData({result:e,columns:x,rowClassName:t.rowClassName})})))).pipe(c.map((function(t){var e=n||h,o=r||y;return{pi:a,ps:r,total:n,list:i=t,statistical:p.genStatistical(x,i,s),pageShow:void 0===v?e>o:v}})))},t.prototype.get=function(t,e,n){if(e.format){var r=e.format(t,e,n)||"";return r&&~r.indexOf("</")?{text:r,_text:this.dom.bypassSecurityTrustHtml(r),org:r}:{text:r,_text:r,org:r}}var i,a=o.deepGet(t,e.index,e.default),l=a;switch(e.type){case"no":l=this.getNoIndex(t,e,n);break;case"img":l=a?'<img src="'+a+'" class="img">':"";break;case"number":l=this.numberPipe.transform(a,e.numberDigits);break;case"currency":l=this.currentyPipe.transform(a);break;case"date":l=a===e.default?e.default:this.datePipe.transform(a,e.dateFormat);break;case"yn":l=this.ynPipe.transform(a===e.yn.truth,e.yn.yes,e.yn.no,e.yn.mode,!1);break;case"tag":case"badge":var c="tag"===e.type?e.tag:e.badge;if(c&&c[l]){var s=c[l];l=s.text,i=s.color}else l=""}return null==l&&(l=""),{text:l,_text:this.dom.bypassSecurityTrustHtml(l),org:a,color:i}},t.prototype.getByHttp=function(t,e){var n,r,i=e.req,o=e.page,a=e.paginator,l=e.pi,c=e.ps,s=e.singleSort,p=e.multiSort,u=e.columns,d=(i.method||"GET").toUpperCase(),f={},h=i.reName;a&&("page"===i.type?((n={})[h.pi]=o.zeroIndexed?l-1:l,n[h.ps]=c,f=n):((r={})[h.skip]=(l-1)*c,r[h.limit]=c,f=r));var g={params:f=C(C(C(C({},f),i.params),this.getReqSortMap(s,p,u)),this.getReqFilterMap(u)),body:i.body,headers:i.headers};return"POST"===d&&!0===i.allInBody&&(g={body:C(C({},i.body),f),headers:i.headers}),"function"==typeof i.process&&(g=i.process(g)),this.http.request(d,t,g)},t.prototype.optimizeData=function(t){for(var e=this,n=t.result,r=t.columns,i=t.rowClassName,o=function(t,o){n[t]._values=r.map((function(r){return e.get(n[t],r,t)})),i&&(n[t]._rowClassName=i(n[t],t))},a=0,l=n.length;a<l;a++)o(a);return n},t.prototype.getNoIndex=function(t,e,n){return"function"==typeof e.noIndex?e.noIndex(t,e,n):e.noIndex+n},t.prototype.getValidSort=function(t){return t.filter((function(t){return t._sort&&t._sort.enabled&&t._sort.default})).map((function(t){return t._sort}))},t.prototype.getSorterFn=function(t){var e=this.getValidSort(t);if(0!==e.length){var n=e[0];if(null!==n.compare){if("function"==typeof n.compare)return function(t,e){var r=n.compare(t,e);return 0!==r?"descend"===n.default?-r:r:0};console.warn("[st] Muse provide the compare function in sort")}}},Object.defineProperty(t.prototype,"nextSortTick",{get:function(){return++this.sortTick},enumerable:!0,configurable:!0}),t.prototype.getReqSortMap=function(t,e,n){var r,i={},o=this.getValidSort(n);if(!e&&0===o.length)return i;if(e){var a=C({key:"sort",separator:"-",nameSeparator:"."},e);(r={})[a.key]=o.sort((function(t,e){return t.tick-e.tick})).map((function(t){return t.key+a.nameSeparator+((t.reName||{})[t.default]||t.default)})).join(a.separator),i=r,!1===e.keepEmptyKey&&0===i[a.key].length&&(i={})}else{var l=o[0],c=l.key,s=(o[0].reName||{})[l.default]||l.default;t&&(s=c+(t.nameSeparator||".")+s,c=t.key||"sort"),i[c]=s}return i},t.prototype.getFilteredData=function(t){return"default"===t.type?t.menus.filter((function(t){return!0===t.checked})):t.menus.slice(0,1)},t.prototype.getReqFilterMap=function(t){var e=this,n={};return t.filter((function(t){return t.filter&&!0===t.filter.default})).forEach((function(t){var r=t.filter,i=e.getFilteredData(r),o={};r.reName?o=r.reName(r.menus,t):o[r.key]=i.map((function(t){return t.value})).join(","),n=C(C({},n),o)})),n},t.prototype.genStatistical=function(t,e,n){var r=this,i={};return t.forEach((function(t,o){i[t.key?t.key:o]=null==t.statistical?{}:r.getStatistical(t,o,e,n)})),i},t.prototype.getStatistical=function(t,e,n,r){var i=t.statistical,o=C({digits:2,currency:void 0},"string"==typeof i?{type:i}:i),a={value:0},l=!1;if("function"==typeof o.type)a=o.type(this.getValues(e,n),t,n,r),l=!0;else switch(o.type){case"count":a.value=n.length;break;case"distinctCount":a.value=this.getValues(e,n).filter((function(t,e,n){return n.indexOf(t)===e})).length;break;case"sum":a.value=this.toFixed(this.getSum(e,n),o.digits),l=!0;break;case"average":a.value=this.toFixed(this.getSum(e,n)/n.length,o.digits),l=!0;break;case"max":a.value=Math.max.apply(Math,N(this.getValues(e,n))),l=!0;break;case"min":a.value=Math.min.apply(Math,N(this.getValues(e,n))),l=!0}return!0===o.currency||null==o.currency&&!0===l?a.text=this.currentyPipe.transform(a.value):a.text=String(a.value),a},t.prototype.toFixed=function(t,e){return isNaN(t)||!isFinite(t)?0:parseFloat(t.toFixed(e))},t.prototype.getValues=function(t,e){return e.map((function(e){return e._values[t].org})).map((function(t){return""===t||null==t?0:t}))},t.prototype.getSum=function(t,e){return this.getValues(t,e).reduce((function(t,e){return t+parseFloat(String(e))}),0)},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:i._HttpClient},{type:i.CNCurrencyPipe,decorators:[{type:e.Host}]},{type:i.DatePipe,decorators:[{type:e.Host}]},{type:i.YNPipe,decorators:[{type:e.Host}]},{type:a.DecimalPipe,decorators:[{type:e.Host}]},{type:n.DomSanitizer}]},t}();var R=function(){function t(t){this.xlsxSrv=t}return t.prototype._stGet=function(t,e,n){var r={t:"s",v:""};if(e.format)r.v=e.format(t,e,n);else{var i=o.deepGet(t,e.index,"");switch(r.v=i,e.type){case"currency":r.t="n";break;case"date":r.t="d";break;case"yn":r.v=r.v===e.ynTruth?e.ynYes||"是":e.ynNo||"否"}}return r.v=r.v||"",r},t.prototype.genSheet=function(t){for(var e={},n=e[t.sheetname||"Sheet1"]={},r=t._c.filter((function(t){return!1!==t.exported&&t.index&&(!t.buttons||0===t.buttons.length)})),i=r.length,o=t._d.length,a=0;a<i;a++){var l=r[a].title;n[String.fromCharCode(a+65)+"1"]={t:"s",v:"object"==typeof l?l.text:l}}for(a=0;a<o;a++)for(var c=0;c<i;c++)n[""+String.fromCharCode(c+65)+(a+2)]=this._stGet(t._d[a],r[c],a);return i>0&&o>0&&(n["!ref"]="A1:"+String.fromCharCode(i+65-1)+(o+1)),e},t.prototype.export=function(t){var e=this.genSheet(t);return this.xlsxSrv.export({sheets:e,filename:t.filename,callback:t.callback})},t.decorators=[{type:e.Injectable}],t.ctorParameters=function(){return[{type:s.XlsxService,decorators:[{type:e.Optional}]}]},t}();var q=function(){function t(t,n,r,i,a,s,p,u,d,f,h,g,m){var y=this;this.cdr=n,this.cog=r,this.router=i,this.el=a,this.renderer=s,this.exportSrv=p,this.modalHelper=u,this.drawerHelper=d,this.doc=f,this.columnSource=h,this.dataSource=g,this.lxlibI18n=m,this.unsubscribe$=new l.Subject,this.totalTpl="",this.rowClickCount=0,this.locale={},this._data=[],this._statistical={},this._isPagination=!0,this._allChecked=!1,this._allCheckedDisabled=!1,this._indeterminate=!1,this._columns=[],this.columns=[],this.ps=10,this.pi=1,this.total=0,this._loading=!1,this.loading=null,this.loadingDelay=0,this.bordered=!1,this.singleSort=null,this.expandRowByClick=!1,this.expandAccordion=!1,this.rowClickTime=200,this.responsive=!0,this.error=new e.EventEmitter,this.change=new e.EventEmitter,this.virtualScroll=!1,this.virtualItemSize=54,this.virtualMaxBufferPx=200,this.virtualMinBufferPx=100,this.virtualForTrackBy=function(t){return t},this.lxlibI18n.change.pipe(c.takeUntil(this.unsubscribe$)).subscribe((function(){y.locale=y.lxlibI18n.getData("st"),y._columns.length>0&&(y.page=y.clonePage,y.cd())})),this.copyCog=o.deepMergeKey(new E,!0,r),delete this.copyCog.multiSort,Object.assign(this,this.copyCog),r.multiSort&&!1!==r.multiSort.global&&(this.multiSort=C({},r.multiSort)),t.change.pipe(c.takeUntil(this.unsubscribe$),c.filter((function(){return y._columns.length>0}))).subscribe((function(){return y.refreshColumns()}))}return Object.defineProperty(t.prototype,"req",{get:function(){return this._req},set:function(t){this._req=o.deepMerge({},this._req,this.cog.req,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"res",{get:function(){return this._res},set:function(t){var e=o.deepMergeKey({},!0,this.cog.res,t),n=e.reName;Array.isArray(n.list)||(n.list=n.list.split(".")),Array.isArray(n.total)||(n.total=n.total.split(".")),this._res=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this._page},set:function(t){this.clonePage=t;var e=o.deepMergeKey({},!0,(new E).page,this.cog.page,t),n=e.total;"string"==typeof n&&n.length?this.totalTpl=n:o.toBoolean(n)?this.totalTpl=this.locale.total:this.totalTpl="",this._page=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"multiSort",{get:function(){return this._multiSort},set:function(t){"boolean"!=typeof t||o.toBoolean(t)?this._multiSort=C({},"object"==typeof t?t:{}):this._multiSort=null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widthMode",{get:function(){return this._widthMode},set:function(t){this._widthMode=C({type:"default",strictBehavior:"truncate"},t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"routerState",{get:function(){return{pi:this.pi,ps:this.ps,total:this.total}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._data.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return this._data},enumerable:!0,configurable:!0}),t.prototype.cd=function(){return this.cdr.detectChanges(),this},t.prototype.renderTotal=function(t,e){return this.totalTpl?this.totalTpl.replace("{{total}}",t).replace("{{range[0]}}",e[0]).replace("{{range[1]}}",e[1]):""},t.prototype.isTruncate=function(t){return!!t.width&&"truncate"===this.widthMode.strictBehavior&&"img"!==t.type},t.prototype.columnClass=function(t){return t.className||(this.isTruncate(t)?"text-truncate":null)},t.prototype.changeEmit=function(t,e){var n={type:t,pi:this.pi,ps:this.ps,total:this.total};null!=e&&(n[t]=e),this.change.emit(n)},Object.defineProperty(t.prototype,"filteredData",{get:function(){return this.loadData({paginator:!1}).then((function(t){return t.list}))},enumerable:!0,configurable:!0}),t.prototype.setLoading=function(t){null==this.loading&&(this._loading=t)},t.prototype.loadData=function(t){var e=this,n=this,r=n.pi,i=n.ps,o=n.data,a=n.req,l=n.res,s=n.page,p=n.total,u=n.singleSort,d=n.multiSort,f=n.rowClassName;return new Promise((function(n,h){e.data$&&e.data$.unsubscribe(),e.data$=e.dataSource.process(C({pi:r,ps:i,total:p,data:o,req:a,res:l,page:s,columns:e._columns,singleSort:u,multiSort:d,rowClassName:f,paginator:!0},t)).pipe(c.takeUntil(e.unsubscribe$)).subscribe((function(t){return n(t)}),(function(t){return h(t)}))}))},t.prototype.loadPageData=function(){return T(this,void 0,void 0,(function(){var t,e;return I(this,(function(n){switch(n.label){case 0:this.setLoading(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.loadData()];case 2:return t=n.sent(),this.setLoading(!1),void 0!==t.pi&&(this.pi=t.pi),void 0!==t.ps&&(this.ps=t.ps),void 0!==t.total&&(this.total=t.total),void 0!==t.pageShow&&(this._isPagination=t.pageShow),this._data=t.list,this._statistical=t.statistical,this.changeEmit("loaded",t.list),[2,this._refCheck()];case 3:return e=n.sent(),this.setLoading(!1),this.unsubscribe$.isStopped||(this.cdr.detectChanges(),this.error.emit({type:"req",error:e})),[2,this];case 4:return[2]}}))}))},t.prototype.clear=function(t){return void 0===t&&(t=!0),t&&this.clearStatus(),this._data=[],this.cd()},t.prototype.clearStatus=function(){return this.clearCheck().clearRadio().clearFilter().clearSort()},t.prototype.load=function(t,e,n){return void 0===t&&(t=1),-1!==t&&(this.pi=t),void 0!==e&&(this._req.params=n&&n.merge?C(C({},this._req.params),e):e),this._change("pi",n),this},t.prototype.reload=function(t,e){return this.load(-1,t,e)},t.prototype.reset=function(t,e){return this.clearStatus().load(1,t,e),this},t.prototype._toTop=function(t){if(null==t?this.page.toTop:t){var e=this.el.nativeElement;this.scroll?e.querySelector(".ant-table-body").scrollTo(0,0):(e.scrollIntoView(),this.doc.documentElement.scrollTop-=this.page.toTopOffset)}},t.prototype._change=function(t,e){var n=this;("pi"===t||"ps"===t&&this.pi<=Math.ceil(this.total/this.ps))&&this.loadPageData().then((function(){return n._toTop(null==e?void 0:e.toTop)})),this.changeEmit(t)},t.prototype._click=function(t,e,n){t.preventDefault(),t.stopPropagation();var r=n.click(e,this);return"string"==typeof r&&this.router.navigateByUrl(r,{state:this.routerState}),!1},t.prototype.closeOtherExpand=function(t){!1!==this.expandAccordion&&this._data.filter((function(e){return e!==t})).forEach((function(t){return t.expand=!1}))},t.prototype._rowClick=function(t,e,n){var r=this;if("INPUT"!==t.target.nodeName){var i=this.expand,o=this.expandRowByClick,a=this.rowClickTime;if(i&&!1!==e.showExpand&&o)return e.expand=!e.expand,this.closeOtherExpand(e),void this.changeEmit("expand",e);++this.rowClickCount,1===this.rowClickCount&&setTimeout((function(){var i={e:t,item:e,index:n};1===r.rowClickCount?r.changeEmit("click",i):r.changeEmit("dblClick",i),r.rowClickCount=0}),a)}},t.prototype._expandChange=function(t){this.closeOtherExpand(t),this.changeEmit("expand",t)},t.prototype.removeRow=function(t){var e=this;return"number"==typeof t?this._data.splice(t,1):(Array.isArray(t)||(t=[t]),t.map((function(t){return e._data.indexOf(t)})).filter((function(t){return-1!==t})).forEach((function(t){return e._data.splice(t,1)}))),this._columns.filter((function(t){return"no"===t.type})).forEach((function(t){return e._data.forEach((function(n,r){return n._values[t.__point]={text:e.dataSource.getNoIndex(n,t,r),org:r}}))})),this.cd()},t.prototype.setRow=function(t,e){return this._data[t]=o.deepMergeKey(this._data[t],!1,e),this._data=this.dataSource.optimizeData({columns:this._columns,result:this._data,rowClassName:this.rowClassName}),this.cdr.detectChanges(),this},t.prototype.sort=function(t,e,n){this.multiSort?(t._sort.default=n,t._sort.tick=this.dataSource.nextSortTick):this._columns.forEach((function(t,r){return t._sort.default=r===e?n:null})),this.loadPageData();var r={value:n,map:this.dataSource.getReqSortMap(this.singleSort,this.multiSort,this._columns),column:t};this.changeEmit("sort",r)},t.prototype.clearSort=function(){return this._columns.forEach((function(t){return t._sort.default=null})),this},t.prototype.handleFilter=function(t){this.columnSource.updateDefault(t.filter),this.loadPageData(),this.changeEmit("filter",t)},t.prototype._filterConfirm=function(t){this.handleFilter(t)},t.prototype._filterRadio=function(t,e,n){t.filter.menus.forEach((function(t){return t.checked=!1})),e.checked=n},t.prototype._filterClear=function(t){this.columnSource.cleanFilter(t),this.handleFilter(t)},t.prototype.clearFilter=function(){var t=this;return this._columns.filter((function(t){return t.filter&&!0===t.filter.default})).forEach((function(e){return t.columnSource.cleanFilter(e)})),this},t.prototype.clearCheck=function(){return this._checkAll(!1)},t.prototype._refCheck=function(){var t=this._data.filter((function(t){return!t.disabled})),e=t.filter((function(t){return!0===t.checked}));this._allChecked=e.length>0&&e.length===t.length;var n=t.every((function(t){return!t.checked}));return this._indeterminate=!this._allChecked&&!n,this._allCheckedDisabled=this._data.length===this._data.filter((function(t){return t.disabled})).length,this.cd()},t.prototype._checkAll=function(t){return t=void 0===t?this._allChecked:t,this._data.filter((function(t){return!t.disabled})).forEach((function(e){return e.checked=t})),this._refCheck()._checkNotify()},t.prototype._checkSelection=function(t,e){return t.checked=e,this._refCheck()._checkNotify()},t.prototype._rowSelection=function(t){return t.select(this._data),this._refCheck()._checkNotify()},t.prototype._checkNotify=function(){var t=this._data.filter((function(t){return!t.disabled&&!0===t.checked}));return this.changeEmit("checkbox",t),this},t.prototype.clearRadio=function(){return this._data.filter((function(t){return t.checked})).forEach((function(t){return t.checked=!1})),this.changeEmit("radio",null),this},t.prototype._refRadio=function(t,e){return this._data.filter((function(t){return!t.disabled})).forEach((function(t){return t.checked=!1})),e.checked=t,this.changeEmit("radio",e),this},t.prototype._btnClick=function(t,e,n){var r,i,a=this;if(n&&!0===this.expandRowByClick&&n.stopPropagation(),"modal"!==e.type&&"static"!==e.type)if("drawer"!==e.type)if("link"!==e.type)this.btnCallback(t,e);else{var l=this.btnCallback(t,e);"string"==typeof l&&this.router.navigateByUrl(l,{state:this.routerState})}else{var s=e.drawer;u=((i={})[s.paramsName]=t,i);this.drawerHelper.create(s.title,s.component,C(C({},u),s.params&&s.params(t)),o.deepMergeKey({},!0,this.copyCog.drawer,s)).pipe(c.filter((function(t){return void 0!==t}))).subscribe((function(n){return a.btnCallback(t,e,n)}))}else{var p=e.modal,u=((r={})[p.paramsName]=t,r);this.modalHelper["modal"===e.type?"create":"createStatic"](p.component,C(C({},u),p.params&&p.params(t)),o.deepMergeKey({},!0,this.copyCog.modal,p)).pipe(c.filter((function(t){return void 0!==t}))).subscribe((function(n){return a.btnCallback(t,e,n)}))}},t.prototype.btnCallback=function(t,e,n){if(e.click){if("string"!=typeof e.click)return e.click(t,n,this);switch(e.click){case"load":this.load();break;case"reload":this.reload()}}},t.prototype._btnText=function(t,e){return"function"==typeof e.text?e.text(t,e):e.text||""},t.prototype._validBtns=function(t,e,n){return t.filter((function(t){var r=t.iif(e,t,n),i="disabled"===t.iifBehavior;return t._result=r,t._disabled=!r&&i,r||i}))},t.prototype.export=function(t,e){var n=this;(!0===t?l.from(this.filteredData):l.of(t||this._data)).subscribe((function(t){return n.exportSrv.export(C(C({},e),{_d:t,_c:n._columns}))}))},Object.defineProperty(t.prototype,"cdkVirtualScrollViewport",{get:function(){return this.orgTable.cdkVirtualScrollViewport},enumerable:!0,configurable:!0}),t.prototype.resetColumns=function(t){return void 0!==(t=C({emitReload:!0},t)).columns&&(this.columns=t.columns),void 0!==t.pi&&(this.pi=t.pi),void 0!==t.ps&&(this.ps=t.ps),this.refreshColumns(),!0===t.emitReload?this.loadPageData():(this.cd(),Promise.resolve(this))},t.prototype.refreshColumns=function(){return this._columns=this.columnSource.process(this.columns),this},t.prototype.setClass=function(){var t,e=this.widthMode,n=e.type,r=e.strictBehavior;o.updateHostClass(this.el.nativeElement,this.renderer,((t={}).st=!0,t["st__p-"+this.page.placement]=this.page.placement,t["st__width-"+n]=!0,t["st__width-strict-"+r]="strict"===n,t["ant-table-rep"]=this.responsive,t["ant-table-rep__hide-header-footer"]=this.responsiveHideHeaderFooter,t))},t.prototype.ngAfterViewInit=function(){this.columnSource.restoreAllRender(this._columns)},t.prototype.ngOnChanges=function(t){t.columns&&this.refreshColumns();var e=t.data;!e||!e.currentValue||this.req.lazyLoad&&e.firstChange||this.loadPageData(),t.loading&&(this._loading=t.loading.currentValue),this.setClass()},t.prototype.ngOnDestroy=function(){var t=this.unsubscribe$;t.next(),t.complete()},t.decorators=[{type:e.Component,args:[{selector:"st",exportAs:"st",template:' <ng-template #btnTpl let-i let-btn="btn">\n <ng-container *ngIf="!btn.tooltip">\n <ng-template [ngTemplateOutlet]="btnItemTpl" [ngTemplateOutletContext]="{ $implicit: i, btn: btn }"></ng-template>\n </ng-container>\n <span *ngIf="btn.tooltip" nz-tooltip [nzTooltipTitle]="btn.tooltip">\n <ng-template [ngTemplateOutlet]="btnItemTpl" [ngTemplateOutletContext]="{ $implicit: i, btn: btn }"></ng-template>\n </span>\n</ng-template>\n<ng-template #btnItemTpl let-i let-btn="btn">\n <a *ngIf="btn.pop" nz-popconfirm [nzPopconfirmTitle]="btn.pop.title" [nzIcon]="btn.pop.icon"\n [nzCondition]="btn.pop.condition(i)" [nzCancelText]="btn.pop.cancelText" [nzOkText]="btn.pop.okText"\n [nzOkType]="btn.pop.okType" (nzOnConfirm)="_btnClick(i, btn, $event)" class="st__btn-text">\n <ng-template [ngTemplateOutlet]="btnTextTpl" [ngTemplateOutletContext]="{ $implicit: i, btn: btn }"></ng-template>\n </a>\n <a *ngIf="!btn.pop" (click)="_btnClick(i, btn, $event)" class="st__btn-text">\n <ng-template [ngTemplateOutlet]="btnTextTpl" [ngTemplateOutletContext]="{ $implicit: i, btn: btn }"></ng-template>\n </a>\n</ng-template>\n<ng-template #btnTextTpl let-i let-btn="btn">\n <ng-container *ngIf="btn.icon">\n <i *ngIf="!btn.icon.iconfont" nz-icon [nzType]="btn.icon.type" [nzTheme]="btn.icon.theme" [nzSpin]="btn.icon.spin"\n [nzTwotoneColor]="btn.icon.twoToneColor"></i>\n <i *ngIf="btn.icon.iconfont" nz-icon [nzIconfont]="btn.icon.iconfont"></i>\n </ng-container>\n <span [innerHTML]="_btnText(i, btn)" [ngClass]="{\'pl-xs\': btn.icon}"></span>\n</ng-template>\n<ng-template #titleTpl let-i>\n <span [innerHTML]="i._text"></span>\n <small *ngIf="i.optional" class="st__head-optional" [innerHTML]="i.optional"></small>\n <i *ngIf="i.optionalHelp" class="st__head-tip" nz-tooltip [nzTooltipTitle]="i.optionalHelp" nz-icon nzType="question-circle"></i>\n</ng-template>\n<ng-template #bodyTpl let-i let-index="index">\n <tr [attr.data-index]="index" (click)="_rowClick($event, i, index)" [class]="i._rowClassName">\n <td *ngIf="expand" [nzShowExpand]="expand && i.showExpand !== false" [(nzExpand)]="i.expand"\n (nzExpandChange)="_expandChange(i)" nzWidth="50px"></td>\n <td *ngFor="let c of _columns; let cIdx=index" [nzLeft]="c._left" [nzRight]="c._right" [ngClass]="columnClass(c)" [attr.colspan]="c.colSpan">\n <span *ngIf="responsive" class="ant-table-rep__title">\n <ng-template [ngTemplateOutlet]="titleTpl" [ngTemplateOutletContext]="{$implicit: c.title }"></ng-template>\n </span>\n <span>\n <ng-template #render [ngTemplateOutlet]="c.__render" [ngTemplateOutletContext]="{$implicit: i, index: index, column: c }"></ng-template>\n <ng-container *ngIf="!c.__render; else render">\n <ng-container [ngSwitch]="c.type">\n <label *ngSwitchCase="\'checkbox\'" nz-checkbox [nzDisabled]="i.disabled" [ngModel]="i.checked"\n (ngModelChange)="_checkSelection(i, $event)"></label>\n <label *ngSwitchCase="\'radio\'" nz-radio [nzDisabled]="i.disabled" [ngModel]="i.checked"\n (ngModelChange)="_refRadio($event, i)"></label>\n <a *ngSwitchCase="\'link\'" (click)="_click($event, i, c)" [innerHTML]="i._values[cIdx]._text"></a>\n <ng-conntainer *ngIf="i._values[cIdx].text">\n <nz-tag *ngSwitchCase="\'tag\'" [nzColor]="i._values[cIdx].color">\n <span [innerHTML]="i._values[cIdx]._text"></span>\n </nz-tag>\n <nz-badge *ngSwitchCase="\'badge\'" [nzStatus]="i._values[cIdx].color" [nzText]="i._values[cIdx].text">\n </nz-badge>\n </ng-conntainer>\n <span *ngSwitchDefault [innerHTML]="i._values[cIdx]._text" [attr.title]="isTruncate(c) ? i._values[cIdx].text : null"></span>\n </ng-container>\n <ng-container *ngFor="let btn of _validBtns(c.buttons, i, c); let last=last">\n <a *ngIf="btn.children.length > 0" nz-dropdown [nzDropdownMenu]="btnMenu" nzOverlayClassName="st__btn-sub">\n <span [innerHTML]="_btnText(i, btn)"></span>\n <i nz-icon nzType="down"></i>\n </a>\n <nz-dropdown-menu #btnMenu="nzDropdownMenu">\n <ul nz-menu>\n <ng-container *ngFor="let subBtn of _validBtns(btn.children, i, c)">\n <li *ngIf="subBtn.type !== \'divider\'" nz-menu-item [class.st__btn-disabled]="subBtn._disabled">\n <ng-template [ngTemplateOutlet]="btnTpl" [ngTemplateOutletContext]="{ $implicit: i, btn: subBtn }">\n </ng-template>\n </li>\n <li *ngIf="subBtn.type === \'divider\'" nz-menu-divider></li>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n <span *ngIf="btn.children.length == 0" [class.st__btn-disabled]="btn._disabled">\n <ng-template [ngTemplateOutlet]="btnTpl" [ngTemplateOutletContext]="{ $implicit: i, btn: btn }">\n </ng-template>\n </span>\n <nz-divider *ngIf="!last" nzType="vertical"></nz-divider>\n </ng-container>\n <ng-template [ngIf]="!c.__renderExpanded" [ngTemplateOutlet]="c.__renderExpanded"\n [ngTemplateOutletContext]="{$implicit: i, index: index, column: c }"></ng-template>\n </ng-container>\n </span>\n </td>\n </tr>\n <tr [nzExpand]="i.expand">\n <td></td>\n <td [attr.colspan]="_columns.length">\n <ng-template [ngTemplateOutlet]="expand" [ngTemplateOutletContext]="{$implicit: i, index: index }"></ng-template>\n </td>\n </tr>\n</ng-template>\n<ng-template #chkAllTpl let-custom>\n <label nz-checkbox class="st__checkall" [nzDisabled]="_allCheckedDisabled" [(ngModel)]="_allChecked"\n [nzIndeterminate]="_indeterminate" (ngModelChange)="_checkAll()"\n [class.ant-table-selection-select-all-custom]="custom"></label>\n</ng-template>\n<nz-table #table [nzData]="_data" [(nzPageIndex)]="pi" (nzPageIndexChange)="_change(\'pi\')" [(nzPageSize)]="ps"\n (nzPageSizeChange)="_change(\'ps\')" [nzTotal]="total" [nzShowPagination]="_isPagination" [nzFrontPagination]="false"\n [nzBordered]="bordered" [nzSize]="size" [nzLoading]="_loading" [nzLoadingDelay]="loadingDelay"\n [nzLoadingIndicator]="loadingIndicator" [nzTitle]="header" [nzFooter]="footer" [nzScroll]="scroll"\n [nzVirtualItemSize]="virtualItemSize" [nzVirtualMaxBufferPx]="virtualMaxBufferPx" [nzVirtualMinBufferPx]="virtualMinBufferPx" [nzVirtualForTrackBy]="virtualForTrackBy"\n [nzNoResult]="noResult" [nzPageSizeOptions]="page.pageSizes" [nzShowQuickJumper]="page.showQuickJumper" [nzShowSizeChanger]="page.showSize" [nzPaginationPosition]="page.position" [nzShowTotal]="totalTpl">\n <thead class="st__head">\n <tr>\n <th *ngIf="expand" [nzShowExpand]="expand" nzWidth="50px"></th>\n <th *ngFor="let c of _columns; let index=index" [nzWidth]="c.width" [nzLeft]="c._left" [nzRight]="c._right"\n [ngClass]="c.className" [attr.colspan]="c.colSpan" [attr.data-col]="c.indexKey" [nzShowSort]="c._sort.enabled"\n [nzSortOrder]="c._sort.default" (nzSortOrderChange)="sort(c, index, $event)" [nzCustomFilter]="c.filter">\n <ng-template #renderTitle [ngTemplateOutlet]="c.__renderTitle"\n [ngTemplateOutletContext]="{$implicit: c, index: index }"></ng-template>\n <ng-container *ngIf="!c.__renderTitle; else renderTitle">\n <ng-container [ngSwitch]="c.type">\n <ng-container *ngSwitchCase="\'checkbox\'">\n <ng-container *ngIf="c.selections.length === 0">\n <ng-template [ngTemplateOutlet]="chkAllTpl" [ngTemplateOutletContext]="{$implicit: false }">\n </ng-template>\n </ng-container>\n <div *ngIf="c.selections.length > 0" class="ant-table-selection">\n <ng-template [ngTemplateOutlet]="chkAllTpl" [ngTemplateOutletContext]="{$implicit: true }">\n </ng-template>\n <div *ngIf="c.selections.length" nz-dropdown nzPlacement="bottomLeft" [nzDropdownMenu]="selectionMenu" class="ant-table-selection-down st__checkall-selection">\n <i nz-icon nzType="down"></i>\n </div>\n <nz-dropdown-menu #selectionMenu="nzDropdownMenu">\n <ul nz-menu class="ant-table-selection-menu">\n <li nz-menu-item *ngFor="let rw of c.selections" (click)="_rowSelection(rw)" [innerHTML]="rw.text">\n </li>\n </ul>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template [ngTemplateOutlet]="titleTpl" [ngTemplateOutletContext]="{$implicit: c.title }">\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n <div nz-th-extra *ngIf="c.filter" class="ant-table-filter-trigger-container st__filter" [class.ant-table-filter-trigger-container-open]="c.filter.visible">\n <span class="ant-table-filter-trigger" [class.ant-table-filter-open]="c.filter.default" [class.active]="c.filter.visible"\n nz-dropdown [nzDropdownMenu]="filterMenu" nzTrigger="click" [nzClickHide]="false" [(nzVisible)]="c.filter.visible" nzOverlayClassName="st__filter-wrap">\n <i nz-icon [nzType]="c.filter.icon.type" [nzTheme]="c.filter.icon.theme"></i>\n </span>\n <nz-dropdown-menu #filterMenu="nzDropdownMenu">\n <div class="ant-table-filter-dropdown">\n <ng-container [ngSwitch]="c.filter.type">\n <div *ngSwitchCase="\'keyword\'" class="st__filter-keyword">\n <input type="text" nz-input [attr.placeholder]="c.filter.menus[0].text"\n [(ngModel)]="c.filter.menus[0].value" />\n </div>\n <ul *ngSwitchDefault nz-menu>\n <ng-container *ngIf="c.filter.multiple">\n <li nz-menu-item *ngFor="let filter of c.filter.menus">\n <label nz-checkbox [(ngModel)]="filter.checked">{{filter.text}}</label>\n </li>\n </ng-container>\n <ng-container *ngIf="!c.filter.multiple">\n <li nz-menu-item *ngFor="let filter of c.filter.menus">\n <label nz-radio [ngModel]="filter.checked"\n (ngModelChange)="_filterRadio(c, filter, $event)">{{filter.text}}</label>\n </li>\n </ng-container>\n </ul>\n </ng-container>\n <div class="ant-table-filter-dropdown-btns">\n <a class="ant-table-filter-dropdown-link confirm" (click)="c.filter.visible = false">\n <span (click)="_filterConfirm(c)">{{c.filter.confirmText || locale.filterConfirm}}</span>\n </a>\n <a class="ant-table-filter-dropdown-link clear" (click)="c.filter.visible = false">\n <span (click)="_filterClear(c)">{{c.filter.clearText || locale.filterReset}}</span>\n </a>\n </div>\n </div>\n </nz-dropdown-menu>\n </div>\n </th>\n </tr>\n </thead>\n <tbody class="st__body">\n <ng-container *ngIf="!_loading">\n <ng-template [ngTemplateOutlet]="bodyHeader" [ngTemplateOutletContext]="{$implicit: _statistical }"></ng-template>\n </ng-container>\n <ng-container *ngIf="!virtualScroll">\n <ng-container *ngFor="let i of _data; let index=index">\n <ng-template [ngTemplateOutlet]="bodyTpl" [ngTemplateOutletContext]="{$implicit: i, index: index }">\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="virtualScroll">\n <ng-template nz-virtual-scroll let-i let-index="index">\n <ng-template [ngTemplateOutlet]="bodyTpl" [ngTemplateOutletContext]="{$implicit: i, index: index }">\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-container *ngIf="!_loading">\n <ng-template [ngTemplateOutlet]="body" [ngTemplateOutletContext]="{$implicit: _statistical }"></ng-template>\n </ng-container>\n </tbody>\n <ng-template #totalTpl let-range="range" let-total>{{ renderTotal(total, range) }}</ng-template>\n</nz-table>\n',providers:[u.NzTableStyleService,j,P,B,R,i.CNCurrencyPipe,i.DatePipe,i.YNPipe,a.DecimalPipe],preserveWhitespaces:!1,changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[i.LXLIB_I18N_TOKEN]}]},{type:e.ChangeDetectorRef},{type:E},{type:p.Router},{type:e.ElementRef},{type:e.Renderer2},{type:R},{type:i.ModalHelper},{type:i.DrawerHelper},{type:void 0,decorators:[{type:e.Inject,args:[a.DOCUMENT]}]},{type:B},{type:j},{type:i.LxlibLocaleService}]},t.propDecorators={orgTable:[{type:e.ViewChild,args:["table",{static:!1}]}],req:[{type:e.Input}],res:[{type:e.Input}],page:[{type:e.Input}],multiSort:[{type:e.Input}],widthMode:[{type:e.Input}],data:[{type:e.Input}],columns:[{type:e.Input}],ps:[{type:e.Input}],pi:[{type:e.Input}],total:[{type:e.Input}],loading:[{type:e.Input}],loadingDelay:[{type:e.Input}],loadingIndicator:[{type:e.Input}],bordered:[{type:e.Input}],size:[{type:e.Input}],scroll:[{type:e.Input}],singleSort:[{type:e.Input}],rowClassName:[{type:e.Input}],header:[{type:e.Input}],footer:[{type:e.Input}],bodyHeader:[{type:e.Input}],body:[{type:e.Input}],expandRowByClick:[{type:e.Input}],expandAccordion:[{type:e.Input}],expand:[{type:e.Input}],noResult:[{type:e.Input}],widthConfig:[{type:e.Input}],rowClickTime:[{type:e.Input}],responsive:[{type:e.Input}],responsiveHideHeaderFooter:[{type:e.Input}],error:[{type:e.Output}],change:[{type:e.Output}],virtualScroll:[{type:e.Input}],virtualItemSize:[{type:e.Input}],virtualMaxBufferPx:[{type:e.Input}],virtualMinBufferPx:[{type:e.Input}],virtualForTrackBy:[{type:e.Input}]},S([o.InputNumber(),k("design:type",Object)],t.prototype,"ps",void 0),S([o.InputNumber(),k("design:type",Object)],t.prototype,"pi",void 0),S([o.InputNumber(),k("design:type",Object)],t.prototype,"total",void 0),S([o.InputNumber(),k("design:type",Object)],t.prototype,"loadingDelay",void 0),S([o.InputBoolean(),k("design:type",Object)],t.prototype,"bordered",void 0),S([o.InputBoolean(),k("design:type",Object)],t.prototype,"expandRowByClick",void 0),S([o.InputBoolean(),k("design:type",Object)],t.prototype,"expandAccordion",void 0),S([o.InputNumber(),k("design:type",Object)],t.prototype,"rowClickTime",void 0),S([o.InputBoolean(),k("design:type",Boolean)],t.prototype,"responsive",void 0),S([o.InputBoolean(),k("design:type",Boolean)],t.prototype,"responsiveHideHeaderFooter",void 0),S([o.InputBoolean(),k("design:type",Object)],t.prototype,"virtualScroll",void 0),S([o.InputNumber(),k("design:type",Object)],t.prototype,"virtualItemSize",void 0),S([o.InputNumber(),k("design:type",Object)],t.prototype,"virtualMaxBufferPx",void 0),S([o.InputNumber(),k("design:type",Object)],t.prototype,"virtualMinBufferPx",void 0),t}();var F=[q,D],H=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{schemas:[e.NO_ERRORS_SCHEMA],imports:[a.CommonModule,d.FormsModule,o.LxlibUtilModule,r.LxlibACLModule,v.NzPopconfirmModule,u.NzTableModule,y.NzIconModule,f.NzBadgeModule,h.NzCheckboxModule,g.NzDividerModule,m.NzDropDownModule,x.NzMenuModule,_.NzRadioModule,z.NzTagModule,b.NzInputModule,w.NzToolTipModule],declarations:N(F),exports:N(F)}]}],t}();t.STColumnSource=B,t.STComponent=q,t.STConfig=E,t.STDataSource=j,t.STExport=R,t.STModule=H,t.STRowDirective=D,t.ɵa=P,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=table.umd.min.js.map