@trudb/tru-common-lib 0.0.435 → 0.0.443
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/base-views/search/tru-search-view-base.mjs +3 -4
- package/esm2020/lib/base-views/search-result/tru-search-result-view-base.mjs +3 -4
- package/esm2020/lib/components/desktop/classes/tru-desktop-view-config.mjs +21 -0
- package/esm2020/lib/components/desktop/services/tru-desktop-service.mjs +3 -32
- package/esm2020/lib/components/desktop/services/tru-window-event-handler.mjs +1 -1
- package/esm2020/lib/components/desktop/tru-desktop.mjs +11 -3
- package/esm2020/lib/components/desktop/view/tru-desktop-view.mjs +1 -1
- package/esm2020/lib/components/desktop/window/tru-desktop-window.mjs +1 -1
- package/esm2020/public-api.mjs +2 -2
- package/fesm2015/trudb-tru-common-lib.mjs +24 -48
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +24 -48
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/base-views/search/tru-search-view-base.d.ts +2 -2
- package/lib/components/desktop/classes/tru-desktop-view-config.d.ts +16 -0
- package/lib/components/desktop/services/tru-desktop-service.d.ts +3 -27
- package/lib/components/desktop/services/tru-window-event-handler.d.ts +3 -3
- package/lib/components/desktop/view/tru-desktop-view.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2020/lib/components/desktop/services/tru-window-add-view-event-args.mjs +0 -22
- package/lib/components/desktop/services/tru-window-add-view-event-args.d.ts +0 -12
|
@@ -5,7 +5,7 @@ import * as i1$3 from '@angular/common';
|
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import * as i7 from '@angular/forms';
|
|
7
7
|
import { FormsModule, FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import {
|
|
8
|
+
import { BehaviorSubject, Subject, defer, from, of, Observable, skip, forkJoin, throwError } from 'rxjs';
|
|
9
9
|
import * as _ from 'underscore';
|
|
10
10
|
import moment from 'moment/moment';
|
|
11
11
|
import * as i1 from '@angular/material/dialog';
|
|
@@ -262,25 +262,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
262
262
|
}]
|
|
263
263
|
}] });
|
|
264
264
|
|
|
265
|
-
class
|
|
265
|
+
class TruDesktopViewConfig {
|
|
266
|
+
onActive() {
|
|
267
|
+
return this.active$;
|
|
268
|
+
}
|
|
269
|
+
active(value) {
|
|
270
|
+
this.active$.next(value);
|
|
271
|
+
}
|
|
266
272
|
constructor() {
|
|
267
|
-
this.active =
|
|
268
|
-
this.entities =
|
|
273
|
+
this.active$ = new BehaviorSubject(true);
|
|
274
|
+
this.entities = undefined;
|
|
269
275
|
this.entityIndex = 0;
|
|
270
276
|
this.isDirty = false;
|
|
271
277
|
this.isEditing = false;
|
|
272
278
|
this.isInvalid = false;
|
|
273
279
|
this.componentName = '';
|
|
280
|
+
this.openAsDetaiView = false;
|
|
274
281
|
}
|
|
275
282
|
}
|
|
276
|
-
|
|
277
|
-
TruWindowAddViewEventArgs.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruWindowAddViewEventArgs, providedIn: 'root' });
|
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruWindowAddViewEventArgs, decorators: [{
|
|
279
|
-
type: Injectable,
|
|
280
|
-
args: [{
|
|
281
|
-
providedIn: 'root'
|
|
282
|
-
}]
|
|
283
|
-
}] });
|
|
283
|
+
;
|
|
284
284
|
|
|
285
285
|
class TruWindowEventArgs {
|
|
286
286
|
constructor() {
|
|
@@ -471,8 +471,7 @@ class TruSearchViewBase {
|
|
|
471
471
|
};
|
|
472
472
|
this.onPkeyCellDoubleClicked = (gridConfig) => {
|
|
473
473
|
if (this.hasDetailView) {
|
|
474
|
-
var truWindowAddViewEventArgs = new
|
|
475
|
-
truWindowAddViewEventArgs.active = true;
|
|
474
|
+
var truWindowAddViewEventArgs = new TruDesktopViewConfig();
|
|
476
475
|
truWindowAddViewEventArgs.entities = gridConfig.api.getRenderedNodes().map((rowNode) => rowNode.data.$entity);
|
|
477
476
|
truWindowAddViewEventArgs.entityIndex = gridConfig.rowIndex;
|
|
478
477
|
truWindowAddViewEventArgs.componentName = this.tableName + 'DetailView';
|
|
@@ -588,8 +587,7 @@ class TruSearchResultViewBase {
|
|
|
588
587
|
};
|
|
589
588
|
this.onPkeyCellDoubleClicked = (gridConfig) => {
|
|
590
589
|
if (this.hasDetailView) {
|
|
591
|
-
var truWindowAddViewEventArgs = new
|
|
592
|
-
truWindowAddViewEventArgs.active = true;
|
|
590
|
+
var truWindowAddViewEventArgs = new TruDesktopViewConfig();
|
|
593
591
|
truWindowAddViewEventArgs.entities = gridConfig.api.getRenderedNodes().map((rowNode) => rowNode.data.$entity);
|
|
594
592
|
truWindowAddViewEventArgs.entityIndex = gridConfig.rowIndex;
|
|
595
593
|
truWindowAddViewEventArgs.componentName = this.tableName + 'DetailView';
|
|
@@ -2722,7 +2720,7 @@ class Desktop {
|
|
|
2722
2720
|
constructor() {
|
|
2723
2721
|
this.options = new DesktopOptions();
|
|
2724
2722
|
this.windowConfig = new WindowConfig();
|
|
2725
|
-
this.viewConfig = new
|
|
2723
|
+
this.viewConfig = new TruDesktopViewConfig();
|
|
2726
2724
|
}
|
|
2727
2725
|
}
|
|
2728
2726
|
;
|
|
@@ -2797,35 +2795,6 @@ class WindowConfig {
|
|
|
2797
2795
|
};
|
|
2798
2796
|
}
|
|
2799
2797
|
}
|
|
2800
|
-
;
|
|
2801
|
-
/**
|
|
2802
|
-
* @tru.desktop.doc class
|
|
2803
|
-
* @name truDesktopComponent.ViewConfig
|
|
2804
|
-
* @module tru.desktop
|
|
2805
|
-
*
|
|
2806
|
-
* @description
|
|
2807
|
-
* Default configuration object for a view. viewConfig properties can be defined by the application developer and overlaid
|
|
2808
|
-
* over this object.
|
|
2809
|
-
*
|
|
2810
|
-
*/
|
|
2811
|
-
class ViewConfig {
|
|
2812
|
-
onActive() {
|
|
2813
|
-
return this.active$;
|
|
2814
|
-
}
|
|
2815
|
-
active(value) {
|
|
2816
|
-
this.active$.next(value);
|
|
2817
|
-
}
|
|
2818
|
-
constructor() {
|
|
2819
|
-
this.active$ = new BehaviorSubject(true);
|
|
2820
|
-
this.entities = undefined;
|
|
2821
|
-
this.entityIndex = 0;
|
|
2822
|
-
this.isDirty = false;
|
|
2823
|
-
this.isEditing = false;
|
|
2824
|
-
this.isInvalid = false;
|
|
2825
|
-
this.componentName = undefined;
|
|
2826
|
-
this.windowConfig = null;
|
|
2827
|
-
}
|
|
2828
|
-
}
|
|
2829
2798
|
;
|
|
2830
2799
|
|
|
2831
2800
|
class TruDesktopMenubar {
|
|
@@ -3827,7 +3796,14 @@ class TruDesktop {
|
|
|
3827
3796
|
this.configureViews = (windowConfigOverlays, configuredWindow) => {
|
|
3828
3797
|
let configuredViews = [];
|
|
3829
3798
|
windowConfigOverlays.views.forEach((view) => {
|
|
3830
|
-
let configuredView = new
|
|
3799
|
+
let configuredView = new TruDesktopViewConfig();
|
|
3800
|
+
configuredView.componentName = view.componentName;
|
|
3801
|
+
configuredView.entities = view.entities;
|
|
3802
|
+
configuredView.entityIndex = view.entityIndex;
|
|
3803
|
+
configuredView.isDirty = view.isDirty;
|
|
3804
|
+
configuredView.isEditing = view.isEditing;
|
|
3805
|
+
configuredView.isInvalid = view.isValid;
|
|
3806
|
+
configuredView.openAsDetaiView = view.openAsDetailView;
|
|
3831
3807
|
//viewConfigInstance.globals = this.options.globals;
|
|
3832
3808
|
//let configuredView = Object.assign(viewConfigInstance, view);
|
|
3833
3809
|
configuredView.window = configuredWindow;
|
|
@@ -5832,5 +5808,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
5832
5808
|
* Generated bundle index. Do not edit.
|
|
5833
5809
|
*/
|
|
5834
5810
|
|
|
5835
|
-
export { DetailViewModule, TruAppEnvironment, TruAuth, TruAuthInterceptor, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruBreezeValidator, TruBreezeValidatorModule, TruChoice, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDetailViewBase, TruEditControlBase, TruEditControlConfigBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruIconModule, TruLogin, TruLoginModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchControlRangeBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchResultViewBase, TruSearchResultViewBaseModule, TruSearchResultViewManager, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTableRegistry, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruUtil, TruValidationDialog, TruValidationDialogModule, TruWindowActionEventHandler,
|
|
5811
|
+
export { DetailViewModule, TruAppEnvironment, TruAuth, TruAuthInterceptor, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruBreezeValidator, TruBreezeValidatorModule, TruChoice, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDesktopViewConfig, TruDetailViewBase, TruEditControlBase, TruEditControlConfigBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruIconModule, TruLogin, TruLoginModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDate, TruPropertyConfigDecimal, TruPropertyConfigFile, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchConfigBase, TruSearchControlBase, TruSearchControlConfigBase, TruSearchControlRangeBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchResultViewBase, TruSearchResultViewBaseModule, TruSearchResultViewManager, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTableRegistry, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruUtil, TruValidationDialog, TruValidationDialogModule, TruWindowActionEventHandler, TruWindowEventArgs, TruWindowEventHandler };
|
|
5836
5812
|
//# sourceMappingURL=trudb-tru-common-lib.mjs.map
|