@mediusinc/mng-commons 2.4.2 → 2.5.0-rc.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.
Files changed (65) hide show
  1. package/assets/i18n/en.json +14 -0
  2. package/assets/i18n/sl.json +14 -0
  3. package/esm2020/index.mjs +2 -1
  4. package/esm2020/lib/api/utils/medius-rest.util.mjs +8 -1
  5. package/esm2020/lib/components/action/editor/action-editor.component.mjs +1 -1
  6. package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +3 -2
  7. package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +3 -2
  8. package/esm2020/lib/components/form/editor/form-editor.component.mjs +4 -11
  9. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +4 -3
  10. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +7 -6
  11. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +22 -8
  12. package/esm2020/lib/components/pages/error/error-page.component.mjs +21 -0
  13. package/esm2020/lib/components/pages/index.mjs +3 -0
  14. package/esm2020/lib/components/pages/not-found/not-found-page.component.mjs +21 -0
  15. package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +18 -10
  16. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +8 -3
  17. package/esm2020/lib/components/tableview/table/table.component.mjs +14 -3
  18. package/esm2020/lib/components/tableview/tableview.component.mjs +36 -4
  19. package/esm2020/lib/descriptors/action/action-button.descriptor.mjs +2 -2
  20. package/esm2020/lib/descriptors/action/action.descriptor.mjs +55 -6
  21. package/esm2020/lib/descriptors/editor/editor.descriptor.mjs +3 -2
  22. package/esm2020/lib/descriptors/editor/field.descriptor.mjs +13 -1
  23. package/esm2020/lib/descriptors/filter/filter.descriptor.mjs +5 -4
  24. package/esm2020/lib/descriptors/table/column.descriptor.mjs +27 -3
  25. package/esm2020/lib/descriptors/tableview/tableview.descriptor.mjs +3 -2
  26. package/esm2020/lib/mng-commons.module.mjs +18 -5
  27. package/esm2020/lib/models/error-internal.model.mjs +27 -0
  28. package/esm2020/lib/models/index.mjs +2 -1
  29. package/esm2020/lib/router/route-builder.mjs +4 -3
  30. package/esm2020/lib/router/routes-builder.mjs +3 -2
  31. package/esm2020/lib/services/action-executor.service.mjs +4 -3
  32. package/esm2020/lib/services/configuration.service.mjs +9 -4
  33. package/esm2020/lib/styles/button-style.builder.mjs +10 -1
  34. package/esm2020/lib/utils/action-data-provider.util.mjs +7 -6
  35. package/esm2020/lib/utils/file.util.mjs +18 -0
  36. package/esm2020/lib/utils/index.mjs +2 -1
  37. package/esm2020/lib/utils/route.util.mjs +3 -2
  38. package/esm2020/lib/utils/tableview.util.mjs +3 -2
  39. package/esm2020/lib/utils/type.util.mjs +3 -2
  40. package/fesm2015/mediusinc-mng-commons.mjs +322 -75
  41. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  42. package/fesm2020/mediusinc-mng-commons.mjs +313 -72
  43. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  44. package/index.d.ts +1 -0
  45. package/lib/api/utils/medius-rest.util.d.ts +2 -0
  46. package/lib/components/form/editor/form-editor.component.d.ts +1 -3
  47. package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +4 -0
  48. package/lib/components/pages/error/error-page.component.d.ts +8 -0
  49. package/lib/components/pages/index.d.ts +2 -0
  50. package/lib/components/pages/not-found/not-found-page.component.d.ts +8 -0
  51. package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +1 -1
  52. package/lib/components/tableview/table/table.component.d.ts +3 -1
  53. package/lib/components/tableview/tableview.component.d.ts +4 -1
  54. package/lib/descriptors/action/action.descriptor.d.ts +2 -0
  55. package/lib/descriptors/editor/field.descriptor.d.ts +5 -0
  56. package/lib/descriptors/table/column.descriptor.d.ts +9 -1
  57. package/lib/mng-commons.module.d.ts +3 -1
  58. package/lib/models/error-internal.model.d.ts +29 -0
  59. package/lib/models/index.d.ts +1 -0
  60. package/lib/styles/button-style.builder.d.ts +1 -0
  61. package/lib/utils/file.util.d.ts +3 -0
  62. package/lib/utils/index.d.ts +1 -0
  63. package/package.json +4 -5
  64. package/scss/mng-overrides/_layout_styles.scss +4 -0
  65. package/scss/mng-overrides/_theme_dialog.scss +35 -0
@@ -86,7 +86,6 @@ import { map, catchError, first, filter, mergeMap as mergeMap$1, finalize, start
86
86
  import 'reflect-metadata';
87
87
  import * as i4 from '@angular/platform-browser';
88
88
  import { DomSanitizer } from '@angular/platform-browser';
89
- import * as FileSaver from 'file-saver';
90
89
  import { trigger, state, style, transition, animate } from '@angular/animations';
91
90
 
92
91
  /**
@@ -324,6 +323,33 @@ const typeMapBase = {
324
323
  QueryParam: MediusQueryParam
325
324
  };
326
325
 
326
+ class MngErrorInternal {
327
+ constructor(message, name = 'Commons Internal Error', options) {
328
+ this.name = name;
329
+ this.message = message;
330
+ this.id = options?.id;
331
+ this.messageCode = options?.messageCode;
332
+ this.notification = options?.notification ?? this.generateNotification();
333
+ this.details = options?.details;
334
+ this.status = options?.status;
335
+ this.statusDescription = options?.statusDescription;
336
+ this.url = options?.url;
337
+ this.cause = options?.cause;
338
+ this.stack = options?.stack ?? (options?.cause ? options.cause.stack : new Error(message).stack);
339
+ }
340
+ consoleError() {
341
+ let cause = '';
342
+ if (this.cause) {
343
+ cause += `; Caused by ${this.cause.name}: ${this.cause.message}`;
344
+ }
345
+ console.error(`${this.name}: ${this.message}${cause}`, this);
346
+ return this;
347
+ }
348
+ generateNotification() {
349
+ return { severity: 'error', summary: this.name, detail: this.message, life: 10000 };
350
+ }
351
+ }
352
+
327
353
  class ActionDataProviderUtil {
328
354
  static runGetAllOrFail(ctx) {
329
355
  const dataProviderExec = ActionDataProviderUtil.runGetAllDataProvider(ctx);
@@ -333,11 +359,11 @@ class ActionDataProviderUtil {
333
359
  const serviceExec = ActionDataProviderUtil.runGetAllService(ctx);
334
360
  return isObservable(serviceExec)
335
361
  ? serviceExec
336
- : throwError(() => new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`));
362
+ : throwError(() => new MngErrorInternal(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`, 'ActionDataProviderUtils error').consoleError());
337
363
  }
338
364
  static runFetchOrFail(ctx) {
339
365
  return (ActionDataProviderUtil.runFetch(ctx) ??
340
- throwError(() => new Error(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`)));
366
+ throwError(() => new MngErrorInternal(`Data provider and service instance could not extract fetch function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`, 'ActionDataProviderUtils error').consoleError()));
341
367
  }
342
368
  static runFetch(ctx, fallback) {
343
369
  const dataProviderExec = ActionDataProviderUtil.runFetchDataProvider(ctx);
@@ -349,7 +375,7 @@ class ActionDataProviderUtil {
349
375
  }
350
376
  static runCreateOrFail(ctx) {
351
377
  return (ActionDataProviderUtil.runCreate(ctx) ??
352
- throwError(() => new Error(`Data provider and service instance could not extract create function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item ${ctx.parameters?.item}.`)));
378
+ throwError(() => new MngErrorInternal(`Data provider and service instance could not extract create function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item ${ctx.parameters?.item}.`, 'ActionDataProviderUtils error').consoleError()));
353
379
  }
354
380
  static runCreate(ctx, fallback) {
355
381
  const dataProviderExec = ActionDataProviderUtil.runCreateDataProvider(ctx);
@@ -361,7 +387,7 @@ class ActionDataProviderUtil {
361
387
  }
362
388
  static runUpdateOrFail(ctx) {
363
389
  return (ActionDataProviderUtil.runUpdate(ctx) ??
364
- throwError(() => new Error(`Data provider and service instance could not extract update function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`)));
390
+ throwError(() => new MngErrorInternal(`Data provider and service instance could not extract update function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`, 'ActionDataProviderUtils error').consoleError()));
365
391
  }
366
392
  static runUpdate(ctx, fallback) {
367
393
  const dataProviderExec = ActionDataProviderUtil.runUpdateDataProvider(ctx);
@@ -379,7 +405,7 @@ class ActionDataProviderUtil {
379
405
  const serviceExec = ActionDataProviderUtil.runDeleteService(ctx);
380
406
  return isObservable(serviceExec)
381
407
  ? serviceExec
382
- : throwError(() => new Error(`Data provider and service instance could not extract delete function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`));
408
+ : throwError(() => new MngErrorInternal(`Data provider and service instance could not extract delete function to execute in action ${ctx.instance.action.actionNameLong} (${ctx.instance.action.model?.typeName}) for item id ${ctx.parameters?.itemId}.`, 'ActionDataProviderUtils error').consoleError());
383
409
  }
384
410
  static runGetAllService(ctx) {
385
411
  if (typeof ctx.serviceInstance !== 'undefined') {
@@ -1165,6 +1191,13 @@ class MediusRestUtil {
1165
1191
  }
1166
1192
  return params;
1167
1193
  }
1194
+ modifySortProperties(mediusQueryParams, columnDescriptors) {
1195
+ if (mediusQueryParams.sortProperty && columnDescriptors) {
1196
+ for (const [i, sortProperty] of mediusQueryParams.sortProperty.entries()) {
1197
+ mediusQueryParams.sortProperty[i] = columnDescriptors.find(el => el.property === sortProperty)?.sortProperty ?? sortProperty;
1198
+ }
1199
+ }
1200
+ }
1168
1201
  modifyFilterProperties(mediusQueryParams, filterDescriptors) {
1169
1202
  for (const filterParam of mediusQueryParams.filterParams ?? []) {
1170
1203
  const filterDescriptor = filterDescriptors.find(f => f.property === filterParam.property);
@@ -1316,7 +1349,7 @@ class TableviewUtil {
1316
1349
  */
1317
1350
  static expandAttributeDefWithTableviewTypes(attributes) {
1318
1351
  if (attributes == null) {
1319
- throw new Error('AttributeDef is null, problem with ObjectSerializer::findAttributesDefinitionByClassType?');
1352
+ throw new MngErrorInternal('AttributeDef is null, problem with ObjectSerializer::findAttributesDefinitionByClassType?', 'TableViewUtils error').consoleError();
1320
1353
  }
1321
1354
  const objectSerializer = ObjectSerializer.get();
1322
1355
  const tableviewAttributeDef = [];
@@ -2313,7 +2346,7 @@ class MngConfigurationService {
2313
2346
  }
2314
2347
  static get() {
2315
2348
  if (!MngConfigurationService._instance) {
2316
- throw new Error('Configuration service instance not set. Call init first.');
2349
+ throw new MngErrorInternal('Configuration service instance not set. Call init first.', 'ConfigurationService error').consoleError();
2317
2350
  }
2318
2351
  return MngConfigurationService._instance;
2319
2352
  }
@@ -2396,8 +2429,12 @@ class MngConfigurationService {
2396
2429
  }
2397
2430
  else {
2398
2431
  const message = `Configuration file ${url} not loaded (${err.status}): ${err.message}.`;
2399
- console.error(message);
2400
- return throwError(() => new Error(message));
2432
+ return throwError(() => new MngErrorInternal(message, 'ConfigurationService error', {
2433
+ cause: err,
2434
+ status: err.status,
2435
+ statusDescription: err.statusText,
2436
+ url: err.url ?? undefined
2437
+ }).consoleError());
2401
2438
  }
2402
2439
  }), map(configuration => {
2403
2440
  sourceInfo.configuration = configuration;
@@ -2804,7 +2841,7 @@ class MngActionExecutorService {
2804
2841
  const sourceComponent = parameters?.sourceComponent;
2805
2842
  const confirmationDescriptor = action.runConfirmationDialogDescriptor;
2806
2843
  if (typeof sourceComponent?.getConfirmationService !== 'function' || typeof sourceComponent?.getConfirmationServiceInstanceKey !== 'function') {
2807
- throw new Error(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`);
2844
+ throw new MngErrorInternal(`Source component ${sourceComponent} should be implementing IConfirmationService interface to be able to provide confirmation functionality.`, 'ActionExecutorService error').consoleError();
2808
2845
  }
2809
2846
  const item = parameters.item;
2810
2847
  const srcConfirmComponent = sourceComponent;
@@ -2980,7 +3017,7 @@ class MngActionExecutorService {
2980
3017
  triggerRowClickAction(action, event, route, tableDescriptor, dataKeyProperty) {
2981
3018
  const idProperty = dataKeyProperty ?? tableDescriptor?.dataKeyProperty ?? action?.model?.idPropertyName ?? dataKeyProperty;
2982
3019
  if (!idProperty) {
2983
- throw new Error(`Row click action ${action.actionNameLong} can not be triggered, because id property could not be found.`);
3020
+ throw new MngErrorInternal(`Row click action ${action.actionNameLong} can not be triggered, because id property could not be found.`, 'ActionExecutorService error').consoleError();
2984
3021
  }
2985
3022
  const rowItem = event?.rowItem;
2986
3023
  return this.triggerAction(action, new ActionParameters(rowItem[idProperty], event.rowItem).withRoute(route));
@@ -3762,6 +3799,15 @@ class ButtonStyleBuilder {
3762
3799
  return '';
3763
3800
  }
3764
3801
  }
3802
+ copy() {
3803
+ const builder = new ButtonStyleBuilder(this._actionLevel, this._customClass);
3804
+ builder._size = this._size;
3805
+ builder._textButton = this._textButton;
3806
+ builder._outlineButton = this._outlineButton;
3807
+ builder._raisedButton = this._raisedButton;
3808
+ builder._roundedStyle = this._roundedStyle;
3809
+ return builder;
3810
+ }
3765
3811
  get actionLevel() {
3766
3812
  return this._actionLevel;
3767
3813
  }
@@ -4090,14 +4136,14 @@ class FilterLookupDescriptor extends FilterDescriptor {
4090
4136
  this._defaultValueTo = filterValueTo;
4091
4137
  this._defaultFilterMatchMode = filterMatchMode;
4092
4138
  if (Array.isArray(filterValue) && !this.multiselect) {
4093
- throw new Error('Array default filter can only be used with a multiselect filter.');
4139
+ throw new MngErrorInternal('Array default filter can only be used with a multiselect filter.', 'FilterDescriptor error').consoleError();
4094
4140
  }
4095
4141
  if (filterMatchMode && this._matchModes && this._matchModes.indexOf(filterMatchMode) < 0) {
4096
4142
  this._defaultFilterMatchMode = undefined;
4097
4143
  console.warn(`Default filter match mode '${filterMatchMode}' could not be assigned for property ${this._property}.`);
4098
4144
  }
4099
4145
  if ((Array.isArray(filterValue) && !this.multiselect) || (this.multiselect && !Array.isArray(filterValue))) {
4100
- throw new Error(`Default value not in correct format for property ${this._property}.`);
4146
+ throw new MngErrorInternal(`Default value not in correct format for property ${this._property}.`, 'FilterDescriptor error').consoleError();
4101
4147
  }
4102
4148
  return this;
4103
4149
  }
@@ -4153,7 +4199,7 @@ class FilterLookupEnumDescriptor extends FilterLookupDescriptor {
4153
4199
  return super.withMultiselect(multiselect);
4154
4200
  }
4155
4201
  withDefaultFilter() {
4156
- throw new Error(`withDefaultFilter on FilterLookupEnumDescriptor should not be used. Use withDefaultFilterEnum instead.`);
4202
+ throw new MngErrorInternal(`withDefaultFilter on FilterLookupEnumDescriptor should not be used. Use withDefaultFilterEnum instead.`, 'FilterDescriptor error').consoleError();
4157
4203
  }
4158
4204
  withDefaultFilterEnum(filterValue, filterValueTo, filterMatchMode) {
4159
4205
  let defaultOptionValue;
@@ -4203,6 +4249,8 @@ class ColumnDescriptor {
4203
4249
  this._columnType = ColumnTypeEnum.String;
4204
4250
  this._columnDisplayType = ColumnDisplayTypeEnum.String;
4205
4251
  this._isSortEnabled = false;
4252
+ this._isMultiline = false;
4253
+ this._hasValueAsTooltip = false;
4206
4254
  // styling
4207
4255
  this._headerClassName = '';
4208
4256
  this._className = '';
@@ -4234,6 +4282,9 @@ class ColumnDescriptor {
4234
4282
  get isSortEnabled() {
4235
4283
  return this._isSortEnabled;
4236
4284
  }
4285
+ get sortProperty() {
4286
+ return this._sortProperty;
4287
+ }
4237
4288
  get filterDescriptor() {
4238
4289
  return this._filterDescriptor;
4239
4290
  }
@@ -4309,6 +4360,12 @@ class ColumnDescriptor {
4309
4360
  get getter() {
4310
4361
  return this._getter;
4311
4362
  }
4363
+ get isMultiline() {
4364
+ return this._isMultiline;
4365
+ }
4366
+ get hasValueAsTooltip() {
4367
+ return this._hasValueAsTooltip;
4368
+ }
4312
4369
  get isLocalized() {
4313
4370
  return this._isLocalized;
4314
4371
  }
@@ -4471,14 +4528,15 @@ class ColumnDescriptor {
4471
4528
  }
4472
4529
  withFilterLookupEnum(options) {
4473
4530
  if (this._columnType !== ColumnTypeEnum.Enum || !this._enumType) {
4474
- throw new Error(`Column ${this._property} is not of type enum or enum type is undefined.`);
4531
+ throw new MngErrorInternal(`Column ${this._property} is not of type enum or enum type is undefined.`, 'ColumnDescriptor error').consoleError();
4475
4532
  }
4476
4533
  const filterDescriptor = new FilterLookupEnumDescriptor(this._property, this._enumType, options, this._enumNameAsValue, this._enumTitlePath);
4477
4534
  this._filterDescriptor = filterDescriptor;
4478
4535
  return filterDescriptor;
4479
4536
  }
4480
- withSort(isEnabled = true) {
4537
+ withSort(isEnabled = true, sortProperty) {
4481
4538
  this._isSortEnabled = isEnabled;
4539
+ this._sortProperty = sortProperty;
4482
4540
  return this;
4483
4541
  }
4484
4542
  withDefaultSort(asc = true) {
@@ -4497,6 +4555,14 @@ class ColumnDescriptor {
4497
4555
  this._getter = getter;
4498
4556
  return this;
4499
4557
  }
4558
+ withMultiline(isMultiline = true) {
4559
+ this._isMultiline = isMultiline;
4560
+ return this;
4561
+ }
4562
+ withValueAsTooltip(valueAsTooltip = true) {
4563
+ this._hasValueAsTooltip = valueAsTooltip;
4564
+ return this;
4565
+ }
4500
4566
  localized(existsProperty) {
4501
4567
  if (existsProperty) {
4502
4568
  this._localizationExistsProperty = existsProperty;
@@ -4515,6 +4581,7 @@ class ColumnDescriptor {
4515
4581
  obj._jsonPath = this._jsonPath;
4516
4582
  obj._title = this._title;
4517
4583
  obj._isSortEnabled = this._isSortEnabled;
4584
+ obj._sortProperty = this._sortProperty;
4518
4585
  obj._columnType = this._columnType;
4519
4586
  obj._columnDisplayType = this._columnDisplayType;
4520
4587
  obj._filterDescriptor = this._filterDescriptor?.copy();
@@ -4540,6 +4607,8 @@ class ColumnDescriptor {
4540
4607
  obj._hasCopyToClipboard = this._hasCopyToClipboard;
4541
4608
  obj._template = this._template;
4542
4609
  obj._getter = this._getter;
4610
+ obj._isMultiline = this._isMultiline;
4611
+ obj._hasValueAsTooltip = this._hasValueAsTooltip;
4543
4612
  obj._isLocalized = this._isLocalized;
4544
4613
  obj._localizationExistsProperty = this._localizationExistsProperty;
4545
4614
  }
@@ -5316,7 +5385,7 @@ class TableviewDescriptor {
5316
5385
  */
5317
5386
  withModifiedType(property, columnType, fieldType, columnDisplayType) {
5318
5387
  if (columnType === ColumnTypeEnum.Enum) {
5319
- throw new Error('Do not use with types where args are required');
5388
+ throw new MngErrorInternal('Do not use with types where args are required', 'TableViewDescriptor error').consoleError();
5320
5389
  }
5321
5390
  const attributeDef = TableviewUtil.getAttributeDefMap(this._modelType).find(atribute => atribute.name === property);
5322
5391
  if (attributeDef != null) {
@@ -6226,6 +6295,7 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
6226
6295
  this._hasLookupExcludeValues = false;
6227
6296
  this._excludeFilterProperty = '';
6228
6297
  this._excludeValueProperty = '';
6298
+ this._searchEnabled = false;
6229
6299
  this._mainTableDescriptor = mainTableDescriptor;
6230
6300
  this._lookupTableDescriptor = lookupTableDescriptor;
6231
6301
  this._actions.push(FieldManyToManyEditorActionEnum.Add, FieldManyToManyEditorActionEnum.Delete);
@@ -6254,6 +6324,12 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
6254
6324
  get lookupTableDescriptor() {
6255
6325
  return this._lookupTableDescriptor;
6256
6326
  }
6327
+ get searchEnabled() {
6328
+ return this._searchEnabled;
6329
+ }
6330
+ get searchFields() {
6331
+ return this._searchFields;
6332
+ }
6257
6333
  withLookup(getAll, serviceType) {
6258
6334
  const dataProvider = new TableviewDataProvider(this._mainTableDescriptor.model.type);
6259
6335
  if (serviceType) {
@@ -6277,6 +6353,11 @@ class FieldManyToManyEditorDescriptor extends AFieldDescriptor {
6277
6353
  this._excludeValueProperty = valueProperty;
6278
6354
  return this;
6279
6355
  }
6356
+ withSearch(enabled = true, searchFields) {
6357
+ this._searchEnabled = enabled;
6358
+ this._searchFields = searchFields;
6359
+ return this;
6360
+ }
6280
6361
  copy() {
6281
6362
  const field = new FieldManyToManyEditorDescriptor(this._editor, this._property, this._mainTableDescriptor.copy(), this._lookupTableDescriptor.copy());
6282
6363
  this.copyFieldsTo(field);
@@ -6543,7 +6624,7 @@ class EditorDescriptor {
6543
6624
  removeField(property) {
6544
6625
  const fieldIdx = this._fields.findIndex(f => f.property === property);
6545
6626
  if (fieldIdx < 0) {
6546
- throw new Error(`Field ${property} does not exist.`);
6627
+ throw new MngErrorInternal(`Field ${property} does not exist.`, 'EditorDescriptor error').consoleError();
6547
6628
  }
6548
6629
  for (const group of this._groups) {
6549
6630
  const groupFieldIdx = group.fields.findIndex(f => f instanceof AFieldDescriptor && f.property === property);
@@ -7167,7 +7248,7 @@ class TypeUtil {
7167
7248
  return enumName;
7168
7249
  }
7169
7250
  console.warn('Reflect metadata could not be found for enum, you might experience some issues in production build.', enumType);
7170
- throw new Error('Could not fined enum name');
7251
+ throw new MngErrorInternal('Could not fined enum name', 'TypeUtils error').consoleError();
7171
7252
  }
7172
7253
  /**
7173
7254
  * Gets type's id property from reflect metadata.
@@ -7685,6 +7766,24 @@ class ExportUtils {
7685
7766
  }
7686
7767
  }
7687
7768
 
7769
+ class FileUtil {
7770
+ static saveAs(blob, filename) {
7771
+ const blobUrl = URL.createObjectURL(blob);
7772
+ const link = document.createElement('a');
7773
+ link.style.display = 'none';
7774
+ link.target = '_blank';
7775
+ link.href = blobUrl;
7776
+ link.download = filename;
7777
+ document.body.appendChild(link);
7778
+ link.dispatchEvent(new MouseEvent('click', {
7779
+ bubbles: true,
7780
+ cancelable: true,
7781
+ view: window
7782
+ }));
7783
+ document.body.removeChild(link);
7784
+ }
7785
+ }
7786
+
7688
7787
  class ModelDescriptor {
7689
7788
  constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
7690
7789
  this._type = modelType;
@@ -7781,7 +7880,7 @@ class ActionButtonDescriptor {
7781
7880
  descriptor._label = this._label;
7782
7881
  descriptor._icon = this._icon;
7783
7882
  descriptor._iconPosition = this._iconPosition;
7784
- descriptor._styleClass = this._styleClass;
7883
+ descriptor._styleClass = this._styleClass.copy();
7785
7884
  descriptor._badge = this._badge;
7786
7885
  descriptor._tooltip = this._tooltip;
7787
7886
  return descriptor;
@@ -7881,7 +7980,7 @@ class ActionDescriptor {
7881
7980
  this._model = model;
7882
7981
  this._actionName = actionName;
7883
7982
  if ((parentType && !parentProperty) || (!parentProperty && parentProperty)) {
7884
- throw new Error(`Provide both the parent type and parent property or none: ${parentType}, ${parentProperty}.`);
7983
+ throw new MngErrorInternal(`Provide both the parent type and parent property or none: ${parentType}, ${parentProperty}.`, 'ActionDescriptor error').consoleError();
7885
7984
  }
7886
7985
  this._parentType = parentType;
7887
7986
  this._parentTypeName = parentType ? TypeUtil.findTypeName(parentType) : undefined;
@@ -7930,7 +8029,7 @@ class ActionDescriptor {
7930
8029
  }
7931
8030
  get runFunction() {
7932
8031
  if (!this._runFunction) {
7933
- throw new Error('Run function is not defined and cannot be invoked');
8032
+ throw new MngErrorInternal('Run function is not defined and cannot be invoked', 'ActionDescriptor error').consoleError();
7934
8033
  }
7935
8034
  return this._runFunction;
7936
8035
  }
@@ -8016,7 +8115,7 @@ class ActionDescriptor {
8016
8115
  }
8017
8116
  withServiceType(serviceType) {
8018
8117
  if (!this._model) {
8019
- throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);
8118
+ throw new MngErrorInternal(`Cannot set data provider if no model type is provided for action ${this._actionName}`, 'ActionDescriptor error').consoleError();
8020
8119
  }
8021
8120
  this._dataProvider = new DataProvider(this._model.type, serviceType);
8022
8121
  return this;
@@ -8126,6 +8225,36 @@ class ActionDescriptor {
8126
8225
  this._subactions.push(...subactions);
8127
8226
  return this;
8128
8227
  }
8228
+ copyTo(descriptor) {
8229
+ descriptor._i18nModelActionBaseKey = this._i18nModelActionBaseKey;
8230
+ descriptor._type = this._type;
8231
+ descriptor._activationTrigger = this._activationTrigger;
8232
+ descriptor._position = this._position;
8233
+ descriptor._level = this._level;
8234
+ descriptor._positionTableviewCategories = this._positionTableviewCategories;
8235
+ descriptor._tableviewCategory = this._tableviewCategory;
8236
+ descriptor._routeUrl = this._routeUrl;
8237
+ descriptor._dataProvider = this._dataProvider;
8238
+ descriptor._runFunction = this._runFunction;
8239
+ descriptor._isVisibleFunction = this._isVisibleFunction;
8240
+ descriptor._isEnabledFunction = this._isEnabledFunction;
8241
+ descriptor._runConfirmationDialogDescriptor = this._runConfirmationDialogDescriptor;
8242
+ descriptor._hasRunNotificationSuccess = this._hasRunNotificationSuccess;
8243
+ descriptor._runNotificationSuccessTitle = this._runNotificationSuccessTitle;
8244
+ descriptor._runNotificationSuccessMessage = this._runNotificationSuccessMessage;
8245
+ descriptor._hasRunNotificationError = this._hasRunNotificationError;
8246
+ descriptor._runNotificationErrorTitle = this._runNotificationErrorTitle;
8247
+ descriptor._runNotificationErrorMessage = this._runNotificationErrorMessage;
8248
+ descriptor._afterRunAction = this._afterRunAction;
8249
+ descriptor._onRunErrorAction = this._onRunErrorAction;
8250
+ descriptor._permissions = this._permissions;
8251
+ descriptor._button = this._button.copy();
8252
+ descriptor._hasItemsSelection = this._hasItemsSelection;
8253
+ descriptor._component = this._component;
8254
+ descriptor._subactionsAsMenu = this._subactionsAsMenu;
8255
+ descriptor._subactions = this._subactions;
8256
+ return descriptor;
8257
+ }
8129
8258
  }
8130
8259
  class ActionSimpleDescriptor extends ActionDescriptor {
8131
8260
  constructor(actionName, modelType, idProperty, titleProperty, i18nBaseKey) {
@@ -8174,7 +8303,7 @@ class ActionEditorDescriptor extends ActionDescriptor {
8174
8303
  return this._dataProvider;
8175
8304
  }
8176
8305
  get runFunction() {
8177
- throw new Error('Run function cannot be used in editor action. Use submit function instead!');
8306
+ throw new MngErrorInternal('Run function cannot be used in editor action. Use submit function instead!', 'ActionDescriptor error').consoleError();
8178
8307
  }
8179
8308
  get fetchFunction() {
8180
8309
  return this._fetchFunction;
@@ -8199,7 +8328,7 @@ class ActionEditorDescriptor extends ActionDescriptor {
8199
8328
  }
8200
8329
  withServiceType(serviceType) {
8201
8330
  if (!this._model) {
8202
- throw new Error(`Cannot set data provider if no model type is provided for action ${this._actionName}`);
8331
+ throw new MngErrorInternal(`Cannot set data provider if no model type is provided for action ${this._actionName}`, 'ActionDescriptor error').consoleError();
8203
8332
  }
8204
8333
  this._dataProvider = new EditorDataProvider(this._model.type, serviceType);
8205
8334
  return this;
@@ -8377,6 +8506,24 @@ class ActionLinkDescriptor extends ActionDescriptor {
8377
8506
  this._target = '_self';
8378
8507
  this._isStyleLink = false;
8379
8508
  }
8509
+ static fromActionDescriptor(actionDescriptor) {
8510
+ const descriptor = new ActionLinkDescriptor(actionDescriptor.model, actionDescriptor.actionName);
8511
+ actionDescriptor.copyTo(descriptor);
8512
+ descriptor._dataProvider = undefined;
8513
+ descriptor._runConfirmationDialogDescriptor = undefined;
8514
+ descriptor._hasRunNotificationSuccess = false;
8515
+ descriptor._runNotificationSuccessTitle = undefined;
8516
+ descriptor._runNotificationSuccessMessage = undefined;
8517
+ descriptor._hasRunNotificationError = false;
8518
+ descriptor._runNotificationErrorTitle = undefined;
8519
+ descriptor._runNotificationErrorMessage = undefined;
8520
+ descriptor._afterRunAction = undefined;
8521
+ descriptor._onRunErrorAction = undefined;
8522
+ descriptor._hasItemsSelection = false;
8523
+ descriptor._subactionsAsMenu = false;
8524
+ descriptor._subactions = [];
8525
+ return descriptor;
8526
+ }
8380
8527
  get url() {
8381
8528
  return this._url;
8382
8529
  }
@@ -9078,9 +9225,6 @@ class MngFormEditorComponent {
9078
9225
  this.submitLoading = false;
9079
9226
  this.viewContainerSubject = new ReplaySubject(1);
9080
9227
  this.viewContainer$ = this.viewContainerSubject.asObservable();
9081
- // extra features input
9082
- this.isSubmitButtonVisible = false;
9083
- this.isFormDisabled = null;
9084
9228
  // event outputs
9085
9229
  this.formSubmitEventEmitter = new EventEmitter();
9086
9230
  this.form = new FormGroup({});
@@ -9289,7 +9433,7 @@ class MngFormEditorComponent {
9289
9433
  return false;
9290
9434
  }
9291
9435
  updateFormState() {
9292
- this.formOptions.formState.disabled = this.isFormDisabled !== null ? this.isFormDisabled === true : this.descriptor?.disabled;
9436
+ this.formOptions.formState.disabled = this.descriptor?.disabled;
9293
9437
  }
9294
9438
  /**
9295
9439
  * @private Sets form state based on editor descriptor type.
@@ -9308,10 +9452,10 @@ class MngFormEditorComponent {
9308
9452
  }
9309
9453
  }
9310
9454
  MngFormEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormEditorComponent, deps: [{ token: MngCommonsService }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
9311
- MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", viewContainerInit: ["viewContainer", "viewContainerInit"], isSubmitButtonVisible: "isSubmitButtonVisible", isFormDisabled: "isFormDisabled" }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i5$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9455
+ MngFormEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormEditorComponent, isStandalone: true, selector: "mng-form-editor", inputs: { descriptor: "descriptor", submitLoading: "submitLoading", item: "item", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { formSubmitEventEmitter: "formSubmit" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n", dependencies: [{ kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$3.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i5$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9312
9456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormEditorComponent, decorators: [{
9313
9457
  type: Component,
9314
- args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" [class.hidden]=\"!isSubmitButtonVisible\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n" }]
9458
+ args: [{ standalone: true, selector: 'mng-form-editor', imports: [FormlyModule, ReactiveFormsModule, MessagesModule, AsyncPipe, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\" (ngSubmit)=\"onSubmit($event)\">\n <formly-form [form]=\"form\" [fields]=\"formFields\" [options]=\"formOptions\" [model]=\"formModel\"></formly-form>\n <button #submitButton pButton type=\"submit\" class=\"hidden\" [disabled]=\"form.disabled\" [loading]=\"(submitLoading$ | async) ?? false\"></button>\n</form>\n<p-messages [value]=\"formMessages\" [enableService]=\"false\"></p-messages>\n" }]
9315
9459
  }], ctorParameters: function () { return [{ type: MngCommonsService }, { type: i2.TranslateService }]; }, propDecorators: { descriptor: [{
9316
9460
  type: Input
9317
9461
  }], submitLoading: [{
@@ -9321,10 +9465,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
9321
9465
  }], viewContainerInit: [{
9322
9466
  type: Input,
9323
9467
  args: ['viewContainer']
9324
- }], isSubmitButtonVisible: [{
9325
- type: Input
9326
- }], isFormDisabled: [{
9327
- type: Input
9328
9468
  }], formSubmitEventEmitter: [{
9329
9469
  type: Output,
9330
9470
  args: ['formSubmit']
@@ -9577,7 +9717,7 @@ class MngAutocompleteComponent {
9577
9717
  this.itemsValueProperty = 'value';
9578
9718
  }
9579
9719
  else {
9580
- throw new Error(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`);
9720
+ throw new MngErrorInternal(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`, 'MngAutocompleteComponent error').consoleError();
9581
9721
  }
9582
9722
  }
9583
9723
  }
@@ -9754,7 +9894,7 @@ class MngDropdownComponent {
9754
9894
  this.itemsValueProperty = 'value';
9755
9895
  }
9756
9896
  else {
9757
- throw new Error(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`);
9897
+ throw new MngErrorInternal(`Invalid use with value (${this.itemsLabelPropertyInit}) and label (${this.itemsLabelPropertyInit}) property setup.`, 'MngDropdownComponent error').consoleError();
9758
9898
  }
9759
9899
  }
9760
9900
  this.itemsSubscription = this.dataProvider
@@ -10251,7 +10391,7 @@ class MngActionEditorComponent {
10251
10391
  }
10252
10392
  }
10253
10393
  MngActionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngActionEditorComponent, deps: [{ token: i0.Injector }, { token: i2.TranslateService }, { token: MngActionExecutorService }, { token: MngCommonsService }, { token: MngNavigationService }, { token: i3.DynamicDialogRef, optional: true }, { token: i3.DynamicDialogConfig, optional: true }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
10254
- MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: "action", itemId: "itemId", item: "item", actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor\n *ngIf=\"action.editorDescriptor && (loading$ | async) === false\"\n [descriptor]=\"action.editorDescriptor\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n <mng-action\n *ngFor=\"let action of footerLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n <div>\n <mng-action\n *ngFor=\"let action of footerRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i5$2.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { kind: "component", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "viewContainer", "isSubmitButtonVisible", "isFormDisabled"], outputs: ["formSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10394
+ MngActionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: "action", itemId: "itemId", item: "item", actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor\n *ngIf=\"action.editorDescriptor && (loading$ | async) === false\"\n [descriptor]=\"action.editorDescriptor\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n <mng-action\n *ngFor=\"let action of footerLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n <div>\n <mng-action\n *ngFor=\"let action of footerRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i5$2.ProgressSpinner, selector: "p-progressSpinner", inputs: ["style", "styleClass", "strokeWidth", "fill", "animationDuration"] }, { kind: "component", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "viewContainer"], outputs: ["formSubmit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10255
10395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngActionEditorComponent, decorators: [{
10256
10396
  type: Component,
10257
10397
  args: [{ standalone: true, selector: 'mng-action-editor', imports: [NgIf, ToolbarModule, MngActionComponent, NgForOf, AsyncPipe, ProgressSpinnerModule, MngFormEditorComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor\n *ngIf=\"action.editorDescriptor && (loading$ | async) === false\"\n [descriptor]=\"action.editorDescriptor\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n <mng-action\n *ngFor=\"let action of footerLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n <div>\n <mng-action\n *ngFor=\"let action of footerRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n </div>\n</div>\n" }]
@@ -10725,6 +10865,11 @@ class MngTableColumnValueComponent {
10725
10865
  if (this.descriptor.columnDisplayType === ColumnDisplayTypeEnum.Currency) {
10726
10866
  this.currency = this.descriptor.currencyFromProperty ? this.item[this.descriptor.currencyFromProperty] : this.descriptor.currencyCode ?? 'EUR';
10727
10867
  }
10868
+ else if (this.descriptor.columnDisplayType === ColumnDisplayTypeEnum.String) {
10869
+ if (this.descriptor.isMultiline) {
10870
+ this.className += ' multiline';
10871
+ }
10872
+ }
10728
10873
  if (this.descriptor.maxWidth) {
10729
10874
  this.styleMaxWidth = this.descriptor.maxWidth;
10730
10875
  }
@@ -10756,7 +10901,7 @@ class MngTableColumnValueComponent {
10756
10901
  }
10757
10902
  }
10758
10903
  MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableColumnValueComponent, deps: [{ token: i0.ElementRef }, { token: i2$2.MessageService }, { token: i2.TranslateService }, { token: JsonPathPipe }, { token: MngGetterPipe }, { token: MngTemplatePipe }], target: i0.ɵɵFactoryTarget.Component });
10759
- MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableColumnValueComponent, isStandalone: true, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, host: { properties: { "style.max-width.px": "this.styleMaxWidth", "class": "this.className" } }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnDisplayType\">\n <i\n *ngIf=\"descriptor.localizationExistsProperty && !item[descriptor.localizationExistsProperty]\"\n class=\"pi pi-exclamation-circle\"\n [pTooltip]=\"'mngTable.translationMissing' | translate\"></i>\n <ng-container *ngSwitchCase=\"columnDisplayTypeString\">\n {{ value }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeHtml\">\n <span [innerHTML]=\"value\"></span>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeNumber\">\n {{ value | number : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeCurrency\">\n {{ value | currency : currency : descriptor.currencyDisplay : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeDate\">\n {{ value | date : descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\">\n <i [class]=\"value | boolean : descriptor.booleanYes : descriptor.booleanNo : true\"></i>\n </ng-container>\n <ng-template #booleanText>\n {{ value | boolean : descriptor.booleanYes : descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeEnum\">\n {{ value | enum : descriptor.enumType : descriptor.enumTitlePath : descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeComponent\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: value,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n<div class=\"help-buttons\" *ngIf=\"descriptor.hasCopyToClipboard\">\n <button pButton pRipple type=\"button\" icon=\"pi pi-copy\" class=\"p-button-rounded p-button-info p-button-sm\" (click)=\"copyToClipboard($event)\"></button>\n</div>\n", styles: [":host{display:inline-block;overflow:hidden}:host.nowrap{white-space:nowrap;text-overflow:ellipsis}.help-buttons{display:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}.help-buttons .p-button{height:1.9rem;width:1.9rem;padding:0}\n"], dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: MngBooleanPipe, name: "boolean" }, { kind: "pipe", type: MngEnumPipe, name: "enum" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10904
+ MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableColumnValueComponent, isStandalone: true, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, host: { properties: { "style.max-width.px": "this.styleMaxWidth", "class": "this.className" } }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnDisplayType\">\n <i\n *ngIf=\"descriptor.localizationExistsProperty && !item[descriptor.localizationExistsProperty]\"\n class=\"pi pi-exclamation-circle\"\n [pTooltip]=\"'mngTable.translationMissing' | translate\"></i>\n <ng-container *ngSwitchCase=\"columnDisplayTypeString\">\n <span *ngIf=\"descriptor.hasValueAsTooltip\" [pTooltip]=\"value\" tooltipPosition=\"left\">{{ value }}</span>\n <ng-container *ngIf=\"!descriptor.hasValueAsTooltip\">{{ value }}</ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeHtml\">\n <span [innerHTML]=\"value\"></span>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeNumber\">\n {{ value | number : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeCurrency\">\n {{ value | currency : currency : descriptor.currencyDisplay : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeDate\">\n {{ value | date : descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\">\n <i [class]=\"value | boolean : descriptor.booleanYes : descriptor.booleanNo : true\"></i>\n </ng-container>\n <ng-template #booleanText>\n {{ value | boolean : descriptor.booleanYes : descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeEnum\">\n {{ value | enum : descriptor.enumType : descriptor.enumTitlePath : descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeComponent\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: value,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n<div class=\"help-buttons\" *ngIf=\"descriptor.hasCopyToClipboard\">\n <button pButton pRipple type=\"button\" icon=\"pi pi-copy\" class=\"p-button-rounded p-button-info p-button-sm\" (click)=\"copyToClipboard($event)\"></button>\n</div>\n", styles: [":host{display:inline-block;overflow:hidden}:host.nowrap{white-space:nowrap;text-overflow:ellipsis}:host.multiline{white-space:pre-wrap;word-wrap:break-word}.help-buttons{display:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}.help-buttons .p-button{height:1.9rem;width:1.9rem;padding:0}\n"], dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: MngBooleanPipe, name: "boolean" }, { kind: "pipe", type: MngEnumPipe, name: "enum" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10760
10905
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
10761
10906
  type: Component,
10762
10907
  args: [{ standalone: true, selector: 'mng-table-column-value', imports: [
@@ -10773,7 +10918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
10773
10918
  MngComponentDirective,
10774
10919
  ButtonModule,
10775
10920
  RippleModule
10776
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnDisplayType\">\n <i\n *ngIf=\"descriptor.localizationExistsProperty && !item[descriptor.localizationExistsProperty]\"\n class=\"pi pi-exclamation-circle\"\n [pTooltip]=\"'mngTable.translationMissing' | translate\"></i>\n <ng-container *ngSwitchCase=\"columnDisplayTypeString\">\n {{ value }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeHtml\">\n <span [innerHTML]=\"value\"></span>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeNumber\">\n {{ value | number : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeCurrency\">\n {{ value | currency : currency : descriptor.currencyDisplay : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeDate\">\n {{ value | date : descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\">\n <i [class]=\"value | boolean : descriptor.booleanYes : descriptor.booleanNo : true\"></i>\n </ng-container>\n <ng-template #booleanText>\n {{ value | boolean : descriptor.booleanYes : descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeEnum\">\n {{ value | enum : descriptor.enumType : descriptor.enumTitlePath : descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeComponent\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: value,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n<div class=\"help-buttons\" *ngIf=\"descriptor.hasCopyToClipboard\">\n <button pButton pRipple type=\"button\" icon=\"pi pi-copy\" class=\"p-button-rounded p-button-info p-button-sm\" (click)=\"copyToClipboard($event)\"></button>\n</div>\n", styles: [":host{display:inline-block;overflow:hidden}:host.nowrap{white-space:nowrap;text-overflow:ellipsis}.help-buttons{display:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}.help-buttons .p-button{height:1.9rem;width:1.9rem;padding:0}\n"] }]
10921
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnDisplayType\">\n <i\n *ngIf=\"descriptor.localizationExistsProperty && !item[descriptor.localizationExistsProperty]\"\n class=\"pi pi-exclamation-circle\"\n [pTooltip]=\"'mngTable.translationMissing' | translate\"></i>\n <ng-container *ngSwitchCase=\"columnDisplayTypeString\">\n <span *ngIf=\"descriptor.hasValueAsTooltip\" [pTooltip]=\"value\" tooltipPosition=\"left\">{{ value }}</span>\n <ng-container *ngIf=\"!descriptor.hasValueAsTooltip\">{{ value }}</ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeHtml\">\n <span [innerHTML]=\"value\"></span>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeNumber\">\n {{ value | number : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeCurrency\">\n {{ value | currency : currency : descriptor.currencyDisplay : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeDate\">\n {{ value | date : descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\">\n <i [class]=\"value | boolean : descriptor.booleanYes : descriptor.booleanNo : true\"></i>\n </ng-container>\n <ng-template #booleanText>\n {{ value | boolean : descriptor.booleanYes : descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeEnum\">\n {{ value | enum : descriptor.enumType : descriptor.enumTitlePath : descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeComponent\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: value,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n<div class=\"help-buttons\" *ngIf=\"descriptor.hasCopyToClipboard\">\n <button pButton pRipple type=\"button\" icon=\"pi pi-copy\" class=\"p-button-rounded p-button-info p-button-sm\" (click)=\"copyToClipboard($event)\"></button>\n</div>\n", styles: [":host{display:inline-block;overflow:hidden}:host.nowrap{white-space:nowrap;text-overflow:ellipsis}:host.multiline{white-space:pre-wrap;word-wrap:break-word}.help-buttons{display:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}.help-buttons .p-button{height:1.9rem;width:1.9rem;padding:0}\n"] }]
10777
10922
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$2.MessageService }, { type: i2.TranslateService }, { type: JsonPathPipe }, { type: MngGetterPipe }, { type: MngTemplatePipe }]; }, propDecorators: { descriptor: [{
10778
10923
  type: Input
10779
10924
  }], item: [{
@@ -10821,6 +10966,7 @@ class MngTableComponent {
10821
10966
  this.offset = 0;
10822
10967
  this.multiSortMeta = null;
10823
10968
  this.filterMetadata = {};
10969
+ this.globalFilterFields = [];
10824
10970
  // infinite scroll
10825
10971
  this.infiniteScroll = false;
10826
10972
  this.tableFullHeightOffset = null;
@@ -11006,6 +11152,12 @@ class MngTableComponent {
11006
11152
  if (changes['viewContainerInit'] && !changes['viewContainerInit'].firstChange) {
11007
11153
  this.initializeViewContainer();
11008
11154
  }
11155
+ if (this.globalFilterFieldsInit) {
11156
+ this.globalFilterFields = this.globalFilterFieldsInit;
11157
+ }
11158
+ else {
11159
+ this.globalFilterFields = (this.descriptor || this.initialDescriptor).columns.map((el) => el.property);
11160
+ }
11009
11161
  }
11010
11162
  ngOnDestroy() {
11011
11163
  this.dataProviderSubscription?.unsubscribe();
@@ -11088,6 +11240,7 @@ class MngTableComponent {
11088
11240
  this.dataProviderLatestQueryParam = queryParam;
11089
11241
  this.dataProviderLatestQueryParamVersion++;
11090
11242
  MediusRestUtil.get().modifyFilterProperties(queryParam, this.filterDescriptors);
11243
+ MediusRestUtil.get().modifySortProperties(queryParam, this.descriptor?.columns);
11091
11244
  this.dataProviderSubscription = this.dataProvider
11092
11245
  ?.getAll(queryParam, this.dataProviderService, this.descriptor?.isLocalized ? this.mngCommonsService.appDataLanguage ?? undefined : undefined)
11093
11246
  .subscribe({
@@ -11292,7 +11445,7 @@ class MngTableComponent {
11292
11445
  }
11293
11446
  }
11294
11447
  MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.TranslateService }, { token: MngCommonsService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
11295
- MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableComponent, isStandalone: true, selector: "mng-table", inputs: { initialDescriptor: ["descriptor", "initialDescriptor"], items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", actions: "actions", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth" }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th\n *ngIf=\"col.isSortEnabled\"\n pResizableColumn\n [pSortableColumn]=\"col.property\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th\n pResizableColumn\n *ngIf=\"!col.isSortEnabled\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"\n col.className +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor ? ' mng-column-filter-' + col.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i4$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i4$4.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "directive", type: i4$4.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: i4$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i4$4.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i4$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i4$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "pipe", type: MngI18nPropertyPipe, name: "i18nProperty" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { kind: "pipe", type: MngClassMapPipe, name: "mngClassMapPipe" }, { kind: "pipe", type: MngLocaleDefaultRowClassPipe, name: "mngLocaleDefaultRowClass" }, { kind: "component", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i6$2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11448
+ MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableComponent, isStandalone: true, selector: "mng-table", inputs: { initialDescriptor: ["descriptor", "initialDescriptor"], items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", actions: "actions", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth", globalFilterFieldsInit: ["globalFilterFields", "globalFilterFieldsInit"] }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [globalFilterFields]=\"globalFilterFields\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th\n *ngIf=\"col.isSortEnabled\"\n pResizableColumn\n [pSortableColumn]=\"col.property\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th\n pResizableColumn\n *ngIf=\"!col.isSortEnabled\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"\n col.className +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor ? ' mng-column-filter-' + col.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i4$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i4$4.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "directive", type: i4$4.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: i4$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i4$4.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i4$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i4$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "pipe", type: MngI18nPropertyPipe, name: "i18nProperty" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { kind: "pipe", type: MngClassMapPipe, name: "mngClassMapPipe" }, { kind: "pipe", type: MngLocaleDefaultRowClassPipe, name: "mngLocaleDefaultRowClass" }, { kind: "component", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i6$2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11296
11449
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableComponent, decorators: [{
11297
11450
  type: Component,
11298
11451
  args: [{ standalone: true, selector: 'mng-table', imports: [
@@ -11312,7 +11465,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
11312
11465
  MngTableColumnValueComponent,
11313
11466
  MngActionComponent,
11314
11467
  SkeletonModule
11315
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th\n *ngIf=\"col.isSortEnabled\"\n pResizableColumn\n [pSortableColumn]=\"col.property\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th\n pResizableColumn\n *ngIf=\"!col.isSortEnabled\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"\n col.className +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor ? ' mng-column-filter-' + col.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n" }]
11468
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n [globalFilterFields]=\"globalFilterFields\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th\n *ngIf=\"col.isSortEnabled\"\n pResizableColumn\n [pSortableColumn]=\"col.property\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th\n pResizableColumn\n *ngIf=\"!col.isSortEnabled\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"\n col.className +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor ? ' mng-column-filter-' + col.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n" }]
11316
11469
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.TranslateService }, { type: MngCommonsService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService, decorators: [{
11317
11470
  type: Optional
11318
11471
  }] }]; }, propDecorators: { initialDescriptor: [{
@@ -11345,6 +11498,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
11345
11498
  type: Input
11346
11499
  }], columnActionMinWidth: [{
11347
11500
  type: Input
11501
+ }], globalFilterFieldsInit: [{
11502
+ type: Input,
11503
+ args: ['globalFilterFields']
11348
11504
  }], loadEventEmitter: [{
11349
11505
  type: Output,
11350
11506
  args: ['tableLoad']
@@ -11386,6 +11542,8 @@ class MngTableviewComponent {
11386
11542
  this.subscriptions = [];
11387
11543
  this.hasItemSelectionAction = false;
11388
11544
  this.selectedItems = [];
11545
+ this.showingNotification = null;
11546
+ this.notificationCutoff = 70;
11389
11547
  }
11390
11548
  ngOnInit() {
11391
11549
  this.viewContainerService.setActions(this.actions);
@@ -11444,12 +11602,40 @@ class MngTableviewComponent {
11444
11602
  selectionChange(selectedItems) {
11445
11603
  this.selectedItems = selectedItems;
11446
11604
  }
11605
+ getNotificationIconClass(message) {
11606
+ if (message?.icon)
11607
+ return message.icon;
11608
+ switch (message?.severity) {
11609
+ case 'info':
11610
+ return 'pi-info-circle';
11611
+ case 'warning':
11612
+ return 'pi-exclamation-triangle';
11613
+ case 'error':
11614
+ return 'pi-times-circle';
11615
+ case 'success':
11616
+ return 'pi-check';
11617
+ default:
11618
+ return '';
11619
+ }
11620
+ }
11447
11621
  }
11448
11622
  MngTableviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$2.MessageService }, { token: i2.TranslateService }, { token: i2$2.ConfirmationService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService }], target: i0.ɵɵFactoryTarget.Component });
11449
- MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i5$4.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
11623
+ MngTableviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngTableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast>\n <ng-template let-message pTemplate=\"message\">\n <span [class]=\"'p-toast-message-icon pi ' + getNotificationIconClass(message)\"></span>\n <div class=\"p-toast-message-text\">\n <div class=\"p-toast-summary\">{{ message.summary }}</div>\n <div class=\"p-toast-detail\">{{ message.detail.slice(0, notificationCutoff) + (message.detail.length > notificationCutoff ? '...' : '') }}</div>\n <div *ngIf=\"message.detail.length > notificationCutoff\" (click)=\"showingNotification = message\" class=\"p-link font-semibold text-sm mt-2 flex align-items-center\">\n <i class=\"pi pi-chevron-down mr-1\"></i>{{ 'notification.details' | translate }}\n </div>\n </div>\n </ng-template>\n </p-toast>\n <p-dialog\n [(visible)]=\"showingNotification\"\n [styleClass]=\"'p-fluid mng-dialog mng-dialog-xs ' + 'mng-message-detail-dialog mng-message-detail-dialog-' + (showingNotification?.severity ?? '')\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-dialog-title font-bold mng-dialog-success\">\n <span [class]=\"'mr-2 pi ' + getNotificationIconClass(showingNotification)\"></span>\n {{ showingNotification?.summary ?? '' }}\n </span>\n </ng-template>\n <div>\n {{ showingNotification?.detail ?? '' }}\n </div>\n </p-dialog>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i5$4.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i4$3.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
11450
11624
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngTableviewComponent, decorators: [{
11451
11625
  type: Component,
11452
- args: [{ standalone: true, selector: 'mng-tableview', imports: [ToastModule, ToolbarModule, NgForOf, TranslateModule, NgTemplateOutlet, NgIf, MngActionComponent, MngTableComponent, MngTemplateDirective, RouterOutlet], providers: [MessageService, ConfirmationService, MngViewContainerComponentService], template: "<div class=\"mng-tableview\">\n <p-toast></p-toast>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
11626
+ args: [{ standalone: true, selector: 'mng-tableview', imports: [
11627
+ ToastModule,
11628
+ DialogModule,
11629
+ ToolbarModule,
11630
+ NgForOf,
11631
+ TranslateModule,
11632
+ NgTemplateOutlet,
11633
+ NgIf,
11634
+ MngActionComponent,
11635
+ MngTableComponent,
11636
+ MngTemplateDirective,
11637
+ RouterOutlet
11638
+ ], providers: [MessageService, ConfirmationService, MngViewContainerComponentService], template: "<div class=\"mng-tableview\">\n <p-toast>\n <ng-template let-message pTemplate=\"message\">\n <span [class]=\"'p-toast-message-icon pi ' + getNotificationIconClass(message)\"></span>\n <div class=\"p-toast-message-text\">\n <div class=\"p-toast-summary\">{{ message.summary }}</div>\n <div class=\"p-toast-detail\">{{ message.detail.slice(0, notificationCutoff) + (message.detail.length > notificationCutoff ? '...' : '') }}</div>\n <div *ngIf=\"message.detail.length > notificationCutoff\" (click)=\"showingNotification = message\" class=\"p-link font-semibold text-sm mt-2 flex align-items-center\">\n <i class=\"pi pi-chevron-down mr-1\"></i>{{ 'notification.details' | translate }}\n </div>\n </div>\n </ng-template>\n </p-toast>\n <p-dialog\n [(visible)]=\"showingNotification\"\n [styleClass]=\"'p-fluid mng-dialog mng-dialog-xs ' + 'mng-message-detail-dialog mng-message-detail-dialog-' + (showingNotification?.severity ?? '')\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-dialog-title font-bold mng-dialog-success\">\n <span [class]=\"'mr-2 pi ' + getNotificationIconClass(showingNotification)\"></span>\n {{ showingNotification?.summary ?? '' }}\n </span>\n </ng-template>\n <div>\n {{ showingNotification?.detail ?? '' }}\n </div>\n </p-dialog>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
11453
11639
  }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$2.MessageService }, { type: i2.TranslateService }, { type: i2$2.ConfirmationService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
11454
11640
  type: Input
11455
11641
  }], dataProvider: [{
@@ -11478,16 +11664,17 @@ class AMngTableviewRouteComponent {
11478
11664
  this.actions = this.createActionDescriptors();
11479
11665
  }
11480
11666
  createActionDescriptors() {
11667
+ const editDescriptor = this.createActionDescriptorForEdit();
11481
11668
  return [
11482
11669
  this.createActionDescriptorForDetails(),
11483
11670
  this.createActionDescriptorForAdd(),
11484
- this.createActionDescriptorForEdit(),
11671
+ editDescriptor,
11485
11672
  this.createActionDescriptorForDelete(),
11486
11673
  this.createActionDescriptorForRefresh(),
11487
11674
  this.createActionDescriptorForExport(),
11488
11675
  this.createActionDescriptorForDataTranslate(),
11489
11676
  //details actions
11490
- this.createActionDescriptorForDetailsEditLink(),
11677
+ this.createActionDescriptorForDetailsEditLink(this.descriptor.model, editDescriptor),
11491
11678
  this.createActionDescriptorForDetailsDelete()
11492
11679
  ].filter(e => e != null);
11493
11680
  }
@@ -11500,15 +11687,22 @@ class AMngTableviewRouteComponent {
11500
11687
  createActionDescriptorForEdit(descriptor = this.descriptor.editEditor) {
11501
11688
  return !this.routeData.tableviewActions || this.routeData.tableviewActions.hasEdit ? new ActionEditorEditDescriptor(descriptor) : null;
11502
11689
  }
11503
- createActionDescriptorForDetailsEditLink(descriptor = this.descriptor.model) {
11690
+ createActionDescriptorForDetailsEditLink(descriptor = this.descriptor.model, editDescriptor) {
11504
11691
  if (!this.routeData.tableviewActions || this.routeData.tableviewActions.hasEdit) {
11505
- const action = new ActionLinkDescriptor(descriptor, ActionEditorEditDescriptor.ACTION_NAME)
11692
+ const action = editDescriptor
11693
+ ? ActionLinkDescriptor.fromActionDescriptor(editDescriptor)
11694
+ : new ActionLinkDescriptor(descriptor, ActionEditorEditDescriptor.ACTION_NAME);
11695
+ action
11506
11696
  .withTableviewCategory(TableviewActionDefaultCategories.EDIT)
11507
11697
  .withPositionTableviewCategories([TableviewActionDefaultCategories.DETAILS])
11508
11698
  .withPosition(ActionPositionEnum.FooterLeft)
11509
11699
  .withRouterLink('./edit');
11510
11700
  action.button.styleClass.withActionLevel(StyleLevelEnum.Secondary);
11511
- action.button.withIcon('pi pi-pencil');
11701
+ action.button.styleClass.withSize(StyleSizeEnum.Normal);
11702
+ action.button.styleClass.withRoundedButton(ButtonStyleRoundedEnum.DEFAULT);
11703
+ action.button.withLabel();
11704
+ if (!editDescriptor)
11705
+ action.button.withIcon('pi pi-pencil');
11512
11706
  return action;
11513
11707
  }
11514
11708
  return null;
@@ -11547,7 +11741,7 @@ class AMngTableviewRouteComponent {
11547
11741
  return ActionDataProviderUtil.runGetAllOrFail(ctx).pipe(map(res => {
11548
11742
  const blob = new Blob([JSON.stringify(res.pageData, undefined, 4)], { type: 'application/json;charset=utf-8' });
11549
11743
  const typeName = ctx.instance.action.model?.typeName ?? '';
11550
- FileSaver.saveAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.json`);
11744
+ FileUtil.saveAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.json`);
11551
11745
  return undefined;
11552
11746
  }));
11553
11747
  })
@@ -11566,7 +11760,7 @@ class AMngTableviewRouteComponent {
11566
11760
  }
11567
11761
  const blob = new Blob([ExportUtils.prepareDataForExport(res.pageData, ',', this.descriptor, this.translateService)], { type: 'text/csv;charset=utf-8' });
11568
11762
  const typeName = ctx.instance.action.model?.typeName ?? '';
11569
- FileSaver.saveAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.csv`);
11763
+ FileUtil.saveAs(blob, `${typeName ? typeName + '_' : ''}${ctx.instance.action.actionName}.csv`);
11570
11764
  return undefined;
11571
11765
  }));
11572
11766
  })
@@ -11796,7 +11990,7 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
11796
11990
  if (typeof value === 'object') {
11797
11991
  const labelProperty = this.descriptor.itemsLabelProperty ?? this.descriptor.dialogTableDescriptor?.model.titlePropertyName;
11798
11992
  if (!labelProperty) {
11799
- throw new Error('Could not determine label property.');
11993
+ throw new MngErrorInternal('Could not determine label property.', 'MngFormlyFieldLookupDialog error').consoleError();
11800
11994
  }
11801
11995
  this.fieldLabelFormControl.setValue(value[labelProperty]);
11802
11996
  }
@@ -11806,7 +12000,7 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
11806
12000
  }
11807
12001
  }
11808
12002
  MngFormlyFieldLookupDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
11809
- MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i5$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12003
+ MngFormlyFieldLookupDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i5$1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11810
12004
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
11811
12005
  type: Component,
11812
12006
  args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [TranslateModule, FormlyModule, ReactiveFormsModule, ButtonModule, RippleModule, DialogModule, AsyncPipe, NgIf, MngTableComponent, MessagesModule, InputTextModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
@@ -11858,7 +12052,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
11858
12052
  })
11859
12053
  .withSubmitFunction(ctx => {
11860
12054
  if (!ctx.parameters.item) {
11861
- return throwError(() => new Error(`No item was provided in context, edit cannot be done.`));
12055
+ return throwError(() => new MngErrorInternal(`No item was provided in context, add cannot be done.`, 'FormlyFieldTableDialogFormComponent error').consoleError());
11862
12056
  }
11863
12057
  this.formState.submittedOn = Date.now();
11864
12058
  let value = this.formControl.value;
@@ -11886,7 +12080,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
11886
12080
  })
11887
12081
  .withSubmitFunction(ctx => {
11888
12082
  if (!ctx.parameters.item) {
11889
- return throwError(() => new Error(`No item was provided in context, edit cannot be done.`));
12083
+ return throwError(() => new MngErrorInternal(`No item was provided in context, edit cannot be done.`, 'FormlyFieldTableDialogFormComponent error').consoleError());
11890
12084
  }
11891
12085
  this.formState.submittedOn = Date.now();
11892
12086
  const formControlValue = this.formControl.value;
@@ -11909,7 +12103,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
11909
12103
  .withButtonDescriptor(new ActionButtonDescriptor().withStyleClass(new ButtonStyleBuilder(StyleLevelEnum.Danger).withSize(StyleSizeEnum.ExtraSmall)))
11910
12104
  .withRunFunction(ctx => {
11911
12105
  if (!ctx.parameters.item) {
11912
- return throwError(() => new Error(`No item was provided in context, delete cannot be done.`));
12106
+ return throwError(() => new MngErrorInternal(`No item was provided in context, delete cannot be done.`, 'FormlyFieldTableDialogFormComponent error').consoleError());
11913
12107
  }
11914
12108
  let formControlValue = this.formControl.value;
11915
12109
  const compareProperty = this.descriptor.tableDescriptor.dataKeyProperty
@@ -11927,7 +12121,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
11927
12121
  this.formControl.markAsDirty();
11928
12122
  }
11929
12123
  else {
11930
- return throwError(() => new Error('Cannot compare items, please provide main table data key property or model id property.'));
12124
+ return throwError(() => new MngErrorInternal('Cannot compare items, please provide main table data key property or model id property.', 'FormlyFieldTableDialogFormComponent error').consoleError());
11931
12125
  }
11932
12126
  this.formControl.markAsTouched();
11933
12127
  return of(ctxItem);
@@ -11997,7 +12191,7 @@ class MngFormlyFieldTableDialogFormComponent extends FieldType {
11997
12191
  }
11998
12192
  }
11999
12193
  MngFormlyFieldTableDialogFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
12000
- MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12194
+ MngFormlyFieldTableDialogFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldTableDialogFormComponent, isStandalone: true, selector: "mng-formly-table-dialog-form-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12001
12195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogFormComponent, decorators: [{
12002
12196
  type: Component,
12003
12197
  args: [{ standalone: true, selector: 'mng-formly-table-dialog-form-field', imports: [TranslateModule, NgForOf, NgIf, MngActionComponent, MngTableComponent, MngTemplateDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.tableDescriptor\" [items]=\"items$\" [actions]=\"actions\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <mng-action *ngFor=\"let action of toolbarRightActions\" [action]=\"action\" [viewContainer]=\"viewContainer\"></mng-action>\n </div>\n </ng-template>\n</mng-table>\n", styles: [".submit-button{display:none!important;visibility:hidden}\n"] }]
@@ -12020,6 +12214,7 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
12020
12214
  this.dialogIsLoading$ = this.dialogIsLoadingSubject.asObservable();
12021
12215
  this.hasAddAction = false;
12022
12216
  this.hasDeleteAction = false;
12217
+ this.searchDebounceSubject = new Subject();
12023
12218
  this.subscriptions = [];
12024
12219
  }
12025
12220
  ngOnInit() {
@@ -12048,6 +12243,9 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
12048
12243
  value: v ?? []
12049
12244
  });
12050
12245
  });
12246
+ this.subscriptions.push(this.searchDebounceSubject.pipe(debounceTime(200), distinctUntilChanged()).subscribe(query => {
12247
+ this.addTableComponent?.primeTable.filterGlobal(query, 'contains');
12248
+ }));
12051
12249
  this.subscriptions.push(subscription);
12052
12250
  }
12053
12251
  ngAfterViewInit() {
@@ -12130,7 +12328,7 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
12130
12328
  ? this.descriptor.mainTableDescriptor.dataKeyProperty
12131
12329
  : this.descriptor.mainTableDescriptor.model.idPropertyName;
12132
12330
  if (!compareProperty) {
12133
- throw new Error('Cannot compare items, please provide main table data key property or model id property.');
12331
+ throw new MngErrorInternal('Cannot compare items, please provide main table data key property or model id property.', 'FormlyFieldTableDialogMultiselectComponent error').consoleError();
12134
12332
  }
12135
12333
  value = value.filter((i) => i[compareProperty] !== item[compareProperty]);
12136
12334
  this.formControl.patchValue(value);
@@ -12138,13 +12336,20 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
12138
12336
  this.formControl.markAsDirty();
12139
12337
  this.dialogAreItemsLoaded = false;
12140
12338
  }
12339
+ onSearch(event) {
12340
+ const query = event.target.value;
12341
+ this.searchDebounceSubject.next(query);
12342
+ }
12141
12343
  }
12142
12344
  MngFormlyFieldTableDialogMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
12143
- MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12345
+ MngFormlyFieldTableDialogMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngFormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n <ng-template *ngIf=\"descriptor.searchEnabled\" mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i6$3.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i5.Ripple, selector: "[pRipple]" }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i13.InputText, selector: "[pInputText]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12144
12346
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
12145
12347
  type: Component,
12146
- args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, NgIf, AsyncPipe, MngTableComponent, DialogModule, ButtonModule, RippleModule, MngTemplateDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
12147
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
12348
+ args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [TranslateModule, NgIf, AsyncPipe, MngTableComponent, DialogModule, ButtonModule, RippleModule, MngTemplateDirective, InputTextModule, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.mainTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n <ng-template *ngIf=\"descriptor.searchEnabled\" mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
12349
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { addTableComponent: [{
12350
+ type: ViewChild,
12351
+ args: ['addTableComponent']
12352
+ }] } });
12148
12353
 
12149
12354
  class MngFormlyFieldTabsComponent extends FieldType {
12150
12355
  }
@@ -12333,7 +12538,7 @@ class RouteUtil {
12333
12538
  }
12334
12539
  else if (path[0].startsWith('../')) {
12335
12540
  // TODO: process multi upper folder
12336
- throw new Error('Not implemented');
12541
+ throw new MngErrorInternal('Not implemented', 'RouteUtils error').consoleError();
12337
12542
  }
12338
12543
  else {
12339
12544
  return RouteUtil.removeEmptyPathSegments([...basePath, ...path]);
@@ -13058,6 +13263,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImpor
13058
13263
  args: ['window:resize', ['$event']]
13059
13264
  }] } });
13060
13265
 
13266
+ class MngErrorPageComponent {
13267
+ constructor(mngCommons) {
13268
+ this.mngCommons = mngCommons;
13269
+ }
13270
+ }
13271
+ MngErrorPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngErrorPageComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
13272
+ MngErrorPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngErrorPageComponent, isStandalone: true, selector: "mng-error-page", ngImport: i0, template: "<div class=\"exception-body error\">\n <div class=\"exception-panel\">\n <h1>{{ 'pages.error.title' | translate }}</h1>\n <h3>{{ 'pages.error.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer\">\n <img alt=\"logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" />\n <img alt=\"logo_appname\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname\" />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
13273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngErrorPageComponent, decorators: [{
13274
+ type: Component,
13275
+ args: [{ standalone: true, selector: 'mng-error-page', imports: [ButtonModule, TranslateModule, RouterLink], template: "<div class=\"exception-body error\">\n <div class=\"exception-panel\">\n <h1>{{ 'pages.error.title' | translate }}</h1>\n <h3>{{ 'pages.error.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer\">\n <img alt=\"logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" />\n <img alt=\"logo_appname\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname\" />\n </div>\n</div>\n" }]
13276
+ }], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
13277
+
13278
+ class MngNotFoundPageComponent {
13279
+ constructor(mngCommons) {
13280
+ this.mngCommons = mngCommons;
13281
+ }
13282
+ }
13283
+ MngNotFoundPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngNotFoundPageComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component });
13284
+ MngNotFoundPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: MngNotFoundPageComponent, isStandalone: true, selector: "mng-not-found-page", ngImport: i0, template: "<div class=\"exception-body notfound\">\n <div class=\"exception-panel\">\n <h1>{{ 'pages.notFound.title' | translate }}</h1>\n <h3>{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer\">\n <img alt=\"logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" />\n <img alt=\"logo_appname\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname\" />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
13285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngNotFoundPageComponent, decorators: [{
13286
+ type: Component,
13287
+ args: [{ standalone: true, selector: 'mng-not-found-page', imports: [ButtonModule, RouterLink, TranslateModule], template: "<div class=\"exception-body notfound\">\n <div class=\"exception-panel\">\n <h1>{{ 'pages.notFound.title' | translate }}</h1>\n <h3>{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer\">\n <img alt=\"logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" />\n <img alt=\"logo_appname\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname\" />\n </div>\n</div>\n" }]
13288
+ }], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
13289
+
13061
13290
  function mngCommonsInitializerProvider(mngCommonsInit) {
13062
13291
  return () => mngCommonsInit.initialize();
13063
13292
  }
@@ -13552,7 +13781,10 @@ const standalone = [
13552
13781
  MngFormEditorComponent,
13553
13782
  MngActionComponent,
13554
13783
  MngActionEditorComponent,
13555
- MngDataLanguageDropdownComponent
13784
+ MngDataLanguageDropdownComponent,
13785
+ // pages
13786
+ MngErrorPageComponent,
13787
+ MngNotFoundPageComponent
13556
13788
  ];
13557
13789
  class MngCommonsModule {
13558
13790
  static forRoot(config) {
@@ -13657,7 +13889,10 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
13657
13889
  MngFormEditorComponent,
13658
13890
  MngActionComponent,
13659
13891
  MngActionEditorComponent,
13660
- MngDataLanguageDropdownComponent], exports: [AutoCompleteModule,
13892
+ MngDataLanguageDropdownComponent,
13893
+ // pages
13894
+ MngErrorPageComponent,
13895
+ MngNotFoundPageComponent], exports: [AutoCompleteModule,
13661
13896
  BreadcrumbModule,
13662
13897
  ButtonModule,
13663
13898
  CalendarModule,
@@ -13746,7 +13981,10 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
13746
13981
  MngFormEditorComponent,
13747
13982
  MngActionComponent,
13748
13983
  MngActionEditorComponent,
13749
- MngDataLanguageDropdownComponent] });
13984
+ MngDataLanguageDropdownComponent,
13985
+ // pages
13986
+ MngErrorPageComponent,
13987
+ MngNotFoundPageComponent] });
13750
13988
  MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: MngCommonsModule, imports: [
13751
13989
  // angular modules
13752
13990
  CommonModule,
@@ -13795,7 +14033,10 @@ MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
13795
14033
  MngFormEditorComponent,
13796
14034
  MngActionComponent,
13797
14035
  MngActionEditorComponent,
13798
- MngDataLanguageDropdownComponent, AutoCompleteModule,
14036
+ MngDataLanguageDropdownComponent,
14037
+ // pages
14038
+ MngErrorPageComponent,
14039
+ MngNotFoundPageComponent, AutoCompleteModule,
13799
14040
  BreadcrumbModule,
13800
14041
  ButtonModule,
13801
14042
  CalendarModule,
@@ -14166,13 +14407,13 @@ class RouteBuilder {
14166
14407
  }
14167
14408
  toParent() {
14168
14409
  if (!this.parent) {
14169
- throw new Error('Parent was not provided.');
14410
+ throw new MngErrorInternal('Parent was not provided.', 'RouteBuilder error').consoleError();
14170
14411
  }
14171
14412
  return this.parent;
14172
14413
  }
14173
14414
  toRoot() {
14174
14415
  if (!this.root) {
14175
- throw new Error('Root was not provided.');
14416
+ throw new MngErrorInternal('Root was not provided.', 'RouteBuilder error').consoleError();
14176
14417
  }
14177
14418
  return this.root;
14178
14419
  }
@@ -14361,7 +14602,7 @@ class RoutesBuilder {
14361
14602
  }
14362
14603
  toRoute() {
14363
14604
  if (!this.currentRoute) {
14364
- throw new Error('No routes were added!');
14605
+ throw new MngErrorInternal('No routes were added!', 'RoutesBuilder error').consoleError();
14365
14606
  }
14366
14607
  return this.currentRoute;
14367
14608
  }
@@ -14604,5 +14845,5 @@ function EnumName(typeName) {
14604
14845
  * Generated bundle index. Do not edit.
14605
14846
  */
14606
14847
 
14607
- export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDisplayTypeEnum, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, ExportUtils, FieldActionDescriptor, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDataLanguageDropdownComponent, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormEvent, MngFormEventTypeEnum, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldActionComponent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldNoLabelWrapperComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngLocaleDefaultRowClassPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngTopbarUserComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, ObjectUtil, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TableviewRouteBuilderInternal, TitleProperty, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, provideMngCommons, typeMapBase };
14848
+ export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDisplayTypeEnum, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, ExportUtils, FieldActionDescriptor, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FileUtil, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDataLanguageDropdownComponent, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorInternal, MngErrorMapperService, MngErrorPageComponent, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormEvent, MngFormEventTypeEnum, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldActionComponent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldNoLabelWrapperComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngLocaleDefaultRowClassPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngNotFoundPageComponent, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngTopbarUserComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, ObjectUtil, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TableviewRouteBuilderInternal, TitleProperty, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, provideMngCommons, typeMapBase };
14608
14849
  //# sourceMappingURL=mediusinc-mng-commons.mjs.map