@igo2/common 20.0.1 → 20.1.0-next.10
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/action/index.d.ts +22 -22
- package/clickout/index.d.ts +2 -2
- package/collapsible/index.d.ts +6 -10
- package/color/index.d.ts +3 -4
- package/context-menu/index.d.ts +9 -9
- package/datepicker/index.d.ts +65 -0
- package/drag-drop/index.d.ts +21 -23
- package/dynamic-component/index.d.ts +7 -7
- package/entity/index.d.ts +135 -72
- package/fesm2022/igo2-common-action.mjs +60 -97
- package/fesm2022/igo2-common-action.mjs.map +1 -1
- package/fesm2022/igo2-common-backdrop.mjs +7 -7
- package/fesm2022/igo2-common-badge.mjs +7 -7
- package/fesm2022/igo2-common-clickout.mjs +10 -12
- package/fesm2022/igo2-common-clickout.mjs.map +1 -1
- package/fesm2022/igo2-common-clone.mjs +7 -7
- package/fesm2022/igo2-common-collapsible.mjs +18 -39
- package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
- package/fesm2022/igo2-common-color.mjs +14 -18
- package/fesm2022/igo2-common-color.mjs.map +1 -1
- package/fesm2022/igo2-common-confirm-dialog.mjs +10 -10
- package/fesm2022/igo2-common-context-menu.mjs +22 -31
- package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
- package/fesm2022/igo2-common-custom-html.mjs +10 -10
- package/fesm2022/igo2-common-datepicker.mjs +316 -0
- package/fesm2022/igo2-common-datepicker.mjs.map +1 -0
- package/fesm2022/igo2-common-dom.mjs +7 -7
- package/fesm2022/igo2-common-drag-drop.mjs +59 -75
- package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
- package/fesm2022/igo2-common-dynamic-component.mjs +34 -52
- package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
- package/fesm2022/igo2-common-entity.mjs +284 -220
- package/fesm2022/igo2-common-entity.mjs.map +1 -1
- package/fesm2022/igo2-common-flexible.mjs +13 -16
- package/fesm2022/igo2-common-flexible.mjs.map +1 -1
- package/fesm2022/igo2-common-form.mjs +120 -174
- package/fesm2022/igo2-common-form.mjs.map +1 -1
- package/fesm2022/igo2-common-home-button.mjs +11 -12
- package/fesm2022/igo2-common-home-button.mjs.map +1 -1
- package/fesm2022/igo2-common-icon.mjs +18 -24
- package/fesm2022/igo2-common-icon.mjs.map +1 -1
- package/fesm2022/igo2-common-image.mjs +16 -20
- package/fesm2022/igo2-common-image.mjs.map +1 -1
- package/fesm2022/igo2-common-interactive-tour.mjs +28 -33
- package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
- package/fesm2022/igo2-common-json-dialog.mjs +11 -11
- package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-keyvalue.mjs +7 -7
- package/fesm2022/igo2-common-list.mjs +49 -66
- package/fesm2022/igo2-common-list.mjs.map +1 -1
- package/fesm2022/igo2-common-panel.mjs +15 -28
- package/fesm2022/igo2-common-panel.mjs.map +1 -1
- package/fesm2022/igo2-common-resizable-bar.mjs +25 -32
- package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
- package/fesm2022/igo2-common-select-value-dialog.mjs +10 -10
- package/fesm2022/igo2-common-sidenav.mjs +7 -7
- package/fesm2022/igo2-common-spinner.mjs +11 -11
- package/fesm2022/igo2-common-spinner.mjs.map +1 -1
- package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
- package/fesm2022/igo2-common-table.mjs +57 -87
- package/fesm2022/igo2-common-table.mjs.map +1 -1
- package/fesm2022/igo2-common-timepicker.mjs +105 -0
- package/fesm2022/igo2-common-timepicker.mjs.map +1 -0
- package/fesm2022/igo2-common-tool.mjs +29 -35
- package/fesm2022/igo2-common-tool.mjs.map +1 -1
- package/fesm2022/igo2-common-widget.mjs +27 -36
- package/fesm2022/igo2-common-widget.mjs.map +1 -1
- package/fesm2022/igo2-common-workspace.mjs +34 -44
- package/fesm2022/igo2-common-workspace.mjs.map +1 -1
- package/flexible/index.d.ts +2 -2
- package/form/index.d.ts +31 -33
- package/home-button/index.d.ts +1 -2
- package/icon/index.d.ts +4 -5
- package/image/index.d.ts +3 -3
- package/interactive-tour/index.d.ts +5 -5
- package/list/index.d.ts +23 -23
- package/package.json +13 -4
- package/panel/index.d.ts +4 -6
- package/resizable-bar/index.d.ts +11 -13
- package/table/index.d.ts +13 -19
- package/timepicker/index.d.ts +33 -0
- package/tool/index.d.ts +5 -5
- package/widget/index.d.ts +9 -9
- package/workspace/index.d.ts +13 -12
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReplaySubject, BehaviorSubject, combineLatest, of, Observable } from 'rxjs';
|
|
3
|
-
import { uuid, ObjectUtils, StringUtils } from '@igo2/utils';
|
|
4
|
-
import { map, skip, debounceTime, catchError, tap } from 'rxjs/operators';
|
|
1
|
+
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
5
2
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { inject,
|
|
3
|
+
import { inject, Injectable, ChangeDetectorRef, input, output, ChangeDetectionStrategy, Component, NgModule, viewChild, Renderer2, ElementRef, HostListener, Input, Directive } from '@angular/core';
|
|
4
|
+
import { ConfigService } from '@igo2/core/config';
|
|
5
|
+
import { ObjectUtils, uuid, StringUtils } from '@igo2/utils';
|
|
6
|
+
import { map, catchError, throwError, ReplaySubject, BehaviorSubject, combineLatest, of, Observable } from 'rxjs';
|
|
7
|
+
import { t } from 'typy';
|
|
8
|
+
import { map as map$1, skip, debounceTime, catchError as catchError$1, tap } from 'rxjs/operators';
|
|
7
9
|
import { AsyncPipe, NgClass, NgStyle } from '@angular/common';
|
|
8
10
|
import { MatOptionModule, ErrorStateMatcher, DateAdapter, MatNativeDateModule } from '@angular/material/core';
|
|
9
11
|
import * as i1 from '@angular/material/form-field';
|
|
@@ -27,7 +29,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
27
29
|
import * as i9 from '@angular/material/input';
|
|
28
30
|
import { MatInputModule } from '@angular/material/input';
|
|
29
31
|
import * as i1$1 from '@angular/material/paginator';
|
|
30
|
-
import {
|
|
32
|
+
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
31
33
|
import * as i10 from '@angular/material/sort';
|
|
32
34
|
import { MatSortModule } from '@angular/material/sort';
|
|
33
35
|
import * as i11 from '@angular/material/table';
|
|
@@ -142,6 +144,114 @@ function getEntityRevision(entity) {
|
|
|
142
144
|
const meta = entity.meta || {};
|
|
143
145
|
return meta.revision || 0;
|
|
144
146
|
}
|
|
147
|
+
function getColumnKeyWithoutPropertiesTag(key) {
|
|
148
|
+
if (key.includes('properties.')) {
|
|
149
|
+
return key.split('.')[1];
|
|
150
|
+
}
|
|
151
|
+
return key;
|
|
152
|
+
}
|
|
153
|
+
function isChoiceField(field) {
|
|
154
|
+
return (field.type === 'list' ||
|
|
155
|
+
field.type === 'autocomplete');
|
|
156
|
+
}
|
|
157
|
+
function isChoiceFieldWithLabelField(field) {
|
|
158
|
+
return field.labelField !== undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
class EntityService {
|
|
162
|
+
http = inject(HttpClient);
|
|
163
|
+
configService = inject(ConfigService);
|
|
164
|
+
encodeListValue(state, column) {
|
|
165
|
+
if (column.arrayIdentifier) {
|
|
166
|
+
const arrayStringify = JSON.stringify(ObjectUtils.resolve(state, column.name));
|
|
167
|
+
return `${column.arrayIdentifier[0]}${arrayStringify.slice(1, -1)}${column.arrayIdentifier[1]}`;
|
|
168
|
+
}
|
|
169
|
+
return ObjectUtils.resolve(state, column.name);
|
|
170
|
+
}
|
|
171
|
+
getDomainValues(field, paramsValue) {
|
|
172
|
+
const relation = field.relation;
|
|
173
|
+
if (!relation) {
|
|
174
|
+
throw new Error(`Relation not defined for the field "${field.name}" (type: ${field.type}).`);
|
|
175
|
+
}
|
|
176
|
+
const url = this.buildUrl(field);
|
|
177
|
+
if (!url)
|
|
178
|
+
throw new Error(`Url not defined for the entity "${field.name}" (type: ${field.type}).`);
|
|
179
|
+
const options = {};
|
|
180
|
+
if (relation.params && paramsValue) {
|
|
181
|
+
const parsedParams = {};
|
|
182
|
+
Object.keys(paramsValue).forEach((field) => {
|
|
183
|
+
const key = this.getRelationFilterParamName(field, relation);
|
|
184
|
+
parsedParams[key] = paramsValue[field];
|
|
185
|
+
});
|
|
186
|
+
options['params'] = new HttpParams().appendAll(parsedParams);
|
|
187
|
+
}
|
|
188
|
+
return this.http.get(url, options).pipe(map((result) => this.parseDomainValues(relation, result)), catchError((err) => {
|
|
189
|
+
err.error.caught = true;
|
|
190
|
+
return throwError(() => err);
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
resolveDomainValues(state, column) {
|
|
194
|
+
let value = ObjectUtils.resolve(state, column.name);
|
|
195
|
+
if (isChoiceField(column) && column.arrayIdentifier) {
|
|
196
|
+
value = this.parseListValue(state, column);
|
|
197
|
+
}
|
|
198
|
+
if (Array.isArray(value)) {
|
|
199
|
+
return value.map((val) => this.findDomainValue(column, String(val))?.value);
|
|
200
|
+
}
|
|
201
|
+
return this.findDomainValue(column, String(value))?.value;
|
|
202
|
+
}
|
|
203
|
+
buildUrl(field) {
|
|
204
|
+
const relation = field.relation;
|
|
205
|
+
if (relation.url)
|
|
206
|
+
return relation.url;
|
|
207
|
+
const baseUrl = this.configService.getConfig('edition.url');
|
|
208
|
+
if (!relation.table) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
return baseUrl ? baseUrl + relation.table : relation.table;
|
|
212
|
+
}
|
|
213
|
+
parseDomainValues(relation, options) {
|
|
214
|
+
const path = relation.choiceList?.path;
|
|
215
|
+
const items = path?.list
|
|
216
|
+
? ObjectUtils.resolve(options, path.list)
|
|
217
|
+
: options;
|
|
218
|
+
return items.map((item) => {
|
|
219
|
+
const id = path?.id ? ObjectUtils.resolve(item, path.id) : item.id;
|
|
220
|
+
const value = path?.value
|
|
221
|
+
? ObjectUtils.resolve(item, path.value)
|
|
222
|
+
: item.value;
|
|
223
|
+
return { id, value };
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
getRelationFilterParamName(field, relation) {
|
|
227
|
+
const param = relation.params;
|
|
228
|
+
if (param.field !== field) {
|
|
229
|
+
return field;
|
|
230
|
+
}
|
|
231
|
+
return param?.name ?? field;
|
|
232
|
+
}
|
|
233
|
+
findDomainValue(column, id) {
|
|
234
|
+
return column.domainValues?.find((option) => String(option.id) === String(id));
|
|
235
|
+
}
|
|
236
|
+
parseListValue(state, column) {
|
|
237
|
+
let value = String(ObjectUtils.resolve(state, column.name)).trim();
|
|
238
|
+
if (column.arrayIdentifier) {
|
|
239
|
+
const [open, close] = column.arrayIdentifier;
|
|
240
|
+
if (value.startsWith(open) && value.endsWith(close)) {
|
|
241
|
+
value = value.slice(open.length, value.length - close.length);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return value?.split(',').map((v) => v.trim()) ?? [];
|
|
245
|
+
}
|
|
246
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
247
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityService, providedIn: 'root' });
|
|
248
|
+
}
|
|
249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityService, decorators: [{
|
|
250
|
+
type: Injectable,
|
|
251
|
+
args: [{
|
|
252
|
+
providedIn: 'root'
|
|
253
|
+
}]
|
|
254
|
+
}] });
|
|
145
255
|
|
|
146
256
|
/**
|
|
147
257
|
* This class is used to track a store's entities state
|
|
@@ -442,7 +552,7 @@ class EntityView {
|
|
|
442
552
|
* @returns Observable of a value
|
|
443
553
|
*/
|
|
444
554
|
firstBy$(clause) {
|
|
445
|
-
return this.values$.pipe(map((values) => values.find(clause)));
|
|
555
|
+
return this.values$.pipe(map$1((values) => values.find(clause)));
|
|
446
556
|
}
|
|
447
557
|
/**
|
|
448
558
|
* Get all the values that respect a criteria
|
|
@@ -456,7 +566,7 @@ class EntityView {
|
|
|
456
566
|
* @returns Observable of values
|
|
457
567
|
*/
|
|
458
568
|
manyBy$(clause) {
|
|
459
|
-
return this.values$.pipe(map((values) => values.filter(clause)));
|
|
569
|
+
return this.values$.pipe(map$1((values) => values.filter(clause)));
|
|
460
570
|
}
|
|
461
571
|
/**
|
|
462
572
|
* Clear the filter and sort and unsubscribe from the source
|
|
@@ -568,7 +678,7 @@ class EntityView {
|
|
|
568
678
|
this.source$,
|
|
569
679
|
combineLatest(this.joins.map((join) => join.source))
|
|
570
680
|
];
|
|
571
|
-
return combineLatest(sources$).pipe(map((bunch) => {
|
|
681
|
+
return combineLatest(sources$).pipe(map$1((bunch) => {
|
|
572
682
|
const [entities, joinData] = bunch;
|
|
573
683
|
return entities.reduce((values, entity) => {
|
|
574
684
|
const value = this.computeJoinedValue(entity, joinData);
|
|
@@ -1227,7 +1337,7 @@ class EntityTransaction {
|
|
|
1227
1337
|
*/
|
|
1228
1338
|
commit(operations, handler) {
|
|
1229
1339
|
this.inCommitPhase$.next(true);
|
|
1230
|
-
return handler(this, operations).pipe(catchError(() => of(new Error())), tap((result) => {
|
|
1340
|
+
return handler(this, operations).pipe(catchError$1(() => of(new Error())), tap((result) => {
|
|
1231
1341
|
if (result instanceof Error) {
|
|
1232
1342
|
this.onCommitError();
|
|
1233
1343
|
}
|
|
@@ -1701,47 +1811,47 @@ class EntitySelectorComponent {
|
|
|
1701
1811
|
/**
|
|
1702
1812
|
* Entity store
|
|
1703
1813
|
*/
|
|
1704
|
-
store;
|
|
1814
|
+
store = input(undefined, ...(ngDevMode ? [{ debugName: "store" }] : []));
|
|
1705
1815
|
/**
|
|
1706
1816
|
* Title accessor
|
|
1707
1817
|
*/
|
|
1708
|
-
titleAccessor = getEntityTitle;
|
|
1818
|
+
titleAccessor = input(getEntityTitle, ...(ngDevMode ? [{ debugName: "titleAccessor" }] : []));
|
|
1709
1819
|
/**
|
|
1710
1820
|
* Text to display when nothing is selected
|
|
1711
1821
|
*/
|
|
1712
|
-
emptyText = undefined;
|
|
1822
|
+
emptyText = input(undefined, ...(ngDevMode ? [{ debugName: "emptyText" }] : []));
|
|
1713
1823
|
/**
|
|
1714
1824
|
* Wheter selecting many entities is allowed
|
|
1715
1825
|
*/
|
|
1716
|
-
multi = false;
|
|
1826
|
+
multi = input(false, ...(ngDevMode ? [{ debugName: "multi" }] : []));
|
|
1717
1827
|
/**
|
|
1718
1828
|
* Text to display for the select all option
|
|
1719
1829
|
*/
|
|
1720
|
-
multiAllText = 'All';
|
|
1830
|
+
multiAllText = input('All', ...(ngDevMode ? [{ debugName: "multiAllText" }] : []));
|
|
1721
1831
|
/**
|
|
1722
1832
|
* Text to display for the select none option
|
|
1723
1833
|
*/
|
|
1724
|
-
multiNoneText = 'None';
|
|
1834
|
+
multiNoneText = input('None', ...(ngDevMode ? [{ debugName: "multiNoneText" }] : []));
|
|
1725
1835
|
/**
|
|
1726
1836
|
* Field placeholder
|
|
1727
1837
|
*/
|
|
1728
|
-
placeholder;
|
|
1838
|
+
placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
1729
1839
|
/**
|
|
1730
1840
|
* Wheter the selector is disabled or not
|
|
1731
1841
|
*/
|
|
1732
|
-
disabled = false;
|
|
1842
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
1733
1843
|
/**
|
|
1734
1844
|
* Event emitted when the selection changes
|
|
1735
1845
|
*/
|
|
1736
|
-
selectedChange =
|
|
1846
|
+
selectedChange = output();
|
|
1737
1847
|
/**
|
|
1738
1848
|
* Create a store watcher and subscribe to the selected entity
|
|
1739
1849
|
* @internal
|
|
1740
1850
|
*/
|
|
1741
1851
|
ngOnInit() {
|
|
1742
|
-
this.watcher = new EntityStoreWatcher(this.store, this.cdRef);
|
|
1743
|
-
this.selected$$ = this.store
|
|
1744
|
-
.manyBy$((record) => record.state.selected === true)
|
|
1852
|
+
this.watcher = new EntityStoreWatcher(this.store(), this.cdRef);
|
|
1853
|
+
this.selected$$ = this.store()
|
|
1854
|
+
.stateView.manyBy$((record) => record.state.selected === true)
|
|
1745
1855
|
.subscribe((records) => {
|
|
1746
1856
|
const entities = records.map((record) => record.entity);
|
|
1747
1857
|
this.onSelectFromStore(entities);
|
|
@@ -1763,26 +1873,27 @@ class EntitySelectorComponent {
|
|
|
1763
1873
|
const values = event.value instanceof Array ? event.value : [event.value];
|
|
1764
1874
|
const multiSelect = values.find((_value) => _value === this.multiSelectValue);
|
|
1765
1875
|
let entities = values.filter((_value) => _value !== this.multiSelectValue);
|
|
1876
|
+
const store = this.store();
|
|
1766
1877
|
if (multiSelect !== undefined) {
|
|
1767
|
-
if (entities.length ===
|
|
1878
|
+
if (entities.length === store.count) {
|
|
1768
1879
|
entities = [];
|
|
1769
1880
|
}
|
|
1770
|
-
else if (entities.length <
|
|
1771
|
-
entities =
|
|
1881
|
+
else if (entities.length < store.count) {
|
|
1882
|
+
entities = store.all();
|
|
1772
1883
|
}
|
|
1773
1884
|
}
|
|
1774
1885
|
entities = entities.filter((entity) => entity !== this.emptyValue);
|
|
1775
1886
|
if (entities.length === 0) {
|
|
1776
|
-
|
|
1887
|
+
store.state.updateAll({ selected: false });
|
|
1777
1888
|
}
|
|
1778
1889
|
else {
|
|
1779
|
-
|
|
1890
|
+
store.state.updateMany(entities, { selected: true }, true);
|
|
1780
1891
|
}
|
|
1781
|
-
const value = this.multi ? entities : event.value;
|
|
1892
|
+
const value = this.multi() ? entities : event.value;
|
|
1782
1893
|
this.selectedChange.emit({ selected: true, value });
|
|
1783
1894
|
}
|
|
1784
1895
|
onSelectFromStore(entities) {
|
|
1785
|
-
if (this.multi === true) {
|
|
1896
|
+
if (this.multi() === true) {
|
|
1786
1897
|
this.selected$.next(entities);
|
|
1787
1898
|
}
|
|
1788
1899
|
else {
|
|
@@ -1792,50 +1903,35 @@ class EntitySelectorComponent {
|
|
|
1792
1903
|
this.updateMultiToggleWithEntities(entities);
|
|
1793
1904
|
}
|
|
1794
1905
|
updateMultiToggleWithEntities(entities) {
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1906
|
+
const store = this.store();
|
|
1907
|
+
const multiNoneText = this.multiNoneText();
|
|
1908
|
+
const multiAllText = this.multiAllText();
|
|
1909
|
+
if (entities.length === store.count &&
|
|
1910
|
+
this.multiText$.value !== multiNoneText) {
|
|
1911
|
+
this.multiText$.next(multiNoneText);
|
|
1798
1912
|
}
|
|
1799
|
-
else if (entities.length <
|
|
1800
|
-
this.multiText$.value !==
|
|
1801
|
-
this.multiText$.next(
|
|
1913
|
+
else if (entities.length < store.count &&
|
|
1914
|
+
this.multiText$.value !== multiAllText) {
|
|
1915
|
+
this.multiText$.next(multiAllText);
|
|
1802
1916
|
}
|
|
1803
1917
|
}
|
|
1804
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1805
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
1918
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntitySelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1919
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: EntitySelectorComponent, isStandalone: true, selector: "igo-entity-selector", inputs: { store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: false, transformFunction: null }, titleAccessor: { classPropertyName: "titleAccessor", publicName: "titleAccessor", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, multiAllText: { classPropertyName: "multiAllText", publicName: "multiAllText", isSignal: true, isRequired: false, transformFunction: null }, multiNoneText: { classPropertyName: "multiNoneText", publicName: "multiNoneText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange" }, ngImport: i0, template: "<mat-form-field class=\"igo-entity-selector\" subscriptSizing=\"dynamic\">\n <mat-select\n [disabled]=\"disabled()\"\n [value]=\"selected$ | async\"\n [multiple]=\"multi()\"\n [placeholder]=\"placeholder()\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n @if (emptyText() !== undefined && multi() === false) {\n <mat-option [value]=\"emptyValue\">{{ emptyText() }}</mat-option>\n }\n @if (multi() === true) {\n <mat-option [value]=\"multiSelectValue\">{{\n multiText$ | async\n }}</mat-option>\n }\n @for (record of store().stateView.all$() | async; track record) {\n <mat-option [value]=\"record.entity\">\n {{ titleAccessor()(record.entity) }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px}mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1806
1920
|
}
|
|
1807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntitySelectorComponent, decorators: [{
|
|
1808
1922
|
type: Component,
|
|
1809
|
-
args: [{ selector: 'igo-entity-selector', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatFormFieldModule, MatSelectModule, MatOptionModule, AsyncPipe], template: "<mat-form-field class=\"igo-entity-selector\" subscriptSizing=\"dynamic\">\n <mat-select\n [disabled]=\"disabled\"\n [value]=\"selected$ | async\"\n [multiple]=\"multi\"\n [placeholder]=\"placeholder\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n @if (emptyText !== undefined && multi === false) {\n <mat-option [value]=\"emptyValue\">{{ emptyText }}</mat-option>\n }\n @if (multi === true) {\n <mat-option [value]=\"multiSelectValue\">{{\n multiText$ | async\n }}</mat-option>\n }\n @for (record of store.stateView.all$() | async; track record) {\n <mat-option [value]=\"record.entity\">\n {{ titleAccessor(record.entity) }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px}mat-form-field{width:100%}\n"] }]
|
|
1810
|
-
}], propDecorators: { store: [{
|
|
1811
|
-
type: Input
|
|
1812
|
-
}], titleAccessor: [{
|
|
1813
|
-
type: Input
|
|
1814
|
-
}], emptyText: [{
|
|
1815
|
-
type: Input
|
|
1816
|
-
}], multi: [{
|
|
1817
|
-
type: Input
|
|
1818
|
-
}], multiAllText: [{
|
|
1819
|
-
type: Input
|
|
1820
|
-
}], multiNoneText: [{
|
|
1821
|
-
type: Input
|
|
1822
|
-
}], placeholder: [{
|
|
1823
|
-
type: Input
|
|
1824
|
-
}], disabled: [{
|
|
1825
|
-
type: Input
|
|
1826
|
-
}], selectedChange: [{
|
|
1827
|
-
type: Output
|
|
1828
|
-
}] } });
|
|
1923
|
+
args: [{ selector: 'igo-entity-selector', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatFormFieldModule, MatSelectModule, MatOptionModule, AsyncPipe], template: "<mat-form-field class=\"igo-entity-selector\" subscriptSizing=\"dynamic\">\n <mat-select\n [disabled]=\"disabled()\"\n [value]=\"selected$ | async\"\n [multiple]=\"multi()\"\n [placeholder]=\"placeholder()\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n @if (emptyText() !== undefined && multi() === false) {\n <mat-option [value]=\"emptyValue\">{{ emptyText() }}</mat-option>\n }\n @if (multi() === true) {\n <mat-option [value]=\"multiSelectValue\">{{\n multiText$ | async\n }}</mat-option>\n }\n @for (record of store().stateView.all$() | async; track record) {\n <mat-option [value]=\"record.entity\">\n {{ titleAccessor()(record.entity) }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px}mat-form-field{width:100%}\n"] }]
|
|
1924
|
+
}], propDecorators: { store: [{ type: i0.Input, args: [{ isSignal: true, alias: "store", required: false }] }], titleAccessor: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleAccessor", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], multiAllText: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiAllText", required: false }] }], multiNoneText: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiNoneText", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }] } });
|
|
1829
1925
|
|
|
1830
1926
|
/**
|
|
1831
1927
|
* @deprecated import the EntitySelectorComponent directly
|
|
1832
1928
|
*/
|
|
1833
1929
|
class IgoEntitySelectorModule {
|
|
1834
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1835
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1836
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1930
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntitySelectorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1931
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoEntitySelectorModule, imports: [EntitySelectorComponent], exports: [EntitySelectorComponent] });
|
|
1932
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntitySelectorModule, imports: [EntitySelectorComponent] });
|
|
1837
1933
|
}
|
|
1838
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntitySelectorModule, decorators: [{
|
|
1839
1935
|
type: NgModule,
|
|
1840
1936
|
args: [{
|
|
1841
1937
|
imports: [EntitySelectorComponent],
|
|
@@ -1855,83 +1951,80 @@ class EntityTablePaginatorComponent {
|
|
|
1855
1951
|
count$$;
|
|
1856
1952
|
entitySortChange$$;
|
|
1857
1953
|
paginationLabelTranslation$$ = [];
|
|
1858
|
-
entitySortChange$ = new BehaviorSubject(false);
|
|
1954
|
+
entitySortChange$ = input(new BehaviorSubject(false), ...(ngDevMode ? [{ debugName: "entitySortChange$" }] : []));
|
|
1859
1955
|
/**
|
|
1860
1956
|
* Entity store
|
|
1861
1957
|
*/
|
|
1862
|
-
store;
|
|
1958
|
+
store = input(undefined, ...(ngDevMode ? [{ debugName: "store" }] : []));
|
|
1863
1959
|
/**
|
|
1864
1960
|
* Paginator options
|
|
1865
1961
|
*/
|
|
1866
|
-
paginatorOptions;
|
|
1867
|
-
/**
|
|
1868
|
-
* Event emitted when the paginator changes the page size or page index.
|
|
1869
|
-
*/
|
|
1870
|
-
page;
|
|
1962
|
+
paginatorOptions = input(undefined, ...(ngDevMode ? [{ debugName: "paginatorOptions" }] : []));
|
|
1871
1963
|
length = 0;
|
|
1872
1964
|
/**
|
|
1873
1965
|
* Paginator emitted.
|
|
1874
1966
|
*/
|
|
1875
|
-
paginatorChange =
|
|
1876
|
-
paginator;
|
|
1967
|
+
paginatorChange = output();
|
|
1968
|
+
paginator = viewChild(MatPaginator, ...(ngDevMode ? [{ debugName: "paginator" }] : []));
|
|
1877
1969
|
ngOnChanges() {
|
|
1878
1970
|
this.unsubscribeAll();
|
|
1879
|
-
this.count$$ = this.store.stateView.count$.subscribe((count) => {
|
|
1971
|
+
this.count$$ = this.store().stateView.count$.subscribe((count) => {
|
|
1880
1972
|
this.length = count;
|
|
1881
1973
|
this.emitPaginator();
|
|
1882
1974
|
});
|
|
1883
|
-
this.entitySortChange$$ = this.entitySortChange
|
|
1884
|
-
|
|
1885
|
-
|
|
1975
|
+
this.entitySortChange$$ = this.entitySortChange$().subscribe(() => {
|
|
1976
|
+
const paginator = this.paginator();
|
|
1977
|
+
if (paginator) {
|
|
1978
|
+
paginator.firstPage();
|
|
1886
1979
|
}
|
|
1887
1980
|
});
|
|
1888
1981
|
this.initPaginatorOptions();
|
|
1889
1982
|
this.translateLabels();
|
|
1890
1983
|
}
|
|
1891
1984
|
initPaginatorOptions() {
|
|
1892
|
-
this.disabled = this.paginatorOptions?.disabled || this.disabled;
|
|
1893
|
-
this.pageIndex = this.paginatorOptions?.pageIndex || this.pageIndex;
|
|
1894
|
-
this.pageSize = this.paginatorOptions?.pageSize || this.pageSize;
|
|
1985
|
+
this.disabled = this.paginatorOptions()?.disabled || this.disabled;
|
|
1986
|
+
this.pageIndex = this.paginatorOptions()?.pageIndex || this.pageIndex;
|
|
1987
|
+
this.pageSize = this.paginatorOptions()?.pageSize || this.pageSize;
|
|
1895
1988
|
this.pageSizeOptions =
|
|
1896
|
-
this.paginatorOptions?.pageSizeOptions || this.pageSizeOptions;
|
|
1989
|
+
this.paginatorOptions()?.pageSizeOptions || this.pageSizeOptions;
|
|
1897
1990
|
if (this.mediaService.isMobile()) {
|
|
1898
1991
|
this.showFirstLastButtons = false;
|
|
1899
1992
|
this.hidePageSize = true;
|
|
1900
1993
|
}
|
|
1901
1994
|
else {
|
|
1902
1995
|
this.showFirstLastButtons =
|
|
1903
|
-
this.paginatorOptions?.showFirstLastButtons ||
|
|
1996
|
+
this.paginatorOptions()?.showFirstLastButtons ||
|
|
1904
1997
|
this.showFirstLastButtons;
|
|
1905
1998
|
this.hidePageSize =
|
|
1906
|
-
this.paginatorOptions?.hidePageSize || this.hidePageSize;
|
|
1999
|
+
this.paginatorOptions()?.hidePageSize || this.hidePageSize;
|
|
1907
2000
|
}
|
|
1908
2001
|
}
|
|
1909
2002
|
translateLabels() {
|
|
1910
2003
|
this.paginationLabelTranslation$$.push(this.languageService.translate
|
|
1911
2004
|
.get('igo.common.paginator.firstPageLabel')
|
|
1912
2005
|
.subscribe((label) => {
|
|
1913
|
-
this.paginator._intl.firstPageLabel = label;
|
|
2006
|
+
this.paginator()._intl.firstPageLabel = label;
|
|
1914
2007
|
}));
|
|
1915
|
-
this.paginator._intl.getRangeLabel = this.rangeLabel;
|
|
2008
|
+
this.paginator()._intl.getRangeLabel = this.rangeLabel;
|
|
1916
2009
|
this.paginationLabelTranslation$$.push(this.languageService.translate
|
|
1917
2010
|
.get('igo.common.paginator.itemsPerPageLabel')
|
|
1918
2011
|
.subscribe((label) => {
|
|
1919
|
-
this.paginator._intl.itemsPerPageLabel = label;
|
|
2012
|
+
this.paginator()._intl.itemsPerPageLabel = label;
|
|
1920
2013
|
}));
|
|
1921
2014
|
this.paginationLabelTranslation$$.push(this.languageService.translate
|
|
1922
2015
|
.get('igo.common.paginator.lastPageLabel')
|
|
1923
2016
|
.subscribe((label) => {
|
|
1924
|
-
this.paginator._intl.lastPageLabel = label;
|
|
2017
|
+
this.paginator()._intl.lastPageLabel = label;
|
|
1925
2018
|
}));
|
|
1926
2019
|
this.paginationLabelTranslation$$.push(this.languageService.translate
|
|
1927
2020
|
.get('igo.common.paginator.nextPageLabel')
|
|
1928
2021
|
.subscribe((label) => {
|
|
1929
|
-
this.paginator._intl.nextPageLabel = label;
|
|
2022
|
+
this.paginator()._intl.nextPageLabel = label;
|
|
1930
2023
|
}));
|
|
1931
2024
|
this.paginationLabelTranslation$$.push(this.languageService.translate
|
|
1932
2025
|
.get('igo.common.paginator.previousPageLabel')
|
|
1933
2026
|
.subscribe((label) => {
|
|
1934
|
-
this.paginator._intl.previousPageLabel = label;
|
|
2027
|
+
this.paginator()._intl.previousPageLabel = label;
|
|
1935
2028
|
}));
|
|
1936
2029
|
}
|
|
1937
2030
|
rangeLabel = (page, pageSize, length) => {
|
|
@@ -1964,28 +2057,15 @@ class EntityTablePaginatorComponent {
|
|
|
1964
2057
|
this.unsubscribeAll();
|
|
1965
2058
|
}
|
|
1966
2059
|
emitPaginator() {
|
|
1967
|
-
this.paginatorChange.emit(this.paginator);
|
|
2060
|
+
this.paginatorChange.emit(this.paginator());
|
|
1968
2061
|
}
|
|
1969
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1970
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2062
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityTablePaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2063
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.16", type: EntityTablePaginatorComponent, isStandalone: true, selector: "igo-entity-table-paginator", inputs: { entitySortChange$: { classPropertyName: "entitySortChange$", publicName: "entitySortChange$", isSignal: true, isRequired: false, transformFunction: null }, store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: false, transformFunction: null }, paginatorOptions: { classPropertyName: "paginatorOptions", publicName: "paginatorOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paginatorChange: "paginatorChange" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<mat-paginator\n [disabled]=\"disabled\"\n [hidePageSize]=\"hidePageSize\"\n [length]=\"length\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [showFirstLastButtons]=\"showFirstLastButtons\"\n (page)=\"emitPaginator()\"\n/>\n", styles: [":host ::ng-deep .mat-mdc-paginator-container{min-height:unset}\n"], dependencies: [{ kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1971
2064
|
}
|
|
1972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityTablePaginatorComponent, decorators: [{
|
|
1973
2066
|
type: Component,
|
|
1974
|
-
args: [{ selector: 'igo-entity-table-paginator', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatPaginatorModule], template: "<mat-paginator\n [disabled]=\"disabled\"\n [hidePageSize]=\"hidePageSize\"\n [length]=\"length\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [showFirstLastButtons]=\"showFirstLastButtons\"\n (page)=\"emitPaginator()\"\n
|
|
1975
|
-
}], propDecorators: { entitySortChange$: [{
|
|
1976
|
-
type: Input
|
|
1977
|
-
}], store: [{
|
|
1978
|
-
type: Input
|
|
1979
|
-
}], paginatorOptions: [{
|
|
1980
|
-
type: Input
|
|
1981
|
-
}], page: [{
|
|
1982
|
-
type: Output
|
|
1983
|
-
}], paginatorChange: [{
|
|
1984
|
-
type: Output
|
|
1985
|
-
}], paginator: [{
|
|
1986
|
-
type: ViewChild,
|
|
1987
|
-
args: [MatPaginator, { static: true }]
|
|
1988
|
-
}] } });
|
|
2067
|
+
args: [{ selector: 'igo-entity-table-paginator', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatPaginatorModule], template: "<mat-paginator\n [disabled]=\"disabled\"\n [hidePageSize]=\"hidePageSize\"\n [length]=\"length\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [showFirstLastButtons]=\"showFirstLastButtons\"\n (page)=\"emitPaginator()\"\n/>\n", styles: [":host ::ng-deep .mat-mdc-paginator-container{min-height:unset}\n"] }]
|
|
2068
|
+
}], propDecorators: { entitySortChange$: [{ type: i0.Input, args: [{ isSignal: true, alias: "entitySortChange$", required: false }] }], store: [{ type: i0.Input, args: [{ isSignal: true, alias: "store", required: false }] }], paginatorOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorOptions", required: false }] }], paginatorChange: [{ type: i0.Output, args: ["paginatorChange"] }], paginator: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatPaginator), { isSignal: true }] }] } });
|
|
1989
2069
|
|
|
1990
2070
|
/**
|
|
1991
2071
|
* Directive that handles an entity table row click and selection.
|
|
@@ -2004,20 +2084,20 @@ class EntityTableRowDirective {
|
|
|
2004
2084
|
/**
|
|
2005
2085
|
* Whether a row supports selection
|
|
2006
2086
|
*/
|
|
2007
|
-
selection = false;
|
|
2087
|
+
selection = input(false, ...(ngDevMode ? [{ debugName: "selection" }] : []));
|
|
2008
2088
|
/**
|
|
2009
2089
|
* Whether clicking a row should select it (if selection is true)
|
|
2010
2090
|
*/
|
|
2011
|
-
selectOnClick = true;
|
|
2091
|
+
selectOnClick = input(true, ...(ngDevMode ? [{ debugName: "selectOnClick" }] : []));
|
|
2012
2092
|
/**
|
|
2013
2093
|
* Whether the selected row should be highlighted
|
|
2014
2094
|
*/
|
|
2015
|
-
highlightSelection = true;
|
|
2095
|
+
highlightSelection = input(true, ...(ngDevMode ? [{ debugName: "highlightSelection" }] : []));
|
|
2016
2096
|
/**
|
|
2017
2097
|
* Whether a row is selected
|
|
2018
2098
|
*/
|
|
2019
2099
|
set selected(value) {
|
|
2020
|
-
if (this.selection === false) {
|
|
2100
|
+
if (this.selection() === false) {
|
|
2021
2101
|
return;
|
|
2022
2102
|
}
|
|
2023
2103
|
if (value === this._selected) {
|
|
@@ -2033,17 +2113,17 @@ class EntityTableRowDirective {
|
|
|
2033
2113
|
/**
|
|
2034
2114
|
* Scroll behavior on selection
|
|
2035
2115
|
*/
|
|
2036
|
-
scrollBehavior = EntityTableScrollBehavior.Auto;
|
|
2116
|
+
scrollBehavior = input(EntityTableScrollBehavior.Auto, ...(ngDevMode ? [{ debugName: "scrollBehavior" }] : []));
|
|
2037
2117
|
/**
|
|
2038
2118
|
* Event emitted when a row is selected
|
|
2039
2119
|
*/
|
|
2040
|
-
select =
|
|
2120
|
+
select = output();
|
|
2041
2121
|
/**
|
|
2042
2122
|
* When a row is clicked, select it if it's supported
|
|
2043
2123
|
* @ignore
|
|
2044
2124
|
*/
|
|
2045
2125
|
onClick() {
|
|
2046
|
-
if (this.selection === false || this.selectOnClick === false) {
|
|
2126
|
+
if (this.selection() === false || this.selectOnClick() === false) {
|
|
2047
2127
|
return;
|
|
2048
2128
|
}
|
|
2049
2129
|
this.toggleSelected(true);
|
|
@@ -2057,7 +2137,7 @@ class EntityTableRowDirective {
|
|
|
2057
2137
|
this._selected = selected;
|
|
2058
2138
|
if (selected === true) {
|
|
2059
2139
|
this.addCls(EntityTableRowDirective.selectedCls);
|
|
2060
|
-
if (this.highlightSelection === true) {
|
|
2140
|
+
if (this.highlightSelection() === true) {
|
|
2061
2141
|
this.addCls(EntityTableRowDirective.highlightedCls);
|
|
2062
2142
|
}
|
|
2063
2143
|
}
|
|
@@ -2091,28 +2171,18 @@ class EntityTableRowDirective {
|
|
|
2091
2171
|
removeCls(cls) {
|
|
2092
2172
|
this.renderer.removeClass(this.el.nativeElement, cls);
|
|
2093
2173
|
}
|
|
2094
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2095
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2174
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityTableRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2175
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type: EntityTableRowDirective, isStandalone: true, selector: "[igoEntityTableRow]", inputs: { selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, selectOnClick: { classPropertyName: "selectOnClick", publicName: "selectOnClick", isSignal: true, isRequired: false, transformFunction: null }, highlightSelection: { classPropertyName: "highlightSelection", publicName: "highlightSelection", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
2096
2176
|
}
|
|
2097
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityTableRowDirective, decorators: [{
|
|
2098
2178
|
type: Directive,
|
|
2099
2179
|
args: [{
|
|
2100
2180
|
selector: '[igoEntityTableRow]',
|
|
2101
2181
|
standalone: true
|
|
2102
2182
|
}]
|
|
2103
|
-
}], propDecorators: { selection: [{
|
|
2104
|
-
type: Input
|
|
2105
|
-
}], selectOnClick: [{
|
|
2183
|
+
}], propDecorators: { selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], selectOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnClick", required: false }] }], highlightSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightSelection", required: false }] }], selected: [{
|
|
2106
2184
|
type: Input
|
|
2107
|
-
}],
|
|
2108
|
-
type: Input
|
|
2109
|
-
}], selected: [{
|
|
2110
|
-
type: Input
|
|
2111
|
-
}], scrollBehavior: [{
|
|
2112
|
-
type: Input
|
|
2113
|
-
}], select: [{
|
|
2114
|
-
type: Output
|
|
2115
|
-
}], onClick: [{
|
|
2185
|
+
}], scrollBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehavior", required: false }] }], select: [{ type: i0.Output, args: ["select"] }], onClick: [{
|
|
2116
2186
|
type: HostListener,
|
|
2117
2187
|
args: ['click']
|
|
2118
2188
|
}] } });
|
|
@@ -2162,7 +2232,7 @@ class EntityTableComponent {
|
|
|
2162
2232
|
/**
|
|
2163
2233
|
* Entity store
|
|
2164
2234
|
*/
|
|
2165
|
-
store;
|
|
2235
|
+
store = input(undefined, ...(ngDevMode ? [{ debugName: "store" }] : []));
|
|
2166
2236
|
/**
|
|
2167
2237
|
* Table paginator
|
|
2168
2238
|
*/
|
|
@@ -2177,42 +2247,42 @@ class EntityTableComponent {
|
|
|
2177
2247
|
/**
|
|
2178
2248
|
* Table template
|
|
2179
2249
|
*/
|
|
2180
|
-
template;
|
|
2250
|
+
template = input(undefined, ...(ngDevMode ? [{ debugName: "template" }] : []));
|
|
2181
2251
|
/**
|
|
2182
2252
|
* Scroll behavior on selection
|
|
2183
2253
|
*/
|
|
2184
|
-
scrollBehavior = EntityTableScrollBehavior.Auto;
|
|
2254
|
+
scrollBehavior = input(EntityTableScrollBehavior.Auto, ...(ngDevMode ? [{ debugName: "scrollBehavior" }] : []));
|
|
2185
2255
|
/**
|
|
2186
2256
|
* Whether nulls should be first when sorting
|
|
2187
2257
|
*/
|
|
2188
|
-
sortNullsFirst = false;
|
|
2258
|
+
sortNullsFirst = input(false, ...(ngDevMode ? [{ debugName: "sortNullsFirst" }] : []));
|
|
2189
2259
|
/**
|
|
2190
2260
|
* Show the table paginator or not. False by default.
|
|
2191
2261
|
*/
|
|
2192
|
-
withPaginator = false;
|
|
2262
|
+
withPaginator = input(false, ...(ngDevMode ? [{ debugName: "withPaginator" }] : []));
|
|
2193
2263
|
/**
|
|
2194
2264
|
* Paginator options
|
|
2195
2265
|
*/
|
|
2196
|
-
paginatorOptions;
|
|
2266
|
+
paginatorOptions = input(undefined, ...(ngDevMode ? [{ debugName: "paginatorOptions" }] : []));
|
|
2197
2267
|
/**
|
|
2198
2268
|
* Event emitted when an entity (row) is clicked
|
|
2199
2269
|
*/
|
|
2200
|
-
entityClick =
|
|
2270
|
+
entityClick = output();
|
|
2201
2271
|
/**
|
|
2202
2272
|
* Event emitted when an entity (row) is selected
|
|
2203
2273
|
*/
|
|
2204
|
-
entitySelectChange =
|
|
2274
|
+
entitySelectChange = output();
|
|
2205
2275
|
/**
|
|
2206
2276
|
* Event emitted when the table sort is changed.
|
|
2207
2277
|
*/
|
|
2208
|
-
entitySortChange =
|
|
2278
|
+
entitySortChange = output();
|
|
2209
2279
|
/**
|
|
2210
2280
|
* Table headers
|
|
2211
2281
|
* @internal
|
|
2212
2282
|
*/
|
|
2213
2283
|
get headers() {
|
|
2214
|
-
let columns = this.template
|
|
2215
|
-
.filter((column) => column.visible !== false)
|
|
2284
|
+
let columns = this.template()
|
|
2285
|
+
.columns.filter((column) => column.visible !== false)
|
|
2216
2286
|
.map((column) => column.name);
|
|
2217
2287
|
if (this.selectionCheckbox === true) {
|
|
2218
2288
|
columns = ['selectionCheckbox'].concat(columns);
|
|
@@ -2229,33 +2299,33 @@ class EntityTableComponent {
|
|
|
2229
2299
|
* @internal
|
|
2230
2300
|
*/
|
|
2231
2301
|
get selection() {
|
|
2232
|
-
return this.template.selection || false;
|
|
2302
|
+
return this.template().selection || false;
|
|
2233
2303
|
}
|
|
2234
2304
|
/**
|
|
2235
2305
|
* Whether a selection checkbox should be displayed
|
|
2236
2306
|
* @internal
|
|
2237
2307
|
*/
|
|
2238
2308
|
get selectionCheckbox() {
|
|
2239
|
-
return this.template.selectionCheckbox || false;
|
|
2309
|
+
return this.template().selectionCheckbox || false;
|
|
2240
2310
|
}
|
|
2241
2311
|
/**
|
|
2242
2312
|
* Whether selection many entities should eb supported
|
|
2243
2313
|
* @internal
|
|
2244
2314
|
*/
|
|
2245
2315
|
get selectMany() {
|
|
2246
|
-
return this.template.selectMany || false;
|
|
2316
|
+
return this.template().selectMany || false;
|
|
2247
2317
|
}
|
|
2248
2318
|
/**
|
|
2249
2319
|
* Whether selection many entities should eb supported
|
|
2250
2320
|
* @internal
|
|
2251
2321
|
*/
|
|
2252
2322
|
get fixedHeader() {
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
: this.template.fixedHeader;
|
|
2323
|
+
const template = this.template();
|
|
2324
|
+
return template.fixedHeader === undefined ? true : template.fixedHeader;
|
|
2256
2325
|
}
|
|
2257
2326
|
get tableHeight() {
|
|
2258
|
-
|
|
2327
|
+
const template = this.template();
|
|
2328
|
+
return template.tableHeight ? template.tableHeight : 'auto';
|
|
2259
2329
|
}
|
|
2260
2330
|
constructor() {
|
|
2261
2331
|
this.dateAdapter.setLocale('fr-CA');
|
|
@@ -2267,7 +2337,9 @@ class EntityTableComponent {
|
|
|
2267
2337
|
ngOnInit() {
|
|
2268
2338
|
this.handleDatasource();
|
|
2269
2339
|
this.dataSource.paginator = this.paginator;
|
|
2270
|
-
this.store
|
|
2340
|
+
this.store()
|
|
2341
|
+
.state.change$.pipe(debounceTime(100))
|
|
2342
|
+
.subscribe(() => {
|
|
2271
2343
|
this.handleDatasource();
|
|
2272
2344
|
this.refresh();
|
|
2273
2345
|
});
|
|
@@ -2325,7 +2397,7 @@ class EntityTableComponent {
|
|
|
2325
2397
|
*/
|
|
2326
2398
|
enableEdit(record) {
|
|
2327
2399
|
const item = record.entity.properties || record.entity;
|
|
2328
|
-
this.template.columns.forEach((column) => {
|
|
2400
|
+
this.template().columns.forEach((column) => {
|
|
2329
2401
|
column.title =
|
|
2330
2402
|
column.validation?.mandatory && !column.title.includes('*')
|
|
2331
2403
|
? column.title + ' *'
|
|
@@ -2340,7 +2412,7 @@ class EntityTableComponent {
|
|
|
2340
2412
|
}
|
|
2341
2413
|
this.formGroup.setControl(column.name, this.formBuilder.control(item[key]));
|
|
2342
2414
|
}
|
|
2343
|
-
else if (column.type === 'list') {
|
|
2415
|
+
else if (isChoiceField(column) && column.type === 'list') {
|
|
2344
2416
|
if (column.multiple) {
|
|
2345
2417
|
this.formGroup.setControl(column.name, this.formBuilder.control([item[key]]));
|
|
2346
2418
|
}
|
|
@@ -2351,10 +2423,10 @@ class EntityTableComponent {
|
|
|
2351
2423
|
: this.formGroup.controls[column.name].setValue(item[key]);
|
|
2352
2424
|
}
|
|
2353
2425
|
}
|
|
2354
|
-
else if (column.type === 'autocomplete') {
|
|
2426
|
+
else if (isChoiceField(column) && column.type === 'autocomplete') {
|
|
2355
2427
|
this.formGroup.setControl(column.name, this.formBuilder.control(item[key]));
|
|
2356
2428
|
this.filteredOptions[column.name] = new Observable();
|
|
2357
|
-
this.filteredOptions[column.name] = this.formGroup.controls[column.name].valueChanges.pipe(map((value) => {
|
|
2429
|
+
this.filteredOptions[column.name] = this.formGroup.controls[column.name].valueChanges.pipe(map$1((value) => {
|
|
2358
2430
|
if (value?.length) {
|
|
2359
2431
|
return column.domainValues?.filter((option) => {
|
|
2360
2432
|
const filterNormalized = value
|
|
@@ -2414,12 +2486,12 @@ class EntityTableComponent {
|
|
|
2414
2486
|
}
|
|
2415
2487
|
handleDatasource() {
|
|
2416
2488
|
this.unsubscribeStore();
|
|
2417
|
-
this.selection$$ = this.store
|
|
2418
|
-
.manyBy$((record) => record.state.selected === true)
|
|
2489
|
+
this.selection$$ = this.store()
|
|
2490
|
+
.stateView.manyBy$((record) => record.state.selected === true)
|
|
2419
2491
|
.subscribe((records) => {
|
|
2420
2492
|
const firstSelected = records[0];
|
|
2421
|
-
const firstSelectedStateviewPosition = this.store
|
|
2422
|
-
.all()
|
|
2493
|
+
const firstSelectedStateviewPosition = this.store()
|
|
2494
|
+
.stateView.all()
|
|
2423
2495
|
.indexOf(firstSelected);
|
|
2424
2496
|
const pageMax = this.paginator
|
|
2425
2497
|
? this.paginator.pageSize * (this.paginator.pageIndex + 1)
|
|
@@ -2433,14 +2505,16 @@ class EntityTableComponent {
|
|
|
2433
2505
|
}
|
|
2434
2506
|
this.selectionState$.next(this.computeSelectionState(records));
|
|
2435
2507
|
});
|
|
2436
|
-
this.dataSource$$ = this.store
|
|
2508
|
+
this.dataSource$$ = this.store()
|
|
2509
|
+
.stateView.all$()
|
|
2510
|
+
.subscribe((all) => {
|
|
2437
2511
|
if (all[0]) {
|
|
2438
2512
|
this.enableEdit(all[0]);
|
|
2439
2513
|
}
|
|
2440
2514
|
this.dataSource.data = all.map((record) => {
|
|
2441
2515
|
return {
|
|
2442
2516
|
record,
|
|
2443
|
-
cellData: this.template.columns.reduce((cellData, column) => {
|
|
2517
|
+
cellData: this.template().columns.reduce((cellData, column) => {
|
|
2444
2518
|
const value = this.getValue(record, column);
|
|
2445
2519
|
cellData[column.name] = {
|
|
2446
2520
|
class: this.getCellClass(record, column),
|
|
@@ -2497,18 +2571,18 @@ class EntityTableComponent {
|
|
|
2497
2571
|
*/
|
|
2498
2572
|
onSort(event) {
|
|
2499
2573
|
const direction = event.direction;
|
|
2500
|
-
const column = this.template.columns.find((c) => c.name === event.active);
|
|
2574
|
+
const column = this.template().columns.find((c) => c.name === event.active);
|
|
2501
2575
|
if (direction === 'asc' || direction === 'desc') {
|
|
2502
|
-
this.store.stateView.sort({
|
|
2576
|
+
this.store().stateView.sort({
|
|
2503
2577
|
valueAccessor: (record) => this.getValue(record, column),
|
|
2504
2578
|
direction,
|
|
2505
|
-
nullsFirst: this.sortNullsFirst
|
|
2579
|
+
nullsFirst: this.sortNullsFirst()
|
|
2506
2580
|
});
|
|
2507
2581
|
this.entitySortChange.emit({ column, direction });
|
|
2508
2582
|
this.entitySortChange$.next(true);
|
|
2509
2583
|
}
|
|
2510
2584
|
else {
|
|
2511
|
-
this.store.stateView.sort(undefined);
|
|
2585
|
+
this.store().stateView.sort(undefined);
|
|
2512
2586
|
}
|
|
2513
2587
|
}
|
|
2514
2588
|
/**
|
|
@@ -2517,7 +2591,7 @@ class EntityTableComponent {
|
|
|
2517
2591
|
* @internal
|
|
2518
2592
|
*/
|
|
2519
2593
|
onRowClick(record) {
|
|
2520
|
-
this.lastRecordCheckedKey = this.store.stateView.getKey(record);
|
|
2594
|
+
this.lastRecordCheckedKey = this.store().stateView.getKey(record);
|
|
2521
2595
|
this.entityClick.emit(record.entity);
|
|
2522
2596
|
}
|
|
2523
2597
|
/**
|
|
@@ -2532,7 +2606,7 @@ class EntityTableComponent {
|
|
|
2532
2606
|
return;
|
|
2533
2607
|
}
|
|
2534
2608
|
const entity = record.entity;
|
|
2535
|
-
this.store.state.update(entity, { selected: true }, true);
|
|
2609
|
+
this.store().state.update(entity, { selected: true }, true);
|
|
2536
2610
|
this.entitySelectChange.emit({ added: [entity] });
|
|
2537
2611
|
}
|
|
2538
2612
|
/**
|
|
@@ -2544,9 +2618,9 @@ class EntityTableComponent {
|
|
|
2544
2618
|
if (this.selection === false) {
|
|
2545
2619
|
return;
|
|
2546
2620
|
}
|
|
2547
|
-
const entities = this.store.view.all();
|
|
2621
|
+
const entities = this.store().view.all();
|
|
2548
2622
|
this.entitySelectChange.emit({ added: [entities] });
|
|
2549
|
-
this.store.state.updateMany(entities, { selected: toggle });
|
|
2623
|
+
this.store().state.updateMany(entities, { selected: toggle });
|
|
2550
2624
|
}
|
|
2551
2625
|
/**
|
|
2552
2626
|
* When an entity is toggled, select or unselect it in the store. On select,
|
|
@@ -2561,11 +2635,11 @@ class EntityTableComponent {
|
|
|
2561
2635
|
}
|
|
2562
2636
|
const entity = record.entity;
|
|
2563
2637
|
const exclusive = toggle === true && !this.selectMany;
|
|
2564
|
-
this.store.state.update(entity, { selected: toggle }, exclusive);
|
|
2638
|
+
this.store().state.update(entity, { selected: toggle }, exclusive);
|
|
2565
2639
|
if (toggle === true) {
|
|
2566
2640
|
this.entitySelectChange.emit({ added: [entity] });
|
|
2567
2641
|
}
|
|
2568
|
-
this.lastRecordCheckedKey = this.store.stateView.getKey(record);
|
|
2642
|
+
this.lastRecordCheckedKey = this.store().stateView.getKey(record);
|
|
2569
2643
|
}
|
|
2570
2644
|
/**
|
|
2571
2645
|
* When an entity is toggled, select or unselect it in the store. On select,
|
|
@@ -2590,18 +2664,18 @@ class EntityTableComponent {
|
|
|
2590
2664
|
window.getSelection().removeAllRanges();
|
|
2591
2665
|
window.getSelection().addRange(range);
|
|
2592
2666
|
event.stopImmediatePropagation();
|
|
2593
|
-
const records = this.store.stateView.all();
|
|
2667
|
+
const records = this.store().stateView.all();
|
|
2594
2668
|
const recordIndex = records.indexOf(record);
|
|
2595
|
-
const lastRecordChecked = this.store.stateView.get(this.lastRecordCheckedKey);
|
|
2669
|
+
const lastRecordChecked = this.store().stateView.get(this.lastRecordCheckedKey);
|
|
2596
2670
|
const lastRecordIndex = records.indexOf(lastRecordChecked);
|
|
2597
2671
|
const indexes = [recordIndex, lastRecordIndex];
|
|
2598
2672
|
const selectRecords = records.slice(Math.min(...indexes), Math.max(...indexes) + 1);
|
|
2599
2673
|
const entities = selectRecords.map((_record) => _record.entity);
|
|
2600
|
-
this.store.state.updateMany(entities, { selected: toggle });
|
|
2674
|
+
this.store().state.updateMany(entities, { selected: toggle });
|
|
2601
2675
|
if (toggle === true) {
|
|
2602
2676
|
this.entitySelectChange.emit({ added: entities });
|
|
2603
2677
|
}
|
|
2604
|
-
this.lastRecordCheckedKey = this.store.stateView.getKey(record);
|
|
2678
|
+
this.lastRecordCheckedKey = this.store().stateView.getKey(record);
|
|
2605
2679
|
}
|
|
2606
2680
|
/**
|
|
2607
2681
|
* Compute the selection state
|
|
@@ -2613,7 +2687,7 @@ class EntityTableComponent {
|
|
|
2613
2687
|
const selectionCount = selectedRecords.length;
|
|
2614
2688
|
return selectionCount === 0
|
|
2615
2689
|
? states.None
|
|
2616
|
-
: selectionCount === this.store.stateView.count
|
|
2690
|
+
: selectionCount === this.store().stateView.count
|
|
2617
2691
|
? states.All
|
|
2618
2692
|
: states.Some;
|
|
2619
2693
|
}
|
|
@@ -2626,7 +2700,8 @@ class EntityTableComponent {
|
|
|
2626
2700
|
columnIsSortable(column) {
|
|
2627
2701
|
let sortable = column.sort;
|
|
2628
2702
|
if (sortable === undefined) {
|
|
2629
|
-
|
|
2703
|
+
const template = this.template();
|
|
2704
|
+
sortable = template.sort === undefined ? false : template.sort;
|
|
2630
2705
|
}
|
|
2631
2706
|
return sortable;
|
|
2632
2707
|
}
|
|
@@ -2670,10 +2745,11 @@ class EntityTableComponent {
|
|
|
2670
2745
|
if (column.valueAccessor !== undefined) {
|
|
2671
2746
|
return column.valueAccessor(entity, record);
|
|
2672
2747
|
}
|
|
2673
|
-
|
|
2674
|
-
|
|
2748
|
+
const template = this.template();
|
|
2749
|
+
if (template.valueAccessor !== undefined) {
|
|
2750
|
+
return template.valueAccessor(entity, column.name, record);
|
|
2675
2751
|
}
|
|
2676
|
-
value = this.store.getProperty(entity, column.name);
|
|
2752
|
+
value = this.store().getProperty(entity, column.name);
|
|
2677
2753
|
if (column.type === 'boolean') {
|
|
2678
2754
|
if (value === undefined || value === null || value === '') {
|
|
2679
2755
|
value = false;
|
|
@@ -2690,7 +2766,10 @@ class EntityTableComponent {
|
|
|
2690
2766
|
value = value ? '✓' : ''; // check mark
|
|
2691
2767
|
}
|
|
2692
2768
|
}
|
|
2693
|
-
else if (column
|
|
2769
|
+
else if (isChoiceField(column) &&
|
|
2770
|
+
column.type === 'list' &&
|
|
2771
|
+
value &&
|
|
2772
|
+
column.domainValues) {
|
|
2694
2773
|
const entity = record.entity;
|
|
2695
2774
|
if (column.multiple) {
|
|
2696
2775
|
let list_id;
|
|
@@ -2731,7 +2810,10 @@ class EntityTableComponent {
|
|
|
2731
2810
|
}
|
|
2732
2811
|
}
|
|
2733
2812
|
}
|
|
2734
|
-
else if (column
|
|
2813
|
+
else if (isChoiceField(column) &&
|
|
2814
|
+
column.type === 'autocomplete' &&
|
|
2815
|
+
value &&
|
|
2816
|
+
column.domainValues) {
|
|
2735
2817
|
const entity = record.entity;
|
|
2736
2818
|
if (!this.isEdition(record) && column.linkColumnForce) {
|
|
2737
2819
|
value =
|
|
@@ -2814,7 +2896,7 @@ class EntityTableComponent {
|
|
|
2814
2896
|
* @internal
|
|
2815
2897
|
*/
|
|
2816
2898
|
getHeaderClass() {
|
|
2817
|
-
const func = this.template.headerClassFunc;
|
|
2899
|
+
const func = this.template().headerClassFunc;
|
|
2818
2900
|
if (func instanceof Function) {
|
|
2819
2901
|
return func();
|
|
2820
2902
|
}
|
|
@@ -2828,7 +2910,7 @@ class EntityTableComponent {
|
|
|
2828
2910
|
*/
|
|
2829
2911
|
getRowClass(record) {
|
|
2830
2912
|
const entity = record.entity;
|
|
2831
|
-
const func = this.template.rowClassFunc;
|
|
2913
|
+
const func = this.template().rowClassFunc;
|
|
2832
2914
|
if (func instanceof Function) {
|
|
2833
2915
|
return func(entity, record);
|
|
2834
2916
|
}
|
|
@@ -2844,7 +2926,7 @@ class EntityTableComponent {
|
|
|
2844
2926
|
getCellClass(record, column) {
|
|
2845
2927
|
const entity = record.entity;
|
|
2846
2928
|
const cls = {};
|
|
2847
|
-
const tableFunc = this.template.cellClassFunc;
|
|
2929
|
+
const tableFunc = this.template().cellClassFunc;
|
|
2848
2930
|
if (tableFunc instanceof Function) {
|
|
2849
2931
|
Object.assign(cls, tableFunc(entity, column, record));
|
|
2850
2932
|
}
|
|
@@ -2875,14 +2957,14 @@ class EntityTableComponent {
|
|
|
2875
2957
|
}
|
|
2876
2958
|
return column;
|
|
2877
2959
|
}
|
|
2878
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2879
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2960
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2961
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: EntityTableComponent, isStandalone: true, selector: "igo-entity-table", inputs: { store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: false, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "scrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, sortNullsFirst: { classPropertyName: "sortNullsFirst", publicName: "sortNullsFirst", isSignal: true, isRequired: false, transformFunction: null }, withPaginator: { classPropertyName: "withPaginator", publicName: "withPaginator", isSignal: true, isRequired: false, transformFunction: null }, paginatorOptions: { classPropertyName: "paginatorOptions", publicName: "paginatorOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entityClick: "entityClick", entitySelectChange: "entitySelectChange", entitySortChange: "entitySortChange" }, providers: [
|
|
2880
2962
|
{ provide: MatFormFieldControl, useExisting: EntityTableComponent },
|
|
2881
2963
|
provideMomentDateAdapter()
|
|
2882
|
-
], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-container\" [ngStyle]=\"{ height: tableHeight }\">\n <table\n id=\"currentWorkspaceTable\"\n mat-table\n matSort\n [ngClass]=\"getTableClass()\"\n [dataSource]=\"dataSource\"\n [trackBy]=\"getTrackByFunction()\"\n (matSortChange)=\"onSort($event)\"\n >\n <ng-container matColumnDef=\"selectionCheckbox\" class=\"mat-cell-checkbox\">\n <th mat-header-cell *matHeaderCellDef>\n @if (selectMany) {\n @let selectionState = selectionState$ | async;\n @if (selectionState) {\n <mat-checkbox\n (change)=\"onToggleRows($event.checked)\"\n [checked]=\"selectionState === entityTableSelectionState.All\"\n [indeterminate]=\"\n selectionState === entityTableSelectionState.Some\n \"\n >\n </mat-checkbox>\n }\n }\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (mousedown)=\"$event.shiftKey ? $event.preventDefault() : null\"\n (click)=\"\n $event.shiftKey\n ? onShiftToggleRow(!rowIsSelected(row.record), row.record, $event)\n : $event.stopPropagation()\n \"\n (change)=\"onToggleRow($event.checked, row.record)\"\n [checked]=\"rowIsSelected(row.record)\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n @for (column of template.columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (columnIsSortable(column)) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n } @else {\n <th\n mat-header-cell\n *matHeaderCellDef\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n }\n\n @let columnRenderer = getColumnRenderer(column);\n @if (columnRenderer) {\n @switch (columnRenderer) {\n @case (entityTableColumnRenderer.HTML) {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"row.cellData[column.name].value\"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{ 'igo.geo.targetHtmlUrl' | translate }} </span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.UnsanitizedHTML) {\n <ng-container *matCellDef=\"let row\">\n @if (isEdition(row.record)) {\n <td\n mat-cell\n class=\"mat-cell-text edition\"\n [formGroup]=\"formGroup\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @switch (column.type) {\n @case ('date') {\n <div class=\"date-picker\">\n <mat-datepicker-toggle\n matSuffix\n [for]=\"picker\"\n ></mat-datepicker-toggle>\n <input\n matInput\n [matDatepicker]=\"picker\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (dateChange)=\"\n onDateChange(column.name, row.record, $event)\n \"\n />\n <mat-datepicker #picker></mat-datepicker>\n </div>\n }\n @case ('time') {\n <input\n matInput\n type=\"time\"\n [formControlName]=\"column.name\"\n step=\"900\"\n (focus)=\"column.onFocus($event)\"\n (keypress)=\"column.onChange($event)\"\n (blur)=\"column.onBlur($event)\"\n />\n }\n @case ('number') {\n <input\n matInput\n type=\"number\"\n class=\"class_number_edition\"\n [formControlName]=\"column.name\"\n step=\"{{ column.step }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n min=\"{{\n getValidationAttributeValue(column, 'minValue')\n }}\"\n max=\"{{\n getValidationAttributeValue(column, 'maxValue')\n }}\"\n />\n }\n @case ('boolean') {\n <mat-checkbox\n [formControlName]=\"column.name\"\n [checked]=\"row.cellData[column.name].value\"\n (change)=\"\n onBooleanValueChange(\n column.name,\n row.record,\n $event\n )\n \"\n ></mat-checkbox>\n }\n @case ('list') {\n <mat-select\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n [formControlName]=\"column.name\"\n [multiple]=\"column.multiple\"\n (selectionChange)=\"\n onSelectValueChange(column.name, row.record, $event)\n \"\n [value]=\"row.cellData[column.name].value\"\n >\n <mat-option\n *ngFor=\"let option of column.domainValues\"\n [value]=\"option.id\"\n [disabled]=\"option.disabled\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n }\n @case ('autocomplete') {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n [matAutocomplete]=\"auto\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"\n onAutocompleteValueChange(\n column,\n row.record,\n $event\n )\n \"\n panelWidth=\"430px\"\n >\n <mat-option\n *ngFor=\"\n let option of filteredOptions[column.name] | async\n \"\n [value]=\"option.id\"\n >\n {{ option.value }}\n </mat-option>\n </mat-autocomplete>\n }\n @default {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n />\n }\n }\n </td>\n } @else {\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"\n row.cellData[column.name].value | sanitizeHtml\n \"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n ><span\n >{{ 'igo.geo.targetHtmlUrl' | translate }}\n </span>\n }\n >\n </a>\n </td>\n }\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.Icon) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @if (column.onClick) {\n <mat-icon (click)=\"column.onClick($event)\">{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n } @else {\n <mat-icon>{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n }\n </td>\n }\n @case (entityTableColumnRenderer.ButtonGroup) {\n <ng-container *matCellDef=\"let row\">\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @for (\n button of row.cellData[column.name].value;\n track button\n ) {\n @if (\n isEdition(row.record) === button.editMode ||\n button.editMode === undefined\n ) {\n <span>\n @if (button.style === 'mat-icon-button') {\n <button\n igoStopPropagation\n mat-icon-button\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n igoStopPropagation\n mat-mini-fab\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n }\n </span>\n }\n }\n </td>\n </ng-container>\n }\n @default {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n {{ row.cellData[column.name].value }}\n </td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{\n 'igo.common.entity-table.targetHtmlUrl' | translate\n }}</span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n }\n }\n </ng-container>\n }\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"headers; sticky: fixedHeader\"\n [ngClass]=\"getHeaderClass()\"\n ></tr>\n <tr\n mat-row\n igoEntityTableRow\n *matRowDef=\"let row; columns: headers\"\n [scrollBehavior]=\"scrollBehavior\"\n [ngClass]=\"getRowClass(row.record)\"\n [selection]=\"selection\"\n [selected]=\"rowIsSelected(row.record)\"\n (select)=\"onRowSelect(row.record)\"\n (click)=\"onRowClick(row.record)\"\n ></tr>\n </table>\n @if (withPaginator) {\n <igo-entity-table-paginator\n [store]=\"store\"\n [paginatorOptions]=\"paginatorOptions\"\n [entitySortChange$]=\"entitySortChange$\"\n (paginatorChange)=\"paginatorChange($event)\"\n >\n </igo-entity-table-paginator>\n }\n</div>\n", styles: [":host{width:100%;height:100%;display:block;--mat-table-header-container-height: 52px}:host.table-compact tr.mat-mdc-header-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:36px}:host.table-compact tr.mat-mdc-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:28px}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.mat-cell-text{overflow:hidden;word-wrap:break-word}table.igo-entity-table-with-selection tr:hover{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd;cursor:pointer}table button{margin:7px}.class_hidden{visibility:hidden}.class_display_none{display:none}.class_boolean,.class_icon,.class_number{text-align:center;padding-right:35px!important}.class_string,.class_text,.class_number_edition{text-align:left}td.edition{background:#a6a6a633}input{border-bottom:1px solid darkgrey}table.igo-entity-table-with-selection tr.igo-entity-table-row-highlighted{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"], dependencies: [{ kind: "component", type: EntityTablePaginatorComponent, selector: "igo-entity-table-paginator", inputs: ["entitySortChange$", "store", "paginatorOptions"], outputs: ["page", "paginatorChange"] }, { kind: "directive", type: EntityTableRowDirective, selector: "[igoEntityTableRow]", inputs: ["selection", "selectOnClick", "highlightSelection", "selected", "scrollBehavior"], outputs: ["select"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: ImageErrorDirective, selector: "[igoImageError]", inputs: ["errorImageUrl", "hideError"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: // For the DateAdapter provider
|
|
2964
|
+
], usesOnChanges: true, ngImport: i0, template: "<div class=\"table-container\" [ngStyle]=\"{ height: tableHeight }\">\n <table\n id=\"currentWorkspaceTable\"\n mat-table\n matSort\n [ngClass]=\"getTableClass()\"\n [dataSource]=\"dataSource\"\n [trackBy]=\"getTrackByFunction()\"\n (matSortChange)=\"onSort($event)\"\n >\n <ng-container matColumnDef=\"selectionCheckbox\" class=\"mat-cell-checkbox\">\n <th mat-header-cell *matHeaderCellDef>\n @if (selectMany) {\n @let selectionState = selectionState$ | async;\n @if (selectionState) {\n <mat-checkbox\n (change)=\"onToggleRows($event.checked)\"\n [checked]=\"selectionState === entityTableSelectionState.All\"\n [indeterminate]=\"\n selectionState === entityTableSelectionState.Some\n \"\n />\n }\n }\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (mousedown)=\"$event.shiftKey ? $event.preventDefault() : null\"\n (click)=\"\n $event.shiftKey\n ? onShiftToggleRow(!rowIsSelected(row.record), row.record, $event)\n : $event.stopPropagation()\n \"\n (change)=\"onToggleRow($event.checked, row.record)\"\n [checked]=\"rowIsSelected(row.record)\"\n />\n </td>\n </ng-container>\n\n @for (column of template().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (columnIsSortable(column)) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n } @else {\n <th\n mat-header-cell\n *matHeaderCellDef\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n }\n\n @let columnRenderer = getColumnRenderer(column);\n @if (columnRenderer) {\n @switch (columnRenderer) {\n @case (entityTableColumnRenderer.HTML) {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"row.cellData[column.name].value\"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{ 'igo.geo.targetHtmlUrl' | translate }} </span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.UnsanitizedHTML) {\n <ng-container *matCellDef=\"let row\">\n @if (isEdition(row.record)) {\n <td\n mat-cell\n class=\"mat-cell-text edition\"\n [formGroup]=\"formGroup\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @switch (column.type) {\n @case ('date') {\n <div class=\"date-picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\" />\n <input\n matInput\n [matDatepicker]=\"picker\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (dateChange)=\"\n onDateChange(column.name, row.record, $event)\n \"\n />\n <mat-datepicker #picker />\n </div>\n }\n @case ('time') {\n <input\n matInput\n type=\"time\"\n [formControlName]=\"column.name\"\n step=\"900\"\n (focus)=\"column.onFocus($event)\"\n (keypress)=\"column.onChange($event)\"\n (blur)=\"column.onBlur($event)\"\n />\n }\n @case ('number') {\n <input\n matInput\n type=\"number\"\n class=\"class_number_edition\"\n [formControlName]=\"column.name\"\n step=\"{{ column.step }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n min=\"{{\n getValidationAttributeValue(column, 'minValue')\n }}\"\n max=\"{{\n getValidationAttributeValue(column, 'maxValue')\n }}\"\n />\n }\n @case ('boolean') {\n <mat-checkbox\n [formControlName]=\"column.name\"\n [checked]=\"row.cellData[column.name].value\"\n (change)=\"\n onBooleanValueChange(\n column.name,\n row.record,\n $event\n )\n \"\n />\n }\n @case ('list') {\n <mat-select\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n [formControlName]=\"column.name\"\n [multiple]=\"column.multiple\"\n (selectionChange)=\"\n onSelectValueChange(column.name, row.record, $event)\n \"\n [value]=\"row.cellData[column.name].value\"\n >\n <mat-option\n *ngFor=\"let option of column.domainValues\"\n [value]=\"option.id\"\n [disabled]=\"option.disabled\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n }\n @case ('autocomplete') {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n [matAutocomplete]=\"auto\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"\n onAutocompleteValueChange(\n column,\n row.record,\n $event\n )\n \"\n panelWidth=\"430px\"\n >\n <mat-option\n *ngFor=\"\n let option of filteredOptions[column.name] | async\n \"\n [value]=\"option.id\"\n >\n {{ option.value }}\n </mat-option>\n </mat-autocomplete>\n }\n @default {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n />\n }\n }\n </td>\n } @else {\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"\n row.cellData[column.name].value | sanitizeHtml\n \"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n ><span\n >{{ 'igo.geo.targetHtmlUrl' | translate }}\n </span>\n }\n >\n </a>\n </td>\n }\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.Icon) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @if (column.onClick) {\n <mat-icon (click)=\"column.onClick($event)\">{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n } @else {\n <mat-icon>{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n }\n </td>\n }\n @case (entityTableColumnRenderer.ButtonGroup) {\n <ng-container *matCellDef=\"let row\">\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @for (\n button of row.cellData[column.name].value;\n track button\n ) {\n @if (\n isEdition(row.record) === button.editMode ||\n button.editMode === undefined\n ) {\n <span>\n @if (button.style === 'mat-icon-button') {\n <button\n igoStopPropagation\n mat-icon-button\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n igoStopPropagation\n mat-mini-fab\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n }\n </span>\n }\n }\n </td>\n </ng-container>\n }\n @default {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n {{ row.cellData[column.name].value }}\n </td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{\n 'igo.common.entity-table.targetHtmlUrl' | translate\n }}</span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n }\n }\n </ng-container>\n }\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"headers; sticky: fixedHeader\"\n [ngClass]=\"getHeaderClass()\"\n ></tr>\n <tr\n mat-row\n igoEntityTableRow\n *matRowDef=\"let row; columns: headers\"\n [scrollBehavior]=\"scrollBehavior()\"\n [ngClass]=\"getRowClass(row.record)\"\n [selection]=\"selection\"\n [selected]=\"rowIsSelected(row.record)\"\n (select)=\"onRowSelect(row.record)\"\n (click)=\"onRowClick(row.record)\"\n ></tr>\n </table>\n @if (withPaginator()) {\n <igo-entity-table-paginator\n [store]=\"store()\"\n [paginatorOptions]=\"paginatorOptions()\"\n [entitySortChange$]=\"entitySortChange$\"\n (paginatorChange)=\"paginatorChange($event)\"\n />\n }\n</div>\n", styles: [":host{width:100%;height:100%;display:block;--mat-table-header-container-height: 52px}:host.table-compact tr.mat-mdc-header-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:36px}:host.table-compact tr.mat-mdc-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:28px}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.mat-cell-text{overflow:hidden;word-wrap:break-word}table.igo-entity-table-with-selection tr:hover{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd;cursor:pointer}table button{margin:7px}.class_hidden{visibility:hidden}.class_display_none{display:none}.class_boolean,.class_icon,.class_number{text-align:center;padding-right:35px!important}.class_string,.class_text,.class_number_edition{text-align:left}td.edition{background:#a6a6a633}input{border-bottom:1px solid darkgrey}table.igo-entity-table-with-selection tr.igo-entity-table-row-highlighted{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"], dependencies: [{ kind: "component", type: EntityTablePaginatorComponent, selector: "igo-entity-table-paginator", inputs: ["entitySortChange$", "store", "paginatorOptions"], outputs: ["paginatorChange"] }, { kind: "directive", type: EntityTableRowDirective, selector: "[igoEntityTableRow]", inputs: ["selection", "selectOnClick", "highlightSelection", "selected", "scrollBehavior"], outputs: ["select"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: ImageErrorDirective, selector: "[igoImageError]", inputs: ["errorImageUrl", "hideError"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i9.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: // For the DateAdapter provider
|
|
2883
2965
|
MatOptionModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i11.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i11.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i11.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }, { kind: "pipe", type: i13.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2884
2966
|
}
|
|
2885
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: EntityTableComponent, decorators: [{
|
|
2886
2968
|
type: Component,
|
|
2887
2969
|
args: [{ selector: 'igo-entity-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2888
2970
|
{ provide: MatFormFieldControl, useExisting: EntityTableComponent },
|
|
@@ -2913,38 +2995,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2913
2995
|
SecureImagePipe,
|
|
2914
2996
|
StopPropagationDirective,
|
|
2915
2997
|
IgoLanguageModule
|
|
2916
|
-
], template: "<div class=\"table-container\" [ngStyle]=\"{ height: tableHeight }\">\n <table\n id=\"currentWorkspaceTable\"\n mat-table\n matSort\n [ngClass]=\"getTableClass()\"\n [dataSource]=\"dataSource\"\n [trackBy]=\"getTrackByFunction()\"\n (matSortChange)=\"onSort($event)\"\n >\n <ng-container matColumnDef=\"selectionCheckbox\" class=\"mat-cell-checkbox\">\n <th mat-header-cell *matHeaderCellDef>\n @if (selectMany) {\n @let selectionState = selectionState$ | async;\n @if (selectionState) {\n <mat-checkbox\n (change)=\"onToggleRows($event.checked)\"\n [checked]=\"selectionState === entityTableSelectionState.All\"\n [indeterminate]=\"\n selectionState === entityTableSelectionState.Some\n \"\n >\n </mat-checkbox>\n }\n }\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (mousedown)=\"$event.shiftKey ? $event.preventDefault() : null\"\n (click)=\"\n $event.shiftKey\n ? onShiftToggleRow(!rowIsSelected(row.record), row.record, $event)\n : $event.stopPropagation()\n \"\n (change)=\"onToggleRow($event.checked, row.record)\"\n [checked]=\"rowIsSelected(row.record)\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n @for (column of template.columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (columnIsSortable(column)) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n } @else {\n <th\n mat-header-cell\n *matHeaderCellDef\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n }\n\n @let columnRenderer = getColumnRenderer(column);\n @if (columnRenderer) {\n @switch (columnRenderer) {\n @case (entityTableColumnRenderer.HTML) {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"row.cellData[column.name].value\"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{ 'igo.geo.targetHtmlUrl' | translate }} </span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.UnsanitizedHTML) {\n <ng-container *matCellDef=\"let row\">\n @if (isEdition(row.record)) {\n <td\n mat-cell\n class=\"mat-cell-text edition\"\n [formGroup]=\"formGroup\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @switch (column.type) {\n @case ('date') {\n <div class=\"date-picker\">\n <mat-datepicker-toggle\n matSuffix\n [for]=\"picker\"\n ></mat-datepicker-toggle>\n <input\n matInput\n [matDatepicker]=\"picker\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (dateChange)=\"\n onDateChange(column.name, row.record, $event)\n \"\n />\n <mat-datepicker #picker></mat-datepicker>\n </div>\n }\n @case ('time') {\n <input\n matInput\n type=\"time\"\n [formControlName]=\"column.name\"\n step=\"900\"\n (focus)=\"column.onFocus($event)\"\n (keypress)=\"column.onChange($event)\"\n (blur)=\"column.onBlur($event)\"\n />\n }\n @case ('number') {\n <input\n matInput\n type=\"number\"\n class=\"class_number_edition\"\n [formControlName]=\"column.name\"\n step=\"{{ column.step }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n min=\"{{\n getValidationAttributeValue(column, 'minValue')\n }}\"\n max=\"{{\n getValidationAttributeValue(column, 'maxValue')\n }}\"\n />\n }\n @case ('boolean') {\n <mat-checkbox\n [formControlName]=\"column.name\"\n [checked]=\"row.cellData[column.name].value\"\n (change)=\"\n onBooleanValueChange(\n column.name,\n row.record,\n $event\n )\n \"\n ></mat-checkbox>\n }\n @case ('list') {\n <mat-select\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n [formControlName]=\"column.name\"\n [multiple]=\"column.multiple\"\n (selectionChange)=\"\n onSelectValueChange(column.name, row.record, $event)\n \"\n [value]=\"row.cellData[column.name].value\"\n >\n <mat-option\n *ngFor=\"let option of column.domainValues\"\n [value]=\"option.id\"\n [disabled]=\"option.disabled\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n }\n @case ('autocomplete') {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n [matAutocomplete]=\"auto\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"\n onAutocompleteValueChange(\n column,\n row.record,\n $event\n )\n \"\n panelWidth=\"430px\"\n >\n <mat-option\n *ngFor=\"\n let option of filteredOptions[column.name] | async\n \"\n [value]=\"option.id\"\n >\n {{ option.value }}\n </mat-option>\n </mat-autocomplete>\n }\n @default {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n />\n }\n }\n </td>\n } @else {\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"\n row.cellData[column.name].value | sanitizeHtml\n \"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n ><span\n >{{ 'igo.geo.targetHtmlUrl' | translate }}\n </span>\n }\n >\n </a>\n </td>\n }\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.Icon) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @if (column.onClick) {\n <mat-icon (click)=\"column.onClick($event)\">{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n } @else {\n <mat-icon>{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n }\n </td>\n }\n @case (entityTableColumnRenderer.ButtonGroup) {\n <ng-container *matCellDef=\"let row\">\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @for (\n button of row.cellData[column.name].value;\n track button\n ) {\n @if (\n isEdition(row.record) === button.editMode ||\n button.editMode === undefined\n ) {\n <span>\n @if (button.style === 'mat-icon-button') {\n <button\n igoStopPropagation\n mat-icon-button\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n igoStopPropagation\n mat-mini-fab\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n }\n </span>\n }\n }\n </td>\n </ng-container>\n }\n @default {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n {{ row.cellData[column.name].value }}\n </td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{\n 'igo.common.entity-table.targetHtmlUrl' | translate\n }}</span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n }\n }\n </ng-container>\n }\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"headers; sticky: fixedHeader\"\n [ngClass]=\"getHeaderClass()\"\n ></tr>\n <tr\n mat-row\n igoEntityTableRow\n *matRowDef=\"let row; columns: headers\"\n [scrollBehavior]=\"scrollBehavior\"\n [ngClass]=\"getRowClass(row.record)\"\n [selection]=\"selection\"\n [selected]=\"rowIsSelected(row.record)\"\n (select)=\"onRowSelect(row.record)\"\n (click)=\"onRowClick(row.record)\"\n ></tr>\n </table>\n @if (withPaginator) {\n <igo-entity-table-paginator\n [store]=\"store\"\n [paginatorOptions]=\"paginatorOptions\"\n [entitySortChange$]=\"entitySortChange$\"\n (paginatorChange)=\"paginatorChange($event)\"\n >\n </igo-entity-table-paginator>\n }\n</div>\n", styles: [":host{width:100%;height:100%;display:block;--mat-table-header-container-height: 52px}:host.table-compact tr.mat-mdc-header-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:36px}:host.table-compact tr.mat-mdc-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:28px}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.mat-cell-text{overflow:hidden;word-wrap:break-word}table.igo-entity-table-with-selection tr:hover{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd;cursor:pointer}table button{margin:7px}.class_hidden{visibility:hidden}.class_display_none{display:none}.class_boolean,.class_icon,.class_number{text-align:center;padding-right:35px!important}.class_string,.class_text,.class_number_edition{text-align:left}td.edition{background:#a6a6a633}input{border-bottom:1px solid darkgrey}table.igo-entity-table-with-selection tr.igo-entity-table-row-highlighted{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"] }]
|
|
2917
|
-
}], ctorParameters: () => [], propDecorators: { store: [{
|
|
2998
|
+
], template: "<div class=\"table-container\" [ngStyle]=\"{ height: tableHeight }\">\n <table\n id=\"currentWorkspaceTable\"\n mat-table\n matSort\n [ngClass]=\"getTableClass()\"\n [dataSource]=\"dataSource\"\n [trackBy]=\"getTrackByFunction()\"\n (matSortChange)=\"onSort($event)\"\n >\n <ng-container matColumnDef=\"selectionCheckbox\" class=\"mat-cell-checkbox\">\n <th mat-header-cell *matHeaderCellDef>\n @if (selectMany) {\n @let selectionState = selectionState$ | async;\n @if (selectionState) {\n <mat-checkbox\n (change)=\"onToggleRows($event.checked)\"\n [checked]=\"selectionState === entityTableSelectionState.All\"\n [indeterminate]=\"\n selectionState === entityTableSelectionState.Some\n \"\n />\n }\n }\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (mousedown)=\"$event.shiftKey ? $event.preventDefault() : null\"\n (click)=\"\n $event.shiftKey\n ? onShiftToggleRow(!rowIsSelected(row.record), row.record, $event)\n : $event.stopPropagation()\n \"\n (change)=\"onToggleRow($event.checked, row.record)\"\n [checked]=\"rowIsSelected(row.record)\"\n />\n </td>\n </ng-container>\n\n @for (column of template().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (columnIsSortable(column)) {\n <th\n mat-header-cell\n *matHeaderCellDef\n mat-sort-header\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n } @else {\n <th\n mat-header-cell\n *matHeaderCellDef\n [matTooltip]=\"column.tooltip ? column.tooltip : undefined\"\n >\n {{ column.title }}\n </th>\n }\n\n @let columnRenderer = getColumnRenderer(column);\n @if (columnRenderer) {\n @switch (columnRenderer) {\n @case (entityTableColumnRenderer.HTML) {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"row.cellData[column.name].value\"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{ 'igo.geo.targetHtmlUrl' | translate }} </span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.UnsanitizedHTML) {\n <ng-container *matCellDef=\"let row\">\n @if (isEdition(row.record)) {\n <td\n mat-cell\n class=\"mat-cell-text edition\"\n [formGroup]=\"formGroup\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @switch (column.type) {\n @case ('date') {\n <div class=\"date-picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\" />\n <input\n matInput\n [matDatepicker]=\"picker\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (dateChange)=\"\n onDateChange(column.name, row.record, $event)\n \"\n />\n <mat-datepicker #picker />\n </div>\n }\n @case ('time') {\n <input\n matInput\n type=\"time\"\n [formControlName]=\"column.name\"\n step=\"900\"\n (focus)=\"column.onFocus($event)\"\n (keypress)=\"column.onChange($event)\"\n (blur)=\"column.onBlur($event)\"\n />\n }\n @case ('number') {\n <input\n matInput\n type=\"number\"\n class=\"class_number_edition\"\n [formControlName]=\"column.name\"\n step=\"{{ column.step }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n min=\"{{\n getValidationAttributeValue(column, 'minValue')\n }}\"\n max=\"{{\n getValidationAttributeValue(column, 'maxValue')\n }}\"\n />\n }\n @case ('boolean') {\n <mat-checkbox\n [formControlName]=\"column.name\"\n [checked]=\"row.cellData[column.name].value\"\n (change)=\"\n onBooleanValueChange(\n column.name,\n row.record,\n $event\n )\n \"\n />\n }\n @case ('list') {\n <mat-select\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n [formControlName]=\"column.name\"\n [multiple]=\"column.multiple\"\n (selectionChange)=\"\n onSelectValueChange(column.name, row.record, $event)\n \"\n [value]=\"row.cellData[column.name].value\"\n >\n <mat-option\n *ngFor=\"let option of column.domainValues\"\n [value]=\"option.id\"\n [disabled]=\"option.disabled\"\n >\n {{ option.value }}\n </mat-option>\n </mat-select>\n }\n @case ('autocomplete') {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n [matAutocomplete]=\"auto\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n value=\"{{ row.cellData[column.name].value }}\"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"\n onAutocompleteValueChange(\n column,\n row.record,\n $event\n )\n \"\n panelWidth=\"430px\"\n >\n <mat-option\n *ngFor=\"\n let option of filteredOptions[column.name] | async\n \"\n [value]=\"option.id\"\n >\n {{ option.value }}\n </mat-option>\n </mat-autocomplete>\n }\n @default {\n <input\n matInput\n type=\"text\"\n [formControlName]=\"column.name\"\n value=\"{{ row.cellData[column.name].value }}\"\n (input)=\"\n onValueChange(column.name, row.record, $event)\n \"\n readonly=\"{{\n getValidationAttributeValue(column, 'readonly')\n }}\"\n required=\"{{\n getValidationAttributeValue(column, 'mandatory')\n }}\"\n />\n }\n }\n </td>\n } @else {\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n [innerHTML]=\"\n row.cellData[column.name].value | sanitizeHtml\n \"\n ></td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n ><span\n >{{ 'igo.geo.targetHtmlUrl' | translate }}\n </span>\n }\n >\n </a>\n </td>\n }\n }\n </ng-container>\n }\n @case (entityTableColumnRenderer.Icon) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @if (column.onClick) {\n <mat-icon (click)=\"column.onClick($event)\">{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n } @else {\n <mat-icon>{{\n row.cellData[column.name].value || column.icon\n }}</mat-icon>\n }\n </td>\n }\n @case (entityTableColumnRenderer.ButtonGroup) {\n <ng-container *matCellDef=\"let row\">\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n @for (\n button of row.cellData[column.name].value;\n track button\n ) {\n @if (\n isEdition(row.record) === button.editMode ||\n button.editMode === undefined\n ) {\n <span>\n @if (button.style === 'mat-icon-button') {\n <button\n igoStopPropagation\n mat-icon-button\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n } @else {\n <button\n igoStopPropagation\n mat-mini-fab\n [color]=\"button.color\"\n (mousedown)=\"\n onButtonClick(button.click, row.record)\n \"\n [disabled]=\"button.disabled\"\n >\n <mat-icon>{{ button.icon }}</mat-icon>\n </button>\n }\n </span>\n }\n }\n </td>\n </ng-container>\n }\n @default {\n <ng-container *matCellDef=\"let row\">\n @if (!row.cellData[column.name].isUrl) {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n {{ row.cellData[column.name].value }}\n </td>\n } @else {\n <td\n mat-cell\n class=\"mat-cell-text\"\n [ngClass]=\"row.cellData[column.name].class\"\n >\n <a\n href=\"{{ row.cellData[column.name].value }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (row.cellData[column.name].isImg) {\n <img\n igoImageError\n src=\"{{\n row.cellData[column.name].value\n | secureImage\n | async\n }}\"\n width=\"50\"\n heigth=\"auto\"\n />\n } @else {\n <span>{{\n 'igo.common.entity-table.targetHtmlUrl' | translate\n }}</span>\n }\n >\n </a>\n </td>\n }\n </ng-container>\n }\n }\n }\n </ng-container>\n }\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"headers; sticky: fixedHeader\"\n [ngClass]=\"getHeaderClass()\"\n ></tr>\n <tr\n mat-row\n igoEntityTableRow\n *matRowDef=\"let row; columns: headers\"\n [scrollBehavior]=\"scrollBehavior()\"\n [ngClass]=\"getRowClass(row.record)\"\n [selection]=\"selection\"\n [selected]=\"rowIsSelected(row.record)\"\n (select)=\"onRowSelect(row.record)\"\n (click)=\"onRowClick(row.record)\"\n ></tr>\n </table>\n @if (withPaginator()) {\n <igo-entity-table-paginator\n [store]=\"store()\"\n [paginatorOptions]=\"paginatorOptions()\"\n [entitySortChange$]=\"entitySortChange$\"\n (paginatorChange)=\"paginatorChange($event)\"\n />\n }\n</div>\n", styles: [":host{width:100%;height:100%;display:block;--mat-table-header-container-height: 52px}:host.table-compact tr.mat-mdc-header-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:36px}:host.table-compact tr.mat-mdc-row,:host.table-compact ::ng-deep mat-checkbox .mat-ripple{height:28px}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.mat-cell-text{overflow:hidden;word-wrap:break-word}table.igo-entity-table-with-selection tr:hover{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd;cursor:pointer}table button{margin:7px}.class_hidden{visibility:hidden}.class_display_none{display:none}.class_boolean,.class_icon,.class_number{text-align:center;padding-right:35px!important}.class_string,.class_text,.class_number_edition{text-align:left}td.edition{background:#a6a6a633}input{border-bottom:1px solid darkgrey}table.igo-entity-table-with-selection tr.igo-entity-table-row-highlighted{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}\n"] }]
|
|
2999
|
+
}], ctorParameters: () => [], propDecorators: { store: [{ type: i0.Input, args: [{ isSignal: true, alias: "store", required: false }] }], paginator: [{
|
|
2918
3000
|
type: Input
|
|
2919
|
-
}],
|
|
2920
|
-
type: Input
|
|
2921
|
-
}], template: [{
|
|
2922
|
-
type: Input
|
|
2923
|
-
}], scrollBehavior: [{
|
|
2924
|
-
type: Input
|
|
2925
|
-
}], sortNullsFirst: [{
|
|
2926
|
-
type: Input
|
|
2927
|
-
}], withPaginator: [{
|
|
2928
|
-
type: Input
|
|
2929
|
-
}], paginatorOptions: [{
|
|
2930
|
-
type: Input
|
|
2931
|
-
}], entityClick: [{
|
|
2932
|
-
type: Output
|
|
2933
|
-
}], entitySelectChange: [{
|
|
2934
|
-
type: Output
|
|
2935
|
-
}], entitySortChange: [{
|
|
2936
|
-
type: Output
|
|
2937
|
-
}] } });
|
|
3001
|
+
}], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], scrollBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollBehavior", required: false }] }], sortNullsFirst: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortNullsFirst", required: false }] }], withPaginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "withPaginator", required: false }] }], paginatorOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginatorOptions", required: false }] }], entityClick: [{ type: i0.Output, args: ["entityClick"] }], entitySelectChange: [{ type: i0.Output, args: ["entitySelectChange"] }], entitySortChange: [{ type: i0.Output, args: ["entitySortChange"] }] } });
|
|
2938
3002
|
|
|
2939
3003
|
/**
|
|
2940
3004
|
* @deprecated import the EntityTableComponent directly
|
|
2941
3005
|
*/
|
|
2942
3006
|
class IgoEntityTableModule {
|
|
2943
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2944
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2945
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3007
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3008
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTableModule, imports: [EntityTableComponent], exports: [EntityTableComponent] });
|
|
3009
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTableModule, imports: [EntityTableComponent] });
|
|
2946
3010
|
}
|
|
2947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTableModule, decorators: [{
|
|
2948
3012
|
type: NgModule,
|
|
2949
3013
|
args: [{
|
|
2950
3014
|
imports: [EntityTableComponent],
|
|
@@ -2956,11 +3020,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2956
3020
|
* @deprecated import the EntityTablePaginatorComponent directly
|
|
2957
3021
|
*/
|
|
2958
3022
|
class IgoEntityTablePaginatorModule {
|
|
2959
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2960
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2961
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3023
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTablePaginatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3024
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTablePaginatorModule, imports: [EntityTablePaginatorComponent], exports: [EntityTablePaginatorComponent] });
|
|
3025
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTablePaginatorModule, imports: [EntityTablePaginatorComponent] });
|
|
2962
3026
|
}
|
|
2963
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3027
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityTablePaginatorModule, decorators: [{
|
|
2964
3028
|
type: NgModule,
|
|
2965
3029
|
args: [{
|
|
2966
3030
|
imports: [EntityTablePaginatorComponent],
|
|
@@ -2977,15 +3041,15 @@ const ENTITY_DIRECTIVES = [
|
|
|
2977
3041
|
* @deprecated import the components directly or ENTITY_DIRECTIVES for every components/directives
|
|
2978
3042
|
*/
|
|
2979
3043
|
class IgoEntityModule {
|
|
2980
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2981
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3044
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3045
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityModule, imports: [EntitySelectorComponent,
|
|
2982
3046
|
EntityTableComponent,
|
|
2983
3047
|
EntityTablePaginatorComponent], exports: [EntitySelectorComponent,
|
|
2984
3048
|
EntityTableComponent,
|
|
2985
3049
|
EntityTablePaginatorComponent] });
|
|
2986
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3050
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityModule, imports: [ENTITY_DIRECTIVES] });
|
|
2987
3051
|
}
|
|
2988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoEntityModule, decorators: [{
|
|
2989
3053
|
type: NgModule,
|
|
2990
3054
|
args: [{
|
|
2991
3055
|
imports: [...ENTITY_DIRECTIVES],
|
|
@@ -2997,5 +3061,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2997
3061
|
* Generated bundle index. Do not edit.
|
|
2998
3062
|
*/
|
|
2999
3063
|
|
|
3000
|
-
export { ENTITY_DIRECTIVES, EntityOperationType, EntitySelectorComponent, EntityStateManager, EntityStore, EntityStoreFilterCustomFuncStrategy, EntityStoreFilterSelectionStrategy, EntityStoreStrategy, EntityStoreWatcher, EntityTableColumnRenderer, EntityTableComponent, EntityTablePaginatorComponent, EntityTableScrollBehavior, EntityTableSelectionState, EntityTransaction, EntityView, IgoEntityModule, IgoEntitySelectorModule, IgoEntityTableModule, IgoEntityTablePaginatorModule, getEntityIcon, getEntityId, getEntityProperty, getEntityRevision, getEntityTitle, getEntityTitleHtml };
|
|
3064
|
+
export { ENTITY_DIRECTIVES, EntityOperationType, EntitySelectorComponent, EntityService, EntityStateManager, EntityStore, EntityStoreFilterCustomFuncStrategy, EntityStoreFilterSelectionStrategy, EntityStoreStrategy, EntityStoreWatcher, EntityTableColumnRenderer, EntityTableComponent, EntityTablePaginatorComponent, EntityTableScrollBehavior, EntityTableSelectionState, EntityTransaction, EntityView, IgoEntityModule, IgoEntitySelectorModule, IgoEntityTableModule, IgoEntityTablePaginatorModule, getColumnKeyWithoutPropertiesTag, getEntityIcon, getEntityId, getEntityProperty, getEntityRevision, getEntityTitle, getEntityTitleHtml, isChoiceField, isChoiceFieldWithLabelField };
|
|
3001
3065
|
//# sourceMappingURL=igo2-common-entity.mjs.map
|