@firestitch/filter 14.0.0 → 14.0.2
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/{package/app → app}/classes/actions-controller.d.ts +41 -41
- package/{package/app → app}/components/action-button/action-button.component.d.ts +9 -9
- package/{package/app → app}/components/action-kebab-actions/action-kebab-actions.component.d.ts +7 -7
- package/{package/app → app}/components/actions/actions.component.d.ts +13 -13
- package/{package/app → app}/components/filter/filter.component.d.ts +204 -204
- package/{package/app → app}/components/filter-chip/filter-chip.component.d.ts +26 -26
- package/{package/app → app}/components/filter-chip-content/filter-chip-content.component.d.ts +18 -18
- package/{package/app → app}/components/filter-chips/filter-chips.component.d.ts +9 -9
- package/{package/app → app}/components/filter-drawer/filter-drawer.component.d.ts +30 -30
- package/{package/app → app}/components/filter-drawer-actions/filter-drawer-actions.component.d.ts +15 -15
- package/{package/app → app}/components/filters-item/autocomplete/autocomplete.component.d.ts +14 -14
- package/{package/app → app}/components/filters-item/autocompletechips/autocompletechips.component.d.ts +16 -16
- package/{package/app → app}/components/filters-item/base-item/base-item.component.d.ts +25 -25
- package/{package/app → app}/components/filters-item/checkbox/checkbox.component.d.ts +11 -11
- package/{package/app → app}/components/filters-item/chips/chips.component.d.ts +13 -13
- package/{package/app → app}/components/filters-item/date/date.component.d.ts +20 -20
- package/{package/app → app}/components/filters-item/date-range/date-range.component.d.ts +15 -15
- package/{package/app → app}/components/filters-item/filter-item.component.d.ts +39 -39
- package/{package/app → app}/components/filters-item/range/range.component.d.ts +15 -15
- package/{package/app → app}/components/filters-item/select/backdrop/backdrop.component.d.ts +6 -6
- package/{package/app → app}/components/filters-item/select/groups/groups.component.d.ts +12 -12
- package/{package/app → app}/components/filters-item/select/multiple/multiple.component.d.ts +15 -15
- package/{package/app → app}/components/filters-item/select/select.component.d.ts +23 -23
- package/{package/app → app}/components/filters-item/select/simple/simple.component.d.ts +14 -14
- package/{package/app → app}/components/filters-item/text/text.component.d.ts +19 -19
- package/{package/app → app}/components/filters-item/week/week.component.d.ts +12 -12
- package/{package/app → app}/components/saved-filter/index.d.ts +3 -3
- package/{package/app → app}/components/saved-filter/saved-filter-edit/index.d.ts +1 -1
- package/{package/app → app}/components/saved-filter/saved-filter-edit/saved-filter-edit.component.d.ts +18 -18
- package/{package/app → app}/components/saved-filter/saved-filter-manage/index.d.ts +1 -1
- package/{package/app → app}/components/saved-filter/saved-filter-manage/saved-filter-manage.component.d.ts +16 -16
- package/{package/app → app}/components/saved-filter/saved-filters-menu/index.d.ts +1 -1
- package/{package/app → app}/components/saved-filter/saved-filters-menu/saved-filters-menu.component.d.ts +23 -23
- package/{package/app → app}/consts/query-param-delimiter.d.ts +1 -1
- package/{package/app → app}/directives/focus-to-item/focus-to-item.directive.d.ts +27 -27
- package/{package/app → app}/directives/status-bar/status-bar.directive.d.ts +8 -8
- package/{package/app → app}/enums/action-mode.enum.d.ts +6 -6
- package/{package/app → app}/enums/action-type.enum.d.ts +9 -9
- package/{package/app → app}/enums/button-style.d.ts +9 -9
- package/{package/app → app}/enums/index.d.ts +6 -6
- package/{package/app → app}/enums/item-date-mode.enum.d.ts +5 -5
- package/{package/app → app}/enums/item-type.enum.d.ts +15 -15
- package/{package/app → app}/enums/picker-view-type.enum.d.ts +7 -7
- package/{package/app → app}/fs-filter.module.d.ts +70 -70
- package/{package/app → app}/helpers/build-query-params.d.ts +3 -3
- package/{package/app → app}/helpers/compare.d.ts +2 -2
- package/{package/app → app}/helpers/create-filter-item.d.ts +14 -14
- package/{package/app → app}/helpers/find-value.d.ts +1 -1
- package/{package/app → app}/helpers/get-range-name.d.ts +1 -1
- package/{package/app → app}/helpers/parse-date.d.ts +1 -1
- package/{package/app → app}/helpers/parse-item-value-from-stored.d.ts +1 -1
- package/{package/app → app}/helpers/query-param-transformers.d.ts +2 -2
- package/{package/app → app}/helpers/restore-items.d.ts +12 -12
- package/{package/app → app}/injectors/filter-config.d.ts +2 -2
- package/{package/app → app}/injectors/filter-drawer-data.d.ts +2 -2
- package/{package/app → app}/injectors/filter-drawer-overlay.d.ts +2 -2
- package/{package/app → app}/interfaces/action.interface.d.ts +81 -81
- package/{package/app → app}/interfaces/config.interface.d.ts +66 -66
- package/{package/app → app}/interfaces/external-params.interface.d.ts +3 -3
- package/{package/app → app}/interfaces/filter.interface.d.ts +4 -4
- package/{package/app → app}/interfaces/index.d.ts +6 -6
- package/{package/app → app}/interfaces/items/autocomplete-chips.interface.d.ts +15 -15
- package/{package/app → app}/interfaces/items/autocomplete.interface.d.ts +9 -9
- package/{package/app → app}/interfaces/items/base.interface.d.ts +29 -29
- package/{package/app → app}/interfaces/items/checkbox.interface.d.ts +7 -7
- package/{package/app → app}/interfaces/items/chips.interface.d.ts +6 -6
- package/{package/app → app}/interfaces/items/date-range.interface.d.ts +8 -8
- package/{package/app → app}/interfaces/items/date.interface.d.ts +7 -7
- package/{package/app → app}/interfaces/items/range.interface.d.ts +13 -13
- package/{package/app → app}/interfaces/items/select.interface.d.ts +20 -20
- package/{package/app → app}/interfaces/items/text.interface.d.ts +9 -9
- package/{package/app → app}/interfaces/items/week.interface.d.ts +7 -7
- package/{package/app → app}/interfaces/saved-filters.interface.d.ts +18 -18
- package/{package/app → app}/interfaces/update-filter-item.interface.d.ts +4 -4
- package/{package/app → app}/models/action-menu-item.model.d.ts +23 -23
- package/{package/app → app}/models/action.model.d.ts +54 -54
- package/{package/app → app}/models/filter-config.d.ts +31 -31
- package/{package/app → app}/models/items/autocomplete/base-autocomplete-item.d.ts +12 -12
- package/{package/app → app}/models/items/autocomplete-chips-item.d.ts +20 -20
- package/{package/app → app}/models/items/autocomplete-item.d.ts +11 -11
- package/{package/app → app}/models/items/base-item.d.ts +80 -80
- package/{package/app → app}/models/items/checkbox-item.d.ts +17 -17
- package/{package/app → app}/models/items/chips-item.d.ts +18 -18
- package/{package/app → app}/models/items/date/base-date-item.d.ts +14 -14
- package/{package/app → app}/models/items/date-item.d.ts +8 -8
- package/{package/app → app}/models/items/date-range/base-date-range-item.d.ts +21 -21
- package/{package/app → app}/models/items/date-range-item.d.ts +6 -6
- package/{package/app → app}/models/items/date-time-item.d.ts +7 -7
- package/{package/app → app}/models/items/date-time-range-item.d.ts +6 -6
- package/{package/app → app}/models/items/range-item.d.ts +23 -23
- package/{package/app → app}/models/items/select/base-select-item.d.ts +13 -13
- package/{package/app → app}/models/items/select/multiple-select-item.d.ts +14 -14
- package/{package/app → app}/models/items/select/simple-select-item.d.ts +14 -14
- package/{package/app → app}/models/items/select-item.d.ts +8 -8
- package/{package/app → app}/models/items/text-item.d.ts +15 -15
- package/{package/app → app}/models/items/week-item.d.ts +18 -18
- package/{package/app → app}/pipes/remove-isolate-value.pipe.d.ts +8 -8
- package/{package/app → app}/providers/filter-meta.d.ts +5 -5
- package/{package/app → app}/services/external-params/persistance-params-controller.service.d.ts +22 -22
- package/{package/app → app}/services/external-params/query-params-controller.service.d.ts +22 -22
- package/{package/app → app}/services/external-params/saved-filters-controller.service.d.ts +40 -40
- package/{package/app → app}/services/external-params-controller.service.d.ts +42 -42
- package/{package/app → app}/services/filter-overlay.service.d.ts +36 -36
- package/{package/app → app}/services/focus-controller.service.d.ts +18 -18
- package/{package/app → app}/services/items-store.service.d.ts +69 -69
- package/{package/esm2020 → esm2020}/app/classes/actions-controller.mjs +126 -126
- package/{package/esm2020 → esm2020}/app/components/action-button/action-button.component.mjs +21 -21
- package/{package/esm2020 → esm2020}/app/components/action-kebab-actions/action-kebab-actions.component.mjs +16 -16
- package/{package/esm2020 → esm2020}/app/components/actions/actions.component.mjs +41 -41
- package/{package/esm2020 → esm2020}/app/components/filter/filter.component.mjs +613 -613
- package/{package/esm2020 → esm2020}/app/components/filter-chip/filter-chip.component.mjs +85 -85
- package/{package/esm2020 → esm2020}/app/components/filter-chip-content/filter-chip-content.component.mjs +78 -78
- package/{package/esm2020 → esm2020}/app/components/filter-chips/filter-chips.component.mjs +18 -18
- package/{package/esm2020 → esm2020}/app/components/filter-drawer/filter-drawer.component.mjs +70 -70
- package/{package/esm2020 → esm2020}/app/components/filter-drawer-actions/filter-drawer-actions.component.mjs +40 -40
- package/{package/esm2020 → esm2020}/app/components/filters-item/autocomplete/autocomplete.component.mjs +26 -26
- package/{package/esm2020 → esm2020}/app/components/filters-item/autocompletechips/autocompletechips.component.mjs +41 -41
- package/{package/esm2020 → esm2020}/app/components/filters-item/base-item/base-item.component.mjs +62 -62
- package/{package/esm2020 → esm2020}/app/components/filters-item/checkbox/checkbox.component.mjs +20 -20
- package/{package/esm2020 → esm2020}/app/components/filters-item/chips/chips.component.mjs +27 -27
- package/{package/esm2020 → esm2020}/app/components/filters-item/date/date.component.mjs +42 -42
- package/{package/esm2020 → esm2020}/app/components/filters-item/date-range/date-range.component.mjs +33 -33
- package/{package/esm2020 → esm2020}/app/components/filters-item/filter-item.component.mjs +79 -79
- package/{package/esm2020 → esm2020}/app/components/filters-item/range/range.component.mjs +44 -44
- package/{package/esm2020 → esm2020}/app/components/filters-item/select/backdrop/backdrop.component.mjs +11 -11
- package/{package/esm2020 → esm2020}/app/components/filters-item/select/groups/groups.component.mjs +29 -29
- package/{package/esm2020 → esm2020}/app/components/filters-item/select/multiple/multiple.component.mjs +56 -56
- package/{package/esm2020 → esm2020}/app/components/filters-item/select/select.component.mjs +50 -50
- package/{package/esm2020 → esm2020}/app/components/filters-item/select/simple/simple.component.mjs +42 -42
- package/{package/esm2020 → esm2020}/app/components/filters-item/text/text.component.mjs +48 -48
- package/{package/esm2020 → esm2020}/app/components/filters-item/week/week.component.mjs +24 -24
- package/{package/esm2020 → esm2020}/app/components/saved-filter/index.mjs +3 -3
- package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-edit/index.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-edit/saved-filter-edit.component.mjs +49 -49
- package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-manage/index.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-manage/saved-filter-manage.component.mjs +39 -39
- package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filters-menu/index.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filters-menu/saved-filters-menu.component.mjs +51 -51
- package/{package/esm2020 → esm2020}/app/consts/query-param-delimiter.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/directives/focus-to-item/focus-to-item.directive.mjs +129 -129
- package/{package/esm2020 → esm2020}/app/directives/status-bar/status-bar.directive.mjs +15 -15
- package/{package/esm2020 → esm2020}/app/enums/action-mode.enum.mjs +7 -7
- package/{package/esm2020 → esm2020}/app/enums/action-type.enum.mjs +11 -11
- package/{package/esm2020 → esm2020}/app/enums/button-style.mjs +10 -10
- package/{package/esm2020 → esm2020}/app/enums/index.mjs +6 -6
- package/{package/esm2020 → esm2020}/app/enums/item-date-mode.enum.mjs +6 -6
- package/{package/esm2020 → esm2020}/app/enums/item-type.enum.mjs +16 -16
- package/{package/esm2020 → esm2020}/app/enums/picker-view-type.enum.mjs +8 -8
- package/{package/esm2020 → esm2020}/app/fs-filter.module.mjs +260 -260
- package/{package/esm2020 → esm2020}/app/helpers/build-query-params.mjs +32 -32
- package/{package/esm2020 → esm2020}/app/helpers/compare.mjs +37 -37
- package/{package/esm2020 → esm2020}/app/helpers/create-filter-item.mjs +54 -54
- package/{package/esm2020 → esm2020}/app/helpers/find-value.mjs +12 -12
- package/{package/esm2020 → esm2020}/app/helpers/get-range-name.mjs +8 -8
- package/{package/esm2020 → esm2020}/app/helpers/parse-date.mjs +7 -7
- package/{package/esm2020 → esm2020}/app/helpers/parse-item-value-from-stored.mjs +80 -80
- package/{package/esm2020 → esm2020}/app/helpers/query-param-transformers.mjs +8 -8
- package/{package/esm2020 → esm2020}/app/helpers/restore-items.mjs +48 -48
- package/{package/esm2020 → esm2020}/app/injectors/filter-config.mjs +2 -2
- package/{package/esm2020 → esm2020}/app/injectors/filter-drawer-data.mjs +2 -2
- package/{package/esm2020 → esm2020}/app/injectors/filter-drawer-overlay.mjs +2 -2
- package/{package/esm2020 → esm2020}/app/interfaces/action.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/config.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/external-params.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/filter.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/index.mjs +6 -6
- package/{package/esm2020 → esm2020}/app/interfaces/items/autocomplete-chips.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/autocomplete.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/base.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/checkbox.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/chips.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/date-range.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/date.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/range.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/select.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/text.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/items/week.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/saved-filters.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/interfaces/update-filter-item.interface.mjs +1 -1
- package/{package/esm2020 → esm2020}/app/models/action-menu-item.model.mjs +66 -66
- package/{package/esm2020 → esm2020}/app/models/action.model.mjs +129 -129
- package/{package/esm2020 → esm2020}/app/models/filter-config.mjs +66 -66
- package/{package/esm2020 → esm2020}/app/models/items/autocomplete/base-autocomplete-item.mjs +13 -13
- package/{package/esm2020 → esm2020}/app/models/items/autocomplete-chips-item.mjs +60 -60
- package/{package/esm2020 → esm2020}/app/models/items/autocomplete-item.mjs +32 -32
- package/{package/esm2020 → esm2020}/app/models/items/base-item.mjs +233 -233
- package/{package/esm2020 → esm2020}/app/models/items/checkbox-item.mjs +49 -49
- package/{package/esm2020 → esm2020}/app/models/items/chips-item.mjs +88 -88
- package/{package/esm2020 → esm2020}/app/models/items/date/base-date-item.mjs +47 -47
- package/{package/esm2020 → esm2020}/app/models/items/date-item.mjs +18 -18
- package/{package/esm2020 → esm2020}/app/models/items/date-range/base-date-range-item.mjs +134 -134
- package/{package/esm2020 → esm2020}/app/models/items/date-range-item.mjs +6 -6
- package/{package/esm2020 → esm2020}/app/models/items/date-time-item.mjs +9 -9
- package/{package/esm2020 → esm2020}/app/models/items/date-time-range-item.mjs +6 -6
- package/{package/esm2020 → esm2020}/app/models/items/range-item.mjs +82 -82
- package/{package/esm2020 → esm2020}/app/models/items/select/base-select-item.mjs +36 -36
- package/{package/esm2020 → esm2020}/app/models/items/select/multiple-select-item.mjs +87 -87
- package/{package/esm2020 → esm2020}/app/models/items/select/simple-select-item.mjs +65 -65
- package/{package/esm2020 → esm2020}/app/models/items/select-item.mjs +10 -10
- package/{package/esm2020 → esm2020}/app/models/items/text-item.mjs +33 -33
- package/{package/esm2020 → esm2020}/app/models/items/week-item.mjs +93 -93
- package/{package/esm2020 → esm2020}/app/pipes/remove-isolate-value.pipe.mjs +20 -20
- package/{package/esm2020 → esm2020}/app/providers/filter-meta.mjs +9 -9
- package/{package/esm2020 → esm2020}/app/services/external-params/persistance-params-controller.service.mjs +57 -57
- package/{package/esm2020 → esm2020}/app/services/external-params/query-params-controller.service.mjs +61 -61
- package/{package/esm2020 → esm2020}/app/services/external-params/saved-filters-controller.service.mjs +162 -162
- package/{package/esm2020 → esm2020}/app/services/external-params-controller.service.mjs +178 -178
- package/{package/esm2020 → esm2020}/app/services/filter-overlay.service.mjs +121 -121
- package/{package/esm2020 → esm2020}/app/services/focus-controller.service.mjs +29 -29
- package/{package/esm2020 → esm2020}/app/services/items-store.service.mjs +344 -344
- package/{package/esm2020 → esm2020}/firestitch-filter.mjs +4 -4
- package/{package/esm2020 → esm2020}/public_api.mjs +35 -35
- package/{package/fesm2015 → fesm2015}/firestitch-filter.mjs +4349 -4349
- package/{package/fesm2015 → fesm2015}/firestitch-filter.mjs.map +1 -1
- package/{package/fesm2020 → fesm2020}/firestitch-filter.mjs +4336 -4336
- package/{package/fesm2020 → fesm2020}/firestitch-filter.mjs.map +1 -1
- package/{package/index.d.ts → index.d.ts} +5 -5
- package/package.json +22 -79
- package/{package/public_api.d.ts → public_api.d.ts} +40 -40
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/16/25/214635fa124a83a4fe3a52bde70e7124d9d011a5d176790a9c607bf1f5ed27cadefc4a1b5a225c0bda11250a180ca5798773e0c108e8d5e2d8559d2f9eed +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/44/f9/ee834587d4ac4a429d8c4af2e1562028c7432ac179f9699f2990ab3dadc8e4f66ae45bf22625aedf47fad137e2de39a9b99141784e56d5123544f90c922a +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/4d/89/993c2eaff9e0cfca023676bf3f2d3d446f6b6cc90eec839075529d155102b2808a8b44e259d357704acd43143c12af5a5916b4e291a799164b722142ee8e +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/52/cb/71f80b48163c432fcb05ac0f736ae7cae10318713c98c74739b3eb5d83ebce635b1a7c77d357b1a4b13a9ae9cfe43348538e4336c25c234551f1e80f0567 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/54/f6/73f0d8ea64a18aa71d80a2cf99d6eb4a2cd345e943127e018913d0f76e9575fabe3aee5002ee4da996e661662d474ad31e9a77f2858c68eed532c2d45d47 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/61/84/7f56389ef39faf5c5b6ad292f668ec6cc5cb6e476d94b1740bdadb9832e3de22a0032b90811f02c80d3d56be5f5e32d8bb900e17ebcb09db379befddc221 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/69/d3/d48ad36dd0a576c4d6f8af3a2ee671037639b0a8d91679992dcbd9dabc284bf316c3126201837e931a162f23cdc4a505608bb64df8e87f59a17364890873 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/70/92/ac80dcd48732b949f163abf36c48b0912598d2bb66e5c1f2056fef872f59fb1b591abbf3bfdbf461a46cbd507eea05a6bd0f14ba3d573f1684cbc78bd094 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/73/10/12664696206dcdab6b084331532b234c439acef8a6428af667a2e1bb1c15e2055b3ac70f44fd8bf508396d3e11a798b40849fd66dbdbd0ff9d9d7e780edd +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/74/f6/4c2db73499d08279895e1ab6e2fb65baa613d31218b6968f74143ba03819c72a2720b927ca5a708dd484c0bc6763124e62ce9c2e652f71b740cb2d29ae03 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/78/30/8eedd8d752a08df898806b01abde5b4c1809f6edcba95fcf112c006833b34986c295b62a7e47cd73297c3da78ca6072ef18ba502b6efdd6048dbdbbcd257 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/8c/f8/d9f30e3e898c99e8c3157d4c9157dead1b1115ea4db50aced0c33713cd394bb770b182d1d5087c821d22b2abb99e288191ba9e30954ea4ed9ab6ff70d391 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/8d/53/ad58764bc240411378ae1c47c0c20525da378a3b143795a11bc3fdbf6c9cde6fb2de6c3947d673d5872b9ce205d6274114b3b4dfd27609a636df7fd0b600 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/8f/74/3ed29367f32f9c909f5898704561eb1ebe5cdabba507ba08cbeeaeecd274d020b1401ba871938be899025a265299f8be66c59d59b574a996a74b2987d98e +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/a1/ac/1dbcf215585477c3f70180cb40186b5119d9ad1d27b2e0dcde66034c950e334ce0577409535c29bb15d2e6c9238eb9e841177fc62d3949a58bbbb397238d +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/a3/08/068a7a29e9cc2385b62d4b0fc14b04a7f09ed469d9b79bb754e37d4933b0ab8aa171b286080e20a11e67f42b8558a4bda64aa03ca097001ecda5c25a9015 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/ae/6c/352ab77e603fa53f25ab95cd6fd19a230095b212464689ab76c89db8d97bd0f221c27fbd84d0767fb5ce7e33f5feb175a9256ab35cf216d30dd3263b6b14 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/b6/38/eb8a1b6bd6265968335935cbc2763fbcbb9cd4e32dd58a5234bfd87379ee840044338eeae5f126da9936d21ed423071cfbca6748ee153235addf874824f7 +0 -1
- package/.angular/cache/14.2.13/ng-packagr/index-v5/01/3c/d4dca899e5bd80c43ed2e78ec79687adc272ff835d03f0ae48cb881ddd83 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/05/a7/da2d9625c1bc294409dbf750062e363a1abbe39b51177bfb7e5a9aa9ae81 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/08/f1/b2e705e45544df7c77f4238b558d569a1215422c2086df9140963f960eef +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/21/1d/398c87beb2402502d4e706beedd98ea707f31b441d6aa7711eef62a0439b +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/26/0b/ee2b1cad7f114e99f8d4da848bd6ceb4e849178b50723d9dcd10f39fb05c +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/26/98/b8614f38ea6fefe80f96f06adb98d925eccfae9eec0937c645a42034614c +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/64/4d/18a7b240783e7b3de33ad33724d2b43e8f3349e840ccab571ca3c6c51c00 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/64/70/77036e049a76cab5a64caa9cba4b603631c7e9e2f47e6c5fbc7f39d67a2f +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/6c/5d/700bf777ddebfd9b8f15e2709674069747b6fcd37376049712828252ca92 +0 -3
- package/.angular/cache/14.2.13/ng-packagr/index-v5/71/89/4e4e3808e28a4a95a98391ab38f87f165ae234aefd4231092d1f531f56b3 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/7c/c2/bd7b21a07f8b1da7797f40df86dc4289416305c26464c6b965a336fd3975 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/85/64/cb2f22b4df13a70eb519564e382de3d7dd3747bc0cab1109017f8934cff8 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/96/b1/2730596477eee53fc70082999f48e373f6795e68d21e04234a45131added +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/af/e4/165326aa8daa8e07ac9e02bde3d64a31b00d1b2b59a797a51a89456d2ad6 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/cd/96/32e83b96bce723e8ad58fdb7c43cf0002b3e0561309899e8b2a75204cbff +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/dd/38/1f423a0e17cf4e99ef3c880daeb533cdce9275226cb2f617aed52e881e59 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/e4/e8/f48bdfbec024c932fd928e4db790b6454d090d4db31e9d69201a5e1ea466 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/ee/59/16a63690de125da5067876d4ccf122230175174f3489e48893448bcbdcd3 +0 -2
- package/.angular/cache/14.2.13/ng-packagr/index-v5/fd/46/71e9d6d1a123ed68ce03aa617dcaaad4ad9c5a9193f1281166766c453621 +0 -3
- package/.angulardoc.json +0 -4
- package/.editorconfig +0 -15
- package/.eslintrc.json +0 -9
- package/.gitmodules +0 -3
- package/README.MD +0 -0
- package/angular.json +0 -163
- package/babel.config.js +0 -11
- package/jest.config.js +0 -24
- package/package/package.json +0 -56
- package/tsconfig.compodoc.json +0 -12
- package/tsconfig.json +0 -10
- package/tslint.json +0 -8
- /package/{package/styles.scss → styles.scss} +0 -0
|
@@ -1,614 +1,614 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, HostBinding, Inject, Input, NgZone, Optional, Output, ViewChild, } from '@angular/core';
|
|
2
|
-
import { MatInput } from '@angular/material/input';
|
|
3
|
-
import { BehaviorSubject, combineLatest, fromEvent, interval, Subject } from 'rxjs';
|
|
4
|
-
import { debounceTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';
|
|
5
|
-
import { ActionsController } from '../../classes/actions-controller';
|
|
6
|
-
import { objectsAreEquals } from '../../helpers/compare';
|
|
7
|
-
import { FsFilterConfig } from '../../models/filter-config';
|
|
8
|
-
import { ExternalParamsController } from '../../services/external-params-controller.service';
|
|
9
|
-
import { PersistanceParamsController } from '../../services/external-params/persistance-params-controller.service';
|
|
10
|
-
import { QueryParamsController } from '../../services/external-params/query-params-controller.service';
|
|
11
|
-
import { SavedFiltersController } from '../../services/external-params/saved-filters-controller.service';
|
|
12
|
-
import { FsFilterOverlayService } from '../../services/filter-overlay.service';
|
|
13
|
-
import { FocusControllerService } from '../../services/focus-controller.service';
|
|
14
|
-
import { FsFilterItemsStore } from '../../services/items-store.service';
|
|
15
|
-
import { FilterStatusBarDirective } from './../../directives/status-bar/status-bar.directive';
|
|
16
|
-
import { FS_FILTER_CONFIG } from './../../injectors/filter-config';
|
|
17
|
-
import * as i0 from "@angular/core";
|
|
18
|
-
import * as i1 from "../../services/filter-overlay.service";
|
|
19
|
-
import * as i2 from "../../services/external-params-controller.service";
|
|
20
|
-
import * as i3 from "../../services/items-store.service";
|
|
21
|
-
import * as i4 from "../../classes/actions-controller";
|
|
22
|
-
import * as i5 from "../../services/external-params/saved-filters-controller.service";
|
|
23
|
-
import * as i6 from "@angular/common";
|
|
24
|
-
import * as i7 from "@angular/forms";
|
|
25
|
-
import * as i8 from "@angular/material/icon";
|
|
26
|
-
import * as i9 from "@angular/material/form-field";
|
|
27
|
-
import * as i10 from "@angular/material/input";
|
|
28
|
-
import * as i11 from "@angular/material/button";
|
|
29
|
-
import * as i12 from "@angular/material/slide-toggle";
|
|
30
|
-
import * as i13 from "@firestitch/form";
|
|
31
|
-
import * as i14 from "@firestitch/clear";
|
|
32
|
-
import * as i15 from "../filter-chips/filter-chips.component";
|
|
33
|
-
import * as i16 from "../actions/actions.component";
|
|
34
|
-
import * as i17 from "../../models/filter-config";
|
|
35
|
-
export class FilterComponent {
|
|
36
|
-
constructor(_defaultConfig, _filterOverlay, _zone, _externalParams, _filterItems, _actions, _savedFiltersController, _externalParamsController) {
|
|
37
|
-
this._defaultConfig = _defaultConfig;
|
|
38
|
-
this._filterOverlay = _filterOverlay;
|
|
39
|
-
this._zone = _zone;
|
|
40
|
-
this._externalParams = _externalParams;
|
|
41
|
-
this._filterItems = _filterItems;
|
|
42
|
-
this._actions = _actions;
|
|
43
|
-
this._savedFiltersController = _savedFiltersController;
|
|
44
|
-
this._externalParamsController = _externalParamsController;
|
|
45
|
-
this.showSortBy = true;
|
|
46
|
-
this.showFilterInput = true;
|
|
47
|
-
this.closed = new EventEmitter();
|
|
48
|
-
this.opened = new EventEmitter();
|
|
49
|
-
this.ready = new EventEmitter();
|
|
50
|
-
this.showFilterMenu = false;
|
|
51
|
-
this.windowDesktop = false;
|
|
52
|
-
this.fsFilterClass = true;
|
|
53
|
-
this.searchPlaceholder = 'Search';
|
|
54
|
-
this.keyword = '';
|
|
55
|
-
this.autoReload = true;
|
|
56
|
-
this._config = null;
|
|
57
|
-
this._filtersBtnVisible$ = new BehaviorSubject(true);
|
|
58
|
-
this._keywordVisible$ = new BehaviorSubject(true);
|
|
59
|
-
this._hasFilterChips$ = new BehaviorSubject(false);
|
|
60
|
-
this._keyword$ = new Subject();
|
|
61
|
-
this._destroy$ = new Subject();
|
|
62
|
-
this._filterItems.filter = this;
|
|
63
|
-
this._listenWhenFilterReady();
|
|
64
|
-
this._updateWindowWidth();
|
|
65
|
-
this._filterOverlay.attach$
|
|
66
|
-
.pipe(takeUntil(this._destroy$))
|
|
67
|
-
.subscribe(() => {
|
|
68
|
-
this.showFilterMenu = true;
|
|
69
|
-
});
|
|
70
|
-
this._filterOverlay.detach$
|
|
71
|
-
.pipe(takeUntil(this._destroy$))
|
|
72
|
-
.subscribe(() => {
|
|
73
|
-
this.showFilterMenu = false;
|
|
74
|
-
});
|
|
75
|
-
this._listenWindowResize();
|
|
76
|
-
}
|
|
77
|
-
set setConfig(config) {
|
|
78
|
-
this._initFilterWithConfig(config);
|
|
79
|
-
}
|
|
80
|
-
set setFilter(config) {
|
|
81
|
-
this._initFilterWithConfig(config);
|
|
82
|
-
}
|
|
83
|
-
get hasKeyword() {
|
|
84
|
-
return this._filterItems.hasKeyword;
|
|
85
|
-
}
|
|
86
|
-
get config() {
|
|
87
|
-
return this._config;
|
|
88
|
-
}
|
|
89
|
-
get filterParams() {
|
|
90
|
-
return this._filterItems.values();
|
|
91
|
-
}
|
|
92
|
-
get filterParamsQuery() {
|
|
93
|
-
return this._filterItems.valuesAsQuery();
|
|
94
|
-
}
|
|
95
|
-
get items() {
|
|
96
|
-
return this._filterItems.items;
|
|
97
|
-
}
|
|
98
|
-
get visibleItems() {
|
|
99
|
-
return this._filterItems.visibleItems;
|
|
100
|
-
}
|
|
101
|
-
get keywordItem() {
|
|
102
|
-
return this._filterItems.keywordItem;
|
|
103
|
-
}
|
|
104
|
-
get itemsReady$() {
|
|
105
|
-
return this._filterItems.ready$;
|
|
106
|
-
}
|
|
107
|
-
get hasFilterChips$() {
|
|
108
|
-
return this._hasFilterChips$.asObservable();
|
|
109
|
-
}
|
|
110
|
-
get hasVisibleItemOrSorting() {
|
|
111
|
-
return this.visibleItems.length > 0 || !!this._filterItems.sortByItem;
|
|
112
|
-
}
|
|
113
|
-
get filtersBtnVisible$() {
|
|
114
|
-
return this._filtersBtnVisible$.asObservable();
|
|
115
|
-
}
|
|
116
|
-
get keywordVisible$() {
|
|
117
|
-
return this._keywordVisible$.asObservable();
|
|
118
|
-
}
|
|
119
|
-
get actionsVisible$() {
|
|
120
|
-
return this._actions.visible$;
|
|
121
|
-
}
|
|
122
|
-
get actions$() {
|
|
123
|
-
return this._actions.actions$;
|
|
124
|
-
}
|
|
125
|
-
get menuActions$() {
|
|
126
|
-
return this._actions.menuActions$;
|
|
127
|
-
}
|
|
128
|
-
set activeSavedFilter(savedFilter) {
|
|
129
|
-
this._externalParams.setActiveSavedFilter(savedFilter);
|
|
130
|
-
}
|
|
131
|
-
get activeSavedFilter() {
|
|
132
|
-
return this._savedFiltersController.activeFilter;
|
|
133
|
-
}
|
|
134
|
-
get savedFilters() {
|
|
135
|
-
return this._savedFiltersController.savedFilters;
|
|
136
|
-
}
|
|
137
|
-
ngOnInit() {
|
|
138
|
-
// Avoid ngChanges error
|
|
139
|
-
setTimeout(() => {
|
|
140
|
-
if (this.config.autofocus) {
|
|
141
|
-
this.focus();
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
this._initAutoReload();
|
|
145
|
-
this._listenInputChanges();
|
|
146
|
-
this._listenInternalItemsChange();
|
|
147
|
-
this._initOverlay();
|
|
148
|
-
}
|
|
149
|
-
ngOnDestroy() {
|
|
150
|
-
this._destroyFilterDrawer();
|
|
151
|
-
this._destroy$.next();
|
|
152
|
-
this._destroy$.complete();
|
|
153
|
-
}
|
|
154
|
-
focus() {
|
|
155
|
-
this.keywordMatInput?.focus();
|
|
156
|
-
}
|
|
157
|
-
updateSort(sort) {
|
|
158
|
-
this._filterItems.updateSort(sort);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
*
|
|
162
|
-
* Do update value of some field
|
|
163
|
-
*
|
|
164
|
-
* @param values - values for update
|
|
165
|
-
*
|
|
166
|
-
* To update text value just pass new text value
|
|
167
|
-
*
|
|
168
|
-
* public updateSelectValue(val) {
|
|
169
|
-
* this.filterEl.updateValues({ keyword: val });
|
|
170
|
-
* }
|
|
171
|
-
*
|
|
172
|
-
* To update select or observable select you could pass suitable value
|
|
173
|
-
*
|
|
174
|
-
* public updateSelectValue(val: number) {
|
|
175
|
-
* this.filterEl.updateValues({ simple_select: val }, { observable_select: val });
|
|
176
|
-
* }
|
|
177
|
-
*
|
|
178
|
-
* To update checkbox value just pass true/false as value
|
|
179
|
-
*
|
|
180
|
-
* public updateCheckox(val: boolean) {
|
|
181
|
-
* this.filterEl.updateValues({ checkbox: val });
|
|
182
|
-
* }
|
|
183
|
-
*
|
|
184
|
-
* To update range value just pass object with min&max object or just with one of targets
|
|
185
|
-
*
|
|
186
|
-
* Ex.: { min: 10, max 15 }, { min: 5 }, { max 5 }
|
|
187
|
-
*
|
|
188
|
-
* public updateRange(val) {
|
|
189
|
-
* this.filterEl.updateValues({ range: val });
|
|
190
|
-
* }
|
|
191
|
-
*
|
|
192
|
-
* To update autocomplete just pass object with name/value fields
|
|
193
|
-
*
|
|
194
|
-
* Ex.: { name: 'John Doe', value: 1 }
|
|
195
|
-
*
|
|
196
|
-
* public updateAutocomplete(val) {
|
|
197
|
-
* this.filterEl.updateValues({ autocomplete_user_id: val });
|
|
198
|
-
* }
|
|
199
|
-
*
|
|
200
|
-
* To update autocompletechips just pass:
|
|
201
|
-
*
|
|
202
|
-
* 1) object with name/value fields - will be appended to existing set of values
|
|
203
|
-
*
|
|
204
|
-
* { name: 'John Doe', value: 1 }
|
|
205
|
-
*
|
|
206
|
-
* 2) array of objects - will be appended to existing set of values
|
|
207
|
-
*
|
|
208
|
-
* [{ name: 'John Doe', value: 1 }, { name: 'Darya Filipova', value: 2 }]
|
|
209
|
-
*
|
|
210
|
-
* 3) null - clear existing set of values
|
|
211
|
-
*
|
|
212
|
-
* public updateAutocomplete(val) {
|
|
213
|
-
* this.filterEl.updateValues({ autocompletechips_user_id: val });
|
|
214
|
-
* }
|
|
215
|
-
*
|
|
216
|
-
*/
|
|
217
|
-
updateValues(values) {
|
|
218
|
-
Object.keys(values).forEach((key) => {
|
|
219
|
-
const filterItem = this.items
|
|
220
|
-
.find((item) => item.name === key);
|
|
221
|
-
if (!filterItem) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
filterItem.model = values[key];
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
hide() {
|
|
228
|
-
this.changeVisibility(false);
|
|
229
|
-
}
|
|
230
|
-
show() {
|
|
231
|
-
this.changeVisibility(true);
|
|
232
|
-
}
|
|
233
|
-
changeVisibilityClick(value, event = null) {
|
|
234
|
-
if (event) {
|
|
235
|
-
event.stopPropagation();
|
|
236
|
-
}
|
|
237
|
-
this.changeVisibility(value);
|
|
238
|
-
}
|
|
239
|
-
get itemValues() {
|
|
240
|
-
return this.items
|
|
241
|
-
.map((item) => item.value);
|
|
242
|
-
}
|
|
243
|
-
get nonEmptyItemValues() {
|
|
244
|
-
return this.items
|
|
245
|
-
.filter((item) => item.value !== undefined)
|
|
246
|
-
.map((item) => item.value);
|
|
247
|
-
}
|
|
248
|
-
get hasItemValues() {
|
|
249
|
-
return this.items
|
|
250
|
-
.some((item) => item.value !== undefined);
|
|
251
|
-
}
|
|
252
|
-
getItemValue(name) {
|
|
253
|
-
const item = this.items
|
|
254
|
-
.find((_item) => _item.name === name);
|
|
255
|
-
return item?.value;
|
|
256
|
-
}
|
|
257
|
-
showItem(name) {
|
|
258
|
-
const item = this.getItem(name);
|
|
259
|
-
if (item) {
|
|
260
|
-
item.hide = false;
|
|
261
|
-
this._filterItems.updateItemsVisiblity();
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
hideItem(name) {
|
|
265
|
-
const item = this.getItem(name);
|
|
266
|
-
if (!item) {
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
item.hide = true;
|
|
270
|
-
this._filterItems.updateItemsVisiblity();
|
|
271
|
-
}
|
|
272
|
-
clearItem(name) {
|
|
273
|
-
const item = this.getItem(name);
|
|
274
|
-
if (!item) {
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
item.clear();
|
|
278
|
-
}
|
|
279
|
-
updateItemConfig(name, params) {
|
|
280
|
-
const item = this.getItem(name);
|
|
281
|
-
if (!item) {
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
item.label = params.label ?? item.label;
|
|
285
|
-
item.chipLabel = params.chipLabel ?? item.chipLabel;
|
|
286
|
-
this._filterItems.updateItemsVisiblity();
|
|
287
|
-
}
|
|
288
|
-
getItemValueChange$(name) {
|
|
289
|
-
const item = this.items.find((i) => i.name === name);
|
|
290
|
-
if (item) {
|
|
291
|
-
return item.value$
|
|
292
|
-
.pipe(map(() => {
|
|
293
|
-
return item.model;
|
|
294
|
-
}));
|
|
295
|
-
}
|
|
296
|
-
return null;
|
|
297
|
-
}
|
|
298
|
-
changeVisibility(state) {
|
|
299
|
-
if (state === this.showFilterMenu) {
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
if (!state) {
|
|
303
|
-
this.closed.emit();
|
|
304
|
-
return this._destroyFilterDrawer();
|
|
305
|
-
}
|
|
306
|
-
if (!this.hasVisibleItemOrSorting) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
this._listenEscButton();
|
|
310
|
-
this.opened.emit();
|
|
311
|
-
this._filterOverlay.open();
|
|
312
|
-
}
|
|
313
|
-
init() {
|
|
314
|
-
const data = this._filterItems.valuesAsQuery();
|
|
315
|
-
this._sort = this._filterItems.getSort();
|
|
316
|
-
if (this.config.init) {
|
|
317
|
-
this.config.init(data, this._sort, this);
|
|
318
|
-
}
|
|
319
|
-
this._updateChipsVisibility();
|
|
320
|
-
this.items
|
|
321
|
-
.forEach((item) => {
|
|
322
|
-
item.init(item, this);
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
clear(event = null) {
|
|
326
|
-
if (event) {
|
|
327
|
-
event.stopPropagation();
|
|
328
|
-
}
|
|
329
|
-
this._filterItems.filtersClear();
|
|
330
|
-
if (this.config.clear) {
|
|
331
|
-
this.config.clear();
|
|
332
|
-
}
|
|
333
|
-
this.keyword = '';
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Close filter window and do change callback
|
|
337
|
-
*/
|
|
338
|
-
search(event) {
|
|
339
|
-
this.changeVisibilityClick(false, event);
|
|
340
|
-
}
|
|
341
|
-
reload(event = null) {
|
|
342
|
-
if (event) {
|
|
343
|
-
event.preventDefault();
|
|
344
|
-
event.stopPropagation();
|
|
345
|
-
}
|
|
346
|
-
const data = this._filterItems.valuesAsQuery();
|
|
347
|
-
const el = this.reloadEl?.nativeElement;
|
|
348
|
-
if (el) {
|
|
349
|
-
el.style.transition = 'all 0.75s 0.0s';
|
|
350
|
-
el.style.transform = 'rotate(360deg)';
|
|
351
|
-
setTimeout(() => {
|
|
352
|
-
el.style.transition = null;
|
|
353
|
-
el.style.transform = null;
|
|
354
|
-
}, 1000);
|
|
355
|
-
}
|
|
356
|
-
if (this.config.reload) {
|
|
357
|
-
this.config.reload(data, this._filterItems.getSort());
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
getItem(name) {
|
|
361
|
-
return this.items
|
|
362
|
-
.find((item) => item.name === name);
|
|
363
|
-
}
|
|
364
|
-
fetchQueryParams() {
|
|
365
|
-
this._externalParams.fetchQueryParams();
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Call change callback and apply new filter values
|
|
369
|
-
*/
|
|
370
|
-
change() {
|
|
371
|
-
const data = this._filterItems.valuesAsQuery();
|
|
372
|
-
const sort = this._filterItems.getSort();
|
|
373
|
-
const sortingChanged = ((!sort || !this._sort) && sort !== this._sort)
|
|
374
|
-
|| (sort && this._sort && !objectsAreEquals(this._sort, sort));
|
|
375
|
-
if (sortingChanged) {
|
|
376
|
-
this._sort = sort;
|
|
377
|
-
if (this.config.sortChange) {
|
|
378
|
-
this.config.sortChange(data, sort);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
if (this.config.change) {
|
|
382
|
-
this.config.change(data, sort);
|
|
383
|
-
}
|
|
384
|
-
this._updateChipsVisibility();
|
|
385
|
-
// visibility for actions can depend on filters state
|
|
386
|
-
this._actions.updateActionsVisibility();
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Update filter actions config
|
|
390
|
-
*
|
|
391
|
-
* @param actions
|
|
392
|
-
*/
|
|
393
|
-
updateActions(actions) {
|
|
394
|
-
this._actions.initActions(actions);
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Show "Filters" button
|
|
398
|
-
*/
|
|
399
|
-
showFiltersBtn() {
|
|
400
|
-
this._filtersBtnVisible$.next(true);
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Hide "Filters" button
|
|
404
|
-
*/
|
|
405
|
-
hideFiltersBtn() {
|
|
406
|
-
this._filtersBtnVisible$.next(false);
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* Show "Keyword" field if it present
|
|
410
|
-
*/
|
|
411
|
-
showKeywordField() {
|
|
412
|
-
this._keywordVisible$.next(true);
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* Hide "Keyword" field if it present
|
|
416
|
-
*/
|
|
417
|
-
hideKeywordField() {
|
|
418
|
-
this._keywordVisible$.next(false);
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Go through actions and check show() callback and update visible actions
|
|
422
|
-
*/
|
|
423
|
-
updateActionsVisibility() {
|
|
424
|
-
this._actions.updateActionsVisibility();
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Go through actions and check disabled() callback and update disabled state
|
|
428
|
-
*/
|
|
429
|
-
updateDisabledState() {
|
|
430
|
-
this._actions.updateDisabledState();
|
|
431
|
-
}
|
|
432
|
-
setItems(items) {
|
|
433
|
-
this._filterItems.destroyItems();
|
|
434
|
-
this.config.items = items;
|
|
435
|
-
this._filterItems.setConfig(this._config);
|
|
436
|
-
this._externalParams.initItems();
|
|
437
|
-
this._syncSearchInputWithKeyword();
|
|
438
|
-
}
|
|
439
|
-
keywordChange(keyword) {
|
|
440
|
-
this._keyword$.next(keyword);
|
|
441
|
-
}
|
|
442
|
-
updateSortings(items) {
|
|
443
|
-
this._filterItems.updateSortingItemsValues(items);
|
|
444
|
-
}
|
|
445
|
-
_initFilterWithConfig(config) {
|
|
446
|
-
if (this.config) {
|
|
447
|
-
this._filterItems.destroyItems();
|
|
448
|
-
}
|
|
449
|
-
config = {
|
|
450
|
-
...(this._defaultConfig || {}),
|
|
451
|
-
...config,
|
|
452
|
-
};
|
|
453
|
-
this._config = new FsFilterConfig(config);
|
|
454
|
-
this._actions.setConfig(this._config);
|
|
455
|
-
this._filterItems.setConfig(this._config);
|
|
456
|
-
this._externalParams.setConfig(this._config);
|
|
457
|
-
this._syncSearchInputWithKeyword();
|
|
458
|
-
if (this.config.reloadWhenConfigChanged) {
|
|
459
|
-
this.change();
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
_destroyFilterDrawer() {
|
|
463
|
-
this._filterOverlay.close();
|
|
464
|
-
}
|
|
465
|
-
_updateWindowWidth() {
|
|
466
|
-
this.windowDesktop = window.innerWidth > 1200;
|
|
467
|
-
}
|
|
468
|
-
_listenEscButton() {
|
|
469
|
-
this._zone.runOutsideAngular(() => {
|
|
470
|
-
fromEvent(window, 'keyup')
|
|
471
|
-
.pipe(filter((event) => event.code === 'Escape'), takeUntil(this.closed), takeUntil(this._destroy$))
|
|
472
|
-
.subscribe(() => {
|
|
473
|
-
this._zone.run(() => {
|
|
474
|
-
this.changeVisibility(false);
|
|
475
|
-
});
|
|
476
|
-
});
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
_listenWindowResize() {
|
|
480
|
-
this._zone.runOutsideAngular(() => {
|
|
481
|
-
fromEvent(window, 'resize')
|
|
482
|
-
.pipe(debounceTime(100), takeUntil(this._destroy$))
|
|
483
|
-
.subscribe(() => {
|
|
484
|
-
this._zone.run(() => {
|
|
485
|
-
this._updateWindowWidth();
|
|
486
|
-
});
|
|
487
|
-
});
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
_initAutoReload() {
|
|
491
|
-
if (this.config.autoReload) {
|
|
492
|
-
interval(this.config.autoReload.seconds * 1000)
|
|
493
|
-
.pipe(filter(() => this.autoReload), takeUntil(this._destroy$))
|
|
494
|
-
.subscribe(() => {
|
|
495
|
-
this.reload(null);
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
_listenInputChanges() {
|
|
500
|
-
this._keyword$
|
|
501
|
-
.pipe(debounceTime(200), distinctUntilChanged(), takeUntil(this._destroy$))
|
|
502
|
-
.subscribe((value) => {
|
|
503
|
-
const keywordItem = this._filterItems.keywordItem;
|
|
504
|
-
keywordItem.model = value;
|
|
505
|
-
this.change();
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
_syncSearchInputWithKeyword() {
|
|
509
|
-
const keywordItem = this._filterItems.keywordItem;
|
|
510
|
-
if (keywordItem) {
|
|
511
|
-
this.keyword = keywordItem.model;
|
|
512
|
-
this.searchPlaceholder = keywordItem.label || 'Search';
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
_listenInternalItemsChange() {
|
|
516
|
-
this._filterItems
|
|
517
|
-
.itemsChange$
|
|
518
|
-
.pipe(takeUntil(this._destroy$))
|
|
519
|
-
.subscribe(() => {
|
|
520
|
-
this.change();
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
_initOverlay() {
|
|
524
|
-
this._filterOverlay.setClearFn(this.clear.bind(this));
|
|
525
|
-
this._filterOverlay.setDoneFn(this.hide.bind(this));
|
|
526
|
-
}
|
|
527
|
-
// We may need some time to recieve external params and after that ready can be emitted
|
|
528
|
-
_listenWhenFilterReady() {
|
|
529
|
-
combineLatest([
|
|
530
|
-
this._externalParams.pending$,
|
|
531
|
-
this.itemsReady$,
|
|
532
|
-
])
|
|
533
|
-
.pipe(filter(([pendingParams, itemsReady]) => !pendingParams && itemsReady), takeUntil(this._destroy$))
|
|
534
|
-
.subscribe(() => {
|
|
535
|
-
this.init();
|
|
536
|
-
this._syncSearchInputWithKeyword();
|
|
537
|
-
this.ready.emit();
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
_updateChipsVisibility() {
|
|
541
|
-
const hasFilterChips = this._filterItems.items
|
|
542
|
-
.some((item) => {
|
|
543
|
-
return item.isChipVisible;
|
|
544
|
-
});
|
|
545
|
-
this._hasFilterChips$.next(hasFilterChips);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilterComponent, deps: [{ token: FS_FILTER_CONFIG, optional: true }, { token: i1.FsFilterOverlayService }, { token: i0.NgZone }, { token: i2.ExternalParamsController }, { token: i3.FsFilterItemsStore }, { token: i4.ActionsController }, { token: i5.SavedFiltersController }, { token: i2.ExternalParamsController }], target: i0.ɵɵFactoryTarget.Component });
|
|
549
|
-
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FilterComponent, selector: "fs-filter", inputs: { setConfig: ["config", "setConfig"], setFilter: ["filter", "setFilter"], showSortBy: "showSortBy", showFilterInput: "showFilterInput" }, outputs: { closed: "closed", opened: "opened", ready: "ready" }, host: { properties: { "class.filters-open": "this.showFilterMenu", "class.window-desktop": "this.windowDesktop", "class.fs-filter": "this.fsFilterClass", "class.has-keyword": "this.hasKeyword" } }, providers: [
|
|
550
|
-
FsFilterOverlayService,
|
|
551
|
-
ExternalParamsController,
|
|
552
|
-
PersistanceParamsController,
|
|
553
|
-
QueryParamsController,
|
|
554
|
-
FocusControllerService,
|
|
555
|
-
FsFilterItemsStore,
|
|
556
|
-
SavedFiltersController,
|
|
557
|
-
ActionsController,
|
|
558
|
-
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true }], viewQueries: [{ propertyName: "keywordMatInput", first: true, predicate: ["keywordMatInput"], descendants: true, read: MatInput }, { propertyName: "reloadEl", first: true, predicate: ["reloadEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"filter-container\">\n <div class=\"filter-inner-container\">\n <ng-container *ngIf=\"!hasKeyword; else filterKeyword\">\n <div>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n\n <ng-container *ngIf=\"hasKeyword\">\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #filterStatusBarChips>\n <ng-container *ngIf=\"statusBar\">\n <div class=\"filter-status-container\" [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div class=\"filter-status\" #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"config.chips && hasFilterChips$ | async\">\n <fs-filter-chips\n class=\"filter-chips\"\n [filters]=\"items\">\n </fs-filter-chips>\n </ng-container>\n</ng-template>\n\n<ng-template #filterKeyword>\n <div class=\"filter-keyword\">\n <ng-container *ngIf=\"(keywordVisible$ | async) && !keywordItem?.hide \">\n <mat-form-field\n [floatLabel]=\"'never'\"\n class=\"form-field-padless\"\n [ngClass]=\"search\"\n appearance=\"outline\">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n <input\n #keywordMatInput\n matInput\n [(ngModel)]=\"keyword\"\n (ngModelChange)=\"keywordChange($event)\"\n name=\"filter-input\"\n [fsClear]=\"true\"\n [placeholder]=\"searchPlaceholder\">\n </mat-form-field>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #filterActions>\n <div class=\"filter-actions\">\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 #filterToolbar>\n <div class=\"filter-toobar\">\n <ng-container *ngIf=\"filtersBtnVisible$ | async\">\n <ng-container *ngIf=\"hasVisibleItemOrSorting\">\n <a\n mat-button\n class=\"filters-button\"\n [ngClass]=\"{\n 'mat-raised-button': config.button.style === 'raised' && config.button.label,\n 'mat-flat-button': config.button.style === 'flat' && config.button.label,\n 'mat-stroked-button': config.button.style === 'stroked' && config.button.label,\n 'mat-button': config.button.style === 'basic' && config.button.label,\n 'mat-icon-button': config.button.style === 'icon' || !config.button.label\n }\"\n (click)=\"changeVisibilityClick(!showFilterMenu, $event)\"\n [color]=\"config.button.color\">\n <mat-icon *ngIf=\"config.button.icon\">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </a>\n </ng-container>\n </ng-container> \n <ng-container *ngIf=\"config.reload\">\n <a\n mat-icon-button\n (click)=\"reload($event)\"\n class=\"reload\">\n <mat-icon #reloadEl>refresh</mat-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"config.autoReload\">\n <mat-slide-toggle \n name=\"autoReload\" \n class=\"auto-reload\"\n [(ngModel)]=\"autoReload\">\n Auto refresh\n </mat-slide-toggle>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{margin-bottom:20px;display:block}:host.has-keyword .filter-status-container.has-status{margin-top:4px}:host:not(.has-keyword) .filter-status-container:not(.has-status)+fs-filter-chips{margin-top:0}:host:not(.has-keyword) .filter-inner-container{display:flex}:host:not(.has-keyword) .filter-toobar{justify-content:flex-end}.filter-status-container{flex-grow:1;display:flex;justify-content:center;flex-direction:column;align-self:flex-end}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis;line-height:17px}.filter-container{width:100%}.filter-inner-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:center}.filter-inner-container .filter-keyword{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0}.filter-inner-container .filter-keyword mat-form-field{max-width:100%;min-width:100px;margin-right:6px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-wrapper{margin-bottom:0}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix .mat-icon{font-size:22px;color:#626262}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-infix{width:250px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix,.filter-inner-container .filter-keyword mat-form-field .mat-form-field-suffix{top:.45em}.filter-inner-container .filter-keyword .mat-form-field-suffix{display:flex}.filter-inner-container .filter-keyword .mat-form-field-suffix .mat-icon-button{height:24px;width:24px}.filter-actions{display:flex;align-items:center}.filter-toobar{flex:1;white-space:nowrap;display:flex;align-items:center}.filter-toobar .reload{margin-left:-6px}.results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}fs-filter-chips{margin-top:4px;display:block}@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){html.fs-filter-open body{margin-right:350px}.fs-filter-backdrop{display:none}}html.fs-filter-open{scrollbar-width:none}:host ::ng-deep .auto-reload.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(12px,0,0)}:host ::ng-deep .auto-reload:not(.mat-checked) .mat-slide-toggle-content{color:#ccc}:host ::ng-deep .auto-reload .mat-slide-toggle-thumb,:host ::ng-deep .auto-reload .mat-slide-toggle-thumb-container{height:15px;width:15px}:host ::ng-deep .auto-reload .mat-slide-toggle-content{font-size:90%}:host ::ng-deep .auto-reload .mat-slide-toggle-bar{width:26px;height:10px;border-radius:10px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i10.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i12.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i13.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i13.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i14.FsClearComponent, selector: "[fsClear]", inputs: ["ngModel", "fsClear"], outputs: ["ngModelChange", "cleared"] }, { kind: "component", type: i15.FsFilterChipsComponent, selector: "fs-filter-chips", inputs: ["filters"] }, { kind: "component", type: i16.FsFilterActionsComponent, selector: "fs-filter-actions", inputs: ["kebabActions", "actions"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilterComponent, decorators: [{
|
|
560
|
-
type: Component,
|
|
561
|
-
args: [{ selector: 'fs-filter', providers: [
|
|
562
|
-
FsFilterOverlayService,
|
|
563
|
-
ExternalParamsController,
|
|
564
|
-
PersistanceParamsController,
|
|
565
|
-
QueryParamsController,
|
|
566
|
-
FocusControllerService,
|
|
567
|
-
FsFilterItemsStore,
|
|
568
|
-
SavedFiltersController,
|
|
569
|
-
ActionsController,
|
|
570
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"filter-container\">\n <div class=\"filter-inner-container\">\n <ng-container *ngIf=\"!hasKeyword; else filterKeyword\">\n <div>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n\n <ng-container *ngIf=\"hasKeyword\">\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #filterStatusBarChips>\n <ng-container *ngIf=\"statusBar\">\n <div class=\"filter-status-container\" [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div class=\"filter-status\" #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"config.chips && hasFilterChips$ | async\">\n <fs-filter-chips\n class=\"filter-chips\"\n [filters]=\"items\">\n </fs-filter-chips>\n </ng-container>\n</ng-template>\n\n<ng-template #filterKeyword>\n <div class=\"filter-keyword\">\n <ng-container *ngIf=\"(keywordVisible$ | async) && !keywordItem?.hide \">\n <mat-form-field\n [floatLabel]=\"'never'\"\n class=\"form-field-padless\"\n [ngClass]=\"search\"\n appearance=\"outline\">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n <input\n #keywordMatInput\n matInput\n [(ngModel)]=\"keyword\"\n (ngModelChange)=\"keywordChange($event)\"\n name=\"filter-input\"\n [fsClear]=\"true\"\n [placeholder]=\"searchPlaceholder\">\n </mat-form-field>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #filterActions>\n <div class=\"filter-actions\">\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 #filterToolbar>\n <div class=\"filter-toobar\">\n <ng-container *ngIf=\"filtersBtnVisible$ | async\">\n <ng-container *ngIf=\"hasVisibleItemOrSorting\">\n <a\n mat-button\n class=\"filters-button\"\n [ngClass]=\"{\n 'mat-raised-button': config.button.style === 'raised' && config.button.label,\n 'mat-flat-button': config.button.style === 'flat' && config.button.label,\n 'mat-stroked-button': config.button.style === 'stroked' && config.button.label,\n 'mat-button': config.button.style === 'basic' && config.button.label,\n 'mat-icon-button': config.button.style === 'icon' || !config.button.label\n }\"\n (click)=\"changeVisibilityClick(!showFilterMenu, $event)\"\n [color]=\"config.button.color\">\n <mat-icon *ngIf=\"config.button.icon\">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </a>\n </ng-container>\n </ng-container> \n <ng-container *ngIf=\"config.reload\">\n <a\n mat-icon-button\n (click)=\"reload($event)\"\n class=\"reload\">\n <mat-icon #reloadEl>refresh</mat-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"config.autoReload\">\n <mat-slide-toggle \n name=\"autoReload\" \n class=\"auto-reload\"\n [(ngModel)]=\"autoReload\">\n Auto refresh\n </mat-slide-toggle>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{margin-bottom:20px;display:block}:host.has-keyword .filter-status-container.has-status{margin-top:4px}:host:not(.has-keyword) .filter-status-container:not(.has-status)+fs-filter-chips{margin-top:0}:host:not(.has-keyword) .filter-inner-container{display:flex}:host:not(.has-keyword) .filter-toobar{justify-content:flex-end}.filter-status-container{flex-grow:1;display:flex;justify-content:center;flex-direction:column;align-self:flex-end}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis;line-height:17px}.filter-container{width:100%}.filter-inner-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:center}.filter-inner-container .filter-keyword{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0}.filter-inner-container .filter-keyword mat-form-field{max-width:100%;min-width:100px;margin-right:6px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-wrapper{margin-bottom:0}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix .mat-icon{font-size:22px;color:#626262}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-infix{width:250px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix,.filter-inner-container .filter-keyword mat-form-field .mat-form-field-suffix{top:.45em}.filter-inner-container .filter-keyword .mat-form-field-suffix{display:flex}.filter-inner-container .filter-keyword .mat-form-field-suffix .mat-icon-button{height:24px;width:24px}.filter-actions{display:flex;align-items:center}.filter-toobar{flex:1;white-space:nowrap;display:flex;align-items:center}.filter-toobar .reload{margin-left:-6px}.results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}fs-filter-chips{margin-top:4px;display:block}@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){html.fs-filter-open body{margin-right:350px}.fs-filter-backdrop{display:none}}html.fs-filter-open{scrollbar-width:none}:host ::ng-deep .auto-reload.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(12px,0,0)}:host ::ng-deep .auto-reload:not(.mat-checked) .mat-slide-toggle-content{color:#ccc}:host ::ng-deep .auto-reload .mat-slide-toggle-thumb,:host ::ng-deep .auto-reload .mat-slide-toggle-thumb-container{height:15px;width:15px}:host ::ng-deep .auto-reload .mat-slide-toggle-content{font-size:90%}:host ::ng-deep .auto-reload .mat-slide-toggle-bar{width:26px;height:10px;border-radius:10px}\n"] }]
|
|
571
|
-
}], ctorParameters: function () { return [{ type: i17.FsFilterConfig, decorators: [{
|
|
572
|
-
type: Optional
|
|
573
|
-
}, {
|
|
574
|
-
type: Inject,
|
|
575
|
-
args: [FS_FILTER_CONFIG]
|
|
576
|
-
}] }, { type: i1.FsFilterOverlayService }, { type: i0.NgZone }, { type: i2.ExternalParamsController }, { type: i3.FsFilterItemsStore }, { type: i4.ActionsController }, { type: i5.SavedFiltersController }, { type: i2.ExternalParamsController }]; }, propDecorators: { setConfig: [{
|
|
577
|
-
type: Input,
|
|
578
|
-
args: ['config']
|
|
579
|
-
}], setFilter: [{
|
|
580
|
-
type: Input,
|
|
581
|
-
args: ['filter']
|
|
582
|
-
}], showSortBy: [{
|
|
583
|
-
type: Input
|
|
584
|
-
}], showFilterInput: [{
|
|
585
|
-
type: Input
|
|
586
|
-
}], closed: [{
|
|
587
|
-
type: Output
|
|
588
|
-
}], opened: [{
|
|
589
|
-
type: Output
|
|
590
|
-
}], ready: [{
|
|
591
|
-
type: Output
|
|
592
|
-
}], statusBar: [{
|
|
593
|
-
type: ContentChild,
|
|
594
|
-
args: [FilterStatusBarDirective]
|
|
595
|
-
}], keywordMatInput: [{
|
|
596
|
-
type: ViewChild,
|
|
597
|
-
args: ['keywordMatInput', { read: MatInput }]
|
|
598
|
-
}], reloadEl: [{
|
|
599
|
-
type: ViewChild,
|
|
600
|
-
args: ['reloadEl', { read: ElementRef }]
|
|
601
|
-
}], showFilterMenu: [{
|
|
602
|
-
type: HostBinding,
|
|
603
|
-
args: ['class.filters-open']
|
|
604
|
-
}], windowDesktop: [{
|
|
605
|
-
type: HostBinding,
|
|
606
|
-
args: ['class.window-desktop']
|
|
607
|
-
}], fsFilterClass: [{
|
|
608
|
-
type: HostBinding,
|
|
609
|
-
args: ['class.fs-filter']
|
|
610
|
-
}], hasKeyword: [{
|
|
611
|
-
type: HostBinding,
|
|
612
|
-
args: ['class.has-keyword']
|
|
613
|
-
}] } });
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, HostBinding, Inject, Input, NgZone, Optional, Output, ViewChild, } from '@angular/core';
|
|
2
|
+
import { MatInput } from '@angular/material/input';
|
|
3
|
+
import { BehaviorSubject, combineLatest, fromEvent, interval, Subject } from 'rxjs';
|
|
4
|
+
import { debounceTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';
|
|
5
|
+
import { ActionsController } from '../../classes/actions-controller';
|
|
6
|
+
import { objectsAreEquals } from '../../helpers/compare';
|
|
7
|
+
import { FsFilterConfig } from '../../models/filter-config';
|
|
8
|
+
import { ExternalParamsController } from '../../services/external-params-controller.service';
|
|
9
|
+
import { PersistanceParamsController } from '../../services/external-params/persistance-params-controller.service';
|
|
10
|
+
import { QueryParamsController } from '../../services/external-params/query-params-controller.service';
|
|
11
|
+
import { SavedFiltersController } from '../../services/external-params/saved-filters-controller.service';
|
|
12
|
+
import { FsFilterOverlayService } from '../../services/filter-overlay.service';
|
|
13
|
+
import { FocusControllerService } from '../../services/focus-controller.service';
|
|
14
|
+
import { FsFilterItemsStore } from '../../services/items-store.service';
|
|
15
|
+
import { FilterStatusBarDirective } from './../../directives/status-bar/status-bar.directive';
|
|
16
|
+
import { FS_FILTER_CONFIG } from './../../injectors/filter-config';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
import * as i1 from "../../services/filter-overlay.service";
|
|
19
|
+
import * as i2 from "../../services/external-params-controller.service";
|
|
20
|
+
import * as i3 from "../../services/items-store.service";
|
|
21
|
+
import * as i4 from "../../classes/actions-controller";
|
|
22
|
+
import * as i5 from "../../services/external-params/saved-filters-controller.service";
|
|
23
|
+
import * as i6 from "@angular/common";
|
|
24
|
+
import * as i7 from "@angular/forms";
|
|
25
|
+
import * as i8 from "@angular/material/icon";
|
|
26
|
+
import * as i9 from "@angular/material/form-field";
|
|
27
|
+
import * as i10 from "@angular/material/input";
|
|
28
|
+
import * as i11 from "@angular/material/button";
|
|
29
|
+
import * as i12 from "@angular/material/slide-toggle";
|
|
30
|
+
import * as i13 from "@firestitch/form";
|
|
31
|
+
import * as i14 from "@firestitch/clear";
|
|
32
|
+
import * as i15 from "../filter-chips/filter-chips.component";
|
|
33
|
+
import * as i16 from "../actions/actions.component";
|
|
34
|
+
import * as i17 from "../../models/filter-config";
|
|
35
|
+
export class FilterComponent {
|
|
36
|
+
constructor(_defaultConfig, _filterOverlay, _zone, _externalParams, _filterItems, _actions, _savedFiltersController, _externalParamsController) {
|
|
37
|
+
this._defaultConfig = _defaultConfig;
|
|
38
|
+
this._filterOverlay = _filterOverlay;
|
|
39
|
+
this._zone = _zone;
|
|
40
|
+
this._externalParams = _externalParams;
|
|
41
|
+
this._filterItems = _filterItems;
|
|
42
|
+
this._actions = _actions;
|
|
43
|
+
this._savedFiltersController = _savedFiltersController;
|
|
44
|
+
this._externalParamsController = _externalParamsController;
|
|
45
|
+
this.showSortBy = true;
|
|
46
|
+
this.showFilterInput = true;
|
|
47
|
+
this.closed = new EventEmitter();
|
|
48
|
+
this.opened = new EventEmitter();
|
|
49
|
+
this.ready = new EventEmitter();
|
|
50
|
+
this.showFilterMenu = false;
|
|
51
|
+
this.windowDesktop = false;
|
|
52
|
+
this.fsFilterClass = true;
|
|
53
|
+
this.searchPlaceholder = 'Search';
|
|
54
|
+
this.keyword = '';
|
|
55
|
+
this.autoReload = true;
|
|
56
|
+
this._config = null;
|
|
57
|
+
this._filtersBtnVisible$ = new BehaviorSubject(true);
|
|
58
|
+
this._keywordVisible$ = new BehaviorSubject(true);
|
|
59
|
+
this._hasFilterChips$ = new BehaviorSubject(false);
|
|
60
|
+
this._keyword$ = new Subject();
|
|
61
|
+
this._destroy$ = new Subject();
|
|
62
|
+
this._filterItems.filter = this;
|
|
63
|
+
this._listenWhenFilterReady();
|
|
64
|
+
this._updateWindowWidth();
|
|
65
|
+
this._filterOverlay.attach$
|
|
66
|
+
.pipe(takeUntil(this._destroy$))
|
|
67
|
+
.subscribe(() => {
|
|
68
|
+
this.showFilterMenu = true;
|
|
69
|
+
});
|
|
70
|
+
this._filterOverlay.detach$
|
|
71
|
+
.pipe(takeUntil(this._destroy$))
|
|
72
|
+
.subscribe(() => {
|
|
73
|
+
this.showFilterMenu = false;
|
|
74
|
+
});
|
|
75
|
+
this._listenWindowResize();
|
|
76
|
+
}
|
|
77
|
+
set setConfig(config) {
|
|
78
|
+
this._initFilterWithConfig(config);
|
|
79
|
+
}
|
|
80
|
+
set setFilter(config) {
|
|
81
|
+
this._initFilterWithConfig(config);
|
|
82
|
+
}
|
|
83
|
+
get hasKeyword() {
|
|
84
|
+
return this._filterItems.hasKeyword;
|
|
85
|
+
}
|
|
86
|
+
get config() {
|
|
87
|
+
return this._config;
|
|
88
|
+
}
|
|
89
|
+
get filterParams() {
|
|
90
|
+
return this._filterItems.values();
|
|
91
|
+
}
|
|
92
|
+
get filterParamsQuery() {
|
|
93
|
+
return this._filterItems.valuesAsQuery();
|
|
94
|
+
}
|
|
95
|
+
get items() {
|
|
96
|
+
return this._filterItems.items;
|
|
97
|
+
}
|
|
98
|
+
get visibleItems() {
|
|
99
|
+
return this._filterItems.visibleItems;
|
|
100
|
+
}
|
|
101
|
+
get keywordItem() {
|
|
102
|
+
return this._filterItems.keywordItem;
|
|
103
|
+
}
|
|
104
|
+
get itemsReady$() {
|
|
105
|
+
return this._filterItems.ready$;
|
|
106
|
+
}
|
|
107
|
+
get hasFilterChips$() {
|
|
108
|
+
return this._hasFilterChips$.asObservable();
|
|
109
|
+
}
|
|
110
|
+
get hasVisibleItemOrSorting() {
|
|
111
|
+
return this.visibleItems.length > 0 || !!this._filterItems.sortByItem;
|
|
112
|
+
}
|
|
113
|
+
get filtersBtnVisible$() {
|
|
114
|
+
return this._filtersBtnVisible$.asObservable();
|
|
115
|
+
}
|
|
116
|
+
get keywordVisible$() {
|
|
117
|
+
return this._keywordVisible$.asObservable();
|
|
118
|
+
}
|
|
119
|
+
get actionsVisible$() {
|
|
120
|
+
return this._actions.visible$;
|
|
121
|
+
}
|
|
122
|
+
get actions$() {
|
|
123
|
+
return this._actions.actions$;
|
|
124
|
+
}
|
|
125
|
+
get menuActions$() {
|
|
126
|
+
return this._actions.menuActions$;
|
|
127
|
+
}
|
|
128
|
+
set activeSavedFilter(savedFilter) {
|
|
129
|
+
this._externalParams.setActiveSavedFilter(savedFilter);
|
|
130
|
+
}
|
|
131
|
+
get activeSavedFilter() {
|
|
132
|
+
return this._savedFiltersController.activeFilter;
|
|
133
|
+
}
|
|
134
|
+
get savedFilters() {
|
|
135
|
+
return this._savedFiltersController.savedFilters;
|
|
136
|
+
}
|
|
137
|
+
ngOnInit() {
|
|
138
|
+
// Avoid ngChanges error
|
|
139
|
+
setTimeout(() => {
|
|
140
|
+
if (this.config.autofocus) {
|
|
141
|
+
this.focus();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
this._initAutoReload();
|
|
145
|
+
this._listenInputChanges();
|
|
146
|
+
this._listenInternalItemsChange();
|
|
147
|
+
this._initOverlay();
|
|
148
|
+
}
|
|
149
|
+
ngOnDestroy() {
|
|
150
|
+
this._destroyFilterDrawer();
|
|
151
|
+
this._destroy$.next();
|
|
152
|
+
this._destroy$.complete();
|
|
153
|
+
}
|
|
154
|
+
focus() {
|
|
155
|
+
this.keywordMatInput?.focus();
|
|
156
|
+
}
|
|
157
|
+
updateSort(sort) {
|
|
158
|
+
this._filterItems.updateSort(sort);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* Do update value of some field
|
|
163
|
+
*
|
|
164
|
+
* @param values - values for update
|
|
165
|
+
*
|
|
166
|
+
* To update text value just pass new text value
|
|
167
|
+
*
|
|
168
|
+
* public updateSelectValue(val) {
|
|
169
|
+
* this.filterEl.updateValues({ keyword: val });
|
|
170
|
+
* }
|
|
171
|
+
*
|
|
172
|
+
* To update select or observable select you could pass suitable value
|
|
173
|
+
*
|
|
174
|
+
* public updateSelectValue(val: number) {
|
|
175
|
+
* this.filterEl.updateValues({ simple_select: val }, { observable_select: val });
|
|
176
|
+
* }
|
|
177
|
+
*
|
|
178
|
+
* To update checkbox value just pass true/false as value
|
|
179
|
+
*
|
|
180
|
+
* public updateCheckox(val: boolean) {
|
|
181
|
+
* this.filterEl.updateValues({ checkbox: val });
|
|
182
|
+
* }
|
|
183
|
+
*
|
|
184
|
+
* To update range value just pass object with min&max object or just with one of targets
|
|
185
|
+
*
|
|
186
|
+
* Ex.: { min: 10, max 15 }, { min: 5 }, { max 5 }
|
|
187
|
+
*
|
|
188
|
+
* public updateRange(val) {
|
|
189
|
+
* this.filterEl.updateValues({ range: val });
|
|
190
|
+
* }
|
|
191
|
+
*
|
|
192
|
+
* To update autocomplete just pass object with name/value fields
|
|
193
|
+
*
|
|
194
|
+
* Ex.: { name: 'John Doe', value: 1 }
|
|
195
|
+
*
|
|
196
|
+
* public updateAutocomplete(val) {
|
|
197
|
+
* this.filterEl.updateValues({ autocomplete_user_id: val });
|
|
198
|
+
* }
|
|
199
|
+
*
|
|
200
|
+
* To update autocompletechips just pass:
|
|
201
|
+
*
|
|
202
|
+
* 1) object with name/value fields - will be appended to existing set of values
|
|
203
|
+
*
|
|
204
|
+
* { name: 'John Doe', value: 1 }
|
|
205
|
+
*
|
|
206
|
+
* 2) array of objects - will be appended to existing set of values
|
|
207
|
+
*
|
|
208
|
+
* [{ name: 'John Doe', value: 1 }, { name: 'Darya Filipova', value: 2 }]
|
|
209
|
+
*
|
|
210
|
+
* 3) null - clear existing set of values
|
|
211
|
+
*
|
|
212
|
+
* public updateAutocomplete(val) {
|
|
213
|
+
* this.filterEl.updateValues({ autocompletechips_user_id: val });
|
|
214
|
+
* }
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
updateValues(values) {
|
|
218
|
+
Object.keys(values).forEach((key) => {
|
|
219
|
+
const filterItem = this.items
|
|
220
|
+
.find((item) => item.name === key);
|
|
221
|
+
if (!filterItem) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
filterItem.model = values[key];
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
hide() {
|
|
228
|
+
this.changeVisibility(false);
|
|
229
|
+
}
|
|
230
|
+
show() {
|
|
231
|
+
this.changeVisibility(true);
|
|
232
|
+
}
|
|
233
|
+
changeVisibilityClick(value, event = null) {
|
|
234
|
+
if (event) {
|
|
235
|
+
event.stopPropagation();
|
|
236
|
+
}
|
|
237
|
+
this.changeVisibility(value);
|
|
238
|
+
}
|
|
239
|
+
get itemValues() {
|
|
240
|
+
return this.items
|
|
241
|
+
.map((item) => item.value);
|
|
242
|
+
}
|
|
243
|
+
get nonEmptyItemValues() {
|
|
244
|
+
return this.items
|
|
245
|
+
.filter((item) => item.value !== undefined)
|
|
246
|
+
.map((item) => item.value);
|
|
247
|
+
}
|
|
248
|
+
get hasItemValues() {
|
|
249
|
+
return this.items
|
|
250
|
+
.some((item) => item.value !== undefined);
|
|
251
|
+
}
|
|
252
|
+
getItemValue(name) {
|
|
253
|
+
const item = this.items
|
|
254
|
+
.find((_item) => _item.name === name);
|
|
255
|
+
return item?.value;
|
|
256
|
+
}
|
|
257
|
+
showItem(name) {
|
|
258
|
+
const item = this.getItem(name);
|
|
259
|
+
if (item) {
|
|
260
|
+
item.hide = false;
|
|
261
|
+
this._filterItems.updateItemsVisiblity();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
hideItem(name) {
|
|
265
|
+
const item = this.getItem(name);
|
|
266
|
+
if (!item) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
item.hide = true;
|
|
270
|
+
this._filterItems.updateItemsVisiblity();
|
|
271
|
+
}
|
|
272
|
+
clearItem(name) {
|
|
273
|
+
const item = this.getItem(name);
|
|
274
|
+
if (!item) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
item.clear();
|
|
278
|
+
}
|
|
279
|
+
updateItemConfig(name, params) {
|
|
280
|
+
const item = this.getItem(name);
|
|
281
|
+
if (!item) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
item.label = params.label ?? item.label;
|
|
285
|
+
item.chipLabel = params.chipLabel ?? item.chipLabel;
|
|
286
|
+
this._filterItems.updateItemsVisiblity();
|
|
287
|
+
}
|
|
288
|
+
getItemValueChange$(name) {
|
|
289
|
+
const item = this.items.find((i) => i.name === name);
|
|
290
|
+
if (item) {
|
|
291
|
+
return item.value$
|
|
292
|
+
.pipe(map(() => {
|
|
293
|
+
return item.model;
|
|
294
|
+
}));
|
|
295
|
+
}
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
changeVisibility(state) {
|
|
299
|
+
if (state === this.showFilterMenu) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (!state) {
|
|
303
|
+
this.closed.emit();
|
|
304
|
+
return this._destroyFilterDrawer();
|
|
305
|
+
}
|
|
306
|
+
if (!this.hasVisibleItemOrSorting) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
this._listenEscButton();
|
|
310
|
+
this.opened.emit();
|
|
311
|
+
this._filterOverlay.open();
|
|
312
|
+
}
|
|
313
|
+
init() {
|
|
314
|
+
const data = this._filterItems.valuesAsQuery();
|
|
315
|
+
this._sort = this._filterItems.getSort();
|
|
316
|
+
if (this.config.init) {
|
|
317
|
+
this.config.init(data, this._sort, this);
|
|
318
|
+
}
|
|
319
|
+
this._updateChipsVisibility();
|
|
320
|
+
this.items
|
|
321
|
+
.forEach((item) => {
|
|
322
|
+
item.init(item, this);
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
clear(event = null) {
|
|
326
|
+
if (event) {
|
|
327
|
+
event.stopPropagation();
|
|
328
|
+
}
|
|
329
|
+
this._filterItems.filtersClear();
|
|
330
|
+
if (this.config.clear) {
|
|
331
|
+
this.config.clear();
|
|
332
|
+
}
|
|
333
|
+
this.keyword = '';
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Close filter window and do change callback
|
|
337
|
+
*/
|
|
338
|
+
search(event) {
|
|
339
|
+
this.changeVisibilityClick(false, event);
|
|
340
|
+
}
|
|
341
|
+
reload(event = null) {
|
|
342
|
+
if (event) {
|
|
343
|
+
event.preventDefault();
|
|
344
|
+
event.stopPropagation();
|
|
345
|
+
}
|
|
346
|
+
const data = this._filterItems.valuesAsQuery();
|
|
347
|
+
const el = this.reloadEl?.nativeElement;
|
|
348
|
+
if (el) {
|
|
349
|
+
el.style.transition = 'all 0.75s 0.0s';
|
|
350
|
+
el.style.transform = 'rotate(360deg)';
|
|
351
|
+
setTimeout(() => {
|
|
352
|
+
el.style.transition = null;
|
|
353
|
+
el.style.transform = null;
|
|
354
|
+
}, 1000);
|
|
355
|
+
}
|
|
356
|
+
if (this.config.reload) {
|
|
357
|
+
this.config.reload(data, this._filterItems.getSort());
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
getItem(name) {
|
|
361
|
+
return this.items
|
|
362
|
+
.find((item) => item.name === name);
|
|
363
|
+
}
|
|
364
|
+
fetchQueryParams() {
|
|
365
|
+
this._externalParams.fetchQueryParams();
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Call change callback and apply new filter values
|
|
369
|
+
*/
|
|
370
|
+
change() {
|
|
371
|
+
const data = this._filterItems.valuesAsQuery();
|
|
372
|
+
const sort = this._filterItems.getSort();
|
|
373
|
+
const sortingChanged = ((!sort || !this._sort) && sort !== this._sort)
|
|
374
|
+
|| (sort && this._sort && !objectsAreEquals(this._sort, sort));
|
|
375
|
+
if (sortingChanged) {
|
|
376
|
+
this._sort = sort;
|
|
377
|
+
if (this.config.sortChange) {
|
|
378
|
+
this.config.sortChange(data, sort);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
if (this.config.change) {
|
|
382
|
+
this.config.change(data, sort);
|
|
383
|
+
}
|
|
384
|
+
this._updateChipsVisibility();
|
|
385
|
+
// visibility for actions can depend on filters state
|
|
386
|
+
this._actions.updateActionsVisibility();
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Update filter actions config
|
|
390
|
+
*
|
|
391
|
+
* @param actions
|
|
392
|
+
*/
|
|
393
|
+
updateActions(actions) {
|
|
394
|
+
this._actions.initActions(actions);
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Show "Filters" button
|
|
398
|
+
*/
|
|
399
|
+
showFiltersBtn() {
|
|
400
|
+
this._filtersBtnVisible$.next(true);
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Hide "Filters" button
|
|
404
|
+
*/
|
|
405
|
+
hideFiltersBtn() {
|
|
406
|
+
this._filtersBtnVisible$.next(false);
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Show "Keyword" field if it present
|
|
410
|
+
*/
|
|
411
|
+
showKeywordField() {
|
|
412
|
+
this._keywordVisible$.next(true);
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Hide "Keyword" field if it present
|
|
416
|
+
*/
|
|
417
|
+
hideKeywordField() {
|
|
418
|
+
this._keywordVisible$.next(false);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Go through actions and check show() callback and update visible actions
|
|
422
|
+
*/
|
|
423
|
+
updateActionsVisibility() {
|
|
424
|
+
this._actions.updateActionsVisibility();
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Go through actions and check disabled() callback and update disabled state
|
|
428
|
+
*/
|
|
429
|
+
updateDisabledState() {
|
|
430
|
+
this._actions.updateDisabledState();
|
|
431
|
+
}
|
|
432
|
+
setItems(items) {
|
|
433
|
+
this._filterItems.destroyItems();
|
|
434
|
+
this.config.items = items;
|
|
435
|
+
this._filterItems.setConfig(this._config);
|
|
436
|
+
this._externalParams.initItems();
|
|
437
|
+
this._syncSearchInputWithKeyword();
|
|
438
|
+
}
|
|
439
|
+
keywordChange(keyword) {
|
|
440
|
+
this._keyword$.next(keyword);
|
|
441
|
+
}
|
|
442
|
+
updateSortings(items) {
|
|
443
|
+
this._filterItems.updateSortingItemsValues(items);
|
|
444
|
+
}
|
|
445
|
+
_initFilterWithConfig(config) {
|
|
446
|
+
if (this.config) {
|
|
447
|
+
this._filterItems.destroyItems();
|
|
448
|
+
}
|
|
449
|
+
config = {
|
|
450
|
+
...(this._defaultConfig || {}),
|
|
451
|
+
...config,
|
|
452
|
+
};
|
|
453
|
+
this._config = new FsFilterConfig(config);
|
|
454
|
+
this._actions.setConfig(this._config);
|
|
455
|
+
this._filterItems.setConfig(this._config);
|
|
456
|
+
this._externalParams.setConfig(this._config);
|
|
457
|
+
this._syncSearchInputWithKeyword();
|
|
458
|
+
if (this.config.reloadWhenConfigChanged) {
|
|
459
|
+
this.change();
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
_destroyFilterDrawer() {
|
|
463
|
+
this._filterOverlay.close();
|
|
464
|
+
}
|
|
465
|
+
_updateWindowWidth() {
|
|
466
|
+
this.windowDesktop = window.innerWidth > 1200;
|
|
467
|
+
}
|
|
468
|
+
_listenEscButton() {
|
|
469
|
+
this._zone.runOutsideAngular(() => {
|
|
470
|
+
fromEvent(window, 'keyup')
|
|
471
|
+
.pipe(filter((event) => event.code === 'Escape'), takeUntil(this.closed), takeUntil(this._destroy$))
|
|
472
|
+
.subscribe(() => {
|
|
473
|
+
this._zone.run(() => {
|
|
474
|
+
this.changeVisibility(false);
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
_listenWindowResize() {
|
|
480
|
+
this._zone.runOutsideAngular(() => {
|
|
481
|
+
fromEvent(window, 'resize')
|
|
482
|
+
.pipe(debounceTime(100), takeUntil(this._destroy$))
|
|
483
|
+
.subscribe(() => {
|
|
484
|
+
this._zone.run(() => {
|
|
485
|
+
this._updateWindowWidth();
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
_initAutoReload() {
|
|
491
|
+
if (this.config.autoReload) {
|
|
492
|
+
interval(this.config.autoReload.seconds * 1000)
|
|
493
|
+
.pipe(filter(() => this.autoReload), takeUntil(this._destroy$))
|
|
494
|
+
.subscribe(() => {
|
|
495
|
+
this.reload(null);
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
_listenInputChanges() {
|
|
500
|
+
this._keyword$
|
|
501
|
+
.pipe(debounceTime(200), distinctUntilChanged(), takeUntil(this._destroy$))
|
|
502
|
+
.subscribe((value) => {
|
|
503
|
+
const keywordItem = this._filterItems.keywordItem;
|
|
504
|
+
keywordItem.model = value;
|
|
505
|
+
this.change();
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
_syncSearchInputWithKeyword() {
|
|
509
|
+
const keywordItem = this._filterItems.keywordItem;
|
|
510
|
+
if (keywordItem) {
|
|
511
|
+
this.keyword = keywordItem.model;
|
|
512
|
+
this.searchPlaceholder = keywordItem.label || 'Search';
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
_listenInternalItemsChange() {
|
|
516
|
+
this._filterItems
|
|
517
|
+
.itemsChange$
|
|
518
|
+
.pipe(takeUntil(this._destroy$))
|
|
519
|
+
.subscribe(() => {
|
|
520
|
+
this.change();
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
_initOverlay() {
|
|
524
|
+
this._filterOverlay.setClearFn(this.clear.bind(this));
|
|
525
|
+
this._filterOverlay.setDoneFn(this.hide.bind(this));
|
|
526
|
+
}
|
|
527
|
+
// We may need some time to recieve external params and after that ready can be emitted
|
|
528
|
+
_listenWhenFilterReady() {
|
|
529
|
+
combineLatest([
|
|
530
|
+
this._externalParams.pending$,
|
|
531
|
+
this.itemsReady$,
|
|
532
|
+
])
|
|
533
|
+
.pipe(filter(([pendingParams, itemsReady]) => !pendingParams && itemsReady), takeUntil(this._destroy$))
|
|
534
|
+
.subscribe(() => {
|
|
535
|
+
this.init();
|
|
536
|
+
this._syncSearchInputWithKeyword();
|
|
537
|
+
this.ready.emit();
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
_updateChipsVisibility() {
|
|
541
|
+
const hasFilterChips = this._filterItems.items
|
|
542
|
+
.some((item) => {
|
|
543
|
+
return item.isChipVisible;
|
|
544
|
+
});
|
|
545
|
+
this._hasFilterChips$.next(hasFilterChips);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
FilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilterComponent, deps: [{ token: FS_FILTER_CONFIG, optional: true }, { token: i1.FsFilterOverlayService }, { token: i0.NgZone }, { token: i2.ExternalParamsController }, { token: i3.FsFilterItemsStore }, { token: i4.ActionsController }, { token: i5.SavedFiltersController }, { token: i2.ExternalParamsController }], target: i0.ɵɵFactoryTarget.Component });
|
|
549
|
+
FilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FilterComponent, selector: "fs-filter", inputs: { setConfig: ["config", "setConfig"], setFilter: ["filter", "setFilter"], showSortBy: "showSortBy", showFilterInput: "showFilterInput" }, outputs: { closed: "closed", opened: "opened", ready: "ready" }, host: { properties: { "class.filters-open": "this.showFilterMenu", "class.window-desktop": "this.windowDesktop", "class.fs-filter": "this.fsFilterClass", "class.has-keyword": "this.hasKeyword" } }, providers: [
|
|
550
|
+
FsFilterOverlayService,
|
|
551
|
+
ExternalParamsController,
|
|
552
|
+
PersistanceParamsController,
|
|
553
|
+
QueryParamsController,
|
|
554
|
+
FocusControllerService,
|
|
555
|
+
FsFilterItemsStore,
|
|
556
|
+
SavedFiltersController,
|
|
557
|
+
ActionsController,
|
|
558
|
+
], queries: [{ propertyName: "statusBar", first: true, predicate: FilterStatusBarDirective, descendants: true }], viewQueries: [{ propertyName: "keywordMatInput", first: true, predicate: ["keywordMatInput"], descendants: true, read: MatInput }, { propertyName: "reloadEl", first: true, predicate: ["reloadEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"filter-container\">\n <div class=\"filter-inner-container\">\n <ng-container *ngIf=\"!hasKeyword; else filterKeyword\">\n <div>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n\n <ng-container *ngIf=\"hasKeyword\">\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #filterStatusBarChips>\n <ng-container *ngIf=\"statusBar\">\n <div class=\"filter-status-container\" [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div class=\"filter-status\" #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"config.chips && hasFilterChips$ | async\">\n <fs-filter-chips\n class=\"filter-chips\"\n [filters]=\"items\">\n </fs-filter-chips>\n </ng-container>\n</ng-template>\n\n<ng-template #filterKeyword>\n <div class=\"filter-keyword\">\n <ng-container *ngIf=\"(keywordVisible$ | async) && !keywordItem?.hide \">\n <mat-form-field\n [floatLabel]=\"'never'\"\n class=\"form-field-padless\"\n [ngClass]=\"search\"\n appearance=\"outline\">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n <input\n #keywordMatInput\n matInput\n [(ngModel)]=\"keyword\"\n (ngModelChange)=\"keywordChange($event)\"\n name=\"filter-input\"\n [fsClear]=\"true\"\n [placeholder]=\"searchPlaceholder\">\n </mat-form-field>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #filterActions>\n <div class=\"filter-actions\">\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 #filterToolbar>\n <div class=\"filter-toobar\">\n <ng-container *ngIf=\"filtersBtnVisible$ | async\">\n <ng-container *ngIf=\"hasVisibleItemOrSorting\">\n <a\n mat-button\n class=\"filters-button\"\n [ngClass]=\"{\n 'mat-raised-button': config.button.style === 'raised' && config.button.label,\n 'mat-flat-button': config.button.style === 'flat' && config.button.label,\n 'mat-stroked-button': config.button.style === 'stroked' && config.button.label,\n 'mat-button': config.button.style === 'basic' && config.button.label,\n 'mat-icon-button': config.button.style === 'icon' || !config.button.label\n }\"\n (click)=\"changeVisibilityClick(!showFilterMenu, $event)\"\n [color]=\"config.button.color\">\n <mat-icon *ngIf=\"config.button.icon\">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </a>\n </ng-container>\n </ng-container> \n <ng-container *ngIf=\"config.reload\">\n <a\n mat-icon-button\n (click)=\"reload($event)\"\n class=\"reload\">\n <mat-icon #reloadEl>refresh</mat-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"config.autoReload\">\n <mat-slide-toggle \n name=\"autoReload\" \n class=\"auto-reload\"\n [(ngModel)]=\"autoReload\">\n Auto refresh\n </mat-slide-toggle>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{margin-bottom:20px;display:block}:host.has-keyword .filter-status-container.has-status{margin-top:4px}:host:not(.has-keyword) .filter-status-container:not(.has-status)+fs-filter-chips{margin-top:0}:host:not(.has-keyword) .filter-inner-container{display:flex}:host:not(.has-keyword) .filter-toobar{justify-content:flex-end}.filter-status-container{flex-grow:1;display:flex;justify-content:center;flex-direction:column;align-self:flex-end}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis;line-height:17px}.filter-container{width:100%}.filter-inner-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:center}.filter-inner-container .filter-keyword{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0}.filter-inner-container .filter-keyword mat-form-field{max-width:100%;min-width:100px;margin-right:6px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-wrapper{margin-bottom:0}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix .mat-icon{font-size:22px;color:#626262}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-infix{width:250px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix,.filter-inner-container .filter-keyword mat-form-field .mat-form-field-suffix{top:.45em}.filter-inner-container .filter-keyword .mat-form-field-suffix{display:flex}.filter-inner-container .filter-keyword .mat-form-field-suffix .mat-icon-button{height:24px;width:24px}.filter-actions{display:flex;align-items:center}.filter-toobar{flex:1;white-space:nowrap;display:flex;align-items:center}.filter-toobar .reload{margin-left:-6px}.results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}fs-filter-chips{margin-top:4px;display:block}@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){html.fs-filter-open body{margin-right:350px}.fs-filter-backdrop{display:none}}html.fs-filter-open{scrollbar-width:none}:host ::ng-deep .auto-reload.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(12px,0,0)}:host ::ng-deep .auto-reload:not(.mat-checked) .mat-slide-toggle-content{color:#ccc}:host ::ng-deep .auto-reload .mat-slide-toggle-thumb,:host ::ng-deep .auto-reload .mat-slide-toggle-thumb-container{height:15px;width:15px}:host ::ng-deep .auto-reload .mat-slide-toggle-content{font-size:90%}:host ::ng-deep .auto-reload .mat-slide-toggle-bar{width:26px;height:10px;border-radius:10px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i7.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i10.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i11.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i12.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i13.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i13.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i14.FsClearComponent, selector: "[fsClear]", inputs: ["ngModel", "fsClear"], outputs: ["ngModelChange", "cleared"] }, { kind: "component", type: i15.FsFilterChipsComponent, selector: "fs-filter-chips", inputs: ["filters"] }, { kind: "component", type: i16.FsFilterActionsComponent, selector: "fs-filter-actions", inputs: ["kebabActions", "actions"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FilterComponent, decorators: [{
|
|
560
|
+
type: Component,
|
|
561
|
+
args: [{ selector: 'fs-filter', providers: [
|
|
562
|
+
FsFilterOverlayService,
|
|
563
|
+
ExternalParamsController,
|
|
564
|
+
PersistanceParamsController,
|
|
565
|
+
QueryParamsController,
|
|
566
|
+
FocusControllerService,
|
|
567
|
+
FsFilterItemsStore,
|
|
568
|
+
SavedFiltersController,
|
|
569
|
+
ActionsController,
|
|
570
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"filter-container\">\n <div class=\"filter-inner-container\">\n <ng-container *ngIf=\"!hasKeyword; else filterKeyword\">\n <div>\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </div>\n </ng-container>\n\n <ng-container [ngTemplateOutlet]=\"filterToolbar\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"filterActions\"></ng-container>\n </div>\n\n <ng-container *ngIf=\"hasKeyword\">\n <ng-container *ngTemplateOutlet=\"filterStatusBarChips\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #filterStatusBarChips>\n <ng-container *ngIf=\"statusBar\">\n <div class=\"filter-status-container\" [ngClass]=\"{ 'has-status': !!filterStatus.textContent }\">\n <div class=\"filter-status\" #filterStatus>\n <ng-container *ngTemplateOutlet=\"statusBar.templateRef\"></ng-container>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"config.chips && hasFilterChips$ | async\">\n <fs-filter-chips\n class=\"filter-chips\"\n [filters]=\"items\">\n </fs-filter-chips>\n </ng-container>\n</ng-template>\n\n<ng-template #filterKeyword>\n <div class=\"filter-keyword\">\n <ng-container *ngIf=\"(keywordVisible$ | async) && !keywordItem?.hide \">\n <mat-form-field\n [floatLabel]=\"'never'\"\n class=\"form-field-padless\"\n [ngClass]=\"search\"\n appearance=\"outline\">\n <span matPrefix>\n <mat-icon matPrefix>search</mat-icon>\n </span>\n <input\n #keywordMatInput\n matInput\n [(ngModel)]=\"keyword\"\n (ngModelChange)=\"keywordChange($event)\"\n name=\"filter-input\"\n [fsClear]=\"true\"\n [placeholder]=\"searchPlaceholder\">\n </mat-form-field>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #filterActions>\n <div class=\"filter-actions\">\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 #filterToolbar>\n <div class=\"filter-toobar\">\n <ng-container *ngIf=\"filtersBtnVisible$ | async\">\n <ng-container *ngIf=\"hasVisibleItemOrSorting\">\n <a\n mat-button\n class=\"filters-button\"\n [ngClass]=\"{\n 'mat-raised-button': config.button.style === 'raised' && config.button.label,\n 'mat-flat-button': config.button.style === 'flat' && config.button.label,\n 'mat-stroked-button': config.button.style === 'stroked' && config.button.label,\n 'mat-button': config.button.style === 'basic' && config.button.label,\n 'mat-icon-button': config.button.style === 'icon' || !config.button.label\n }\"\n (click)=\"changeVisibilityClick(!showFilterMenu, $event)\"\n [color]=\"config.button.color\">\n <mat-icon *ngIf=\"config.button.icon\">{{config.button.icon}}</mat-icon>\n {{ config.button.label }}\n </a>\n </ng-container>\n </ng-container> \n <ng-container *ngIf=\"config.reload\">\n <a\n mat-icon-button\n (click)=\"reload($event)\"\n class=\"reload\">\n <mat-icon #reloadEl>refresh</mat-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"config.autoReload\">\n <mat-slide-toggle \n name=\"autoReload\" \n class=\"auto-reload\"\n [(ngModel)]=\"autoReload\">\n Auto refresh\n </mat-slide-toggle>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{margin-bottom:20px;display:block}:host.has-keyword .filter-status-container.has-status{margin-top:4px}:host:not(.has-keyword) .filter-status-container:not(.has-status)+fs-filter-chips{margin-top:0}:host:not(.has-keyword) .filter-inner-container{display:flex}:host:not(.has-keyword) .filter-toobar{justify-content:flex-end}.filter-status-container{flex-grow:1;display:flex;justify-content:center;flex-direction:column;align-self:flex-end}.filter-status-container .filter-status{overflow:hidden;text-overflow:ellipsis;line-height:17px}.filter-container{width:100%}.filter-inner-container{flex-direction:row;box-sizing:border-box;display:flex;position:relative;align-items:center}.filter-inner-container .filter-keyword{flex-direction:row;box-sizing:border-box;display:flex;align-items:center;min-width:0}.filter-inner-container .filter-keyword mat-form-field{max-width:100%;min-width:100px;margin-right:6px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-wrapper{margin-bottom:0}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix .mat-icon{font-size:22px;color:#626262}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-infix{width:250px}.filter-inner-container .filter-keyword mat-form-field .mat-form-field-prefix,.filter-inner-container .filter-keyword mat-form-field .mat-form-field-suffix{top:.45em}.filter-inner-container .filter-keyword .mat-form-field-suffix{display:flex}.filter-inner-container .filter-keyword .mat-form-field-suffix .mat-icon-button{height:24px;width:24px}.filter-actions{display:flex;align-items:center}.filter-toobar{flex:1;white-space:nowrap;display:flex;align-items:center}.filter-toobar .reload{margin-left:-6px}.results{min-height:90px;position:relative;overflow-x:auto;overflow-y:hidden}fs-filter-chips{margin-top:4px;display:block}@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){html.fs-filter-open body{margin-right:350px}.fs-filter-backdrop{display:none}}html.fs-filter-open{scrollbar-width:none}:host ::ng-deep .auto-reload.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(12px,0,0)}:host ::ng-deep .auto-reload:not(.mat-checked) .mat-slide-toggle-content{color:#ccc}:host ::ng-deep .auto-reload .mat-slide-toggle-thumb,:host ::ng-deep .auto-reload .mat-slide-toggle-thumb-container{height:15px;width:15px}:host ::ng-deep .auto-reload .mat-slide-toggle-content{font-size:90%}:host ::ng-deep .auto-reload .mat-slide-toggle-bar{width:26px;height:10px;border-radius:10px}\n"] }]
|
|
571
|
+
}], ctorParameters: function () { return [{ type: i17.FsFilterConfig, decorators: [{
|
|
572
|
+
type: Optional
|
|
573
|
+
}, {
|
|
574
|
+
type: Inject,
|
|
575
|
+
args: [FS_FILTER_CONFIG]
|
|
576
|
+
}] }, { type: i1.FsFilterOverlayService }, { type: i0.NgZone }, { type: i2.ExternalParamsController }, { type: i3.FsFilterItemsStore }, { type: i4.ActionsController }, { type: i5.SavedFiltersController }, { type: i2.ExternalParamsController }]; }, propDecorators: { setConfig: [{
|
|
577
|
+
type: Input,
|
|
578
|
+
args: ['config']
|
|
579
|
+
}], setFilter: [{
|
|
580
|
+
type: Input,
|
|
581
|
+
args: ['filter']
|
|
582
|
+
}], showSortBy: [{
|
|
583
|
+
type: Input
|
|
584
|
+
}], showFilterInput: [{
|
|
585
|
+
type: Input
|
|
586
|
+
}], closed: [{
|
|
587
|
+
type: Output
|
|
588
|
+
}], opened: [{
|
|
589
|
+
type: Output
|
|
590
|
+
}], ready: [{
|
|
591
|
+
type: Output
|
|
592
|
+
}], statusBar: [{
|
|
593
|
+
type: ContentChild,
|
|
594
|
+
args: [FilterStatusBarDirective]
|
|
595
|
+
}], keywordMatInput: [{
|
|
596
|
+
type: ViewChild,
|
|
597
|
+
args: ['keywordMatInput', { read: MatInput }]
|
|
598
|
+
}], reloadEl: [{
|
|
599
|
+
type: ViewChild,
|
|
600
|
+
args: ['reloadEl', { read: ElementRef }]
|
|
601
|
+
}], showFilterMenu: [{
|
|
602
|
+
type: HostBinding,
|
|
603
|
+
args: ['class.filters-open']
|
|
604
|
+
}], windowDesktop: [{
|
|
605
|
+
type: HostBinding,
|
|
606
|
+
args: ['class.window-desktop']
|
|
607
|
+
}], fsFilterClass: [{
|
|
608
|
+
type: HostBinding,
|
|
609
|
+
args: ['class.fs-filter']
|
|
610
|
+
}], hasKeyword: [{
|
|
611
|
+
type: HostBinding,
|
|
612
|
+
args: ['class.has-keyword']
|
|
613
|
+
}] } });
|
|
614
614
|
//# sourceMappingURL=data:application/json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gICAgIGZpbHRlcigoZXZlbnQ6IEtleWJvYXJkRXZlbnQpID0+IGV2ZW50LmNvZGUgPT09ICdFc2NhcGUnKSxcbiAgICAgICAgICB0YWtlVW50aWwodGhpcy5jbG9zZWQpLFxuICAgICAgICAgIHRha2VVbnRpbCh0aGlzLl9kZXN0cm95JCksXG4gICAgICAgIClcbiAgICAgICAgLnN1YnNjcmliZSgoKSA9PiB7XG4gICAgICAgICAgdGhpcy5fem9uZS5ydW4oKCkgPT4ge1xuICAgICAgICAgICAgdGhpcy5jaGFuZ2VWaXNpYmlsaXR5KGZhbHNlKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfSk7XG4gIH1cblxuICBwcml2YXRlIF9saXN0ZW5XaW5kb3dSZXNpemUoKSB7XG4gICAgdGhpcy5fem9uZS5ydW5PdXRzaWRlQW5ndWxhcigoKSA9PiB7XG4gICAgICBmcm9tRXZlbnQod2luZG93LCAncmVzaXplJylcbiAgICAgICAgLnBpcGUoXG4gICAgICAgICAgZGVib3VuY2VUaW1lKDEwMCksXG4gICAgICAgICAgdGFrZVVudGlsKHRoaXMuX2Rlc3Ryb3kkKSxcbiAgICAgICAgKVxuICAgICAgICAuc3Vic2NyaWJlKCgpID0+IHtcbiAgICAgICAgICB0aGlzLl96b25lLnJ1bigoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLl91cGRhdGVXaW5kb3dXaWR0aCgpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9KTtcbiAgfVxuXG4gIHByaXZhdGUgX2luaXRBdXRvUmVsb2FkKCkge1xuICAgIGlmKHRoaXMuY29uZmlnLmF1dG9SZWxvYWQpIHtcbiAgICAgIGludGVydmFsKHRoaXMuY29uZmlnLmF1dG9SZWxvYWQuc2Vjb25kcyAqIDEwMDApXG4gICAgICAgIC5waXBlKFxuICAgICAgICAgIGZpbHRlcigoKSA9PiB0aGlzLmF1dG9SZWxvYWQpLFxuICAgICAgICAgIHRha2VVbn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