@skyux/list-builder 5.5.0 → 5.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/skyux-list-builder.umd.js +702 -701
- package/documentation.json +552 -789
- package/esm2015/lib/modules/list/list-data-request.model.js.map +1 -1
- package/esm2015/lib/modules/list/list-data.provider.js +3 -1
- package/esm2015/lib/modules/list/list-data.provider.js.map +1 -1
- package/esm2015/lib/modules/list/list-paging.component.js.map +1 -1
- package/esm2015/lib/modules/list/list-view.component.js +2 -1
- package/esm2015/lib/modules/list/list-view.component.js.map +1 -1
- package/esm2015/lib/modules/list/list.component.js +17 -17
- package/esm2015/lib/modules/list/list.component.js.map +1 -1
- package/esm2015/lib/modules/list/list.module.js +1 -1
- package/esm2015/lib/modules/list/list.module.js.map +1 -1
- package/esm2015/lib/modules/list/state/filters/filters.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list/state/items/items.orchestrator.js +5 -5
- package/esm2015/lib/modules/list/state/items/items.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list/state/list-state-action.type.js.map +1 -1
- package/esm2015/lib/modules/list/state/list-state.model.js +1 -1
- package/esm2015/lib/modules/list/state/list-state.model.js.map +1 -1
- package/esm2015/lib/modules/list/state/list-state.rxstate.js +2 -2
- package/esm2015/lib/modules/list/state/list-state.rxstate.js.map +1 -1
- package/esm2015/lib/modules/list/state/list-state.state-node.js +4 -4
- package/esm2015/lib/modules/list/state/list-state.state-node.js.map +1 -1
- package/esm2015/lib/modules/list/state/paging/paging.orchestrator.js +1 -1
- package/esm2015/lib/modules/list/state/paging/paging.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list/state/search/search.model.js.map +1 -1
- package/esm2015/lib/modules/list/state/search/search.orchestrator.js +2 -2
- package/esm2015/lib/modules/list/state/search/search.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list/state/search/set-options.action.js.map +1 -1
- package/esm2015/lib/modules/list/state/selected/selected.orchestrator.js +3 -3
- package/esm2015/lib/modules/list/state/selected/selected.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list/state/sort/label.model.js.map +1 -1
- package/esm2015/lib/modules/list/state/sort/sort.orchestrator.js +2 -2
- package/esm2015/lib/modules/list/state/sort/sort.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list/state/toolbar/toolbar-item.model.js.map +1 -1
- package/esm2015/lib/modules/list/state/toolbar/toolbar.orchestrator.js +3 -3
- package/esm2015/lib/modules/list/state/toolbar/toolbar.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list/state/views/views.orchestrator.js +1 -1
- package/esm2015/lib/modules/list/state/views/views.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list-data-provider-in-memory/list-data-in-memory.provider.js +12 -12
- package/esm2015/lib/modules/list-data-provider-in-memory/list-data-in-memory.provider.js.map +1 -1
- package/esm2015/lib/modules/list-filters/filter.model.js.map +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-button.component.js.map +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline-item-renderer.component.js +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline-item-renderer.component.js.map +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline-item.component.js +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline-item.component.js.map +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline.component.js +3 -3
- package/esm2015/lib/modules/list-filters/list-filter-inline.component.js.map +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-inline.model.js.map +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-summary.component.js +1 -1
- package/esm2015/lib/modules/list-filters/list-filter-summary.component.js.map +1 -1
- package/esm2015/lib/modules/list-filters/list-filters.module.js +3 -3
- package/esm2015/lib/modules/list-filters/list-filters.module.js.map +1 -1
- package/esm2015/lib/modules/list-paging/list-paging.component.js +3 -3
- package/esm2015/lib/modules/list-paging/list-paging.component.js.map +1 -1
- package/esm2015/lib/modules/list-paging/list-paging.module.js +2 -2
- package/esm2015/lib/modules/list-paging/list-paging.module.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-multiselect-toolbar.component.js +3 -4
- package/esm2015/lib/modules/list-toolbar/list-multiselect-toolbar.component.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions-host.component.js +1 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions-host.component.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.component.js +1 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.component.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.module.js +2 -2
- package/esm2015/lib/modules/list-toolbar/list-secondary-actions/list-secondary-actions.module.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item-renderer.component.js +1 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item-renderer.component.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item.component.js +1 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar-item.component.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar.component.js +14 -14
- package/esm2015/lib/modules/list-toolbar/list-toolbar.component.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/list-toolbar.module.js +10 -10
- package/esm2015/lib/modules/list-toolbar/list-toolbar.module.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/state/config/config.model.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/state/config/config.orchestrator.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state-action.type.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.rxstate.js.map +1 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.state-node.js +1 -1
- package/esm2015/lib/modules/list-toolbar/state/toolbar-state.state-node.js.map +1 -1
- package/esm2015/lib/modules/shared/sky-list-builder-resources.module.js +1 -1
- package/esm2015/lib/modules/shared/sky-list-builder-resources.module.js.map +1 -1
- package/fesm2015/skyux-list-builder.js +645 -643
- package/fesm2015/skyux-list-builder.js.map +1 -1
- package/lib/modules/list/list-data.provider.d.ts +2 -1
- package/lib/modules/list/list-paging.component.d.ts +1 -1
- package/lib/modules/list/list-view.component.d.ts +1 -1
- package/lib/modules/list/list.component.d.ts +4 -4
- package/lib/modules/list/state/filters/filters.orchestrator.d.ts +1 -1
- package/lib/modules/list/state/list-state-action.type.d.ts +13 -13
- package/lib/modules/list/state/list-state.model.d.ts +1 -1
- package/lib/modules/list/state/search/set-options.action.d.ts +1 -1
- package/lib/modules/list-data-provider-in-memory/list-data-in-memory.provider.d.ts +2 -2
- package/lib/modules/list-filters/list-filter-inline-item-renderer.component.d.ts +1 -1
- package/lib/modules/list-filters/list-filter-inline-item.component.d.ts +1 -1
- package/lib/modules/list-filters/list-filter-inline.component.d.ts +1 -1
- package/lib/modules/list-filters/list-filter-inline.model.d.ts +1 -1
- package/lib/modules/list-filters/list-filter-summary.component.d.ts +1 -1
- package/lib/modules/list-paging/list-paging.component.d.ts +1 -1
- package/lib/modules/list-toolbar/list-multiselect-toolbar.component.d.ts +2 -2
- package/lib/modules/list-toolbar/list-toolbar-item-renderer.component.d.ts +1 -1
- package/lib/modules/list-toolbar/list-toolbar.component.d.ts +5 -5
- package/package.json +16 -18
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@skyux/list-builder', ['exports', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["list-builder"] = {}), global.ng.
|
|
5
|
-
})(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@skyux/list-builder-common'), require('rxjs'), require('rxjs/operators'), require('@skyux/lists'), require('@skyux/i18n'), require('@skyux/indicators'), require('@skyux/popovers'), require('@skyux/forms'), require('@skyux/layout'), require('@skyux/lookup')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@skyux/list-builder', ['exports', '@angular/common', '@angular/core', '@skyux/list-builder-common', 'rxjs', 'rxjs/operators', '@skyux/lists', '@skyux/i18n', '@skyux/indicators', '@skyux/popovers', '@skyux/forms', '@skyux/layout', '@skyux/lookup'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux["list-builder"] = {}), global.ng.common, global.ng.core, global.listBuilderCommon, global.rxjs, global.rxjs.operators, global.i3, global.i5, global.i3$1, global.i2, global.i5$1, global.i3$2, global.i8));
|
|
5
|
+
})(this, (function (exports, i4, i0, listBuilderCommon, rxjs, operators, i3, i5, i3$1, i2, i5$1, i3$2, i8) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
25
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
26
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
27
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
28
28
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
29
29
|
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
30
30
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
+
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
31
32
|
var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
|
|
32
33
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
33
|
-
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
34
34
|
|
|
35
35
|
var ListDataRequestModel = /** @class */ (function () {
|
|
36
36
|
function ListDataRequestModel(data) {
|
|
@@ -66,95 +66,11 @@
|
|
|
66
66
|
*/
|
|
67
67
|
var ListDataProvider = /** @class */ (function () {
|
|
68
68
|
function ListDataProvider(data) {
|
|
69
|
+
this.data = data;
|
|
69
70
|
}
|
|
70
71
|
return ListDataProvider;
|
|
71
72
|
}());
|
|
72
73
|
|
|
73
|
-
/**
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
var ListItemsLoadAction = /** @class */ (function () {
|
|
77
|
-
function ListItemsLoadAction(items, refresh, dataChanged, count) {
|
|
78
|
-
if (refresh === void 0) { refresh = false; }
|
|
79
|
-
if (dataChanged === void 0) { dataChanged = true; }
|
|
80
|
-
this.items = items;
|
|
81
|
-
this.refresh = refresh;
|
|
82
|
-
this.dataChanged = dataChanged;
|
|
83
|
-
this.count = count;
|
|
84
|
-
}
|
|
85
|
-
return ListItemsLoadAction;
|
|
86
|
-
}());
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
var ListItemsSetLoadingAction = /** @class */ (function () {
|
|
92
|
-
function ListItemsSetLoadingAction(loading) {
|
|
93
|
-
if (loading === void 0) { loading = true; }
|
|
94
|
-
this.loading = loading;
|
|
95
|
-
}
|
|
96
|
-
return ListItemsSetLoadingAction;
|
|
97
|
-
}());
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @internal
|
|
101
|
-
*/
|
|
102
|
-
var ListSelectedLoadAction = /** @class */ (function () {
|
|
103
|
-
function ListSelectedLoadAction(items) {
|
|
104
|
-
this.items = items;
|
|
105
|
-
}
|
|
106
|
-
return ListSelectedLoadAction;
|
|
107
|
-
}());
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
var ListSelectedSetLoadingAction = /** @class */ (function () {
|
|
113
|
-
function ListSelectedSetLoadingAction(loading) {
|
|
114
|
-
if (loading === void 0) { loading = true; }
|
|
115
|
-
this.loading = loading;
|
|
116
|
-
}
|
|
117
|
-
return ListSelectedSetLoadingAction;
|
|
118
|
-
}());
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Specifies a set of fields to sort by.
|
|
122
|
-
*/
|
|
123
|
-
var ListSortModel = /** @class */ (function () {
|
|
124
|
-
function ListSortModel(data) {
|
|
125
|
-
/**
|
|
126
|
-
* Specifies the list of available views to sort.
|
|
127
|
-
*/
|
|
128
|
-
this.available = [];
|
|
129
|
-
/**
|
|
130
|
-
* Specifies whether the sort applies to all list views.
|
|
131
|
-
*/
|
|
132
|
-
this.global = [];
|
|
133
|
-
/**
|
|
134
|
-
* Specifies the fields to sort.
|
|
135
|
-
* For information about `ListSortFieldSelectorModel`, see the
|
|
136
|
-
* [shared classes for lists](https://developer.blackbaud.com/skyux-list-builder-common/docs/list-builder-common).
|
|
137
|
-
*/
|
|
138
|
-
this.fieldSelectors = [];
|
|
139
|
-
if (data) {
|
|
140
|
-
this.available = data.available;
|
|
141
|
-
this.global = data.global;
|
|
142
|
-
this.fieldSelectors = data.fieldSelectors;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return ListSortModel;
|
|
146
|
-
}());
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @internal
|
|
150
|
-
*/
|
|
151
|
-
var ListSortSetFieldSelectorsAction = /** @class */ (function () {
|
|
152
|
-
function ListSortSetFieldSelectorsAction(fieldSelectors) {
|
|
153
|
-
this.fieldSelectors = fieldSelectors;
|
|
154
|
-
}
|
|
155
|
-
return ListSortSetFieldSelectorsAction;
|
|
156
|
-
}());
|
|
157
|
-
|
|
158
74
|
/*! *****************************************************************************
|
|
159
75
|
Copyright (c) Microsoft Corporation.
|
|
160
76
|
|
|
@@ -664,89 +580,89 @@
|
|
|
664
580
|
return SkyListInMemoryDataProvider;
|
|
665
581
|
}(ListDataProvider));
|
|
666
582
|
|
|
583
|
+
var idIndex$2 = 0;
|
|
667
584
|
/**
|
|
668
585
|
* @internal
|
|
669
586
|
*/
|
|
670
|
-
var
|
|
671
|
-
function
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Contains data about the selected items in the list.
|
|
684
|
-
*/
|
|
685
|
-
var ListSelectedModel = /** @class */ (function () {
|
|
686
|
-
function ListSelectedModel() {
|
|
687
|
-
this.selectedIdMap = new Map();
|
|
587
|
+
var ListViewComponent = /** @class */ (function () {
|
|
588
|
+
function ListViewComponent(state, defaultName) {
|
|
589
|
+
var _this = this;
|
|
590
|
+
this.viewId = "sky-list-view-cmp-" + ++idIndex$2;
|
|
591
|
+
this.state = state;
|
|
592
|
+
this.viewName = defaultName;
|
|
593
|
+
/* istanbul ignore next */
|
|
594
|
+
this.hasToolbar = this.state.pipe(operators.map(function (s) { return s.toolbar.exists; }));
|
|
595
|
+
this.active = this.state.pipe(operators.map(function (s) { return s.views.active === _this.viewId; }));
|
|
596
|
+
this.active
|
|
597
|
+
.pipe(operators.distinctUntilChanged())
|
|
598
|
+
.subscribe(function (isActive) { return isActive ? _this.onViewActive() : _this.onViewInactive(); });
|
|
688
599
|
}
|
|
689
|
-
|
|
600
|
+
Object.defineProperty(ListViewComponent.prototype, "id", {
|
|
601
|
+
get: function () {
|
|
602
|
+
return this.viewId;
|
|
603
|
+
},
|
|
604
|
+
enumerable: false,
|
|
605
|
+
configurable: true
|
|
606
|
+
});
|
|
607
|
+
Object.defineProperty(ListViewComponent.prototype, "label", {
|
|
608
|
+
get: function () {
|
|
609
|
+
return this.viewName;
|
|
610
|
+
},
|
|
611
|
+
enumerable: false,
|
|
612
|
+
configurable: true
|
|
613
|
+
});
|
|
614
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
615
|
+
ListViewComponent.prototype.onViewActive = function () { };
|
|
616
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
617
|
+
ListViewComponent.prototype.onViewInactive = function () { };
|
|
618
|
+
return ListViewComponent;
|
|
690
619
|
}());
|
|
691
620
|
|
|
692
621
|
/**
|
|
693
622
|
* @internal
|
|
694
623
|
*/
|
|
695
|
-
var
|
|
696
|
-
function
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
this.type = data.type;
|
|
704
|
-
this.showMultiselectToolbar = data.showMultiselectToolbar;
|
|
705
|
-
}
|
|
624
|
+
var ListItemsLoadAction = /** @class */ (function () {
|
|
625
|
+
function ListItemsLoadAction(items, refresh, dataChanged, count) {
|
|
626
|
+
if (refresh === void 0) { refresh = false; }
|
|
627
|
+
if (dataChanged === void 0) { dataChanged = true; }
|
|
628
|
+
this.items = items;
|
|
629
|
+
this.refresh = refresh;
|
|
630
|
+
this.dataChanged = dataChanged;
|
|
631
|
+
this.count = count;
|
|
706
632
|
}
|
|
707
|
-
return
|
|
633
|
+
return ListItemsLoadAction;
|
|
708
634
|
}());
|
|
709
635
|
|
|
710
636
|
/**
|
|
711
637
|
* @internal
|
|
712
638
|
*/
|
|
713
|
-
var
|
|
714
|
-
function
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
this.active = data.active;
|
|
718
|
-
this.views = data.views;
|
|
719
|
-
}
|
|
639
|
+
var ListItemsSetLoadingAction = /** @class */ (function () {
|
|
640
|
+
function ListItemsSetLoadingAction(loading) {
|
|
641
|
+
if (loading === void 0) { loading = true; }
|
|
642
|
+
this.loading = loading;
|
|
720
643
|
}
|
|
721
|
-
return
|
|
644
|
+
return ListItemsSetLoadingAction;
|
|
722
645
|
}());
|
|
723
646
|
|
|
724
647
|
/**
|
|
725
648
|
* @internal
|
|
726
649
|
*/
|
|
727
|
-
var
|
|
728
|
-
function
|
|
729
|
-
this.filters =
|
|
730
|
-
this.items = new listBuilderCommon.AsyncList();
|
|
731
|
-
this.paging = new ListPagingModel();
|
|
732
|
-
this.search = new ListSearchModel();
|
|
733
|
-
this.selected = new listBuilderCommon.AsyncItem();
|
|
734
|
-
this.sort = new ListSortModel();
|
|
735
|
-
this.toolbar = new ListToolbarModel();
|
|
736
|
-
this.views = new ListViewsModel();
|
|
737
|
-
this.selected.item = new ListSelectedModel();
|
|
650
|
+
var ListFiltersUpdateAction = /** @class */ (function () {
|
|
651
|
+
function ListFiltersUpdateAction(filters) {
|
|
652
|
+
this.filters = filters;
|
|
738
653
|
}
|
|
739
|
-
return
|
|
654
|
+
return ListFiltersUpdateAction;
|
|
740
655
|
}());
|
|
741
656
|
|
|
742
657
|
/**
|
|
743
658
|
* @internal
|
|
744
659
|
*/
|
|
745
|
-
var
|
|
746
|
-
function
|
|
747
|
-
|
|
660
|
+
var ListSearchSetFieldSelectorsAction = /** @class */ (function () {
|
|
661
|
+
function ListSearchSetFieldSelectorsAction(fieldSelectors) {
|
|
662
|
+
if (fieldSelectors === void 0) { fieldSelectors = []; }
|
|
663
|
+
this.fieldSelectors = fieldSelectors;
|
|
748
664
|
}
|
|
749
|
-
return
|
|
665
|
+
return ListSearchSetFieldSelectorsAction;
|
|
750
666
|
}());
|
|
751
667
|
|
|
752
668
|
/**
|
|
@@ -760,27 +676,6 @@
|
|
|
760
676
|
return ListSearchSetFunctionsAction;
|
|
761
677
|
}());
|
|
762
678
|
|
|
763
|
-
/**
|
|
764
|
-
* @internal
|
|
765
|
-
*/
|
|
766
|
-
var ListSearchSetSearchTextAction = /** @class */ (function () {
|
|
767
|
-
function ListSearchSetSearchTextAction(searchText) {
|
|
768
|
-
this.searchText = searchText;
|
|
769
|
-
}
|
|
770
|
-
return ListSearchSetSearchTextAction;
|
|
771
|
-
}());
|
|
772
|
-
|
|
773
|
-
/**
|
|
774
|
-
* @internal
|
|
775
|
-
*/
|
|
776
|
-
var ListSearchSetFieldSelectorsAction = /** @class */ (function () {
|
|
777
|
-
function ListSearchSetFieldSelectorsAction(fieldSelectors) {
|
|
778
|
-
if (fieldSelectors === void 0) { fieldSelectors = []; }
|
|
779
|
-
this.fieldSelectors = fieldSelectors;
|
|
780
|
-
}
|
|
781
|
-
return ListSearchSetFieldSelectorsAction;
|
|
782
|
-
}());
|
|
783
|
-
|
|
784
679
|
/**
|
|
785
680
|
* @internal
|
|
786
681
|
*/
|
|
@@ -793,6 +688,16 @@
|
|
|
793
688
|
return ListSearchSetOptionsAction;
|
|
794
689
|
}());
|
|
795
690
|
|
|
691
|
+
/**
|
|
692
|
+
* @internal
|
|
693
|
+
*/
|
|
694
|
+
var ListSearchSetSearchTextAction = /** @class */ (function () {
|
|
695
|
+
function ListSearchSetSearchTextAction(searchText) {
|
|
696
|
+
this.searchText = searchText;
|
|
697
|
+
}
|
|
698
|
+
return ListSearchSetSearchTextAction;
|
|
699
|
+
}());
|
|
700
|
+
|
|
796
701
|
/**
|
|
797
702
|
* @internal
|
|
798
703
|
*/
|
|
@@ -817,6 +722,16 @@
|
|
|
817
722
|
return ListSortSetAvailableAction;
|
|
818
723
|
}());
|
|
819
724
|
|
|
725
|
+
/**
|
|
726
|
+
* @internal
|
|
727
|
+
*/
|
|
728
|
+
var ListSortSetFieldSelectorsAction = /** @class */ (function () {
|
|
729
|
+
function ListSortSetFieldSelectorsAction(fieldSelectors) {
|
|
730
|
+
this.fieldSelectors = fieldSelectors;
|
|
731
|
+
}
|
|
732
|
+
return ListSortSetFieldSelectorsAction;
|
|
733
|
+
}());
|
|
734
|
+
|
|
820
735
|
/**
|
|
821
736
|
* @internal
|
|
822
737
|
*/
|
|
@@ -1048,187 +963,159 @@
|
|
|
1048
963
|
/**
|
|
1049
964
|
* @internal
|
|
1050
965
|
*/
|
|
1051
|
-
var
|
|
1052
|
-
function
|
|
1053
|
-
|
|
966
|
+
var ListPagingModel = /** @class */ (function () {
|
|
967
|
+
function ListPagingModel(data) {
|
|
968
|
+
if (data !== undefined) {
|
|
969
|
+
this.itemsPerPage = data.itemsPerPage || 10;
|
|
970
|
+
this.maxDisplayedPages = data.maxDisplayedPages || 5;
|
|
971
|
+
this.pageCount = data.pageCount || 0;
|
|
972
|
+
this.pageNumber = data.pageNumber || 1;
|
|
973
|
+
}
|
|
1054
974
|
}
|
|
1055
|
-
return
|
|
975
|
+
return ListPagingModel;
|
|
1056
976
|
}());
|
|
1057
977
|
|
|
1058
978
|
/**
|
|
1059
|
-
*
|
|
979
|
+
* Contains data about the selected items in the list.
|
|
1060
980
|
*/
|
|
1061
|
-
var
|
|
1062
|
-
function
|
|
1063
|
-
this.
|
|
981
|
+
var ListSelectedModel = /** @class */ (function () {
|
|
982
|
+
function ListSelectedModel() {
|
|
983
|
+
this.selectedIdMap = new Map();
|
|
1064
984
|
}
|
|
1065
|
-
return
|
|
985
|
+
return ListSelectedModel;
|
|
986
|
+
}());
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Specifies a set of fields to sort by.
|
|
990
|
+
*/
|
|
991
|
+
var ListSortModel = /** @class */ (function () {
|
|
992
|
+
function ListSortModel(data) {
|
|
993
|
+
/**
|
|
994
|
+
* Specifies the list of available views to sort.
|
|
995
|
+
*/
|
|
996
|
+
this.available = [];
|
|
997
|
+
/**
|
|
998
|
+
* Specifies whether the sort applies to all list views.
|
|
999
|
+
*/
|
|
1000
|
+
this.global = [];
|
|
1001
|
+
/**
|
|
1002
|
+
* Specifies the fields to sort.
|
|
1003
|
+
* For information about `ListSortFieldSelectorModel`, see the
|
|
1004
|
+
* [shared classes for lists](https://developer.blackbaud.com/skyux-list-builder-common/docs/list-builder-common).
|
|
1005
|
+
*/
|
|
1006
|
+
this.fieldSelectors = [];
|
|
1007
|
+
if (data) {
|
|
1008
|
+
this.available = data.available;
|
|
1009
|
+
this.global = data.global;
|
|
1010
|
+
this.fieldSelectors = data.fieldSelectors;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
return ListSortModel;
|
|
1066
1014
|
}());
|
|
1067
1015
|
|
|
1068
1016
|
/**
|
|
1069
1017
|
* @internal
|
|
1070
1018
|
*/
|
|
1071
|
-
var
|
|
1072
|
-
function
|
|
1073
|
-
this.
|
|
1019
|
+
var ListToolbarModel = /** @class */ (function () {
|
|
1020
|
+
function ListToolbarModel(data) {
|
|
1021
|
+
this.items = [];
|
|
1022
|
+
this.showMultiselectToolbar = false;
|
|
1023
|
+
if (data) {
|
|
1024
|
+
this.exists = data.exists;
|
|
1025
|
+
this.disabled = data.disabled;
|
|
1026
|
+
this.items = data.items;
|
|
1027
|
+
this.type = data.type;
|
|
1028
|
+
this.showMultiselectToolbar = data.showMultiselectToolbar;
|
|
1029
|
+
}
|
|
1074
1030
|
}
|
|
1075
|
-
return
|
|
1031
|
+
return ListToolbarModel;
|
|
1076
1032
|
}());
|
|
1077
1033
|
|
|
1078
1034
|
/**
|
|
1079
1035
|
* @internal
|
|
1080
1036
|
*/
|
|
1081
|
-
var
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
.register(ListPagingSetPageNumberAction, _this.setPageNumber);
|
|
1089
|
-
return _this;
|
|
1037
|
+
var ListViewsModel = /** @class */ (function () {
|
|
1038
|
+
function ListViewsModel(data) {
|
|
1039
|
+
this.views = [];
|
|
1040
|
+
if (data) {
|
|
1041
|
+
this.active = data.active;
|
|
1042
|
+
this.views = data.views;
|
|
1043
|
+
}
|
|
1090
1044
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
};
|
|
1094
|
-
ListPagingOrchestrator.prototype.setItemsPerPage = function (state, action) {
|
|
1095
|
-
return new ListPagingModel(Object.assign({}, state, { itemsPerPage: Number(action.itemsPerPage) }));
|
|
1096
|
-
};
|
|
1097
|
-
ListPagingOrchestrator.prototype.setPageNumber = function (state, action) {
|
|
1098
|
-
return new ListPagingModel(Object.assign({}, state, { pageNumber: Number(action.pageNumber) }));
|
|
1099
|
-
};
|
|
1100
|
-
return ListPagingOrchestrator;
|
|
1101
|
-
}(ListStateOrchestrator));
|
|
1045
|
+
return ListViewsModel;
|
|
1046
|
+
}());
|
|
1102
1047
|
|
|
1103
1048
|
/**
|
|
1104
1049
|
* @internal
|
|
1105
1050
|
*/
|
|
1106
|
-
var
|
|
1107
|
-
function
|
|
1108
|
-
this.
|
|
1051
|
+
var ListStateModel = /** @class */ (function () {
|
|
1052
|
+
function ListStateModel() {
|
|
1053
|
+
this.filters = [];
|
|
1054
|
+
this.items = new listBuilderCommon.AsyncList();
|
|
1055
|
+
this.paging = new ListPagingModel();
|
|
1056
|
+
this.search = new ListSearchModel();
|
|
1057
|
+
this.selected = new listBuilderCommon.AsyncItem();
|
|
1058
|
+
this.sort = new ListSortModel();
|
|
1059
|
+
this.toolbar = new ListToolbarModel();
|
|
1060
|
+
this.views = new ListViewsModel();
|
|
1061
|
+
this.selected.item = new ListSelectedModel();
|
|
1109
1062
|
}
|
|
1110
|
-
return
|
|
1063
|
+
return ListStateModel;
|
|
1111
1064
|
}());
|
|
1112
1065
|
|
|
1113
1066
|
/**
|
|
1114
1067
|
* @internal
|
|
1115
1068
|
*/
|
|
1116
|
-
var
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
function ListViewsOrchestrator() {
|
|
1120
|
-
var _this = _super.call(this) || this;
|
|
1121
|
-
_this.register(ListViewsSetActiveAction, _this.setActive).register(ListViewsLoadAction, _this.load);
|
|
1122
|
-
return _this;
|
|
1069
|
+
var ListPagingSetItemsPerPageAction = /** @class */ (function () {
|
|
1070
|
+
function ListPagingSetItemsPerPageAction(itemsPerPage) {
|
|
1071
|
+
this.itemsPerPage = itemsPerPage;
|
|
1123
1072
|
}
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
};
|
|
1127
|
-
ListViewsOrchestrator.prototype.load = function (state, action) {
|
|
1128
|
-
return new ListViewsModel(Object.assign({}, state, { views: action.views }));
|
|
1129
|
-
};
|
|
1130
|
-
return ListViewsOrchestrator;
|
|
1131
|
-
}(ListStateOrchestrator));
|
|
1073
|
+
return ListPagingSetItemsPerPageAction;
|
|
1074
|
+
}());
|
|
1132
1075
|
|
|
1133
1076
|
/**
|
|
1134
1077
|
* @internal
|
|
1135
1078
|
*/
|
|
1136
|
-
var
|
|
1137
|
-
function
|
|
1138
|
-
this.
|
|
1139
|
-
if (data) {
|
|
1140
|
-
this.index = data.index;
|
|
1141
|
-
this.template = data.template;
|
|
1142
|
-
this.location = data.location;
|
|
1143
|
-
this.view = data.view;
|
|
1144
|
-
this.id = data.id;
|
|
1145
|
-
}
|
|
1079
|
+
var ListPagingSetMaxPagesAction = /** @class */ (function () {
|
|
1080
|
+
function ListPagingSetMaxPagesAction(maxPages) {
|
|
1081
|
+
this.maxPages = maxPages;
|
|
1146
1082
|
}
|
|
1147
|
-
return
|
|
1083
|
+
return ListPagingSetMaxPagesAction;
|
|
1148
1084
|
}());
|
|
1149
1085
|
|
|
1150
1086
|
/**
|
|
1151
1087
|
* @internal
|
|
1152
1088
|
*/
|
|
1153
|
-
var
|
|
1154
|
-
function
|
|
1155
|
-
this.
|
|
1089
|
+
var ListPagingSetPageNumberAction = /** @class */ (function () {
|
|
1090
|
+
function ListPagingSetPageNumberAction(pageNumber) {
|
|
1091
|
+
this.pageNumber = pageNumber;
|
|
1156
1092
|
}
|
|
1157
|
-
return
|
|
1093
|
+
return ListPagingSetPageNumberAction;
|
|
1158
1094
|
}());
|
|
1159
1095
|
|
|
1160
1096
|
/**
|
|
1161
1097
|
* @internal
|
|
1162
1098
|
*/
|
|
1163
|
-
var
|
|
1164
|
-
__extends(
|
|
1099
|
+
var ListPagingOrchestrator = /** @class */ (function (_super) {
|
|
1100
|
+
__extends(ListPagingOrchestrator, _super);
|
|
1165
1101
|
/* istanbul ignore next */
|
|
1166
|
-
function
|
|
1102
|
+
function ListPagingOrchestrator() {
|
|
1167
1103
|
var _this = _super.call(this) || this;
|
|
1168
|
-
_this.register(
|
|
1169
|
-
.register(
|
|
1170
|
-
.register(
|
|
1171
|
-
.register(ListToolbarSetTypeAction, _this.setType)
|
|
1172
|
-
.register(ListToolbarItemsRemoveAction, _this.remove)
|
|
1173
|
-
.register(ListToolbarShowMultiselectToolbarAction, _this.showMultiselectToolbar);
|
|
1104
|
+
_this.register(ListPagingSetMaxPagesAction, _this.setMaxPages)
|
|
1105
|
+
.register(ListPagingSetItemsPerPageAction, _this.setItemsPerPage)
|
|
1106
|
+
.register(ListPagingSetPageNumberAction, _this.setPageNumber);
|
|
1174
1107
|
return _this;
|
|
1175
1108
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
newModel.exists = action.exists;
|
|
1179
|
-
return newModel;
|
|
1180
|
-
};
|
|
1181
|
-
ListToolbarOrchestrator.prototype.setDisabled = function (state, action) {
|
|
1182
|
-
var newModel = new ListToolbarModel(state);
|
|
1183
|
-
newModel.disabled = action.disable;
|
|
1184
|
-
return newModel;
|
|
1185
|
-
};
|
|
1186
|
-
ListToolbarOrchestrator.prototype.setType = function (state, action) {
|
|
1187
|
-
var newModel = new ListToolbarModel(state);
|
|
1188
|
-
newModel.type = action.type;
|
|
1189
|
-
return newModel;
|
|
1190
|
-
};
|
|
1191
|
-
ListToolbarOrchestrator.prototype.load = function (state, action) {
|
|
1192
|
-
var newModel = new ListToolbarModel(state);
|
|
1193
|
-
var newListItems = action.items.map(function (item) {
|
|
1194
|
-
/**
|
|
1195
|
-
* NOTE: Originally this function went off the action index and item models did not include
|
|
1196
|
-
* the index. We changed this but must leave functionality to convert the action index for
|
|
1197
|
-
* backwards compatibility.
|
|
1198
|
-
*/
|
|
1199
|
-
if (!item.index) {
|
|
1200
|
-
item.index = action.index;
|
|
1201
|
-
}
|
|
1202
|
-
return new ListToolbarItemModel(item);
|
|
1203
|
-
});
|
|
1204
|
-
var items = __spreadArray(__spreadArray([], __read(state.items)), __read(newListItems));
|
|
1205
|
-
items = items.sort(function (a, b) {
|
|
1206
|
-
if (a.index < b.index) {
|
|
1207
|
-
return -1;
|
|
1208
|
-
}
|
|
1209
|
-
else if (a.index > b.index) {
|
|
1210
|
-
return 1;
|
|
1211
|
-
}
|
|
1212
|
-
else {
|
|
1213
|
-
return 0;
|
|
1214
|
-
}
|
|
1215
|
-
});
|
|
1216
|
-
newModel.items = items;
|
|
1217
|
-
return newModel;
|
|
1109
|
+
ListPagingOrchestrator.prototype.setMaxPages = function (state, action) {
|
|
1110
|
+
return new ListPagingModel(Object.assign({}, state, { maxDisplayedPages: Number(action.maxPages) }));
|
|
1218
1111
|
};
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
newModel.items = newModel.items.filter(function (item) {
|
|
1222
|
-
return action.ids.indexOf(item.id) === -1;
|
|
1223
|
-
});
|
|
1224
|
-
return newModel;
|
|
1112
|
+
ListPagingOrchestrator.prototype.setItemsPerPage = function (state, action) {
|
|
1113
|
+
return new ListPagingModel(Object.assign({}, state, { itemsPerPage: Number(action.itemsPerPage) }));
|
|
1225
1114
|
};
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
newModel.showMultiselectToolbar = action.exists;
|
|
1229
|
-
return newModel;
|
|
1115
|
+
ListPagingOrchestrator.prototype.setPageNumber = function (state, action) {
|
|
1116
|
+
return new ListPagingModel(Object.assign({}, state, { pageNumber: Number(action.pageNumber) }));
|
|
1230
1117
|
};
|
|
1231
|
-
return
|
|
1118
|
+
return ListPagingOrchestrator;
|
|
1232
1119
|
}(ListStateOrchestrator));
|
|
1233
1120
|
|
|
1234
1121
|
/**
|
|
@@ -1275,6 +1162,16 @@
|
|
|
1275
1162
|
return ListSearchOrchestrator;
|
|
1276
1163
|
}(ListStateOrchestrator));
|
|
1277
1164
|
|
|
1165
|
+
/**
|
|
1166
|
+
* @internal
|
|
1167
|
+
*/
|
|
1168
|
+
var ListSelectedLoadAction = /** @class */ (function () {
|
|
1169
|
+
function ListSelectedLoadAction(items) {
|
|
1170
|
+
this.items = items;
|
|
1171
|
+
}
|
|
1172
|
+
return ListSelectedLoadAction;
|
|
1173
|
+
}());
|
|
1174
|
+
|
|
1278
1175
|
/**
|
|
1279
1176
|
* @internal
|
|
1280
1177
|
*/
|
|
@@ -1286,6 +1183,17 @@
|
|
|
1286
1183
|
return ListSelectedSetItemSelectedAction;
|
|
1287
1184
|
}());
|
|
1288
1185
|
|
|
1186
|
+
/**
|
|
1187
|
+
* @internal
|
|
1188
|
+
*/
|
|
1189
|
+
var ListSelectedSetLoadingAction = /** @class */ (function () {
|
|
1190
|
+
function ListSelectedSetLoadingAction(loading) {
|
|
1191
|
+
if (loading === void 0) { loading = true; }
|
|
1192
|
+
this.loading = loading;
|
|
1193
|
+
}
|
|
1194
|
+
return ListSelectedSetLoadingAction;
|
|
1195
|
+
}());
|
|
1196
|
+
|
|
1289
1197
|
/**
|
|
1290
1198
|
* @internal
|
|
1291
1199
|
*/
|
|
@@ -1392,66 +1300,160 @@
|
|
|
1392
1300
|
/**
|
|
1393
1301
|
* @internal
|
|
1394
1302
|
*/
|
|
1395
|
-
var
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
var _this = _super.call(this, new ListStateModel(), dispatcher) || this;
|
|
1399
|
-
_this.register('filters', ListFiltersOrchestrator)
|
|
1400
|
-
.register('items', ListItemsOrchestrator)
|
|
1401
|
-
.register('paging', ListPagingOrchestrator)
|
|
1402
|
-
.register('search', ListSearchOrchestrator)
|
|
1403
|
-
.register('sort', ListSortOrchestrator)
|
|
1404
|
-
.register('toolbar', ListToolbarOrchestrator)
|
|
1405
|
-
.register('views', ListViewsOrchestrator)
|
|
1406
|
-
.register('selected', ListSelectedOrchestrator)
|
|
1407
|
-
.begin();
|
|
1408
|
-
return _this;
|
|
1303
|
+
var ListToolbarSetTypeAction = /** @class */ (function () {
|
|
1304
|
+
function ListToolbarSetTypeAction(type) {
|
|
1305
|
+
this.type = type;
|
|
1409
1306
|
}
|
|
1410
|
-
return
|
|
1411
|
-
}(
|
|
1412
|
-
ListState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState, deps: [{ token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1413
|
-
ListState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState });
|
|
1414
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState, decorators: [{
|
|
1415
|
-
type: i0.Injectable
|
|
1416
|
-
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; } });
|
|
1307
|
+
return ListToolbarSetTypeAction;
|
|
1308
|
+
}());
|
|
1417
1309
|
|
|
1418
|
-
var idIndex$2 = 0;
|
|
1419
1310
|
/**
|
|
1420
1311
|
* @internal
|
|
1421
1312
|
*/
|
|
1422
|
-
var
|
|
1423
|
-
function
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
.pipe(operators.distinctUntilChanged())
|
|
1433
|
-
.subscribe(function (isActive) { return isActive ? _this.onViewActive() : _this.onViewInactive(); });
|
|
1313
|
+
var ListToolbarItemModel = /** @class */ (function () {
|
|
1314
|
+
function ListToolbarItemModel(data) {
|
|
1315
|
+
this.index = -1;
|
|
1316
|
+
if (data) {
|
|
1317
|
+
this.index = data.index;
|
|
1318
|
+
this.template = data.template;
|
|
1319
|
+
this.location = data.location;
|
|
1320
|
+
this.view = data.view;
|
|
1321
|
+
this.id = data.id;
|
|
1322
|
+
}
|
|
1434
1323
|
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
get: function () {
|
|
1444
|
-
return this.viewName;
|
|
1445
|
-
},
|
|
1446
|
-
enumerable: false,
|
|
1447
|
-
configurable: true
|
|
1448
|
-
});
|
|
1324
|
+
return ListToolbarItemModel;
|
|
1325
|
+
}());
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* @internal
|
|
1329
|
+
*/
|
|
1330
|
+
var ListToolbarOrchestrator = /** @class */ (function (_super) {
|
|
1331
|
+
__extends(ListToolbarOrchestrator, _super);
|
|
1449
1332
|
/* istanbul ignore next */
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1333
|
+
function ListToolbarOrchestrator() {
|
|
1334
|
+
var _this = _super.call(this) || this;
|
|
1335
|
+
_this.register(ListToolbarSetExistsAction, _this.setExists)
|
|
1336
|
+
.register(ListToolbarItemsDisableAction, _this.setDisabled)
|
|
1337
|
+
.register(ListToolbarItemsLoadAction, _this.load)
|
|
1338
|
+
.register(ListToolbarSetTypeAction, _this.setType)
|
|
1339
|
+
.register(ListToolbarItemsRemoveAction, _this.remove)
|
|
1340
|
+
.register(ListToolbarShowMultiselectToolbarAction, _this.showMultiselectToolbar);
|
|
1341
|
+
return _this;
|
|
1342
|
+
}
|
|
1343
|
+
ListToolbarOrchestrator.prototype.setExists = function (state, action) {
|
|
1344
|
+
var newModel = new ListToolbarModel(state);
|
|
1345
|
+
newModel.exists = action.exists;
|
|
1346
|
+
return newModel;
|
|
1347
|
+
};
|
|
1348
|
+
ListToolbarOrchestrator.prototype.setDisabled = function (state, action) {
|
|
1349
|
+
var newModel = new ListToolbarModel(state);
|
|
1350
|
+
newModel.disabled = action.disable;
|
|
1351
|
+
return newModel;
|
|
1352
|
+
};
|
|
1353
|
+
ListToolbarOrchestrator.prototype.setType = function (state, action) {
|
|
1354
|
+
var newModel = new ListToolbarModel(state);
|
|
1355
|
+
newModel.type = action.type;
|
|
1356
|
+
return newModel;
|
|
1357
|
+
};
|
|
1358
|
+
ListToolbarOrchestrator.prototype.load = function (state, action) {
|
|
1359
|
+
var newModel = new ListToolbarModel(state);
|
|
1360
|
+
var newListItems = action.items.map(function (item) {
|
|
1361
|
+
/**
|
|
1362
|
+
* NOTE: Originally this function went off the action index and item models did not include
|
|
1363
|
+
* the index. We changed this but must leave functionality to convert the action index for
|
|
1364
|
+
* backwards compatibility.
|
|
1365
|
+
*/
|
|
1366
|
+
if (!item.index) {
|
|
1367
|
+
item.index = action.index;
|
|
1368
|
+
}
|
|
1369
|
+
return new ListToolbarItemModel(item);
|
|
1370
|
+
});
|
|
1371
|
+
var items = __spreadArray(__spreadArray([], __read(state.items)), __read(newListItems));
|
|
1372
|
+
items = items.sort(function (a, b) {
|
|
1373
|
+
if (a.index < b.index) {
|
|
1374
|
+
return -1;
|
|
1375
|
+
}
|
|
1376
|
+
else if (a.index > b.index) {
|
|
1377
|
+
return 1;
|
|
1378
|
+
}
|
|
1379
|
+
else {
|
|
1380
|
+
return 0;
|
|
1381
|
+
}
|
|
1382
|
+
});
|
|
1383
|
+
newModel.items = items;
|
|
1384
|
+
return newModel;
|
|
1385
|
+
};
|
|
1386
|
+
ListToolbarOrchestrator.prototype.remove = function (state, action) {
|
|
1387
|
+
var newModel = new ListToolbarModel(state);
|
|
1388
|
+
newModel.items = newModel.items.filter(function (item) {
|
|
1389
|
+
return action.ids.indexOf(item.id) === -1;
|
|
1390
|
+
});
|
|
1391
|
+
return newModel;
|
|
1392
|
+
};
|
|
1393
|
+
ListToolbarOrchestrator.prototype.showMultiselectToolbar = function (state, action) {
|
|
1394
|
+
var newModel = new ListToolbarModel(state);
|
|
1395
|
+
newModel.showMultiselectToolbar = action.exists;
|
|
1396
|
+
return newModel;
|
|
1397
|
+
};
|
|
1398
|
+
return ListToolbarOrchestrator;
|
|
1399
|
+
}(ListStateOrchestrator));
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* @internal
|
|
1403
|
+
*/
|
|
1404
|
+
var ListViewsLoadAction = /** @class */ (function () {
|
|
1405
|
+
function ListViewsLoadAction(views) {
|
|
1406
|
+
this.views = views;
|
|
1407
|
+
}
|
|
1408
|
+
return ListViewsLoadAction;
|
|
1453
1409
|
}());
|
|
1454
1410
|
|
|
1411
|
+
/**
|
|
1412
|
+
* @internal
|
|
1413
|
+
*/
|
|
1414
|
+
var ListViewsOrchestrator = /** @class */ (function (_super) {
|
|
1415
|
+
__extends(ListViewsOrchestrator, _super);
|
|
1416
|
+
/* istanbul ignore next */
|
|
1417
|
+
function ListViewsOrchestrator() {
|
|
1418
|
+
var _this = _super.call(this) || this;
|
|
1419
|
+
_this.register(ListViewsSetActiveAction, _this.setActive).register(ListViewsLoadAction, _this.load);
|
|
1420
|
+
return _this;
|
|
1421
|
+
}
|
|
1422
|
+
ListViewsOrchestrator.prototype.setActive = function (state, action) {
|
|
1423
|
+
return new ListViewsModel(Object.assign({}, state, { active: action.view }));
|
|
1424
|
+
};
|
|
1425
|
+
ListViewsOrchestrator.prototype.load = function (state, action) {
|
|
1426
|
+
return new ListViewsModel(Object.assign({}, state, { views: action.views }));
|
|
1427
|
+
};
|
|
1428
|
+
return ListViewsOrchestrator;
|
|
1429
|
+
}(ListStateOrchestrator));
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* @internal
|
|
1433
|
+
*/
|
|
1434
|
+
var ListState = /** @class */ (function (_super) {
|
|
1435
|
+
__extends(ListState, _super);
|
|
1436
|
+
function ListState(dispatcher) {
|
|
1437
|
+
var _this = _super.call(this, new ListStateModel(), dispatcher) || this;
|
|
1438
|
+
_this.register('filters', ListFiltersOrchestrator)
|
|
1439
|
+
.register('items', ListItemsOrchestrator)
|
|
1440
|
+
.register('paging', ListPagingOrchestrator)
|
|
1441
|
+
.register('search', ListSearchOrchestrator)
|
|
1442
|
+
.register('sort', ListSortOrchestrator)
|
|
1443
|
+
.register('toolbar', ListToolbarOrchestrator)
|
|
1444
|
+
.register('views', ListViewsOrchestrator)
|
|
1445
|
+
.register('selected', ListSelectedOrchestrator)
|
|
1446
|
+
.begin();
|
|
1447
|
+
return _this;
|
|
1448
|
+
}
|
|
1449
|
+
return ListState;
|
|
1450
|
+
}(listBuilderCommon.StateNode));
|
|
1451
|
+
ListState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState, deps: [{ token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1452
|
+
ListState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState });
|
|
1453
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListState, decorators: [{
|
|
1454
|
+
type: i0.Injectable
|
|
1455
|
+
}], ctorParameters: function () { return [{ type: ListStateDispatcher }]; } });
|
|
1456
|
+
|
|
1455
1457
|
/**
|
|
1456
1458
|
* @internal
|
|
1457
1459
|
*/
|
|
@@ -1866,57 +1868,38 @@
|
|
|
1866
1868
|
}] } });
|
|
1867
1869
|
|
|
1868
1870
|
/**
|
|
1869
|
-
*
|
|
1870
|
-
* [list component's](https://developer.blackbaud.com/skyux/components/list/overview#list-properties)
|
|
1871
|
-
* `appliedFilters` property. Place this component within the
|
|
1872
|
-
* [`sky-list-toolbar`](https://developer.blackbaud.com/skyux/components/list/toolbar) component.
|
|
1871
|
+
* @internal
|
|
1873
1872
|
*/
|
|
1874
|
-
var
|
|
1875
|
-
function
|
|
1876
|
-
this.state = state;
|
|
1877
|
-
this.dispatcher = dispatcher;
|
|
1878
|
-
/**
|
|
1879
|
-
* Emits a `ListFilterModel` when users select a summary item. A common use case is
|
|
1880
|
-
* to open a filter modal when this event is received.
|
|
1881
|
-
*/
|
|
1882
|
-
this.summaryItemClick = new i0.EventEmitter();
|
|
1873
|
+
var SkyListFilterInlineItemRendererComponent = /** @class */ (function () {
|
|
1874
|
+
function SkyListFilterInlineItemRendererComponent() {
|
|
1883
1875
|
}
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
return (filter.value !== '' &&
|
|
1891
|
-
filter.value !== undefined &&
|
|
1892
|
-
filter.value !== false &&
|
|
1893
|
-
filter.value !== filter.defaultValue);
|
|
1894
|
-
});
|
|
1895
|
-
}));
|
|
1896
|
-
});
|
|
1897
|
-
};
|
|
1898
|
-
SkyListFilterSummaryComponent.prototype.filterSummaryItemDismiss = function (index) {
|
|
1899
|
-
var _this = this;
|
|
1900
|
-
this.appliedFilters.pipe(operators.take(1)).subscribe(function (filters) {
|
|
1901
|
-
filters.splice(index, 1);
|
|
1902
|
-
_this.dispatcher.filtersUpdate(filters.slice());
|
|
1903
|
-
});
|
|
1904
|
-
};
|
|
1905
|
-
SkyListFilterSummaryComponent.prototype.filterSummaryItemClick = function (item) {
|
|
1906
|
-
this.summaryItemClick.emit(item);
|
|
1876
|
+
SkyListFilterInlineItemRendererComponent.prototype.ngOnInit = function () {
|
|
1877
|
+
/* istanbul ignore else */
|
|
1878
|
+
/* sanity check */
|
|
1879
|
+
if (this.template !== undefined) {
|
|
1880
|
+
this.container.createEmbeddedView(this.template, this);
|
|
1881
|
+
}
|
|
1907
1882
|
};
|
|
1908
|
-
return
|
|
1883
|
+
return SkyListFilterInlineItemRendererComponent;
|
|
1909
1884
|
}());
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
1885
|
+
SkyListFilterInlineItemRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemRendererComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1886
|
+
SkyListFilterInlineItemRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterInlineItemRendererComponent, selector: "sky-list-filter-inline-item-renderer", inputs: { template: "template", filter: "filter" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: '<ng-template #container></ng-template>', isInline: true });
|
|
1887
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemRendererComponent, decorators: [{
|
|
1913
1888
|
type: i0.Component,
|
|
1914
1889
|
args: [{
|
|
1915
|
-
selector: 'sky-list-filter-
|
|
1916
|
-
template:
|
|
1890
|
+
selector: 'sky-list-filter-inline-item-renderer',
|
|
1891
|
+
template: '<ng-template #container></ng-template>',
|
|
1917
1892
|
}]
|
|
1918
|
-
}],
|
|
1919
|
-
type: i0.
|
|
1893
|
+
}], propDecorators: { template: [{
|
|
1894
|
+
type: i0.Input
|
|
1895
|
+
}], filter: [{
|
|
1896
|
+
type: i0.Input
|
|
1897
|
+
}], container: [{
|
|
1898
|
+
type: i0.ViewChild,
|
|
1899
|
+
args: ['container', {
|
|
1900
|
+
read: i0.ViewContainerRef,
|
|
1901
|
+
static: true,
|
|
1902
|
+
}]
|
|
1920
1903
|
}] } });
|
|
1921
1904
|
|
|
1922
1905
|
/**
|
|
@@ -1968,49 +1951,14 @@
|
|
|
1968
1951
|
}] } });
|
|
1969
1952
|
|
|
1970
1953
|
/**
|
|
1971
|
-
*
|
|
1954
|
+
* Creates an inline filter area for the list. Place each filter
|
|
1955
|
+
* in a `sky-list-filter-inline-item` component.
|
|
1972
1956
|
*/
|
|
1973
|
-
var
|
|
1974
|
-
function
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
/* sanity check */
|
|
1979
|
-
if (this.template !== undefined) {
|
|
1980
|
-
this.container.createEmbeddedView(this.template, this);
|
|
1981
|
-
}
|
|
1982
|
-
};
|
|
1983
|
-
return SkyListFilterInlineItemRendererComponent;
|
|
1984
|
-
}());
|
|
1985
|
-
SkyListFilterInlineItemRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemRendererComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1986
|
-
SkyListFilterInlineItemRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterInlineItemRendererComponent, selector: "sky-list-filter-inline-item-renderer", inputs: { template: "template", filter: "filter" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: '<ng-template #container></ng-template>', isInline: true });
|
|
1987
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterInlineItemRendererComponent, decorators: [{
|
|
1988
|
-
type: i0.Component,
|
|
1989
|
-
args: [{
|
|
1990
|
-
selector: 'sky-list-filter-inline-item-renderer',
|
|
1991
|
-
template: '<ng-template #container></ng-template>',
|
|
1992
|
-
}]
|
|
1993
|
-
}], propDecorators: { template: [{
|
|
1994
|
-
type: i0.Input
|
|
1995
|
-
}], filter: [{
|
|
1996
|
-
type: i0.Input
|
|
1997
|
-
}], container: [{
|
|
1998
|
-
type: i0.ViewChild,
|
|
1999
|
-
args: ['container', {
|
|
2000
|
-
read: i0.ViewContainerRef,
|
|
2001
|
-
static: true,
|
|
2002
|
-
}]
|
|
2003
|
-
}] } });
|
|
2004
|
-
|
|
2005
|
-
/**
|
|
2006
|
-
* Creates an inline filter area for the list. Place each filter
|
|
2007
|
-
* in a `sky-list-filter-inline-item` component.
|
|
2008
|
-
*/
|
|
2009
|
-
var SkyListFilterInlineComponent = /** @class */ (function () {
|
|
2010
|
-
function SkyListFilterInlineComponent(dispatcher, state) {
|
|
2011
|
-
this.dispatcher = dispatcher;
|
|
2012
|
-
this.state = state;
|
|
2013
|
-
this.inlineFilters = [];
|
|
1957
|
+
var SkyListFilterInlineComponent = /** @class */ (function () {
|
|
1958
|
+
function SkyListFilterInlineComponent(dispatcher, state) {
|
|
1959
|
+
this.dispatcher = dispatcher;
|
|
1960
|
+
this.state = state;
|
|
1961
|
+
this.inlineFilters = [];
|
|
2014
1962
|
}
|
|
2015
1963
|
SkyListFilterInlineComponent.prototype.ngAfterContentInit = function () {
|
|
2016
1964
|
var _this = this;
|
|
@@ -2065,6 +2013,60 @@
|
|
|
2065
2013
|
args: [SkyListFilterInlineItemComponent]
|
|
2066
2014
|
}] } });
|
|
2067
2015
|
|
|
2016
|
+
/**
|
|
2017
|
+
* Creates a filter summary based on the
|
|
2018
|
+
* [list component's](https://developer.blackbaud.com/skyux/components/list/overview#list-properties)
|
|
2019
|
+
* `appliedFilters` property. Place this component within the
|
|
2020
|
+
* [`sky-list-toolbar`](https://developer.blackbaud.com/skyux/components/list/toolbar) component.
|
|
2021
|
+
*/
|
|
2022
|
+
var SkyListFilterSummaryComponent = /** @class */ (function () {
|
|
2023
|
+
function SkyListFilterSummaryComponent(state, dispatcher) {
|
|
2024
|
+
this.state = state;
|
|
2025
|
+
this.dispatcher = dispatcher;
|
|
2026
|
+
/**
|
|
2027
|
+
* Emits a `ListFilterModel` when users select a summary item. A common use case is
|
|
2028
|
+
* to open a filter modal when this event is received.
|
|
2029
|
+
*/
|
|
2030
|
+
this.summaryItemClick = new i0.EventEmitter();
|
|
2031
|
+
}
|
|
2032
|
+
SkyListFilterSummaryComponent.prototype.ngAfterContentInit = function () {
|
|
2033
|
+
var _this = this;
|
|
2034
|
+
// The setTimeout here is to ensure we avoid any ExpressionChangedAfterItHasBeenCheckedError issues.
|
|
2035
|
+
setTimeout(function () {
|
|
2036
|
+
_this.appliedFilters = _this.state.pipe(operators.map(function (state) {
|
|
2037
|
+
return state.filters.filter(function (filter) {
|
|
2038
|
+
return (filter.value !== '' &&
|
|
2039
|
+
filter.value !== undefined &&
|
|
2040
|
+
filter.value !== false &&
|
|
2041
|
+
filter.value !== filter.defaultValue);
|
|
2042
|
+
});
|
|
2043
|
+
}));
|
|
2044
|
+
});
|
|
2045
|
+
};
|
|
2046
|
+
SkyListFilterSummaryComponent.prototype.filterSummaryItemDismiss = function (index) {
|
|
2047
|
+
var _this = this;
|
|
2048
|
+
this.appliedFilters.pipe(operators.take(1)).subscribe(function (filters) {
|
|
2049
|
+
filters.splice(index, 1);
|
|
2050
|
+
_this.dispatcher.filtersUpdate(filters.slice());
|
|
2051
|
+
});
|
|
2052
|
+
};
|
|
2053
|
+
SkyListFilterSummaryComponent.prototype.filterSummaryItemClick = function (item) {
|
|
2054
|
+
this.summaryItemClick.emit(item);
|
|
2055
|
+
};
|
|
2056
|
+
return SkyListFilterSummaryComponent;
|
|
2057
|
+
}());
|
|
2058
|
+
SkyListFilterSummaryComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterSummaryComponent, deps: [{ token: ListState }, { token: ListStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2059
|
+
SkyListFilterSummaryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListFilterSummaryComponent, selector: "sky-list-filter-summary", outputs: { summaryItemClick: "summaryItemClick" }, ngImport: i0__namespace, template: "<sky-filter-summary>\n <sky-filter-summary-item\n *ngFor=\"let item of appliedFilters | async; let i = index\"\n (dismiss)=\"filterSummaryItemDismiss(i)\"\n (itemClick)=\"filterSummaryItemClick(item)\"\n [dismissible]=\"item.dismissible\"\n >\n {{ item.label || item.value }}\n </sky-filter-summary-item>\n</sky-filter-summary>\n", components: [{ type: i3__namespace.λ5, selector: "sky-filter-summary" }, { type: i3__namespace.λ4, selector: "sky-filter-summary-item", inputs: ["dismissible"], outputs: ["dismiss", "itemClick"] }], directives: [{ type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i4__namespace.AsyncPipe } });
|
|
2060
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListFilterSummaryComponent, decorators: [{
|
|
2061
|
+
type: i0.Component,
|
|
2062
|
+
args: [{
|
|
2063
|
+
selector: 'sky-list-filter-summary',
|
|
2064
|
+
template: "<sky-filter-summary>\n <sky-filter-summary-item\n *ngFor=\"let item of appliedFilters | async; let i = index\"\n (dismiss)=\"filterSummaryItemDismiss(i)\"\n (itemClick)=\"filterSummaryItemClick(item)\"\n [dismissible]=\"item.dismissible\"\n >\n {{ item.label || item.value }}\n </sky-filter-summary-item>\n</sky-filter-summary>\n",
|
|
2065
|
+
}]
|
|
2066
|
+
}], ctorParameters: function () { return [{ type: ListState }, { type: ListStateDispatcher }]; }, propDecorators: { summaryItemClick: [{
|
|
2067
|
+
type: i0.Output
|
|
2068
|
+
}] } });
|
|
2069
|
+
|
|
2068
2070
|
var SkyListFiltersModule = /** @class */ (function () {
|
|
2069
2071
|
function SkyListFiltersModule() {
|
|
2070
2072
|
}
|
|
@@ -2300,6 +2302,36 @@
|
|
|
2300
2302
|
type: i0.Injectable
|
|
2301
2303
|
}] });
|
|
2302
2304
|
|
|
2305
|
+
/**
|
|
2306
|
+
* Adds actions to the secondary actions dropdown in the list toolbar.
|
|
2307
|
+
*/
|
|
2308
|
+
var SkyListSecondaryActionComponent = /** @class */ (function () {
|
|
2309
|
+
function SkyListSecondaryActionComponent(actionService) {
|
|
2310
|
+
this.actionService = actionService;
|
|
2311
|
+
}
|
|
2312
|
+
SkyListSecondaryActionComponent.prototype.ngAfterContentInit = function () {
|
|
2313
|
+
this.actionService.addSecondaryAction({
|
|
2314
|
+
template: this.templateRef,
|
|
2315
|
+
});
|
|
2316
|
+
};
|
|
2317
|
+
return SkyListSecondaryActionComponent;
|
|
2318
|
+
}());
|
|
2319
|
+
SkyListSecondaryActionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionComponent, deps: [{ token: SkyListSecondaryActionsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2320
|
+
SkyListSecondaryActionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListSecondaryActionComponent, selector: "sky-list-secondary-action", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["listSecondaryAction"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<ng-template #listSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n" });
|
|
2321
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionComponent, decorators: [{
|
|
2322
|
+
type: i0.Component,
|
|
2323
|
+
args: [{
|
|
2324
|
+
selector: 'sky-list-secondary-action',
|
|
2325
|
+
template: "<ng-template #listSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n",
|
|
2326
|
+
}]
|
|
2327
|
+
}], ctorParameters: function () { return [{ type: SkyListSecondaryActionsService }]; }, propDecorators: { templateRef: [{
|
|
2328
|
+
type: i0.ViewChild,
|
|
2329
|
+
args: ['listSecondaryAction', {
|
|
2330
|
+
read: i0.TemplateRef,
|
|
2331
|
+
static: true,
|
|
2332
|
+
}]
|
|
2333
|
+
}] } });
|
|
2334
|
+
|
|
2303
2335
|
// Note: this component is needed to ensure any reactive styles placed in the element have
|
|
2304
2336
|
// their host to be based off of. Without this component the host is not written via the dispatcher.
|
|
2305
2337
|
/**
|
|
@@ -2381,36 +2413,6 @@
|
|
|
2381
2413
|
}]
|
|
2382
2414
|
}] } });
|
|
2383
2415
|
|
|
2384
|
-
/**
|
|
2385
|
-
* Adds actions to the secondary actions dropdown in the list toolbar.
|
|
2386
|
-
*/
|
|
2387
|
-
var SkyListSecondaryActionComponent = /** @class */ (function () {
|
|
2388
|
-
function SkyListSecondaryActionComponent(actionService) {
|
|
2389
|
-
this.actionService = actionService;
|
|
2390
|
-
}
|
|
2391
|
-
SkyListSecondaryActionComponent.prototype.ngAfterContentInit = function () {
|
|
2392
|
-
this.actionService.addSecondaryAction({
|
|
2393
|
-
template: this.templateRef,
|
|
2394
|
-
});
|
|
2395
|
-
};
|
|
2396
|
-
return SkyListSecondaryActionComponent;
|
|
2397
|
-
}());
|
|
2398
|
-
SkyListSecondaryActionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionComponent, deps: [{ token: SkyListSecondaryActionsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2399
|
-
SkyListSecondaryActionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListSecondaryActionComponent, selector: "sky-list-secondary-action", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["listSecondaryAction"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<ng-template #listSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n" });
|
|
2400
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListSecondaryActionComponent, decorators: [{
|
|
2401
|
-
type: i0.Component,
|
|
2402
|
-
args: [{
|
|
2403
|
-
selector: 'sky-list-secondary-action',
|
|
2404
|
-
template: "<ng-template #listSecondaryAction>\n <ng-content></ng-content>\n</ng-template>\n",
|
|
2405
|
-
}]
|
|
2406
|
-
}], ctorParameters: function () { return [{ type: SkyListSecondaryActionsService }]; }, propDecorators: { templateRef: [{
|
|
2407
|
-
type: i0.ViewChild,
|
|
2408
|
-
args: ['listSecondaryAction', {
|
|
2409
|
-
read: i0.TemplateRef,
|
|
2410
|
-
static: true,
|
|
2411
|
-
}]
|
|
2412
|
-
}] } });
|
|
2413
|
-
|
|
2414
2416
|
var SkyListSecondaryActionsModule = /** @class */ (function () {
|
|
2415
2417
|
function SkyListSecondaryActionsModule() {
|
|
2416
2418
|
}
|
|
@@ -2442,222 +2444,13 @@
|
|
|
2442
2444
|
imports: [
|
|
2443
2445
|
i4.CommonModule,
|
|
2444
2446
|
i2.SkyDropdownModule,
|
|
2445
|
-
i5.SkyI18nModule,
|
|
2446
|
-
i3$1.SkyIconModule,
|
|
2447
|
-
SkyListBuilderResourcesModule,
|
|
2448
|
-
],
|
|
2449
|
-
exports: [SkyListSecondaryActionsComponent, SkyListSecondaryActionComponent],
|
|
2450
|
-
}]
|
|
2451
|
-
}] });
|
|
2452
|
-
|
|
2453
|
-
var idIndex = 0;
|
|
2454
|
-
/**
|
|
2455
|
-
* Defines a toolbar item for the list toolbar.
|
|
2456
|
-
*/
|
|
2457
|
-
var SkyListToolbarItemComponent = /** @class */ (function () {
|
|
2458
|
-
function SkyListToolbarItemComponent() {
|
|
2459
|
-
/**
|
|
2460
|
-
* Specifies the ID of the item.
|
|
2461
|
-
*/
|
|
2462
|
-
this.id = "sky-list-toolbar-item-" + ++idIndex;
|
|
2463
|
-
/**
|
|
2464
|
-
* Specifies the index of the item at the given item location.
|
|
2465
|
-
* @default -1
|
|
2466
|
-
*/
|
|
2467
|
-
this.index = -1;
|
|
2468
|
-
/**
|
|
2469
|
-
* Specifies the toolbar location of the item. The valid options are `"left"`,
|
|
2470
|
-
* `"center"`, and `"right"`.
|
|
2471
|
-
* @default "left"
|
|
2472
|
-
*/
|
|
2473
|
-
this.location = 'left';
|
|
2474
|
-
}
|
|
2475
|
-
Object.defineProperty(SkyListToolbarItemComponent.prototype, "template", {
|
|
2476
|
-
get: function () {
|
|
2477
|
-
return this.templates.length > 0 ? this.templates.first : undefined;
|
|
2478
|
-
},
|
|
2479
|
-
enumerable: false,
|
|
2480
|
-
configurable: true
|
|
2481
|
-
});
|
|
2482
|
-
return SkyListToolbarItemComponent;
|
|
2483
|
-
}());
|
|
2484
|
-
SkyListToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2485
|
-
SkyListToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarItemComponent, selector: "sky-list-toolbar-item", inputs: { id: "id", index: "index", location: "location" }, queries: [{ propertyName: "templates", predicate: i0.TemplateRef }], ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
2486
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemComponent, decorators: [{
|
|
2487
|
-
type: i0.Component,
|
|
2488
|
-
args: [{
|
|
2489
|
-
selector: 'sky-list-toolbar-item',
|
|
2490
|
-
template: '<ng-content></ng-content>',
|
|
2491
|
-
}]
|
|
2492
|
-
}], propDecorators: { id: [{
|
|
2493
|
-
type: i0.Input
|
|
2494
|
-
}], index: [{
|
|
2495
|
-
type: i0.Input
|
|
2496
|
-
}], location: [{
|
|
2497
|
-
type: i0.Input
|
|
2498
|
-
}], templates: [{
|
|
2499
|
-
type: i0.ContentChildren,
|
|
2500
|
-
args: [i0.TemplateRef]
|
|
2501
|
-
}] } });
|
|
2502
|
-
|
|
2503
|
-
/**
|
|
2504
|
-
* Adds a sort dropdown to the list toolbar.
|
|
2505
|
-
*/
|
|
2506
|
-
var SkyListToolbarSortComponent = /** @class */ (function () {
|
|
2507
|
-
function SkyListToolbarSortComponent() {
|
|
2508
|
-
}
|
|
2509
|
-
return SkyListToolbarSortComponent;
|
|
2510
|
-
}());
|
|
2511
|
-
SkyListToolbarSortComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSortComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2512
|
-
SkyListToolbarSortComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarSortComponent, selector: "sky-list-toolbar-sort", inputs: { label: "label", field: "field", type: "type", descending: "descending" }, ngImport: i0__namespace, template: '', isInline: true });
|
|
2513
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSortComponent, decorators: [{
|
|
2514
|
-
type: i0.Component,
|
|
2515
|
-
args: [{
|
|
2516
|
-
selector: 'sky-list-toolbar-sort',
|
|
2517
|
-
template: '',
|
|
2518
|
-
}]
|
|
2519
|
-
}], propDecorators: { label: [{
|
|
2520
|
-
type: i0.Input
|
|
2521
|
-
}], field: [{
|
|
2522
|
-
type: i0.Input
|
|
2523
|
-
}], type: [{
|
|
2524
|
-
type: i0.Input
|
|
2525
|
-
}], descending: [{
|
|
2526
|
-
type: i0.Input
|
|
2527
|
-
}] } });
|
|
2528
|
-
|
|
2529
|
-
/**
|
|
2530
|
-
* Adds a section on the right side of the toolbar for items that substantially change
|
|
2531
|
-
* or affect the view of the list. This includes simple filters and view switchers.
|
|
2532
|
-
* If the view section includes more than one item, simple filters appear on the left
|
|
2533
|
-
* and view switchers appear on the right.
|
|
2534
|
-
*/
|
|
2535
|
-
var SkyListToolbarViewActionsComponent = /** @class */ (function () {
|
|
2536
|
-
function SkyListToolbarViewActionsComponent() {
|
|
2537
|
-
}
|
|
2538
|
-
return SkyListToolbarViewActionsComponent;
|
|
2539
|
-
}());
|
|
2540
|
-
SkyListToolbarViewActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarViewActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2541
|
-
SkyListToolbarViewActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarViewActionsComponent, selector: "sky-list-toolbar-view-actions", ngImport: i0__namespace, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;align-items:center}:host::ng-deep>:not(:last-child){margin-right:5px}.sky-list-toolbar-view-actions ::ng-deep>:not(:last-child){margin-right:5px}\n"] });
|
|
2542
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarViewActionsComponent, decorators: [{
|
|
2543
|
-
type: i0.Component,
|
|
2544
|
-
args: [{
|
|
2545
|
-
selector: 'sky-list-toolbar-view-actions',
|
|
2546
|
-
template: "<ng-content></ng-content>\n",
|
|
2547
|
-
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"],
|
|
2548
|
-
}]
|
|
2549
|
-
}] });
|
|
2550
|
-
|
|
2551
|
-
/**
|
|
2552
|
-
* @internal
|
|
2553
|
-
*/
|
|
2554
|
-
var ListToolbarConfigSetSearchEnabledAction = /** @class */ (function () {
|
|
2555
|
-
function ListToolbarConfigSetSearchEnabledAction(enabled) {
|
|
2556
|
-
this.enabled = enabled;
|
|
2557
|
-
}
|
|
2558
|
-
return ListToolbarConfigSetSearchEnabledAction;
|
|
2559
|
-
}());
|
|
2560
|
-
|
|
2561
|
-
/**
|
|
2562
|
-
* @internal
|
|
2563
|
-
*/
|
|
2564
|
-
var ListToolbarConfigSetSortSelectorEnabledAction = /** @class */ (function () {
|
|
2565
|
-
/* istanbul ignore next */
|
|
2566
|
-
function ListToolbarConfigSetSortSelectorEnabledAction(enabled) {
|
|
2567
|
-
if (enabled === void 0) { enabled = true; }
|
|
2568
|
-
this.enabled = enabled;
|
|
2569
|
-
}
|
|
2570
|
-
return ListToolbarConfigSetSortSelectorEnabledAction;
|
|
2571
|
-
}());
|
|
2572
|
-
|
|
2573
|
-
/**
|
|
2574
|
-
* @internal
|
|
2575
|
-
*/
|
|
2576
|
-
var ListToolbarStateDispatcher = /** @class */ (function (_super) {
|
|
2577
|
-
__extends(ListToolbarStateDispatcher, _super);
|
|
2578
|
-
function ListToolbarStateDispatcher() {
|
|
2579
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2580
|
-
}
|
|
2581
|
-
return ListToolbarStateDispatcher;
|
|
2582
|
-
}(listBuilderCommon.StateDispatcher));
|
|
2583
|
-
ListToolbarStateDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2584
|
-
ListToolbarStateDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher });
|
|
2585
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher, decorators: [{
|
|
2586
|
-
type: i0.Injectable
|
|
2587
|
-
}] });
|
|
2588
|
-
/**
|
|
2589
|
-
* @internal
|
|
2590
|
-
*/
|
|
2591
|
-
var ListToolbarStateOrchestrator = /** @class */ (function (_super) {
|
|
2592
|
-
__extends(ListToolbarStateOrchestrator, _super);
|
|
2593
|
-
function ListToolbarStateOrchestrator() {
|
|
2594
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2595
|
-
}
|
|
2596
|
-
return ListToolbarStateOrchestrator;
|
|
2597
|
-
}(listBuilderCommon.StateOrchestrator));
|
|
2598
|
-
|
|
2599
|
-
/**
|
|
2600
|
-
* @internal
|
|
2601
|
-
*/
|
|
2602
|
-
var ListToolbarConfigModel = /** @class */ (function () {
|
|
2603
|
-
function ListToolbarConfigModel(data) {
|
|
2604
|
-
this.searchEnabled = true;
|
|
2605
|
-
this.sortSelectorEnabled = true;
|
|
2606
|
-
if (data) {
|
|
2607
|
-
this.searchEnabled = data.searchEnabled;
|
|
2608
|
-
this.sortSelectorEnabled = data.sortSelectorEnabled;
|
|
2609
|
-
}
|
|
2610
|
-
}
|
|
2611
|
-
return ListToolbarConfigModel;
|
|
2612
|
-
}());
|
|
2613
|
-
|
|
2614
|
-
/**
|
|
2615
|
-
* @internal
|
|
2616
|
-
*/
|
|
2617
|
-
var ListToolbarConfigOrchestrator = /** @class */ (function (_super) {
|
|
2618
|
-
__extends(ListToolbarConfigOrchestrator, _super);
|
|
2619
|
-
/* istanbul ignore next */
|
|
2620
|
-
function ListToolbarConfigOrchestrator() {
|
|
2621
|
-
var _this = _super.call(this) || this;
|
|
2622
|
-
_this.register(ListToolbarConfigSetSearchEnabledAction, _this.setSearchEnabled).register(ListToolbarConfigSetSortSelectorEnabledAction, _this.setSortSelectorEnabled);
|
|
2623
|
-
return _this;
|
|
2624
|
-
}
|
|
2625
|
-
ListToolbarConfigOrchestrator.prototype.setSearchEnabled = function (state, action) {
|
|
2626
|
-
return new ListToolbarConfigModel(Object.assign({}, state, { searchEnabled: action.enabled }));
|
|
2627
|
-
};
|
|
2628
|
-
ListToolbarConfigOrchestrator.prototype.setSortSelectorEnabled = function (state, action) {
|
|
2629
|
-
return new ListToolbarConfigModel(Object.assign({}, state, { sortSelectorEnabled: action.enabled }));
|
|
2630
|
-
};
|
|
2631
|
-
return ListToolbarConfigOrchestrator;
|
|
2632
|
-
}(ListToolbarStateOrchestrator));
|
|
2633
|
-
|
|
2634
|
-
/**
|
|
2635
|
-
* @internal
|
|
2636
|
-
*/
|
|
2637
|
-
var ListToolbarStateModel = /** @class */ (function () {
|
|
2638
|
-
function ListToolbarStateModel() {
|
|
2639
|
-
this.config = new ListToolbarConfigModel();
|
|
2640
|
-
}
|
|
2641
|
-
return ListToolbarStateModel;
|
|
2642
|
-
}());
|
|
2643
|
-
|
|
2644
|
-
/**
|
|
2645
|
-
* @internal
|
|
2646
|
-
*/
|
|
2647
|
-
var ListToolbarState = /** @class */ (function (_super) {
|
|
2648
|
-
__extends(ListToolbarState, _super);
|
|
2649
|
-
function ListToolbarState(initialState, dispatcher) {
|
|
2650
|
-
var _this = _super.call(this, initialState, dispatcher) || this;
|
|
2651
|
-
_this.register('config', ListToolbarConfigOrchestrator).begin();
|
|
2652
|
-
return _this;
|
|
2653
|
-
}
|
|
2654
|
-
return ListToolbarState;
|
|
2655
|
-
}(listBuilderCommon.StateNode));
|
|
2656
|
-
ListToolbarState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState, deps: [{ token: ListToolbarStateModel }, { token: ListToolbarStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2657
|
-
ListToolbarState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState });
|
|
2658
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState, decorators: [{
|
|
2659
|
-
type: i0.Injectable
|
|
2660
|
-
}], ctorParameters: function () { return [{ type: ListToolbarStateModel }, { type: ListToolbarStateDispatcher }]; } });
|
|
2447
|
+
i5.SkyI18nModule,
|
|
2448
|
+
i3$1.SkyIconModule,
|
|
2449
|
+
SkyListBuilderResourcesModule,
|
|
2450
|
+
],
|
|
2451
|
+
exports: [SkyListSecondaryActionsComponent, SkyListSecondaryActionComponent],
|
|
2452
|
+
}]
|
|
2453
|
+
}] });
|
|
2661
2454
|
|
|
2662
2455
|
/**
|
|
2663
2456
|
* @internal
|
|
@@ -2756,12 +2549,11 @@
|
|
|
2756
2549
|
};
|
|
2757
2550
|
SkyListMultiselectToolbarComponent.prototype.reapplyFilter = function (isSelected) {
|
|
2758
2551
|
var _this = this;
|
|
2759
|
-
var self = this;
|
|
2760
2552
|
this.state
|
|
2761
2553
|
.pipe(operators.map(function (state) { return state.filters; }), operators.take(1))
|
|
2762
2554
|
.subscribe(function (filters) {
|
|
2763
2555
|
filters = filters.filter(function (filter) { return filter.name !== 'show-selected'; });
|
|
2764
|
-
filters.push(
|
|
2556
|
+
filters.push(_this.getShowSelectedFilter(isSelected));
|
|
2765
2557
|
_this.dispatcher.filtersUpdate(filters);
|
|
2766
2558
|
});
|
|
2767
2559
|
// If "show selected" is checked and paging is enabled, go to page one.
|
|
@@ -2834,6 +2626,235 @@
|
|
|
2834
2626
|
type: i0.Input
|
|
2835
2627
|
}] } });
|
|
2836
2628
|
|
|
2629
|
+
var idIndex = 0;
|
|
2630
|
+
/**
|
|
2631
|
+
* Defines a toolbar item for the list toolbar.
|
|
2632
|
+
*/
|
|
2633
|
+
var SkyListToolbarItemComponent = /** @class */ (function () {
|
|
2634
|
+
function SkyListToolbarItemComponent() {
|
|
2635
|
+
/**
|
|
2636
|
+
* Specifies the ID of the item.
|
|
2637
|
+
*/
|
|
2638
|
+
this.id = "sky-list-toolbar-item-" + ++idIndex;
|
|
2639
|
+
/**
|
|
2640
|
+
* Specifies the index of the item at the given item location.
|
|
2641
|
+
* @default -1
|
|
2642
|
+
*/
|
|
2643
|
+
this.index = -1;
|
|
2644
|
+
/**
|
|
2645
|
+
* Specifies the toolbar location of the item. The valid options are `"left"`,
|
|
2646
|
+
* `"center"`, and `"right"`.
|
|
2647
|
+
* @default "left"
|
|
2648
|
+
*/
|
|
2649
|
+
this.location = 'left';
|
|
2650
|
+
}
|
|
2651
|
+
Object.defineProperty(SkyListToolbarItemComponent.prototype, "template", {
|
|
2652
|
+
get: function () {
|
|
2653
|
+
return this.templates.length > 0 ? this.templates.first : undefined;
|
|
2654
|
+
},
|
|
2655
|
+
enumerable: false,
|
|
2656
|
+
configurable: true
|
|
2657
|
+
});
|
|
2658
|
+
return SkyListToolbarItemComponent;
|
|
2659
|
+
}());
|
|
2660
|
+
SkyListToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2661
|
+
SkyListToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarItemComponent, selector: "sky-list-toolbar-item", inputs: { id: "id", index: "index", location: "location" }, queries: [{ propertyName: "templates", predicate: i0.TemplateRef }], ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
|
|
2662
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarItemComponent, decorators: [{
|
|
2663
|
+
type: i0.Component,
|
|
2664
|
+
args: [{
|
|
2665
|
+
selector: 'sky-list-toolbar-item',
|
|
2666
|
+
template: '<ng-content></ng-content>',
|
|
2667
|
+
}]
|
|
2668
|
+
}], propDecorators: { id: [{
|
|
2669
|
+
type: i0.Input
|
|
2670
|
+
}], index: [{
|
|
2671
|
+
type: i0.Input
|
|
2672
|
+
}], location: [{
|
|
2673
|
+
type: i0.Input
|
|
2674
|
+
}], templates: [{
|
|
2675
|
+
type: i0.ContentChildren,
|
|
2676
|
+
args: [i0.TemplateRef]
|
|
2677
|
+
}] } });
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
* Displays custom actions in the toolbar beside to the search bar.
|
|
2681
|
+
*/
|
|
2682
|
+
var SkyListToolbarSearchActionsComponent = /** @class */ (function () {
|
|
2683
|
+
function SkyListToolbarSearchActionsComponent() {
|
|
2684
|
+
}
|
|
2685
|
+
return SkyListToolbarSearchActionsComponent;
|
|
2686
|
+
}());
|
|
2687
|
+
SkyListToolbarSearchActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSearchActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2688
|
+
SkyListToolbarSearchActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarSearchActionsComponent, selector: "sky-list-toolbar-search-actions", ngImport: i0__namespace, template: "<div class=\"sky-list-toolbar-search-actions\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-list-toolbar-search-actions{margin-left:10px}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2689
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSearchActionsComponent, decorators: [{
|
|
2690
|
+
type: i0.Component,
|
|
2691
|
+
args: [{
|
|
2692
|
+
selector: 'sky-list-toolbar-search-actions',
|
|
2693
|
+
template: "<div class=\"sky-list-toolbar-search-actions\">\n <ng-content></ng-content>\n</div>\n",
|
|
2694
|
+
styles: [".sky-list-toolbar-search-actions{margin-left:10px}\n"],
|
|
2695
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2696
|
+
}]
|
|
2697
|
+
}] });
|
|
2698
|
+
|
|
2699
|
+
/**
|
|
2700
|
+
* Adds a sort dropdown to the list toolbar.
|
|
2701
|
+
*/
|
|
2702
|
+
var SkyListToolbarSortComponent = /** @class */ (function () {
|
|
2703
|
+
function SkyListToolbarSortComponent() {
|
|
2704
|
+
}
|
|
2705
|
+
return SkyListToolbarSortComponent;
|
|
2706
|
+
}());
|
|
2707
|
+
SkyListToolbarSortComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSortComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2708
|
+
SkyListToolbarSortComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarSortComponent, selector: "sky-list-toolbar-sort", inputs: { label: "label", field: "field", type: "type", descending: "descending" }, ngImport: i0__namespace, template: '', isInline: true });
|
|
2709
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSortComponent, decorators: [{
|
|
2710
|
+
type: i0.Component,
|
|
2711
|
+
args: [{
|
|
2712
|
+
selector: 'sky-list-toolbar-sort',
|
|
2713
|
+
template: '',
|
|
2714
|
+
}]
|
|
2715
|
+
}], propDecorators: { label: [{
|
|
2716
|
+
type: i0.Input
|
|
2717
|
+
}], field: [{
|
|
2718
|
+
type: i0.Input
|
|
2719
|
+
}], type: [{
|
|
2720
|
+
type: i0.Input
|
|
2721
|
+
}], descending: [{
|
|
2722
|
+
type: i0.Input
|
|
2723
|
+
}] } });
|
|
2724
|
+
|
|
2725
|
+
/**
|
|
2726
|
+
* Adds a section on the right side of the toolbar for items that substantially change
|
|
2727
|
+
* or affect the view of the list. This includes simple filters and view switchers.
|
|
2728
|
+
* If the view section includes more than one item, simple filters appear on the left
|
|
2729
|
+
* and view switchers appear on the right.
|
|
2730
|
+
*/
|
|
2731
|
+
var SkyListToolbarViewActionsComponent = /** @class */ (function () {
|
|
2732
|
+
function SkyListToolbarViewActionsComponent() {
|
|
2733
|
+
}
|
|
2734
|
+
return SkyListToolbarViewActionsComponent;
|
|
2735
|
+
}());
|
|
2736
|
+
SkyListToolbarViewActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarViewActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2737
|
+
SkyListToolbarViewActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarViewActionsComponent, selector: "sky-list-toolbar-view-actions", ngImport: i0__namespace, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;align-items:center}:host::ng-deep>:not(:last-child){margin-right:5px}.sky-list-toolbar-view-actions ::ng-deep>:not(:last-child){margin-right:5px}\n"] });
|
|
2738
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarViewActionsComponent, decorators: [{
|
|
2739
|
+
type: i0.Component,
|
|
2740
|
+
args: [{
|
|
2741
|
+
selector: 'sky-list-toolbar-view-actions',
|
|
2742
|
+
template: "<ng-content></ng-content>\n",
|
|
2743
|
+
styles: [":host{display:flex;align-items:center}:host::ng-deep>:not(:last-child){margin-right:5px}.sky-list-toolbar-view-actions ::ng-deep>:not(:last-child){margin-right:5px}\n"],
|
|
2744
|
+
}]
|
|
2745
|
+
}] });
|
|
2746
|
+
|
|
2747
|
+
/**
|
|
2748
|
+
* @internal
|
|
2749
|
+
*/
|
|
2750
|
+
var ListToolbarConfigSetSearchEnabledAction = /** @class */ (function () {
|
|
2751
|
+
function ListToolbarConfigSetSearchEnabledAction(enabled) {
|
|
2752
|
+
this.enabled = enabled;
|
|
2753
|
+
}
|
|
2754
|
+
return ListToolbarConfigSetSearchEnabledAction;
|
|
2755
|
+
}());
|
|
2756
|
+
|
|
2757
|
+
/**
|
|
2758
|
+
* @internal
|
|
2759
|
+
*/
|
|
2760
|
+
var ListToolbarConfigSetSortSelectorEnabledAction = /** @class */ (function () {
|
|
2761
|
+
/* istanbul ignore next */
|
|
2762
|
+
function ListToolbarConfigSetSortSelectorEnabledAction(enabled) {
|
|
2763
|
+
if (enabled === void 0) { enabled = true; }
|
|
2764
|
+
this.enabled = enabled;
|
|
2765
|
+
}
|
|
2766
|
+
return ListToolbarConfigSetSortSelectorEnabledAction;
|
|
2767
|
+
}());
|
|
2768
|
+
|
|
2769
|
+
/**
|
|
2770
|
+
* @internal
|
|
2771
|
+
*/
|
|
2772
|
+
var ListToolbarConfigModel = /** @class */ (function () {
|
|
2773
|
+
function ListToolbarConfigModel(data) {
|
|
2774
|
+
this.searchEnabled = true;
|
|
2775
|
+
this.sortSelectorEnabled = true;
|
|
2776
|
+
if (data) {
|
|
2777
|
+
this.searchEnabled = data.searchEnabled;
|
|
2778
|
+
this.sortSelectorEnabled = data.sortSelectorEnabled;
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
return ListToolbarConfigModel;
|
|
2782
|
+
}());
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
* @internal
|
|
2786
|
+
*/
|
|
2787
|
+
var ListToolbarStateModel = /** @class */ (function () {
|
|
2788
|
+
function ListToolbarStateModel() {
|
|
2789
|
+
this.config = new ListToolbarConfigModel();
|
|
2790
|
+
}
|
|
2791
|
+
return ListToolbarStateModel;
|
|
2792
|
+
}());
|
|
2793
|
+
|
|
2794
|
+
/**
|
|
2795
|
+
* @internal
|
|
2796
|
+
*/
|
|
2797
|
+
var ListToolbarStateDispatcher = /** @class */ (function (_super) {
|
|
2798
|
+
__extends(ListToolbarStateDispatcher, _super);
|
|
2799
|
+
function ListToolbarStateDispatcher() {
|
|
2800
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2801
|
+
}
|
|
2802
|
+
return ListToolbarStateDispatcher;
|
|
2803
|
+
}(listBuilderCommon.StateDispatcher));
|
|
2804
|
+
ListToolbarStateDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2805
|
+
ListToolbarStateDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher });
|
|
2806
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarStateDispatcher, decorators: [{
|
|
2807
|
+
type: i0.Injectable
|
|
2808
|
+
}] });
|
|
2809
|
+
/**
|
|
2810
|
+
* @internal
|
|
2811
|
+
*/
|
|
2812
|
+
var ListToolbarStateOrchestrator = /** @class */ (function (_super) {
|
|
2813
|
+
__extends(ListToolbarStateOrchestrator, _super);
|
|
2814
|
+
function ListToolbarStateOrchestrator() {
|
|
2815
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2816
|
+
}
|
|
2817
|
+
return ListToolbarStateOrchestrator;
|
|
2818
|
+
}(listBuilderCommon.StateOrchestrator));
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* @internal
|
|
2822
|
+
*/
|
|
2823
|
+
var ListToolbarConfigOrchestrator = /** @class */ (function (_super) {
|
|
2824
|
+
__extends(ListToolbarConfigOrchestrator, _super);
|
|
2825
|
+
/* istanbul ignore next */
|
|
2826
|
+
function ListToolbarConfigOrchestrator() {
|
|
2827
|
+
var _this = _super.call(this) || this;
|
|
2828
|
+
_this.register(ListToolbarConfigSetSearchEnabledAction, _this.setSearchEnabled).register(ListToolbarConfigSetSortSelectorEnabledAction, _this.setSortSelectorEnabled);
|
|
2829
|
+
return _this;
|
|
2830
|
+
}
|
|
2831
|
+
ListToolbarConfigOrchestrator.prototype.setSearchEnabled = function (state, action) {
|
|
2832
|
+
return new ListToolbarConfigModel(Object.assign({}, state, { searchEnabled: action.enabled }));
|
|
2833
|
+
};
|
|
2834
|
+
ListToolbarConfigOrchestrator.prototype.setSortSelectorEnabled = function (state, action) {
|
|
2835
|
+
return new ListToolbarConfigModel(Object.assign({}, state, { sortSelectorEnabled: action.enabled }));
|
|
2836
|
+
};
|
|
2837
|
+
return ListToolbarConfigOrchestrator;
|
|
2838
|
+
}(ListToolbarStateOrchestrator));
|
|
2839
|
+
|
|
2840
|
+
/**
|
|
2841
|
+
* @internal
|
|
2842
|
+
*/
|
|
2843
|
+
var ListToolbarState = /** @class */ (function (_super) {
|
|
2844
|
+
__extends(ListToolbarState, _super);
|
|
2845
|
+
function ListToolbarState(initialState, dispatcher) {
|
|
2846
|
+
var _this = _super.call(this, initialState, dispatcher) || this;
|
|
2847
|
+
_this.register('config', ListToolbarConfigOrchestrator).begin();
|
|
2848
|
+
return _this;
|
|
2849
|
+
}
|
|
2850
|
+
return ListToolbarState;
|
|
2851
|
+
}(listBuilderCommon.StateNode));
|
|
2852
|
+
ListToolbarState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState, deps: [{ token: ListToolbarStateModel }, { token: ListToolbarStateDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2853
|
+
ListToolbarState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState });
|
|
2854
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ListToolbarState, decorators: [{
|
|
2855
|
+
type: i0.Injectable
|
|
2856
|
+
}], ctorParameters: function () { return [{ type: ListToolbarStateModel }, { type: ListToolbarStateDispatcher }]; } });
|
|
2857
|
+
|
|
2837
2858
|
var nextId = 0;
|
|
2838
2859
|
/**
|
|
2839
2860
|
* Displays a toolbar for a SKY UX-themed list of data.
|
|
@@ -3180,26 +3201,6 @@
|
|
|
3180
3201
|
}]
|
|
3181
3202
|
}] } });
|
|
3182
3203
|
|
|
3183
|
-
/**
|
|
3184
|
-
* Displays custom actions in the toolbar beside to the search bar.
|
|
3185
|
-
*/
|
|
3186
|
-
var SkyListToolbarSearchActionsComponent = /** @class */ (function () {
|
|
3187
|
-
function SkyListToolbarSearchActionsComponent() {
|
|
3188
|
-
}
|
|
3189
|
-
return SkyListToolbarSearchActionsComponent;
|
|
3190
|
-
}());
|
|
3191
|
-
SkyListToolbarSearchActionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSearchActionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3192
|
-
SkyListToolbarSearchActionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyListToolbarSearchActionsComponent, selector: "sky-list-toolbar-search-actions", ngImport: i0__namespace, template: "<div class=\"sky-list-toolbar-search-actions\">\n <ng-content></ng-content>\n</div>\n", styles: [".sky-list-toolbar-search-actions{margin-left:10px}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
3193
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyListToolbarSearchActionsComponent, decorators: [{
|
|
3194
|
-
type: i0.Component,
|
|
3195
|
-
args: [{
|
|
3196
|
-
selector: 'sky-list-toolbar-search-actions',
|
|
3197
|
-
template: "<div class=\"sky-list-toolbar-search-actions\">\n <ng-content></ng-content>\n</div>\n",
|
|
3198
|
-
styles: [".sky-list-toolbar-search-actions{margin-left:10px}\n"],
|
|
3199
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3200
|
-
}]
|
|
3201
|
-
}] });
|
|
3202
|
-
|
|
3203
3204
|
var SkyListToolbarModule = /** @class */ (function () {
|
|
3204
3205
|
function SkyListToolbarModule() {
|
|
3205
3206
|
}
|