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.
- package/esm2020/lib/components/o-service-base-component.class.mjs +1 -1
- package/esm2020/lib/components/o-service-component.class.mjs +12 -3
- package/esm2020/lib/components/table/column/cell-renderer/action/o-table-cell-renderer-action.component.mjs +7 -1
- package/esm2020/lib/components/table/column/o-column.class.mjs +4 -1
- package/esm2020/lib/components/table/column/o-table-column.component.mjs +1 -2
- package/esm2020/lib/components/table/extensions/header/table-button/o-table-button.component.mjs +10 -2
- package/esm2020/lib/components/table/extensions/header/table-buttons/o-table-buttons.component.mjs +3 -3
- package/esm2020/lib/components/table/extensions/header/table-quickfilter/o-table-quickfilter.component.mjs +3 -2
- package/esm2020/lib/components/table/o-table-base.class.mjs +1 -1
- package/esm2020/lib/components/table/o-table.component.mjs +97 -14
- package/esm2020/lib/components/tree/o-tree-dao.service.mjs +1 -1
- package/esm2020/lib/components/tree/o-tree.component.mjs +17 -24
- package/esm2020/lib/components/tree/o-tree.datasource.mjs +1 -1
- package/esm2020/lib/components/tree/tree-node/tree-node.component.mjs +27 -6
- package/esm2020/lib/i18n/i18n.mjs +4 -1
- package/esm2020/lib/interfaces/layout-manager-component.interface.mjs +1 -1
- package/esm2020/lib/layouts/form-layout/dialog/o-form-layout-dialog.component.mjs +5 -2
- package/esm2020/lib/layouts/form-layout/guards/o-form-layout-can-activate-child.guard.mjs +3 -2
- package/esm2020/lib/layouts/form-layout/o-form-layout-manager-base.class.mjs +1 -1
- package/esm2020/lib/layouts/form-layout/o-form-layout-manager.component.mjs +8 -4
- package/esm2020/lib/layouts/form-layout/split-pane/o-form-layout-split-pane.component.mjs +1 -1
- package/esm2020/lib/layouts/form-layout/tabgroup/o-form-layout-tabgroup.component.mjs +5 -2
- package/esm2020/lib/services/o-form-layout-manager.service.mjs +7 -1
- package/esm2020/lib/services/snackbar.service.mjs +1 -1
- package/esm2020/lib/types/form-layout-manager-context.type.mjs +2 -0
- package/esm2020/lib/types/table/o-table-global-config.type.mjs +1 -1
- package/esm2020/lib/types/tree-flat-node.type.mjs +2 -0
- package/esm2020/lib/util/util.mjs +8 -1
- package/fesm2015/ontimize-web-ngx.mjs +225 -79
- package/fesm2015/ontimize-web-ngx.mjs.map +1 -1
- package/fesm2020/ontimize-web-ngx.mjs +223 -79
- package/fesm2020/ontimize-web-ngx.mjs.map +1 -1
- package/lib/components/o-service-base-component.class.d.ts +1 -0
- package/lib/components/o-service-component.class.d.ts +5 -3
- package/lib/components/table/extensions/header/table-button/o-table-button.component.d.ts +1 -0
- package/lib/components/table/o-table-base.class.d.ts +13 -5
- package/lib/components/table/o-table.component.d.ts +11 -2
- package/lib/components/tree/o-tree-dao.service.d.ts +1 -1
- package/lib/components/tree/o-tree.component.d.ts +5 -16
- package/lib/components/tree/o-tree.datasource.d.ts +2 -1
- package/lib/components/tree/tree-node/tree-node.component.d.ts +6 -2
- package/lib/i18n/i18n.d.ts +3 -0
- package/lib/interfaces/layout-manager-component.interface.d.ts +1 -0
- package/lib/layouts/form-layout/o-form-layout-manager-base.class.d.ts +2 -0
- package/lib/layouts/form-layout/o-form-layout-manager.component.d.ts +2 -1
- package/lib/services/o-form-layout-manager.service.d.ts +5 -1
- package/lib/types/form-layout-manager-context.type.d.ts +3 -0
- package/lib/types/table/o-table-global-config.type.d.ts +2 -0
- package/lib/types/tree-flat-node.type.d.ts +14 -0
- package/lib/util/util.d.ts +2 -0
- 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
|
|
|
@@ -1232,6 +1239,7 @@ const MAP = {
|
|
|
1232
1239
|
'MESSAGES.ERROR_403_TEXT': 'You are not authorized to view this page.',
|
|
1233
1240
|
'MESSAGES.ERROR_403_TEXT_BUTTON': 'Navigate back',
|
|
1234
1241
|
'MESSAGES.AVOID_QUERY_WITHOUT_QUICKFILTER_COLUMNS': 'No column has been selected to perform the search.',
|
|
1242
|
+
'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operation is not allowed due to the table is read-only',
|
|
1235
1243
|
'INPUT.COMBO.EMPTY': 'No results found',
|
|
1236
1244
|
'INPUT.COMBO.MESSAGE_TRIGGER': ' (+{0} others)',
|
|
1237
1245
|
'TABLE.FILTER_BY_COLUMN.CHECK_ALL': 'Select all',
|
|
@@ -1533,6 +1541,7 @@ const MAP = {
|
|
|
1533
1541
|
'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Error al exportar los datos de la tabla.',
|
|
1534
1542
|
'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Se han exportado los datos de la tabla correctamente.',
|
|
1535
1543
|
'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operación no permitida debido a restricciones de permisos.',
|
|
1544
|
+
'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operación no permitida debido a que la tabla es de solo lectura',
|
|
1536
1545
|
'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegación no permitida debido a restricciones de permisos.',
|
|
1537
1546
|
'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegación redirigida debido a restricciones de permisos.',
|
|
1538
1547
|
'MESSAGES.ERROR_403_TEXT': 'No está autorizado para ver esta página.',
|
|
@@ -1830,6 +1839,7 @@ const MAP = {
|
|
|
1830
1839
|
'MESSAGES.ERROR_EXPORT_TABLE_DATA': 'Erro na exportação dos dados da tabela.',
|
|
1831
1840
|
'MESSAGES.SUCCESS_EXPORT_TABLE_DATA': 'Os dados da tabela foram exportados corretamente.',
|
|
1832
1841
|
'MESSAGES.OPERATION_NOT_ALLOWED_PERMISSION': 'Operação não permitida por falta de permissões.',
|
|
1842
|
+
'MESSAGES.OPERATION_NOT_ALLOWED_READONLY': 'Operação não permitida porque a tabela é somente leitura',
|
|
1833
1843
|
'MESSAGES.NAVIGATION_NOT_ALLOWED_PERMISSION': 'Navegação não permitida por falta de permissões.',
|
|
1834
1844
|
'MESSAGES.NAVIGATION_REDIRECTED_PERMISSION': 'Navegção redirecionada por falta de permissões.',
|
|
1835
1845
|
'MESSAGES.ERROR_403_TEXT': 'Não tem autorização para ver esta página.',
|
|
@@ -6770,6 +6780,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
6770
6780
|
type: Input
|
|
6771
6781
|
}] } });
|
|
6772
6782
|
|
|
6783
|
+
class OFormLayoutManagerService {
|
|
6784
|
+
constructor(injector) {
|
|
6785
|
+
this.injector = injector;
|
|
6786
|
+
this.registeredFormLayoutManagers = {};
|
|
6787
|
+
}
|
|
6788
|
+
registerFormLayoutManager(comp) {
|
|
6789
|
+
this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
|
|
6790
|
+
}
|
|
6791
|
+
removeFormLayoutManager(comp) {
|
|
6792
|
+
delete this.registeredFormLayoutManagers[comp.getAttribute()];
|
|
6793
|
+
}
|
|
6794
|
+
get activeFormLayoutManager() {
|
|
6795
|
+
return this._activeFormLayoutManager;
|
|
6796
|
+
}
|
|
6797
|
+
set activeFormLayoutManager(arg) {
|
|
6798
|
+
this._activeFormLayoutManager = arg;
|
|
6799
|
+
}
|
|
6800
|
+
set context(value) {
|
|
6801
|
+
this._context = value;
|
|
6802
|
+
}
|
|
6803
|
+
get context() {
|
|
6804
|
+
return this._context;
|
|
6805
|
+
}
|
|
6806
|
+
}
|
|
6807
|
+
OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6808
|
+
OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
|
|
6809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
|
|
6810
|
+
type: Injectable,
|
|
6811
|
+
args: [{
|
|
6812
|
+
providedIn: 'root'
|
|
6813
|
+
}]
|
|
6814
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
6815
|
+
|
|
6773
6816
|
class OFormLayoutDialogComponent {
|
|
6774
6817
|
constructor(dialogRef, injector, data) {
|
|
6775
6818
|
this.dialogRef = dialogRef;
|
|
@@ -6800,7 +6843,9 @@ class OFormLayoutDialogComponent {
|
|
|
6800
6843
|
}
|
|
6801
6844
|
}
|
|
6802
6845
|
updateNavigation(data) {
|
|
6803
|
-
|
|
6846
|
+
const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
|
|
6847
|
+
const context = formLayoutManagerService.context;
|
|
6848
|
+
this.label = context?.label || this.formLayoutManager.getLabelFromData(data);
|
|
6804
6849
|
}
|
|
6805
6850
|
updateActiveData(data) {
|
|
6806
6851
|
this.data = Object.assign(this.data, data);
|
|
@@ -12452,33 +12497,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
12452
12497
|
}]
|
|
12453
12498
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
12454
12499
|
|
|
12455
|
-
class OFormLayoutManagerService {
|
|
12456
|
-
constructor(injector) {
|
|
12457
|
-
this.injector = injector;
|
|
12458
|
-
this.registeredFormLayoutManagers = {};
|
|
12459
|
-
}
|
|
12460
|
-
registerFormLayoutManager(comp) {
|
|
12461
|
-
this.registeredFormLayoutManagers[comp.getAttribute()] = comp;
|
|
12462
|
-
}
|
|
12463
|
-
removeFormLayoutManager(comp) {
|
|
12464
|
-
delete this.registeredFormLayoutManagers[comp.getAttribute()];
|
|
12465
|
-
}
|
|
12466
|
-
get activeFormLayoutManager() {
|
|
12467
|
-
return this._activeFormLayoutManager;
|
|
12468
|
-
}
|
|
12469
|
-
set activeFormLayoutManager(arg) {
|
|
12470
|
-
this._activeFormLayoutManager = arg;
|
|
12471
|
-
}
|
|
12472
|
-
}
|
|
12473
|
-
OFormLayoutManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12474
|
-
OFormLayoutManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, providedIn: 'root' });
|
|
12475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OFormLayoutManagerService, decorators: [{
|
|
12476
|
-
type: Injectable,
|
|
12477
|
-
args: [{
|
|
12478
|
-
providedIn: 'root'
|
|
12479
|
-
}]
|
|
12480
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
12481
|
-
|
|
12482
12500
|
class OModulesInfoService {
|
|
12483
12501
|
constructor(injector, router) {
|
|
12484
12502
|
this.injector = injector;
|
|
@@ -15127,7 +15145,8 @@ class CanActivateFormLayoutChildGuard {
|
|
|
15127
15145
|
}
|
|
15128
15146
|
formLayoutManager.canAddDetailComponent().subscribe(res => {
|
|
15129
15147
|
if (res) {
|
|
15130
|
-
|
|
15148
|
+
const context = this.oFormLayoutService.context;
|
|
15149
|
+
formLayoutManager.addDetailComponent(childRoute, state.url.substring(0, state.url.indexOf('?')), context);
|
|
15131
15150
|
}
|
|
15132
15151
|
});
|
|
15133
15152
|
return false;
|
|
@@ -15363,7 +15382,9 @@ class OFormLayoutTabGroupComponent {
|
|
|
15363
15382
|
index = this.data.findIndex((item) => Object.keys(keysValues).every(key => keysValues[key] == item.params[key]));
|
|
15364
15383
|
}
|
|
15365
15384
|
if (index >= 0) {
|
|
15366
|
-
|
|
15385
|
+
const oFormLayoutManagerService = this.injector.get(OFormLayoutManagerService);
|
|
15386
|
+
const context = oFormLayoutManagerService.context;
|
|
15387
|
+
let label = context?.label || this.formLayoutManager.getLabelFromData(data);
|
|
15367
15388
|
this.tabGroup.selectedIndex = (index + 1);
|
|
15368
15389
|
label = label.length ? label : this.formLayoutManager.getLabelFromUrlParams(this.data[index].params);
|
|
15369
15390
|
this.data[index].label = label;
|
|
@@ -15888,6 +15909,7 @@ class OFormLayoutManagerComponent {
|
|
|
15888
15909
|
return;
|
|
15889
15910
|
}
|
|
15890
15911
|
this.oFormLayoutManagerService.activeFormLayoutManager = undefined;
|
|
15912
|
+
this.oFormLayoutManagerService.context = void 0;
|
|
15891
15913
|
const routeConfig = this.getParentActRouteRoute();
|
|
15892
15914
|
if (Util.isDefined(routeConfig)) {
|
|
15893
15915
|
for (let i = (routeConfig.canActivateChild || []).length - 1; i >= 0; i--) {
|
|
@@ -15908,7 +15930,8 @@ class OFormLayoutManagerComponent {
|
|
|
15908
15930
|
isSplitPaneMode() {
|
|
15909
15931
|
return this.mode === OFormLayoutManagerComponent.SPLIT_PANE_MODE;
|
|
15910
15932
|
}
|
|
15911
|
-
addDetailComponent(childRoute, url) {
|
|
15933
|
+
addDetailComponent(childRoute, url, context) {
|
|
15934
|
+
childRoute = Util.getLastActivateRoute(childRoute);
|
|
15912
15935
|
const newDetailComp = {
|
|
15913
15936
|
params: childRoute.params,
|
|
15914
15937
|
queryParams: childRoute.queryParams,
|
|
@@ -15916,7 +15939,7 @@ class OFormLayoutManagerComponent {
|
|
|
15916
15939
|
component: childRoute.routeConfig.component,
|
|
15917
15940
|
url: url,
|
|
15918
15941
|
id: Util.randomNumber().toString(),
|
|
15919
|
-
label: '',
|
|
15942
|
+
label: context?.label || '',
|
|
15920
15943
|
innerFormsInfo: {},
|
|
15921
15944
|
insertionMode: childRoute.queryParams[Codes.INSERTION_MODE] === 'true'
|
|
15922
15945
|
};
|
|
@@ -16025,7 +16048,9 @@ class OFormLayoutManagerComponent {
|
|
|
16025
16048
|
return !comp.oFormLayoutDialog;
|
|
16026
16049
|
}
|
|
16027
16050
|
const compRef = this.getLayoutModeComponent();
|
|
16028
|
-
return Util.isDefined(compRef)
|
|
16051
|
+
return (Util.isDefined(compRef)
|
|
16052
|
+
&& (compRef.isMainComponent(comp)
|
|
16053
|
+
|| (Util.isDefined(comp.parentComponent)) && compRef.isMainComponent(comp.parentComponent)));
|
|
16029
16054
|
}
|
|
16030
16055
|
getRouteForComponent(comp) {
|
|
16031
16056
|
const result = [];
|
|
@@ -16662,7 +16687,7 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
|
|
|
16662
16687
|
}
|
|
16663
16688
|
get selection() {
|
|
16664
16689
|
if (!Util.isDefined(this._selection)) {
|
|
16665
|
-
this._selection = new SelectionModel(true, []);
|
|
16690
|
+
this._selection = new SelectionModel(true, [], true, this.compareRow());
|
|
16666
16691
|
}
|
|
16667
16692
|
return this._selection;
|
|
16668
16693
|
}
|
|
@@ -16809,7 +16834,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
|
|
|
16809
16834
|
this.navigateToDetail(route, qParams, relativeTo);
|
|
16810
16835
|
}
|
|
16811
16836
|
}
|
|
16812
|
-
viewDetail(item) {
|
|
16837
|
+
viewDetail(item, context) {
|
|
16838
|
+
const formLayoutManagerService = this.injector.get(OFormLayoutManagerService);
|
|
16839
|
+
formLayoutManagerService.context = void 0;
|
|
16813
16840
|
if (this.oFormLayoutDialog) {
|
|
16814
16841
|
console.warn('Navigation is not available yet in a form layout manager with mode="dialog"');
|
|
16815
16842
|
return;
|
|
@@ -16820,6 +16847,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
|
|
|
16820
16847
|
const qParams = Codes.getIsDetailObject();
|
|
16821
16848
|
const relativeTo = this.recursiveDetail ? this.actRoute.parent : this.actRoute;
|
|
16822
16849
|
const zone = this.injector.get(NgZone);
|
|
16850
|
+
if (!this.formLayoutManager?.isSplitPaneMode()) {
|
|
16851
|
+
formLayoutManagerService.context = context;
|
|
16852
|
+
}
|
|
16823
16853
|
zone.run(() => this.navigateToDetail(route, qParams, relativeTo));
|
|
16824
16854
|
}
|
|
16825
16855
|
}
|
|
@@ -17340,6 +17370,9 @@ class AbstractOServiceComponent extends AbstractOServiceBaseComponent {
|
|
|
17340
17370
|
}
|
|
17341
17371
|
return sqlTypesArg;
|
|
17342
17372
|
}
|
|
17373
|
+
compareRow() {
|
|
17374
|
+
return (o1, o2) => this.keysArray.every(key => o1[key] === o2[key]);
|
|
17375
|
+
}
|
|
17343
17376
|
}
|
|
17344
17377
|
AbstractOServiceComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AbstractOServiceComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: OFormComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
17345
17378
|
AbstractOServiceComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AbstractOServiceComponent, inputs: { oattr: ["attr", "oattr"], service: "service", serviceType: ["service-type", "serviceType"], entity: "entity", queryOnInit: ["query-on-init", "queryOnInit"], queryOnBind: ["query-on-bind", "queryOnBind"], queryOnEvent: ["query-on-event", "queryOnEvent"], pageable: "pageable", columns: "columns", keys: "keys", parentKeys: ["parent-keys", "parentKeys"], staticData: ["static-data", "staticData"], queryMethod: ["query-method", "queryMethod"], paginatedQueryMethod: ["paginated-query-method", "paginatedQueryMethod"], oQueryRows: ["query-rows", "oQueryRows"], insertMethod: ["insert-method", "insertMethod"], updateMethod: ["update-method", "updateMethod"], deleteMethod: ["delete-method", "deleteMethod"], storeState: ["store-state", "storeState"], queryWithNullParentKeys: ["query-with-null-parent-keys", "queryWithNullParentKeys"], queryFallbackFunction: ["query-fallback-function", "queryFallbackFunction"], _title: ["title", "_title"], ovisible: ["visible", "ovisible"], oenabled: ["enabled", "oenabled"], controls: "controls", detailMode: ["detail-mode", "detailMode"], detailFormRoute: ["detail-form-route", "detailFormRoute"], recursiveDetail: ["recursive-detail", "recursiveDetail"], detailButtonInRow: ["detail-button-in-row", "detailButtonInRow"], detailButtonInRowIcon: ["detail-button-in-row-icon", "detailButtonInRowIcon"], editFormRoute: ["edit-form-route", "editFormRoute"], recursiveEdit: ["recursive-edit", "recursiveEdit"], editButtonInRow: ["edit-button-in-row", "editButtonInRow"], editButtonInRowIcon: ["edit-button-in-row-icon", "editButtonInRowIcon"], insertButton: ["insert-button", "insertButton"], rowHeight: ["row-height", "rowHeight"], insertFormRoute: ["insert-form-route", "insertFormRoute"], recursiveInsert: ["recursive-insert", "recursiveInsert"], filterCaseSensitive: ["filter-case-sensitive", "filterCaseSensitive"], quickFilter: ["quick-filter", "quickFilter"], quickFilterPlaceholder: ["quick-filter-placeholder", "quickFilterPlaceholder"], paginationControls: ["pagination-controls", "paginationControls"], pageSizeOptions: ["page-size-options", "pageSizeOptions"], quickFilterAppearance: ["quick-filter-appearance", "quickFilterAppearance"], disablePageSizeCalculation: ["disable-page-size-calculation", "disablePageSizeCalculation"] }, outputs: { onClick: "onClick", onDoubleClick: "onDoubleClick", onDataLoaded: "onDataLoaded", onPaginatedDataLoaded: "onPaginatedDataLoaded", onSearch: "onSearch" }, viewQueries: [{ propertyName: "matpaginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "searchInputComponent", first: true, predicate: i0.forwardRef(function () { return OSearchInputComponent; }), descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
@@ -27272,6 +27305,9 @@ class OColumn {
|
|
|
27272
27305
|
if (Util.isDefined(column.searchable)) {
|
|
27273
27306
|
this.searchable = column.searchable;
|
|
27274
27307
|
}
|
|
27308
|
+
else {
|
|
27309
|
+
this.searchable = column?.type !== 'date';
|
|
27310
|
+
}
|
|
27275
27311
|
if (Util.isDefined(column.groupable)) {
|
|
27276
27312
|
this.groupable = column.groupable;
|
|
27277
27313
|
}
|
|
@@ -29729,7 +29765,15 @@ class OTableButtonComponent {
|
|
|
29729
29765
|
}
|
|
29730
29766
|
innerOnClick(event) {
|
|
29731
29767
|
event.stopPropagation();
|
|
29732
|
-
this.
|
|
29768
|
+
if (!this.isReadOnly()) {
|
|
29769
|
+
this.onClick.emit();
|
|
29770
|
+
}
|
|
29771
|
+
else if (this._table.showNotificationOfReadOnly) {
|
|
29772
|
+
this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
29773
|
+
}
|
|
29774
|
+
}
|
|
29775
|
+
isReadOnly() {
|
|
29776
|
+
return this._table.isComponentReadOnly('o-table-button', this.oattr);
|
|
29733
29777
|
}
|
|
29734
29778
|
isIconPositionLeft() {
|
|
29735
29779
|
return this.iconPosition === Codes.ICON_POSITION_LEFT;
|
|
@@ -29853,7 +29897,7 @@ class OTableButtonsComponent {
|
|
|
29853
29897
|
}
|
|
29854
29898
|
}
|
|
29855
29899
|
OTableButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTableButtonsComponent, deps: [{ token: i0.Injector }, { token: forwardRef(() => OTableBase) }], target: i0.ɵɵFactoryTarget.Component });
|
|
29856
|
-
OTableButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableButtonsComponent, selector: "o-table-buttons", inputs: { insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"] }, host: { properties: { "class.o-table-buttons": "true" } }, ngImport: i0, template: "<div class=\"buttons\" fxLayout>\n <o-table-button *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div
|
|
29900
|
+
OTableButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableButtonsComponent, selector: "o-table-buttons", inputs: { insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"] }, host: { properties: { "class.o-table-buttons": "true" } }, ngImport: i0, template: "<div class=\"buttons\" fxLayout>\n <o-table-button attr=\"add\" *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button attr=\"refresh\" *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button attr=\"delete\" *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "component", type: OTableButtonComponent, selector: "o-table-button", inputs: ["attr", "enabled", "icon", "svg-icon", "icon-position", "label"], outputs: ["onClick"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
29857
29901
|
__decorate([
|
|
29858
29902
|
BooleanInputConverter(),
|
|
29859
29903
|
__metadata("design:type", Boolean)
|
|
@@ -29870,7 +29914,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
29870
29914
|
type: Component,
|
|
29871
29915
|
args: [{ selector: 'o-table-buttons', inputs: DEFAULT_INPUTS_O_TABLE_BUTTONS, outputs: DEFAULT_OUTPUTS_O_TABLE_BUTTONS, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
29872
29916
|
'[class.o-table-buttons]': 'true',
|
|
29873
|
-
}, template: "<div class=\"buttons\" fxLayout>\n <o-table-button *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div
|
|
29917
|
+
}, template: "<div class=\"buttons\" fxLayout>\n <o-table-button attr=\"add\" *ngIf=\"showInsertOButton\" [enabled]=\"enabledInsertButton | async\" label=\"TABLE.BUTTONS.ADD\"\n svg-icon=\"ontimize:add\" (onClick)=\"add()\" class=\"o-table-button-add\"></o-table-button>\n <o-table-button attr=\"refresh\" *ngIf=\"showRefreshOButton\" [enabled]=\"enabledRefreshButton | async\" label=\"TABLE.BUTTONS.REFRESH\"\n svg-icon=\"ontimize:autorenew\" (onClick)=\"reloadData()\" class=\"o-table-button-refresh\">\n </o-table-button>\n <o-table-button attr=\"delete\" *ngIf=\"showDeleteOButton\" [enabled]=\"enabledDeleteButton | async\" label=\"TABLE.BUTTONS.DELETE\"\n svg-icon=\"ontimize:delete\" (onClick)=\"remove()\" class=\"o-table-button-delete\"></o-table-button>\n <ng-content></ng-content>\n</div>\n" }]
|
|
29874
29918
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: OTableBase, decorators: [{
|
|
29875
29919
|
type: Inject,
|
|
29876
29920
|
args: [forwardRef(() => OTableBase)]
|
|
@@ -31192,7 +31236,8 @@ class OTableQuickfilterComponent {
|
|
|
31192
31236
|
column.type === 'real' ||
|
|
31193
31237
|
column.type === 'percentage' ||
|
|
31194
31238
|
column.type === 'currency' ||
|
|
31195
|
-
column.type === 'service'
|
|
31239
|
+
column.type === 'service' ||
|
|
31240
|
+
column.type === 'date');
|
|
31196
31241
|
}
|
|
31197
31242
|
getColumnsWithoutRendererExpressions(columns) {
|
|
31198
31243
|
return columns
|
|
@@ -32026,7 +32071,10 @@ const DEFAULT_INPUTS_O_TABLE = [
|
|
|
32026
32071
|
'showChartsOnDemandOption: show-charts-on-demand-option',
|
|
32027
32072
|
'showResetWidthOption: show-reset-width-option',
|
|
32028
32073
|
'disableSelectionFunction: disable-selection-function',
|
|
32029
|
-
'nonHidableColumns: non-hidable-columns'
|
|
32074
|
+
'nonHidableColumns: non-hidable-columns',
|
|
32075
|
+
'readOnly: read-only',
|
|
32076
|
+
'readOnlyConfiguration: read-only-configuration',
|
|
32077
|
+
'showNotificationOfReadOnly: show-notification-of-read-only'
|
|
32030
32078
|
];
|
|
32031
32079
|
const DEFAULT_OUTPUTS_O_TABLE = [
|
|
32032
32080
|
'onRowSelected',
|
|
@@ -32064,6 +32112,9 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
32064
32112
|
}
|
|
32065
32113
|
}
|
|
32066
32114
|
}
|
|
32115
|
+
isComponentReadOnly(selector, attr) {
|
|
32116
|
+
return this.readOnlyConfiguration?.[selector]?.[attr];
|
|
32117
|
+
}
|
|
32067
32118
|
get oTableOptions() {
|
|
32068
32119
|
return this._oTableOptions;
|
|
32069
32120
|
}
|
|
@@ -32186,6 +32237,8 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
32186
32237
|
this.showButtonsText = true;
|
|
32187
32238
|
this.filterColumnActiveByDefault = true;
|
|
32188
32239
|
this.showResetWidthOption = true;
|
|
32240
|
+
this.readOnly = false;
|
|
32241
|
+
this.showNotificationOfReadOnly = false;
|
|
32189
32242
|
this.insertButton = true;
|
|
32190
32243
|
this.refreshButton = true;
|
|
32191
32244
|
this.deleteButton = true;
|
|
@@ -32279,6 +32332,14 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
32279
32332
|
this.rowHeight = oTableGlobalConfig.rowHeight;
|
|
32280
32333
|
}
|
|
32281
32334
|
;
|
|
32335
|
+
if (Util.isDefined(oTableGlobalConfig.showChartsOnDemandOption)) {
|
|
32336
|
+
this.showReportOnDemandOption = oTableGlobalConfig.showChartsOnDemandOption;
|
|
32337
|
+
}
|
|
32338
|
+
;
|
|
32339
|
+
if (Util.isDefined(oTableGlobalConfig.showReportOnDemandOption)) {
|
|
32340
|
+
this.showReportOnDemandOption = oTableGlobalConfig.showReportOnDemandOption;
|
|
32341
|
+
}
|
|
32342
|
+
;
|
|
32282
32343
|
}
|
|
32283
32344
|
catch (error) {
|
|
32284
32345
|
}
|
|
@@ -32774,7 +32835,7 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
32774
32835
|
}
|
|
32775
32836
|
get selection() {
|
|
32776
32837
|
if (!Util.isDefined(this._selection)) {
|
|
32777
|
-
this._selection = new SelectionModel(this.isSelectionModeMultiple(), []);
|
|
32838
|
+
this._selection = new SelectionModel(this.isSelectionModeMultiple(), [], true, this.compareRow());
|
|
32778
32839
|
}
|
|
32779
32840
|
return this._selection;
|
|
32780
32841
|
}
|
|
@@ -33094,12 +33155,24 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33094
33155
|
onMatTableContentChanged() {
|
|
33095
33156
|
}
|
|
33096
33157
|
add() {
|
|
33158
|
+
if (this.readOnly) {
|
|
33159
|
+
if (this.showNotificationOfReadOnly) {
|
|
33160
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
33161
|
+
}
|
|
33162
|
+
return;
|
|
33163
|
+
}
|
|
33097
33164
|
if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
|
|
33098
33165
|
return;
|
|
33099
33166
|
}
|
|
33100
33167
|
super.insertDetail();
|
|
33101
33168
|
}
|
|
33102
33169
|
remove(clearSelectedItems = false) {
|
|
33170
|
+
if (this.readOnly) {
|
|
33171
|
+
if (this.showNotificationOfReadOnly) {
|
|
33172
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
33173
|
+
}
|
|
33174
|
+
return;
|
|
33175
|
+
}
|
|
33103
33176
|
if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_DELETE)) {
|
|
33104
33177
|
return;
|
|
33105
33178
|
}
|
|
@@ -33180,7 +33253,7 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33180
33253
|
handleClick(row, column, rowIndex, cellRef, event) {
|
|
33181
33254
|
this.clickTimer = setTimeout(() => {
|
|
33182
33255
|
if (!this.clickPrevent) {
|
|
33183
|
-
if (this.oenabled && column.editor
|
|
33256
|
+
if (this.oenabled && !this.readOnly && column.editor
|
|
33184
33257
|
&& (this.detailMode !== Codes.DETAIL_MODE_CLICK)
|
|
33185
33258
|
&& (this.editionMode === Codes.EDITION_MODE_CLICK)) {
|
|
33186
33259
|
this.activateColumnEdition(column, row, cellRef);
|
|
@@ -33193,7 +33266,10 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33193
33266
|
}, this.clickDelay);
|
|
33194
33267
|
}
|
|
33195
33268
|
doHandleClick(row, column, rowIndex, $event) {
|
|
33196
|
-
if (
|
|
33269
|
+
if (this.readOnly && this.showNotificationOfReadOnly) {
|
|
33270
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
33271
|
+
}
|
|
33272
|
+
if (!this.oenabled || this.readOnly) {
|
|
33197
33273
|
return;
|
|
33198
33274
|
}
|
|
33199
33275
|
if ((this.detailMode === Codes.DETAIL_MODE_CLICK)) {
|
|
@@ -33241,6 +33317,12 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33241
33317
|
handleDoubleClick(row, column, rowIndex, cellRef, $event) {
|
|
33242
33318
|
clearTimeout(this.clickTimer);
|
|
33243
33319
|
this.clickPrevent = true;
|
|
33320
|
+
if (this.readOnly) {
|
|
33321
|
+
if (this.showNotificationOfReadOnly) {
|
|
33322
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
33323
|
+
}
|
|
33324
|
+
return;
|
|
33325
|
+
}
|
|
33244
33326
|
if (this.oenabled && column.editor
|
|
33245
33327
|
&& (!Codes.isDoubleClickMode(this.detailMode))
|
|
33246
33328
|
&& (Codes.isDoubleClickMode(this.editionMode))) {
|
|
@@ -33403,10 +33485,28 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33403
33485
|
if (this.isDisableCheckbox(item)) {
|
|
33404
33486
|
return;
|
|
33405
33487
|
}
|
|
33406
|
-
if (
|
|
33488
|
+
if (this.isRowSelected(item)) {
|
|
33489
|
+
this.selection.clear(item);
|
|
33490
|
+
}
|
|
33491
|
+
if (Util.isDefined(item)) {
|
|
33407
33492
|
this.selection.select(item);
|
|
33408
33493
|
}
|
|
33409
33494
|
}
|
|
33495
|
+
setSelectedByKeys(keyValues) {
|
|
33496
|
+
const rowsToSelect = this.getDataArray().filter(row => {
|
|
33497
|
+
return keyValues.findIndex(keyValue => row[this.keys] === keyValue) > -1;
|
|
33498
|
+
});
|
|
33499
|
+
this.selection.select(...rowsToSelect);
|
|
33500
|
+
}
|
|
33501
|
+
setSelectedByMultipleKeys(keyValues) {
|
|
33502
|
+
const rowsToSelect = this.getDataArray().filter(row => {
|
|
33503
|
+
return keyValues.findIndex(keyValue => Object.keys(keyValue).every(key => keyValue[key] === row[key])) > -1;
|
|
33504
|
+
});
|
|
33505
|
+
rowsToSelect.every(rowToSelect => this.selection.select(rowToSelect));
|
|
33506
|
+
}
|
|
33507
|
+
setSelectedByRowIds(rowIds) {
|
|
33508
|
+
rowIds.forEach(rowId => this.selectedRow(this.getDataArray()[rowId]));
|
|
33509
|
+
}
|
|
33410
33510
|
get showDeleteButton() {
|
|
33411
33511
|
return this.deleteButton;
|
|
33412
33512
|
}
|
|
@@ -33680,7 +33780,7 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33680
33780
|
this.state.selection.forEach(selectedItem => {
|
|
33681
33781
|
const selectedItemKeys = Object.keys(selectedItem);
|
|
33682
33782
|
const foundItem = this.dataSource.renderedData.find(data => selectedItemKeys.every(key => data[key] === selectedItem[key]));
|
|
33683
|
-
if (foundItem
|
|
33783
|
+
if (foundItem) {
|
|
33684
33784
|
this.setSelected(foundItem);
|
|
33685
33785
|
}
|
|
33686
33786
|
});
|
|
@@ -33770,6 +33870,12 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33770
33870
|
return this._oTableOptions ? this._oTableOptions.columns.find(item => item.name === attr) : undefined;
|
|
33771
33871
|
}
|
|
33772
33872
|
insertRecord(recordData, sqlTypes) {
|
|
33873
|
+
if (this.readOnly) {
|
|
33874
|
+
if (this.showNotificationOfReadOnly) {
|
|
33875
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
33876
|
+
}
|
|
33877
|
+
throw new Error(`Insert operation is not allowed because the table is read-only.`);
|
|
33878
|
+
}
|
|
33773
33879
|
if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_INSERT)) {
|
|
33774
33880
|
return undefined;
|
|
33775
33881
|
}
|
|
@@ -33783,6 +33889,12 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
33783
33889
|
return this.daoTable.insertQuery(recordData, sqlTypes);
|
|
33784
33890
|
}
|
|
33785
33891
|
updateRecord(filter, updateData, sqlTypes) {
|
|
33892
|
+
if (this.readOnly) {
|
|
33893
|
+
if (this.showNotificationOfReadOnly) {
|
|
33894
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
33895
|
+
}
|
|
33896
|
+
throw new Error(`Update operation is not allowed because the table is read-only.`);
|
|
33897
|
+
}
|
|
33786
33898
|
if (!this.checkEnabledActionPermission(PermissionsUtils.ACTION_UPDATE)) {
|
|
33787
33899
|
return of(this.dataSource.data);
|
|
33788
33900
|
}
|
|
@@ -34021,14 +34133,20 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
34021
34133
|
});
|
|
34022
34134
|
}
|
|
34023
34135
|
viewDetail(item) {
|
|
34024
|
-
if (
|
|
34136
|
+
if (this.readOnly && this.showNotificationOfReadOnly) {
|
|
34137
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
34138
|
+
}
|
|
34139
|
+
if (!this.checkEnabledActionPermission('detail') || this.readOnly) {
|
|
34025
34140
|
return;
|
|
34026
34141
|
}
|
|
34027
34142
|
this.destroyActivedTooltips();
|
|
34028
34143
|
super.viewDetail(item);
|
|
34029
34144
|
}
|
|
34030
34145
|
editDetail(item) {
|
|
34031
|
-
if (
|
|
34146
|
+
if (this.readOnly && this.showNotificationOfReadOnly) {
|
|
34147
|
+
this.snackBarService.open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
34148
|
+
}
|
|
34149
|
+
if (!this.checkEnabledActionPermission('edit') || this.readOnly) {
|
|
34032
34150
|
return;
|
|
34033
34151
|
}
|
|
34034
34152
|
super.editDetail(item);
|
|
@@ -34063,8 +34181,7 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
34063
34181
|
return name + this.getSuffixColumnInsertable();
|
|
34064
34182
|
}
|
|
34065
34183
|
isRowSelected(row) {
|
|
34066
|
-
|
|
34067
|
-
return !this.isSelectionModeNone() && this.selection.selected.some((element) => keys.every(key => row[key] === element[key]));
|
|
34184
|
+
return !this.isSelectionModeNone() && this.selection.isSelected(row);
|
|
34068
34185
|
}
|
|
34069
34186
|
getColumnWidthFromState(colDef) {
|
|
34070
34187
|
let columnWidth = colDef.definition && colDef.definition.width ? colDef.definition.width : void 0;
|
|
@@ -34376,13 +34493,16 @@ class OTableComponent extends AbstractOServiceComponent {
|
|
|
34376
34493
|
isDisableCheckbox(item) {
|
|
34377
34494
|
let disable = false;
|
|
34378
34495
|
if (Util.isDefined(this.disableSelectionFunction)) {
|
|
34379
|
-
return this.disableSelectionFunction(item);
|
|
34496
|
+
return this.disableSelectionFunction({ ...item });
|
|
34380
34497
|
}
|
|
34381
34498
|
return disable;
|
|
34382
34499
|
}
|
|
34383
34500
|
getService() {
|
|
34384
34501
|
return this.dataService;
|
|
34385
34502
|
}
|
|
34503
|
+
getSnackService() {
|
|
34504
|
+
return this.snackBarService;
|
|
34505
|
+
}
|
|
34386
34506
|
}
|
|
34387
34507
|
OTableComponent.DEFAULT_BASE_SIZE_SPINNER = 100;
|
|
34388
34508
|
OTableComponent.FIRST_LAST_CELL_PADDING = 24;
|
|
@@ -34390,7 +34510,7 @@ OTableComponent.EXPANDED_ROW_CONTAINER_CLASS = 'expanded-row-container-';
|
|
|
34390
34510
|
OTableComponent.AVAILABLE_GROUPING_COLUMNS_RENDERERS = ['currency', 'integer', 'real'];
|
|
34391
34511
|
OTableComponent.DEFAULT_ROW_HEIGHT = 36;
|
|
34392
34512
|
OTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTableComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i1$1.MatDialog }, { token: i0.ViewContainerRef }, { token: i0.ApplicationRef }, { token: forwardRef(() => OFormComponent), optional: true }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
34393
|
-
OTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableComponent, selector: "o-table", inputs: { visibleColumns: ["visible-columns", "visibleColumns"], defaultVisibleColumns: ["default-visible-columns", "defaultVisibleColumns"], sortColumns: ["sort-columns", "sortColumns"], quickFilterCallback: ["quick-filter-function", "quickFilterCallback"], deleteButton: ["delete-button", "deleteButton"], refreshButton: ["refresh-button", "refreshButton"], columnsVisibilityButton: ["columns-visibility-button", "columnsVisibilityButton"], exportButton: ["export-button", "exportButton"], showConfigurationOption: ["show-configuration-option", "showConfigurationOption"], showButtonsText: ["show-buttons-text", "showButtonsText"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], paginationControls: ["pagination-controls", "paginationControls"], fixedHeader: ["fixed-header", "fixedHeader"], showTitle: ["show-title", "showTitle"], editionMode: ["edition-mode", "editionMode"], selectionMode: ["selection-mode", "selectionMode"], horizontalScroll: ["horizontal-scroll", "horizontalScroll"], showPaginatorFirstLastButtons: ["show-paginator-first-last-buttons", "showPaginatorFirstLastButtons"], autoAlignTitles: ["auto-align-titles", "autoAlignTitles"], multipleSort: ["multiple-sort", "multipleSort"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], orderable: "orderable", resizable: "resizable", keepSelectedItems: ["keep-selected-items", "keepSelectedItems"], exportMode: ["export-mode", "exportMode"], exportServiceType: ["export-service-type", "exportServiceType"], autoAdjust: ["auto-adjust", "autoAdjust"], showFilterOption: ["show-filter-option", "showFilterOption"], visibleExportDialogButtons: ["visible-export-dialog-buttons", "visibleExportDialogButtons"], rowClass: ["row-class", "rowClass"], filterColumnActiveByDefault: ["filter-column-active-by-default", "filterColumnActiveByDefault"], groupedColumns: ["grouped-columns", "groupedColumns"], groupable: "groupable", expandGroupsSameLevel: ["expand-groups-same-level", "expandGroupsSameLevel"], collapseGroupedColumns: ["collapse-grouped-columns", "collapseGroupedColumns"], virtualScroll: ["virtual-scroll", "virtualScroll"], contextMenu: ["context-menu", "contextMenu"], showExpandableIconFunction: ["show-expandable-icon-function", "showExpandableIconFunction"], showReportOnDemandOption: ["show-report-on-demand-option", "showReportOnDemandOption"], showChartsOnDemandOption: ["show-charts-on-demand-option", "showChartsOnDemandOption"], showResetWidthOption: ["show-reset-width-option", "showResetWidthOption"], disableSelectionFunction: ["disable-selection-function", "disableSelectionFunction"], nonHidableColumns: ["non-hidable-columns", "nonHidableColumns"] }, outputs: { onRowSelected: "onRowSelected", onRowDeselected: "onRowDeselected", onRowDeleted: "onRowDeleted" }, host: { listeners: { "document:click": "handleDOMClick($event)", "window:resize": "updateScrolledState()" }, properties: { "class.o-table": "true", "class.ontimize-table": "true", "class.o-table-fixed": "fixedHeader", "class.o-table-disabled": "!enabled" } }, providers: [
|
|
34513
|
+
OTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTableComponent, selector: "o-table", inputs: { visibleColumns: ["visible-columns", "visibleColumns"], defaultVisibleColumns: ["default-visible-columns", "defaultVisibleColumns"], sortColumns: ["sort-columns", "sortColumns"], quickFilterCallback: ["quick-filter-function", "quickFilterCallback"], deleteButton: ["delete-button", "deleteButton"], refreshButton: ["refresh-button", "refreshButton"], columnsVisibilityButton: ["columns-visibility-button", "columnsVisibilityButton"], exportButton: ["export-button", "exportButton"], showConfigurationOption: ["show-configuration-option", "showConfigurationOption"], showButtonsText: ["show-buttons-text", "showButtonsText"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], paginationControls: ["pagination-controls", "paginationControls"], fixedHeader: ["fixed-header", "fixedHeader"], showTitle: ["show-title", "showTitle"], editionMode: ["edition-mode", "editionMode"], selectionMode: ["selection-mode", "selectionMode"], horizontalScroll: ["horizontal-scroll", "horizontalScroll"], showPaginatorFirstLastButtons: ["show-paginator-first-last-buttons", "showPaginatorFirstLastButtons"], autoAlignTitles: ["auto-align-titles", "autoAlignTitles"], multipleSort: ["multiple-sort", "multipleSort"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], orderable: "orderable", resizable: "resizable", keepSelectedItems: ["keep-selected-items", "keepSelectedItems"], exportMode: ["export-mode", "exportMode"], exportServiceType: ["export-service-type", "exportServiceType"], autoAdjust: ["auto-adjust", "autoAdjust"], showFilterOption: ["show-filter-option", "showFilterOption"], visibleExportDialogButtons: ["visible-export-dialog-buttons", "visibleExportDialogButtons"], rowClass: ["row-class", "rowClass"], filterColumnActiveByDefault: ["filter-column-active-by-default", "filterColumnActiveByDefault"], groupedColumns: ["grouped-columns", "groupedColumns"], groupable: "groupable", expandGroupsSameLevel: ["expand-groups-same-level", "expandGroupsSameLevel"], collapseGroupedColumns: ["collapse-grouped-columns", "collapseGroupedColumns"], virtualScroll: ["virtual-scroll", "virtualScroll"], contextMenu: ["context-menu", "contextMenu"], showExpandableIconFunction: ["show-expandable-icon-function", "showExpandableIconFunction"], showReportOnDemandOption: ["show-report-on-demand-option", "showReportOnDemandOption"], showChartsOnDemandOption: ["show-charts-on-demand-option", "showChartsOnDemandOption"], showResetWidthOption: ["show-reset-width-option", "showResetWidthOption"], disableSelectionFunction: ["disable-selection-function", "disableSelectionFunction"], nonHidableColumns: ["non-hidable-columns", "nonHidableColumns"], readOnly: ["read-only", "readOnly"], readOnlyConfiguration: ["read-only-configuration", "readOnlyConfiguration"], showNotificationOfReadOnly: ["show-notification-of-read-only", "showNotificationOfReadOnly"] }, outputs: { onRowSelected: "onRowSelected", onRowDeselected: "onRowDeselected", onRowDeleted: "onRowDeleted" }, host: { listeners: { "document:click": "handleDOMClick($event)", "window:resize": "updateScrolledState()" }, properties: { "class.o-table": "true", "class.ontimize-table": "true", "class.o-table-fixed": "fixedHeader", "class.o-table-disabled": "!enabled" } }, providers: [
|
|
34394
34514
|
OntimizeServiceProvider,
|
|
34395
34515
|
ComponentStateServiceProvider,
|
|
34396
34516
|
OTableDataSourceService,
|
|
@@ -34444,6 +34564,14 @@ __decorate([
|
|
|
34444
34564
|
BooleanInputConverter(),
|
|
34445
34565
|
__metadata("design:type", Boolean)
|
|
34446
34566
|
], OTableComponent.prototype, "showResetWidthOption", void 0);
|
|
34567
|
+
__decorate([
|
|
34568
|
+
BooleanInputConverter(),
|
|
34569
|
+
__metadata("design:type", Boolean)
|
|
34570
|
+
], OTableComponent.prototype, "readOnly", void 0);
|
|
34571
|
+
__decorate([
|
|
34572
|
+
BooleanInputConverter(),
|
|
34573
|
+
__metadata("design:type", Boolean)
|
|
34574
|
+
], OTableComponent.prototype, "showNotificationOfReadOnly", void 0);
|
|
34447
34575
|
__decorate([
|
|
34448
34576
|
BooleanInputConverter(),
|
|
34449
34577
|
__metadata("design:type", Boolean)
|
|
@@ -34561,7 +34689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
34561
34689
|
}], tableRowExpandable: [{
|
|
34562
34690
|
type: ContentChild,
|
|
34563
34691
|
args: [OTableRowExpandableComponent]
|
|
34564
|
-
}], selectAllCheckbox: [], exportButton: [], showConfigurationOption: [], columnsVisibilityButton: [], showFilterOption: [], showReportOnDemandOption: [], showChartsOnDemandOption: [], showButtonsText: [], filterColumnActiveByDefault: [], showResetWidthOption: [], insertButton: [], refreshButton: [], deleteButton: [], fixedHeader: [], showTitle: [], horizontalScroll: [], showPaginatorFirstLastButtons: [], autoAlignTitles: [], multipleSort: [], orderable: [], resizable: [], autoAdjust: [], groupable: [], expandGroupsSameLevel: [], collapseGroupedColumns: [], virtualScroll: [], contextMenu: [], keepSelectedItems: [], tableBodyEl: [{
|
|
34692
|
+
}], selectAllCheckbox: [], exportButton: [], showConfigurationOption: [], columnsVisibilityButton: [], showFilterOption: [], showReportOnDemandOption: [], showChartsOnDemandOption: [], showButtonsText: [], filterColumnActiveByDefault: [], showResetWidthOption: [], readOnly: [], showNotificationOfReadOnly: [], insertButton: [], refreshButton: [], deleteButton: [], fixedHeader: [], showTitle: [], horizontalScroll: [], showPaginatorFirstLastButtons: [], autoAlignTitles: [], multipleSort: [], orderable: [], resizable: [], autoAdjust: [], groupable: [], expandGroupsSameLevel: [], collapseGroupedColumns: [], virtualScroll: [], contextMenu: [], keepSelectedItems: [], tableBodyEl: [{
|
|
34565
34693
|
type: ViewChild,
|
|
34566
34694
|
args: ['tableBody']
|
|
34567
34695
|
}], tableHeaderEl: [{
|
|
@@ -35872,6 +36000,12 @@ class OTableCellRendererActionComponent extends OBaseTableCellRenderer {
|
|
|
35872
36000
|
event.stopPropagation();
|
|
35873
36001
|
event.preventDefault();
|
|
35874
36002
|
}
|
|
36003
|
+
if (this.table.readOnly) {
|
|
36004
|
+
if (this.table.showNotificationOfReadOnly) {
|
|
36005
|
+
this.table.getSnackService().open('MESSAGES.OPERATION_NOT_ALLOWED_READONLY');
|
|
36006
|
+
}
|
|
36007
|
+
return;
|
|
36008
|
+
}
|
|
35875
36009
|
if (Util.isDefined(this.action)) {
|
|
35876
36010
|
switch (this.action.toLowerCase()) {
|
|
35877
36011
|
case 'detail':
|
|
@@ -36669,7 +36803,6 @@ class OTableColumnComponent {
|
|
|
36669
36803
|
this.table = table;
|
|
36670
36804
|
this.injector = injector;
|
|
36671
36805
|
this._defaultSQLTypeKey = 'OTHER';
|
|
36672
|
-
this._searchable = true;
|
|
36673
36806
|
this.editable = false;
|
|
36674
36807
|
this.tooltip = false;
|
|
36675
36808
|
this._multiline = false;
|
|
@@ -37436,7 +37569,7 @@ class OTreeComponent extends AbstractOServiceComponent {
|
|
|
37436
37569
|
return this.rootNodes;
|
|
37437
37570
|
}
|
|
37438
37571
|
else {
|
|
37439
|
-
return
|
|
37572
|
+
return node.treeNode.childQueryData(node);
|
|
37440
37573
|
}
|
|
37441
37574
|
}
|
|
37442
37575
|
getComponentFilter(existingFilter = {}) {
|
|
@@ -37503,6 +37636,7 @@ class OTreeComponent extends AbstractOServiceComponent {
|
|
|
37503
37636
|
'id': this.getNodeId(node, parentNode),
|
|
37504
37637
|
'label': this.getItemText(node),
|
|
37505
37638
|
'level': level,
|
|
37639
|
+
'node': this,
|
|
37506
37640
|
treeNode: this.treeNode,
|
|
37507
37641
|
'expandable': Util.isDefined(this.treeNode) || !!nodeChildren?.length || this.recursive,
|
|
37508
37642
|
'data': node,
|
|
@@ -37577,7 +37711,7 @@ class OTreeComponent extends AbstractOServiceComponent {
|
|
|
37577
37711
|
this.onNodeClick.emit(node);
|
|
37578
37712
|
this.selectedNode = node;
|
|
37579
37713
|
if (this.detailMode !== Codes.DETAIL_MODE_NONE && !this.isRootNode(node)) {
|
|
37580
|
-
|
|
37714
|
+
node.node.viewDetail(node.data, { label: node.label });
|
|
37581
37715
|
}
|
|
37582
37716
|
}
|
|
37583
37717
|
isRootNode(node) {
|
|
@@ -37796,23 +37930,6 @@ class OTreeComponent extends AbstractOServiceComponent {
|
|
|
37796
37930
|
}
|
|
37797
37931
|
return this.keys + ':' + id;
|
|
37798
37932
|
}
|
|
37799
|
-
childQueryData(node) {
|
|
37800
|
-
let queryMethodName = this.queryMethod;
|
|
37801
|
-
if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
|
|
37802
|
-
return of({ data: [] });
|
|
37803
|
-
}
|
|
37804
|
-
const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
|
|
37805
|
-
let filter;
|
|
37806
|
-
if (this.recursive) {
|
|
37807
|
-
filter = parentItem ?? {};
|
|
37808
|
-
filter[this.parentColumn] = node.data[this.keysArray[0]];
|
|
37809
|
-
}
|
|
37810
|
-
else {
|
|
37811
|
-
filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
|
|
37812
|
-
}
|
|
37813
|
-
let queryArguments = [filter, this.colArray, this.entity];
|
|
37814
|
-
return this.dataService[queryMethodName](...queryArguments);
|
|
37815
|
-
}
|
|
37816
37933
|
navigateToViewDetail(node) {
|
|
37817
37934
|
if (Util.isDefined(node.route)) {
|
|
37818
37935
|
let route = undefined;
|
|
@@ -37835,9 +37952,15 @@ class OTreeComponent extends AbstractOServiceComponent {
|
|
|
37835
37952
|
isSelectedNode(node) {
|
|
37836
37953
|
return this.selectedNode == node;
|
|
37837
37954
|
}
|
|
37955
|
+
onItemDetailClick(node) {
|
|
37956
|
+
this.handleItemClick(node.data);
|
|
37957
|
+
}
|
|
37838
37958
|
}
|
|
37839
37959
|
OTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: forwardRef(() => OFormComponent), optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
37840
|
-
OTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeComponent, selector: "o-tree", inputs: { oattr: ["attr", "oattr"], service: "service", entity: "entity", columns: "columns", keys: "keys", parentKeys: ["parent-keys", "parentKeys"], queryMethod: ["query-method", "queryMethod"], insertButton: ["insert-button", "insertButton"], refreshButton: ["refresh-button", "refreshButton"], deleteButton: ["delete-button", "deleteButton"], visibleColumns: ["visible-columns", "visibleColumns"], selectAllCheckbox: ["select-all-checkbox", "selectAllCheckbox"], separator: "separator", parentColumn: ["parent-column", "parentColumn"], sortColumn: ["sort-column", "sortColumn"], selectAllCheckboxVisible: ["select-all-checkbox-visible", "selectAllCheckboxVisible"], filterCaseSensitive: ["filter-case-sensitive", "filterCaseSensitive"], quickFilter: ["quick-filter", "quickFilter"], quickFilterPlaceholder: ["quick-filter-placeholder", "quickFilterPlaceholder"], quickFilterColumns: ["quick-filter-columns", "quickFilterColumns"], detailMode: ["detail-mode", "detailMode"], detailFormRoute: ["detail-form-route", "detailFormRoute"], showButtonsText: ["show-buttons-text", "showButtonsText"], rootTitle: ["root-title", "rootTitle"], recursive: "recursive", route: "route" }, outputs: { onNodeSelected: "onNodeSelected", onNodeExpanded: "onNodeExpanded", onNodeCollapsed: "onNodeCollapsed", onLoadNextLevel: "onLoadNextLevel", onDataLoaded: "onDataLoaded", onNodeClick: "onNodeClick" }, host: { properties: { "class.o-tree": "true" } }, providers: [OTreeDao], queries: [{ propertyName: "leafNodeTemplate", first: true, predicate: ["leafNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "parentNodeTemplate", first: true, predicate: ["parentNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "nodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "treeNode", first: true, predicate: i0.forwardRef(function () { return OTreeNodeComponent; }) }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OSearchInputComponent, selector: "o-search-input", inputs: ["placeholder", "label", "width", "float-label", "appearance", "columns", "filter-case-sensitive", "show-case-sensitive-checkbox", "show-menu"], outputs: ["onSearch"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i10$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i10$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i10$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i10$2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: OTreeMenuComponent, selector: "o-tree-menu", inputs: ["select-all-checkbox", "select-all-checkbox-visible"], outputs: ["onSelectCheckboxChange"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
37960
|
+
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: [
|
|
37961
|
+
OTreeDao,
|
|
37962
|
+
OntimizeServiceProvider
|
|
37963
|
+
], queries: [{ propertyName: "leafNodeTemplate", first: true, predicate: ["leafNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "parentNodeTemplate", first: true, predicate: ["parentNodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "nodeTemplate", first: true, predicate: ["nodeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "treeNode", first: true, predicate: i0.forwardRef(function () { return OTreeNodeComponent; }) }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OSearchInputComponent, selector: "o-search-input", inputs: ["placeholder", "label", "width", "float-label", "appearance", "columns", "filter-case-sensitive", "show-case-sensitive-checkbox", "show-menu"], outputs: ["onSearch"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i4$2.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: i10$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i10$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i10$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i10$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i10$2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: OTreeMenuComponent, selector: "o-tree-menu", inputs: ["select-all-checkbox", "select-all-checkbox-visible"], outputs: ["onSelectCheckboxChange"] }, { kind: "pipe", type: OTranslatePipe, name: "oTranslate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
37841
37964
|
__decorate([
|
|
37842
37965
|
BooleanInputConverter(),
|
|
37843
37966
|
__metadata("design:type", Boolean)
|
|
@@ -37866,7 +37989,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
37866
37989
|
type: Component,
|
|
37867
37990
|
args: [{ selector: 'o-tree', inputs: DEFAULT_INPUTS_O_TREE, outputs: DEFAULT_OUTPUTS_O_TREE, encapsulation: ViewEncapsulation.None, host: {
|
|
37868
37991
|
'[class.o-tree]': 'true'
|
|
37869
|
-
}, providers: [
|
|
37992
|
+
}, providers: [
|
|
37993
|
+
OTreeDao,
|
|
37994
|
+
OntimizeServiceProvider
|
|
37995
|
+
], template: "<div fxLayout=\"column\" fxFlex>\n\n <div *ngIf=\"hasControls()\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n\n <div class=\"buttons\">\n <ng-container *ngIf=\"showButtonsText;else showButtonsWithoutText\">\n\n <button *ngIf=\"insertButton\" type=\"button\" mat-stroked-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n <span>{{ 'INSERT' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-stroked-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n <span>{{ 'REFRESH' | oTranslate }}</span>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-stroked-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n <span>{{ 'DELETE' | oTranslate }}</span>\n </button>\n\n </ng-container>\n\n <ng-template #showButtonsWithoutText>\n <button *ngIf=\"insertButton\" type=\"button\" mat-icon-button aria-label=\"Insert\" [disabled]=\"!enabledInsertButton\" (click)=\"add($event)\">\n <mat-icon svgIcon=\"ontimize:add\"></mat-icon>\n </button>\n\n <button *ngIf=\"refreshButton\" type=\"button\" mat-icon-button aria-label=\"Refresh\" [disabled]=\"!enabledRefreshButton\" (click)=\"reloadData()\">\n <mat-icon svgIcon=\"ontimize:autorenew\"></mat-icon>\n </button>\n\n <button *ngIf=\"deleteButton\" type=\"button\" mat-icon-button aria-label=\"Delete\" [disabled]=\"!enabledDeleteButton\"\n [class.disabled]=\"!enabledDeleteButton\">\n <mat-icon svgIcon=\"ontimize:delete\"></mat-icon>\n </button>\n </ng-template>\n\n <ng-content select=\"[o-tree-button]\"></ng-content>\n </div>\n <div fxFlex>\n <span fxLayoutAlign=\"center center\" class=\"title\">{{ title | oTranslate }}</span>\n </div>\n <o-search-input *ngIf=\"quickFilter\" [filter-case-sensitive]=\"filterCaseSensitive\" [show-case-sensitive-checkbox]=\"showCaseSensitiveCheckbox()\"\n [columns]=\"quickFilterColumns\" [placeholder]=\"quickFilterPlaceholder\" appearance=\"outline\" float-label=\"never\" show-menu=\"no\">\n </o-search-input>\n <button type=\"button\" *ngIf=\"showTreeMenuButton\" mat-icon-button class=\"o-tree-menu-button\" [matMenuTriggerFor]=\"treeMenu.matMenu\"\n (click)=\"$event.stopPropagation()\">\n <mat-icon svgIcon=\"ontimize:more_vert\"></mat-icon>\n </button>\n <o-tree-menu #treeMenu [select-all-checkbox]=\"selectAllCheckbox\" [select-all-checkbox-visible]=\"selectAllCheckboxVisible\"\n (onSelectCheckboxChange)=\"onSelectCheckboxChange($event)\"></o-tree-menu>\n\n </div>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" (click)=\"leafNodeClicked($event, node)\" matTreeNodeToggle matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleLeafNodeTpl\" [checked]=\"checklistSelection.isSelected(node)\"\n (click)=\"checkboxClicked($event)\" (change)=\"todoLeafItemSelectionToggle(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #simpleLeafNodeTpl>\n <ng-container [ngTemplateOutlet]=\"leafNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" (click)=\"parentNodeClicked($event, node)\" matTreeNodePadding\n [ngClass]=\"{'selected-node': isSelectedNode(node)}\">\n <button mat-icon-button [attr.aria-label]=\"'toggle ' + node.label\" matTreeNodeToggle (click)=\"onClickToggleButton($event, node)\">\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\n </mat-icon>\n </button>\n\n <ng-container *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\">\n <div class=\"node-wrapper\">\n <mat-checkbox *ngIf=\"selectAllCheckboxVisible; else simpleParentNodeTpl\" (click)=\"checkboxClicked($event)\"\n (change)=\"todoItemSelectionToggle(node)\" [checked]=\"descendantsAllSelected(node)\" [indeterminate]=\"descendantsPartiallySelected(node)\">\n </mat-checkbox>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </div>\n </ng-container>\n\n <ng-template #simpleParentNodeTpl>\n <ng-container [ngTemplateOutlet]=\"parentNodeFulltemplate\" [ngTemplateOutletContext]=\"{$implicit:node}\">\n </ng-container>\n </ng-template>\n </mat-tree-node>\n </mat-tree>\n</div>\n\n<ng-template let-node #leafNodeFulltemplate>\n <ng-container *ngIf=\"leafNodeTemplate; else defaultLeafNodeTpl\" [ngTemplateOutlet]=\"leafNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultLeafNodeTpl>\n {{node.label}}\n </ng-template>\n</ng-template>\n\n<ng-template let-node #parentNodeFulltemplate>\n <ng-container *ngIf=\"parentNodeTemplate; else defaultParentNodeTpl\" [ngTemplateOutlet]=\"parentNodeTemplate\"\n [ngTemplateOutletContext]=\"{$implicit:node.data}\">\n </ng-container>\n\n <ng-template #defaultParentNodeTpl>\n <span>{{node.label}}</span>\n <mat-progress-bar *ngIf=\"node.isLoading\" mode=\"indeterminate\" fxFlex></mat-progress-bar>\n </ng-template>\n</ng-template>\n", styles: [".o-tree .mat-mdc-progress-bar{margin-left:30px}.o-tree .node-wrapper{align-items:center}\n"] }]
|
|
37870
37996
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{
|
|
37871
37997
|
type: Optional
|
|
37872
37998
|
}, {
|
|
@@ -37887,10 +38013,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
37887
38013
|
}] } });
|
|
37888
38014
|
|
|
37889
38015
|
class OTreeNodeComponent extends OTreeComponent {
|
|
37890
|
-
constructor(injector,
|
|
37891
|
-
super(injector,
|
|
38016
|
+
constructor(injector, elementRef, form, parentComponent, parentNode) {
|
|
38017
|
+
super(injector, elementRef, form);
|
|
37892
38018
|
this.injector = injector;
|
|
37893
|
-
this.
|
|
38019
|
+
this.parentComponent = parentComponent;
|
|
37894
38020
|
this.parentNode = parentNode;
|
|
37895
38021
|
}
|
|
37896
38022
|
ngOnInit() {
|
|
@@ -37903,14 +38029,32 @@ class OTreeNodeComponent extends OTreeComponent {
|
|
|
37903
38029
|
this.visibleColumnsArray = Util.parseArray(this.visibleColumns, true);
|
|
37904
38030
|
this.quickFilterColArray = Util.parseArray(this.quickFilterColumns, true);
|
|
37905
38031
|
}
|
|
38032
|
+
childQueryData(node) {
|
|
38033
|
+
let queryMethodName = this.queryMethod;
|
|
38034
|
+
if (!this.dataService || !(queryMethodName in this.dataService) || !this.entity) {
|
|
38035
|
+
return of({ data: [] });
|
|
38036
|
+
}
|
|
38037
|
+
const parentItem = ServiceUtils.getParentKeysFromForm(this._pKeysEquiv, this.form);
|
|
38038
|
+
let filter;
|
|
38039
|
+
if (this.recursive) {
|
|
38040
|
+
filter = parentItem ?? {};
|
|
38041
|
+
filter[this.parentColumn] = node.data[this.keysArray[0]];
|
|
38042
|
+
}
|
|
38043
|
+
else {
|
|
38044
|
+
filter = ServiceUtils.getFilterUsingParentKeys(node.data, node.treeNode._pKeysEquiv);
|
|
38045
|
+
}
|
|
38046
|
+
let queryArguments = [filter, this.colArray, this.entity];
|
|
38047
|
+
return this.dataService[queryMethodName](...queryArguments);
|
|
38048
|
+
}
|
|
37906
38049
|
}
|
|
37907
38050
|
OTreeNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeNodeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: forwardRef(() => OFormComponent), optional: true }, { token: forwardRef(() => OTreeComponent), optional: true }, { token: OTreeNodeComponent, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
37908
|
-
OTreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeNodeComponent, selector: "o-tree-node", usesInheritance: true, ngImport: i0, template: ' ', isInline: true });
|
|
38051
|
+
OTreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OTreeNodeComponent, selector: "o-tree-node", providers: [OntimizeServiceProvider], usesInheritance: true, ngImport: i0, template: ' ', isInline: true });
|
|
37909
38052
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OTreeNodeComponent, decorators: [{
|
|
37910
38053
|
type: Component,
|
|
37911
38054
|
args: [{
|
|
37912
38055
|
selector: 'o-tree-node',
|
|
37913
|
-
template: ' '
|
|
38056
|
+
template: ' ',
|
|
38057
|
+
providers: [OntimizeServiceProvider]
|
|
37914
38058
|
}]
|
|
37915
38059
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: OFormComponent, decorators: [{
|
|
37916
38060
|
type: Optional
|