ontimize-web-ngx 15.2.2 → 15.3.1

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 (53) hide show
  1. package/esm2020/lib/components/o-service-base-component.class.mjs +1 -1
  2. package/esm2020/lib/components/o-service-component.class.mjs +12 -3
  3. package/esm2020/lib/components/table/column/cell-renderer/action/o-table-cell-renderer-action.component.mjs +7 -1
  4. package/esm2020/lib/components/table/column/o-column.class.mjs +4 -1
  5. package/esm2020/lib/components/table/column/o-table-column.component.mjs +1 -2
  6. package/esm2020/lib/components/table/extensions/header/table-button/o-table-button.component.mjs +10 -2
  7. package/esm2020/lib/components/table/extensions/header/table-buttons/o-table-buttons.component.mjs +3 -3
  8. package/esm2020/lib/components/table/extensions/header/table-quickfilter/o-table-quickfilter.component.mjs +3 -2
  9. package/esm2020/lib/components/table/o-table-base.class.mjs +1 -1
  10. package/esm2020/lib/components/table/o-table.component.mjs +97 -14
  11. package/esm2020/lib/components/tree/o-tree-dao.service.mjs +1 -1
  12. package/esm2020/lib/components/tree/o-tree.component.mjs +17 -24
  13. package/esm2020/lib/components/tree/o-tree.datasource.mjs +1 -1
  14. package/esm2020/lib/components/tree/tree-node/tree-node.component.mjs +27 -6
  15. package/esm2020/lib/i18n/i18n.mjs +4 -1
  16. package/esm2020/lib/interfaces/layout-manager-component.interface.mjs +1 -1
  17. package/esm2020/lib/layouts/form-layout/dialog/o-form-layout-dialog.component.mjs +5 -2
  18. package/esm2020/lib/layouts/form-layout/guards/o-form-layout-can-activate-child.guard.mjs +3 -2
  19. package/esm2020/lib/layouts/form-layout/o-form-layout-manager-base.class.mjs +1 -1
  20. package/esm2020/lib/layouts/form-layout/o-form-layout-manager.component.mjs +8 -4
  21. package/esm2020/lib/layouts/form-layout/split-pane/o-form-layout-split-pane.component.mjs +1 -1
  22. package/esm2020/lib/layouts/form-layout/tabgroup/o-form-layout-tabgroup.component.mjs +20 -34
  23. package/esm2020/lib/services/o-form-layout-manager.service.mjs +7 -1
  24. package/esm2020/lib/services/snackbar.service.mjs +1 -1
  25. package/esm2020/lib/services/state/o-table-component-state.service.mjs +2 -2
  26. package/esm2020/lib/types/form-layout-manager-context.type.mjs +2 -0
  27. package/esm2020/lib/types/table/o-table-global-config.type.mjs +1 -1
  28. package/esm2020/lib/types/tree-flat-node.type.mjs +2 -0
  29. package/esm2020/lib/util/util.mjs +8 -1
  30. package/fesm2015/ontimize-web-ngx.mjs +241 -111
  31. package/fesm2015/ontimize-web-ngx.mjs.map +1 -1
  32. package/fesm2020/ontimize-web-ngx.mjs +238 -111
  33. package/fesm2020/ontimize-web-ngx.mjs.map +1 -1
  34. package/lib/components/o-service-base-component.class.d.ts +1 -0
  35. package/lib/components/o-service-component.class.d.ts +5 -3
  36. package/lib/components/table/extensions/header/table-button/o-table-button.component.d.ts +1 -0
  37. package/lib/components/table/o-table-base.class.d.ts +13 -5
  38. package/lib/components/table/o-table.component.d.ts +11 -2
  39. package/lib/components/tree/o-tree-dao.service.d.ts +1 -1
  40. package/lib/components/tree/o-tree.component.d.ts +5 -16
  41. package/lib/components/tree/o-tree.datasource.d.ts +2 -1
  42. package/lib/components/tree/tree-node/tree-node.component.d.ts +6 -2
  43. package/lib/i18n/i18n.d.ts +3 -0
  44. package/lib/interfaces/layout-manager-component.interface.d.ts +1 -0
  45. package/lib/layouts/form-layout/o-form-layout-manager-base.class.d.ts +2 -0
  46. package/lib/layouts/form-layout/o-form-layout-manager.component.d.ts +2 -1
  47. package/lib/layouts/form-layout/tabgroup/o-form-layout-tabgroup.component.d.ts +2 -2
  48. package/lib/services/o-form-layout-manager.service.d.ts +5 -1
  49. package/lib/types/form-layout-manager-context.type.d.ts +3 -0
  50. package/lib/types/table/o-table-global-config.type.d.ts +2 -0
  51. package/lib/types/tree-flat-node.type.d.ts +14 -0
  52. package/lib/util/util.d.ts +2 -0
  53. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, EventEmitter, Directive, Host, Self, Optional, Input, HostListener, forwardRef, Output, Injectable, Injector, Component, ContentChildren, ChangeDetectorRef, Pipe, NgModule, ViewChild, ElementRef, ViewEncapsulation, ViewContainerRef, Inject, NgZone, HostBinding, ViewChildren, ChangeDetectionStrategy, inject, CUSTOM_ELEMENTS_SCHEMA, TemplateRef, SkipSelf, isDevMode, ContentChild, Renderer2, APP_INITIALIZER } from '@angular/core';
3
3
  import moment from 'moment';
4
- import { isObservable, from, of, Subscription, Subject, Observable, timer, combineLatest, BehaviorSubject, ReplaySubject, merge, fromEvent, map as map$1 } from 'rxjs';
4
+ import { isObservable, from, of, Subscription, Subject, Observable, timer, combineLatest, BehaviorSubject, ReplaySubject, concatMap, delay, merge, fromEvent, map as map$1 } from 'rxjs';
5
5
  export { Observable, Subject } from 'rxjs';
6
6
  import * as i1$7 from '@angular/common/http';
7
7
  import { HttpClient, HttpHeaders, HttpRequest, HttpEventType, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
@@ -731,6 +731,13 @@ class Util {
731
731
  const clonedArray = arr.map((x) => Object.assign({}, x));
732
732
  return clonedArray;
733
733
  }
734
+ static getLastActivateRoute(routeSnapshot) {
735
+ let child = routeSnapshot;
736
+ while (child.firstChild) {
737
+ child = child.firstChild;
738
+ }
739
+ return child;
740
+ }
734
741
  }
735
742
  Util.columnAggregates = ['sum', 'count', 'avg', 'min', 'max'];
736
743
 
@@ -1234,6 +1241,7 @@ const MAP = {
1234
1241
  'MESSAGES.ERROR_403_TEXT': 'You are not authorized to view this page.',
1235
1242
  'MESSAGES.ERROR_403_TEXT_BUTTON': 'Navigate back',
1236
1243
  'MESSAGES.AVOID_QUERY_WITHOUT_QUICKFILTER_COLUMNS': 'No column has been selected to perform the search.',
1244
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operation is not allowed due to the table is read-only',
1237
1245
  'INPUT.COMBO.EMPTY': 'No results found',
1238
1246
  'INPUT.COMBO.MESSAGE_TRIGGER': ' (+{0} others)',
1239
1247
  'TABLE.FILTER_BY_COLUMN.CHECK_ALL': 'Select all',
@@ -1535,6 +1543,7 @@ const MAP = {
1535
1543
  'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Error al exportar los datos de la tabla.',
1536
1544
  'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Se han exportado los datos de la tabla correctamente.',
1537
1545
  'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operación no permitida debido a restricciones de permisos.',
1546
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operación no permitida debido a que la tabla es de solo lectura',
1538
1547
  'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegación no permitida debido a restricciones de permisos.',
1539
1548
  'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegación redirigida debido a restricciones de permisos.',
1540
1549
  'MESSAGES.ERROR_403_TEXT': 'No está autorizado para ver esta página.',
@@ -1832,6 +1841,7 @@ const MAP = {
1832
1841
  'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Erro na exportação dos dados da tabela.',
1833
1842
  'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Os dados da tabela foram exportados corretamente.',
1834
1843
  'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operação não permitida por falta de permissões.',
1844
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operação não permitida porque a tabela é somente leitura',
1835
1845
  'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegação não permitida por falta de permissões.',
1836
1846
  'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegção redirecionada por falta de permissões.',
1837
1847
  'MESSAGES.ERROR_403_TEXT': 'Não tem autorização para ver esta página.',
@@ -7135,6 +7145,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
7135
7145
  type: Input
7136
7146
  }] } });
7137
7147
 
7148
+ class OFormLayoutManagerService {
7149
+ constructor(injector) {
7150
+ this.injector = injector;
7151
+ this.registeredFormLayoutManagers = {};
7152
+ }
7153
+ registerFormLayoutManager(comp) {
7154
+ this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
7155
+ }
7156
+ removeFormLayoutManager(comp) {
7157
+ delete this.registeredFormLayoutManagers[comp.getAttribute()];
7158
+ }
7159
+ get activeFormLayoutManager() {
7160
+ return this._activeFormLayoutManager;
7161
+ }
7162
+ set activeFormLayoutManager(arg) {
7163
+ this._activeFormLayoutManager = arg;
7164
+ }
7165
+ set context(value) {
7166
+ this._context = value;
7167
+ }
7168
+ get context() {
7169
+ return this._context;
7170
+ }
7171
+ }
7172
+ OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
7173
+ OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
7174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
7175
+ type: Injectable,
7176
+ args: [{
7177
+ providedIn: 'root'
7178
+ }]
7179
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
7180
+
7138
7181
  class OFormLayoutDialogComponent {
7139
7182
  constructor(dialogRef, injector, data) {
7140
7183
  this.dialogRef = dialogRef;
@@ -7165,7 +7208,9 @@ class OFormLayoutDialogComponent {
7165
7208
  }
7166
7209
  }
7167
7210
  updateNavigation(data) {
7168
- this.label = this.formLayoutManager.getLabelFromData(data);
7211
+ const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
7212
+ const context = formLayoutManagerService.context;
7213
+ this.label = (context === null || context === void 0 ? void 0 : context.label) || this.formLayoutManager.getLabelFromData(data);
7169
7214
  }
7170
7215
  updateActiveData(data) {
7171
7216
  this.data = Object.assign(this.data, data);
@@ -12475,33 +12520,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
12475
12520
  }]
12476
12521
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
12477
12522
 
12478
- class OFormLayoutManagerService {
12479
- constructor(injector) {
12480
- this.injector = injector;
12481
- this.registeredFormLayoutManagers = {};
12482
- }
12483
- registerFormLayoutManager(comp) {
12484
- this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
12485
- }
12486
- removeFormLayoutManager(comp) {
12487
- delete this.registeredFormLayoutManagers[comp.getAttribute()];
12488
- }
12489
- get activeFormLayoutManager() {
12490
- return this._activeFormLayoutManager;
12491
- }
12492
- set activeFormLayoutManager(arg) {
12493
- this._activeFormLayoutManager = arg;
12494
- }
12495
- }
12496
- OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
12497
- OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
12498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
12499
- type: Injectable,
12500
- args: [{
12501
- providedIn: 'root'
12502
- }]
12503
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
12504
-
12505
12523
  class OModulesInfoService {
12506
12524
  constructor(injector, router) {
12507
12525
  this.injector = injector;
@@ -13123,8 +13141,9 @@ class OTableComponentStateService extends AbstractComponentStateService {
13123
13141
  };
13124
13142
  }
13125
13143
  getSortState() {
13144
+ var _a;
13126
13145
  const sortColumns = [];
13127
- this.component.sort.getSortColumns().forEach(sortData => {
13146
+ (_a = this.component.sort) === null || _a === void 0 ? void 0 : _a.getSortColumns().forEach(sortData => {
13128
13147
  sortColumns.push(sortData.id + Codes.COLUMNS_ALIAS_SEPARATOR + sortData.direction);
13129
13148
  });
13130
13149
  return {
@@ -15168,7 +15187,8 @@ class CanActivateFormLayoutChildGuard {
15168
15187
  }
15169
15188
  formLayoutManager.canAddDetailComponent().subscribe(res => {
15170
15189
  if (res) {
15171
- formLayoutManager.addDetailComponent(childRoute, state.url.substring(0, state.url.indexOf('?')));
15190
+ const context = this.oFormLayoutService.context;
15191
+ formLayoutManager.addDetailComponent(childRoute, state.url.substring(0, state.url.indexOf('?')), context);
15172
15192
  }
15173
15193
  });
15174
15194
  return false;
@@ -15209,6 +15229,7 @@ class OFormLayoutTabGroupComponent {
15209
15229
  this.tabsModificationsCache = [];
15210
15230
  this.dialogService = injector.get(DialogService);
15211
15231
  this.router = this.injector.get(Router);
15232
+ this.actRoute = this.injector.get(ActivatedRoute);
15212
15233
  }
15213
15234
  get state() {
15214
15235
  return this.formLayoutManager.state;
@@ -15404,7 +15425,9 @@ class OFormLayoutTabGroupComponent {
15404
15425
  index = this.data.findIndex((item) => Object.keys(keysValues).every(key => keysValues[key] == item.params[key]));
15405
15426
  }
15406
15427
  if (index >= 0) {
15407
- let label = this.formLayoutManager.getLabelFromData(data);
15428
+ const oFormLayoutManagerService = this.injector.get(OFormLayoutManagerService);
15429
+ const context = oFormLayoutManagerService.context;
15430
+ let label = (context === null || context === void 0 ? void 0 : context.label) || this.formLayoutManager.getLabelFromData(data);
15408
15431
  this.tabGroup.selectedIndex = (index + 1);
15409
15432
  label = label.length ? label : this.formLayoutManager.getLabelFromUrlParams(this.data[index].params);
15410
15433
  this.data[index].label = label;
@@ -15443,39 +15466,21 @@ class OFormLayoutTabGroupComponent {
15443
15466
  this.state.tabsData = this.state.tabsData.filter(tabData => !tabData.insertionMode);
15444
15467
  if (this.state.tabsData.length >= 1 && (this.state.tabsData[0].url || '').length > 0) {
15445
15468
  this.showLoading.next(true);
15446
- const extras = {};
15447
- extras[Codes.QUERY_PARAMS] = this.state.tabsData[0].queryParams;
15448
- extras[Codes.QUERY_PARAMS][Codes.INSERTION_MODE] = `${this.state.tabsData[0].insertionMode}`;
15449
- if (this.formLayoutManager) {
15450
- this.formLayoutManager.setAsActiveFormLayoutManager();
15451
- }
15452
- this.router.navigate([this.state.tabsData[0].url], extras).then(() => {
15453
- if (this.data[0] && this.data[0].component && this.state.tabsData.length > 1) {
15454
- setTimeout(() => {
15455
- this.createTabsFromState();
15456
- }, 0);
15457
- }
15458
- else {
15459
- this.showLoading.next(false);
15460
- }
15469
+ const zone = this.injector.get(NgZone);
15470
+ from(this.state.tabsData).pipe(concatMap(tab => of(tab).pipe(delay(100)))).subscribe((tab) => {
15471
+ const extras = {};
15472
+ extras['relativeTo'] = this.actRoute;
15473
+ extras[Codes.QUERY_PARAMS] = tab.queryParams;
15474
+ extras[Codes.QUERY_PARAMS][Codes.INSERTION_MODE] = tab.insertionMode;
15475
+ if (this.formLayoutManager) {
15476
+ this.formLayoutManager.setAsActiveFormLayoutManager();
15477
+ }
15478
+ zone.run(() => this.router.navigate([tab.url], extras)
15479
+ .then(() => this.showLoading.next(false))
15480
+ .catch(() => this.showLoading.next(true)));
15461
15481
  });
15462
15482
  }
15463
15483
  }
15464
- createTabsFromState() {
15465
- const tabComponent = this.data[0].component;
15466
- const stateTabsData = this.state.tabsData.slice(1);
15467
- if (stateTabsData.length > 0) {
15468
- stateTabsData.forEach((tabData) => {
15469
- setTimeout(() => {
15470
- const newDetailData = this.createDetailComponent(tabComponent, tabData);
15471
- this.data.push(newDetailData);
15472
- }, 0);
15473
- });
15474
- }
15475
- else {
15476
- this.showLoading.next(false);
15477
- }
15478
- }
15479
15484
  createDetailComponent(component, paramsObj) {
15480
15485
  const newDetailComp = {
15481
15486
  params: paramsObj.params,
@@ -15933,6 +15938,7 @@ class OFormLayoutManagerComponent {
15933
15938
  return;
15934
15939
  }
15935
15940
  this.oFormLayoutManagerService.activeFormLayoutManager = undefined;
15941
+ this.oFormLayoutManagerService.context = void 0;
15936
15942
  const routeConfig = this.getParentActRouteRoute();
15937
15943
  if (Util.isDefined(routeConfig)) {
15938
15944
  for (let i = (routeConfig.canActivateChild || []).length - 1; i >= 0; i--) {
@@ -15953,7 +15959,8 @@ class OFormLayoutManagerComponent {
15953
15959
  isSplitPaneMode() {
15954
15960
  return this.mode === OFormLayoutManagerComponent.SPLIT_PANE_MODE;
15955
15961
  }
15956
- addDetailComponent(childRoute, url) {
15962
+ addDetailComponent(childRoute, url, context) {
15963
+ childRoute = Util.getLastActivateRoute(childRoute);
15957
15964
  const newDetailComp = {
15958
15965
  params: childRoute.params,
15959
15966
  queryParams: childRoute.queryParams,
@@ -15961,7 +15968,7 @@ class OFormLayoutManagerComponent {
15961
15968
  component: childRoute.routeConfig.component,
15962
15969
  url: url,
15963
15970
  id: Util.randomNumber().toString(),
15964
- label: '',
15971
+ label: (context === null || context === void 0 ? void 0 : context.label) || '',
15965
15972
  innerFormsInfo: {},
15966
15973
  insertionMode: childRoute.queryParams[Codes.INSERTION_MODE] === 'true'
15967
15974
  };
@@ -16070,7 +16077,9 @@ class OFormLayoutManagerComponent {
16070
16077
  return !comp.oFormLayoutDialog;
16071
16078
  }
16072
16079
  const compRef = this.getLayoutModeComponent();
16073
- return Util.isDefined(compRef) && compRef.isMainComponent(comp);
16080
+ return (Util.isDefined(compRef)
16081
+ && (compRef.isMainComponent(comp)
16082
+ || (Util.isDefined(comp.parentComponent)) && compRef.isMainComponent(comp.parentComponent)));
16074
16083
  }
16075
16084
  getRouteForComponent(comp) {
16076
16085
  const result = [];
@@ -16710,7 +16719,7 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16710
16719
  }
16711
16720
  get selection() {
16712
16721
  if (!Util.isDefined(this._selection)) {
16713
- this._selection = new SelectionModel(true, []);
16722
+ this._selection = new SelectionModel(true, [], true, this.compareRow());
16714
16723
  }
16715
16724
  return this._selection;
16716
16725
  }
@@ -16857,7 +16866,10 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16857
16866
  this.navigateToDetail(route, qParams, relativeTo);
16858
16867
  }
16859
16868
  }
16860
- viewDetail(item) {
16869
+ viewDetail(item, context) {
16870
+ var _a;
16871
+ const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
16872
+ formLayoutManagerService.context = void 0;
16861
16873
  if (this.oFormLayoutDialog) {
16862
16874
  console.warn('Navigation is not available yet in a form layout manager with mode="dialog"');
16863
16875
  return;
@@ -16868,6 +16880,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16868
16880
  const qParams = Codes.getIsDetailObject();
16869
16881
  const relativeTo = this.recursiveDetail ? this.actRoute.parent : this.actRoute;
16870
16882
  const zone = this.injector.get(NgZone);
16883
+ if (!((_a = this.formLayoutManager) === null || _a === void 0 ? void 0 : _a.isSplitPaneMode())) {
16884
+ formLayoutManagerService.context = context;
16885
+ }
16871
16886
  zone.run(() => this.navigateToDetail(route, qParams, relativeTo));
16872
16887
  }
16873
16888
  }
@@ -17388,6 +17403,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
17388
17403
  }
17389
17404
  return sqlTypesArg;
17390
17405
  }
17406
+ compareRow() {
17407
+ return (o1, o2) => this.keysArray.every(key => o1[key] === o2[key]);
17408
+ }
17391
17409
  }
17392
17410
  AbstractOServiceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AbstractOServiceComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: OFormComponent }], target: i0.ɵɵFactoryTarget.Directive });
17393
17411
  AbstractOServiceComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AbstractOServiceComponent, inputs: { oattr: ["attr", "oattr"], service: "service", serviceType: ["service-type", "serviceType"], entity: "entity", queryOnInit: ["query-on-init", "queryOnInit"], queryOnBind: ["query-on-bind", "queryOnBind"], queryOnEvent: ["query-on-event", "queryOnEvent"], pageable: "pageable", columns: "columns", keys: "keys", parentKeys: ["parent-keys", "parentKeys"], staticData: ["static-data", "staticData"], queryMethod: ["query-method", "queryMethod"], paginatedQueryMethod: ["paginated-query-method", "paginatedQueryMethod"], oQueryRows: ["query-rows", "oQueryRows"], insertMethod: ["insert-method", "insertMethod"], updateMethod: ["update-method", "updateMethod"], deleteMethod: ["delete-method", "deleteMethod"], storeState: ["store-state", "storeState"], queryWithNullParentKeys: ["query-with-null-parent-keys", "queryWithNullParentKeys"], queryFallbackFunction: ["query-fallback-function", "queryFallbackFunction"], _title: ["title", "_title"], ovisible: ["visible", "ovisible"], oenabled: ["enabled", "oenabled"], controls: "controls", detailMode: ["detail-mode", "detailMode"], detailFormRoute: ["detail-form-route", "detailFormRoute"], recursiveDetail: ["recursive-detail", "recursiveDetail"], detailButtonInRow: ["detail-button-in-row", "detailButtonInRow"], detailButtonInRowIcon: ["detail-button-in-row-icon", "detailButtonInRowIcon"], editFormRoute: ["edit-form-route", "editFormRoute"], recursiveEdit: ["recursive-edit", "recursiveEdit"], editButtonInRow: ["edit-button-in-row", "editButtonInRow"], editButtonInRowIcon: ["edit-button-in-row-icon", "editButtonInRowIcon"], insertButton: ["insert-button", "insertButton"], rowHeight: ["row-height", "rowHeight"], insertFormRoute: ["insert-form-route", "insertFormRoute"], recursiveInsert: ["recursive-insert", "recursiveInsert"], filterCaseSensitive: ["filter-case-sensitive", "filterCaseSensitive"], quickFilter: ["quick-filter", "quickFilter"], quickFilterPlaceholder: ["quick-filter-placeholder", "quickFilterPlaceholder"], paginationControls: ["pagination-controls", "paginationControls"], pageSizeOptions: ["page-size-options", "pageSizeOptions"], quickFilterAppearance: ["quick-filter-appearance", "quickFilterAppearance"], disablePageSizeCalculation: ["disable-page-size-calculation", "disablePageSizeCalculation"] }, outputs: { onClick: "onClick", onDoubleClick: "onDoubleClick", onDataLoaded: "onDataLoaded", onPaginatedDataLoaded: "onPaginatedDataLoaded", onSearch: "onSearch" }, viewQueries: [{ propertyName: "matpaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "searchInputComponent", first: true, predicate: i0.forwardRef(function () { return OSearchInputComponent; }), descendants: true }], usesInheritance: true, ngImport: i0 });
@@ -27388,6 +27406,9 @@ class OColumn {
27388
27406
  if (Util.isDefined(column.searchable)) {
27389
27407
  this.searchable = column.searchable;
27390
27408
  }
27409
+ else {
27410
+ this.searchable = (column === null || column === void 0 ? void 0 : column.type) !== 'date';
27411
+ }
27391
27412
  if (Util.isDefined(column.groupable)) {
27392
27413
  this.groupable = column.groupable;
27393
27414
  }
@@ -29864,7 +29885,15 @@ class OTableButtonComponent {
29864
29885
  }
29865
29886
  innerOnClick(event) {
29866
29887
  event.stopPropagation();
29867
- this.onClick.emit();
29888
+ if (!this.isReadOnly()) {
29889
+ this.onClick.emit();
29890
+ }
29891
+ else if (this._table.showNotificationOfReadOnly) {
29892
+ this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
29893
+ }
29894
+ }
29895
+ isReadOnly() {
29896
+ return this._table.isComponentReadOnly('o-table-button', this.oattr);
29868
29897
  }
29869
29898
  isIconPositionLeft() {
29870
29899
  return this.iconPosition === Codes.ICON_POSITION_LEFT;
@@ -29990,7 +30019,7 @@ class OTableButtonsComponent {
29990
30019
  }
29991
30020
  }
29992
30021
  OTableButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTableButtonsComponent, deps: [{ token: i0.Injector }, { token: forwardRef(() => OTableBase) }], target: i0.ɵɵFactoryTarget.Component });
29993
- OTableButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableButtonsComponent, selector: "o-table-buttons", inputs: { insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"] }, host: { properties: { "class.o-table-buttons": "true" } }, ngImport: i0, template: "<div class=\"buttons\" fxLayout>\n <o-table-button *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: OTableButtonComponent, selector: "o-table-button", inputs: ["attr", "enabled", "icon", "svg-icon", "icon-position", "label"], outputs: ["onClick"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
30022
+ OTableButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableButtonsComponent, selector: "o-table-buttons", inputs: { insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"] }, host: { properties: { "class.o-table-buttons": "true" } }, ngImport: i0, template: "<div class=\"buttons\" fxLayout>\n <o-table-button attr=\"add\" *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button attr=\"refresh\" *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button attr=\"delete\" *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: OTableButtonComponent, selector: "o-table-button", inputs: ["attr", "enabled", "icon", "svg-icon", "icon-position", "label"], outputs: ["onClick"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
29994
30023
  __decorate([
29995
30024
  BooleanInputConverter(),
29996
30025
  __metadata("design:type", Boolean)
@@ -30007,7 +30036,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
30007
30036
  type: Component,
30008
30037
  args: [{ selector: 'o-table-buttons', inputs: DEFAULT_INPUTS_O_TABLE_BUTTONS, outputs: DEFAULT_OUTPUTS_O_TABLE_BUTTONS, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
30009
30038
  '[class.o-table-buttons]': 'true',
30010
- }, template: "<div class=\"buttons\" fxLayout>\n <o-table-button *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>" }]
30039
+ }, template: "<div class=\"buttons\" fxLayout>\n <o-table-button attr=\"add\" *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button attr=\"refresh\" *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button attr=\"delete\" *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>\n" }]
30011
30040
  }], ctorParameters: function () {
30012
30041
  return [{ type: i0.Injector }, { type: OTableBase, decorators: [{
30013
30042
  type: Inject,
@@ -31339,7 +31368,8 @@ class OTableQuickfilterComponent {
31339
31368
  column.type === 'real' ||
31340
31369
  column.type === 'percentage' ||
31341
31370
  column.type === 'currency' ||
31342
- column.type === 'service');
31371
+ column.type === 'service' ||
31372
+ column.type === 'date');
31343
31373
  }
31344
31374
  getColumnsWithoutRendererExpressions(columns) {
31345
31375
  return columns
@@ -32187,7 +32217,10 @@ const DEFAULT_INPUTS_O_TABLE = [
32187
32217
  'showChartsOnDemandOption: show-charts-on-demand-option',
32188
32218
  'showResetWidthOption: show-reset-width-option',
32189
32219
  'disableSelectionFunction: disable-selection-function',
32190
- 'nonHidableColumns: non-hidable-columns'
32220
+ 'nonHidableColumns: non-hidable-columns',
32221
+ 'readOnly: read-only',
32222
+ 'readOnlyConfiguration: read-only-configuration',
32223
+ 'showNotificationOfReadOnly: show-notification-of-read-only'
32191
32224
  ];
32192
32225
  const DEFAULT_OUTPUTS_O_TABLE = [
32193
32226
  'onRowSelected',
@@ -32225,6 +32258,10 @@ class OTableComponent extends AbstractOServiceComponent {
32225
32258
  }
32226
32259
  }
32227
32260
  }
32261
+ isComponentReadOnly(selector, attr) {
32262
+ var _a, _b;
32263
+ return (_b = (_a = this.readOnlyConfiguration) === null || _a === void 0 ? void 0 : _a[selector]) === null || _b === void 0 ? void 0 : _b[attr];
32264
+ }
32228
32265
  get oTableOptions() {
32229
32266
  return this._oTableOptions;
32230
32267
  }
@@ -32347,6 +32384,8 @@ class OTableComponent extends AbstractOServiceComponent {
32347
32384
  this.showButtonsText = true;
32348
32385
  this.filterColumnActiveByDefault = true;
32349
32386
  this.showResetWidthOption = true;
32387
+ this.readOnly = false;
32388
+ this.showNotificationOfReadOnly = false;
32350
32389
  this.insertButton = true;
32351
32390
  this.refreshButton = true;
32352
32391
  this.deleteButton = true;
@@ -32440,6 +32479,14 @@ class OTableComponent extends AbstractOServiceComponent {
32440
32479
  this.rowHeight = oTableGlobalConfig.rowHeight;
32441
32480
  }
32442
32481
  ;
32482
+ if (Util.isDefined(oTableGlobalConfig.showChartsOnDemandOption)) {
32483
+ this.showChartsOnDemandOption = oTableGlobalConfig.showChartsOnDemandOption;
32484
+ }
32485
+ ;
32486
+ if (Util.isDefined(oTableGlobalConfig.showReportOnDemandOption)) {
32487
+ this.showReportOnDemandOption = oTableGlobalConfig.showReportOnDemandOption;
32488
+ }
32489
+ ;
32443
32490
  }
32444
32491
  catch (error) {
32445
32492
  }
@@ -32935,7 +32982,7 @@ class OTableComponent extends AbstractOServiceComponent {
32935
32982
  }
32936
32983
  get selection() {
32937
32984
  if (!Util.isDefined(this._selection)) {
32938
- this._selection = new SelectionModel(this.isSelectionModeMultiple(), []);
32985
+ this._selection = new SelectionModel(this.isSelectionModeMultiple(), [], true, this.compareRow());
32939
32986
  }
32940
32987
  return this._selection;
32941
32988
  }
@@ -33256,12 +33303,24 @@ class OTableComponent extends AbstractOServiceComponent {
33256
33303
  onMatTableContentChanged() {
33257
33304
  }
33258
33305
  add() {
33306
+ if (this.readOnly) {
33307
+ if (this.showNotificationOfReadOnly) {
33308
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33309
+ }
33310
+ return;
33311
+ }
33259
33312
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
33260
33313
  return;
33261
33314
  }
33262
33315
  super.insertDetail();
33263
33316
  }
33264
33317
  remove(clearSelectedItems = false) {
33318
+ if (this.readOnly) {
33319
+ if (this.showNotificationOfReadOnly) {
33320
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33321
+ }
33322
+ return;
33323
+ }
33265
33324
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_DELETE)) {
33266
33325
  return;
33267
33326
  }
@@ -33342,7 +33401,7 @@ class OTableComponent extends AbstractOServiceComponent {
33342
33401
  handleClick(row, column, rowIndex, cellRef, event) {
33343
33402
  this.clickTimer = setTimeout(() => {
33344
33403
  if (!this.clickPrevent) {
33345
- if (this.oenabled && column.editor
33404
+ if (this.oenabled && !this.readOnly && column.editor
33346
33405
  && (this.detailMode !== Codes.DETAIL_MODE_CLICK)
33347
33406
  && (this.editionMode === Codes.EDITION_MODE_CLICK)) {
33348
33407
  this.activateColumnEdition(column, row, cellRef);
@@ -33355,7 +33414,10 @@ class OTableComponent extends AbstractOServiceComponent {
33355
33414
  }, this.clickDelay);
33356
33415
  }
33357
33416
  doHandleClick(row, column, rowIndex, $event) {
33358
- if (!this.oenabled) {
33417
+ if (this.readOnly && this.showNotificationOfReadOnly) {
33418
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33419
+ }
33420
+ if (!this.oenabled || this.readOnly) {
33359
33421
  return;
33360
33422
  }
33361
33423
  if ((this.detailMode === Codes.DETAIL_MODE_CLICK)) {
@@ -33403,6 +33465,12 @@ class OTableComponent extends AbstractOServiceComponent {
33403
33465
  handleDoubleClick(row, column, rowIndex, cellRef, $event) {
33404
33466
  clearTimeout(this.clickTimer);
33405
33467
  this.clickPrevent = true;
33468
+ if (this.readOnly) {
33469
+ if (this.showNotificationOfReadOnly) {
33470
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33471
+ }
33472
+ return;
33473
+ }
33406
33474
  if (this.oenabled && column.editor
33407
33475
  && (!Codes.isDoubleClickMode(this.detailMode))
33408
33476
  && (Codes.isDoubleClickMode(this.editionMode))) {
@@ -33565,10 +33633,28 @@ class OTableComponent extends AbstractOServiceComponent {
33565
33633
  if (this.isDisableCheckbox(item)) {
33566
33634
  return;
33567
33635
  }
33568
- if (Util.isDefined(item) && !this.isRowSelected(item)) {
33636
+ if (this.isRowSelected(item)) {
33637
+ this.selection.clear(item);
33638
+ }
33639
+ if (Util.isDefined(item)) {
33569
33640
  this.selection.select(item);
33570
33641
  }
33571
33642
  }
33643
+ setSelectedByKeys(keyValues) {
33644
+ const rowsToSelect = this.getDataArray().filter(row => {
33645
+ return keyValues.findIndex(keyValue => row[this.keys] === keyValue) > -1;
33646
+ });
33647
+ this.selection.select(...rowsToSelect);
33648
+ }
33649
+ setSelectedByMultipleKeys(keyValues) {
33650
+ const rowsToSelect = this.getDataArray().filter(row => {
33651
+ return keyValues.findIndex(keyValue => Object.keys(keyValue).every(key => keyValue[key] === row[key])) > -1;
33652
+ });
33653
+ rowsToSelect.every(rowToSelect => this.selection.select(rowToSelect));
33654
+ }
33655
+ setSelectedByRowIds(rowIds) {
33656
+ rowIds.forEach(rowId => this.selectedRow(this.getDataArray()[rowId]));
33657
+ }
33572
33658
  get showDeleteButton() {
33573
33659
  return this.deleteButton;
33574
33660
  }
@@ -33842,7 +33928,7 @@ class OTableComponent extends AbstractOServiceComponent {
33842
33928
  this.state.selection.forEach(selectedItem => {
33843
33929
  const selectedItemKeys = Object.keys(selectedItem);
33844
33930
  const foundItem = this.dataSource.renderedData.find(data => selectedItemKeys.every(key => data[key] === selectedItem[key]));
33845
- if (foundItem && !this.isRowSelected(foundItem)) {
33931
+ if (foundItem) {
33846
33932
  this.setSelected(foundItem);
33847
33933
  }
33848
33934
  });
@@ -33932,6 +34018,12 @@ class OTableComponent extends AbstractOServiceComponent {
33932
34018
  return this._oTableOptions ? this._oTableOptions.columns.find(item => item.name === attr) : undefined;
33933
34019
  }
33934
34020
  insertRecord(recordData, sqlTypes) {
34021
+ if (this.readOnly) {
34022
+ if (this.showNotificationOfReadOnly) {
34023
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34024
+ }
34025
+ throw new Error(`Insert operation is not allowed because the table is read-only.`);
34026
+ }
33935
34027
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
33936
34028
  return undefined;
33937
34029
  }
@@ -33945,6 +34037,12 @@ class OTableComponent extends AbstractOServiceComponent {
33945
34037
  return this.daoTable.insertQuery(recordData, sqlTypes);
33946
34038
  }
33947
34039
  updateRecord(filter, updateData, sqlTypes) {
34040
+ if (this.readOnly) {
34041
+ if (this.showNotificationOfReadOnly) {
34042
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34043
+ }
34044
+ throw new Error(`Update operation is not allowed because the table is read-only.`);
34045
+ }
33948
34046
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_UPDATE)) {
33949
34047
  return of(this.dataSource.data);
33950
34048
  }
@@ -34183,14 +34281,20 @@ class OTableComponent extends AbstractOServiceComponent {
34183
34281
  });
34184
34282
  }
34185
34283
  viewDetail(item) {
34186
- if (!this.checkEnabledActionPermission('detail')) {
34284
+ if (this.readOnly && this.showNotificationOfReadOnly) {
34285
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34286
+ }
34287
+ if (!this.checkEnabledActionPermission('detail') || this.readOnly) {
34187
34288
  return;
34188
34289
  }
34189
34290
  this.destroyActivedTooltips();
34190
34291
  super.viewDetail(item);
34191
34292
  }
34192
34293
  editDetail(item) {
34193
- if (!this.checkEnabledActionPermission('edit')) {
34294
+ if (this.readOnly && this.showNotificationOfReadOnly) {
34295
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34296
+ }
34297
+ if (!this.checkEnabledActionPermission('edit') || this.readOnly) {
34194
34298
  return;
34195
34299
  }
34196
34300
  super.editDetail(item);
@@ -34225,8 +34329,7 @@ class OTableComponent extends AbstractOServiceComponent {
34225
34329
  return name + this.getSuffixColumnInsertable();
34226
34330
  }
34227
34331
  isRowSelected(row) {
34228
- const keys = Object.keys(row);
34229
- return !this.isSelectionModeNone() && this.selection.selected.some((element) => keys.every(key => row[key] === element[key]));
34332
+ return !this.isSelectionModeNone() && this.selection.isSelected(row);
34230
34333
  }
34231
34334
  getColumnWidthFromState(colDef) {
34232
34335
  let columnWidth = colDef.definition && colDef.definition.width ? colDef.definition.width : void 0;
@@ -34538,13 +34641,16 @@ class OTableComponent extends AbstractOServiceComponent {
34538
34641
  isDisableCheckbox(item) {
34539
34642
  let disable = false;
34540
34643
  if (Util.isDefined(this.disableSelectionFunction)) {
34541
- return this.disableSelectionFunction(item);
34644
+ return this.disableSelectionFunction(Object.assign({}, item));
34542
34645
  }
34543
34646
  return disable;
34544
34647
  }
34545
34648
  getService() {
34546
34649
  return this.dataService;
34547
34650
  }
34651
+ getSnackService() {
34652
+ return this.snackBarService;
34653
+ }
34548
34654
  }
34549
34655
  OTableComponent.DEFAULT_BASE_SIZE_SPINNER = 100;
34550
34656
  OTableComponent.FIRST_LAST_CELL_PADDING = 24;
@@ -34552,7 +34658,7 @@ OTableComponent.EXPANDED_ROW_CONTAINER_CLASS = 'expanded-row-container-';
34552
34658
  OTableComponent.AVAILABLE_GROUPING_COLUMNS_RENDERERS = ['currency', 'integer', 'real'];
34553
34659
  OTableComponent.DEFAULT_ROW_HEIGHT = 36;
34554
34660
  OTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTableComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i1$1.MatDialog }, { token: i0.ViewContainerRef }, { token: i0.ApplicationRef }, { token: forwardRef(() => OFormComponent), optional: true }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }], target: i0.ɵɵFactoryTarget.Component });
34555
- OTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableComponent, selector: "o-table", inputs: { visibleColumns: ["visible-columns", "visibleColumns"], defaultVisibleColumns: ["default-visible-columns", "defaultVisibleColumns"], sortColumns: ["sort-columns", "sortColumns"], quickFilterCallback: ["quick-filter-function", "quickFilterCallback"], deleteButton: ["delete-button", "deleteButton"], refreshButton: ["refresh-button", "refreshButton"], columnsVisibilityButton: ["columns-visibility-button", "columnsVisibilityButton"], exportButton: ["export-button", "exportButton"], showConfigurationOption: ["show-configuration-option", "showConfigurationOption"], showButtonsText: ["show-buttons-text", "showButtonsText"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], paginationControls: ["pagination-controls", "paginationControls"], fixedHeader: ["fixed-header", "fixedHeader"], showTitle: ["show-title", "showTitle"], editionMode: ["edition-mode", "editionMode"], selectionMode: ["selection-mode", "selectionMode"], horizontalScroll: ["horizontal-scroll", "horizontalScroll"], showPaginatorFirstLastButtons: ["show-paginator-first-last-buttons", "showPaginatorFirstLastButtons"], autoAlignTitles: ["auto-align-titles", "autoAlignTitles"], multipleSort: ["multiple-sort", "multipleSort"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], orderable: "orderable", resizable: "resizable", keepSelectedItems: ["keep-selected-items", "keepSelectedItems"], exportMode: ["export-mode", "exportMode"], exportServiceType: ["export-service-type", "exportServiceType"], autoAdjust: ["auto-adjust", "autoAdjust"], showFilterOption: ["show-filter-option", "showFilterOption"], visibleExportDialogButtons: ["visible-export-dialog-buttons", "visibleExportDialogButtons"], rowClass: ["row-class", "rowClass"], filterColumnActiveByDefault: ["filter-column-active-by-default", "filterColumnActiveByDefault"], groupedColumns: ["grouped-columns", "groupedColumns"], groupable: "groupable", expandGroupsSameLevel: ["expand-groups-same-level", "expandGroupsSameLevel"], collapseGroupedColumns: ["collapse-grouped-columns", "collapseGroupedColumns"], virtualScroll: ["virtual-scroll", "virtualScroll"], contextMenu: ["context-menu", "contextMenu"], showExpandableIconFunction: ["show-expandable-icon-function", "showExpandableIconFunction"], showReportOnDemandOption: ["show-report-on-demand-option", "showReportOnDemandOption"], showChartsOnDemandOption: ["show-charts-on-demand-option", "showChartsOnDemandOption"], showResetWidthOption: ["show-reset-width-option", "showResetWidthOption"], disableSelectionFunction: ["disable-selection-function", "disableSelectionFunction"], nonHidableColumns: ["non-hidable-columns", "nonHidableColumns"] }, outputs: { onRowSelected: "onRowSelected", onRowDeselected: "onRowDeselected", onRowDeleted: "onRowDeleted" }, host: { listeners: { "document:click": "handleDOMClick($event)", "window:resize": "updateScrolledState()" }, properties: { "class.o-table": "true", "class.ontimize-table": "true", "class.o-table-fixed": "fixedHeader", "class.o-table-disabled": "!enabled" } }, providers: [
34661
+ OTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableComponent, selector: "o-table", inputs: { visibleColumns: ["visible-columns", "visibleColumns"], defaultVisibleColumns: ["default-visible-columns", "defaultVisibleColumns"], sortColumns: ["sort-columns", "sortColumns"], quickFilterCallback: ["quick-filter-function", "quickFilterCallback"], deleteButton: ["delete-button", "deleteButton"], refreshButton: ["refresh-button", "refreshButton"], columnsVisibilityButton: ["columns-visibility-button", "columnsVisibilityButton"], exportButton: ["export-button", "exportButton"], showConfigurationOption: ["show-configuration-option", "showConfigurationOption"], showButtonsText: ["show-buttons-text", "showButtonsText"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], paginationControls: ["pagination-controls", "paginationControls"], fixedHeader: ["fixed-header", "fixedHeader"], showTitle: ["show-title", "showTitle"], editionMode: ["edition-mode", "editionMode"], selectionMode: ["selection-mode", "selectionMode"], horizontalScroll: ["horizontal-scroll", "horizontalScroll"], showPaginatorFirstLastButtons: ["show-paginator-first-last-buttons", "showPaginatorFirstLastButtons"], autoAlignTitles: ["auto-align-titles", "autoAlignTitles"], multipleSort: ["multiple-sort", "multipleSort"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], orderable: "orderable", resizable: "resizable", keepSelectedItems: ["keep-selected-items", "keepSelectedItems"], exportMode: ["export-mode", "exportMode"], exportServiceType: ["export-service-type", "exportServiceType"], autoAdjust: ["auto-adjust", "autoAdjust"], showFilterOption: ["show-filter-option", "showFilterOption"], visibleExportDialogButtons: ["visible-export-dialog-buttons", "visibleExportDialogButtons"], rowClass: ["row-class", "rowClass"], filterColumnActiveByDefault: ["filter-column-active-by-default", "filterColumnActiveByDefault"], groupedColumns: ["grouped-columns", "groupedColumns"], groupable: "groupable", expandGroupsSameLevel: ["expand-groups-same-level", "expandGroupsSameLevel"], collapseGroupedColumns: ["collapse-grouped-columns", "collapseGroupedColumns"], virtualScroll: ["virtual-scroll", "virtualScroll"], contextMenu: ["context-menu", "contextMenu"], showExpandableIconFunction: ["show-expandable-icon-function", "showExpandableIconFunction"], showReportOnDemandOption: ["show-report-on-demand-option", "showReportOnDemandOption"], showChartsOnDemandOption: ["show-charts-on-demand-option", "showChartsOnDemandOption"], showResetWidthOption: ["show-reset-width-option", "showResetWidthOption"], disableSelectionFunction: ["disable-selection-function", "disableSelectionFunction"], nonHidableColumns: ["non-hidable-columns", "nonHidableColumns"], readOnly: ["read-only", "readOnly"], readOnlyConfiguration: ["read-only-configuration", "readOnlyConfiguration"], showNotificationOfReadOnly: ["show-notification-of-read-only", "showNotificationOfReadOnly"] }, outputs: { onRowSelected: "onRowSelected", onRowDeselected: "onRowDeselected", onRowDeleted: "onRowDeleted" }, host: { listeners: { "document:click": "handleDOMClick($event)", "window:resize": "updateScrolledState()" }, properties: { "class.o-table": "true", "class.ontimize-table": "true", "class.o-table-fixed": "fixedHeader", "class.o-table-disabled": "!enabled" } }, providers: [
34556
34662
  OntimizeServiceProvider,
34557
34663
  ComponentStateServiceProvider,
34558
34664
  OTableDataSourceService,
@@ -34606,6 +34712,14 @@ __decorate([
34606
34712
  BooleanInputConverter(),
34607
34713
  __metadata("design:type", Boolean)
34608
34714
  ], OTableComponent.prototype, "showResetWidthOption", void 0);
34715
+ __decorate([
34716
+ BooleanInputConverter(),
34717
+ __metadata("design:type", Boolean)
34718
+ ], OTableComponent.prototype, "readOnly", void 0);
34719
+ __decorate([
34720
+ BooleanInputConverter(),
34721
+ __metadata("design:type", Boolean)
34722
+ ], OTableComponent.prototype, "showNotificationOfReadOnly", void 0);
34609
34723
  __decorate([
34610
34724
  BooleanInputConverter(),
34611
34725
  __metadata("design:type", Boolean)
@@ -34725,7 +34839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
34725
34839
  }], tableRowExpandable: [{
34726
34840
  type: ContentChild,
34727
34841
  args: [OTableRowExpandableComponent]
34728
- }], selectAllCheckbox: [], exportButton: [], showConfigurationOption: [], columnsVisibilityButton: [], showFilterOption: [], showReportOnDemandOption: [], showChartsOnDemandOption: [], showButtonsText: [], filterColumnActiveByDefault: [], showResetWidthOption: [], insertButton: [], refreshButton: [], deleteButton: [], fixedHeader: [], showTitle: [], horizontalScroll: [], showPaginatorFirstLastButtons: [], autoAlignTitles: [], multipleSort: [], orderable: [], resizable: [], autoAdjust: [], groupable: [], expandGroupsSameLevel: [], collapseGroupedColumns: [], virtualScroll: [], contextMenu: [], keepSelectedItems: [], tableBodyEl: [{
34842
+ }], selectAllCheckbox: [], exportButton: [], showConfigurationOption: [], columnsVisibilityButton: [], showFilterOption: [], showReportOnDemandOption: [], showChartsOnDemandOption: [], showButtonsText: [], filterColumnActiveByDefault: [], showResetWidthOption: [], readOnly: [], showNotificationOfReadOnly: [], insertButton: [], refreshButton: [], deleteButton: [], fixedHeader: [], showTitle: [], horizontalScroll: [], showPaginatorFirstLastButtons: [], autoAlignTitles: [], multipleSort: [], orderable: [], resizable: [], autoAdjust: [], groupable: [], expandGroupsSameLevel: [], collapseGroupedColumns: [], virtualScroll: [], contextMenu: [], keepSelectedItems: [], tableBodyEl: [{
34729
34843
  type: ViewChild,
34730
34844
  args: ['tableBody']
34731
34845
  }], tableHeaderEl: [{
@@ -36036,6 +36150,12 @@ class OTableCellRendererActionComponent extends OBaseTableCellRenderer {
36036
36150
  event.stopPropagation();
36037
36151
  event.preventDefault();
36038
36152
  }
36153
+ if (this.table.readOnly) {
36154
+ if (this.table.showNotificationOfReadOnly) {
36155
+ this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
36156
+ }
36157
+ return;
36158
+ }
36039
36159
  if (Util.isDefined(this.action)) {
36040
36160
  switch (this.action.toLowerCase()) {
36041
36161
  case 'detail':
@@ -36833,7 +36953,6 @@ class OTableColumnComponent {
36833
36953
  this.table = table;
36834
36954
  this.injector = injector;
36835
36955
  this._defaultSQLTypeKey = 'OTHER';
36836
- this._searchable = true;
36837
36956
  this.editable = false;
36838
36957
  this.tooltip = false;
36839
36958
  this._multiline = false;
@@ -37604,7 +37723,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37604
37723
  return this.rootNodes;
37605
37724
  }
37606
37725
  else {
37607
- return this.childQueryData(node);
37726
+ return node.treeNode.childQueryData(node);
37608
37727
  }
37609
37728
  }
37610
37729
  getComponentFilter(existingFilter = {}) {
@@ -37671,6 +37790,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37671
37790
  'id': this.getNodeId(node, parentNode),
37672
37791
  'label': this.getItemText(node),
37673
37792
  'level': level,
37793
+ 'node': this,
37674
37794
  treeNode: this.treeNode,
37675
37795
  'expandable': Util.isDefined(this.treeNode) || !!(nodeChildren === null || nodeChildren === void 0 ? void 0 : nodeChildren.length) || this.recursive,
37676
37796
  'data': node,
@@ -37745,7 +37865,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37745
37865
  this.onNodeClick.emit(node);
37746
37866
  this.selectedNode = node;
37747
37867
  if (this.detailMode !== Codes.DETAIL_MODE_NONE && !this.isRootNode(node)) {
37748
- this.navigateToViewDetail(node);
37868
+ node.node.viewDetail(node.data, { label: node.label });
37749
37869
  }
37750
37870
  }
37751
37871
  isRootNode(node) {
@@ -37964,23 +38084,6 @@ class OTreeComponent extends AbstractOServiceComponent {
37964
38084
  }
37965
38085
  return this.keys + ':' + id;
37966
38086
  }
37967
- childQueryData(node) {
37968
- let queryMethodName = this.queryMethod;
37969
- if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
37970
- return of({ data: [] });
37971
- }
37972
- const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
37973
- let filter;
37974
- if (this.recursive) {
37975
- filter = parentItem !== null && parentItem !== void 0 ? parentItem : {};
37976
- filter[this.parentColumn] = node.data[this.keysArray[0]];
37977
- }
37978
- else {
37979
- filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
37980
- }
37981
- let queryArguments = [filter, this.colArray, this.entity];
37982
- return this.dataService[queryMethodName](...queryArguments);
37983
- }
37984
38087
  navigateToViewDetail(node) {
37985
38088
  if (Util.isDefined(node.route)) {
37986
38089
  let route = undefined;
@@ -38003,9 +38106,15 @@ class OTreeComponent extends AbstractOServiceComponent {
38003
38106
  isSelectedNode(node) {
38004
38107
  return this.selectedNode == node;
38005
38108
  }
38109
+ onItemDetailClick(node) {
38110
+ this.handleItemClick(node.data);
38111
+ }
38006
38112
  }
38007
38113
  OTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: forwardRef(() => OFormComponent), optional: true }], target: i0.ɵɵFactoryTarget.Component });
38008
- OTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeComponent, selector: "o-tree", inputs: { oattr: ["attr", "oattr"], service: "service", entity: "entity", columns: "columns", keys: "keys", parentKeys: ["parent-keys", "parentKeys"], queryMethod: ["query-method", "queryMethod"], insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"], visibleColumns: ["visible-columns", "visibleColumns"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], separator: "separator", parentColumn: ["parent-column", "parentColumn"], sortColumn: ["sort-column", "sortColumn"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], filterCaseSensitive: ["filter-case-sensitive", "filterCaseSensitive"], quickFilter: ["quick-filter", "quickFilter"], quickFilterPlaceholder: ["quick-filter-placeholder", "quickFilterPlaceholder"], quickFilterColumns: ["quick-filter-columns", "quickFilterColumns"], detailMode: ["detail-mode", "detailMode"], detailFormRoute: ["detail-form-route", "detailFormRoute"], showButtonsText: ["show-buttons-text", "showButtonsText"], rootTitle: ["root-title", "rootTitle"], recursive: "recursive", route: "route" }, outputs: { onNodeSelected: "onNodeSelected", onNodeExpanded: "onNodeExpanded", onNodeCollapsed: "onNodeCollapsed", onLoadNextLevel: "onLoadNextLevel", onDataLoaded: "onDataLoaded", onNodeClick: "onNodeClick" }, host: { properties: { "class.o-tree": "true" } }, providers: [OTreeDao], queries: [{ propertyName: "leafNodeTemplate", first: true, predicate: ["leafNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "parentNodeTemplate", first: true, predicate: ["parentNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "nodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "treeNode", first: true, predicate: i0.forwardRef(function () { return OTreeNodeComponent; }) }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OSearchInputComponent, selector: "o-search-input", inputs: ["placeholder", "label", "width", "float-label", "appearance", "columns", "filter-case-sensitive", "show-case-sensitive-checkbox", "show-menu"], outputs: ["onSearch"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i10$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i10$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i10$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i10$2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: OTreeMenuComponent, selector: "o-tree-menu", inputs: ["select-all-checkbox", "select-all-checkbox-visible"], outputs: ["onSelectCheckboxChange"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], encapsulation: i0.ViewEncapsulation.None });
38114
+ OTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeComponent, selector: "o-tree", inputs: { oattr: ["attr", "oattr"], service: "service", entity: "entity", columns: "columns", keys: "keys", parentKeys: ["parent-keys", "parentKeys"], queryMethod: ["query-method", "queryMethod"], insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"], visibleColumns: ["visible-columns", "visibleColumns"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], separator: "separator", parentColumn: ["parent-column", "parentColumn"], sortColumn: ["sort-column", "sortColumn"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], filterCaseSensitive: ["filter-case-sensitive", "filterCaseSensitive"], quickFilter: ["quick-filter", "quickFilter"], quickFilterPlaceholder: ["quick-filter-placeholder", "quickFilterPlaceholder"], quickFilterColumns: ["quick-filter-columns", "quickFilterColumns"], detailMode: ["detail-mode", "detailMode"], detailFormRoute: ["detail-form-route", "detailFormRoute"], showButtonsText: ["show-buttons-text", "showButtonsText"], rootTitle: ["root-title", "rootTitle"], recursive: "recursive", route: "route" }, outputs: { onNodeSelected: "onNodeSelected", onNodeExpanded: "onNodeExpanded", onNodeCollapsed: "onNodeCollapsed", onLoadNextLevel: "onLoadNextLevel", onDataLoaded: "onDataLoaded", onNodeClick: "onNodeClick" }, host: { properties: { "class.o-tree": "true" } }, providers: [
38115
+ OTreeDao,
38116
+ OntimizeServiceProvider
38117
+ ], queries: [{ propertyName: "leafNodeTemplate", first: true, predicate: ["leafNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "parentNodeTemplate", first: true, predicate: ["parentNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "nodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "treeNode", first: true, predicate: i0.forwardRef(function () { return OTreeNodeComponent; }) }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OSearchInputComponent, selector: "o-search-input", inputs: ["placeholder", "label", "width", "float-label", "appearance", "columns", "filter-case-sensitive", "show-case-sensitive-checkbox", "show-menu"], outputs: ["onSearch"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i10$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i10$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i10$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i10$2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: OTreeMenuComponent, selector: "o-tree-menu", inputs: ["select-all-checkbox", "select-all-checkbox-visible"], outputs: ["onSelectCheckboxChange"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], encapsulation: i0.ViewEncapsulation.None });
38009
38118
  __decorate([
38010
38119
  BooleanInputConverter(),
38011
38120
  __metadata("design:type", Boolean)
@@ -38034,7 +38143,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
38034
38143
  type: Component,
38035
38144
  args: [{ selector: 'o-tree', inputs: DEFAULT_INPUTS_O_TREE, outputs: DEFAULT_OUTPUTS_O_TREE, encapsulation: ViewEncapsulation.None, host: {
38036
38145
  '[class.o-tree]': 'true'
38037
- }, providers: [OTreeDao], template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"] }]
38146
+ }, providers: [
38147
+ OTreeDao,
38148
+ OntimizeServiceProvider
38149
+ ], template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"] }]
38038
38150
  }], ctorParameters: function () {
38039
38151
  return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{
38040
38152
  type: Optional
@@ -38057,10 +38169,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
38057
38169
  }] } });
38058
38170
 
38059
38171
  class OTreeNodeComponent extends OTreeComponent {
38060
- constructor(injector, elRef, form, oTree, parentNode) {
38061
- super(injector, elRef, form);
38172
+ constructor(injector, elementRef, form, parentComponent, parentNode) {
38173
+ super(injector, elementRef, form);
38062
38174
  this.injector = injector;
38063
- this.oTree = oTree;
38175
+ this.parentComponent = parentComponent;
38064
38176
  this.parentNode = parentNode;
38065
38177
  }
38066
38178
  ngOnInit() {
@@ -38073,14 +38185,32 @@ class OTreeNodeComponent extends OTreeComponent {
38073
38185
  this.visibleColumnsArray = Util.parseArray(this.visibleColumns, true);
38074
38186
  this.quickFilterColArray = Util.parseArray(this.quickFilterColumns, true);
38075
38187
  }
38188
+ childQueryData(node) {
38189
+ let queryMethodName = this.queryMethod;
38190
+ if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
38191
+ return of({ data: [] });
38192
+ }
38193
+ const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
38194
+ let filter;
38195
+ if (this.recursive) {
38196
+ filter = parentItem !== null && parentItem !== void 0 ? parentItem : {};
38197
+ filter[this.parentColumn] = node.data[this.keysArray[0]];
38198
+ }
38199
+ else {
38200
+ filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
38201
+ }
38202
+ let queryArguments = [filter, this.colArray, this.entity];
38203
+ return this.dataService[queryMethodName](...queryArguments);
38204
+ }
38076
38205
  }
38077
38206
  OTreeNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeNodeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: forwardRef(() => OFormComponent), optional: true }, { token: forwardRef(() => OTreeComponent), optional: true }, { token: OTreeNodeComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
38078
- OTreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeNodeComponent, selector: "o-tree-node", usesInheritance: true, ngImport: i0, template: ' ', isInline: true });
38207
+ OTreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeNodeComponent, selector: "o-tree-node", providers: [OntimizeServiceProvider], usesInheritance: true, ngImport: i0, template: ' ', isInline: true });
38079
38208
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeNodeComponent, decorators: [{
38080
38209
  type: Component,
38081
38210
  args: [{
38082
38211
  selector: 'o-tree-node',
38083
- template: ' '
38212
+ template: ' ',
38213
+ providers: [OntimizeServiceProvider]
38084
38214
  }]
38085
38215
  }], ctorParameters: function () {
38086
38216
  return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{