@firestitch/filter 9.8.4 → 9.8.8
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/app/components/filters-item/text/text.component.d.ts +2 -0
- package/app/interfaces/config.interface.d.ts +2 -1
- package/bundles/firestitch-filter.umd.js +20 -11
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/bundles/firestitch-filter.umd.min.js +2 -2
- package/bundles/firestitch-filter.umd.min.js.map +1 -1
- package/esm2015/app/components/filter/filter.component.js +2 -2
- package/esm2015/app/components/filters-item/text/text.component.js +15 -5
- package/esm2015/app/interfaces/config.interface.js +1 -1
- package/esm2015/app/models/items/date-range/base-date-range-item.js +3 -4
- package/esm2015/app/models/items/range-item.js +3 -4
- package/esm2015/public_api.js +1 -1
- package/esm5/app/components/filter/filter.component.js +2 -2
- package/esm5/app/components/filters-item/text/text.component.js +16 -5
- package/esm5/app/interfaces/config.interface.js +1 -1
- package/esm5/app/models/items/date-range/base-date-range-item.js +3 -4
- package/esm5/app/models/items/range-item.js +3 -4
- package/esm5/public_api.js +1 -1
- package/fesm2015/firestitch-filter.js +19 -11
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/fesm5/firestitch-filter.js +20 -11
- package/fesm5/firestitch-filter.js.map +1 -1
- package/firestitch-filter.metadata.json +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("rxjs"),require("rxjs/operators"),require("lodash-es"),require("tsmodels"),require("@firestitch/common"),require("@firestitch/date"),require("date-fns"),require("@angular/common"),require("@angular/material/dialog"),require("@firestitch/drawer"),require("@firestitch/store"),require("@angular/forms"),require("@angular/material/autocomplete"),require("@angular/material/button"),require("@angular/material/checkbox"),require("@angular/material/chips"),require("@angular/material/icon"),require("@angular/material/input"),require("@angular/material/select"),require("@angular/cdk/portal"),require("@angular/flex-layout"),require("@firestitch/datepicker"),require("@firestitch/chip"),require("@firestitch/label"),require("@firestitch/scroll"),require("@firestitch/autocomplete"),require("@firestitch/autocomplete-chips"),require("@firestitch/mask"),require("@firestitch/menu"),require("@firestitch/skeleton"),require("@firestitch/form"),require("@angular/cdk/overlay"),require("@angular/cdk/layout"),require("@firestitch/file")):"function"==typeof define&&define.amd?define("@firestitch/filter",["exports","@angular/core","@angular/router","rxjs","rxjs/operators","lodash-es","tsmodels","@firestitch/common","@firestitch/date","date-fns","@angular/common","@angular/material/dialog","@firestitch/drawer","@firestitch/store","@angular/forms","@angular/material/autocomplete","@angular/material/button","@angular/material/checkbox","@angular/material/chips","@angular/material/icon","@angular/material/input","@angular/material/select","@angular/cdk/portal","@angular/flex-layout","@firestitch/datepicker","@firestitch/chip","@firestitch/label","@firestitch/scroll","@firestitch/autocomplete","@firestitch/autocomplete-chips","@firestitch/mask","@firestitch/menu","@firestitch/skeleton","@firestitch/form","@angular/cdk/overlay","@angular/cdk/layout","@firestitch/file"],t):t(((e=e||self).firestitch=e.firestitch||{},e.firestitch.filter={}),e.ng.core,e.ng.router,e.rxjs,e.rxjs.operators,e.lodashEs,e.tsmodels,e.common,e.date,e.dateFns,e.ng.common,e.ng.material.dialog,e.drawer,e.store,e.ng.forms,e.ng.material.autocomplete,e.ng.material.button,e.ng.material.checkbox,e.ng.material.chips,e.ng.material.icon,e.ng.material.input,e.ng.material.select,e.ng.cdk.portal,e.ng.flexLayout,e.datepicker,e.chip,e.label,e.scroll,e.autocomplete$1,e.autocompleteChips,e.mask,e.menu,e.skeleton,e.form,e.ng.cdk.overlay,e.ng.cdk.layout,e.file)}(this,(function(e,t,i,n,o,r,a,s,l,c,u,p,f,m,h,d,y,g,b,v,_,C,I,O,w,x,F,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/router"),require("rxjs"),require("rxjs/operators"),require("lodash-es"),require("tsmodels"),require("@firestitch/common"),require("@firestitch/date"),require("date-fns"),require("@angular/common"),require("@angular/material/dialog"),require("@firestitch/drawer"),require("@firestitch/store"),require("@angular/forms"),require("@angular/material/autocomplete"),require("@angular/material/button"),require("@angular/material/checkbox"),require("@angular/material/chips"),require("@angular/material/icon"),require("@angular/material/input"),require("@angular/material/select"),require("@angular/cdk/portal"),require("@angular/flex-layout"),require("@firestitch/datepicker"),require("@firestitch/chip"),require("@firestitch/label"),require("@firestitch/scroll"),require("@firestitch/autocomplete"),require("@firestitch/autocomplete-chips"),require("@firestitch/mask"),require("@firestitch/menu"),require("@firestitch/skeleton"),require("@firestitch/form"),require("@angular/cdk/overlay"),require("@angular/cdk/layout"),require("@firestitch/file")):"function"==typeof define&&define.amd?define("@firestitch/filter",["exports","@angular/core","@angular/router","rxjs","rxjs/operators","lodash-es","tsmodels","@firestitch/common","@firestitch/date","date-fns","@angular/common","@angular/material/dialog","@firestitch/drawer","@firestitch/store","@angular/forms","@angular/material/autocomplete","@angular/material/button","@angular/material/checkbox","@angular/material/chips","@angular/material/icon","@angular/material/input","@angular/material/select","@angular/cdk/portal","@angular/flex-layout","@firestitch/datepicker","@firestitch/chip","@firestitch/label","@firestitch/scroll","@firestitch/autocomplete","@firestitch/autocomplete-chips","@firestitch/mask","@firestitch/menu","@firestitch/skeleton","@firestitch/form","@angular/cdk/overlay","@angular/cdk/layout","@firestitch/file"],t):t(((e=e||self).firestitch=e.firestitch||{},e.firestitch.filter={}),e.ng.core,e.ng.router,e.rxjs,e.rxjs.operators,e.lodashEs,e.tsmodels,e.common,e.date,e.dateFns,e.ng.common,e.ng.material.dialog,e.drawer,e.store,e.ng.forms,e.ng.material.autocomplete,e.ng.material.button,e.ng.material.checkbox,e.ng.material.chips,e.ng.material.icon,e.ng.material.input,e.ng.material.select,e.ng.cdk.portal,e.ng.flexLayout,e.datepicker,e.chip,e.label,e.scroll,e.autocomplete$1,e.autocompleteChips,e.mask,e.menu,e.skeleton,e.form,e.ng.cdk.overlay,e.ng.cdk.layout,e.file)}(this,(function(e,t,i,n,o,r,a,s,l,c,u,p,f,m,h,d,y,g,b,v,_,C,I,O,w,x,k,F,A,D,j,P,$,S,T,V,M){"use strict";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var R=function(e,t){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function B(e,t){function i(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var E,q=function(){return(q=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function K(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}function U(e,t){return function(i,n){t(i,n,e)}}function z(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function L(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return a}function W(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(N(arguments[t]));return e}(E=e.ItemType||(e.ItemType={})).Text="text",E.Select="select",E.Range="range",E.Date="date",E.DateTime="datetime",E.DateRange="daterange",E.DateTimeRange="datetimerange",E.AutoComplete="autocomplete",E.AutoCompleteChips="autocompletechips",E.Checkbox="checkbox",E.Chips="chips",E.Keyword="keyword";var Q=function(){function t(e,t){this._additionalConfig=t,this._initialized=!1,this._pendingValues=!1,this._loading$=new n.BehaviorSubject(!1),this._value$=new n.BehaviorSubject(null),this._valueChange$=new n.Subject,this._values$=new n.BehaviorSubject(null),this._destroy$=new n.Subject,this._clear$=new n.Subject,this._type=e.type,this._parseConfig(e)}return Object.defineProperty(t.prototype,"isTypeAutocomplete",{get:function(){return this.type===e.ItemType.AutoComplete},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeAutocompleteChips",{get:function(){return this.type===e.ItemType.AutoCompleteChips},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeChips",{get:function(){return this.type===e.ItemType.Chips},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeCheckbox",{get:function(){return this.type===e.ItemType.Checkbox},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeSelect",{get:function(){return this.type===e.ItemType.Select},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDate",{get:function(){return this.type===e.ItemType.Date},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDateRange",{get:function(){return this.type===e.ItemType.DateRange},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeRange",{get:function(){return this.type===e.ItemType.Range},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDateTimeRange",{get:function(){return this.type===e.ItemType.DateTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDateTime",{get:function(){return this.type===e.ItemType.DateTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeKeyword",{get:function(){return this.type===e.ItemType.Keyword},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return!!this.model},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroy$",{get:function(){return this._destroy$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPendingValues",{get:function(){return this._pendingValues},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this._model},set:function(e){this._setModel(e),this.valueChanged()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._values$.getValue()},set:function(e){this._values$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"values$",{get:function(){return this._values$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChange$",{get:function(){return this._valueChange$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value$",{get:function(){return this._value$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clear$",{get:function(){return this._clear$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loading$",{get:function(){return this._loading$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loading",{get:function(){return this._loading$.getValue()},set:function(e){this._loading$.next(e)},enumerable:!0,configurable:!0}),t.prototype.valueChanged=function(){this._value$.next(this.value),this.change&&this.change(this),this.initialized&&this._valueChange$.next()},Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t=this.name,i={};return Array.isArray(e)?i[this.name]=e.join(","):i[t]=e,i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"persistanceObject",{get:function(){return this.queryObject},enumerable:!0,configurable:!0}),t.prototype.initValues=function(t){this._initialized=!1,this.persistedValue=t,this._initDefaultModel();var i=this.type===e.ItemType.AutoComplete||this.type===e.ItemType.AutoCompleteChips;if(this._valuesFn&&!i){var o=this._valuesFn();n.isObservable(o)?this._pendingValues=!0:(this.values=o,this._init(),this._initialized=!0)}else this._init(),this._initialized=!0},t.prototype.loadAsyncValues=function(e){var t=this;void 0===e&&(e=!0),(e||!this.loading&&this.hasPendingValues)&&(this.loading=!0,this._valuesFn().pipe(o.take(1),o.takeUntil(this._destroy$)).subscribe((function(e){t.values=e,t._pendingValues=!1,t.loading=!1,t._init(),t._validateModel(),t._initialized=!0})))},t.prototype.clear=function(e){void 0===e&&(e=void 0),(this.isTypeRange||this.isTypeDateRange||this.isTypeDateTimeRange)&&console.warn("\n Filter "+this.name+" can not be cleared with .clear() method!\n Use special .clearRange() or clearDateRange() instead.\n "),this._clear$.next(e),this._clearValue(e)},t.prototype.getChipsContent=function(e){return""},t.prototype.destroy=function(){this._destroy$.next(),this._destroy$.complete()},t.prototype._setModel=function(e){this._model=e},t.prototype._parseConfig=function(e){var t,i,n;this.name=e.name,this.label=e.label,this.chipLabel=e.chipLabel,this.defaultValue=e.default,this.change=e.change,this.hide=e.hide,this.clearAllowed=null===(t=e.clear)||void 0===t||t,this.persistanceDisabled=null!==(i=e.disablePersist)&&void 0!==i&&i,this.queryParamsDisabled=null!==(n=e.disableQueryParams)&&void 0!==n&&n,r.isFunction(e.values)?this._valuesFn=e.values:this.values=e.values},t.prototype._initDefaultModel=function(){var e,t=null!==(e=this.persistedValue)&&void 0!==e?e:this.defaultValue;void 0!==t&&(this.model=t)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null},t}(),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.prototype._parseConfig=function(t){this.multiple=t.multiple,this.children=t.children,t.isolate&&(this.isolate=q(q({},t.isolate),{enabled:!1})),e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){var e=this;Array.isArray(this.values)||(this.values=[]),this.isolate&&(this.values=this.values.filter((function(t){return Array.isArray(e.isolate.value)?-1===e.isolate.value.indexOf(t.value):t.value!==e.isolate.value})))},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.isolate&&(this.isolate.enabled=!1)},t}(Q),H=function(e){function t(t,i){return e.call(this,t,i)||this}return B(t,e),Object.defineProperty(t.prototype,"value",{get:function(){var e=this.model;return"__all"!=e&&void 0!==e||(e=null),e},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){var t,i=this;return void 0===e&&(e=null),this.children?(t=function e(t,i,n){for(var o=0;o<t.length;o++){var r=t[o];if(r[n])return e(r[n],i,n);if(r.value===i)return r}}(this.values,this.model,this.children))&&t.name:(t=this.values.find((function(e){return e.value===i.model})))?t.name:this.isolate?this.isolate.label:void 0},Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return"__all"!==this.model&&void 0!==this.model},enumerable:!0,configurable:!0}),t.prototype._init=function(){e.prototype._init.call(this),void 0===this.model&&void 0===this.defaultValue&&(this._model="__all")},t.prototype._setModel=function(t){t&&(isNaN(t)||(t=+t)),e.prototype._setModel.call(this,t)},t.prototype._validateModel=function(){var e=this,t=this.values.find((function(t){return t.value==e.model})),i=t?t.value:"__all";this._model!==i&&(this.model=i)},t.prototype._clearValue=function(t){void 0===t&&(t=void 0),e.prototype._clearValue.call(this,t);var i=Array.isArray(this.values)&&this.values.some((function(e){return"__all"===e.value}))?"__all":null;this.model=null!=t?t:i},t}(Y),G=function(e){function t(t){void 0===t&&(t={});var i=e.call(this)||this;return i.load=!0,i.persist=!1,i.inline=!1,i.autofocus=!1,i.chips=!1,i.sortValues=null,i.sort=null,i.sortDirection=null,i.queryParam=!1,i.case="snake",i._fromJSON(t),i._init(),i}return B(t,e),t.prototype._init=function(){this.button||(this.button={}),void 0===this.button.label&&(this.button.label="Filters"),void 0===this.button.icon&&(this.button.icon="tune"),void 0===this.button.style&&(this.button.style="raised"),void 0===this.button.color&&(this.button.color="default"),void 0===this.clear&&(this.clear=function(){})},t.prototype._fromJSON=function(t){var i;e.prototype._fromJSON.call(this,t),this.case=null!==(i=t.case)&&void 0!==i?i:"snake",this.persist&&"object"==typeof this.persist&&this.persist.name&&(this.namespace=this.persist.name)},K([a.Alias(),z("design:type",Object)],t.prototype,"load",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"persist",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"savedFilters",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"inline",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"autofocus",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"chips",void 0),K([a.Alias("sorts"),z("design:type",Array)],t.prototype,"sortValues",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"sort",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"sortDirection",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"queryParam",void 0),K([a.Alias(),z("design:type",Function)],t.prototype,"init",void 0),K([a.Alias(),z("design:type",Function)],t.prototype,"change",void 0),K([a.Alias(),z("design:type",Function)],t.prototype,"reload",void 0),K([a.Alias(),z("design:type",Function)],t.prototype,"clear",void 0),K([a.Alias(),z("design:type",Function)],t.prototype,"sortChange",void 0),K([a.Alias(),z("design:type",String)],t.prototype,"case",void 0),K([a.Alias(),z("design:type",Boolean)],t.prototype,"reloadWhenConfigChanged",void 0),K([a.Alias(),z("design:type",Object)],t.prototype,"button",void 0),K([a.Alias(),z("design:type",Array)],t.prototype,"items",void 0),K([a.Alias(),z("design:type",Array)],t.prototype,"actions",void 0),t}(a.Model),J=function(e){function t(t,i){return e.call(this,t,i)||this}return B(t,e),Object.defineProperty(t.prototype,"value",{get:function(){var e=r.clone(this.model);return(!Array.isArray(e)||0===e.length||e.indexOf("__all")>-1)&&(e=null),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return Array.isArray(this.model)&&this.model.length>0},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){var t=this;return void 0===e&&(e=null),this.model.reduce((function(e,i){var n,o=t.values.find((function(e){return e.value===i}));return o?n=o.name:t.isolate&&t.isolate.enabled&&(n=t.isolate.label),e.includes(n)||e.push(n),e}),[]).join(", ")},t.prototype._init=function(){e.prototype._init.call(this),void 0!==this.model||Array.isArray(this.defaultValue)||(this.model=[])},t.prototype._setModel=function(t){Array.isArray(t)&&(t=t.map((function(e){return isNaN(e)?e:+e}))),e.prototype._setModel.call(this,t)},t.prototype._validateModel=function(){var e=this;this.model=s.filter(this.model||[],(function(t){return e.values.find((function(e){return e.value==t}))}))},t.prototype._clearValue=function(t){void 0===t&&(t=void 0),e.prototype._clearValue.call(this,t),this.model=null!=t?t:[]},t}(Y),Z=function(){function e(){}return e.create=function(e){return e.multiple?new J(e,null):new H(e,null)},e}(),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"isTypeChips",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=r.clone(this.model);return Array.isArray(e)&&0===e.length?null:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return!!this.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e,t=this.value;return(e={})[this.name]=t,e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"persistanceObject",{get:function(){var e=this.value,t=this.name,i={};return Array.isArray(e)?i[t]=e.join(","):i[t]=null,i},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model.reduce((function(e,t){return e.push(t.name),e}),[]).join(", ")},t.prototype._validateModel=function(){},t.prototype._setModel=function(e){Array.isArray(e)&&(e=e.map((function(e){return isNaN(e)?e:+e}))),this._model=e},t.prototype._parseConfig=function(t){this.multiple=t.multiple,e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){var e=this;Array.isArray(this.values)||(this.values=[]),this.model&&Array.isArray(this.model)&&this.values.length&&Number.isInteger(this.model[0])&&(this._model=this.model.map((function(t){return e.values.find((function(e){return e.value===t}))}))),void 0===this.model&&(this._model=[])},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:[]},t}(Q);function ee(e,t,i){return"snake"===e?t.concat("_").concat(i):"camel"===e?t.concat(i.charAt(0).toUpperCase()).concat(i.slice(1)):void 0}var te,ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e,i){return new t(e,i)},Object.defineProperty(t.prototype,"value",{get:function(){var e=r.clone(this.model);return(!r.isObject(this.model)||s.isEmpty(this.model.max,{zero:!0})&&s.isEmpty(this.model.min,{zero:!0}))&&(e=null),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e,t,i=this.value,n=this.name,o={},a=ee(this.case,n,"min"),s=ee(this.case,n,"max");return r.isObject(i)?(o[a]=null!==(e=i.min)&&void 0!==e?e:null,o[s]=null!==(t=i.max)&&void 0!==t?t:null):(o[a]=null,o[s]=null),o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return this.model&&(void 0!==this.model.min||void 0!==this.model.max)},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){return"from"===e?""+this.model.min:"to"===e?""+this.model.max:void 0},t.prototype.clearRange=function(e,t){void 0===e&&(e=null),void 0===t&&(t=void 0),"from"===e?(delete this.model.min,(null==t?void 0:t.min)&&(this.model.min=t.min),this.model=q({},this.model)):"to"===e?(delete this.model.max,(null==t?void 0:t.max)&&(this.model.max=t.max),this.model=q({},this.model)):this.model=t?q({},t):{}},t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){var i,n;this.options=t.options,this.prefix=t.prefix,this.suffix=t.suffix,this.case=null!==(n=null===(i=this._additionalConfig)||void 0===i?void 0:i.case)&&void 0!==n?n:"camel",e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){this.label||(this.label=["Min","Max"]),this.model||(this.model=this.defaultValue||{})},t}(Q),ne=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return B(i,t),Object.defineProperty(i.prototype,"isTypeDateRange",{get:function(){return this.type===e.ItemType.DateRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isTypeDateTimeRange",{get:function(){return this.type===e.ItemType.DateTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isChipVisible",{get:function(){return this.model&&(void 0!==this.model.from||void 0!==this.model.to)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){var e=r.clone(this.model);if((!r.isObject(this.model)||s.isEmpty(this.model.from,{zero:!0})&&s.isEmpty(this.model.to,{zero:!0}))&&(e=null),s.isEmpty(e,{zero:!0}))return null;var t=e.from,i=e.to;return e={},t&&(r.isString(t)&&(t=c.parseISO(t)),c.isValid(t)&&c.isDate(t)&&(e.from=t)),i&&(r.isString(i)&&(i=c.parseISO(i)),c.isValid(i)&&c.isDate(i)&&(e.to=i)),e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"queryObject",{get:function(){var e,t,i,n=this.value||{},o=this.name,r=ee(this.case,o,"from"),a=ee(this.case,o,"to");return(e={})[r]=null!==(t=n.from)&&void 0!==t?t:null,e[a]=null!==(i=n.to)&&void 0!==i?i:null,e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"persistanceObject",{get:function(){var e=this.queryObject;return Object.keys(this.queryObject).reduce((function(t,i){return e[i]?t[i]=l.simpleFormat(e[i]):t[i]=e[i],t}),{})},enumerable:!0,configurable:!0}),i.prototype.getChipsContent=function(t){void 0===t&&(t=null);var i=this.type===e.ItemType.DateRange?"date":"date-time";if("from"===t){var n=this.model.from;return""+l.format(n,i)}if("to"===t){var o=this.model.to;return""+l.format(o,i)}},i.prototype.clearDateRange=function(e,t){void 0===e&&(e=null),void 0===t&&(t=void 0),"from"===e?(delete this.model.from,(null==t?void 0:t.from)&&(this.model.from=t.from),this.model=q({},this.model)):"to"===e?(delete this.model.to,(null==t?void 0:t.to)&&(this.model.to=t.to),this.model=q({},this.model)):this.model=t?q({},t):{}},i.prototype._validateModel=function(){},i.prototype._setModel=function(e){e&&(!e.from||c.isDate(e.from)&&c.isValid(e.from)||(e.from=c.parseISO(e.from)),!e.to||c.isDate(e.to)&&c.isValid(e.to)||(e.to=c.parseISO(e.to))),t.prototype._setModel.call(this,e)},i.prototype._parseConfig=function(e){var i,n;this.case=null!==(n=null===(i=this._additionalConfig)||void 0===i?void 0:i.case)&&void 0!==n?n:"camel",t.prototype._parseConfig.call(this,e)},i.prototype._init=function(){this.label||(this.label=["Date From","Date To"]),this.model||(this.model=this.defaultValue||{})},i.prototype._clearValue=function(e){var t;void 0===e&&(e=void 0),this.model=null!==(t=this.defaultValue)&&void 0!==t?t:{}},i}(Q),oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},t}(ne),re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},t}(ne);(te=e.ItemDateMode||(e.ItemDateMode={})).Calendar="calendar",te.ScrollMonthYear="monthyear",te.ScrollMonthDayYear="monthdayyear";var ae=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return B(i,t),Object.defineProperty(i.prototype,"value",{get:function(){var e=r.clone(this.model);return e&&c.isValid(e)&&c.isDate(e)?e:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=e,t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"persistanceObject",{get:function(){var e,t=this.queryObject[this.name];return(e={})[this.name]=t?l.simpleFormat(t):null,e},enumerable:!0,configurable:!0}),i.prototype._validateModel=function(){},i.prototype._setModel=function(e){e&&(c.isDate(e)&&c.isValid(e)||(e=c.parseISO(e))),t.prototype._setModel.call(this,e)},i.prototype._parseConfig=function(i){this.maxYear=i.maxYear,this.mode=i.mode||e.ItemDateMode.Calendar,t.prototype._parseConfig.call(this,i)},i.prototype._init=function(){this.label||(this.label=["Min","Max"])},i}(Q),se=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return B(i,t),i.create=function(e){return new i(e,null)},i.prototype.getChipsContent=function(t){void 0===t&&(t=null);var i="date";return this.mode==e.ItemDateMode.ScrollMonthYear&&(i="full-date-dayless"),l.format(this.model,i)},i.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null},i}(ae),le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null},t}(ae),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),Object.defineProperty(t.prototype,"valuesFn",{get:function(){return this._valuesFn},enumerable:!0,configurable:!0}),t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){var i;this.fetchOnFocus=null===(i=t.fetchOnFocus)||void 0===i||i,e.prototype._parseConfig.call(this,t)},t}(Q),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"value",{get:function(){r.clone(this.model);return!this.model||s.isEmpty(this.model.value,{zero:!0})?null:this.model.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=e,t},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model?this.model.name:""},t.prototype._init=function(){},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null,this.search=""},t}(ce),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"value",{get:function(){return Array.isArray(this.model)&&0===this.model.length?null:r.clone(this.model)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t=this.name,i={};return Array.isArray(e)?i[this.name]=e.filter((function(e){return!!e.value})).map((function(e){return e.value})).join(","):i[t]=e,i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return Array.isArray(this.model)&&this.model.length>0},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model.reduce((function(e,t){return e.push(t.name),e}),[]).join(", ")},t.prototype._init=function(){void 0===this.model&&(this._model=[])},t.prototype._parseConfig=function(t){var i;this.chipImage=null!==(i=t.chipImage)&&void 0!==i?i:"image",this.chipIcon=t.chipIcon,this.chipIconColor=t.chipIconColor,this.chipColor=t.chipColor,this.chipBackground=t.chipBackground,this.chipClass=t.chipClass,e.prototype._parseConfig.call(this,t)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:[],this.search=""},t.prototype._setModel=function(t){e.prototype._setModel.call(this,t||[])},t}(ce),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"isTypeCheckbox",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return this.value===this.checked},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=this.model?this.checked:this.unchecked;return e||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=this.model?e:null,t},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){return void 0===e&&(e=null),this.label},t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){this.checked=t.checked,this.unchecked=t.unchecked,this.checked=!t.checked||r.toString(t.checked),this.unchecked=!!t.unchecked&&r.toString(t.unchecked),this.defaultValue=void 0===t.default?this.unchecked:r.toString(this.defaultValue),e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){void 0===this.model&&(this._model=this.checked==this.defaultValue)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e&&e},t}(Q),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"value",{get:function(){return this.model?this.model:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=e,t},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model},t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){this.prefix=t.prefix,this.suffix=t.suffix,e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:""},t}(Q);var he=function(){function i(){this.sortByItem=null,this.sortDirectionItem=null,this.keywordItem=null,this._items=[],this._visibleItems$=new n.BehaviorSubject([]),this._itemsByName=new Map,this._itemsValuesLoaded=!1,this._hasKeyword=!1,this._itemsChange$=new n.Subject}return Object.defineProperty(i.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visibleItems",{get:function(){return this._visibleItems$.getValue()},set:function(e){this._visibleItems$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visibleItems$",{get:function(){return this._visibleItems$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasKeyword",{get:function(){return this._hasKeyword},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemsChange$",{get:function(){return this._itemsChange$.pipe(o.debounceTime(30))},enumerable:!0,configurable:!0}),i.prototype.ngOnDestroy=function(){this.destroyItems()},i.prototype.setConfig=function(e){this._itemsByName.clear(),this._config=e,this.initItems(e.items)},i.prototype.getItemByName=function(e){return this._itemsByName.get(e)},i.prototype.initItems=function(e){this._itemsValuesLoaded=!1,Array.isArray(e)&&(this._createItems(e),this.updateVisibleItems(),this._setKeywordItem())},i.prototype.filtersClear=function(){var e;this.items.forEach((function(e){e instanceof ie?e.clearRange(null,e.defaultValue):e instanceof ne?e.clearDateRange(null,e.defaultValue):e.clear(e.defaultValue)})),this.sortByItem&&(this._config.sort?this.sortByItem.model=this._config.sort.value:this.sortByItem.clear(this.sortByItem.defaultValue)),this.sortDirectionItem&&(this._config.sort?this.sortDirectionItem.model=this._config.sort.direction:this.sortDirectionItem.clear(this.sortDirectionItem.defaultValue)),null===(e=this.keywordItem)||void 0===e||e.clear()},i.prototype.loadAsyncValues=function(){this.items.filter((function(e){return e.hasPendingValues})).forEach((function(e){return e.loadAsyncValues()}))},i.prototype.getSort=function(){var e=this.getSortByValue();e="__all"===e?null:e;var t=this.getSortDirectionValue();return{value:e,direction:t="__all"===t?null:t}},i.prototype.getSortByValue=function(){return this.sortByItem?this.sortByItem.model:null},i.prototype.getSortDirectionValue=function(){return this.sortDirectionItem?this.sortDirectionItem.model:null},i.prototype.updateSort=function(e){e.sortBy&&(this.sortByItem.model=e.sortBy),e.sortDirection&&(this.sortDirectionItem.model=e.sortDirection)},i.prototype.values=function(e){return void 0===e&&(e=!1),this.items.reduce((function(t,i){var n=i.value;return e&&null===n||(t[i.name]=n),t}),{})},i.prototype.valuesAsQuery=function(e){var t=void 0===e?{}:e,i=t.onlyPresented,n=void 0===i||i,o=t.items,a=void 0===o?null:o,s=t.persisted,l=void 0!==s&&s,c={};return(a||this.items).forEach((function(e){var t=l?e.persistanceObject:e.queryObject;Object.assign(c,t)})),n?r.pickBy(c,(function(e){return null!=e})):c},i.prototype.initItemValues=function(e){this.items.forEach((function(t){t.initValues(e[t.name])})),this._createSortingItems(e),this._subscribeToItemsChanges()},i.prototype.updateItemsWithValues=function(e){this.items.forEach((function(t){e[t.name]?t.model=e[t.name]:t.clear()})),this.sortByItem&&this.sortByItem.clear(),this.sortDirectionItem&&this.sortDirectionItem.clear()},i.prototype.destroyItems=function(){var e,t;this.items.forEach((function(e){return e.destroy()})),null===(e=this.sortByItem)||void 0===e||e.destroy(),null===(t=this.sortDirectionItem)||void 0===t||t.destroy(),this._items=[],this.sortByItem=null,this.sortDirectionItem=null},i.prototype.prepareItems=function(){this._itemsValuesLoaded||(this._itemsValuesLoaded=!0,this.loadAsyncValues())},i.prototype.updateVisibleItems=function(){this.visibleItems=this.items.filter((function(e){return!e.isTypeKeyword&&!e.hide}))},i.prototype._createItems=function(t){var i=this;this._items=t.filter((function(e){return!e.disable})).filter((function(e){if(i._itemsByName.has(e.name))throw Error("Filter init error. Items name must be unique.");return i._itemsByName.set(e.name,null),!0})).map((function(t){var n=function(t,i){switch(t.type){case e.ItemType.Select:return Z.create(t);case e.ItemType.Chips:return X.create(t);case e.ItemType.Range:return ie.create(t,i);case e.ItemType.DateRange:return oe.create(t);case e.ItemType.DateTimeRange:return re.create(t);case e.ItemType.Date:return se.create(t);case e.ItemType.DateTime:return le.create(t);case e.ItemType.AutoComplete:return ue.create(t);case e.ItemType.AutoCompleteChips:return pe.create(t);case e.ItemType.Checkbox:return fe.create(t);case e.ItemType.Keyword:case e.ItemType.Text:return me.create(t)}}(t,{case:i._config.case});return n.type===e.ItemType.Keyword&&(i._hasKeyword=!0),i._itemsByName.set(t.name,n),n}))},i.prototype._subscribeToItemsChanges=function(){var e,t=this;this.items.forEach((function(e){e.valueChange$.pipe(o.takeUntil(e.destroy$)).subscribe((function(){t._itemsChange$.next(e)}))})),(null===(e=this._config.sortValues)||void 0===e?void 0:e.length)&&(this.sortByItem.valueChange$.pipe(o.takeUntil(this.sortByItem.destroy$)).subscribe((function(){t._itemsChange$.next(t.sortByItem)})),this.sortDirectionItem.valueChange$.pipe(o.takeUntil(this.sortDirectionItem.destroy$)).subscribe((function(){t._itemsChange$.next(t.sortDirectionItem)})))},i.prototype._createSortingItems=function(t){var i;if((null===(i=this._config.sortValues)||void 0===i?void 0:i.length)>0){var n={name:"system_sort_by",type:e.ItemType.Select,label:"Sort By",values:this._config.sortValues};this._config.sort&&this._config.sort.value&&(n.default=this._config.sort.value),this.sortByItem=new H(n,null),this.sortByItem.initValues(t[this.sortByItem.name]);var o={name:"system_sort_direction",type:e.ItemType.Select,label:"Sort Direction",values:[{name:"Ascending",value:"asc"},{name:"Descending",value:"desc"}]};this._config.sort&&this._config.sort.direction&&(o.default=this._config.sort.direction),this.sortDirectionItem=new H(o,null),this.sortDirectionItem.initValues(t[this.sortDirectionItem.name])}},i.prototype._setKeywordItem=function(){this.keywordItem=this.items.find((function(e){return e.isTypeKeyword}))},i=K([t.Injectable(),z("design:paramtypes",[])],i)}();function de(e,t){return encodeURIComponent(e)+":"+encodeURIComponent(t)}function ye(e){var t=e.split(":");return[decodeURIComponent(t[0]),decodeURIComponent(t[1])]}function ge(e){return isNaN(e)?e:+e}function be(t,i,n){var o,r,a=i[t.name];switch(t.type){case e.ItemType.Range:return{min:i[ee(n,t.name,"min")],max:i[ee(n,t.name,"max")]};case e.ItemType.DateRange:case e.ItemType.DateTimeRange:return{from:i[ee(t.case,t.name,"from")],to:i[ee(t.case,t.name,"to")]};case e.ItemType.Select:if(t.multiple&&a){var s=a.split(",");if(t.isolate){var l=Array.isArray(t.isolate.value)?t.isolate.value:[t.isolate.value];return t.isolate.enabled=(r=s,o=W(o=l).sort(),r=W(r).sort(),o.some((function(e){return r.includes(e)}))),t.isolate.enabled?l:s}return s}return a;case e.ItemType.Checkbox:return"true"===a?!0===t.checked:a===t.checked;case e.ItemType.AutoComplete:return{name:(c=ye(a))[1],value:ge(c[0])};case e.ItemType.AutoCompleteChips:case e.ItemType.Chips:var c;return(c=a.split(",")).reduce((function(e,t){var i=ye(t);return e.push({name:i[1],value:ge(i[0])}),e}),[]);default:return a}}function ve(e,t,i){var n={};return Object.keys(e).forEach((function(o){var r=function(e,t){return e.find((function(e){return e instanceof ie?t===ee(e.case,e.name,"min")||t===ee(e.case,e.name,"max")||t===e.name:e instanceof oe||e instanceof re?t===ee(e.case,e.name,"from")||t===ee(e.case,e.name,"to"):e.name===t}))}(t,o);r&&(n[r.name]=be(r,e,i))})),n}var _e=function(e){function n(t,i,n,o,r,a){var s=e.call(this,t,i)||this;return s._location=n,s._itemsStore=o,s._dialogRef=r,s._drawerRef=a,s.STORE_KEY="fs-filter-persist",s}return B(n,e),Object.defineProperty(n.prototype,"enalbed",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),n.prototype.init=function(e,t,i){this._paramsCase=i,t=null!=t?t:s.getNormalizedPath(this._location);var n=!!this._dialogRef||!!this._drawerRef;this.setConfig(e,t,n)},n.prototype.restore=function(){e.prototype.restore.call(this),this._value&&(this._value.data=ve(this._value.data,this._itemsStore.items,this._paramsCase))},n.ctorParameters=function(){return[{type:m.FsStore},{type:i.ActivatedRoute},{type:u.Location},{type:he},{type:p.MatDialogRef,decorators:[{type:t.Optional}]},{type:f.DrawerRef,decorators:[{type:t.Optional}]}]},n=K([t.Injectable(),U(4,t.Optional()),U(5,t.Optional()),z("design:paramtypes",[m.FsStore,i.ActivatedRoute,u.Location,he,p.MatDialogRef,f.DrawerRef])],n)}(m.FsPersistanceStore),Ce=function(){function e(e,t,i){this._router=e,this._route=t,this._itemsStore=i,this._enabled=!1}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fetchedParams",{get:function(){return this._fetchedParams},enumerable:!0,configurable:!0}),e.prototype.init=function(e,t){this._enabled=e,this._paramsCase=t,this.enabled&&this.fetchFromQueryParams()},e.prototype.writeStateToQueryParams=function(e){this._enabled&&this._router.navigate([],{replaceUrl:!0,relativeTo:this._route,queryParams:e,queryParamsHandling:"merge"}).then((function(){}))},e.prototype.fetchFromQueryParams=function(){this._fetchedParams=ve(this._route.snapshot.queryParams,this._itemsStore.items,this._paramsCase)},e.ctorParameters=function(){return[{type:i.Router},{type:i.ActivatedRoute},{type:he}]},e=K([t.Injectable(),z("design:paramtypes",[i.Router,i.ActivatedRoute,he])],e)}(),Ie=function(){function e(e,t){var i=this;this.data=e,this._dialogRef=t,this.saveAsFilter="new",this.savedFilterName="",this._destroy$=new n.Subject,this.save=function(){var e;return e="new"===i.saveAsFilter?{name:i.savedFilterName,active:!0,filters:i.data.params}:q(q({},i.saveAsFilter),{filters:i.data.params}),i._saveCallback(e).pipe(o.tap((function(e){i._dialogRef.close(e)})),o.takeUntil(i._destroy$))},this.savedFilters=this.data.savedFilters,this._saveCallback=this.data.saveCallback}return e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[p.MAT_DIALOG_DATA]}]},{type:p.MatDialogRef}]},e=K([t.Component({template:'<form fsForm [submit]="save">\n <h1 mat-dialog-title>\n Save Filter\n </h1>\n <div mat-dialog-content>\n <mat-form-field>\n <mat-label>Save as</mat-label>\n <mat-select [(ngModel)]="saveAsFilter" name="saveAs">\n <mat-option value="new">New filter</mat-option>\n <mat-optgroup label="Saved filters:">\n <ng-container *ngFor="let filter of savedFilters">\n <mat-option [value]="filter">{{ filter.name }}</mat-option>\n </ng-container>\n </mat-optgroup>\n </mat-select>\n </mat-form-field>\n <br>\n <mat-form-field *ngIf="saveAsFilter === \'new\'">\n <mat-label>Name</mat-label>\n <input matInput name="filter-name" [(ngModel)]="savedFilterName" required>\n </mat-form-field>\n </div>\n <div mat-dialog-actions>\n <button mat-button\n type="submit"\n color="primary">\n {{ saveAsFilter === \'new\' ? \'Create\' : \'Save\' }}\n </button>\n\n <button mat-button\n type="button"\n [mat-dialog-close]="null">\n Cancel\n </button>\n </div>\n</form>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),U(0,t.Inject(p.MAT_DIALOG_DATA)),z("design:paramtypes",[Object,p.MatDialogRef])],e)}();function Oe(e,t){return t.forEach((function(t){if(t instanceof J&&t.isolate&&t.multiple&&t.value){var i=s.list(t.values,"value").sort(),n=t.value.sort();c.isEqual(n,i)&&(e[t.name]=null)}t.isTypeAutocomplete?r.isObject(t.model)&&(e[t.name]=de(t.model.value,t.model.name)):(t.isTypeAutocompleteChips||t.isTypeChips)&&Array.isArray(t.model)&&t.model.length&&(e[t.name]=t.model.map((function(e){return de(e.value,e.name)})).join(","))})),e}var we=function(){function e(e,t){this._itemsStore=e,this._dialog=t,this._savedFilters$=new n.BehaviorSubject([]),this._activeFilter$=new n.BehaviorSubject(null),this._enabled$=new n.BehaviorSubject(!1),this._destroy$=new n.Subject}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled$",{get:function(){return this._enabled$.pipe(o.distinctUntilChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFilters",{get:function(){return this._savedFilters$.getValue()},set:function(e){this._savedFilters$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFilters$",{get:function(){return this._savedFilters$.pipe(o.distinctUntilChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilter",{get:function(){return this._activeFilter$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilter$",{get:function(){return this._activeFilter$.pipe(o.distinctUntilChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilterData",{get:function(){var e;return null===(e=this._activeFilter$.getValue())||void 0===e?void 0:e.filters},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.init=function(e,t){e?(this._setEnabledStatus(!0),this._paramsCase=t,this._config=e):this._setEnabledStatus(!1)},e.prototype.initSavedFilters=function(e){var t=this;(e=W(e)).forEach((function(e){e.filters=ve(e.filters,t._itemsStore.items,t._paramsCase)})),this.savedFilters=e},e.prototype.load=function(){var e=this;return this._config.load().pipe(o.tap((function(t){e.initSavedFilters(t)})))},e.prototype.save=function(e){return this._config.save(e)},e.prototype.order=function(e){var t=this;return this._config.order(e).pipe(o.tap((function(e){t.savedFilters=W(e)})))},e.prototype.delete=function(e){var t=this;return this._config.delete(e).pipe(o.tap((function(e){t.savedFilters=t.savedFilters.filter((function(t){return t.id!==e.id}))})))},e.prototype.setActiveFilter=function(e){if(e){var t=this.savedFilters.find((function(t){return t.id===e.id}));if(!t)throw new Error("Saved filter cannot be activated, because it does not exists. Filter ID = "+e.id);this._activeFilter$.next(t)}else this._activeFilter$.next(null)},e.prototype.openSavedFilterEditDialog=function(){var e=this,t=Oe(this._itemsStore.valuesAsQuery(),this._itemsStore.items),i=(this._itemsStore.values(!0),{data:{params:t,savedFilters:this.savedFilters,saveCallback:this.save.bind(this)}});this._dialog.open(Ie,i).beforeClosed().pipe(o.take(1),o.takeUntil(this._destroy$)).subscribe((function(t){if(t){var i=e.savedFilters.find((function(e){return e.id===t.id}));t.filters=ve(t.filters,e._itemsStore.items,e._paramsCase),i?Object.assign(i,t):(e.resetActiveFilter(),e.savedFilters=W(e.savedFilters,[t])),e.updateActiveFilter()}}))},e.prototype.updateActiveFilter=function(){var e=this.savedFilters.find((function(e){return e.active}));e&&this.setActiveFilter(e)},e.prototype.resetActiveFilter=function(){this.savedFilters.forEach((function(e){e.active=!1})),this.setActiveFilter(null)},e.prototype._setEnabledStatus=function(e){this._enabled$.next(e)},e.ctorParameters=function(){return[{type:he},{type:p.MatDialog}]},e=K([t.Injectable(),z("design:paramtypes",[he,p.MatDialog])],e)}(),xe=function(){function e(e,t,i,o,r){this._itemsStore=e,this._persistanceStore=t,this._queryParams=i,this._savedFilters=o,this._route=r,this._pending$=new n.BehaviorSubject(!1),this._shouldResetSavedFilters=!0,this._destroy$=new n.Subject}return Object.defineProperty(e.prototype,"params",{get:function(){var e,t={};return this._persistanceStore.enalbed&&Object.assign(t,null===(e=this._persistanceStore.value)||void 0===e?void 0:e.data),this._savedFilters.enabled&&this._savedFilters.activeFilter&&Object.assign(t,this._savedFilters.activeFilterData),this._queryParams.enabled&&Object.assign(t,this._queryParams.fetchedParams),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return this._pending$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending$",{get:function(){return this._pending$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFiltersController",{get:function(){return this._savedFilters},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFiltersEnabled",{get:function(){return this._savedFilters.enabled},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.setConfig=function(e){var t=this;this._config=e,this._initPersistance(),this._initQueryParams(),this._initSavedFilters(),this._pending$.next(!0),this._savedFilters.enabled?this._savedFilters.load().pipe(o.takeUntil(this._destroy$)).subscribe((function(){t._savedFilters.updateActiveFilter(),t._initItemsValues(),t._listenAndResetSavedFilters(),t._pending$.next(!1)})):(this._initItemsValues(),this._pending$.next(!1)),this._listenItemsChange()},e.prototype.setActiveSavedFilter=function(e){this.savedFiltersController.setActiveFilter(e),e&&this.reloadFiltersWithValues(e.filters,!1)},e.prototype.reloadFiltersWithValues=function(e,t){void 0===t&&(t=!0),this._shouldResetSavedFilters=t,this._itemsStore.updateItemsWithValues(e),this._saveQueryParams(),this._savePersistedParams()},e.prototype._initItemsValues=function(){this._itemsStore.initItemValues(this.params),this._saveQueryParams(),this._savePersistedParams()},e.prototype._initPersistance=function(){this._persistanceStore.init(this._config.persist,this._config.namespace,this._config.case)},e.prototype._initQueryParams=function(){this._queryParams.init(this._config.queryParam,this._config.case)},e.prototype._initSavedFilters=function(){this._savedFilters.init(this._config.savedFilters,this._config.case)},e.prototype._listenItemsChange=function(){var e=this;this._itemsStore.itemsChange$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e._saveQueryParams(),e._savePersistedParams()}))},e.prototype._listenAndResetSavedFilters=function(){var e=this;this._itemsStore.itemsChange$.pipe(o.filter((function(){return!!e.savedFiltersController.activeFilter})),o.switchMap((function(){var t=e._shouldResetSavedFilters;return e._shouldResetSavedFilters=!0,n.of(t)})),o.filter((function(e){return e})),o.takeUntil(this._destroy$)).subscribe((function(){e.savedFiltersController.resetActiveFilter()}))},e.prototype._saveQueryParams=function(){var e=this._itemsStore.items.filter((function(e){return!e.queryParamsDisabled})),t=Oe(this._itemsStore.valuesAsQuery({onlyPresented:!1,items:e,persisted:!0}),e);this._queryParams.writeStateToQueryParams(t)},e.prototype._savePersistedParams=function(){var e=this._itemsStore.items.filter((function(e){return!e.persistanceDisabled})),t=Oe(this._itemsStore.valuesAsQuery({onlyPresented:!1,items:e,persisted:!0}),e);this._persistanceStore.save(t)},e.ctorParameters=function(){return[{type:he},{type:_e},{type:Ce},{type:we},{type:i.ActivatedRoute}]},e=K([t.Injectable(),z("design:paramtypes",[he,_e,Ce,we,i.ActivatedRoute])],e)}(),Fe=new t.InjectionToken("fs.filter-config");function ke(e,t){var i,n;if(e.length!==t.length)return!1;try{for(var o=L(e),r=o.next();!r.done;r=o.next()){var a=r.value;if(-1===t.indexOf(a))return!1}}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return!0}var Ae,De,je=new t.InjectionToken("fs.filter-drawer-data"),Pe=new t.InjectionToken("fs.filter-drawer-overlay"),$e=function(){function e(e,t,i,n,o){this.externalParams=e,this._cd=t,this._itemsStore=i,this.overlayRef=n,this.data=o,this.inline=!1,this.windowDesktop=!1,this._itemsStore.prepareItems(),this._clear=o.clear,this._done=o.done,this.updateWindowWidth()}return e.prototype.updateWindowWidth=function(){this.windowDesktop=window.innerWidth>1200},Object.defineProperty(e.prototype,"items$",{get:function(){return this._itemsStore.visibleItems$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortItem",{get:function(){return this._itemsStore.sortByItem},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortDirectionItem",{get:function(){return this._itemsStore.sortDirectionItem},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._clear()},e.prototype.done=function(){this._done(),this.overlayRef.detach()},e.prototype.backdropClick=function(){this.done()},e.ctorParameters=function(){return[{type:xe},{type:t.ChangeDetectorRef},{type:he},{type:T.OverlayRef,decorators:[{type:t.Inject,args:[Pe]}]},{type:void 0,decorators:[{type:t.Inject,args:[je]}]}]},K([t.HostListener("window:resize"),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",void 0)],e.prototype,"updateWindowWidth",null),K([t.Input(),z("design:type",Object)],e.prototype,"inline",void 0),e=K([t.Component({template:'<div class="filters">\n <div class="filters-wrap">\n\n <div class="filter-by">\n <mat-icon>tune</mat-icon>\n <span class="text">Filters</span>\n </div>\n\n <div class="overflow-shadow filter-items">\n <div class="overflow-shadow-content">\n <ng-container *fsSkeleton="(externalParams.pending$ | async) !== true">\n <filter-item *ngFor="let filterItem of items$ | async"\n class="filter-group"\n [item]="filterItem">\n </filter-item>\n\n <ng-container *ngIf="sortItem && sortItem.values && sortItem.values.length > 0">\n <filter-item class="filter-group sort"\n [item]="sortItem">\n </filter-item>\n <filter-item class="filter-group sort"\n [item]="sortDirectionItem">\n </filter-item>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <fs-filter-drawer-actions class="filter-actions"\n *ngIf="(externalParams.pending$ | async) !== true"\n (clear)="clear()"\n (done)="done()">\n </fs-filter-drawer-actions>\n </div>\n</div>\n<div class="backdrop" *ngIf="!windowDesktop" (click)="backdropClick()"></div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host ::ng-deep mat-form-field{width:100%}.filter-by{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:20px 25px}.filter-by mat-icon{margin-right:8px}.filter-by .text{font-weight:400;font-size:19px}.filter-actions{display:block;box-sizing:border-box;padding:13px}.filter-actions button{margin-right:6px}.filter-actions button:last-child{margin-right:0}.filters{position:fixed;display:block;top:0;right:0;z-index:1002;bottom:0}.filters .filters-wrap{background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);width:85vw;max-width:350px;display:flex;flex-direction:column;height:100%}.filters .filters-wrap .filter-items{overflow-y:auto}.filters .filters-wrap .filter-items .overflow-shadow-content{padding:0 25px;box-sizing:border-box}.filters .filter-group{margin:10px 0 0}.filters .filter-group:first-child{margin:0}.filters .filter label{white-space:nowrap;color:rgba(0,0,0,.54)}.filters .filter .interface.interface-range,.filters .filter .interface.interface-range .mat-input-wrapper,.filters .filter .interface.interface-range input{text-align:center}.filters .filter .interface.interface-datetime fs-datetime.has-time .md-input{width:100%}.filters .filter .interface fs-datetime-range input{text-align:center}.filters .filter .filter-label{width:1%;white-space:nowrap;vertical-align:middle;padding-right:15px}.filters md-autocomplete-container md-input-container{margin:0}.filters .isolate{margin-top:-12px}.filters .isolate .interface{line-height:20px;padding-bottom:1.25em}.filters .isolate md-checkbox{margin:0 0 0 2px}.backdrop{position:fixed;top:0;bottom:0;left:0;right:0;z-index:900;outline:0}"]}),U(3,t.Inject(Pe)),U(4,t.Inject(je)),z("design:paramtypes",[xe,t.ChangeDetectorRef,he,T.OverlayRef,Object])],e)}(),Se=new t.InjectionToken("fs.filter.meta",{providedIn:"root",factory:function(){return{openedFilters:0}}}),Te=function(){function e(e,t,i){this._injector=e,this._filterMeta=t,this._overlay=i,this.detach$=new n.Subject,this.attach$=new n.Subject,this._destroy$=new n.Subject}return Object.defineProperty(e.prototype,"isOpened",{get:function(){return!!this._overlayRef},enumerable:!0,configurable:!0}),e.prototype.setClearFn=function(e){this._clearFn=e},e.prototype.setDoneFn=function(e){this._doneFn=e},e.prototype.close=function(){this._overlayRef&&(this._overlayRef.detach(),this._overlayRef=null,this.removeFilterClass())},e.prototype.open=function(){var e=this;return this._overlayRef=this._createOverlay(),this._overlayRef.backdropClick().pipe(o.takeUntil(this._destroy$)).subscribe((function(){e._overlayRef.detach()})),this._overlayRef.detachments().pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.detach$.next()})),this._overlayRef.attachments().pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.attach$.next()})),this.addFilterClass(),this.openPortalPreview()},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype._createOverlay=function(){var e=new T.OverlayConfig({hasBackdrop:!0,backdropClass:"fs-filter-backdrop"});return this._overlay.create(e)},e.prototype.openPortalPreview=function(){var e={done:this._doneFn,clear:this._clearFn},t=this._createInjector(this._injector,e,this._overlayRef),i=new I.ComponentPortal($e,void 0,t);return this._overlayRef.attach(i).instance},e.prototype._createInjector=function(e,t,i){var n=new WeakMap([[je,t],[Pe,i]]);return new I.PortalInjector(e,n)},e.prototype.removeFilterClass=function(){this._filterMeta.openedFilters--,0===this._filterMeta.openedFilters&&window.document.body.classList.remove("fs-filter-open")},e.prototype.addFilterClass=function(){this._filterMeta.openedFilters++,1===this._filterMeta.openedFilters&&window.document.body.classList.add("fs-filter-open")},e.ctorParameters=function(){return[{type:t.Injector},{type:void 0,decorators:[{type:t.Inject,args:[Se]}]},{type:T.Overlay}]},e=K([t.Injectable(),U(1,t.Inject(Se)),z("design:paramtypes",[t.Injector,Object,T.Overlay])],e)}(),Ve=function(){function e(){}return e=K([t.Directive({selector:"[fsFilterStatusBar]"})],e)}(),Me=function(){function e(e){this._filterOverlay=e,this._focusOn=new n.BehaviorSubject(null)}return Object.defineProperty(e.prototype,"focusOn$",{get:function(){return this._focusOn.asObservable()},enumerable:!0,configurable:!0}),e.prototype.click=function(e,t){void 0===t&&(t=null),this._filterOverlay.isOpened||this._filterOverlay.open(),this._focusOn.next({item:e,type:t})},e.prototype.listenFocusFor$=function(e,t){var i=this;return void 0===t&&(t=null),this._focusOn.pipe(o.filter((function(e){return!!e})),o.filter((function(i){var n=i.item,o=i.type;return e===n&&t===o})),o.tap((function(){return i.clearFocus()})))},e.prototype.clearFocus=function(){this._focusOn.next(null)},e.ctorParameters=function(){return[{type:Te}]},e=K([t.Injectable(),z("design:paramtypes",[Te])],e)}();(Ae=e.ActionType||(e.ActionType={})).Basic="basic",Ae.Raised="raised",Ae.Icon="icon",Ae.Fab="fab",Ae.MiniFab="mini-fab",(De=e.ActionMode||(e.ActionMode={})).Button="button",De.Menu="menu",De.File="file";var Re=function(){function e(e,t){void 0===e&&(e={}),this._parent=t,this.items=[],this._isGroup=!1,this._visible$=new n.BehaviorSubject(!0),this._disabled$=new n.BehaviorSubject(!1),this._init(e)}return Object.defineProperty(e.prototype,"isGroup",{get:function(){return this._isGroup},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible$",{get:function(){return this._visible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled$.getValue()},set:function(e){this._disabled$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled$",{get:function(){return this._disabled$.asObservable()},enumerable:!0,configurable:!0}),e.prototype.updateVisibility=function(){var e=!this._showFn||this._showFn();if(e&&this.isGroup){var t=this.items.reduce((function(e,t){return t.updateVisibility(),t.visible&&e++,e}),0);this._visible$.next(!!t)}else this._visible$.next(e)},e.prototype._init=function(t){var i=this;this.label=t.label,this.icon=t.icon,this._showFn=t.show,"items"in t?(this._isGroup=!0,Array.isArray(t.items)&&(this.items=t.items.map((function(t){return new e(t,i)}))),this.updateVisibility()):(this.click=t.click,this.routerLink=t.link,this._parent||this.updateVisibility())},e}(),Be=function(){function t(e){void 0===e&&(e={}),this.primary=!0,this.isReorderAction=!1,this.classArray=[],this.items=[],this._visible$=new n.BehaviorSubject(!0),this._disabled$=new n.BehaviorSubject(!1),this._init(e)}return Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible$",{get:function(){return this._visible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled$.getValue()},set:function(e){this._disabled$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled$",{get:function(){return this._disabled$.asObservable()},enumerable:!0,configurable:!0}),t.prototype.updateVisibility=function(){var t=!this._showFn||this._showFn();if(t&&this.mode===e.ActionMode.Menu){var i=this.items.some((function(e){return e.visible}));this._visible$.next(i)}else this._visible$.next(t)},t.prototype.updateDisabledState=function(){this._disabledFn&&(this.disabled=this._disabledFn())},t.prototype._init=function(t){var i,n,o,r,a,s;switch(t.mode=null!==(i=t.mode)&&void 0!==i?i:e.ActionMode.Button,this.primary=null===(n=t.primary)||void 0===n||n,this.color=t.color,this.type=null!==(o=t.type)&&void 0!==o?o:e.ActionType.Raised,this.label=t.label,this.mode=t.mode,this.icon=t.icon,this._showFn=t.show,this.tabIndex=null!==(r=t.tabIndex)&&void 0!==r?r:0,void 0!==t.multiple&&(this.multiple=t.multiple),t.className&&(this.className=t.className,this.classArray=this.className.split(" ")),this.primary&&(this.color="primary"),t.mode){case e.ActionMode.Button:this.menu=t.menu,this.customize=t.customize,this.click=null!==(a=t.click)&&void 0!==a?a:function(){},this._disabledFn=t.disabled,this.updateDisabledState();break;case e.ActionMode.Menu:t.items&&Array.isArray(t.items)&&(this.items=t.items.map((function(e){return new Re(e)})));break;case e.ActionMode.File:this.fileSelected=t.select,this.fileError=t.error,this.click=null!==(s=t.click)&&void 0!==s?s:function(){},this._disabledFn=t.disabled,this.updateDisabledState()}this.updateVisibility()},t}(),Ee=function(){function e(e){this._breakpointObserver=e,this._visible$=new n.BehaviorSubject(!1),this._actions$=new n.BehaviorSubject([]),this._menuActions$=new n.BehaviorSubject([]),this._destroy$=new n.Subject,this._mobileMedia="(max-width: 799px)",this._allActions=[],this._listenMobileMedia()}return Object.defineProperty(e.prototype,"menuActions",{get:function(){return this._menuActions$.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actions",{get:function(){return this._actions$.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actions$",{get:function(){return this._actions$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menuActions$",{get:function(){return this._menuActions$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible$",{get:function(){return this._visible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mobileMode",{get:function(){return this._breakpointObserver.isMatched(this._mobileMedia)},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.initActions=function(e){e&&Array.isArray(e)&&(this.show(),this._allActions=e.map((function(e){return new Be(e)})),this._reorderAction&&this._allActions.unshift(this._reorderAction),this._classifyActions())},e.prototype.show=function(){this._visible$.next(!0)},e.prototype.hide=function(){this._visible$.next(!1)},e.prototype.addReorderAction=function(e){this._allActions.unshift(e),e.isReorderAction=!0,this._classifyAction(e),this._reorderAction=e},e.prototype.clearActions=function(){this._allActions=[],this._setActions([]),this._setKebabActions([])},e.prototype.updateActionsVisibility=function(){this._allActions.forEach((function(e){return e.updateVisibility()})),this._classifyActions()},e.prototype.updateDisabledState=function(){this.actions.forEach((function(e){return e.updateDisabledState()}))},e.prototype._setKebabActions=function(e){this._menuActions$.next(e)},e.prototype._setActions=function(e){this._actions$.next(e)},e.prototype._classifyActions=function(){var e=[],t=[],i=this.mobileMode;this._allActions.filter((function(e){return e.visible})).forEach((function(n){n.menu||i?e.push(n):t.push(n)})),this._setKebabActions(e),this._setActions(t)},e.prototype._classifyAction=function(e){e.menu?this._setKebabActions(W(this.menuActions,[e])):this._setActions(W(this.actions,[e]))},e.prototype._listenMobileMedia=function(){var e=this;this._breakpointObserver.observe(this._mobileMedia).pipe(o.skip(1),o.takeUntil(this._destroy$)).subscribe((function(){e._classifyActions()}))},e.ctorParameters=function(){return[{type:V.BreakpointObserver}]},e=K([t.Injectable(),z("design:paramtypes",[V.BreakpointObserver])],e)}(),qe=function(){function e(e,i,r,a,s,l){var c=this;this._filterOverlay=e,this._zone=i,this._externalParams=r,this._filterItems=a,this._actions=s,this._defaultConfig=l,this.showSortBy=!0,this.showFilterInput=!0,this.closed=new t.EventEmitter,this.opened=new t.EventEmitter,this.ready=new t.EventEmitter,this.showFilterMenu=!1,this.windowDesktop=!1,this.fsFilterClass=!0,this.searchText=new h.FormControl,this.searchPlaceholder="Search",this._config=null,this._filtersBtnVisible$=new n.BehaviorSubject(!0),this._keywordVisible$=new n.BehaviorSubject(!0),this._hasFilterChips$=new n.BehaviorSubject(!1),this._destroy$=new n.Subject,this._listenWhenFilterReady(),this._updateWindowWidth(),this._filterOverlay.attach$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){c.showFilterMenu=!0})),this._filterOverlay.detach$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){c.showFilterMenu=!1})),this._listenWindowResize()}return Object.defineProperty(e.prototype,"setConfig",{set:function(e){this._initFilterWithConfig(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setFilter",{set:function(e){this._initFilterWithConfig(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterParams",{get:function(){return this._filterItems.values()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterParamsQuery",{get:function(){return this._filterItems.valuesAsQuery()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._filterItems.items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleItems",{get:function(){return this._filterItems.visibleItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasFilterChips$",{get:function(){return this._hasFilterChips$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasVisibleItemOrSorting",{get:function(){return this.visibleItems.length>0||!!this._filterItems.sortByItem},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasKeyword",{get:function(){return this._filterItems.hasKeyword},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filtersBtnVisible$",{get:function(){return this._filtersBtnVisible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keywordVisible$",{get:function(){return this._keywordVisible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionsVisible$",{get:function(){return this._actions.visible$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actions$",{get:function(){return this._actions.actions$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menuActions$",{get:function(){return this._actions.menuActions$},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;setTimeout((function(){e.config.autofocus&&e.focus()})),this.config.init&&(this._externalParams.pending?this._externalParams.pending$.pipe(o.filter((function(e){return!e})),o.takeUntil(this._destroy$)).subscribe((function(){e.init()})):this.init()),this._listenInternalItemsChange(),this._initOverlay()},e.prototype.ngAfterViewInit=function(){var e=this;this._listenInputKeyEvents(),setTimeout((function(){e._listenInputChanges()}))},e.prototype.ngOnDestroy=function(){this._destroyFilterDrawer(),this._destroy$.next(),this._destroy$.complete()},e.prototype.focus=function(){this.searchTextMatInput&&this.searchTextMatInput.focus()},e.prototype.updateSort=function(e){this._filterItems.updateSort(e)},e.prototype.updateValues=function(e){var t=this;Object.keys(e).forEach((function(i){var n=t.items.find((function(e){return e.name===i}));n&&(n.model=e[i])}))},e.prototype.hide=function(){this.changeVisibility(!1)},e.prototype.show=function(){this.changeVisibility(!0)},e.prototype.changeVisibilityClick=function(e,t){void 0===t&&(t=null),t&&t.stopPropagation(),this.changeVisibility(e)},e.prototype.filterInputEvent=function(e){this.windowDesktop&&["Enter","NumpadEnter","Escape"].indexOf(e.code)>=0&&(this.changeVisibility(!1),this.searchTextInput&&this.searchTextInput.nativeElement.blur())},e.prototype.getItemValue=function(e){var t=this.items.find((function(t){return t.name===e}));return t?t.model:null},e.prototype.showItem=function(e){var t=this.getItem(e);t&&(t.hide=!1,this._filterItems.updateVisibleItems())},e.prototype.hideItem=function(e){var t=this.getItem(e);t&&(t.hide=!0,this._filterItems.updateVisibleItems())},e.prototype.clearItem=function(e){var t=this.getItem(e);t&&t.clear()},e.prototype.updateItemConfig=function(e,t){var i,n,o=this.getItem(e);o&&(o.label=null!==(i=t.label)&&void 0!==i?i:o.label,o.chipLabel=null!==(n=t.chipLabel)&&void 0!==n?n:o.chipLabel,this._filterItems.updateVisibleItems())},e.prototype.getItemValueChange$=function(e){var t=this.items.find((function(t){return t.name===e}));return t?t.value$.pipe(o.map((function(){return t.model}))):null},e.prototype.changeVisibility=function(e){if(e!==this.showFilterMenu)return e?void(this.hasVisibleItemOrSorting&&(this._listenEscButton(),this.opened.emit(),this._filterOverlay.open())):(this.closed.emit(),this._destroyFilterDrawer())},e.prototype.clearSearchText=function(e){e.stopPropagation(),this._filterItems.keywordItem.clear(),this.searchTextInput.nativeElement.focus()},e.prototype.init=function(){var e=this._filterItems.valuesAsQuery();this._sort=this._filterItems.getSort(),this.config.init(e,this._sort),this._updateChipsVisibility()},e.prototype.clear=function(e){void 0===e&&(e=null),e&&e.stopPropagation(),this._filterItems.filtersClear(),this.config.clear&&this.config.clear()},e.prototype.search=function(e){this.changeVisibilityClick(!1,e)},e.prototype.reload=function(e){void 0===e&&(e=null),e&&(e.preventDefault(),e.stopPropagation());var t=this._filterItems.valuesAsQuery();this.config.reload&&this.config.reload(t,this._filterItems.getSort())},e.prototype.getItem=function(e){return this.items.find((function(t){return t.name===e}))},e.prototype.change=function(){var e=this._filterItems.valuesAsQuery(),t=this._filterItems.getSort();((!t||!this._sort)&&t!==this._sort||t&&this._sort&&!function e(t,i){var n=Object.keys(t),o=Object.keys(i);if(n.length!==o.length)return!1;for(var a in t)if(t.hasOwnProperty(a)){var s=t[a],l=i[a],c=Array.isArray(s)&&Array.isArray(l),u=r.isObject(s)&&r.isObject(l);if(c&&!ke(s,l))return!1;if(u&&!e(s,l))return!1;if(!c&&!u&&s!==l)return!1}return!0}(this._sort,t))&&(this._sort=t,this.config.sortChange&&this.config.sortChange(e,t)),this.config.change&&this.config.change(e,t),this._updateChipsVisibility()},e.prototype.updateActions=function(e){this._actions.initActions(e)},e.prototype.showFiltersBtn=function(){this._filtersBtnVisible$.next(!0)},e.prototype.hideFiltersBtn=function(){this._filtersBtnVisible$.next(!1)},e.prototype.showKeywordField=function(){this._keywordVisible$.next(!0)},e.prototype.hideKeywordField=function(){this._keywordVisible$.next(!1)},e.prototype.updateActionsVisibility=function(){this._actions.updateActionsVisibility()},e.prototype.updateDisabledState=function(){this._actions.updateDisabledState()},e.prototype._initFilterWithConfig=function(e){this.config&&this._filterItems.destroyItems(),e=q(q({},this._defaultConfig||{}),e),this._config=new G(e),this._actions.initActions(this._config.actions),this._filterItems.setConfig(this._config),this._externalParams.setConfig(this._config);var t=this._filterItems.keywordItem;t&&(this.searchText.setValue(t.model),this.searchPlaceholder=t.label||"Search"),this.config.reloadWhenConfigChanged&&this.change(),this._listenKeywordItemClear()},e.prototype._destroyFilterDrawer=function(){this._filterOverlay.close()},e.prototype._updateWindowWidth=function(){this.windowDesktop=window.innerWidth>1200},e.prototype._listenEscButton=function(){var e=this;this._zone.runOutsideAngular((function(){n.fromEvent(window,"keyup").pipe(o.filter((function(e){return"Escape"===e.code})),o.takeUntil(e.closed),o.takeUntil(e._destroy$)).subscribe((function(){e._zone.run((function(){e.changeVisibility(!1)}))}))}))},e.prototype._listenInputKeyEvents=function(){var e=this;this.searchTextInput&&this._zone.runOutsideAngular((function(){n.fromEvent(e.searchTextInput.nativeElement,"keydown").pipe(o.debounceTime(500),o.filter((function(e){return["Enter","NumpadEnter","Escape"].indexOf(e.code)>-1})),o.takeUntil(e._destroy$)).subscribe((function(t){e._zone.run((function(){e.filterInputEvent(t)}))}))}))},e.prototype._listenWindowResize=function(){var e=this;this._zone.runOutsideAngular((function(){n.fromEvent(window,"resize").pipe(o.debounceTime(100),o.takeUntil(e._destroy$)).subscribe((function(){e._zone.run((function(){e._updateWindowWidth()}))}))}))},e.prototype._listenInputChanges=function(){var e=this;this._filterItems.keywordItem&&this._zone.runOutsideAngular((function(){e.searchText.valueChanges.pipe(o.debounceTime(200),o.distinctUntilChanged(),o.filter((function(t){var i;return t!==(null===(i=e._filterItems.keywordItem)||void 0===i?void 0:i.model)})),o.takeUntil(e._destroy$)).subscribe((function(t){e._zone.run((function(){var i=e._filterItems.keywordItem;i&&i.value!==t&&(i.model=t)}))}))}))},e.prototype._listenKeywordItemClear=function(){var e,t=this;null===(e=this._filterItems.keywordItem)||void 0===e||e.clear$.pipe(o.takeUntil(this._filterItems.keywordItem.destroy$),o.takeUntil(this._destroy$)).subscribe((function(){t.searchText.setValue("")}))},e.prototype._listenInternalItemsChange=function(){var e=this;this._filterItems.itemsChange$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.change()}))},e.prototype._initOverlay=function(){this._filterOverlay.setClearFn(this.clear.bind(this)),this._filterOverlay.setDoneFn(this.hide.bind(this))},e.prototype._listenWhenFilterReady=function(){var e=this;this._externalParams.pending$.pipe(o.filter((function(e){return!e})),o.takeUntil(this._destroy$)).subscribe((function(){e.ready.emit()}))},e.prototype._updateChipsVisibility=function(){var e=this._filterItems.items.some((function(e){return e.isChipVisible}));this._hasFilterChips$.next(e)},e.ctorParameters=function(){return[{type:Te},{type:t.NgZone},{type:xe},{type:he},{type:Ee},{type:G,decorators:[{type:t.Optional},{type:t.Inject,args:[Fe]}]}]},K([t.Input("config"),z("design:type",Object),z("design:paramtypes",[Object])],e.prototype,"setConfig",null),K([t.Input("filter"),z("design:type",Object),z("design:paramtypes",[Object])],e.prototype,"setFilter",null),K([t.Input(),z("design:type",Object)],e.prototype,"showSortBy",void 0),K([t.Input(),z("design:type",Object)],e.prototype,"showFilterInput",void 0),K([t.Output(),z("design:type",Object)],e.prototype,"closed",void 0),K([t.Output(),z("design:type",Object)],e.prototype,"opened",void 0),K([t.Output(),z("design:type",Object)],e.prototype,"ready",void 0),K([t.ContentChild(Ve,{read:t.TemplateRef}),z("design:type",Object)],e.prototype,"statusBar",void 0),K([t.ViewChild("searchTextInput"),z("design:type",t.ElementRef)],e.prototype,"searchTextInput",void 0),K([t.ViewChild("searchTextInput",{read:_.MatInput}),z("design:type",_.MatInput)],e.prototype,"searchTextMatInput",void 0),K([t.HostBinding("class.filters-open"),z("design:type",Object)],e.prototype,"showFilterMenu",void 0),K([t.HostBinding("class.window-desktop"),z("design:type",Object)],e.prototype,"windowDesktop",void 0),K([t.HostBinding("class.fs-filter"),z("design:type",Object)],e.prototype,"fsFilterClass",void 0),e=K([t.Component({selector:"fs-filter",template:'<ng-container *ngIf="hasKeyword; else noKeywordFilter">\n <div class="filter-search-container">\n <div class="filter-input-field">\n <form autocomplete="off" role="presentation" *ngIf="keywordVisible$ | async">\n <mat-form-field floatLabel="never">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n\n <input\n matInput\n [formControl]="searchText"\n [placeholder]="searchPlaceholder"\n name="filter-input"\n (click)="filterInputEvent($event)"\n class="filter-input">\n\n <a matSuffix\n *ngIf="searchText.value && showFilterInput && config.clear"\n (click)="clearSearchText($event)"\n href="javascript:void(0)"\n class="clear">\n <mat-icon>clear</mat-icon>\n </a>\n\n <a matSuffix\n (click)="reload($event)"\n class="reload"\n *ngIf="config.reload">\n <mat-icon>refresh</mat-icon>\n </a>\n </mat-form-field>\n </form>\n </div>\n <ng-container *ngTemplateOutlet="filterActions"></ng-container>\n </div>\n <div class="status-actions" *ngIf="keywordVisible$ | async">\n <ng-container *ngTemplateOutlet="statusBarContainer"></ng-container>\n <ng-container *ngTemplateOutlet="filterChips"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #noKeywordFilter>\n <div class="filter-searchless-container">\n <div class="status-actions">\n <ng-container *ngTemplateOutlet="statusBarContainer"></ng-container>\n <ng-container *ngTemplateOutlet="filterChips"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet="filterActions"></ng-container>\n </div>\n</ng-template>\n\n\n<ng-template #filterActions>\n <div class="filter-actions">\n <ng-container *ngIf="hasVisibleItemOrSorting && filtersBtnVisible$ | async ">\n <button\n mat-button\n class="filters-button"\n [ngClass]="{\n \'mat-raised-button\': config.button.style == \'raised\',\n \'mat-button\': config.button.style == \'basic\',\n \'mat-icon-button\': config.button.style == \'icon\'\n }"\n (click)="changeVisibilityClick(!showFilterMenu, $event)"\n type="button"\n [color]="config.button.color">\n <mat-icon *ngIf="config.button.icon">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </button>\n </ng-container>\n\n <fs-filter-actions\n *ngIf="actionsVisible$ | async"\n [actions]="actions$ | async"\n [kebabActions]="menuActions$ | async">\n </fs-filter-actions>\n </div>\n</ng-template>\n\n<ng-template #filterChips>\n <fs-filter-chips\n *ngIf="config.chips && hasFilterChips$ | async"\n class="filter-chips"\n [filters]="items">\n </fs-filter-chips>\n</ng-template>\n\n<ng-template #statusBarContainer>\n <div class="status-bar" *ngIf="statusBar">\n <small><ng-container *ngTemplateOutlet="statusBar"></ng-container></small>\n </div>\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,providers:[Te,xe,_e,Ce,Me,he,we,Ee],changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-filter{display:block}.fs-filter{margin-bottom:20px;display:block}.fs-filter .results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}.fs-filter .status-bar{overflow:hidden;text-overflow:ellipsis;line-height:17px;margin:4px 0}.fs-filter .filter-chips{display:block}.fs-filter .filter-searchless-container{display:flex}.fs-filter .filter-searchless-container .status-actions{flex-grow:1}.fs-filter .filter-searchless-container .status-actions>:first-child{margin-top:0}.fs-filter fs-filter-chips{margin:5px 0}.fs-filter .filter-search-container{flex-direction:row;box-sizing:border-box;display:flex;flex:1 1 0;position:relative}.fs-filter .filter-search-container .search{top:8px;position:absolute;margin-left:1px;left:0}.fs-filter .filter-search-container .search mat-icon{transform:scale(.9)}.fs-filter .filter-search-container form{width:100%;height:100%}.fs-filter .filter-search-container .filter-input-field{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;flex:1}.fs-filter .filter-search-container .filter-input-field .mat-form-field{width:100%;height:100%;font-size:103%}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-underline{bottom:auto}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-infix{border-top:0}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-wrapper{padding-bottom:0;height:100%}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-flex{align-items:center;height:100%}.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix{-ms-grid-row-align:center;align-self:center;display:flex;align-items:center;white-space:nowrap}.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix a,.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix mat-icon,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix a,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix mat-icon{display:flex;cursor:pointer;color:initial}.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix a:hover,.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix mat-icon:hover,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix a:hover,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix mat-icon:hover{color:inherit}.fs-filter .filter-search-container .filter-input-field .mat-form-field-infix{width:auto}.fs-filter .filter-actions{display:flex;align-items:center}.fs-filter button.reload{margin-left:-40px;right:-9px}@media screen and (min-width:599px){.filter-actions{margin-left:10px}.filters-button+fs-filter-actions:not(:empty){margin-left:5px}}@media screen and (max-width:600px){.filter-actions{margin-left:5px}.filter-actions .filters-button{font-size:0;padding:0;min-width:unset;width:36px;height:36px;border-radius:50%;box-shadow:unset!important}}@media screen and (min-width:1200px){body.fs-filter-open{margin-right:350px}.fs-filter-backdrop{display:none}}body.fs-filter-open::-webkit-scrollbar{width:0;background:0 0}"]}),U(5,t.Optional()),U(5,t.Inject(Fe)),z("design:paramtypes",[Te,t.NgZone,xe,he,Ee,G])],e)}(),Ke=function(){function i(t){this._cdRef=t,this._destroy$=new n.Subject,this.itemType=e.ItemType}return i.prototype.ngOnInit=function(){var e=this;this.item.value$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e._cdRef.markForCheck()}))},i.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},i.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},K([t.Input(),z("design:type",Q)],i.prototype,"item",void 0),i=K([t.Component({selector:"filter-item",template:'<div class="filter filter-{{ item.type }}">\n\n <ng-container [ngSwitch]="item.type">\n <filter-item-text class="interface"\n *ngSwitchCase="itemType.Text"\n [item]="item">\n </filter-item-text>\n\n <filter-item-select class="interface"\n *ngSwitchCase="itemType.Select"\n [item]="item">\n </filter-item-select>\n\n <filter-item-chips class="interface"\n *ngSwitchCase="itemType.Chips"\n [item]="item">\n </filter-item-chips>\n\n <filter-item-range class="interface interface-range"\n *ngSwitchCase="itemType.Range"\n [item]="item">\n </filter-item-range>\n\n <filter-item-autocomplete class="interface"\n *ngSwitchCase="itemType.AutoComplete"\n [item]="item">\n </filter-item-autocomplete>\n\n <filter-item-autocompletechips class="interface"\n *ngSwitchCase="itemType.AutoCompleteChips"\n [item]="item">\n </filter-item-autocompletechips>\n\n <filter-item-date class="interface interface-date"\n *ngSwitchCase="itemType.Date"\n [item]="item">\n </filter-item-date>\n\n <filter-item-date class="interface interface-date"\n *ngSwitchCase="itemType.DateTime"\n [item]="item">\n </filter-item-date>\n\n <filter-item-date-range class="interface interface-date"\n *ngSwitchCase="itemType.DateRange"\n [item]="item">\n </filter-item-date-range>\n\n <filter-item-date-range class="interface interface-date"\n *ngSwitchCase="itemType.DateTimeRange"\n [item]="item">\n </filter-item-date-range>\n\n <filter-item-checkbox class="interface interface-checkbox"\n *ngSwitchCase="itemType.Checkbox"\n [item]="item">\n </filter-item-checkbox>\n </ng-container>\n\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.ChangeDetectorRef])],i)}(),Ue=function(){function e(e,t){this._kvDiffers=e,this._cd=t,this.inline=!1,this._destroy$=new n.Subject,this._debouncer$=new n.Subject,this._kvDiffer=this._kvDiffers.find(this.item||{}).create(),this.listenWithDebounce()}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},set:function(e){this._item=e},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){this._kvDiffer&&(this._kvDiffer.diff(this.item)&&this._cd.detectChanges())},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.listenWithDebounce=function(){var e=this;this._debouncer$.pipe(o.debounceTime(150),o.takeUntil(this._destroy$)).subscribe((function(){e.item.valueChanged()}))},e.prototype.itemChange=function(){this._debouncer$.next()},e.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},K([t.Input(),z("design:type",Object),z("design:paramtypes",[Object])],e.prototype,"item",null),K([t.Input(),z("design:type",Object)],e.prototype,"inline",void 0),e=K([t.Component({selector:"base-item",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],e)}(),ze=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n.allItemsOptionSelected=!1,n}return B(i,e),i.prototype.ngDoCheck=function(){this._kvDiffer&&(this._kvDiffer.diff(this.item)&&(this._cd.markForCheck(),this.selectedItem&&this.selectedItem.cd.markForCheck()))},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},K([t.ViewChild("selectItem"),z("design:type",Object)],i.prototype,"selectedItem",void 0),i=K([t.Component({selector:"filter-item-select",template:'<ng-container *ngIf="(item.loading$ | async) else itemSelect">\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select disabled></mat-select>\n </mat-form-field>\n</ng-container>\n\n<ng-template #itemSelect>\n <ng-container *ngIf="(item.values$ | async)?.length">\n <ng-container *ngIf="item.multiple && !item.children">\n <filter-item-select-multiple\n [item]="item"\n #selectItem>\n </filter-item-select-multiple>\n </ng-container>\n\n <ng-container *ngIf="!item.multiple && !item.children">\n <filter-item-select-simple\n [item]="item"\n #selectItem>\n </filter-item-select-simple>\n </ng-container>\n\n <ng-container *ngIf="item.children">\n <filter-item-select-groups\n [item]="item"\n #selectItem>\n </filter-item-select-groups>\n </ng-container>\n </ng-container>\n</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ue),Le=function(){function e(e){this.cd=e}return e.prototype.compare=function(e,t){return e==t},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},K([t.ViewChild("select",{static:!0}),z("design:type",C.MatSelect)],e.prototype,"select",void 0),K([t.Input(),z("design:type",Object)],e.prototype,"item",void 0),e=K([t.Component({selector:"filter-item-select-groups",template:'<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n [compareWith]="compare">\n <ng-container *ngFor="let selectItem of item.values">\n <ng-container *ngIf="selectItem[item.children]; else simpleOption">\n <mat-optgroup [label]="selectItem.name">\n <mat-option *ngFor="let subItem of selectItem[item.children]"\n [value]="subItem.value"\n [ngStyle]="selectItem.style">\n {{ subItem.name }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n\n <ng-template #simpleOption>\n <mat-option\n [value]="selectItem.value"\n [ngStyle]="selectItem.style">\n {{ selectItem.name }}\n </mat-option>\n </ng-template>\n </ng-container>\n </mat-select>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}(),Ne=function(){function e(e){this.cd=e}return e.prototype.changed=function(){this.item.isolate&&(this.item.isolate.enabled=!1)},e.prototype.isolateChange=function(e){e.isolate.enabled?e.model=e.isolate.value:e.model=null},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},K([t.Input(),z("design:type",H)],e.prototype,"item",void 0),K([t.ViewChild("select",{static:!0}),z("design:type",C.MatSelect)],e.prototype,"select",void 0),e=K([t.Component({selector:"filter-item-select-simple",template:'<mat-form-field [ngClass]="{ isolate: item.isolate }">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n (ngModelChange)="changed()">\n <mat-option *ngFor="let item of item.values | fsFilterIsolateValues: item.isolate"\n [value]="item.value"\n >\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf="item.isolate">\n <mat-checkbox (change)="isolateChange(item)" [(ngModel)]="item.isolate.enabled">\n <span class="checkbox-label">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".isolate{margin-bottom:25px}"]}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}(),We=function(){function e(e){this.cd=e}return e.prototype.changed=function(){if(this.item.isolate&&(this.item.isolate.enabled=!1,this.item.multiple&&Array.isArray(this.item.model))){var e=this.item.model.indexOf(this.item.isolate.value);e>-1&&this.item.model.splice(e,1)}},e.prototype.close=function(){this.select.close()},e.prototype.isolateChange=function(e){e.isolate.enabled?e.model=e.multiple?[e.isolate.value]:e.isolate.value:e.multiple?e.model=e.defaultValue?e.defaultValue:[]:e.model=e.defaultValue?e.defaultValue:null},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},K([t.Input(),z("design:type",Object)],e.prototype,"item",void 0),K([t.ViewChild("select",{static:!0}),z("design:type",C.MatSelect)],e.prototype,"select",void 0),e=K([t.Component({selector:"filter-item-select-multiple",template:'<mat-form-field [ngClass]="{ isolate: item.isolate }">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n (ngModelChange)="changed()"\n [multiple]="item.multiple">\n <mat-option\n *ngFor="let item of item.values | fsFilterIsolateValues: item.isolate"\n [value]="item.value">\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf="item.isolate">\n <mat-checkbox (change)="isolateChange(item)" [(ngModel)]="item.isolate.enabled">\n <span class="checkbox-label">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".isolate{margin-bottom:25px}"]}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}(),Qe=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n}return B(i,e),i.prototype.modelChange=function(){this.itemChange()},i.prototype.compareFn=function(e,t){return e.value===t.value},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=K([t.Component({selector:"filter-item-chips",template:'<ng-template [ngIf]="item.values?.length">\n <fs-label-field>\n <fs-label>{{item.label}}</fs-label>\n <fs-chips [(ngModel)]="item.model"\n [compare]="compareFn"\n [multiple]="item.multiple">\n <fs-chip *ngFor="let value of item.values"\n [value]="value"\n [selectable]="true">\n {{ value.name }}\n </fs-chip>\n </fs-chips>\n </fs-label-field>\n</ng-template>\n\n<ng-template [ngIf]="item.loading">{{ item.label }} loading...</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-chip{line-height:40px}"]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ue),Ye=function(e){function i(t,i){var o=e.call(this,t,i)||this;return o._kvDiffers=t,o._cd=i,o.textControl=new h.FormControl,o.destroy$=new n.Subject,o}return B(i,e),i.prototype.ngOnInit=function(){var e=this;this.textControl.setValue(this.item.model),this.textControl.valueChanges.pipe(o.distinctUntilChanged(),o.debounceTime(200),o.takeUntil(this.destroy$)).subscribe((function(t){e.item.model=t}))},i.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=K([t.Component({selector:"filter-item-text",template:'<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <span matPrefix *ngIf="item.prefix" [innerHtml]="item.prefix"></span>\n <input matInput [formControl]="textControl" [fsFilterFocusTrigger]="item">\n <span matSuffix *ngIf="item.suffix" [innerHtml]="item.suffix"></span>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ue),He=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n}return B(i,e),i.prototype.ngOnInit=function(){this.listenChanges()},i.prototype.listenChanges=function(){var e=this,t=n.fromEvent(this.from.nativeElement,"keyup").pipe(o.distinctUntilChanged()),i=n.fromEvent(this.to.nativeElement,"keyup").pipe(o.distinctUntilChanged());n.merge(t,i).pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.itemChange()}))},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},K([t.ViewChild("from",{static:!0}),z("design:type",t.ElementRef)],i.prototype,"from",void 0),K([t.ViewChild("to",{static:!0}),z("design:type",Object)],i.prototype,"to",void 0),i=K([t.Component({selector:"filter-item-range",template:'<span fxLayout="row">\n <mat-form-field class="filter-range-min">\n <mat-label>{{item.label[0]}}</mat-label>\n <span matPrefix *ngIf="item.prefix" [innerHtml]="item.prefix"></span>\n <input matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'from\'"\n type="text"\n inputmode="decimal"\n [(ngModel)]="item.model.min"\n fsMaskNumber\n [scale]="item.options?.scale || 2"\n #from\n >\n <span matSuffix *ngIf="item.suffix" [innerHtml]="item.suffix"></span>\n </mat-form-field>\n <div class="spacer"></div>\n <mat-form-field class="filter-range-max">\n <mat-label>{{item.label[1]}}</mat-label>\n <span matPrefix *ngIf="item.prefix" [innerHtml]="item.prefix"></span>\n <input matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'to\'"\n type="text"\n inputmode="decimal"\n [(ngModel)]="item.model.max"\n fsMaskNumber\n [scale]="item.options?.scale || 2"\n #to\n >\n <span matSuffix *ngIf="item.suffix" [innerHtml]="item.suffix"></span>\n </mat-form-field>\n</span>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".spacer{width:15px}mat-form-field{min-width:initial;display:flex;width:auto}mat-form-field ::ng-deep .mat-form-field-infix{width:auto}"]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ue),Ge=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n.displayWith=function(e){return e?e.name:e},n.fetch=function(e){return n.item.valuesFn(e)},n}return B(i,e),i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=K([t.Component({selector:"filter-item-autocomplete",template:'<fs-autocomplete\n [fsFilterFocusTrigger]="item"\n [fetch]="fetch"\n [displayWith]="displayWith"\n [(ngModel)]="item.model"\n [placeholder]="item.label"\n [fetchOnFocus]="item.fetchOnFocus"\n [showClear]="item.clearAllowed"\n name="item.name">\n <ng-template fsAutocompleteTemplate let-data="data">\n {{data.name}}\n </ng-template>\n</fs-autocomplete>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ue),Je=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n.fetch=function(e){return n.item.valuesFn(e)},n}return B(i,e),i.prototype.clicked=function(){this.chipBackground=this.item.chipBackground,this.chipColor=this.item.chipColor,this.chipIcon=this.item.chipIcon,this._cd.markForCheck()},i.prototype.addAutocompleteChipItem=function(e){e.data&&-1===this.item.model.indexOf(e.data.value)&&(this.item.model.push(e.data),this.itemChange())},i.prototype.removeAutocompleteChipItem=function(e){s.remove(this.item.model,{value:e.data.value}),this.itemChange()},i.prototype.clearAutocompleteChipItem=function(){this.item.clear(),this.itemChange()},i.prototype.compareItems=function(e,t){return(null==e?void 0:e.value)===(null==t?void 0:t.value)},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=K([t.Component({selector:"filter-item-autocompletechips",template:'<fs-autocomplete-chips\n [fsFilterFocusTrigger]="item"\n [fetch]="fetch"\n [ngModel]="item.model"\n (selected)="addAutocompleteChipItem($event)"\n (removed)="removeAutocompleteChipItem($event)"\n (clear)="clearAutocompleteChipItem()"\n (click)="clicked()"\n [allowText]="false"\n [fetchOnFocus]="item.fetchOnFocus"\n [placeholder]="item.label"\n [chipImage]="item.chipImage"\n [chipColor]="chipColor"\n [chipIconColor]="chipIcon"\n [chipBackground]="chipBackground"\n [chipIcon]="item.chipIcon"\n [chipClass]="item.chipClass"\n [allowClear]="item.clearAllowed"\n [removable]="item.clearAllowed"\n [compareWith]="compareItems"\n name="model">\n <ng-template fsAutocompleteObject let-object="object">\n {{ object.name }}\n </ng-template>\n</fs-autocomplete-chips>\n\n\x3c!--<mat-form-field floatLabel="auto">\n <mat-label>{{item.label}}</mat-label>\n <mat-chip-list #chipList>\n <mat-chip *ngFor="let item of item.model"\n (removed)="removeAutocompleteChipItem(item)">\n {{ item.name }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input #chipsInput\n type="text"\n matInput\n [(ngModel)]="item.selectedValue"\n (ngModelChange)="onAutocompleteChipsChange(chipsInput)"\n [name]="item.name"\n [matChipInputFor]="chipList"\n [matAutocomplete]="autocompleteChipsInput">\n </mat-chip-list>\n\n <mat-autocomplete #autocompleteChipsInput="matAutocomplete"\n (optionSelected)="addAutocompleteChipItem( $event)"\n >\n <mat-option *ngFor="let item of item.values$ | async" [value]="item">\n {{ item.name }}\n </mat-option>\n </mat-autocomplete>\n <mat-placeholder *ngIf="inline">{{ item.label }}</mat-placeholder>\n</mat-form-field>--\x3e\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ue),Ze=function(i){function n(t,n){var o=i.call(this,t,n)||this;return o._kvDiffers=t,o._cd=n,o.viewType="date",o.itemDateMode=e.ItemDateMode,o.showYear=!0,o.showMonth=!0,o.showDay=!0,o}return B(n,i),n.prototype.ngOnInit=function(){this.item.type===e.ItemType.DateTime?this.viewType="datetime":this.viewType="date",this.item.mode===e.ItemDateMode.ScrollMonthYear&&(this.showDay=!1)},n.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},n=K([t.Component({selector:"filter-item-date",template:'<mat-form-field *ngIf="item.mode===itemDateMode.Calendar; else elseMode">\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDatePicker\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n [maxYear]="item.maxYear"\n [view]="viewType"\n [clear]="item.clearAllowed"\n [name]="item.name">\n <mat-placeholder *ngIf="inline">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n\n<ng-template #elseMode>\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateScrollPicker\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n [maxYear]="item.maxYear"\n [showMonth]="showMonth"\n [showDay]="showDay"\n [showYear]="showYear"\n [clear]="item.clearAllowed"\n [name]="item.name">\n <mat-placeholder *ngIf="inline">{{ item.label }}</mat-placeholder>\n </mat-form-field>\n</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],n)}(Ue),Xe=function(i){function n(e,t){var n=i.call(this,e,t)||this;return n._kvDiffers=e,n._cd=t,n.viewType="date",n}return B(n,i),n.prototype.ngOnInit=function(){this.item.type===e.ItemType.DateTimeRange?this.viewType="datetime":this.viewType="date"},n.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},n=K([t.Component({selector:"filter-item-date-range",template:'<mat-form-field>\n <mat-label>{{item.label[0]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'from\'"\n [fsDateRangeFrom]="item.name"\n [(ngModel)]="item.model.from"\n (ngModelChange)="itemChange()"\n [clear]="item.clearAllowed"\n [view]="viewType"\n name="date_from">\n</mat-form-field>\n\n<mat-form-field>\n <mat-label>{{item.label[1]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'to\'"\n [fsDateRangeTo]="item.name"\n [(ngModel)]="item.model.to"\n (ngModelChange)="itemChange()"\n [clear]="item.clearAllowed"\n [view]="viewType"\n name="date_to">\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],n)}(Ue),et=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n}return B(i,e),i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=K([t.Component({selector:"filter-item-checkbox",template:'<fs-label-field>\n <mat-checkbox [(ngModel)]="item.model">\n {{ item.label }}\n </mat-checkbox>\n</fs-label-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-label-field{margin:0}"]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ue),tt=function(){function e(){this.chips=[]}return K([t.Input(),z("design:type",Array)],e.prototype,"filters",void 0),e=K([t.Component({selector:"fs-filter-chips",template:'<fs-chips [(ngModel)]="chips">\n <ng-container *ngFor="let item of filters">\n <ng-container *ngIf="(item.value$ | async) !== null">\n <fs-filter-chip [item]="item"></fs-filter-chip>\n </ng-container>\n </ng-container>\n</fs-chips>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]})],e)}(),it=function(){function e(){}return e=K([t.Component({selector:"filter-item-select-backdrop",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{position:absolute;top:0;bottom:0;right:0;z-index:1002;left:0}"]}),z("design:paramtypes",[])],e)}(),nt=function(){function e(e,t){this._cdRef=e,this._focusController=t,this._chipRenderTimer$=n.timer(500).pipe(o.mapTo(!0)),this._destroy$=new n.Subject}return e.prototype.ngOnInit=function(){var e=this;this.rangeItem=this.item.isTypeDateRange||this.item.isTypeRange||this.item.isTypeDateTimeRange,this.listenValueChangesForRanges(),this._updateVisibility(),this.item.hasPendingValues&&(this.item.loadAsyncValues(!1),this.item.values$.pipe(o.take(2),o.takeUntil(this._destroy$)).subscribe((function(){e._updateVisibility(),e._cdRef.markForCheck()})),this._initDelayRender())},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.focusOnItem=function(e){void 0===e&&(e=null),this._focusController.click(this.item,e)},e.prototype.removeItem=function(e,t){void 0===t&&(t=null),this.item instanceof ie?this.item.clearRange(t):this.item instanceof oe||this.item instanceof re?this.item.clearDateRange(t):this.item.clear()},e.prototype.listenValueChangesForRanges=function(){var e=this;this.item.value$.pipe(o.distinctUntilChanged(),o.takeUntil(this._destroy$)).subscribe((function(){e._updateVisibility(),e._cdRef.markForCheck()}))},e.prototype._updateVisibility=function(){this.itemVisible=this.item.isChipVisible},e.prototype._initDelayRender=function(){this.chipDelayedRender$=n.combineLatest([this.item.values$,this._chipRenderTimer$.pipe(o.startWith(!1))]).pipe(o.map((function(e){var t=N(e,2),i=t[0],n=t[1];return!!i||n})))},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Me}]},K([t.Input(),z("design:type",Q)],e.prototype,"item",void 0),e=K([t.Component({selector:"fs-filter-chip",template:'<ng-container *ngIf="!item.hasPendingValues || (chipDelayedRender$ | async)">\n <ng-container *ngIf="rangeItem; else defaultChip">\n <fs-chip\n *ngIf="item.model?.min || item.model?.from"\n [value]="item"\n [selectable]="false"\n [removable]="item.clearAllowed"\n size="small"\n (click)="focusOnItem(\'from\')"\n (removed)="removeItem($event, \'from\')">\n <ng-template\n [ngTemplateOutlet]="chipContent"\n [ngTemplateOutletContext]="{ item: item, type: \'from\' }"\n ></ng-template>\n </fs-chip>\n\n <fs-chip\n *ngIf="item.model?.max || item.model?.to"\n [value]="item"\n [selectable]="false"\n [removable]="item.clearAllowed"\n size="small"\n (click)="focusOnItem(\'to\')"\n (removed)="removeItem($event, \'to\')">\n <ng-template\n [ngTemplateOutlet]="chipContent"\n [ngTemplateOutletContext]="{ item: item, type: \'to\' }"\n ></ng-template>\n </fs-chip>\n\n </ng-container>\n\n <ng-template #defaultChip>\n <fs-chip\n *ngIf="itemVisible"\n [value]="item"\n [selectable]="false"\n [removable]="item.clearAllowed"\n size="small"\n (click)="focusOnItem()"\n (removed)="removeItem($event)">\n <ng-template\n [ngTemplateOutlet]="chipContent"\n [ngTemplateOutletContext]="{ item: item }"\n ></ng-template>\n </fs-chip>\n </ng-template>\n\n <ng-template #chipContent let-item="item" let-type="type">\n <ng-container *ngIf="!item.hasPendingValues && !item.loading; else lodaingValues">\n <fs-filter-chip-content [item]="item" [type]="type"></fs-filter-chip-content>\n </ng-container>\n\n <ng-template #lodaingValues>\n Loading...\n </ng-template>\n </ng-template>\n</ng-container>\n\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-chip{cursor:pointer;color:#6f6f6f}"]}),z("design:paramtypes",[t.ChangeDetectorRef,Me])],e)}(),ot=function(){function e(e){this.externalParams=e,this._clear=new t.EventEmitter,this._done=new t.EventEmitter}return Object.defineProperty(e.prototype,"savedFilters",{get:function(){return this.externalParams.savedFiltersController},enumerable:!0,configurable:!0}),e.prototype.done=function(){this._done.emit()},e.prototype.clear=function(){this._clear.emit()},e.prototype.saveFilters=function(){this.externalParams.savedFiltersController.openSavedFilterEditDialog()},e.ctorParameters=function(){return[{type:xe}]},K([t.Output("clear"),z("design:type",Object)],e.prototype,"_clear",void 0),K([t.Output("done"),z("design:type",Object)],e.prototype,"_done",void 0),e=K([t.Component({selector:"fs-filter-drawer-actions",template:'<button type="button" mat-button color="primary" (click)="done()">Done</button>\n<button type="button" mat-button (click)="clear()">Clear</button>\n<ng-container *ngIf="savedFilters.enabled$ | async">\n <button type="button" mat-button (click)="saveFilters()">Save</button>\n</ng-container>\n\n'}),z("design:paramtypes",[xe])],e)}(),rt=function(){function e(){}return e.prototype.transform=function(e,t){return t?e.filter((function(e){return e.value!==t.value})):e},e=K([t.Pipe({name:"fsFilterIsolateValues"})],e)}(),at=function(){function i(e,t,i,o,r,a,s,l,c){this._el=e,this._focusController=t,this._targetSelect=i,this._targetDate=o,this._targetDateScroll=r,this._targetDateRangeFrom=a,this._targetDateRangeTo=s,this._targetAutocomplete=l,this._targetAutocompleteChips=c,this._destroy$=new n.Subject}return i.prototype.ngOnInit=function(){var e=this;this._focusController.listenFocusFor$(this._item,this._focusTargetType).pipe(o.delay(500),o.takeUntil(this._destroy$)).subscribe((function(){e._focus()}))},i.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},i.prototype._focus=function(){switch(this._item.type){case e.ItemType.Select:this._targetSelect.open();break;case e.ItemType.Text:case e.ItemType.Range:this._el.nativeElement.focus();break;case e.ItemType.Date:this._item.mode===e.ItemDateMode.Calendar?this._targetDate.open():this._targetDateScroll.inputClick();break;case e.ItemType.DateRange:"from"===this._focusTargetType?this._targetDateRangeFrom.open():this._targetDateRangeTo.open();break;case e.ItemType.AutoComplete:this._targetAutocomplete.focus();break;case e.ItemType.AutoCompleteChips:this._targetAutocompleteChips.focus()}},i.ctorParameters=function(){return[{type:t.ElementRef},{type:Me},{type:C.MatSelect,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.FsDatePickerComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.FsDateScrollPickerComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.DateRangePickerFromComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.DateRangePickerToComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:A.FsAutocompleteComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:D.FsAutocompleteChipsComponent,decorators:[{type:t.Optional},{type:t.Self}]}]},K([t.Input("fsFilterFocusTrigger"),z("design:type",Object)],i.prototype,"_item",void 0),K([t.Input("focusTargetType"),z("design:type",Object)],i.prototype,"_focusTargetType",void 0),i=K([t.Directive({selector:"[fsFilterFocusTrigger]"}),U(2,t.Optional()),U(2,t.Self()),U(3,t.Optional()),U(3,t.Self()),U(4,t.Optional()),U(4,t.Self()),U(5,t.Optional()),U(5,t.Self()),U(6,t.Optional()),U(6,t.Self()),U(7,t.Optional()),U(7,t.Self()),U(8,t.Optional()),U(8,t.Self()),z("design:paramtypes",[t.ElementRef,Me,C.MatSelect,w.FsDatePickerComponent,w.FsDateScrollPickerComponent,w.DateRangePickerFromComponent,w.DateRangePickerToComponent,A.FsAutocompleteComponent,D.FsAutocompleteChipsComponent])],i)}(),st=function(){function e(e){this._cdRef=e,this._destroy$=new n.Subject}return e.prototype.ngOnInit=function(){this.listenValueChangesForRanges()},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.listenValueChangesForRanges=function(){var e=this;this.item.value$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.content=e._getContent(),e._cdRef.detectChanges()}))},e.prototype._getContent=function(){var e=this.item.getChipsContent(this.type);return void 0!==this.item.chipLabel?""===this.item.chipLabel?""+e:Array.isArray(this.item.chipLabel)?lt(this.item.chipLabel,this.type)+": "+e:this.item.chipLabel+": "+e:Array.isArray(this.item.label)?lt(this.item.label,this.type)+": "+e:this.item.isTypeCheckbox?e:this.item.label+": "+e},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},K([t.Input(),z("design:type",Q)],e.prototype,"item",void 0),K([t.Input(),z("design:type",String)],e.prototype,"type",void 0),e=K([t.Component({selector:"fs-filter-chip-content",template:"{{ content }}\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}();function lt(e,t){return"from"===t&&e[0]?""+e[0]:"to"===t&&e[1]?""+e[1]:""}var ct=function(){function e(e,i,n){this._itemsStore=e,this._externalParams=i,this._savedFilters=n,this.select=new t.EventEmitter,this.clear=new t.EventEmitter,this.manage=new t.EventEmitter}return Object.defineProperty(e.prototype,"filters$",{get:function(){return this._savedFilters.savedFilters$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilter$",{get:function(){return this._savedFilters.activeFilter$},enumerable:!0,configurable:!0}),e.prototype.selectFilter=function(e){this._externalParams.setActiveSavedFilter(e),this.select.emit(e)},e.prototype.removeActiveFilter=function(){this._itemsStore.filtersClear(),this._externalParams.setActiveSavedFilter(null),this.clear.emit()},e.prototype.manageFilters=function(){this.manage.emit()},e.ctorParameters=function(){return[{type:he},{type:xe},{type:we}]},K([t.Output(),z("design:type",Object)],e.prototype,"select",void 0),K([t.Output(),z("design:type",Object)],e.prototype,"clear",void 0),K([t.Output(),z("design:type",Object)],e.prototype,"manage",void 0),e=K([t.Component({selector:"fs-filter-saved-filters-menu",template:'<a [fsMenuTriggerFor]="menu" class="selector">{{ (activeFilter$ | async)?.name || \'Not selected\' }}</a>\n\n<fs-menu #menu>\n <ng-container *ngIf="activeFilter$ | async">\n <ng-template fs-menu-item (click)="removeActiveFilter()">\n None\n </ng-template>\n </ng-container>\n <ng-container *ngFor="let filter of filters$ | async">\n <ng-template fs-menu-item (click)="selectFilter(filter)">\n {{ filter.name }}\n </ng-template>\n </ng-container>\n <ng-template fs-menu-item class="saved-filter-last-item" (click)="manageFilters()">\n Manage\n </ng-template>\n</fs-menu>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host ::ng-deep .selector{cursor:pointer}"]}),z("design:paramtypes",[he,xe,we])],e)}(),ut=function(){function e(){this.kebabActions=[],this.actions=[]}return K([t.Input(),z("design:type",Array)],e.prototype,"kebabActions",void 0),K([t.Input(),z("design:type",Array)],e.prototype,"actions",void 0),e=K([t.Component({selector:"fs-filter-actions",template:'\x3c!-- Buttons --\x3e\n<ng-container *ngFor="let action of actions">\n\n <ng-container [ngSwitch]="action.mode">\n <ng-container *ngSwitchCase="\'button\'">\n <fs-filter-action-button [action]="action"></fs-filter-action-button>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'menu\'">\n <fs-filter-action-button\n [action]="action"\n [fsMenuTriggerFor]="someRef">\n </fs-filter-action-button>\n\n <fs-menu #someRef>\n <ng-container *ngFor="let childAction of action.items">\n <ng-container *ngIf="childAction.isGroup else simpleMenuItem">\n <fs-menu-group [label]="childAction.label">\n <ng-container *ngFor="let subAction of childAction.items">\n <ng-template fs-menu-item\n [link]="subAction.routerLink?.link"\n [queryParams]="subAction.routerLink?.queryParams"\n [hidden]="!(subAction.visible$ | async)"\n (click)="subAction.click($event)">\n <mat-icon *ngIf="subAction.icon">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template fs-menu-item\n [link]="childAction.routerLink?.link"\n [queryParams]="childAction.routerLink?.queryParams"\n [hidden]="!(childAction.visible$ | async)"\n (click)="childAction.click($event);">\n <mat-icon *ngIf="childAction.icon">{{childAction.icon}}</mat-icon>\n {{childAction.label}}\n </ng-template>\n </ng-template>\n </ng-container>\n </fs-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'file\'">\n <fs-file\n class="action-button"\n [multiple]="action.multiple"\n (select)="action.fileSelected($event)"\n (error)="action.fileError($event)"\n (clicked)="action.click($event)">\n <fs-filter-action-button [action]="action"></fs-filter-action-button>\n </fs-file>\n </ng-container>\n </ng-container>\n</ng-container>\n\x3c!-- /Buttons --\x3e\n\n\x3c!-- menu --\x3e\n<ng-container *ngIf="kebabActions?.length">\n <fs-filter-action-kebab-actions [kebabActions]="kebabActions"></fs-filter-action-kebab-actions>\n</ng-container>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-flex}.action-button{display:block}.action-button+.action-button,fs-menu+.action-button{margin-left:5px}.menu-button{width:36px;height:36px;line-height:36px}"]})],e)}(),pt=function(){function e(){}return K([t.Input(),z("design:type",Be)],e.prototype,"action",void 0),e=K([t.Component({selector:"fs-filter-action-button",template:'<ng-container [ngSwitch]="action.type">\n \x3c!-- Basic button --\x3e\n <button type="button"\n *ngSwitchCase="\'basic\'"\n mat-button\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Raised button --\x3e\n <button type="button"\n *ngSwitchDefault\n mat-raised-button\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Icon button --\x3e\n <button type="button"\n *ngSwitchCase="\'icon\'"\n mat-icon-button\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Fab button --\x3e\n <button type="button"\n *ngSwitchCase="\'fab\'"\n mat-fab\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Mini Fab button --\x3e\n <button type="button"\n *ngSwitchCase="\'mini-fab\'"\n mat-mini-fab\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n <ng-template #buttonContent>\n <mat-icon *ngIf="action.icon">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n</ng-container>\n',host:{class:"action-button"},changeDetection:t.ChangeDetectionStrategy.OnPush})],e)}(),ft=function(){function e(){}return K([t.Input(),z("design:type",Array)],e.prototype,"kebabActions",void 0),e=K([t.Component({selector:"fs-filter-action-kebab-actions",template:'<button type="button"\n mat-icon-button\n class="menu-button"\n [fsMenuTriggerFor]="kebabActionsMenu">\n <mat-icon>more_vert</mat-icon>\n</button>\n<fs-menu #kebabActionsMenu>\n <ng-container *ngFor="let action of kebabActions">\n <ng-container [ngSwitch]="action.mode">\n \x3c!-- Case when actions was collapsed from action with mode = \'menu\'--\x3e\n <ng-container *ngSwitchCase="\'menu\'">\n <ng-container *ngFor="let childAction of action.items">\n <ng-container *ngIf="childAction.isGroup else simpleMenuItem">\n <fs-menu-group>\n <ng-template fs-group-menu-item-template>\n {{ action.label }} <mat-icon style="margin: 0;">arrow_right</mat-icon> {{childAction.label}}\n </ng-template>\n <ng-container *ngFor="let subAction of childAction.items">\n <ng-template fs-menu-item\n [link]="subAction.routerLink?.link"\n [queryParams]="subAction.routerLink?.queryParams"\n [hidden]="!(subAction.visible$ | async)"\n (click)="subAction.click($event)">\n <mat-icon *ngIf="subAction.icon">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template fs-menu-item\n [link]="childAction.routerLink?.link"\n [queryParams]="childAction.routerLink?.queryParams"\n [hidden]="!(childAction.visible$ | async)"\n (click)="childAction.click($event);">\n <mat-icon *ngIf="childAction.icon">{{childAction.icon}}</mat-icon>\n {{ action.label }} <mat-icon style="margin: 0;">arrow_right</mat-icon>{{ childAction.label }}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template fs-menu-item\n (click)="action.click($event)"\n [fsClass]="action.classArray"\n >\n <mat-icon *ngIf="action.icon">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n </ng-container>\n </ng-container>\n</fs-menu>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".menu-button{width:36px;height:36px;line-height:36px}"]})],e)}(),mt=function(){function e(){}var n;return n=e,e.forRoot=function(e){return void 0===e&&(e={}),{ngModule:n,providers:[{provide:Fe,useValue:e||{}}]}},e=n=K([t.NgModule({imports:[u.CommonModule,i.RouterModule,h.FormsModule,h.ReactiveFormsModule,v.MatIconModule,_.MatInputModule,C.MatSelectModule,b.MatChipsModule,g.MatCheckboxModule,d.MatAutocompleteModule,y.MatButtonModule,p.MatDialogModule,O.FlexLayoutModule,x.FsChipModule,s.FsCommonModule,m.FsStoreModule,w.FsDatePickerModule,F.FsLabelModule,A.FsAutocompleteModule,D.FsAutocompleteChipsModule,k.FsScrollModule,I.PortalModule,j.FsMaskModule,P.FsMenuModule,$.FsSkeletonModule,S.FsFormModule,M.FsFileModule],declarations:[Ue,qe,Ke,tt,ze,Le,Ne,We,Qe,Ye,He,Ge,Je,Ze,Xe,et,$e,it,nt,st,ot,Ie,ct,ut,pt,ft,Ve,at,rt],providers:[m.FsStore],exports:[qe,Ve,ct],entryComponents:[$e]})],e)}();e.AutocompleteChipsItem=pe,e.AutocompleteItem=ue,e.BaseItem=Q,e.CheckboxItem=fe,e.ChipsItem=X,e.DateItem=se,e.DateRangeItem=oe,e.DateTimeItem=le,e.DateTimeRangeItem=re,e.ExternalParamsController=xe,e.FS_FILTER_CONFIG=Fe,e.FilterComponent=qe,e.FilterItemComponent=Ke,e.FilterStatusBarDirective=Ve,e.FsFilterModule=mt,e.QUERY_PARAM_DELIMITER=":",e.RangeItem=ie,e.SavedFiltersController=we,e.SelectItem=Z,e.TextItem=me,e.filterFromQueryParam=ye,e.filterToQueryParam=de,e.ɵa=he,e.ɵb=_e,e.ɵba=it,e.ɵbb=nt,e.ɵbc=st,e.ɵbd=ot,e.ɵbe=Ie,e.ɵbf=ct,e.ɵbg=ut,e.ɵbh=pt,e.ɵbi=ft,e.ɵbj=at,e.ɵbk=rt,e.ɵbl=ae,e.ɵbm=ne,e.ɵbn=ce,e.ɵc=Ce,e.ɵd=Ue,e.ɵe=Te,e.ɵg=Se,e.ɵh=Me,e.ɵi=Ee,e.ɵj=G,e.ɵk=tt,e.ɵl=ze,e.ɵm=Le,e.ɵn=Ne,e.ɵo=We,e.ɵp=Qe,e.ɵq=Ye,e.ɵr=He,e.ɵs=Ge,e.ɵt=Je,e.ɵu=Ze,e.ɵv=Xe,e.ɵw=et,e.ɵx=$e,e.ɵy=Pe,e.ɵz=je,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var R=function(e,t){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function B(e,t){function i(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var E,q=function(){return(q=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function U(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a}function K(e,t){return function(i,n){t(i,n,e)}}function z(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function L(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,o,r=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(o)throw o.error}}return a}function W(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(N(arguments[t]));return e}(E=e.ItemType||(e.ItemType={})).Text="text",E.Select="select",E.Range="range",E.Date="date",E.DateTime="datetime",E.DateRange="daterange",E.DateTimeRange="datetimerange",E.AutoComplete="autocomplete",E.AutoCompleteChips="autocompletechips",E.Checkbox="checkbox",E.Chips="chips",E.Keyword="keyword";var Q=function(){function t(e,t){this._additionalConfig=t,this._initialized=!1,this._pendingValues=!1,this._loading$=new n.BehaviorSubject(!1),this._value$=new n.BehaviorSubject(null),this._valueChange$=new n.Subject,this._values$=new n.BehaviorSubject(null),this._destroy$=new n.Subject,this._clear$=new n.Subject,this._type=e.type,this._parseConfig(e)}return Object.defineProperty(t.prototype,"isTypeAutocomplete",{get:function(){return this.type===e.ItemType.AutoComplete},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeAutocompleteChips",{get:function(){return this.type===e.ItemType.AutoCompleteChips},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeChips",{get:function(){return this.type===e.ItemType.Chips},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeCheckbox",{get:function(){return this.type===e.ItemType.Checkbox},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeSelect",{get:function(){return this.type===e.ItemType.Select},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDate",{get:function(){return this.type===e.ItemType.Date},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDateRange",{get:function(){return this.type===e.ItemType.DateRange},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeRange",{get:function(){return this.type===e.ItemType.Range},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDateTimeRange",{get:function(){return this.type===e.ItemType.DateTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeDateTime",{get:function(){return this.type===e.ItemType.DateTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTypeKeyword",{get:function(){return this.type===e.ItemType.Keyword},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return!!this.model},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroy$",{get:function(){return this._destroy$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPendingValues",{get:function(){return this._pendingValues},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"model",{get:function(){return this._model},set:function(e){this._setModel(e),this.valueChanged()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._values$.getValue()},set:function(e){this._values$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"values$",{get:function(){return this._values$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChange$",{get:function(){return this._valueChange$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value$",{get:function(){return this._value$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clear$",{get:function(){return this._clear$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loading$",{get:function(){return this._loading$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loading",{get:function(){return this._loading$.getValue()},set:function(e){this._loading$.next(e)},enumerable:!0,configurable:!0}),t.prototype.valueChanged=function(){this._value$.next(this.value),this.change&&this.change(this),this.initialized&&this._valueChange$.next()},Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t=this.name,i={};return Array.isArray(e)?i[this.name]=e.join(","):i[t]=e,i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"persistanceObject",{get:function(){return this.queryObject},enumerable:!0,configurable:!0}),t.prototype.initValues=function(t){this._initialized=!1,this.persistedValue=t,this._initDefaultModel();var i=this.type===e.ItemType.AutoComplete||this.type===e.ItemType.AutoCompleteChips;if(this._valuesFn&&!i){var o=this._valuesFn();n.isObservable(o)?this._pendingValues=!0:(this.values=o,this._init(),this._initialized=!0)}else this._init(),this._initialized=!0},t.prototype.loadAsyncValues=function(e){var t=this;void 0===e&&(e=!0),(e||!this.loading&&this.hasPendingValues)&&(this.loading=!0,this._valuesFn().pipe(o.take(1),o.takeUntil(this._destroy$)).subscribe((function(e){t.values=e,t._pendingValues=!1,t.loading=!1,t._init(),t._validateModel(),t._initialized=!0})))},t.prototype.clear=function(e){void 0===e&&(e=void 0),(this.isTypeRange||this.isTypeDateRange||this.isTypeDateTimeRange)&&console.warn("\n Filter "+this.name+" can not be cleared with .clear() method!\n Use special .clearRange() or clearDateRange() instead.\n "),this._clear$.next(e),this._clearValue(e)},t.prototype.getChipsContent=function(e){return""},t.prototype.destroy=function(){this._destroy$.next(),this._destroy$.complete()},t.prototype._setModel=function(e){this._model=e},t.prototype._parseConfig=function(e){var t,i,n;this.name=e.name,this.label=e.label,this.chipLabel=e.chipLabel,this.defaultValue=e.default,this.change=e.change,this.hide=e.hide,this.clearAllowed=null===(t=e.clear)||void 0===t||t,this.persistanceDisabled=null!==(i=e.disablePersist)&&void 0!==i&&i,this.queryParamsDisabled=null!==(n=e.disableQueryParams)&&void 0!==n&&n,r.isFunction(e.values)?this._valuesFn=e.values:this.values=e.values},t.prototype._initDefaultModel=function(){var e,t=null!==(e=this.persistedValue)&&void 0!==e?e:this.defaultValue;void 0!==t&&(this.model=t)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null},t}(),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.prototype._parseConfig=function(t){this.multiple=t.multiple,this.children=t.children,t.isolate&&(this.isolate=q(q({},t.isolate),{enabled:!1})),e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){var e=this;Array.isArray(this.values)||(this.values=[]),this.isolate&&(this.values=this.values.filter((function(t){return Array.isArray(e.isolate.value)?-1===e.isolate.value.indexOf(t.value):t.value!==e.isolate.value})))},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.isolate&&(this.isolate.enabled=!1)},t}(Q),H=function(e){function t(t,i){return e.call(this,t,i)||this}return B(t,e),Object.defineProperty(t.prototype,"value",{get:function(){var e=this.model;return"__all"!=e&&void 0!==e||(e=null),e},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){var t,i=this;return void 0===e&&(e=null),this.children?(t=function e(t,i,n){for(var o=0;o<t.length;o++){var r=t[o];if(r[n])return e(r[n],i,n);if(r.value===i)return r}}(this.values,this.model,this.children))&&t.name:(t=this.values.find((function(e){return e.value===i.model})))?t.name:this.isolate?this.isolate.label:void 0},Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return"__all"!==this.model&&void 0!==this.model},enumerable:!0,configurable:!0}),t.prototype._init=function(){e.prototype._init.call(this),void 0===this.model&&void 0===this.defaultValue&&(this._model="__all")},t.prototype._setModel=function(t){t&&(isNaN(t)||(t=+t)),e.prototype._setModel.call(this,t)},t.prototype._validateModel=function(){var e=this,t=this.values.find((function(t){return t.value==e.model})),i=t?t.value:"__all";this._model!==i&&(this.model=i)},t.prototype._clearValue=function(t){void 0===t&&(t=void 0),e.prototype._clearValue.call(this,t);var i=Array.isArray(this.values)&&this.values.some((function(e){return"__all"===e.value}))?"__all":null;this.model=null!=t?t:i},t}(Y),G=function(e){function t(t){void 0===t&&(t={});var i=e.call(this)||this;return i.load=!0,i.persist=!1,i.inline=!1,i.autofocus=!1,i.chips=!1,i.sortValues=null,i.sort=null,i.sortDirection=null,i.queryParam=!1,i.case="snake",i._fromJSON(t),i._init(),i}return B(t,e),t.prototype._init=function(){this.button||(this.button={}),void 0===this.button.label&&(this.button.label="Filters"),void 0===this.button.icon&&(this.button.icon="tune"),void 0===this.button.style&&(this.button.style="raised"),void 0===this.button.color&&(this.button.color="default"),void 0===this.clear&&(this.clear=function(){})},t.prototype._fromJSON=function(t){var i;e.prototype._fromJSON.call(this,t),this.case=null!==(i=t.case)&&void 0!==i?i:"snake",this.persist&&"object"==typeof this.persist&&this.persist.name&&(this.namespace=this.persist.name)},U([a.Alias(),z("design:type",Object)],t.prototype,"load",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"persist",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"savedFilters",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"inline",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"autofocus",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"chips",void 0),U([a.Alias("sorts"),z("design:type",Array)],t.prototype,"sortValues",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"sort",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"sortDirection",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"queryParam",void 0),U([a.Alias(),z("design:type",Function)],t.prototype,"init",void 0),U([a.Alias(),z("design:type",Function)],t.prototype,"change",void 0),U([a.Alias(),z("design:type",Function)],t.prototype,"reload",void 0),U([a.Alias(),z("design:type",Function)],t.prototype,"clear",void 0),U([a.Alias(),z("design:type",Function)],t.prototype,"sortChange",void 0),U([a.Alias(),z("design:type",String)],t.prototype,"case",void 0),U([a.Alias(),z("design:type",Boolean)],t.prototype,"reloadWhenConfigChanged",void 0),U([a.Alias(),z("design:type",Object)],t.prototype,"button",void 0),U([a.Alias(),z("design:type",Array)],t.prototype,"items",void 0),U([a.Alias(),z("design:type",Array)],t.prototype,"actions",void 0),t}(a.Model),J=function(e){function t(t,i){return e.call(this,t,i)||this}return B(t,e),Object.defineProperty(t.prototype,"value",{get:function(){var e=r.clone(this.model);return(!Array.isArray(e)||0===e.length||e.indexOf("__all")>-1)&&(e=null),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return Array.isArray(this.model)&&this.model.length>0},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){var t=this;return void 0===e&&(e=null),this.model.reduce((function(e,i){var n,o=t.values.find((function(e){return e.value===i}));return o?n=o.name:t.isolate&&t.isolate.enabled&&(n=t.isolate.label),e.includes(n)||e.push(n),e}),[]).join(", ")},t.prototype._init=function(){e.prototype._init.call(this),void 0!==this.model||Array.isArray(this.defaultValue)||(this.model=[])},t.prototype._setModel=function(t){Array.isArray(t)&&(t=t.map((function(e){return isNaN(e)?e:+e}))),e.prototype._setModel.call(this,t)},t.prototype._validateModel=function(){var e=this;this.model=s.filter(this.model||[],(function(t){return e.values.find((function(e){return e.value==t}))}))},t.prototype._clearValue=function(t){void 0===t&&(t=void 0),e.prototype._clearValue.call(this,t),this.model=null!=t?t:[]},t}(Y),Z=function(){function e(){}return e.create=function(e){return e.multiple?new J(e,null):new H(e,null)},e}(),X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"isTypeChips",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=r.clone(this.model);return Array.isArray(e)&&0===e.length?null:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return!!this.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e,t=this.value;return(e={})[this.name]=t,e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"persistanceObject",{get:function(){var e=this.value,t=this.name,i={};return Array.isArray(e)?i[t]=e.join(","):i[t]=null,i},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model.reduce((function(e,t){return e.push(t.name),e}),[]).join(", ")},t.prototype._validateModel=function(){},t.prototype._setModel=function(e){Array.isArray(e)&&(e=e.map((function(e){return isNaN(e)?e:+e}))),this._model=e},t.prototype._parseConfig=function(t){this.multiple=t.multiple,e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){var e=this;Array.isArray(this.values)||(this.values=[]),this.model&&Array.isArray(this.model)&&this.values.length&&Number.isInteger(this.model[0])&&(this._model=this.model.map((function(t){return e.values.find((function(e){return e.value===t}))}))),void 0===this.model&&(this._model=[])},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:[]},t}(Q);function ee(e,t,i){return"snake"===e?t.concat("_").concat(i):"camel"===e?t.concat(i.charAt(0).toUpperCase()).concat(i.slice(1)):void 0}var te,ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e,i){return new t(e,i)},Object.defineProperty(t.prototype,"value",{get:function(){var e=r.clone(this.model);return(!r.isObject(this.model)||s.isEmpty(this.model.max,{zero:!0})&&s.isEmpty(this.model.min,{zero:!0}))&&(e=null),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t=this.name,i={},n=ee(this.case,t,"min"),o=ee(this.case,t,"max");return r.isObject(e)?(i[n]=e.min||null,i[o]=e.max||null):(i[n]=null,i[o]=null),i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return this.model&&(void 0!==this.model.min||void 0!==this.model.max)},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){return"from"===e?""+this.model.min:"to"===e?""+this.model.max:void 0},t.prototype.clearRange=function(e,t){void 0===e&&(e=null),void 0===t&&(t=void 0),"from"===e?(delete this.model.min,(null==t?void 0:t.min)&&(this.model.min=t.min),this.model=q({},this.model)):"to"===e?(delete this.model.max,(null==t?void 0:t.max)&&(this.model.max=t.max),this.model=q({},this.model)):this.model=t?q({},t):{}},t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){var i,n;this.options=t.options,this.prefix=t.prefix,this.suffix=t.suffix,this.case=null!==(n=null===(i=this._additionalConfig)||void 0===i?void 0:i.case)&&void 0!==n?n:"camel",e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){this.label||(this.label=["Min","Max"]),this.model||(this.model=this.defaultValue||{})},t}(Q),ne=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return B(i,t),Object.defineProperty(i.prototype,"isTypeDateRange",{get:function(){return this.type===e.ItemType.DateRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isTypeDateTimeRange",{get:function(){return this.type===e.ItemType.DateTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isChipVisible",{get:function(){return this.model&&(void 0!==this.model.from||void 0!==this.model.to)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){var e=r.clone(this.model);if((!r.isObject(this.model)||s.isEmpty(this.model.from,{zero:!0})&&s.isEmpty(this.model.to,{zero:!0}))&&(e=null),s.isEmpty(e,{zero:!0}))return null;var t=e.from,i=e.to;return e={},t&&(r.isString(t)&&(t=c.parseISO(t)),c.isValid(t)&&c.isDate(t)&&(e.from=t)),i&&(r.isString(i)&&(i=c.parseISO(i)),c.isValid(i)&&c.isDate(i)&&(e.to=i)),e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"queryObject",{get:function(){var e,t=this.value||{},i=this.name,n=ee(this.case,i,"from"),o=ee(this.case,i,"to");return(e={})[n]=t.from||null,e[o]=t.to||null,e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"persistanceObject",{get:function(){var e=this.queryObject;return Object.keys(this.queryObject).reduce((function(t,i){return e[i]?t[i]=l.simpleFormat(e[i]):t[i]=e[i],t}),{})},enumerable:!0,configurable:!0}),i.prototype.getChipsContent=function(t){void 0===t&&(t=null);var i=this.type===e.ItemType.DateRange?"date":"date-time";if("from"===t){var n=this.model.from;return""+l.format(n,i)}if("to"===t){var o=this.model.to;return""+l.format(o,i)}},i.prototype.clearDateRange=function(e,t){void 0===e&&(e=null),void 0===t&&(t=void 0),"from"===e?(delete this.model.from,(null==t?void 0:t.from)&&(this.model.from=t.from),this.model=q({},this.model)):"to"===e?(delete this.model.to,(null==t?void 0:t.to)&&(this.model.to=t.to),this.model=q({},this.model)):this.model=t?q({},t):{}},i.prototype._validateModel=function(){},i.prototype._setModel=function(e){e&&(!e.from||c.isDate(e.from)&&c.isValid(e.from)||(e.from=c.parseISO(e.from)),!e.to||c.isDate(e.to)&&c.isValid(e.to)||(e.to=c.parseISO(e.to))),t.prototype._setModel.call(this,e)},i.prototype._parseConfig=function(e){var i,n;this.case=null!==(n=null===(i=this._additionalConfig)||void 0===i?void 0:i.case)&&void 0!==n?n:"camel",t.prototype._parseConfig.call(this,e)},i.prototype._init=function(){this.label||(this.label=["Date From","Date To"]),this.model||(this.model=this.defaultValue||{})},i.prototype._clearValue=function(e){var t;void 0===e&&(e=void 0),this.model=null!==(t=this.defaultValue)&&void 0!==t?t:{}},i}(Q),oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},t}(ne),re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},t}(ne);(te=e.ItemDateMode||(e.ItemDateMode={})).Calendar="calendar",te.ScrollMonthYear="monthyear",te.ScrollMonthDayYear="monthdayyear";var ae=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return B(i,t),Object.defineProperty(i.prototype,"value",{get:function(){var e=r.clone(this.model);return e&&c.isValid(e)&&c.isDate(e)?e:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=e,t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"persistanceObject",{get:function(){var e,t=this.queryObject[this.name];return(e={})[this.name]=t?l.simpleFormat(t):null,e},enumerable:!0,configurable:!0}),i.prototype._validateModel=function(){},i.prototype._setModel=function(e){e&&(c.isDate(e)&&c.isValid(e)||(e=c.parseISO(e))),t.prototype._setModel.call(this,e)},i.prototype._parseConfig=function(i){this.maxYear=i.maxYear,this.mode=i.mode||e.ItemDateMode.Calendar,t.prototype._parseConfig.call(this,i)},i.prototype._init=function(){this.label||(this.label=["Min","Max"])},i}(Q),se=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return B(i,t),i.create=function(e){return new i(e,null)},i.prototype.getChipsContent=function(t){void 0===t&&(t=null);var i="date";return this.mode==e.ItemDateMode.ScrollMonthYear&&(i="full-date-dayless"),l.format(this.model,i)},i.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null},i}(ae),le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null},t}(ae),ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),Object.defineProperty(t.prototype,"valuesFn",{get:function(){return this._valuesFn},enumerable:!0,configurable:!0}),t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){var i;this.fetchOnFocus=null===(i=t.fetchOnFocus)||void 0===i||i,e.prototype._parseConfig.call(this,t)},t}(Q),ue=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"value",{get:function(){r.clone(this.model);return!this.model||s.isEmpty(this.model.value,{zero:!0})?null:this.model.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=e,t},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model?this.model.name:""},t.prototype._init=function(){},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:null,this.search=""},t}(ce),pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"value",{get:function(){return Array.isArray(this.model)&&0===this.model.length?null:r.clone(this.model)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t=this.name,i={};return Array.isArray(e)?i[this.name]=e.filter((function(e){return!!e.value})).map((function(e){return e.value})).join(","):i[t]=e,i},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return Array.isArray(this.model)&&this.model.length>0},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model.reduce((function(e,t){return e.push(t.name),e}),[]).join(", ")},t.prototype._init=function(){void 0===this.model&&(this._model=[])},t.prototype._parseConfig=function(t){var i;this.chipImage=null!==(i=t.chipImage)&&void 0!==i?i:"image",this.chipIcon=t.chipIcon,this.chipIconColor=t.chipIconColor,this.chipColor=t.chipColor,this.chipBackground=t.chipBackground,this.chipClass=t.chipClass,e.prototype._parseConfig.call(this,t)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:[],this.search=""},t.prototype._setModel=function(t){e.prototype._setModel.call(this,t||[])},t}(ce),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"isTypeCheckbox",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isChipVisible",{get:function(){return this.value===this.checked},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=this.model?this.checked:this.unchecked;return e||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=this.model?e:null,t},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(e){return void 0===e&&(e=null),this.label},t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){this.checked=t.checked,this.unchecked=t.unchecked,this.checked=!t.checked||r.toString(t.checked),this.unchecked=!!t.unchecked&&r.toString(t.unchecked),this.defaultValue=void 0===t.default?this.unchecked:r.toString(this.defaultValue),e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){void 0===this.model&&(this._model=this.checked==this.defaultValue)},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e&&e},t}(Q),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.create=function(e){return new t(e,null)},Object.defineProperty(t.prototype,"value",{get:function(){return this.model?this.model:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryObject",{get:function(){var e=this.value,t={};return t[this.name]=e,t},enumerable:!0,configurable:!0}),t.prototype.getChipsContent=function(){return this.model},t.prototype._validateModel=function(){},t.prototype._parseConfig=function(t){this.prefix=t.prefix,this.suffix=t.suffix,e.prototype._parseConfig.call(this,t)},t.prototype._init=function(){},t.prototype._clearValue=function(e){void 0===e&&(e=void 0),this.model=null!=e?e:""},t}(Q);var he=function(){function i(){this.sortByItem=null,this.sortDirectionItem=null,this.keywordItem=null,this._items=[],this._visibleItems$=new n.BehaviorSubject([]),this._itemsByName=new Map,this._itemsValuesLoaded=!1,this._hasKeyword=!1,this._itemsChange$=new n.Subject}return Object.defineProperty(i.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visibleItems",{get:function(){return this._visibleItems$.getValue()},set:function(e){this._visibleItems$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visibleItems$",{get:function(){return this._visibleItems$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasKeyword",{get:function(){return this._hasKeyword},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemsChange$",{get:function(){return this._itemsChange$.pipe(o.debounceTime(30))},enumerable:!0,configurable:!0}),i.prototype.ngOnDestroy=function(){this.destroyItems()},i.prototype.setConfig=function(e){this._itemsByName.clear(),this._config=e,this.initItems(e.items)},i.prototype.getItemByName=function(e){return this._itemsByName.get(e)},i.prototype.initItems=function(e){this._itemsValuesLoaded=!1,Array.isArray(e)&&(this._createItems(e),this.updateVisibleItems(),this._setKeywordItem())},i.prototype.filtersClear=function(){var e;this.items.forEach((function(e){e instanceof ie?e.clearRange(null,e.defaultValue):e instanceof ne?e.clearDateRange(null,e.defaultValue):e.clear(e.defaultValue)})),this.sortByItem&&(this._config.sort?this.sortByItem.model=this._config.sort.value:this.sortByItem.clear(this.sortByItem.defaultValue)),this.sortDirectionItem&&(this._config.sort?this.sortDirectionItem.model=this._config.sort.direction:this.sortDirectionItem.clear(this.sortDirectionItem.defaultValue)),null===(e=this.keywordItem)||void 0===e||e.clear()},i.prototype.loadAsyncValues=function(){this.items.filter((function(e){return e.hasPendingValues})).forEach((function(e){return e.loadAsyncValues()}))},i.prototype.getSort=function(){var e=this.getSortByValue();e="__all"===e?null:e;var t=this.getSortDirectionValue();return{value:e,direction:t="__all"===t?null:t}},i.prototype.getSortByValue=function(){return this.sortByItem?this.sortByItem.model:null},i.prototype.getSortDirectionValue=function(){return this.sortDirectionItem?this.sortDirectionItem.model:null},i.prototype.updateSort=function(e){e.sortBy&&(this.sortByItem.model=e.sortBy),e.sortDirection&&(this.sortDirectionItem.model=e.sortDirection)},i.prototype.values=function(e){return void 0===e&&(e=!1),this.items.reduce((function(t,i){var n=i.value;return e&&null===n||(t[i.name]=n),t}),{})},i.prototype.valuesAsQuery=function(e){var t=void 0===e?{}:e,i=t.onlyPresented,n=void 0===i||i,o=t.items,a=void 0===o?null:o,s=t.persisted,l=void 0!==s&&s,c={};return(a||this.items).forEach((function(e){var t=l?e.persistanceObject:e.queryObject;Object.assign(c,t)})),n?r.pickBy(c,(function(e){return null!=e})):c},i.prototype.initItemValues=function(e){this.items.forEach((function(t){t.initValues(e[t.name])})),this._createSortingItems(e),this._subscribeToItemsChanges()},i.prototype.updateItemsWithValues=function(e){this.items.forEach((function(t){e[t.name]?t.model=e[t.name]:t.clear()})),this.sortByItem&&this.sortByItem.clear(),this.sortDirectionItem&&this.sortDirectionItem.clear()},i.prototype.destroyItems=function(){var e,t;this.items.forEach((function(e){return e.destroy()})),null===(e=this.sortByItem)||void 0===e||e.destroy(),null===(t=this.sortDirectionItem)||void 0===t||t.destroy(),this._items=[],this.sortByItem=null,this.sortDirectionItem=null},i.prototype.prepareItems=function(){this._itemsValuesLoaded||(this._itemsValuesLoaded=!0,this.loadAsyncValues())},i.prototype.updateVisibleItems=function(){this.visibleItems=this.items.filter((function(e){return!e.isTypeKeyword&&!e.hide}))},i.prototype._createItems=function(t){var i=this;this._items=t.filter((function(e){return!e.disable})).filter((function(e){if(i._itemsByName.has(e.name))throw Error("Filter init error. Items name must be unique.");return i._itemsByName.set(e.name,null),!0})).map((function(t){var n=function(t,i){switch(t.type){case e.ItemType.Select:return Z.create(t);case e.ItemType.Chips:return X.create(t);case e.ItemType.Range:return ie.create(t,i);case e.ItemType.DateRange:return oe.create(t);case e.ItemType.DateTimeRange:return re.create(t);case e.ItemType.Date:return se.create(t);case e.ItemType.DateTime:return le.create(t);case e.ItemType.AutoComplete:return ue.create(t);case e.ItemType.AutoCompleteChips:return pe.create(t);case e.ItemType.Checkbox:return fe.create(t);case e.ItemType.Keyword:case e.ItemType.Text:return me.create(t)}}(t,{case:i._config.case});return n.type===e.ItemType.Keyword&&(i._hasKeyword=!0),i._itemsByName.set(t.name,n),n}))},i.prototype._subscribeToItemsChanges=function(){var e,t=this;this.items.forEach((function(e){e.valueChange$.pipe(o.takeUntil(e.destroy$)).subscribe((function(){t._itemsChange$.next(e)}))})),(null===(e=this._config.sortValues)||void 0===e?void 0:e.length)&&(this.sortByItem.valueChange$.pipe(o.takeUntil(this.sortByItem.destroy$)).subscribe((function(){t._itemsChange$.next(t.sortByItem)})),this.sortDirectionItem.valueChange$.pipe(o.takeUntil(this.sortDirectionItem.destroy$)).subscribe((function(){t._itemsChange$.next(t.sortDirectionItem)})))},i.prototype._createSortingItems=function(t){var i;if((null===(i=this._config.sortValues)||void 0===i?void 0:i.length)>0){var n={name:"system_sort_by",type:e.ItemType.Select,label:"Sort By",values:this._config.sortValues};this._config.sort&&this._config.sort.value&&(n.default=this._config.sort.value),this.sortByItem=new H(n,null),this.sortByItem.initValues(t[this.sortByItem.name]);var o={name:"system_sort_direction",type:e.ItemType.Select,label:"Sort Direction",values:[{name:"Ascending",value:"asc"},{name:"Descending",value:"desc"}]};this._config.sort&&this._config.sort.direction&&(o.default=this._config.sort.direction),this.sortDirectionItem=new H(o,null),this.sortDirectionItem.initValues(t[this.sortDirectionItem.name])}},i.prototype._setKeywordItem=function(){this.keywordItem=this.items.find((function(e){return e.isTypeKeyword}))},i=U([t.Injectable(),z("design:paramtypes",[])],i)}();function de(e,t){return encodeURIComponent(e)+":"+encodeURIComponent(t)}function ye(e){var t=e.split(":");return[decodeURIComponent(t[0]),decodeURIComponent(t[1])]}function ge(e){return isNaN(e)?e:+e}function be(t,i,n){var o,r,a=i[t.name];switch(t.type){case e.ItemType.Range:return{min:i[ee(n,t.name,"min")],max:i[ee(n,t.name,"max")]};case e.ItemType.DateRange:case e.ItemType.DateTimeRange:return{from:i[ee(t.case,t.name,"from")],to:i[ee(t.case,t.name,"to")]};case e.ItemType.Select:if(t.multiple&&a){var s=a.split(",");if(t.isolate){var l=Array.isArray(t.isolate.value)?t.isolate.value:[t.isolate.value];return t.isolate.enabled=(r=s,o=W(o=l).sort(),r=W(r).sort(),o.some((function(e){return r.includes(e)}))),t.isolate.enabled?l:s}return s}return a;case e.ItemType.Checkbox:return"true"===a?!0===t.checked:a===t.checked;case e.ItemType.AutoComplete:return{name:(c=ye(a))[1],value:ge(c[0])};case e.ItemType.AutoCompleteChips:case e.ItemType.Chips:var c;return(c=a.split(",")).reduce((function(e,t){var i=ye(t);return e.push({name:i[1],value:ge(i[0])}),e}),[]);default:return a}}function ve(e,t,i){var n={};return Object.keys(e).forEach((function(o){var r=function(e,t){return e.find((function(e){return e instanceof ie?t===ee(e.case,e.name,"min")||t===ee(e.case,e.name,"max")||t===e.name:e instanceof oe||e instanceof re?t===ee(e.case,e.name,"from")||t===ee(e.case,e.name,"to"):e.name===t}))}(t,o);r&&(n[r.name]=be(r,e,i))})),n}var _e=function(e){function n(t,i,n,o,r,a){var s=e.call(this,t,i)||this;return s._location=n,s._itemsStore=o,s._dialogRef=r,s._drawerRef=a,s.STORE_KEY="fs-filter-persist",s}return B(n,e),Object.defineProperty(n.prototype,"enalbed",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),n.prototype.init=function(e,t,i){this._paramsCase=i,t=null!=t?t:s.getNormalizedPath(this._location);var n=!!this._dialogRef||!!this._drawerRef;this.setConfig(e,t,n)},n.prototype.restore=function(){e.prototype.restore.call(this),this._value&&(this._value.data=ve(this._value.data,this._itemsStore.items,this._paramsCase))},n.ctorParameters=function(){return[{type:m.FsStore},{type:i.ActivatedRoute},{type:u.Location},{type:he},{type:p.MatDialogRef,decorators:[{type:t.Optional}]},{type:f.DrawerRef,decorators:[{type:t.Optional}]}]},n=U([t.Injectable(),K(4,t.Optional()),K(5,t.Optional()),z("design:paramtypes",[m.FsStore,i.ActivatedRoute,u.Location,he,p.MatDialogRef,f.DrawerRef])],n)}(m.FsPersistanceStore),Ce=function(){function e(e,t,i){this._router=e,this._route=t,this._itemsStore=i,this._enabled=!1}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fetchedParams",{get:function(){return this._fetchedParams},enumerable:!0,configurable:!0}),e.prototype.init=function(e,t){this._enabled=e,this._paramsCase=t,this.enabled&&this.fetchFromQueryParams()},e.prototype.writeStateToQueryParams=function(e){this._enabled&&this._router.navigate([],{replaceUrl:!0,relativeTo:this._route,queryParams:e,queryParamsHandling:"merge"}).then((function(){}))},e.prototype.fetchFromQueryParams=function(){this._fetchedParams=ve(this._route.snapshot.queryParams,this._itemsStore.items,this._paramsCase)},e.ctorParameters=function(){return[{type:i.Router},{type:i.ActivatedRoute},{type:he}]},e=U([t.Injectable(),z("design:paramtypes",[i.Router,i.ActivatedRoute,he])],e)}(),Ie=function(){function e(e,t){var i=this;this.data=e,this._dialogRef=t,this.saveAsFilter="new",this.savedFilterName="",this._destroy$=new n.Subject,this.save=function(){var e;return e="new"===i.saveAsFilter?{name:i.savedFilterName,active:!0,filters:i.data.params}:q(q({},i.saveAsFilter),{filters:i.data.params}),i._saveCallback(e).pipe(o.tap((function(e){i._dialogRef.close(e)})),o.takeUntil(i._destroy$))},this.savedFilters=this.data.savedFilters,this._saveCallback=this.data.saveCallback}return e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[p.MAT_DIALOG_DATA]}]},{type:p.MatDialogRef}]},e=U([t.Component({template:'<form fsForm [submit]="save">\n <h1 mat-dialog-title>\n Save Filter\n </h1>\n <div mat-dialog-content>\n <mat-form-field>\n <mat-label>Save as</mat-label>\n <mat-select [(ngModel)]="saveAsFilter" name="saveAs">\n <mat-option value="new">New filter</mat-option>\n <mat-optgroup label="Saved filters:">\n <ng-container *ngFor="let filter of savedFilters">\n <mat-option [value]="filter">{{ filter.name }}</mat-option>\n </ng-container>\n </mat-optgroup>\n </mat-select>\n </mat-form-field>\n <br>\n <mat-form-field *ngIf="saveAsFilter === \'new\'">\n <mat-label>Name</mat-label>\n <input matInput name="filter-name" [(ngModel)]="savedFilterName" required>\n </mat-form-field>\n </div>\n <div mat-dialog-actions>\n <button mat-button\n type="submit"\n color="primary">\n {{ saveAsFilter === \'new\' ? \'Create\' : \'Save\' }}\n </button>\n\n <button mat-button\n type="button"\n [mat-dialog-close]="null">\n Cancel\n </button>\n </div>\n</form>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),K(0,t.Inject(p.MAT_DIALOG_DATA)),z("design:paramtypes",[Object,p.MatDialogRef])],e)}();function Oe(e,t){return t.forEach((function(t){if(t instanceof J&&t.isolate&&t.multiple&&t.value){var i=s.list(t.values,"value").sort(),n=t.value.sort();c.isEqual(n,i)&&(e[t.name]=null)}t.isTypeAutocomplete?r.isObject(t.model)&&(e[t.name]=de(t.model.value,t.model.name)):(t.isTypeAutocompleteChips||t.isTypeChips)&&Array.isArray(t.model)&&t.model.length&&(e[t.name]=t.model.map((function(e){return de(e.value,e.name)})).join(","))})),e}var we=function(){function e(e,t){this._itemsStore=e,this._dialog=t,this._savedFilters$=new n.BehaviorSubject([]),this._activeFilter$=new n.BehaviorSubject(null),this._enabled$=new n.BehaviorSubject(!1),this._destroy$=new n.Subject}return Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled$",{get:function(){return this._enabled$.pipe(o.distinctUntilChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFilters",{get:function(){return this._savedFilters$.getValue()},set:function(e){this._savedFilters$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFilters$",{get:function(){return this._savedFilters$.pipe(o.distinctUntilChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilter",{get:function(){return this._activeFilter$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilter$",{get:function(){return this._activeFilter$.pipe(o.distinctUntilChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilterData",{get:function(){var e;return null===(e=this._activeFilter$.getValue())||void 0===e?void 0:e.filters},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.init=function(e,t){e?(this._setEnabledStatus(!0),this._paramsCase=t,this._config=e):this._setEnabledStatus(!1)},e.prototype.initSavedFilters=function(e){var t=this;(e=W(e)).forEach((function(e){e.filters=ve(e.filters,t._itemsStore.items,t._paramsCase)})),this.savedFilters=e},e.prototype.load=function(){var e=this;return this._config.load().pipe(o.tap((function(t){e.initSavedFilters(t)})))},e.prototype.save=function(e){return this._config.save(e)},e.prototype.order=function(e){var t=this;return this._config.order(e).pipe(o.tap((function(e){t.savedFilters=W(e)})))},e.prototype.delete=function(e){var t=this;return this._config.delete(e).pipe(o.tap((function(e){t.savedFilters=t.savedFilters.filter((function(t){return t.id!==e.id}))})))},e.prototype.setActiveFilter=function(e){if(e){var t=this.savedFilters.find((function(t){return t.id===e.id}));if(!t)throw new Error("Saved filter cannot be activated, because it does not exists. Filter ID = "+e.id);this._activeFilter$.next(t)}else this._activeFilter$.next(null)},e.prototype.openSavedFilterEditDialog=function(){var e=this,t=Oe(this._itemsStore.valuesAsQuery(),this._itemsStore.items),i=(this._itemsStore.values(!0),{data:{params:t,savedFilters:this.savedFilters,saveCallback:this.save.bind(this)}});this._dialog.open(Ie,i).beforeClosed().pipe(o.take(1),o.takeUntil(this._destroy$)).subscribe((function(t){if(t){var i=e.savedFilters.find((function(e){return e.id===t.id}));t.filters=ve(t.filters,e._itemsStore.items,e._paramsCase),i?Object.assign(i,t):(e.resetActiveFilter(),e.savedFilters=W(e.savedFilters,[t])),e.updateActiveFilter()}}))},e.prototype.updateActiveFilter=function(){var e=this.savedFilters.find((function(e){return e.active}));e&&this.setActiveFilter(e)},e.prototype.resetActiveFilter=function(){this.savedFilters.forEach((function(e){e.active=!1})),this.setActiveFilter(null)},e.prototype._setEnabledStatus=function(e){this._enabled$.next(e)},e.ctorParameters=function(){return[{type:he},{type:p.MatDialog}]},e=U([t.Injectable(),z("design:paramtypes",[he,p.MatDialog])],e)}(),xe=function(){function e(e,t,i,o,r){this._itemsStore=e,this._persistanceStore=t,this._queryParams=i,this._savedFilters=o,this._route=r,this._pending$=new n.BehaviorSubject(!1),this._shouldResetSavedFilters=!0,this._destroy$=new n.Subject}return Object.defineProperty(e.prototype,"params",{get:function(){var e,t={};return this._persistanceStore.enalbed&&Object.assign(t,null===(e=this._persistanceStore.value)||void 0===e?void 0:e.data),this._savedFilters.enabled&&this._savedFilters.activeFilter&&Object.assign(t,this._savedFilters.activeFilterData),this._queryParams.enabled&&Object.assign(t,this._queryParams.fetchedParams),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return this._pending$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending$",{get:function(){return this._pending$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFiltersController",{get:function(){return this._savedFilters},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savedFiltersEnabled",{get:function(){return this._savedFilters.enabled},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.setConfig=function(e){var t=this;this._config=e,this._initPersistance(),this._initQueryParams(),this._initSavedFilters(),this._pending$.next(!0),this._savedFilters.enabled?this._savedFilters.load().pipe(o.takeUntil(this._destroy$)).subscribe((function(){t._savedFilters.updateActiveFilter(),t._initItemsValues(),t._listenAndResetSavedFilters(),t._pending$.next(!1)})):(this._initItemsValues(),this._pending$.next(!1)),this._listenItemsChange()},e.prototype.setActiveSavedFilter=function(e){this.savedFiltersController.setActiveFilter(e),e&&this.reloadFiltersWithValues(e.filters,!1)},e.prototype.reloadFiltersWithValues=function(e,t){void 0===t&&(t=!0),this._shouldResetSavedFilters=t,this._itemsStore.updateItemsWithValues(e),this._saveQueryParams(),this._savePersistedParams()},e.prototype._initItemsValues=function(){this._itemsStore.initItemValues(this.params),this._saveQueryParams(),this._savePersistedParams()},e.prototype._initPersistance=function(){this._persistanceStore.init(this._config.persist,this._config.namespace,this._config.case)},e.prototype._initQueryParams=function(){this._queryParams.init(this._config.queryParam,this._config.case)},e.prototype._initSavedFilters=function(){this._savedFilters.init(this._config.savedFilters,this._config.case)},e.prototype._listenItemsChange=function(){var e=this;this._itemsStore.itemsChange$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e._saveQueryParams(),e._savePersistedParams()}))},e.prototype._listenAndResetSavedFilters=function(){var e=this;this._itemsStore.itemsChange$.pipe(o.filter((function(){return!!e.savedFiltersController.activeFilter})),o.switchMap((function(){var t=e._shouldResetSavedFilters;return e._shouldResetSavedFilters=!0,n.of(t)})),o.filter((function(e){return e})),o.takeUntil(this._destroy$)).subscribe((function(){e.savedFiltersController.resetActiveFilter()}))},e.prototype._saveQueryParams=function(){var e=this._itemsStore.items.filter((function(e){return!e.queryParamsDisabled})),t=Oe(this._itemsStore.valuesAsQuery({onlyPresented:!1,items:e,persisted:!0}),e);this._queryParams.writeStateToQueryParams(t)},e.prototype._savePersistedParams=function(){var e=this._itemsStore.items.filter((function(e){return!e.persistanceDisabled})),t=Oe(this._itemsStore.valuesAsQuery({onlyPresented:!1,items:e,persisted:!0}),e);this._persistanceStore.save(t)},e.ctorParameters=function(){return[{type:he},{type:_e},{type:Ce},{type:we},{type:i.ActivatedRoute}]},e=U([t.Injectable(),z("design:paramtypes",[he,_e,Ce,we,i.ActivatedRoute])],e)}(),ke=new t.InjectionToken("fs.filter-config");function Fe(e,t){var i,n;if(e.length!==t.length)return!1;try{for(var o=L(e),r=o.next();!r.done;r=o.next()){var a=r.value;if(-1===t.indexOf(a))return!1}}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return!0}var Ae,De,je=new t.InjectionToken("fs.filter-drawer-data"),Pe=new t.InjectionToken("fs.filter-drawer-overlay"),$e=function(){function e(e,t,i,n,o){this.externalParams=e,this._cd=t,this._itemsStore=i,this.overlayRef=n,this.data=o,this.inline=!1,this.windowDesktop=!1,this._itemsStore.prepareItems(),this._clear=o.clear,this._done=o.done,this.updateWindowWidth()}return e.prototype.updateWindowWidth=function(){this.windowDesktop=window.innerWidth>1200},Object.defineProperty(e.prototype,"items$",{get:function(){return this._itemsStore.visibleItems$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortItem",{get:function(){return this._itemsStore.sortByItem},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortDirectionItem",{get:function(){return this._itemsStore.sortDirectionItem},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this._clear()},e.prototype.done=function(){this._done(),this.overlayRef.detach()},e.prototype.backdropClick=function(){this.done()},e.ctorParameters=function(){return[{type:xe},{type:t.ChangeDetectorRef},{type:he},{type:T.OverlayRef,decorators:[{type:t.Inject,args:[Pe]}]},{type:void 0,decorators:[{type:t.Inject,args:[je]}]}]},U([t.HostListener("window:resize"),z("design:type",Function),z("design:paramtypes",[]),z("design:returntype",void 0)],e.prototype,"updateWindowWidth",null),U([t.Input(),z("design:type",Object)],e.prototype,"inline",void 0),e=U([t.Component({template:'<div class="filters">\n <div class="filters-wrap">\n\n <div class="filter-by">\n <mat-icon>tune</mat-icon>\n <span class="text">Filters</span>\n </div>\n\n <div class="overflow-shadow filter-items">\n <div class="overflow-shadow-content">\n <ng-container *fsSkeleton="(externalParams.pending$ | async) !== true">\n <filter-item *ngFor="let filterItem of items$ | async"\n class="filter-group"\n [item]="filterItem">\n </filter-item>\n\n <ng-container *ngIf="sortItem && sortItem.values && sortItem.values.length > 0">\n <filter-item class="filter-group sort"\n [item]="sortItem">\n </filter-item>\n <filter-item class="filter-group sort"\n [item]="sortDirectionItem">\n </filter-item>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <fs-filter-drawer-actions class="filter-actions"\n *ngIf="(externalParams.pending$ | async) !== true"\n (clear)="clear()"\n (done)="done()">\n </fs-filter-drawer-actions>\n </div>\n</div>\n<div class="backdrop" *ngIf="!windowDesktop" (click)="backdropClick()"></div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host ::ng-deep mat-form-field{width:100%}.filter-by{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:20px 25px}.filter-by mat-icon{margin-right:8px}.filter-by .text{font-weight:400;font-size:19px}.filter-actions{display:block;box-sizing:border-box;padding:13px}.filter-actions button{margin-right:6px}.filter-actions button:last-child{margin-right:0}.filters{position:fixed;display:block;top:0;right:0;z-index:1002;bottom:0}.filters .filters-wrap{background:#fff;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);width:85vw;max-width:350px;display:flex;flex-direction:column;height:100%}.filters .filters-wrap .filter-items{overflow-y:auto}.filters .filters-wrap .filter-items .overflow-shadow-content{padding:0 25px;box-sizing:border-box}.filters .filter-group{margin:10px 0 0}.filters .filter-group:first-child{margin:0}.filters .filter label{white-space:nowrap;color:rgba(0,0,0,.54)}.filters .filter .interface.interface-range,.filters .filter .interface.interface-range .mat-input-wrapper,.filters .filter .interface.interface-range input{text-align:center}.filters .filter .interface.interface-datetime fs-datetime.has-time .md-input{width:100%}.filters .filter .interface fs-datetime-range input{text-align:center}.filters .filter .filter-label{width:1%;white-space:nowrap;vertical-align:middle;padding-right:15px}.filters md-autocomplete-container md-input-container{margin:0}.filters .isolate{margin-top:-12px}.filters .isolate .interface{line-height:20px;padding-bottom:1.25em}.filters .isolate md-checkbox{margin:0 0 0 2px}.backdrop{position:fixed;top:0;bottom:0;left:0;right:0;z-index:900;outline:0}"]}),K(3,t.Inject(Pe)),K(4,t.Inject(je)),z("design:paramtypes",[xe,t.ChangeDetectorRef,he,T.OverlayRef,Object])],e)}(),Se=new t.InjectionToken("fs.filter.meta",{providedIn:"root",factory:function(){return{openedFilters:0}}}),Te=function(){function e(e,t,i){this._injector=e,this._filterMeta=t,this._overlay=i,this.detach$=new n.Subject,this.attach$=new n.Subject,this._destroy$=new n.Subject}return Object.defineProperty(e.prototype,"isOpened",{get:function(){return!!this._overlayRef},enumerable:!0,configurable:!0}),e.prototype.setClearFn=function(e){this._clearFn=e},e.prototype.setDoneFn=function(e){this._doneFn=e},e.prototype.close=function(){this._overlayRef&&(this._overlayRef.detach(),this._overlayRef=null,this.removeFilterClass())},e.prototype.open=function(){var e=this;return this._overlayRef=this._createOverlay(),this._overlayRef.backdropClick().pipe(o.takeUntil(this._destroy$)).subscribe((function(){e._overlayRef.detach()})),this._overlayRef.detachments().pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.detach$.next()})),this._overlayRef.attachments().pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.attach$.next()})),this.addFilterClass(),this.openPortalPreview()},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype._createOverlay=function(){var e=new T.OverlayConfig({hasBackdrop:!0,backdropClass:"fs-filter-backdrop"});return this._overlay.create(e)},e.prototype.openPortalPreview=function(){var e={done:this._doneFn,clear:this._clearFn},t=this._createInjector(this._injector,e,this._overlayRef),i=new I.ComponentPortal($e,void 0,t);return this._overlayRef.attach(i).instance},e.prototype._createInjector=function(e,t,i){var n=new WeakMap([[je,t],[Pe,i]]);return new I.PortalInjector(e,n)},e.prototype.removeFilterClass=function(){this._filterMeta.openedFilters--,0===this._filterMeta.openedFilters&&window.document.body.classList.remove("fs-filter-open")},e.prototype.addFilterClass=function(){this._filterMeta.openedFilters++,1===this._filterMeta.openedFilters&&window.document.body.classList.add("fs-filter-open")},e.ctorParameters=function(){return[{type:t.Injector},{type:void 0,decorators:[{type:t.Inject,args:[Se]}]},{type:T.Overlay}]},e=U([t.Injectable(),K(1,t.Inject(Se)),z("design:paramtypes",[t.Injector,Object,T.Overlay])],e)}(),Ve=function(){function e(){}return e=U([t.Directive({selector:"[fsFilterStatusBar]"})],e)}(),Me=function(){function e(e){this._filterOverlay=e,this._focusOn=new n.BehaviorSubject(null)}return Object.defineProperty(e.prototype,"focusOn$",{get:function(){return this._focusOn.asObservable()},enumerable:!0,configurable:!0}),e.prototype.click=function(e,t){void 0===t&&(t=null),this._filterOverlay.isOpened||this._filterOverlay.open(),this._focusOn.next({item:e,type:t})},e.prototype.listenFocusFor$=function(e,t){var i=this;return void 0===t&&(t=null),this._focusOn.pipe(o.filter((function(e){return!!e})),o.filter((function(i){var n=i.item,o=i.type;return e===n&&t===o})),o.tap((function(){return i.clearFocus()})))},e.prototype.clearFocus=function(){this._focusOn.next(null)},e.ctorParameters=function(){return[{type:Te}]},e=U([t.Injectable(),z("design:paramtypes",[Te])],e)}();(Ae=e.ActionType||(e.ActionType={})).Basic="basic",Ae.Raised="raised",Ae.Icon="icon",Ae.Fab="fab",Ae.MiniFab="mini-fab",(De=e.ActionMode||(e.ActionMode={})).Button="button",De.Menu="menu",De.File="file";var Re=function(){function e(e,t){void 0===e&&(e={}),this._parent=t,this.items=[],this._isGroup=!1,this._visible$=new n.BehaviorSubject(!0),this._disabled$=new n.BehaviorSubject(!1),this._init(e)}return Object.defineProperty(e.prototype,"isGroup",{get:function(){return this._isGroup},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible$",{get:function(){return this._visible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled$.getValue()},set:function(e){this._disabled$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled$",{get:function(){return this._disabled$.asObservable()},enumerable:!0,configurable:!0}),e.prototype.updateVisibility=function(){var e=!this._showFn||this._showFn();if(e&&this.isGroup){var t=this.items.reduce((function(e,t){return t.updateVisibility(),t.visible&&e++,e}),0);this._visible$.next(!!t)}else this._visible$.next(e)},e.prototype._init=function(t){var i=this;this.label=t.label,this.icon=t.icon,this._showFn=t.show,"items"in t?(this._isGroup=!0,Array.isArray(t.items)&&(this.items=t.items.map((function(t){return new e(t,i)}))),this.updateVisibility()):(this.click=t.click,this.routerLink=t.link,this._parent||this.updateVisibility())},e}(),Be=function(){function t(e){void 0===e&&(e={}),this.primary=!0,this.isReorderAction=!1,this.classArray=[],this.items=[],this._visible$=new n.BehaviorSubject(!0),this._disabled$=new n.BehaviorSubject(!1),this._init(e)}return Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible$.getValue()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible$",{get:function(){return this._visible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled$.getValue()},set:function(e){this._disabled$.next(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled$",{get:function(){return this._disabled$.asObservable()},enumerable:!0,configurable:!0}),t.prototype.updateVisibility=function(){var t=!this._showFn||this._showFn();if(t&&this.mode===e.ActionMode.Menu){var i=this.items.some((function(e){return e.visible}));this._visible$.next(i)}else this._visible$.next(t)},t.prototype.updateDisabledState=function(){this._disabledFn&&(this.disabled=this._disabledFn())},t.prototype._init=function(t){var i,n,o,r,a,s;switch(t.mode=null!==(i=t.mode)&&void 0!==i?i:e.ActionMode.Button,this.primary=null===(n=t.primary)||void 0===n||n,this.color=t.color,this.type=null!==(o=t.type)&&void 0!==o?o:e.ActionType.Raised,this.label=t.label,this.mode=t.mode,this.icon=t.icon,this._showFn=t.show,this.tabIndex=null!==(r=t.tabIndex)&&void 0!==r?r:0,void 0!==t.multiple&&(this.multiple=t.multiple),t.className&&(this.className=t.className,this.classArray=this.className.split(" ")),this.primary&&(this.color="primary"),t.mode){case e.ActionMode.Button:this.menu=t.menu,this.customize=t.customize,this.click=null!==(a=t.click)&&void 0!==a?a:function(){},this._disabledFn=t.disabled,this.updateDisabledState();break;case e.ActionMode.Menu:t.items&&Array.isArray(t.items)&&(this.items=t.items.map((function(e){return new Re(e)})));break;case e.ActionMode.File:this.fileSelected=t.select,this.fileError=t.error,this.click=null!==(s=t.click)&&void 0!==s?s:function(){},this._disabledFn=t.disabled,this.updateDisabledState()}this.updateVisibility()},t}(),Ee=function(){function e(e){this._breakpointObserver=e,this._visible$=new n.BehaviorSubject(!1),this._actions$=new n.BehaviorSubject([]),this._menuActions$=new n.BehaviorSubject([]),this._destroy$=new n.Subject,this._mobileMedia="(max-width: 799px)",this._allActions=[],this._listenMobileMedia()}return Object.defineProperty(e.prototype,"menuActions",{get:function(){return this._menuActions$.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actions",{get:function(){return this._actions$.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actions$",{get:function(){return this._actions$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menuActions$",{get:function(){return this._menuActions$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible$",{get:function(){return this._visible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mobileMode",{get:function(){return this._breakpointObserver.isMatched(this._mobileMedia)},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.initActions=function(e){e&&Array.isArray(e)&&(this.show(),this._allActions=e.map((function(e){return new Be(e)})),this._reorderAction&&this._allActions.unshift(this._reorderAction),this._classifyActions())},e.prototype.show=function(){this._visible$.next(!0)},e.prototype.hide=function(){this._visible$.next(!1)},e.prototype.addReorderAction=function(e){this._allActions.unshift(e),e.isReorderAction=!0,this._classifyAction(e),this._reorderAction=e},e.prototype.clearActions=function(){this._allActions=[],this._setActions([]),this._setKebabActions([])},e.prototype.updateActionsVisibility=function(){this._allActions.forEach((function(e){return e.updateVisibility()})),this._classifyActions()},e.prototype.updateDisabledState=function(){this.actions.forEach((function(e){return e.updateDisabledState()}))},e.prototype._setKebabActions=function(e){this._menuActions$.next(e)},e.prototype._setActions=function(e){this._actions$.next(e)},e.prototype._classifyActions=function(){var e=[],t=[],i=this.mobileMode;this._allActions.filter((function(e){return e.visible})).forEach((function(n){n.menu||i?e.push(n):t.push(n)})),this._setKebabActions(e),this._setActions(t)},e.prototype._classifyAction=function(e){e.menu?this._setKebabActions(W(this.menuActions,[e])):this._setActions(W(this.actions,[e]))},e.prototype._listenMobileMedia=function(){var e=this;this._breakpointObserver.observe(this._mobileMedia).pipe(o.skip(1),o.takeUntil(this._destroy$)).subscribe((function(){e._classifyActions()}))},e.ctorParameters=function(){return[{type:V.BreakpointObserver}]},e=U([t.Injectable(),z("design:paramtypes",[V.BreakpointObserver])],e)}(),qe=function(){function e(e,i,r,a,s,l){var c=this;this._filterOverlay=e,this._zone=i,this._externalParams=r,this._filterItems=a,this._actions=s,this._defaultConfig=l,this.showSortBy=!0,this.showFilterInput=!0,this.closed=new t.EventEmitter,this.opened=new t.EventEmitter,this.ready=new t.EventEmitter,this.showFilterMenu=!1,this.windowDesktop=!1,this.fsFilterClass=!0,this.searchText=new h.FormControl,this.searchPlaceholder="Search",this._config=null,this._filtersBtnVisible$=new n.BehaviorSubject(!0),this._keywordVisible$=new n.BehaviorSubject(!0),this._hasFilterChips$=new n.BehaviorSubject(!1),this._destroy$=new n.Subject,this._listenWhenFilterReady(),this._updateWindowWidth(),this._filterOverlay.attach$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){c.showFilterMenu=!0})),this._filterOverlay.detach$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){c.showFilterMenu=!1})),this._listenWindowResize()}return Object.defineProperty(e.prototype,"setConfig",{set:function(e){this._initFilterWithConfig(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setFilter",{set:function(e){this._initFilterWithConfig(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterParams",{get:function(){return this._filterItems.values()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterParamsQuery",{get:function(){return this._filterItems.valuesAsQuery()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._filterItems.items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visibleItems",{get:function(){return this._filterItems.visibleItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasFilterChips$",{get:function(){return this._hasFilterChips$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasVisibleItemOrSorting",{get:function(){return this.visibleItems.length>0||!!this._filterItems.sortByItem},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasKeyword",{get:function(){return this._filterItems.hasKeyword},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filtersBtnVisible$",{get:function(){return this._filtersBtnVisible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keywordVisible$",{get:function(){return this._keywordVisible$.asObservable()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionsVisible$",{get:function(){return this._actions.visible$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actions$",{get:function(){return this._actions.actions$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"menuActions$",{get:function(){return this._actions.menuActions$},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;setTimeout((function(){e.config.autofocus&&e.focus()})),this.config.init&&(this._externalParams.pending?this._externalParams.pending$.pipe(o.filter((function(e){return!e})),o.takeUntil(this._destroy$)).subscribe((function(){e.init()})):this.init()),this._listenInternalItemsChange(),this._initOverlay()},e.prototype.ngAfterViewInit=function(){var e=this;this._listenInputKeyEvents(),setTimeout((function(){e._listenInputChanges()}))},e.prototype.ngOnDestroy=function(){this._destroyFilterDrawer(),this._destroy$.next(),this._destroy$.complete()},e.prototype.focus=function(){this.searchTextMatInput&&this.searchTextMatInput.focus()},e.prototype.updateSort=function(e){this._filterItems.updateSort(e)},e.prototype.updateValues=function(e){var t=this;Object.keys(e).forEach((function(i){var n=t.items.find((function(e){return e.name===i}));n&&(n.model=e[i])}))},e.prototype.hide=function(){this.changeVisibility(!1)},e.prototype.show=function(){this.changeVisibility(!0)},e.prototype.changeVisibilityClick=function(e,t){void 0===t&&(t=null),t&&t.stopPropagation(),this.changeVisibility(e)},e.prototype.filterInputEvent=function(e){this.windowDesktop&&["Enter","NumpadEnter","Escape"].indexOf(e.code)>=0&&(this.changeVisibility(!1),this.searchTextInput&&this.searchTextInput.nativeElement.blur())},e.prototype.getItemValue=function(e){var t=this.items.find((function(t){return t.name===e}));return t?t.model:null},e.prototype.showItem=function(e){var t=this.getItem(e);t&&(t.hide=!1,this._filterItems.updateVisibleItems())},e.prototype.hideItem=function(e){var t=this.getItem(e);t&&(t.hide=!0,this._filterItems.updateVisibleItems())},e.prototype.clearItem=function(e){var t=this.getItem(e);t&&t.clear()},e.prototype.updateItemConfig=function(e,t){var i,n,o=this.getItem(e);o&&(o.label=null!==(i=t.label)&&void 0!==i?i:o.label,o.chipLabel=null!==(n=t.chipLabel)&&void 0!==n?n:o.chipLabel,this._filterItems.updateVisibleItems())},e.prototype.getItemValueChange$=function(e){var t=this.items.find((function(t){return t.name===e}));return t?t.value$.pipe(o.map((function(){return t.model}))):null},e.prototype.changeVisibility=function(e){if(e!==this.showFilterMenu)return e?void(this.hasVisibleItemOrSorting&&(this._listenEscButton(),this.opened.emit(),this._filterOverlay.open())):(this.closed.emit(),this._destroyFilterDrawer())},e.prototype.clearSearchText=function(e){e.stopPropagation(),this._filterItems.keywordItem.clear(),this.searchTextInput.nativeElement.focus()},e.prototype.init=function(){var e=this._filterItems.valuesAsQuery();this._sort=this._filterItems.getSort(),this.config.init(e,this._sort),this._updateChipsVisibility()},e.prototype.clear=function(e){void 0===e&&(e=null),e&&e.stopPropagation(),this._filterItems.filtersClear(),this.config.clear&&this.config.clear()},e.prototype.search=function(e){this.changeVisibilityClick(!1,e)},e.prototype.reload=function(e){void 0===e&&(e=null),e&&(e.preventDefault(),e.stopPropagation());var t=this._filterItems.valuesAsQuery();this.config.reload&&this.config.reload(t,this._filterItems.getSort())},e.prototype.getItem=function(e){return this.items.find((function(t){return t.name===e}))},e.prototype.change=function(){var e=this._filterItems.valuesAsQuery(),t=this._filterItems.getSort();((!t||!this._sort)&&t!==this._sort||t&&this._sort&&!function e(t,i){var n=Object.keys(t),o=Object.keys(i);if(n.length!==o.length)return!1;for(var a in t)if(t.hasOwnProperty(a)){var s=t[a],l=i[a],c=Array.isArray(s)&&Array.isArray(l),u=r.isObject(s)&&r.isObject(l);if(c&&!Fe(s,l))return!1;if(u&&!e(s,l))return!1;if(!c&&!u&&s!==l)return!1}return!0}(this._sort,t))&&(this._sort=t,this.config.sortChange&&this.config.sortChange(e,t)),this.config.change&&this.config.change(e,t),this._updateChipsVisibility()},e.prototype.updateActions=function(e){this._actions.initActions(e)},e.prototype.showFiltersBtn=function(){this._filtersBtnVisible$.next(!0)},e.prototype.hideFiltersBtn=function(){this._filtersBtnVisible$.next(!1)},e.prototype.showKeywordField=function(){this._keywordVisible$.next(!0)},e.prototype.hideKeywordField=function(){this._keywordVisible$.next(!1)},e.prototype.updateActionsVisibility=function(){this._actions.updateActionsVisibility()},e.prototype.updateDisabledState=function(){this._actions.updateDisabledState()},e.prototype._initFilterWithConfig=function(e){this.config&&this._filterItems.destroyItems(),e=q(q({},this._defaultConfig||{}),e),this._config=new G(e),this._actions.initActions(this._config.actions),this._filterItems.setConfig(this._config),this._externalParams.setConfig(this._config);var t=this._filterItems.keywordItem;t&&(this.searchText.setValue(t.model),this.searchPlaceholder=t.label||"Search"),this.config.reloadWhenConfigChanged&&this.change(),this._listenKeywordItemClear()},e.prototype._destroyFilterDrawer=function(){this._filterOverlay.close()},e.prototype._updateWindowWidth=function(){this.windowDesktop=window.innerWidth>1200},e.prototype._listenEscButton=function(){var e=this;this._zone.runOutsideAngular((function(){n.fromEvent(window,"keyup").pipe(o.filter((function(e){return"Escape"===e.code})),o.takeUntil(e.closed),o.takeUntil(e._destroy$)).subscribe((function(){e._zone.run((function(){e.changeVisibility(!1)}))}))}))},e.prototype._listenInputKeyEvents=function(){var e=this;this.searchTextInput&&this._zone.runOutsideAngular((function(){n.fromEvent(e.searchTextInput.nativeElement,"keydown").pipe(o.debounceTime(500),o.filter((function(e){return["Enter","NumpadEnter","Escape"].indexOf(e.code)>-1})),o.takeUntil(e._destroy$)).subscribe((function(t){e._zone.run((function(){e.filterInputEvent(t)}))}))}))},e.prototype._listenWindowResize=function(){var e=this;this._zone.runOutsideAngular((function(){n.fromEvent(window,"resize").pipe(o.debounceTime(100),o.takeUntil(e._destroy$)).subscribe((function(){e._zone.run((function(){e._updateWindowWidth()}))}))}))},e.prototype._listenInputChanges=function(){var e=this;this._filterItems.keywordItem&&this._zone.runOutsideAngular((function(){e.searchText.valueChanges.pipe(o.debounceTime(200),o.distinctUntilChanged(),o.filter((function(t){var i;return t!==(null===(i=e._filterItems.keywordItem)||void 0===i?void 0:i.model)})),o.takeUntil(e._destroy$)).subscribe((function(t){e._zone.run((function(){var i=e._filterItems.keywordItem;i&&i.value!==t&&(i.model=t)}))}))}))},e.prototype._listenKeywordItemClear=function(){var e,t=this;null===(e=this._filterItems.keywordItem)||void 0===e||e.clear$.pipe(o.takeUntil(this._filterItems.keywordItem.destroy$),o.takeUntil(this._destroy$)).subscribe((function(){t.searchText.setValue("")}))},e.prototype._listenInternalItemsChange=function(){var e=this;this._filterItems.itemsChange$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.change()}))},e.prototype._initOverlay=function(){this._filterOverlay.setClearFn(this.clear.bind(this)),this._filterOverlay.setDoneFn(this.hide.bind(this))},e.prototype._listenWhenFilterReady=function(){var e=this;this._externalParams.pending$.pipe(o.filter((function(e){return!e})),o.takeUntil(this._destroy$)).subscribe((function(){e.ready.emit()}))},e.prototype._updateChipsVisibility=function(){var e=this._filterItems.items.some((function(e){return e.isChipVisible}));this._hasFilterChips$.next(e)},e.ctorParameters=function(){return[{type:Te},{type:t.NgZone},{type:xe},{type:he},{type:Ee},{type:G,decorators:[{type:t.Optional},{type:t.Inject,args:[ke]}]}]},U([t.Input("config"),z("design:type",Object),z("design:paramtypes",[Object])],e.prototype,"setConfig",null),U([t.Input("filter"),z("design:type",Object),z("design:paramtypes",[Object])],e.prototype,"setFilter",null),U([t.Input(),z("design:type",Object)],e.prototype,"showSortBy",void 0),U([t.Input(),z("design:type",Object)],e.prototype,"showFilterInput",void 0),U([t.Output(),z("design:type",Object)],e.prototype,"closed",void 0),U([t.Output(),z("design:type",Object)],e.prototype,"opened",void 0),U([t.Output(),z("design:type",Object)],e.prototype,"ready",void 0),U([t.ContentChild(Ve,{read:t.TemplateRef}),z("design:type",Object)],e.prototype,"statusBar",void 0),U([t.ViewChild("searchTextInput"),z("design:type",t.ElementRef)],e.prototype,"searchTextInput",void 0),U([t.ViewChild("searchTextInput",{read:_.MatInput}),z("design:type",_.MatInput)],e.prototype,"searchTextMatInput",void 0),U([t.HostBinding("class.filters-open"),z("design:type",Object)],e.prototype,"showFilterMenu",void 0),U([t.HostBinding("class.window-desktop"),z("design:type",Object)],e.prototype,"windowDesktop",void 0),U([t.HostBinding("class.fs-filter"),z("design:type",Object)],e.prototype,"fsFilterClass",void 0),e=U([t.Component({selector:"fs-filter",template:'<ng-container *ngIf="hasKeyword; else noKeywordFilter">\n <div class="filter-search-container">\n <div class="filter-input-field">\n <form autocomplete="off" role="presentation" *ngIf="keywordVisible$ | async">\n <mat-form-field floatLabel="never">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n\n <input\n #searchTextInput\n matInput\n [formControl]="searchText"\n [placeholder]="searchPlaceholder"\n name="filter-input"\n (click)="filterInputEvent($event)"\n class="filter-input">\n\n <a matSuffix\n *ngIf="searchText.value && showFilterInput && config.clear"\n (click)="clearSearchText($event)"\n href="javascript:void(0)"\n class="clear">\n <mat-icon>clear</mat-icon>\n </a>\n\n <a matSuffix\n (click)="reload($event)"\n class="reload"\n *ngIf="config.reload">\n <mat-icon>refresh</mat-icon>\n </a>\n </mat-form-field>\n </form>\n </div>\n <ng-container *ngTemplateOutlet="filterActions"></ng-container>\n </div>\n <div class="status-actions" *ngIf="keywordVisible$ | async">\n <ng-container *ngTemplateOutlet="statusBarContainer"></ng-container>\n <ng-container *ngTemplateOutlet="filterChips"></ng-container>\n </div>\n</ng-container>\n\n<ng-template #noKeywordFilter>\n <div class="filter-searchless-container">\n <div class="status-actions">\n <ng-container *ngTemplateOutlet="statusBarContainer"></ng-container>\n <ng-container *ngTemplateOutlet="filterChips"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet="filterActions"></ng-container>\n </div>\n</ng-template>\n\n\n<ng-template #filterActions>\n <div class="filter-actions">\n <ng-container *ngIf="hasVisibleItemOrSorting && filtersBtnVisible$ | async ">\n <button\n mat-button\n class="filters-button"\n [ngClass]="{\n \'mat-raised-button\': config.button.style == \'raised\',\n \'mat-button\': config.button.style == \'basic\',\n \'mat-icon-button\': config.button.style == \'icon\'\n }"\n (click)="changeVisibilityClick(!showFilterMenu, $event)"\n type="button"\n [color]="config.button.color">\n <mat-icon *ngIf="config.button.icon">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </button>\n </ng-container>\n\n <fs-filter-actions\n *ngIf="actionsVisible$ | async"\n [actions]="actions$ | async"\n [kebabActions]="menuActions$ | async">\n </fs-filter-actions>\n </div>\n</ng-template>\n\n<ng-template #filterChips>\n <fs-filter-chips\n *ngIf="config.chips && hasFilterChips$ | async"\n class="filter-chips"\n [filters]="items">\n </fs-filter-chips>\n</ng-template>\n\n<ng-template #statusBarContainer>\n <div class="status-bar" *ngIf="statusBar">\n <small><ng-container *ngTemplateOutlet="statusBar"></ng-container></small>\n </div>\n</ng-template>\n',encapsulation:t.ViewEncapsulation.None,providers:[Te,xe,_e,Ce,Me,he,we,Ee],changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-filter{display:block}.fs-filter{margin-bottom:20px;display:block}.fs-filter .results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}.fs-filter .status-bar{overflow:hidden;text-overflow:ellipsis;line-height:17px;margin:4px 0}.fs-filter .filter-chips{display:block}.fs-filter .filter-searchless-container{display:flex}.fs-filter .filter-searchless-container .status-actions{flex-grow:1}.fs-filter .filter-searchless-container .status-actions>:first-child{margin-top:0}.fs-filter fs-filter-chips{margin:5px 0}.fs-filter .filter-search-container{flex-direction:row;box-sizing:border-box;display:flex;flex:1 1 0;position:relative}.fs-filter .filter-search-container .search{top:8px;position:absolute;margin-left:1px;left:0}.fs-filter .filter-search-container .search mat-icon{transform:scale(.9)}.fs-filter .filter-search-container form{width:100%;height:100%}.fs-filter .filter-search-container .filter-input-field{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;flex:1}.fs-filter .filter-search-container .filter-input-field .mat-form-field{width:100%;height:100%;font-size:103%}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-underline{bottom:auto}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-infix{border-top:0}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-wrapper{padding-bottom:0;height:100%}.fs-filter .filter-search-container .filter-input-field .mat-form-field .mat-form-field-flex{align-items:center;height:100%}.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix{-ms-grid-row-align:center;align-self:center;display:flex;align-items:center;white-space:nowrap}.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix a,.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix mat-icon,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix a,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix mat-icon{display:flex;cursor:pointer;color:initial}.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix a:hover,.fs-filter .filter-search-container .filter-input-field .mat-form-field-prefix mat-icon:hover,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix a:hover,.fs-filter .filter-search-container .filter-input-field .mat-form-field-suffix mat-icon:hover{color:inherit}.fs-filter .filter-search-container .filter-input-field .mat-form-field-infix{width:auto}.fs-filter .filter-actions{display:flex;align-items:center}.fs-filter button.reload{margin-left:-40px;right:-9px}@media screen and (min-width:599px){.filter-actions{margin-left:10px}.filters-button+fs-filter-actions:not(:empty){margin-left:5px}}@media screen and (max-width:600px){.filter-actions{margin-left:5px}.filter-actions .filters-button{font-size:0;padding:0;min-width:unset;width:36px;height:36px;border-radius:50%;box-shadow:unset!important}}@media screen and (min-width:1200px){body.fs-filter-open{margin-right:350px}.fs-filter-backdrop{display:none}}body.fs-filter-open::-webkit-scrollbar{width:0;background:0 0}"]}),K(5,t.Optional()),K(5,t.Inject(ke)),z("design:paramtypes",[Te,t.NgZone,xe,he,Ee,G])],e)}(),Ue=function(){function i(t){this._cdRef=t,this._destroy$=new n.Subject,this.itemType=e.ItemType}return i.prototype.ngOnInit=function(){var e=this;this.item.value$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e._cdRef.markForCheck()}))},i.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},i.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},U([t.Input(),z("design:type",Q)],i.prototype,"item",void 0),i=U([t.Component({selector:"filter-item",template:'<div class="filter filter-{{ item.type }}">\n\n <ng-container [ngSwitch]="item.type">\n <filter-item-text class="interface"\n *ngSwitchCase="itemType.Text"\n [item]="item">\n </filter-item-text>\n\n <filter-item-select class="interface"\n *ngSwitchCase="itemType.Select"\n [item]="item">\n </filter-item-select>\n\n <filter-item-chips class="interface"\n *ngSwitchCase="itemType.Chips"\n [item]="item">\n </filter-item-chips>\n\n <filter-item-range class="interface interface-range"\n *ngSwitchCase="itemType.Range"\n [item]="item">\n </filter-item-range>\n\n <filter-item-autocomplete class="interface"\n *ngSwitchCase="itemType.AutoComplete"\n [item]="item">\n </filter-item-autocomplete>\n\n <filter-item-autocompletechips class="interface"\n *ngSwitchCase="itemType.AutoCompleteChips"\n [item]="item">\n </filter-item-autocompletechips>\n\n <filter-item-date class="interface interface-date"\n *ngSwitchCase="itemType.Date"\n [item]="item">\n </filter-item-date>\n\n <filter-item-date class="interface interface-date"\n *ngSwitchCase="itemType.DateTime"\n [item]="item">\n </filter-item-date>\n\n <filter-item-date-range class="interface interface-date"\n *ngSwitchCase="itemType.DateRange"\n [item]="item">\n </filter-item-date-range>\n\n <filter-item-date-range class="interface interface-date"\n *ngSwitchCase="itemType.DateTimeRange"\n [item]="item">\n </filter-item-date-range>\n\n <filter-item-checkbox class="interface interface-checkbox"\n *ngSwitchCase="itemType.Checkbox"\n [item]="item">\n </filter-item-checkbox>\n </ng-container>\n\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.ChangeDetectorRef])],i)}(),Ke=function(){function e(e,t){this._kvDiffers=e,this._cd=t,this.inline=!1,this._destroy$=new n.Subject,this._debouncer$=new n.Subject,this._kvDiffer=this._kvDiffers.find(this.item||{}).create(),this.listenWithDebounce()}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},set:function(e){this._item=e},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){this._kvDiffer&&(this._kvDiffer.diff(this.item)&&this._cd.detectChanges())},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.listenWithDebounce=function(){var e=this;this._debouncer$.pipe(o.debounceTime(150),o.takeUntil(this._destroy$)).subscribe((function(){e.item.valueChanged()}))},e.prototype.itemChange=function(){this._debouncer$.next()},e.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},U([t.Input(),z("design:type",Object),z("design:paramtypes",[Object])],e.prototype,"item",null),U([t.Input(),z("design:type",Object)],e.prototype,"inline",void 0),e=U([t.Component({selector:"base-item",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],e)}(),ze=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n.allItemsOptionSelected=!1,n}return B(i,e),i.prototype.ngDoCheck=function(){this._kvDiffer&&(this._kvDiffer.diff(this.item)&&(this._cd.markForCheck(),this.selectedItem&&this.selectedItem.cd.markForCheck()))},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},U([t.ViewChild("selectItem"),z("design:type",Object)],i.prototype,"selectedItem",void 0),i=U([t.Component({selector:"filter-item-select",template:'<ng-container *ngIf="(item.loading$ | async) else itemSelect">\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select disabled></mat-select>\n </mat-form-field>\n</ng-container>\n\n<ng-template #itemSelect>\n <ng-container *ngIf="(item.values$ | async)?.length">\n <ng-container *ngIf="item.multiple && !item.children">\n <filter-item-select-multiple\n [item]="item"\n #selectItem>\n </filter-item-select-multiple>\n </ng-container>\n\n <ng-container *ngIf="!item.multiple && !item.children">\n <filter-item-select-simple\n [item]="item"\n #selectItem>\n </filter-item-select-simple>\n </ng-container>\n\n <ng-container *ngIf="item.children">\n <filter-item-select-groups\n [item]="item"\n #selectItem>\n </filter-item-select-groups>\n </ng-container>\n </ng-container>\n</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ke),Le=function(){function e(e){this.cd=e}return e.prototype.compare=function(e,t){return e==t},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},U([t.ViewChild("select",{static:!0}),z("design:type",C.MatSelect)],e.prototype,"select",void 0),U([t.Input(),z("design:type",Object)],e.prototype,"item",void 0),e=U([t.Component({selector:"filter-item-select-groups",template:'<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n [compareWith]="compare">\n <ng-container *ngFor="let selectItem of item.values">\n <ng-container *ngIf="selectItem[item.children]; else simpleOption">\n <mat-optgroup [label]="selectItem.name">\n <mat-option *ngFor="let subItem of selectItem[item.children]"\n [value]="subItem.value"\n [ngStyle]="selectItem.style">\n {{ subItem.name }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n\n <ng-template #simpleOption>\n <mat-option\n [value]="selectItem.value"\n [ngStyle]="selectItem.style">\n {{ selectItem.name }}\n </mat-option>\n </ng-template>\n </ng-container>\n </mat-select>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}(),Ne=function(){function e(e){this.cd=e}return e.prototype.changed=function(){this.item.isolate&&(this.item.isolate.enabled=!1)},e.prototype.isolateChange=function(e){e.isolate.enabled?e.model=e.isolate.value:e.model=null},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},U([t.Input(),z("design:type",H)],e.prototype,"item",void 0),U([t.ViewChild("select",{static:!0}),z("design:type",C.MatSelect)],e.prototype,"select",void 0),e=U([t.Component({selector:"filter-item-select-simple",template:'<mat-form-field [ngClass]="{ isolate: item.isolate }">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n (ngModelChange)="changed()">\n <mat-option *ngFor="let item of item.values | fsFilterIsolateValues: item.isolate"\n [value]="item.value"\n >\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf="item.isolate">\n <mat-checkbox (change)="isolateChange(item)" [(ngModel)]="item.isolate.enabled">\n <span class="checkbox-label">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".isolate{margin-bottom:25px}"]}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}(),We=function(){function e(e){this.cd=e}return e.prototype.changed=function(){if(this.item.isolate&&(this.item.isolate.enabled=!1,this.item.multiple&&Array.isArray(this.item.model))){var e=this.item.model.indexOf(this.item.isolate.value);e>-1&&this.item.model.splice(e,1)}},e.prototype.close=function(){this.select.close()},e.prototype.isolateChange=function(e){e.isolate.enabled?e.model=e.multiple?[e.isolate.value]:e.isolate.value:e.multiple?e.model=e.defaultValue?e.defaultValue:[]:e.model=e.defaultValue?e.defaultValue:null},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},U([t.Input(),z("design:type",Object)],e.prototype,"item",void 0),U([t.ViewChild("select",{static:!0}),z("design:type",C.MatSelect)],e.prototype,"select",void 0),e=U([t.Component({selector:"filter-item-select-multiple",template:'<mat-form-field [ngClass]="{ isolate: item.isolate }">\n <mat-label>{{item.label}}</mat-label>\n <mat-select\n #select\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n (ngModelChange)="changed()"\n [multiple]="item.multiple">\n <mat-option\n *ngFor="let item of item.values | fsFilterIsolateValues: item.isolate"\n [value]="item.value">\n {{ item.name }}\n </mat-option>\n </mat-select>\n\n <mat-hint>\n <div *ngIf="item.isolate">\n <mat-checkbox (change)="isolateChange(item)" [(ngModel)]="item.isolate.enabled">\n <span class="checkbox-label">{{ item.isolate.label }}</span>\n </mat-checkbox>\n </div>\n </mat-hint>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".isolate{margin-bottom:25px}"]}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}(),Qe=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n}return B(i,e),i.prototype.modelChange=function(){this.itemChange()},i.prototype.compareFn=function(e,t){return e.value===t.value},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=U([t.Component({selector:"filter-item-chips",template:'<ng-template [ngIf]="item.values?.length">\n <fs-label-field>\n <fs-label>{{item.label}}</fs-label>\n <fs-chips [(ngModel)]="item.model"\n [compare]="compareFn"\n [multiple]="item.multiple">\n <fs-chip *ngFor="let value of item.values"\n [value]="value"\n [selectable]="true">\n {{ value.name }}\n </fs-chip>\n </fs-chips>\n </fs-label-field>\n</ng-template>\n\n<ng-template [ngIf]="item.loading">{{ item.label }} loading...</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-chip{line-height:40px}"]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ke),Ye=function(e){function i(t,i){var o=e.call(this,t,i)||this;return o._kvDiffers=t,o._cd=i,o.textControl=new h.FormControl,o.destroy$=new n.Subject,o}return B(i,e),i.prototype.ngOnInit=function(){this._listenControlValueChanges(),this._listenModelChanges()},i.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},i.prototype._listenControlValueChanges=function(){var e=this;this.textControl.valueChanges.pipe(o.distinctUntilChanged(),o.debounceTime(200),o.takeUntil(this.destroy$)).subscribe((function(t){e.item.model=t}))},i.prototype._listenModelChanges=function(){var e=this;this._item.value$.pipe(o.takeUntil(this.destroy$)).subscribe((function(){e.textControl.setValue(e.item.model,{emitEvent:!1})}))},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=U([t.Component({selector:"filter-item-text",template:'<mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <span matPrefix *ngIf="item.prefix" [innerHtml]="item.prefix"></span>\n <input matInput [formControl]="textControl" [fsFilterFocusTrigger]="item">\n <span matSuffix *ngIf="item.suffix" [innerHtml]="item.suffix"></span>\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ke),He=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n}return B(i,e),i.prototype.ngOnInit=function(){this.listenChanges()},i.prototype.listenChanges=function(){var e=this,t=n.fromEvent(this.from.nativeElement,"keyup").pipe(o.distinctUntilChanged()),i=n.fromEvent(this.to.nativeElement,"keyup").pipe(o.distinctUntilChanged());n.merge(t,i).pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.itemChange()}))},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},U([t.ViewChild("from",{static:!0}),z("design:type",t.ElementRef)],i.prototype,"from",void 0),U([t.ViewChild("to",{static:!0}),z("design:type",Object)],i.prototype,"to",void 0),i=U([t.Component({selector:"filter-item-range",template:'<span fxLayout="row">\n <mat-form-field class="filter-range-min">\n <mat-label>{{item.label[0]}}</mat-label>\n <span matPrefix *ngIf="item.prefix" [innerHtml]="item.prefix"></span>\n <input matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'from\'"\n type="text"\n inputmode="decimal"\n [(ngModel)]="item.model.min"\n fsMaskNumber\n [scale]="item.options?.scale || 2"\n #from\n >\n <span matSuffix *ngIf="item.suffix" [innerHtml]="item.suffix"></span>\n </mat-form-field>\n <div class="spacer"></div>\n <mat-form-field class="filter-range-max">\n <mat-label>{{item.label[1]}}</mat-label>\n <span matPrefix *ngIf="item.prefix" [innerHtml]="item.prefix"></span>\n <input matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'to\'"\n type="text"\n inputmode="decimal"\n [(ngModel)]="item.model.max"\n fsMaskNumber\n [scale]="item.options?.scale || 2"\n #to\n >\n <span matSuffix *ngIf="item.suffix" [innerHtml]="item.suffix"></span>\n </mat-form-field>\n</span>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".spacer{width:15px}mat-form-field{min-width:initial;display:flex;width:auto}mat-form-field ::ng-deep .mat-form-field-infix{width:auto}"]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ke),Ge=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n.displayWith=function(e){return e?e.name:e},n.fetch=function(e){return n.item.valuesFn(e)},n}return B(i,e),i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=U([t.Component({selector:"filter-item-autocomplete",template:'<fs-autocomplete\n [fsFilterFocusTrigger]="item"\n [fetch]="fetch"\n [displayWith]="displayWith"\n [(ngModel)]="item.model"\n [placeholder]="item.label"\n [fetchOnFocus]="item.fetchOnFocus"\n [showClear]="item.clearAllowed"\n name="item.name">\n <ng-template fsAutocompleteTemplate let-data="data">\n {{data.name}}\n </ng-template>\n</fs-autocomplete>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ke),Je=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n.fetch=function(e){return n.item.valuesFn(e)},n}return B(i,e),i.prototype.clicked=function(){this.chipBackground=this.item.chipBackground,this.chipColor=this.item.chipColor,this.chipIcon=this.item.chipIcon,this._cd.markForCheck()},i.prototype.addAutocompleteChipItem=function(e){e.data&&-1===this.item.model.indexOf(e.data.value)&&(this.item.model.push(e.data),this.itemChange())},i.prototype.removeAutocompleteChipItem=function(e){s.remove(this.item.model,{value:e.data.value}),this.itemChange()},i.prototype.clearAutocompleteChipItem=function(){this.item.clear(),this.itemChange()},i.prototype.compareItems=function(e,t){return(null==e?void 0:e.value)===(null==t?void 0:t.value)},i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=U([t.Component({selector:"filter-item-autocompletechips",template:'<fs-autocomplete-chips\n [fsFilterFocusTrigger]="item"\n [fetch]="fetch"\n [ngModel]="item.model"\n (selected)="addAutocompleteChipItem($event)"\n (removed)="removeAutocompleteChipItem($event)"\n (clear)="clearAutocompleteChipItem()"\n (click)="clicked()"\n [allowText]="false"\n [fetchOnFocus]="item.fetchOnFocus"\n [placeholder]="item.label"\n [chipImage]="item.chipImage"\n [chipColor]="chipColor"\n [chipIconColor]="chipIcon"\n [chipBackground]="chipBackground"\n [chipIcon]="item.chipIcon"\n [chipClass]="item.chipClass"\n [allowClear]="item.clearAllowed"\n [removable]="item.clearAllowed"\n [compareWith]="compareItems"\n name="model">\n <ng-template fsAutocompleteObject let-object="object">\n {{ object.name }}\n </ng-template>\n</fs-autocomplete-chips>\n\n\x3c!--<mat-form-field floatLabel="auto">\n <mat-label>{{item.label}}</mat-label>\n <mat-chip-list #chipList>\n <mat-chip *ngFor="let item of item.model"\n (removed)="removeAutocompleteChipItem(item)">\n {{ item.name }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n\n <input #chipsInput\n type="text"\n matInput\n [(ngModel)]="item.selectedValue"\n (ngModelChange)="onAutocompleteChipsChange(chipsInput)"\n [name]="item.name"\n [matChipInputFor]="chipList"\n [matAutocomplete]="autocompleteChipsInput">\n </mat-chip-list>\n\n <mat-autocomplete #autocompleteChipsInput="matAutocomplete"\n (optionSelected)="addAutocompleteChipItem( $event)"\n >\n <mat-option *ngFor="let item of item.values$ | async" [value]="item">\n {{ item.name }}\n </mat-option>\n </mat-autocomplete>\n <mat-placeholder *ngIf="inline">{{ item.label }}</mat-placeholder>\n</mat-form-field>--\x3e\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ke),Ze=function(i){function n(t,n){var o=i.call(this,t,n)||this;return o._kvDiffers=t,o._cd=n,o.viewType="date",o.itemDateMode=e.ItemDateMode,o.showYear=!0,o.showMonth=!0,o.showDay=!0,o}return B(n,i),n.prototype.ngOnInit=function(){this.item.type===e.ItemType.DateTime?this.viewType="datetime":this.viewType="date",this.item.mode===e.ItemDateMode.ScrollMonthYear&&(this.showDay=!1)},n.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},n=U([t.Component({selector:"filter-item-date",template:'<mat-form-field *ngIf="item.mode===itemDateMode.Calendar; else elseMode">\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDatePicker\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n [maxYear]="item.maxYear"\n [view]="viewType"\n [clear]="item.clearAllowed"\n [name]="item.name">\n <mat-placeholder *ngIf="inline">{{ item.label }}</mat-placeholder>\n</mat-form-field>\n\n<ng-template #elseMode>\n <mat-form-field>\n <mat-label>{{item.label}}</mat-label>\n <input matInput\n fsDateScrollPicker\n [fsFilterFocusTrigger]="item"\n [(ngModel)]="item.model"\n [maxYear]="item.maxYear"\n [showMonth]="showMonth"\n [showDay]="showDay"\n [showYear]="showYear"\n [clear]="item.clearAllowed"\n [name]="item.name">\n <mat-placeholder *ngIf="inline">{{ item.label }}</mat-placeholder>\n </mat-form-field>\n</ng-template>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],n)}(Ke),Xe=function(i){function n(e,t){var n=i.call(this,e,t)||this;return n._kvDiffers=e,n._cd=t,n.viewType="date",n}return B(n,i),n.prototype.ngOnInit=function(){this.item.type===e.ItemType.DateTimeRange?this.viewType="datetime":this.viewType="date"},n.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},n=U([t.Component({selector:"filter-item-date-range",template:'<mat-form-field>\n <mat-label>{{item.label[0]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'from\'"\n [fsDateRangeFrom]="item.name"\n [(ngModel)]="item.model.from"\n (ngModelChange)="itemChange()"\n [clear]="item.clearAllowed"\n [view]="viewType"\n name="date_from">\n</mat-form-field>\n\n<mat-form-field>\n <mat-label>{{item.label[1]}}</mat-label>\n <input\n matInput\n [fsFilterFocusTrigger]="item"\n [focusTargetType]="\'to\'"\n [fsDateRangeTo]="item.name"\n [(ngModel)]="item.model.to"\n (ngModelChange)="itemChange()"\n [clear]="item.clearAllowed"\n [view]="viewType"\n name="date_to">\n</mat-form-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],n)}(Ke),et=function(e){function i(t,i){var n=e.call(this,t,i)||this;return n._kvDiffers=t,n._cd=i,n}return B(i,e),i.ctorParameters=function(){return[{type:t.KeyValueDiffers},{type:t.ChangeDetectorRef}]},i=U([t.Component({selector:"filter-item-checkbox",template:'<fs-label-field>\n <mat-checkbox [(ngModel)]="item.model">\n {{ item.label }}\n </mat-checkbox>\n</fs-label-field>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-label-field{margin:0}"]}),z("design:paramtypes",[t.KeyValueDiffers,t.ChangeDetectorRef])],i)}(Ke),tt=function(){function e(){this.chips=[]}return U([t.Input(),z("design:type",Array)],e.prototype,"filters",void 0),e=U([t.Component({selector:"fs-filter-chips",template:'<fs-chips [(ngModel)]="chips">\n <ng-container *ngFor="let item of filters">\n <ng-container *ngIf="(item.value$ | async) !== null">\n <fs-filter-chip [item]="item"></fs-filter-chip>\n </ng-container>\n </ng-container>\n</fs-chips>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]})],e)}(),it=function(){function e(){}return e=U([t.Component({selector:"filter-item-select-backdrop",template:"",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{position:absolute;top:0;bottom:0;right:0;z-index:1002;left:0}"]}),z("design:paramtypes",[])],e)}(),nt=function(){function e(e,t){this._cdRef=e,this._focusController=t,this._chipRenderTimer$=n.timer(500).pipe(o.mapTo(!0)),this._destroy$=new n.Subject}return e.prototype.ngOnInit=function(){var e=this;this.rangeItem=this.item.isTypeDateRange||this.item.isTypeRange||this.item.isTypeDateTimeRange,this.listenValueChangesForRanges(),this._updateVisibility(),this.item.hasPendingValues&&(this.item.loadAsyncValues(!1),this.item.values$.pipe(o.take(2),o.takeUntil(this._destroy$)).subscribe((function(){e._updateVisibility(),e._cdRef.markForCheck()})),this._initDelayRender())},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.focusOnItem=function(e){void 0===e&&(e=null),this._focusController.click(this.item,e)},e.prototype.removeItem=function(e,t){void 0===t&&(t=null),this.item instanceof ie?this.item.clearRange(t):this.item instanceof oe||this.item instanceof re?this.item.clearDateRange(t):this.item.clear()},e.prototype.listenValueChangesForRanges=function(){var e=this;this.item.value$.pipe(o.distinctUntilChanged(),o.takeUntil(this._destroy$)).subscribe((function(){e._updateVisibility(),e._cdRef.markForCheck()}))},e.prototype._updateVisibility=function(){this.itemVisible=this.item.isChipVisible},e.prototype._initDelayRender=function(){this.chipDelayedRender$=n.combineLatest([this.item.values$,this._chipRenderTimer$.pipe(o.startWith(!1))]).pipe(o.map((function(e){var t=N(e,2),i=t[0],n=t[1];return!!i||n})))},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Me}]},U([t.Input(),z("design:type",Q)],e.prototype,"item",void 0),e=U([t.Component({selector:"fs-filter-chip",template:'<ng-container *ngIf="!item.hasPendingValues || (chipDelayedRender$ | async)">\n <ng-container *ngIf="rangeItem; else defaultChip">\n <fs-chip\n *ngIf="item.model?.min || item.model?.from"\n [value]="item"\n [selectable]="false"\n [removable]="item.clearAllowed"\n size="small"\n (click)="focusOnItem(\'from\')"\n (removed)="removeItem($event, \'from\')">\n <ng-template\n [ngTemplateOutlet]="chipContent"\n [ngTemplateOutletContext]="{ item: item, type: \'from\' }"\n ></ng-template>\n </fs-chip>\n\n <fs-chip\n *ngIf="item.model?.max || item.model?.to"\n [value]="item"\n [selectable]="false"\n [removable]="item.clearAllowed"\n size="small"\n (click)="focusOnItem(\'to\')"\n (removed)="removeItem($event, \'to\')">\n <ng-template\n [ngTemplateOutlet]="chipContent"\n [ngTemplateOutletContext]="{ item: item, type: \'to\' }"\n ></ng-template>\n </fs-chip>\n\n </ng-container>\n\n <ng-template #defaultChip>\n <fs-chip\n *ngIf="itemVisible"\n [value]="item"\n [selectable]="false"\n [removable]="item.clearAllowed"\n size="small"\n (click)="focusOnItem()"\n (removed)="removeItem($event)">\n <ng-template\n [ngTemplateOutlet]="chipContent"\n [ngTemplateOutletContext]="{ item: item }"\n ></ng-template>\n </fs-chip>\n </ng-template>\n\n <ng-template #chipContent let-item="item" let-type="type">\n <ng-container *ngIf="!item.hasPendingValues && !item.loading; else lodaingValues">\n <fs-filter-chip-content [item]="item" [type]="type"></fs-filter-chip-content>\n </ng-container>\n\n <ng-template #lodaingValues>\n Loading...\n </ng-template>\n </ng-template>\n</ng-container>\n\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["fs-chip{cursor:pointer;color:#6f6f6f}"]}),z("design:paramtypes",[t.ChangeDetectorRef,Me])],e)}(),ot=function(){function e(e){this.externalParams=e,this._clear=new t.EventEmitter,this._done=new t.EventEmitter}return Object.defineProperty(e.prototype,"savedFilters",{get:function(){return this.externalParams.savedFiltersController},enumerable:!0,configurable:!0}),e.prototype.done=function(){this._done.emit()},e.prototype.clear=function(){this._clear.emit()},e.prototype.saveFilters=function(){this.externalParams.savedFiltersController.openSavedFilterEditDialog()},e.ctorParameters=function(){return[{type:xe}]},U([t.Output("clear"),z("design:type",Object)],e.prototype,"_clear",void 0),U([t.Output("done"),z("design:type",Object)],e.prototype,"_done",void 0),e=U([t.Component({selector:"fs-filter-drawer-actions",template:'<button type="button" mat-button color="primary" (click)="done()">Done</button>\n<button type="button" mat-button (click)="clear()">Clear</button>\n<ng-container *ngIf="savedFilters.enabled$ | async">\n <button type="button" mat-button (click)="saveFilters()">Save</button>\n</ng-container>\n\n'}),z("design:paramtypes",[xe])],e)}(),rt=function(){function e(){}return e.prototype.transform=function(e,t){return t?e.filter((function(e){return e.value!==t.value})):e},e=U([t.Pipe({name:"fsFilterIsolateValues"})],e)}(),at=function(){function i(e,t,i,o,r,a,s,l,c){this._el=e,this._focusController=t,this._targetSelect=i,this._targetDate=o,this._targetDateScroll=r,this._targetDateRangeFrom=a,this._targetDateRangeTo=s,this._targetAutocomplete=l,this._targetAutocompleteChips=c,this._destroy$=new n.Subject}return i.prototype.ngOnInit=function(){var e=this;this._focusController.listenFocusFor$(this._item,this._focusTargetType).pipe(o.delay(500),o.takeUntil(this._destroy$)).subscribe((function(){e._focus()}))},i.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},i.prototype._focus=function(){switch(this._item.type){case e.ItemType.Select:this._targetSelect.open();break;case e.ItemType.Text:case e.ItemType.Range:this._el.nativeElement.focus();break;case e.ItemType.Date:this._item.mode===e.ItemDateMode.Calendar?this._targetDate.open():this._targetDateScroll.inputClick();break;case e.ItemType.DateRange:"from"===this._focusTargetType?this._targetDateRangeFrom.open():this._targetDateRangeTo.open();break;case e.ItemType.AutoComplete:this._targetAutocomplete.focus();break;case e.ItemType.AutoCompleteChips:this._targetAutocompleteChips.focus()}},i.ctorParameters=function(){return[{type:t.ElementRef},{type:Me},{type:C.MatSelect,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.FsDatePickerComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.FsDateScrollPickerComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.DateRangePickerFromComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:w.DateRangePickerToComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:A.FsAutocompleteComponent,decorators:[{type:t.Optional},{type:t.Self}]},{type:D.FsAutocompleteChipsComponent,decorators:[{type:t.Optional},{type:t.Self}]}]},U([t.Input("fsFilterFocusTrigger"),z("design:type",Object)],i.prototype,"_item",void 0),U([t.Input("focusTargetType"),z("design:type",Object)],i.prototype,"_focusTargetType",void 0),i=U([t.Directive({selector:"[fsFilterFocusTrigger]"}),K(2,t.Optional()),K(2,t.Self()),K(3,t.Optional()),K(3,t.Self()),K(4,t.Optional()),K(4,t.Self()),K(5,t.Optional()),K(5,t.Self()),K(6,t.Optional()),K(6,t.Self()),K(7,t.Optional()),K(7,t.Self()),K(8,t.Optional()),K(8,t.Self()),z("design:paramtypes",[t.ElementRef,Me,C.MatSelect,w.FsDatePickerComponent,w.FsDateScrollPickerComponent,w.DateRangePickerFromComponent,w.DateRangePickerToComponent,A.FsAutocompleteComponent,D.FsAutocompleteChipsComponent])],i)}(),st=function(){function e(e){this._cdRef=e,this._destroy$=new n.Subject}return e.prototype.ngOnInit=function(){this.listenValueChangesForRanges()},e.prototype.ngOnDestroy=function(){this._destroy$.next(),this._destroy$.complete()},e.prototype.listenValueChangesForRanges=function(){var e=this;this.item.value$.pipe(o.takeUntil(this._destroy$)).subscribe((function(){e.content=e._getContent(),e._cdRef.detectChanges()}))},e.prototype._getContent=function(){var e=this.item.getChipsContent(this.type);return void 0!==this.item.chipLabel?""===this.item.chipLabel?""+e:Array.isArray(this.item.chipLabel)?lt(this.item.chipLabel,this.type)+": "+e:this.item.chipLabel+": "+e:Array.isArray(this.item.label)?lt(this.item.label,this.type)+": "+e:this.item.isTypeCheckbox?e:this.item.label+": "+e},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},U([t.Input(),z("design:type",Q)],e.prototype,"item",void 0),U([t.Input(),z("design:type",String)],e.prototype,"type",void 0),e=U([t.Component({selector:"fs-filter-chip-content",template:"{{ content }}\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}),z("design:paramtypes",[t.ChangeDetectorRef])],e)}();function lt(e,t){return"from"===t&&e[0]?""+e[0]:"to"===t&&e[1]?""+e[1]:""}var ct=function(){function e(e,i,n){this._itemsStore=e,this._externalParams=i,this._savedFilters=n,this.select=new t.EventEmitter,this.clear=new t.EventEmitter,this.manage=new t.EventEmitter}return Object.defineProperty(e.prototype,"filters$",{get:function(){return this._savedFilters.savedFilters$},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeFilter$",{get:function(){return this._savedFilters.activeFilter$},enumerable:!0,configurable:!0}),e.prototype.selectFilter=function(e){this._externalParams.setActiveSavedFilter(e),this.select.emit(e)},e.prototype.removeActiveFilter=function(){this._itemsStore.filtersClear(),this._externalParams.setActiveSavedFilter(null),this.clear.emit()},e.prototype.manageFilters=function(){this.manage.emit()},e.ctorParameters=function(){return[{type:he},{type:xe},{type:we}]},U([t.Output(),z("design:type",Object)],e.prototype,"select",void 0),U([t.Output(),z("design:type",Object)],e.prototype,"clear",void 0),U([t.Output(),z("design:type",Object)],e.prototype,"manage",void 0),e=U([t.Component({selector:"fs-filter-saved-filters-menu",template:'<a [fsMenuTriggerFor]="menu" class="selector">{{ (activeFilter$ | async)?.name || \'Not selected\' }}</a>\n\n<fs-menu #menu>\n <ng-container *ngIf="activeFilter$ | async">\n <ng-template fs-menu-item (click)="removeActiveFilter()">\n None\n </ng-template>\n </ng-container>\n <ng-container *ngFor="let filter of filters$ | async">\n <ng-template fs-menu-item (click)="selectFilter(filter)">\n {{ filter.name }}\n </ng-template>\n </ng-container>\n <ng-template fs-menu-item class="saved-filter-last-item" (click)="manageFilters()">\n Manage\n </ng-template>\n</fs-menu>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host ::ng-deep .selector{cursor:pointer}"]}),z("design:paramtypes",[he,xe,we])],e)}(),ut=function(){function e(){this.kebabActions=[],this.actions=[]}return U([t.Input(),z("design:type",Array)],e.prototype,"kebabActions",void 0),U([t.Input(),z("design:type",Array)],e.prototype,"actions",void 0),e=U([t.Component({selector:"fs-filter-actions",template:'\x3c!-- Buttons --\x3e\n<ng-container *ngFor="let action of actions">\n\n <ng-container [ngSwitch]="action.mode">\n <ng-container *ngSwitchCase="\'button\'">\n <fs-filter-action-button [action]="action"></fs-filter-action-button>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'menu\'">\n <fs-filter-action-button\n [action]="action"\n [fsMenuTriggerFor]="someRef">\n </fs-filter-action-button>\n\n <fs-menu #someRef>\n <ng-container *ngFor="let childAction of action.items">\n <ng-container *ngIf="childAction.isGroup else simpleMenuItem">\n <fs-menu-group [label]="childAction.label">\n <ng-container *ngFor="let subAction of childAction.items">\n <ng-template fs-menu-item\n [link]="subAction.routerLink?.link"\n [queryParams]="subAction.routerLink?.queryParams"\n [hidden]="!(subAction.visible$ | async)"\n (click)="subAction.click($event)">\n <mat-icon *ngIf="subAction.icon">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template fs-menu-item\n [link]="childAction.routerLink?.link"\n [queryParams]="childAction.routerLink?.queryParams"\n [hidden]="!(childAction.visible$ | async)"\n (click)="childAction.click($event);">\n <mat-icon *ngIf="childAction.icon">{{childAction.icon}}</mat-icon>\n {{childAction.label}}\n </ng-template>\n </ng-template>\n </ng-container>\n </fs-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase="\'file\'">\n <fs-file\n class="action-button"\n [multiple]="action.multiple"\n (select)="action.fileSelected($event)"\n (error)="action.fileError($event)"\n (clicked)="action.click($event)">\n <fs-filter-action-button [action]="action"></fs-filter-action-button>\n </fs-file>\n </ng-container>\n </ng-container>\n</ng-container>\n\x3c!-- /Buttons --\x3e\n\n\x3c!-- menu --\x3e\n<ng-container *ngIf="kebabActions?.length">\n <fs-filter-action-kebab-actions [kebabActions]="kebabActions"></fs-filter-action-kebab-actions>\n</ng-container>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-flex}.action-button{display:block}.action-button+.action-button,fs-menu+.action-button{margin-left:5px}.menu-button{width:36px;height:36px;line-height:36px}"]})],e)}(),pt=function(){function e(){}return U([t.Input(),z("design:type",Be)],e.prototype,"action",void 0),e=U([t.Component({selector:"fs-filter-action-button",template:'<ng-container [ngSwitch]="action.type">\n \x3c!-- Basic button --\x3e\n <button type="button"\n *ngSwitchCase="\'basic\'"\n mat-button\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Raised button --\x3e\n <button type="button"\n *ngSwitchDefault\n mat-raised-button\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Icon button --\x3e\n <button type="button"\n *ngSwitchCase="\'icon\'"\n mat-icon-button\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Fab button --\x3e\n <button type="button"\n *ngSwitchCase="\'fab\'"\n mat-fab\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n \x3c!-- Mini Fab button --\x3e\n <button type="button"\n *ngSwitchCase="\'mini-fab\'"\n mat-mini-fab\n (click)="action.click && action.click($event)"\n [color]="action.color"\n [ngClass]="action.classArray"\n [disabled]="action.disabled$ | async"\n [tabIndex]="action.tabIndex"\n >\n <ng-template [ngTemplateOutlet]="buttonContent"></ng-template>\n </button>\n\n <ng-template #buttonContent>\n <mat-icon *ngIf="action.icon">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n</ng-container>\n',host:{class:"action-button"},changeDetection:t.ChangeDetectionStrategy.OnPush})],e)}(),ft=function(){function e(){}return U([t.Input(),z("design:type",Array)],e.prototype,"kebabActions",void 0),e=U([t.Component({selector:"fs-filter-action-kebab-actions",template:'<button type="button"\n mat-icon-button\n class="menu-button"\n [fsMenuTriggerFor]="kebabActionsMenu">\n <mat-icon>more_vert</mat-icon>\n</button>\n<fs-menu #kebabActionsMenu>\n <ng-container *ngFor="let action of kebabActions">\n <ng-container [ngSwitch]="action.mode">\n \x3c!-- Case when actions was collapsed from action with mode = \'menu\'--\x3e\n <ng-container *ngSwitchCase="\'menu\'">\n <ng-container *ngFor="let childAction of action.items">\n <ng-container *ngIf="childAction.isGroup else simpleMenuItem">\n <fs-menu-group>\n <ng-template fs-group-menu-item-template>\n {{ action.label }} <mat-icon style="margin: 0;">arrow_right</mat-icon> {{childAction.label}}\n </ng-template>\n <ng-container *ngFor="let subAction of childAction.items">\n <ng-template fs-menu-item\n [link]="subAction.routerLink?.link"\n [queryParams]="subAction.routerLink?.queryParams"\n [hidden]="!(subAction.visible$ | async)"\n (click)="subAction.click($event)">\n <mat-icon *ngIf="subAction.icon">{{subAction.icon}}</mat-icon>\n {{subAction.label}}\n </ng-template>\n </ng-container>\n </fs-menu-group>\n </ng-container>\n <ng-template #simpleMenuItem>\n <ng-template fs-menu-item\n [link]="childAction.routerLink?.link"\n [queryParams]="childAction.routerLink?.queryParams"\n [hidden]="!(childAction.visible$ | async)"\n (click)="childAction.click($event);">\n <mat-icon *ngIf="childAction.icon">{{childAction.icon}}</mat-icon>\n {{ action.label }} <mat-icon style="margin: 0;">arrow_right</mat-icon>{{ childAction.label }}\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-template fs-menu-item\n (click)="action.click($event)"\n [fsClass]="action.classArray"\n >\n <mat-icon *ngIf="action.icon">{{action.icon}}</mat-icon> {{action.label}}\n </ng-template>\n </ng-container>\n\n </ng-container>\n </ng-container>\n</fs-menu>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".menu-button{width:36px;height:36px;line-height:36px}"]})],e)}(),mt=function(){function e(){}var n;return n=e,e.forRoot=function(e){return void 0===e&&(e={}),{ngModule:n,providers:[{provide:ke,useValue:e||{}}]}},e=n=U([t.NgModule({imports:[u.CommonModule,i.RouterModule,h.FormsModule,h.ReactiveFormsModule,v.MatIconModule,_.MatInputModule,C.MatSelectModule,b.MatChipsModule,g.MatCheckboxModule,d.MatAutocompleteModule,y.MatButtonModule,p.MatDialogModule,O.FlexLayoutModule,x.FsChipModule,s.FsCommonModule,m.FsStoreModule,w.FsDatePickerModule,k.FsLabelModule,A.FsAutocompleteModule,D.FsAutocompleteChipsModule,F.FsScrollModule,I.PortalModule,j.FsMaskModule,P.FsMenuModule,$.FsSkeletonModule,S.FsFormModule,M.FsFileModule],declarations:[Ke,qe,Ue,tt,ze,Le,Ne,We,Qe,Ye,He,Ge,Je,Ze,Xe,et,$e,it,nt,st,ot,Ie,ct,ut,pt,ft,Ve,at,rt],providers:[m.FsStore],exports:[qe,Ve,ct],entryComponents:[$e]})],e)}();e.AutocompleteChipsItem=pe,e.AutocompleteItem=ue,e.BaseItem=Q,e.CheckboxItem=fe,e.ChipsItem=X,e.DateItem=se,e.DateRangeItem=oe,e.DateTimeItem=le,e.DateTimeRangeItem=re,e.ExternalParamsController=xe,e.FS_FILTER_CONFIG=ke,e.FilterComponent=qe,e.FilterItemComponent=Ue,e.FilterStatusBarDirective=Ve,e.FsFilterModule=mt,e.QUERY_PARAM_DELIMITER=":",e.RangeItem=ie,e.SavedFiltersController=we,e.SelectItem=Z,e.TextItem=me,e.filterFromQueryParam=ye,e.filterToQueryParam=de,e.ɵa=he,e.ɵb=_e,e.ɵba=it,e.ɵbb=nt,e.ɵbc=st,e.ɵbd=ot,e.ɵbe=Ie,e.ɵbf=ct,e.ɵbg=ut,e.ɵbh=pt,e.ɵbi=ft,e.ɵbj=at,e.ɵbk=rt,e.ɵbl=ae,e.ɵbm=ne,e.ɵbn=ce,e.ɵc=Ce,e.ɵd=Ke,e.ɵe=Te,e.ɵg=Se,e.ɵh=Me,e.ɵi=Ee,e.ɵj=G,e.ɵk=tt,e.ɵl=ze,e.ɵm=Le,e.ɵn=Ne,e.ɵo=We,e.ɵp=Qe,e.ɵq=Ye,e.ɵr=He,e.ɵs=Ge,e.ɵt=Je,e.ɵu=Ze,e.ɵv=Xe,e.ɵw=et,e.ɵx=$e,e.ɵy=Pe,e.ɵz=je,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=firestitch-filter.umd.min.js.map
|