@elderbyte/ngx-starter 21.11.0 → 21.12.0
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.
|
@@ -6,8 +6,8 @@ import * as i1 from '@angular/platform-browser';
|
|
|
6
6
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
7
7
|
import { Duration, Period, TemporalQueries, LocalTime, Instant, LocalDate, nativeJs, ZoneId, DateTimeFormatter, convert, ZonedDateTime, Temporal as Temporal$1 } from '@js-joda/core';
|
|
8
8
|
import { LoggerFactory } from '@elderbyte/ts-logger';
|
|
9
|
-
import { timer, defer, ReplaySubject, concat, finalize, exhaustMap, BehaviorSubject, Subject,
|
|
10
|
-
import { tap, takeUntil, takeWhile, map, filter, distinctUntilChanged, debounceTime, catchError, first, take, switchMap as switchMap$1, mergeMap, expand, reduce, combineLatestWith, startWith, skip, delay, share,
|
|
9
|
+
import { timer, defer, ReplaySubject, concat, finalize, exhaustMap, BehaviorSubject, Subject, of, throwError, switchMap, combineLatest, EMPTY, merge, forkJoin, mergeWith, Observable, from, toArray, zip, mergeMap as mergeMap$1, fromEvent, mergeAll, skipUntil, filter as filter$1, map as map$1, combineLatestWith as combineLatestWith$1, tap as tap$1, takeUntil as takeUntil$1, NEVER } from 'rxjs';
|
|
10
|
+
import { tap, takeUntil, takeWhile, map, filter, distinctUntilChanged, debounceTime, catchError, first, take, switchMap as switchMap$1, mergeMap, expand, reduce, combineLatestWith, startWith, skip, delay, share, debounce, timeout, skipWhile } from 'rxjs/operators';
|
|
11
11
|
import { Temporal } from '@js-temporal/polyfill';
|
|
12
12
|
import * as i1$1 from '@angular/common/http';
|
|
13
13
|
import { HttpParams, HttpEventType, HttpRequest, HttpClient, HttpErrorResponse, HTTP_INTERCEPTORS, HttpBackend } from '@angular/common/http';
|
|
@@ -4082,6 +4082,468 @@ class SortContext {
|
|
|
4082
4082
|
}
|
|
4083
4083
|
}
|
|
4084
4084
|
|
|
4085
|
+
class DataSourceEntityPatch {
|
|
4086
|
+
constructor(entityId, patch) {
|
|
4087
|
+
this.entityId = entityId;
|
|
4088
|
+
this.patch = patch;
|
|
4089
|
+
}
|
|
4090
|
+
}
|
|
4091
|
+
/**
|
|
4092
|
+
* Notifies about changes in a DataSource.
|
|
4093
|
+
*/
|
|
4094
|
+
class DataSourceChangeEvent {
|
|
4095
|
+
static unknownChanges() {
|
|
4096
|
+
return new DataSourceChangeEvent(null, null, null, null);
|
|
4097
|
+
}
|
|
4098
|
+
static deleted(ids) {
|
|
4099
|
+
return new DataSourceChangeEvent(ids, null, null, null);
|
|
4100
|
+
}
|
|
4101
|
+
static modified(modified) {
|
|
4102
|
+
return new DataSourceChangeEvent(null, modified, null, null);
|
|
4103
|
+
}
|
|
4104
|
+
static created(created) {
|
|
4105
|
+
return new DataSourceChangeEvent(null, null, created, null);
|
|
4106
|
+
}
|
|
4107
|
+
static patched(patches) {
|
|
4108
|
+
return new DataSourceChangeEvent(null, null, null, patches);
|
|
4109
|
+
}
|
|
4110
|
+
constructor(deletedIds, modified, created, patches) {
|
|
4111
|
+
this.deletedIds = deletedIds;
|
|
4112
|
+
this.modified = modified;
|
|
4113
|
+
this.created = created;
|
|
4114
|
+
this.patches = patches;
|
|
4115
|
+
this.unknownChanges = !deletedIds && !modified && !created && !patches;
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4119
|
+
class EntityIdUtil {
|
|
4120
|
+
static getId(entity, idProperty) {
|
|
4121
|
+
if (entity && idProperty) {
|
|
4122
|
+
if (typeof entity === 'object') {
|
|
4123
|
+
return entity?.[idProperty];
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4126
|
+
return entity;
|
|
4127
|
+
}
|
|
4128
|
+
static extractIdFnOrProperty(idPropertyOrExtractFn) {
|
|
4129
|
+
if (typeof idPropertyOrExtractFn === 'string') {
|
|
4130
|
+
return EntityIdUtil.extractIdFn(idPropertyOrExtractFn);
|
|
4131
|
+
}
|
|
4132
|
+
else if (typeof idPropertyOrExtractFn === 'function') {
|
|
4133
|
+
return idPropertyOrExtractFn;
|
|
4134
|
+
}
|
|
4135
|
+
else if (idPropertyOrExtractFn === null || idPropertyOrExtractFn === undefined) {
|
|
4136
|
+
return EntityIdUtil.extractIdFn(null);
|
|
4137
|
+
}
|
|
4138
|
+
else {
|
|
4139
|
+
throw new Error('Invalid idPropertyOrExtractFn');
|
|
4140
|
+
}
|
|
4141
|
+
}
|
|
4142
|
+
static extractIdFn(idProperty) {
|
|
4143
|
+
return (entity) => EntityIdUtil.getId(entity, idProperty);
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
|
|
4147
|
+
class DataSourceBase {
|
|
4148
|
+
/***************************************************************************
|
|
4149
|
+
* *
|
|
4150
|
+
* Constructor *
|
|
4151
|
+
* *
|
|
4152
|
+
**************************************************************************/
|
|
4153
|
+
constructor(propertyOrIdExtractor) {
|
|
4154
|
+
/***************************************************************************
|
|
4155
|
+
* *
|
|
4156
|
+
* Fields *
|
|
4157
|
+
* *
|
|
4158
|
+
**************************************************************************/
|
|
4159
|
+
this.dataChangeEvents$ = new Subject();
|
|
4160
|
+
this.extractIdFn = EntityIdUtil.extractIdFnOrProperty(propertyOrIdExtractor);
|
|
4161
|
+
}
|
|
4162
|
+
/***************************************************************************
|
|
4163
|
+
* *
|
|
4164
|
+
* Properties *
|
|
4165
|
+
* *
|
|
4166
|
+
**************************************************************************/
|
|
4167
|
+
get dataChanged() {
|
|
4168
|
+
return this.dataChangeEvents$.asObservable();
|
|
4169
|
+
}
|
|
4170
|
+
/***************************************************************************
|
|
4171
|
+
* *
|
|
4172
|
+
* Public API *
|
|
4173
|
+
* *
|
|
4174
|
+
**************************************************************************/
|
|
4175
|
+
publishChangeEvent(e) {
|
|
4176
|
+
this.dataChangeEvents$.next(e);
|
|
4177
|
+
}
|
|
4178
|
+
getId(entity) {
|
|
4179
|
+
return this.extractIdFn(entity);
|
|
4180
|
+
}
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
class SortUtil {
|
|
4184
|
+
static toggleDir(dir) {
|
|
4185
|
+
if (dir === 'asc') {
|
|
4186
|
+
return 'desc';
|
|
4187
|
+
}
|
|
4188
|
+
else {
|
|
4189
|
+
return 'asc';
|
|
4190
|
+
}
|
|
4191
|
+
}
|
|
4192
|
+
static toggleSort(sort) {
|
|
4193
|
+
return new Sort(sort.prop, SortUtil.toggleDir(sort.dir));
|
|
4194
|
+
}
|
|
4195
|
+
static sortData(data, sorts, prefix) {
|
|
4196
|
+
if (sorts && sorts.length > 0) {
|
|
4197
|
+
const copy = [...data];
|
|
4198
|
+
const sortFields = sorts.map((s) => (s.dir === 'desc' ? '-' : '') + SortUtil.propertyPath(s, prefix));
|
|
4199
|
+
return copy.sort(ComparatorBuilder.fieldSort(...sortFields));
|
|
4200
|
+
}
|
|
4201
|
+
else {
|
|
4202
|
+
return data;
|
|
4203
|
+
}
|
|
4204
|
+
}
|
|
4205
|
+
/**
|
|
4206
|
+
* Checks if the two arrays have all content references in the exact same order.
|
|
4207
|
+
* @param data
|
|
4208
|
+
* @param other
|
|
4209
|
+
*/
|
|
4210
|
+
static equalsExactRefs(data, other) {
|
|
4211
|
+
// eslint-disable-next-line eqeqeq
|
|
4212
|
+
if (data.length == other.length) {
|
|
4213
|
+
for (let i = 0; i < data.length; i++) {
|
|
4214
|
+
// eslint-disable-next-line eqeqeq
|
|
4215
|
+
if (data[i] != other[i]) {
|
|
4216
|
+
return false;
|
|
4217
|
+
}
|
|
4218
|
+
}
|
|
4219
|
+
return true;
|
|
4220
|
+
}
|
|
4221
|
+
return false;
|
|
4222
|
+
}
|
|
4223
|
+
static propertyPath(sort, prefix) {
|
|
4224
|
+
if (prefix) {
|
|
4225
|
+
return prefix + '.' + sort.prop;
|
|
4226
|
+
}
|
|
4227
|
+
else {
|
|
4228
|
+
return sort.prop;
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
}
|
|
4232
|
+
|
|
4233
|
+
class MapUtils {
|
|
4234
|
+
static toDistinctMap(values, keyFn) {
|
|
4235
|
+
return values.reduce((map, value) => {
|
|
4236
|
+
map.set(keyFn(value), value);
|
|
4237
|
+
return map;
|
|
4238
|
+
}, new Map());
|
|
4239
|
+
}
|
|
4240
|
+
static groupByKey(values, keyFn) {
|
|
4241
|
+
const groups = new Map();
|
|
4242
|
+
values.forEach((value) => {
|
|
4243
|
+
const key = keyFn(value);
|
|
4244
|
+
let group = groups.get(key);
|
|
4245
|
+
if (!group) {
|
|
4246
|
+
group = [];
|
|
4247
|
+
groups.set(key, group);
|
|
4248
|
+
}
|
|
4249
|
+
group.push(value);
|
|
4250
|
+
});
|
|
4251
|
+
return groups;
|
|
4252
|
+
}
|
|
4253
|
+
static mapValue(map, valueMapFn) {
|
|
4254
|
+
const newMap = new Map();
|
|
4255
|
+
Array.from(map.entries()).forEach(([key, value]) => newMap.set(key, valueMapFn(value)));
|
|
4256
|
+
return newMap;
|
|
4257
|
+
}
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4260
|
+
class LocalListDataSource extends DataSourceBase {
|
|
4261
|
+
/***************************************************************************
|
|
4262
|
+
* *
|
|
4263
|
+
* Static Builder *
|
|
4264
|
+
* *
|
|
4265
|
+
**************************************************************************/
|
|
4266
|
+
/**
|
|
4267
|
+
* Creates an empty local list data-source.
|
|
4268
|
+
* You can set / modify data by using the data property.
|
|
4269
|
+
* @param idPropertyOrExtractor
|
|
4270
|
+
* @param localSort
|
|
4271
|
+
* @param localFilter
|
|
4272
|
+
*/
|
|
4273
|
+
static empty(idPropertyOrExtractor, localSort, localFilter) {
|
|
4274
|
+
return this.from([], idPropertyOrExtractor, localSort, localFilter);
|
|
4275
|
+
}
|
|
4276
|
+
static from(localData, idPropertyOrExtractor, localSort, localFilter) {
|
|
4277
|
+
if (idPropertyOrExtractor === null) {
|
|
4278
|
+
idPropertyOrExtractor = LocalListDataSource.guessIdProperty(localData);
|
|
4279
|
+
}
|
|
4280
|
+
return new LocalListDataSource(localData, localSort, localFilter, idPropertyOrExtractor);
|
|
4281
|
+
}
|
|
4282
|
+
/***************************************************************************
|
|
4283
|
+
* *
|
|
4284
|
+
* Constructor *
|
|
4285
|
+
* *
|
|
4286
|
+
**************************************************************************/
|
|
4287
|
+
constructor(localData, localSort, localFilter, idPropertyOrExtractor) {
|
|
4288
|
+
super(idPropertyOrExtractor);
|
|
4289
|
+
/***************************************************************************
|
|
4290
|
+
* *
|
|
4291
|
+
* Fields *
|
|
4292
|
+
* *
|
|
4293
|
+
**************************************************************************/
|
|
4294
|
+
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
4295
|
+
this.data$ = new BehaviorSubject([]);
|
|
4296
|
+
if (!localData) {
|
|
4297
|
+
throw new Error('localData must not be null!');
|
|
4298
|
+
}
|
|
4299
|
+
this.localSort = localSort || SortUtil.sortData;
|
|
4300
|
+
this.localFilter = localFilter || FilterUtil.filterData;
|
|
4301
|
+
this.data = localData;
|
|
4302
|
+
}
|
|
4303
|
+
/***************************************************************************
|
|
4304
|
+
* *
|
|
4305
|
+
* Properties *
|
|
4306
|
+
* *
|
|
4307
|
+
**************************************************************************/
|
|
4308
|
+
get data() {
|
|
4309
|
+
return this.data$.getValue();
|
|
4310
|
+
}
|
|
4311
|
+
set data(data) {
|
|
4312
|
+
this.replaceAll(data);
|
|
4313
|
+
}
|
|
4314
|
+
/***************************************************************************
|
|
4315
|
+
* *
|
|
4316
|
+
* IDataSource API *
|
|
4317
|
+
* *
|
|
4318
|
+
**************************************************************************/
|
|
4319
|
+
findById(id) {
|
|
4320
|
+
if (id === undefined || id === null) {
|
|
4321
|
+
throw new Error('findById: id argument required!');
|
|
4322
|
+
}
|
|
4323
|
+
const found = this.data.find((d) => this.getId(d) === id);
|
|
4324
|
+
if (found) {
|
|
4325
|
+
return of(found);
|
|
4326
|
+
}
|
|
4327
|
+
else {
|
|
4328
|
+
return throwError(() => new Error("Could not find local entity by id: '" + id + "'"));
|
|
4329
|
+
}
|
|
4330
|
+
}
|
|
4331
|
+
findByIds(ids) {
|
|
4332
|
+
if (ids === undefined || ids === null) {
|
|
4333
|
+
throw new Error('findByIds: ids array argument required!');
|
|
4334
|
+
}
|
|
4335
|
+
const desiredIds = new Set(ids);
|
|
4336
|
+
return of(this.data.filter((d) => desiredIds.has(this.getId(d))));
|
|
4337
|
+
}
|
|
4338
|
+
findAllFiltered(filters, sorts) {
|
|
4339
|
+
return of(this.data).pipe(map((data) => this.localFilter(data, filters)), map((data) => this.localSort(data, sorts)));
|
|
4340
|
+
}
|
|
4341
|
+
/***************************************************************************
|
|
4342
|
+
* *
|
|
4343
|
+
* Public API *
|
|
4344
|
+
* *
|
|
4345
|
+
**************************************************************************/
|
|
4346
|
+
replaceAll(data) {
|
|
4347
|
+
this.silentReplaceData(data);
|
|
4348
|
+
this.publishChangeEvent(DataSourceChangeEvent.unknownChanges());
|
|
4349
|
+
}
|
|
4350
|
+
delete(entity) {
|
|
4351
|
+
this.deleteAll([entity]);
|
|
4352
|
+
}
|
|
4353
|
+
deleteAll(toDelete) {
|
|
4354
|
+
if (toDelete?.length > 0) {
|
|
4355
|
+
return this.deleteAllById(toDelete.map((e) => this.getId(e)));
|
|
4356
|
+
}
|
|
4357
|
+
}
|
|
4358
|
+
deleteAllById(idsToDelete) {
|
|
4359
|
+
if (idsToDelete?.length > 0) {
|
|
4360
|
+
const existing = this.data;
|
|
4361
|
+
const idsToDeleteSet = new Set(idsToDelete);
|
|
4362
|
+
this.silentReplaceData(existing.filter((e) => !idsToDeleteSet.has(this.getId(e))));
|
|
4363
|
+
this.publishChangeEvent(DataSourceChangeEvent.deleted(idsToDelete));
|
|
4364
|
+
}
|
|
4365
|
+
}
|
|
4366
|
+
saveAll(toSave) {
|
|
4367
|
+
const idDataMap = this.buildIdDataMap(this.data);
|
|
4368
|
+
const createdEntities = [];
|
|
4369
|
+
const modifiedEntities = [];
|
|
4370
|
+
toSave.forEach((entity) => {
|
|
4371
|
+
const id = this.getId(entity);
|
|
4372
|
+
if (!idDataMap.has(id)) {
|
|
4373
|
+
createdEntities.push(entity);
|
|
4374
|
+
}
|
|
4375
|
+
else {
|
|
4376
|
+
modifiedEntities.push(entity);
|
|
4377
|
+
}
|
|
4378
|
+
idDataMap.set(id, entity);
|
|
4379
|
+
});
|
|
4380
|
+
this.silentReplaceData(Array.from(idDataMap.values()));
|
|
4381
|
+
this.publishChanges(createdEntities, modifiedEntities);
|
|
4382
|
+
}
|
|
4383
|
+
save(entity, index) {
|
|
4384
|
+
this.saveAtIndex(entity, index);
|
|
4385
|
+
}
|
|
4386
|
+
saveAtIndex(entity, index) {
|
|
4387
|
+
const id = this.getId(entity);
|
|
4388
|
+
const newData = [...this.data];
|
|
4389
|
+
const existingIndex = newData.findIndex((entity) => this.getId(entity) === id);
|
|
4390
|
+
let created = false;
|
|
4391
|
+
if (existingIndex === -1) {
|
|
4392
|
+
if (index !== null) {
|
|
4393
|
+
newData.splice(index, 0, entity);
|
|
4394
|
+
}
|
|
4395
|
+
else {
|
|
4396
|
+
newData.push(entity);
|
|
4397
|
+
}
|
|
4398
|
+
created = true;
|
|
4399
|
+
}
|
|
4400
|
+
else {
|
|
4401
|
+
newData[existingIndex] = entity;
|
|
4402
|
+
}
|
|
4403
|
+
this.silentReplaceData(newData);
|
|
4404
|
+
this.publishChangeEvent(created ? DataSourceChangeEvent.created([entity]) : DataSourceChangeEvent.modified([entity]));
|
|
4405
|
+
}
|
|
4406
|
+
/***************************************************************************
|
|
4407
|
+
* *
|
|
4408
|
+
* Private methods *
|
|
4409
|
+
* *
|
|
4410
|
+
**************************************************************************/
|
|
4411
|
+
buildIdDataMap(data) {
|
|
4412
|
+
return MapUtils.toDistinctMap(data, (value) => this.getId(value));
|
|
4413
|
+
}
|
|
4414
|
+
silentReplaceData(newData) {
|
|
4415
|
+
this.data$.next(newData);
|
|
4416
|
+
}
|
|
4417
|
+
static guessIdProperty(localData) {
|
|
4418
|
+
const log = LoggerFactory.getLogger('LocalListDataSource');
|
|
4419
|
+
if (localData && localData.length > 0) {
|
|
4420
|
+
const sample = localData[0];
|
|
4421
|
+
if (typeof sample === 'object') {
|
|
4422
|
+
if (Object.prototype.hasOwnProperty.call(sample, 'id')) {
|
|
4423
|
+
log.warn('DataSource without defined id-property => autodetected property id-property as "id"');
|
|
4424
|
+
return 'id'; // Use id
|
|
4425
|
+
}
|
|
4426
|
+
else {
|
|
4427
|
+
log.warn('Local DataSource created without defined id-property and objects. Using object equality!');
|
|
4428
|
+
}
|
|
4429
|
+
}
|
|
4430
|
+
}
|
|
4431
|
+
return null; // Use value as id if scalar
|
|
4432
|
+
}
|
|
4433
|
+
publishChanges(createdEntities, modifiedEntities) {
|
|
4434
|
+
if (createdEntities.length > 0) {
|
|
4435
|
+
this.publishChangeEvent(DataSourceChangeEvent.created(createdEntities));
|
|
4436
|
+
}
|
|
4437
|
+
if (modifiedEntities.length > 0) {
|
|
4438
|
+
this.publishChangeEvent(DataSourceChangeEvent.modified(modifiedEntities));
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
}
|
|
4442
|
+
|
|
4443
|
+
class LocalPagedDataSource {
|
|
4444
|
+
/***************************************************************************
|
|
4445
|
+
* *
|
|
4446
|
+
* Static Builder *
|
|
4447
|
+
* *
|
|
4448
|
+
**************************************************************************/
|
|
4449
|
+
/**
|
|
4450
|
+
* Creates an empty local list data-source.
|
|
4451
|
+
* You can set / modify data by using the data property.
|
|
4452
|
+
* @param idProperty
|
|
4453
|
+
* @param localSort
|
|
4454
|
+
* @param localFilter
|
|
4455
|
+
*/
|
|
4456
|
+
static empty(idProperty, localSort, localFilter) {
|
|
4457
|
+
return LocalPagedDataSource.of(LocalListDataSource.empty(idProperty, localSort, localFilter));
|
|
4458
|
+
}
|
|
4459
|
+
static of(listDataSource) {
|
|
4460
|
+
return new LocalPagedDataSource(listDataSource);
|
|
4461
|
+
}
|
|
4462
|
+
/***************************************************************************
|
|
4463
|
+
* *
|
|
4464
|
+
* Constructor *
|
|
4465
|
+
* *
|
|
4466
|
+
**************************************************************************/
|
|
4467
|
+
constructor(listDataSource) {
|
|
4468
|
+
if (!listDataSource) {
|
|
4469
|
+
throw new Error('listDataSource must not be null!');
|
|
4470
|
+
}
|
|
4471
|
+
this.localListFetcher = listDataSource;
|
|
4472
|
+
}
|
|
4473
|
+
/***************************************************************************
|
|
4474
|
+
* *
|
|
4475
|
+
* Public API *
|
|
4476
|
+
* *
|
|
4477
|
+
**************************************************************************/
|
|
4478
|
+
get dataChanged() {
|
|
4479
|
+
return this.localListFetcher.dataChanged;
|
|
4480
|
+
}
|
|
4481
|
+
findById(id) {
|
|
4482
|
+
return this.localListFetcher.findById(id);
|
|
4483
|
+
}
|
|
4484
|
+
findByIds(ids) {
|
|
4485
|
+
return this.localListFetcher.findByIds(ids);
|
|
4486
|
+
}
|
|
4487
|
+
findAllPaged(pageable, filters) {
|
|
4488
|
+
return this.localListFetcher
|
|
4489
|
+
.findAllFiltered(filters, pageable.sorts)
|
|
4490
|
+
.pipe(map((data) => this.pageSlice(pageable, data)));
|
|
4491
|
+
}
|
|
4492
|
+
getId(entity) {
|
|
4493
|
+
return this.localListFetcher.getId(entity);
|
|
4494
|
+
}
|
|
4495
|
+
/***************************************************************************
|
|
4496
|
+
* *
|
|
4497
|
+
* Private methods *
|
|
4498
|
+
* *
|
|
4499
|
+
**************************************************************************/
|
|
4500
|
+
pageSlice(pageable, data) {
|
|
4501
|
+
let page;
|
|
4502
|
+
if (data) {
|
|
4503
|
+
const start = pageable.page * pageable.size;
|
|
4504
|
+
const end = start + pageable.size;
|
|
4505
|
+
const slice = data.slice(start, end);
|
|
4506
|
+
page = Page.fromPage(slice, data.length, pageable);
|
|
4507
|
+
}
|
|
4508
|
+
else {
|
|
4509
|
+
page = Page.empty();
|
|
4510
|
+
}
|
|
4511
|
+
return page;
|
|
4512
|
+
}
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
/***************************************************************************
|
|
4516
|
+
* *
|
|
4517
|
+
* Type Predicates *
|
|
4518
|
+
* *
|
|
4519
|
+
**************************************************************************/
|
|
4520
|
+
function isDataSource(object) {
|
|
4521
|
+
if (!object) {
|
|
4522
|
+
return false;
|
|
4523
|
+
}
|
|
4524
|
+
return (object.dataChanged !== undefined &&
|
|
4525
|
+
object.findById !== undefined &&
|
|
4526
|
+
object.getId !== undefined);
|
|
4527
|
+
}
|
|
4528
|
+
function isListDataSource(object) {
|
|
4529
|
+
return object.findAllFiltered !== undefined;
|
|
4530
|
+
}
|
|
4531
|
+
function isLocalListDataSource(object) {
|
|
4532
|
+
return object instanceof LocalListDataSource;
|
|
4533
|
+
}
|
|
4534
|
+
function isLocalPagedDataSource(object) {
|
|
4535
|
+
return object instanceof LocalPagedDataSource;
|
|
4536
|
+
}
|
|
4537
|
+
function isLocalDataSource(object) {
|
|
4538
|
+
return isLocalListDataSource(object) || isLocalPagedDataSource(object);
|
|
4539
|
+
}
|
|
4540
|
+
function isPagedDataSource(object) {
|
|
4541
|
+
return object.findAllPaged !== undefined;
|
|
4542
|
+
}
|
|
4543
|
+
function isContinuableDataSource(object) {
|
|
4544
|
+
return object.findAllContinuable !== undefined;
|
|
4545
|
+
}
|
|
4546
|
+
|
|
4085
4547
|
class ReloadRequest {
|
|
4086
4548
|
constructor(number, reason) {
|
|
4087
4549
|
this.number = number;
|
|
@@ -4097,6 +4559,7 @@ class AfterReload {
|
|
|
4097
4559
|
return this.request.number >= minRequest.number;
|
|
4098
4560
|
}
|
|
4099
4561
|
}
|
|
4562
|
+
const DEFAULT_DEBOUNCE_TIME$1 = 50;
|
|
4100
4563
|
class DataContextBase extends DataSource {
|
|
4101
4564
|
/***************************************************************************
|
|
4102
4565
|
* *
|
|
@@ -4137,7 +4600,7 @@ class DataContextBase extends DataSource {
|
|
|
4137
4600
|
.pipe(filter(() => this.started), takeUntil(this.destroy$))
|
|
4138
4601
|
.subscribe((sorts) => this.onSortsChanged(sorts));
|
|
4139
4602
|
this._reloadQueue
|
|
4140
|
-
.pipe(takeUntil(this.destroy$), filter((request) => this.started), debounceTime(
|
|
4603
|
+
.pipe(takeUntil(this.destroy$), filter((request) => this.started), debounceTime(this.getDebounceTime()), switchMap((request) => this.reloadNow(request).pipe(map((result) => new AfterReload(request, result)), catchError((err) => {
|
|
4141
4604
|
// Dont die on errors
|
|
4142
4605
|
this.baselog.error(this.id + ': Reload queue detected error, bad!', err);
|
|
4143
4606
|
return of(new AfterReload(request, err));
|
|
@@ -4366,6 +4829,12 @@ class DataContextBase extends DataSource {
|
|
|
4366
4829
|
getItemId(item) {
|
|
4367
4830
|
return this.dataSource.getId(item);
|
|
4368
4831
|
}
|
|
4832
|
+
getDebounceTime() {
|
|
4833
|
+
if (isLocalDataSource(this.dataSource)) {
|
|
4834
|
+
return 0;
|
|
4835
|
+
}
|
|
4836
|
+
return DEFAULT_DEBOUNCE_TIME$1;
|
|
4837
|
+
}
|
|
4369
4838
|
/***************************************************************************
|
|
4370
4839
|
* *
|
|
4371
4840
|
* Event handler *
|
|
@@ -5416,465 +5885,6 @@ class DataContextSourceEventBinding extends DataContextLifeCycleBinding {
|
|
|
5416
5885
|
}
|
|
5417
5886
|
}
|
|
5418
5887
|
|
|
5419
|
-
class DataSourceEntityPatch {
|
|
5420
|
-
constructor(entityId, patch) {
|
|
5421
|
-
this.entityId = entityId;
|
|
5422
|
-
this.patch = patch;
|
|
5423
|
-
}
|
|
5424
|
-
}
|
|
5425
|
-
/**
|
|
5426
|
-
* Notifies about changes in a DataSource.
|
|
5427
|
-
*/
|
|
5428
|
-
class DataSourceChangeEvent {
|
|
5429
|
-
static unknownChanges() {
|
|
5430
|
-
return new DataSourceChangeEvent(null, null, null, null);
|
|
5431
|
-
}
|
|
5432
|
-
static deleted(ids) {
|
|
5433
|
-
return new DataSourceChangeEvent(ids, null, null, null);
|
|
5434
|
-
}
|
|
5435
|
-
static modified(modified) {
|
|
5436
|
-
return new DataSourceChangeEvent(null, modified, null, null);
|
|
5437
|
-
}
|
|
5438
|
-
static created(created) {
|
|
5439
|
-
return new DataSourceChangeEvent(null, null, created, null);
|
|
5440
|
-
}
|
|
5441
|
-
static patched(patches) {
|
|
5442
|
-
return new DataSourceChangeEvent(null, null, null, patches);
|
|
5443
|
-
}
|
|
5444
|
-
constructor(deletedIds, modified, created, patches) {
|
|
5445
|
-
this.deletedIds = deletedIds;
|
|
5446
|
-
this.modified = modified;
|
|
5447
|
-
this.created = created;
|
|
5448
|
-
this.patches = patches;
|
|
5449
|
-
this.unknownChanges = !deletedIds && !modified && !created && !patches;
|
|
5450
|
-
}
|
|
5451
|
-
}
|
|
5452
|
-
|
|
5453
|
-
class EntityIdUtil {
|
|
5454
|
-
static getId(entity, idProperty) {
|
|
5455
|
-
if (entity && idProperty) {
|
|
5456
|
-
if (typeof entity === 'object') {
|
|
5457
|
-
return entity?.[idProperty];
|
|
5458
|
-
}
|
|
5459
|
-
}
|
|
5460
|
-
return entity;
|
|
5461
|
-
}
|
|
5462
|
-
static extractIdFnOrProperty(idPropertyOrExtractFn) {
|
|
5463
|
-
if (typeof idPropertyOrExtractFn === 'string') {
|
|
5464
|
-
return EntityIdUtil.extractIdFn(idPropertyOrExtractFn);
|
|
5465
|
-
}
|
|
5466
|
-
else if (typeof idPropertyOrExtractFn === 'function') {
|
|
5467
|
-
return idPropertyOrExtractFn;
|
|
5468
|
-
}
|
|
5469
|
-
else if (idPropertyOrExtractFn === null || idPropertyOrExtractFn === undefined) {
|
|
5470
|
-
return EntityIdUtil.extractIdFn(null);
|
|
5471
|
-
}
|
|
5472
|
-
else {
|
|
5473
|
-
throw new Error('Invalid idPropertyOrExtractFn');
|
|
5474
|
-
}
|
|
5475
|
-
}
|
|
5476
|
-
static extractIdFn(idProperty) {
|
|
5477
|
-
return (entity) => EntityIdUtil.getId(entity, idProperty);
|
|
5478
|
-
}
|
|
5479
|
-
}
|
|
5480
|
-
|
|
5481
|
-
class DataSourceBase {
|
|
5482
|
-
/***************************************************************************
|
|
5483
|
-
* *
|
|
5484
|
-
* Constructor *
|
|
5485
|
-
* *
|
|
5486
|
-
**************************************************************************/
|
|
5487
|
-
constructor(propertyOrIdExtractor) {
|
|
5488
|
-
/***************************************************************************
|
|
5489
|
-
* *
|
|
5490
|
-
* Fields *
|
|
5491
|
-
* *
|
|
5492
|
-
**************************************************************************/
|
|
5493
|
-
this.dataChangeEvents$ = new Subject();
|
|
5494
|
-
this.extractIdFn = EntityIdUtil.extractIdFnOrProperty(propertyOrIdExtractor);
|
|
5495
|
-
}
|
|
5496
|
-
/***************************************************************************
|
|
5497
|
-
* *
|
|
5498
|
-
* Properties *
|
|
5499
|
-
* *
|
|
5500
|
-
**************************************************************************/
|
|
5501
|
-
get dataChanged() {
|
|
5502
|
-
return this.dataChangeEvents$.asObservable();
|
|
5503
|
-
}
|
|
5504
|
-
/***************************************************************************
|
|
5505
|
-
* *
|
|
5506
|
-
* Public API *
|
|
5507
|
-
* *
|
|
5508
|
-
**************************************************************************/
|
|
5509
|
-
publishChangeEvent(e) {
|
|
5510
|
-
this.dataChangeEvents$.next(e);
|
|
5511
|
-
}
|
|
5512
|
-
getId(entity) {
|
|
5513
|
-
return this.extractIdFn(entity);
|
|
5514
|
-
}
|
|
5515
|
-
}
|
|
5516
|
-
|
|
5517
|
-
class SortUtil {
|
|
5518
|
-
static toggleDir(dir) {
|
|
5519
|
-
if (dir === 'asc') {
|
|
5520
|
-
return 'desc';
|
|
5521
|
-
}
|
|
5522
|
-
else {
|
|
5523
|
-
return 'asc';
|
|
5524
|
-
}
|
|
5525
|
-
}
|
|
5526
|
-
static toggleSort(sort) {
|
|
5527
|
-
return new Sort(sort.prop, SortUtil.toggleDir(sort.dir));
|
|
5528
|
-
}
|
|
5529
|
-
static sortData(data, sorts, prefix) {
|
|
5530
|
-
if (sorts && sorts.length > 0) {
|
|
5531
|
-
const copy = [...data];
|
|
5532
|
-
const sortFields = sorts.map((s) => (s.dir === 'desc' ? '-' : '') + SortUtil.propertyPath(s, prefix));
|
|
5533
|
-
return copy.sort(ComparatorBuilder.fieldSort(...sortFields));
|
|
5534
|
-
}
|
|
5535
|
-
else {
|
|
5536
|
-
return data;
|
|
5537
|
-
}
|
|
5538
|
-
}
|
|
5539
|
-
/**
|
|
5540
|
-
* Checks if the two arrays have all content references in the exact same order.
|
|
5541
|
-
* @param data
|
|
5542
|
-
* @param other
|
|
5543
|
-
*/
|
|
5544
|
-
static equalsExactRefs(data, other) {
|
|
5545
|
-
// eslint-disable-next-line eqeqeq
|
|
5546
|
-
if (data.length == other.length) {
|
|
5547
|
-
for (let i = 0; i < data.length; i++) {
|
|
5548
|
-
// eslint-disable-next-line eqeqeq
|
|
5549
|
-
if (data[i] != other[i]) {
|
|
5550
|
-
return false;
|
|
5551
|
-
}
|
|
5552
|
-
}
|
|
5553
|
-
return true;
|
|
5554
|
-
}
|
|
5555
|
-
return false;
|
|
5556
|
-
}
|
|
5557
|
-
static propertyPath(sort, prefix) {
|
|
5558
|
-
if (prefix) {
|
|
5559
|
-
return prefix + '.' + sort.prop;
|
|
5560
|
-
}
|
|
5561
|
-
else {
|
|
5562
|
-
return sort.prop;
|
|
5563
|
-
}
|
|
5564
|
-
}
|
|
5565
|
-
}
|
|
5566
|
-
|
|
5567
|
-
class MapUtils {
|
|
5568
|
-
static toDistinctMap(values, keyFn) {
|
|
5569
|
-
return values.reduce((map, value) => {
|
|
5570
|
-
map.set(keyFn(value), value);
|
|
5571
|
-
return map;
|
|
5572
|
-
}, new Map());
|
|
5573
|
-
}
|
|
5574
|
-
static groupByKey(values, keyFn) {
|
|
5575
|
-
const groups = new Map();
|
|
5576
|
-
values.forEach((value) => {
|
|
5577
|
-
const key = keyFn(value);
|
|
5578
|
-
let group = groups.get(key);
|
|
5579
|
-
if (!group) {
|
|
5580
|
-
group = [];
|
|
5581
|
-
groups.set(key, group);
|
|
5582
|
-
}
|
|
5583
|
-
group.push(value);
|
|
5584
|
-
});
|
|
5585
|
-
return groups;
|
|
5586
|
-
}
|
|
5587
|
-
static mapValue(map, valueMapFn) {
|
|
5588
|
-
const newMap = new Map();
|
|
5589
|
-
Array.from(map.entries()).forEach(([key, value]) => newMap.set(key, valueMapFn(value)));
|
|
5590
|
-
return newMap;
|
|
5591
|
-
}
|
|
5592
|
-
}
|
|
5593
|
-
|
|
5594
|
-
class LocalListDataSource extends DataSourceBase {
|
|
5595
|
-
/***************************************************************************
|
|
5596
|
-
* *
|
|
5597
|
-
* Static Builder *
|
|
5598
|
-
* *
|
|
5599
|
-
**************************************************************************/
|
|
5600
|
-
/**
|
|
5601
|
-
* Creates an empty local list data-source.
|
|
5602
|
-
* You can set / modify data by using the data property.
|
|
5603
|
-
* @param idPropertyOrExtractor
|
|
5604
|
-
* @param localSort
|
|
5605
|
-
* @param localFilter
|
|
5606
|
-
*/
|
|
5607
|
-
static empty(idPropertyOrExtractor, localSort, localFilter) {
|
|
5608
|
-
return this.from([], idPropertyOrExtractor, localSort, localFilter);
|
|
5609
|
-
}
|
|
5610
|
-
static from(localData, idPropertyOrExtractor, localSort, localFilter) {
|
|
5611
|
-
if (idPropertyOrExtractor === null) {
|
|
5612
|
-
idPropertyOrExtractor = LocalListDataSource.guessIdProperty(localData);
|
|
5613
|
-
}
|
|
5614
|
-
return new LocalListDataSource(localData, localSort, localFilter, idPropertyOrExtractor);
|
|
5615
|
-
}
|
|
5616
|
-
/***************************************************************************
|
|
5617
|
-
* *
|
|
5618
|
-
* Constructor *
|
|
5619
|
-
* *
|
|
5620
|
-
**************************************************************************/
|
|
5621
|
-
constructor(localData, localSort, localFilter, idPropertyOrExtractor) {
|
|
5622
|
-
super(idPropertyOrExtractor);
|
|
5623
|
-
/***************************************************************************
|
|
5624
|
-
* *
|
|
5625
|
-
* Fields *
|
|
5626
|
-
* *
|
|
5627
|
-
**************************************************************************/
|
|
5628
|
-
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
5629
|
-
this.data$ = new BehaviorSubject([]);
|
|
5630
|
-
if (!localData) {
|
|
5631
|
-
throw new Error('localData must not be null!');
|
|
5632
|
-
}
|
|
5633
|
-
this.localSort = localSort || SortUtil.sortData;
|
|
5634
|
-
this.localFilter = localFilter || FilterUtil.filterData;
|
|
5635
|
-
this.data = localData;
|
|
5636
|
-
}
|
|
5637
|
-
/***************************************************************************
|
|
5638
|
-
* *
|
|
5639
|
-
* Properties *
|
|
5640
|
-
* *
|
|
5641
|
-
**************************************************************************/
|
|
5642
|
-
get data() {
|
|
5643
|
-
return this.data$.getValue();
|
|
5644
|
-
}
|
|
5645
|
-
set data(data) {
|
|
5646
|
-
this.replaceAll(data);
|
|
5647
|
-
}
|
|
5648
|
-
/***************************************************************************
|
|
5649
|
-
* *
|
|
5650
|
-
* IDataSource API *
|
|
5651
|
-
* *
|
|
5652
|
-
**************************************************************************/
|
|
5653
|
-
findById(id) {
|
|
5654
|
-
if (id === undefined || id === null) {
|
|
5655
|
-
throw new Error('findById: id argument required!');
|
|
5656
|
-
}
|
|
5657
|
-
const found = this.data.find((d) => this.getId(d) === id);
|
|
5658
|
-
if (found) {
|
|
5659
|
-
return of(found);
|
|
5660
|
-
}
|
|
5661
|
-
else {
|
|
5662
|
-
return throwError(() => new Error("Could not find local entity by id: '" + id + "'"));
|
|
5663
|
-
}
|
|
5664
|
-
}
|
|
5665
|
-
findByIds(ids) {
|
|
5666
|
-
if (ids === undefined || ids === null) {
|
|
5667
|
-
throw new Error('findByIds: ids array argument required!');
|
|
5668
|
-
}
|
|
5669
|
-
const desiredIds = new Set(ids);
|
|
5670
|
-
return of(this.data.filter((d) => desiredIds.has(this.getId(d))));
|
|
5671
|
-
}
|
|
5672
|
-
findAllFiltered(filters, sorts) {
|
|
5673
|
-
return of(this.data).pipe(map((data) => this.localFilter(data, filters)), map((data) => this.localSort(data, sorts)));
|
|
5674
|
-
}
|
|
5675
|
-
/***************************************************************************
|
|
5676
|
-
* *
|
|
5677
|
-
* Public API *
|
|
5678
|
-
* *
|
|
5679
|
-
**************************************************************************/
|
|
5680
|
-
replaceAll(data) {
|
|
5681
|
-
this.silentReplaceData(data);
|
|
5682
|
-
this.publishChangeEvent(DataSourceChangeEvent.unknownChanges());
|
|
5683
|
-
}
|
|
5684
|
-
delete(entity) {
|
|
5685
|
-
this.deleteAll([entity]);
|
|
5686
|
-
}
|
|
5687
|
-
deleteAll(toDelete) {
|
|
5688
|
-
if (toDelete?.length > 0) {
|
|
5689
|
-
return this.deleteAllById(toDelete.map((e) => this.getId(e)));
|
|
5690
|
-
}
|
|
5691
|
-
}
|
|
5692
|
-
deleteAllById(idsToDelete) {
|
|
5693
|
-
if (idsToDelete?.length > 0) {
|
|
5694
|
-
const existing = this.data;
|
|
5695
|
-
const idsToDeleteSet = new Set(idsToDelete);
|
|
5696
|
-
this.silentReplaceData(existing.filter((e) => !idsToDeleteSet.has(this.getId(e))));
|
|
5697
|
-
this.publishChangeEvent(DataSourceChangeEvent.deleted(idsToDelete));
|
|
5698
|
-
}
|
|
5699
|
-
}
|
|
5700
|
-
saveAll(toSave) {
|
|
5701
|
-
const idDataMap = this.buildIdDataMap(this.data);
|
|
5702
|
-
const createdEntities = [];
|
|
5703
|
-
const modifiedEntities = [];
|
|
5704
|
-
toSave.forEach((entity) => {
|
|
5705
|
-
const id = this.getId(entity);
|
|
5706
|
-
if (!idDataMap.has(id)) {
|
|
5707
|
-
createdEntities.push(entity);
|
|
5708
|
-
}
|
|
5709
|
-
else {
|
|
5710
|
-
modifiedEntities.push(entity);
|
|
5711
|
-
}
|
|
5712
|
-
idDataMap.set(id, entity);
|
|
5713
|
-
});
|
|
5714
|
-
this.silentReplaceData(Array.from(idDataMap.values()));
|
|
5715
|
-
this.publishChanges(createdEntities, modifiedEntities);
|
|
5716
|
-
}
|
|
5717
|
-
save(entity, index) {
|
|
5718
|
-
this.saveAtIndex(entity, index);
|
|
5719
|
-
}
|
|
5720
|
-
saveAtIndex(entity, index) {
|
|
5721
|
-
const id = this.getId(entity);
|
|
5722
|
-
const newData = [...this.data];
|
|
5723
|
-
const existingIndex = newData.findIndex((entity) => this.getId(entity) === id);
|
|
5724
|
-
let created = false;
|
|
5725
|
-
if (existingIndex === -1) {
|
|
5726
|
-
if (index !== null) {
|
|
5727
|
-
newData.splice(index, 0, entity);
|
|
5728
|
-
}
|
|
5729
|
-
else {
|
|
5730
|
-
newData.push(entity);
|
|
5731
|
-
}
|
|
5732
|
-
created = true;
|
|
5733
|
-
}
|
|
5734
|
-
else {
|
|
5735
|
-
newData[existingIndex] = entity;
|
|
5736
|
-
}
|
|
5737
|
-
this.silentReplaceData(newData);
|
|
5738
|
-
this.publishChangeEvent(created ? DataSourceChangeEvent.created([entity]) : DataSourceChangeEvent.modified([entity]));
|
|
5739
|
-
}
|
|
5740
|
-
/***************************************************************************
|
|
5741
|
-
* *
|
|
5742
|
-
* Private methods *
|
|
5743
|
-
* *
|
|
5744
|
-
**************************************************************************/
|
|
5745
|
-
buildIdDataMap(data) {
|
|
5746
|
-
return MapUtils.toDistinctMap(data, (value) => this.getId(value));
|
|
5747
|
-
}
|
|
5748
|
-
silentReplaceData(newData) {
|
|
5749
|
-
this.data$.next(newData);
|
|
5750
|
-
}
|
|
5751
|
-
static guessIdProperty(localData) {
|
|
5752
|
-
const log = LoggerFactory.getLogger('LocalListDataSource');
|
|
5753
|
-
if (localData && localData.length > 0) {
|
|
5754
|
-
const sample = localData[0];
|
|
5755
|
-
if (typeof sample === 'object') {
|
|
5756
|
-
if (Object.prototype.hasOwnProperty.call(sample, 'id')) {
|
|
5757
|
-
log.warn('DataSource without defined id-property => autodetected property id-property as "id"');
|
|
5758
|
-
return 'id'; // Use id
|
|
5759
|
-
}
|
|
5760
|
-
else {
|
|
5761
|
-
log.warn('Local DataSource created without defined id-property and objects. Using object equality!');
|
|
5762
|
-
}
|
|
5763
|
-
}
|
|
5764
|
-
}
|
|
5765
|
-
return null; // Use value as id if scalar
|
|
5766
|
-
}
|
|
5767
|
-
publishChanges(createdEntities, modifiedEntities) {
|
|
5768
|
-
if (createdEntities.length > 0) {
|
|
5769
|
-
this.publishChangeEvent(DataSourceChangeEvent.created(createdEntities));
|
|
5770
|
-
}
|
|
5771
|
-
if (modifiedEntities.length > 0) {
|
|
5772
|
-
this.publishChangeEvent(DataSourceChangeEvent.modified(modifiedEntities));
|
|
5773
|
-
}
|
|
5774
|
-
}
|
|
5775
|
-
}
|
|
5776
|
-
|
|
5777
|
-
class LocalPagedDataSource {
|
|
5778
|
-
/***************************************************************************
|
|
5779
|
-
* *
|
|
5780
|
-
* Static Builder *
|
|
5781
|
-
* *
|
|
5782
|
-
**************************************************************************/
|
|
5783
|
-
/**
|
|
5784
|
-
* Creates an empty local list data-source.
|
|
5785
|
-
* You can set / modify data by using the data property.
|
|
5786
|
-
* @param idProperty
|
|
5787
|
-
* @param localSort
|
|
5788
|
-
* @param localFilter
|
|
5789
|
-
*/
|
|
5790
|
-
static empty(idProperty, localSort, localFilter) {
|
|
5791
|
-
return LocalPagedDataSource.of(LocalListDataSource.empty(idProperty, localSort, localFilter));
|
|
5792
|
-
}
|
|
5793
|
-
static of(listDataSource) {
|
|
5794
|
-
return new LocalPagedDataSource(listDataSource);
|
|
5795
|
-
}
|
|
5796
|
-
/***************************************************************************
|
|
5797
|
-
* *
|
|
5798
|
-
* Constructor *
|
|
5799
|
-
* *
|
|
5800
|
-
**************************************************************************/
|
|
5801
|
-
constructor(listDataSource) {
|
|
5802
|
-
if (!listDataSource) {
|
|
5803
|
-
throw new Error('listDataSource must not be null!');
|
|
5804
|
-
}
|
|
5805
|
-
this.localListFetcher = listDataSource;
|
|
5806
|
-
}
|
|
5807
|
-
/***************************************************************************
|
|
5808
|
-
* *
|
|
5809
|
-
* Public API *
|
|
5810
|
-
* *
|
|
5811
|
-
**************************************************************************/
|
|
5812
|
-
get dataChanged() {
|
|
5813
|
-
return this.localListFetcher.dataChanged;
|
|
5814
|
-
}
|
|
5815
|
-
findById(id) {
|
|
5816
|
-
return this.localListFetcher.findById(id);
|
|
5817
|
-
}
|
|
5818
|
-
findByIds(ids) {
|
|
5819
|
-
return this.localListFetcher.findByIds(ids);
|
|
5820
|
-
}
|
|
5821
|
-
findAllPaged(pageable, filters) {
|
|
5822
|
-
return this.localListFetcher
|
|
5823
|
-
.findAllFiltered(filters, pageable.sorts)
|
|
5824
|
-
.pipe(map((data) => this.pageSlice(pageable, data)));
|
|
5825
|
-
}
|
|
5826
|
-
getId(entity) {
|
|
5827
|
-
return this.localListFetcher.getId(entity);
|
|
5828
|
-
}
|
|
5829
|
-
/***************************************************************************
|
|
5830
|
-
* *
|
|
5831
|
-
* Private methods *
|
|
5832
|
-
* *
|
|
5833
|
-
**************************************************************************/
|
|
5834
|
-
pageSlice(pageable, data) {
|
|
5835
|
-
let page;
|
|
5836
|
-
if (data) {
|
|
5837
|
-
const start = pageable.page * pageable.size;
|
|
5838
|
-
const end = start + pageable.size;
|
|
5839
|
-
const slice = data.slice(start, end);
|
|
5840
|
-
page = Page.fromPage(slice, data.length, pageable);
|
|
5841
|
-
}
|
|
5842
|
-
else {
|
|
5843
|
-
page = Page.empty();
|
|
5844
|
-
}
|
|
5845
|
-
return page;
|
|
5846
|
-
}
|
|
5847
|
-
}
|
|
5848
|
-
|
|
5849
|
-
/***************************************************************************
|
|
5850
|
-
* *
|
|
5851
|
-
* Type Predicates *
|
|
5852
|
-
* *
|
|
5853
|
-
**************************************************************************/
|
|
5854
|
-
function isDataSource(object) {
|
|
5855
|
-
if (!object) {
|
|
5856
|
-
return false;
|
|
5857
|
-
}
|
|
5858
|
-
return (object.dataChanged !== undefined &&
|
|
5859
|
-
object.findById !== undefined &&
|
|
5860
|
-
object.getId !== undefined);
|
|
5861
|
-
}
|
|
5862
|
-
function isListDataSource(object) {
|
|
5863
|
-
return object.findAllFiltered !== undefined;
|
|
5864
|
-
}
|
|
5865
|
-
function isLocalListDataSource(object) {
|
|
5866
|
-
return (isListDataSource(object) &&
|
|
5867
|
-
object.delete !== undefined &&
|
|
5868
|
-
object.save !== undefined &&
|
|
5869
|
-
object.replaceAll !== undefined);
|
|
5870
|
-
}
|
|
5871
|
-
function isPagedDataSource(object) {
|
|
5872
|
-
return object.findAllPaged !== undefined;
|
|
5873
|
-
}
|
|
5874
|
-
function isContinuableDataSource(object) {
|
|
5875
|
-
return object.findAllContinuable !== undefined;
|
|
5876
|
-
}
|
|
5877
|
-
|
|
5878
5888
|
class DelegateDataSource {
|
|
5879
5889
|
/***************************************************************************
|
|
5880
5890
|
* *
|
|
@@ -23612,6 +23622,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
23612
23622
|
args: [ElderSelectOptionComponent]
|
|
23613
23623
|
}] } });
|
|
23614
23624
|
|
|
23625
|
+
const DEFAULT_DEBOUNCE_TIME = 150;
|
|
23615
23626
|
class ElderAutocompleteDirective {
|
|
23616
23627
|
/***************************************************************************
|
|
23617
23628
|
* *
|
|
@@ -23626,11 +23637,10 @@ class ElderAutocompleteDirective {
|
|
|
23626
23637
|
* *
|
|
23627
23638
|
**************************************************************************/
|
|
23628
23639
|
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
23629
|
-
this.ignoreKeys = ['ArrowRight', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'Tab'];
|
|
23630
|
-
this.inputKeyup$ = new Subject();
|
|
23631
23640
|
this.queryFilter = 'query';
|
|
23632
23641
|
this.filters = [];
|
|
23633
23642
|
this.sorts = [];
|
|
23643
|
+
this.userTextInputChanged$ = new Subject();
|
|
23634
23644
|
this.destroyMatAutoBinding$ = new Subject();
|
|
23635
23645
|
this.destroy$ = new Subject();
|
|
23636
23646
|
}
|
|
@@ -23639,11 +23649,9 @@ class ElderAutocompleteDirective {
|
|
|
23639
23649
|
* Host Listener *
|
|
23640
23650
|
* *
|
|
23641
23651
|
**************************************************************************/
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
}
|
|
23646
|
-
this.inputKeyup$.next(event);
|
|
23652
|
+
onUserTextInput(event) {
|
|
23653
|
+
const value = event?.target?.value ?? '';
|
|
23654
|
+
this.userTextInputChanged$.next(value);
|
|
23647
23655
|
}
|
|
23648
23656
|
/***************************************************************************
|
|
23649
23657
|
* *
|
|
@@ -23651,7 +23659,7 @@ class ElderAutocompleteDirective {
|
|
|
23651
23659
|
* *
|
|
23652
23660
|
**************************************************************************/
|
|
23653
23661
|
ngOnInit() {
|
|
23654
|
-
merge(this.
|
|
23662
|
+
merge(this.userTextInputChanged$.pipe(filter(() => this._elderAutocomplete.enabled), debounce(() => timer(this.getDebounceTime())), distinctUntilChanged()), this.autocomplete.triggerReload$)
|
|
23655
23663
|
.pipe(takeUntil(this.destroy$), filter((value) => !value || typeof value === 'string' || typeof value === 'number'))
|
|
23656
23664
|
.subscribe((value) => this.updateSuggestions(value));
|
|
23657
23665
|
}
|
|
@@ -23701,8 +23709,14 @@ class ElderAutocompleteDirective {
|
|
|
23701
23709
|
this.logger.warn('No DataContext available to update suggestions!');
|
|
23702
23710
|
}
|
|
23703
23711
|
}
|
|
23712
|
+
getDebounceTime() {
|
|
23713
|
+
if (isLocalDataSource(this.dataContext?.dataSource)) {
|
|
23714
|
+
return 0;
|
|
23715
|
+
}
|
|
23716
|
+
return DEFAULT_DEBOUNCE_TIME;
|
|
23717
|
+
}
|
|
23704
23718
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ElderAutocompleteDirective, deps: [{ token: i1$8.MatAutocompleteTrigger }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23705
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: ElderAutocompleteDirective, isStandalone: true, selector: "[elderAutocomplete]", inputs: { queryFilter: "queryFilter", filters: "filters", sorts: "sorts", autocomplete: ["elderAutocomplete", "autocomplete"] }, host: { listeners: { "
|
|
23719
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: ElderAutocompleteDirective, isStandalone: true, selector: "[elderAutocomplete]", inputs: { queryFilter: "queryFilter", filters: "filters", sorts: "sorts", autocomplete: ["elderAutocomplete", "autocomplete"] }, host: { listeners: { "input": "onUserTextInput($event)" } }, ngImport: i0 }); }
|
|
23706
23720
|
}
|
|
23707
23721
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ElderAutocompleteDirective, decorators: [{
|
|
23708
23722
|
type: Directive,
|
|
@@ -23715,9 +23729,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
23715
23729
|
type: Input
|
|
23716
23730
|
}], sorts: [{
|
|
23717
23731
|
type: Input
|
|
23718
|
-
}],
|
|
23732
|
+
}], onUserTextInput: [{
|
|
23719
23733
|
type: HostListener,
|
|
23720
|
-
args: ['
|
|
23734
|
+
args: ['input', ['$event']]
|
|
23721
23735
|
}], autocomplete: [{
|
|
23722
23736
|
type: Input,
|
|
23723
23737
|
args: ['elderAutocomplete']
|
|
@@ -23732,11 +23746,11 @@ class ElderSelectOnTabDirective {
|
|
|
23732
23746
|
**************************************************************************/
|
|
23733
23747
|
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
23734
23748
|
this.autoTrigger = inject(MatAutocompleteTrigger);
|
|
23735
|
-
this.
|
|
23749
|
+
this.elderSelect = inject(ElderSelectComponent, {
|
|
23736
23750
|
skipSelf: true,
|
|
23737
23751
|
});
|
|
23738
23752
|
this.destroy$ = new Subject$1();
|
|
23739
|
-
this.controlValueAccessor = this.
|
|
23753
|
+
this.controlValueAccessor = this.elderSelect;
|
|
23740
23754
|
this.panelOpen = false;
|
|
23741
23755
|
this.autocompleteTextTyped = false;
|
|
23742
23756
|
this.panelNavigatedWithArrowKeys = false;
|
|
@@ -23779,7 +23793,7 @@ class ElderSelectOnTabDirective {
|
|
|
23779
23793
|
* *
|
|
23780
23794
|
**************************************************************************/
|
|
23781
23795
|
isRequiredAndEmpty() {
|
|
23782
|
-
return !this.controlValueAccessor.value && this.
|
|
23796
|
+
return !this.controlValueAccessor.value && this.elderSelect.required;
|
|
23783
23797
|
}
|
|
23784
23798
|
resetInteractionState() {
|
|
23785
23799
|
this.autocompleteTextTyped = false;
|
|
@@ -23807,6 +23821,23 @@ class ElderSelectOnTabDirective {
|
|
|
23807
23821
|
.subscribe((isUserInput) => (this.autocompleteTextTyped = isUserInput));
|
|
23808
23822
|
}
|
|
23809
23823
|
selectActiveOption() {
|
|
23824
|
+
// keyboard navigation has precedence over text input
|
|
23825
|
+
if (this.panelNavigatedWithArrowKeys) {
|
|
23826
|
+
this.writeAutoCompleteActiveOption();
|
|
23827
|
+
return;
|
|
23828
|
+
}
|
|
23829
|
+
// only select if text was typed and the setting is respected
|
|
23830
|
+
if (!this.textTypedAndSettingRespected()) {
|
|
23831
|
+
return;
|
|
23832
|
+
}
|
|
23833
|
+
const matchedOption = this.findMatchingOptionByInputText();
|
|
23834
|
+
if (matchedOption) {
|
|
23835
|
+
this.writeEntity(matchedOption.value);
|
|
23836
|
+
return;
|
|
23837
|
+
}
|
|
23838
|
+
this.writeAutoCompleteActiveOption();
|
|
23839
|
+
}
|
|
23840
|
+
writeAutoCompleteActiveOption() {
|
|
23810
23841
|
const activeOption = this.autoTrigger.activeOption;
|
|
23811
23842
|
if (activeOption) {
|
|
23812
23843
|
const entity = activeOption.value;
|
|
@@ -23832,11 +23863,33 @@ class ElderSelectOnTabDirective {
|
|
|
23832
23863
|
}
|
|
23833
23864
|
}
|
|
23834
23865
|
textTypedAndSettingRespected() {
|
|
23835
|
-
return this.autocompleteTextTyped && this.
|
|
23866
|
+
return this.autocompleteTextTyped && this.elderSelect.tabSelectAfterTextInput;
|
|
23836
23867
|
}
|
|
23837
23868
|
userInteracted() {
|
|
23838
23869
|
return this.panelNavigatedWithArrowKeys || this.textTypedAndSettingRespected();
|
|
23839
23870
|
}
|
|
23871
|
+
findMatchingOptionByInputText() {
|
|
23872
|
+
const inputText = this.elderSelect.inputRef?.nativeElement?.value;
|
|
23873
|
+
if (!inputText) {
|
|
23874
|
+
return undefined;
|
|
23875
|
+
}
|
|
23876
|
+
const normalizedInput = inputText.trim().toLowerCase();
|
|
23877
|
+
if (!normalizedInput) {
|
|
23878
|
+
return undefined;
|
|
23879
|
+
}
|
|
23880
|
+
const options = this.autoTrigger.autocomplete?.options?.toArray() ?? [];
|
|
23881
|
+
return this.findFirstOptionMatchingNormalizedInput(options, normalizedInput);
|
|
23882
|
+
}
|
|
23883
|
+
findFirstOptionMatchingNormalizedInput(options, normalizedInput) {
|
|
23884
|
+
return options.find((option) => {
|
|
23885
|
+
if (option.disabled) {
|
|
23886
|
+
return false;
|
|
23887
|
+
}
|
|
23888
|
+
const optionText = option.viewValue ?? '';
|
|
23889
|
+
const normalizedOptionText = optionText.trim().toLowerCase();
|
|
23890
|
+
return normalizedOptionText.startsWith(normalizedInput);
|
|
23891
|
+
});
|
|
23892
|
+
}
|
|
23840
23893
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ElderSelectOnTabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23841
23894
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: ElderSelectOnTabDirective, isStandalone: true, selector: "[elderSelectOnTab]", host: { listeners: { "keydown.arrowup": "handleVerticalArrowKeyPress()", "keydown.arrowdown": "handleVerticalArrowKeyPress()", "input": "handleInputTyping()", "keydown.tab": "handleTabKeyPress()" } }, ngImport: i0 }); }
|
|
23842
23895
|
}
|
|
@@ -23895,6 +23948,7 @@ class ElderSuggestionPanelComponent {
|
|
|
23895
23948
|
* The underlying Material Autocomplete
|
|
23896
23949
|
*/
|
|
23897
23950
|
this.matAutocomplete$ = new BehaviorSubject(null);
|
|
23951
|
+
this.activeEntity = input(null, ...(ngDevMode ? [{ debugName: "activeEntity" }] : /* istanbul ignore next */ []));
|
|
23898
23952
|
/**
|
|
23899
23953
|
* The DataContext which holds the autocomplete suggestions.
|
|
23900
23954
|
*/
|
|
@@ -24008,6 +24062,19 @@ class ElderSuggestionPanelComponent {
|
|
|
24008
24062
|
return false;
|
|
24009
24063
|
}
|
|
24010
24064
|
}
|
|
24065
|
+
isOptionActive(option) {
|
|
24066
|
+
const activeEntity = this.activeEntity();
|
|
24067
|
+
if (!activeEntity) {
|
|
24068
|
+
return false;
|
|
24069
|
+
}
|
|
24070
|
+
const areIdsEqual = this.areIdsEqual(activeEntity, option);
|
|
24071
|
+
if (areIdsEqual !== undefined) {
|
|
24072
|
+
return areIdsEqual;
|
|
24073
|
+
}
|
|
24074
|
+
else {
|
|
24075
|
+
return this.areLabelsEqual(activeEntity, option);
|
|
24076
|
+
}
|
|
24077
|
+
}
|
|
24011
24078
|
toOptionValue(option) {
|
|
24012
24079
|
if (this.optionValueConverterFn) {
|
|
24013
24080
|
return this.optionValueConverterFn(option);
|
|
@@ -24042,8 +24109,39 @@ class ElderSuggestionPanelComponent {
|
|
|
24042
24109
|
calculatePageSize() {
|
|
24043
24110
|
return this.PAGE_SIZE + this.hiddenOptionsCount$.getValue();
|
|
24044
24111
|
}
|
|
24112
|
+
/**
|
|
24113
|
+
* Try to extract the id from the value (to determine active entity)
|
|
24114
|
+
* with graceful fallback to undefined.
|
|
24115
|
+
*/
|
|
24116
|
+
safeId(value) {
|
|
24117
|
+
if (value === null || value === undefined) {
|
|
24118
|
+
return undefined;
|
|
24119
|
+
}
|
|
24120
|
+
try {
|
|
24121
|
+
return this.getId(value);
|
|
24122
|
+
}
|
|
24123
|
+
catch {
|
|
24124
|
+
this.logger.debug('Failed to extract id from value', value);
|
|
24125
|
+
return undefined;
|
|
24126
|
+
}
|
|
24127
|
+
}
|
|
24128
|
+
areIdsEqual(activeEntity, option) {
|
|
24129
|
+
const activeId = this.safeId(activeEntity);
|
|
24130
|
+
const optionId = this.safeId(option);
|
|
24131
|
+
if ([activeId, optionId].includes(undefined)) {
|
|
24132
|
+
return undefined;
|
|
24133
|
+
}
|
|
24134
|
+
return activeId === optionId;
|
|
24135
|
+
}
|
|
24136
|
+
areLabelsEqual(activeEntity, option) {
|
|
24137
|
+
const resolverFn = this.displayPropertyResolver$.getValue();
|
|
24138
|
+
if (resolverFn) {
|
|
24139
|
+
return resolverFn(activeEntity) === resolverFn(option);
|
|
24140
|
+
}
|
|
24141
|
+
return this.propertyStringValue(activeEntity, null) === this.propertyStringValue(option, null);
|
|
24142
|
+
}
|
|
24045
24143
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ElderSuggestionPanelComponent, deps: [{ token: i0.NgZone }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24046
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ElderSuggestionPanelComponent, isStandalone: true, selector: "elder-suggestion-panel", inputs: { isOptionDisabledFn: "isOptionDisabledFn", isOptionHiddenFn: "isOptionHiddenFn", optionValueConverterFn: "optionValueConverterFn", enabled: "enabled", valueTemplate: "valueTemplate", dataSource: "dataSource", displayPropertyResolver: "displayPropertyResolver" }, outputs: { optionSelected: "optionSelected" }, queries: [{ propertyName: "valueTemplateQuery", first: true, predicate: ElderSelectValueDirective, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "matAutocomplete", first: true, predicate: ["auto"], descendants: true }], exportAs: ["elderSuggestionPanel"], ngImport: i0, template: "<mat-autocomplete\n #auto=\"matAutocomplete\"\n panelWidth=\"auto\"\n [autoActiveFirstOption]=\"true\"\n (opened)=\"onAutocompleteOpened($event)\"\n (optionSelected)=\"onOptionSelected($event)\"\n elderInfiniteScroll\n elderElderInfiniteAutocomplete\n (closeToEnd)=\"onAutoCompleteCloseToEnd()\"\n>\n @if (dataContext$ | async; as dc) {\n @if (dc.isClosed) {\n <mat-option disabled>\n <div class=\"layout-row place-start-center gap-sm\">\n <mat-icon color=\"warn\">warning</mat-icon>\n <span class=\"mat-caption\">DataContext Closed!</span>\n </div>\n </mat-option>\n }\n\n @if (availableSuggestions$ | async; as suggestions) {\n @if (suggestions.length === 0) {\n <mat-option disabled>No Data.</mat-option>\n }\n\n @for (suggestion of suggestions; track getIdAsString(suggestion)) {\n @if (isOptionVisible(suggestion)) {\n <mat-option\n [value]=\"toOptionValue(suggestion)\"\n [id]=\"getIdAsString(suggestion)\"\n [disabled]=\"!isOptionAvailable(suggestion)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n valueTemplate || simpleValueTemplate;\n context: { $implicit: suggestion }\n \"\n >\n </ng-container>\n <!--\n <span class=\"mat-caption\">value: {{toOptionValue(suggestion)}}</span>\n -->\n </mat-option>\n }\n }\n }\n } @else {\n <mat-option disabled>\n <span class=\"mat-caption\">\n No DataContext!\n @if (dataSource$ | async; as ds) {\n (DataSource: {{ ds ? 'available' : 'missing' }})\n {{ enabled ? 'Autocomplete Enabled' : 'Autocomplete DISABLED' }}\n }\n </span>\n </mat-option>\n }\n\n @if (dataState$ | async; as state) {\n @if (!state.idle || state.loading) {\n <
|
|
24144
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: ElderSuggestionPanelComponent, isStandalone: true, selector: "elder-suggestion-panel", inputs: { isOptionDisabledFn: { classPropertyName: "isOptionDisabledFn", publicName: "isOptionDisabledFn", isSignal: false, isRequired: false, transformFunction: null }, isOptionHiddenFn: { classPropertyName: "isOptionHiddenFn", publicName: "isOptionHiddenFn", isSignal: false, isRequired: false, transformFunction: null }, optionValueConverterFn: { classPropertyName: "optionValueConverterFn", publicName: "optionValueConverterFn", isSignal: false, isRequired: false, transformFunction: null }, activeEntity: { classPropertyName: "activeEntity", publicName: "activeEntity", isSignal: true, isRequired: false, transformFunction: null }, enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: false, isRequired: false, transformFunction: null }, valueTemplate: { classPropertyName: "valueTemplate", publicName: "valueTemplate", isSignal: false, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: false, isRequired: false, transformFunction: null }, displayPropertyResolver: { classPropertyName: "displayPropertyResolver", publicName: "displayPropertyResolver", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { optionSelected: "optionSelected" }, queries: [{ propertyName: "valueTemplateQuery", first: true, predicate: ElderSelectValueDirective, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "matAutocomplete", first: true, predicate: ["auto"], descendants: true }], exportAs: ["elderSuggestionPanel"], ngImport: i0, template: "<mat-autocomplete\n #auto=\"matAutocomplete\"\n panelWidth=\"auto\"\n [autoActiveFirstOption]=\"true\"\n (opened)=\"onAutocompleteOpened($event)\"\n (optionSelected)=\"onOptionSelected($event)\"\n elderInfiniteScroll\n elderElderInfiniteAutocomplete\n (closeToEnd)=\"onAutoCompleteCloseToEnd()\"\n>\n @if (dataContext$ | async; as dc) {\n @if (dc.isClosed) {\n <mat-option disabled>\n <div class=\"layout-row place-start-center gap-sm\">\n <mat-icon color=\"warn\">warning</mat-icon>\n <span class=\"mat-caption\">DataContext Closed!</span>\n </div>\n </mat-option>\n }\n\n @if (availableSuggestions$ | async; as suggestions) {\n @if (suggestions.length === 0) {\n <mat-option disabled>No Data.</mat-option>\n }\n\n @for (suggestion of suggestions; track getIdAsString(suggestion)) {\n @if (isOptionVisible(suggestion)) {\n <mat-option\n [value]=\"toOptionValue(suggestion)\"\n [id]=\"getIdAsString(suggestion)\"\n [disabled]=\"!isOptionAvailable(suggestion)\"\n [class.active-option]=\"isOptionActive(suggestion)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n valueTemplate || simpleValueTemplate;\n context: { $implicit: suggestion }\n \"\n >\n </ng-container>\n <!--\n <span class=\"mat-caption\">value: {{toOptionValue(suggestion)}}</span>\n -->\n </mat-option>\n }\n }\n }\n } @else {\n <mat-option disabled>\n <span class=\"mat-caption\">\n No DataContext!\n @if (dataSource$ | async; as ds) {\n (DataSource: {{ ds ? 'available' : 'missing' }})\n {{ enabled ? 'Autocomplete Enabled' : 'Autocomplete DISABLED' }}\n }\n </span>\n </mat-option>\n }\n\n @if (dataState$ | async; as state) {\n @if (!state.idle || state.loading) {\n <div style=\"position: relative\">\n <div style=\"position: absolute; right: 0; bottom: -8px; left: 0\">\n <mat-progress-bar\n [value]=\"100\"\n [mode]=\"state.loading ? 'query' : 'determinate'\"\n [color]=\"state.error ? 'warn' : 'primary'\"\n ></mat-progress-bar>\n </div>\n </div>\n }\n }\n</mat-autocomplete>\n\n<ng-template #simpleValueTemplate let-value>\n @if (displayPropertyResolver$ | async; as propertyResolver) {\n <span class=\"noselect\">{{ propertyResolver(value) }}</span>\n }\n</ng-template>\n", styles: [".active-option.active-option{font-weight:700}.active-option.active-option:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:4px;background-color:var(--md-sys-color-primary)}\n"], dependencies: [{ kind: "component", type: 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: "directive", type: ElderInfiniteAutocompleteDirective, selector: "mat-autocomplete[elderElderInfiniteAutocomplete]" }, { kind: "directive", type: ElderInfiniteScrollDirective, selector: "[elderInfiniteScroll]", inputs: ["listenToHost", "eventThrottle", "offsetFactor", "ignoreScrollEvent", "containerId", "scrollContainer"], outputs: ["closeToEnd", "scrolling"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24047
24145
|
}
|
|
24048
24146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ElderSuggestionPanelComponent, decorators: [{
|
|
24049
24147
|
type: Component,
|
|
@@ -24056,7 +24154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
24056
24154
|
NgTemplateOutlet,
|
|
24057
24155
|
MatProgressBar,
|
|
24058
24156
|
AsyncPipe,
|
|
24059
|
-
], template: "<mat-autocomplete\n #auto=\"matAutocomplete\"\n panelWidth=\"auto\"\n [autoActiveFirstOption]=\"true\"\n (opened)=\"onAutocompleteOpened($event)\"\n (optionSelected)=\"onOptionSelected($event)\"\n elderInfiniteScroll\n elderElderInfiniteAutocomplete\n (closeToEnd)=\"onAutoCompleteCloseToEnd()\"\n>\n @if (dataContext$ | async; as dc) {\n @if (dc.isClosed) {\n <mat-option disabled>\n <div class=\"layout-row place-start-center gap-sm\">\n <mat-icon color=\"warn\">warning</mat-icon>\n <span class=\"mat-caption\">DataContext Closed!</span>\n </div>\n </mat-option>\n }\n\n @if (availableSuggestions$ | async; as suggestions) {\n @if (suggestions.length === 0) {\n <mat-option disabled>No Data.</mat-option>\n }\n\n @for (suggestion of suggestions; track getIdAsString(suggestion)) {\n @if (isOptionVisible(suggestion)) {\n <mat-option\n [value]=\"toOptionValue(suggestion)\"\n [id]=\"getIdAsString(suggestion)\"\n [disabled]=\"!isOptionAvailable(suggestion)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n valueTemplate || simpleValueTemplate;\n context: { $implicit: suggestion }\n \"\n >\n </ng-container>\n <!--\n <span class=\"mat-caption\">value: {{toOptionValue(suggestion)}}</span>\n -->\n </mat-option>\n }\n }\n }\n } @else {\n <mat-option disabled>\n <span class=\"mat-caption\">\n No DataContext!\n @if (dataSource$ | async; as ds) {\n (DataSource: {{ ds ? 'available' : 'missing' }})\n {{ enabled ? 'Autocomplete Enabled' : 'Autocomplete DISABLED' }}\n }\n </span>\n </mat-option>\n }\n\n @if (dataState$ | async; as state) {\n @if (!state.idle || state.loading) {\n <
|
|
24157
|
+
], template: "<mat-autocomplete\n #auto=\"matAutocomplete\"\n panelWidth=\"auto\"\n [autoActiveFirstOption]=\"true\"\n (opened)=\"onAutocompleteOpened($event)\"\n (optionSelected)=\"onOptionSelected($event)\"\n elderInfiniteScroll\n elderElderInfiniteAutocomplete\n (closeToEnd)=\"onAutoCompleteCloseToEnd()\"\n>\n @if (dataContext$ | async; as dc) {\n @if (dc.isClosed) {\n <mat-option disabled>\n <div class=\"layout-row place-start-center gap-sm\">\n <mat-icon color=\"warn\">warning</mat-icon>\n <span class=\"mat-caption\">DataContext Closed!</span>\n </div>\n </mat-option>\n }\n\n @if (availableSuggestions$ | async; as suggestions) {\n @if (suggestions.length === 0) {\n <mat-option disabled>No Data.</mat-option>\n }\n\n @for (suggestion of suggestions; track getIdAsString(suggestion)) {\n @if (isOptionVisible(suggestion)) {\n <mat-option\n [value]=\"toOptionValue(suggestion)\"\n [id]=\"getIdAsString(suggestion)\"\n [disabled]=\"!isOptionAvailable(suggestion)\"\n [class.active-option]=\"isOptionActive(suggestion)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n valueTemplate || simpleValueTemplate;\n context: { $implicit: suggestion }\n \"\n >\n </ng-container>\n <!--\n <span class=\"mat-caption\">value: {{toOptionValue(suggestion)}}</span>\n -->\n </mat-option>\n }\n }\n }\n } @else {\n <mat-option disabled>\n <span class=\"mat-caption\">\n No DataContext!\n @if (dataSource$ | async; as ds) {\n (DataSource: {{ ds ? 'available' : 'missing' }})\n {{ enabled ? 'Autocomplete Enabled' : 'Autocomplete DISABLED' }}\n }\n </span>\n </mat-option>\n }\n\n @if (dataState$ | async; as state) {\n @if (!state.idle || state.loading) {\n <div style=\"position: relative\">\n <div style=\"position: absolute; right: 0; bottom: -8px; left: 0\">\n <mat-progress-bar\n [value]=\"100\"\n [mode]=\"state.loading ? 'query' : 'determinate'\"\n [color]=\"state.error ? 'warn' : 'primary'\"\n ></mat-progress-bar>\n </div>\n </div>\n }\n }\n</mat-autocomplete>\n\n<ng-template #simpleValueTemplate let-value>\n @if (displayPropertyResolver$ | async; as propertyResolver) {\n <span class=\"noselect\">{{ propertyResolver(value) }}</span>\n }\n</ng-template>\n", styles: [".active-option.active-option{font-weight:700}.active-option.active-option:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:4px;background-color:var(--md-sys-color-primary)}\n"] }]
|
|
24060
24158
|
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.DestroyRef }], propDecorators: { valueTemplateQuery: [{
|
|
24061
24159
|
type: ContentChild,
|
|
24062
24160
|
args: [ElderSelectValueDirective, { read: TemplateRef, static: true }]
|
|
@@ -24069,7 +24167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
24069
24167
|
type: Input
|
|
24070
24168
|
}], optionValueConverterFn: [{
|
|
24071
24169
|
type: Input
|
|
24072
|
-
}], optionSelected: [{
|
|
24170
|
+
}], activeEntity: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeEntity", required: false }] }], optionSelected: [{
|
|
24073
24171
|
type: Output
|
|
24074
24172
|
}], enabled: [{
|
|
24075
24173
|
type: Input
|
|
@@ -24316,15 +24414,12 @@ class ElderSelectComponent extends ElderSelectBase {
|
|
|
24316
24414
|
}
|
|
24317
24415
|
get isOptionDisabledInternalFn() {
|
|
24318
24416
|
return (option) => {
|
|
24319
|
-
if (
|
|
24320
|
-
|
|
24321
|
-
|
|
24322
|
-
|
|
24323
|
-
|
|
24324
|
-
return false;
|
|
24325
|
-
}
|
|
24417
|
+
if (this.isOptionDisabledFn) {
|
|
24418
|
+
return this.isOptionDisabledFn(option);
|
|
24419
|
+
}
|
|
24420
|
+
else {
|
|
24421
|
+
return false;
|
|
24326
24422
|
}
|
|
24327
|
-
return true;
|
|
24328
24423
|
};
|
|
24329
24424
|
}
|
|
24330
24425
|
get isOptionHiddenInternalFn() {
|
|
@@ -24375,9 +24470,19 @@ class ElderSelectComponent extends ElderSelectBase {
|
|
|
24375
24470
|
}
|
|
24376
24471
|
const selectedEntity = optionSelected.entity;
|
|
24377
24472
|
if (this.isEntitySelected(selectedEntity)) {
|
|
24378
|
-
|
|
24473
|
+
/*
|
|
24474
|
+
* Force signal emission when re-selecting the same entity.
|
|
24475
|
+
* Signals skip emission when the value hasn't changed (by reference),
|
|
24476
|
+
* therefore we need to null and then restore the value to trigger subscribers.
|
|
24477
|
+
*/
|
|
24478
|
+
this.writeValueInternal(null);
|
|
24479
|
+
queueMicrotask(() => {
|
|
24480
|
+
this.updateValueByEntity(selectedEntity);
|
|
24481
|
+
});
|
|
24482
|
+
}
|
|
24483
|
+
else {
|
|
24484
|
+
this.updateValueByEntity(selectedEntity);
|
|
24379
24485
|
}
|
|
24380
|
-
this.updateValueByEntity(selectedEntity);
|
|
24381
24486
|
}
|
|
24382
24487
|
openSelectionPopup(event) {
|
|
24383
24488
|
if (this.selectionPopup) {
|
|
@@ -24529,7 +24634,7 @@ class ElderSelectComponent extends ElderSelectBase {
|
|
|
24529
24634
|
provide: ELDER_SELECT_BASE,
|
|
24530
24635
|
useExisting: forwardRef(() => ElderSelectComponent),
|
|
24531
24636
|
},
|
|
24532
|
-
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (entityWrapped(); as entityWrapper) {\n <div class=\"layout-row place-start-center elder-flex-control\">\n @if (state(); as state) {\n @if (state?.error || icon) {\n <div class=\"elder-input-prefix-icon-container flex-none\">\n @if (icon) {\n <mat-icon\n disabled\n class=\"elder-mdc-control-icon elder-icon-small noselect clickable-icon\"\n [class.loading]=\"state.loading\"\n [color]=\"state?.error ? 'warn' : focused ? 'primary' : undefined\"\n (click)=\"onCurrentClicked(entity)\"\n >\n {{ icon }}\n </mat-icon>\n } @else if (state?.error) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-icon-small noselect\"\n color=\"warn\"\n [matTooltip]=\"state?.error\"\n >\n warning\n </mat-icon>\n }\n </div>\n }\n }\n\n <!-- A dynamic input -->\n <input\n #input\n matInput\n type=\"text\"\n class=\"flex-grow elder-select-input mdc-text-field__input\"\n [disabled]=\"!!disabled\"\n [required]=\"!!required\"\n [readonly]=\"readonly || !autocomplete\"\n [name]=\"controlName + '-inner-input'\"\n [placeholder]=\"placeholderS() | translate\"\n [matAutocomplete]\n #autoTrigger=\"matAutocompleteTrigger\"\n [elderAutocomplete]=\"elderAuto\"\n [queryFilter]=\"queryFilter\"\n [filters]=\"filters\"\n [sorts]=\"sorts\"\n elderSelectOnTab\n [class.elder-select-dropdown-input]=\"!autocomplete\"\n [ngModel]=\"inputText()\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'submit' }\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"onInputFocus(autoTrigger)\"\n (click)=\"onInputClicked(autoTrigger)\"\n />\n\n <elder-suggestion-panel\n #elderAuto=\"elderSuggestionPanel\"\n [dataSource]=\"dataContextS()?.dataSource\"\n [valueTemplate]=\"valueTemplate\"\n enabled\n [displayPropertyResolver]=\"displayPropertyResolverS()\"\n [isOptionDisabledFn]=\"isOptionDisabledInternalFn\"\n [isOptionHiddenFn]=\"isOptionHiddenInternalFn\"\n elderAutoSelectSuggestFirst\n (optionSelected)=\"onOptionSelected($any($event))\"\n ></elder-suggestion-panel>\n\n <div class=\"layout-row place-start-center flex-none\">\n @if (!selectionPopup && !autocomplete && !entityWrapper.displayRemove) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-select-arrow noselect\"\n (click)=\"onInputClicked(autoTrigger)\"\n >\n arrow_drop_down\n </mat-icon>\n }\n\n @if (selectionPopup && !entityWrapper.displayRemove) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLocked\"\n (click)=\"openSelectionPopup($event)\"\n aria-label=\"Search\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">search</mat-icon>\n </button>\n }\n\n @if (entityWrapper.displayRemove && !this.readonlyS()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLockedS()\"\n (click)=\"clear($event)\"\n aria-label=\"Clear\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">close</mat-icon>\n </button>\n }\n </div>\n </div>\n}\n", styles: ["@keyframes shrink{0%{transform:scale(1)}to{transform:scale(.75)}}.loading{animation:shrink .3s ease-in-out infinite alternate;-webkit-animation:shrink .3s ease-in-out infinite alternate}.clickable-icon,.elder-select-dropdown-input{cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: 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: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ElderSelectOnTabDirective, selector: "[elderSelectOnTab]" }, { kind: "directive", type: ElderAutocompleteDirective, selector: "[elderAutocomplete]", inputs: ["queryFilter", "filters", "sorts", "elderAutocomplete"] }, { kind: "component", type: ElderSuggestionPanelComponent, selector: "elder-suggestion-panel", inputs: ["isOptionDisabledFn", "isOptionHiddenFn", "optionValueConverterFn", "enabled", "valueTemplate", "dataSource", "displayPropertyResolver"], outputs: ["optionSelected"], exportAs: ["elderSuggestionPanel"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: ElderStopEventPropagationDirective, selector: "[elderStopEventPropagation]" }, { kind: "directive", type: ElderAutoSelectSuggestFirstDirective, selector: "[elderAutoSelectSuggestFirst]" }, { kind: "pipe", type: ElderTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
24637
|
+
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (entityWrapped(); as entityWrapper) {\n <div class=\"layout-row place-start-center elder-flex-control\">\n @if (state(); as state) {\n @if (state?.error || icon) {\n <div class=\"elder-input-prefix-icon-container flex-none\">\n @if (icon) {\n <mat-icon\n disabled\n class=\"elder-mdc-control-icon elder-icon-small noselect clickable-icon\"\n [class.loading]=\"state.loading\"\n [color]=\"state?.error ? 'warn' : focused ? 'primary' : undefined\"\n (click)=\"onCurrentClicked(entity)\"\n >\n {{ icon }}\n </mat-icon>\n } @else if (state?.error) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-icon-small noselect\"\n color=\"warn\"\n [matTooltip]=\"state?.error\"\n >\n warning\n </mat-icon>\n }\n </div>\n }\n }\n\n <!-- A dynamic input -->\n <input\n #input\n matInput\n type=\"text\"\n class=\"flex-grow elder-select-input mdc-text-field__input\"\n [disabled]=\"!!disabled\"\n [required]=\"!!required\"\n [readonly]=\"readonly || !autocomplete\"\n [name]=\"controlName + '-inner-input'\"\n [placeholder]=\"placeholderS() | translate\"\n [matAutocomplete]\n #autoTrigger=\"matAutocompleteTrigger\"\n [elderAutocomplete]=\"elderAuto\"\n [queryFilter]=\"queryFilter\"\n [filters]=\"filters\"\n [sorts]=\"sorts\"\n elderSelectOnTab\n [class.elder-select-dropdown-input]=\"!autocomplete\"\n [ngModel]=\"inputText()\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'submit' }\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"onInputFocus(autoTrigger)\"\n (click)=\"onInputClicked(autoTrigger)\"\n />\n\n <elder-suggestion-panel\n #elderAuto=\"elderSuggestionPanel\"\n [dataSource]=\"dataContextS()?.dataSource\"\n [valueTemplate]=\"valueTemplate\"\n enabled\n [displayPropertyResolver]=\"displayPropertyResolverS()\"\n [isOptionDisabledFn]=\"isOptionDisabledInternalFn\"\n [isOptionHiddenFn]=\"isOptionHiddenInternalFn\"\n elderAutoSelectSuggestFirst\n (optionSelected)=\"onOptionSelected($any($event))\"\n [activeEntity]=\"entityS()\"\n ></elder-suggestion-panel>\n\n <div class=\"layout-row place-start-center flex-none\">\n @if (!selectionPopup && !autocomplete && !entityWrapper.displayRemove) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-select-arrow noselect\"\n (click)=\"onInputClicked(autoTrigger)\"\n >\n arrow_drop_down\n </mat-icon>\n }\n\n @if (selectionPopup && !entityWrapper.displayRemove) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLocked\"\n (click)=\"openSelectionPopup($event)\"\n aria-label=\"Search\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">search</mat-icon>\n </button>\n }\n\n @if (entityWrapper.displayRemove && !this.readonlyS()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLockedS()\"\n (click)=\"clear($event)\"\n aria-label=\"Clear\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">close</mat-icon>\n </button>\n }\n </div>\n </div>\n}\n", styles: ["@keyframes shrink{0%{transform:scale(1)}to{transform:scale(.75)}}.loading{animation:shrink .3s ease-in-out infinite alternate;-webkit-animation:shrink .3s ease-in-out infinite alternate}.clickable-icon,.elder-select-dropdown-input{cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: 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: "directive", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ElderSelectOnTabDirective, selector: "[elderSelectOnTab]" }, { kind: "directive", type: ElderAutocompleteDirective, selector: "[elderAutocomplete]", inputs: ["queryFilter", "filters", "sorts", "elderAutocomplete"] }, { kind: "component", type: ElderSuggestionPanelComponent, selector: "elder-suggestion-panel", inputs: ["isOptionDisabledFn", "isOptionHiddenFn", "optionValueConverterFn", "activeEntity", "enabled", "valueTemplate", "dataSource", "displayPropertyResolver"], outputs: ["optionSelected"], exportAs: ["elderSuggestionPanel"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: ElderStopEventPropagationDirective, selector: "[elderStopEventPropagation]" }, { kind: "directive", type: ElderAutoSelectSuggestFirstDirective, selector: "[elderAutoSelectSuggestFirst]" }, { kind: "pipe", type: ElderTranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
24533
24638
|
}
|
|
24534
24639
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ElderSelectComponent, decorators: [{
|
|
24535
24640
|
type: Component,
|
|
@@ -24552,7 +24657,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
24552
24657
|
ElderStopEventPropagationDirective,
|
|
24553
24658
|
ElderTranslatePipe,
|
|
24554
24659
|
ElderAutoSelectSuggestFirstDirective,
|
|
24555
|
-
], template: "@if (entityWrapped(); as entityWrapper) {\n <div class=\"layout-row place-start-center elder-flex-control\">\n @if (state(); as state) {\n @if (state?.error || icon) {\n <div class=\"elder-input-prefix-icon-container flex-none\">\n @if (icon) {\n <mat-icon\n disabled\n class=\"elder-mdc-control-icon elder-icon-small noselect clickable-icon\"\n [class.loading]=\"state.loading\"\n [color]=\"state?.error ? 'warn' : focused ? 'primary' : undefined\"\n (click)=\"onCurrentClicked(entity)\"\n >\n {{ icon }}\n </mat-icon>\n } @else if (state?.error) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-icon-small noselect\"\n color=\"warn\"\n [matTooltip]=\"state?.error\"\n >\n warning\n </mat-icon>\n }\n </div>\n }\n }\n\n <!-- A dynamic input -->\n <input\n #input\n matInput\n type=\"text\"\n class=\"flex-grow elder-select-input mdc-text-field__input\"\n [disabled]=\"!!disabled\"\n [required]=\"!!required\"\n [readonly]=\"readonly || !autocomplete\"\n [name]=\"controlName + '-inner-input'\"\n [placeholder]=\"placeholderS() | translate\"\n [matAutocomplete]\n #autoTrigger=\"matAutocompleteTrigger\"\n [elderAutocomplete]=\"elderAuto\"\n [queryFilter]=\"queryFilter\"\n [filters]=\"filters\"\n [sorts]=\"sorts\"\n elderSelectOnTab\n [class.elder-select-dropdown-input]=\"!autocomplete\"\n [ngModel]=\"inputText()\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'submit' }\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"onInputFocus(autoTrigger)\"\n (click)=\"onInputClicked(autoTrigger)\"\n />\n\n <elder-suggestion-panel\n #elderAuto=\"elderSuggestionPanel\"\n [dataSource]=\"dataContextS()?.dataSource\"\n [valueTemplate]=\"valueTemplate\"\n enabled\n [displayPropertyResolver]=\"displayPropertyResolverS()\"\n [isOptionDisabledFn]=\"isOptionDisabledInternalFn\"\n [isOptionHiddenFn]=\"isOptionHiddenInternalFn\"\n elderAutoSelectSuggestFirst\n (optionSelected)=\"onOptionSelected($any($event))\"\n ></elder-suggestion-panel>\n\n <div class=\"layout-row place-start-center flex-none\">\n @if (!selectionPopup && !autocomplete && !entityWrapper.displayRemove) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-select-arrow noselect\"\n (click)=\"onInputClicked(autoTrigger)\"\n >\n arrow_drop_down\n </mat-icon>\n }\n\n @if (selectionPopup && !entityWrapper.displayRemove) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLocked\"\n (click)=\"openSelectionPopup($event)\"\n aria-label=\"Search\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">search</mat-icon>\n </button>\n }\n\n @if (entityWrapper.displayRemove && !this.readonlyS()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLockedS()\"\n (click)=\"clear($event)\"\n aria-label=\"Clear\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">close</mat-icon>\n </button>\n }\n </div>\n </div>\n}\n", styles: ["@keyframes shrink{0%{transform:scale(1)}to{transform:scale(.75)}}.loading{animation:shrink .3s ease-in-out infinite alternate;-webkit-animation:shrink .3s ease-in-out infinite alternate}.clickable-icon,.elder-select-dropdown-input{cursor:pointer}\n"] }]
|
|
24660
|
+
], template: "@if (entityWrapped(); as entityWrapper) {\n <div class=\"layout-row place-start-center elder-flex-control\">\n @if (state(); as state) {\n @if (state?.error || icon) {\n <div class=\"elder-input-prefix-icon-container flex-none\">\n @if (icon) {\n <mat-icon\n disabled\n class=\"elder-mdc-control-icon elder-icon-small noselect clickable-icon\"\n [class.loading]=\"state.loading\"\n [color]=\"state?.error ? 'warn' : focused ? 'primary' : undefined\"\n (click)=\"onCurrentClicked(entity)\"\n >\n {{ icon }}\n </mat-icon>\n } @else if (state?.error) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-icon-small noselect\"\n color=\"warn\"\n [matTooltip]=\"state?.error\"\n >\n warning\n </mat-icon>\n }\n </div>\n }\n }\n\n <!-- A dynamic input -->\n <input\n #input\n matInput\n type=\"text\"\n class=\"flex-grow elder-select-input mdc-text-field__input\"\n [disabled]=\"!!disabled\"\n [required]=\"!!required\"\n [readonly]=\"readonly || !autocomplete\"\n [name]=\"controlName + '-inner-input'\"\n [placeholder]=\"placeholderS() | translate\"\n [matAutocomplete]\n #autoTrigger=\"matAutocompleteTrigger\"\n [elderAutocomplete]=\"elderAuto\"\n [queryFilter]=\"queryFilter\"\n [filters]=\"filters\"\n [sorts]=\"sorts\"\n elderSelectOnTab\n [class.elder-select-dropdown-input]=\"!autocomplete\"\n [ngModel]=\"inputText()\"\n [ngModelOptions]=\"{ standalone: true, updateOn: 'submit' }\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"onInputFocus(autoTrigger)\"\n (click)=\"onInputClicked(autoTrigger)\"\n />\n\n <elder-suggestion-panel\n #elderAuto=\"elderSuggestionPanel\"\n [dataSource]=\"dataContextS()?.dataSource\"\n [valueTemplate]=\"valueTemplate\"\n enabled\n [displayPropertyResolver]=\"displayPropertyResolverS()\"\n [isOptionDisabledFn]=\"isOptionDisabledInternalFn\"\n [isOptionHiddenFn]=\"isOptionHiddenInternalFn\"\n elderAutoSelectSuggestFirst\n (optionSelected)=\"onOptionSelected($any($event))\"\n [activeEntity]=\"entityS()\"\n ></elder-suggestion-panel>\n\n <div class=\"layout-row place-start-center flex-none\">\n @if (!selectionPopup && !autocomplete && !entityWrapper.displayRemove) {\n <mat-icon\n class=\"elder-mdc-control-icon elder-select-arrow noselect\"\n (click)=\"onInputClicked(autoTrigger)\"\n >\n arrow_drop_down\n </mat-icon>\n }\n\n @if (selectionPopup && !entityWrapper.displayRemove) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLocked\"\n (click)=\"openSelectionPopup($event)\"\n aria-label=\"Search\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">search</mat-icon>\n </button>\n }\n\n @if (entityWrapper.displayRemove && !this.readonlyS()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"elder-control-icon-button\"\n [disabled]=\"isLockedS()\"\n (click)=\"clear($event)\"\n aria-label=\"Clear\"\n elderStopEventPropagation\n tabIndex=\"-1\"\n >\n <mat-icon class=\"elder-mdc-control-icon\">close</mat-icon>\n </button>\n }\n </div>\n </div>\n}\n", styles: ["@keyframes shrink{0%{transform:scale(1)}to{transform:scale(.75)}}.loading{animation:shrink .3s ease-in-out infinite alternate;-webkit-animation:shrink .3s ease-in-out infinite alternate}.clickable-icon,.elder-select-dropdown-input{cursor:pointer}\n"] }]
|
|
24556
24661
|
}], ctorParameters: () => [], propDecorators: { inputRef: [{
|
|
24557
24662
|
type: ViewChild,
|
|
24558
24663
|
args: ['input']
|
|
@@ -39509,5 +39614,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
39509
39614
|
* Generated bundle index. Do not edit.
|
|
39510
39615
|
*/
|
|
39511
39616
|
|
|
39512
|
-
export { ActivationEventSource, ActivationModel, Arrays, AuditedEntity, AutoStartSpec, Batcher, BlobUrl, BytesFormat, BytesPerSecondFormat, BytesPipe, CardDropEvent, CardOrganizerData, CardStack, CollectionUtil, CommonValidationMessageStrategy, ComparatorBuilder, CompositeSort, ConfirmDialogConfig, ContinuableListing, CountryPhoneFormatService, CsvColumnSpec, CsvSerializer, CsvSpec, CsvStreamExporter, CsvStreamExporterBuilder, CsvStreamExporterBuilderService, CuratedDataSource, CuratedListDataSource, CuratedPagedDataSource, Currency, CurrencyCode, CurrencyFormatUtil, CurrencyUnit, CurrencyUnitRegistry, CustomDateAdapter, CustomMatcherSpec, DataContextActivePage, DataContextAutoStarter, DataContextBase, DataContextBuilder, DataContextContinuableBase, DataContextContinuablePaged, DataContextContinuableToken, DataContextLifeCycleBinding, DataContextRange, DataContextSelectionDirective, DataContextSimple, DataContextSnapshot, DataContextSourceEventBinding, DataContextStateIndicatorComponent, DataContextStatus, DataSelectionController, DataSourceAdapter, DataSourceBase, DataSourceChangeEvent, DataSourceEntityPatch, DataSourceProcessor, DataTransferFactory, DataTransferProgress, DataTransferProgressAggregate, DataTransferState, DataTransferStatus, DataViewActivationController, DataViewDndControllerService, DataViewDndGroupControllerService, DataViewDndModelUtil, DataViewDragEnteredEvent, DataViewDragExitedEvent, DataViewIframeAdapterDirective, DataViewIframeComponent, DataViewInteractionControllerDirective, DataViewItemDropEvent, DataViewMessage, DataViewMessageTypeValues, DataViewOptionsProviderBinding, DataViewSelection, DataViewSelectionInit, DateUtil, DelegateContinuableDataSource, DelegateDataSource, DelegateListDataSource, DelegatePagedDataSource, Dimensions, DomUtil, DrawerOutletBinding, DurationBucket, DurationFormat, DurationFormatUtil, DynamicValidationMessageStrategy, ELDER_DATA_VIEW, ELDER_SELECT_BASE, ElderAccessDeniedComponent, ElderAccessDeniedModule, ElderAppHeaderComponent, ElderAppearanceSettingsComponent, ElderAuditModule, ElderAuditedEntityComponent, ElderAutoSelectFirstDirective, ElderAutoSelectSuggestFirstDirective, ElderAutocompleteDirective, ElderAutocompleteManyDirective, ElderAutocompleteModule, ElderBadgeDirective, ElderBasicPaneLayoutComponent, ElderBlobViewerComponent, ElderBreadCrumbsComponent, ElderBreadCrumbsModule, ElderButtonGroupComponent, ElderButtonGroupModule, ElderCardComponent, ElderCardContentDirective, ElderCardHeaderActionsDirective, ElderCardHeaderComponent, ElderCardModule, ElderCardOrganizerComponent, ElderCardOrganizerModule, ElderCardPanelComponent, ElderCardStackComponent, ElderCardSubtitleDirective, ElderCardTitleDirective, ElderCenterCellDirective, ElderChipLabelDirective, ElderChipListSelectComponent, ElderChipListSelectModule, ElderChipsIncludeExcludeDirective, ElderChipsModule, ElderClearSelectDirective, ElderClipboardPutDirective, ElderClipboardService, ElderCompositeSortComponent, ElderCompositeSortDcDirective, ElderConfirmDialogComponent, ElderConnectivityModule, ElderConnectivityService, ElderContainersModule, ElderContinuatorComponent, ElderCsvExportBtnComponent, ElderCsvModule, ElderCurrencyModule, ElderCurrencyPipe, ElderDataActivationDirective, ElderDataCommonModule, ElderDataToolbarComponent, ElderDataTransferModule, ElderDataTransferService, ElderDataViewBaseComponent, ElderDataViewDndDirective, ElderDataViewDndGroupDirective, ElderDataViewItemDragDirective, ElderDataViewOptions, ElderDataViewOptionsProvider, ElderDateSwitcherComponent, ElderDateTimeInputComponent, ElderDelayedFocusDirective, ElderDeleteActiveDirective, ElderDetailDialogComponent, ElderDetailDirective, ElderDialogConfig, ElderDialogModule, ElderDialogPanelComponent, ElderDialogService, ElderDimensionsInputComponent, ElderDropZoneComponent, ElderDurationInputComponent, ElderEntityValueAccessorUtil, ElderEnumTranslationService, ElderErrorModule, ElderEventSourceService, ElderExceptionDetailComponent, ElderExpandToggleButtonComponent, ElderExpandToggleButtonModule, ElderFileDropZoneDirective, ElderFileModule, ElderFileSelectComponent, ElderFileSelectDirective, ElderFileUploadComponent, ElderFilterChipTemplateComponent, ElderFormFieldControlBase, ElderFormFieldDenseDirective, ElderFormFieldLabelDirective, ElderFormFieldNoHintDirective, ElderFormFieldNoSpinnerDirective, ElderFormsDirectivesModule, ElderFormsModule, ElderFromFieldBase, ElderFromFieldEntityBase, ElderFromFieldMultiEntityBase, ElderGenericResizableLayoutComponent, ElderGridActivationDirective, ElderGridComponent, ElderGridModule, ElderGridNavigationBarDirective, ElderGridTileDirective, ElderGridToolbarDirective, ElderHeaderComponent, ElderHeaderModule, ElderI18nEntitiesModule, ElderIFrameModule, ElderInfiniteAutocompleteDirective, ElderInfiniteScrollDirective, ElderInfiniteScrollModule, ElderInputPatternDirective, ElderIntervalInputComponent, ElderIntervalPickerBindingDirective, ElderIntervalPickerComponent, ElderIntervalPickerToggleComponent, ElderKeyEventDirective, ElderLabelInputComponent, ElderLabelsModule, ElderLanguageConfig, ElderLanguageInterceptor, ElderLanguageService, ElderLanguageSwitcherComponent, ElderLocalDateInputComponent, ElderLocalDndSupportDirective, ElderLocalTimeInputComponent, ElderLocalesDeChModule, ElderLocalizedInputComponent, ElderLocalizedInputDialogComponent, ElderLocalizedInputDialogService, ElderLocalizedInputTableComponent, ElderLocalizedTextColumnDirective, ElderLocalizedTextsDirective, ElderLock, ElderLockContext, ElderLockContextDirective, ElderLockManagerService, ElderLockWarningService, ElderMasterActivationDirective, ElderMasterDetailComponent, ElderMasterDetailModule, ElderMasterDetailService, ElderMasterDirective, ElderMaxValidator, ElderMeasuresModule, ElderMinValidator, ElderMultiEntityValueAccessorUtil, ElderMultiSelectAllInitialDirective, ElderMultiSelectBase, ElderMultiSelectChipOptionsComponent, ElderMultiSelectChipsComponent, ElderMultiSelectChipsOptionsDirective, ElderMultiSelectFormField, ElderMultiTranslateHttpLoader, ElderMultipleOfUtil, ElderMultipleOfValidator, ElderNavGroupComponent, ElderNavLinkComponent, ElderNavListComponent, ElderNavModule, ElderNextFocusableDirective, ElderNumberCellDirective, ElderOfflineIndicatorComponent, ElderOverlayComponent, ElderOverlayModule, ElderOverlayOriginDirective, ElderOverlayRef, ElderOverlayTriggerDirective, ElderPaddingDirective, ElderPaneActionsComponent, ElderPaneComponent, ElderPaneContentComponent, ElderPaneHeaderComponent, ElderPaneSubtitleComponent, ElderPaneTitleComponent, ElderPanelModule, ElderPeriodInputComponent, ElderPipesModule, ElderPlugParentFormDirective, ElderPopoverComponent, ElderPopoverTriggerDirective, ElderProgressBarComponent, ElderProgressBarModule, ElderQuantityFormFieldComponent, ElderQuantityInputControlComponent, ElderQuantityPipe, ElderQuantityRangeValidator, ElderQuantityService, ElderQuantityTransformPipe, ElderQuestionDialogComponent, ElderRailNavDirective, ElderRepeatPipe, ElderRequiredDimensionsValidator, ElderRequiredIgnoreZeroValidator, ElderRequiredQuantityValidator, ElderResizableDirective, ElderResizablePaneLayoutComponent, ElderResizeBehaviorDirective, ElderResizeContainerComponent, ElderRoundPipe, ElderRouteOutletDrawerService, ElderRouterOutletService, ElderRouterService, ElderSafeUrlPipe, ElderScrollContainerComponent, ElderScrollbarDirective, ElderScrollbarModule, ElderSearchBoxComponent, ElderSearchContextDirective, ElderSearchIncludeExcludeDirective, ElderSearchInputDirective, ElderSearchModule, ElderSearchPanelComponent, ElderSearchUrlDirective, ElderSelectBase, ElderSelectChipAvatarDirective, ElderSelectChipDirective, ElderSelectComponent, ElderSelectComponentState, ElderSelectCustomInputDirective, ElderSelectFormField, ElderSelectModule, ElderSelectOnTabDirective, ElderSelectOptionComponent, ElderSelectValueDirective, ElderSelectionDialogComponent, ElderSelectionDialogDirective, ElderSelectionMasterCheckboxComponent, ElderSelectionPopupTriggerAdapterDirective, ElderShellCenterDirective, ElderShellComponent, ElderShellModule, ElderShellNavigationToggleComponent, ElderShellService, ElderShellSideLeftDirective, ElderShellSideRightDirective, ElderShellSlotDirective, ElderShellStaticNavSlotDirective, ElderSinglePaneWrapperComponent, ElderSingleStateCheckboxDirective, ElderStackCardDirective, ElderStaticNavToggleComponent, ElderStopEventPropagationDirective, ElderSuggestionPanelComponent, ElderTabDirective, ElderTabFocusTrapDirective, ElderTabGroupRoutingDirective, ElderTabModule, ElderTableActivationDirective, ElderTableComponent, ElderTableDropListConnectorDirective, ElderTableExtensionDirective, ElderTableGroup, ElderTableModel, ElderTableModelCdkTableBinding, ElderTableModelQueryGroup, ElderTableModule, ElderTableNavigationBarDirective, ElderTableProviders, ElderTableRootDirective, ElderTableSelectionCellComponent, ElderTableSortDirective, ElderTableToolbarDirective, ElderThemeApplierDirective, ElderThemeDirective, ElderThemeModule, ElderThemePreferenceService, ElderThemeService, ElderThemeToggleComponent, ElderTileComponent, ElderTimeModule, ElderToastModule, ElderToastService, ElderTogglePanelComponent, ElderTogglePanelPrimaryDirective, ElderTogglePanelSecondaryDirective, ElderTogglePanelTriggerDirective, ElderToggleTextInputDirective, ElderToolbarColumnDirective, ElderToolbarComponent, ElderToolbarContentDirective, ElderToolbarModule, ElderToolbarService, ElderToolbarTitleComponent, ElderToolbarTitleService, ElderTouchedDirective, ElderTranslatePipe, ElderTranslateService, ElderTripleStateCheckboxDirective, ElderTruncatePipe, ElderUnitSelectDirective, ElderUnitService, ElderUrlFragment, ElderUrlFragmentModule, ElderUrlFragmentParamsService, ElderUrlFragmentSwitcherComponent, ElderValidationErrorDirective, EntitiesChangeEvent, EntityDelta, EntityIdUtil, EntitySetPatch, ErrorUtil, ExceptionDetailCtx, FallbackValidationMessageStrategy, FileEntry, FileListingRx, FileUploadClient, Filter, FilterContext, FilterUtil, FocusUtil, FormFieldBaseComponent, GlobalDragDropService, HttpClientPristine, HttpDataTransfer, HttpDataTransferAggregateComponent, HttpDataTransferComponent, HttpDataTransferIndicatorComponent, HttpDataTransferOverviewComponent, HttpParamsBuilder, I18nBase, I18nPickAsyncPipe, I18nPickPipe, I18nText, IFrameState, IframeCloseDirective, IframeDialogComponent, IframeHostComponent, IframeService, IframeSideContentComponent, IncludeExcludeSelectionModel, IncludeExcludeState, IncludeExcludeValue, IndexedEntities, InternalRestClientConfig, Interval, IsoDurationPipe, IsoIntervalFormatUtil, IsoIntervalParsePipe, IsoIntervalPipe, ItemActivationEvent, ItemActivationOptions, ItemModel, JsonMapUtil, KafentConfig, KafentEvent, KafentEventService, KafentEventStream, KafentEventStreamDisabled, KafentEventStreamSse, KafentEventTransport, KafentModule, KafentSseEventChannel, KafentTokenProvider, KafentTokenProviderSessionStorage, KafentTopicSse, KnownElderThemes, KnownLocaleTags, LocalDataFilter, LocalListDataSource, LocalPagedDataSource, Locale, LocalisationPickerService, MasterDetailActivationEvent, MasterSelectionState, MatTableDataContextBinding, MatTableDataContextBindingBuilder, ModifierKeyService, ModifierKeyState, MultiModelBaseComponent, NamedColorDirective, NamedColorSelectDirective, NamedColorSelectValueComponent, NextNumberUtil, ObjectFieldMatcher, ObjectPathResolver, Objects, OnlineStatus, Page, PageRequest, Pageable, ParseUtil, Path, PathNode, PeriodBucket, PeriodDuration, PeriodFormat, PhoneFormatService, PhonePipe, ProcessIterationContext, ProcessState, PropertyPathUtil, Quantity, QueryListBinding, QuestionDialogConfig, ReactiveEventSource, ReactiveEventSourceState, ReactiveFetchEventSource, ReactiveFetchEventSourceService, ReactiveMap, ReactiveSSeMessage, RefreshingEntity, ResizeObserverDirective, RestClient, RestClientConfig, RestClientContinuable, RestClientList, RestClientPaged, RoutedTabActivationFailed, SearchInputState, SelectChipSpecUtil, SelectOptionChipSpecUtil, SelectionChangedEvent, SelectionEventSource, SelectionModel, SelectionModelPopupDirective, Sets, SimpleLocalisationPicker, SimpleSearchInput, Sort, SortUtil, StandardToastComponent, SubBar, SuggestionProvider, TargetValue, TemplateCompositeControl, TemplatedSelectionDialogComponent, TemporalPlainDateInterval, TemporalUtil, ThemeSpec, TimeAgoPipe, TimeDurationPipe, TimeUtil, ToIsoDateStringPipe, ToastType, TokenChunkRequest, ToolbarHeader, Translated, TranslatedConverter, TranslatedEnumValue, TranslatedText, TypedEventMessage, Unit, UnitDimension, UnitDimensionInfo, UnitInfo, UnitRegistry, UnreachableCaseError, UrlBuilder, UrlQueryParams, UuidUtil, ValueAccessorBase, ValueChangeEvent, ValueWrapper, ViewDropModelUpdateInstruction, ViewProviders, WebLocalStorage, WebSessionStorage, WebappDomainFragmentSpec, WebappDomainSpec, WebappDomainSpecService, WebappDomainSwitcherDirective, WebappUrlFragmentSwitcherConfig, WeightPipe, alphaNumStringComparator, booleanTransformFn, buildFormIntegrationProviders, coerceInterval, coerceIntervalIsoStr, createDataOptionsProvider, createElderDefaultTranslateLoader, createSelectionModel, elderChipColorLevels, elderChipColorStates, elderNamedColorRoles, elderNamedColorToken, elderNamedColors, existingOrNewElderTableModel, initSearchUrlService, isActivePagedDataContext, isContinuableDataContext, isContinuableDataSource, isDataContext, isDataSource, isDataViewMessageType, isElderEntityValueAccessor, isElderMultiEntityValueAccessor, isListDataSource, isLocalListDataSource, isPagedDataSource, lazySample, lazySampleTime, naturalValueComparator, newElderTableModel, provideElderBrandAssets, provideElderDefaults, provideElderLanguage, provideElderTranslate, proxyControlContainer, registerLocale, runInZone, someSignal, themeInit };
|
|
39617
|
+
export { ActivationEventSource, ActivationModel, Arrays, AuditedEntity, AutoStartSpec, Batcher, BlobUrl, BytesFormat, BytesPerSecondFormat, BytesPipe, CardDropEvent, CardOrganizerData, CardStack, CollectionUtil, CommonValidationMessageStrategy, ComparatorBuilder, CompositeSort, ConfirmDialogConfig, ContinuableListing, CountryPhoneFormatService, CsvColumnSpec, CsvSerializer, CsvSpec, CsvStreamExporter, CsvStreamExporterBuilder, CsvStreamExporterBuilderService, CuratedDataSource, CuratedListDataSource, CuratedPagedDataSource, Currency, CurrencyCode, CurrencyFormatUtil, CurrencyUnit, CurrencyUnitRegistry, CustomDateAdapter, CustomMatcherSpec, DataContextActivePage, DataContextAutoStarter, DataContextBase, DataContextBuilder, DataContextContinuableBase, DataContextContinuablePaged, DataContextContinuableToken, DataContextLifeCycleBinding, DataContextRange, DataContextSelectionDirective, DataContextSimple, DataContextSnapshot, DataContextSourceEventBinding, DataContextStateIndicatorComponent, DataContextStatus, DataSelectionController, DataSourceAdapter, DataSourceBase, DataSourceChangeEvent, DataSourceEntityPatch, DataSourceProcessor, DataTransferFactory, DataTransferProgress, DataTransferProgressAggregate, DataTransferState, DataTransferStatus, DataViewActivationController, DataViewDndControllerService, DataViewDndGroupControllerService, DataViewDndModelUtil, DataViewDragEnteredEvent, DataViewDragExitedEvent, DataViewIframeAdapterDirective, DataViewIframeComponent, DataViewInteractionControllerDirective, DataViewItemDropEvent, DataViewMessage, DataViewMessageTypeValues, DataViewOptionsProviderBinding, DataViewSelection, DataViewSelectionInit, DateUtil, DelegateContinuableDataSource, DelegateDataSource, DelegateListDataSource, DelegatePagedDataSource, Dimensions, DomUtil, DrawerOutletBinding, DurationBucket, DurationFormat, DurationFormatUtil, DynamicValidationMessageStrategy, ELDER_DATA_VIEW, ELDER_SELECT_BASE, ElderAccessDeniedComponent, ElderAccessDeniedModule, ElderAppHeaderComponent, ElderAppearanceSettingsComponent, ElderAuditModule, ElderAuditedEntityComponent, ElderAutoSelectFirstDirective, ElderAutoSelectSuggestFirstDirective, ElderAutocompleteDirective, ElderAutocompleteManyDirective, ElderAutocompleteModule, ElderBadgeDirective, ElderBasicPaneLayoutComponent, ElderBlobViewerComponent, ElderBreadCrumbsComponent, ElderBreadCrumbsModule, ElderButtonGroupComponent, ElderButtonGroupModule, ElderCardComponent, ElderCardContentDirective, ElderCardHeaderActionsDirective, ElderCardHeaderComponent, ElderCardModule, ElderCardOrganizerComponent, ElderCardOrganizerModule, ElderCardPanelComponent, ElderCardStackComponent, ElderCardSubtitleDirective, ElderCardTitleDirective, ElderCenterCellDirective, ElderChipLabelDirective, ElderChipListSelectComponent, ElderChipListSelectModule, ElderChipsIncludeExcludeDirective, ElderChipsModule, ElderClearSelectDirective, ElderClipboardPutDirective, ElderClipboardService, ElderCompositeSortComponent, ElderCompositeSortDcDirective, ElderConfirmDialogComponent, ElderConnectivityModule, ElderConnectivityService, ElderContainersModule, ElderContinuatorComponent, ElderCsvExportBtnComponent, ElderCsvModule, ElderCurrencyModule, ElderCurrencyPipe, ElderDataActivationDirective, ElderDataCommonModule, ElderDataToolbarComponent, ElderDataTransferModule, ElderDataTransferService, ElderDataViewBaseComponent, ElderDataViewDndDirective, ElderDataViewDndGroupDirective, ElderDataViewItemDragDirective, ElderDataViewOptions, ElderDataViewOptionsProvider, ElderDateSwitcherComponent, ElderDateTimeInputComponent, ElderDelayedFocusDirective, ElderDeleteActiveDirective, ElderDetailDialogComponent, ElderDetailDirective, ElderDialogConfig, ElderDialogModule, ElderDialogPanelComponent, ElderDialogService, ElderDimensionsInputComponent, ElderDropZoneComponent, ElderDurationInputComponent, ElderEntityValueAccessorUtil, ElderEnumTranslationService, ElderErrorModule, ElderEventSourceService, ElderExceptionDetailComponent, ElderExpandToggleButtonComponent, ElderExpandToggleButtonModule, ElderFileDropZoneDirective, ElderFileModule, ElderFileSelectComponent, ElderFileSelectDirective, ElderFileUploadComponent, ElderFilterChipTemplateComponent, ElderFormFieldControlBase, ElderFormFieldDenseDirective, ElderFormFieldLabelDirective, ElderFormFieldNoHintDirective, ElderFormFieldNoSpinnerDirective, ElderFormsDirectivesModule, ElderFormsModule, ElderFromFieldBase, ElderFromFieldEntityBase, ElderFromFieldMultiEntityBase, ElderGenericResizableLayoutComponent, ElderGridActivationDirective, ElderGridComponent, ElderGridModule, ElderGridNavigationBarDirective, ElderGridTileDirective, ElderGridToolbarDirective, ElderHeaderComponent, ElderHeaderModule, ElderI18nEntitiesModule, ElderIFrameModule, ElderInfiniteAutocompleteDirective, ElderInfiniteScrollDirective, ElderInfiniteScrollModule, ElderInputPatternDirective, ElderIntervalInputComponent, ElderIntervalPickerBindingDirective, ElderIntervalPickerComponent, ElderIntervalPickerToggleComponent, ElderKeyEventDirective, ElderLabelInputComponent, ElderLabelsModule, ElderLanguageConfig, ElderLanguageInterceptor, ElderLanguageService, ElderLanguageSwitcherComponent, ElderLocalDateInputComponent, ElderLocalDndSupportDirective, ElderLocalTimeInputComponent, ElderLocalesDeChModule, ElderLocalizedInputComponent, ElderLocalizedInputDialogComponent, ElderLocalizedInputDialogService, ElderLocalizedInputTableComponent, ElderLocalizedTextColumnDirective, ElderLocalizedTextsDirective, ElderLock, ElderLockContext, ElderLockContextDirective, ElderLockManagerService, ElderLockWarningService, ElderMasterActivationDirective, ElderMasterDetailComponent, ElderMasterDetailModule, ElderMasterDetailService, ElderMasterDirective, ElderMaxValidator, ElderMeasuresModule, ElderMinValidator, ElderMultiEntityValueAccessorUtil, ElderMultiSelectAllInitialDirective, ElderMultiSelectBase, ElderMultiSelectChipOptionsComponent, ElderMultiSelectChipsComponent, ElderMultiSelectChipsOptionsDirective, ElderMultiSelectFormField, ElderMultiTranslateHttpLoader, ElderMultipleOfUtil, ElderMultipleOfValidator, ElderNavGroupComponent, ElderNavLinkComponent, ElderNavListComponent, ElderNavModule, ElderNextFocusableDirective, ElderNumberCellDirective, ElderOfflineIndicatorComponent, ElderOverlayComponent, ElderOverlayModule, ElderOverlayOriginDirective, ElderOverlayRef, ElderOverlayTriggerDirective, ElderPaddingDirective, ElderPaneActionsComponent, ElderPaneComponent, ElderPaneContentComponent, ElderPaneHeaderComponent, ElderPaneSubtitleComponent, ElderPaneTitleComponent, ElderPanelModule, ElderPeriodInputComponent, ElderPipesModule, ElderPlugParentFormDirective, ElderPopoverComponent, ElderPopoverTriggerDirective, ElderProgressBarComponent, ElderProgressBarModule, ElderQuantityFormFieldComponent, ElderQuantityInputControlComponent, ElderQuantityPipe, ElderQuantityRangeValidator, ElderQuantityService, ElderQuantityTransformPipe, ElderQuestionDialogComponent, ElderRailNavDirective, ElderRepeatPipe, ElderRequiredDimensionsValidator, ElderRequiredIgnoreZeroValidator, ElderRequiredQuantityValidator, ElderResizableDirective, ElderResizablePaneLayoutComponent, ElderResizeBehaviorDirective, ElderResizeContainerComponent, ElderRoundPipe, ElderRouteOutletDrawerService, ElderRouterOutletService, ElderRouterService, ElderSafeUrlPipe, ElderScrollContainerComponent, ElderScrollbarDirective, ElderScrollbarModule, ElderSearchBoxComponent, ElderSearchContextDirective, ElderSearchIncludeExcludeDirective, ElderSearchInputDirective, ElderSearchModule, ElderSearchPanelComponent, ElderSearchUrlDirective, ElderSelectBase, ElderSelectChipAvatarDirective, ElderSelectChipDirective, ElderSelectComponent, ElderSelectComponentState, ElderSelectCustomInputDirective, ElderSelectFormField, ElderSelectModule, ElderSelectOnTabDirective, ElderSelectOptionComponent, ElderSelectValueDirective, ElderSelectionDialogComponent, ElderSelectionDialogDirective, ElderSelectionMasterCheckboxComponent, ElderSelectionPopupTriggerAdapterDirective, ElderShellCenterDirective, ElderShellComponent, ElderShellModule, ElderShellNavigationToggleComponent, ElderShellService, ElderShellSideLeftDirective, ElderShellSideRightDirective, ElderShellSlotDirective, ElderShellStaticNavSlotDirective, ElderSinglePaneWrapperComponent, ElderSingleStateCheckboxDirective, ElderStackCardDirective, ElderStaticNavToggleComponent, ElderStopEventPropagationDirective, ElderSuggestionPanelComponent, ElderTabDirective, ElderTabFocusTrapDirective, ElderTabGroupRoutingDirective, ElderTabModule, ElderTableActivationDirective, ElderTableComponent, ElderTableDropListConnectorDirective, ElderTableExtensionDirective, ElderTableGroup, ElderTableModel, ElderTableModelCdkTableBinding, ElderTableModelQueryGroup, ElderTableModule, ElderTableNavigationBarDirective, ElderTableProviders, ElderTableRootDirective, ElderTableSelectionCellComponent, ElderTableSortDirective, ElderTableToolbarDirective, ElderThemeApplierDirective, ElderThemeDirective, ElderThemeModule, ElderThemePreferenceService, ElderThemeService, ElderThemeToggleComponent, ElderTileComponent, ElderTimeModule, ElderToastModule, ElderToastService, ElderTogglePanelComponent, ElderTogglePanelPrimaryDirective, ElderTogglePanelSecondaryDirective, ElderTogglePanelTriggerDirective, ElderToggleTextInputDirective, ElderToolbarColumnDirective, ElderToolbarComponent, ElderToolbarContentDirective, ElderToolbarModule, ElderToolbarService, ElderToolbarTitleComponent, ElderToolbarTitleService, ElderTouchedDirective, ElderTranslatePipe, ElderTranslateService, ElderTripleStateCheckboxDirective, ElderTruncatePipe, ElderUnitSelectDirective, ElderUnitService, ElderUrlFragment, ElderUrlFragmentModule, ElderUrlFragmentParamsService, ElderUrlFragmentSwitcherComponent, ElderValidationErrorDirective, EntitiesChangeEvent, EntityDelta, EntityIdUtil, EntitySetPatch, ErrorUtil, ExceptionDetailCtx, FallbackValidationMessageStrategy, FileEntry, FileListingRx, FileUploadClient, Filter, FilterContext, FilterUtil, FocusUtil, FormFieldBaseComponent, GlobalDragDropService, HttpClientPristine, HttpDataTransfer, HttpDataTransferAggregateComponent, HttpDataTransferComponent, HttpDataTransferIndicatorComponent, HttpDataTransferOverviewComponent, HttpParamsBuilder, I18nBase, I18nPickAsyncPipe, I18nPickPipe, I18nText, IFrameState, IframeCloseDirective, IframeDialogComponent, IframeHostComponent, IframeService, IframeSideContentComponent, IncludeExcludeSelectionModel, IncludeExcludeState, IncludeExcludeValue, IndexedEntities, InternalRestClientConfig, Interval, IsoDurationPipe, IsoIntervalFormatUtil, IsoIntervalParsePipe, IsoIntervalPipe, ItemActivationEvent, ItemActivationOptions, ItemModel, JsonMapUtil, KafentConfig, KafentEvent, KafentEventService, KafentEventStream, KafentEventStreamDisabled, KafentEventStreamSse, KafentEventTransport, KafentModule, KafentSseEventChannel, KafentTokenProvider, KafentTokenProviderSessionStorage, KafentTopicSse, KnownElderThemes, KnownLocaleTags, LocalDataFilter, LocalListDataSource, LocalPagedDataSource, Locale, LocalisationPickerService, MasterDetailActivationEvent, MasterSelectionState, MatTableDataContextBinding, MatTableDataContextBindingBuilder, ModifierKeyService, ModifierKeyState, MultiModelBaseComponent, NamedColorDirective, NamedColorSelectDirective, NamedColorSelectValueComponent, NextNumberUtil, ObjectFieldMatcher, ObjectPathResolver, Objects, OnlineStatus, Page, PageRequest, Pageable, ParseUtil, Path, PathNode, PeriodBucket, PeriodDuration, PeriodFormat, PhoneFormatService, PhonePipe, ProcessIterationContext, ProcessState, PropertyPathUtil, Quantity, QueryListBinding, QuestionDialogConfig, ReactiveEventSource, ReactiveEventSourceState, ReactiveFetchEventSource, ReactiveFetchEventSourceService, ReactiveMap, ReactiveSSeMessage, RefreshingEntity, ResizeObserverDirective, RestClient, RestClientConfig, RestClientContinuable, RestClientList, RestClientPaged, RoutedTabActivationFailed, SearchInputState, SelectChipSpecUtil, SelectOptionChipSpecUtil, SelectionChangedEvent, SelectionEventSource, SelectionModel, SelectionModelPopupDirective, Sets, SimpleLocalisationPicker, SimpleSearchInput, Sort, SortUtil, StandardToastComponent, SubBar, SuggestionProvider, TargetValue, TemplateCompositeControl, TemplatedSelectionDialogComponent, TemporalPlainDateInterval, TemporalUtil, ThemeSpec, TimeAgoPipe, TimeDurationPipe, TimeUtil, ToIsoDateStringPipe, ToastType, TokenChunkRequest, ToolbarHeader, Translated, TranslatedConverter, TranslatedEnumValue, TranslatedText, TypedEventMessage, Unit, UnitDimension, UnitDimensionInfo, UnitInfo, UnitRegistry, UnreachableCaseError, UrlBuilder, UrlQueryParams, UuidUtil, ValueAccessorBase, ValueChangeEvent, ValueWrapper, ViewDropModelUpdateInstruction, ViewProviders, WebLocalStorage, WebSessionStorage, WebappDomainFragmentSpec, WebappDomainSpec, WebappDomainSpecService, WebappDomainSwitcherDirective, WebappUrlFragmentSwitcherConfig, WeightPipe, alphaNumStringComparator, booleanTransformFn, buildFormIntegrationProviders, coerceInterval, coerceIntervalIsoStr, createDataOptionsProvider, createElderDefaultTranslateLoader, createSelectionModel, elderChipColorLevels, elderChipColorStates, elderNamedColorRoles, elderNamedColorToken, elderNamedColors, existingOrNewElderTableModel, initSearchUrlService, isActivePagedDataContext, isContinuableDataContext, isContinuableDataSource, isDataContext, isDataSource, isDataViewMessageType, isElderEntityValueAccessor, isElderMultiEntityValueAccessor, isListDataSource, isLocalDataSource, isLocalListDataSource, isLocalPagedDataSource, isPagedDataSource, lazySample, lazySampleTime, naturalValueComparator, newElderTableModel, provideElderBrandAssets, provideElderDefaults, provideElderLanguage, provideElderTranslate, proxyControlContainer, registerLocale, runInZone, someSignal, themeInit };
|
|
39513
39618
|
//# sourceMappingURL=elderbyte-ngx-starter.mjs.map
|