@skyux/list-builder 5.7.2 → 6.0.0-beta.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/esm2020/index.mjs +78 -0
- package/esm2020/lib/modules/list/list-data-request.model.mjs +18 -0
- package/esm2020/lib/modules/list/list-data-response.model.mjs +9 -0
- package/esm2020/lib/modules/list/list-data.provider.mjs +9 -0
- package/esm2020/lib/modules/list/list-paging.component.mjs +13 -0
- package/esm2020/lib/modules/list/list-view.component.mjs +29 -0
- package/esm2020/lib/modules/list/list.component.mjs +305 -0
- package/esm2020/lib/modules/list/list.module.mjs +18 -0
- package/esm2020/lib/modules/list/state/filters/filters.orchestrator.mjs +16 -0
- package/esm2020/lib/modules/list/state/filters/update.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/items/items.orchestrator.mjs +53 -0
- package/esm2020/lib/modules/list/state/items/load.action.mjs +12 -0
- package/esm2020/lib/modules/list/state/items/set-items-selected.action.mjs +13 -0
- package/esm2020/lib/modules/list/state/items/set-loading.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/list-state-action.type.mjs +2 -0
- package/esm2020/lib/modules/list/state/list-state.model.mjs +24 -0
- package/esm2020/lib/modules/list/state/list-state.rxstate.mjs +80 -0
- package/esm2020/lib/modules/list/state/list-state.state-node.mjs +37 -0
- package/esm2020/lib/modules/list/state/paging/paging.model.mjs +14 -0
- package/esm2020/lib/modules/list/state/paging/paging.orchestrator.mjs +27 -0
- package/esm2020/lib/modules/list/state/paging/set-items-per-page.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/paging/set-max-pages.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/paging/set-page-number.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/search/search.model.mjs +32 -0
- package/esm2020/lib/modules/list/state/search/search.orchestrator.mjs +47 -0
- package/esm2020/lib/modules/list/state/search/set-field-selectors.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/search/set-functions.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/search/set-options.action.mjs +11 -0
- package/esm2020/lib/modules/list/state/search/set-search-text.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/selected/load.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/selected/selected.model.mjs +9 -0
- package/esm2020/lib/modules/list/state/selected/selected.orchestrator.mjs +56 -0
- package/esm2020/lib/modules/list/state/selected/set-item-selected.action.mjs +10 -0
- package/esm2020/lib/modules/list/state/selected/set-items-selected.action.mjs +11 -0
- package/esm2020/lib/modules/list/state/selected/set-loading.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/sort/label.model.mjs +25 -0
- package/esm2020/lib/modules/list/state/sort/set-available.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/sort/set-field-selectors.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/sort/set-global.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/sort/sort.model.mjs +27 -0
- package/esm2020/lib/modules/list/state/sort/sort.orchestrator.mjs +30 -0
- package/esm2020/lib/modules/list/state/toolbar/disable.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/toolbar/load.action.mjs +10 -0
- package/esm2020/lib/modules/list/state/toolbar/remove.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/toolbar/set-exists.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/toolbar/set-type.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/toolbar/show-multiselect-toolbar.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/toolbar/toolbar-item.model.mjs +16 -0
- package/esm2020/lib/modules/list/state/toolbar/toolbar.model.mjs +17 -0
- package/esm2020/lib/modules/list/state/toolbar/toolbar.orchestrator.mjs +80 -0
- package/esm2020/lib/modules/list/state/views/load.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/views/set-active.action.mjs +9 -0
- package/esm2020/lib/modules/list/state/views/view.model.mjs +10 -0
- package/esm2020/lib/modules/list/state/views/views.model.mjs +13 -0
- package/esm2020/lib/modules/list/state/views/views.orchestrator.mjs +21 -0
- package/esm2020/lib/modules/list-data-provider-in-memory/list-data-in-memory.provider.mjs +160 -0
- package/esm2020/lib/modules/list-filters/filter.model.mjs +18 -0
- package/esm2020/lib/modules/list-filters/list-filter-button.component.mjs +41 -0
- package/esm2020/lib/modules/list-filters/list-filter-inline-item-renderer.component.mjs +34 -0
- package/esm2020/lib/modules/list-filters/list-filter-inline-item.component.mjs +45 -0
- package/esm2020/lib/modules/list-filters/list-filter-inline.component.mjs +71 -0
- package/esm2020/lib/modules/list-filters/list-filter-inline.model.mjs +21 -0
- package/esm2020/lib/modules/list-filters/list-filter-summary.component.mjs +57 -0
- package/esm2020/lib/modules/list-filters/list-filters.module.mjs +41 -0
- package/esm2020/lib/modules/list-paging/list-paging.component.mjs +84 -0
- package/esm2020/lib/modules/list-paging/list-paging.module.mjs +19 -0
- package/esm2020/lib/modules/list-toolbar/list-multiselect-toolbar.component.mjs +148 -0
- package/esm2020/lib/modules/list-toolbar/list-secondary-actions/list-secondary-action.component.mjs +30 -0
- package/esm2020/lib/modules/list-toolbar/list-secondary-actions/list-secondary-action.mjs +2 -0
- package/esm2020/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions-host.component.mjs +45 -0
- package/esm2020/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.component.mjs +40 -0
- package/esm2020/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.module.mjs +46 -0
- package/esm2020/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.service.mjs +36 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar-item-renderer.component.mjs +30 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar-item.component.mjs +47 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar-search-actions.component.mjs +14 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar-sort.component.mjs +25 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar-view-actions.component.mjs +17 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar.component.mjs +354 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar.module.mjs +87 -0
- package/esm2020/lib/modules/list-toolbar/state/config/config.model.mjs +14 -0
- package/esm2020/lib/modules/list-toolbar/state/config/config.orchestrator.mjs +21 -0
- package/esm2020/lib/modules/list-toolbar/state/config/set-search-enabled.action.mjs +9 -0
- package/esm2020/lib/modules/list-toolbar/state/config/set-sort-selector-enabled.action.mjs +10 -0
- package/esm2020/lib/modules/list-toolbar/state/toolbar-state-action.type.mjs +2 -0
- package/esm2020/lib/modules/list-toolbar/state/toolbar-state.model.mjs +10 -0
- package/esm2020/lib/modules/list-toolbar/state/toolbar-state.rxstate.mjs +19 -0
- package/esm2020/lib/modules/list-toolbar/state/toolbar-state.state-node.mjs +23 -0
- package/esm2020/lib/modules/shared/sky-list-builder-resources.module.mjs +53 -0
- package/esm2020/skyux-list-builder.mjs +5 -0
- package/fesm2015/{skyux-list-builder.js → skyux-list-builder.mjs} +104 -150
- package/fesm2015/skyux-list-builder.mjs.map +1 -0
- package/fesm2020/skyux-list-builder.mjs +2667 -0
- package/fesm2020/skyux-list-builder.mjs.map +1 -0
- package/package.json +33 -17
- package/bundles/skyux-list-builder.umd.js +0 -3357
- package/esm2015/index.js +0 -78
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/modules/list/list-data-request.model.js +0 -18
- package/esm2015/lib/modules/list/list-data-request.model.js.map +0 -1
- package/esm2015/lib/modules/list/list-data-response.model.js +0 -9
- package/esm2015/lib/modules/list/list-data-response.model.js.map +0 -1
- package/esm2015/lib/modules/list/list-data.provider.js +0 -9
- package/esm2015/lib/modules/list/list-data.provider.js.map +0 -1
- package/esm2015/lib/modules/list/list-paging.component.js +0 -13
- package/esm2015/lib/modules/list/list-paging.component.js.map +0 -1
- package/esm2015/lib/modules/list/list-view.component.js +0 -29
- package/esm2015/lib/modules/list/list-view.component.js.map +0 -1
- package/esm2015/lib/modules/list/list.component.js +0 -305
- package/esm2015/lib/modules/list/list.component.js.map +0 -1
- package/esm2015/lib/modules/list/list.module.js +0 -18
- package/esm2015/lib/modules/list/list.module.js.map +0 -1
- package/esm2015/lib/modules/list/state/filters/filters.orchestrator.js +0 -16
- package/esm2015/lib/modules/list/state/filters/filters.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list/state/filters/update.action.js +0 -9
- package/esm2015/lib/modules/list/state/filters/update.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/items/items.orchestrator.js +0 -53
- package/esm2015/lib/modules/list/state/items/items.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list/state/items/load.action.js +0 -12
- package/esm2015/lib/modules/list/state/items/load.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/items/set-items-selected.action.js +0 -13
- package/esm2015/lib/modules/list/state/items/set-items-selected.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/items/set-loading.action.js +0 -9
- package/esm2015/lib/modules/list/state/items/set-loading.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/list-state-action.type.js +0 -2
- package/esm2015/lib/modules/list/state/list-state-action.type.js.map +0 -1
- package/esm2015/lib/modules/list/state/list-state.model.js +0 -24
- package/esm2015/lib/modules/list/state/list-state.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/list-state.rxstate.js +0 -80
- package/esm2015/lib/modules/list/state/list-state.rxstate.js.map +0 -1
- package/esm2015/lib/modules/list/state/list-state.state-node.js +0 -37
- package/esm2015/lib/modules/list/state/list-state.state-node.js.map +0 -1
- package/esm2015/lib/modules/list/state/paging/paging.model.js +0 -14
- package/esm2015/lib/modules/list/state/paging/paging.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/paging/paging.orchestrator.js +0 -27
- package/esm2015/lib/modules/list/state/paging/paging.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list/state/paging/set-items-per-page.action.js +0 -9
- package/esm2015/lib/modules/list/state/paging/set-items-per-page.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/paging/set-max-pages.action.js +0 -9
- package/esm2015/lib/modules/list/state/paging/set-max-pages.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/paging/set-page-number.action.js +0 -9
- package/esm2015/lib/modules/list/state/paging/set-page-number.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/search/search.model.js +0 -32
- package/esm2015/lib/modules/list/state/search/search.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/search/search.orchestrator.js +0 -47
- package/esm2015/lib/modules/list/state/search/search.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list/state/search/set-field-selectors.action.js +0 -9
- package/esm2015/lib/modules/list/state/search/set-field-selectors.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/search/set-functions.action.js +0 -9
- package/esm2015/lib/modules/list/state/search/set-functions.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/search/set-options.action.js +0 -11
- package/esm2015/lib/modules/list/state/search/set-options.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/search/set-search-text.action.js +0 -9
- package/esm2015/lib/modules/list/state/search/set-search-text.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/selected/load.action.js +0 -9
- package/esm2015/lib/modules/list/state/selected/load.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/selected/selected.model.js +0 -9
- package/esm2015/lib/modules/list/state/selected/selected.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/selected/selected.orchestrator.js +0 -56
- package/esm2015/lib/modules/list/state/selected/selected.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list/state/selected/set-item-selected.action.js +0 -10
- package/esm2015/lib/modules/list/state/selected/set-item-selected.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/selected/set-items-selected.action.js +0 -11
- package/esm2015/lib/modules/list/state/selected/set-items-selected.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/selected/set-loading.action.js +0 -9
- package/esm2015/lib/modules/list/state/selected/set-loading.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/sort/label.model.js +0 -25
- package/esm2015/lib/modules/list/state/sort/label.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/sort/set-available.action.js +0 -9
- package/esm2015/lib/modules/list/state/sort/set-available.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/sort/set-field-selectors.action.js +0 -9
- package/esm2015/lib/modules/list/state/sort/set-field-selectors.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/sort/set-global.action.js +0 -9
- package/esm2015/lib/modules/list/state/sort/set-global.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/sort/sort.model.js +0 -27
- package/esm2015/lib/modules/list/state/sort/sort.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/sort/sort.orchestrator.js +0 -30
- package/esm2015/lib/modules/list/state/sort/sort.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/disable.action.js +0 -9
- package/esm2015/lib/modules/list/state/toolbar/disable.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/load.action.js +0 -10
- package/esm2015/lib/modules/list/state/toolbar/load.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/remove.action.js +0 -9
- package/esm2015/lib/modules/list/state/toolbar/remove.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/set-exists.action.js +0 -9
- package/esm2015/lib/modules/list/state/toolbar/set-exists.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/set-type.action.js +0 -9
- package/esm2015/lib/modules/list/state/toolbar/set-type.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/show-multiselect-toolbar.action.js +0 -9
- package/esm2015/lib/modules/list/state/toolbar/show-multiselect-toolbar.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/toolbar-item.model.js +0 -16
- package/esm2015/lib/modules/list/state/toolbar/toolbar-item.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/toolbar.model.js +0 -17
- package/esm2015/lib/modules/list/state/toolbar/toolbar.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/toolbar/toolbar.orchestrator.js +0 -80
- package/esm2015/lib/modules/list/state/toolbar/toolbar.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list/state/views/load.action.js +0 -9
- package/esm2015/lib/modules/list/state/views/load.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/views/set-active.action.js +0 -9
- package/esm2015/lib/modules/list/state/views/set-active.action.js.map +0 -1
- package/esm2015/lib/modules/list/state/views/view.model.js +0 -10
- package/esm2015/lib/modules/list/state/views/view.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/views/views.model.js +0 -13
- package/esm2015/lib/modules/list/state/views/views.model.js.map +0 -1
- package/esm2015/lib/modules/list/state/views/views.orchestrator.js +0 -21
- package/esm2015/lib/modules/list/state/views/views.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list-data-provider-in-memory/list-data-in-memory.provider.js +0 -160
- package/esm2015/lib/modules/list-data-provider-in-memory/list-data-in-memory.provider.js.map +0 -1
- package/esm2015/lib/modules/list-filters/filter.model.js +0 -18
- package/esm2015/lib/modules/list-filters/filter.model.js.map +0 -1
- package/esm2015/lib/modules/list-filters/list-filter-button.component.js +0 -44
- package/esm2015/lib/modules/list-filters/list-filter-button.component.js.map +0 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline-item-renderer.component.js +0 -34
- package/esm2015/lib/modules/list-filters/list-filter-inline-item-renderer.component.js.map +0 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline-item.component.js +0 -45
- package/esm2015/lib/modules/list-filters/list-filter-inline-item.component.js.map +0 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline.component.js +0 -74
- package/esm2015/lib/modules/list-filters/list-filter-inline.component.js.map +0 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline.model.js +0 -21
- package/esm2015/lib/modules/list-filters/list-filter-inline.model.js.map +0 -1
- package/esm2015/lib/modules/list-filters/list-filter-summary.component.js +0 -60
- package/esm2015/lib/modules/list-filters/list-filter-summary.component.js.map +0 -1
- package/esm2015/lib/modules/list-filters/list-filters.module.js +0 -41
- package/esm2015/lib/modules/list-filters/list-filters.module.js.map +0 -1
- package/esm2015/lib/modules/list-paging/list-paging.component.js +0 -89
- package/esm2015/lib/modules/list-paging/list-paging.component.js.map +0 -1
- package/esm2015/lib/modules/list-paging/list-paging.module.js +0 -19
- package/esm2015/lib/modules/list-paging/list-paging.module.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-multiselect-toolbar.component.js +0 -152
- package/esm2015/lib/modules/list-toolbar/list-multiselect-toolbar.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-action.component.js +0 -33
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-action.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-action.js +0 -2
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-action.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions-host.component.js +0 -50
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions-host.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.component.js +0 -45
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.module.js +0 -46
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.module.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.service.js +0 -36
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.service.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item-renderer.component.js +0 -30
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item-renderer.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item.component.js +0 -47
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-search-actions.component.js +0 -19
- package/esm2015/lib/modules/list-toolbar/list-toolbar-search-actions.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-sort.component.js +0 -25
- package/esm2015/lib/modules/list-toolbar/list-toolbar-sort.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-view-actions.component.js +0 -21
- package/esm2015/lib/modules/list-toolbar/list-toolbar-view-actions.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar.component.js +0 -360
- package/esm2015/lib/modules/list-toolbar/list-toolbar.component.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar.module.js +0 -87
- package/esm2015/lib/modules/list-toolbar/list-toolbar.module.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/config/config.model.js +0 -14
- package/esm2015/lib/modules/list-toolbar/state/config/config.model.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/config/config.orchestrator.js +0 -21
- package/esm2015/lib/modules/list-toolbar/state/config/config.orchestrator.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/config/set-search-enabled.action.js +0 -9
- package/esm2015/lib/modules/list-toolbar/state/config/set-search-enabled.action.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/config/set-sort-selector-enabled.action.js +0 -10
- package/esm2015/lib/modules/list-toolbar/state/config/set-sort-selector-enabled.action.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state-action.type.js +0 -2
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state-action.type.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.model.js +0 -10
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.model.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.rxstate.js +0 -19
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.rxstate.js.map +0 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.state-node.js +0 -23
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.state-node.js.map +0 -1
- package/esm2015/lib/modules/shared/sky-list-builder-resources.module.js +0 -53
- package/esm2015/lib/modules/shared/sky-list-builder-resources.module.js.map +0 -1
- package/esm2015/skyux-list-builder.js +0 -5
- package/esm2015/skyux-list-builder.js.map +0 -1
- package/fesm2015/skyux-list-builder.js.map +0 -1
|
@@ -1,3357 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/list-builder-common'), require('rxjs'), require('rxjs/operators'), require('@skyux/lists'), require('@skyux/i18n'), require('@skyux/indicators'), require('@skyux/popovers'), require('@skyux/forms'), require('@skyux/layout'), require('@skyux/lookup')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/list-builder', ['exports', '@angular/common', '@angular/core', '@skyux/list-builder-common', 'rxjs', 'rxjs/operators', '@skyux/lists', '@skyux/i18n', '@skyux/indicators', '@skyux/popovers', '@skyux/forms', '@skyux/layout', '@skyux/lookup'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["list-builder"] = {}), global.ng.common, global.ng.core, global.listBuilderCommon, global.rxjs, global.rxjs.operators, global.i3, global.i5, global.i3$1, global.i2, global.i5$1, global.i3$2, global.i8));
|
|
5
|
-
})(this, (function (exports, i4, i0, listBuilderCommon, rxjs, operators, i3, i5, i3$1, i2, i5$1, i3$2, i8) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
26
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
28
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
29
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
30
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
-
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
32
|
-
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
33
|
-
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
34
|
-
|
|
35
|
-
var ListDataRequestModel = /** @class */ (function () {
|
|
36
|
-
function ListDataRequestModel(data) {
|
|
37
|
-
/**
|
|
38
|
-
* Indicates whether to disable the search bar and filter button.
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
this.isToolbarDisabled = false;
|
|
42
|
-
if (data !== undefined) {
|
|
43
|
-
this.filters = data.filters;
|
|
44
|
-
this.pageSize = data.pageSize;
|
|
45
|
-
this.pageNumber = data.pageNumber;
|
|
46
|
-
this.search = data.search;
|
|
47
|
-
this.sort = data.sort;
|
|
48
|
-
this.isToolbarDisabled = data.isToolbarDisabled;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return ListDataRequestModel;
|
|
52
|
-
}());
|
|
53
|
-
|
|
54
|
-
var ListDataResponseModel = /** @class */ (function () {
|
|
55
|
-
function ListDataResponseModel(data) {
|
|
56
|
-
if (data !== undefined) {
|
|
57
|
-
this.count = data.count;
|
|
58
|
-
this.items = data.items;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return ListDataResponseModel;
|
|
62
|
-
}());
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
var ListDataProvider = /** @class */ (function () {
|
|
68
|
-
function ListDataProvider(data) {
|
|
69
|
-
this.data = data;
|
|
70
|
-
}
|
|
71
|
-
return ListDataProvider;
|
|
72
|
-
}());
|
|
73
|
-
|
|
74
|
-
/*! *****************************************************************************
|
|
75
|
-
Copyright (c) Microsoft Corporation.
|
|
76
|
-
|
|
77
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
78
|
-
purpose with or without fee is hereby granted.
|
|
79
|
-
|
|
80
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
81
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
82
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
83
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
84
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
85
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
86
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
87
|
-
***************************************************************************** */
|
|
88
|
-
/* global Reflect, Promise */
|
|
89
|
-
var extendStatics = function (d, b) {
|
|
90
|
-
extendStatics = Object.setPrototypeOf ||
|
|
91
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
92
|
-
function (d, b) { for (var p in b)
|
|
93
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
94
|
-
d[p] = b[p]; };
|
|
95
|
-
return extendStatics(d, b);
|
|
96
|
-
};
|
|
97
|
-
function __extends(d, b) {
|
|
98
|
-
if (typeof b !== "function" && b !== null)
|
|
99
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
100
|
-
extendStatics(d, b);
|
|
101
|
-
function __() { this.constructor = d; }
|
|
102
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
103
|
-
}
|
|
104
|
-
var __assign = function () {
|
|
105
|
-
__assign = Object.assign || function __assign(t) {
|
|
106
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
107
|
-
s = arguments[i];
|
|
108
|
-
for (var p in s)
|
|
109
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
110
|
-
t[p] = s[p];
|
|
111
|
-
}
|
|
112
|
-
return t;
|
|
113
|
-
};
|
|
114
|
-
return __assign.apply(this, arguments);
|
|
115
|
-
};
|
|
116
|
-
function __rest(s, e) {
|
|
117
|
-
var t = {};
|
|
118
|
-
for (var p in s)
|
|
119
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
120
|
-
t[p] = s[p];
|
|
121
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
122
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
123
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
124
|
-
t[p[i]] = s[p[i]];
|
|
125
|
-
}
|
|
126
|
-
return t;
|
|
127
|
-
}
|
|
128
|
-
function __decorate(decorators, target, key, desc) {
|
|
129
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
130
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
131
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
132
|
-
else
|
|
133
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
134
|
-
if (d = decorators[i])
|
|
135
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
136
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
137
|
-
}
|
|
138
|
-
function __param(paramIndex, decorator) {
|
|
139
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
140
|
-
}
|
|
141
|
-
function __metadata(metadataKey, metadataValue) {
|
|
142
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
143
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
144
|
-
}
|
|
145
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
146
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
147
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
148
|
-
function fulfilled(value) { try {
|
|
149
|
-
step(generator.next(value));
|
|
150
|
-
}
|
|
151
|
-
catch (e) {
|
|
152
|
-
reject(e);
|
|
153
|
-
} }
|
|
154
|
-
function rejected(value) { try {
|
|
155
|
-
step(generator["throw"](value));
|
|
156
|
-
}
|
|
157
|
-
catch (e) {
|
|
158
|
-
reject(e);
|
|
159
|
-
} }
|
|
160
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
161
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
function __generator(thisArg, body) {
|
|
165
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
166
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
167
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
168
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
169
|
-
function step(op) {
|
|
170
|
-
if (f)
|
|
171
|
-
throw new TypeError("Generator is already executing.");
|
|
172
|
-
while (_)
|
|
173
|
-
try {
|
|
174
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
175
|
-
return t;
|
|
176
|
-
if (y = 0, t)
|
|
177
|
-
op = [op[0] & 2, t.value];
|
|
178
|
-
switch (op[0]) {
|
|
179
|
-
case 0:
|
|
180
|
-
case 1:
|
|
181
|
-
t = op;
|
|
182
|
-
break;
|
|
183
|
-
case 4:
|
|
184
|
-
_.label++;
|
|
185
|
-
return { value: op[1], done: false };
|
|
186
|
-
case 5:
|
|
187
|
-
_.label++;
|
|
188
|
-
y = op[1];
|
|
189
|
-
op = [0];
|
|
190
|
-
continue;
|
|
191
|
-
case 7:
|
|
192
|
-
op = _.ops.pop();
|
|
193
|
-
_.trys.pop();
|
|
194
|
-
continue;
|
|
195
|
-
default:
|
|
196
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
197
|
-
_ = 0;
|
|
198
|
-
continue;
|
|
199
|
-
}
|
|
200
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
201
|
-
_.label = op[1];
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
205
|
-
_.label = t[1];
|
|
206
|
-
t = op;
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
if (t && _.label < t[2]) {
|
|
210
|
-
_.label = t[2];
|
|
211
|
-
_.ops.push(op);
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
if (t[2])
|
|
215
|
-
_.ops.pop();
|
|
216
|
-
_.trys.pop();
|
|
217
|
-
continue;
|
|
218
|
-
}
|
|
219
|
-
op = body.call(thisArg, _);
|
|
220
|
-
}
|
|
221
|
-
catch (e) {
|
|
222
|
-
op = [6, e];
|
|
223
|
-
y = 0;
|
|
224
|
-
}
|
|
225
|
-
finally {
|
|
226
|
-
f = t = 0;
|
|
227
|
-
}
|
|
228
|
-
if (op[0] & 5)
|
|
229
|
-
throw op[1];
|
|
230
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
234
|
-
if (k2 === undefined)
|
|
235
|
-
k2 = k;
|
|
236
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
237
|
-
}) : (function (o, m, k, k2) {
|
|
238
|
-
if (k2 === undefined)
|
|
239
|
-
k2 = k;
|
|
240
|
-
o[k2] = m[k];
|
|
241
|
-
});
|
|
242
|
-
function __exportStar(m, o) {
|
|
243
|
-
for (var p in m)
|
|
244
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
245
|
-
__createBinding(o, m, p);
|
|
246
|
-
}
|
|
247
|
-
function __values(o) {
|
|
248
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
249
|
-
if (m)
|
|
250
|
-
return m.call(o);
|
|
251
|
-
if (o && typeof o.length === "number")
|
|
252
|
-
return {
|
|
253
|
-
next: function () {
|
|
254
|
-
if (o && i >= o.length)
|
|
255
|
-
o = void 0;
|
|
256
|
-
return { value: o && o[i++], done: !o };
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
260
|
-
}
|
|
261
|
-
function __read(o, n) {
|
|
262
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
263
|
-
if (!m)
|
|
264
|
-
return o;
|
|
265
|
-
var i = m.call(o), r, ar = [], e;
|
|
266
|
-
try {
|
|
267
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
268
|
-
ar.push(r.value);
|
|
269
|
-
}
|
|
270
|
-
catch (error) {
|
|
271
|
-
e = { error: error };
|
|
272
|
-
}
|
|
273
|
-
finally {
|
|
274
|
-
try {
|
|
275
|
-
if (r && !r.done && (m = i["return"]))
|
|
276
|
-
m.call(i);
|
|
277
|
-
}
|
|
278
|
-
finally {
|
|
279
|
-
if (e)
|
|
280
|
-
throw e.error;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
return ar;
|
|
284
|
-
}
|
|
285
|
-
/** @deprecated */
|
|
286
|
-
function __spread() {
|
|
287
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
288
|
-
ar = ar.concat(__read(arguments[i]));
|
|
289
|
-
return ar;
|
|
290
|
-
}
|
|
291
|
-
/** @deprecated */
|
|
292
|
-
function __spreadArrays() {
|
|
293
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
294
|
-
s += arguments[i].length;
|
|
295
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
296
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
297
|
-
r[k] = a[j];
|
|
298
|
-
return r;
|
|
299
|
-
}
|
|
300
|
-
function __spreadArray(to, from, pack) {
|
|
301
|
-
if (pack || arguments.length === 2)
|
|
302
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
303
|
-
if (ar || !(i in from)) {
|
|
304
|
-
if (!ar)
|
|
305
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
306
|
-
ar[i] = from[i];
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
310
|
-
}
|
|
311
|
-
function __await(v) {
|
|
312
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
313
|
-
}
|
|
314
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
315
|
-
if (!Symbol.asyncIterator)
|
|
316
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
317
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
318
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
319
|
-
function verb(n) { if (g[n])
|
|
320
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
321
|
-
function resume(n, v) { try {
|
|
322
|
-
step(g[n](v));
|
|
323
|
-
}
|
|
324
|
-
catch (e) {
|
|
325
|
-
settle(q[0][3], e);
|
|
326
|
-
} }
|
|
327
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
328
|
-
function fulfill(value) { resume("next", value); }
|
|
329
|
-
function reject(value) { resume("throw", value); }
|
|
330
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
331
|
-
resume(q[0][0], q[0][1]); }
|
|
332
|
-
}
|
|
333
|
-
function __asyncDelegator(o) {
|
|
334
|
-
var i, p;
|
|
335
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
336
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
337
|
-
}
|
|
338
|
-
function __asyncValues(o) {
|
|
339
|
-
if (!Symbol.asyncIterator)
|
|
340
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
341
|
-
var m = o[Symbol.asyncIterator], i;
|
|
342
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
343
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
344
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
345
|
-
}
|
|
346
|
-
function __makeTemplateObject(cooked, raw) {
|
|
347
|
-
if (Object.defineProperty) {
|
|
348
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
349
|
-
}
|
|
350
|
-
else {
|
|
351
|
-
cooked.raw = raw;
|
|
352
|
-
}
|
|
353
|
-
return cooked;
|
|
354
|
-
}
|
|
355
|
-
;
|
|
356
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
357
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
358
|
-
}) : function (o, v) {
|
|
359
|
-
o["default"] = v;
|
|
360
|
-
};
|
|
361
|
-
function __importStar(mod) {
|
|
362
|
-
if (mod && mod.__esModule)
|
|
363
|
-
return mod;
|
|
364
|
-
var result = {};
|
|
365
|
-
if (mod != null)
|
|
366
|
-
for (var k in mod)
|
|
367
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
368
|
-
__createBinding(result, mod, k);
|
|
369
|
-
__setModuleDefault(result, mod);
|
|
370
|
-
return result;
|
|
371
|
-
}
|
|
372
|
-
function __importDefault(mod) {
|
|
373
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
374
|
-
}
|
|
375
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
376
|
-
if (kind === "a" && !f)
|
|
377
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
378
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
379
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
380
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
381
|
-
}
|
|
382
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
383
|
-
if (kind === "m")
|
|
384
|
-
throw new TypeError("Private method is not writable");
|
|
385
|
-
if (kind === "a" && !f)
|
|
386
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
387
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
388
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
389
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Specifies a function to dynamically manage the data source when users change the text
|
|
394
|
-
* in the list field. The search function must return an array or a promise of an array.
|
|
395
|
-
* The `search` property is particularly useful when the data source does not live
|
|
396
|
-
* in the source code.
|
|
397
|
-
*/
|
|
398
|
-
var ListSearchModel = /** @class */ (function () {
|
|
399
|
-
function ListSearchModel(data) {
|
|
400
|
-
/**
|
|
401
|
-
* Specifies the text to search.
|
|
402
|
-
* @default ""
|
|
403
|
-
*/
|
|
404
|
-
this.searchText = '';
|
|
405
|
-
/**
|
|
406
|
-
* Specifies an array of functions that returns a `boolean` value of `true` when
|
|
407
|
-
* the search is successful. This property accepts a function of type
|
|
408
|
-
* `(data: any, searchText: string) => boolean>.`
|
|
409
|
-
*/
|
|
410
|
-
this.functions = [];
|
|
411
|
-
/**
|
|
412
|
-
* Specifies the columns to search. The columns correspond to `field` values that
|
|
413
|
-
* you specify with the list component's `data` property.
|
|
414
|
-
*/
|
|
415
|
-
this.fieldSelectors = [];
|
|
416
|
-
if (data) {
|
|
417
|
-
this.searchText = data.searchText;
|
|
418
|
-
this.functions = __spreadArray([], __read(data.functions));
|
|
419
|
-
this.fieldSelectors = data.fieldSelectors;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
return ListSearchModel;
|
|
423
|
-
}());
|
|
424
|
-
|
|
425
|
-
var idIndex$3 = 0;
|
|
426
|
-
var SkyListInMemoryDataProvider = /** @class */ (function (_super) {
|
|
427
|
-
__extends(SkyListInMemoryDataProvider, _super);
|
|
428
|
-
function SkyListInMemoryDataProvider(data, searchFunction) {
|
|
429
|
-
var _this = _super.call(this, data) || this;
|
|
430
|
-
_this.items = new rxjs.BehaviorSubject([]);
|
|
431
|
-
_this.searchFunction = searchFunction;
|
|
432
|
-
if (data) {
|
|
433
|
-
data.subscribe(function (items) {
|
|
434
|
-
_this.items.next(items.map(function (d) { return new listBuilderCommon.ListItemModel(d.id || "sky-list-data-in-memory-provider-item-" + ++idIndex$3, d); }));
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
return _this;
|
|
438
|
-
}
|
|
439
|
-
SkyListInMemoryDataProvider.prototype.count = function () {
|
|
440
|
-
return this.items.pipe(operators.map(function (items) { return items.length; }));
|
|
441
|
-
};
|
|
442
|
-
SkyListInMemoryDataProvider.prototype.get = function (request) {
|
|
443
|
-
return this.filteredItems(request).pipe(operators.map(function (result) {
|
|
444
|
-
if (request.pageNumber && request.pageSize) {
|
|
445
|
-
var itemStart = (request.pageNumber - 1) * request.pageSize;
|
|
446
|
-
var pagedResult = result.slice(itemStart, itemStart + request.pageSize);
|
|
447
|
-
return new ListDataResponseModel({
|
|
448
|
-
count: result.length,
|
|
449
|
-
items: pagedResult,
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
return new ListDataResponseModel({
|
|
454
|
-
count: result.length,
|
|
455
|
-
items: result,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
}));
|
|
459
|
-
};
|
|
460
|
-
SkyListInMemoryDataProvider.prototype.filteredItems = function (request) {
|
|
461
|
-
var _this = this;
|
|
462
|
-
var showSelectedId = ['show-selected'];
|
|
463
|
-
return this.items.pipe(operators.map(function (items) {
|
|
464
|
-
var dataChanged = false;
|
|
465
|
-
var search = request.search;
|
|
466
|
-
var sort = request.sort;
|
|
467
|
-
var filters = request.filters;
|
|
468
|
-
if (_this.lastItems === undefined || _this.lastItems !== items) {
|
|
469
|
-
dataChanged = true;
|
|
470
|
-
_this.lastItems = items;
|
|
471
|
-
}
|
|
472
|
-
var searchChanged = false;
|
|
473
|
-
var filtersChanged = false;
|
|
474
|
-
if (request.isToolbarDisabled) {
|
|
475
|
-
searchChanged = true;
|
|
476
|
-
search = new ListSearchModel();
|
|
477
|
-
filters = filters.filter(function (f) { return showSelectedId.indexOf(f.name) >= 0; });
|
|
478
|
-
filtersChanged = true;
|
|
479
|
-
}
|
|
480
|
-
else {
|
|
481
|
-
if (_this.lastSearch === undefined || _this.lastSearch !== search) {
|
|
482
|
-
searchChanged = true;
|
|
483
|
-
}
|
|
484
|
-
if (_this.lastFilters === undefined || _this.lastFilters !== filters) {
|
|
485
|
-
filtersChanged = true;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
_this.lastSearch = search;
|
|
489
|
-
_this.lastFilters = filters;
|
|
490
|
-
var result = items;
|
|
491
|
-
// Apply filters.
|
|
492
|
-
if (!dataChanged &&
|
|
493
|
-
!filtersChanged &&
|
|
494
|
-
_this.lastFilterResults !== undefined) {
|
|
495
|
-
result = _this.lastFilterResults;
|
|
496
|
-
}
|
|
497
|
-
else if (filters && filters.length > 0) {
|
|
498
|
-
result = result.filter(function (item) {
|
|
499
|
-
for (var i = 0; i < filters.length; i++) {
|
|
500
|
-
var filter = filters[i];
|
|
501
|
-
if (filter.value === undefined ||
|
|
502
|
-
filter.value === '' ||
|
|
503
|
-
filter.value === false ||
|
|
504
|
-
filter.value === filter.defaultValue) {
|
|
505
|
-
continue;
|
|
506
|
-
}
|
|
507
|
-
if (!filter.filterFunction(item, filter.value)) {
|
|
508
|
-
return false;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
return true;
|
|
512
|
-
});
|
|
513
|
-
_this.lastFilterResults = result;
|
|
514
|
-
}
|
|
515
|
-
else {
|
|
516
|
-
_this.lastFilterResults = undefined;
|
|
517
|
-
}
|
|
518
|
-
// Apply search.
|
|
519
|
-
/* istanbul ignore next */
|
|
520
|
-
if (!dataChanged &&
|
|
521
|
-
!searchChanged &&
|
|
522
|
-
_this.lastSearchResults !== undefined &&
|
|
523
|
-
!filtersChanged) {
|
|
524
|
-
result = _this.lastSearchResults;
|
|
525
|
-
}
|
|
526
|
-
else if (search &&
|
|
527
|
-
search.searchText !== undefined &&
|
|
528
|
-
search.searchText.length > 0) {
|
|
529
|
-
var searchText_1 = search.searchText.toLowerCase();
|
|
530
|
-
var searchFunctions_1;
|
|
531
|
-
if (_this.searchFunction !== undefined) {
|
|
532
|
-
searchFunctions_1 = [_this.searchFunction];
|
|
533
|
-
}
|
|
534
|
-
else {
|
|
535
|
-
searchFunctions_1 = search.functions;
|
|
536
|
-
}
|
|
537
|
-
result = result.filter(function (item) {
|
|
538
|
-
var isMatch = false;
|
|
539
|
-
for (var i = 0; i < searchFunctions_1.length; i++) {
|
|
540
|
-
var searchFunction = searchFunctions_1[i];
|
|
541
|
-
var searchResult = searchFunction(item.data, searchText_1);
|
|
542
|
-
if ((typeof searchResult === 'string' &&
|
|
543
|
-
searchResult.indexOf(searchText_1) !== -1) ||
|
|
544
|
-
searchResult === true) {
|
|
545
|
-
isMatch = true;
|
|
546
|
-
break;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
return isMatch;
|
|
550
|
-
});
|
|
551
|
-
_this.lastSearchResults = result;
|
|
552
|
-
}
|
|
553
|
-
else {
|
|
554
|
-
_this.lastSearchResults = undefined;
|
|
555
|
-
}
|
|
556
|
-
// Apply sort.
|
|
557
|
-
if (sort && sort.fieldSelectors.length > 0) {
|
|
558
|
-
result = result
|
|
559
|
-
.slice()
|
|
560
|
-
.sort(function (item1, item2) {
|
|
561
|
-
var compareResult = 0;
|
|
562
|
-
for (var i = 0; i < sort.fieldSelectors.length; i++) {
|
|
563
|
-
var selector = sort.fieldSelectors[i];
|
|
564
|
-
var value1 = listBuilderCommon.getData(item1.data, selector.fieldSelector);
|
|
565
|
-
var value2 = listBuilderCommon.getData(item2.data, selector.fieldSelector);
|
|
566
|
-
compareResult = listBuilderCommon.compare(value1, value2);
|
|
567
|
-
if (selector.descending && compareResult !== 0) {
|
|
568
|
-
compareResult *= -1;
|
|
569
|
-
}
|
|
570
|
-
if (compareResult !== 0) {
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
return compareResult;
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
return result;
|
|
578
|
-
}));
|
|
579
|
-
};
|
|
580
|
-
return SkyListInMemoryDataProvider;
|
|
581
|
-
}(ListDataProvider));
|
|
582
|
-
|
|
583
|
-
var idIndex$2 = 0;
|
|
584
|
-
/**
|
|
585
|
-
* @internal
|
|
586
|
-
*/
|
|
587
|
-
var ListViewComponent = /** @class */ (function () {
|
|
588
|
-
function ListViewComponent(state, defaultName) {
|
|
589
|
-
var _this = this;
|
|
590
|
-
this.viewId = "sky-list-view-cmp-" + ++idIndex$2;
|
|
591
|
-
this.state = state;
|
|
592
|
-
this.viewName = defaultName;
|
|
593
|
-
/* istanbul ignore next */
|
|
594
|
-
this.hasToolbar = this.state.pipe(operators.map(function (s) { return s.toolbar.exists; }));
|
|
595
|
-
this.active = this.state.pipe(operators.map(function (s) { return s.views.active === _this.viewId; }));
|
|
596
|
-
this.active
|
|
597
|
-
.pipe(operators.distinctUntilChanged())
|
|
598
|
-
.subscribe(function (isActive) { return isActive ? _this.onViewActive() : _this.onViewInactive(); });
|
|
599
|
-
}
|
|
600
|
-
Object.defineProperty(ListViewComponent.prototype, "id", {
|
|
601
|
-
get: function () {
|
|
602
|
-
return this.viewId;
|
|
603
|
-
},
|
|
604
|
-
enumerable: false,
|
|
605
|
-
configurable: true
|
|
606
|
-
});
|
|
607
|
-
Object.defineProperty(ListViewComponent.prototype, "label", {
|
|
608
|
-
get: function () {
|
|
609
|
-
return this.viewName;
|
|
610
|
-
},
|
|
611
|
-
enumerable: false,
|
|
612
|
-
configurable: true
|
|
613
|
-
});
|
|
614
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
615
|
-
ListViewComponent.prototype.onViewActive = function () { };
|
|
616
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
617
|
-
ListViewComponent.prototype.onViewInactive = function () { };
|
|
618
|
-
return ListViewComponent;
|
|
619
|
-
}());
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* @internal
|
|
623
|
-
*/
|
|
624
|
-
var ListItemsLoadAction = /** @class */ (function () {
|
|
625
|
-
function ListItemsLoadAction(items, refresh, dataChanged, count) {
|
|
626
|
-
if (refresh === void 0) { refresh = false; }
|
|
627
|
-
if (dataChanged === void 0) { dataChanged = true; }
|
|
628
|
-
this.items = items;
|
|
629
|
-
this.refresh = refresh;
|
|
630
|
-
this.dataChanged = dataChanged;
|
|
631
|
-
this.count = count;
|
|
632
|
-
}
|
|
633
|
-
return ListItemsLoadAction;
|
|
634
|
-
}());
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* @internal
|
|
638
|
-
*/
|
|
639
|
-
var ListItemsSetLoadingAction = /** @class */ (function () {
|
|
640
|
-
function ListItemsSetLoadingAction(loading) {
|
|
641
|
-
if (loading === void 0) { loading = true; }
|
|
642
|
-
this.loading = loading;
|
|
643
|
-
}
|
|
644
|
-
return ListItemsSetLoadingAction;
|
|
645
|
-
}());
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* @internal
|
|
649
|
-
*/
|
|
650
|
-
var ListFiltersUpdateAction = /** @class */ (function () {
|
|
651
|
-
function ListFiltersUpdateAction(filters) {
|
|
652
|
-
this.filters = filters;
|
|
653
|
-
}
|
|
654
|
-
return ListFiltersUpdateAction;
|
|
655
|
-
}());
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* @internal
|
|
659
|
-
*/
|
|
660
|
-
var ListSearchSetFieldSelectorsAction = /** @class */ (function () {
|
|
661
|
-
function ListSearchSetFieldSelectorsAction(fieldSelectors) {
|
|
662
|
-
if (fieldSelectors === void 0) { fieldSelectors = []; }
|
|
663
|
-
this.fieldSelectors = fieldSelectors;
|
|
664
|
-
}
|
|
665
|
-
return ListSearchSetFieldSelectorsAction;
|
|
666
|
-
}());
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* @internal
|
|
670
|
-
*/
|
|
671
|
-
var ListSearchSetFunctionsAction = /** @class */ (function () {
|
|
672
|
-
function ListSearchSetFunctionsAction(functions) {
|
|
673
|
-
if (functions === void 0) { functions = []; }
|
|
674
|
-
this.functions = functions;
|
|
675
|
-
}
|
|
676
|
-
return ListSearchSetFunctionsAction;
|
|
677
|
-
}());
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* @internal
|
|
681
|
-
*/
|
|
682
|
-
var ListSearchSetOptionsAction = /** @class */ (function () {
|
|
683
|
-
function ListSearchSetOptionsAction(searchTextAction, setFieldSelectorsAction, setFunctionsAction) {
|
|
684
|
-
this.searchTextAction = searchTextAction;
|
|
685
|
-
this.setFieldSelectorsAction = setFieldSelectorsAction;
|
|
686
|
-
this.setFunctionsAction = setFunctionsAction;
|
|
687
|
-
}
|
|
688
|
-
return ListSearchSetOptionsAction;
|
|
689
|
-
}());
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* @internal
|
|
693
|
-
*/
|
|
694
|
-
var ListSearchSetSearchTextAction = /** @class */ (function () {
|
|
695
|
-
function ListSearchSetSearchTextAction(searchText) {
|
|
696
|
-
this.searchText = searchText;
|
|
697
|
-
}
|
|
698
|
-
return ListSearchSetSearchTextAction;
|
|
699
|
-
}());
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* @internal
|
|
703
|
-
*/
|
|
704
|
-
var ListSelectedSetItemsSelectedAction = /** @class */ (function () {
|
|
705
|
-
function ListSelectedSetItemsSelectedAction(items, selected, refresh) {
|
|
706
|
-
if (selected === void 0) { selected = false; }
|
|
707
|
-
if (refresh === void 0) { refresh = true; }
|
|
708
|
-
this.items = items;
|
|
709
|
-
this.selected = selected;
|
|
710
|
-
this.refresh = refresh;
|
|
711
|
-
}
|
|
712
|
-
return ListSelectedSetItemsSelectedAction;
|
|
713
|
-
}());
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* @internal
|
|
717
|
-
*/
|
|
718
|
-
var ListSortSetAvailableAction = /** @class */ (function () {
|
|
719
|
-
function ListSortSetAvailableAction(available) {
|
|
720
|
-
this.available = available;
|
|
721
|
-
}
|
|
722
|
-
return ListSortSetAvailableAction;
|
|
723
|
-
}());
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
* @internal
|
|
727
|
-
*/
|
|
728
|
-
var ListSortSetFieldSelectorsAction = /** @class */ (function () {
|
|
729
|
-
function ListSortSetFieldSelectorsAction(fieldSelectors) {
|
|
730
|
-
this.fieldSelectors = fieldSelectors;
|
|
731
|
-
}
|
|
732
|
-
return ListSortSetFieldSelectorsAction;
|
|
733
|
-
}());
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* @internal
|
|
737
|
-
*/
|
|
738
|
-
var ListSortSetGlobalAction = /** @class */ (function () {
|
|
739
|
-
function ListSortSetGlobalAction(global) {
|
|
740
|
-
this.global = global;
|
|
741
|
-
}
|
|
742
|
-
return ListSortSetGlobalAction;
|
|
743
|
-
}());
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* @internal
|
|
747
|
-
*/
|
|
748
|
-
var ListToolbarItemsDisableAction = /** @class */ (function () {
|
|
749
|
-
function ListToolbarItemsDisableAction(disable) {
|
|
750
|
-
this.disable = disable;
|
|
751
|
-
}
|
|
752
|
-
return ListToolbarItemsDisableAction;
|
|
753
|
-
}());
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* @internal
|
|
757
|
-
*/
|
|
758
|
-
var ListToolbarItemsLoadAction = /** @class */ (function () {
|
|
759
|
-
function ListToolbarItemsLoadAction(items, index) {
|
|
760
|
-
if (index === void 0) { index = -1; }
|
|
761
|
-
this.items = items;
|
|
762
|
-
this.index = index;
|
|
763
|
-
}
|
|
764
|
-
return ListToolbarItemsLoadAction;
|
|
765
|
-
}());
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* @internal
|
|
769
|
-
*/
|
|
770
|
-
var ListToolbarItemsRemoveAction = /** @class */ (function () {
|
|
771
|
-
function ListToolbarItemsRemoveAction(ids) {
|
|
772
|
-
this.ids = ids;
|
|
773
|
-
}
|
|
774
|
-
return ListToolbarItemsRemoveAction;
|
|
775
|
-
}());
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* @internal
|
|
779
|
-
*/
|
|
780
|
-
var ListToolbarSetExistsAction = /** @class */ (function () {
|
|
781
|
-
function ListToolbarSetExistsAction(exists) {
|
|
782
|
-
this.exists = exists;
|
|
783
|
-
}
|
|
784
|
-
return ListToolbarSetExistsAction;
|
|
785
|
-
}());
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* @internal
|
|
789
|
-
*/
|
|
790
|
-
var ListToolbarShowMultiselectToolbarAction = /** @class */ (function () {
|
|
791
|
-
function ListToolbarShowMultiselectToolbarAction(exists) {
|
|
792
|
-
this.exists = exists;
|
|
793
|
-
}
|
|
794
|
-
return ListToolbarShowMultiselectToolbarAction;
|
|
795
|
-
}());
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* @internal
|
|
799
|
-
*/
|
|
800
|
-
var ListViewsSetActiveAction = /** @class */ (function () {
|
|
801
|
-
function ListViewsSetActiveAction(view) {
|
|
802
|
-
this.view = view;
|
|
803
|
-
}
|
|
804
|
-
return ListViewsSetActiveAction;
|
|
805
|
-
}());
|
|
806
|
-
|
|
807
|
-
/**
|
|
808
|
-
* @internal
|
|
809
|
-
*/
|
|
810
|
-
var ListStateOrchestrator = /** @class */ (function (_super) {
|
|
811
|
-
__extends(ListStateOrchestrator, _super);
|
|
812
|
-
function ListStateOrchestrator() {
|
|
813
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
814
|
-
}
|
|
815
|
-
return ListStateOrchestrator;
|
|
816
|
-
}(listBuilderCommon.StateOrchestrator));
|
|
817
|
-
/**
|
|
818
|
-
* @internal
|
|
819
|
-
*/
|
|
820
|
-
var ListStateDispatcher = /** @class */ (function (_super) {
|
|
821
|
-
__extends(ListStateDispatcher, _super);
|
|
822
|
-
function ListStateDispatcher() {
|
|
823
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
824
|
-
}
|
|
825
|
-
ListStateDispatcher.prototype.viewsSetActive = function (id) {
|
|
826
|
-
this.next(new ListViewsSetActiveAction(id));
|
|
827
|
-
};
|
|
828
|
-
ListStateDispatcher.prototype.toolbarExists = function (exists) {
|
|
829
|
-
this.next(new ListToolbarSetExistsAction(exists));
|
|
830
|
-
};
|
|
831
|
-
ListStateDispatcher.prototype.toolbarSetDisabled = function (disabled) {
|
|
832
|
-
this.next(new ListToolbarItemsDisableAction(disabled));
|
|
833
|
-
};
|
|
834
|
-
ListStateDispatcher.prototype.toolbarAddItems = function (items, index) {
|
|
835
|
-
if (index === void 0) { index = -1; }
|
|
836
|
-
this.next(new ListToolbarItemsLoadAction(items, index));
|
|
837
|
-
};
|
|
838
|
-
ListStateDispatcher.prototype.toolbarRemoveItems = function (ids) {
|
|
839
|
-
this.next(new ListToolbarItemsRemoveAction(ids));
|
|
840
|
-
};
|
|
841
|
-
ListStateDispatcher.prototype.toolbarShowMultiselectToolbar = function (show) {
|
|
842
|
-
this.next(new ListToolbarShowMultiselectToolbarAction(show));
|
|
843
|
-
};
|
|
844
|
-
ListStateDispatcher.prototype.searchSetFunctions = function (sortFunctions) {
|
|
845
|
-
this.next(new ListSearchSetFunctionsAction(sortFunctions));
|
|
846
|
-
};
|
|
847
|
-
/* istanbul ignore next */
|
|
848
|
-
ListStateDispatcher.prototype.searchSetFieldSelectors = function (fieldSelectors) {
|
|
849
|
-
this.next(new ListSearchSetFieldSelectorsAction(fieldSelectors));
|
|
850
|
-
};
|
|
851
|
-
ListStateDispatcher.prototype.searchSetText = function (searchText) {
|
|
852
|
-
this.next(new ListSearchSetSearchTextAction(searchText));
|
|
853
|
-
};
|
|
854
|
-
ListStateDispatcher.prototype.searchSetOptions = function (searchOptions) {
|
|
855
|
-
this.next(new ListSearchSetOptionsAction(new ListSearchSetSearchTextAction(searchOptions.searchText), new ListSearchSetFieldSelectorsAction(searchOptions.fieldSelectors), new ListSearchSetFunctionsAction(searchOptions.functions)));
|
|
856
|
-
};
|
|
857
|
-
ListStateDispatcher.prototype.sortSetAvailable = function (sortLabels) {
|
|
858
|
-
this.next(new ListSortSetAvailableAction(sortLabels));
|
|
859
|
-
};
|
|
860
|
-
ListStateDispatcher.prototype.sortSetFieldSelectors = function (fieldSelectors) {
|
|
861
|
-
this.next(new ListSortSetFieldSelectorsAction(fieldSelectors));
|
|
862
|
-
};
|
|
863
|
-
ListStateDispatcher.prototype.sortSetGlobal = function (sortLabels) {
|
|
864
|
-
this.next(new ListSortSetGlobalAction(sortLabels));
|
|
865
|
-
};
|
|
866
|
-
ListStateDispatcher.prototype.filtersUpdate = function (filters) {
|
|
867
|
-
this.next(new ListFiltersUpdateAction(filters));
|
|
868
|
-
};
|
|
869
|
-
ListStateDispatcher.prototype.setSelected = function (selectedIds, selected, refresh) {
|
|
870
|
-
if (refresh === void 0) { refresh = false; }
|
|
871
|
-
this.next(new ListSelectedSetItemsSelectedAction(selectedIds, selected, refresh));
|
|
872
|
-
};
|
|
873
|
-
return ListStateDispatcher;
|
|
874
|
-
}(listBuilderCommon.StateDispatcher));
|
|
875
|
-
ListStateDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListStateDispatcher, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
876
|
-
ListStateDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListStateDispatcher });
|
|
877
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListStateDispatcher, decorators: [{
|
|
878
|
-
type: i0.Injectable
|
|
879
|
-
}] });
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* @internal
|
|
883
|
-
*/
|
|
884
|
-
var ListFiltersOrchestrator = /** @class */ (function (_super) {
|
|
885
|
-
__extends(ListFiltersOrchestrator, _super);
|
|
886
|
-
/* istanbul ignore next */
|
|
887
|
-
function ListFiltersOrchestrator() {
|
|
888
|
-
var _this = _super.call(this) || this;
|
|
889
|
-
_this.register(ListFiltersUpdateAction, _this.update);
|
|
890
|
-
return _this;
|
|
891
|
-
}
|
|
892
|
-
ListFiltersOrchestrator.prototype.update = function (state, action) {
|
|
893
|
-
return __spreadArray([], __read(action.filters));
|
|
894
|
-
};
|
|
895
|
-
return ListFiltersOrchestrator;
|
|
896
|
-
}(ListStateOrchestrator));
|
|
897
|
-
|
|
898
|
-
/**
|
|
899
|
-
* @internal
|
|
900
|
-
*/
|
|
901
|
-
var ListItemsSetSelectedAction = /** @class */ (function () {
|
|
902
|
-
function ListItemsSetSelectedAction(items,
|
|
903
|
-
/* istanbul ignore next */
|
|
904
|
-
selected, refresh) {
|
|
905
|
-
if (selected === void 0) { selected = false; }
|
|
906
|
-
if (refresh === void 0) { refresh = true; }
|
|
907
|
-
this.items = items;
|
|
908
|
-
this.selected = selected;
|
|
909
|
-
this.refresh = refresh;
|
|
910
|
-
}
|
|
911
|
-
return ListItemsSetSelectedAction;
|
|
912
|
-
}());
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* @internal
|
|
916
|
-
*/
|
|
917
|
-
var ListItemsOrchestrator = /** @class */ (function (_super) {
|
|
918
|
-
__extends(ListItemsOrchestrator, _super);
|
|
919
|
-
/* istanbul ignore next */
|
|
920
|
-
function ListItemsOrchestrator() {
|
|
921
|
-
var _this = _super.call(this) || this;
|
|
922
|
-
_this.register(ListItemsSetLoadingAction, _this.setLoading)
|
|
923
|
-
.register(ListItemsLoadAction, _this.load)
|
|
924
|
-
.register(ListItemsSetSelectedAction, _this.setItemsSelected);
|
|
925
|
-
return _this;
|
|
926
|
-
}
|
|
927
|
-
ListItemsOrchestrator.prototype.setLoading = function (state, action) {
|
|
928
|
-
return new listBuilderCommon.AsyncList(state.items, state.lastUpdate, action.loading, state.count);
|
|
929
|
-
};
|
|
930
|
-
ListItemsOrchestrator.prototype.load = function (state, action) {
|
|
931
|
-
var newListItems = action.items.map(function (g) { return new listBuilderCommon.ListItemModel(g.id, g.data, g.isSelected); });
|
|
932
|
-
var resultItems = action.refresh
|
|
933
|
-
? __spreadArray([], __read(newListItems)) : __spreadArray(__spreadArray([], __read(state.items)), __read(newListItems));
|
|
934
|
-
var count = action.count === undefined ? resultItems.length : action.count;
|
|
935
|
-
return new listBuilderCommon.AsyncList(resultItems, action.dataChanged ? Date.now() : state.lastUpdate, false, count);
|
|
936
|
-
};
|
|
937
|
-
ListItemsOrchestrator.prototype.setItemsSelected = function (state, action) {
|
|
938
|
-
/* istanbul ignore next */
|
|
939
|
-
var newSelectedIds = action.items || [];
|
|
940
|
-
var newListItemModels = this.cloneListItemModelArray(state.items);
|
|
941
|
-
if (action.refresh) {
|
|
942
|
-
newListItemModels.forEach(function (item) { return (item.isSelected = undefined); });
|
|
943
|
-
}
|
|
944
|
-
newSelectedIds.map(function (s) {
|
|
945
|
-
var newItem = newListItemModels.find(function (i) { return i.id === s; });
|
|
946
|
-
/* istanbul ignore next */
|
|
947
|
-
if (newItem) {
|
|
948
|
-
newItem.isSelected = action.selected;
|
|
949
|
-
}
|
|
950
|
-
});
|
|
951
|
-
return new listBuilderCommon.AsyncList(newListItemModels, Date.now(), state.loading, state.count);
|
|
952
|
-
};
|
|
953
|
-
ListItemsOrchestrator.prototype.cloneListItemModelArray = function (source) {
|
|
954
|
-
var newListItems = [];
|
|
955
|
-
source.forEach(function (item) {
|
|
956
|
-
newListItems.push(new listBuilderCommon.ListItemModel(item.id, Object.assign({}, item.data), item.isSelected));
|
|
957
|
-
});
|
|
958
|
-
return newListItems;
|
|
959
|
-
};
|
|
960
|
-
return ListItemsOrchestrator;
|
|
961
|
-
}(ListStateOrchestrator));
|
|
962
|
-
|
|
963
|
-
/**
|
|
964
|
-
* @internal
|
|
965
|
-
*/
|
|
966
|
-
var ListPagingModel = /** @class */ (function () {
|
|
967
|
-
function ListPagingModel(data) {
|
|
968
|
-
if (data !== undefined) {
|
|
969
|
-
this.itemsPerPage = data.itemsPerPage || 10;
|
|
970
|
-
this.maxDisplayedPages = data.maxDisplayedPages || 5;
|
|
971
|
-
this.pageCount = data.pageCount || 0;
|
|
972
|
-
this.pageNumber = data.pageNumber || 1;
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
return ListPagingModel;
|
|
976
|
-
}());
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Contains data about the selected items in the list.
|
|
980
|
-
*/
|
|
981
|
-
var ListSelectedModel = /** @class */ (function () {
|
|
982
|
-
function ListSelectedModel() {
|
|
983
|
-
this.selectedIdMap = new Map();
|
|
984
|
-
}
|
|
985
|
-
return ListSelectedModel;
|
|
986
|
-
}());
|
|
987
|
-
|
|
988
|
-
/**
|
|
989
|
-
* Specifies a set of fields to sort by.
|
|
990
|
-
*/
|
|
991
|
-
var ListSortModel = /** @class */ (function () {
|
|
992
|
-
function ListSortModel(data) {
|
|
993
|
-
/**
|
|
994
|
-
* Specifies the list of available views to sort.
|
|
995
|
-
*/
|
|
996
|
-
this.available = [];
|
|
997
|
-
/**
|
|
998
|
-
* Specifies whether the sort applies to all list views.
|
|
999
|
-
*/
|
|
1000
|
-
this.global = [];
|
|
1001
|
-
/**
|
|
1002
|
-
* Specifies the fields to sort.
|
|
1003
|
-
* For information about `ListSortFieldSelectorModel`, see the
|
|
1004
|
-
* [shared classes for lists](https://developer.blackbaud.com/skyux-list-builder-common/docs/list-builder-common).
|
|
1005
|
-
*/
|
|
1006
|
-
this.fieldSelectors = [];
|
|
1007
|
-
if (data) {
|
|
1008
|
-
this.available = data.available;
|
|
1009
|
-
this.global = data.global;
|
|
1010
|
-
this.fieldSelectors = data.fieldSelectors;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
return ListSortModel;
|
|
1014
|
-
}());
|
|
1015
|
-
|
|
1016
|
-
/**
|
|
1017
|
-
* @internal
|
|
1018
|
-
*/
|
|
1019
|
-
var ListToolbarModel = /** @class */ (function () {
|
|
1020
|
-
function ListToolbarModel(data) {
|
|
1021
|
-
this.items = [];
|
|
1022
|
-
this.showMultiselectToolbar = false;
|
|
1023
|
-
if (data) {
|
|
1024
|
-
this.exists = data.exists;
|
|
1025
|
-
this.disabled = data.disabled;
|
|
1026
|
-
this.items = data.items;
|
|
1027
|
-
this.type = data.type;
|
|
1028
|
-
this.showMultiselectToolbar = data.showMultiselectToolbar;
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
return ListToolbarModel;
|
|
1032
|
-
}());
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* @internal
|
|
1036
|
-
*/
|
|
1037
|
-
var ListViewsModel = /** @class */ (function () {
|
|
1038
|
-
function ListViewsModel(data) {
|
|
1039
|
-
this.views = [];
|
|
1040
|
-
if (data) {
|
|
1041
|
-
this.active = data.active;
|
|
1042
|
-
this.views = data.views;
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
return ListViewsModel;
|
|
1046
|
-
}());
|
|
1047
|
-
|
|
1048
|
-
/**
|
|
1049
|
-
* @internal
|
|
1050
|
-
*/
|
|
1051
|
-
var ListStateModel = /** @class */ (function () {
|
|
1052
|
-
function ListStateModel() {
|
|
1053
|
-
this.filters = [];
|
|
1054
|
-
this.items = new listBuilderCommon.AsyncList();
|
|
1055
|
-
this.paging = new ListPagingModel();
|
|
1056
|
-
this.search = new ListSearchModel();
|
|
1057
|
-
this.selected = new listBuilderCommon.AsyncItem();
|
|
1058
|
-
this.sort = new ListSortModel();
|
|
1059
|
-
this.toolbar = new ListToolbarModel();
|
|
1060
|
-
this.views = new ListViewsModel();
|
|
1061
|
-
this.selected.item = new ListSelectedModel();
|
|
1062
|
-
}
|
|
1063
|
-
return ListStateModel;
|
|
1064
|
-
}());
|
|
1065
|
-
|
|
1066
|
-
/**
|
|
1067
|
-
* @internal
|
|
1068
|
-
*/
|
|
1069
|
-
var ListPagingSetItemsPerPageAction = /** @class */ (function () {
|
|
1070
|
-
function ListPagingSetItemsPerPageAction(itemsPerPage) {
|
|
1071
|
-
this.itemsPerPage = itemsPerPage;
|
|
1072
|
-
}
|
|
1073
|
-
return ListPagingSetItemsPerPageAction;
|
|
1074
|
-
}());
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* @internal
|
|
1078
|
-
*/
|
|
1079
|
-
var ListPagingSetMaxPagesAction = /** @class */ (function () {
|
|
1080
|
-
function ListPagingSetMaxPagesAction(maxPages) {
|
|
1081
|
-
this.maxPages = maxPages;
|
|
1082
|
-
}
|
|
1083
|
-
return ListPagingSetMaxPagesAction;
|
|
1084
|
-
}());
|
|
1085
|
-
|
|
1086
|
-
/**
|
|
1087
|
-
* @internal
|
|
1088
|
-
*/
|
|
1089
|
-
var ListPagingSetPageNumberAction = /** @class */ (function () {
|
|
1090
|
-
function ListPagingSetPageNumberAction(pageNumber) {
|
|
1091
|
-
this.pageNumber = pageNumber;
|
|
1092
|
-
}
|
|
1093
|
-
return ListPagingSetPageNumberAction;
|
|
1094
|
-
}());
|
|
1095
|
-
|
|
1096
|
-
/**
|
|
1097
|
-
* @internal
|
|
1098
|
-
*/
|
|
1099
|
-
var ListPagingOrchestrator = /** @class */ (function (_super) {
|
|
1100
|
-
__extends(ListPagingOrchestrator, _super);
|
|
1101
|
-
/* istanbul ignore next */
|
|
1102
|
-
function ListPagingOrchestrator() {
|
|
1103
|
-
var _this = _super.call(this) || this;
|
|
1104
|
-
_this.register(ListPagingSetMaxPagesAction, _this.setMaxPages)
|
|
1105
|
-
.register(ListPagingSetItemsPerPageAction, _this.setItemsPerPage)
|
|
1106
|
-
.register(ListPagingSetPageNumberAction, _this.setPageNumber);
|
|
1107
|
-
return _this;
|
|
1108
|
-
}
|
|
1109
|
-
ListPagingOrchestrator.prototype.setMaxPages = function (state, action) {
|
|
1110
|
-
return new ListPagingModel(Object.assign({}, state, { maxDisplayedPages: Number(action.maxPages) }));
|
|
1111
|
-
};
|
|
1112
|
-
ListPagingOrchestrator.prototype.setItemsPerPage = function (state, action) {
|
|
1113
|
-
return new ListPagingModel(Object.assign({}, state, { itemsPerPage: Number(action.itemsPerPage) }));
|
|
1114
|
-
};
|
|
1115
|
-
ListPagingOrchestrator.prototype.setPageNumber = function (state, action) {
|
|
1116
|
-
return new ListPagingModel(Object.assign({}, state, { pageNumber: Number(action.pageNumber) }));
|
|
1117
|
-
};
|
|
1118
|
-
return ListPagingOrchestrator;
|
|
1119
|
-
}(ListStateOrchestrator));
|
|
1120
|
-
|
|
1121
|
-
/**
|
|
1122
|
-
* @internal
|
|
1123
|
-
*/
|
|
1124
|
-
var ListSearchOrchestrator = /** @class */ (function (_super) {
|
|
1125
|
-
__extends(ListSearchOrchestrator, _super);
|
|
1126
|
-
/* istanbul ignore next */
|
|
1127
|
-
function ListSearchOrchestrator() {
|
|
1128
|
-
var _this = _super.call(this) || this;
|
|
1129
|
-
_this.register(ListSearchSetSearchTextAction, _this.setSearchText)
|
|
1130
|
-
.register(ListSearchSetFunctionsAction, _this.setFunctions)
|
|
1131
|
-
.register(ListSearchSetFieldSelectorsAction, _this.setFieldSelectors)
|
|
1132
|
-
.register(ListSearchSetOptionsAction, _this.setOptions);
|
|
1133
|
-
return _this;
|
|
1134
|
-
}
|
|
1135
|
-
ListSearchOrchestrator.prototype.setSearchText = function (state, action) {
|
|
1136
|
-
return new ListSearchModel(Object.assign({}, state, {
|
|
1137
|
-
searchText: action.searchText ? action.searchText : '',
|
|
1138
|
-
}));
|
|
1139
|
-
};
|
|
1140
|
-
ListSearchOrchestrator.prototype.setFunctions = function (state, action) {
|
|
1141
|
-
return new ListSearchModel(Object.assign({}, state, { functions: __spreadArray([], __read(action.functions)) }));
|
|
1142
|
-
};
|
|
1143
|
-
ListSearchOrchestrator.prototype.setFieldSelectors = function (state, action) {
|
|
1144
|
-
return new ListSearchModel(Object.assign({}, state, { fieldSelectors: __spreadArray([], __read(action.fieldSelectors)) }));
|
|
1145
|
-
};
|
|
1146
|
-
ListSearchOrchestrator.prototype.setOptions = function (state, action) {
|
|
1147
|
-
var result = state;
|
|
1148
|
-
/* istanbul ignore else */
|
|
1149
|
-
if (action.searchTextAction) {
|
|
1150
|
-
result = this.setSearchText(result, action.searchTextAction);
|
|
1151
|
-
}
|
|
1152
|
-
/* istanbul ignore else */
|
|
1153
|
-
if (action.setFieldSelectorsAction) {
|
|
1154
|
-
result = this.setFieldSelectors(result, action.setFieldSelectorsAction);
|
|
1155
|
-
}
|
|
1156
|
-
/* istanbul ignore else */
|
|
1157
|
-
if (action.setFunctionsAction) {
|
|
1158
|
-
result = this.setFunctions(result, action.setFunctionsAction);
|
|
1159
|
-
}
|
|
1160
|
-
return result;
|
|
1161
|
-
};
|
|
1162
|
-
return ListSearchOrchestrator;
|
|
1163
|
-
}(ListStateOrchestrator));
|
|
1164
|
-
|
|
1165
|
-
/**
|
|
1166
|
-
* @internal
|
|
1167
|
-
*/
|
|
1168
|
-
var ListSelectedLoadAction = /** @class */ (function () {
|
|
1169
|
-
function ListSelectedLoadAction(items) {
|
|
1170
|
-
this.items = items;
|
|
1171
|
-
}
|
|
1172
|
-
return ListSelectedLoadAction;
|
|
1173
|
-
}());
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* @internal
|
|
1177
|
-
*/
|
|
1178
|
-
var ListSelectedSetItemSelectedAction = /** @class */ (function () {
|
|
1179
|
-
function ListSelectedSetItemSelectedAction(id, selected) {
|
|
1180
|
-
this.id = id;
|
|
1181
|
-
this.selected = selected;
|
|
1182
|
-
}
|
|
1183
|
-
return ListSelectedSetItemSelectedAction;
|
|
1184
|
-
}());
|
|
1185
|
-
|
|
1186
|
-
/**
|
|
1187
|
-
* @internal
|
|
1188
|
-
*/
|
|
1189
|
-
var ListSelectedSetLoadingAction = /** @class */ (function () {
|
|
1190
|
-
function ListSelectedSetLoadingAction(loading) {
|
|
1191
|
-
if (loading === void 0) { loading = true; }
|
|
1192
|
-
this.loading = loading;
|
|
1193
|
-
}
|
|
1194
|
-
return ListSelectedSetLoadingAction;
|
|
1195
|
-
}());
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
* @internal
|
|
1199
|
-
*/
|
|
1200
|
-
var ListSelectedOrchestrator = /** @class */ (function (_super) {
|
|
1201
|
-
__extends(ListSelectedOrchestrator, _super);
|
|
1202
|
-
/* istanbul ignore next */
|
|
1203
|
-
function ListSelectedOrchestrator() {
|
|
1204
|
-
var _this = _super.call(this) || this;
|
|
1205
|
-
_this.register(ListSelectedSetLoadingAction, _this.setLoading)
|
|
1206
|
-
.register(ListSelectedSetItemSelectedAction, _this.setItemSelected)
|
|
1207
|
-
.register(ListSelectedSetItemsSelectedAction, _this.setItemsSelected)
|
|
1208
|
-
.register(ListSelectedLoadAction, _this.load);
|
|
1209
|
-
return _this;
|
|
1210
|
-
}
|
|
1211
|
-
ListSelectedOrchestrator.prototype.setLoading = function (state, action) {
|
|
1212
|
-
return new listBuilderCommon.AsyncItem(state.item, state.lastUpdate, action.loading);
|
|
1213
|
-
};
|
|
1214
|
-
ListSelectedOrchestrator.prototype.load = function (state, action) {
|
|
1215
|
-
var newSelected = new ListSelectedModel();
|
|
1216
|
-
action.items.map(function (s) { return newSelected.selectedIdMap.set(s, true); });
|
|
1217
|
-
return new listBuilderCommon.AsyncItem(Object.assign({}, state.item, newSelected), Date.now(), false);
|
|
1218
|
-
};
|
|
1219
|
-
ListSelectedOrchestrator.prototype.setItemSelected = function (state, action) {
|
|
1220
|
-
var newSelected = this.cloneListSelectedModel(state.item);
|
|
1221
|
-
newSelected.selectedIdMap.set(action.id, action.selected);
|
|
1222
|
-
return new listBuilderCommon.AsyncItem(newSelected, state.lastUpdate, state.loading);
|
|
1223
|
-
};
|
|
1224
|
-
ListSelectedOrchestrator.prototype.setItemsSelected = function (state, action) {
|
|
1225
|
-
var newSelectedIds = action.items || [];
|
|
1226
|
-
var newListSelectedModel = action.refresh
|
|
1227
|
-
? new ListSelectedModel()
|
|
1228
|
-
: this.cloneListSelectedModel(state.item);
|
|
1229
|
-
if (newSelectedIds instanceof rxjs.Observable) {
|
|
1230
|
-
newSelectedIds.pipe(operators.take(1)).subscribe(function (selectedIds) {
|
|
1231
|
-
selectedIds.map(function (s) { return newListSelectedModel.selectedIdMap.set(s, action.selected); });
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1234
|
-
else {
|
|
1235
|
-
newSelectedIds.map(function (s) { return newListSelectedModel.selectedIdMap.set(s, action.selected); });
|
|
1236
|
-
}
|
|
1237
|
-
return new listBuilderCommon.AsyncItem(newListSelectedModel, state.lastUpdate, state.loading);
|
|
1238
|
-
};
|
|
1239
|
-
ListSelectedOrchestrator.prototype.cloneListSelectedModel = function (source) {
|
|
1240
|
-
var newListItems = new ListSelectedModel();
|
|
1241
|
-
newListItems.selectedIdMap = new Map(source.selectedIdMap);
|
|
1242
|
-
return newListItems;
|
|
1243
|
-
};
|
|
1244
|
-
return ListSelectedOrchestrator;
|
|
1245
|
-
}(ListStateOrchestrator));
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* These properties are a work in progress, and we do not recommend using them.
|
|
1249
|
-
*/
|
|
1250
|
-
var ListSortLabelModel = /** @class */ (function () {
|
|
1251
|
-
function ListSortLabelModel(data) {
|
|
1252
|
-
/**
|
|
1253
|
-
* Indicates whether to sort all fields.
|
|
1254
|
-
* @default false
|
|
1255
|
-
*/
|
|
1256
|
-
this.global = false;
|
|
1257
|
-
/**
|
|
1258
|
-
* Indicates whether to sort in descending order.
|
|
1259
|
-
* @default false
|
|
1260
|
-
*/
|
|
1261
|
-
this.descending = false;
|
|
1262
|
-
if (data) {
|
|
1263
|
-
this.text = data.text;
|
|
1264
|
-
this.fieldType = data.fieldType;
|
|
1265
|
-
this.fieldSelector = data.fieldSelector;
|
|
1266
|
-
this.global = data.global;
|
|
1267
|
-
this.descending = data.descending;
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
return ListSortLabelModel;
|
|
1271
|
-
}());
|
|
1272
|
-
|
|
1273
|
-
/**
|
|
1274
|
-
* @internal
|
|
1275
|
-
*/
|
|
1276
|
-
var ListSortOrchestrator = /** @class */ (function (_super) {
|
|
1277
|
-
__extends(ListSortOrchestrator, _super);
|
|
1278
|
-
/* istanbul ignore next */
|
|
1279
|
-
function ListSortOrchestrator() {
|
|
1280
|
-
var _this = _super.call(this) || this;
|
|
1281
|
-
_this.register(ListSortSetFieldSelectorsAction, _this.setFieldSelectors)
|
|
1282
|
-
.register(ListSortSetAvailableAction, _this.setAvailable)
|
|
1283
|
-
.register(ListSortSetGlobalAction, _this.setGlobal);
|
|
1284
|
-
return _this;
|
|
1285
|
-
}
|
|
1286
|
-
ListSortOrchestrator.prototype.setFieldSelectors = function (state, action) {
|
|
1287
|
-
return new ListSortModel(Object.assign({}, state, { fieldSelectors: action.fieldSelectors }));
|
|
1288
|
-
};
|
|
1289
|
-
ListSortOrchestrator.prototype.setAvailable = function (state, action) {
|
|
1290
|
-
var newAvailable = action.available.map(function (available) { return new ListSortLabelModel(available); });
|
|
1291
|
-
return new ListSortModel(Object.assign({}, state, { available: newAvailable }));
|
|
1292
|
-
};
|
|
1293
|
-
ListSortOrchestrator.prototype.setGlobal = function (state, action) {
|
|
1294
|
-
var newGlobal = action.global.map(function (global) { return new ListSortLabelModel(global); });
|
|
1295
|
-
return new ListSortModel(Object.assign({}, state, { global: newGlobal }));
|
|
1296
|
-
};
|
|
1297
|
-
return ListSortOrchestrator;
|
|
1298
|
-
}(ListStateOrchestrator));
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* @internal
|
|
1302
|
-
*/
|
|
1303
|
-
var ListToolbarSetTypeAction = /** @class */ (function () {
|
|
1304
|
-
function ListToolbarSetTypeAction(type) {
|
|
1305
|
-
this.type = type;
|
|
1306
|
-
}
|
|
1307
|
-
return ListToolbarSetTypeAction;
|
|
1308
|
-
}());
|
|
1309
|
-
|
|
1310
|
-
/**
|
|
1311
|
-
* @internal
|
|
1312
|
-
*/
|
|
1313
|
-
var ListToolbarItemModel = /** @class */ (function () {
|
|
1314
|
-
function ListToolbarItemModel(data) {
|
|
1315
|
-
this.index = -1;
|
|
1316
|
-
if (data) {
|
|
1317
|
-
this.index = data.index;
|
|
1318
|
-
this.template = data.template;
|
|
1319
|
-
this.location = data.location;
|
|
1320
|
-
this.view = data.view;
|
|
1321
|
-
this.id = data.id;
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
return ListToolbarItemModel;
|
|
1325
|
-
}());
|
|
1326
|
-
|
|
1327
|
-
/**
|
|
1328
|
-
* @internal
|
|
1329
|
-
*/
|
|
1330
|
-
var ListToolbarOrchestrator = /** @class */ (function (_super) {
|
|
1331
|
-
__extends(ListToolbarOrchestrator, _super);
|
|
1332
|
-
/* istanbul ignore next */
|
|
1333
|
-
function ListToolbarOrchestrator() {
|
|
1334
|
-
var _this = _super.call(this) || this;
|
|
1335
|
-
_this.register(ListToolbarSetExistsAction, _this.setExists)
|
|
1336
|
-
.register(ListToolbarItemsDisableAction, _this.setDisabled)
|
|
1337
|
-
.register(ListToolbarItemsLoadAction, _this.load)
|
|
1338
|
-
.register(ListToolbarSetTypeAction, _this.setType)
|
|
1339
|
-
.register(ListToolbarItemsRemoveAction, _this.remove)
|
|
1340
|
-
.register(ListToolbarShowMultiselectToolbarAction, _this.showMultiselectToolbar);
|
|
1341
|
-
return _this;
|
|
1342
|
-
}
|
|
1343
|
-
ListToolbarOrchestrator.prototype.setExists = function (state, action) {
|
|
1344
|
-
var newModel = new ListToolbarModel(state);
|
|
1345
|
-
newModel.exists = action.exists;
|
|
1346
|
-
return newModel;
|
|
1347
|
-
};
|
|
1348
|
-
ListToolbarOrchestrator.prototype.setDisabled = function (state, action) {
|
|
1349
|
-
var newModel = new ListToolbarModel(state);
|
|
1350
|
-
newModel.disabled = action.disable;
|
|
1351
|
-
return newModel;
|
|
1352
|
-
};
|
|
1353
|
-
ListToolbarOrchestrator.prototype.setType = function (state, action) {
|
|
1354
|
-
var newModel = new ListToolbarModel(state);
|
|
1355
|
-
newModel.type = action.type;
|
|
1356
|
-
return newModel;
|
|
1357
|
-
};
|
|
1358
|
-
ListToolbarOrchestrator.prototype.load = function (state, action) {
|
|
1359
|
-
var newModel = new ListToolbarModel(state);
|
|
1360
|
-
var newListItems = action.items.map(function (item) {
|
|
1361
|
-
/**
|
|
1362
|
-
* NOTE: Originally this function went off the action index and item models did not include
|
|
1363
|
-
* the index. We changed this but must leave functionality to convert the action index for
|
|
1364
|
-
* backwards compatibility.
|
|
1365
|
-
*/
|
|
1366
|
-
if (!item.index) {
|
|
1367
|
-
item.index = action.index;
|
|
1368
|
-
}
|
|
1369
|
-
return new ListToolbarItemModel(item);
|
|
1370
|
-
});
|
|
1371
|
-
var items = __spreadArray(__spreadArray([], __read(state.items)), __read(newListItems));
|
|
1372
|
-
items = items.sort(function (a, b) {
|
|
1373
|
-
if (a.index < b.index) {
|
|
1374
|
-
return -1;
|
|
1375
|
-
}
|
|
1376
|
-
else if (a.index > b.index) {
|
|
1377
|
-
return 1;
|
|
1378
|
-
}
|
|
1379
|
-
else {
|
|
1380
|
-
return 0;
|
|
1381
|
-
}
|
|
1382
|
-
});
|
|
1383
|
-
newModel.items = items;
|
|
1384
|
-
return newModel;
|
|
1385
|
-
};
|
|
1386
|
-
ListToolbarOrchestrator.prototype.remove = function (state, action) {
|
|
1387
|
-
var newModel = new ListToolbarModel(state);
|
|
1388
|
-
newModel.items = newModel.items.filter(function (item) {
|
|
1389
|
-
return action.ids.indexOf(item.id) === -1;
|
|
1390
|
-
});
|
|
1391
|
-
return newModel;
|
|
1392
|
-
};
|
|
1393
|
-
ListToolbarOrchestrator.prototype.showMultiselectToolbar = function (state, action) {
|
|
1394
|
-
var newModel = new ListToolbarModel(state);
|
|
1395
|
-
newModel.showMultiselectToolbar = action.exists;
|
|
1396
|
-
return newModel;
|
|
1397
|
-
};
|
|
1398
|
-
return ListToolbarOrchestrator;
|
|
1399
|
-
}(ListStateOrchestrator));
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* @internal
|
|
1403
|
-
*/
|
|
1404
|
-
var ListViewsLoadAction = /** @class */ (function () {
|
|
1405
|
-
function ListViewsLoadAction(views) {
|
|
1406
|
-
this.views = views;
|
|
1407
|
-
}
|
|
1408
|
-
return ListViewsLoadAction;
|
|
1409
|
-
}());
|
|
1410
|
-
|
|
1411
|
-
/**
|
|
1412
|
-
* @internal
|
|
1413
|
-
*/
|
|
1414
|
-
var ListViewsOrchestrator = /** @class */ (function (_super) {
|
|
1415
|
-
__extends(ListViewsOrchestrator, _super);
|
|
1416
|
-
/* istanbul ignore next */
|
|
1417
|
-
function ListViewsOrchestrator() {
|
|
1418
|
-
var _this = _super.call(this) || this;
|
|
1419
|
-
_this.register(ListViewsSetActiveAction, _this.setActive).register(ListViewsLoadAction, _this.load);
|
|
1420
|
-
return _this;
|
|
1421
|
-
}
|
|
1422
|
-
ListViewsOrchestrator.prototype.setActive = function (state, action) {
|
|
1423
|
-
return new ListViewsModel(Object.assign({}, state, { active: action.view }));
|
|
1424
|
-
};
|
|
1425
|
-
ListViewsOrchestrator.prototype.load = function (state, action) {
|
|
1426
|
-
return new ListViewsModel(Object.assign({}, state, { views: action.views }));
|
|
1427
|
-
};
|
|
1428
|
-
return ListViewsOrchestrator;
|
|
1429
|
-
}(ListStateOrchestrator));
|
|
1430
|
-
|
|
1431
|
-
/**
|
|
1432
|
-
* @internal
|
|
1433
|
-
*/
|
|
1434
|
-
var ListState = /** @class */ (function (_super) {
|
|
1435
|
-
__extends(ListState, _super);
|
|
1436
|
-
function ListState(dispatcher) {
|
|
1437
|
-
var _this = _super.call(this, new ListStateModel(), dispatcher) || this;
|
|
1438
|
-
_this.register('filters', ListFiltersOrchestrator)
|
|
1439
|
-
.register('items', ListItemsOrchestrator)
|
|
1440
|
-
.register('paging', ListPagingOrchestrator)
|
|
1441
|
-
.register('search', ListSearchOrchestrator)
|
|
1442
|
-
.register('sort', ListSortOrchestrator)
|
|
1443
|
-
.register('toolbar', ListToolbarOrchestrator)
|
|
1444
|
-
.register('views', ListViewsOrchestrator)
|
|
1445
|
-
.register('selected', ListSelectedOrchestrator)
|
|
1446
|
-
.begin();
|
|
1447
|
-
return _this;
|
|
1448
|
-
}
|
|
1449
|
-
return ListState;
|
|
1450
|
-
}(listBuilderCommon.StateNode));
|
|
1451
|
-
ListState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState, deps: [{ token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1452
|
-
ListState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState });
|
|
1453
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState, decorators: [{
|
|
1454
|
-
type: i0.Injectable
|
|
1455
|
-
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; } });
|
|
1456
|
-
|
|
1457
|
-
/**
|
|
1458
|
-
* @internal
|
|
1459
|
-
*/
|
|
1460
|
-
var ListViewModel = /** @class */ (function () {
|
|
1461
|
-
function ListViewModel(id, name) {
|
|
1462
|
-
this.id = id;
|
|
1463
|
-
this.name = name;
|
|
1464
|
-
}
|
|
1465
|
-
return ListViewModel;
|
|
1466
|
-
}());
|
|
1467
|
-
|
|
1468
|
-
var idIndex$1 = 0;
|
|
1469
|
-
var SkyListComponent = /** @class */ (function () {
|
|
1470
|
-
function SkyListComponent(state, dispatcher) {
|
|
1471
|
-
this.state = state;
|
|
1472
|
-
this.dispatcher = dispatcher;
|
|
1473
|
-
this.id = "sky-list-cmp-" + ++idIndex$1;
|
|
1474
|
-
/**
|
|
1475
|
-
* Specifies the data to display. The list component requires this property or the
|
|
1476
|
-
* `dataProvider` property. For checklist or multiselect grids, each row requires an
|
|
1477
|
-
* `id` property to manage selected items with the `selectedIds` input and the
|
|
1478
|
-
* `selectedIdsChange` event. If you do not provide an `id`, the list automatically
|
|
1479
|
-
* generates one. To update data in your view outside of a `dataProvider`, you must use
|
|
1480
|
-
* an observable instead of a static array.
|
|
1481
|
-
*/
|
|
1482
|
-
this.data = [];
|
|
1483
|
-
/**
|
|
1484
|
-
* Specifies a set of filters to apply to list data.
|
|
1485
|
-
* These filters create a filter summary when the list includes the
|
|
1486
|
-
* [`sky-list-filter-summary`](https://developer.blackbaud.com/skyux/components/list/filters)
|
|
1487
|
-
* component.
|
|
1488
|
-
*/
|
|
1489
|
-
this.appliedFilters = [];
|
|
1490
|
-
/**
|
|
1491
|
-
* For list views that support item selection, emits the selected entries.
|
|
1492
|
-
*/
|
|
1493
|
-
this.selectedIdsChange = new i0.EventEmitter();
|
|
1494
|
-
/**
|
|
1495
|
-
* Emits the filters applied to the list.
|
|
1496
|
-
*/
|
|
1497
|
-
this.appliedFiltersChange = new i0.EventEmitter();
|
|
1498
|
-
this.dataFirstLoad = false;
|
|
1499
|
-
this.lastSelectedIds = [];
|
|
1500
|
-
this.lastFilters = [];
|
|
1501
|
-
this.ngUnsubscribe = new rxjs.Subject();
|
|
1502
|
-
}
|
|
1503
|
-
SkyListComponent.prototype.ngAfterContentInit = function () {
|
|
1504
|
-
var _this = this;
|
|
1505
|
-
if (this.data && this.dataProvider && this.initialTotal) {
|
|
1506
|
-
this.dataFirstLoad = true;
|
|
1507
|
-
}
|
|
1508
|
-
if (this.listViews.length > 0) {
|
|
1509
|
-
var defaultView = this.defaultView === undefined
|
|
1510
|
-
? this.listViews.first
|
|
1511
|
-
: this.defaultView;
|
|
1512
|
-
this.dispatcher.next(new ListViewsLoadAction(this.listViews.map(function (v) { return new ListViewModel(v.id, v.label); })));
|
|
1513
|
-
// activate the default view
|
|
1514
|
-
this.dispatcher.next(new ListViewsSetActiveAction(defaultView.id));
|
|
1515
|
-
}
|
|
1516
|
-
else {
|
|
1517
|
-
return;
|
|
1518
|
-
}
|
|
1519
|
-
// set sort fields
|
|
1520
|
-
listBuilderCommon.getValue(this.sortFields, function (sortFields) {
|
|
1521
|
-
var sortArray;
|
|
1522
|
-
if (!Array.isArray(sortFields) && sortFields) {
|
|
1523
|
-
sortArray = [sortFields];
|
|
1524
|
-
}
|
|
1525
|
-
else {
|
|
1526
|
-
sortArray = sortFields;
|
|
1527
|
-
}
|
|
1528
|
-
_this.dispatcher.next(new ListSortSetFieldSelectorsAction(sortArray || []));
|
|
1529
|
-
});
|
|
1530
|
-
this.displayedItems.subscribe(function (result) {
|
|
1531
|
-
_this.dispatcher.next(new ListItemsSetLoadingAction());
|
|
1532
|
-
_this.dispatcher.next(new ListItemsLoadAction(result.items, true, true, result.count));
|
|
1533
|
-
});
|
|
1534
|
-
// Watch for selection changes.
|
|
1535
|
-
this.state
|
|
1536
|
-
.pipe(operators.map(function (current) { return current.selected; }), operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged())
|
|
1537
|
-
.subscribe(function (selected) {
|
|
1538
|
-
// Update lastSelectedIds to help us retain user selections.
|
|
1539
|
-
var selectedIdsList = [];
|
|
1540
|
-
selected.item.selectedIdMap.forEach(function (value, key) {
|
|
1541
|
-
if (value === true) {
|
|
1542
|
-
selectedIdsList.push(key);
|
|
1543
|
-
}
|
|
1544
|
-
});
|
|
1545
|
-
// If changes are distinct, emit selectedIdsChange.
|
|
1546
|
-
var distinctChanges = !_this.arraysEqual(_this.lastSelectedIds, selectedIdsList);
|
|
1547
|
-
if (_this.selectedIdsChange.observers.length > 0 && distinctChanges) {
|
|
1548
|
-
_this.selectedIdsChange.emit(selected.item.selectedIdMap);
|
|
1549
|
-
}
|
|
1550
|
-
_this.lastSelectedIds = selectedIdsList;
|
|
1551
|
-
});
|
|
1552
|
-
if (this.appliedFiltersChange.observers.length > 0) {
|
|
1553
|
-
this.state
|
|
1554
|
-
.pipe(operators.map(function (current) { return current.filters; }), operators.takeUntil(this.ngUnsubscribe), operators.skip(1))
|
|
1555
|
-
.subscribe(function (filters) {
|
|
1556
|
-
/**
|
|
1557
|
-
* We are doing this instead of a distinctUntilChange due to memory allocation issues
|
|
1558
|
-
* with the javascript array. To fix fully the array should be changed to an object in
|
|
1559
|
-
* a breaking change.
|
|
1560
|
-
*/
|
|
1561
|
-
if (!_this.arraysEqual(filters, _this.lastFilters)) {
|
|
1562
|
-
_this.lastFilters = filters.slice(0);
|
|
1563
|
-
_this.appliedFiltersChange.emit(filters);
|
|
1564
|
-
}
|
|
1565
|
-
});
|
|
1566
|
-
}
|
|
1567
|
-
};
|
|
1568
|
-
SkyListComponent.prototype.ngOnChanges = function (changes) {
|
|
1569
|
-
var _this = this;
|
|
1570
|
-
if (changes['appliedFilters'] &&
|
|
1571
|
-
changes['appliedFilters'].currentValue !==
|
|
1572
|
-
changes['appliedFilters'].previousValue) {
|
|
1573
|
-
this.state.pipe(operators.take(1)).subscribe(function (currentState) {
|
|
1574
|
-
if (currentState.paging.pageNumber &&
|
|
1575
|
-
currentState.paging.pageNumber !== 1) {
|
|
1576
|
-
_this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
1577
|
-
}
|
|
1578
|
-
_this.dispatcher.filtersUpdate(_this.appliedFilters);
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
if (changes['selectedIds']) {
|
|
1582
|
-
// Only send selection changes to dispatcher if changes are distinct.
|
|
1583
|
-
var newSelectedIds = changes['selectedIds'].currentValue;
|
|
1584
|
-
if (!this.arraysEqual(newSelectedIds, this.lastSelectedIds)) {
|
|
1585
|
-
this.dispatcher.setSelected(newSelectedIds, true, true);
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
};
|
|
1589
|
-
SkyListComponent.prototype.ngOnDestroy = function () {
|
|
1590
|
-
this.ngUnsubscribe.next();
|
|
1591
|
-
this.ngUnsubscribe.complete();
|
|
1592
|
-
};
|
|
1593
|
-
SkyListComponent.prototype.refreshDisplayedItems = function () {
|
|
1594
|
-
var _this = this;
|
|
1595
|
-
this.displayedItems.pipe(operators.take(1)).subscribe(function (result) {
|
|
1596
|
-
_this.dispatcher.next(new ListItemsSetLoadingAction());
|
|
1597
|
-
_this.dispatcher.next(new ListItemsLoadAction(result.items, true, true, result.count));
|
|
1598
|
-
});
|
|
1599
|
-
};
|
|
1600
|
-
Object.defineProperty(SkyListComponent.prototype, "displayedItems", {
|
|
1601
|
-
get: function () {
|
|
1602
|
-
var _this = this;
|
|
1603
|
-
if (!this.data && !this.dataProvider) {
|
|
1604
|
-
throw new Error('List requires data or dataProvider to be set.');
|
|
1605
|
-
}
|
|
1606
|
-
var data = this.data;
|
|
1607
|
-
if (!listBuilderCommon.isObservable(data)) {
|
|
1608
|
-
data = rxjs.of(this.data);
|
|
1609
|
-
}
|
|
1610
|
-
if (!this.dataProvider) {
|
|
1611
|
-
this.dataProvider = new SkyListInMemoryDataProvider(data, this.searchFunction);
|
|
1612
|
-
}
|
|
1613
|
-
var selectedIds = this.selectedIds || rxjs.of([]);
|
|
1614
|
-
if (!listBuilderCommon.isObservable(selectedIds)) {
|
|
1615
|
-
selectedIds = rxjs.of(selectedIds);
|
|
1616
|
-
}
|
|
1617
|
-
var selectedChanged = false;
|
|
1618
|
-
// This subject is used to cancel previous request to the list's data provider when a new change
|
|
1619
|
-
// to the list's state occurs. In a future breaking change this should be replaced or coupled
|
|
1620
|
-
// with adding a debounce time to the Observable which watches for state changes.
|
|
1621
|
-
var cancelLastRequest = new rxjs.Subject();
|
|
1622
|
-
return rxjs.combineLatest([
|
|
1623
|
-
this.state.pipe(operators.map(function (s) { return s.filters; }), operators.distinctUntilChanged()),
|
|
1624
|
-
this.state.pipe(operators.map(function (s) { return s.search; }), operators.distinctUntilChanged()),
|
|
1625
|
-
this.state.pipe(operators.map(function (s) { return s.sort.fieldSelectors; }), operators.distinctUntilChanged()),
|
|
1626
|
-
this.state.pipe(operators.map(function (s) { return s.paging.itemsPerPage; }), operators.distinctUntilChanged()),
|
|
1627
|
-
this.state.pipe(operators.map(function (s) { return s.paging.pageNumber; }), operators.distinctUntilChanged()),
|
|
1628
|
-
this.state.pipe(operators.map(function (s) { return s.toolbar.disabled; }), operators.distinctUntilChanged()),
|
|
1629
|
-
selectedIds.pipe(operators.distinctUntilChanged(), operators.map(function (selected) {
|
|
1630
|
-
selectedChanged = true;
|
|
1631
|
-
return selected;
|
|
1632
|
-
})),
|
|
1633
|
-
data.pipe(operators.distinctUntilChanged()),
|
|
1634
|
-
], function (filters, search, sortFieldSelectors, itemsPerPage, pageNumber, isToolbarDisabled, selected, itemsData) {
|
|
1635
|
-
cancelLastRequest.next();
|
|
1636
|
-
cancelLastRequest.complete();
|
|
1637
|
-
if (selectedChanged) {
|
|
1638
|
-
_this.dispatcher.next(new ListSelectedSetLoadingAction());
|
|
1639
|
-
_this.dispatcher.next(new ListSelectedLoadAction(selected));
|
|
1640
|
-
_this.dispatcher.next(new ListSelectedSetLoadingAction(false));
|
|
1641
|
-
selectedChanged = false;
|
|
1642
|
-
}
|
|
1643
|
-
var response;
|
|
1644
|
-
if (_this.dataFirstLoad) {
|
|
1645
|
-
_this.dataFirstLoad = false;
|
|
1646
|
-
var initialItems = itemsData.map(function (d) { return new listBuilderCommon.ListItemModel(d.id || "sky-list-item-model-" + ++idIndex$1, d); });
|
|
1647
|
-
response = rxjs.of(new ListDataResponseModel({
|
|
1648
|
-
count: _this.initialTotal,
|
|
1649
|
-
items: initialItems,
|
|
1650
|
-
})).pipe(operators.takeUntil(cancelLastRequest));
|
|
1651
|
-
}
|
|
1652
|
-
else {
|
|
1653
|
-
response = _this.dataProvider
|
|
1654
|
-
.get(new ListDataRequestModel({
|
|
1655
|
-
filters: filters,
|
|
1656
|
-
pageSize: itemsPerPage,
|
|
1657
|
-
pageNumber: pageNumber,
|
|
1658
|
-
search: search,
|
|
1659
|
-
sort: new ListSortModel({ fieldSelectors: sortFieldSelectors }),
|
|
1660
|
-
isToolbarDisabled: isToolbarDisabled,
|
|
1661
|
-
}))
|
|
1662
|
-
.pipe(operators.takeUntil(cancelLastRequest));
|
|
1663
|
-
}
|
|
1664
|
-
return response;
|
|
1665
|
-
}).pipe(operators.takeUntil(this.ngUnsubscribe),
|
|
1666
|
-
// Retain user selections from previous state.
|
|
1667
|
-
// This is only necessary for grids component (based on item.isSelected).
|
|
1668
|
-
operators.map(function (response) {
|
|
1669
|
-
return response.pipe(operators.map(function (listDataResponseModel) {
|
|
1670
|
-
return new ListDataResponseModel({
|
|
1671
|
-
count: listDataResponseModel.count,
|
|
1672
|
-
items: _this.getItemsAndRetainSelections(listDataResponseModel.items, _this.lastSelectedIds),
|
|
1673
|
-
});
|
|
1674
|
-
}));
|
|
1675
|
-
}), operators.flatMap(function (value) { return value; }));
|
|
1676
|
-
},
|
|
1677
|
-
enumerable: false,
|
|
1678
|
-
configurable: true
|
|
1679
|
-
});
|
|
1680
|
-
Object.defineProperty(SkyListComponent.prototype, "selectedItems", {
|
|
1681
|
-
get: function () {
|
|
1682
|
-
return rxjs.combineLatest(this.state.pipe(operators.map(function (current) { return current.items.items; }), operators.distinctUntilChanged()), this.state.pipe(operators.map(function (current) { return current.selected; }), operators.distinctUntilChanged()), function (items, selected) {
|
|
1683
|
-
return items.filter(function (i) { return selected.item.selectedIdMap.get(i.id); });
|
|
1684
|
-
}).pipe(operators.takeUntil(this.ngUnsubscribe));
|
|
1685
|
-
},
|
|
1686
|
-
enumerable: false,
|
|
1687
|
-
configurable: true
|
|
1688
|
-
});
|
|
1689
|
-
Object.defineProperty(SkyListComponent.prototype, "lastUpdate", {
|
|
1690
|
-
get: function () {
|
|
1691
|
-
return this.state.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (s) { return s.items.lastUpdate ? new Date(s.items.lastUpdate) : undefined; }));
|
|
1692
|
-
},
|
|
1693
|
-
enumerable: false,
|
|
1694
|
-
configurable: true
|
|
1695
|
-
});
|
|
1696
|
-
Object.defineProperty(SkyListComponent.prototype, "views", {
|
|
1697
|
-
get: function () {
|
|
1698
|
-
return this.listViews.toArray();
|
|
1699
|
-
},
|
|
1700
|
-
enumerable: false,
|
|
1701
|
-
configurable: true
|
|
1702
|
-
});
|
|
1703
|
-
Object.defineProperty(SkyListComponent.prototype, "itemCount", {
|
|
1704
|
-
get: function () {
|
|
1705
|
-
return this.dataProvider.count();
|
|
1706
|
-
},
|
|
1707
|
-
enumerable: false,
|
|
1708
|
-
configurable: true
|
|
1709
|
-
});
|
|
1710
|
-
SkyListComponent.prototype.getItemsAndRetainSelections = function (newList, selectedIds) {
|
|
1711
|
-
var updatedListModel = newList.slice();
|
|
1712
|
-
updatedListModel.forEach(function (item) {
|
|
1713
|
-
item.isSelected = selectedIds.indexOf(item.id) > -1 ? true : false;
|
|
1714
|
-
});
|
|
1715
|
-
return updatedListModel;
|
|
1716
|
-
};
|
|
1717
|
-
SkyListComponent.prototype.arraysEqual = function (arrayA, arrayB) {
|
|
1718
|
-
/* istanbul ignore next */
|
|
1719
|
-
if (arrayA === arrayB) {
|
|
1720
|
-
return true;
|
|
1721
|
-
}
|
|
1722
|
-
if (arrayA === undefined || arrayB === undefined) {
|
|
1723
|
-
return false;
|
|
1724
|
-
}
|
|
1725
|
-
if (arrayA.length !== arrayB.length) {
|
|
1726
|
-
return false;
|
|
1727
|
-
}
|
|
1728
|
-
for (var i = 0; i < arrayA.length; ++i) {
|
|
1729
|
-
if (arrayA[i] !== arrayB[i]) {
|
|
1730
|
-
return false;
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
return true;
|
|
1734
|
-
};
|
|
1735
|
-
return SkyListComponent;
|
|
1736
|
-
}());
|
|
1737
|
-
SkyListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1738
|
-
SkyListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListComponent, selector: "sky-list", inputs: { data: "data", dataProvider: "dataProvider", defaultView: "defaultView", initialTotal: "initialTotal", selectedIds: "selectedIds", sortFields: "sortFields", appliedFilters: "appliedFilters", searchFunction: ["search", "searchFunction"] }, outputs: { selectedIdsChange: "selectedIdsChange", appliedFiltersChange: "appliedFiltersChange" }, providers: [ListState, ListStateDispatcher], queries: [{ propertyName: "listViews", predicate: ListViewComponent }], usesOnChanges: true, ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1739
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListComponent, decorators: [{
|
|
1740
|
-
type: i0.Component,
|
|
1741
|
-
args: [{
|
|
1742
|
-
selector: 'sky-list',
|
|
1743
|
-
template: '<ng-content></ng-content>',
|
|
1744
|
-
providers: [ListState, ListStateDispatcher],
|
|
1745
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1746
|
-
}]
|
|
1747
|
-
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { data: [{
|
|
1748
|
-
type: i0.Input
|
|
1749
|
-
}], dataProvider: [{
|
|
1750
|
-
type: i0.Input
|
|
1751
|
-
}], defaultView: [{
|
|
1752
|
-
type: i0.Input
|
|
1753
|
-
}], initialTotal: [{
|
|
1754
|
-
type: i0.Input
|
|
1755
|
-
}], selectedIds: [{
|
|
1756
|
-
type: i0.Input
|
|
1757
|
-
}], sortFields: [{
|
|
1758
|
-
type: i0.Input
|
|
1759
|
-
}], appliedFilters: [{
|
|
1760
|
-
type: i0.Input
|
|
1761
|
-
}], selectedIdsChange: [{
|
|
1762
|
-
type: i0.Output
|
|
1763
|
-
}], appliedFiltersChange: [{
|
|
1764
|
-
type: i0.Output
|
|
1765
|
-
}], searchFunction: [{
|
|
1766
|
-
type: i0.Input,
|
|
1767
|
-
args: ['search']
|
|
1768
|
-
}], listViews: [{
|
|
1769
|
-
type: i0.ContentChildren,
|
|
1770
|
-
args: [ListViewComponent]
|
|
1771
|
-
}] } });
|
|
1772
|
-
|
|
1773
|
-
var SkyListModule = /** @class */ (function () {
|
|
1774
|
-
function SkyListModule() {
|
|
1775
|
-
}
|
|
1776
|
-
return SkyListModule;
|
|
1777
|
-
}());
|
|
1778
|
-
SkyListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1779
|
-
SkyListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListModule, declarations: [SkyListComponent], imports: [i4.CommonModule], exports: [SkyListComponent] });
|
|
1780
|
-
SkyListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListModule, imports: [[i4.CommonModule]] });
|
|
1781
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListModule, decorators: [{
|
|
1782
|
-
type: i0.NgModule,
|
|
1783
|
-
args: [{
|
|
1784
|
-
declarations: [SkyListComponent],
|
|
1785
|
-
imports: [i4.CommonModule],
|
|
1786
|
-
exports: [SkyListComponent],
|
|
1787
|
-
}]
|
|
1788
|
-
}] });
|
|
1789
|
-
|
|
1790
|
-
var ListFilterModel = /** @class */ (function () {
|
|
1791
|
-
function ListFilterModel(data) {
|
|
1792
|
-
/**
|
|
1793
|
-
* Indicates whether users can dismiss the filter's summary item.
|
|
1794
|
-
* @default true
|
|
1795
|
-
*/
|
|
1796
|
-
this.dismissible = true;
|
|
1797
|
-
if (data) {
|
|
1798
|
-
this.name = data.name;
|
|
1799
|
-
this.label = data.label;
|
|
1800
|
-
this.filterFunction = data.filterFunction;
|
|
1801
|
-
this.value = data.value;
|
|
1802
|
-
this.dismissible = data.dismissible;
|
|
1803
|
-
this.defaultValue = data.defaultValue;
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
return ListFilterModel;
|
|
1807
|
-
}());
|
|
1808
|
-
|
|
1809
|
-
/**
|
|
1810
|
-
* @internal
|
|
1811
|
-
*/
|
|
1812
|
-
var SkyListFilterInlineModel = /** @class */ (function () {
|
|
1813
|
-
function SkyListFilterInlineModel(data) {
|
|
1814
|
-
this.onChange = new i0.EventEmitter();
|
|
1815
|
-
if (data) {
|
|
1816
|
-
this.name = data.name;
|
|
1817
|
-
this.filterFunction = data.filterFunction;
|
|
1818
|
-
this.value = data.value;
|
|
1819
|
-
this.template = data.template;
|
|
1820
|
-
this.defaultValue = data.defaultValue;
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
SkyListFilterInlineModel.prototype.changed = function (value) {
|
|
1824
|
-
this.value = value;
|
|
1825
|
-
this.onChange.emit(value);
|
|
1826
|
-
};
|
|
1827
|
-
return SkyListFilterInlineModel;
|
|
1828
|
-
}());
|
|
1829
|
-
|
|
1830
|
-
/**
|
|
1831
|
-
* Contains a filter button for the list toolbar. Place a
|
|
1832
|
-
* [`sky-filter-button`](https://developer.blackbaud.com/skyux/components/filter)
|
|
1833
|
-
* component inside this component to open a modal with filtering options.
|
|
1834
|
-
* To apply filter options, use the
|
|
1835
|
-
* [list component's](https://developer.blackbaud.com/skyux/components/list/overview#list-properties)
|
|
1836
|
-
* `appliedFilters` property.
|
|
1837
|
-
*/
|
|
1838
|
-
var SkyListFilterButtonComponent = /** @class */ (function () {
|
|
1839
|
-
function SkyListFilterButtonComponent(dispatcher) {
|
|
1840
|
-
this.dispatcher = dispatcher;
|
|
1841
|
-
this.filterButtonItemToolbarIndex = 5000;
|
|
1842
|
-
}
|
|
1843
|
-
SkyListFilterButtonComponent.prototype.ngAfterViewInit = function () {
|
|
1844
|
-
this.dispatcher.toolbarAddItems([
|
|
1845
|
-
new ListToolbarItemModel({
|
|
1846
|
-
template: this.filterButtonTemplate,
|
|
1847
|
-
location: 'left',
|
|
1848
|
-
index: this.filterButtonItemToolbarIndex,
|
|
1849
|
-
}),
|
|
1850
|
-
]);
|
|
1851
|
-
};
|
|
1852
|
-
return SkyListFilterButtonComponent;
|
|
1853
|
-
}());
|
|
1854
|
-
SkyListFilterButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterButtonComponent, deps: [{ token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1855
|
-
SkyListFilterButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterButtonComponent, selector: "sky-list-filter-button", viewQueries: [{ propertyName: "filterButtonTemplate", first: true, predicate: ["filterButton"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<ng-template #filterButton>\n <ng-content></ng-content>\n</ng-template>\n" });
|
|
1856
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterButtonComponent, decorators: [{
|
|
1857
|
-
type: i0.Component,
|
|
1858
|
-
args: [{
|
|
1859
|
-
selector: 'sky-list-filter-button',
|
|
1860
|
-
template: "<ng-template #filterButton>\n <ng-content></ng-content>\n</ng-template>\n",
|
|
1861
|
-
}]
|
|
1862
|
-
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; }, propDecorators: { filterButtonTemplate: [{
|
|
1863
|
-
type: i0.ViewChild,
|
|
1864
|
-
args: ['filterButton', {
|
|
1865
|
-
read: i0.TemplateRef,
|
|
1866
|
-
static: true,
|
|
1867
|
-
}]
|
|
1868
|
-
}] } });
|
|
1869
|
-
|
|
1870
|
-
/**
|
|
1871
|
-
* @internal
|
|
1872
|
-
*/
|
|
1873
|
-
var SkyListFilterInlineItemRendererComponent = /** @class */ (function () {
|
|
1874
|
-
function SkyListFilterInlineItemRendererComponent() {
|
|
1875
|
-
}
|
|
1876
|
-
SkyListFilterInlineItemRendererComponent.prototype.ngOnInit = function () {
|
|
1877
|
-
/* istanbul ignore else */
|
|
1878
|
-
/* sanity check */
|
|
1879
|
-
if (this.template !== undefined) {
|
|
1880
|
-
this.container.createEmbeddedView(this.template, this);
|
|
1881
|
-
}
|
|
1882
|
-
};
|
|
1883
|
-
return SkyListFilterInlineItemRendererComponent;
|
|
1884
|
-
}());
|
|
1885
|
-
SkyListFilterInlineItemRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemRendererComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1886
|
-
SkyListFilterInlineItemRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterInlineItemRendererComponent, selector: "sky-list-filter-inline-item-renderer", inputs: { template: "template", filter: "filter" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: '<ng-template #container></ng-template>', isInline: true });
|
|
1887
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemRendererComponent, decorators: [{
|
|
1888
|
-
type: i0.Component,
|
|
1889
|
-
args: [{
|
|
1890
|
-
selector: 'sky-list-filter-inline-item-renderer',
|
|
1891
|
-
template: '<ng-template #container></ng-template>',
|
|
1892
|
-
}]
|
|
1893
|
-
}], propDecorators: { template: [{
|
|
1894
|
-
type: i0.Input
|
|
1895
|
-
}], filter: [{
|
|
1896
|
-
type: i0.Input
|
|
1897
|
-
}], container: [{
|
|
1898
|
-
type: i0.ViewChild,
|
|
1899
|
-
args: ['container', {
|
|
1900
|
-
read: i0.ViewContainerRef,
|
|
1901
|
-
static: true,
|
|
1902
|
-
}]
|
|
1903
|
-
}] } });
|
|
1904
|
-
|
|
1905
|
-
/**
|
|
1906
|
-
* Creates a filter in the list's inline filter area.
|
|
1907
|
-
*/
|
|
1908
|
-
var SkyListFilterInlineItemComponent = /** @class */ (function () {
|
|
1909
|
-
function SkyListFilterInlineItemComponent() {
|
|
1910
|
-
this.onChange = new i0.EventEmitter();
|
|
1911
|
-
}
|
|
1912
|
-
SkyListFilterInlineItemComponent.prototype.ngOnInit = function () {
|
|
1913
|
-
if (this.name === undefined || this.name.length === 0) {
|
|
1914
|
-
throw new Error('Inline filter requires a name.');
|
|
1915
|
-
}
|
|
1916
|
-
};
|
|
1917
|
-
Object.defineProperty(SkyListFilterInlineItemComponent.prototype, "template", {
|
|
1918
|
-
get: function () {
|
|
1919
|
-
return this.templates.length > 0
|
|
1920
|
-
? this.templates.first
|
|
1921
|
-
: this.templateInput;
|
|
1922
|
-
},
|
|
1923
|
-
enumerable: false,
|
|
1924
|
-
configurable: true
|
|
1925
|
-
});
|
|
1926
|
-
return SkyListFilterInlineItemComponent;
|
|
1927
|
-
}());
|
|
1928
|
-
SkyListFilterInlineItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1929
|
-
SkyListFilterInlineItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterInlineItemComponent, selector: "sky-list-filter-inline-item", inputs: { name: "name", value: "value", defaultValue: "defaultValue", filterFunction: ["filter", "filterFunction"], templateInput: ["template", "templateInput"] }, queries: [{ propertyName: "templates", predicate: i0.TemplateRef }], ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
1930
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemComponent, decorators: [{
|
|
1931
|
-
type: i0.Component,
|
|
1932
|
-
args: [{
|
|
1933
|
-
selector: 'sky-list-filter-inline-item',
|
|
1934
|
-
template: '<ng-content></ng-content>',
|
|
1935
|
-
}]
|
|
1936
|
-
}], propDecorators: { name: [{
|
|
1937
|
-
type: i0.Input
|
|
1938
|
-
}], value: [{
|
|
1939
|
-
type: i0.Input
|
|
1940
|
-
}], defaultValue: [{
|
|
1941
|
-
type: i0.Input
|
|
1942
|
-
}], filterFunction: [{
|
|
1943
|
-
type: i0.Input,
|
|
1944
|
-
args: ['filter']
|
|
1945
|
-
}], templateInput: [{
|
|
1946
|
-
type: i0.Input,
|
|
1947
|
-
args: ['template']
|
|
1948
|
-
}], templates: [{
|
|
1949
|
-
type: i0.ContentChildren,
|
|
1950
|
-
args: [i0.TemplateRef]
|
|
1951
|
-
}] } });
|
|
1952
|
-
|
|
1953
|
-
/**
|
|
1954
|
-
* Creates an inline filter area for the list. Place each filter
|
|
1955
|
-
* in a `sky-list-filter-inline-item` component.
|
|
1956
|
-
*/
|
|
1957
|
-
var SkyListFilterInlineComponent = /** @class */ (function () {
|
|
1958
|
-
function SkyListFilterInlineComponent(dispatcher, state) {
|
|
1959
|
-
this.dispatcher = dispatcher;
|
|
1960
|
-
this.state = state;
|
|
1961
|
-
this.inlineFilters = [];
|
|
1962
|
-
}
|
|
1963
|
-
SkyListFilterInlineComponent.prototype.ngAfterContentInit = function () {
|
|
1964
|
-
var _this = this;
|
|
1965
|
-
this.inlineFilters = this.filters.map(function (filter) {
|
|
1966
|
-
return new SkyListFilterInlineModel({
|
|
1967
|
-
name: filter.name,
|
|
1968
|
-
filterFunction: filter.filterFunction,
|
|
1969
|
-
template: filter.template,
|
|
1970
|
-
value: filter.value,
|
|
1971
|
-
defaultValue: filter.defaultValue,
|
|
1972
|
-
});
|
|
1973
|
-
});
|
|
1974
|
-
this.inlineFilters.forEach(function (filter) {
|
|
1975
|
-
filter.onChange.subscribe(function (value) {
|
|
1976
|
-
_this.applyFilters();
|
|
1977
|
-
});
|
|
1978
|
-
});
|
|
1979
|
-
this.dispatcher.filtersUpdate(this.getFilterModelFromInline(this.inlineFilters));
|
|
1980
|
-
};
|
|
1981
|
-
SkyListFilterInlineComponent.prototype.applyFilters = function () {
|
|
1982
|
-
var _this = this;
|
|
1983
|
-
this.state.pipe(operators.take(1)).subscribe(function (currentState) {
|
|
1984
|
-
if (currentState.paging.pageNumber &&
|
|
1985
|
-
currentState.paging.pageNumber !== 1) {
|
|
1986
|
-
_this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
1987
|
-
}
|
|
1988
|
-
_this.dispatcher.filtersUpdate(_this.getFilterModelFromInline(_this.inlineFilters));
|
|
1989
|
-
});
|
|
1990
|
-
};
|
|
1991
|
-
SkyListFilterInlineComponent.prototype.getFilterModelFromInline = function (inlineFilters) {
|
|
1992
|
-
return inlineFilters.map(function (filter) {
|
|
1993
|
-
return new ListFilterModel({
|
|
1994
|
-
name: filter.name,
|
|
1995
|
-
value: filter.value,
|
|
1996
|
-
filterFunction: filter.filterFunction,
|
|
1997
|
-
defaultValue: filter.defaultValue,
|
|
1998
|
-
});
|
|
1999
|
-
});
|
|
2000
|
-
};
|
|
2001
|
-
return SkyListFilterInlineComponent;
|
|
2002
|
-
}());
|
|
2003
|
-
SkyListFilterInlineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineComponent, deps: [{ token: ListStateDispatcher }, { token: ListState }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2004
|
-
SkyListFilterInlineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterInlineComponent, selector: "sky-list-filter-inline", queries: [{ propertyName: "filters", predicate: SkyListFilterInlineItemComponent }], ngImport: i0__namespace, template: "<ng-content></ng-content>\n\n<sky-filter-inline>\n <sky-filter-inline-item *ngFor=\"let filter of inlineFilters\">\n <sky-list-filter-inline-item-renderer\n [template]=\"filter.template\"\n [filter]=\"filter\"\n >\n </sky-list-filter-inline-item-renderer>\n </sky-filter-inline-item>\n</sky-filter-inline>\n", components: [{ type: i3__namespace.λ2, selector: "sky-filter-inline" }, { type: i3__namespace.λ3, selector: "sky-filter-inline-item" }, { type: SkyListFilterInlineItemRendererComponent, selector: "sky-list-filter-inline-item-renderer", inputs: ["template", "filter"] }], directives: [{ type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
2005
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineComponent, decorators: [{
|
|
2006
|
-
type: i0.Component,
|
|
2007
|
-
args: [{
|
|
2008
|
-
selector: 'sky-list-filter-inline',
|
|
2009
|
-
template: "<ng-content></ng-content>\n\n<sky-filter-inline>\n <sky-filter-inline-item *ngFor=\"let filter of inlineFilters\">\n <sky-list-filter-inline-item-renderer\n [template]=\"filter.template\"\n [filter]=\"filter\"\n >\n </sky-list-filter-inline-item-renderer>\n </sky-filter-inline-item>\n</sky-filter-inline>\n",
|
|
2010
|
-
}]
|
|
2011
|
-
}], ctorParameters: function () { return [{ type: ListStateDispatcher }, { type: ListState }]; }, propDecorators: { filters: [{
|
|
2012
|
-
type: i0.ContentChildren,
|
|
2013
|
-
args: [SkyListFilterInlineItemComponent]
|
|
2014
|
-
}] } });
|
|
2015
|
-
|
|
2016
|
-
/**
|
|
2017
|
-
* Creates a filter summary based on the
|
|
2018
|
-
* [list component's](https://developer.blackbaud.com/skyux/components/list/overview#list-properties)
|
|
2019
|
-
* `appliedFilters` property. Place this component within the
|
|
2020
|
-
* [`sky-list-toolbar`](https://developer.blackbaud.com/skyux/components/list/toolbar) component.
|
|
2021
|
-
*/
|
|
2022
|
-
var SkyListFilterSummaryComponent = /** @class */ (function () {
|
|
2023
|
-
function SkyListFilterSummaryComponent(state, dispatcher) {
|
|
2024
|
-
this.state = state;
|
|
2025
|
-
this.dispatcher = dispatcher;
|
|
2026
|
-
/**
|
|
2027
|
-
* Emits a `ListFilterModel` when users select a summary item. A common use case is
|
|
2028
|
-
* to open a filter modal when this event is received.
|
|
2029
|
-
*/
|
|
2030
|
-
this.summaryItemClick = new i0.EventEmitter();
|
|
2031
|
-
}
|
|
2032
|
-
SkyListFilterSummaryComponent.prototype.ngAfterContentInit = function () {
|
|
2033
|
-
var _this = this;
|
|
2034
|
-
// The setTimeout here is to ensure we avoid any ExpressionChangedAfterItHasBeenCheckedError issues.
|
|
2035
|
-
setTimeout(function () {
|
|
2036
|
-
_this.appliedFilters = _this.state.pipe(operators.map(function (state) {
|
|
2037
|
-
return state.filters.filter(function (filter) {
|
|
2038
|
-
return (filter.value !== '' &&
|
|
2039
|
-
filter.value !== undefined &&
|
|
2040
|
-
filter.value !== false &&
|
|
2041
|
-
filter.value !== filter.defaultValue);
|
|
2042
|
-
});
|
|
2043
|
-
}));
|
|
2044
|
-
});
|
|
2045
|
-
};
|
|
2046
|
-
SkyListFilterSummaryComponent.prototype.filterSummaryItemDismiss = function (index) {
|
|
2047
|
-
var _this = this;
|
|
2048
|
-
this.appliedFilters.pipe(operators.take(1)).subscribe(function (filters) {
|
|
2049
|
-
filters.splice(index, 1);
|
|
2050
|
-
_this.dispatcher.filtersUpdate(filters.slice());
|
|
2051
|
-
});
|
|
2052
|
-
};
|
|
2053
|
-
SkyListFilterSummaryComponent.prototype.filterSummaryItemClick = function (item) {
|
|
2054
|
-
this.summaryItemClick.emit(item);
|
|
2055
|
-
};
|
|
2056
|
-
return SkyListFilterSummaryComponent;
|
|
2057
|
-
}());
|
|
2058
|
-
SkyListFilterSummaryComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterSummaryComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2059
|
-
SkyListFilterSummaryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterSummaryComponent, selector: "sky-list-filter-summary", outputs: { summaryItemClick: "summaryItemClick" }, ngImport: i0__namespace, template: "<sky-filter-summary>\n <sky-filter-summary-item\n *ngFor=\"let item of appliedFilters | async; let i = index\"\n (dismiss)=\"filterSummaryItemDismiss(i)\"\n (itemClick)=\"filterSummaryItemClick(item)\"\n [dismissible]=\"item.dismissible\"\n >\n {{ item.label || item.value }}\n </sky-filter-summary-item>\n</sky-filter-summary>\n", components: [{ type: i3__namespace.λ5, selector: "sky-filter-summary" }, { type: i3__namespace.λ4, selector: "sky-filter-summary-item", inputs: ["dismissible"], outputs: ["dismiss", "itemClick"] }], directives: [{ type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4__namespace.AsyncPipe } });
|
|
2060
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterSummaryComponent, decorators: [{
|
|
2061
|
-
type: i0.Component,
|
|
2062
|
-
args: [{
|
|
2063
|
-
selector: 'sky-list-filter-summary',
|
|
2064
|
-
template: "<sky-filter-summary>\n <sky-filter-summary-item\n *ngFor=\"let item of appliedFilters | async; let i = index\"\n (dismiss)=\"filterSummaryItemDismiss(i)\"\n (itemClick)=\"filterSummaryItemClick(item)\"\n [dismissible]=\"item.dismissible\"\n >\n {{ item.label || item.value }}\n </sky-filter-summary-item>\n</sky-filter-summary>\n",
|
|
2065
|
-
}]
|
|
2066
|
-
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { summaryItemClick: [{
|
|
2067
|
-
type: i0.Output
|
|
2068
|
-
}] } });
|
|
2069
|
-
|
|
2070
|
-
var SkyListFiltersModule = /** @class */ (function () {
|
|
2071
|
-
function SkyListFiltersModule() {
|
|
2072
|
-
}
|
|
2073
|
-
return SkyListFiltersModule;
|
|
2074
|
-
}());
|
|
2075
|
-
SkyListFiltersModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFiltersModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2076
|
-
SkyListFiltersModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFiltersModule, declarations: [SkyListFilterButtonComponent,
|
|
2077
|
-
SkyListFilterSummaryComponent,
|
|
2078
|
-
SkyListFilterInlineItemComponent,
|
|
2079
|
-
SkyListFilterInlineComponent,
|
|
2080
|
-
SkyListFilterInlineItemRendererComponent], imports: [i4.CommonModule, i3.SkyFilterModule], exports: [SkyListFilterButtonComponent,
|
|
2081
|
-
SkyListFilterSummaryComponent,
|
|
2082
|
-
SkyListFilterInlineItemComponent,
|
|
2083
|
-
SkyListFilterInlineComponent] });
|
|
2084
|
-
SkyListFiltersModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFiltersModule, imports: [[i4.CommonModule, i3.SkyFilterModule]] });
|
|
2085
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFiltersModule, decorators: [{
|
|
2086
|
-
type: i0.NgModule,
|
|
2087
|
-
args: [{
|
|
2088
|
-
declarations: [
|
|
2089
|
-
SkyListFilterButtonComponent,
|
|
2090
|
-
SkyListFilterSummaryComponent,
|
|
2091
|
-
SkyListFilterInlineItemComponent,
|
|
2092
|
-
SkyListFilterInlineComponent,
|
|
2093
|
-
SkyListFilterInlineItemRendererComponent,
|
|
2094
|
-
],
|
|
2095
|
-
imports: [i4.CommonModule, i3.SkyFilterModule],
|
|
2096
|
-
exports: [
|
|
2097
|
-
SkyListFilterButtonComponent,
|
|
2098
|
-
SkyListFilterSummaryComponent,
|
|
2099
|
-
SkyListFilterInlineItemComponent,
|
|
2100
|
-
SkyListFilterInlineComponent,
|
|
2101
|
-
],
|
|
2102
|
-
}]
|
|
2103
|
-
}] });
|
|
2104
|
-
|
|
2105
|
-
/**
|
|
2106
|
-
* Provides a SKY UX-themed pagination control to display list data across multiple pages.
|
|
2107
|
-
* @internal
|
|
2108
|
-
*/
|
|
2109
|
-
var ListPagingComponent = /** @class */ (function () {
|
|
2110
|
-
function ListPagingComponent(state, dispatcher) {
|
|
2111
|
-
this.initialized = new rxjs.BehaviorSubject(false);
|
|
2112
|
-
this.state = state;
|
|
2113
|
-
this.dispatcher = dispatcher;
|
|
2114
|
-
}
|
|
2115
|
-
return ListPagingComponent;
|
|
2116
|
-
}());
|
|
2117
|
-
|
|
2118
|
-
/* istanbul ignore next */
|
|
2119
|
-
var listPagingComponentRef = i0.forwardRef(function () { return SkyListPagingComponent; });
|
|
2120
|
-
/**
|
|
2121
|
-
* Displays a pagination control for a SKY UX-themed list of data.
|
|
2122
|
-
*/
|
|
2123
|
-
var SkyListPagingComponent = /** @class */ (function (_super) {
|
|
2124
|
-
__extends(SkyListPagingComponent, _super);
|
|
2125
|
-
function SkyListPagingComponent(state, dispatcher) {
|
|
2126
|
-
var _this = _super.call(this, state, dispatcher) || this;
|
|
2127
|
-
/**
|
|
2128
|
-
* Specifies the number of list items per page.
|
|
2129
|
-
* @default 10
|
|
2130
|
-
*/
|
|
2131
|
-
_this.pageSize = 10;
|
|
2132
|
-
/**
|
|
2133
|
-
* Specifies the maximum pages to display.
|
|
2134
|
-
* @default 5
|
|
2135
|
-
*/
|
|
2136
|
-
_this.maxPages = 5;
|
|
2137
|
-
/**
|
|
2138
|
-
* Specifies the current page number.
|
|
2139
|
-
* @default 1
|
|
2140
|
-
*/
|
|
2141
|
-
_this.pageNumber = 1;
|
|
2142
|
-
return _this;
|
|
2143
|
-
}
|
|
2144
|
-
SkyListPagingComponent.prototype.ngOnInit = function () {
|
|
2145
|
-
var _this = this;
|
|
2146
|
-
this.currentPageNumber = this.state.pipe(operators.map(function (s) { return s.paging.pageNumber; }));
|
|
2147
|
-
this.maxDisplayedPages = this.state.pipe(operators.map(function (s) { return s.paging.maxDisplayedPages; }));
|
|
2148
|
-
this.itemsPerPage = this.state.pipe(operators.map(function (s) { return s.paging.itemsPerPage; }));
|
|
2149
|
-
this.itemCount = this.state.pipe(operators.map(function (s) {
|
|
2150
|
-
return s.items;
|
|
2151
|
-
}), operators.scan(function (previousValue, newValue) {
|
|
2152
|
-
if (previousValue.lastUpdate > newValue.lastUpdate) {
|
|
2153
|
-
return previousValue;
|
|
2154
|
-
}
|
|
2155
|
-
else {
|
|
2156
|
-
return newValue;
|
|
2157
|
-
}
|
|
2158
|
-
}), operators.map(function (result) {
|
|
2159
|
-
return result.count;
|
|
2160
|
-
}), operators.distinctUntilChanged());
|
|
2161
|
-
// subscribe to or use inputs
|
|
2162
|
-
listBuilderCommon.getValue(this.pageSize, function (pageSize) { return _this.dispatcher.next(new ListPagingSetItemsPerPageAction(Number(pageSize))); });
|
|
2163
|
-
listBuilderCommon.getValue(this.maxPages, function (maxPages) { return _this.dispatcher.next(new ListPagingSetMaxPagesAction(Number(maxPages))); });
|
|
2164
|
-
listBuilderCommon.getValue(this.pageNumber, function (pageNumber) { return _this.dispatcher.next(new ListPagingSetPageNumberAction(Number(pageNumber))); });
|
|
2165
|
-
};
|
|
2166
|
-
SkyListPagingComponent.prototype.pageChange = function (currentPage) {
|
|
2167
|
-
var _this = this;
|
|
2168
|
-
// Paging must be updated after list data has been updated.
|
|
2169
|
-
// Adding a setTimeout will pull it out of the stream.
|
|
2170
|
-
setTimeout(function () {
|
|
2171
|
-
_this.dispatcher.next(new ListPagingSetPageNumberAction(Number(currentPage)));
|
|
2172
|
-
});
|
|
2173
|
-
};
|
|
2174
|
-
return SkyListPagingComponent;
|
|
2175
|
-
}(ListPagingComponent));
|
|
2176
|
-
SkyListPagingComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListPagingComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2177
|
-
SkyListPagingComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListPagingComponent, selector: "sky-list-paging", inputs: { pageSize: "pageSize", maxPages: "maxPages", pageNumber: "pageNumber" }, providers: [
|
|
2178
|
-
{ provide: ListPagingComponent, useExisting: listPagingComponentRef },
|
|
2179
|
-
], usesInheritance: true, ngImport: i0__namespace, template: "<sky-paging\n [pageSize]=\"itemsPerPage | async\"\n [maxPages]=\"maxDisplayedPages | async\"\n [currentPage]=\"currentPageNumber | async\"\n [itemCount]=\"itemCount | async\"\n (currentPageChange)=\"pageChange($event)\"\n>\n</sky-paging>\n", components: [{ type: i3__namespace.λ7, selector: "sky-paging", inputs: ["currentPage", "itemCount", "maxPages", "pageSize", "pagingLabel"], outputs: ["currentPageChange"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2180
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListPagingComponent, decorators: [{
|
|
2181
|
-
type: i0.Component,
|
|
2182
|
-
args: [{
|
|
2183
|
-
selector: 'sky-list-paging',
|
|
2184
|
-
template: "<sky-paging\n [pageSize]=\"itemsPerPage | async\"\n [maxPages]=\"maxDisplayedPages | async\"\n [currentPage]=\"currentPageNumber | async\"\n [itemCount]=\"itemCount | async\"\n (currentPageChange)=\"pageChange($event)\"\n>\n</sky-paging>\n",
|
|
2185
|
-
providers: [
|
|
2186
|
-
{ provide: ListPagingComponent, useExisting: listPagingComponentRef },
|
|
2187
|
-
],
|
|
2188
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2189
|
-
}]
|
|
2190
|
-
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { pageSize: [{
|
|
2191
|
-
type: i0.Input
|
|
2192
|
-
}], maxPages: [{
|
|
2193
|
-
type: i0.Input
|
|
2194
|
-
}], pageNumber: [{
|
|
2195
|
-
type: i0.Input
|
|
2196
|
-
}] } });
|
|
2197
|
-
|
|
2198
|
-
var SkyListPagingModule = /** @class */ (function () {
|
|
2199
|
-
function SkyListPagingModule() {
|
|
2200
|
-
}
|
|
2201
|
-
return SkyListPagingModule;
|
|
2202
|
-
}());
|
|
2203
|
-
SkyListPagingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListPagingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2204
|
-
SkyListPagingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListPagingModule, declarations: [SkyListPagingComponent], imports: [i4.CommonModule, i3.SkyPagingModule], exports: [SkyListPagingComponent] });
|
|
2205
|
-
SkyListPagingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListPagingModule, imports: [[i4.CommonModule, i3.SkyPagingModule]] });
|
|
2206
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListPagingModule, decorators: [{
|
|
2207
|
-
type: i0.NgModule,
|
|
2208
|
-
args: [{
|
|
2209
|
-
declarations: [SkyListPagingComponent],
|
|
2210
|
-
imports: [i4.CommonModule, i3.SkyPagingModule],
|
|
2211
|
-
exports: [SkyListPagingComponent],
|
|
2212
|
-
}]
|
|
2213
|
-
}] });
|
|
2214
|
-
|
|
2215
|
-
/**
|
|
2216
|
-
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
2217
|
-
* The contents of this file were automatically generated by
|
|
2218
|
-
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-list-builder' schematic.
|
|
2219
|
-
* To update this file, simply rerun the command.
|
|
2220
|
-
*/
|
|
2221
|
-
var RESOURCES = {
|
|
2222
|
-
'EN-US': {
|
|
2223
|
-
skyux_list_show_secondary_actions_button: { message: 'More' },
|
|
2224
|
-
skyux_list_multiselect_clear_all: { message: 'Clear all' },
|
|
2225
|
-
skyux_list_mutliselect_select_all: { message: 'Select all' },
|
|
2226
|
-
skyux_list_mutliselect_show_selected: {
|
|
2227
|
-
message: 'Only show selected items',
|
|
2228
|
-
},
|
|
2229
|
-
skyux_list_view_switcher_dropdown_title: { message: 'Select view' },
|
|
2230
|
-
},
|
|
2231
|
-
};
|
|
2232
|
-
var SkyListBuilderResourcesProvider = /** @class */ (function () {
|
|
2233
|
-
function SkyListBuilderResourcesProvider() {
|
|
2234
|
-
}
|
|
2235
|
-
SkyListBuilderResourcesProvider.prototype.getString = function (localeInfo, name) {
|
|
2236
|
-
return i5.getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
2237
|
-
};
|
|
2238
|
-
return SkyListBuilderResourcesProvider;
|
|
2239
|
-
}());
|
|
2240
|
-
/**
|
|
2241
|
-
* Import into any component library module that needs to use resource strings.
|
|
2242
|
-
*/
|
|
2243
|
-
var SkyListBuilderResourcesModule = /** @class */ (function () {
|
|
2244
|
-
function SkyListBuilderResourcesModule() {
|
|
2245
|
-
}
|
|
2246
|
-
return SkyListBuilderResourcesModule;
|
|
2247
|
-
}());
|
|
2248
|
-
SkyListBuilderResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2249
|
-
SkyListBuilderResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderResourcesModule, exports: [i5.SkyI18nModule] });
|
|
2250
|
-
SkyListBuilderResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderResourcesModule, providers: [
|
|
2251
|
-
{
|
|
2252
|
-
provide: i5.SKY_LIB_RESOURCES_PROVIDERS,
|
|
2253
|
-
useClass: SkyListBuilderResourcesProvider,
|
|
2254
|
-
multi: true,
|
|
2255
|
-
},
|
|
2256
|
-
], imports: [i5.SkyI18nModule] });
|
|
2257
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListBuilderResourcesModule, decorators: [{
|
|
2258
|
-
type: i0.NgModule,
|
|
2259
|
-
args: [{
|
|
2260
|
-
exports: [i5.SkyI18nModule],
|
|
2261
|
-
providers: [
|
|
2262
|
-
{
|
|
2263
|
-
provide: i5.SKY_LIB_RESOURCES_PROVIDERS,
|
|
2264
|
-
useClass: SkyListBuilderResourcesProvider,
|
|
2265
|
-
multi: true,
|
|
2266
|
-
},
|
|
2267
|
-
],
|
|
2268
|
-
}]
|
|
2269
|
-
}] });
|
|
2270
|
-
|
|
2271
|
-
/**
|
|
2272
|
-
* @internal
|
|
2273
|
-
*/
|
|
2274
|
-
var SkyListSecondaryActionsService = /** @class */ (function () {
|
|
2275
|
-
function SkyListSecondaryActionsService() {
|
|
2276
|
-
this.secondaryActionsCount = 0;
|
|
2277
|
-
this.secondaryActionsSubject = new rxjs.BehaviorSubject(0);
|
|
2278
|
-
this.actionsStream = new rxjs.BehaviorSubject([]);
|
|
2279
|
-
this.actions = [];
|
|
2280
|
-
}
|
|
2281
|
-
SkyListSecondaryActionsService.prototype.addSecondaryAction = function (action) {
|
|
2282
|
-
this.secondaryActionsCount++;
|
|
2283
|
-
this.secondaryActionsSubject.next(this.secondaryActionsCount);
|
|
2284
|
-
this.actions.push(action);
|
|
2285
|
-
this.actionsStream.next(this.actions);
|
|
2286
|
-
};
|
|
2287
|
-
SkyListSecondaryActionsService.prototype.removeSecondaryAction = function (action) {
|
|
2288
|
-
this.secondaryActionsCount--;
|
|
2289
|
-
this.secondaryActionsSubject.next(this.secondaryActionsCount);
|
|
2290
|
-
this.actions = this.actions.filter(function (existingItem) { return existingItem !== action; });
|
|
2291
|
-
this.actionsStream.next(this.actions);
|
|
2292
|
-
};
|
|
2293
|
-
SkyListSecondaryActionsService.prototype.ngOnDestroy = function () {
|
|
2294
|
-
this.secondaryActionsSubject.complete();
|
|
2295
|
-
this.actionsStream.complete();
|
|
2296
|
-
};
|
|
2297
|
-
return SkyListSecondaryActionsService;
|
|
2298
|
-
}());
|
|
2299
|
-
SkyListSecondaryActionsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2300
|
-
SkyListSecondaryActionsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsService });
|
|
2301
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsService, decorators: [{
|
|
2302
|
-
type: i0.Injectable
|
|
2303
|
-
}] });
|
|
2304
|
-
|
|
2305
|
-
/**
|
|
2306
|
-
* Adds actions to the secondary actions dropdown in the list toolbar.
|
|
2307
|
-
*/
|
|
2308
|
-
var SkyListSecondaryActionComponent = /** @class */ (function () {
|
|
2309
|
-
function SkyListSecondaryActionComponent(actionService) {
|
|
2310
|
-
this.actionService = actionService;
|
|
2311
|
-
}
|
|
2312
|
-
SkyListSecondaryActionComponent.prototype.ngAfterContentInit = function () {
|
|
2313
|
-
this.actionService.addSecondaryAction({
|
|
2314
|
-
template: this.templateRef,
|
|
2315
|
-
});
|
|
2316
|
-
};
|
|
2317
|
-
return SkyListSecondaryActionComponent;
|
|
2318
|
-
}());
|
|
2319
|
-
SkyListSecondaryActionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionComponent, deps: [{ token: SkyListSecondaryActionsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2320
|
-
SkyListSecondaryActionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListSecondaryActionComponent, selector: "sky-list-secondary-action", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["listSecondaryAction"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<ng-template #listSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n" });
|
|
2321
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionComponent, decorators: [{
|
|
2322
|
-
type: i0.Component,
|
|
2323
|
-
args: [{
|
|
2324
|
-
selector: 'sky-list-secondary-action',
|
|
2325
|
-
template: "<ng-template #listSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n",
|
|
2326
|
-
}]
|
|
2327
|
-
}], ctorParameters: function () { return [{ type: SkyListSecondaryActionsService }]; }, propDecorators: { templateRef: [{
|
|
2328
|
-
type: i0.ViewChild,
|
|
2329
|
-
args: ['listSecondaryAction', {
|
|
2330
|
-
read: i0.TemplateRef,
|
|
2331
|
-
static: true,
|
|
2332
|
-
}]
|
|
2333
|
-
}] } });
|
|
2334
|
-
|
|
2335
|
-
// Note: this component is needed to ensure any reactive styles placed in the element have
|
|
2336
|
-
// their host to be based off of. Without this component the host is not written via the dispatcher.
|
|
2337
|
-
/**
|
|
2338
|
-
* @internal
|
|
2339
|
-
*/
|
|
2340
|
-
var SkyListSecondaryActionsHostComponent = /** @class */ (function () {
|
|
2341
|
-
function SkyListSecondaryActionsHostComponent(changeDetector, actionService) {
|
|
2342
|
-
this.changeDetector = changeDetector;
|
|
2343
|
-
this.actionService = actionService;
|
|
2344
|
-
this.dropdownHidden = false;
|
|
2345
|
-
this.actions = [];
|
|
2346
|
-
this.ngUnsubscribe = new rxjs.Subject();
|
|
2347
|
-
}
|
|
2348
|
-
SkyListSecondaryActionsHostComponent.prototype.ngOnInit = function () {
|
|
2349
|
-
var _this = this;
|
|
2350
|
-
this.actionService.actionsStream
|
|
2351
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged())
|
|
2352
|
-
.subscribe(function (actions) {
|
|
2353
|
-
var hasSecondaryActions = actions.length > 0;
|
|
2354
|
-
_this.dropdownHidden = !hasSecondaryActions;
|
|
2355
|
-
_this.actions = actions;
|
|
2356
|
-
_this.changeDetector.detectChanges();
|
|
2357
|
-
});
|
|
2358
|
-
};
|
|
2359
|
-
SkyListSecondaryActionsHostComponent.prototype.ngOnDestroy = function () {
|
|
2360
|
-
this.ngUnsubscribe.next();
|
|
2361
|
-
this.ngUnsubscribe.complete();
|
|
2362
|
-
};
|
|
2363
|
-
return SkyListSecondaryActionsHostComponent;
|
|
2364
|
-
}());
|
|
2365
|
-
SkyListSecondaryActionsHostComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsHostComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: SkyListSecondaryActionsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2366
|
-
SkyListSecondaryActionsHostComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListSecondaryActionsHostComponent, selector: "sky-list-secondary-actions-host", ngImport: i0__namespace, template: "<div\n class=\"sky-list-secondary-actions\"\n [ngClass]=\"{ 'sky-list-secondary-actions-hidden': dropdownHidden }\"\n>\n <sky-dropdown\n [attr.title]=\"'skyux_list_show_secondary_actions_button' | skyLibResources\"\n [label]=\"'skyux_list_show_secondary_actions_button' | skyLibResources\"\n >\n <sky-dropdown-button>\n <sky-icon icon=\"ellipsis-h\"> </sky-icon>\n <span class=\"sky-list-secondary-actions-btn-text\">\n {{ 'skyux_list_show_secondary_actions_button' | skyLibResources }}\n </span>\n </sky-dropdown-button>\n <sky-dropdown-menu>\n <sky-dropdown-item *ngFor=\"let action of actions\">\n <ng-container *ngTemplateOutlet=\"action.template\"> </ng-container>\n </sky-dropdown-item>\n </sky-dropdown-menu>\n </sky-dropdown>\n</div>\n<ng-content> </ng-content>\n", styles: [".sky-list-secondary-actions ::ng-deep .sky-dropdown-button-type-select{padding:6px 12px}.sky-list-secondary-actions ::ng-deep .sky-dropdown-button-type-select sky-icon[icon=ellipsis-h]{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.sky-list-secondary-actions-hidden{display:none}:host .sky-list-secondary-actions-btn-text{display:none}:host .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:none}:host-context(.sky-responsive-container-xs) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions-btn-text{display:none}:host-context(.sky-responsive-container-xs) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:none}@media (min-width: 768px){:host .sky-list-secondary-actions-btn-text{display:inline}:host .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:inline-block}}:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions-btn-text{display:inline}:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:inline-block}\n"], components: [{ type: i2__namespace.λ3, selector: "sky-dropdown", inputs: ["buttonStyle", "buttonType", "disabled", "dismissOnBlur", "label", "horizontalAlignment", "messageStream", "title", "trigger"] }, { type: i2__namespace.λ2, selector: "sky-dropdown-button" }, { type: i3__namespace$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i2__namespace.λ4, selector: "sky-dropdown-menu", inputs: ["ariaLabelledBy", "ariaRole", "useNativeFocus"], outputs: ["menuChanges"] }, { type: i2__namespace.λ1, selector: "sky-dropdown-item", inputs: ["ariaRole"] }], directives: [{ type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i5__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2367
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsHostComponent, decorators: [{
|
|
2368
|
-
type: i0.Component,
|
|
2369
|
-
args: [{
|
|
2370
|
-
selector: 'sky-list-secondary-actions-host',
|
|
2371
|
-
template: "<div\n class=\"sky-list-secondary-actions\"\n [ngClass]=\"{ 'sky-list-secondary-actions-hidden': dropdownHidden }\"\n>\n <sky-dropdown\n [attr.title]=\"'skyux_list_show_secondary_actions_button' | skyLibResources\"\n [label]=\"'skyux_list_show_secondary_actions_button' | skyLibResources\"\n >\n <sky-dropdown-button>\n <sky-icon icon=\"ellipsis-h\"> </sky-icon>\n <span class=\"sky-list-secondary-actions-btn-text\">\n {{ 'skyux_list_show_secondary_actions_button' | skyLibResources }}\n </span>\n </sky-dropdown-button>\n <sky-dropdown-menu>\n <sky-dropdown-item *ngFor=\"let action of actions\">\n <ng-container *ngTemplateOutlet=\"action.template\"> </ng-container>\n </sky-dropdown-item>\n </sky-dropdown-menu>\n </sky-dropdown>\n</div>\n<ng-content> </ng-content>\n",
|
|
2372
|
-
styles: [".sky-list-secondary-actions ::ng-deep .sky-dropdown-button-type-select{padding:6px 12px}.sky-list-secondary-actions ::ng-deep .sky-dropdown-button-type-select sky-icon[icon=ellipsis-h]{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.sky-list-secondary-actions-hidden{display:none}:host .sky-list-secondary-actions-btn-text{display:none}:host .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:none}:host-context(.sky-responsive-container-xs) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions-btn-text{display:none}:host-context(.sky-responsive-container-xs) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:none}@media (min-width: 768px){:host .sky-list-secondary-actions-btn-text{display:inline}:host .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:inline-block}}:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions-btn-text,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions-btn-text{display:inline}:host-context(.sky-responsive-container-sm) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-md) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret,:host-context(.sky-responsive-container-lg) .sky-list-secondary-actions ::ng-deep .sky-dropdown-caret{display:inline-block}\n"],
|
|
2373
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2374
|
-
}]
|
|
2375
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: SkyListSecondaryActionsService }]; } });
|
|
2376
|
-
|
|
2377
|
-
/**
|
|
2378
|
-
* Adds a dropdown to the list toolbar for secondary actions. If the dropdown does not
|
|
2379
|
-
* include actions, the secondary actions dropdown is hidden.
|
|
2380
|
-
*/
|
|
2381
|
-
var SkyListSecondaryActionsComponent = /** @class */ (function () {
|
|
2382
|
-
function SkyListSecondaryActionsComponent(dispatcher) {
|
|
2383
|
-
this.dispatcher = dispatcher;
|
|
2384
|
-
this.actions = [];
|
|
2385
|
-
this.secondaryActionsItemToolbarIndex = 5000;
|
|
2386
|
-
}
|
|
2387
|
-
SkyListSecondaryActionsComponent.prototype.ngAfterViewInit = function () {
|
|
2388
|
-
var secondaryActionItem = new ListToolbarItemModel({
|
|
2389
|
-
id: 'secondary-actions',
|
|
2390
|
-
template: this.secondaryActionsTemplate,
|
|
2391
|
-
location: 'center',
|
|
2392
|
-
index: this.secondaryActionsItemToolbarIndex,
|
|
2393
|
-
});
|
|
2394
|
-
this.dispatcher.toolbarAddItems([secondaryActionItem]);
|
|
2395
|
-
};
|
|
2396
|
-
return SkyListSecondaryActionsComponent;
|
|
2397
|
-
}());
|
|
2398
|
-
SkyListSecondaryActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsComponent, deps: [{ token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2399
|
-
SkyListSecondaryActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListSecondaryActionsComponent, selector: "sky-list-secondary-actions", providers: [SkyListSecondaryActionsService], viewQueries: [{ propertyName: "secondaryActionsTemplate", first: true, predicate: ["secondaryActions"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<ng-template #secondaryActions>\n <sky-list-secondary-actions-host>\n <ng-content></ng-content>\n </sky-list-secondary-actions-host>\n</ng-template>\n", components: [{ type: SkyListSecondaryActionsHostComponent, selector: "sky-list-secondary-actions-host" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2400
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsComponent, decorators: [{
|
|
2401
|
-
type: i0.Component,
|
|
2402
|
-
args: [{
|
|
2403
|
-
selector: 'sky-list-secondary-actions',
|
|
2404
|
-
template: "<ng-template #secondaryActions>\n <sky-list-secondary-actions-host>\n <ng-content></ng-content>\n </sky-list-secondary-actions-host>\n</ng-template>\n",
|
|
2405
|
-
providers: [SkyListSecondaryActionsService],
|
|
2406
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2407
|
-
}]
|
|
2408
|
-
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; }, propDecorators: { secondaryActionsTemplate: [{
|
|
2409
|
-
type: i0.ViewChild,
|
|
2410
|
-
args: ['secondaryActions', {
|
|
2411
|
-
read: i0.TemplateRef,
|
|
2412
|
-
static: true,
|
|
2413
|
-
}]
|
|
2414
|
-
}] } });
|
|
2415
|
-
|
|
2416
|
-
var SkyListSecondaryActionsModule = /** @class */ (function () {
|
|
2417
|
-
function SkyListSecondaryActionsModule() {
|
|
2418
|
-
}
|
|
2419
|
-
return SkyListSecondaryActionsModule;
|
|
2420
|
-
}());
|
|
2421
|
-
SkyListSecondaryActionsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2422
|
-
SkyListSecondaryActionsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsModule, declarations: [SkyListSecondaryActionsComponent,
|
|
2423
|
-
SkyListSecondaryActionsHostComponent,
|
|
2424
|
-
SkyListSecondaryActionComponent], imports: [i4.CommonModule,
|
|
2425
|
-
i2.SkyDropdownModule,
|
|
2426
|
-
i5.SkyI18nModule,
|
|
2427
|
-
i3$1.SkyIconModule,
|
|
2428
|
-
SkyListBuilderResourcesModule], exports: [SkyListSecondaryActionsComponent, SkyListSecondaryActionComponent] });
|
|
2429
|
-
SkyListSecondaryActionsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsModule, imports: [[
|
|
2430
|
-
i4.CommonModule,
|
|
2431
|
-
i2.SkyDropdownModule,
|
|
2432
|
-
i5.SkyI18nModule,
|
|
2433
|
-
i3$1.SkyIconModule,
|
|
2434
|
-
SkyListBuilderResourcesModule,
|
|
2435
|
-
]] });
|
|
2436
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionsModule, decorators: [{
|
|
2437
|
-
type: i0.NgModule,
|
|
2438
|
-
args: [{
|
|
2439
|
-
declarations: [
|
|
2440
|
-
SkyListSecondaryActionsComponent,
|
|
2441
|
-
SkyListSecondaryActionsHostComponent,
|
|
2442
|
-
SkyListSecondaryActionComponent,
|
|
2443
|
-
],
|
|
2444
|
-
imports: [
|
|
2445
|
-
i4.CommonModule,
|
|
2446
|
-
i2.SkyDropdownModule,
|
|
2447
|
-
i5.SkyI18nModule,
|
|
2448
|
-
i3$1.SkyIconModule,
|
|
2449
|
-
SkyListBuilderResourcesModule,
|
|
2450
|
-
],
|
|
2451
|
-
exports: [SkyListSecondaryActionsComponent, SkyListSecondaryActionComponent],
|
|
2452
|
-
}]
|
|
2453
|
-
}] });
|
|
2454
|
-
|
|
2455
|
-
/**
|
|
2456
|
-
* @internal
|
|
2457
|
-
*/
|
|
2458
|
-
var SkyListToolbarItemRendererComponent = /** @class */ (function () {
|
|
2459
|
-
function SkyListToolbarItemRendererComponent() {
|
|
2460
|
-
}
|
|
2461
|
-
SkyListToolbarItemRendererComponent.prototype.ngOnInit = function () {
|
|
2462
|
-
if (this.template !== undefined) {
|
|
2463
|
-
this.container.createEmbeddedView(this.template, this);
|
|
2464
|
-
}
|
|
2465
|
-
};
|
|
2466
|
-
return SkyListToolbarItemRendererComponent;
|
|
2467
|
-
}());
|
|
2468
|
-
SkyListToolbarItemRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemRendererComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2469
|
-
SkyListToolbarItemRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarItemRendererComponent, selector: "sky-list-toolbar-item-renderer", inputs: { template: "template" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: '<ng-template #container></ng-template>', isInline: true });
|
|
2470
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemRendererComponent, decorators: [{
|
|
2471
|
-
type: i0.Component,
|
|
2472
|
-
args: [{
|
|
2473
|
-
selector: 'sky-list-toolbar-item-renderer',
|
|
2474
|
-
template: '<ng-template #container></ng-template>',
|
|
2475
|
-
}]
|
|
2476
|
-
}], propDecorators: { template: [{
|
|
2477
|
-
type: i0.Input
|
|
2478
|
-
}], container: [{
|
|
2479
|
-
type: i0.ViewChild,
|
|
2480
|
-
args: ['container', {
|
|
2481
|
-
read: i0.ViewContainerRef,
|
|
2482
|
-
static: true,
|
|
2483
|
-
}]
|
|
2484
|
-
}] } });
|
|
2485
|
-
|
|
2486
|
-
var uniqueId = 0;
|
|
2487
|
-
/**
|
|
2488
|
-
* @internal
|
|
2489
|
-
*/
|
|
2490
|
-
var SkyListMultiselectToolbarComponent = /** @class */ (function () {
|
|
2491
|
-
function SkyListMultiselectToolbarComponent(state, dispatcher) {
|
|
2492
|
-
this.state = state;
|
|
2493
|
-
this.dispatcher = dispatcher;
|
|
2494
|
-
this.showOnlySelected = false;
|
|
2495
|
-
this.multiselectToolbarId = "sky-list-multiselect-toolbar-" + uniqueId++;
|
|
2496
|
-
this.selectedIdMap = new Map();
|
|
2497
|
-
this.ngUnsubscribe = new rxjs.Subject();
|
|
2498
|
-
}
|
|
2499
|
-
SkyListMultiselectToolbarComponent.prototype.ngOnInit = function () {
|
|
2500
|
-
var _this = this;
|
|
2501
|
-
this.state
|
|
2502
|
-
.pipe(operators.map(function (t) { return t.selected.item; }), operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged(this.selectedMapEqual))
|
|
2503
|
-
.subscribe(function (model) {
|
|
2504
|
-
_this.selectedIdMap = model.selectedIdMap;
|
|
2505
|
-
if (_this.showOnlySelected) {
|
|
2506
|
-
_this.reapplyFilter(true);
|
|
2507
|
-
}
|
|
2508
|
-
});
|
|
2509
|
-
// If 'show-selected' filter is programatically set from a child component (e.g. checkilst),
|
|
2510
|
-
// make sure the checked state of the 'show-selected' checkbox stays in sync.
|
|
2511
|
-
this.state
|
|
2512
|
-
.pipe(operators.map(function (t) { return t.filters; }), operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged(this.showSelectedValuesEqual))
|
|
2513
|
-
.subscribe(function (filters) {
|
|
2514
|
-
var showSelectedFilter = filters.find(function (filter) { return filter.name === 'show-selected'; });
|
|
2515
|
-
if (showSelectedFilter) {
|
|
2516
|
-
_this.showOnlySelected = showSelectedFilter.value === 'true';
|
|
2517
|
-
}
|
|
2518
|
-
});
|
|
2519
|
-
};
|
|
2520
|
-
SkyListMultiselectToolbarComponent.prototype.ngOnDestroy = function () {
|
|
2521
|
-
this.ngUnsubscribe.next();
|
|
2522
|
-
this.ngUnsubscribe.complete();
|
|
2523
|
-
};
|
|
2524
|
-
SkyListMultiselectToolbarComponent.prototype.selectAll = function () {
|
|
2525
|
-
var _this = this;
|
|
2526
|
-
this.state
|
|
2527
|
-
.pipe(operators.map(function (state) { return state.items.items; }), operators.take(1))
|
|
2528
|
-
.subscribe(function (items) {
|
|
2529
|
-
_this.dispatcher.setSelected(items.map(function (item) { return item.id; }), true);
|
|
2530
|
-
if (_this.showOnlySelected) {
|
|
2531
|
-
_this.reapplyFilter(_this.showOnlySelected);
|
|
2532
|
-
}
|
|
2533
|
-
});
|
|
2534
|
-
};
|
|
2535
|
-
SkyListMultiselectToolbarComponent.prototype.clearSelections = function () {
|
|
2536
|
-
var _this = this;
|
|
2537
|
-
this.state
|
|
2538
|
-
.pipe(operators.map(function (state) { return state.items.items; }), operators.take(1))
|
|
2539
|
-
.subscribe(function (items) {
|
|
2540
|
-
_this.dispatcher.setSelected(items.map(function (item) { return item.id; }), false);
|
|
2541
|
-
if (_this.showOnlySelected) {
|
|
2542
|
-
_this.reapplyFilter(_this.showOnlySelected);
|
|
2543
|
-
}
|
|
2544
|
-
});
|
|
2545
|
-
};
|
|
2546
|
-
SkyListMultiselectToolbarComponent.prototype.changeVisibleItems = function (change) {
|
|
2547
|
-
this.showOnlySelected = change.checked;
|
|
2548
|
-
this.reapplyFilter(change.checked);
|
|
2549
|
-
};
|
|
2550
|
-
SkyListMultiselectToolbarComponent.prototype.reapplyFilter = function (isSelected) {
|
|
2551
|
-
var _this = this;
|
|
2552
|
-
this.state
|
|
2553
|
-
.pipe(operators.map(function (state) { return state.filters; }), operators.take(1))
|
|
2554
|
-
.subscribe(function (filters) {
|
|
2555
|
-
filters = filters.filter(function (filter) { return filter.name !== 'show-selected'; });
|
|
2556
|
-
filters.push(_this.getShowSelectedFilter(isSelected));
|
|
2557
|
-
_this.dispatcher.filtersUpdate(filters);
|
|
2558
|
-
});
|
|
2559
|
-
// If "show selected" is checked and paging is enabled, go to page one.
|
|
2560
|
-
/* istanbul ignore else */
|
|
2561
|
-
if (isSelected) {
|
|
2562
|
-
this.state.pipe(operators.take(1)).subscribe(function (currentState) {
|
|
2563
|
-
if (currentState.paging.pageNumber &&
|
|
2564
|
-
currentState.paging.pageNumber !== 1) {
|
|
2565
|
-
_this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
2566
|
-
}
|
|
2567
|
-
});
|
|
2568
|
-
}
|
|
2569
|
-
this.dispatcher.toolbarSetDisabled(isSelected);
|
|
2570
|
-
};
|
|
2571
|
-
SkyListMultiselectToolbarComponent.prototype.getShowSelectedFilter = function (isSelected) {
|
|
2572
|
-
var _this = this;
|
|
2573
|
-
return new ListFilterModel({
|
|
2574
|
-
name: 'show-selected',
|
|
2575
|
-
value: isSelected.toString(),
|
|
2576
|
-
filterFunction: function (model, showOnlySelected) {
|
|
2577
|
-
/* istanbul ignore else */
|
|
2578
|
-
if (showOnlySelected.toString() !== false.toString()) {
|
|
2579
|
-
return _this.selectedIdMap.get(model.id);
|
|
2580
|
-
}
|
|
2581
|
-
},
|
|
2582
|
-
defaultValue: false.toString(),
|
|
2583
|
-
});
|
|
2584
|
-
};
|
|
2585
|
-
SkyListMultiselectToolbarComponent.prototype.showSelectedValuesEqual = function (prev, next) {
|
|
2586
|
-
var prevShowSelectedFilter = prev.find(function (filter) { return filter.name === 'show-selected'; });
|
|
2587
|
-
var nextShowSelectedFilter = next.find(function (filter) { return filter.name === 'show-selected'; });
|
|
2588
|
-
// Both undefined.
|
|
2589
|
-
if (!prevShowSelectedFilter && !nextShowSelectedFilter) {
|
|
2590
|
-
return true;
|
|
2591
|
-
}
|
|
2592
|
-
// Only one undefined.
|
|
2593
|
-
if ((prevShowSelectedFilter && !nextShowSelectedFilter) ||
|
|
2594
|
-
(!prevShowSelectedFilter && nextShowSelectedFilter)) {
|
|
2595
|
-
return false;
|
|
2596
|
-
}
|
|
2597
|
-
// Defined, but with different "value".
|
|
2598
|
-
return prevShowSelectedFilter.value === nextShowSelectedFilter.value;
|
|
2599
|
-
};
|
|
2600
|
-
SkyListMultiselectToolbarComponent.prototype.selectedMapEqual = function (prev, next) {
|
|
2601
|
-
if (prev.selectedIdMap.size !== next.selectedIdMap.size) {
|
|
2602
|
-
return false;
|
|
2603
|
-
}
|
|
2604
|
-
for (var i = 0; i < next.selectedIdMap.size; i++) {
|
|
2605
|
-
var key = Array.from(next.selectedIdMap.keys())[i];
|
|
2606
|
-
var value = next.selectedIdMap.get(key);
|
|
2607
|
-
/* istanbul ignore next */
|
|
2608
|
-
if (value !== prev.selectedIdMap.get(key)) {
|
|
2609
|
-
return false;
|
|
2610
|
-
}
|
|
2611
|
-
}
|
|
2612
|
-
return true;
|
|
2613
|
-
};
|
|
2614
|
-
return SkyListMultiselectToolbarComponent;
|
|
2615
|
-
}());
|
|
2616
|
-
SkyListMultiselectToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListMultiselectToolbarComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2617
|
-
SkyListMultiselectToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListMultiselectToolbarComponent, selector: "sky-list-multiselect-toolbar", inputs: { showOnlySelected: "showOnlySelected" }, ngImport: i0__namespace, template: "<sky-toolbar class=\"sky-list-multiselect-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-list-toolbar-item-renderer [template]=\"selectAllTemplate\">\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <sky-list-toolbar-item-renderer [template]=\"clearSelectionsTemplate\">\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <ng-container *ngTemplateOutlet=\"showSelectedTemplate\"></ng-container>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n</sky-toolbar>\n\n<ng-template #selectAllTemplate>\n <button\n class=\"sky-btn sky-btn-link\"\n type=\"button\"\n [attr.id]=\"multiselectToolbarId + '-select-all'\"\n (click)=\"selectAll(); $event.preventDefault()\"\n >\n {{ 'skyux_list_mutliselect_select_all' | skyLibResources }}\n </button>\n</ng-template>\n\n<ng-template #clearSelectionsTemplate>\n <button\n class=\"sky-btn sky-btn-link\"\n type=\"button\"\n [attr.id]=\"multiselectToolbarId + '-clear-all'\"\n (click)=\"clearSelections(); $event.preventDefault()\"\n >\n {{ 'skyux_list_multiselect_clear_all' | skyLibResources }}\n </button>\n</ng-template>\n\n<ng-template #showSelectedTemplate>\n <sky-checkbox\n [attr.id]=\"multiselectToolbarId + '-show-selected'\"\n [checked]=\"showOnlySelected\"\n (change)=\"changeVisibleItems($event)\"\n >\n <sky-checkbox-label>\n {{ 'skyux_list_mutliselect_show_selected' | skyLibResources }}\n </sky-checkbox-label>\n </sky-checkbox>\n</ng-template>\n", styles: [":host-context(sky-toolbar +) .sky-list-multiselect-toolbar ::ng-deep .sky-toolbar-container,:host-context(.sky-list-toolbar-search +) .sky-list-multiselect-toolbar ::ng-deep .sky-toolbar-container{border-top:none}\n"], components: [{ type: i3__namespace$2.λ37, selector: "sky-toolbar" }, { type: i3__namespace$2.λ38, selector: "sky-toolbar-section" }, { type: i3__namespace$2.λ39, selector: "sky-toolbar-item" }, { type: SkyListToolbarItemRendererComponent, selector: "sky-list-toolbar-item-renderer", inputs: ["template"] }, { type: i3__namespace$2.λ40, selector: "sky-toolbar-view-actions" }, { type: i5__namespace$1.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: i5__namespace$1.λ4, selector: "sky-checkbox-label" }], directives: [{ type: i4__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i5__namespace.SkyLibResourcesPipe } });
|
|
2618
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListMultiselectToolbarComponent, decorators: [{
|
|
2619
|
-
type: i0.Component,
|
|
2620
|
-
args: [{
|
|
2621
|
-
selector: 'sky-list-multiselect-toolbar',
|
|
2622
|
-
template: "<sky-toolbar class=\"sky-list-multiselect-toolbar\">\n <sky-toolbar-section>\n <sky-toolbar-item>\n <sky-list-toolbar-item-renderer [template]=\"selectAllTemplate\">\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item>\n <sky-list-toolbar-item-renderer [template]=\"clearSelectionsTemplate\">\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-view-actions>\n <ng-container *ngTemplateOutlet=\"showSelectedTemplate\"></ng-container>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n</sky-toolbar>\n\n<ng-template #selectAllTemplate>\n <button\n class=\"sky-btn sky-btn-link\"\n type=\"button\"\n [attr.id]=\"multiselectToolbarId + '-select-all'\"\n (click)=\"selectAll(); $event.preventDefault()\"\n >\n {{ 'skyux_list_mutliselect_select_all' | skyLibResources }}\n </button>\n</ng-template>\n\n<ng-template #clearSelectionsTemplate>\n <button\n class=\"sky-btn sky-btn-link\"\n type=\"button\"\n [attr.id]=\"multiselectToolbarId + '-clear-all'\"\n (click)=\"clearSelections(); $event.preventDefault()\"\n >\n {{ 'skyux_list_multiselect_clear_all' | skyLibResources }}\n </button>\n</ng-template>\n\n<ng-template #showSelectedTemplate>\n <sky-checkbox\n [attr.id]=\"multiselectToolbarId + '-show-selected'\"\n [checked]=\"showOnlySelected\"\n (change)=\"changeVisibleItems($event)\"\n >\n <sky-checkbox-label>\n {{ 'skyux_list_mutliselect_show_selected' | skyLibResources }}\n </sky-checkbox-label>\n </sky-checkbox>\n</ng-template>\n",
|
|
2623
|
-
styles: [":host-context(sky-toolbar +) .sky-list-multiselect-toolbar ::ng-deep .sky-toolbar-container,:host-context(.sky-list-toolbar-search +) .sky-list-multiselect-toolbar ::ng-deep .sky-toolbar-container{border-top:none}\n"],
|
|
2624
|
-
}]
|
|
2625
|
-
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { showOnlySelected: [{
|
|
2626
|
-
type: i0.Input
|
|
2627
|
-
}] } });
|
|
2628
|
-
|
|
2629
|
-
var idIndex = 0;
|
|
2630
|
-
/**
|
|
2631
|
-
* Defines a toolbar item for the list toolbar.
|
|
2632
|
-
*/
|
|
2633
|
-
var SkyListToolbarItemComponent = /** @class */ (function () {
|
|
2634
|
-
function SkyListToolbarItemComponent() {
|
|
2635
|
-
/**
|
|
2636
|
-
* Specifies the ID of the item.
|
|
2637
|
-
*/
|
|
2638
|
-
this.id = "sky-list-toolbar-item-" + ++idIndex;
|
|
2639
|
-
/**
|
|
2640
|
-
* Specifies the index of the item at the given item location.
|
|
2641
|
-
* @default -1
|
|
2642
|
-
*/
|
|
2643
|
-
this.index = -1;
|
|
2644
|
-
/**
|
|
2645
|
-
* Specifies the toolbar location of the item. The valid options are `"left"`,
|
|
2646
|
-
* `"center"`, and `"right"`.
|
|
2647
|
-
* @default "left"
|
|
2648
|
-
*/
|
|
2649
|
-
this.location = 'left';
|
|
2650
|
-
}
|
|
2651
|
-
Object.defineProperty(SkyListToolbarItemComponent.prototype, "template", {
|
|
2652
|
-
get: function () {
|
|
2653
|
-
return this.templates.length > 0 ? this.templates.first : undefined;
|
|
2654
|
-
},
|
|
2655
|
-
enumerable: false,
|
|
2656
|
-
configurable: true
|
|
2657
|
-
});
|
|
2658
|
-
return SkyListToolbarItemComponent;
|
|
2659
|
-
}());
|
|
2660
|
-
SkyListToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2661
|
-
SkyListToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarItemComponent, selector: "sky-list-toolbar-item", inputs: { id: "id", index: "index", location: "location" }, queries: [{ propertyName: "templates", predicate: i0.TemplateRef }], ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
2662
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemComponent, decorators: [{
|
|
2663
|
-
type: i0.Component,
|
|
2664
|
-
args: [{
|
|
2665
|
-
selector: 'sky-list-toolbar-item',
|
|
2666
|
-
template: '<ng-content></ng-content>',
|
|
2667
|
-
}]
|
|
2668
|
-
}], propDecorators: { id: [{
|
|
2669
|
-
type: i0.Input
|
|
2670
|
-
}], index: [{
|
|
2671
|
-
type: i0.Input
|
|
2672
|
-
}], location: [{
|
|
2673
|
-
type: i0.Input
|
|
2674
|
-
}], templates: [{
|
|
2675
|
-
type: i0.ContentChildren,
|
|
2676
|
-
args: [i0.TemplateRef]
|
|
2677
|
-
}] } });
|
|
2678
|
-
|
|
2679
|
-
/**
|
|
2680
|
-
* Displays custom actions in the toolbar beside to the search bar.
|
|
2681
|
-
*/
|
|
2682
|
-
var SkyListToolbarSearchActionsComponent = /** @class */ (function () {
|
|
2683
|
-
function SkyListToolbarSearchActionsComponent() {
|
|
2684
|
-
}
|
|
2685
|
-
return SkyListToolbarSearchActionsComponent;
|
|
2686
|
-
}());
|
|
2687
|
-
SkyListToolbarSearchActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSearchActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2688
|
-
SkyListToolbarSearchActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarSearchActionsComponent, selector: "sky-list-toolbar-search-actions", ngImport: i0__namespace, template: "<div class=\"sky-list-toolbar-search-actions\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-list-toolbar-search-actions{margin-left:10px}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2689
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSearchActionsComponent, decorators: [{
|
|
2690
|
-
type: i0.Component,
|
|
2691
|
-
args: [{
|
|
2692
|
-
selector: 'sky-list-toolbar-search-actions',
|
|
2693
|
-
template: "<div class=\"sky-list-toolbar-search-actions\">\n <ng-content></ng-content>\n</div>\n",
|
|
2694
|
-
styles: [".sky-list-toolbar-search-actions{margin-left:10px}\n"],
|
|
2695
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2696
|
-
}]
|
|
2697
|
-
}] });
|
|
2698
|
-
|
|
2699
|
-
/**
|
|
2700
|
-
* Adds a sort dropdown to the list toolbar.
|
|
2701
|
-
*/
|
|
2702
|
-
var SkyListToolbarSortComponent = /** @class */ (function () {
|
|
2703
|
-
function SkyListToolbarSortComponent() {
|
|
2704
|
-
}
|
|
2705
|
-
return SkyListToolbarSortComponent;
|
|
2706
|
-
}());
|
|
2707
|
-
SkyListToolbarSortComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSortComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2708
|
-
SkyListToolbarSortComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarSortComponent, selector: "sky-list-toolbar-sort", inputs: { label: "label", field: "field", type: "type", descending: "descending" }, ngImport: i0__namespace, template: '', isInline: true });
|
|
2709
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSortComponent, decorators: [{
|
|
2710
|
-
type: i0.Component,
|
|
2711
|
-
args: [{
|
|
2712
|
-
selector: 'sky-list-toolbar-sort',
|
|
2713
|
-
template: '',
|
|
2714
|
-
}]
|
|
2715
|
-
}], propDecorators: { label: [{
|
|
2716
|
-
type: i0.Input
|
|
2717
|
-
}], field: [{
|
|
2718
|
-
type: i0.Input
|
|
2719
|
-
}], type: [{
|
|
2720
|
-
type: i0.Input
|
|
2721
|
-
}], descending: [{
|
|
2722
|
-
type: i0.Input
|
|
2723
|
-
}] } });
|
|
2724
|
-
|
|
2725
|
-
/**
|
|
2726
|
-
* Adds a section on the right side of the toolbar for items that substantially change
|
|
2727
|
-
* or affect the view of the list. This includes simple filters and view switchers.
|
|
2728
|
-
* If the view section includes more than one item, simple filters appear on the left
|
|
2729
|
-
* and view switchers appear on the right.
|
|
2730
|
-
*/
|
|
2731
|
-
var SkyListToolbarViewActionsComponent = /** @class */ (function () {
|
|
2732
|
-
function SkyListToolbarViewActionsComponent() {
|
|
2733
|
-
}
|
|
2734
|
-
return SkyListToolbarViewActionsComponent;
|
|
2735
|
-
}());
|
|
2736
|
-
SkyListToolbarViewActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarViewActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2737
|
-
SkyListToolbarViewActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarViewActionsComponent, selector: "sky-list-toolbar-view-actions", ngImport: i0__namespace, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;align-items:center}:host::ng-deep>:not(:last-child){margin-right:5px}.sky-list-toolbar-view-actions ::ng-deep>:not(:last-child){margin-right:5px}\n"] });
|
|
2738
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarViewActionsComponent, decorators: [{
|
|
2739
|
-
type: i0.Component,
|
|
2740
|
-
args: [{
|
|
2741
|
-
selector: 'sky-list-toolbar-view-actions',
|
|
2742
|
-
template: "<ng-content></ng-content>\n",
|
|
2743
|
-
styles: [":host{display:flex;align-items:center}:host::ng-deep>:not(:last-child){margin-right:5px}.sky-list-toolbar-view-actions ::ng-deep>:not(:last-child){margin-right:5px}\n"],
|
|
2744
|
-
}]
|
|
2745
|
-
}] });
|
|
2746
|
-
|
|
2747
|
-
/**
|
|
2748
|
-
* @internal
|
|
2749
|
-
*/
|
|
2750
|
-
var ListToolbarConfigSetSearchEnabledAction = /** @class */ (function () {
|
|
2751
|
-
function ListToolbarConfigSetSearchEnabledAction(enabled) {
|
|
2752
|
-
this.enabled = enabled;
|
|
2753
|
-
}
|
|
2754
|
-
return ListToolbarConfigSetSearchEnabledAction;
|
|
2755
|
-
}());
|
|
2756
|
-
|
|
2757
|
-
/**
|
|
2758
|
-
* @internal
|
|
2759
|
-
*/
|
|
2760
|
-
var ListToolbarConfigSetSortSelectorEnabledAction = /** @class */ (function () {
|
|
2761
|
-
/* istanbul ignore next */
|
|
2762
|
-
function ListToolbarConfigSetSortSelectorEnabledAction(enabled) {
|
|
2763
|
-
if (enabled === void 0) { enabled = true; }
|
|
2764
|
-
this.enabled = enabled;
|
|
2765
|
-
}
|
|
2766
|
-
return ListToolbarConfigSetSortSelectorEnabledAction;
|
|
2767
|
-
}());
|
|
2768
|
-
|
|
2769
|
-
/**
|
|
2770
|
-
* @internal
|
|
2771
|
-
*/
|
|
2772
|
-
var ListToolbarConfigModel = /** @class */ (function () {
|
|
2773
|
-
function ListToolbarConfigModel(data) {
|
|
2774
|
-
this.searchEnabled = true;
|
|
2775
|
-
this.sortSelectorEnabled = true;
|
|
2776
|
-
if (data) {
|
|
2777
|
-
this.searchEnabled = data.searchEnabled;
|
|
2778
|
-
this.sortSelectorEnabled = data.sortSelectorEnabled;
|
|
2779
|
-
}
|
|
2780
|
-
}
|
|
2781
|
-
return ListToolbarConfigModel;
|
|
2782
|
-
}());
|
|
2783
|
-
|
|
2784
|
-
/**
|
|
2785
|
-
* @internal
|
|
2786
|
-
*/
|
|
2787
|
-
var ListToolbarStateModel = /** @class */ (function () {
|
|
2788
|
-
function ListToolbarStateModel() {
|
|
2789
|
-
this.config = new ListToolbarConfigModel();
|
|
2790
|
-
}
|
|
2791
|
-
return ListToolbarStateModel;
|
|
2792
|
-
}());
|
|
2793
|
-
|
|
2794
|
-
/**
|
|
2795
|
-
* @internal
|
|
2796
|
-
*/
|
|
2797
|
-
var ListToolbarStateDispatcher = /** @class */ (function (_super) {
|
|
2798
|
-
__extends(ListToolbarStateDispatcher, _super);
|
|
2799
|
-
function ListToolbarStateDispatcher() {
|
|
2800
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2801
|
-
}
|
|
2802
|
-
return ListToolbarStateDispatcher;
|
|
2803
|
-
}(listBuilderCommon.StateDispatcher));
|
|
2804
|
-
ListToolbarStateDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2805
|
-
ListToolbarStateDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher });
|
|
2806
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher, decorators: [{
|
|
2807
|
-
type: i0.Injectable
|
|
2808
|
-
}] });
|
|
2809
|
-
/**
|
|
2810
|
-
* @internal
|
|
2811
|
-
*/
|
|
2812
|
-
var ListToolbarStateOrchestrator = /** @class */ (function (_super) {
|
|
2813
|
-
__extends(ListToolbarStateOrchestrator, _super);
|
|
2814
|
-
function ListToolbarStateOrchestrator() {
|
|
2815
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2816
|
-
}
|
|
2817
|
-
return ListToolbarStateOrchestrator;
|
|
2818
|
-
}(listBuilderCommon.StateOrchestrator));
|
|
2819
|
-
|
|
2820
|
-
/**
|
|
2821
|
-
* @internal
|
|
2822
|
-
*/
|
|
2823
|
-
var ListToolbarConfigOrchestrator = /** @class */ (function (_super) {
|
|
2824
|
-
__extends(ListToolbarConfigOrchestrator, _super);
|
|
2825
|
-
/* istanbul ignore next */
|
|
2826
|
-
function ListToolbarConfigOrchestrator() {
|
|
2827
|
-
var _this = _super.call(this) || this;
|
|
2828
|
-
_this.register(ListToolbarConfigSetSearchEnabledAction, _this.setSearchEnabled).register(ListToolbarConfigSetSortSelectorEnabledAction, _this.setSortSelectorEnabled);
|
|
2829
|
-
return _this;
|
|
2830
|
-
}
|
|
2831
|
-
ListToolbarConfigOrchestrator.prototype.setSearchEnabled = function (state, action) {
|
|
2832
|
-
return new ListToolbarConfigModel(Object.assign({}, state, { searchEnabled: action.enabled }));
|
|
2833
|
-
};
|
|
2834
|
-
ListToolbarConfigOrchestrator.prototype.setSortSelectorEnabled = function (state, action) {
|
|
2835
|
-
return new ListToolbarConfigModel(Object.assign({}, state, { sortSelectorEnabled: action.enabled }));
|
|
2836
|
-
};
|
|
2837
|
-
return ListToolbarConfigOrchestrator;
|
|
2838
|
-
}(ListToolbarStateOrchestrator));
|
|
2839
|
-
|
|
2840
|
-
/**
|
|
2841
|
-
* @internal
|
|
2842
|
-
*/
|
|
2843
|
-
var ListToolbarState = /** @class */ (function (_super) {
|
|
2844
|
-
__extends(ListToolbarState, _super);
|
|
2845
|
-
function ListToolbarState(initialState, dispatcher) {
|
|
2846
|
-
var _this = _super.call(this, initialState, dispatcher) || this;
|
|
2847
|
-
_this.register('config', ListToolbarConfigOrchestrator).begin();
|
|
2848
|
-
return _this;
|
|
2849
|
-
}
|
|
2850
|
-
return ListToolbarState;
|
|
2851
|
-
}(listBuilderCommon.StateNode));
|
|
2852
|
-
ListToolbarState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState, deps: [{ token: ListToolbarStateModel }, { token: ListToolbarStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2853
|
-
ListToolbarState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState });
|
|
2854
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState, decorators: [{
|
|
2855
|
-
type: i0.Injectable
|
|
2856
|
-
}], ctorParameters: function () { return [{ type: ListToolbarStateModel }, { type: ListToolbarStateDispatcher }]; } });
|
|
2857
|
-
|
|
2858
|
-
var nextId = 0;
|
|
2859
|
-
/**
|
|
2860
|
-
* Displays a toolbar for a SKY UX-themed list of data.
|
|
2861
|
-
*/
|
|
2862
|
-
var SkyListToolbarComponent = /** @class */ (function () {
|
|
2863
|
-
function SkyListToolbarComponent(changeDetector, state, dispatcher, toolbarState, toolbarDispatcher) {
|
|
2864
|
-
this.changeDetector = changeDetector;
|
|
2865
|
-
this.state = state;
|
|
2866
|
-
this.dispatcher = dispatcher;
|
|
2867
|
-
this.toolbarState = toolbarState;
|
|
2868
|
-
this.toolbarDispatcher = toolbarDispatcher;
|
|
2869
|
-
/**
|
|
2870
|
-
* Display the search bar in the standard position or in a separate section.
|
|
2871
|
-
* To highlight the search bar in a section above all other toolbar items,
|
|
2872
|
-
* set this property to `search`.
|
|
2873
|
-
* @default "standard"
|
|
2874
|
-
*/
|
|
2875
|
-
this.toolbarType = 'standard';
|
|
2876
|
-
this.isToolbarDisabled = false;
|
|
2877
|
-
this.inlineFilterBarExpanded = false;
|
|
2878
|
-
this.hasAdditionalToolbarSection = false;
|
|
2879
|
-
this.hasViewActions = false;
|
|
2880
|
-
this.filterButtonId = "sky-list-toolbar-filter-button-" + ++nextId;
|
|
2881
|
-
this.listFilterInlineId = "sky-list-toolbar-filter-inline-" + ++nextId;
|
|
2882
|
-
/**
|
|
2883
|
-
* Fires when users submit a search.
|
|
2884
|
-
* @internal
|
|
2885
|
-
*/
|
|
2886
|
-
this.searchApplied = new rxjs.Subject();
|
|
2887
|
-
this.customItemIds = [];
|
|
2888
|
-
this.hasSortSelectors = false;
|
|
2889
|
-
this.inlineFiltersItemToolbarIndex = 5000;
|
|
2890
|
-
this.sortSelectorItemToolbarIndex = 6000;
|
|
2891
|
-
this.ngUnsubscribe = new rxjs.Subject();
|
|
2892
|
-
}
|
|
2893
|
-
Object.defineProperty(SkyListToolbarComponent.prototype, "inMemorySearchEnabled", {
|
|
2894
|
-
get: function () {
|
|
2895
|
-
if (this._inMemorySearchEnabled === undefined) {
|
|
2896
|
-
return true;
|
|
2897
|
-
}
|
|
2898
|
-
return this._inMemorySearchEnabled;
|
|
2899
|
-
},
|
|
2900
|
-
/**
|
|
2901
|
-
* Indicates whether to use the in-memory search.
|
|
2902
|
-
* Setting this to `false` will allow consumers to run their own searches remotely,
|
|
2903
|
-
* and push new values to the list component by updating the `data` property.
|
|
2904
|
-
* @default true
|
|
2905
|
-
* @internal
|
|
2906
|
-
*/
|
|
2907
|
-
set: function (value) {
|
|
2908
|
-
this._inMemorySearchEnabled = value;
|
|
2909
|
-
},
|
|
2910
|
-
enumerable: false,
|
|
2911
|
-
configurable: true
|
|
2912
|
-
});
|
|
2913
|
-
Object.defineProperty(SkyListToolbarComponent.prototype, "isFilterBarDisplayed", {
|
|
2914
|
-
get: function () {
|
|
2915
|
-
return (!this.isToolbarDisabled &&
|
|
2916
|
-
this.hasInlineFilters &&
|
|
2917
|
-
this.inlineFilterBarExpanded);
|
|
2918
|
-
},
|
|
2919
|
-
enumerable: false,
|
|
2920
|
-
configurable: true
|
|
2921
|
-
});
|
|
2922
|
-
Object.defineProperty(SkyListToolbarComponent.prototype, "filterButtonAriaControls", {
|
|
2923
|
-
get: function () {
|
|
2924
|
-
return this.isFilterBarDisplayed ? this.listFilterInlineId : undefined;
|
|
2925
|
-
},
|
|
2926
|
-
enumerable: false,
|
|
2927
|
-
configurable: true
|
|
2928
|
-
});
|
|
2929
|
-
SkyListToolbarComponent.prototype.ngOnInit = function () {
|
|
2930
|
-
var _this = this;
|
|
2931
|
-
this.dispatcher.toolbarExists(true);
|
|
2932
|
-
listBuilderCommon.getValue(this.searchText, function (searchText) {
|
|
2933
|
-
_this.updateSearchText(searchText);
|
|
2934
|
-
});
|
|
2935
|
-
listBuilderCommon.getValue(this.searchEnabled, function (searchEnabled) {
|
|
2936
|
-
_this.toolbarDispatcher.next(new ListToolbarConfigSetSearchEnabledAction(searchEnabled === undefined ? true : searchEnabled));
|
|
2937
|
-
});
|
|
2938
|
-
listBuilderCommon.getValue(this.toolbarType, function (type) {
|
|
2939
|
-
_this.dispatcher.next(new ListToolbarSetTypeAction(_this.toolbarType));
|
|
2940
|
-
});
|
|
2941
|
-
listBuilderCommon.getValue(this.sortSelectorEnabled, function (sortSelectorEnabled) {
|
|
2942
|
-
_this.toolbarDispatcher.next(new ListToolbarConfigSetSortSelectorEnabledAction(sortSelectorEnabled === undefined ? true : sortSelectorEnabled));
|
|
2943
|
-
});
|
|
2944
|
-
this.sortSelectors = this.getSortSelectors();
|
|
2945
|
-
// Initialize the sort toolbar item if necessary
|
|
2946
|
-
this.sortSelectors
|
|
2947
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged())
|
|
2948
|
-
.subscribe(function (currentSort) {
|
|
2949
|
-
if (currentSort.length > 0 && !_this.hasSortSelectors) {
|
|
2950
|
-
_this.hasSortSelectors = true;
|
|
2951
|
-
_this.dispatcher.toolbarAddItems([
|
|
2952
|
-
new ListToolbarItemModel({
|
|
2953
|
-
id: 'sort-selector',
|
|
2954
|
-
template: _this.sortSelectorTemplate,
|
|
2955
|
-
location: 'left',
|
|
2956
|
-
index: _this.sortSelectorItemToolbarIndex,
|
|
2957
|
-
}),
|
|
2958
|
-
]);
|
|
2959
|
-
}
|
|
2960
|
-
else if (currentSort.length < 1 && _this.hasSortSelectors) {
|
|
2961
|
-
_this.hasSortSelectors = false;
|
|
2962
|
-
_this.dispatcher.toolbarRemoveItems(['sort-selector']);
|
|
2963
|
-
}
|
|
2964
|
-
});
|
|
2965
|
-
this.searchTextInput = this.state.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (s) { return s.search.searchText; }), operators.distinctUntilChanged());
|
|
2966
|
-
this.view = this.state.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (s) { return s.views.active; }), operators.distinctUntilChanged());
|
|
2967
|
-
this.watchTemplates();
|
|
2968
|
-
this.type = this.state.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (state) { return state.toolbar.type; }), operators.distinctUntilChanged());
|
|
2969
|
-
this.type.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (toolbarType) {
|
|
2970
|
-
if (toolbarType === 'search') {
|
|
2971
|
-
_this.dispatcher.toolbarRemoveItems(['search']);
|
|
2972
|
-
}
|
|
2973
|
-
else {
|
|
2974
|
-
_this.dispatcher.toolbarAddItems([
|
|
2975
|
-
new ListToolbarItemModel({
|
|
2976
|
-
id: 'search',
|
|
2977
|
-
template: _this.searchTemplate,
|
|
2978
|
-
location: 'right',
|
|
2979
|
-
}),
|
|
2980
|
-
]);
|
|
2981
|
-
}
|
|
2982
|
-
});
|
|
2983
|
-
this.isSearchEnabled = this.toolbarState.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (s) { return s.config; }), operators.distinctUntilChanged(), operators.map(function (c) { return c.searchEnabled; }));
|
|
2984
|
-
this.state
|
|
2985
|
-
.pipe(operators.map(function (s) { return s.toolbar; }), operators.takeUntil(this.ngUnsubscribe), operators.distinctUntilChanged(), operators.map(function (c) { return c.disabled; }))
|
|
2986
|
-
.subscribe(function (isDisabled) { return (_this.isToolbarDisabled = isDisabled); });
|
|
2987
|
-
this.isSortSelectorEnabled = this.toolbarState.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (s) { return s.config; }), operators.distinctUntilChanged(), operators.map(function (c) { return c.sortSelectorEnabled; }));
|
|
2988
|
-
this.isMultiselectEnabled = this.state.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (s) { return s.toolbar; }), operators.distinctUntilChanged(), operators.map(function (t) { return t.showMultiselectToolbar; }));
|
|
2989
|
-
this.hasAppliedFilters = this.state.pipe(operators.takeUntil(this.ngUnsubscribe), operators.map(function (s) { return s.filters; }), operators.distinctUntilChanged(), operators.map(function (filters) {
|
|
2990
|
-
var activeFilters = filters.filter(function (f) {
|
|
2991
|
-
return (f.value !== '' &&
|
|
2992
|
-
f.value !== undefined &&
|
|
2993
|
-
f.value !== false &&
|
|
2994
|
-
f.value !== f.defaultValue);
|
|
2995
|
-
});
|
|
2996
|
-
return activeFilters.length > 0;
|
|
2997
|
-
}));
|
|
2998
|
-
this.state.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (current) {
|
|
2999
|
-
_this.hasAdditionalToolbarSection = current.toolbar.items.length > 0;
|
|
3000
|
-
_this.changeDetector.detectChanges();
|
|
3001
|
-
});
|
|
3002
|
-
};
|
|
3003
|
-
SkyListToolbarComponent.prototype.ngAfterContentInit = function () {
|
|
3004
|
-
var _this = this;
|
|
3005
|
-
// Inject custom toolbar items.
|
|
3006
|
-
this.toolbarItems.forEach(function (toolbarItem) {
|
|
3007
|
-
_this.dispatcher.toolbarAddItems([new ListToolbarItemModel(toolbarItem)]);
|
|
3008
|
-
_this.customItemIds.push(toolbarItem.id);
|
|
3009
|
-
});
|
|
3010
|
-
this.toolbarItems.changes
|
|
3011
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
3012
|
-
.subscribe(function (newItems) {
|
|
3013
|
-
newItems.forEach(function (item) {
|
|
3014
|
-
if (_this.customItemIds.indexOf(item.id) < 0) {
|
|
3015
|
-
_this.dispatcher.toolbarAddItems([new ListToolbarItemModel(item)]);
|
|
3016
|
-
_this.customItemIds.push(item.id);
|
|
3017
|
-
}
|
|
3018
|
-
});
|
|
3019
|
-
var itemsToRemove = [];
|
|
3020
|
-
_this.customItemIds.forEach(function (itemId, index) {
|
|
3021
|
-
if (!newItems.find(function (item) { return item.id === itemId; })) {
|
|
3022
|
-
itemsToRemove.push(itemId);
|
|
3023
|
-
_this.customItemIds.splice(index, 1);
|
|
3024
|
-
}
|
|
3025
|
-
});
|
|
3026
|
-
_this.dispatcher.toolbarRemoveItems(itemsToRemove);
|
|
3027
|
-
});
|
|
3028
|
-
var sortModels = this.toolbarSorts.map(function (sort) { return new ListSortLabelModel({
|
|
3029
|
-
text: sort.label,
|
|
3030
|
-
fieldSelector: sort.field,
|
|
3031
|
-
fieldType: sort.type,
|
|
3032
|
-
global: true,
|
|
3033
|
-
descending: sort.descending,
|
|
3034
|
-
}); });
|
|
3035
|
-
this.dispatcher.sortSetGlobal(sortModels);
|
|
3036
|
-
// Add inline filters.
|
|
3037
|
-
this.showFilterSummary = this.filterSummary.length > 0;
|
|
3038
|
-
this.hasInlineFilters = this.inlineFilter.length > 0;
|
|
3039
|
-
if (this.hasInlineFilters) {
|
|
3040
|
-
this.dispatcher.toolbarAddItems([
|
|
3041
|
-
new ListToolbarItemModel({
|
|
3042
|
-
template: this.inlineFilterButtonTemplate,
|
|
3043
|
-
location: 'left',
|
|
3044
|
-
index: this.inlineFiltersItemToolbarIndex,
|
|
3045
|
-
}),
|
|
3046
|
-
]);
|
|
3047
|
-
}
|
|
3048
|
-
// Check for view actions
|
|
3049
|
-
this.hasViewActions = this.viewActions.length > 0;
|
|
3050
|
-
};
|
|
3051
|
-
SkyListToolbarComponent.prototype.ngOnDestroy = function () {
|
|
3052
|
-
this.searchApplied.complete();
|
|
3053
|
-
this.ngUnsubscribe.next();
|
|
3054
|
-
this.ngUnsubscribe.complete();
|
|
3055
|
-
};
|
|
3056
|
-
SkyListToolbarComponent.prototype.setSort = function (sort) {
|
|
3057
|
-
var _this = this;
|
|
3058
|
-
this.state.pipe(operators.take(1)).subscribe(function (currentState) {
|
|
3059
|
-
if (currentState.paging.pageNumber &&
|
|
3060
|
-
currentState.paging.pageNumber !== 1) {
|
|
3061
|
-
_this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
3062
|
-
}
|
|
3063
|
-
_this.dispatcher.sortSetFieldSelectors([
|
|
3064
|
-
{ fieldSelector: sort.fieldSelector, descending: sort.descending },
|
|
3065
|
-
]);
|
|
3066
|
-
});
|
|
3067
|
-
};
|
|
3068
|
-
SkyListToolbarComponent.prototype.inlineFilterButtonClick = function () {
|
|
3069
|
-
this.inlineFilterBarExpanded = !this.inlineFilterBarExpanded;
|
|
3070
|
-
};
|
|
3071
|
-
SkyListToolbarComponent.prototype.updateSearchText = function (searchText) {
|
|
3072
|
-
var _this = this;
|
|
3073
|
-
this.searchApplied.next(searchText);
|
|
3074
|
-
if (this.inMemorySearchEnabled) {
|
|
3075
|
-
this.state.pipe(operators.take(1)).subscribe(function (currentState) {
|
|
3076
|
-
if (currentState.paging.pageNumber &&
|
|
3077
|
-
currentState.paging.pageNumber !== 1) {
|
|
3078
|
-
_this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
3079
|
-
}
|
|
3080
|
-
_this.dispatcher.searchSetText(searchText);
|
|
3081
|
-
});
|
|
3082
|
-
}
|
|
3083
|
-
};
|
|
3084
|
-
SkyListToolbarComponent.prototype.itemIsInView = function (itemView, activeView) {
|
|
3085
|
-
return itemView === undefined || itemView === activeView;
|
|
3086
|
-
};
|
|
3087
|
-
SkyListToolbarComponent.prototype.getSortSelectors = function () {
|
|
3088
|
-
return rxjs.combineLatest(this.state.pipe(operators.map(function (s) { return s.sort.available; }), operators.distinctUntilChanged()), this.state.pipe(operators.map(function (s) { return s.sort.global; }), operators.distinctUntilChanged()), this.state.pipe(operators.map(function (s) { return s.sort.fieldSelectors; }), operators.distinctUntilChanged()), function (available, global, fieldSelectors) {
|
|
3089
|
-
// Get sorts that are in the global that are not in the available
|
|
3090
|
-
var sorts = global.filter(function (g) { return available.filter(function (a) { return a.fieldSelector === g.fieldSelector; })
|
|
3091
|
-
.length === 0; });
|
|
3092
|
-
var resultSortSelectors = __spreadArray(__spreadArray([], __read(sorts)), __read(available)).map(function (sortLabels) {
|
|
3093
|
-
var fs = fieldSelectors.filter(function (f) {
|
|
3094
|
-
return (f.fieldSelector === sortLabels.fieldSelector &&
|
|
3095
|
-
f.descending === sortLabels.descending);
|
|
3096
|
-
});
|
|
3097
|
-
var selected = false;
|
|
3098
|
-
if (fs.length > 0) {
|
|
3099
|
-
selected = true;
|
|
3100
|
-
}
|
|
3101
|
-
return {
|
|
3102
|
-
sort: sortLabels,
|
|
3103
|
-
selected: selected,
|
|
3104
|
-
};
|
|
3105
|
-
});
|
|
3106
|
-
return resultSortSelectors;
|
|
3107
|
-
}).pipe(operators.takeUntil(this.ngUnsubscribe));
|
|
3108
|
-
};
|
|
3109
|
-
SkyListToolbarComponent.prototype.watchTemplates = function () {
|
|
3110
|
-
var _this = this;
|
|
3111
|
-
rxjs.combineLatest(this.state.pipe(operators.map(function (s) { return s.toolbar; }), operators.distinctUntilChanged()), this.view.pipe(operators.distinctUntilChanged()), function (toolbar, view) {
|
|
3112
|
-
var items = toolbar.items.filter(function (i) {
|
|
3113
|
-
return _this.itemIsInView(i.view, view);
|
|
3114
|
-
});
|
|
3115
|
-
var templates = {};
|
|
3116
|
-
items.forEach(function (item) {
|
|
3117
|
-
templates[item.location] = templates[item.location] || [];
|
|
3118
|
-
templates[item.location].push(item);
|
|
3119
|
-
});
|
|
3120
|
-
return templates;
|
|
3121
|
-
})
|
|
3122
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
3123
|
-
.subscribe(function (value) {
|
|
3124
|
-
_this.leftTemplates = value.left;
|
|
3125
|
-
_this.centerTemplates = value.center;
|
|
3126
|
-
_this.rightTemplates = value.right;
|
|
3127
|
-
_this.changeDetector.markForCheck();
|
|
3128
|
-
});
|
|
3129
|
-
};
|
|
3130
|
-
return SkyListToolbarComponent;
|
|
3131
|
-
}());
|
|
3132
|
-
SkyListToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: ListState }, { token: ListStateDispatcher }, { token: ListToolbarState }, { token: ListToolbarStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3133
|
-
SkyListToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarComponent, selector: "sky-list-toolbar", inputs: { inMemorySearchEnabled: "inMemorySearchEnabled", placeholder: "placeholder", searchEnabled: "searchEnabled", sortSelectorEnabled: "sortSelectorEnabled", toolbarType: "toolbarType", searchText: "searchText" }, providers: [
|
|
3134
|
-
ListToolbarState,
|
|
3135
|
-
ListToolbarStateDispatcher,
|
|
3136
|
-
ListToolbarStateModel,
|
|
3137
|
-
], queries: [{ propertyName: "toolbarItems", predicate: SkyListToolbarItemComponent }, { propertyName: "toolbarSorts", predicate: SkyListToolbarSortComponent }, { propertyName: "filterSummary", predicate: SkyListFilterSummaryComponent }, { propertyName: "inlineFilter", predicate: SkyListFilterInlineComponent }, { propertyName: "viewActions", predicate: SkyListToolbarViewActionsComponent }], viewQueries: [{ propertyName: "searchComponent", first: true, predicate: i8.SkySearchComponent, descendants: true, read: i8.SkySearchComponent }, { propertyName: "searchTemplate", first: true, predicate: ["search"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "sortSelectorTemplate", first: true, predicate: ["sortSelector"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "inlineFilterButtonTemplate", first: true, predicate: ["inlineFilterButton"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<div class=\"sky-list-toolbar-container\">\n <sky-toolbar *ngIf=\"(type | async) !== 'search'\">\n <sky-toolbar-section>\n <sky-toolbar-item *ngFor=\"let item of leftTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item *ngFor=\"let item of centerTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item\n *ngFor=\"let item of rightTemplates\"\n [attr.sky-toolbar-id]=\"item.id\"\n >\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n\n <ng-content></ng-content>\n\n <sky-toolbar-view-actions *ngIf=\"hasViewActions\">\n <ng-content select=\"sky-list-toolbar-view-actions\"> </ng-content>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n\n <sky-toolbar-section\n *ngIf=\"showFilterSummary && (hasAppliedFilters | async)\"\n >\n <ng-content select=\"sky-list-filter-summary\"> </ng-content>\n </sky-toolbar-section>\n </sky-toolbar>\n\n <div\n *ngIf=\"\n (type | async) === 'search' &&\n ((isSearchEnabled | async) || hasAdditionalToolbarSection)\n \"\n class=\"sky-list-toolbar-search\"\n >\n <sky-toolbar>\n <sky-toolbar-section *ngIf=\"isSearchEnabled | async\">\n <sky-toolbar-item>\n <sky-list-toolbar-item-renderer\n sky-cmp-id=\"search\"\n [template]=\"search\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n </sky-toolbar-section>\n <sky-toolbar-section [hidden]=\"!hasAdditionalToolbarSection\">\n <sky-toolbar-item *ngFor=\"let item of leftTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item *ngFor=\"let item of centerTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item\n *ngFor=\"let item of rightTemplates\"\n [attr.sky-toolbar-id]=\"item.id\"\n >\n <sky-list-toolbar-item-renderer\n *ngIf=\"item.id !== 'search'\"\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <ng-content></ng-content>\n\n <sky-toolbar-view-actions *ngIf=\"hasViewActions\">\n <ng-content select=\"sky-list-toolbar-view-actions\"> </ng-content>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"isFilterBarDisplayed\"\n [attr.aria-labelledby]=\"filterButtonId\"\n [id]=\"listFilterInlineId\"\n >\n <ng-content select=\"sky-list-filter-inline\"> </ng-content>\n </div>\n <sky-list-multiselect-toolbar *ngIf=\"isMultiselectEnabled | async\">\n </sky-list-multiselect-toolbar>\n</div>\n\n<ng-template #search>\n <div *ngIf=\"isSearchEnabled | async\" class=\"sky-list-toolbar-search-wrapper\">\n <sky-search\n [disabled]=\"isToolbarDisabled\"\n [expandMode]=\"(type | async) === 'search' ? 'fit' : 'responsive'\"\n [placeholderText]=\"placeholder\"\n [searchText]=\"searchTextInput | async\"\n (searchApply)=\"updateSearchText($event)\"\n >\n </sky-search>\n <ng-content select=\"sky-list-toolbar-search-actions\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortSelector>\n <div\n *ngIf=\"\n (isSortSelectorEnabled | async) && (sortSelectors | async).length > 0\n \"\n class=\"sky-toolbar-item-sort-container\"\n >\n <sky-sort [showButtonText]=\"true\">\n <sky-sort-item\n *ngFor=\"let item of sortSelectors | async\"\n [active]=\"item.selected\"\n (itemSelect)=\"setSort(item.sort)\"\n >\n {{ item.sort.text }}\n </sky-sort-item>\n </sky-sort>\n </div>\n</ng-template>\n\n<ng-template #inlineFilterButton>\n <sky-filter-button\n [active]=\"hasAppliedFilters | async\"\n [ariaControls]=\"filterButtonAriaControls\"\n [ariaExpanded]=\"inlineFilterBarExpanded\"\n [disabled]=\"isToolbarDisabled\"\n [filterButtonId]=\"filterButtonId\"\n [showButtonText]=\"true\"\n (filterButtonClick)=\"inlineFilterButtonClick()\"\n >\n </sky-filter-button>\n</ng-template>\n", styles: [".sky-list-toolbar-search-wrapper{display:flex}.sky-list-toolbar-search-wrapper ::ng-deep .sky-search-dismiss-absolute{padding:0;position:static}.sky-list-toolbar-search-wrapper ::ng-deep .sky-search-container{position:relative;height:100%}.sky-list-toolbar-search-wrapper ::ng-deep sky-search{flex:1 1 auto}.sky-list-toolbar-search-wrapper ::ng-deep sky-list-toolbar-search-actions{flex:0 0 auto;z-index:1}.sky-list-toolbar-container ::ng-deep .sky-toolbar-section-items sky-toolbar-item{flex:0 1 auto;align-self:flex-start}.sky-list-toolbar-search ::ng-deep .sky-toolbar-section{padding-top:0}.sky-list-toolbar-search ::ng-deep .sky-toolbar-section-items{display:block;width:100%}.sky-list-toolbar-search ::ng-deep .sky-toolbar-item{margin:0}.sky-list-toolbar-search ::ng-deep .sky-toolbar-container,.sky-list-toolbar-search ::ng-deep .sky-search-dismiss-absolute{background-color:#eeeeef}.sky-list-toolbar-search ::ng-deep input[type=text]:disabled,.sky-list-toolbar-search ::ng-deep .sky-search-btn:disabled{background-color:#cdcfd2;opacity:1}.sky-list-toolbar-container ::ng-deep sky-toolbar-item[sky-toolbar-id=sort-selector] .sky-toolbar-item{margin-right:0}.sky-list-toolbar-container ::ng-deep sky-checkbox{position:relative;top:-2px}\n"], components: [{ type: i3__namespace$2.λ37, selector: "sky-toolbar" }, { type: i3__namespace$2.λ38, selector: "sky-toolbar-section" }, { type: i3__namespace$2.λ39, selector: "sky-toolbar-item" }, { type: SkyListToolbarItemRendererComponent, selector: "sky-list-toolbar-item-renderer", inputs: ["template"] }, { type: i3__namespace$2.λ40, selector: "sky-toolbar-view-actions" }, { type: SkyListMultiselectToolbarComponent, selector: "sky-list-multiselect-toolbar", inputs: ["showOnlySelected"] }, { type: i8__namespace.SkySearchComponent, selector: "sky-search", inputs: ["searchText", "expandMode", "debounceTime", "disabled", "placeholderText"], outputs: ["searchApply", "searchChange", "searchClear"] }, { type: i3__namespace.λ14, selector: "sky-sort", inputs: ["showButtonText"] }, { type: i3__namespace.λ13, selector: "sky-sort-item", inputs: ["active"], outputs: ["itemSelect"] }, { type: i3__namespace.λ1, selector: "sky-filter-button", inputs: ["filterButtonId", "ariaControls", "ariaExpanded", "active", "disabled", "showButtonText"], outputs: ["filterButtonClick"] }], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
3138
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarComponent, decorators: [{
|
|
3139
|
-
type: i0.Component,
|
|
3140
|
-
args: [{
|
|
3141
|
-
selector: 'sky-list-toolbar',
|
|
3142
|
-
template: "<div class=\"sky-list-toolbar-container\">\n <sky-toolbar *ngIf=\"(type | async) !== 'search'\">\n <sky-toolbar-section>\n <sky-toolbar-item *ngFor=\"let item of leftTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item *ngFor=\"let item of centerTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item\n *ngFor=\"let item of rightTemplates\"\n [attr.sky-toolbar-id]=\"item.id\"\n >\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n\n <ng-content></ng-content>\n\n <sky-toolbar-view-actions *ngIf=\"hasViewActions\">\n <ng-content select=\"sky-list-toolbar-view-actions\"> </ng-content>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n\n <sky-toolbar-section\n *ngIf=\"showFilterSummary && (hasAppliedFilters | async)\"\n >\n <ng-content select=\"sky-list-filter-summary\"> </ng-content>\n </sky-toolbar-section>\n </sky-toolbar>\n\n <div\n *ngIf=\"\n (type | async) === 'search' &&\n ((isSearchEnabled | async) || hasAdditionalToolbarSection)\n \"\n class=\"sky-list-toolbar-search\"\n >\n <sky-toolbar>\n <sky-toolbar-section *ngIf=\"isSearchEnabled | async\">\n <sky-toolbar-item>\n <sky-list-toolbar-item-renderer\n sky-cmp-id=\"search\"\n [template]=\"search\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n </sky-toolbar-section>\n <sky-toolbar-section [hidden]=\"!hasAdditionalToolbarSection\">\n <sky-toolbar-item *ngFor=\"let item of leftTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item *ngFor=\"let item of centerTemplates\">\n <sky-list-toolbar-item-renderer\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <sky-toolbar-item\n *ngFor=\"let item of rightTemplates\"\n [attr.sky-toolbar-id]=\"item.id\"\n >\n <sky-list-toolbar-item-renderer\n *ngIf=\"item.id !== 'search'\"\n [attr.sky-cmp-id]=\"item.id\"\n [template]=\"item.template\"\n >\n </sky-list-toolbar-item-renderer>\n </sky-toolbar-item>\n <ng-content></ng-content>\n\n <sky-toolbar-view-actions *ngIf=\"hasViewActions\">\n <ng-content select=\"sky-list-toolbar-view-actions\"> </ng-content>\n </sky-toolbar-view-actions>\n </sky-toolbar-section>\n </sky-toolbar>\n </div>\n <div\n *ngIf=\"isFilterBarDisplayed\"\n [attr.aria-labelledby]=\"filterButtonId\"\n [id]=\"listFilterInlineId\"\n >\n <ng-content select=\"sky-list-filter-inline\"> </ng-content>\n </div>\n <sky-list-multiselect-toolbar *ngIf=\"isMultiselectEnabled | async\">\n </sky-list-multiselect-toolbar>\n</div>\n\n<ng-template #search>\n <div *ngIf=\"isSearchEnabled | async\" class=\"sky-list-toolbar-search-wrapper\">\n <sky-search\n [disabled]=\"isToolbarDisabled\"\n [expandMode]=\"(type | async) === 'search' ? 'fit' : 'responsive'\"\n [placeholderText]=\"placeholder\"\n [searchText]=\"searchTextInput | async\"\n (searchApply)=\"updateSearchText($event)\"\n >\n </sky-search>\n <ng-content select=\"sky-list-toolbar-search-actions\"></ng-content>\n </div>\n</ng-template>\n\n<ng-template #sortSelector>\n <div\n *ngIf=\"\n (isSortSelectorEnabled | async) && (sortSelectors | async).length > 0\n \"\n class=\"sky-toolbar-item-sort-container\"\n >\n <sky-sort [showButtonText]=\"true\">\n <sky-sort-item\n *ngFor=\"let item of sortSelectors | async\"\n [active]=\"item.selected\"\n (itemSelect)=\"setSort(item.sort)\"\n >\n {{ item.sort.text }}\n </sky-sort-item>\n </sky-sort>\n </div>\n</ng-template>\n\n<ng-template #inlineFilterButton>\n <sky-filter-button\n [active]=\"hasAppliedFilters | async\"\n [ariaControls]=\"filterButtonAriaControls\"\n [ariaExpanded]=\"inlineFilterBarExpanded\"\n [disabled]=\"isToolbarDisabled\"\n [filterButtonId]=\"filterButtonId\"\n [showButtonText]=\"true\"\n (filterButtonClick)=\"inlineFilterButtonClick()\"\n >\n </sky-filter-button>\n</ng-template>\n",
|
|
3143
|
-
styles: [".sky-list-toolbar-search-wrapper{display:flex}.sky-list-toolbar-search-wrapper ::ng-deep .sky-search-dismiss-absolute{padding:0;position:static}.sky-list-toolbar-search-wrapper ::ng-deep .sky-search-container{position:relative;height:100%}.sky-list-toolbar-search-wrapper ::ng-deep sky-search{flex:1 1 auto}.sky-list-toolbar-search-wrapper ::ng-deep sky-list-toolbar-search-actions{flex:0 0 auto;z-index:1}.sky-list-toolbar-container ::ng-deep .sky-toolbar-section-items sky-toolbar-item{flex:0 1 auto;align-self:flex-start}.sky-list-toolbar-search ::ng-deep .sky-toolbar-section{padding-top:0}.sky-list-toolbar-search ::ng-deep .sky-toolbar-section-items{display:block;width:100%}.sky-list-toolbar-search ::ng-deep .sky-toolbar-item{margin:0}.sky-list-toolbar-search ::ng-deep .sky-toolbar-container,.sky-list-toolbar-search ::ng-deep .sky-search-dismiss-absolute{background-color:#eeeeef}.sky-list-toolbar-search ::ng-deep input[type=text]:disabled,.sky-list-toolbar-search ::ng-deep .sky-search-btn:disabled{background-color:#cdcfd2;opacity:1}.sky-list-toolbar-container ::ng-deep sky-toolbar-item[sky-toolbar-id=sort-selector] .sky-toolbar-item{margin-right:0}.sky-list-toolbar-container ::ng-deep sky-checkbox{position:relative;top:-2px}\n"],
|
|
3144
|
-
providers: [
|
|
3145
|
-
ListToolbarState,
|
|
3146
|
-
ListToolbarStateDispatcher,
|
|
3147
|
-
ListToolbarStateModel,
|
|
3148
|
-
],
|
|
3149
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3150
|
-
}]
|
|
3151
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: ListState }, { type: ListStateDispatcher }, { type: ListToolbarState }, { type: ListToolbarStateDispatcher }]; }, propDecorators: { inMemorySearchEnabled: [{
|
|
3152
|
-
type: i0.Input
|
|
3153
|
-
}], placeholder: [{
|
|
3154
|
-
type: i0.Input
|
|
3155
|
-
}], searchEnabled: [{
|
|
3156
|
-
type: i0.Input
|
|
3157
|
-
}], searchComponent: [{
|
|
3158
|
-
type: i0.ViewChild,
|
|
3159
|
-
args: [i8.SkySearchComponent, {
|
|
3160
|
-
read: i8.SkySearchComponent,
|
|
3161
|
-
static: false,
|
|
3162
|
-
}]
|
|
3163
|
-
}], sortSelectorEnabled: [{
|
|
3164
|
-
type: i0.Input
|
|
3165
|
-
}], toolbarType: [{
|
|
3166
|
-
type: i0.Input
|
|
3167
|
-
}], searchText: [{
|
|
3168
|
-
type: i0.Input
|
|
3169
|
-
}], toolbarItems: [{
|
|
3170
|
-
type: i0.ContentChildren,
|
|
3171
|
-
args: [SkyListToolbarItemComponent]
|
|
3172
|
-
}], toolbarSorts: [{
|
|
3173
|
-
type: i0.ContentChildren,
|
|
3174
|
-
args: [SkyListToolbarSortComponent]
|
|
3175
|
-
}], filterSummary: [{
|
|
3176
|
-
type: i0.ContentChildren,
|
|
3177
|
-
args: [SkyListFilterSummaryComponent]
|
|
3178
|
-
}], inlineFilter: [{
|
|
3179
|
-
type: i0.ContentChildren,
|
|
3180
|
-
args: [SkyListFilterInlineComponent]
|
|
3181
|
-
}], viewActions: [{
|
|
3182
|
-
type: i0.ContentChildren,
|
|
3183
|
-
args: [SkyListToolbarViewActionsComponent]
|
|
3184
|
-
}], searchTemplate: [{
|
|
3185
|
-
type: i0.ViewChild,
|
|
3186
|
-
args: ['search', {
|
|
3187
|
-
read: i0.TemplateRef,
|
|
3188
|
-
static: true,
|
|
3189
|
-
}]
|
|
3190
|
-
}], sortSelectorTemplate: [{
|
|
3191
|
-
type: i0.ViewChild,
|
|
3192
|
-
args: ['sortSelector', {
|
|
3193
|
-
read: i0.TemplateRef,
|
|
3194
|
-
static: true,
|
|
3195
|
-
}]
|
|
3196
|
-
}], inlineFilterButtonTemplate: [{
|
|
3197
|
-
type: i0.ViewChild,
|
|
3198
|
-
args: ['inlineFilterButton', {
|
|
3199
|
-
read: i0.TemplateRef,
|
|
3200
|
-
static: true,
|
|
3201
|
-
}]
|
|
3202
|
-
}] } });
|
|
3203
|
-
|
|
3204
|
-
var SkyListToolbarModule = /** @class */ (function () {
|
|
3205
|
-
function SkyListToolbarModule() {
|
|
3206
|
-
}
|
|
3207
|
-
return SkyListToolbarModule;
|
|
3208
|
-
}());
|
|
3209
|
-
SkyListToolbarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3210
|
-
SkyListToolbarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarModule, declarations: [SkyListToolbarComponent,
|
|
3211
|
-
SkyListToolbarItemComponent,
|
|
3212
|
-
SkyListToolbarItemRendererComponent,
|
|
3213
|
-
SkyListMultiselectToolbarComponent,
|
|
3214
|
-
SkyListToolbarSearchActionsComponent,
|
|
3215
|
-
SkyListToolbarSortComponent,
|
|
3216
|
-
SkyListToolbarViewActionsComponent], imports: [i4.CommonModule,
|
|
3217
|
-
i5$1.SkyCheckboxModule,
|
|
3218
|
-
i5.SkyI18nModule,
|
|
3219
|
-
i3$2.SkyToolbarModule,
|
|
3220
|
-
i8.SkySearchModule,
|
|
3221
|
-
i3.SkySortModule,
|
|
3222
|
-
i3.SkyFilterModule,
|
|
3223
|
-
SkyListFiltersModule,
|
|
3224
|
-
i3$1.SkyIconModule,
|
|
3225
|
-
SkyListBuilderResourcesModule], exports: [SkyListToolbarComponent,
|
|
3226
|
-
SkyListToolbarItemComponent,
|
|
3227
|
-
SkyListToolbarSearchActionsComponent,
|
|
3228
|
-
SkyListToolbarSortComponent,
|
|
3229
|
-
SkyListToolbarViewActionsComponent] });
|
|
3230
|
-
SkyListToolbarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarModule, imports: [[
|
|
3231
|
-
i4.CommonModule,
|
|
3232
|
-
i5$1.SkyCheckboxModule,
|
|
3233
|
-
i5.SkyI18nModule,
|
|
3234
|
-
i3$2.SkyToolbarModule,
|
|
3235
|
-
i8.SkySearchModule,
|
|
3236
|
-
i3.SkySortModule,
|
|
3237
|
-
i3.SkyFilterModule,
|
|
3238
|
-
SkyListFiltersModule,
|
|
3239
|
-
i3$1.SkyIconModule,
|
|
3240
|
-
SkyListBuilderResourcesModule,
|
|
3241
|
-
]] });
|
|
3242
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarModule, decorators: [{
|
|
3243
|
-
type: i0.NgModule,
|
|
3244
|
-
args: [{
|
|
3245
|
-
declarations: [
|
|
3246
|
-
SkyListToolbarComponent,
|
|
3247
|
-
SkyListToolbarItemComponent,
|
|
3248
|
-
SkyListToolbarItemRendererComponent,
|
|
3249
|
-
SkyListMultiselectToolbarComponent,
|
|
3250
|
-
SkyListToolbarSearchActionsComponent,
|
|
3251
|
-
SkyListToolbarSortComponent,
|
|
3252
|
-
SkyListToolbarViewActionsComponent,
|
|
3253
|
-
],
|
|
3254
|
-
imports: [
|
|
3255
|
-
i4.CommonModule,
|
|
3256
|
-
i5$1.SkyCheckboxModule,
|
|
3257
|
-
i5.SkyI18nModule,
|
|
3258
|
-
i3$2.SkyToolbarModule,
|
|
3259
|
-
i8.SkySearchModule,
|
|
3260
|
-
i3.SkySortModule,
|
|
3261
|
-
i3.SkyFilterModule,
|
|
3262
|
-
SkyListFiltersModule,
|
|
3263
|
-
i3$1.SkyIconModule,
|
|
3264
|
-
SkyListBuilderResourcesModule,
|
|
3265
|
-
],
|
|
3266
|
-
exports: [
|
|
3267
|
-
SkyListToolbarComponent,
|
|
3268
|
-
SkyListToolbarItemComponent,
|
|
3269
|
-
SkyListToolbarSearchActionsComponent,
|
|
3270
|
-
SkyListToolbarSortComponent,
|
|
3271
|
-
SkyListToolbarViewActionsComponent,
|
|
3272
|
-
],
|
|
3273
|
-
}]
|
|
3274
|
-
}] });
|
|
3275
|
-
|
|
3276
|
-
/**
|
|
3277
|
-
* Generated bundle index. Do not edit.
|
|
3278
|
-
*/
|
|
3279
|
-
|
|
3280
|
-
exports.ListDataProvider = ListDataProvider;
|
|
3281
|
-
exports.ListDataRequestModel = ListDataRequestModel;
|
|
3282
|
-
exports.ListDataResponseModel = ListDataResponseModel;
|
|
3283
|
-
exports.ListFilterModel = ListFilterModel;
|
|
3284
|
-
exports.ListFiltersOrchestrator = ListFiltersOrchestrator;
|
|
3285
|
-
exports.ListFiltersUpdateAction = ListFiltersUpdateAction;
|
|
3286
|
-
exports.ListItemsLoadAction = ListItemsLoadAction;
|
|
3287
|
-
exports.ListItemsOrchestrator = ListItemsOrchestrator;
|
|
3288
|
-
exports.ListItemsSetLoadingAction = ListItemsSetLoadingAction;
|
|
3289
|
-
exports.ListItemsSetSelectedAction = ListItemsSetSelectedAction;
|
|
3290
|
-
exports.ListPagingModel = ListPagingModel;
|
|
3291
|
-
exports.ListPagingOrchestrator = ListPagingOrchestrator;
|
|
3292
|
-
exports.ListPagingSetItemsPerPageAction = ListPagingSetItemsPerPageAction;
|
|
3293
|
-
exports.ListPagingSetMaxPagesAction = ListPagingSetMaxPagesAction;
|
|
3294
|
-
exports.ListPagingSetPageNumberAction = ListPagingSetPageNumberAction;
|
|
3295
|
-
exports.ListSearchModel = ListSearchModel;
|
|
3296
|
-
exports.ListSearchOrchestrator = ListSearchOrchestrator;
|
|
3297
|
-
exports.ListSearchSetFieldSelectorsAction = ListSearchSetFieldSelectorsAction;
|
|
3298
|
-
exports.ListSearchSetFunctionsAction = ListSearchSetFunctionsAction;
|
|
3299
|
-
exports.ListSearchSetOptionsAction = ListSearchSetOptionsAction;
|
|
3300
|
-
exports.ListSearchSetSearchTextAction = ListSearchSetSearchTextAction;
|
|
3301
|
-
exports.ListSelectedLoadAction = ListSelectedLoadAction;
|
|
3302
|
-
exports.ListSelectedModel = ListSelectedModel;
|
|
3303
|
-
exports.ListSelectedOrchestrator = ListSelectedOrchestrator;
|
|
3304
|
-
exports.ListSelectedSetItemSelectedAction = ListSelectedSetItemSelectedAction;
|
|
3305
|
-
exports.ListSelectedSetItemsSelectedAction = ListSelectedSetItemsSelectedAction;
|
|
3306
|
-
exports.ListSelectedSetLoadingAction = ListSelectedSetLoadingAction;
|
|
3307
|
-
exports.ListSortLabelModel = ListSortLabelModel;
|
|
3308
|
-
exports.ListSortModel = ListSortModel;
|
|
3309
|
-
exports.ListSortOrchestrator = ListSortOrchestrator;
|
|
3310
|
-
exports.ListSortSetAvailableAction = ListSortSetAvailableAction;
|
|
3311
|
-
exports.ListSortSetFieldSelectorsAction = ListSortSetFieldSelectorsAction;
|
|
3312
|
-
exports.ListSortSetGlobalAction = ListSortSetGlobalAction;
|
|
3313
|
-
exports.ListState = ListState;
|
|
3314
|
-
exports.ListStateDispatcher = ListStateDispatcher;
|
|
3315
|
-
exports.ListStateModel = ListStateModel;
|
|
3316
|
-
exports.ListStateOrchestrator = ListStateOrchestrator;
|
|
3317
|
-
exports.ListToolbarItemModel = ListToolbarItemModel;
|
|
3318
|
-
exports.ListToolbarItemsDisableAction = ListToolbarItemsDisableAction;
|
|
3319
|
-
exports.ListToolbarItemsLoadAction = ListToolbarItemsLoadAction;
|
|
3320
|
-
exports.ListToolbarItemsRemoveAction = ListToolbarItemsRemoveAction;
|
|
3321
|
-
exports.ListToolbarModel = ListToolbarModel;
|
|
3322
|
-
exports.ListToolbarOrchestrator = ListToolbarOrchestrator;
|
|
3323
|
-
exports.ListToolbarSetExistsAction = ListToolbarSetExistsAction;
|
|
3324
|
-
exports.ListToolbarSetTypeAction = ListToolbarSetTypeAction;
|
|
3325
|
-
exports.ListToolbarShowMultiselectToolbarAction = ListToolbarShowMultiselectToolbarAction;
|
|
3326
|
-
exports.ListViewComponent = ListViewComponent;
|
|
3327
|
-
exports.ListViewModel = ListViewModel;
|
|
3328
|
-
exports.ListViewsLoadAction = ListViewsLoadAction;
|
|
3329
|
-
exports.ListViewsModel = ListViewsModel;
|
|
3330
|
-
exports.ListViewsOrchestrator = ListViewsOrchestrator;
|
|
3331
|
-
exports.ListViewsSetActiveAction = ListViewsSetActiveAction;
|
|
3332
|
-
exports.SkyListComponent = SkyListComponent;
|
|
3333
|
-
exports.SkyListFilterInlineModel = SkyListFilterInlineModel;
|
|
3334
|
-
exports.SkyListFiltersModule = SkyListFiltersModule;
|
|
3335
|
-
exports.SkyListInMemoryDataProvider = SkyListInMemoryDataProvider;
|
|
3336
|
-
exports.SkyListModule = SkyListModule;
|
|
3337
|
-
exports.SkyListPagingModule = SkyListPagingModule;
|
|
3338
|
-
exports.SkyListSecondaryActionsComponent = SkyListSecondaryActionsComponent;
|
|
3339
|
-
exports.SkyListSecondaryActionsModule = SkyListSecondaryActionsModule;
|
|
3340
|
-
exports.SkyListToolbarComponent = SkyListToolbarComponent;
|
|
3341
|
-
exports.SkyListToolbarModule = SkyListToolbarModule;
|
|
3342
|
-
exports["λ1"] = SkyListFilterButtonComponent;
|
|
3343
|
-
exports["λ10"] = SkyListToolbarViewActionsComponent;
|
|
3344
|
-
exports["λ11"] = SkyListToolbarSearchActionsComponent;
|
|
3345
|
-
exports["λ2"] = SkyListFilterSummaryComponent;
|
|
3346
|
-
exports["λ3"] = SkyListFilterInlineItemComponent;
|
|
3347
|
-
exports["λ4"] = SkyListFilterInlineComponent;
|
|
3348
|
-
exports["λ5"] = SkyListPagingComponent;
|
|
3349
|
-
exports["λ6"] = SkyListSecondaryActionComponent;
|
|
3350
|
-
exports["λ7"] = SkyListSecondaryActionsComponent;
|
|
3351
|
-
exports["λ8"] = SkyListToolbarItemComponent;
|
|
3352
|
-
exports["λ9"] = SkyListToolbarSortComponent;
|
|
3353
|
-
|
|
3354
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3355
|
-
|
|
3356
|
-
}));
|
|
3357
|
-
//# sourceMappingURL=skyux-list-builder.umd.js.map
|