@theseam/ui-common 1.0.0-beta.6 → 1.0.0-beta.7
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/breadcrumbs/index.d.ts +1 -2
- package/buttons/index.d.ts +20 -13
- package/datatable/index.d.ts +8 -8
- package/dynamic/index.d.ts +5 -5
- package/fesm2022/theseam-ui-common-asset-reader.mjs +28 -29
- package/fesm2022/theseam-ui-common-asset-reader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs +25 -31
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-buttons.mjs +108 -66
- package/fesm2022/theseam-ui-common-buttons.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-card.mjs +21 -21
- package/fesm2022/theseam-ui-common-card.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-carousel.mjs +28 -30
- package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-checkbox.mjs +27 -27
- package/fesm2022/theseam-ui-common-checkbox.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs +23 -27
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-core.mjs +31 -11
- package/fesm2022/theseam-ui-common-core.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-exporter.mjs +18 -19
- package/fesm2022/theseam-ui-common-data-exporter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-filters.mjs +80 -64
- package/fesm2022/theseam-ui-common-data-filters.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +51 -49
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs +145 -112
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable.mjs +581 -385
- package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs +12 -14
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic.mjs +60 -48
- package/fesm2022/theseam-ui-common-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-footer-bar.mjs +9 -15
- package/fesm2022/theseam-ui-common-footer-bar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field-error.mjs +60 -43
- package/fesm2022/theseam-ui-common-form-field-error.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field.mjs +120 -74
- package/fesm2022/theseam-ui-common-form-field.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-framework.mjs +669 -543
- package/fesm2022/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-google-maps.mjs +206 -149
- package/fesm2022/theseam-ui-common-google-maps.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-graphql.mjs +252 -195
- package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-icon.mjs +125 -89
- package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-layout.mjs +18 -26
- package/fesm2022/theseam-ui-common-layout.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-loading.mjs +19 -28
- package/fesm2022/theseam-ui-common-loading.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-menu.mjs +124 -95
- package/fesm2022/theseam-ui-common-menu.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-modal.mjs +177 -129
- package/fesm2022/theseam-ui-common-modal.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-models.mjs +3 -3
- package/fesm2022/theseam-ui-common-models.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-navigation-reload.mjs +13 -11
- package/fesm2022/theseam-ui-common-navigation-reload.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-popover.mjs +81 -88
- package/fesm2022/theseam-ui-common-popover.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-progress.mjs +15 -19
- package/fesm2022/theseam-ui-common-progress.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-rich-text.mjs +65 -52
- package/fesm2022/theseam-ui-common-rich-text.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-scrollbar.mjs +12 -9
- package/fesm2022/theseam-ui-common-scrollbar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-services.mjs +41 -26
- package/fesm2022/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-shared.mjs +123 -67
- package/fesm2022/theseam-ui-common-shared.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-storage.mjs +9 -6
- package/fesm2022/theseam-ui-common-storage.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-story-helpers.mjs +148 -86
- package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tabbed.mjs +43 -39
- package/fesm2022/theseam-ui-common-tabbed.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-type.mjs +34 -38
- package/fesm2022/theseam-ui-common-table-cell-type.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-types.mjs +182 -144
- package/fesm2022/theseam-ui-common-table-cell-types.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table.mjs +50 -39
- package/fesm2022/theseam-ui-common-table.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tel-input.mjs +98 -63
- package/fesm2022/theseam-ui-common-tel-input.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-testing.mjs +13 -10
- package/fesm2022/theseam-ui-common-testing.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tiled-select.mjs +54 -50
- package/fesm2022/theseam-ui-common-tiled-select.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-edit.mjs +41 -37
- package/fesm2022/theseam-ui-common-toggle-edit.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-group.mjs +30 -31
- package/fesm2022/theseam-ui-common-toggle-group.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tooltip.mjs +225 -66
- package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs +14 -12
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-utils.mjs +113 -77
- package/fesm2022/theseam-ui-common-utils.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-validators.mjs +10 -9
- package/fesm2022/theseam-ui-common-validators.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs +39 -17
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-viewers.mjs +79 -56
- package/fesm2022/theseam-ui-common-viewers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-widget.mjs +288 -314
- package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
- package/framework/base-layout/base-layout.component.scss +9 -4
- package/framework/base-layout/styles/_variables.scss +4 -9
- package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
- package/framework/index.d.ts +6 -6
- package/framework/nav/nav-item/nav-item.component.scss +7 -6
- package/framework/nav/styles/_themes/light/_variables.scss +21 -5
- package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
- package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
- package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
- package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
- package/graphql/index.d.ts +5 -5
- package/modal/README.md +5 -5
- package/modal/index.d.ts +1 -1
- package/models/index.d.ts +1 -1
- package/package.json +59 -59
- package/popover/index.d.ts +0 -2
- package/progress/progress-circle/styles/_variables.scss +15 -3
- package/story-helpers/index.d.ts +11 -1
- package/styles/bootstrap/_bootstrap.scss +34 -34
- package/styles/bootstrap/_bs-styles.scss +4 -8
- package/styles/bootstrap/_bs-utilities.scss +4 -4
- package/styles/bootstrap/_bs-variables.scss +65 -70
- package/styles/common/_forms.scss +9 -10
- package/styles/common/_global.scss +0 -1
- package/styles/common/_hacks.scss +1 -1
- package/styles/common/_table.scss +0 -1
- package/styles/common/_text.scss +3 -1
- package/styles/theme.scss +1 -1
- package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
- package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
- package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
- package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
- package/styles/vendor/quill/_quill.scss +15 -9
- package/tel-input/README.md +27 -27
- package/utils/index.d.ts +3 -3
- package/viewers/index.d.ts +9 -2
- package/widget/_widget-theme.scss +1 -1
- package/widget/styles/_variables.scss +2 -2
- package/widget/widget/widget.component.scss +0 -2
- package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
- package/widget/widget-footer/widget-footer.component.scss +0 -1
|
@@ -97,30 +97,34 @@ class DynamicDatatableDefService {
|
|
|
97
97
|
menuBar$;
|
|
98
98
|
constructor(dataExporters, dataFilters, _valueHelper) {
|
|
99
99
|
this._valueHelper = _valueHelper;
|
|
100
|
-
this._dataExporters =
|
|
101
|
-
this._dataFilters =
|
|
100
|
+
this._dataExporters = dataExporters || [];
|
|
101
|
+
this._dataFilters = dataFilters || [];
|
|
102
102
|
this.def$ = this._defSubject.asObservable();
|
|
103
|
-
this.exporters$ = this.def$.pipe(map(def => def ? this._mapExporters(def) : []), shareReplay({ bufferSize: 1, refCount: true }));
|
|
104
|
-
this.filterMenuItems$ = this.def$.pipe(map(def => def ? this._mapFilterMenuItems(def) : []), shareReplay({ bufferSize: 1, refCount: true }));
|
|
105
|
-
this.hasFilterMenu$ = this.def$.pipe(switchMap(def => {
|
|
103
|
+
this.exporters$ = this.def$.pipe(map((def) => (def ? this._mapExporters(def) : [])), shareReplay({ bufferSize: 1, refCount: true }));
|
|
104
|
+
this.filterMenuItems$ = this.def$.pipe(map((def) => (def ? this._mapFilterMenuItems(def) : [])), shareReplay({ bufferSize: 1, refCount: true }));
|
|
105
|
+
this.hasFilterMenu$ = this.def$.pipe(switchMap((def) => {
|
|
106
106
|
if (!def) {
|
|
107
107
|
return of(false);
|
|
108
108
|
}
|
|
109
109
|
// Check if the visibility can be determined by the state value only.
|
|
110
110
|
if (def.filterMenu && def.filterMenu.state) {
|
|
111
111
|
switch (def.filterMenu.state) {
|
|
112
|
-
case 'always-visible':
|
|
113
|
-
|
|
112
|
+
case 'always-visible':
|
|
113
|
+
return of(true);
|
|
114
|
+
case 'hidden':
|
|
115
|
+
return of(false);
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
// Check if there is anything to put in the filter menu.
|
|
117
119
|
return combineLatest([
|
|
118
|
-
this.exporters$.pipe(map(e => e.length > 0)),
|
|
119
|
-
this.filterMenuItems$.pipe(map(f => f.length > 0))
|
|
120
|
-
]).pipe(map(v => v.indexOf(true) !== -1));
|
|
120
|
+
this.exporters$.pipe(map((e) => e.length > 0)),
|
|
121
|
+
this.filterMenuItems$.pipe(map((f) => f.length > 0)),
|
|
122
|
+
]).pipe(map((v) => v.indexOf(true) !== -1));
|
|
121
123
|
}), shareReplay({ bufferSize: 1, refCount: true }));
|
|
122
|
-
this.options$ = this.def$.pipe(map(def => def ? def.options : undefined), shareReplay({ bufferSize: 1, refCount: true }));
|
|
123
|
-
this.menuBar$ = this.def$.pipe(map(def =>
|
|
124
|
+
this.options$ = this.def$.pipe(map((def) => (def ? def.options : undefined)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
125
|
+
this.menuBar$ = this.def$.pipe(map((def) => notNullOrUndefined(def) && hasProperty(def, 'menuBar')
|
|
126
|
+
? def.menuBar
|
|
127
|
+
: undefined),
|
|
124
128
|
// tap(v => console.log('menubar', v)),
|
|
125
129
|
shareReplay({ bufferSize: 1, refCount: true }));
|
|
126
130
|
}
|
|
@@ -137,27 +141,29 @@ class DynamicDatatableDefService {
|
|
|
137
141
|
return [];
|
|
138
142
|
}
|
|
139
143
|
return def.filterMenu.exporters
|
|
140
|
-
.map(e => this._dataExporters.find(de => de.name === e))
|
|
144
|
+
.map((e) => this._dataExporters.find((de) => de.name === e))
|
|
141
145
|
.filter(notNullOrUndefined);
|
|
142
146
|
}
|
|
143
147
|
/** Map the def filter menu items to provided components. */
|
|
144
148
|
_mapFilterMenuItems(def) {
|
|
145
|
-
if (!def.filterMenu ||
|
|
149
|
+
if (!def.filterMenu ||
|
|
150
|
+
!def.filterMenu.filters ||
|
|
151
|
+
!Array.isArray(def.filterMenu.filters)) {
|
|
146
152
|
return [];
|
|
147
153
|
}
|
|
148
154
|
return def.filterMenu.filters
|
|
149
|
-
.map(f => {
|
|
150
|
-
const _df = this._dataFilters.find(df => df.name === f.name);
|
|
155
|
+
.map((f) => {
|
|
156
|
+
const _df = this._dataFilters.find((df) => df.name === f.name);
|
|
151
157
|
if (_df) {
|
|
152
158
|
return { ...f, component: _df.component };
|
|
153
159
|
}
|
|
154
160
|
})
|
|
155
161
|
.filter(notNullOrUndefined);
|
|
156
162
|
}
|
|
157
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
158
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DynamicDatatableDefService, deps: [{ token: THESEAM_DATA_EXPORTER }, { token: THESEAM_DATA_FILTER_DEF }, { token: i1.DynamicValueHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
164
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DynamicDatatableDefService });
|
|
159
165
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DynamicDatatableDefService, decorators: [{
|
|
161
167
|
type: Injectable
|
|
162
168
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
163
169
|
type: Inject,
|
|
@@ -178,8 +184,8 @@ class DynamicDatatableRowActionsService {
|
|
|
178
184
|
* Observe actions for specified row
|
|
179
185
|
*/
|
|
180
186
|
rowActions(row) {
|
|
181
|
-
return this._dynamicDef.def$.pipe(map(def => (def && def.rowActions
|
|
182
|
-
? from(rowActions).pipe(map(rowAction => {
|
|
187
|
+
return this._dynamicDef.def$.pipe(map((def) => (def && def.rowActions ? def.rowActions || [] : [])), switchMap((rowActions) => rowActions
|
|
188
|
+
? from(rowActions).pipe(map((rowAction) => {
|
|
183
189
|
if (Object.prototype.hasOwnProperty.call(rowAction, 'hidden')) {
|
|
184
190
|
if (typeof rowAction.hidden === 'boolean') {
|
|
185
191
|
return rowAction.hidden ? undefined : rowAction;
|
|
@@ -192,19 +198,19 @@ class DynamicDatatableRowActionsService {
|
|
|
192
198
|
}
|
|
193
199
|
}
|
|
194
200
|
return rowAction;
|
|
195
|
-
}), toArray(), map(v => v.filter(notNullOrUndefined)))
|
|
201
|
+
}), toArray(), map((v) => v.filter(notNullOrUndefined)))
|
|
196
202
|
: of([])));
|
|
197
203
|
}
|
|
198
204
|
/** @ignore */
|
|
199
205
|
_getRowActionContext(row, rowActionDef) {
|
|
200
206
|
return {
|
|
201
|
-
row
|
|
207
|
+
row,
|
|
202
208
|
};
|
|
203
209
|
}
|
|
204
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
205
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DynamicDatatableRowActionsService, deps: [{ token: i1.DynamicValueHelperService }, { token: DynamicDatatableDefService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
211
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DynamicDatatableRowActionsService });
|
|
206
212
|
}
|
|
207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DynamicDatatableRowActionsService, decorators: [{
|
|
208
214
|
type: Injectable
|
|
209
215
|
}], ctorParameters: () => [{ type: i1.DynamicValueHelperService }, { type: DynamicDatatableDefService }] });
|
|
210
216
|
|
|
@@ -260,8 +266,12 @@ let DatatableDynamicActionMenuItemRouterLink = class DatatableDynamicActionMenuI
|
|
|
260
266
|
// })
|
|
261
267
|
}
|
|
262
268
|
}
|
|
263
|
-
get routerLink() {
|
|
264
|
-
|
|
269
|
+
get routerLink() {
|
|
270
|
+
return this._rLink;
|
|
271
|
+
}
|
|
272
|
+
get routerLinkWithHref() {
|
|
273
|
+
return this._rLinkWithHref;
|
|
274
|
+
}
|
|
265
275
|
set routerLinkInput(commands) {
|
|
266
276
|
if (this._rLink) {
|
|
267
277
|
this._rLink.routerLink = commands;
|
|
@@ -380,16 +390,20 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
380
390
|
this._router = _router;
|
|
381
391
|
this._route = _route;
|
|
382
392
|
this._locationStrategy = _locationStrategy;
|
|
383
|
-
this._recordSubscription = this._record
|
|
393
|
+
this._recordSubscription = this._record
|
|
394
|
+
.pipe(
|
|
384
395
|
// tap(v => console.log('record', v)),
|
|
385
|
-
switchMap(record => this._update(record)), tap(() => {
|
|
386
|
-
|
|
396
|
+
switchMap((record) => this._update(record)), tap(() => {
|
|
397
|
+
this._setInvalidActionState(false);
|
|
398
|
+
}), catchError((error) => {
|
|
387
399
|
if (isDevMode()) {
|
|
400
|
+
// eslint-disable-next-line no-console
|
|
388
401
|
console.error(error);
|
|
389
402
|
}
|
|
390
403
|
this._setInvalidActionState(true);
|
|
391
404
|
return of(undefined);
|
|
392
|
-
}))
|
|
405
|
+
}))
|
|
406
|
+
.subscribe();
|
|
393
407
|
}
|
|
394
408
|
ngOnDestroy() {
|
|
395
409
|
this._recordSubscription.unsubscribe();
|
|
@@ -403,7 +417,8 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
403
417
|
if (this._menuRouterLink && this._menuRouterLink.routerLinkWithHref) {
|
|
404
418
|
this._menuRouterLink.routerLinkWithHref.ngOnChanges({});
|
|
405
419
|
if (this._menuRouterLink.routerLinkWithHref.href) {
|
|
406
|
-
if (getAttribute(this._elementRef.nativeElement, 'href') !==
|
|
420
|
+
if (getAttribute(this._elementRef.nativeElement, 'href') !==
|
|
421
|
+
this._menuRouterLink.routerLinkWithHref.href) {
|
|
407
422
|
this._renderer.setAttribute(this._elementRef.nativeElement, 'href', this._menuRouterLink.routerLinkWithHref.href);
|
|
408
423
|
}
|
|
409
424
|
}
|
|
@@ -414,7 +429,7 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
414
429
|
}
|
|
415
430
|
_update(record) {
|
|
416
431
|
this._unsubClick();
|
|
417
|
-
return from(this._getUiProps(record)).pipe(switchMap(uiProps => this._isAnchor()
|
|
432
|
+
return from(this._getUiProps(record)).pipe(switchMap((uiProps) => this._isAnchor()
|
|
418
433
|
? this._updateAnchorElement(record, uiProps)
|
|
419
434
|
: this._updateButtonElement(record, uiProps)));
|
|
420
435
|
}
|
|
@@ -452,8 +467,9 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
452
467
|
// this._tryInitBlockClick(record, uiProps)
|
|
453
468
|
// break
|
|
454
469
|
// }
|
|
455
|
-
default:
|
|
456
|
-
|
|
470
|
+
default:
|
|
471
|
+
throw Error('[DatatableDynamicActionMenuItemDirective] ' +
|
|
472
|
+
`triggerType ${uiProps.triggerType} is not valid for _updateAnchorElement().`);
|
|
457
473
|
}
|
|
458
474
|
return _stream; // .pipe(mapTo(undefined))
|
|
459
475
|
}
|
|
@@ -474,8 +490,9 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
474
490
|
_stream = _stream.pipe(switchMap(() => this._updateClickElement(record, uiProps)));
|
|
475
491
|
break;
|
|
476
492
|
}
|
|
477
|
-
default:
|
|
478
|
-
|
|
493
|
+
default:
|
|
494
|
+
throw Error('[DatatableDynamicActionMenuItemDirective] ' +
|
|
495
|
+
`triggerType ${uiProps.triggerType} is not valid for _updateAnchorElement().`);
|
|
479
496
|
}
|
|
480
497
|
return _stream; // .pipe(mapTo(undefined))
|
|
481
498
|
}
|
|
@@ -483,17 +500,19 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
483
500
|
// console.log('_updateAssetElement')
|
|
484
501
|
// return of(undefined)
|
|
485
502
|
// console.log('this._elementRef.nativeElement', this._elementRef.nativeElement)
|
|
486
|
-
const t = fromEvent(this._elementRef.nativeElement, 'click').pipe(tap(event => {
|
|
503
|
+
const t = fromEvent(this._elementRef.nativeElement, 'click').pipe(tap((event) => {
|
|
487
504
|
// const _context = this._getContext(record._row, record.rowAction)
|
|
488
505
|
// const context = { ..._context, event, uiProps }
|
|
489
506
|
// const result = this._valueHelper.evalSync(uiProps.blockClickExpr, context)
|
|
490
507
|
// console.log(record, uiProps)
|
|
491
508
|
// console.log('_updateClickElement click', (<any>event).button, event)
|
|
492
509
|
if (this._assetReaderHelper) {
|
|
493
|
-
if (uiProps.triggerType === 'link-asset' &&
|
|
510
|
+
if (uiProps.triggerType === 'link-asset' &&
|
|
511
|
+
hasProperty(uiProps, 'linkUrl')) {
|
|
494
512
|
const url = uiProps.linkUrl;
|
|
495
513
|
let target;
|
|
496
|
-
if (hasProperty(uiProps, 'linkExtras') &&
|
|
514
|
+
if (hasProperty(uiProps, 'linkExtras') &&
|
|
515
|
+
hasProperty(uiProps.linkExtras, 'target')) {
|
|
497
516
|
target = uiProps.linkExtras.target;
|
|
498
517
|
}
|
|
499
518
|
this._assetReaderHelper.openLink(url, true, true, target);
|
|
@@ -511,7 +530,7 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
511
530
|
_updateClickElement(record, uiProps) {
|
|
512
531
|
// console.log('_updateClickElement', record, uiProps)
|
|
513
532
|
// return of(undefined)
|
|
514
|
-
return fromEvent(this._elementRef.nativeElement, 'click').pipe(switchMap(event => {
|
|
533
|
+
return fromEvent(this._elementRef.nativeElement, 'click').pipe(switchMap((event) => {
|
|
515
534
|
const _context = this._getContext(record._row, record.rowAction);
|
|
516
535
|
const context = { ..._context, event, uiProps };
|
|
517
536
|
// console.log('click', (<any>event).button, event)
|
|
@@ -542,7 +561,7 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
542
561
|
}
|
|
543
562
|
}
|
|
544
563
|
_blockClickExprObservable(uiProps, record) {
|
|
545
|
-
return fromEvent(this._elementRef.nativeElement, 'click').pipe(tap(event => {
|
|
564
|
+
return fromEvent(this._elementRef.nativeElement, 'click').pipe(tap((event) => {
|
|
546
565
|
const _context = this._getContext(record._row, record.rowAction);
|
|
547
566
|
const context = { ..._context, event, uiProps };
|
|
548
567
|
const result = this._valueHelper.evalSync(uiProps.blockClickExpr, context);
|
|
@@ -568,13 +587,16 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
568
587
|
this._menuRouterLink.fragment = uiProps.linkExtras.fragment;
|
|
569
588
|
}
|
|
570
589
|
if (hasProperty(uiProps.linkExtras, 'queryParamsHandling')) {
|
|
571
|
-
this._menuRouterLink.queryParamsHandling =
|
|
590
|
+
this._menuRouterLink.queryParamsHandling =
|
|
591
|
+
uiProps.linkExtras.queryParamsHandling;
|
|
572
592
|
}
|
|
573
593
|
if (hasProperty(uiProps.linkExtras, 'preserveFragment')) {
|
|
574
|
-
this._menuRouterLink.preserveFragment =
|
|
594
|
+
this._menuRouterLink.preserveFragment =
|
|
595
|
+
uiProps.linkExtras.preserveFragment;
|
|
575
596
|
}
|
|
576
597
|
if (hasProperty(uiProps.linkExtras, 'skipLocationChange')) {
|
|
577
|
-
this._menuRouterLink.skipLocationChange =
|
|
598
|
+
this._menuRouterLink.skipLocationChange =
|
|
599
|
+
uiProps.linkExtras.skipLocationChange;
|
|
578
600
|
}
|
|
579
601
|
if (hasProperty(uiProps.linkExtras, 'replaceUrl')) {
|
|
580
602
|
this._menuRouterLink.replaceUrl = uiProps.linkExtras.replaceUrl;
|
|
@@ -595,21 +617,21 @@ class DatatableDynamicActionMenuItemDirective {
|
|
|
595
617
|
/** @ignore */
|
|
596
618
|
_getContext(row, rowActionDef) {
|
|
597
619
|
return {
|
|
598
|
-
row
|
|
620
|
+
row,
|
|
599
621
|
};
|
|
600
622
|
}
|
|
601
623
|
_setInvalidActionState(invalid = false) {
|
|
602
624
|
const element = this._elementRef.nativeElement;
|
|
603
625
|
toggleAttribute(element, 'disabled', invalid);
|
|
604
626
|
}
|
|
605
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
606
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
627
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicActionMenuItemDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.DynamicValueHelperService }, { token: i1.DynamicActionHelperService }, { token: i2.AssetReaderHelperService }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: i3$1.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
628
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: DatatableDynamicActionMenuItemDirective, isStandalone: true, selector: "[seamDatatableDynamicActionMenuItem]", inputs: { seamDatatableDynamicActionMenuItem: "seamDatatableDynamicActionMenuItem" }, exportAs: ["seamDatatableDynamicActionMenuItem"], usesOnChanges: true, ngImport: i0 });
|
|
607
629
|
}
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicActionMenuItemDirective, decorators: [{
|
|
609
631
|
type: Directive,
|
|
610
632
|
args: [{
|
|
611
633
|
selector: '[seamDatatableDynamicActionMenuItem]',
|
|
612
|
-
exportAs: 'seamDatatableDynamicActionMenuItem'
|
|
634
|
+
exportAs: 'seamDatatableDynamicActionMenuItem',
|
|
613
635
|
}]
|
|
614
636
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.DynamicValueHelperService }, { type: i1.DynamicActionHelperService }, { type: i2.AssetReaderHelperService }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i3$1.LocationStrategy }], propDecorators: { seamDatatableDynamicActionMenuItem: [{
|
|
615
637
|
type: Input
|
|
@@ -619,12 +641,16 @@ class DatatableDynamicActionMenuComponent {
|
|
|
619
641
|
_valueHelper;
|
|
620
642
|
_dynamicRowActions;
|
|
621
643
|
faEllipsisH = faEllipsisH;
|
|
622
|
-
get row() {
|
|
644
|
+
get row() {
|
|
645
|
+
return this._row.value;
|
|
646
|
+
}
|
|
623
647
|
set row(value) {
|
|
624
648
|
this._row.next(value || undefined);
|
|
625
649
|
}
|
|
626
650
|
_row = new BehaviorSubject(undefined);
|
|
627
|
-
get actionDefs() {
|
|
651
|
+
get actionDefs() {
|
|
652
|
+
return this._actionDefs.value;
|
|
653
|
+
}
|
|
628
654
|
set actionDefs(value) {
|
|
629
655
|
this._actionDefs.next(value || []);
|
|
630
656
|
}
|
|
@@ -663,17 +689,19 @@ class DatatableDynamicActionMenuComponent {
|
|
|
663
689
|
// this._menuRecords$ = combineLatest([ this._row, this._actionDefs ]).pipe(
|
|
664
690
|
// switchMap(([ row, actionDefs ]) => !!row ? this._mapRecords(row, actionDefs) : of([]))
|
|
665
691
|
// )
|
|
666
|
-
this._menuRecords$ = this._row.pipe(switchMap(row => row
|
|
667
|
-
? this._dynamicRowActions
|
|
692
|
+
this._menuRecords$ = this._row.pipe(switchMap((row) => row
|
|
693
|
+
? this._dynamicRowActions
|
|
694
|
+
.rowActions(row)
|
|
695
|
+
.pipe(switchMap((actionDefs) => this._mapRecords(row, actionDefs)))
|
|
668
696
|
: of([])));
|
|
669
697
|
// this._menuRecords$.subscribe()
|
|
670
698
|
}
|
|
671
699
|
// TODO: Consider moving this to `DynamicDatatableRowActionsService`.
|
|
672
700
|
_mapRecords(row, actionDefs) {
|
|
673
|
-
return from(actionDefs).pipe(concatMap(actionDef => {
|
|
701
|
+
return from(actionDefs).pipe(concatMap((actionDef) => {
|
|
674
702
|
return (async () => {
|
|
675
703
|
const _rowAction = {
|
|
676
|
-
...actionDef
|
|
704
|
+
...actionDef,
|
|
677
705
|
};
|
|
678
706
|
const context = this._getRowActionContext(row, actionDef);
|
|
679
707
|
if (hasProperty(_rowAction, 'hidden')) {
|
|
@@ -690,7 +718,7 @@ class DatatableDynamicActionMenuComponent {
|
|
|
690
718
|
_row: row,
|
|
691
719
|
_def: actionDef,
|
|
692
720
|
rowAction: _rowAction,
|
|
693
|
-
elementType: this._expectedElementType(actionDef)
|
|
721
|
+
elementType: this._expectedElementType(actionDef),
|
|
694
722
|
};
|
|
695
723
|
return record;
|
|
696
724
|
})();
|
|
@@ -699,7 +727,7 @@ class DatatableDynamicActionMenuComponent {
|
|
|
699
727
|
/** @ignore */
|
|
700
728
|
_getRowActionContext(row, rowActionDef) {
|
|
701
729
|
return {
|
|
702
|
-
row
|
|
730
|
+
row,
|
|
703
731
|
};
|
|
704
732
|
}
|
|
705
733
|
_expectedElementType(def) {
|
|
@@ -712,12 +740,12 @@ class DatatableDynamicActionMenuComponent {
|
|
|
712
740
|
}
|
|
713
741
|
return 'button';
|
|
714
742
|
}
|
|
715
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
716
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
743
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicActionMenuComponent, deps: [{ token: i1.DynamicValueHelperService }, { token: DynamicDatatableRowActionsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
744
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: DatatableDynamicActionMenuComponent, isStandalone: false, selector: "seam-datatable-dynamic-action-menu", inputs: { row: "row", actionDefs: "actionDefs" }, ngImport: i0, template: "<seam-menu\n #menu\n menuClass=\"list-group py-0 border-0 seam-datatable-action-menu\"\n animationType=\"fade\"\n>\n <ng-container *ngFor=\"let record of _menuRecords$ | async\">\n <a\n *ngIf=\"record.elementType === 'a'\"\n seamMenuItem\n [seamDatatableDynamicActionMenuItem]=\"record\"\n class=\"list-group-item list-group-item-action py-1\"\n >{{ record.rowAction.label }}</a\n >\n\n <button\n *ngIf=\"record.elementType === 'button'\"\n seamMenuItem\n [seamDatatableDynamicActionMenuItem]=\"record\"\n type=\"button\"\n class=\"list-group-item list-group-item-action py-1\"\n >\n {{ record.rowAction.label }}\n </button>\n </ng-container>\n\n <!-- <ng-container *ngIf=\"(item.routerLink || item.href) && !item.confirmDialog; else noRouterLink\">\n <a *ngIf=\"item.href; else noHref\"\n seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [attr.href]=\"item.href\"\n [target]=\"item.target\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n <ng-template #noHref>\n <a seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [queryParams]=\"item.queryParams\"\n [fragment]=\"item.fragment\"\n [queryParamsHandling]=\"item.queryParamsHandling\"\n [preserveFragment]=\"item.preserveFragment\"\n [skipLocationChange]=\"item.skipLocationChange\"\n [replaceUrl]=\"item.replaceUrl\"\n [state]=\"item.state\"\n [routerLink]=\"item.routerLink\"\n [target]=\"item.target\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n </ng-template>\n </ng-container>\n <ng-template #noRouterLink>\n <button seamMenuItem\n type=\"button\"\n class=\"list-group-item list-group-item-action py-1\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </button>\n </ng-template>\n </ng-container> -->\n</seam-menu>\n\n<button\n type=\"button\"\n class=\"datatable-action-button btn\"\n [seamMenuToggle]=\"menu\"\n [positions]=\"$any(_actionMenuPositions)\"\n title=\"Row Actions\"\n>\n <seam-icon [icon]=\"faEllipsisH\"></seam-icon>\n</button>\n", styles: [":host{display:block;position:relative}.datatable-action-button{font-size:20px;line-height:20px;width:30px;height:30px;padding:0;border-radius:15px;text-align:center}.datatable-action-button::ng-deep .svg-inline--fa{vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }, { kind: "component", type: i5.MenuComponent, selector: "seam-menu", inputs: ["menuClass", "baseWidth", "animationType"], outputs: ["closed"], exportAs: ["seamMenu"] }, { kind: "directive", type: i5.MenuToggleDirective, selector: "[seamMenuToggle]", inputs: ["seamMenuToggle", "positions", "seamMenuTogglePositionsOffsetY"], outputs: ["menuToggle", "menuOpened", "menuClosed"], exportAs: ["seamMenuToggle"] }, { kind: "component", type: i5.MenuItemComponent, selector: "[seamMenuItem]", inputs: ["disabled", "role", "icon", "iconClass", "sublevelIcon", "subLevelIconClass", "badgeText", "badgeTheme"], exportAs: ["seamMenuItem"] }, { kind: "directive", type: DatatableDynamicActionMenuItemDirective, selector: "[seamDatatableDynamicActionMenuItem]", inputs: ["seamDatatableDynamicActionMenuItem"], exportAs: ["seamDatatableDynamicActionMenuItem"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
717
745
|
}
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicActionMenuComponent, decorators: [{
|
|
719
747
|
type: Component,
|
|
720
|
-
args: [{ selector: 'seam-datatable-dynamic-action-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<seam-menu
|
|
748
|
+
args: [{ selector: 'seam-datatable-dynamic-action-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<seam-menu\n #menu\n menuClass=\"list-group py-0 border-0 seam-datatable-action-menu\"\n animationType=\"fade\"\n>\n <ng-container *ngFor=\"let record of _menuRecords$ | async\">\n <a\n *ngIf=\"record.elementType === 'a'\"\n seamMenuItem\n [seamDatatableDynamicActionMenuItem]=\"record\"\n class=\"list-group-item list-group-item-action py-1\"\n >{{ record.rowAction.label }}</a\n >\n\n <button\n *ngIf=\"record.elementType === 'button'\"\n seamMenuItem\n [seamDatatableDynamicActionMenuItem]=\"record\"\n type=\"button\"\n class=\"list-group-item list-group-item-action py-1\"\n >\n {{ record.rowAction.label }}\n </button>\n </ng-container>\n\n <!-- <ng-container *ngIf=\"(item.routerLink || item.href) && !item.confirmDialog; else noRouterLink\">\n <a *ngIf=\"item.href; else noHref\"\n seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [attr.href]=\"item.href\"\n [target]=\"item.target\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n <ng-template #noHref>\n <a seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [queryParams]=\"item.queryParams\"\n [fragment]=\"item.fragment\"\n [queryParamsHandling]=\"item.queryParamsHandling\"\n [preserveFragment]=\"item.preserveFragment\"\n [skipLocationChange]=\"item.skipLocationChange\"\n [replaceUrl]=\"item.replaceUrl\"\n [state]=\"item.state\"\n [routerLink]=\"item.routerLink\"\n [target]=\"item.target\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n </ng-template>\n </ng-container>\n <ng-template #noRouterLink>\n <button seamMenuItem\n type=\"button\"\n class=\"list-group-item list-group-item-action py-1\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </button>\n </ng-template>\n </ng-container> -->\n</seam-menu>\n\n<button\n type=\"button\"\n class=\"datatable-action-button btn\"\n [seamMenuToggle]=\"menu\"\n [positions]=\"$any(_actionMenuPositions)\"\n title=\"Row Actions\"\n>\n <seam-icon [icon]=\"faEllipsisH\"></seam-icon>\n</button>\n", styles: [":host{display:block;position:relative}.datatable-action-button{font-size:20px;line-height:20px;width:30px;height:30px;padding:0;border-radius:15px;text-align:center}.datatable-action-button::ng-deep .svg-inline--fa{vertical-align:middle}\n"] }]
|
|
721
749
|
}], ctorParameters: () => [{ type: i1.DynamicValueHelperService }, { type: DynamicDatatableRowActionsService }], propDecorators: { row: [{
|
|
722
750
|
type: Input
|
|
723
751
|
}], actionDefs: [{
|
|
@@ -732,7 +760,9 @@ class DatatableDynamicFilterContainerComponent {
|
|
|
732
760
|
// this._setPortal(value)
|
|
733
761
|
// }
|
|
734
762
|
}
|
|
735
|
-
get filterComponent() {
|
|
763
|
+
get filterComponent() {
|
|
764
|
+
return this._filterComponent;
|
|
765
|
+
}
|
|
736
766
|
_filterComponent;
|
|
737
767
|
options;
|
|
738
768
|
_portal = null;
|
|
@@ -756,14 +786,17 @@ class DatatableDynamicFilterContainerComponent {
|
|
|
756
786
|
}
|
|
757
787
|
}
|
|
758
788
|
_createInjector() {
|
|
759
|
-
return Injector.create({
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
789
|
+
return Injector.create({
|
|
790
|
+
parent: this._injector,
|
|
791
|
+
providers: [
|
|
792
|
+
{ provide: THESEAM_DATA_FILTER_OPTIONS, useValue: this.options },
|
|
793
|
+
],
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicFilterContainerComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
797
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: DatatableDynamicFilterContainerComponent, isStandalone: false, selector: "seam-datatable-dynamic-filter-container", inputs: { filterComponent: "filterComponent", options: "options" }, ngImport: i0, template: "<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
765
798
|
}
|
|
766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicFilterContainerComponent, decorators: [{
|
|
767
800
|
type: Component,
|
|
768
801
|
args: [{ selector: 'seam-datatable-dynamic-filter-container', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-template [cdkPortalOutlet]=\"_portal\"></ng-template>\n", styles: [":host{display:block}\n"] }]
|
|
769
802
|
}], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { filterComponent: [{
|
|
@@ -780,8 +813,12 @@ class DatatableDynamicMenuBarContentComponent {
|
|
|
780
813
|
_injector;
|
|
781
814
|
_menuBarItemManifests;
|
|
782
815
|
_def = new BehaviorSubject(undefined);
|
|
783
|
-
set def(value) {
|
|
784
|
-
|
|
816
|
+
set def(value) {
|
|
817
|
+
this._def.next(value);
|
|
818
|
+
}
|
|
819
|
+
get def() {
|
|
820
|
+
return this._def.value;
|
|
821
|
+
}
|
|
785
822
|
def$;
|
|
786
823
|
_rows$;
|
|
787
824
|
constructor(_valueHelper, _dynamicComponentLoader, _injector, _menuBarItemManifests) {
|
|
@@ -791,11 +828,11 @@ class DatatableDynamicMenuBarContentComponent {
|
|
|
791
828
|
this._menuBarItemManifests = _menuBarItemManifests;
|
|
792
829
|
this.def$ = this._def.asObservable();
|
|
793
830
|
// .pipe(tap(v => console.log('def$', v)))
|
|
794
|
-
this._rows$ = this.def$.pipe(switchMap(def => this._mapRows((def && def.rows) || [])));
|
|
831
|
+
this._rows$ = this.def$.pipe(switchMap((def) => this._mapRows((def && def.rows) || [])));
|
|
795
832
|
// .pipe(tap(v => console.log('_rows$', v)))
|
|
796
833
|
}
|
|
797
834
|
_mapRows(rows) {
|
|
798
|
-
return Promise.all(rows.map(r => this._mapRow(r)));
|
|
835
|
+
return Promise.all(rows.map((r) => this._mapRow(r)));
|
|
799
836
|
}
|
|
800
837
|
async _mapRow(row) {
|
|
801
838
|
const result = {};
|
|
@@ -835,7 +872,7 @@ class DatatableDynamicMenuBarContentComponent {
|
|
|
835
872
|
if (hasProperty(column, 'cssClass')) {
|
|
836
873
|
result.cssClass = await this._valueHelper.eval(column.cssClass, context);
|
|
837
874
|
}
|
|
838
|
-
result.items = await Promise.all(column.items.map(v => this._mapItem(v, row, column)));
|
|
875
|
+
result.items = await Promise.all(column.items.map((v) => this._mapItem(v, row, column)));
|
|
839
876
|
return result;
|
|
840
877
|
}
|
|
841
878
|
async _mapItem(item, row, column) {
|
|
@@ -863,24 +900,24 @@ class DatatableDynamicMenuBarContentComponent {
|
|
|
863
900
|
}
|
|
864
901
|
_createRowContext(row) {
|
|
865
902
|
return {
|
|
866
|
-
row
|
|
903
|
+
row,
|
|
867
904
|
};
|
|
868
905
|
}
|
|
869
906
|
_createColumnContext(column, row) {
|
|
870
907
|
return {
|
|
871
908
|
row,
|
|
872
|
-
column
|
|
909
|
+
column,
|
|
873
910
|
};
|
|
874
911
|
}
|
|
875
912
|
_createItemContext(item, row, column) {
|
|
876
913
|
return {
|
|
877
914
|
item,
|
|
878
915
|
row,
|
|
879
|
-
column
|
|
916
|
+
column,
|
|
880
917
|
};
|
|
881
918
|
}
|
|
882
919
|
async _getComponentPortal(component, data) {
|
|
883
|
-
const manifest = (this._menuBarItemManifests || []).find(m => m.name === component);
|
|
920
|
+
const manifest = (this._menuBarItemManifests || []).find((m) => m.name === component);
|
|
884
921
|
if (!manifest) {
|
|
885
922
|
// TODO: Make sure the component is skipped instead of erroring outside of dev mode.
|
|
886
923
|
throw Error(`MenuBar manifest for '${component}' not found.`);
|
|
@@ -888,25 +925,29 @@ class DatatableDynamicMenuBarContentComponent {
|
|
|
888
925
|
// TODO: Create a new injector with the data injected
|
|
889
926
|
let injector = this._injector;
|
|
890
927
|
if (manifest.dataToken) {
|
|
891
|
-
injector = Injector.create({
|
|
892
|
-
|
|
893
|
-
|
|
928
|
+
injector = Injector.create({
|
|
929
|
+
parent: this._injector,
|
|
930
|
+
providers: [{ provide: manifest.dataToken, useValue: data }],
|
|
931
|
+
});
|
|
894
932
|
}
|
|
895
933
|
if (typeof manifest.component === 'string') {
|
|
896
|
-
this._dynamicComponentLoader
|
|
934
|
+
this._dynamicComponentLoader
|
|
935
|
+
.getComponentFactory(manifest.component)
|
|
936
|
+
.pipe(map((componentFactory) => {
|
|
897
937
|
return new ComponentPortal(componentFactory.componentType, null, injector);
|
|
898
|
-
}))
|
|
938
|
+
}))
|
|
939
|
+
.toPromise();
|
|
899
940
|
}
|
|
900
941
|
else {
|
|
901
942
|
return new ComponentPortal(manifest.component, null, injector, null);
|
|
902
943
|
}
|
|
903
944
|
}
|
|
904
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
905
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
945
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicMenuBarContentComponent, deps: [{ token: i1.DynamicValueHelperService }, { token: i2$1.TheSeamDynamicComponentLoader }, { token: i0.Injector }, { token: THESEAM_DATATABLE_DYNAMIC_MENUBAR_ITEM, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
946
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: DatatableDynamicMenuBarContentComponent, isStandalone: false, selector: "seam-datatable-dynamic-menu-bar-content", inputs: { def: "def" }, ngImport: i0, template: "<seam-datatable-menu-bar-row\n *ngFor=\"let row of _rows$ | async; last as isLast\"\n [class.mb-2]=\"!isLast\"\n [ngClass]=\"$any(row.cssClass)\"\n [ngStyle]=\"$any(row.styles)\"\n>\n <ng-container *ngIf=\"row.layoutType === 'tri-column'\">\n <seam-datatable-menu-bar-column-left\n *ngIf=\"row.layout?.columnLeft\"\n [ngClass]=\"$any(row.layout).cssClass\"\n [ngStyle]=\"$any(row.layout).styles\"\n >\n <ng-container *ngIf=\"row.layout?.columnLeft?.items\">\n <ng-container *ngFor=\"let item of row.layout?.columnLeft?.items\">\n <ng-template [cdkPortalOutlet]=\"item.portal\"></ng-template>\n </ng-container>\n </ng-container>\n </seam-datatable-menu-bar-column-left>\n <seam-datatable-menu-bar-column-center\n *ngIf=\"row.layout?.columnCenter\"\n [ngClass]=\"$any(row.layout).cssClass\"\n [ngStyle]=\"$any(row.layout).styles\"\n >\n <ng-container *ngIf=\"row.layout?.columnCenter?.items\">\n <ng-container *ngFor=\"let item of row.layout?.columnCenter?.items\">\n <ng-template [cdkPortalOutlet]=\"item.portal\"></ng-template>\n </ng-container>\n </ng-container>\n </seam-datatable-menu-bar-column-center>\n <seam-datatable-menu-bar-column-right\n *ngIf=\"row.layout?.columnRight\"\n [ngClass]=\"$any(row.layout).cssClass\"\n [ngStyle]=\"$any(row.layout).styles\"\n >\n <ng-container *ngIf=\"row.layout?.columnRight?.items\">\n <ng-container *ngFor=\"let item of row.layout?.columnRight?.items\">\n <ng-template [cdkPortalOutlet]=\"item.portal\"></ng-template>\n </ng-container>\n </ng-container>\n </seam-datatable-menu-bar-column-right>\n </ng-container>\n</seam-datatable-menu-bar-row>\n", styles: [""], dependencies: [{ kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4$1.DatatableMenuBarRowComponent, selector: "seam-datatable-menu-bar-row" }, { kind: "component", type: i4$1.DatatableMenuBarColumnLeftComponent, selector: "seam-datatable-menu-bar-column-left" }, { kind: "component", type: i4$1.DatatableMenuBarColumnCenterComponent, selector: "seam-datatable-menu-bar-column-center" }, { kind: "component", type: i4$1.DatatableMenuBarColumnRightComponent, selector: "seam-datatable-menu-bar-column-right" }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
906
947
|
}
|
|
907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicMenuBarContentComponent, decorators: [{
|
|
908
949
|
type: Component,
|
|
909
|
-
args: [{ selector: 'seam-datatable-dynamic-menu-bar-content', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<seam-datatable-menu-bar-row
|
|
950
|
+
args: [{ selector: 'seam-datatable-dynamic-menu-bar-content', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<seam-datatable-menu-bar-row\n *ngFor=\"let row of _rows$ | async; last as isLast\"\n [class.mb-2]=\"!isLast\"\n [ngClass]=\"$any(row.cssClass)\"\n [ngStyle]=\"$any(row.styles)\"\n>\n <ng-container *ngIf=\"row.layoutType === 'tri-column'\">\n <seam-datatable-menu-bar-column-left\n *ngIf=\"row.layout?.columnLeft\"\n [ngClass]=\"$any(row.layout).cssClass\"\n [ngStyle]=\"$any(row.layout).styles\"\n >\n <ng-container *ngIf=\"row.layout?.columnLeft?.items\">\n <ng-container *ngFor=\"let item of row.layout?.columnLeft?.items\">\n <ng-template [cdkPortalOutlet]=\"item.portal\"></ng-template>\n </ng-container>\n </ng-container>\n </seam-datatable-menu-bar-column-left>\n <seam-datatable-menu-bar-column-center\n *ngIf=\"row.layout?.columnCenter\"\n [ngClass]=\"$any(row.layout).cssClass\"\n [ngStyle]=\"$any(row.layout).styles\"\n >\n <ng-container *ngIf=\"row.layout?.columnCenter?.items\">\n <ng-container *ngFor=\"let item of row.layout?.columnCenter?.items\">\n <ng-template [cdkPortalOutlet]=\"item.portal\"></ng-template>\n </ng-container>\n </ng-container>\n </seam-datatable-menu-bar-column-center>\n <seam-datatable-menu-bar-column-right\n *ngIf=\"row.layout?.columnRight\"\n [ngClass]=\"$any(row.layout).cssClass\"\n [ngStyle]=\"$any(row.layout).styles\"\n >\n <ng-container *ngIf=\"row.layout?.columnRight?.items\">\n <ng-container *ngFor=\"let item of row.layout?.columnRight?.items\">\n <ng-template [cdkPortalOutlet]=\"item.portal\"></ng-template>\n </ng-container>\n </ng-container>\n </seam-datatable-menu-bar-column-right>\n </ng-container>\n</seam-datatable-menu-bar-row>\n" }]
|
|
910
951
|
}], ctorParameters: () => [{ type: i1.DynamicValueHelperService }, { type: i2$1.TheSeamDynamicComponentLoader }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
911
952
|
type: Optional
|
|
912
953
|
}, {
|
|
@@ -998,37 +1039,29 @@ class DatatableDynamicComponent {
|
|
|
998
1039
|
_tmp_rows$;
|
|
999
1040
|
constructor(_dynamicDef) {
|
|
1000
1041
|
this._dynamicDef = _dynamicDef;
|
|
1001
|
-
this._hasDef$ = this._dynamicDef.def$.pipe(map(def => !!def));
|
|
1042
|
+
this._hasDef$ = this._dynamicDef.def$.pipe(map((def) => !!def));
|
|
1002
1043
|
this.menuBar$ = this._dynamicDef.menuBar$;
|
|
1003
1044
|
this._exporters$ = this._dynamicDef.exporters$;
|
|
1004
|
-
this._commonFilterMenuItems$ = this._dynamicDef.filterMenuItems
|
|
1005
|
-
|
|
1006
|
-
this._hasFullSearch$ = this._dynamicDef.filterMenuItems$
|
|
1007
|
-
.pipe(map(f => !!f.find(_f => _f.type === 'full-search')));
|
|
1045
|
+
this._commonFilterMenuItems$ = this._dynamicDef.filterMenuItems$.pipe(map((f) => f.filter((_f) => _f.type === 'common')));
|
|
1046
|
+
this._hasFullSearch$ = this._dynamicDef.filterMenuItems$.pipe(map((f) => !!f.find((_f) => _f.type === 'full-search')));
|
|
1008
1047
|
this._hasFilterMenu$ = this._dynamicDef.hasFilterMenu$;
|
|
1009
1048
|
this._options$ = this._dynamicDef.options$;
|
|
1010
|
-
this._tmp_columns$ = this._dynamicDef.def$.pipe(map(def => def ? def.columns : []));
|
|
1011
|
-
this._tmp_rows$ = this._dynamicDef.def$.pipe(map(def => def ? def.rows : []));
|
|
1012
|
-
}
|
|
1013
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1014
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
1015
|
-
DynamicDatatableDefService,
|
|
1016
|
-
DynamicDatatableRowActionsService
|
|
1017
|
-
], ngImport: i0, template: "<ng-container *ngIf=\"_hasDef$ | async\">\n <seam-datatable *ngIf=\"_options$ | async as opts\"\n class=\"w-100 h-100\"\n [columns]=\"_tmp_columns$ | async\"\n [rows]=\"_tmp_rows$ | async\"\n [virtualization]=\"opts.virtualization\">\n\n <seam-datatable-menu-bar *ngIf=\"menuBar$ | async as menuBar\">\n <seam-datatable-dynamic-menu-bar-content [def]=\"menuBar\"></seam-datatable-dynamic-menu-bar-content>\n </seam-datatable-menu-bar>\n <!-- <seam-datatable-menu-bar *ngIf=\"_hasFilterMenu$ | async\">\n <div class=\"d-flex flex-row pb-2\">\n <div class=\"d-flex flex-row justify-content-end flex-grow-1\">\n <seam-data-filter-search seamDatatableFilter *ngIf=\"_hasFullSearch$\"></seam-data-filter-search>\n </div>\n </div>\n <div class=\"d-flex flex-row\">\n <div class=\"d-flex justify-content-center flex-grow-1\">\n <ng-container *ngFor=\"let r of _commonFilterMenuItems$ | async; let isFirst = first\">\n <seam-datatable-dynamic-filter-container\n [class.ml-1]=\"!isFirst\"\n [filterComponent]=\"r.component\"\n [options]=\"r.options\">\n </seam-datatable-dynamic-filter-container>\n </ng-container>\n </div>\n <seam-datatable-export-button *ngIf=\"_exporters$ | async as exporters\"\n [exporters]=\"exporters\">\n </seam-datatable-export-button>\n </div>\n </seam-datatable-menu-bar> -->\n\n <ng-template seamDatatableRowActionItem let-row>\n <seam-datatable-dynamic-action-menu [row]=\"row\"></seam-datatable-dynamic-action-menu>\n </ng-template>\n\n </seam-datatable>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.DatatableComponent, selector: "seam-datatable", inputs: ["preferencesKey", "targetMarkerTemplate", "columns", "rows", "columnMode", "groupRowsBy", "groupedRows", "selected", "externalPaging", "externalSorting", "externalFiltering", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowIdentity", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "virtualization", "headerHeight", "rowHeight", "footerHeight", "scrollbarV", "scrollbarH", "dataSource", "actionItemColumnPosition", "columnFilterIcon", "columnFilterUpdateMethod", "columnFilterUpdateDebounce"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction", "actionRefreshRequest", "hiddenColumnsChange"] }, { kind: "component", type: i4$1.DatatableMenuBarComponent, selector: "seam-datatable-menu-bar" }, { kind: "directive", type: i4$1.DatatableRowActionItemDirective, selector: "[seamDatatableRowActionItem]" }, { kind: "component", type: DatatableDynamicActionMenuComponent, selector: "seam-datatable-dynamic-action-menu", inputs: ["row", "actionDefs"] }, { kind: "component", type: DatatableDynamicMenuBarContentComponent, selector: "seam-datatable-dynamic-menu-bar-content", inputs: ["def"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1049
|
+
this._tmp_columns$ = this._dynamicDef.def$.pipe(map((def) => (def ? def.columns : [])));
|
|
1050
|
+
this._tmp_rows$ = this._dynamicDef.def$.pipe(map((def) => (def ? def.rows : [])));
|
|
1051
|
+
}
|
|
1052
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicComponent, deps: [{ token: DynamicDatatableDefService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1053
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: DatatableDynamicComponent, isStandalone: false, selector: "seam-datatable-dynamic", inputs: { def: "def" }, providers: [DynamicDatatableDefService, DynamicDatatableRowActionsService], ngImport: i0, template: "<ng-container *ngIf=\"_hasDef$ | async\">\n <seam-datatable\n *ngIf=\"_options$ | async as opts\"\n class=\"w-100 h-100\"\n [columns]=\"_tmp_columns$ | async\"\n [rows]=\"_tmp_rows$ | async\"\n [virtualization]=\"opts.virtualization\"\n >\n <seam-datatable-menu-bar *ngIf=\"menuBar$ | async as menuBar\">\n <seam-datatable-dynamic-menu-bar-content\n [def]=\"menuBar\"\n ></seam-datatable-dynamic-menu-bar-content>\n </seam-datatable-menu-bar>\n <!-- <seam-datatable-menu-bar *ngIf=\"_hasFilterMenu$ | async\">\n <div class=\"d-flex flex-row pb-2\">\n <div class=\"d-flex flex-row justify-content-end flex-grow-1\">\n <seam-data-filter-search seamDatatableFilter *ngIf=\"_hasFullSearch$\"></seam-data-filter-search>\n </div>\n </div>\n <div class=\"d-flex flex-row\">\n <div class=\"d-flex justify-content-center flex-grow-1\">\n <ng-container *ngFor=\"let r of _commonFilterMenuItems$ | async; let isFirst = first\">\n <seam-datatable-dynamic-filter-container\n [class.ml-1]=\"!isFirst\"\n [filterComponent]=\"r.component\"\n [options]=\"r.options\">\n </seam-datatable-dynamic-filter-container>\n </ng-container>\n </div>\n <seam-datatable-export-button *ngIf=\"_exporters$ | async as exporters\"\n [exporters]=\"exporters\">\n </seam-datatable-export-button>\n </div>\n </seam-datatable-menu-bar> -->\n\n <ng-template seamDatatableRowActionItem let-row>\n <seam-datatable-dynamic-action-menu\n [row]=\"row\"\n ></seam-datatable-dynamic-action-menu>\n </ng-template>\n </seam-datatable>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.DatatableComponent, selector: "seam-datatable", inputs: ["preferencesKey", "targetMarkerTemplate", "columns", "rows", "columnMode", "groupRowsBy", "groupedRows", "selected", "externalPaging", "externalSorting", "externalFiltering", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowIdentity", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "virtualization", "headerHeight", "rowHeight", "footerHeight", "scrollbarV", "scrollbarH", "dataSource", "actionItemColumnPosition", "columnFilterIcon", "columnFilterUpdateMethod", "columnFilterUpdateDebounce"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction", "actionRefreshRequest", "hiddenColumnsChange"] }, { kind: "component", type: i4$1.DatatableMenuBarComponent, selector: "seam-datatable-menu-bar" }, { kind: "directive", type: i4$1.DatatableRowActionItemDirective, selector: "[seamDatatableRowActionItem]" }, { kind: "component", type: DatatableDynamicActionMenuComponent, selector: "seam-datatable-dynamic-action-menu", inputs: ["row", "actionDefs"] }, { kind: "component", type: DatatableDynamicMenuBarContentComponent, selector: "seam-datatable-dynamic-menu-bar-content", inputs: ["def"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1018
1054
|
}
|
|
1019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1055
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatatableDynamicComponent, decorators: [{
|
|
1020
1056
|
type: Component,
|
|
1021
|
-
args: [{ selector: 'seam-datatable-dynamic', providers: [
|
|
1022
|
-
DynamicDatatableDefService,
|
|
1023
|
-
DynamicDatatableRowActionsService
|
|
1024
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container *ngIf=\"_hasDef$ | async\">\n <seam-datatable *ngIf=\"_options$ | async as opts\"\n class=\"w-100 h-100\"\n [columns]=\"_tmp_columns$ | async\"\n [rows]=\"_tmp_rows$ | async\"\n [virtualization]=\"opts.virtualization\">\n\n <seam-datatable-menu-bar *ngIf=\"menuBar$ | async as menuBar\">\n <seam-datatable-dynamic-menu-bar-content [def]=\"menuBar\"></seam-datatable-dynamic-menu-bar-content>\n </seam-datatable-menu-bar>\n <!-- <seam-datatable-menu-bar *ngIf=\"_hasFilterMenu$ | async\">\n <div class=\"d-flex flex-row pb-2\">\n <div class=\"d-flex flex-row justify-content-end flex-grow-1\">\n <seam-data-filter-search seamDatatableFilter *ngIf=\"_hasFullSearch$\"></seam-data-filter-search>\n </div>\n </div>\n <div class=\"d-flex flex-row\">\n <div class=\"d-flex justify-content-center flex-grow-1\">\n <ng-container *ngFor=\"let r of _commonFilterMenuItems$ | async; let isFirst = first\">\n <seam-datatable-dynamic-filter-container\n [class.ml-1]=\"!isFirst\"\n [filterComponent]=\"r.component\"\n [options]=\"r.options\">\n </seam-datatable-dynamic-filter-container>\n </ng-container>\n </div>\n <seam-datatable-export-button *ngIf=\"_exporters$ | async as exporters\"\n [exporters]=\"exporters\">\n </seam-datatable-export-button>\n </div>\n </seam-datatable-menu-bar> -->\n\n <ng-template seamDatatableRowActionItem let-row>\n <seam-datatable-dynamic-action-menu [row]=\"row\"></seam-datatable-dynamic-action-menu>\n </ng-template>\n\n </seam-datatable>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
1057
|
+
args: [{ selector: 'seam-datatable-dynamic', providers: [DynamicDatatableDefService, DynamicDatatableRowActionsService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container *ngIf=\"_hasDef$ | async\">\n <seam-datatable\n *ngIf=\"_options$ | async as opts\"\n class=\"w-100 h-100\"\n [columns]=\"_tmp_columns$ | async\"\n [rows]=\"_tmp_rows$ | async\"\n [virtualization]=\"opts.virtualization\"\n >\n <seam-datatable-menu-bar *ngIf=\"menuBar$ | async as menuBar\">\n <seam-datatable-dynamic-menu-bar-content\n [def]=\"menuBar\"\n ></seam-datatable-dynamic-menu-bar-content>\n </seam-datatable-menu-bar>\n <!-- <seam-datatable-menu-bar *ngIf=\"_hasFilterMenu$ | async\">\n <div class=\"d-flex flex-row pb-2\">\n <div class=\"d-flex flex-row justify-content-end flex-grow-1\">\n <seam-data-filter-search seamDatatableFilter *ngIf=\"_hasFullSearch$\"></seam-data-filter-search>\n </div>\n </div>\n <div class=\"d-flex flex-row\">\n <div class=\"d-flex justify-content-center flex-grow-1\">\n <ng-container *ngFor=\"let r of _commonFilterMenuItems$ | async; let isFirst = first\">\n <seam-datatable-dynamic-filter-container\n [class.ml-1]=\"!isFirst\"\n [filterComponent]=\"r.component\"\n [options]=\"r.options\">\n </seam-datatable-dynamic-filter-container>\n </ng-container>\n </div>\n <seam-datatable-export-button *ngIf=\"_exporters$ | async as exporters\"\n [exporters]=\"exporters\">\n </seam-datatable-export-button>\n </div>\n </seam-datatable-menu-bar> -->\n\n <ng-template seamDatatableRowActionItem let-row>\n <seam-datatable-dynamic-action-menu\n [row]=\"row\"\n ></seam-datatable-dynamic-action-menu>\n </ng-template>\n </seam-datatable>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
1025
1058
|
}], ctorParameters: () => [{ type: DynamicDatatableDefService }], propDecorators: { def: [{
|
|
1026
1059
|
type: Input
|
|
1027
1060
|
}] } });
|
|
1028
1061
|
|
|
1029
1062
|
class TheSeamDatatableDynamicModule {
|
|
1030
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1031
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1063
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamDatatableDynamicModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1064
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: TheSeamDatatableDynamicModule, declarations: [DatatableDynamicComponent,
|
|
1032
1065
|
DatatableDynamicFilterContainerComponent,
|
|
1033
1066
|
DatatableDynamicActionMenuComponent,
|
|
1034
1067
|
DatatableDynamicMenuBarContentComponent], imports: [CommonModule,
|
|
@@ -1045,7 +1078,7 @@ class TheSeamDatatableDynamicModule {
|
|
|
1045
1078
|
DatatableDynamicActionMenuItemDirective], exports: [DatatableDynamicComponent,
|
|
1046
1079
|
TheSeamDatatableModule,
|
|
1047
1080
|
DatatableDynamicActionMenuItemDirective] });
|
|
1048
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1081
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamDatatableDynamicModule, imports: [CommonModule,
|
|
1049
1082
|
TheSeamSharedModule,
|
|
1050
1083
|
TheSeamDatatableModule,
|
|
1051
1084
|
TheSeamTableCellTypesModule,
|
|
@@ -1057,7 +1090,7 @@ class TheSeamDatatableDynamicModule {
|
|
|
1057
1090
|
TheSeamMenuModule,
|
|
1058
1091
|
TheSeamButtonsModule, TheSeamDatatableModule] });
|
|
1059
1092
|
}
|
|
1060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamDatatableDynamicModule, decorators: [{
|
|
1061
1094
|
type: NgModule,
|
|
1062
1095
|
args: [{
|
|
1063
1096
|
declarations: [
|
|
@@ -1084,7 +1117,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
1084
1117
|
DatatableDynamicComponent,
|
|
1085
1118
|
TheSeamDatatableModule,
|
|
1086
1119
|
DatatableDynamicActionMenuItemDirective,
|
|
1087
|
-
]
|
|
1120
|
+
],
|
|
1088
1121
|
}]
|
|
1089
1122
|
}] });
|
|
1090
1123
|
|