@trudb/tru-common-lib 0.0.187 → 0.0.188

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.
@@ -1,15 +1,15 @@
1
1
  import { EntityAspect, BinaryPredicate, AndOrPredicate, breeze, MetadataStore, DataService, EntityManager, EntityQuery, FetchStrategy, EntityState } from 'breeze-client';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, Input, Component, Inject, NgModule, Injectable, HostListener, EventEmitter, ViewEncapsulation, Output, APP_INITIALIZER } from '@angular/core';
4
- import * as _ from 'underscore';
5
- import * as moment from 'moment';
6
- import * as i1 from '@angular/material/dialog';
7
- import { MAT_DIALOG_DATA } from '@angular/material/dialog';
3
+ import { Directive, Input, Component, NgModule, Injectable, EventEmitter, Inject, HostListener, ViewEncapsulation, Output, APP_INITIALIZER } from '@angular/core';
8
4
  import * as i1$3 from '@angular/common';
9
5
  import { CommonModule } from '@angular/common';
10
6
  import * as i2 from '@angular/forms';
11
7
  import { FormsModule } from '@angular/forms';
12
- import { BehaviorSubject, defer, from, of, skip, forkJoin, Subject } from 'rxjs';
8
+ import { Subject, BehaviorSubject, defer, from, of, skip, forkJoin } from 'rxjs';
9
+ import * as _ from 'underscore';
10
+ import * as moment from 'moment';
11
+ import * as i1 from '@angular/material/dialog';
12
+ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
13
13
  import * as i1$2 from '@angular/common/http';
14
14
  import { HttpClientModule } from '@angular/common/http';
15
15
  import * as i3 from '@angular/material/checkbox';
@@ -127,6 +127,296 @@ class TruTableConfigBase {
127
127
  }
128
128
  }
129
129
 
130
+ class TruDetailViewBase {
131
+ constructor() { }
132
+ }
133
+ TruDetailViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDetailViewBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
+ TruDetailViewBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruDetailViewBase, selector: "tru-detail-view-base", ngImport: i0, template: "", styles: ["::ng-deep .detail-container .mat-form-field{margin-left:10px;width:calc(100% - 20px)}::ng-deep .detail-container .mat-tab-group{margin-left:10px;margin-right:10px}\n"] });
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDetailViewBase, decorators: [{
136
+ type: Component,
137
+ args: [{ selector: 'tru-detail-view-base', template: "", styles: ["::ng-deep .detail-container .mat-form-field{margin-left:10px;width:calc(100% - 20px)}::ng-deep .detail-container .mat-tab-group{margin-left:10px;margin-right:10px}\n"] }]
138
+ }], ctorParameters: function () { return []; } });
139
+
140
+ class DetailViewModule {
141
+ }
142
+ DetailViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: DetailViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
143
+ DetailViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: DetailViewModule, declarations: [TruDetailViewBase], imports: [CommonModule, FormsModule], exports: [TruDetailViewBase] });
144
+ DetailViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: DetailViewModule, imports: [CommonModule, FormsModule] });
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: DetailViewModule, decorators: [{
146
+ type: NgModule,
147
+ args: [{
148
+ declarations: [TruDetailViewBase],
149
+ imports: [CommonModule, FormsModule],
150
+ exports: [TruDetailViewBase]
151
+ }]
152
+ }] });
153
+
154
+ class TruWindowAddViewEventArgs {
155
+ constructor() {
156
+ this.active = null;
157
+ this.entities = null;
158
+ this.entityIndex = 0;
159
+ this.isDirty = false;
160
+ this.isEditing = false;
161
+ this.isInvalid = false;
162
+ this.componentName = '';
163
+ }
164
+ }
165
+ TruWindowAddViewEventArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowAddViewEventArgs, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
166
+ TruWindowAddViewEventArgs.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowAddViewEventArgs, providedIn: 'root' });
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowAddViewEventArgs, decorators: [{
168
+ type: Injectable,
169
+ args: [{
170
+ providedIn: 'root'
171
+ }]
172
+ }] });
173
+
174
+ class TruWindowEventArgs {
175
+ constructor() {
176
+ this.title = '';
177
+ this.tableName = '';
178
+ this.tablePluralName = '';
179
+ this.tablePluralLabel = '';
180
+ this.context = {};
181
+ this.contentBottom = '23px';
182
+ this.statusbarDirective = 'tru-statusbar';
183
+ this.height = '450px';
184
+ this.width = '900px';
185
+ this.views = [{}];
186
+ }
187
+ }
188
+ TruWindowEventArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventArgs, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
189
+ TruWindowEventArgs.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventArgs, providedIn: 'root' });
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventArgs, decorators: [{
191
+ type: Injectable,
192
+ args: [{
193
+ providedIn: 'root'
194
+ }]
195
+ }] });
196
+
197
+ class TruWindowEventHandler {
198
+ constructor() {
199
+ this.open$ = new Subject();
200
+ this.addView$ = new Subject();
201
+ this.removeForwadViews$ = new Subject();
202
+ }
203
+ onOpen() {
204
+ return this.open$;
205
+ }
206
+ open(windowEvent) {
207
+ this.open$.next(windowEvent);
208
+ }
209
+ onAddView() {
210
+ return this.addView$;
211
+ }
212
+ addView(windowAddViewEvent) {
213
+ this.addView$.next(windowAddViewEvent);
214
+ }
215
+ onRemoveForwardViews() {
216
+ return this.removeForwadViews$;
217
+ }
218
+ removeForwardViews() {
219
+ this.removeForwadViews$.next(null);
220
+ }
221
+ }
222
+ TruWindowEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
223
+ TruWindowEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, providedIn: 'root' });
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, decorators: [{
225
+ type: Injectable,
226
+ args: [{
227
+ providedIn: 'root'
228
+ }]
229
+ }] });
230
+
231
+ class TruDesktopManager {
232
+ constructor(truWindowEventHandler) {
233
+ this.truWindowEventHandler = truWindowEventHandler;
234
+ this.getWindowEvent = (tableName, tablePluralName, tablePluralLabel, componentName, data) => {
235
+ var windowEvent = new TruWindowEventArgs();
236
+ windowEvent.tableName = tableName;
237
+ windowEvent.tablePluralName = tablePluralName;
238
+ windowEvent.tablePluralLabel = tablePluralLabel;
239
+ windowEvent.views = [
240
+ {
241
+ active: true,
242
+ entities: undefined,
243
+ entityIndex: 0,
244
+ isDirty: false,
245
+ isEditing: false,
246
+ isInvalid: false,
247
+ data: data,
248
+ componentName: componentName
249
+ }
250
+ ];
251
+ return windowEvent;
252
+ };
253
+ /**
254
+ * Opens a window for a directive.
255
+ * @param {string} directiveName - name of the view directive.
256
+ * @param {object} data - values to pass to the view.
257
+ * @param {optional bool} showIfExists - if true and a view already exists for the
258
+ * directive, then shows its window instead of creating a new one.
259
+ */
260
+ this.addWindow = (tableName, tablePluralName, tablePluralLabel, componentName, data = null, showNavigation = true, showIfExists) => {
261
+ this.truWindowEventHandler.open(this.getWindowEvent(tableName, tablePluralName, tablePluralLabel, componentName, data));
262
+ };
263
+ this.windowTitlesByBaseText = {};
264
+ /**
265
+ * Returns a unique string for the base name of a window. At first, returns the input.
266
+ * For second call with same base name, returns the name plus ' - 2' and so on. When
267
+ * all of the titles for the base name are released, then the next title will have no
268
+ * suffix.
269
+ * @param {string} text - base name of a window.
270
+ * @returns {object} - text: the unique text and release(): releases the name for
271
+ * future windows.
272
+ */
273
+ this.getUniqueTitle = (text) => {
274
+ var baseText = text;
275
+ var titles = this.windowTitlesByBaseText[baseText];
276
+ if (!titles) {
277
+ this.windowTitlesByBaseText[baseText] = titles = {
278
+ dispensedCount: 1,
279
+ activeCount: 1
280
+ };
281
+ }
282
+ else {
283
+ ++titles.activeCount;
284
+ text += ' - ' + (++titles.dispensedCount);
285
+ }
286
+ return {
287
+ text: text,
288
+ release: () => {
289
+ if (titles.activeCount === 1)
290
+ delete this.windowTitlesByBaseText[baseText];
291
+ else {
292
+ --titles.activeCount;
293
+ }
294
+ }
295
+ };
296
+ };
297
+ }
298
+ }
299
+ TruDesktopManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopManager, deps: [{ token: TruWindowEventHandler }], target: i0.ɵɵFactoryTarget.Injectable });
300
+ TruDesktopManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopManager, providedIn: 'root' });
301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopManager, decorators: [{
302
+ type: Injectable,
303
+ args: [{
304
+ providedIn: 'root',
305
+ }]
306
+ }], ctorParameters: function () { return [{ type: TruWindowEventHandler }]; } });
307
+
308
+ class TruSearchViewBase {
309
+ constructor(desktopManager, truWindowEventHandler) {
310
+ this.desktopManager = desktopManager;
311
+ this.truWindowEventHandler = truWindowEventHandler;
312
+ this.tableName = '';
313
+ this.tablePluralName = '';
314
+ this.tablePluralLabel = '';
315
+ this.pkeyName = '';
316
+ this.windowTitle = {};
317
+ this.unsubscribes = [];
318
+ this.expands = [];
319
+ this.isSearching = false;
320
+ this.entities = [];
321
+ this.hasDetailView = true;
322
+ this.searchPanelConfig = {
323
+ side: 'right',
324
+ active: true,
325
+ open: true,
326
+ modKeyLabel: '',
327
+ size: 500,
328
+ pinned: false
329
+ };
330
+ this.setWindowTitle = () => {
331
+ if (this.view.active)
332
+ this.windowConfig.title = this.windowTitle.text;
333
+ };
334
+ this.onPkeyCellDoubleClicked = (gridConfig) => {
335
+ if (this.hasDetailView) {
336
+ var truWindowAddViewEventArgs = new TruWindowAddViewEventArgs();
337
+ truWindowAddViewEventArgs.active = true;
338
+ truWindowAddViewEventArgs.entities = gridConfig.api.getRenderedNodes().map((rowNode) => rowNode.data.$entity);
339
+ truWindowAddViewEventArgs.entityIndex = gridConfig.rowIndex;
340
+ truWindowAddViewEventArgs.componentName = this.tableName + 'DetailView';
341
+ this.truWindowEventHandler.addView(truWindowAddViewEventArgs);
342
+ }
343
+ else {
344
+ alert(this.tablePluralLabel + ' does not have a detail view.');
345
+ }
346
+ };
347
+ }
348
+ ngOnInit() {
349
+ this.tableName = this.view.window.tableName;
350
+ this.tablePluralName = this.view.window.tablePluralName;
351
+ this.tablePluralLabel = this.view.window.tablePluralLabel;
352
+ this.pkeyName = this.tableName + 'Ref';
353
+ this.windowTitle = this.desktopManager.getUniqueTitle(this.tablePluralLabel);
354
+ this.windowConfig = this.view.window;
355
+ this.contextFilters = this.view.window.globals;
356
+ this.setWindowTitle();
357
+ }
358
+ }
359
+ TruSearchViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewBase, deps: [{ token: TruDesktopManager }, { token: TruWindowEventHandler }], target: i0.ɵɵFactoryTarget.Component });
360
+ TruSearchViewBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruSearchViewBase, selector: "tru-search-view-base", inputs: { view: "view" }, ngImport: i0, template: "", styles: [""] });
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewBase, decorators: [{
362
+ type: Component,
363
+ args: [{ selector: 'tru-search-view-base', template: "" }]
364
+ }], ctorParameters: function () { return [{ type: TruDesktopManager }, { type: TruWindowEventHandler }]; }, propDecorators: { view: [{
365
+ type: Input
366
+ }] } });
367
+
368
+ class TruSearchViewBaseModule {
369
+ }
370
+ TruSearchViewBaseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewBaseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
371
+ TruSearchViewBaseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewBaseModule, declarations: [TruSearchViewBase], imports: [CommonModule, FormsModule], exports: [TruSearchViewBase] });
372
+ TruSearchViewBaseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewBaseModule, imports: [CommonModule, FormsModule] });
373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewBaseModule, decorators: [{
374
+ type: NgModule,
375
+ args: [{
376
+ declarations: [TruSearchViewBase],
377
+ imports: [CommonModule, FormsModule],
378
+ exports: [TruSearchViewBase]
379
+ }]
380
+ }] });
381
+
382
+ class TruSearchViewEventHandler {
383
+ constructor() {
384
+ this.search$ = new EventEmitter();
385
+ this.filter$ = new EventEmitter();
386
+ this.clear$ = new BehaviorSubject(null);
387
+ this.default$ = new BehaviorSubject(null);
388
+ }
389
+ onSearch() {
390
+ return this.search$;
391
+ }
392
+ onFilter() {
393
+ return this.filter$;
394
+ }
395
+ onClearValues() {
396
+ return this.clear$;
397
+ }
398
+ onSetDefaults() {
399
+ return this.default$;
400
+ }
401
+ search(entityQuery) {
402
+ this.search$.emit(entityQuery);
403
+ }
404
+ filter(entityQuery) {
405
+ this.filter$.emit(entityQuery);
406
+ }
407
+ clearValues() {
408
+ this.clear$.next(null);
409
+ }
410
+ setDefaults() {
411
+ this.default$.next(null);
412
+ }
413
+ }
414
+ TruSearchViewEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
415
+ TruSearchViewEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewEventHandler });
416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewEventHandler, decorators: [{
417
+ type: Injectable
418
+ }] });
419
+
130
420
  class TruFormulaEval {
131
421
  static isString(s) {
132
422
  return typeof s === 'string';
@@ -1205,23 +1495,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
1205
1495
  type: Injectable
1206
1496
  }], ctorParameters: function () { return [{ type: TruBreezeContextFactory }, { type: TruAppEnvironment }, { type: TruEntityAccessor }, { type: TruUiNotification }]; } });
1207
1497
 
1208
- class TruSearchViewEventHandler {
1209
- constructor() {
1210
- this.search$ = new BehaviorSubject(null);
1211
- }
1212
- search(query) {
1213
- this.search$.next(query);
1214
- }
1215
- onSearch() {
1216
- return this.search$.asObservable();
1217
- }
1218
- }
1219
- TruSearchViewEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1220
- TruSearchViewEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewEventHandler });
1221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchViewEventHandler, decorators: [{
1222
- type: Injectable
1223
- }] });
1224
-
1225
1498
  class TruToolbar {
1226
1499
  constructor() {
1227
1500
  this.config = null;
@@ -2102,40 +2375,6 @@ class ViewConfig {
2102
2375
  }
2103
2376
  ;
2104
2377
 
2105
- class TruWindowEventHandler {
2106
- constructor() {
2107
- this.open$ = new Subject();
2108
- this.addView$ = new Subject();
2109
- this.removeForwadViews$ = new Subject();
2110
- }
2111
- onOpen() {
2112
- return this.open$;
2113
- }
2114
- open(windowEvent) {
2115
- this.open$.next(windowEvent);
2116
- }
2117
- onAddView() {
2118
- return this.addView$;
2119
- }
2120
- addView(windowAddViewEvent) {
2121
- this.addView$.next(windowAddViewEvent);
2122
- }
2123
- onRemoveForwardViews() {
2124
- return this.removeForwadViews$;
2125
- }
2126
- removeForwardViews() {
2127
- this.removeForwadViews$.next(null);
2128
- }
2129
- }
2130
- TruWindowEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2131
- TruWindowEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, providedIn: 'root' });
2132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, decorators: [{
2133
- type: Injectable,
2134
- args: [{
2135
- providedIn: 'root'
2136
- }]
2137
- }] });
2138
-
2139
2378
  class TruDesktopMenubar {
2140
2379
  constructor() {
2141
2380
  this.options = null;
@@ -3777,106 +4016,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
3777
4016
  }]
3778
4017
  }] });
3779
4018
 
3780
- class TruWindowEventArgs {
3781
- constructor() {
3782
- this.title = '';
3783
- this.tableName = '';
3784
- this.tablePluralName = '';
3785
- this.tablePluralLabel = '';
3786
- this.context = {};
3787
- this.contentBottom = '23px';
3788
- this.statusbarDirective = 'tru-statusbar';
3789
- this.height = '450px';
3790
- this.width = '900px';
3791
- this.views = [{}];
3792
- }
3793
- }
3794
- TruWindowEventArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventArgs, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3795
- TruWindowEventArgs.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventArgs, providedIn: 'root' });
3796
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventArgs, decorators: [{
3797
- type: Injectable,
3798
- args: [{
3799
- providedIn: 'root'
3800
- }]
3801
- }] });
3802
-
3803
- class TruDesktopManager {
3804
- constructor(truWindowEventHandler) {
3805
- this.truWindowEventHandler = truWindowEventHandler;
3806
- this.getWindowEvent = (tableName, tablePluralName, tablePluralLabel, componentName, data) => {
3807
- var windowEvent = new TruWindowEventArgs();
3808
- windowEvent.tableName = tableName;
3809
- windowEvent.tablePluralName = tablePluralName;
3810
- windowEvent.tablePluralLabel = tablePluralLabel;
3811
- windowEvent.views = [
3812
- {
3813
- active: true,
3814
- entities: undefined,
3815
- entityIndex: 0,
3816
- isDirty: false,
3817
- isEditing: false,
3818
- isInvalid: false,
3819
- data: data,
3820
- componentName: componentName
3821
- }
3822
- ];
3823
- return windowEvent;
3824
- };
3825
- /**
3826
- * Opens a window for a directive.
3827
- * @param {string} directiveName - name of the view directive.
3828
- * @param {object} data - values to pass to the view.
3829
- * @param {optional bool} showIfExists - if true and a view already exists for the
3830
- * directive, then shows its window instead of creating a new one.
3831
- */
3832
- this.addWindow = (tableName, tablePluralName, tablePluralLabel, componentName, data = null, showNavigation = true, showIfExists) => {
3833
- this.truWindowEventHandler.open(this.getWindowEvent(tableName, tablePluralName, tablePluralLabel, componentName, data));
3834
- };
3835
- this.windowTitlesByBaseText = {};
3836
- /**
3837
- * Returns a unique string for the base name of a window. At first, returns the input.
3838
- * For second call with same base name, returns the name plus ' - 2' and so on. When
3839
- * all of the titles for the base name are released, then the next title will have no
3840
- * suffix.
3841
- * @param {string} text - base name of a window.
3842
- * @returns {object} - text: the unique text and release(): releases the name for
3843
- * future windows.
3844
- */
3845
- this.getUniqueTitle = (text) => {
3846
- var baseText = text;
3847
- var titles = this.windowTitlesByBaseText[baseText];
3848
- if (!titles) {
3849
- this.windowTitlesByBaseText[baseText] = titles = {
3850
- dispensedCount: 1,
3851
- activeCount: 1
3852
- };
3853
- }
3854
- else {
3855
- ++titles.activeCount;
3856
- text += ' - ' + (++titles.dispensedCount);
3857
- }
3858
- return {
3859
- text: text,
3860
- release: () => {
3861
- if (titles.activeCount === 1)
3862
- delete this.windowTitlesByBaseText[baseText];
3863
- else {
3864
- --titles.activeCount;
3865
- }
3866
- }
3867
- };
3868
- };
3869
- }
3870
- }
3871
- TruDesktopManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopManager, deps: [{ token: TruWindowEventHandler }], target: i0.ɵɵFactoryTarget.Injectable });
3872
- TruDesktopManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopManager, providedIn: 'root' });
3873
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopManager, decorators: [{
3874
- type: Injectable,
3875
- args: [{
3876
- providedIn: 'root',
3877
- }]
3878
- }], ctorParameters: function () { return [{ type: TruWindowEventHandler }]; } });
3879
-
3880
4019
  class TruWindowActionEventHandler {
3881
4020
  constructor() {
3882
4021
  this.save$ = new Subject();
@@ -3901,26 +4040,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
3901
4040
  type: Injectable
3902
4041
  }] });
3903
4042
 
3904
- class TruWindowAddViewEventArgs {
3905
- constructor() {
3906
- this.active = null;
3907
- this.entities = null;
3908
- this.entityIndex = 0;
3909
- this.isDirty = false;
3910
- this.isEditing = false;
3911
- this.isInvalid = false;
3912
- this.componentName = '';
3913
- }
3914
- }
3915
- TruWindowAddViewEventArgs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowAddViewEventArgs, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3916
- TruWindowAddViewEventArgs.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowAddViewEventArgs, providedIn: 'root' });
3917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowAddViewEventArgs, decorators: [{
3918
- type: Injectable,
3919
- args: [{
3920
- providedIn: 'root'
3921
- }]
3922
- }] });
3923
-
3924
4043
  class TruExportDialogModule {
3925
4044
  }
3926
4045
  TruExportDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruExportDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -4211,44 +4330,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
4211
4330
  }]
4212
4331
  }] });
4213
4332
 
4214
- class TruSearchGroupEventHandler {
4215
- constructor() {
4216
- this.search$ = new EventEmitter();
4217
- this.filter$ = new EventEmitter();
4218
- this.clear$ = new BehaviorSubject(null);
4219
- this.default$ = new BehaviorSubject(null);
4220
- }
4221
- onSearch() {
4222
- return this.search$;
4223
- }
4224
- onFilter() {
4225
- return this.filter$;
4226
- }
4227
- onClearValues() {
4228
- return this.clear$;
4229
- }
4230
- onSetDefaults() {
4231
- return this.default$;
4232
- }
4233
- search(entityQuery) {
4234
- this.search$.emit(entityQuery);
4235
- }
4236
- filter(entityQuery) {
4237
- this.filter$.emit(entityQuery);
4238
- }
4239
- clearValues() {
4240
- this.clear$.next(null);
4241
- }
4242
- setDefaults() {
4243
- this.default$.next(null);
4244
- }
4245
- }
4246
- TruSearchGroupEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchGroupEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4247
- TruSearchGroupEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchGroupEventHandler });
4248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchGroupEventHandler, decorators: [{
4249
- type: Injectable
4250
- }] });
4251
-
4252
4333
  class TruPredicateMap {
4253
4334
  constructor() { }
4254
4335
  }
@@ -4611,11 +4692,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
4611
4692
  }]
4612
4693
  }] });
4613
4694
 
4614
- /// <reference path='lib/event-handlers/tru-search-group-event-handler.ts' />
4695
+ /*
4696
+ * Public API Surface of tru-common-lib
4697
+ */
4615
4698
 
4616
4699
  /**
4617
4700
  * Generated bundle index. Do not edit.
4618
4701
  */
4619
4702
 
4620
- export { TruAppEnvironment, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDecimal, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchComponentBase, TruSearchComponentConfigBase, TruSearchConfigBase, TruSearchGroupEventHandler, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruWindowActionEventHandler, TruWindowAddViewEventArgs, TruWindowEventArgs, TruWindowEventHandler };
4703
+ export { DetailViewModule, TruAppEnvironment, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDetailViewBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDecimal, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchComponentBase, TruSearchComponentConfigBase, TruSearchConfigBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruWindowActionEventHandler, TruWindowAddViewEventArgs, TruWindowEventArgs, TruWindowEventHandler };
4621
4704
  //# sourceMappingURL=trudb-tru-common-lib.mjs.map