@skyux/list-builder 5.0.0 → 5.0.1
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/bundles/skyux-list-builder.umd.js +312 -332
- package/bundles/skyux-list-builder.umd.js.map +1 -1
- package/documentation.json +184 -179
- package/esm2015/modules/list/list-data-response.model.js +1 -1
- package/esm2015/modules/list/list-data.provider.js +1 -1
- package/esm2015/modules/list/list-paging.component.js +1 -1
- package/esm2015/modules/list/list-view.component.js +8 -8
- package/esm2015/modules/list/list.component.js +45 -42
- package/esm2015/modules/list/list.module.js +8 -16
- package/esm2015/modules/list/state/filters/filters.orchestrator.js +2 -3
- package/esm2015/modules/list/state/items/items.orchestrator.js +10 -9
- package/esm2015/modules/list/state/items/load.action.js +1 -1
- package/esm2015/modules/list/state/list-state-action.type.js +1 -1
- package/esm2015/modules/list/state/list-state.model.js +1 -1
- package/esm2015/modules/list/state/list-state.rxstate.js +4 -4
- package/esm2015/modules/list/state/list-state.state-node.js +5 -6
- package/esm2015/modules/list/state/paging/paging.orchestrator.js +2 -3
- package/esm2015/modules/list/state/paging/set-max-pages.action.js +1 -1
- package/esm2015/modules/list/state/paging/set-page-number.action.js +1 -1
- package/esm2015/modules/list/state/search/search.orchestrator.js +5 -4
- package/esm2015/modules/list/state/search/set-functions.action.js +1 -1
- package/esm2015/modules/list/state/selected/selected.orchestrator.js +9 -10
- package/esm2015/modules/list/state/selected/set-items-selected.action.js +1 -1
- package/esm2015/modules/list/state/sort/set-field-selectors.action.js +1 -1
- package/esm2015/modules/list/state/sort/sort.model.js +1 -1
- package/esm2015/modules/list/state/sort/sort.orchestrator.js +4 -5
- package/esm2015/modules/list/state/toolbar/disable.action.js +1 -1
- package/esm2015/modules/list/state/toolbar/load.action.js +1 -1
- package/esm2015/modules/list/state/toolbar/toolbar.orchestrator.js +3 -4
- package/esm2015/modules/list/state/views/load.action.js +1 -1
- package/esm2015/modules/list/state/views/view.model.js +1 -1
- package/esm2015/modules/list/state/views/views.model.js +1 -1
- package/esm2015/modules/list/state/views/views.orchestrator.js +2 -4
- package/esm2015/modules/list-data-provider-in-memory/list-data-in-memory.provider.js +24 -14
- package/esm2015/modules/list-filters/filter.model.js +1 -1
- package/esm2015/modules/list-filters/list-filter-button.component.js +9 -9
- package/esm2015/modules/list-filters/list-filter-inline-item-renderer.component.js +7 -7
- package/esm2015/modules/list-filters/list-filter-inline-item.component.js +9 -8
- package/esm2015/modules/list-filters/list-filter-inline.component.js +12 -11
- package/esm2015/modules/list-filters/list-filter-inline.model.js +1 -1
- package/esm2015/modules/list-filters/list-filter-summary.component.js +8 -8
- package/esm2015/modules/list-filters/list-filters.module.js +10 -17
- package/esm2015/modules/list-paging/list-paging.component.js +14 -15
- package/esm2015/modules/list-paging/list-paging.module.js +8 -19
- package/esm2015/modules/list-toolbar/list-multiselect-toolbar.component.js +26 -25
- package/esm2015/modules/list-toolbar/list-secondary-actions/list-secondary-action.component.js +8 -8
- package/esm2015/modules/list-toolbar/list-secondary-actions/list-secondary-action.js +1 -1
- package/esm2015/modules/list-toolbar/list-secondary-actions/list-secondary-actions-host.component.js +7 -7
- package/esm2015/modules/list-toolbar/list-secondary-actions/list-secondary-actions.component.js +10 -16
- package/esm2015/modules/list-toolbar/list-secondary-actions/list-secondary-actions.module.js +10 -14
- package/esm2015/modules/list-toolbar/list-secondary-actions/list-secondary-actions.service.js +5 -5
- package/esm2015/modules/list-toolbar/list-toolbar-item-renderer.component.js +7 -7
- package/esm2015/modules/list-toolbar/list-toolbar-item.component.js +6 -6
- package/esm2015/modules/list-toolbar/list-toolbar-search-actions.component.js +5 -5
- package/esm2015/modules/list-toolbar/list-toolbar-sort.component.js +5 -5
- package/esm2015/modules/list-toolbar/list-toolbar-view-actions.component.js +5 -5
- package/esm2015/modules/list-toolbar/list-toolbar.component.js +69 -67
- package/esm2015/modules/list-toolbar/list-toolbar.module.js +10 -10
- package/esm2015/modules/list-toolbar/state/config/config.orchestrator.js +2 -4
- package/esm2015/modules/list-toolbar/state/toolbar-state-action.type.js +1 -1
- package/esm2015/modules/list-toolbar/state/toolbar-state.rxstate.js +4 -4
- package/esm2015/modules/list-toolbar/state/toolbar-state.state-node.js +5 -7
- package/esm2015/modules/shared/sky-list-builder-resources.module.js +24 -12
- package/fesm2015/skyux-list-builder.js +356 -373
- package/fesm2015/skyux-list-builder.js.map +1 -1
- package/package.json +13 -13
|
@@ -167,8 +167,8 @@ class SkyListInMemoryDataProvider extends ListDataProvider {
|
|
|
167
167
|
this.items = new BehaviorSubject([]);
|
|
168
168
|
this.searchFunction = searchFunction;
|
|
169
169
|
if (data) {
|
|
170
|
-
data.subscribe(items => {
|
|
171
|
-
this.items.next(items.map(d => new ListItemModel(d.id || `sky-list-data-in-memory-provider-item-${++idIndex$3}`, d)));
|
|
170
|
+
data.subscribe((items) => {
|
|
171
|
+
this.items.next(items.map((d) => new ListItemModel(d.id || `sky-list-data-in-memory-provider-item-${++idIndex$3}`, d)));
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -182,20 +182,20 @@ class SkyListInMemoryDataProvider extends ListDataProvider {
|
|
|
182
182
|
let pagedResult = result.slice(itemStart, itemStart + request.pageSize);
|
|
183
183
|
return new ListDataResponseModel({
|
|
184
184
|
count: result.length,
|
|
185
|
-
items: pagedResult
|
|
185
|
+
items: pagedResult,
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
189
189
|
return new ListDataResponseModel({
|
|
190
190
|
count: result.length,
|
|
191
|
-
items: result
|
|
191
|
+
items: result,
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
}));
|
|
195
195
|
}
|
|
196
196
|
filteredItems(request) {
|
|
197
197
|
const showSelectedId = ['show-selected'];
|
|
198
|
-
return this.items.pipe(map(items => {
|
|
198
|
+
return this.items.pipe(map((items) => {
|
|
199
199
|
let dataChanged = false;
|
|
200
200
|
let search = request.search;
|
|
201
201
|
let sort = request.sort;
|
|
@@ -209,7 +209,7 @@ class SkyListInMemoryDataProvider extends ListDataProvider {
|
|
|
209
209
|
if (request.isToolbarDisabled) {
|
|
210
210
|
searchChanged = true;
|
|
211
211
|
search = new ListSearchModel();
|
|
212
|
-
filters = filters.filter(f => showSelectedId.indexOf(f.name) >= 0);
|
|
212
|
+
filters = filters.filter((f) => showSelectedId.indexOf(f.name) >= 0);
|
|
213
213
|
filtersChanged = true;
|
|
214
214
|
}
|
|
215
215
|
else {
|
|
@@ -224,11 +224,13 @@ class SkyListInMemoryDataProvider extends ListDataProvider {
|
|
|
224
224
|
this.lastFilters = filters;
|
|
225
225
|
let result = items;
|
|
226
226
|
// Apply filters.
|
|
227
|
-
if (!dataChanged &&
|
|
227
|
+
if (!dataChanged &&
|
|
228
|
+
!filtersChanged &&
|
|
229
|
+
this.lastFilterResults !== undefined) {
|
|
228
230
|
result = this.lastFilterResults;
|
|
229
231
|
}
|
|
230
232
|
else if (filters && filters.length > 0) {
|
|
231
|
-
result = result.filter(item => {
|
|
233
|
+
result = result.filter((item) => {
|
|
232
234
|
for (let i = 0; i < filters.length; i++) {
|
|
233
235
|
let filter = filters[i];
|
|
234
236
|
if (filter.value === undefined ||
|
|
@@ -250,10 +252,15 @@ class SkyListInMemoryDataProvider extends ListDataProvider {
|
|
|
250
252
|
}
|
|
251
253
|
// Apply search.
|
|
252
254
|
/* istanbul ignore next */
|
|
253
|
-
if (!dataChanged &&
|
|
255
|
+
if (!dataChanged &&
|
|
256
|
+
!searchChanged &&
|
|
257
|
+
this.lastSearchResults !== undefined &&
|
|
258
|
+
!filtersChanged) {
|
|
254
259
|
result = this.lastSearchResults;
|
|
255
260
|
}
|
|
256
|
-
else if (search &&
|
|
261
|
+
else if (search &&
|
|
262
|
+
search.searchText !== undefined &&
|
|
263
|
+
search.searchText.length > 0) {
|
|
257
264
|
let searchText = search.searchText.toLowerCase();
|
|
258
265
|
let searchFunctions;
|
|
259
266
|
if (this.searchFunction !== undefined) {
|
|
@@ -262,12 +269,13 @@ class SkyListInMemoryDataProvider extends ListDataProvider {
|
|
|
262
269
|
else {
|
|
263
270
|
searchFunctions = search.functions;
|
|
264
271
|
}
|
|
265
|
-
result = result.filter(item => {
|
|
272
|
+
result = result.filter((item) => {
|
|
266
273
|
let isMatch = false;
|
|
267
274
|
for (let i = 0; i < searchFunctions.length; i++) {
|
|
268
275
|
let searchFunction = searchFunctions[i];
|
|
269
276
|
let searchResult = searchFunction(item.data, searchText);
|
|
270
|
-
if ((typeof searchResult === 'string' &&
|
|
277
|
+
if ((typeof searchResult === 'string' &&
|
|
278
|
+
searchResult.indexOf(searchText) !== -1) ||
|
|
271
279
|
searchResult === true) {
|
|
272
280
|
isMatch = true;
|
|
273
281
|
break;
|
|
@@ -282,7 +290,9 @@ class SkyListInMemoryDataProvider extends ListDataProvider {
|
|
|
282
290
|
}
|
|
283
291
|
// Apply sort.
|
|
284
292
|
if (sort && sort.fieldSelectors.length > 0) {
|
|
285
|
-
result = result
|
|
293
|
+
result = result
|
|
294
|
+
.slice()
|
|
295
|
+
.sort((item1, item2) => {
|
|
286
296
|
let compareResult = 0;
|
|
287
297
|
for (let i = 0; i < sort.fieldSelectors.length; i++) {
|
|
288
298
|
let selector = sort.fieldSelectors[i];
|
|
@@ -561,9 +571,9 @@ class ListStateDispatcher extends StateDispatcher {
|
|
|
561
571
|
this.next(new ListSelectedSetItemsSelectedAction(selectedIds, selected, refresh));
|
|
562
572
|
}
|
|
563
573
|
}
|
|
564
|
-
ListStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
565
|
-
ListStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
574
|
+
ListStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListStateDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
575
|
+
ListStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListStateDispatcher });
|
|
576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListStateDispatcher, decorators: [{
|
|
567
577
|
type: Injectable
|
|
568
578
|
}] });
|
|
569
579
|
|
|
@@ -574,8 +584,7 @@ class ListFiltersOrchestrator extends ListStateOrchestrator {
|
|
|
574
584
|
/* istanbul ignore next */
|
|
575
585
|
constructor() {
|
|
576
586
|
super();
|
|
577
|
-
this
|
|
578
|
-
.register(ListFiltersUpdateAction, this.update);
|
|
587
|
+
this.register(ListFiltersUpdateAction, this.update);
|
|
579
588
|
}
|
|
580
589
|
update(state, action) {
|
|
581
590
|
return [...action.filters];
|
|
@@ -602,8 +611,7 @@ class ListItemsOrchestrator extends ListStateOrchestrator {
|
|
|
602
611
|
/* istanbul ignore next */
|
|
603
612
|
constructor() {
|
|
604
613
|
super();
|
|
605
|
-
this
|
|
606
|
-
.register(ListItemsSetLoadingAction, this.setLoading)
|
|
614
|
+
this.register(ListItemsSetLoadingAction, this.setLoading)
|
|
607
615
|
.register(ListItemsLoadAction, this.load)
|
|
608
616
|
.register(ListItemsSetSelectedAction, this.setItemsSelected);
|
|
609
617
|
}
|
|
@@ -611,8 +619,10 @@ class ListItemsOrchestrator extends ListStateOrchestrator {
|
|
|
611
619
|
return new AsyncList(state.items, state.lastUpdate, action.loading, state.count);
|
|
612
620
|
}
|
|
613
621
|
load(state, action) {
|
|
614
|
-
const newListItems = action.items.map(g => new ListItemModel(g.id, g.data, g.isSelected));
|
|
615
|
-
const resultItems =
|
|
622
|
+
const newListItems = action.items.map((g) => new ListItemModel(g.id, g.data, g.isSelected));
|
|
623
|
+
const resultItems = action.refresh
|
|
624
|
+
? [...newListItems]
|
|
625
|
+
: [...state.items, ...newListItems];
|
|
616
626
|
let count = action.count === undefined ? resultItems.length : action.count;
|
|
617
627
|
return new AsyncList(resultItems, action.dataChanged ? Date.now() : state.lastUpdate, false, count);
|
|
618
628
|
}
|
|
@@ -621,10 +631,10 @@ class ListItemsOrchestrator extends ListStateOrchestrator {
|
|
|
621
631
|
const newSelectedIds = action.items || [];
|
|
622
632
|
let newListItemModels = this.cloneListItemModelArray(state.items);
|
|
623
633
|
if (action.refresh) {
|
|
624
|
-
newListItemModels.forEach(item => item.isSelected = undefined);
|
|
634
|
+
newListItemModels.forEach((item) => (item.isSelected = undefined));
|
|
625
635
|
}
|
|
626
|
-
newSelectedIds.map(s => {
|
|
627
|
-
let newItem = newListItemModels.find(i => i.id === s);
|
|
636
|
+
newSelectedIds.map((s) => {
|
|
637
|
+
let newItem = newListItemModels.find((i) => i.id === s);
|
|
628
638
|
/* istanbul ignore next */
|
|
629
639
|
if (newItem) {
|
|
630
640
|
newItem.isSelected = action.selected;
|
|
@@ -634,7 +644,7 @@ class ListItemsOrchestrator extends ListStateOrchestrator {
|
|
|
634
644
|
}
|
|
635
645
|
cloneListItemModelArray(source) {
|
|
636
646
|
let newListItems = [];
|
|
637
|
-
source.forEach(item => {
|
|
647
|
+
source.forEach((item) => {
|
|
638
648
|
newListItems.push(new ListItemModel(item.id, Object.assign({}, item.data), item.isSelected));
|
|
639
649
|
});
|
|
640
650
|
return newListItems;
|
|
@@ -675,8 +685,7 @@ class ListPagingOrchestrator extends ListStateOrchestrator {
|
|
|
675
685
|
/* istanbul ignore next */
|
|
676
686
|
constructor() {
|
|
677
687
|
super();
|
|
678
|
-
this
|
|
679
|
-
.register(ListPagingSetMaxPagesAction, this.setMaxPages)
|
|
688
|
+
this.register(ListPagingSetMaxPagesAction, this.setMaxPages)
|
|
680
689
|
.register(ListPagingSetItemsPerPageAction, this.setItemsPerPage)
|
|
681
690
|
.register(ListPagingSetPageNumberAction, this.setPageNumber);
|
|
682
691
|
}
|
|
@@ -707,9 +716,7 @@ class ListViewsOrchestrator extends ListStateOrchestrator {
|
|
|
707
716
|
/* istanbul ignore next */
|
|
708
717
|
constructor() {
|
|
709
718
|
super();
|
|
710
|
-
this
|
|
711
|
-
.register(ListViewsSetActiveAction, this.setActive)
|
|
712
|
-
.register(ListViewsLoadAction, this.load);
|
|
719
|
+
this.register(ListViewsSetActiveAction, this.setActive).register(ListViewsLoadAction, this.load);
|
|
713
720
|
}
|
|
714
721
|
setActive(state, action) {
|
|
715
722
|
return new ListViewsModel(Object.assign({}, state, { active: action.view }));
|
|
@@ -751,8 +758,7 @@ class ListToolbarOrchestrator extends ListStateOrchestrator {
|
|
|
751
758
|
/* istanbul ignore next */
|
|
752
759
|
constructor() {
|
|
753
760
|
super();
|
|
754
|
-
this
|
|
755
|
-
.register(ListToolbarSetExistsAction, this.setExists)
|
|
761
|
+
this.register(ListToolbarSetExistsAction, this.setExists)
|
|
756
762
|
.register(ListToolbarItemsDisableAction, this.setDisabled)
|
|
757
763
|
.register(ListToolbarItemsLoadAction, this.load)
|
|
758
764
|
.register(ListToolbarSetTypeAction, this.setType)
|
|
@@ -776,7 +782,7 @@ class ListToolbarOrchestrator extends ListStateOrchestrator {
|
|
|
776
782
|
}
|
|
777
783
|
load(state, action) {
|
|
778
784
|
const newModel = new ListToolbarModel(state);
|
|
779
|
-
const newListItems = action.items.map(item => {
|
|
785
|
+
const newListItems = action.items.map((item) => {
|
|
780
786
|
/**
|
|
781
787
|
* NOTE: Originally this function went off the action index and item models did not include
|
|
782
788
|
* the index. We changed this but must leave functionality to convert the action index for
|
|
@@ -823,14 +829,15 @@ class ListSearchOrchestrator extends ListStateOrchestrator {
|
|
|
823
829
|
/* istanbul ignore next */
|
|
824
830
|
constructor() {
|
|
825
831
|
super();
|
|
826
|
-
this
|
|
827
|
-
.register(ListSearchSetSearchTextAction, this.setSearchText)
|
|
832
|
+
this.register(ListSearchSetSearchTextAction, this.setSearchText)
|
|
828
833
|
.register(ListSearchSetFunctionsAction, this.setFunctions)
|
|
829
834
|
.register(ListSearchSetFieldSelectorsAction, this.setFieldSelectors)
|
|
830
835
|
.register(ListSearchSetOptionsAction, this.setOptions);
|
|
831
836
|
}
|
|
832
837
|
setSearchText(state, action) {
|
|
833
|
-
return new ListSearchModel(Object.assign({}, state, {
|
|
838
|
+
return new ListSearchModel(Object.assign({}, state, {
|
|
839
|
+
searchText: action.searchText ? action.searchText : '',
|
|
840
|
+
}));
|
|
834
841
|
}
|
|
835
842
|
setFunctions(state, action) {
|
|
836
843
|
return new ListSearchModel(Object.assign({}, state, { functions: [...action.functions] }));
|
|
@@ -873,8 +880,7 @@ class ListSelectedOrchestrator extends ListStateOrchestrator {
|
|
|
873
880
|
/* istanbul ignore next */
|
|
874
881
|
constructor() {
|
|
875
882
|
super();
|
|
876
|
-
this
|
|
877
|
-
.register(ListSelectedSetLoadingAction, this.setLoading)
|
|
883
|
+
this.register(ListSelectedSetLoadingAction, this.setLoading)
|
|
878
884
|
.register(ListSelectedSetItemSelectedAction, this.setItemSelected)
|
|
879
885
|
.register(ListSelectedSetItemsSelectedAction, this.setItemsSelected)
|
|
880
886
|
.register(ListSelectedLoadAction, this.load);
|
|
@@ -884,7 +890,7 @@ class ListSelectedOrchestrator extends ListStateOrchestrator {
|
|
|
884
890
|
}
|
|
885
891
|
load(state, action) {
|
|
886
892
|
const newSelected = new ListSelectedModel();
|
|
887
|
-
action.items.map(s => newSelected.selectedIdMap.set(s, true));
|
|
893
|
+
action.items.map((s) => newSelected.selectedIdMap.set(s, true));
|
|
888
894
|
return new AsyncItem(Object.assign({}, state.item, newSelected), Date.now(), false);
|
|
889
895
|
}
|
|
890
896
|
setItemSelected(state, action) {
|
|
@@ -894,16 +900,16 @@ class ListSelectedOrchestrator extends ListStateOrchestrator {
|
|
|
894
900
|
}
|
|
895
901
|
setItemsSelected(state, action) {
|
|
896
902
|
const newSelectedIds = action.items || [];
|
|
897
|
-
const newListSelectedModel = action.refresh
|
|
903
|
+
const newListSelectedModel = action.refresh
|
|
904
|
+
? new ListSelectedModel()
|
|
905
|
+
: this.cloneListSelectedModel(state.item);
|
|
898
906
|
if (newSelectedIds instanceof Observable) {
|
|
899
|
-
newSelectedIds
|
|
900
|
-
.
|
|
901
|
-
.subscribe(selectedIds => {
|
|
902
|
-
selectedIds.map(s => newListSelectedModel.selectedIdMap.set(s, action.selected));
|
|
907
|
+
newSelectedIds.pipe(take(1)).subscribe((selectedIds) => {
|
|
908
|
+
selectedIds.map((s) => newListSelectedModel.selectedIdMap.set(s, action.selected));
|
|
903
909
|
});
|
|
904
910
|
}
|
|
905
911
|
else {
|
|
906
|
-
newSelectedIds.map(s => newListSelectedModel.selectedIdMap.set(s, action.selected));
|
|
912
|
+
newSelectedIds.map((s) => newListSelectedModel.selectedIdMap.set(s, action.selected));
|
|
907
913
|
}
|
|
908
914
|
return new AsyncItem(newListSelectedModel, state.lastUpdate, state.loading);
|
|
909
915
|
}
|
|
@@ -946,8 +952,7 @@ class ListSortOrchestrator extends ListStateOrchestrator {
|
|
|
946
952
|
/* istanbul ignore next */
|
|
947
953
|
constructor() {
|
|
948
954
|
super();
|
|
949
|
-
this
|
|
950
|
-
.register(ListSortSetFieldSelectorsAction, this.setFieldSelectors)
|
|
955
|
+
this.register(ListSortSetFieldSelectorsAction, this.setFieldSelectors)
|
|
951
956
|
.register(ListSortSetAvailableAction, this.setAvailable)
|
|
952
957
|
.register(ListSortSetGlobalAction, this.setGlobal);
|
|
953
958
|
}
|
|
@@ -955,11 +960,11 @@ class ListSortOrchestrator extends ListStateOrchestrator {
|
|
|
955
960
|
return new ListSortModel(Object.assign({}, state, { fieldSelectors: action.fieldSelectors }));
|
|
956
961
|
}
|
|
957
962
|
setAvailable(state, action) {
|
|
958
|
-
const newAvailable = action.available.map(available => new ListSortLabelModel(available));
|
|
963
|
+
const newAvailable = action.available.map((available) => new ListSortLabelModel(available));
|
|
959
964
|
return new ListSortModel(Object.assign({}, state, { available: newAvailable }));
|
|
960
965
|
}
|
|
961
966
|
setGlobal(state, action) {
|
|
962
|
-
const newGlobal = action.global.map(global => new ListSortLabelModel(global));
|
|
967
|
+
const newGlobal = action.global.map((global) => new ListSortLabelModel(global));
|
|
963
968
|
return new ListSortModel(Object.assign({}, state, { global: newGlobal }));
|
|
964
969
|
}
|
|
965
970
|
}
|
|
@@ -970,8 +975,7 @@ class ListSortOrchestrator extends ListStateOrchestrator {
|
|
|
970
975
|
class ListState extends StateNode {
|
|
971
976
|
constructor(dispatcher) {
|
|
972
977
|
super(new ListStateModel(), dispatcher);
|
|
973
|
-
this
|
|
974
|
-
.register('filters', ListFiltersOrchestrator)
|
|
978
|
+
this.register('filters', ListFiltersOrchestrator)
|
|
975
979
|
.register('items', ListItemsOrchestrator)
|
|
976
980
|
.register('paging', ListPagingOrchestrator)
|
|
977
981
|
.register('search', ListSearchOrchestrator)
|
|
@@ -982,9 +986,9 @@ class ListState extends StateNode {
|
|
|
982
986
|
.begin();
|
|
983
987
|
}
|
|
984
988
|
}
|
|
985
|
-
ListState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
986
|
-
ListState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
987
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
989
|
+
ListState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListState, deps: [{ token: ListStateDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
990
|
+
ListState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListState });
|
|
991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListState, decorators: [{
|
|
988
992
|
type: Injectable
|
|
989
993
|
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; } });
|
|
990
994
|
|
|
@@ -998,9 +1002,11 @@ class ListViewComponent {
|
|
|
998
1002
|
this.state = state;
|
|
999
1003
|
this.viewName = defaultName;
|
|
1000
1004
|
/* istanbul ignore next */
|
|
1001
|
-
this.hasToolbar = this.state.pipe(map(s => s.toolbar.exists));
|
|
1002
|
-
this.active = this.state.pipe(map(s => s.views.active === this.viewId));
|
|
1003
|
-
this.active
|
|
1005
|
+
this.hasToolbar = this.state.pipe(map((s) => s.toolbar.exists));
|
|
1006
|
+
this.active = this.state.pipe(map((s) => s.views.active === this.viewId));
|
|
1007
|
+
this.active
|
|
1008
|
+
.pipe(distinctUntilChanged())
|
|
1009
|
+
.subscribe((isActive) => isActive ? this.onViewActive() : this.onViewInactive());
|
|
1004
1010
|
}
|
|
1005
1011
|
get id() {
|
|
1006
1012
|
return this.viewId;
|
|
@@ -1009,10 +1015,8 @@ class ListViewComponent {
|
|
|
1009
1015
|
return this.viewName;
|
|
1010
1016
|
}
|
|
1011
1017
|
/* istanbul ignore next */
|
|
1012
|
-
onViewActive() {
|
|
1013
|
-
}
|
|
1014
|
-
onViewInactive() {
|
|
1015
|
-
}
|
|
1018
|
+
onViewActive() { }
|
|
1019
|
+
onViewInactive() { }
|
|
1016
1020
|
}
|
|
1017
1021
|
|
|
1018
1022
|
/**
|
|
@@ -1055,7 +1059,6 @@ class SkyListComponent {
|
|
|
1055
1059
|
* Emits the filters applied to the list.
|
|
1056
1060
|
*/
|
|
1057
1061
|
this.appliedFiltersChange = new EventEmitter();
|
|
1058
|
-
/* tslint:enable */
|
|
1059
1062
|
this.dataFirstLoad = false;
|
|
1060
1063
|
this.lastSelectedIds = [];
|
|
1061
1064
|
this.lastFilters = [];
|
|
@@ -1066,8 +1069,10 @@ class SkyListComponent {
|
|
|
1066
1069
|
this.dataFirstLoad = true;
|
|
1067
1070
|
}
|
|
1068
1071
|
if (this.listViews.length > 0) {
|
|
1069
|
-
let defaultView =
|
|
1070
|
-
|
|
1072
|
+
let defaultView = this.defaultView === undefined
|
|
1073
|
+
? this.listViews.first
|
|
1074
|
+
: this.defaultView;
|
|
1075
|
+
this.dispatcher.next(new ListViewsLoadAction(this.listViews.map((v) => new ListViewModel(v.id, v.label))));
|
|
1071
1076
|
// activate the default view
|
|
1072
1077
|
this.dispatcher.next(new ListViewsSetActiveAction(defaultView.id));
|
|
1073
1078
|
}
|
|
@@ -1085,14 +1090,14 @@ class SkyListComponent {
|
|
|
1085
1090
|
}
|
|
1086
1091
|
this.dispatcher.next(new ListSortSetFieldSelectorsAction(sortArray || []));
|
|
1087
1092
|
});
|
|
1088
|
-
this.displayedItems.subscribe(result => {
|
|
1093
|
+
this.displayedItems.subscribe((result) => {
|
|
1089
1094
|
this.dispatcher.next(new ListItemsSetLoadingAction());
|
|
1090
1095
|
this.dispatcher.next(new ListItemsLoadAction(result.items, true, true, result.count));
|
|
1091
1096
|
});
|
|
1092
1097
|
// Watch for selection changes.
|
|
1093
1098
|
this.state
|
|
1094
|
-
.pipe(map(current => current.selected), takeUntil(this.ngUnsubscribe), distinctUntilChanged())
|
|
1095
|
-
.subscribe(selected => {
|
|
1099
|
+
.pipe(map((current) => current.selected), takeUntil(this.ngUnsubscribe), distinctUntilChanged())
|
|
1100
|
+
.subscribe((selected) => {
|
|
1096
1101
|
// Update lastSelectedIds to help us retain user selections.
|
|
1097
1102
|
let selectedIdsList = [];
|
|
1098
1103
|
selected.item.selectedIdMap.forEach((value, key) => {
|
|
@@ -1109,7 +1114,7 @@ class SkyListComponent {
|
|
|
1109
1114
|
});
|
|
1110
1115
|
if (this.appliedFiltersChange.observers.length > 0) {
|
|
1111
1116
|
this.state
|
|
1112
|
-
.pipe(map(current => current.filters), takeUntil(this.ngUnsubscribe), skip(1))
|
|
1117
|
+
.pipe(map((current) => current.filters), takeUntil(this.ngUnsubscribe), skip(1))
|
|
1113
1118
|
.subscribe((filters) => {
|
|
1114
1119
|
/**
|
|
1115
1120
|
* We are doing this instead of a distinctUntilChange due to memory allocation issues
|
|
@@ -1125,9 +1130,11 @@ class SkyListComponent {
|
|
|
1125
1130
|
}
|
|
1126
1131
|
ngOnChanges(changes) {
|
|
1127
1132
|
if (changes['appliedFilters'] &&
|
|
1128
|
-
changes['appliedFilters'].currentValue !==
|
|
1133
|
+
changes['appliedFilters'].currentValue !==
|
|
1134
|
+
changes['appliedFilters'].previousValue) {
|
|
1129
1135
|
this.state.pipe(take(1)).subscribe((currentState) => {
|
|
1130
|
-
if (currentState.paging.pageNumber &&
|
|
1136
|
+
if (currentState.paging.pageNumber &&
|
|
1137
|
+
currentState.paging.pageNumber !== 1) {
|
|
1131
1138
|
this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
1132
1139
|
}
|
|
1133
1140
|
this.dispatcher.filtersUpdate(this.appliedFilters);
|
|
@@ -1172,17 +1179,17 @@ class SkyListComponent {
|
|
|
1172
1179
|
// with adding a debounce time to the Observable which watches for state changes.
|
|
1173
1180
|
let cancelLastRequest = new Subject();
|
|
1174
1181
|
return combineLatest([
|
|
1175
|
-
this.state.pipe(map(s => s.filters), distinctUntilChanged()),
|
|
1176
|
-
this.state.pipe(map(s => s.search), distinctUntilChanged()),
|
|
1177
|
-
this.state.pipe(map(s => s.sort.fieldSelectors), distinctUntilChanged()),
|
|
1178
|
-
this.state.pipe(map(s => s.paging.itemsPerPage), distinctUntilChanged()),
|
|
1179
|
-
this.state.pipe(map(s => s.paging.pageNumber), distinctUntilChanged()),
|
|
1180
|
-
this.state.pipe(map(s => s.toolbar.disabled), distinctUntilChanged()),
|
|
1181
|
-
selectedIds.pipe(distinctUntilChanged(), map(selected => {
|
|
1182
|
+
this.state.pipe(map((s) => s.filters), distinctUntilChanged()),
|
|
1183
|
+
this.state.pipe(map((s) => s.search), distinctUntilChanged()),
|
|
1184
|
+
this.state.pipe(map((s) => s.sort.fieldSelectors), distinctUntilChanged()),
|
|
1185
|
+
this.state.pipe(map((s) => s.paging.itemsPerPage), distinctUntilChanged()),
|
|
1186
|
+
this.state.pipe(map((s) => s.paging.pageNumber), distinctUntilChanged()),
|
|
1187
|
+
this.state.pipe(map((s) => s.toolbar.disabled), distinctUntilChanged()),
|
|
1188
|
+
selectedIds.pipe(distinctUntilChanged(), map((selected) => {
|
|
1182
1189
|
selectedChanged = true;
|
|
1183
1190
|
return selected;
|
|
1184
1191
|
})),
|
|
1185
|
-
data.pipe(distinctUntilChanged())
|
|
1192
|
+
data.pipe(distinctUntilChanged()),
|
|
1186
1193
|
], (filters, search, sortFieldSelectors, itemsPerPage, pageNumber, isToolbarDisabled, selected, itemsData) => {
|
|
1187
1194
|
cancelLastRequest.next();
|
|
1188
1195
|
cancelLastRequest.complete();
|
|
@@ -1195,44 +1202,44 @@ class SkyListComponent {
|
|
|
1195
1202
|
let response;
|
|
1196
1203
|
if (this.dataFirstLoad) {
|
|
1197
1204
|
this.dataFirstLoad = false;
|
|
1198
|
-
let initialItems = itemsData.map(d => new ListItemModel(d.id || `sky-list-item-model-${++idIndex$1}`, d));
|
|
1205
|
+
let initialItems = itemsData.map((d) => new ListItemModel(d.id || `sky-list-item-model-${++idIndex$1}`, d));
|
|
1199
1206
|
response = of(new ListDataResponseModel({
|
|
1200
1207
|
count: this.initialTotal,
|
|
1201
|
-
items: initialItems
|
|
1208
|
+
items: initialItems,
|
|
1202
1209
|
})).pipe(takeUntil(cancelLastRequest));
|
|
1203
1210
|
}
|
|
1204
1211
|
else {
|
|
1205
|
-
response = this.dataProvider
|
|
1212
|
+
response = this.dataProvider
|
|
1213
|
+
.get(new ListDataRequestModel({
|
|
1206
1214
|
filters: filters,
|
|
1207
1215
|
pageSize: itemsPerPage,
|
|
1208
1216
|
pageNumber: pageNumber,
|
|
1209
1217
|
search: search,
|
|
1210
1218
|
sort: new ListSortModel({ fieldSelectors: sortFieldSelectors }),
|
|
1211
|
-
isToolbarDisabled: isToolbarDisabled
|
|
1212
|
-
}))
|
|
1219
|
+
isToolbarDisabled: isToolbarDisabled,
|
|
1220
|
+
}))
|
|
1221
|
+
.pipe(takeUntil(cancelLastRequest));
|
|
1213
1222
|
}
|
|
1214
1223
|
return response;
|
|
1215
|
-
})
|
|
1216
|
-
.pipe(takeUntil(this.ngUnsubscribe),
|
|
1224
|
+
}).pipe(takeUntil(this.ngUnsubscribe),
|
|
1217
1225
|
// Retain user selections from previous state.
|
|
1218
1226
|
// This is only necessary for grids component (based on item.isSelected).
|
|
1219
|
-
map(response => {
|
|
1220
|
-
return response.pipe(map(listDataResponseModel => {
|
|
1227
|
+
map((response) => {
|
|
1228
|
+
return response.pipe(map((listDataResponseModel) => {
|
|
1221
1229
|
return new ListDataResponseModel({
|
|
1222
1230
|
count: listDataResponseModel.count,
|
|
1223
|
-
items: this.getItemsAndRetainSelections(listDataResponseModel.items, this.lastSelectedIds)
|
|
1231
|
+
items: this.getItemsAndRetainSelections(listDataResponseModel.items, this.lastSelectedIds),
|
|
1224
1232
|
});
|
|
1225
1233
|
}));
|
|
1226
|
-
}), flatMap(value => value));
|
|
1234
|
+
}), flatMap((value) => value));
|
|
1227
1235
|
}
|
|
1228
1236
|
get selectedItems() {
|
|
1229
|
-
return combineLatest(this.state.pipe(map(current => current.items.items), distinctUntilChanged()), this.state.pipe(map(current => current.selected), distinctUntilChanged()), (items, selected) => {
|
|
1230
|
-
return items.filter(i => selected.item.selectedIdMap.get(i.id));
|
|
1237
|
+
return combineLatest(this.state.pipe(map((current) => current.items.items), distinctUntilChanged()), this.state.pipe(map((current) => current.selected), distinctUntilChanged()), (items, selected) => {
|
|
1238
|
+
return items.filter((i) => selected.item.selectedIdMap.get(i.id));
|
|
1231
1239
|
}).pipe(takeUntil(this.ngUnsubscribe));
|
|
1232
1240
|
}
|
|
1233
1241
|
get lastUpdate() {
|
|
1234
|
-
return this.state
|
|
1235
|
-
.pipe(takeUntil(this.ngUnsubscribe), map(s => s.items.lastUpdate ? new Date(s.items.lastUpdate) : undefined));
|
|
1242
|
+
return this.state.pipe(takeUntil(this.ngUnsubscribe), map((s) => s.items.lastUpdate ? new Date(s.items.lastUpdate) : undefined));
|
|
1236
1243
|
}
|
|
1237
1244
|
get views() {
|
|
1238
1245
|
return this.listViews.toArray();
|
|
@@ -1242,7 +1249,7 @@ class SkyListComponent {
|
|
|
1242
1249
|
}
|
|
1243
1250
|
getItemsAndRetainSelections(newList, selectedIds) {
|
|
1244
1251
|
let updatedListModel = newList.slice();
|
|
1245
|
-
updatedListModel.forEach(item => {
|
|
1252
|
+
updatedListModel.forEach((item) => {
|
|
1246
1253
|
item.isSelected = selectedIds.indexOf(item.id) > -1 ? true : false;
|
|
1247
1254
|
});
|
|
1248
1255
|
return updatedListModel;
|
|
@@ -1266,15 +1273,15 @@ class SkyListComponent {
|
|
|
1266
1273
|
return true;
|
|
1267
1274
|
}
|
|
1268
1275
|
}
|
|
1269
|
-
SkyListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1270
|
-
SkyListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1276
|
+
SkyListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
1277
|
+
SkyListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", 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, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListComponent, decorators: [{
|
|
1272
1279
|
type: Component,
|
|
1273
1280
|
args: [{
|
|
1274
1281
|
selector: 'sky-list',
|
|
1275
1282
|
template: '<ng-content></ng-content>',
|
|
1276
1283
|
providers: [ListState, ListStateDispatcher],
|
|
1277
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1284
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1278
1285
|
}]
|
|
1279
1286
|
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { data: [{
|
|
1280
1287
|
type: Input
|
|
@@ -1304,23 +1311,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
1304
1311
|
|
|
1305
1312
|
class SkyListModule {
|
|
1306
1313
|
}
|
|
1307
|
-
SkyListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1308
|
-
SkyListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1309
|
-
SkyListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1310
|
-
|
|
1311
|
-
]] });
|
|
1312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: SkyListModule, decorators: [{
|
|
1314
|
+
SkyListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1315
|
+
SkyListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListModule, declarations: [SkyListComponent], imports: [CommonModule], exports: [SkyListComponent] });
|
|
1316
|
+
SkyListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListModule, imports: [[CommonModule]] });
|
|
1317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListModule, decorators: [{
|
|
1313
1318
|
type: NgModule,
|
|
1314
1319
|
args: [{
|
|
1315
|
-
declarations: [
|
|
1316
|
-
|
|
1317
|
-
],
|
|
1318
|
-
imports: [
|
|
1319
|
-
CommonModule
|
|
1320
|
-
],
|
|
1321
|
-
exports: [
|
|
1322
|
-
SkyListComponent
|
|
1323
|
-
]
|
|
1320
|
+
declarations: [SkyListComponent],
|
|
1321
|
+
imports: [CommonModule],
|
|
1322
|
+
exports: [SkyListComponent],
|
|
1324
1323
|
}]
|
|
1325
1324
|
}] });
|
|
1326
1325
|
|
|
@@ -1380,24 +1379,24 @@ class SkyListFilterButtonComponent {
|
|
|
1380
1379
|
new ListToolbarItemModel({
|
|
1381
1380
|
template: this.filterButtonTemplate,
|
|
1382
1381
|
location: 'left',
|
|
1383
|
-
index: this.filterButtonItemToolbarIndex
|
|
1384
|
-
})
|
|
1382
|
+
index: this.filterButtonItemToolbarIndex,
|
|
1383
|
+
}),
|
|
1385
1384
|
]);
|
|
1386
1385
|
}
|
|
1387
1386
|
}
|
|
1388
|
-
SkyListFilterButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1389
|
-
SkyListFilterButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1387
|
+
SkyListFilterButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterButtonComponent, deps: [{ token: ListStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
1388
|
+
SkyListFilterButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListFilterButtonComponent, selector: "sky-list-filter-button", viewQueries: [{ propertyName: "filterButtonTemplate", first: true, predicate: ["filterButton"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #filterButton>\n <ng-content></ng-content>\n</ng-template>\n" });
|
|
1389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterButtonComponent, decorators: [{
|
|
1391
1390
|
type: Component,
|
|
1392
1391
|
args: [{
|
|
1393
1392
|
selector: 'sky-list-filter-button',
|
|
1394
|
-
templateUrl: './list-filter-button.component.html'
|
|
1393
|
+
templateUrl: './list-filter-button.component.html',
|
|
1395
1394
|
}]
|
|
1396
1395
|
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; }, propDecorators: { filterButtonTemplate: [{
|
|
1397
1396
|
type: ViewChild,
|
|
1398
1397
|
args: ['filterButton', {
|
|
1399
1398
|
read: TemplateRef,
|
|
1400
|
-
static: true
|
|
1399
|
+
static: true,
|
|
1401
1400
|
}]
|
|
1402
1401
|
}] } });
|
|
1403
1402
|
|
|
@@ -1422,10 +1421,10 @@ class SkyListFilterSummaryComponent {
|
|
|
1422
1421
|
setTimeout(() => {
|
|
1423
1422
|
this.appliedFilters = this.state.pipe(map((state) => {
|
|
1424
1423
|
return state.filters.filter((filter) => {
|
|
1425
|
-
return filter.value !== '' &&
|
|
1424
|
+
return (filter.value !== '' &&
|
|
1426
1425
|
filter.value !== undefined &&
|
|
1427
1426
|
filter.value !== false &&
|
|
1428
|
-
filter.value !== filter.defaultValue;
|
|
1427
|
+
filter.value !== filter.defaultValue);
|
|
1429
1428
|
});
|
|
1430
1429
|
}));
|
|
1431
1430
|
});
|
|
@@ -1440,13 +1439,13 @@ class SkyListFilterSummaryComponent {
|
|
|
1440
1439
|
this.summaryItemClick.emit(item);
|
|
1441
1440
|
}
|
|
1442
1441
|
}
|
|
1443
|
-
SkyListFilterSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1444
|
-
SkyListFilterSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1442
|
+
SkyListFilterSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterSummaryComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
1443
|
+
SkyListFilterSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListFilterSummaryComponent, selector: "sky-list-filter-summary", outputs: { summaryItemClick: "summaryItemClick" }, ngImport: i0, 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.λ5, selector: "sky-filter-summary" }, { type: i3.λ4, selector: "sky-filter-summary-item", inputs: ["dismissible"], outputs: ["dismiss", "itemClick"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe } });
|
|
1444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterSummaryComponent, decorators: [{
|
|
1446
1445
|
type: Component,
|
|
1447
1446
|
args: [{
|
|
1448
1447
|
selector: 'sky-list-filter-summary',
|
|
1449
|
-
templateUrl: './list-filter-summary.component.html'
|
|
1448
|
+
templateUrl: './list-filter-summary.component.html',
|
|
1450
1449
|
}]
|
|
1451
1450
|
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { summaryItemClick: [{
|
|
1452
1451
|
type: Output
|
|
@@ -1457,7 +1456,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
1457
1456
|
*/
|
|
1458
1457
|
class SkyListFilterInlineItemComponent {
|
|
1459
1458
|
constructor() {
|
|
1460
|
-
/* tslint:enable:no-input-rename */
|
|
1461
1459
|
this.onChange = new EventEmitter();
|
|
1462
1460
|
}
|
|
1463
1461
|
ngOnInit() {
|
|
@@ -1466,16 +1464,18 @@ class SkyListFilterInlineItemComponent {
|
|
|
1466
1464
|
}
|
|
1467
1465
|
}
|
|
1468
1466
|
get template() {
|
|
1469
|
-
return this.templates.length > 0
|
|
1467
|
+
return this.templates.length > 0
|
|
1468
|
+
? this.templates.first
|
|
1469
|
+
: this.templateInput;
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
SkyListFilterInlineItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1473
|
-
SkyListFilterInlineItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1472
|
+
SkyListFilterInlineItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterInlineItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1473
|
+
SkyListFilterInlineItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", 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: TemplateRef }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
1474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterInlineItemComponent, decorators: [{
|
|
1475
1475
|
type: Component,
|
|
1476
1476
|
args: [{
|
|
1477
1477
|
selector: 'sky-list-filter-inline-item',
|
|
1478
|
-
template: '<ng-content></ng-content>'
|
|
1478
|
+
template: '<ng-content></ng-content>',
|
|
1479
1479
|
}]
|
|
1480
1480
|
}], propDecorators: { name: [{
|
|
1481
1481
|
type: Input
|
|
@@ -1506,13 +1506,13 @@ class SkyListFilterInlineItemRendererComponent {
|
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
SkyListFilterInlineItemRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1510
|
-
SkyListFilterInlineItemRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1509
|
+
SkyListFilterInlineItemRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterInlineItemRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1510
|
+
SkyListFilterInlineItemRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListFilterInlineItemRendererComponent, selector: "sky-list-filter-inline-item-renderer", inputs: { template: "template", filter: "filter" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<ng-template #container></ng-template>', isInline: true });
|
|
1511
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterInlineItemRendererComponent, decorators: [{
|
|
1512
1512
|
type: Component,
|
|
1513
1513
|
args: [{
|
|
1514
1514
|
selector: 'sky-list-filter-inline-item-renderer',
|
|
1515
|
-
template: '<ng-template #container></ng-template>'
|
|
1515
|
+
template: '<ng-template #container></ng-template>',
|
|
1516
1516
|
}]
|
|
1517
1517
|
}], propDecorators: { template: [{
|
|
1518
1518
|
type: Input
|
|
@@ -1522,7 +1522,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
1522
1522
|
type: ViewChild,
|
|
1523
1523
|
args: ['container', {
|
|
1524
1524
|
read: ViewContainerRef,
|
|
1525
|
-
static: true
|
|
1525
|
+
static: true,
|
|
1526
1526
|
}]
|
|
1527
1527
|
}] } });
|
|
1528
1528
|
|
|
@@ -1537,16 +1537,16 @@ class SkyListFilterInlineComponent {
|
|
|
1537
1537
|
this.inlineFilters = [];
|
|
1538
1538
|
}
|
|
1539
1539
|
ngAfterContentInit() {
|
|
1540
|
-
this.inlineFilters = this.filters.map(filter => {
|
|
1540
|
+
this.inlineFilters = this.filters.map((filter) => {
|
|
1541
1541
|
return new SkyListFilterInlineModel({
|
|
1542
1542
|
name: filter.name,
|
|
1543
1543
|
filterFunction: filter.filterFunction,
|
|
1544
1544
|
template: filter.template,
|
|
1545
1545
|
value: filter.value,
|
|
1546
|
-
defaultValue: filter.defaultValue
|
|
1546
|
+
defaultValue: filter.defaultValue,
|
|
1547
1547
|
});
|
|
1548
1548
|
});
|
|
1549
|
-
this.inlineFilters.forEach(filter => {
|
|
1549
|
+
this.inlineFilters.forEach((filter) => {
|
|
1550
1550
|
filter.onChange.subscribe((value) => {
|
|
1551
1551
|
this.applyFilters();
|
|
1552
1552
|
});
|
|
@@ -1555,7 +1555,8 @@ class SkyListFilterInlineComponent {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
applyFilters() {
|
|
1557
1557
|
this.state.pipe(take(1)).subscribe((currentState) => {
|
|
1558
|
-
if (currentState.paging.pageNumber &&
|
|
1558
|
+
if (currentState.paging.pageNumber &&
|
|
1559
|
+
currentState.paging.pageNumber !== 1) {
|
|
1559
1560
|
this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
1560
1561
|
}
|
|
1561
1562
|
this.dispatcher.filtersUpdate(this.getFilterModelFromInline(this.inlineFilters));
|
|
@@ -1567,18 +1568,18 @@ class SkyListFilterInlineComponent {
|
|
|
1567
1568
|
name: filter.name,
|
|
1568
1569
|
value: filter.value,
|
|
1569
1570
|
filterFunction: filter.filterFunction,
|
|
1570
|
-
defaultValue: filter.defaultValue
|
|
1571
|
+
defaultValue: filter.defaultValue,
|
|
1571
1572
|
});
|
|
1572
1573
|
});
|
|
1573
1574
|
}
|
|
1574
1575
|
}
|
|
1575
|
-
SkyListFilterInlineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1576
|
-
SkyListFilterInlineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1576
|
+
SkyListFilterInlineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterInlineComponent, deps: [{ token: ListStateDispatcher }, { token: ListState }], target: i0.ɵɵFactoryTarget.Component });
|
|
1577
|
+
SkyListFilterInlineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListFilterInlineComponent, selector: "sky-list-filter-inline", queries: [{ propertyName: "filters", predicate: SkyListFilterInlineItemComponent }], ngImport: i0, 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.λ2, selector: "sky-filter-inline" }, { type: i3.λ3, selector: "sky-filter-inline-item" }, { type: SkyListFilterInlineItemRendererComponent, selector: "sky-list-filter-inline-item-renderer", inputs: ["template", "filter"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFilterInlineComponent, decorators: [{
|
|
1578
1579
|
type: Component,
|
|
1579
1580
|
args: [{
|
|
1580
1581
|
selector: 'sky-list-filter-inline',
|
|
1581
|
-
templateUrl: './list-filter-inline.component.html'
|
|
1582
|
+
templateUrl: './list-filter-inline.component.html',
|
|
1582
1583
|
}]
|
|
1583
1584
|
}], ctorParameters: function () { return [{ type: ListStateDispatcher }, { type: ListState }]; }, propDecorators: { filters: [{
|
|
1584
1585
|
type: ContentChildren,
|
|
@@ -1587,21 +1588,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
1587
1588
|
|
|
1588
1589
|
class SkyListFiltersModule {
|
|
1589
1590
|
}
|
|
1590
|
-
SkyListFiltersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1591
|
-
SkyListFiltersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1591
|
+
SkyListFiltersModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFiltersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1592
|
+
SkyListFiltersModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFiltersModule, declarations: [SkyListFilterButtonComponent,
|
|
1592
1593
|
SkyListFilterSummaryComponent,
|
|
1593
1594
|
SkyListFilterInlineItemComponent,
|
|
1594
1595
|
SkyListFilterInlineComponent,
|
|
1595
|
-
SkyListFilterInlineItemRendererComponent], imports: [CommonModule,
|
|
1596
|
-
SkyFilterModule], exports: [SkyListFilterButtonComponent,
|
|
1596
|
+
SkyListFilterInlineItemRendererComponent], imports: [CommonModule, SkyFilterModule], exports: [SkyListFilterButtonComponent,
|
|
1597
1597
|
SkyListFilterSummaryComponent,
|
|
1598
1598
|
SkyListFilterInlineItemComponent,
|
|
1599
1599
|
SkyListFilterInlineComponent] });
|
|
1600
|
-
SkyListFiltersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1601
|
-
|
|
1602
|
-
SkyFilterModule
|
|
1603
|
-
]] });
|
|
1604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: SkyListFiltersModule, decorators: [{
|
|
1600
|
+
SkyListFiltersModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFiltersModule, imports: [[CommonModule, SkyFilterModule]] });
|
|
1601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListFiltersModule, decorators: [{
|
|
1605
1602
|
type: NgModule,
|
|
1606
1603
|
args: [{
|
|
1607
1604
|
declarations: [
|
|
@@ -1609,18 +1606,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
1609
1606
|
SkyListFilterSummaryComponent,
|
|
1610
1607
|
SkyListFilterInlineItemComponent,
|
|
1611
1608
|
SkyListFilterInlineComponent,
|
|
1612
|
-
SkyListFilterInlineItemRendererComponent
|
|
1613
|
-
],
|
|
1614
|
-
imports: [
|
|
1615
|
-
CommonModule,
|
|
1616
|
-
SkyFilterModule
|
|
1609
|
+
SkyListFilterInlineItemRendererComponent,
|
|
1617
1610
|
],
|
|
1611
|
+
imports: [CommonModule, SkyFilterModule],
|
|
1618
1612
|
exports: [
|
|
1619
1613
|
SkyListFilterButtonComponent,
|
|
1620
1614
|
SkyListFilterSummaryComponent,
|
|
1621
1615
|
SkyListFilterInlineItemComponent,
|
|
1622
|
-
SkyListFilterInlineComponent
|
|
1623
|
-
]
|
|
1616
|
+
SkyListFilterInlineComponent,
|
|
1617
|
+
],
|
|
1624
1618
|
}]
|
|
1625
1619
|
}] });
|
|
1626
1620
|
|
|
@@ -1661,11 +1655,10 @@ class SkyListPagingComponent extends ListPagingComponent {
|
|
|
1661
1655
|
this.pageNumber = 1;
|
|
1662
1656
|
}
|
|
1663
1657
|
ngOnInit() {
|
|
1664
|
-
this.currentPageNumber = this.state.pipe(map(s => s.paging.pageNumber));
|
|
1665
|
-
this.maxDisplayedPages = this.state.pipe(map(s => s.paging.maxDisplayedPages));
|
|
1666
|
-
this.itemsPerPage = this.state.pipe(map(s => s.paging.itemsPerPage));
|
|
1667
|
-
this.itemCount = this.state
|
|
1668
|
-
.pipe(map((s) => {
|
|
1658
|
+
this.currentPageNumber = this.state.pipe(map((s) => s.paging.pageNumber));
|
|
1659
|
+
this.maxDisplayedPages = this.state.pipe(map((s) => s.paging.maxDisplayedPages));
|
|
1660
|
+
this.itemsPerPage = this.state.pipe(map((s) => s.paging.itemsPerPage));
|
|
1661
|
+
this.itemCount = this.state.pipe(map((s) => {
|
|
1669
1662
|
return s.items;
|
|
1670
1663
|
}), scan((previousValue, newValue) => {
|
|
1671
1664
|
if (previousValue.lastUpdate > newValue.lastUpdate) {
|
|
@@ -1690,19 +1683,19 @@ class SkyListPagingComponent extends ListPagingComponent {
|
|
|
1690
1683
|
});
|
|
1691
1684
|
}
|
|
1692
1685
|
}
|
|
1693
|
-
SkyListPagingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1694
|
-
SkyListPagingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1695
|
-
{ provide: ListPagingComponent, useExisting: listPagingComponentRef }
|
|
1696
|
-
], usesInheritance: true, ngImport: i0, template: "<sky-paging\n [pageSize]=\"itemsPerPage | async\"\n [maxPages]=\"maxDisplayedPages | async\"\n [currentPage]=\"currentPageNumber | async\"\n [itemCount]=\"itemCount | async\"\n (currentPageChange)=\"pageChange($event)\"\n
|
|
1697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1686
|
+
SkyListPagingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListPagingComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
1687
|
+
SkyListPagingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListPagingComponent, selector: "sky-list-paging", inputs: { pageSize: "pageSize", maxPages: "maxPages", pageNumber: "pageNumber" }, providers: [
|
|
1688
|
+
{ provide: ListPagingComponent, useExisting: listPagingComponentRef },
|
|
1689
|
+
], usesInheritance: true, ngImport: i0, 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.λ7, selector: "sky-paging", inputs: ["currentPage", "itemCount", "maxPages", "pageSize", "pagingLabel"], outputs: ["currentPageChange"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListPagingComponent, decorators: [{
|
|
1698
1691
|
type: Component,
|
|
1699
1692
|
args: [{
|
|
1700
1693
|
selector: 'sky-list-paging',
|
|
1701
1694
|
templateUrl: './list-paging.component.html',
|
|
1702
1695
|
providers: [
|
|
1703
|
-
{ provide: ListPagingComponent, useExisting: listPagingComponentRef }
|
|
1696
|
+
{ provide: ListPagingComponent, useExisting: listPagingComponentRef },
|
|
1704
1697
|
],
|
|
1705
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1698
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1706
1699
|
}]
|
|
1707
1700
|
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { pageSize: [{
|
|
1708
1701
|
type: Input
|
|
@@ -1714,26 +1707,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
1714
1707
|
|
|
1715
1708
|
class SkyListPagingModule {
|
|
1716
1709
|
}
|
|
1717
|
-
SkyListPagingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1718
|
-
SkyListPagingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
CommonModule,
|
|
1722
|
-
SkyPagingModule
|
|
1723
|
-
]] });
|
|
1724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: SkyListPagingModule, decorators: [{
|
|
1710
|
+
SkyListPagingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListPagingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1711
|
+
SkyListPagingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListPagingModule, declarations: [SkyListPagingComponent], imports: [CommonModule, SkyPagingModule], exports: [SkyListPagingComponent] });
|
|
1712
|
+
SkyListPagingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListPagingModule, imports: [[CommonModule, SkyPagingModule]] });
|
|
1713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListPagingModule, decorators: [{
|
|
1725
1714
|
type: NgModule,
|
|
1726
1715
|
args: [{
|
|
1727
|
-
declarations: [
|
|
1728
|
-
|
|
1729
|
-
],
|
|
1730
|
-
imports: [
|
|
1731
|
-
CommonModule,
|
|
1732
|
-
SkyPagingModule
|
|
1733
|
-
],
|
|
1734
|
-
exports: [
|
|
1735
|
-
SkyListPagingComponent
|
|
1736
|
-
]
|
|
1716
|
+
declarations: [SkyListPagingComponent],
|
|
1717
|
+
imports: [CommonModule, SkyPagingModule],
|
|
1718
|
+
exports: [SkyListPagingComponent],
|
|
1737
1719
|
}]
|
|
1738
1720
|
}] });
|
|
1739
1721
|
|
|
@@ -1744,7 +1726,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
1744
1726
|
* To update this file, simply rerun the command.
|
|
1745
1727
|
*/
|
|
1746
1728
|
const RESOURCES = {
|
|
1747
|
-
'EN-US': {
|
|
1729
|
+
'EN-US': {
|
|
1730
|
+
skyux_list_show_secondary_actions_button: { message: 'More' },
|
|
1731
|
+
skyux_list_multiselect_clear_all: { message: 'Clear all' },
|
|
1732
|
+
skyux_list_mutliselect_select_all: { message: 'Select all' },
|
|
1733
|
+
skyux_list_mutliselect_show_selected: {
|
|
1734
|
+
message: 'Only show selected items',
|
|
1735
|
+
},
|
|
1736
|
+
skyux_list_view_switcher_dropdown_title: { message: 'Select view' },
|
|
1737
|
+
},
|
|
1748
1738
|
};
|
|
1749
1739
|
class SkyListBuilderResourcesProvider {
|
|
1750
1740
|
getString(localeInfo, name) {
|
|
@@ -1756,22 +1746,26 @@ class SkyListBuilderResourcesProvider {
|
|
|
1756
1746
|
*/
|
|
1757
1747
|
class SkyListBuilderResourcesModule {
|
|
1758
1748
|
}
|
|
1759
|
-
SkyListBuilderResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1760
|
-
SkyListBuilderResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1761
|
-
SkyListBuilderResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1749
|
+
SkyListBuilderResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1750
|
+
SkyListBuilderResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderResourcesModule, exports: [SkyI18nModule] });
|
|
1751
|
+
SkyListBuilderResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderResourcesModule, providers: [
|
|
1752
|
+
{
|
|
1762
1753
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
1763
1754
|
useClass: SkyListBuilderResourcesProvider,
|
|
1764
|
-
multi: true
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1755
|
+
multi: true,
|
|
1756
|
+
},
|
|
1757
|
+
], imports: [SkyI18nModule] });
|
|
1758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListBuilderResourcesModule, decorators: [{
|
|
1767
1759
|
type: NgModule,
|
|
1768
1760
|
args: [{
|
|
1769
1761
|
exports: [SkyI18nModule],
|
|
1770
|
-
providers: [
|
|
1762
|
+
providers: [
|
|
1763
|
+
{
|
|
1771
1764
|
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
1772
1765
|
useClass: SkyListBuilderResourcesProvider,
|
|
1773
|
-
multi: true
|
|
1774
|
-
}
|
|
1766
|
+
multi: true,
|
|
1767
|
+
},
|
|
1768
|
+
],
|
|
1775
1769
|
}]
|
|
1776
1770
|
}] });
|
|
1777
1771
|
|
|
@@ -1794,7 +1788,7 @@ class SkyListSecondaryActionsService {
|
|
|
1794
1788
|
removeSecondaryAction(action) {
|
|
1795
1789
|
this.secondaryActionsCount--;
|
|
1796
1790
|
this.secondaryActionsSubject.next(this.secondaryActionsCount);
|
|
1797
|
-
this.actions = this.actions.filter(existingItem => existingItem !== action);
|
|
1791
|
+
this.actions = this.actions.filter((existingItem) => existingItem !== action);
|
|
1798
1792
|
this.actionsStream.next(this.actions);
|
|
1799
1793
|
}
|
|
1800
1794
|
ngOnDestroy() {
|
|
@@ -1802,9 +1796,9 @@ class SkyListSecondaryActionsService {
|
|
|
1802
1796
|
this.actionsStream.complete();
|
|
1803
1797
|
}
|
|
1804
1798
|
}
|
|
1805
|
-
SkyListSecondaryActionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1806
|
-
SkyListSecondaryActionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1799
|
+
SkyListSecondaryActionsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1800
|
+
SkyListSecondaryActionsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsService });
|
|
1801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsService, decorators: [{
|
|
1808
1802
|
type: Injectable
|
|
1809
1803
|
}] });
|
|
1810
1804
|
|
|
@@ -1825,7 +1819,7 @@ class SkyListSecondaryActionsHostComponent {
|
|
|
1825
1819
|
this.actionService.actionsStream
|
|
1826
1820
|
.pipe(takeUntil(this.ngUnsubscribe), distinctUntilChanged())
|
|
1827
1821
|
.subscribe((actions) => {
|
|
1828
|
-
const hasSecondaryActions =
|
|
1822
|
+
const hasSecondaryActions = actions.length > 0;
|
|
1829
1823
|
this.dropdownHidden = !hasSecondaryActions;
|
|
1830
1824
|
this.actions = actions;
|
|
1831
1825
|
this.changeDetector.detectChanges();
|
|
@@ -1836,15 +1830,15 @@ class SkyListSecondaryActionsHostComponent {
|
|
|
1836
1830
|
this.ngUnsubscribe.complete();
|
|
1837
1831
|
}
|
|
1838
1832
|
}
|
|
1839
|
-
SkyListSecondaryActionsHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1840
|
-
SkyListSecondaryActionsHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1841
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1833
|
+
SkyListSecondaryActionsHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsHostComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: SkyListSecondaryActionsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1834
|
+
SkyListSecondaryActionsHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListSecondaryActionsHostComponent, selector: "sky-list-secondary-actions-host", ngImport: i0, 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.λ3, selector: "sky-dropdown", inputs: ["buttonStyle", "buttonType", "disabled", "dismissOnBlur", "label", "horizontalAlignment", "messageStream", "title", "trigger"] }, { type: i2.λ2, selector: "sky-dropdown-button" }, { type: i3$1.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }, { type: i2.λ4, selector: "sky-dropdown-menu", inputs: ["ariaLabelledBy", "ariaRole", "useNativeFocus"], outputs: ["menuChanges"] }, { type: i2.λ1, selector: "sky-dropdown-item", inputs: ["ariaRole"] }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsHostComponent, decorators: [{
|
|
1842
1836
|
type: Component,
|
|
1843
1837
|
args: [{
|
|
1844
1838
|
selector: 'sky-list-secondary-actions-host',
|
|
1845
1839
|
templateUrl: './list-secondary-actions-host.component.html',
|
|
1846
1840
|
styleUrls: ['./list-secondary-actions-host.component.scss'],
|
|
1847
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1841
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1848
1842
|
}]
|
|
1849
1843
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: SkyListSecondaryActionsService }]; } });
|
|
1850
1844
|
|
|
@@ -1863,32 +1857,26 @@ class SkyListSecondaryActionsComponent {
|
|
|
1863
1857
|
id: 'secondary-actions',
|
|
1864
1858
|
template: this.secondaryActionsTemplate,
|
|
1865
1859
|
location: 'center',
|
|
1866
|
-
index: this.secondaryActionsItemToolbarIndex
|
|
1860
|
+
index: this.secondaryActionsItemToolbarIndex,
|
|
1867
1861
|
});
|
|
1868
|
-
this.dispatcher.toolbarAddItems([
|
|
1869
|
-
secondaryActionItem
|
|
1870
|
-
]);
|
|
1862
|
+
this.dispatcher.toolbarAddItems([secondaryActionItem]);
|
|
1871
1863
|
}
|
|
1872
1864
|
}
|
|
1873
|
-
SkyListSecondaryActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1874
|
-
SkyListSecondaryActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1875
|
-
|
|
1876
|
-
], viewQueries: [{ propertyName: "secondaryActionsTemplate", first: true, predicate: ["secondaryActions"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, 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.ChangeDetectionStrategy.OnPush });
|
|
1877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: SkyListSecondaryActionsComponent, decorators: [{
|
|
1865
|
+
SkyListSecondaryActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsComponent, deps: [{ token: ListStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
1866
|
+
SkyListSecondaryActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListSecondaryActionsComponent, selector: "sky-list-secondary-actions", providers: [SkyListSecondaryActionsService], viewQueries: [{ propertyName: "secondaryActionsTemplate", first: true, predicate: ["secondaryActions"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, 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.ChangeDetectionStrategy.OnPush });
|
|
1867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsComponent, decorators: [{
|
|
1878
1868
|
type: Component,
|
|
1879
1869
|
args: [{
|
|
1880
1870
|
selector: 'sky-list-secondary-actions',
|
|
1881
1871
|
templateUrl: './list-secondary-actions.component.html',
|
|
1882
|
-
providers: [
|
|
1883
|
-
|
|
1884
|
-
],
|
|
1885
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1872
|
+
providers: [SkyListSecondaryActionsService],
|
|
1873
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1886
1874
|
}]
|
|
1887
1875
|
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; }, propDecorators: { secondaryActionsTemplate: [{
|
|
1888
1876
|
type: ViewChild,
|
|
1889
1877
|
args: ['secondaryActions', {
|
|
1890
1878
|
read: TemplateRef,
|
|
1891
|
-
static: true
|
|
1879
|
+
static: true,
|
|
1892
1880
|
}]
|
|
1893
1881
|
}] } });
|
|
1894
1882
|
|
|
@@ -1901,63 +1889,59 @@ class SkyListSecondaryActionComponent {
|
|
|
1901
1889
|
}
|
|
1902
1890
|
ngAfterContentInit() {
|
|
1903
1891
|
this.actionService.addSecondaryAction({
|
|
1904
|
-
template: this.templateRef
|
|
1892
|
+
template: this.templateRef,
|
|
1905
1893
|
});
|
|
1906
1894
|
}
|
|
1907
1895
|
}
|
|
1908
|
-
SkyListSecondaryActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1909
|
-
SkyListSecondaryActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1910
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1896
|
+
SkyListSecondaryActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionComponent, deps: [{ token: SkyListSecondaryActionsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1897
|
+
SkyListSecondaryActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListSecondaryActionComponent, selector: "sky-list-secondary-action", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["listSecondaryAction"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #listSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n" });
|
|
1898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionComponent, decorators: [{
|
|
1911
1899
|
type: Component,
|
|
1912
1900
|
args: [{
|
|
1913
1901
|
selector: 'sky-list-secondary-action',
|
|
1914
|
-
templateUrl: './list-secondary-action.component.html'
|
|
1902
|
+
templateUrl: './list-secondary-action.component.html',
|
|
1915
1903
|
}]
|
|
1916
1904
|
}], ctorParameters: function () { return [{ type: SkyListSecondaryActionsService }]; }, propDecorators: { templateRef: [{
|
|
1917
1905
|
type: ViewChild,
|
|
1918
1906
|
args: ['listSecondaryAction', {
|
|
1919
1907
|
read: TemplateRef,
|
|
1920
|
-
static: true
|
|
1908
|
+
static: true,
|
|
1921
1909
|
}]
|
|
1922
1910
|
}] } });
|
|
1923
1911
|
|
|
1924
1912
|
class SkyListSecondaryActionsModule {
|
|
1925
1913
|
}
|
|
1926
|
-
SkyListSecondaryActionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1927
|
-
SkyListSecondaryActionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1914
|
+
SkyListSecondaryActionsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1915
|
+
SkyListSecondaryActionsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsModule, declarations: [SkyListSecondaryActionsComponent,
|
|
1928
1916
|
SkyListSecondaryActionsHostComponent,
|
|
1929
1917
|
SkyListSecondaryActionComponent], imports: [CommonModule,
|
|
1930
1918
|
SkyDropdownModule,
|
|
1931
1919
|
SkyI18nModule,
|
|
1932
1920
|
SkyIconModule,
|
|
1933
|
-
SkyListBuilderResourcesModule], exports: [SkyListSecondaryActionsComponent,
|
|
1934
|
-
|
|
1935
|
-
SkyListSecondaryActionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: SkyListSecondaryActionsModule, imports: [[
|
|
1921
|
+
SkyListBuilderResourcesModule], exports: [SkyListSecondaryActionsComponent, SkyListSecondaryActionComponent] });
|
|
1922
|
+
SkyListSecondaryActionsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsModule, imports: [[
|
|
1936
1923
|
CommonModule,
|
|
1937
1924
|
SkyDropdownModule,
|
|
1938
1925
|
SkyI18nModule,
|
|
1939
1926
|
SkyIconModule,
|
|
1940
|
-
SkyListBuilderResourcesModule
|
|
1927
|
+
SkyListBuilderResourcesModule,
|
|
1941
1928
|
]] });
|
|
1942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListSecondaryActionsModule, decorators: [{
|
|
1943
1930
|
type: NgModule,
|
|
1944
1931
|
args: [{
|
|
1945
1932
|
declarations: [
|
|
1946
1933
|
SkyListSecondaryActionsComponent,
|
|
1947
1934
|
SkyListSecondaryActionsHostComponent,
|
|
1948
|
-
SkyListSecondaryActionComponent
|
|
1935
|
+
SkyListSecondaryActionComponent,
|
|
1949
1936
|
],
|
|
1950
1937
|
imports: [
|
|
1951
1938
|
CommonModule,
|
|
1952
1939
|
SkyDropdownModule,
|
|
1953
1940
|
SkyI18nModule,
|
|
1954
1941
|
SkyIconModule,
|
|
1955
|
-
SkyListBuilderResourcesModule
|
|
1942
|
+
SkyListBuilderResourcesModule,
|
|
1956
1943
|
],
|
|
1957
|
-
exports: [
|
|
1958
|
-
SkyListSecondaryActionsComponent,
|
|
1959
|
-
SkyListSecondaryActionComponent
|
|
1960
|
-
]
|
|
1944
|
+
exports: [SkyListSecondaryActionsComponent, SkyListSecondaryActionComponent],
|
|
1961
1945
|
}]
|
|
1962
1946
|
}] });
|
|
1963
1947
|
|
|
@@ -1987,13 +1971,13 @@ class SkyListToolbarItemComponent {
|
|
|
1987
1971
|
return this.templates.length > 0 ? this.templates.first : undefined;
|
|
1988
1972
|
}
|
|
1989
1973
|
}
|
|
1990
|
-
SkyListToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1991
|
-
SkyListToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1992
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1974
|
+
SkyListToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1975
|
+
SkyListToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListToolbarItemComponent, selector: "sky-list-toolbar-item", inputs: { id: "id", index: "index", location: "location" }, queries: [{ propertyName: "templates", predicate: TemplateRef }], ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
|
|
1976
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarItemComponent, decorators: [{
|
|
1993
1977
|
type: Component,
|
|
1994
1978
|
args: [{
|
|
1995
1979
|
selector: 'sky-list-toolbar-item',
|
|
1996
|
-
template: '<ng-content></ng-content>'
|
|
1980
|
+
template: '<ng-content></ng-content>',
|
|
1997
1981
|
}]
|
|
1998
1982
|
}], propDecorators: { id: [{
|
|
1999
1983
|
type: Input
|
|
@@ -2011,13 +1995,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2011
1995
|
*/
|
|
2012
1996
|
class SkyListToolbarSortComponent {
|
|
2013
1997
|
}
|
|
2014
|
-
SkyListToolbarSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2015
|
-
SkyListToolbarSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2016
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1998
|
+
SkyListToolbarSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarSortComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1999
|
+
SkyListToolbarSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListToolbarSortComponent, selector: "sky-list-toolbar-sort", inputs: { label: "label", field: "field", type: "type", descending: "descending" }, ngImport: i0, template: '', isInline: true });
|
|
2000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarSortComponent, decorators: [{
|
|
2017
2001
|
type: Component,
|
|
2018
2002
|
args: [{
|
|
2019
2003
|
selector: 'sky-list-toolbar-sort',
|
|
2020
|
-
template: ''
|
|
2004
|
+
template: '',
|
|
2021
2005
|
}]
|
|
2022
2006
|
}], propDecorators: { label: [{
|
|
2023
2007
|
type: Input
|
|
@@ -2037,14 +2021,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2037
2021
|
*/
|
|
2038
2022
|
class SkyListToolbarViewActionsComponent {
|
|
2039
2023
|
}
|
|
2040
|
-
SkyListToolbarViewActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2041
|
-
SkyListToolbarViewActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2024
|
+
SkyListToolbarViewActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarViewActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2025
|
+
SkyListToolbarViewActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListToolbarViewActionsComponent, selector: "sky-list-toolbar-view-actions", ngImport: i0, 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"] });
|
|
2026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarViewActionsComponent, decorators: [{
|
|
2043
2027
|
type: Component,
|
|
2044
2028
|
args: [{
|
|
2045
2029
|
selector: 'sky-list-toolbar-view-actions',
|
|
2046
2030
|
templateUrl: './list-toolbar-view-actions.component.html',
|
|
2047
|
-
styleUrls: ['./list-toolbar-view-actions.component.scss']
|
|
2031
|
+
styleUrls: ['./list-toolbar-view-actions.component.scss'],
|
|
2048
2032
|
}]
|
|
2049
2033
|
}] });
|
|
2050
2034
|
|
|
@@ -2072,9 +2056,9 @@ class ListToolbarConfigSetSortSelectorEnabledAction {
|
|
|
2072
2056
|
*/
|
|
2073
2057
|
class ListToolbarStateDispatcher extends StateDispatcher {
|
|
2074
2058
|
}
|
|
2075
|
-
ListToolbarStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2076
|
-
ListToolbarStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
2077
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2059
|
+
ListToolbarStateDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListToolbarStateDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
2060
|
+
ListToolbarStateDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListToolbarStateDispatcher });
|
|
2061
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListToolbarStateDispatcher, decorators: [{
|
|
2078
2062
|
type: Injectable
|
|
2079
2063
|
}] });
|
|
2080
2064
|
/**
|
|
@@ -2104,9 +2088,7 @@ class ListToolbarConfigOrchestrator extends ListToolbarStateOrchestrator {
|
|
|
2104
2088
|
/* istanbul ignore next */
|
|
2105
2089
|
constructor() {
|
|
2106
2090
|
super();
|
|
2107
|
-
this
|
|
2108
|
-
.register(ListToolbarConfigSetSearchEnabledAction, this.setSearchEnabled)
|
|
2109
|
-
.register(ListToolbarConfigSetSortSelectorEnabledAction, this.setSortSelectorEnabled);
|
|
2091
|
+
this.register(ListToolbarConfigSetSearchEnabledAction, this.setSearchEnabled).register(ListToolbarConfigSetSortSelectorEnabledAction, this.setSortSelectorEnabled);
|
|
2110
2092
|
}
|
|
2111
2093
|
setSearchEnabled(state, action) {
|
|
2112
2094
|
return new ListToolbarConfigModel(Object.assign({}, state, { searchEnabled: action.enabled }));
|
|
@@ -2131,14 +2113,12 @@ class ListToolbarStateModel {
|
|
|
2131
2113
|
class ListToolbarState extends StateNode {
|
|
2132
2114
|
constructor(initialState, dispatcher) {
|
|
2133
2115
|
super(initialState, dispatcher);
|
|
2134
|
-
this
|
|
2135
|
-
.register('config', ListToolbarConfigOrchestrator)
|
|
2136
|
-
.begin();
|
|
2116
|
+
this.register('config', ListToolbarConfigOrchestrator).begin();
|
|
2137
2117
|
}
|
|
2138
2118
|
}
|
|
2139
|
-
ListToolbarState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2140
|
-
ListToolbarState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
2141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2119
|
+
ListToolbarState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListToolbarState, deps: [{ token: ListToolbarStateModel }, { token: ListToolbarStateDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2120
|
+
ListToolbarState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListToolbarState });
|
|
2121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ListToolbarState, decorators: [{
|
|
2142
2122
|
type: Injectable
|
|
2143
2123
|
}], ctorParameters: function () { return [{ type: ListToolbarStateModel }, { type: ListToolbarStateDispatcher }]; } });
|
|
2144
2124
|
|
|
@@ -2152,13 +2132,13 @@ class SkyListToolbarItemRendererComponent {
|
|
|
2152
2132
|
}
|
|
2153
2133
|
}
|
|
2154
2134
|
}
|
|
2155
|
-
SkyListToolbarItemRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2156
|
-
SkyListToolbarItemRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2135
|
+
SkyListToolbarItemRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarItemRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2136
|
+
SkyListToolbarItemRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListToolbarItemRendererComponent, selector: "sky-list-toolbar-item-renderer", inputs: { template: "template" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: '<ng-template #container></ng-template>', isInline: true });
|
|
2137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarItemRendererComponent, decorators: [{
|
|
2158
2138
|
type: Component,
|
|
2159
2139
|
args: [{
|
|
2160
2140
|
selector: 'sky-list-toolbar-item-renderer',
|
|
2161
|
-
template: '<ng-template #container></ng-template>'
|
|
2141
|
+
template: '<ng-template #container></ng-template>',
|
|
2162
2142
|
}]
|
|
2163
2143
|
}], propDecorators: { template: [{
|
|
2164
2144
|
type: Input
|
|
@@ -2166,7 +2146,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2166
2146
|
type: ViewChild,
|
|
2167
2147
|
args: ['container', {
|
|
2168
2148
|
read: ViewContainerRef,
|
|
2169
|
-
static: true
|
|
2149
|
+
static: true,
|
|
2170
2150
|
}]
|
|
2171
2151
|
}] } });
|
|
2172
2152
|
|
|
@@ -2185,7 +2165,7 @@ class SkyListMultiselectToolbarComponent {
|
|
|
2185
2165
|
}
|
|
2186
2166
|
ngOnInit() {
|
|
2187
2167
|
this.state
|
|
2188
|
-
.pipe(map(t => t.selected.item), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.selectedMapEqual))
|
|
2168
|
+
.pipe(map((t) => t.selected.item), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.selectedMapEqual))
|
|
2189
2169
|
.subscribe((model) => {
|
|
2190
2170
|
this.selectedIdMap = model.selectedIdMap;
|
|
2191
2171
|
if (this.showOnlySelected) {
|
|
@@ -2195,11 +2175,11 @@ class SkyListMultiselectToolbarComponent {
|
|
|
2195
2175
|
// If 'show-selected' filter is programatically set from a child component (e.g. checkilst),
|
|
2196
2176
|
// make sure the checked state of the 'show-selected' checkbox stays in sync.
|
|
2197
2177
|
this.state
|
|
2198
|
-
.pipe(map(t => t.filters), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.showSelectedValuesEqual))
|
|
2178
|
+
.pipe(map((t) => t.filters), takeUntil(this.ngUnsubscribe), distinctUntilChanged(this.showSelectedValuesEqual))
|
|
2199
2179
|
.subscribe((filters) => {
|
|
2200
|
-
const showSelectedFilter = filters.find(filter => filter.name === 'show-selected');
|
|
2180
|
+
const showSelectedFilter = filters.find((filter) => filter.name === 'show-selected');
|
|
2201
2181
|
if (showSelectedFilter) {
|
|
2202
|
-
this.showOnlySelected =
|
|
2182
|
+
this.showOnlySelected = showSelectedFilter.value === 'true';
|
|
2203
2183
|
}
|
|
2204
2184
|
});
|
|
2205
2185
|
}
|
|
@@ -2209,9 +2189,9 @@ class SkyListMultiselectToolbarComponent {
|
|
|
2209
2189
|
}
|
|
2210
2190
|
selectAll() {
|
|
2211
2191
|
this.state
|
|
2212
|
-
.pipe(map(state => state.items.items), take(1))
|
|
2213
|
-
.subscribe(items => {
|
|
2214
|
-
this.dispatcher.setSelected(items.map(item => item.id), true);
|
|
2192
|
+
.pipe(map((state) => state.items.items), take(1))
|
|
2193
|
+
.subscribe((items) => {
|
|
2194
|
+
this.dispatcher.setSelected(items.map((item) => item.id), true);
|
|
2215
2195
|
if (this.showOnlySelected) {
|
|
2216
2196
|
this.reapplyFilter(this.showOnlySelected);
|
|
2217
2197
|
}
|
|
@@ -2219,9 +2199,9 @@ class SkyListMultiselectToolbarComponent {
|
|
|
2219
2199
|
}
|
|
2220
2200
|
clearSelections() {
|
|
2221
2201
|
this.state
|
|
2222
|
-
.pipe(map(state => state.items.items), take(1))
|
|
2223
|
-
.subscribe(items => {
|
|
2224
|
-
this.dispatcher.setSelected(items.map(item => item.id), false);
|
|
2202
|
+
.pipe(map((state) => state.items.items), take(1))
|
|
2203
|
+
.subscribe((items) => {
|
|
2204
|
+
this.dispatcher.setSelected(items.map((item) => item.id), false);
|
|
2225
2205
|
if (this.showOnlySelected) {
|
|
2226
2206
|
this.reapplyFilter(this.showOnlySelected);
|
|
2227
2207
|
}
|
|
@@ -2234,18 +2214,18 @@ class SkyListMultiselectToolbarComponent {
|
|
|
2234
2214
|
reapplyFilter(isSelected) {
|
|
2235
2215
|
let self = this;
|
|
2236
2216
|
this.state
|
|
2237
|
-
.pipe(map(state => state.filters), take(1))
|
|
2217
|
+
.pipe(map((state) => state.filters), take(1))
|
|
2238
2218
|
.subscribe((filters) => {
|
|
2239
|
-
filters = filters.filter(filter => filter.name !== 'show-selected');
|
|
2219
|
+
filters = filters.filter((filter) => filter.name !== 'show-selected');
|
|
2240
2220
|
filters.push(self.getShowSelectedFilter(isSelected));
|
|
2241
2221
|
this.dispatcher.filtersUpdate(filters);
|
|
2242
2222
|
});
|
|
2243
2223
|
// If "show selected" is checked and paging is enabled, go to page one.
|
|
2244
2224
|
/* istanbul ignore else */
|
|
2245
2225
|
if (isSelected) {
|
|
2246
|
-
this.state.pipe(take(1))
|
|
2247
|
-
|
|
2248
|
-
|
|
2226
|
+
this.state.pipe(take(1)).subscribe((currentState) => {
|
|
2227
|
+
if (currentState.paging.pageNumber &&
|
|
2228
|
+
currentState.paging.pageNumber !== 1) {
|
|
2249
2229
|
this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
2250
2230
|
}
|
|
2251
2231
|
});
|
|
@@ -2262,18 +2242,19 @@ class SkyListMultiselectToolbarComponent {
|
|
|
2262
2242
|
return this.selectedIdMap.get(model.id);
|
|
2263
2243
|
}
|
|
2264
2244
|
},
|
|
2265
|
-
defaultValue: false.toString()
|
|
2245
|
+
defaultValue: false.toString(),
|
|
2266
2246
|
});
|
|
2267
2247
|
}
|
|
2268
2248
|
showSelectedValuesEqual(prev, next) {
|
|
2269
|
-
const prevShowSelectedFilter = prev.find(filter => filter.name === 'show-selected');
|
|
2270
|
-
const nextShowSelectedFilter = next.find(filter => filter.name === 'show-selected');
|
|
2249
|
+
const prevShowSelectedFilter = prev.find((filter) => filter.name === 'show-selected');
|
|
2250
|
+
const nextShowSelectedFilter = next.find((filter) => filter.name === 'show-selected');
|
|
2271
2251
|
// Both undefined.
|
|
2272
2252
|
if (!prevShowSelectedFilter && !nextShowSelectedFilter) {
|
|
2273
2253
|
return true;
|
|
2274
2254
|
}
|
|
2275
2255
|
// Only one undefined.
|
|
2276
|
-
if ((prevShowSelectedFilter && !nextShowSelectedFilter) ||
|
|
2256
|
+
if ((prevShowSelectedFilter && !nextShowSelectedFilter) ||
|
|
2257
|
+
(!prevShowSelectedFilter && nextShowSelectedFilter)) {
|
|
2277
2258
|
return false;
|
|
2278
2259
|
}
|
|
2279
2260
|
// Defined, but with different "value".
|
|
@@ -2294,14 +2275,14 @@ class SkyListMultiselectToolbarComponent {
|
|
|
2294
2275
|
return true;
|
|
2295
2276
|
}
|
|
2296
2277
|
}
|
|
2297
|
-
SkyListMultiselectToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2298
|
-
SkyListMultiselectToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2278
|
+
SkyListMultiselectToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListMultiselectToolbarComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
2279
|
+
SkyListMultiselectToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListMultiselectToolbarComponent, selector: "sky-list-multiselect-toolbar", inputs: { showOnlySelected: "showOnlySelected" }, ngImport: i0, 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$2.λ37, selector: "sky-toolbar" }, { type: i3$2.λ38, selector: "sky-toolbar-section" }, { type: i3$2.λ39, selector: "sky-toolbar-item" }, { type: SkyListToolbarItemRendererComponent, selector: "sky-list-toolbar-item-renderer", inputs: ["template"] }, { type: i3$2.λ40, selector: "sky-toolbar-view-actions" }, { type: i5$1.λ3, selector: "sky-checkbox", inputs: ["label", "labelledBy", "id", "disabled", "tabindex", "name", "icon", "checkboxType", "checked", "required"], outputs: ["change", "checkedChange", "disabledChange"] }, { type: i5$1.λ4, selector: "sky-checkbox-label" }], directives: [{ type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i5.SkyLibResourcesPipe } });
|
|
2280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListMultiselectToolbarComponent, decorators: [{
|
|
2300
2281
|
type: Component,
|
|
2301
2282
|
args: [{
|
|
2302
2283
|
selector: 'sky-list-multiselect-toolbar',
|
|
2303
2284
|
templateUrl: './list-multiselect-toolbar.component.html',
|
|
2304
|
-
styleUrls: ['./list-multiselect-toolbar.component.scss']
|
|
2285
|
+
styleUrls: ['./list-multiselect-toolbar.component.scss'],
|
|
2305
2286
|
}]
|
|
2306
2287
|
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { showOnlySelected: [{
|
|
2307
2288
|
type: Input
|
|
@@ -2359,7 +2340,9 @@ class SkyListToolbarComponent {
|
|
|
2359
2340
|
return this._inMemorySearchEnabled;
|
|
2360
2341
|
}
|
|
2361
2342
|
get isFilterBarDisplayed() {
|
|
2362
|
-
return !this.isToolbarDisabled &&
|
|
2343
|
+
return (!this.isToolbarDisabled &&
|
|
2344
|
+
this.hasInlineFilters &&
|
|
2345
|
+
this.inlineFilterBarExpanded);
|
|
2363
2346
|
}
|
|
2364
2347
|
get filterButtonAriaControls() {
|
|
2365
2348
|
return this.isFilterBarDisplayed ? this.listFilterInlineId : undefined;
|
|
@@ -2390,23 +2373,20 @@ class SkyListToolbarComponent {
|
|
|
2390
2373
|
id: 'sort-selector',
|
|
2391
2374
|
template: this.sortSelectorTemplate,
|
|
2392
2375
|
location: 'left',
|
|
2393
|
-
index: this.sortSelectorItemToolbarIndex
|
|
2394
|
-
})
|
|
2376
|
+
index: this.sortSelectorItemToolbarIndex,
|
|
2377
|
+
}),
|
|
2395
2378
|
]);
|
|
2396
2379
|
}
|
|
2397
2380
|
else if (currentSort.length < 1 && this.hasSortSelectors) {
|
|
2398
2381
|
this.hasSortSelectors = false;
|
|
2399
|
-
this.dispatcher.toolbarRemoveItems([
|
|
2400
|
-
'sort-selector'
|
|
2401
|
-
]);
|
|
2382
|
+
this.dispatcher.toolbarRemoveItems(['sort-selector']);
|
|
2402
2383
|
}
|
|
2403
2384
|
});
|
|
2404
|
-
this.searchTextInput = this.state.pipe(takeUntil(this.ngUnsubscribe), map(s => s.search.searchText), distinctUntilChanged());
|
|
2405
|
-
this.view = this.state.pipe(takeUntil(this.ngUnsubscribe), map(s => s.views.active), distinctUntilChanged());
|
|
2385
|
+
this.searchTextInput = this.state.pipe(takeUntil(this.ngUnsubscribe), map((s) => s.search.searchText), distinctUntilChanged());
|
|
2386
|
+
this.view = this.state.pipe(takeUntil(this.ngUnsubscribe), map((s) => s.views.active), distinctUntilChanged());
|
|
2406
2387
|
this.watchTemplates();
|
|
2407
2388
|
this.type = this.state.pipe(takeUntil(this.ngUnsubscribe), map((state) => state.toolbar.type), distinctUntilChanged());
|
|
2408
|
-
this.type.pipe(takeUntil(this.ngUnsubscribe))
|
|
2409
|
-
.subscribe((toolbarType) => {
|
|
2389
|
+
this.type.pipe(takeUntil(this.ngUnsubscribe)).subscribe((toolbarType) => {
|
|
2410
2390
|
if (toolbarType === 'search') {
|
|
2411
2391
|
this.dispatcher.toolbarRemoveItems(['search']);
|
|
2412
2392
|
}
|
|
@@ -2415,80 +2395,77 @@ class SkyListToolbarComponent {
|
|
|
2415
2395
|
new ListToolbarItemModel({
|
|
2416
2396
|
id: 'search',
|
|
2417
2397
|
template: this.searchTemplate,
|
|
2418
|
-
location: 'right'
|
|
2419
|
-
})
|
|
2398
|
+
location: 'right',
|
|
2399
|
+
}),
|
|
2420
2400
|
]);
|
|
2421
2401
|
}
|
|
2422
2402
|
});
|
|
2423
|
-
this.isSearchEnabled = this.toolbarState.pipe(takeUntil(this.ngUnsubscribe), map(s => s.config), distinctUntilChanged(), map(c => c.searchEnabled));
|
|
2424
|
-
this.state
|
|
2425
|
-
.
|
|
2426
|
-
|
|
2427
|
-
this.
|
|
2428
|
-
this.
|
|
2403
|
+
this.isSearchEnabled = this.toolbarState.pipe(takeUntil(this.ngUnsubscribe), map((s) => s.config), distinctUntilChanged(), map((c) => c.searchEnabled));
|
|
2404
|
+
this.state
|
|
2405
|
+
.pipe(map((s) => s.toolbar), takeUntil(this.ngUnsubscribe), distinctUntilChanged(), map((c) => c.disabled))
|
|
2406
|
+
.subscribe((isDisabled) => (this.isToolbarDisabled = isDisabled));
|
|
2407
|
+
this.isSortSelectorEnabled = this.toolbarState.pipe(takeUntil(this.ngUnsubscribe), map((s) => s.config), distinctUntilChanged(), map((c) => c.sortSelectorEnabled));
|
|
2408
|
+
this.isMultiselectEnabled = this.state.pipe(takeUntil(this.ngUnsubscribe), map((s) => s.toolbar), distinctUntilChanged(), map((t) => t.showMultiselectToolbar));
|
|
2409
|
+
this.hasAppliedFilters = this.state.pipe(takeUntil(this.ngUnsubscribe), map((s) => s.filters), distinctUntilChanged(), map((filters) => {
|
|
2429
2410
|
let activeFilters = filters.filter((f) => {
|
|
2430
|
-
return f.value !== '' &&
|
|
2411
|
+
return (f.value !== '' &&
|
|
2431
2412
|
f.value !== undefined &&
|
|
2432
2413
|
f.value !== false &&
|
|
2433
|
-
f.value !== f.defaultValue;
|
|
2414
|
+
f.value !== f.defaultValue);
|
|
2434
2415
|
});
|
|
2435
2416
|
return activeFilters.length > 0;
|
|
2436
2417
|
}));
|
|
2437
|
-
this.state.pipe(takeUntil(this.ngUnsubscribe))
|
|
2438
|
-
.
|
|
2439
|
-
this.hasAdditionalToolbarSection = (current.toolbar.items.length > 0);
|
|
2418
|
+
this.state.pipe(takeUntil(this.ngUnsubscribe)).subscribe((current) => {
|
|
2419
|
+
this.hasAdditionalToolbarSection = current.toolbar.items.length > 0;
|
|
2440
2420
|
this.changeDetector.detectChanges();
|
|
2441
2421
|
});
|
|
2442
2422
|
}
|
|
2443
2423
|
ngAfterContentInit() {
|
|
2444
2424
|
// Inject custom toolbar items.
|
|
2445
2425
|
this.toolbarItems.forEach((toolbarItem) => {
|
|
2446
|
-
this.dispatcher.toolbarAddItems([
|
|
2447
|
-
new ListToolbarItemModel(toolbarItem)
|
|
2448
|
-
]);
|
|
2426
|
+
this.dispatcher.toolbarAddItems([new ListToolbarItemModel(toolbarItem)]);
|
|
2449
2427
|
this.customItemIds.push(toolbarItem.id);
|
|
2450
2428
|
});
|
|
2451
|
-
this.toolbarItems.changes
|
|
2429
|
+
this.toolbarItems.changes
|
|
2430
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2452
2431
|
.subscribe((newItems) => {
|
|
2453
|
-
newItems.forEach(item => {
|
|
2432
|
+
newItems.forEach((item) => {
|
|
2454
2433
|
if (this.customItemIds.indexOf(item.id) < 0) {
|
|
2455
|
-
this.dispatcher.toolbarAddItems([
|
|
2456
|
-
new ListToolbarItemModel(item)
|
|
2457
|
-
]);
|
|
2434
|
+
this.dispatcher.toolbarAddItems([new ListToolbarItemModel(item)]);
|
|
2458
2435
|
this.customItemIds.push(item.id);
|
|
2459
2436
|
}
|
|
2460
2437
|
});
|
|
2461
2438
|
const itemsToRemove = [];
|
|
2462
2439
|
this.customItemIds.forEach((itemId, index) => {
|
|
2463
|
-
if (!newItems.find(item => item.id === itemId)) {
|
|
2440
|
+
if (!newItems.find((item) => item.id === itemId)) {
|
|
2464
2441
|
itemsToRemove.push(itemId);
|
|
2465
2442
|
this.customItemIds.splice(index, 1);
|
|
2466
2443
|
}
|
|
2467
2444
|
});
|
|
2468
2445
|
this.dispatcher.toolbarRemoveItems(itemsToRemove);
|
|
2469
2446
|
});
|
|
2470
|
-
const sortModels = this.toolbarSorts.map(sort => new ListSortLabelModel({
|
|
2447
|
+
const sortModels = this.toolbarSorts.map((sort) => new ListSortLabelModel({
|
|
2471
2448
|
text: sort.label,
|
|
2472
2449
|
fieldSelector: sort.field,
|
|
2473
2450
|
fieldType: sort.type,
|
|
2474
2451
|
global: true,
|
|
2475
|
-
descending: sort.descending
|
|
2452
|
+
descending: sort.descending,
|
|
2476
2453
|
}));
|
|
2477
2454
|
this.dispatcher.sortSetGlobal(sortModels);
|
|
2478
2455
|
// Add inline filters.
|
|
2479
|
-
this.showFilterSummary =
|
|
2480
|
-
this.hasInlineFilters =
|
|
2456
|
+
this.showFilterSummary = this.filterSummary.length > 0;
|
|
2457
|
+
this.hasInlineFilters = this.inlineFilter.length > 0;
|
|
2481
2458
|
if (this.hasInlineFilters) {
|
|
2482
2459
|
this.dispatcher.toolbarAddItems([
|
|
2483
2460
|
new ListToolbarItemModel({
|
|
2484
2461
|
template: this.inlineFilterButtonTemplate,
|
|
2485
2462
|
location: 'left',
|
|
2486
|
-
index: this.inlineFiltersItemToolbarIndex
|
|
2487
|
-
})
|
|
2463
|
+
index: this.inlineFiltersItemToolbarIndex,
|
|
2464
|
+
}),
|
|
2488
2465
|
]);
|
|
2489
2466
|
}
|
|
2490
2467
|
// Check for view actions
|
|
2491
|
-
this.hasViewActions =
|
|
2468
|
+
this.hasViewActions = this.viewActions.length > 0;
|
|
2492
2469
|
}
|
|
2493
2470
|
ngOnDestroy() {
|
|
2494
2471
|
this.searchApplied.complete();
|
|
@@ -2497,10 +2474,13 @@ class SkyListToolbarComponent {
|
|
|
2497
2474
|
}
|
|
2498
2475
|
setSort(sort) {
|
|
2499
2476
|
this.state.pipe(take(1)).subscribe((currentState) => {
|
|
2500
|
-
if (currentState.paging.pageNumber &&
|
|
2477
|
+
if (currentState.paging.pageNumber &&
|
|
2478
|
+
currentState.paging.pageNumber !== 1) {
|
|
2501
2479
|
this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
2502
2480
|
}
|
|
2503
|
-
this.dispatcher.sortSetFieldSelectors([
|
|
2481
|
+
this.dispatcher.sortSetFieldSelectors([
|
|
2482
|
+
{ fieldSelector: sort.fieldSelector, descending: sort.descending },
|
|
2483
|
+
]);
|
|
2504
2484
|
});
|
|
2505
2485
|
}
|
|
2506
2486
|
inlineFilterButtonClick() {
|
|
@@ -2510,7 +2490,8 @@ class SkyListToolbarComponent {
|
|
|
2510
2490
|
this.searchApplied.next(searchText);
|
|
2511
2491
|
if (this.inMemorySearchEnabled) {
|
|
2512
2492
|
this.state.pipe(take(1)).subscribe((currentState) => {
|
|
2513
|
-
if (currentState.paging.pageNumber &&
|
|
2493
|
+
if (currentState.paging.pageNumber &&
|
|
2494
|
+
currentState.paging.pageNumber !== 1) {
|
|
2514
2495
|
this.dispatcher.next(new ListPagingSetPageNumberAction(Number(1)));
|
|
2515
2496
|
}
|
|
2516
2497
|
this.dispatcher.searchSetText(searchText);
|
|
@@ -2518,16 +2499,17 @@ class SkyListToolbarComponent {
|
|
|
2518
2499
|
}
|
|
2519
2500
|
}
|
|
2520
2501
|
itemIsInView(itemView, activeView) {
|
|
2521
|
-
return
|
|
2502
|
+
return itemView === undefined || itemView === activeView;
|
|
2522
2503
|
}
|
|
2523
2504
|
getSortSelectors() {
|
|
2524
|
-
return combineLatest(this.state.pipe(map(s => s.sort.available), distinctUntilChanged()), this.state.pipe(map(s => s.sort.global), distinctUntilChanged()), this.state.pipe(map(s => s.sort.fieldSelectors), distinctUntilChanged()), (available, global, fieldSelectors) => {
|
|
2505
|
+
return combineLatest(this.state.pipe(map((s) => s.sort.available), distinctUntilChanged()), this.state.pipe(map((s) => s.sort.global), distinctUntilChanged()), this.state.pipe(map((s) => s.sort.fieldSelectors), distinctUntilChanged()), (available, global, fieldSelectors) => {
|
|
2525
2506
|
// Get sorts that are in the global that are not in the available
|
|
2526
|
-
let sorts = global.filter(g => available.filter(a => a.fieldSelector === g.fieldSelector)
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2507
|
+
let sorts = global.filter((g) => available.filter((a) => a.fieldSelector === g.fieldSelector)
|
|
2508
|
+
.length === 0);
|
|
2509
|
+
let resultSortSelectors = [...sorts, ...available].map((sortLabels) => {
|
|
2510
|
+
let fs = fieldSelectors.filter((f) => {
|
|
2511
|
+
return (f.fieldSelector === sortLabels.fieldSelector &&
|
|
2512
|
+
f.descending === sortLabels.descending);
|
|
2531
2513
|
});
|
|
2532
2514
|
let selected = false;
|
|
2533
2515
|
if (fs.length > 0) {
|
|
@@ -2535,14 +2517,14 @@ class SkyListToolbarComponent {
|
|
|
2535
2517
|
}
|
|
2536
2518
|
return {
|
|
2537
2519
|
sort: sortLabels,
|
|
2538
|
-
selected: selected
|
|
2520
|
+
selected: selected,
|
|
2539
2521
|
};
|
|
2540
2522
|
});
|
|
2541
2523
|
return resultSortSelectors;
|
|
2542
2524
|
}).pipe(takeUntil(this.ngUnsubscribe));
|
|
2543
2525
|
}
|
|
2544
2526
|
watchTemplates() {
|
|
2545
|
-
combineLatest(this.state.pipe(map(s => s.toolbar), distinctUntilChanged()), this.view.pipe(distinctUntilChanged()), (toolbar, view) => {
|
|
2527
|
+
combineLatest(this.state.pipe(map((s) => s.toolbar), distinctUntilChanged()), this.view.pipe(distinctUntilChanged()), (toolbar, view) => {
|
|
2546
2528
|
const items = toolbar.items.filter((i) => {
|
|
2547
2529
|
return this.itemIsInView(i.view, view);
|
|
2548
2530
|
});
|
|
@@ -2552,7 +2534,8 @@ class SkyListToolbarComponent {
|
|
|
2552
2534
|
templates[item.location].push(item);
|
|
2553
2535
|
});
|
|
2554
2536
|
return templates;
|
|
2555
|
-
})
|
|
2537
|
+
})
|
|
2538
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
2556
2539
|
.subscribe((value) => {
|
|
2557
2540
|
this.leftTemplates = value.left;
|
|
2558
2541
|
this.centerTemplates = value.center;
|
|
@@ -2561,13 +2544,13 @@ class SkyListToolbarComponent {
|
|
|
2561
2544
|
});
|
|
2562
2545
|
}
|
|
2563
2546
|
}
|
|
2564
|
-
SkyListToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2565
|
-
SkyListToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2547
|
+
SkyListToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ListState }, { token: ListStateDispatcher }, { token: ListToolbarState }, { token: ListToolbarStateDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
2548
|
+
SkyListToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListToolbarComponent, selector: "sky-list-toolbar", inputs: { inMemorySearchEnabled: "inMemorySearchEnabled", placeholder: "placeholder", searchEnabled: "searchEnabled", sortSelectorEnabled: "sortSelectorEnabled", toolbarType: "toolbarType", searchText: "searchText" }, providers: [
|
|
2566
2549
|
ListToolbarState,
|
|
2567
2550
|
ListToolbarStateDispatcher,
|
|
2568
|
-
ListToolbarStateModel
|
|
2569
|
-
], 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: SkySearchComponent, descendants: true, read: SkySearchComponent }, { propertyName: "searchTemplate", first: true, predicate: ["search"], descendants: true, read: TemplateRef, static: true }, { propertyName: "sortSelectorTemplate", first: true, predicate: ["sortSelector"], descendants: true, read: TemplateRef, static: true }, { propertyName: "inlineFilterButtonTemplate", first: true, predicate: ["inlineFilterButton"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<div class=\"sky-list-toolbar-container\">\n <sky-toolbar *ngIf=\"(type | async) !== 'search'\">\n
|
|
2570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2551
|
+
ListToolbarStateModel,
|
|
2552
|
+
], 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: SkySearchComponent, descendants: true, read: SkySearchComponent }, { propertyName: "searchTemplate", first: true, predicate: ["search"], descendants: true, read: TemplateRef, static: true }, { propertyName: "sortSelectorTemplate", first: true, predicate: ["sortSelector"], descendants: true, read: TemplateRef, static: true }, { propertyName: "inlineFilterButtonTemplate", first: true, predicate: ["inlineFilterButton"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, 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$2.λ37, selector: "sky-toolbar" }, { type: i3$2.λ38, selector: "sky-toolbar-section" }, { type: i3$2.λ39, selector: "sky-toolbar-item" }, { type: SkyListToolbarItemRendererComponent, selector: "sky-list-toolbar-item-renderer", inputs: ["template"] }, { type: i3$2.λ40, selector: "sky-toolbar-view-actions" }, { type: SkyListMultiselectToolbarComponent, selector: "sky-list-multiselect-toolbar", inputs: ["showOnlySelected"] }, { type: i8.SkySearchComponent, selector: "sky-search", inputs: ["searchText", "expandMode", "debounceTime", "disabled", "placeholderText"], outputs: ["searchApply", "searchChange", "searchClear"] }, { type: i3.λ14, selector: "sky-sort", inputs: ["showButtonText"] }, { type: i3.λ13, selector: "sky-sort-item", inputs: ["active"], outputs: ["itemSelect"] }, { type: i3.λ1, selector: "sky-filter-button", inputs: ["filterButtonId", "ariaControls", "ariaExpanded", "active", "disabled", "showButtonText"], outputs: ["filterButtonClick"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarComponent, decorators: [{
|
|
2571
2554
|
type: Component,
|
|
2572
2555
|
args: [{
|
|
2573
2556
|
selector: 'sky-list-toolbar',
|
|
@@ -2576,9 +2559,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2576
2559
|
providers: [
|
|
2577
2560
|
ListToolbarState,
|
|
2578
2561
|
ListToolbarStateDispatcher,
|
|
2579
|
-
ListToolbarStateModel
|
|
2562
|
+
ListToolbarStateModel,
|
|
2580
2563
|
],
|
|
2581
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2564
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2582
2565
|
}]
|
|
2583
2566
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: ListState }, { type: ListStateDispatcher }, { type: ListToolbarState }, { type: ListToolbarStateDispatcher }]; }, propDecorators: { inMemorySearchEnabled: [{
|
|
2584
2567
|
type: Input
|
|
@@ -2590,7 +2573,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2590
2573
|
type: ViewChild,
|
|
2591
2574
|
args: [SkySearchComponent, {
|
|
2592
2575
|
read: SkySearchComponent,
|
|
2593
|
-
static: false
|
|
2576
|
+
static: false,
|
|
2594
2577
|
}]
|
|
2595
2578
|
}], sortSelectorEnabled: [{
|
|
2596
2579
|
type: Input
|
|
@@ -2617,19 +2600,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2617
2600
|
type: ViewChild,
|
|
2618
2601
|
args: ['search', {
|
|
2619
2602
|
read: TemplateRef,
|
|
2620
|
-
static: true
|
|
2603
|
+
static: true,
|
|
2621
2604
|
}]
|
|
2622
2605
|
}], sortSelectorTemplate: [{
|
|
2623
2606
|
type: ViewChild,
|
|
2624
2607
|
args: ['sortSelector', {
|
|
2625
2608
|
read: TemplateRef,
|
|
2626
|
-
static: true
|
|
2609
|
+
static: true,
|
|
2627
2610
|
}]
|
|
2628
2611
|
}], inlineFilterButtonTemplate: [{
|
|
2629
2612
|
type: ViewChild,
|
|
2630
2613
|
args: ['inlineFilterButton', {
|
|
2631
2614
|
read: TemplateRef,
|
|
2632
|
-
static: true
|
|
2615
|
+
static: true,
|
|
2633
2616
|
}]
|
|
2634
2617
|
}] } });
|
|
2635
2618
|
|
|
@@ -2638,22 +2621,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2638
2621
|
*/
|
|
2639
2622
|
class SkyListToolbarSearchActionsComponent {
|
|
2640
2623
|
}
|
|
2641
|
-
SkyListToolbarSearchActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2642
|
-
SkyListToolbarSearchActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2643
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2624
|
+
SkyListToolbarSearchActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarSearchActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2625
|
+
SkyListToolbarSearchActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SkyListToolbarSearchActionsComponent, selector: "sky-list-toolbar-search-actions", ngImport: i0, 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.ChangeDetectionStrategy.OnPush });
|
|
2626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarSearchActionsComponent, decorators: [{
|
|
2644
2627
|
type: Component,
|
|
2645
2628
|
args: [{
|
|
2646
2629
|
selector: 'sky-list-toolbar-search-actions',
|
|
2647
2630
|
templateUrl: './list-toolbar-search-actions.component.html',
|
|
2648
2631
|
styleUrls: ['./list-toolbar-search-actions.component.scss'],
|
|
2649
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2632
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2650
2633
|
}]
|
|
2651
2634
|
}] });
|
|
2652
2635
|
|
|
2653
2636
|
class SkyListToolbarModule {
|
|
2654
2637
|
}
|
|
2655
|
-
SkyListToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2656
|
-
SkyListToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2638
|
+
SkyListToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2639
|
+
SkyListToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarModule, declarations: [SkyListToolbarComponent,
|
|
2657
2640
|
SkyListToolbarItemComponent,
|
|
2658
2641
|
SkyListToolbarItemRendererComponent,
|
|
2659
2642
|
SkyListMultiselectToolbarComponent,
|
|
@@ -2673,7 +2656,7 @@ SkyListToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
|
|
|
2673
2656
|
SkyListToolbarSearchActionsComponent,
|
|
2674
2657
|
SkyListToolbarSortComponent,
|
|
2675
2658
|
SkyListToolbarViewActionsComponent] });
|
|
2676
|
-
SkyListToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
2659
|
+
SkyListToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarModule, imports: [[
|
|
2677
2660
|
CommonModule,
|
|
2678
2661
|
SkyCheckboxModule,
|
|
2679
2662
|
SkyI18nModule,
|
|
@@ -2683,9 +2666,9 @@ SkyListToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
2683
2666
|
SkyFilterModule,
|
|
2684
2667
|
SkyListFiltersModule,
|
|
2685
2668
|
SkyIconModule,
|
|
2686
|
-
SkyListBuilderResourcesModule
|
|
2669
|
+
SkyListBuilderResourcesModule,
|
|
2687
2670
|
]] });
|
|
2688
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SkyListToolbarModule, decorators: [{
|
|
2689
2672
|
type: NgModule,
|
|
2690
2673
|
args: [{
|
|
2691
2674
|
declarations: [
|
|
@@ -2695,7 +2678,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2695
2678
|
SkyListMultiselectToolbarComponent,
|
|
2696
2679
|
SkyListToolbarSearchActionsComponent,
|
|
2697
2680
|
SkyListToolbarSortComponent,
|
|
2698
|
-
SkyListToolbarViewActionsComponent
|
|
2681
|
+
SkyListToolbarViewActionsComponent,
|
|
2699
2682
|
],
|
|
2700
2683
|
imports: [
|
|
2701
2684
|
CommonModule,
|
|
@@ -2707,15 +2690,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImpor
|
|
|
2707
2690
|
SkyFilterModule,
|
|
2708
2691
|
SkyListFiltersModule,
|
|
2709
2692
|
SkyIconModule,
|
|
2710
|
-
SkyListBuilderResourcesModule
|
|
2693
|
+
SkyListBuilderResourcesModule,
|
|
2711
2694
|
],
|
|
2712
2695
|
exports: [
|
|
2713
2696
|
SkyListToolbarComponent,
|
|
2714
2697
|
SkyListToolbarItemComponent,
|
|
2715
2698
|
SkyListToolbarSearchActionsComponent,
|
|
2716
2699
|
SkyListToolbarSortComponent,
|
|
2717
|
-
SkyListToolbarViewActionsComponent
|
|
2718
|
-
]
|
|
2700
|
+
SkyListToolbarViewActionsComponent,
|
|
2701
|
+
],
|
|
2719
2702
|
}]
|
|
2720
2703
|
}] });
|
|
2721
2704
|
|