ontimize-web-ngx 15.2.2 → 15.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) 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 +5 -2
  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/types/form-layout-manager-context.type.mjs +2 -0
  26. package/esm2020/lib/types/table/o-table-global-config.type.mjs +1 -1
  27. package/esm2020/lib/types/tree-flat-node.type.mjs +2 -0
  28. package/esm2020/lib/util/util.mjs +8 -1
  29. package/fesm2015/ontimize-web-ngx.mjs +225 -79
  30. package/fesm2015/ontimize-web-ngx.mjs.map +1 -1
  31. package/fesm2020/ontimize-web-ngx.mjs +223 -79
  32. package/fesm2020/ontimize-web-ngx.mjs.map +1 -1
  33. package/lib/components/o-service-base-component.class.d.ts +1 -0
  34. package/lib/components/o-service-component.class.d.ts +5 -3
  35. package/lib/components/table/extensions/header/table-button/o-table-button.component.d.ts +1 -0
  36. package/lib/components/table/o-table-base.class.d.ts +13 -5
  37. package/lib/components/table/o-table.component.d.ts +11 -2
  38. package/lib/components/tree/o-tree-dao.service.d.ts +1 -1
  39. package/lib/components/tree/o-tree.component.d.ts +5 -16
  40. package/lib/components/tree/o-tree.datasource.d.ts +2 -1
  41. package/lib/components/tree/tree-node/tree-node.component.d.ts +6 -2
  42. package/lib/i18n/i18n.d.ts +3 -0
  43. package/lib/interfaces/layout-manager-component.interface.d.ts +1 -0
  44. package/lib/layouts/form-layout/o-form-layout-manager-base.class.d.ts +2 -0
  45. package/lib/layouts/form-layout/o-form-layout-manager.component.d.ts +2 -1
  46. package/lib/services/o-form-layout-manager.service.d.ts +5 -1
  47. package/lib/types/form-layout-manager-context.type.d.ts +3 -0
  48. package/lib/types/table/o-table-global-config.type.d.ts +2 -0
  49. package/lib/types/tree-flat-node.type.d.ts +14 -0
  50. package/lib/util/util.d.ts +2 -0
  51. package/package.json +1 -1
@@ -731,6 +731,13 @@ class Util {
731
731
  const clonedArray = arr.map((x) => Object.assign({}, x));
732
732
  return clonedArray;
733
733
  }
734
+ static getLastActivateRoute(routeSnapshot) {
735
+ let child = routeSnapshot;
736
+ while (child.firstChild) {
737
+ child = child.firstChild;
738
+ }
739
+ return child;
740
+ }
734
741
  }
735
742
  Util.columnAggregates = ['sum', 'count', 'avg', 'min', 'max'];
736
743
 
@@ -1234,6 +1241,7 @@ const MAP = {
1234
1241
  'MESSAGES.ERROR_403_TEXT': 'You are not authorized to view this page.',
1235
1242
  'MESSAGES.ERROR_403_TEXT_BUTTON': 'Navigate back',
1236
1243
  'MESSAGES.AVOID_QUERY_WITHOUT_QUICKFILTER_COLUMNS': 'No column has been selected to perform the search.',
1244
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operation is not allowed due to the table is read-only',
1237
1245
  'INPUT.COMBO.EMPTY': 'No results found',
1238
1246
  'INPUT.COMBO.MESSAGE_TRIGGER': ' (+{0} others)',
1239
1247
  'TABLE.FILTER_BY_COLUMN.CHECK_ALL': 'Select all',
@@ -1535,6 +1543,7 @@ const MAP = {
1535
1543
  'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Error al exportar los datos de la tabla.',
1536
1544
  'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Se han exportado los datos de la tabla correctamente.',
1537
1545
  'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operación no permitida debido a restricciones de permisos.',
1546
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operación no permitida debido a que la tabla es de solo lectura',
1538
1547
  'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegación no permitida debido a restricciones de permisos.',
1539
1548
  'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegación redirigida debido a restricciones de permisos.',
1540
1549
  'MESSAGES.ERROR_403_TEXT': 'No está autorizado para ver esta página.',
@@ -1832,6 +1841,7 @@ const MAP = {
1832
1841
  'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Erro na exportação dos dados da tabela.',
1833
1842
  'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Os dados da tabela foram exportados corretamente.',
1834
1843
  'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operação não permitida por falta de permissões.',
1844
+ 'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operação não permitida porque a tabela é somente leitura',
1835
1845
  'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegação não permitida por falta de permissões.',
1836
1846
  'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegção redirecionada por falta de permissões.',
1837
1847
  'MESSAGES.ERROR_403_TEXT': 'Não tem autorização para ver esta página.',
@@ -7135,6 +7145,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
7135
7145
  type: Input
7136
7146
  }] } });
7137
7147
 
7148
+ class OFormLayoutManagerService {
7149
+ constructor(injector) {
7150
+ this.injector = injector;
7151
+ this.registeredFormLayoutManagers = {};
7152
+ }
7153
+ registerFormLayoutManager(comp) {
7154
+ this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
7155
+ }
7156
+ removeFormLayoutManager(comp) {
7157
+ delete this.registeredFormLayoutManagers[comp.getAttribute()];
7158
+ }
7159
+ get activeFormLayoutManager() {
7160
+ return this._activeFormLayoutManager;
7161
+ }
7162
+ set activeFormLayoutManager(arg) {
7163
+ this._activeFormLayoutManager = arg;
7164
+ }
7165
+ set context(value) {
7166
+ this._context = value;
7167
+ }
7168
+ get context() {
7169
+ return this._context;
7170
+ }
7171
+ }
7172
+ OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
7173
+ OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
7174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
7175
+ type: Injectable,
7176
+ args: [{
7177
+ providedIn: 'root'
7178
+ }]
7179
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
7180
+
7138
7181
  class OFormLayoutDialogComponent {
7139
7182
  constructor(dialogRef, injector, data) {
7140
7183
  this.dialogRef = dialogRef;
@@ -7165,7 +7208,9 @@ class OFormLayoutDialogComponent {
7165
7208
  }
7166
7209
  }
7167
7210
  updateNavigation(data) {
7168
- this.label = this.formLayoutManager.getLabelFromData(data);
7211
+ const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
7212
+ const context = formLayoutManagerService.context;
7213
+ this.label = (context === null || context === void 0 ? void 0 : context.label) || this.formLayoutManager.getLabelFromData(data);
7169
7214
  }
7170
7215
  updateActiveData(data) {
7171
7216
  this.data = Object.assign(this.data, data);
@@ -12475,33 +12520,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
12475
12520
  }]
12476
12521
  }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
12477
12522
 
12478
- class OFormLayoutManagerService {
12479
- constructor(injector) {
12480
- this.injector = injector;
12481
- this.registeredFormLayoutManagers = {};
12482
- }
12483
- registerFormLayoutManager(comp) {
12484
- this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
12485
- }
12486
- removeFormLayoutManager(comp) {
12487
- delete this.registeredFormLayoutManagers[comp.getAttribute()];
12488
- }
12489
- get activeFormLayoutManager() {
12490
- return this._activeFormLayoutManager;
12491
- }
12492
- set activeFormLayoutManager(arg) {
12493
- this._activeFormLayoutManager = arg;
12494
- }
12495
- }
12496
- OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
12497
- OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
12498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
12499
- type: Injectable,
12500
- args: [{
12501
- providedIn: 'root'
12502
- }]
12503
- }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
12504
-
12505
12523
  class OModulesInfoService {
12506
12524
  constructor(injector, router) {
12507
12525
  this.injector = injector;
@@ -15168,7 +15186,8 @@ class CanActivateFormLayoutChildGuard {
15168
15186
  }
15169
15187
  formLayoutManager.canAddDetailComponent().subscribe(res => {
15170
15188
  if (res) {
15171
- formLayoutManager.addDetailComponent(childRoute, state.url.substring(0, state.url.indexOf('?')));
15189
+ const context = this.oFormLayoutService.context;
15190
+ formLayoutManager.addDetailComponent(childRoute, state.url.substring(0, state.url.indexOf('?')), context);
15172
15191
  }
15173
15192
  });
15174
15193
  return false;
@@ -15404,7 +15423,9 @@ class OFormLayoutTabGroupComponent {
15404
15423
  index = this.data.findIndex((item) => Object.keys(keysValues).every(key => keysValues[key] == item.params[key]));
15405
15424
  }
15406
15425
  if (index >= 0) {
15407
- let label = this.formLayoutManager.getLabelFromData(data);
15426
+ const oFormLayoutManagerService = this.injector.get(OFormLayoutManagerService);
15427
+ const context = oFormLayoutManagerService.context;
15428
+ let label = (context === null || context === void 0 ? void 0 : context.label) || this.formLayoutManager.getLabelFromData(data);
15408
15429
  this.tabGroup.selectedIndex = (index + 1);
15409
15430
  label = label.length ? label : this.formLayoutManager.getLabelFromUrlParams(this.data[index].params);
15410
15431
  this.data[index].label = label;
@@ -15933,6 +15954,7 @@ class OFormLayoutManagerComponent {
15933
15954
  return;
15934
15955
  }
15935
15956
  this.oFormLayoutManagerService.activeFormLayoutManager = undefined;
15957
+ this.oFormLayoutManagerService.context = void 0;
15936
15958
  const routeConfig = this.getParentActRouteRoute();
15937
15959
  if (Util.isDefined(routeConfig)) {
15938
15960
  for (let i = (routeConfig.canActivateChild || []).length - 1; i >= 0; i--) {
@@ -15953,7 +15975,8 @@ class OFormLayoutManagerComponent {
15953
15975
  isSplitPaneMode() {
15954
15976
  return this.mode === OFormLayoutManagerComponent.SPLIT_PANE_MODE;
15955
15977
  }
15956
- addDetailComponent(childRoute, url) {
15978
+ addDetailComponent(childRoute, url, context) {
15979
+ childRoute = Util.getLastActivateRoute(childRoute);
15957
15980
  const newDetailComp = {
15958
15981
  params: childRoute.params,
15959
15982
  queryParams: childRoute.queryParams,
@@ -15961,7 +15984,7 @@ class OFormLayoutManagerComponent {
15961
15984
  component: childRoute.routeConfig.component,
15962
15985
  url: url,
15963
15986
  id: Util.randomNumber().toString(),
15964
- label: '',
15987
+ label: (context === null || context === void 0 ? void 0 : context.label) || '',
15965
15988
  innerFormsInfo: {},
15966
15989
  insertionMode: childRoute.queryParams[Codes.INSERTION_MODE] === 'true'
15967
15990
  };
@@ -16070,7 +16093,9 @@ class OFormLayoutManagerComponent {
16070
16093
  return !comp.oFormLayoutDialog;
16071
16094
  }
16072
16095
  const compRef = this.getLayoutModeComponent();
16073
- return Util.isDefined(compRef) && compRef.isMainComponent(comp);
16096
+ return (Util.isDefined(compRef)
16097
+ && (compRef.isMainComponent(comp)
16098
+ || (Util.isDefined(comp.parentComponent)) && compRef.isMainComponent(comp.parentComponent)));
16074
16099
  }
16075
16100
  getRouteForComponent(comp) {
16076
16101
  const result = [];
@@ -16710,7 +16735,7 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16710
16735
  }
16711
16736
  get selection() {
16712
16737
  if (!Util.isDefined(this._selection)) {
16713
- this._selection = new SelectionModel(true, []);
16738
+ this._selection = new SelectionModel(true, [], true, this.compareRow());
16714
16739
  }
16715
16740
  return this._selection;
16716
16741
  }
@@ -16857,7 +16882,10 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16857
16882
  this.navigateToDetail(route, qParams, relativeTo);
16858
16883
  }
16859
16884
  }
16860
- viewDetail(item) {
16885
+ viewDetail(item, context) {
16886
+ var _a;
16887
+ const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
16888
+ formLayoutManagerService.context = void 0;
16861
16889
  if (this.oFormLayoutDialog) {
16862
16890
  console.warn('Navigation is not available yet in a form layout manager with mode="dialog"');
16863
16891
  return;
@@ -16868,6 +16896,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
16868
16896
  const qParams = Codes.getIsDetailObject();
16869
16897
  const relativeTo = this.recursiveDetail ? this.actRoute.parent : this.actRoute;
16870
16898
  const zone = this.injector.get(NgZone);
16899
+ if (!((_a = this.formLayoutManager) === null || _a === void 0 ? void 0 : _a.isSplitPaneMode())) {
16900
+ formLayoutManagerService.context = context;
16901
+ }
16871
16902
  zone.run(() => this.navigateToDetail(route, qParams, relativeTo));
16872
16903
  }
16873
16904
  }
@@ -17388,6 +17419,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
17388
17419
  }
17389
17420
  return sqlTypesArg;
17390
17421
  }
17422
+ compareRow() {
17423
+ return (o1, o2) => this.keysArray.every(key => o1[key] === o2[key]);
17424
+ }
17391
17425
  }
17392
17426
  AbstractOServiceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AbstractOServiceComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: OFormComponent }], target: i0.ɵɵFactoryTarget.Directive });
17393
17427
  AbstractOServiceComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AbstractOServiceComponent, inputs: { oattr: ["attr", "oattr"], service: "service", serviceType: ["service-type", "serviceType"], entity: "entity", queryOnInit: ["query-on-init", "queryOnInit"], queryOnBind: ["query-on-bind", "queryOnBind"], queryOnEvent: ["query-on-event", "queryOnEvent"], pageable: "pageable", columns: "columns", keys: "keys", parentKeys: ["parent-keys", "parentKeys"], staticData: ["static-data", "staticData"], queryMethod: ["query-method", "queryMethod"], paginatedQueryMethod: ["paginated-query-method", "paginatedQueryMethod"], oQueryRows: ["query-rows", "oQueryRows"], insertMethod: ["insert-method", "insertMethod"], updateMethod: ["update-method", "updateMethod"], deleteMethod: ["delete-method", "deleteMethod"], storeState: ["store-state", "storeState"], queryWithNullParentKeys: ["query-with-null-parent-keys", "queryWithNullParentKeys"], queryFallbackFunction: ["query-fallback-function", "queryFallbackFunction"], _title: ["title", "_title"], ovisible: ["visible", "ovisible"], oenabled: ["enabled", "oenabled"], controls: "controls", detailMode: ["detail-mode", "detailMode"], detailFormRoute: ["detail-form-route", "detailFormRoute"], recursiveDetail: ["recursive-detail", "recursiveDetail"], detailButtonInRow: ["detail-button-in-row", "detailButtonInRow"], detailButtonInRowIcon: ["detail-button-in-row-icon", "detailButtonInRowIcon"], editFormRoute: ["edit-form-route", "editFormRoute"], recursiveEdit: ["recursive-edit", "recursiveEdit"], editButtonInRow: ["edit-button-in-row", "editButtonInRow"], editButtonInRowIcon: ["edit-button-in-row-icon", "editButtonInRowIcon"], insertButton: ["insert-button", "insertButton"], rowHeight: ["row-height", "rowHeight"], insertFormRoute: ["insert-form-route", "insertFormRoute"], recursiveInsert: ["recursive-insert", "recursiveInsert"], filterCaseSensitive: ["filter-case-sensitive", "filterCaseSensitive"], quickFilter: ["quick-filter", "quickFilter"], quickFilterPlaceholder: ["quick-filter-placeholder", "quickFilterPlaceholder"], paginationControls: ["pagination-controls", "paginationControls"], pageSizeOptions: ["page-size-options", "pageSizeOptions"], quickFilterAppearance: ["quick-filter-appearance", "quickFilterAppearance"], disablePageSizeCalculation: ["disable-page-size-calculation", "disablePageSizeCalculation"] }, outputs: { onClick: "onClick", onDoubleClick: "onDoubleClick", onDataLoaded: "onDataLoaded", onPaginatedDataLoaded: "onPaginatedDataLoaded", onSearch: "onSearch" }, viewQueries: [{ propertyName: "matpaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "searchInputComponent", first: true, predicate: i0.forwardRef(function () { return OSearchInputComponent; }), descendants: true }], usesInheritance: true, ngImport: i0 });
@@ -27388,6 +27422,9 @@ class OColumn {
27388
27422
  if (Util.isDefined(column.searchable)) {
27389
27423
  this.searchable = column.searchable;
27390
27424
  }
27425
+ else {
27426
+ this.searchable = (column === null || column === void 0 ? void 0 : column.type) !== 'date';
27427
+ }
27391
27428
  if (Util.isDefined(column.groupable)) {
27392
27429
  this.groupable = column.groupable;
27393
27430
  }
@@ -29864,7 +29901,15 @@ class OTableButtonComponent {
29864
29901
  }
29865
29902
  innerOnClick(event) {
29866
29903
  event.stopPropagation();
29867
- this.onClick.emit();
29904
+ if (!this.isReadOnly()) {
29905
+ this.onClick.emit();
29906
+ }
29907
+ else if (this._table.showNotificationOfReadOnly) {
29908
+ this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
29909
+ }
29910
+ }
29911
+ isReadOnly() {
29912
+ return this._table.isComponentReadOnly('o-table-button', this.oattr);
29868
29913
  }
29869
29914
  isIconPositionLeft() {
29870
29915
  return this.iconPosition === Codes.ICON_POSITION_LEFT;
@@ -29990,7 +30035,7 @@ class OTableButtonsComponent {
29990
30035
  }
29991
30036
  }
29992
30037
  OTableButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTableButtonsComponent, deps: [{ token: i0.Injector }, { token: forwardRef(() => OTableBase) }], target: i0.ɵɵFactoryTarget.Component });
29993
- OTableButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableButtonsComponent, selector: "o-table-buttons", inputs: { insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"] }, host: { properties: { "class.o-table-buttons": "true" } }, ngImport: i0, template: "<div class=\"buttons\" fxLayout>\n <o-table-button *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: OTableButtonComponent, selector: "o-table-button", inputs: ["attr", "enabled", "icon", "svg-icon", "icon-position", "label"], outputs: ["onClick"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
30038
+ OTableButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableButtonsComponent, selector: "o-table-buttons", inputs: { insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"] }, host: { properties: { "class.o-table-buttons": "true" } }, ngImport: i0, template: "<div class=\"buttons\" fxLayout>\n <o-table-button attr=\"add\" *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button attr=\"refresh\" *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button attr=\"delete\" *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: OTableButtonComponent, selector: "o-table-button", inputs: ["attr", "enabled", "icon", "svg-icon", "icon-position", "label"], outputs: ["onClick"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
29994
30039
  __decorate([
29995
30040
  BooleanInputConverter(),
29996
30041
  __metadata("design:type", Boolean)
@@ -30007,7 +30052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
30007
30052
  type: Component,
30008
30053
  args: [{ selector: 'o-table-buttons', inputs: DEFAULT_INPUTS_O_TABLE_BUTTONS, outputs: DEFAULT_OUTPUTS_O_TABLE_BUTTONS, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
30009
30054
  '[class.o-table-buttons]': 'true',
30010
- }, template: "<div class=\"buttons\" fxLayout>\n <o-table-button *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>" }]
30055
+ }, template: "<div class=\"buttons\" fxLayout>\n <o-table-button attr=\"add\" *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button attr=\"refresh\" *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button attr=\"delete\" *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>\n" }]
30011
30056
  }], ctorParameters: function () {
30012
30057
  return [{ type: i0.Injector }, { type: OTableBase, decorators: [{
30013
30058
  type: Inject,
@@ -31339,7 +31384,8 @@ class OTableQuickfilterComponent {
31339
31384
  column.type === 'real' ||
31340
31385
  column.type === 'percentage' ||
31341
31386
  column.type === 'currency' ||
31342
- column.type === 'service');
31387
+ column.type === 'service' ||
31388
+ column.type === 'date');
31343
31389
  }
31344
31390
  getColumnsWithoutRendererExpressions(columns) {
31345
31391
  return columns
@@ -32187,7 +32233,10 @@ const DEFAULT_INPUTS_O_TABLE = [
32187
32233
  'showChartsOnDemandOption: show-charts-on-demand-option',
32188
32234
  'showResetWidthOption: show-reset-width-option',
32189
32235
  'disableSelectionFunction: disable-selection-function',
32190
- 'nonHidableColumns: non-hidable-columns'
32236
+ 'nonHidableColumns: non-hidable-columns',
32237
+ 'readOnly: read-only',
32238
+ 'readOnlyConfiguration: read-only-configuration',
32239
+ 'showNotificationOfReadOnly: show-notification-of-read-only'
32191
32240
  ];
32192
32241
  const DEFAULT_OUTPUTS_O_TABLE = [
32193
32242
  'onRowSelected',
@@ -32225,6 +32274,10 @@ class OTableComponent extends AbstractOServiceComponent {
32225
32274
  }
32226
32275
  }
32227
32276
  }
32277
+ isComponentReadOnly(selector, attr) {
32278
+ var _a, _b;
32279
+ return (_b = (_a = this.readOnlyConfiguration) === null || _a === void 0 ? void 0 : _a[selector]) === null || _b === void 0 ? void 0 : _b[attr];
32280
+ }
32228
32281
  get oTableOptions() {
32229
32282
  return this._oTableOptions;
32230
32283
  }
@@ -32347,6 +32400,8 @@ class OTableComponent extends AbstractOServiceComponent {
32347
32400
  this.showButtonsText = true;
32348
32401
  this.filterColumnActiveByDefault = true;
32349
32402
  this.showResetWidthOption = true;
32403
+ this.readOnly = false;
32404
+ this.showNotificationOfReadOnly = false;
32350
32405
  this.insertButton = true;
32351
32406
  this.refreshButton = true;
32352
32407
  this.deleteButton = true;
@@ -32440,6 +32495,14 @@ class OTableComponent extends AbstractOServiceComponent {
32440
32495
  this.rowHeight = oTableGlobalConfig.rowHeight;
32441
32496
  }
32442
32497
  ;
32498
+ if (Util.isDefined(oTableGlobalConfig.showChartsOnDemandOption)) {
32499
+ this.showReportOnDemandOption = oTableGlobalConfig.showChartsOnDemandOption;
32500
+ }
32501
+ ;
32502
+ if (Util.isDefined(oTableGlobalConfig.showReportOnDemandOption)) {
32503
+ this.showReportOnDemandOption = oTableGlobalConfig.showReportOnDemandOption;
32504
+ }
32505
+ ;
32443
32506
  }
32444
32507
  catch (error) {
32445
32508
  }
@@ -32935,7 +32998,7 @@ class OTableComponent extends AbstractOServiceComponent {
32935
32998
  }
32936
32999
  get selection() {
32937
33000
  if (!Util.isDefined(this._selection)) {
32938
- this._selection = new SelectionModel(this.isSelectionModeMultiple(), []);
33001
+ this._selection = new SelectionModel(this.isSelectionModeMultiple(), [], true, this.compareRow());
32939
33002
  }
32940
33003
  return this._selection;
32941
33004
  }
@@ -33256,12 +33319,24 @@ class OTableComponent extends AbstractOServiceComponent {
33256
33319
  onMatTableContentChanged() {
33257
33320
  }
33258
33321
  add() {
33322
+ if (this.readOnly) {
33323
+ if (this.showNotificationOfReadOnly) {
33324
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33325
+ }
33326
+ return;
33327
+ }
33259
33328
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
33260
33329
  return;
33261
33330
  }
33262
33331
  super.insertDetail();
33263
33332
  }
33264
33333
  remove(clearSelectedItems = false) {
33334
+ if (this.readOnly) {
33335
+ if (this.showNotificationOfReadOnly) {
33336
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33337
+ }
33338
+ return;
33339
+ }
33265
33340
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_DELETE)) {
33266
33341
  return;
33267
33342
  }
@@ -33342,7 +33417,7 @@ class OTableComponent extends AbstractOServiceComponent {
33342
33417
  handleClick(row, column, rowIndex, cellRef, event) {
33343
33418
  this.clickTimer = setTimeout(() => {
33344
33419
  if (!this.clickPrevent) {
33345
- if (this.oenabled && column.editor
33420
+ if (this.oenabled && !this.readOnly && column.editor
33346
33421
  && (this.detailMode !== Codes.DETAIL_MODE_CLICK)
33347
33422
  && (this.editionMode === Codes.EDITION_MODE_CLICK)) {
33348
33423
  this.activateColumnEdition(column, row, cellRef);
@@ -33355,7 +33430,10 @@ class OTableComponent extends AbstractOServiceComponent {
33355
33430
  }, this.clickDelay);
33356
33431
  }
33357
33432
  doHandleClick(row, column, rowIndex, $event) {
33358
- if (!this.oenabled) {
33433
+ if (this.readOnly && this.showNotificationOfReadOnly) {
33434
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33435
+ }
33436
+ if (!this.oenabled || this.readOnly) {
33359
33437
  return;
33360
33438
  }
33361
33439
  if ((this.detailMode === Codes.DETAIL_MODE_CLICK)) {
@@ -33403,6 +33481,12 @@ class OTableComponent extends AbstractOServiceComponent {
33403
33481
  handleDoubleClick(row, column, rowIndex, cellRef, $event) {
33404
33482
  clearTimeout(this.clickTimer);
33405
33483
  this.clickPrevent = true;
33484
+ if (this.readOnly) {
33485
+ if (this.showNotificationOfReadOnly) {
33486
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
33487
+ }
33488
+ return;
33489
+ }
33406
33490
  if (this.oenabled && column.editor
33407
33491
  && (!Codes.isDoubleClickMode(this.detailMode))
33408
33492
  && (Codes.isDoubleClickMode(this.editionMode))) {
@@ -33565,10 +33649,28 @@ class OTableComponent extends AbstractOServiceComponent {
33565
33649
  if (this.isDisableCheckbox(item)) {
33566
33650
  return;
33567
33651
  }
33568
- if (Util.isDefined(item) && !this.isRowSelected(item)) {
33652
+ if (this.isRowSelected(item)) {
33653
+ this.selection.clear(item);
33654
+ }
33655
+ if (Util.isDefined(item)) {
33569
33656
  this.selection.select(item);
33570
33657
  }
33571
33658
  }
33659
+ setSelectedByKeys(keyValues) {
33660
+ const rowsToSelect = this.getDataArray().filter(row => {
33661
+ return keyValues.findIndex(keyValue => row[this.keys] === keyValue) > -1;
33662
+ });
33663
+ this.selection.select(...rowsToSelect);
33664
+ }
33665
+ setSelectedByMultipleKeys(keyValues) {
33666
+ const rowsToSelect = this.getDataArray().filter(row => {
33667
+ return keyValues.findIndex(keyValue => Object.keys(keyValue).every(key => keyValue[key] === row[key])) > -1;
33668
+ });
33669
+ rowsToSelect.every(rowToSelect => this.selection.select(rowToSelect));
33670
+ }
33671
+ setSelectedByRowIds(rowIds) {
33672
+ rowIds.forEach(rowId => this.selectedRow(this.getDataArray()[rowId]));
33673
+ }
33572
33674
  get showDeleteButton() {
33573
33675
  return this.deleteButton;
33574
33676
  }
@@ -33842,7 +33944,7 @@ class OTableComponent extends AbstractOServiceComponent {
33842
33944
  this.state.selection.forEach(selectedItem => {
33843
33945
  const selectedItemKeys = Object.keys(selectedItem);
33844
33946
  const foundItem = this.dataSource.renderedData.find(data => selectedItemKeys.every(key => data[key] === selectedItem[key]));
33845
- if (foundItem && !this.isRowSelected(foundItem)) {
33947
+ if (foundItem) {
33846
33948
  this.setSelected(foundItem);
33847
33949
  }
33848
33950
  });
@@ -33932,6 +34034,12 @@ class OTableComponent extends AbstractOServiceComponent {
33932
34034
  return this._oTableOptions ? this._oTableOptions.columns.find(item => item.name === attr) : undefined;
33933
34035
  }
33934
34036
  insertRecord(recordData, sqlTypes) {
34037
+ if (this.readOnly) {
34038
+ if (this.showNotificationOfReadOnly) {
34039
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34040
+ }
34041
+ throw new Error(`Insert operation is not allowed because the table is read-only.`);
34042
+ }
33935
34043
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
33936
34044
  return undefined;
33937
34045
  }
@@ -33945,6 +34053,12 @@ class OTableComponent extends AbstractOServiceComponent {
33945
34053
  return this.daoTable.insertQuery(recordData, sqlTypes);
33946
34054
  }
33947
34055
  updateRecord(filter, updateData, sqlTypes) {
34056
+ if (this.readOnly) {
34057
+ if (this.showNotificationOfReadOnly) {
34058
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34059
+ }
34060
+ throw new Error(`Update operation is not allowed because the table is read-only.`);
34061
+ }
33948
34062
  if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_UPDATE)) {
33949
34063
  return of(this.dataSource.data);
33950
34064
  }
@@ -34183,14 +34297,20 @@ class OTableComponent extends AbstractOServiceComponent {
34183
34297
  });
34184
34298
  }
34185
34299
  viewDetail(item) {
34186
- if (!this.checkEnabledActionPermission('detail')) {
34300
+ if (this.readOnly && this.showNotificationOfReadOnly) {
34301
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34302
+ }
34303
+ if (!this.checkEnabledActionPermission('detail') || this.readOnly) {
34187
34304
  return;
34188
34305
  }
34189
34306
  this.destroyActivedTooltips();
34190
34307
  super.viewDetail(item);
34191
34308
  }
34192
34309
  editDetail(item) {
34193
- if (!this.checkEnabledActionPermission('edit')) {
34310
+ if (this.readOnly && this.showNotificationOfReadOnly) {
34311
+ this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
34312
+ }
34313
+ if (!this.checkEnabledActionPermission('edit') || this.readOnly) {
34194
34314
  return;
34195
34315
  }
34196
34316
  super.editDetail(item);
@@ -34225,8 +34345,7 @@ class OTableComponent extends AbstractOServiceComponent {
34225
34345
  return name + this.getSuffixColumnInsertable();
34226
34346
  }
34227
34347
  isRowSelected(row) {
34228
- const keys = Object.keys(row);
34229
- return !this.isSelectionModeNone() && this.selection.selected.some((element) => keys.every(key => row[key] === element[key]));
34348
+ return !this.isSelectionModeNone() && this.selection.isSelected(row);
34230
34349
  }
34231
34350
  getColumnWidthFromState(colDef) {
34232
34351
  let columnWidth = colDef.definition && colDef.definition.width ? colDef.definition.width : void 0;
@@ -34538,13 +34657,16 @@ class OTableComponent extends AbstractOServiceComponent {
34538
34657
  isDisableCheckbox(item) {
34539
34658
  let disable = false;
34540
34659
  if (Util.isDefined(this.disableSelectionFunction)) {
34541
- return this.disableSelectionFunction(item);
34660
+ return this.disableSelectionFunction(Object.assign({}, item));
34542
34661
  }
34543
34662
  return disable;
34544
34663
  }
34545
34664
  getService() {
34546
34665
  return this.dataService;
34547
34666
  }
34667
+ getSnackService() {
34668
+ return this.snackBarService;
34669
+ }
34548
34670
  }
34549
34671
  OTableComponent.DEFAULT_BASE_SIZE_SPINNER = 100;
34550
34672
  OTableComponent.FIRST_LAST_CELL_PADDING = 24;
@@ -34552,7 +34674,7 @@ OTableComponent.EXPANDED_ROW_CONTAINER_CLASS = 'expanded-row-container-';
34552
34674
  OTableComponent.AVAILABLE_GROUPING_COLUMNS_RENDERERS = ['currency', 'integer', 'real'];
34553
34675
  OTableComponent.DEFAULT_ROW_HEIGHT = 36;
34554
34676
  OTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTableComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i1$1.MatDialog }, { token: i0.ViewContainerRef }, { token: i0.ApplicationRef }, { token: forwardRef(() => OFormComponent), optional: true }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }], target: i0.ɵɵFactoryTarget.Component });
34555
- OTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableComponent, selector: "o-table", inputs: { visibleColumns: ["visible-columns", "visibleColumns"], defaultVisibleColumns: ["default-visible-columns", "defaultVisibleColumns"], sortColumns: ["sort-columns", "sortColumns"], quickFilterCallback: ["quick-filter-function", "quickFilterCallback"], deleteButton: ["delete-button", "deleteButton"], refreshButton: ["refresh-button", "refreshButton"], columnsVisibilityButton: ["columns-visibility-button", "columnsVisibilityButton"], exportButton: ["export-button", "exportButton"], showConfigurationOption: ["show-configuration-option", "showConfigurationOption"], showButtonsText: ["show-buttons-text", "showButtonsText"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], paginationControls: ["pagination-controls", "paginationControls"], fixedHeader: ["fixed-header", "fixedHeader"], showTitle: ["show-title", "showTitle"], editionMode: ["edition-mode", "editionMode"], selectionMode: ["selection-mode", "selectionMode"], horizontalScroll: ["horizontal-scroll", "horizontalScroll"], showPaginatorFirstLastButtons: ["show-paginator-first-last-buttons", "showPaginatorFirstLastButtons"], autoAlignTitles: ["auto-align-titles", "autoAlignTitles"], multipleSort: ["multiple-sort", "multipleSort"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], orderable: "orderable", resizable: "resizable", keepSelectedItems: ["keep-selected-items", "keepSelectedItems"], exportMode: ["export-mode", "exportMode"], exportServiceType: ["export-service-type", "exportServiceType"], autoAdjust: ["auto-adjust", "autoAdjust"], showFilterOption: ["show-filter-option", "showFilterOption"], visibleExportDialogButtons: ["visible-export-dialog-buttons", "visibleExportDialogButtons"], rowClass: ["row-class", "rowClass"], filterColumnActiveByDefault: ["filter-column-active-by-default", "filterColumnActiveByDefault"], groupedColumns: ["grouped-columns", "groupedColumns"], groupable: "groupable", expandGroupsSameLevel: ["expand-groups-same-level", "expandGroupsSameLevel"], collapseGroupedColumns: ["collapse-grouped-columns", "collapseGroupedColumns"], virtualScroll: ["virtual-scroll", "virtualScroll"], contextMenu: ["context-menu", "contextMenu"], showExpandableIconFunction: ["show-expandable-icon-function", "showExpandableIconFunction"], showReportOnDemandOption: ["show-report-on-demand-option", "showReportOnDemandOption"], showChartsOnDemandOption: ["show-charts-on-demand-option", "showChartsOnDemandOption"], showResetWidthOption: ["show-reset-width-option", "showResetWidthOption"], disableSelectionFunction: ["disable-selection-function", "disableSelectionFunction"], nonHidableColumns: ["non-hidable-columns", "nonHidableColumns"] }, outputs: { onRowSelected: "onRowSelected", onRowDeselected: "onRowDeselected", onRowDeleted: "onRowDeleted" }, host: { listeners: { "document:click": "handleDOMClick($event)", "window:resize": "updateScrolledState()" }, properties: { "class.o-table": "true", "class.ontimize-table": "true", "class.o-table-fixed": "fixedHeader", "class.o-table-disabled": "!enabled" } }, providers: [
34677
+ OTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableComponent, selector: "o-table", inputs: { visibleColumns: ["visible-columns", "visibleColumns"], defaultVisibleColumns: ["default-visible-columns", "defaultVisibleColumns"], sortColumns: ["sort-columns", "sortColumns"], quickFilterCallback: ["quick-filter-function", "quickFilterCallback"], deleteButton: ["delete-button", "deleteButton"], refreshButton: ["refresh-button", "refreshButton"], columnsVisibilityButton: ["columns-visibility-button", "columnsVisibilityButton"], exportButton: ["export-button", "exportButton"], showConfigurationOption: ["show-configuration-option", "showConfigurationOption"], showButtonsText: ["show-buttons-text", "showButtonsText"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], paginationControls: ["pagination-controls", "paginationControls"], fixedHeader: ["fixed-header", "fixedHeader"], showTitle: ["show-title", "showTitle"], editionMode: ["edition-mode", "editionMode"], selectionMode: ["selection-mode", "selectionMode"], horizontalScroll: ["horizontal-scroll", "horizontalScroll"], showPaginatorFirstLastButtons: ["show-paginator-first-last-buttons", "showPaginatorFirstLastButtons"], autoAlignTitles: ["auto-align-titles", "autoAlignTitles"], multipleSort: ["multiple-sort", "multipleSort"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], orderable: "orderable", resizable: "resizable", keepSelectedItems: ["keep-selected-items", "keepSelectedItems"], exportMode: ["export-mode", "exportMode"], exportServiceType: ["export-service-type", "exportServiceType"], autoAdjust: ["auto-adjust", "autoAdjust"], showFilterOption: ["show-filter-option", "showFilterOption"], visibleExportDialogButtons: ["visible-export-dialog-buttons", "visibleExportDialogButtons"], rowClass: ["row-class", "rowClass"], filterColumnActiveByDefault: ["filter-column-active-by-default", "filterColumnActiveByDefault"], groupedColumns: ["grouped-columns", "groupedColumns"], groupable: "groupable", expandGroupsSameLevel: ["expand-groups-same-level", "expandGroupsSameLevel"], collapseGroupedColumns: ["collapse-grouped-columns", "collapseGroupedColumns"], virtualScroll: ["virtual-scroll", "virtualScroll"], contextMenu: ["context-menu", "contextMenu"], showExpandableIconFunction: ["show-expandable-icon-function", "showExpandableIconFunction"], showReportOnDemandOption: ["show-report-on-demand-option", "showReportOnDemandOption"], showChartsOnDemandOption: ["show-charts-on-demand-option", "showChartsOnDemandOption"], showResetWidthOption: ["show-reset-width-option", "showResetWidthOption"], disableSelectionFunction: ["disable-selection-function", "disableSelectionFunction"], nonHidableColumns: ["non-hidable-columns", "nonHidableColumns"], readOnly: ["read-only", "readOnly"], readOnlyConfiguration: ["read-only-configuration", "readOnlyConfiguration"], showNotificationOfReadOnly: ["show-notification-of-read-only", "showNotificationOfReadOnly"] }, outputs: { onRowSelected: "onRowSelected", onRowDeselected: "onRowDeselected", onRowDeleted: "onRowDeleted" }, host: { listeners: { "document:click": "handleDOMClick($event)", "window:resize": "updateScrolledState()" }, properties: { "class.o-table": "true", "class.ontimize-table": "true", "class.o-table-fixed": "fixedHeader", "class.o-table-disabled": "!enabled" } }, providers: [
34556
34678
  OntimizeServiceProvider,
34557
34679
  ComponentStateServiceProvider,
34558
34680
  OTableDataSourceService,
@@ -34606,6 +34728,14 @@ __decorate([
34606
34728
  BooleanInputConverter(),
34607
34729
  __metadata("design:type", Boolean)
34608
34730
  ], OTableComponent.prototype, "showResetWidthOption", void 0);
34731
+ __decorate([
34732
+ BooleanInputConverter(),
34733
+ __metadata("design:type", Boolean)
34734
+ ], OTableComponent.prototype, "readOnly", void 0);
34735
+ __decorate([
34736
+ BooleanInputConverter(),
34737
+ __metadata("design:type", Boolean)
34738
+ ], OTableComponent.prototype, "showNotificationOfReadOnly", void 0);
34609
34739
  __decorate([
34610
34740
  BooleanInputConverter(),
34611
34741
  __metadata("design:type", Boolean)
@@ -34725,7 +34855,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
34725
34855
  }], tableRowExpandable: [{
34726
34856
  type: ContentChild,
34727
34857
  args: [OTableRowExpandableComponent]
34728
- }], selectAllCheckbox: [], exportButton: [], showConfigurationOption: [], columnsVisibilityButton: [], showFilterOption: [], showReportOnDemandOption: [], showChartsOnDemandOption: [], showButtonsText: [], filterColumnActiveByDefault: [], showResetWidthOption: [], insertButton: [], refreshButton: [], deleteButton: [], fixedHeader: [], showTitle: [], horizontalScroll: [], showPaginatorFirstLastButtons: [], autoAlignTitles: [], multipleSort: [], orderable: [], resizable: [], autoAdjust: [], groupable: [], expandGroupsSameLevel: [], collapseGroupedColumns: [], virtualScroll: [], contextMenu: [], keepSelectedItems: [], tableBodyEl: [{
34858
+ }], selectAllCheckbox: [], exportButton: [], showConfigurationOption: [], columnsVisibilityButton: [], showFilterOption: [], showReportOnDemandOption: [], showChartsOnDemandOption: [], showButtonsText: [], filterColumnActiveByDefault: [], showResetWidthOption: [], readOnly: [], showNotificationOfReadOnly: [], insertButton: [], refreshButton: [], deleteButton: [], fixedHeader: [], showTitle: [], horizontalScroll: [], showPaginatorFirstLastButtons: [], autoAlignTitles: [], multipleSort: [], orderable: [], resizable: [], autoAdjust: [], groupable: [], expandGroupsSameLevel: [], collapseGroupedColumns: [], virtualScroll: [], contextMenu: [], keepSelectedItems: [], tableBodyEl: [{
34729
34859
  type: ViewChild,
34730
34860
  args: ['tableBody']
34731
34861
  }], tableHeaderEl: [{
@@ -36036,6 +36166,12 @@ class OTableCellRendererActionComponent extends OBaseTableCellRenderer {
36036
36166
  event.stopPropagation();
36037
36167
  event.preventDefault();
36038
36168
  }
36169
+ if (this.table.readOnly) {
36170
+ if (this.table.showNotificationOfReadOnly) {
36171
+ this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
36172
+ }
36173
+ return;
36174
+ }
36039
36175
  if (Util.isDefined(this.action)) {
36040
36176
  switch (this.action.toLowerCase()) {
36041
36177
  case 'detail':
@@ -36833,7 +36969,6 @@ class OTableColumnComponent {
36833
36969
  this.table = table;
36834
36970
  this.injector = injector;
36835
36971
  this._defaultSQLTypeKey = 'OTHER';
36836
- this._searchable = true;
36837
36972
  this.editable = false;
36838
36973
  this.tooltip = false;
36839
36974
  this._multiline = false;
@@ -37604,7 +37739,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37604
37739
  return this.rootNodes;
37605
37740
  }
37606
37741
  else {
37607
- return this.childQueryData(node);
37742
+ return node.treeNode.childQueryData(node);
37608
37743
  }
37609
37744
  }
37610
37745
  getComponentFilter(existingFilter = {}) {
@@ -37671,6 +37806,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37671
37806
  'id': this.getNodeId(node, parentNode),
37672
37807
  'label': this.getItemText(node),
37673
37808
  'level': level,
37809
+ 'node': this,
37674
37810
  treeNode: this.treeNode,
37675
37811
  'expandable': Util.isDefined(this.treeNode) || !!(nodeChildren === null || nodeChildren === void 0 ? void 0 : nodeChildren.length) || this.recursive,
37676
37812
  'data': node,
@@ -37745,7 +37881,7 @@ class OTreeComponent extends AbstractOServiceComponent {
37745
37881
  this.onNodeClick.emit(node);
37746
37882
  this.selectedNode = node;
37747
37883
  if (this.detailMode !== Codes.DETAIL_MODE_NONE && !this.isRootNode(node)) {
37748
- this.navigateToViewDetail(node);
37884
+ node.node.viewDetail(node.data, { label: node.label });
37749
37885
  }
37750
37886
  }
37751
37887
  isRootNode(node) {
@@ -37964,23 +38100,6 @@ class OTreeComponent extends AbstractOServiceComponent {
37964
38100
  }
37965
38101
  return this.keys + ':' + id;
37966
38102
  }
37967
- childQueryData(node) {
37968
- let queryMethodName = this.queryMethod;
37969
- if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
37970
- return of({ data: [] });
37971
- }
37972
- const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
37973
- let filter;
37974
- if (this.recursive) {
37975
- filter = parentItem !== null && parentItem !== void 0 ? parentItem : {};
37976
- filter[this.parentColumn] = node.data[this.keysArray[0]];
37977
- }
37978
- else {
37979
- filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
37980
- }
37981
- let queryArguments = [filter, this.colArray, this.entity];
37982
- return this.dataService[queryMethodName](...queryArguments);
37983
- }
37984
38103
  navigateToViewDetail(node) {
37985
38104
  if (Util.isDefined(node.route)) {
37986
38105
  let route = undefined;
@@ -38003,9 +38122,15 @@ class OTreeComponent extends AbstractOServiceComponent {
38003
38122
  isSelectedNode(node) {
38004
38123
  return this.selectedNode == node;
38005
38124
  }
38125
+ onItemDetailClick(node) {
38126
+ this.handleItemClick(node.data);
38127
+ }
38006
38128
  }
38007
38129
  OTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: forwardRef(() => OFormComponent), optional: true }], target: i0.ɵɵFactoryTarget.Component });
38008
- OTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeComponent, selector: "o-tree", inputs: { oattr: ["attr", "oattr"], service: "service", entity: "entity", columns: "columns", keys: "keys", parentKeys: ["parent-keys", "parentKeys"], queryMethod: ["query-method", "queryMethod"], insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"], visibleColumns: ["visible-columns", "visibleColumns"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], separator: "separator", parentColumn: ["parent-column", "parentColumn"], sortColumn: ["sort-column", "sortColumn"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], filterCaseSensitive: ["filter-case-sensitive", "filterCaseSensitive"], quickFilter: ["quick-filter", "quickFilter"], quickFilterPlaceholder: ["quick-filter-placeholder", "quickFilterPlaceholder"], quickFilterColumns: ["quick-filter-columns", "quickFilterColumns"], detailMode: ["detail-mode", "detailMode"], detailFormRoute: ["detail-form-route", "detailFormRoute"], showButtonsText: ["show-buttons-text", "showButtonsText"], rootTitle: ["root-title", "rootTitle"], recursive: "recursive", route: "route" }, outputs: { onNodeSelected: "onNodeSelected", onNodeExpanded: "onNodeExpanded", onNodeCollapsed: "onNodeCollapsed", onLoadNextLevel: "onLoadNextLevel", onDataLoaded: "onDataLoaded", onNodeClick: "onNodeClick" }, host: { properties: { "class.o-tree": "true" } }, providers: [OTreeDao], queries: [{ propertyName: "leafNodeTemplate", first: true, predicate: ["leafNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "parentNodeTemplate", first: true, predicate: ["parentNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "nodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "treeNode", first: true, predicate: i0.forwardRef(function () { return OTreeNodeComponent; }) }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OSearchInputComponent, selector: "o-search-input", inputs: ["placeholder", "label", "width", "float-label", "appearance", "columns", "filter-case-sensitive", "show-case-sensitive-checkbox", "show-menu"], outputs: ["onSearch"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i10$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i10$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i10$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i10$2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: OTreeMenuComponent, selector: "o-tree-menu", inputs: ["select-all-checkbox", "select-all-checkbox-visible"], outputs: ["onSelectCheckboxChange"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], encapsulation: i0.ViewEncapsulation.None });
38130
+ 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: [
38131
+ OTreeDao,
38132
+ OntimizeServiceProvider
38133
+ ], queries: [{ propertyName: "leafNodeTemplate", first: true, predicate: ["leafNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "parentNodeTemplate", first: true, predicate: ["parentNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "nodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "treeNode", first: true, predicate: i0.forwardRef(function () { return OTreeNodeComponent; }) }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OSearchInputComponent, selector: "o-search-input", inputs: ["placeholder", "label", "width", "float-label", "appearance", "columns", "filter-case-sensitive", "show-case-sensitive-checkbox", "show-menu"], outputs: ["onSearch"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i10$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i10$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i10$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i10$2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: OTreeMenuComponent, selector: "o-tree-menu", inputs: ["select-all-checkbox", "select-all-checkbox-visible"], outputs: ["onSelectCheckboxChange"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], encapsulation: i0.ViewEncapsulation.None });
38009
38134
  __decorate([
38010
38135
  BooleanInputConverter(),
38011
38136
  __metadata("design:type", Boolean)
@@ -38034,7 +38159,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
38034
38159
  type: Component,
38035
38160
  args: [{ selector: 'o-tree', inputs: DEFAULT_INPUTS_O_TREE, outputs: DEFAULT_OUTPUTS_O_TREE, encapsulation: ViewEncapsulation.None, host: {
38036
38161
  '[class.o-tree]': 'true'
38037
- }, providers: [OTreeDao], template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"] }]
38162
+ }, providers: [
38163
+ OTreeDao,
38164
+ OntimizeServiceProvider
38165
+ ], template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"] }]
38038
38166
  }], ctorParameters: function () {
38039
38167
  return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{
38040
38168
  type: Optional
@@ -38057,10 +38185,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
38057
38185
  }] } });
38058
38186
 
38059
38187
  class OTreeNodeComponent extends OTreeComponent {
38060
- constructor(injector, elRef, form, oTree, parentNode) {
38061
- super(injector, elRef, form);
38188
+ constructor(injector, elementRef, form, parentComponent, parentNode) {
38189
+ super(injector, elementRef, form);
38062
38190
  this.injector = injector;
38063
- this.oTree = oTree;
38191
+ this.parentComponent = parentComponent;
38064
38192
  this.parentNode = parentNode;
38065
38193
  }
38066
38194
  ngOnInit() {
@@ -38073,14 +38201,32 @@ class OTreeNodeComponent extends OTreeComponent {
38073
38201
  this.visibleColumnsArray = Util.parseArray(this.visibleColumns, true);
38074
38202
  this.quickFilterColArray = Util.parseArray(this.quickFilterColumns, true);
38075
38203
  }
38204
+ childQueryData(node) {
38205
+ let queryMethodName = this.queryMethod;
38206
+ if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
38207
+ return of({ data: [] });
38208
+ }
38209
+ const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
38210
+ let filter;
38211
+ if (this.recursive) {
38212
+ filter = parentItem !== null && parentItem !== void 0 ? parentItem : {};
38213
+ filter[this.parentColumn] = node.data[this.keysArray[0]];
38214
+ }
38215
+ else {
38216
+ filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
38217
+ }
38218
+ let queryArguments = [filter, this.colArray, this.entity];
38219
+ return this.dataService[queryMethodName](...queryArguments);
38220
+ }
38076
38221
  }
38077
38222
  OTreeNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeNodeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: forwardRef(() => OFormComponent), optional: true }, { token: forwardRef(() => OTreeComponent), optional: true }, { token: OTreeNodeComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
38078
- OTreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeNodeComponent, selector: "o-tree-node", usesInheritance: true, ngImport: i0, template: ' ', isInline: true });
38223
+ OTreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeNodeComponent, selector: "o-tree-node", providers: [OntimizeServiceProvider], usesInheritance: true, ngImport: i0, template: ' ', isInline: true });
38079
38224
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeNodeComponent, decorators: [{
38080
38225
  type: Component,
38081
38226
  args: [{
38082
38227
  selector: 'o-tree-node',
38083
- template: ' '
38228
+ template: ' ',
38229
+ providers: [OntimizeServiceProvider]
38084
38230
  }]
38085
38231
  }], ctorParameters: function () {
38086
38232
  return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{