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
 
@@ -1232,6 +1239,7 @@ const MAP = {
1232
1239
  'MESSAGES.ERROR_403_TEXT': 'You are not authorized to view this page.',
1233
1240
  'MESSAGES.ERROR_403_TEXT_BUTTON': 'Navigate back',
1234
1241
  'MESSAGES.AVOID_QUERY_WITHOUT_QUICKFILTER_COLUMNS': 'No column has been selected to perform the search.',
1242
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operation is not allowed due to the table is read-only',
1235
1243
  'INPUT.COMBO.EMPTY': 'No results found',
1236
1244
  'INPUT.COMBO.MESSAGE_TRIGGER': ' (+{0} others)',
1237
1245
  'TABLE.FILTER_BY_COLUMN.CHECK_ALL': 'Select all',
@@ -1533,6 +1541,7 @@ const MAP = {
1533
1541
  'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Error al exportar los datos de la tabla.',
1534
1542
  'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Se han exportado los datos de la tabla correctamente.',
1535
1543
  'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operación no permitida debido a restricciones de permisos.',
1544
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operación no permitida debido a que la tabla es de solo lectura',
1536
1545
  'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegación no permitida debido a restricciones de permisos.',
1537
1546
  'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegación redirigida debido a restricciones de permisos.',
1538
1547
  'MESSAGES.ERROR_403_TEXT': 'No está autorizado para ver esta página.',
@@ -1830,6 +1839,7 @@ const MAP = {
1830
1839
  'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Erro na exportação dos dados da tabela.',
1831
1840
  'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Os dados da tabela foram exportados corretamente.',
1832
1841
  'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operação não permitida por falta de permissões.',
1842
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operação não permitida porque a tabela é somente leitura',
1833
1843
  'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegação não permitida por falta de permissões.',
1834
1844
  'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegção redirecionada por falta de permissões.',
1835
1845
  'MESSAGES.ERROR_403_TEXT': 'Não tem autorização para ver esta página.',
@@ -6770,6 +6780,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
6770
6780
  type: Input
6771
6781
  }] } });
6772
6782
 
6783
+ class OFormLayoutManagerService {
6784
+ constructor(injector) {
6785
+ this.injector = injector;
6786
+ this.registeredFormLayoutManagers = {};
6787
+ }
6788
+ registerFormLayoutManager(comp) {
6789
+ this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
6790
+ }
6791
+ removeFormLayoutManager(comp) {
6792
+ delete this.registeredFormLayoutManagers[comp.getAttribute()];
6793
+ }
6794
+ get activeFormLayoutManager() {
6795
+ return this._activeFormLayoutManager;
6796
+ }
6797
+ set activeFormLayoutManager(arg) {
6798
+ this._activeFormLayoutManager = arg;
6799
+ }
6800
+ set context(value) {
6801
+ this._context = value;
6802
+ }
6803
+ get context() {
6804
+ return this._context;
6805
+ }
6806
+ }
6807
+ OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
6808
+ OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
6809
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
6810
+ type: Injectable,
6811
+ args: [{
6812
+ providedIn: 'root'
6813
+ }]
6814
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
6815
+
6773
6816
  class OFormLayoutDialogComponent {
6774
6817
  constructor(dialogRef, injector, data) {
6775
6818
  this.dialogRef = dialogRef;
@@ -6800,7 +6843,9 @@ class OFormLayoutDialogComponent {
6800
6843
  }
6801
6844
  }
6802
6845
  updateNavigation(data) {
6803
- this.label = this.formLayoutManager.getLabelFromData(data);
6846
+ const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
6847
+ const context = formLayoutManagerService.context;
6848
+ this.label = context?.label || this.formLayoutManager.getLabelFromData(data);
6804
6849
  }
6805
6850
  updateActiveData(data) {
6806
6851
  this.data = Object.assign(this.data, data);
@@ -12452,33 +12497,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
12452
12497
  }]
12453
12498
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
12454
12499
 
12455
- class OFormLayoutManagerService {
12456
- constructor(injector) {
12457
- this.injector = injector;
12458
- this.registeredFormLayoutManagers = {};
12459
- }
12460
- registerFormLayoutManager(comp) {
12461
- this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
12462
- }
12463
- removeFormLayoutManager(comp) {
12464
- delete this.registeredFormLayoutManagers[comp.getAttribute()];
12465
- }
12466
- get activeFormLayoutManager() {
12467
- return this._activeFormLayoutManager;
12468
- }
12469
- set activeFormLayoutManager(arg) {
12470
- this._activeFormLayoutManager = arg;
12471
- }
12472
- }
12473
- OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
12474
- OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
12475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
12476
- type: Injectable,
12477
- args: [{
12478
- providedIn: 'root'
12479
- }]
12480
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
12481
-
12482
12500
  class OModulesInfoService {
12483
12501
  constructor(injector, router) {
12484
12502
  this.injector = injector;
@@ -13101,7 +13119,7 @@ class OTableComponentStateService extends AbstractComponentStateService {
13101
13119
  }
13102
13120
  getSortState() {
13103
13121
  const sortColumns = [];
13104
- this.component.sort.getSortColumns().forEach(sortData => {
13122
+ this.component.sort?.getSortColumns().forEach(sortData => {
13105
13123
  sortColumns.push(sortData.id + Codes.COLUMNS_ALIAS_SEPARATOR + sortData.direction);
13106
13124
  });
13107
13125
  return {
@@ -15127,7 +15145,8 @@ class CanActivateFormLayoutChildGuard {
15127
15145
  }
15128
15146
  formLayoutManager.canAddDetailComponent().subscribe(res => {
15129
15147
  if (res) {
15130
- formLayoutManager.addDetailComponent(childRoute, state.url.substring(0, state.url.indexOf('?')));
15148
+ const context = this.oFormLayoutService.context;
15149
+ formLayoutManager.addDetailComponent(childRoute, state.url.substring(0, state.url.indexOf('?')), context);
15131
15150
  }
15132
15151
  });
15133
15152
  return false;
@@ -15168,6 +15187,7 @@ class OFormLayoutTabGroupComponent {
15168
15187
  this.tabsModificationsCache = [];
15169
15188
  this.dialogService = injector.get(DialogService);
15170
15189
  this.router = this.injector.get(Router);
15190
+ this.actRoute = this.injector.get(ActivatedRoute);
15171
15191
  }
15172
15192
  get state() {
15173
15193
  return this.formLayoutManager.state;
@@ -15363,7 +15383,9 @@ class OFormLayoutTabGroupComponent {
15363
15383
  index = this.data.findIndex((item) => Object.keys(keysValues).every(key => keysValues[key] == item.params[key]));
15364
15384
  }
15365
15385
  if (index >= 0) {
15366
- let label = this.formLayoutManager.getLabelFromData(data);
15386
+ const oFormLayoutManagerService = this.injector.get(OFormLayoutManagerService);
15387
+ const context = oFormLayoutManagerService.context;
15388
+ let label = context?.label || this.formLayoutManager.getLabelFromData(data);
15367
15389
  this.tabGroup.selectedIndex = (index + 1);
15368
15390
  label = label.length ? label : this.formLayoutManager.getLabelFromUrlParams(this.data[index].params);
15369
15391
  this.data[index].label = label;
@@ -15402,38 +15424,20 @@ class OFormLayoutTabGroupComponent {
15402
15424
  this.state.tabsData = this.state.tabsData.filter(tabData => !tabData.insertionMode);
15403
15425
  if (this.state.tabsData.length >= 1 && (this.state.tabsData[0].url || '').length > 0) {
15404
15426
  this.showLoading.next(true);
15405
- const extras = {};
15406
- extras[Codes.QUERY_PARAMS] = this.state.tabsData[0].queryParams;
15407
- extras[Codes.QUERY_PARAMS][Codes.INSERTION_MODE] = `${this.state.tabsData[0].insertionMode}`;
15408
- if (this.formLayoutManager) {
15409
- this.formLayoutManager.setAsActiveFormLayoutManager();
15410
- }
15411
- this.router.navigate([this.state.tabsData[0].url], extras).then(() => {
15412
- if (this.data[0] && this.data[0].component && this.state.tabsData.length > 1) {
15413
- setTimeout(() => {
15414
- this.createTabsFromState();
15415
- }, 0);
15416
- }
15417
- else {
15418
- this.showLoading.next(false);
15419
- }
15420
- });
15421
- }
15422
- }
15423
- createTabsFromState() {
15424
- const tabComponent = this.data[0].component;
15425
- const stateTabsData = this.state.tabsData.slice(1);
15426
- if (stateTabsData.length > 0) {
15427
- stateTabsData.forEach((tabData) => {
15428
- setTimeout(() => {
15429
- const newDetailData = this.createDetailComponent(tabComponent, tabData);
15430
- this.data.push(newDetailData);
15431
- }, 0);
15427
+ const zone = this.injector.get(NgZone);
15428
+ from(this.state.tabsData).pipe(concatMap(tab => of(tab).pipe(delay(100)))).subscribe((tab) => {
15429
+ const extras = {};
15430
+ extras['relativeTo'] = this.actRoute;
15431
+ extras[Codes.QUERY_PARAMS] = tab.queryParams;
15432
+ extras[Codes.QUERY_PARAMS][Codes.INSERTION_MODE] = tab.insertionMode;
15433
+ if (this.formLayoutManager) {
15434
+ this.formLayoutManager.setAsActiveFormLayoutManager();
15435
+ }
15436
+ zone.run(() => this.router.navigate([tab.url], extras)
15437
+ .then(() => this.showLoading.next(false))
15438
+ .catch(() => this.showLoading.next(true)));
15432
15439
  });
15433
15440
  }
15434
- else {
15435
- this.showLoading.next(false);
15436
- }
15437
15441
  }
15438
15442
  createDetailComponent(component, paramsObj) {
15439
15443
  const newDetailComp = {
@@ -15888,6 +15892,7 @@ class OFormLayoutManagerComponent {
15888
15892
  return;
15889
15893
  }
15890
15894
  this.oFormLayoutManagerService.activeFormLayoutManager = undefined;
15895
+ this.oFormLayoutManagerService.context = void 0;
15891
15896
  const routeConfig = this.getParentActRouteRoute();
15892
15897
  if (Util.isDefined(routeConfig)) {
15893
15898
  for (let i = (routeConfig.canActivateChild || []).length - 1; i >= 0; i--) {
@@ -15908,7 +15913,8 @@ class OFormLayoutManagerComponent {
15908
15913
  isSplitPaneMode() {
15909
15914
  return this.mode === OFormLayoutManagerComponent.SPLIT_PANE_MODE;
15910
15915
  }
15911
- addDetailComponent(childRoute, url) {
15916
+ addDetailComponent(childRoute, url, context) {
15917
+ childRoute = Util.getLastActivateRoute(childRoute);
15912
15918
  const newDetailComp = {
15913
15919
  params: childRoute.params,
15914
15920
  queryParams: childRoute.queryParams,
@@ -15916,7 +15922,7 @@ class OFormLayoutManagerComponent {
15916
15922
  component: childRoute.routeConfig.component,
15917
15923
  url: url,
15918
15924
  id: Util.randomNumber().toString(),
15919
- label: '',
15925
+ label: context?.label || '',
15920
15926
  innerFormsInfo: {},
15921
15927
  insertionMode: childRoute.queryParams[Codes.INSERTION_MODE] === 'true'
15922
15928
  };
@@ -16025,7 +16031,9 @@ class OFormLayoutManagerComponent {
16025
16031
  return !comp.oFormLayoutDialog;
16026
16032
  }
16027
16033
  const compRef = this.getLayoutModeComponent();
16028
- return Util.isDefined(compRef) && compRef.isMainComponent(comp);
16034
+ return (Util.isDefined(compRef)
16035
+ && (compRef.isMainComponent(comp)
16036
+ || (Util.isDefined(comp.parentComponent)) && compRef.isMainComponent(comp.parentComponent)));
16029
16037
  }
16030
16038
  getRouteForComponent(comp) {
16031
16039
  const result = [];
@@ -16662,7 +16670,7 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16662
16670
  }
16663
16671
  get selection() {
16664
16672
  if (!Util.isDefined(this._selection)) {
16665
- this._selection = new SelectionModel(true, []);
16673
+ this._selection = new SelectionModel(true, [], true, this.compareRow());
16666
16674
  }
16667
16675
  return this._selection;
16668
16676
  }
@@ -16809,7 +16817,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16809
16817
  this.navigateToDetail(route, qParams, relativeTo);
16810
16818
  }
16811
16819
  }
16812
- viewDetail(item) {
16820
+ viewDetail(item, context) {
16821
+ const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
16822
+ formLayoutManagerService.context = void 0;
16813
16823
  if (this.oFormLayoutDialog) {
16814
16824
  console.warn('Navigation is not available yet in a form layout manager with mode="dialog"');
16815
16825
  return;
@@ -16820,6 +16830,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16820
16830
  const qParams = Codes.getIsDetailObject();
16821
16831
  const relativeTo = this.recursiveDetail ? this.actRoute.parent : this.actRoute;
16822
16832
  const zone = this.injector.get(NgZone);
16833
+ if (!this.formLayoutManager?.isSplitPaneMode()) {
16834
+ formLayoutManagerService.context = context;
16835
+ }
16823
16836
  zone.run(() => this.navigateToDetail(route, qParams, relativeTo));
16824
16837
  }
16825
16838
  }
@@ -17340,6 +17353,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
17340
17353
  }
17341
17354
  return sqlTypesArg;
17342
17355
  }
17356
+ compareRow() {
17357
+ return (o1, o2) => this.keysArray.every(key => o1[key] === o2[key]);
17358
+ }
17343
17359
  }
17344
17360
  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 });
17345
17361
  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 });
@@ -27272,6 +27288,9 @@ class OColumn {
27272
27288
  if (Util.isDefined(column.searchable)) {
27273
27289
  this.searchable = column.searchable;
27274
27290
  }
27291
+ else {
27292
+ this.searchable = column?.type !== 'date';
27293
+ }
27275
27294
  if (Util.isDefined(column.groupable)) {
27276
27295
  this.groupable = column.groupable;
27277
27296
  }
@@ -29729,7 +29748,15 @@ class OTableButtonComponent {
29729
29748
  }
29730
29749
  innerOnClick(event) {
29731
29750
  event.stopPropagation();
29732
- this.onClick.emit();
29751
+ if (!this.isReadOnly()) {
29752
+ this.onClick.emit();
29753
+ }
29754
+ else if (this._table.showNotificationOfReadOnly) {
29755
+ this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
29756
+ }
29757
+ }
29758
+ isReadOnly() {
29759
+ return this._table.isComponentReadOnly('o-table-button', this.oattr);
29733
29760
  }
29734
29761
  isIconPositionLeft() {
29735
29762
  return this.iconPosition === Codes.ICON_POSITION_LEFT;
@@ -29853,7 +29880,7 @@ class OTableButtonsComponent {
29853
29880
  }
29854
29881
  }
29855
29882
  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 });
29856
- 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 });
29883
+ 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 });
29857
29884
  __decorate([
29858
29885
  BooleanInputConverter(),
29859
29886
  __metadata("design:type", Boolean)
@@ -29870,7 +29897,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
29870
29897
  type: Component,
29871
29898
  args: [{ selector: 'o-table-buttons', inputs: DEFAULT_INPUTS_O_TABLE_BUTTONS, outputs: DEFAULT_OUTPUTS_O_TABLE_BUTTONS, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
29872
29899
  '[class.o-table-buttons]': 'true',
29873
- }, 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>" }]
29900
+ }, 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" }]
29874
29901
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: OTableBase, decorators: [{
29875
29902
  type: Inject,
29876
29903
  args: [forwardRef(() => OTableBase)]
@@ -31192,7 +31219,8 @@ class OTableQuickfilterComponent {
31192
31219
  column.type === 'real' ||
31193
31220
  column.type === 'percentage' ||
31194
31221
  column.type === 'currency' ||
31195
- column.type === 'service');
31222
+ column.type === 'service' ||
31223
+ column.type === 'date');
31196
31224
  }
31197
31225
  getColumnsWithoutRendererExpressions(columns) {
31198
31226
  return columns
@@ -32026,7 +32054,10 @@ const DEFAULT_INPUTS_O_TABLE = [
32026
32054
  'showChartsOnDemandOption: show-charts-on-demand-option',
32027
32055
  'showResetWidthOption: show-reset-width-option',
32028
32056
  'disableSelectionFunction: disable-selection-function',
32029
- 'nonHidableColumns: non-hidable-columns'
32057
+ 'nonHidableColumns: non-hidable-columns',
32058
+ 'readOnly: read-only',
32059
+ 'readOnlyConfiguration: read-only-configuration',
32060
+ 'showNotificationOfReadOnly: show-notification-of-read-only'
32030
32061
  ];
32031
32062
  const DEFAULT_OUTPUTS_O_TABLE = [
32032
32063
  'onRowSelected',
@@ -32064,6 +32095,9 @@ class OTableComponent extends AbstractOServiceComponent {
32064
32095
  }
32065
32096
  }
32066
32097
  }
32098
+ isComponentReadOnly(selector, attr) {
32099
+ return this.readOnlyConfiguration?.[selector]?.[attr];
32100
+ }
32067
32101
  get oTableOptions() {
32068
32102
  return this._oTableOptions;
32069
32103
  }
@@ -32186,6 +32220,8 @@ class OTableComponent extends AbstractOServiceComponent {
32186
32220
  this.showButtonsText = true;
32187
32221
  this.filterColumnActiveByDefault = true;
32188
32222
  this.showResetWidthOption = true;
32223
+ this.readOnly = false;
32224
+ this.showNotificationOfReadOnly = false;
32189
32225
  this.insertButton = true;
32190
32226
  this.refreshButton = true;
32191
32227
  this.deleteButton = true;
@@ -32279,6 +32315,14 @@ class OTableComponent extends AbstractOServiceComponent {
32279
32315
  this.rowHeight = oTableGlobalConfig.rowHeight;
32280
32316
  }
32281
32317
  ;
32318
+ if (Util.isDefined(oTableGlobalConfig.showChartsOnDemandOption)) {
32319
+ this.showChartsOnDemandOption = oTableGlobalConfig.showChartsOnDemandOption;
32320
+ }
32321
+ ;
32322
+ if (Util.isDefined(oTableGlobalConfig.showReportOnDemandOption)) {
32323
+ this.showReportOnDemandOption = oTableGlobalConfig.showReportOnDemandOption;
32324
+ }
32325
+ ;
32282
32326
  }
32283
32327
  catch (error) {
32284
32328
  }
@@ -32774,7 +32818,7 @@ class OTableComponent extends AbstractOServiceComponent {
32774
32818
  }
32775
32819
  get selection() {
32776
32820
  if (!Util.isDefined(this._selection)) {
32777
- this._selection = new SelectionModel(this.isSelectionModeMultiple(), []);
32821
+ this._selection = new SelectionModel(this.isSelectionModeMultiple(), [], true, this.compareRow());
32778
32822
  }
32779
32823
  return this._selection;
32780
32824
  }
@@ -33094,12 +33138,24 @@ class OTableComponent extends AbstractOServiceComponent {
33094
33138
  onMatTableContentChanged() {
33095
33139
  }
33096
33140
  add() {
33141
+ if (this.readOnly) {
33142
+ if (this.showNotificationOfReadOnly) {
33143
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33144
+ }
33145
+ return;
33146
+ }
33097
33147
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
33098
33148
  return;
33099
33149
  }
33100
33150
  super.insertDetail();
33101
33151
  }
33102
33152
  remove(clearSelectedItems = false) {
33153
+ if (this.readOnly) {
33154
+ if (this.showNotificationOfReadOnly) {
33155
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33156
+ }
33157
+ return;
33158
+ }
33103
33159
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_DELETE)) {
33104
33160
  return;
33105
33161
  }
@@ -33180,7 +33236,7 @@ class OTableComponent extends AbstractOServiceComponent {
33180
33236
  handleClick(row, column, rowIndex, cellRef, event) {
33181
33237
  this.clickTimer = setTimeout(() => {
33182
33238
  if (!this.clickPrevent) {
33183
- if (this.oenabled && column.editor
33239
+ if (this.oenabled && !this.readOnly && column.editor
33184
33240
  && (this.detailMode !== Codes.DETAIL_MODE_CLICK)
33185
33241
  && (this.editionMode === Codes.EDITION_MODE_CLICK)) {
33186
33242
  this.activateColumnEdition(column, row, cellRef);
@@ -33193,7 +33249,10 @@ class OTableComponent extends AbstractOServiceComponent {
33193
33249
  }, this.clickDelay);
33194
33250
  }
33195
33251
  doHandleClick(row, column, rowIndex, $event) {
33196
- if (!this.oenabled) {
33252
+ if (this.readOnly && this.showNotificationOfReadOnly) {
33253
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33254
+ }
33255
+ if (!this.oenabled || this.readOnly) {
33197
33256
  return;
33198
33257
  }
33199
33258
  if ((this.detailMode === Codes.DETAIL_MODE_CLICK)) {
@@ -33241,6 +33300,12 @@ class OTableComponent extends AbstractOServiceComponent {
33241
33300
  handleDoubleClick(row, column, rowIndex, cellRef, $event) {
33242
33301
  clearTimeout(this.clickTimer);
33243
33302
  this.clickPrevent = true;
33303
+ if (this.readOnly) {
33304
+ if (this.showNotificationOfReadOnly) {
33305
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33306
+ }
33307
+ return;
33308
+ }
33244
33309
  if (this.oenabled && column.editor
33245
33310
  && (!Codes.isDoubleClickMode(this.detailMode))
33246
33311
  && (Codes.isDoubleClickMode(this.editionMode))) {
@@ -33403,10 +33468,28 @@ class OTableComponent extends AbstractOServiceComponent {
33403
33468
  if (this.isDisableCheckbox(item)) {
33404
33469
  return;
33405
33470
  }
33406
- if (Util.isDefined(item) && !this.isRowSelected(item)) {
33471
+ if (this.isRowSelected(item)) {
33472
+ this.selection.clear(item);
33473
+ }
33474
+ if (Util.isDefined(item)) {
33407
33475
  this.selection.select(item);
33408
33476
  }
33409
33477
  }
33478
+ setSelectedByKeys(keyValues) {
33479
+ const rowsToSelect = this.getDataArray().filter(row => {
33480
+ return keyValues.findIndex(keyValue => row[this.keys] === keyValue) > -1;
33481
+ });
33482
+ this.selection.select(...rowsToSelect);
33483
+ }
33484
+ setSelectedByMultipleKeys(keyValues) {
33485
+ const rowsToSelect = this.getDataArray().filter(row => {
33486
+ return keyValues.findIndex(keyValue => Object.keys(keyValue).every(key => keyValue[key] === row[key])) > -1;
33487
+ });
33488
+ rowsToSelect.every(rowToSelect => this.selection.select(rowToSelect));
33489
+ }
33490
+ setSelectedByRowIds(rowIds) {
33491
+ rowIds.forEach(rowId => this.selectedRow(this.getDataArray()[rowId]));
33492
+ }
33410
33493
  get showDeleteButton() {
33411
33494
  return this.deleteButton;
33412
33495
  }
@@ -33680,7 +33763,7 @@ class OTableComponent extends AbstractOServiceComponent {
33680
33763
  this.state.selection.forEach(selectedItem => {
33681
33764
  const selectedItemKeys = Object.keys(selectedItem);
33682
33765
  const foundItem = this.dataSource.renderedData.find(data => selectedItemKeys.every(key => data[key] === selectedItem[key]));
33683
- if (foundItem && !this.isRowSelected(foundItem)) {
33766
+ if (foundItem) {
33684
33767
  this.setSelected(foundItem);
33685
33768
  }
33686
33769
  });
@@ -33770,6 +33853,12 @@ class OTableComponent extends AbstractOServiceComponent {
33770
33853
  return this._oTableOptions ? this._oTableOptions.columns.find(item => item.name === attr) : undefined;
33771
33854
  }
33772
33855
  insertRecord(recordData, sqlTypes) {
33856
+ if (this.readOnly) {
33857
+ if (this.showNotificationOfReadOnly) {
33858
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33859
+ }
33860
+ throw new Error(`Insert operation is not allowed because the table is read-only.`);
33861
+ }
33773
33862
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
33774
33863
  return undefined;
33775
33864
  }
@@ -33783,6 +33872,12 @@ class OTableComponent extends AbstractOServiceComponent {
33783
33872
  return this.daoTable.insertQuery(recordData, sqlTypes);
33784
33873
  }
33785
33874
  updateRecord(filter, updateData, sqlTypes) {
33875
+ if (this.readOnly) {
33876
+ if (this.showNotificationOfReadOnly) {
33877
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33878
+ }
33879
+ throw new Error(`Update operation is not allowed because the table is read-only.`);
33880
+ }
33786
33881
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_UPDATE)) {
33787
33882
  return of(this.dataSource.data);
33788
33883
  }
@@ -34021,14 +34116,20 @@ class OTableComponent extends AbstractOServiceComponent {
34021
34116
  });
34022
34117
  }
34023
34118
  viewDetail(item) {
34024
- if (!this.checkEnabledActionPermission('detail')) {
34119
+ if (this.readOnly && this.showNotificationOfReadOnly) {
34120
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34121
+ }
34122
+ if (!this.checkEnabledActionPermission('detail') || this.readOnly) {
34025
34123
  return;
34026
34124
  }
34027
34125
  this.destroyActivedTooltips();
34028
34126
  super.viewDetail(item);
34029
34127
  }
34030
34128
  editDetail(item) {
34031
- if (!this.checkEnabledActionPermission('edit')) {
34129
+ if (this.readOnly && this.showNotificationOfReadOnly) {
34130
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34131
+ }
34132
+ if (!this.checkEnabledActionPermission('edit') || this.readOnly) {
34032
34133
  return;
34033
34134
  }
34034
34135
  super.editDetail(item);
@@ -34063,8 +34164,7 @@ class OTableComponent extends AbstractOServiceComponent {
34063
34164
  return name + this.getSuffixColumnInsertable();
34064
34165
  }
34065
34166
  isRowSelected(row) {
34066
- const keys = Object.keys(row);
34067
- return !this.isSelectionModeNone() && this.selection.selected.some((element) => keys.every(key => row[key] === element[key]));
34167
+ return !this.isSelectionModeNone() && this.selection.isSelected(row);
34068
34168
  }
34069
34169
  getColumnWidthFromState(colDef) {
34070
34170
  let columnWidth = colDef.definition && colDef.definition.width ? colDef.definition.width : void 0;
@@ -34376,13 +34476,16 @@ class OTableComponent extends AbstractOServiceComponent {
34376
34476
  isDisableCheckbox(item) {
34377
34477
  let disable = false;
34378
34478
  if (Util.isDefined(this.disableSelectionFunction)) {
34379
- return this.disableSelectionFunction(item);
34479
+ return this.disableSelectionFunction({ ...item });
34380
34480
  }
34381
34481
  return disable;
34382
34482
  }
34383
34483
  getService() {
34384
34484
  return this.dataService;
34385
34485
  }
34486
+ getSnackService() {
34487
+ return this.snackBarService;
34488
+ }
34386
34489
  }
34387
34490
  OTableComponent.DEFAULT_BASE_SIZE_SPINNER = 100;
34388
34491
  OTableComponent.FIRST_LAST_CELL_PADDING = 24;
@@ -34390,7 +34493,7 @@ OTableComponent.EXPANDED_ROW_CONTAINER_CLASS = 'expanded-row-container-';
34390
34493
  OTableComponent.AVAILABLE_GROUPING_COLUMNS_RENDERERS = ['currency', 'integer', 'real'];
34391
34494
  OTableComponent.DEFAULT_ROW_HEIGHT = 36;
34392
34495
  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 });
34393
- 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: [
34496
+ 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: [
34394
34497
  OntimizeServiceProvider,
34395
34498
  ComponentStateServiceProvider,
34396
34499
  OTableDataSourceService,
@@ -34444,6 +34547,14 @@ __decorate([
34444
34547
  BooleanInputConverter(),
34445
34548
  __metadata("design:type", Boolean)
34446
34549
  ], OTableComponent.prototype, "showResetWidthOption", void 0);
34550
+ __decorate([
34551
+ BooleanInputConverter(),
34552
+ __metadata("design:type", Boolean)
34553
+ ], OTableComponent.prototype, "readOnly", void 0);
34554
+ __decorate([
34555
+ BooleanInputConverter(),
34556
+ __metadata("design:type", Boolean)
34557
+ ], OTableComponent.prototype, "showNotificationOfReadOnly", void 0);
34447
34558
  __decorate([
34448
34559
  BooleanInputConverter(),
34449
34560
  __metadata("design:type", Boolean)
@@ -34561,7 +34672,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
34561
34672
  }], tableRowExpandable: [{
34562
34673
  type: ContentChild,
34563
34674
  args: [OTableRowExpandableComponent]
34564
- }], 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: [{
34675
+ }], 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: [{
34565
34676
  type: ViewChild,
34566
34677
  args: ['tableBody']
34567
34678
  }], tableHeaderEl: [{
@@ -35872,6 +35983,12 @@ class OTableCellRendererActionComponent extends OBaseTableCellRenderer {
35872
35983
  event.stopPropagation();
35873
35984
  event.preventDefault();
35874
35985
  }
35986
+ if (this.table.readOnly) {
35987
+ if (this.table.showNotificationOfReadOnly) {
35988
+ this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
35989
+ }
35990
+ return;
35991
+ }
35875
35992
  if (Util.isDefined(this.action)) {
35876
35993
  switch (this.action.toLowerCase()) {
35877
35994
  case 'detail':
@@ -36669,7 +36786,6 @@ class OTableColumnComponent {
36669
36786
  this.table = table;
36670
36787
  this.injector = injector;
36671
36788
  this._defaultSQLTypeKey = 'OTHER';
36672
- this._searchable = true;
36673
36789
  this.editable = false;
36674
36790
  this.tooltip = false;
36675
36791
  this._multiline = false;
@@ -37436,7 +37552,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37436
37552
  return this.rootNodes;
37437
37553
  }
37438
37554
  else {
37439
- return this.childQueryData(node);
37555
+ return node.treeNode.childQueryData(node);
37440
37556
  }
37441
37557
  }
37442
37558
  getComponentFilter(existingFilter = {}) {
@@ -37503,6 +37619,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37503
37619
  'id': this.getNodeId(node, parentNode),
37504
37620
  'label': this.getItemText(node),
37505
37621
  'level': level,
37622
+ 'node': this,
37506
37623
  treeNode: this.treeNode,
37507
37624
  'expandable': Util.isDefined(this.treeNode) || !!nodeChildren?.length || this.recursive,
37508
37625
  'data': node,
@@ -37577,7 +37694,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37577
37694
  this.onNodeClick.emit(node);
37578
37695
  this.selectedNode = node;
37579
37696
  if (this.detailMode !== Codes.DETAIL_MODE_NONE && !this.isRootNode(node)) {
37580
- this.navigateToViewDetail(node);
37697
+ node.node.viewDetail(node.data, { label: node.label });
37581
37698
  }
37582
37699
  }
37583
37700
  isRootNode(node) {
@@ -37796,23 +37913,6 @@ class OTreeComponent extends AbstractOServiceComponent {
37796
37913
  }
37797
37914
  return this.keys + ':' + id;
37798
37915
  }
37799
- childQueryData(node) {
37800
- let queryMethodName = this.queryMethod;
37801
- if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
37802
- return of({ data: [] });
37803
- }
37804
- const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
37805
- let filter;
37806
- if (this.recursive) {
37807
- filter = parentItem ?? {};
37808
- filter[this.parentColumn] = node.data[this.keysArray[0]];
37809
- }
37810
- else {
37811
- filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
37812
- }
37813
- let queryArguments = [filter, this.colArray, this.entity];
37814
- return this.dataService[queryMethodName](...queryArguments);
37815
- }
37816
37916
  navigateToViewDetail(node) {
37817
37917
  if (Util.isDefined(node.route)) {
37818
37918
  let route = undefined;
@@ -37835,9 +37935,15 @@ class OTreeComponent extends AbstractOServiceComponent {
37835
37935
  isSelectedNode(node) {
37836
37936
  return this.selectedNode == node;
37837
37937
  }
37938
+ onItemDetailClick(node) {
37939
+ this.handleItemClick(node.data);
37940
+ }
37838
37941
  }
37839
37942
  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 });
37840
- 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 });
37943
+ 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: [
37944
+ OTreeDao,
37945
+ OntimizeServiceProvider
37946
+ ], 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 });
37841
37947
  __decorate([
37842
37948
  BooleanInputConverter(),
37843
37949
  __metadata("design:type", Boolean)
@@ -37866,7 +37972,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
37866
37972
  type: Component,
37867
37973
  args: [{ selector: 'o-tree', inputs: DEFAULT_INPUTS_O_TREE, outputs: DEFAULT_OUTPUTS_O_TREE, encapsulation: ViewEncapsulation.None, host: {
37868
37974
  '[class.o-tree]': 'true'
37869
- }, 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"] }]
37975
+ }, providers: [
37976
+ OTreeDao,
37977
+ OntimizeServiceProvider
37978
+ ], 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"] }]
37870
37979
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{
37871
37980
  type: Optional
37872
37981
  }, {
@@ -37887,10 +37996,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
37887
37996
  }] } });
37888
37997
 
37889
37998
  class OTreeNodeComponent extends OTreeComponent {
37890
- constructor(injector, elRef, form, oTree, parentNode) {
37891
- super(injector, elRef, form);
37999
+ constructor(injector, elementRef, form, parentComponent, parentNode) {
38000
+ super(injector, elementRef, form);
37892
38001
  this.injector = injector;
37893
- this.oTree = oTree;
38002
+ this.parentComponent = parentComponent;
37894
38003
  this.parentNode = parentNode;
37895
38004
  }
37896
38005
  ngOnInit() {
@@ -37903,14 +38012,32 @@ class OTreeNodeComponent extends OTreeComponent {
37903
38012
  this.visibleColumnsArray = Util.parseArray(this.visibleColumns, true);
37904
38013
  this.quickFilterColArray = Util.parseArray(this.quickFilterColumns, true);
37905
38014
  }
38015
+ childQueryData(node) {
38016
+ let queryMethodName = this.queryMethod;
38017
+ if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
38018
+ return of({ data: [] });
38019
+ }
38020
+ const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
38021
+ let filter;
38022
+ if (this.recursive) {
38023
+ filter = parentItem ?? {};
38024
+ filter[this.parentColumn] = node.data[this.keysArray[0]];
38025
+ }
38026
+ else {
38027
+ filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
38028
+ }
38029
+ let queryArguments = [filter, this.colArray, this.entity];
38030
+ return this.dataService[queryMethodName](...queryArguments);
38031
+ }
37906
38032
  }
37907
38033
  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 });
37908
- 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 });
38034
+ 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 });
37909
38035
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeNodeComponent, decorators: [{
37910
38036
  type: Component,
37911
38037
  args: [{
37912
38038
  selector: 'o-tree-node',
37913
- template: ' '
38039
+ template: ' ',
38040
+ providers: [OntimizeServiceProvider]
37914
38041
  }]
37915
38042
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{
37916
38043
  type: Optional