@ts-core/angular 13.0.48 → 13.0.49

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.
@@ -32,7 +32,7 @@ import { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginato
32
32
  import * as i2 from '@angular/material/button';
33
33
  import { MatButtonModule } from '@angular/material/button';
34
34
  import * as i1$2 from '@angular/material/bottom-sheet';
35
- import { MatBottomSheetModule, MatBottomSheet } from '@angular/material/bottom-sheet';
35
+ import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
36
36
  import { RemoveFilterableCondition, GetFilterableCondition } from '@ts-core/common/dto';
37
37
  import * as i1$3 from '@angular/platform-browser';
38
38
  import * as i1$4 from '@ts-core/frontend/theme';
@@ -4151,13 +4151,13 @@ class WindowElement extends DestroyableContainer {
4151
4151
  // --------------------------------------------------------------------------
4152
4152
  checkWindowParent() {
4153
4153
  let container = this.getContainer();
4154
- if (container) {
4154
+ if (!_.isNil(container)) {
4155
4155
  ViewUtil.appendChild(container, this.element.nativeElement);
4156
4156
  }
4157
4157
  }
4158
4158
  getContainer() {
4159
4159
  let item = ViewUtil.parseElement(this.element.nativeElement);
4160
- while (item && item.nodeName.toLowerCase() !== 'mat-dialog-container') {
4160
+ while (!_.isNil(item) && item.nodeName.toLowerCase() !== 'mat-dialog-container') {
4161
4161
  item = item.parentElement;
4162
4162
  }
4163
4163
  return item;
@@ -4325,441 +4325,113 @@ class BottomSheetBaseComponent extends BottomSheetImpl {
4325
4325
  // --------------------------------------------------------------------------
4326
4326
  BottomSheetBaseComponent.CLOSE_COMPONENT = BottomSheetCloseElementComponent;
4327
4327
 
4328
- class WindowService extends Destroyable {
4328
+ class IWindowContent extends DestroyableContainer {
4329
4329
  // --------------------------------------------------------------------------
4330
4330
  //
4331
- // Constructor
4331
+ // Constructor
4332
4332
  //
4333
4333
  // --------------------------------------------------------------------------
4334
- constructor(dialog, language, cookies) {
4334
+ constructor(container) {
4335
4335
  super();
4336
- this.isNeedCheckPositionAfterOpen = true;
4337
- this.gapX = 25;
4338
- this.gapY = 25;
4339
- this.minWidth = 100;
4340
- this.minHeight = 100;
4341
- this.paddingTop = 25;
4342
- this.paddingLeft = 25;
4343
- this.paddingRight = 25;
4344
- this.paddingBottom = 25;
4345
- this.defaultVerticalAlign = WindowAlign.CENTER;
4346
- this.defaultHorizontalAlign = WindowAlign.CENTER;
4347
- this.topZIndex = 999;
4348
- this._windows = new Map();
4349
- this.dialog = dialog;
4350
- this.language = language;
4351
- this.observer = new Subject();
4352
- this.properties = new PropertiesManager(cookies);
4336
+ this.container = container;
4353
4337
  }
4354
4338
  // --------------------------------------------------------------------------
4355
4339
  //
4356
- // Private Methods
4340
+ // Private Methods
4357
4341
  //
4358
4342
  // --------------------------------------------------------------------------
4359
- sortFunction(first, second) {
4360
- let firstIndex = first.container ? parseInt(ViewUtil.getStyle(first.container.parentElement, 'zIndex'), 10) : -1;
4361
- let secondIndex = second.container ? parseInt(ViewUtil.getStyle(second.container.parentElement, 'zIndex'), 10) : -1;
4362
- return firstIndex > secondIndex ? -1 : 1;
4343
+ commitWindowProperties() {
4344
+ this.commitConfigProperties();
4363
4345
  }
4364
- updateTop() {
4365
- let zIndex = 0;
4366
- let topWindow = null;
4367
- for (let window of this.windowsArray) {
4368
- if (_.isNil(window.container)) {
4369
- continue;
4370
- }
4371
- let index = parseInt(ViewUtil.getStyle(window.container.parentElement, 'zIndex'), 10);
4372
- if (zIndex >= index) {
4373
- continue;
4374
- }
4375
- zIndex = index;
4376
- topWindow = window;
4346
+ commitConfigProperties() { }
4347
+ // --------------------------------------------------------------------------
4348
+ //
4349
+ // Public Methods
4350
+ //
4351
+ // --------------------------------------------------------------------------
4352
+ ngAfterViewInit() {
4353
+ this.emit(WindowEvent.CONTENT_READY);
4354
+ }
4355
+ ngOnDestroy() {
4356
+ // do nothing, window will destroy content after closing
4357
+ }
4358
+ blink() {
4359
+ if (!_.isNil(this.window)) {
4360
+ this.window.blink();
4377
4361
  }
4378
- if (_.isNil(topWindow) || topWindow.isOnTop) {
4379
- return;
4362
+ }
4363
+ shake() {
4364
+ if (!_.isNil(this.window)) {
4365
+ this.window.shake();
4380
4366
  }
4381
- topWindow.isOnTop = true;
4382
- this.observer.next(new ObservableData(WindowServiceEvent.SETTED_ON_TOP, topWindow));
4383
4367
  }
4384
- setWindowOnTop(topWindow) {
4385
- let currentIndex = this.topZIndex - 2;
4386
- for (let window of this.windowsArray) {
4387
- if (_.isNil(window.container)) {
4388
- continue;
4389
- }
4390
- window.isOnTop = window === topWindow;
4391
- let zIndex = window.isOnTop ? this.topZIndex : currentIndex--;
4392
- ViewUtil.setStyle(window.backdrop, 'zIndex', zIndex);
4393
- ViewUtil.setStyle(window.wrapper, 'zIndex', zIndex);
4368
+ emit(event) {
4369
+ if (!_.isNil(this.window)) {
4370
+ this.window.emit(event);
4394
4371
  }
4395
- this.windowsArray.sort(this.sortFunction);
4396
- this.observer.next(new ObservableData(WindowServiceEvent.SETTED_ON_TOP, topWindow));
4397
4372
  }
4398
- checkPosition(item) {
4399
- while (this.hasSamePosition(item)) {
4400
- item.move(item.getX() + this.gapX, item.getY() + this.gapY);
4373
+ close() {
4374
+ if (!_.isNil(this.window)) {
4375
+ this.window.close();
4401
4376
  }
4402
4377
  }
4403
- hasSamePosition(itemWindow) {
4404
- let x = itemWindow.getX();
4405
- let y = itemWindow.getY();
4406
- let result = false;
4407
- this.windowsArray.forEach(window => {
4408
- if (window !== itemWindow && x === window.getX() && y === window.getY()) {
4409
- result = true;
4410
- }
4411
- });
4412
- return result;
4378
+ destroy() {
4379
+ if (this.isDestroyed) {
4380
+ return;
4381
+ }
4382
+ super.destroy();
4383
+ this.window = null;
4384
+ this.container = null;
4413
4385
  }
4414
4386
  // --------------------------------------------------------------------------
4415
4387
  //
4416
- // Setters Methods
4388
+ // Proxy Public Properties
4417
4389
  //
4418
4390
  // --------------------------------------------------------------------------
4419
- add(config, content) {
4420
- this._windows.set(config, content);
4421
- this.observer.next(new ObservableData(WindowServiceEvent.OPENED, content.window));
4391
+ get data() {
4392
+ return !_.isNil(this.config) ? this.config.data : null;
4422
4393
  }
4423
- remove(config) {
4424
- let window = this._windows.get(config);
4425
- if (!window) {
4426
- return null;
4427
- }
4428
- window.close();
4429
- this._windows.delete(config);
4430
- this.observer.next(new ObservableData(WindowServiceEvent.CLOSED, window.window));
4394
+ get isOnTop() {
4395
+ return !_.isNil(this.window) ? this.window.isOnTop : false;
4431
4396
  }
4432
- getById(id) {
4433
- let item = _.find(Array.from(this._windows.values()), item => item.config.id === id);
4434
- return !_.isNil(item) ? item.window : null;
4397
+ get isMinimized() {
4398
+ return !_.isNil(this.window) ? this.window.isMinimized : false;
4435
4399
  }
4436
- setDefaultProperties(config) {
4437
- if (!config.verticalAlign) {
4438
- config.verticalAlign = this.defaultVerticalAlign;
4439
- }
4440
- if (!config.horizontalAlign) {
4441
- config.horizontalAlign = this.defaultHorizontalAlign;
4442
- }
4443
- if (_.isNaN(config.defaultMinWidth)) {
4444
- config.defaultMinWidth = this.minWidth;
4445
- }
4446
- if (_.isNaN(config.defaultMinHeight)) {
4447
- config.defaultMinHeight = this.minHeight;
4448
- }
4449
- if (_.isNaN(config.paddingTop)) {
4450
- config.paddingTop = this.paddingTop;
4451
- }
4452
- if (_.isNaN(config.paddingLeft)) {
4453
- config.paddingLeft = this.paddingLeft;
4454
- }
4455
- if (_.isNaN(config.paddingRight)) {
4456
- config.paddingRight = this.paddingRight;
4457
- }
4458
- if (_.isNaN(config.paddingBottom)) {
4459
- config.paddingBottom = this.paddingBottom;
4460
- }
4461
- if (config.propertiesId) {
4462
- this.properties.load(config.propertiesId, config);
4400
+ get events() {
4401
+ return !_.isNil(this.window) ? this.window.events : null;
4402
+ }
4403
+ get isDisabled() {
4404
+ return !_.isNil(this.window) ? this.window.isDisabled : false;
4405
+ }
4406
+ set isDisabled(value) {
4407
+ if (!_.isNil(this.window)) {
4408
+ this.window.isDisabled = value;
4463
4409
  }
4464
- config.setDefaultProperties();
4465
4410
  }
4466
4411
  // --------------------------------------------------------------------------
4467
4412
  //
4468
- // Public Methods
4413
+ // Public Properties
4469
4414
  //
4470
4415
  // --------------------------------------------------------------------------
4471
- open(component, config) {
4472
- let window = null;
4473
- if (config.id) {
4474
- window = this.getById(config.id);
4475
- if (window) {
4476
- return window.content;
4477
- }
4478
- }
4479
- this.setDefaultProperties(config);
4480
- // let dialog = this.dialog as any;
4481
- // dialog._getOverlayState = config.isModal ? dialog.getOverlayStateModal : dialog.getOverlayStateNonModal;
4482
- let reference = this.dialog.open(component, config);
4483
- window = this.factory.create({ config, reference, overlay: reference._overlayRef });
4484
- this.observer.next(new ObservableData(WindowServiceEvent.OPEN_STARTED, window));
4485
- let subscription = window.events.subscribe(event => {
4486
- switch (event) {
4487
- case WindowEvent.OPENED:
4488
- this.add(config, reference.componentInstance);
4489
- this.setWindowOnTop(window);
4490
- if (this.isNeedCheckPositionAfterOpen) {
4491
- this.checkPosition(window);
4492
- }
4493
- this.observer.next(new ObservableData(WindowServiceEvent.OPEN_FINISHED, window));
4494
- break;
4495
- case WindowEvent.CLOSED:
4496
- subscription.unsubscribe();
4497
- this.remove(config);
4498
- if (window.isOnTop && this.windows.size > 0) {
4499
- this.updateTop();
4500
- }
4501
- break;
4502
- case WindowEvent.RESIZED:
4503
- if (!_.isNil(config.propertiesId)) {
4504
- this.properties.save(config.propertiesId, window);
4505
- }
4506
- break;
4507
- case WindowEvent.SET_ON_TOP:
4508
- this.setWindowOnTop(window);
4509
- break;
4510
- }
4511
- });
4512
- return window.content;
4513
- }
4514
- get(value) {
4515
- let id = value.toString();
4516
- if (value instanceof WindowConfig) {
4517
- id = value.id;
4518
- }
4519
- if (!id) {
4520
- return null;
4521
- }
4522
- let window = this.getById(id);
4523
- if (_.isNil(window)) {
4416
+ get element() {
4417
+ if (_.isNil(this.container)) {
4524
4418
  return null;
4525
4419
  }
4526
- return window.content;
4527
- }
4528
- has(value) {
4529
- return !_.isNil(this.get(value));
4420
+ return this.container instanceof ViewContainerRef ? this.container.element : this.container;
4530
4421
  }
4531
- setOnTop(value) {
4532
- let content = this.get(value);
4533
- if (!content) {
4534
- return false;
4535
- }
4536
- content.window.setOnTop();
4537
- return true;
4422
+ get config() {
4423
+ return !_.isNil(this.window) ? this.window.config : null;
4538
4424
  }
4539
- removeAll() {
4540
- this.windowsArray.forEach(window => window.close());
4425
+ get window() {
4426
+ return this._window;
4541
4427
  }
4542
- destroy() {
4543
- if (this.isDestroyed) {
4428
+ set window(value) {
4429
+ if (value === this._window) {
4544
4430
  return;
4545
4431
  }
4546
- super.destroy();
4547
- this.removeAll();
4548
- if (!_.isNil(this.observer)) {
4549
- this.observer.complete();
4550
- this.observer = null;
4551
- }
4552
- if (!_.isNil(this.properties)) {
4553
- this.properties.destroy();
4554
- this.properties = null;
4555
- }
4556
- this.factory = null;
4557
- this.properties = null;
4558
- this.questionComponent = null;
4559
- this.dialog = null;
4560
- this.language = null;
4561
- this._windows = null;
4562
- }
4563
- // --------------------------------------------------------------------------
4564
- //
4565
- // Additional Methods
4566
- //
4567
- // --------------------------------------------------------------------------
4568
- info(translationId, translation, questionOptions, configOptions) {
4569
- let text = this.language.translate(translationId, translation);
4570
- let config = _.assign(new WindowConfig(true, false, 450), configOptions);
4571
- config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.INFO, text }));
4572
- return this.open(this.questionComponent, config).config.data;
4573
- }
4574
- question(translationId, translation, questionOptions, configOptions) {
4575
- let text = this.language.translate(translationId, translation);
4576
- let config = _.assign(new WindowConfig(true, false, 450), configOptions);
4577
- config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.QUESTION, text }));
4578
- return this.open(this.questionComponent, config).config.data;
4579
- }
4580
- // --------------------------------------------------------------------------
4581
- //
4582
- // Private Properties
4583
- //
4584
- // --------------------------------------------------------------------------
4585
- get windowsArray() {
4586
- return Array.from(this.windows.values()).map(item => item.window);
4587
- }
4588
- // --------------------------------------------------------------------------
4589
- //
4590
- // Public Properties
4591
- //
4592
- // --------------------------------------------------------------------------
4593
- get events() {
4594
- return this.observer.asObservable();
4595
- }
4596
- get windows() {
4597
- return this._windows;
4598
- }
4599
- }
4600
- WindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, deps: [{ token: i1.MatDialog }, { token: i1$1.LanguageService }, { token: CookieService }], target: i0.ɵɵFactoryTarget.Injectable });
4601
- WindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, providedIn: 'root' });
4602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, decorators: [{
4603
- type: Injectable,
4604
- args: [{ providedIn: 'root' }]
4605
- }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i1$1.LanguageService }, { type: CookieService }]; } });
4606
- class PropertiesManager extends Destroyable {
4607
- // --------------------------------------------------------------------------
4608
- //
4609
- // Constructor
4610
- //
4611
- // --------------------------------------------------------------------------
4612
- constructor(cookies) {
4613
- super();
4614
- this.cookies = cookies;
4615
- }
4616
- // --------------------------------------------------------------------------
4617
- //
4618
- // Public Methods
4619
- //
4620
- // --------------------------------------------------------------------------
4621
- load(name, config) {
4622
- let item = this.cookies.getObject(name + 'Window');
4623
- if (!item) {
4624
- return;
4625
- }
4626
- if (item.hasOwnProperty('width')) {
4627
- config.defaultWidth = item.width;
4628
- }
4629
- if (item.hasOwnProperty('height')) {
4630
- config.defaultHeight = item.height;
4631
- }
4632
- }
4633
- save(name, window) {
4634
- this.cookies.putObject(name + 'Window', {
4635
- width: window.getWidth(),
4636
- height: window.getHeight()
4637
- });
4638
- }
4639
- destroy() {
4640
- if (this.isDestroyed) {
4641
- return;
4642
- }
4643
- super.destroy();
4644
- this.cookies = null;
4645
- }
4646
- }
4647
- var WindowServiceEvent;
4648
- (function (WindowServiceEvent) {
4649
- WindowServiceEvent["OPEN_STARTED"] = "OPEN_STARTED";
4650
- WindowServiceEvent["OPENED"] = "OPENED";
4651
- WindowServiceEvent["OPEN_FINISHED"] = "OPEN_FINISHED";
4652
- WindowServiceEvent["CLOSED"] = "CLOSED";
4653
- WindowServiceEvent["SETTED_ON_TOP"] = "SETTED_ON_TOP";
4654
- })(WindowServiceEvent || (WindowServiceEvent = {}));
4655
-
4656
- class IWindowContent extends DestroyableContainer {
4657
- // --------------------------------------------------------------------------
4658
- //
4659
- // Constructor
4660
- //
4661
- // --------------------------------------------------------------------------
4662
- constructor(container) {
4663
- super();
4664
- this.container = container;
4665
- }
4666
- // --------------------------------------------------------------------------
4667
- //
4668
- // Private Methods
4669
- //
4670
- // --------------------------------------------------------------------------
4671
- commitWindowProperties() {
4672
- this.commitConfigProperties();
4673
- }
4674
- commitConfigProperties() { }
4675
- // --------------------------------------------------------------------------
4676
- //
4677
- // Public Methods
4678
- //
4679
- // --------------------------------------------------------------------------
4680
- ngAfterViewInit() {
4681
- this.emit(WindowEvent.CONTENT_READY);
4682
- }
4683
- ngOnDestroy() {
4684
- // do nothing, window will destroy content after closing
4685
- }
4686
- blink() {
4687
- if (!_.isNil(this.window)) {
4688
- this.window.blink();
4689
- }
4690
- }
4691
- shake() {
4692
- if (!_.isNil(this.window)) {
4693
- this.window.shake();
4694
- }
4695
- }
4696
- emit(event) {
4697
- if (!_.isNil(this.window)) {
4698
- this.window.emit(event);
4699
- }
4700
- }
4701
- close() {
4702
- if (!_.isNil(this.window)) {
4703
- this.window.close();
4704
- }
4705
- }
4706
- destroy() {
4707
- if (this.isDestroyed) {
4708
- return;
4709
- }
4710
- super.destroy();
4711
- this.window = null;
4712
- this.container = null;
4713
- }
4714
- // --------------------------------------------------------------------------
4715
- //
4716
- // Proxy Public Properties
4717
- //
4718
- // --------------------------------------------------------------------------
4719
- get data() {
4720
- return !_.isNil(this.config) ? this.config.data : null;
4721
- }
4722
- get isOnTop() {
4723
- return !_.isNil(this.window) ? this.window.isOnTop : false;
4724
- }
4725
- get isMinimized() {
4726
- return !_.isNil(this.window) ? this.window.isMinimized : false;
4727
- }
4728
- get events() {
4729
- return !_.isNil(this.window) ? this.window.events : null;
4730
- }
4731
- get isDisabled() {
4732
- return !_.isNil(this.window) ? this.window.isDisabled : false;
4733
- }
4734
- set isDisabled(value) {
4735
- if (!_.isNil(this.window)) {
4736
- this.window.isDisabled = value;
4737
- }
4738
- }
4739
- // --------------------------------------------------------------------------
4740
- //
4741
- // Public Properties
4742
- //
4743
- // --------------------------------------------------------------------------
4744
- get element() {
4745
- if (_.isNil(this.container)) {
4746
- return null;
4747
- }
4748
- return this.container instanceof ViewContainerRef ? this.container.element : this.container;
4749
- }
4750
- get config() {
4751
- return !_.isNil(this.window) ? this.window.config : null;
4752
- }
4753
- get window() {
4754
- return this._window;
4755
- }
4756
- set window(value) {
4757
- if (value === this._window) {
4758
- return;
4759
- }
4760
- this._window = value;
4761
- if (!_.isNil(value)) {
4762
- this.commitWindowProperties();
4432
+ this._window = value;
4433
+ if (!_.isNil(value)) {
4434
+ this.commitWindowProperties();
4763
4435
  }
4764
4436
  }
4765
4437
  }
@@ -4838,1604 +4510,1791 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
4838
4510
  args: [{ template: "<p class=\"text m-4 text-center mouse-inactive text-word-wrap-break-word\" [innerHTML]=\"text\"></p>\n\n<div class=\"text-center border-sm-top p-3\">\n\n <button (click)=\"data?.closeClickHandler()\" mat-stroked-button *ngIf=\"data?.isInfo\">\n <span [innerHTML]=\"data?.closeText\"></span>\n </button>\n\n <button class=\"mr-3 me-3\" (click)=\"data?.yesClickHandler()\" color=\"primary\" mat-stroked-button *ngIf=\"data?.isQuestion\">\n <span [innerHTML]=\"data?.yesText\"></span>\n </button>\n\n <button (click)=\"data?.notClickHandler()\" mat-stroked-button *ngIf=\"data?.isQuestion\">\n <span [innerHTML]=\"data?.notText\"></span>\n </button>\n\n</div>" }]
4839
4511
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i1$1.LanguageService }]; } });
4840
4512
 
4841
- class BottomSheetService extends Destroyable {
4513
+ class WindowCloseElementComponent extends WindowElement {
4842
4514
  // --------------------------------------------------------------------------
4843
4515
  //
4844
4516
  // Constructor
4845
4517
  //
4846
4518
  // --------------------------------------------------------------------------
4847
- constructor(dialog, language) {
4848
- super();
4849
- this.dialog = dialog;
4850
- this.language = language;
4851
- this.observer = new Subject();
4852
- this.defaultFactory = new WindowFactory(BottomSheetBaseComponent);
4853
- this.questionComponent = WindowQuestionComponent;
4519
+ constructor(element) {
4520
+ super(element);
4854
4521
  }
4855
4522
  // --------------------------------------------------------------------------
4856
4523
  //
4857
- // Protected Methods
4524
+ // Private Methods
4858
4525
  //
4859
4526
  // --------------------------------------------------------------------------
4860
- getFactory(component, config) {
4861
- return this.defaultFactory;
4527
+ createChildren() {
4528
+ super.createChildren();
4529
+ if (!_.isNil(WindowCloseElementComponent.ICON_VALUE)) {
4530
+ ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowCloseElementComponent.ICON_VALUE);
4531
+ }
4532
+ if (!_.isNil(WindowCloseElementComponent.ICON_CLASS)) {
4533
+ ViewUtil.addClasses(this.nativeElement, WindowCloseElementComponent.ICON_CLASS);
4534
+ }
4535
+ ViewUtil.addClass(this.nativeElement, 'mouse-active');
4862
4536
  }
4863
4537
  // --------------------------------------------------------------------------
4864
4538
  //
4865
- // Public Methods
4539
+ // Event Handlers
4866
4540
  //
4867
4541
  // --------------------------------------------------------------------------
4868
- open(component, config) {
4869
- let reference = this.dialog.open(component, config);
4870
- let window = this.getFactory(component, config).create({ config, reference: reference, overlay: reference._overlayRef });
4871
- this.observer.next(new ObservableData(WindowServiceEvent.OPEN_STARTED, window));
4872
- let subscription = window.events.subscribe(event => {
4873
- switch (event) {
4874
- case WindowServiceEvent.OPENED:
4875
- this.observer.next(new ObservableData(WindowServiceEvent.OPENED, window));
4876
- this.observer.next(new ObservableData(WindowServiceEvent.OPEN_FINISHED, window));
4877
- break;
4878
- case WindowServiceEvent.CLOSED:
4879
- subscription.unsubscribe();
4880
- this.observer.next(new ObservableData(WindowServiceEvent.CLOSED, window));
4881
- break;
4882
- }
4883
- });
4884
- return window.content;
4542
+ clickHandler(event) {
4543
+ super.clickHandler(event);
4544
+ if (!_.isNil(this.window)) {
4545
+ this.window.close();
4546
+ }
4885
4547
  }
4886
- removeAll() { }
4887
- destroy() {
4888
- if (this.isDestroyed) {
4889
- return;
4890
- }
4891
- super.destroy();
4892
- this.removeAll();
4893
- if (!_.isNil(this.observer)) {
4894
- this.observer.complete();
4895
- this.observer = null;
4896
- }
4897
- this.defaultFactory = null;
4898
- this.questionComponent = null;
4899
- this.dialog = null;
4900
- this.language = null;
4548
+ }
4549
+ // --------------------------------------------------------------------------
4550
+ //
4551
+ // Constants
4552
+ //
4553
+ // --------------------------------------------------------------------------
4554
+ WindowCloseElementComponent.ICON_CLASS = 'fas fa-times';
4555
+ WindowCloseElementComponent.ICON_VALUE = null;
4556
+ WindowCloseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowCloseElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4557
+ WindowCloseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowCloseElementComponent, selector: "vi-window-close-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
4558
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowCloseElementComponent, decorators: [{
4559
+ type: Component,
4560
+ args: [{ selector: 'vi-window-close-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
4561
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
4562
+
4563
+ class WindowMinimizeElementComponent extends WindowElement {
4564
+ // --------------------------------------------------------------------------
4565
+ //
4566
+ // Constructor
4567
+ //
4568
+ // --------------------------------------------------------------------------
4569
+ constructor(element) {
4570
+ super(element);
4571
+ // --------------------------------------------------------------------------
4572
+ //
4573
+ // Private Methods
4574
+ //
4575
+ // --------------------------------------------------------------------------
4576
+ this.commitIconProperties = () => {
4577
+ let icon = this.window.isMinimized ? WindowMinimizeElementComponent.ICON_MAXIMIZE_VALUE : WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE;
4578
+ ViewUtil.setProperty(this.nativeElement, 'innerHTML', icon);
4579
+ };
4901
4580
  }
4902
4581
  // --------------------------------------------------------------------------
4903
4582
  //
4904
- // Additional Methods
4583
+ // Protected Methods
4905
4584
  //
4906
4585
  // --------------------------------------------------------------------------
4907
- info(translationId, translation, questionOptions, configOptions) {
4908
- let text = this.language.translate(translationId, translation);
4909
- let config = _.assign(new WindowConfig(true, false, 450), configOptions);
4910
- config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.INFO, text }));
4911
- return this.open(this.questionComponent, config).config.data;
4586
+ commitWindowProperties() {
4587
+ super.commitWindowProperties();
4588
+ this.window.events.pipe(takeUntil(this.destroyed)).subscribe(event => {
4589
+ if (event === WindowEvent.MINIMIZED_CHANGED) {
4590
+ this.commitIconProperties();
4591
+ }
4592
+ });
4912
4593
  }
4913
- question(translationId, translation, questionOptions, configOptions) {
4914
- let text = this.language.translate(translationId, translation);
4915
- let config = _.assign(new WindowConfig(true, false, 450), configOptions);
4916
- config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.QUESTION, text }));
4917
- return this.open(this.questionComponent, config).config.data;
4594
+ createChildren() {
4595
+ super.createChildren();
4596
+ if (!_.isNil(WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE)) {
4597
+ ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE);
4598
+ }
4599
+ if (!_.isNil(WindowMinimizeElementComponent.ICON_CLASS)) {
4600
+ ViewUtil.addClasses(this.nativeElement, WindowMinimizeElementComponent.ICON_CLASS);
4601
+ }
4602
+ ViewUtil.addClass(this.nativeElement, 'mouse-active');
4918
4603
  }
4919
4604
  // --------------------------------------------------------------------------
4920
4605
  //
4921
- // Public Properties
4606
+ // Event Handlers
4922
4607
  //
4923
4608
  // --------------------------------------------------------------------------
4924
- get events() {
4925
- return this.observer.asObservable();
4609
+ clickHandler(event) {
4610
+ super.clickHandler(event);
4611
+ if (!_.isNil(this.window)) {
4612
+ this.window.isMinimized = !this.window.isMinimized;
4613
+ }
4926
4614
  }
4927
4615
  }
4928
- BottomSheetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetService, deps: [{ token: i1$2.MatBottomSheet }, { token: i1$1.LanguageService }], target: i0.ɵɵFactoryTarget.Injectable });
4929
- BottomSheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetService, providedIn: 'root' });
4930
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetService, decorators: [{
4931
- type: Injectable,
4932
- args: [{ providedIn: 'root' }]
4933
- }], ctorParameters: function () { return [{ type: i1$2.MatBottomSheet }, { type: i1$1.LanguageService }]; } });
4616
+ // --------------------------------------------------------------------------
4617
+ //
4618
+ // Constants
4619
+ //
4620
+ // --------------------------------------------------------------------------
4621
+ WindowMinimizeElementComponent.ICON_CLASS = null;
4622
+ WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE = null;
4623
+ WindowMinimizeElementComponent.ICON_MAXIMIZE_VALUE = null;
4624
+ WindowMinimizeElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMinimizeElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4625
+ WindowMinimizeElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowMinimizeElementComponent, selector: "vi-window-minimize-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
4626
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMinimizeElementComponent, decorators: [{
4627
+ type: Component,
4628
+ args: [{ selector: 'vi-window-minimize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
4629
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
4934
4630
 
4935
- const IMPORTS$4 = [CommonModule, FormsModule, MatBottomSheetModule, MatButtonModule, LanguageModule];
4936
- const ENTRY_COMPONENTS$3 = [BottomSheetCloseElementComponent];
4937
- const DECLARATIONS$4 = [...ENTRY_COMPONENTS$3];
4938
- const EXPORTS$3 = [...DECLARATIONS$4];
4939
- class BottomSheetModule {
4631
+ class WindowResizeElementComponent extends WindowElement {
4940
4632
  // --------------------------------------------------------------------------
4941
4633
  //
4942
- // Static Methods
4634
+ // Constructor
4943
4635
  //
4944
4636
  // --------------------------------------------------------------------------
4945
- static forRoot() {
4946
- return {
4947
- ngModule: BottomSheetService,
4948
- providers: [
4949
- {
4950
- provide: BottomSheetService,
4951
- deps: [MatBottomSheet, LanguageService],
4952
- useClass: BottomSheetService
4953
- }
4954
- ]
4955
- };
4637
+ constructor(element) {
4638
+ super(element);
4956
4639
  }
4957
- }
4958
- BottomSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4959
- BottomSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, declarations: [BottomSheetCloseElementComponent], imports: [CommonModule, FormsModule, MatBottomSheetModule, MatButtonModule, LanguageModule], exports: [BottomSheetCloseElementComponent] });
4960
- BottomSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, imports: [IMPORTS$4] });
4961
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, decorators: [{
4962
- type: NgModule,
4963
- args: [{
4964
- imports: IMPORTS$4,
4965
- declarations: DECLARATIONS$4,
4966
- exports: EXPORTS$3
4967
- }]
4968
- }] });
4969
-
4970
- class NotificationImpl extends WindowBase {
4971
4640
  // --------------------------------------------------------------------------
4972
4641
  //
4973
- // Constructor
4642
+ // Private Methods
4974
4643
  //
4975
4644
  // --------------------------------------------------------------------------
4976
- constructor(properties) {
4977
- super();
4978
- this.setClosed = () => {
4979
- this.emit(WindowEvent.CLOSED);
4980
- this.destroy();
4981
- };
4982
- this.setOpened = () => {
4983
- this.emit(WindowEvent.OPENED);
4984
- };
4985
- this.observer = new Subject();
4986
- this.properties = properties;
4987
- this.content.notification = this;
4988
- // Have to save for unsubscribe on destroy
4989
- this._container = this.properties.overlay.overlayElement;
4990
- this.setProperties();
4991
- this.getReference().afterOpened().pipe(takeUntil$1(this.destroyed)).subscribe(this.setOpened);
4992
- this.getReference().afterClosed().pipe(takeUntil$1(this.destroyed)).subscribe(this.setClosed);
4993
- this.observer
4994
- .pipe(filter$1(event => event === WindowEvent.CONTENT_READY), takeUntil$1(this.destroyed))
4995
- .subscribe(this.updatePosition);
4645
+ createChildren() {
4646
+ super.createChildren();
4647
+ if (!_.isNil(WindowResizeElementComponent.ICON_VALUE)) {
4648
+ ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowResizeElementComponent.ICON_VALUE);
4649
+ }
4650
+ if (!_.isNil(WindowResizeElementComponent.ICON_CLASS)) {
4651
+ ViewUtil.addClasses(this.nativeElement, WindowResizeElementComponent.ICON_CLASS);
4652
+ }
4653
+ ViewUtil.setStyle(this.nativeElement, 'cursor', 'pointer');
4996
4654
  }
4997
4655
  // --------------------------------------------------------------------------
4998
4656
  //
4999
- // Protected Methods
4657
+ // Event Handlers
5000
4658
  //
5001
4659
  // --------------------------------------------------------------------------
5002
- setProperties() {
5003
- super.setProperties();
5004
- ViewUtil.addClass(this.container, 'vi-notification');
5005
- }
5006
- getConfig() {
5007
- return this.properties.config;
5008
- }
5009
- getContainer() {
5010
- return this.container;
5011
- }
5012
- getReference() {
5013
- return this.properties.reference;
4660
+ clickHandler(event) {
4661
+ super.clickHandler(event);
4662
+ if (!_.isNil(this.window)) {
4663
+ }
5014
4664
  }
4665
+ }
4666
+ // --------------------------------------------------------------------------
4667
+ //
4668
+ // Constants
4669
+ //
4670
+ // --------------------------------------------------------------------------
4671
+ WindowResizeElementComponent.ICON_CLASS = 'fas fa-arrows-alt';
4672
+ WindowResizeElementComponent.ICON_VALUE = null;
4673
+ WindowResizeElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowResizeElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4674
+ WindowResizeElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowResizeElementComponent, selector: "vi-window-resize-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
4675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowResizeElementComponent, decorators: [{
4676
+ type: Component,
4677
+ args: [{ selector: 'vi-window-resize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
4678
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
4679
+
4680
+ class WindowResizeable extends WindowImpl {
5015
4681
  // --------------------------------------------------------------------------
5016
4682
  //
5017
- // Public Methods
4683
+ // Protected Methods
5018
4684
  //
5019
4685
  // --------------------------------------------------------------------------
5020
- emit(event) {
5021
- this.observer.next(event);
5022
- }
5023
- close() {
5024
- this.getReference().close();
5025
- }
5026
- remove() {
5027
- this.close();
5028
- this.observer.next(NotificationEvent.REMOVED);
5029
- }
5030
- destroy() {
5031
- if (this.isDestroyed) {
4686
+ setProperties() {
4687
+ super.setProperties();
4688
+ if (!this.config.isResizeable) {
5032
4689
  return;
5033
4690
  }
5034
- super.destroy();
5035
- if (!_.isNil(this.observer)) {
5036
- this.observer.complete();
5037
- this.observer = null;
4691
+ ViewUtil.addClass(this.container, 'vi-resizeable');
4692
+ if (_.isNil(this.resizeMoveHandlerProxy)) {
4693
+ this.resizeMoveHandlerProxy = this.resizeMoveHandler.bind(this);
5038
4694
  }
5039
- this.properties = null;
5040
- this._container = null;
4695
+ let edges = {};
4696
+ edges.top = true;
4697
+ edges.left = true;
4698
+ edges.right = true;
4699
+ edges.bottom = true;
4700
+ let param = {};
4701
+ param.edges = edges;
4702
+ this.interactable.resizable(param);
4703
+ this.interactable.on('resizemove', this.resizeMoveHandlerProxy);
5041
4704
  }
5042
4705
  // --------------------------------------------------------------------------
5043
4706
  //
5044
- // Size Methods
4707
+ // Event Handlers
5045
4708
  //
5046
4709
  // --------------------------------------------------------------------------
5047
- getWidth() {
5048
- return this.calculateWidth();
5049
- }
5050
- getHeight() {
5051
- return this.calculateHeight();
5052
- }
5053
- setWidth(value) {
5054
- this.width = value;
5055
- }
5056
- setHeight(value) {
5057
- this.height = value;
5058
- }
5059
- setSize(width, height) {
5060
- this.setWidth(width);
5061
- this.setHeight(height);
5062
- }
5063
- // --------------------------------------------------------------------------
4710
+ resizeMoveHandler(event) {
4711
+ if (this.isMinimized) {
4712
+ return;
4713
+ }
4714
+ let isChanged = event.dx !== 0 || event.dy !== 0;
4715
+ if (!isChanged) {
4716
+ return;
4717
+ }
4718
+ if (event.dx !== 0) {
4719
+ let width = this.getWidth();
4720
+ if (_.isNaN(width)) {
4721
+ width = this.calculateWidth();
4722
+ }
4723
+ this.setWidth(width + event.dx, false);
4724
+ }
4725
+ if (event.dy !== 0) {
4726
+ let height = this.getHeight();
4727
+ if (_.isNaN(height)) {
4728
+ height = this.calculateHeight();
4729
+ }
4730
+ this.setHeight(height + event.dy, false);
4731
+ }
4732
+ this.resizeHandler();
4733
+ }
4734
+ // --------------------------------------------------------------------------
5064
4735
  //
5065
- // Move Methods
4736
+ // Public Properties
5066
4737
  //
5067
4738
  // --------------------------------------------------------------------------
5068
- getX() {
5069
- return this.x;
5070
- }
5071
- setX(value) {
5072
- this.x = value;
5073
- }
5074
- getY() {
5075
- return this.y;
5076
- }
5077
- setY(value) {
5078
- this.y = value;
5079
- }
5080
- move(x, y) {
5081
- this.setX(x);
5082
- this.setY(y);
4739
+ destroy() {
4740
+ if (this.isDestroyed) {
4741
+ return;
4742
+ }
4743
+ super.destroy();
4744
+ this.resizeMoveHandlerProxy = null;
4745
+ if (!_.isNil(this._interactable)) {
4746
+ this._interactable.unset();
4747
+ this._interactable = null;
4748
+ }
5083
4749
  }
5084
4750
  // --------------------------------------------------------------------------
5085
4751
  //
5086
- // Public Properties
4752
+ // Private Properties
5087
4753
  //
5088
4754
  // --------------------------------------------------------------------------
5089
- get events() {
5090
- return this.observer.asObservable();
5091
- }
5092
- get config() {
5093
- return this.properties.config;
5094
- }
5095
- get content() {
5096
- return this.properties.reference ? this.properties.reference.componentInstance : null;
5097
- }
5098
- get container() {
5099
- return this._container;
4755
+ get interactable() {
4756
+ if (_.isNil(this._interactable)) {
4757
+ this._interactable = interact.default(this.container);
4758
+ // this._interactable.styleCursor(false);
4759
+ }
4760
+ return this._interactable;
5100
4761
  }
5101
4762
  }
5102
4763
 
5103
- class NotificationBaseComponent extends NotificationImpl {
5104
- }
5105
-
5106
- class INotificationContent extends DestroyableContainer {
4764
+ class WindowDragable extends WindowResizeable {
4765
+ constructor() {
4766
+ // --------------------------------------------------------------------------
4767
+ //
4768
+ // Properties Methods
4769
+ //
4770
+ // --------------------------------------------------------------------------
4771
+ super(...arguments);
4772
+ this.isWasDragged = false;
4773
+ }
5107
4774
  // --------------------------------------------------------------------------
5108
4775
  //
5109
- // Constructor
4776
+ // Protected Methods
5110
4777
  //
5111
4778
  // --------------------------------------------------------------------------
5112
- constructor(container) {
5113
- super();
5114
- this.container = container;
5115
- this.timerHandler = () => this.handleCloseClick();
4779
+ setProperties() {
4780
+ super.setProperties();
4781
+ if (this.config.isModal) {
4782
+ return;
4783
+ }
4784
+ ViewUtil.addClass(this.container, 'vi-draggable');
4785
+ if (!this.config.isContentDragable) {
4786
+ return;
4787
+ }
4788
+ this.dragMoveHandlerProxy = this.dragMoveHandler.bind(this);
4789
+ this.dragStartHandlerProxy = this.dragStartHandler.bind(this);
4790
+ let param = {};
4791
+ this.interactable.draggable(param);
4792
+ this.interactable.on('dragmove', this.dragMoveHandlerProxy);
4793
+ this.interactable.on('dragstart', this.dragStartHandlerProxy);
4794
+ }
4795
+ isNeedClickStopPropagation(event) {
4796
+ return this.isWasDragged || super.isNeedClickStopPropagation(event);
5116
4797
  }
5117
4798
  // --------------------------------------------------------------------------
5118
4799
  //
5119
- // Private Methods
4800
+ // Event Handlers
5120
4801
  //
5121
4802
  // --------------------------------------------------------------------------
5122
- commitNotificationProperties() {
5123
- this.config = this.notification.config;
4803
+ dragStartHandler(event) {
4804
+ this.isWasDragged = true;
5124
4805
  }
5125
- commitConfigProperties() {
5126
- this.clearTimer();
5127
- if (this.config.closeDuration > 0) {
5128
- this.timer = setTimeout(this.timerHandler, this.config.closeDuration);
5129
- }
4806
+ dragMoveHandler(event) {
4807
+ let x = this.getX() + event.dx;
4808
+ let y = this.getY() + event.dy;
4809
+ this.move(x, y);
5130
4810
  }
5131
- clearTimer() {
5132
- if (!_.isNil(this.timer)) {
5133
- clearTimeout(this.timer);
5134
- this.timer = null;
5135
- }
4811
+ mouseClickHandler(event) {
4812
+ super.mouseClickHandler(event);
4813
+ this.isWasDragged = false;
5136
4814
  }
5137
4815
  // --------------------------------------------------------------------------
5138
4816
  //
5139
- // Public Methods
4817
+ // Public Methods
5140
4818
  //
5141
4819
  // --------------------------------------------------------------------------
5142
- close() {
5143
- if (!_.isNil(this.notification)) {
5144
- this.notification.close();
5145
- }
5146
- }
5147
- remove() {
5148
- if (!_.isNil(this.notification)) {
5149
- this.notification.remove();
5150
- }
5151
- }
5152
- emit(event) {
5153
- if (!_.isNil(this.notification)) {
5154
- this.notification.emit(event);
5155
- }
5156
- }
5157
4820
  destroy() {
5158
4821
  if (this.isDestroyed) {
5159
4822
  return;
5160
4823
  }
5161
4824
  super.destroy();
5162
- this.clearTimer();
5163
- this.config = null;
5164
- this.notification = null;
4825
+ this.dragMoveHandlerProxy = null;
4826
+ this.dragStartHandlerProxy = null;
5165
4827
  }
4828
+ }
4829
+
4830
+ class WindowBaseComponent extends WindowDragable {
5166
4831
  // --------------------------------------------------------------------------
5167
4832
  //
5168
- // Event Handlers
4833
+ // Protected Methods
5169
4834
  //
5170
4835
  // --------------------------------------------------------------------------
5171
- ngAfterViewInit() {
5172
- this.emit(WindowEvent.CONTENT_READY);
5173
- }
5174
- handleCloseClick() {
5175
- this.clearTimer();
5176
- if (!_.isNil(this.config) && this.config.isRemoveAfterClose) {
5177
- this.remove();
4836
+ elementsCreate() {
4837
+ super.elementsCreate();
4838
+ if (!(this.content.container instanceof ViewContainerRef)) {
4839
+ return;
5178
4840
  }
5179
- else {
5180
- this.close();
4841
+ if (!this.config.disableClose) {
4842
+ this.elementAdd(this.content.container.createComponent(WindowBaseComponent.CLOSE_COMPONENT));
4843
+ }
4844
+ if (this.config.isResizeable) {
4845
+ this.elementAdd(this.content.container.createComponent(WindowBaseComponent.RESIZE_COMPONENT));
4846
+ }
4847
+ if (this.config.isMinimizable) {
4848
+ this.elementAdd(this.content.container.createComponent(WindowBaseComponent.MINIMIZE_COMPONENT));
5181
4849
  }
5182
4850
  }
5183
- // --------------------------------------------------------------------------
5184
- //
5185
- // Proxy Public Properties
5186
- //
5187
- // --------------------------------------------------------------------------
5188
- get data() {
5189
- return this.config ? this.config.data : null;
4851
+ commitIsBlinkProperties() {
4852
+ ViewUtil.toggleClass(this.container, this.blinkClass, this.isBlink);
5190
4853
  }
5191
- get events() {
5192
- return this.notification ? this.notification.events : null;
4854
+ commitIsDisabledProperties() {
4855
+ ViewUtil.toggleClass(this.container, this.disabledClass, this.isDisabled);
4856
+ ViewUtil.toggleClass(this.content.element, this.disabledClass, this.isDisabled);
4857
+ ViewUtil.toggleClass(this.content.element.nativeElement.parentElement, this.disabledClass, this.isDisabled);
4858
+ }
4859
+ commitIsShakingProperties() {
4860
+ ViewUtil.toggleClasses(this.container, this.shakingClass, this.isShaking);
4861
+ }
4862
+ commitIsMinimizedProperties() {
4863
+ ViewUtil.toggleClass(this.container, this.minimizedClass, this.isMinimized);
4864
+ ViewUtil.toggleClass(this.content.element, this.minimizedClass, this.isMinimized);
4865
+ ViewUtil.toggleClass(this.content.element.nativeElement.parentElement, this.minimizedClass, this.isMinimized);
5193
4866
  }
5194
4867
  // --------------------------------------------------------------------------
5195
4868
  //
5196
- // Public Properties
4869
+ // Protected Properties
5197
4870
  //
5198
4871
  // --------------------------------------------------------------------------
5199
- get notification() {
5200
- return this._notification;
4872
+ get blinkClass() {
4873
+ return 'vi-blink';
5201
4874
  }
5202
- set notification(value) {
5203
- if (value === this._notification) {
5204
- return;
5205
- }
5206
- this._notification = value;
5207
- if (this._notification) {
5208
- this.commitNotificationProperties();
5209
- }
4875
+ get disabledClass() {
4876
+ return 'vi-disabled';
5210
4877
  }
5211
- set config(value) {
5212
- if (value === this._config) {
5213
- return;
5214
- }
5215
- this._config = value;
5216
- if (this._config) {
5217
- this.commitConfigProperties();
5218
- }
4878
+ get minimizedClass() {
4879
+ return 'vi-minimized';
5219
4880
  }
5220
- get config() {
5221
- return this._config;
4881
+ get shakingClass() {
4882
+ return 'shake-constant shake-horizontal';
5222
4883
  }
5223
4884
  }
5224
- INotificationContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: INotificationContent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
5225
- INotificationContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: INotificationContent, selector: "ng-component", inputs: { config: "config" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
5226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: INotificationContent, decorators: [{
5227
- type: Component,
5228
- args: [{ template: '' }]
5229
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { config: [{
5230
- type: Input
5231
- }] } });
4885
+ // --------------------------------------------------------------------------
4886
+ //
4887
+ // Static Properties
4888
+ //
4889
+ // --------------------------------------------------------------------------
4890
+ WindowBaseComponent.CLOSE_COMPONENT = WindowCloseElementComponent;
4891
+ WindowBaseComponent.RESIZE_COMPONENT = WindowResizeElementComponent;
4892
+ WindowBaseComponent.MINIMIZE_COMPONENT = WindowMinimizeElementComponent;
5232
4893
 
5233
- class NotificationQuestionBaseComponent extends INotificationContent {
4894
+ class WindowService extends Destroyable {
5234
4895
  // --------------------------------------------------------------------------
5235
4896
  //
5236
- // Protected Methods
4897
+ // Constructor
5237
4898
  //
5238
4899
  // --------------------------------------------------------------------------
5239
- commitConfigProperties() {
5240
- super.commitConfigProperties();
5241
- if (this.isInfo) {
5242
- ViewUtil.addClass(this.container, 'mouse-active');
5243
- }
5244
- this.data.closePromise.then(() => {
5245
- if (!this.isDestroyed) {
5246
- this.remove();
5247
- }
5248
- });
5249
- }
5250
- // --------------------------------------------------------------------------
5251
- //
5252
- // Event Handlers
5253
- //
5254
- // --------------------------------------------------------------------------
5255
- clickHandler() {
5256
- if (this.isInfo) {
5257
- this.data.closeClickHandler();
5258
- }
4900
+ constructor(dialog, language, cookies) {
4901
+ super();
4902
+ this.isNeedCheckPositionAfterOpen = true;
4903
+ this.gapX = 25;
4904
+ this.gapY = 25;
4905
+ this.minWidth = 100;
4906
+ this.minHeight = 100;
4907
+ this.paddingTop = 25;
4908
+ this.paddingLeft = 25;
4909
+ this.paddingRight = 25;
4910
+ this.paddingBottom = 25;
4911
+ this.defaultVerticalAlign = WindowAlign.CENTER;
4912
+ this.defaultHorizontalAlign = WindowAlign.CENTER;
4913
+ this.topZIndex = 999;
4914
+ this._windows = new Map();
4915
+ this.dialog = dialog;
4916
+ this.language = language;
4917
+ this.observer = new Subject();
4918
+ this.properties = new PropertiesManager(cookies);
4919
+ this.defaultFactory = new WindowFactory(WindowBaseComponent);
4920
+ this.questionComponent = WindowQuestionComponent;
5259
4921
  }
5260
4922
  // --------------------------------------------------------------------------
5261
4923
  //
5262
- // Protected Properties
4924
+ // Protected Methods
5263
4925
  //
5264
4926
  // --------------------------------------------------------------------------
5265
- get isInfo() {
5266
- return this.data ? this.data.isInfo : false;
4927
+ getFactory(component, config) {
4928
+ return this.defaultFactory;
5267
4929
  }
5268
- }
5269
- NotificationQuestionBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationQuestionBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5270
- NotificationQuestionBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: NotificationQuestionBaseComponent, selector: "ng-component", host: { listeners: { "click": "clickHandler()" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
5271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationQuestionBaseComponent, decorators: [{
5272
- type: Component,
5273
- args: [{ template: '' }]
5274
- }], propDecorators: { clickHandler: [{
5275
- type: HostListener,
5276
- args: ['click']
5277
- }] } });
5278
-
5279
- class NotificationComponent extends NotificationQuestionBaseComponent {
5280
4930
  // --------------------------------------------------------------------------
5281
4931
  //
5282
- // Constructor
4932
+ // Private Methods
5283
4933
  //
5284
4934
  // --------------------------------------------------------------------------
5285
- constructor(container, language, notifications) {
5286
- super(container);
5287
- this.language = language;
5288
- this.notifications = notifications;
5289
- ViewUtil.addClasses(container.element, 'd-block');
5290
- ViewUtil.setAttribute(container.element, 'tabindex', '-1');
4935
+ sortFunction(first, second) {
4936
+ let firstIndex = first.container ? parseInt(ViewUtil.getStyle(first.container.parentElement, 'zIndex'), 10) : -1;
4937
+ let secondIndex = second.container ? parseInt(ViewUtil.getStyle(second.container.parentElement, 'zIndex'), 10) : -1;
4938
+ return firstIndex > secondIndex ? -1 : 1;
5291
4939
  }
5292
- // --------------------------------------------------------------------------
5293
- //
5294
- // Protected Methods
5295
- //
5296
- // --------------------------------------------------------------------------
5297
- commitConfigProperties() {
5298
- super.commitConfigProperties();
5299
- if (this.language.isHasTranslation(this.data.options.yesTextId)) {
5300
- this.data.yesText = this.language.translate(this.data.options.yesTextId);
5301
- }
5302
- if (this.language.isHasTranslation(this.data.options.notTextId)) {
5303
- this.data.notText = this.language.translate(this.data.options.notTextId);
4940
+ updateTop() {
4941
+ let zIndex = 0;
4942
+ let topWindow = null;
4943
+ for (let window of this.windowsArray) {
4944
+ if (_.isNil(window.container)) {
4945
+ continue;
4946
+ }
4947
+ let index = parseInt(ViewUtil.getStyle(window.container.parentElement, 'zIndex'), 10);
4948
+ if (zIndex >= index) {
4949
+ continue;
4950
+ }
4951
+ zIndex = index;
4952
+ topWindow = window;
5304
4953
  }
5305
- if (this.language.isHasTranslation(this.data.options.checkTextId)) {
5306
- this.data.checkText = this.language.translate(this.data.options.checkTextId);
4954
+ if (_.isNil(topWindow) || topWindow.isOnTop) {
4955
+ return;
5307
4956
  }
5308
- if (this.language.isHasTranslation(this.data.options.closeTextId)) {
5309
- this.data.closeText = this.language.translate(this.data.options.closeTextId);
4957
+ topWindow.isOnTop = true;
4958
+ this.observer.next(new ObservableData(WindowServiceEvent.SETTED_ON_TOP, topWindow));
4959
+ }
4960
+ setWindowOnTop(topWindow) {
4961
+ let currentIndex = this.topZIndex - 2;
4962
+ for (let window of this.windowsArray) {
4963
+ if (_.isNil(window.container)) {
4964
+ continue;
4965
+ }
4966
+ window.isOnTop = window === topWindow;
4967
+ let zIndex = window.isOnTop ? this.topZIndex : currentIndex--;
4968
+ ViewUtil.setStyle(window.backdrop, 'zIndex', zIndex);
4969
+ ViewUtil.setStyle(window.wrapper, 'zIndex', zIndex);
5310
4970
  }
4971
+ this.windowsArray.sort(this.sortFunction);
4972
+ this.observer.next(new ObservableData(WindowServiceEvent.SETTED_ON_TOP, topWindow));
5311
4973
  }
5312
- // --------------------------------------------------------------------------
5313
- //
5314
- // Public Methods
5315
- //
5316
- // --------------------------------------------------------------------------
5317
- remove() {
5318
- super.remove();
5319
- if (_.isNil(this.notification)) {
5320
- this.notifications.remove(this.config);
4974
+ checkPosition(item) {
4975
+ while (this.hasSamePosition(item)) {
4976
+ item.move(item.getX() + this.gapX, item.getY() + this.gapY);
5321
4977
  }
5322
4978
  }
5323
- }
5324
- NotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1$1.LanguageService }, { token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
5325
- NotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: NotificationComponent, selector: "vi-notification", usesInheritance: true, ngImport: i0, template: "<p class=\"text m-4 text-center mouse-inactive text-word-wrap-break-word\" [innerHTML]=\"data?.text\"></p>\n\n<div class=\"text-center border-sm-top p-3\" *ngIf=\"data?.isQuestion\">\n\n <button class=\"mr-3 me-3\" (click)=\"data?.yesClickHandler()\" tabindex=\"-1\" color=\"primary\" mat-stroked-button>\n <span [innerHTML]=\"data?.yesText\"></span>\n </button>\n\n <button (click)=\"data?.notClickHandler()\" tabindex=\"-1\" mat-stroked-button>\n <span [innerHTML]=\"data?.notText\"></span>\n </button>\n\n</div>", styles: [":host{max-width:280px;min-width:200px;box-sizing:border-box}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationComponent, decorators: [{
5327
- type: Component,
5328
- args: [{ selector: 'vi-notification', template: "<p class=\"text m-4 text-center mouse-inactive text-word-wrap-break-word\" [innerHTML]=\"data?.text\"></p>\n\n<div class=\"text-center border-sm-top p-3\" *ngIf=\"data?.isQuestion\">\n\n <button class=\"mr-3 me-3\" (click)=\"data?.yesClickHandler()\" tabindex=\"-1\" color=\"primary\" mat-stroked-button>\n <span [innerHTML]=\"data?.yesText\"></span>\n </button>\n\n <button (click)=\"data?.notClickHandler()\" tabindex=\"-1\" mat-stroked-button>\n <span [innerHTML]=\"data?.notText\"></span>\n </button>\n\n</div>", styles: [":host{max-width:280px;min-width:200px;box-sizing:border-box}\n"] }]
5329
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i1$1.LanguageService }, { type: NotificationService }]; } });
5330
-
5331
- class NotificationFactory {
5332
- // --------------------------------------------------------------------------
5333
- //
5334
- // Constructor
5335
- //
5336
- // --------------------------------------------------------------------------
5337
- constructor(classType) {
5338
- this.classType = classType;
4979
+ hasSamePosition(itemWindow) {
4980
+ let x = itemWindow.getX();
4981
+ let y = itemWindow.getY();
4982
+ let result = false;
4983
+ this.windowsArray.forEach(window => {
4984
+ if (window !== itemWindow && x === window.getX() && y === window.getY()) {
4985
+ result = true;
4986
+ }
4987
+ });
4988
+ return result;
5339
4989
  }
5340
4990
  // --------------------------------------------------------------------------
5341
4991
  //
5342
- // Public Methods
4992
+ // Setters Methods
5343
4993
  //
5344
4994
  // --------------------------------------------------------------------------
5345
- create(properties) {
5346
- return new this.classType(properties);
4995
+ add(config, content) {
4996
+ this._windows.set(config, content);
4997
+ this.observer.next(new ObservableData(WindowServiceEvent.OPENED, content.window));
5347
4998
  }
5348
- }
5349
-
5350
- const IMPORTS$3 = [CommonModule, FormsModule, MatDialogModule, MatButtonModule, LanguageModule];
5351
- const ENTRY_COMPONENTS$2 = [];
5352
- const DECLARATIONS$3 = [NotificationComponent, ...ENTRY_COMPONENTS$2];
5353
- const EXPORTS$2 = [...DECLARATIONS$3];
5354
- class NotificationModule {
5355
- // --------------------------------------------------------------------------
5356
- //
5357
- // Static Methods
5358
- //
5359
- // --------------------------------------------------------------------------
5360
- static forRoot() {
5361
- return {
5362
- ngModule: NotificationService,
5363
- providers: [
5364
- {
5365
- provide: NotificationService,
5366
- deps: [MatDialog, LanguageService],
5367
- useFactory: notificationServiceFactory
5368
- }
5369
- ]
5370
- };
4999
+ remove(config) {
5000
+ let window = this._windows.get(config);
5001
+ if (!window) {
5002
+ return null;
5003
+ }
5004
+ window.close();
5005
+ this._windows.delete(config);
5006
+ this.observer.next(new ObservableData(WindowServiceEvent.CLOSED, window.window));
5007
+ }
5008
+ getById(id) {
5009
+ let item = _.find(Array.from(this._windows.values()), item => item.config.id === id);
5010
+ return !_.isNil(item) ? item.window : null;
5011
+ }
5012
+ setDefaultProperties(config) {
5013
+ if (!config.verticalAlign) {
5014
+ config.verticalAlign = this.defaultVerticalAlign;
5015
+ }
5016
+ if (!config.horizontalAlign) {
5017
+ config.horizontalAlign = this.defaultHorizontalAlign;
5018
+ }
5019
+ if (_.isNaN(config.defaultMinWidth)) {
5020
+ config.defaultMinWidth = this.minWidth;
5021
+ }
5022
+ if (_.isNaN(config.defaultMinHeight)) {
5023
+ config.defaultMinHeight = this.minHeight;
5024
+ }
5025
+ if (_.isNaN(config.paddingTop)) {
5026
+ config.paddingTop = this.paddingTop;
5027
+ }
5028
+ if (_.isNaN(config.paddingLeft)) {
5029
+ config.paddingLeft = this.paddingLeft;
5030
+ }
5031
+ if (_.isNaN(config.paddingRight)) {
5032
+ config.paddingRight = this.paddingRight;
5033
+ }
5034
+ if (_.isNaN(config.paddingBottom)) {
5035
+ config.paddingBottom = this.paddingBottom;
5036
+ }
5037
+ if (config.propertiesId) {
5038
+ this.properties.load(config.propertiesId, config);
5039
+ }
5040
+ config.setDefaultProperties();
5371
5041
  }
5372
- }
5373
- NotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5374
- NotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, declarations: [NotificationComponent], imports: [CommonModule, FormsModule, MatDialogModule, MatButtonModule, LanguageModule], exports: [NotificationComponent] });
5375
- NotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, imports: [IMPORTS$3] });
5376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, decorators: [{
5377
- type: NgModule,
5378
- args: [{
5379
- imports: IMPORTS$3,
5380
- declarations: DECLARATIONS$3,
5381
- exports: EXPORTS$2
5382
- }]
5383
- }] });
5384
- function notificationServiceFactory(dialog, language) {
5385
- let item = new NotificationService(dialog, language);
5386
- item.factory = new NotificationFactory(NotificationBaseComponent);
5387
- item.questionComponent = NotificationComponent;
5388
- return item;
5389
- }
5390
-
5391
- class CamelCasePipe {
5392
- // --------------------------------------------------------------------------
5393
- //
5394
- // Constructor
5395
- //
5396
- // --------------------------------------------------------------------------
5397
- constructor() { }
5398
5042
  // --------------------------------------------------------------------------
5399
5043
  //
5400
5044
  // Public Methods
5401
5045
  //
5402
5046
  // --------------------------------------------------------------------------
5403
- transform(value) {
5404
- if (!value) {
5405
- return '---';
5047
+ open(component, config) {
5048
+ let window = null;
5049
+ if (config.id) {
5050
+ window = this.getById(config.id);
5051
+ if (window) {
5052
+ return window.content;
5053
+ }
5406
5054
  }
5407
- return _.camelCase(value);
5055
+ this.setDefaultProperties(config);
5056
+ // let dialog = this.dialog as any;
5057
+ // dialog._getOverlayState = config.isModal ? dialog.getOverlayStateModal : dialog.getOverlayStateNonModal;
5058
+ let reference = this.dialog.open(component, config);
5059
+ window = this.getFactory(component, config).create({ config, reference, overlay: reference._overlayRef });
5060
+ this.observer.next(new ObservableData(WindowServiceEvent.OPEN_STARTED, window));
5061
+ let subscription = window.events.subscribe(event => {
5062
+ switch (event) {
5063
+ case WindowEvent.OPENED:
5064
+ this.add(config, reference.componentInstance);
5065
+ this.setWindowOnTop(window);
5066
+ if (this.isNeedCheckPositionAfterOpen) {
5067
+ this.checkPosition(window);
5068
+ }
5069
+ this.observer.next(new ObservableData(WindowServiceEvent.OPEN_FINISHED, window));
5070
+ break;
5071
+ case WindowEvent.CLOSED:
5072
+ subscription.unsubscribe();
5073
+ this.remove(config);
5074
+ if (window.isOnTop && this.windows.size > 0) {
5075
+ this.updateTop();
5076
+ }
5077
+ break;
5078
+ case WindowEvent.RESIZED:
5079
+ if (!_.isNil(config.propertiesId)) {
5080
+ this.properties.save(config.propertiesId, window);
5081
+ }
5082
+ break;
5083
+ case WindowEvent.SET_ON_TOP:
5084
+ this.setWindowOnTop(window);
5085
+ break;
5086
+ }
5087
+ });
5088
+ return window.content;
5408
5089
  }
5409
- }
5410
- CamelCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CamelCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5411
- CamelCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CamelCasePipe, name: "viCamelCase" });
5412
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CamelCasePipe, decorators: [{
5413
- type: Pipe,
5414
- args: [{
5415
- name: 'viCamelCase'
5416
- }]
5417
- }], ctorParameters: function () { return []; } });
5418
-
5419
- class FinancePipe {
5420
- // --------------------------------------------------------------------------
5421
- //
5422
- // Static Methods
5423
- //
5424
- // --------------------------------------------------------------------------
5425
- static format(value, format) {
5426
- value = Number(value);
5427
- try {
5428
- return numeral(value).format(format);
5090
+ get(value) {
5091
+ let id = value.toString();
5092
+ if (value instanceof WindowConfig) {
5093
+ id = value.id;
5429
5094
  }
5430
- catch (error) {
5431
- return value.toString();
5095
+ if (!id) {
5096
+ return null;
5097
+ }
5098
+ let window = this.getById(id);
5099
+ if (_.isNil(window)) {
5100
+ return null;
5432
5101
  }
5102
+ return window.content;
5433
5103
  }
5434
- // --------------------------------------------------------------------------
5435
- //
5436
- // Public Methods
5437
- //
5438
- // --------------------------------------------------------------------------
5439
- transform(value, format, isNeedPlus = false) {
5440
- value = Number(value);
5441
- if (_.isNaN(value)) {
5442
- return '---';
5104
+ has(value) {
5105
+ return !_.isNil(this.get(value));
5106
+ }
5107
+ setOnTop(value) {
5108
+ let content = this.get(value);
5109
+ if (!content) {
5110
+ return false;
5443
5111
  }
5444
- if (_.isNil(format)) {
5445
- format = FinancePipe.DEFAULT_FORMAT;
5112
+ content.window.setOnTop();
5113
+ return true;
5114
+ }
5115
+ removeAll() {
5116
+ this.windowsArray.forEach(window => window.close());
5117
+ }
5118
+ destroy() {
5119
+ if (this.isDestroyed) {
5120
+ return;
5446
5121
  }
5447
- if (isNeedPlus) {
5448
- format = '+' + format;
5122
+ super.destroy();
5123
+ this.removeAll();
5124
+ if (!_.isNil(this.observer)) {
5125
+ this.observer.complete();
5126
+ this.observer = null;
5449
5127
  }
5450
- return FinancePipe.format(value, format);
5128
+ if (!_.isNil(this.properties)) {
5129
+ this.properties.destroy();
5130
+ this.properties = null;
5131
+ }
5132
+ this.defaultFactory = null;
5133
+ this.questionComponent = null;
5134
+ this.dialog = null;
5135
+ this.language = null;
5136
+ this._windows = null;
5451
5137
  }
5452
- }
5453
- // --------------------------------------------------------------------------
5454
- //
5455
- // Static Properties
5456
- //
5457
- // --------------------------------------------------------------------------
5458
- FinancePipe.DEFAULT_FORMAT = '0,0';
5459
- FinancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5460
- FinancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinancePipe, name: "viFinance" });
5461
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinancePipe, decorators: [{
5462
- type: Pipe,
5463
- args: [{
5464
- name: 'viFinance'
5465
- }]
5466
- }] });
5467
-
5468
- class MomentDatePipe {
5469
5138
  // --------------------------------------------------------------------------
5470
5139
  //
5471
- // Static Methods
5140
+ // Additional Methods
5472
5141
  //
5473
5142
  // --------------------------------------------------------------------------
5474
- static parseMoment(value, format) {
5475
- if (_.isDate(value)) {
5476
- return moment(value);
5477
- }
5478
- if (_.isString(value)) {
5479
- return moment(value, format);
5480
- }
5481
- if (_.isNumber(value)) {
5482
- return moment().milliseconds(value);
5483
- }
5484
- return value;
5485
- }
5486
- static fromNow(value, format = 'LLL') {
5487
- if (_.isNil(value)) {
5488
- return '---';
5489
- }
5490
- let item = MomentDatePipe.parseMoment(value);
5491
- let date = item.fromNow();
5492
- date = date.charAt(0).toUpperCase() + date.slice(1);
5493
- if (!_.isNil(format)) {
5494
- date += ' (' + item.format(format) + ')';
5495
- }
5496
- return date;
5143
+ info(translationId, translation, questionOptions, configOptions) {
5144
+ let text = this.language.translate(translationId, translation);
5145
+ let config = _.assign(new WindowConfig(true, false, 450), configOptions);
5146
+ config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.INFO, text }));
5147
+ return this.open(this.questionComponent, config).config.data;
5497
5148
  }
5498
- static toConditionValue(value) {
5499
- if (_.isNil(value)) {
5500
- return undefined;
5501
- }
5502
- value = value.toString();
5503
- let item = MomentDatePipe.parseMoment(RemoveFilterableCondition(value));
5504
- return item.isValid() ? `${GetFilterableCondition(value) || '='}${item.toDate().toString()}` : undefined;
5149
+ question(translationId, translation, questionOptions, configOptions) {
5150
+ let text = this.language.translate(translationId, translation);
5151
+ let config = _.assign(new WindowConfig(true, false, 450), configOptions);
5152
+ config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.QUESTION, text }));
5153
+ return this.open(this.questionComponent, config).config.data;
5505
5154
  }
5506
5155
  // --------------------------------------------------------------------------
5507
5156
  //
5508
- // Public Methods
5157
+ // Private Properties
5509
5158
  //
5510
5159
  // --------------------------------------------------------------------------
5511
- transform(value, format) {
5512
- if (_.isNil(value)) {
5513
- return '---';
5514
- }
5515
- let moment = MomentDatePipe.parseMoment(value);
5516
- return moment.format(format || MomentDatePipe.DEFAULT_FORMAT);
5160
+ get windowsArray() {
5161
+ return Array.from(this.windows.values()).map(item => item.window);
5517
5162
  }
5518
- }
5519
- // --------------------------------------------------------------------------
5520
- //
5521
- // Constants
5522
- //
5523
- // --------------------------------------------------------------------------
5524
- MomentDatePipe.DEFAULT_FORMAT = 'LLL';
5525
- MomentDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5526
- MomentDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDatePipe, name: "viMomentDate" });
5527
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDatePipe, decorators: [{
5528
- type: Pipe,
5529
- args: [{
5530
- name: 'viMomentDate'
5531
- }]
5532
- }] });
5533
-
5534
- class MomentDateAdaptivePipe {
5535
5163
  // --------------------------------------------------------------------------
5536
5164
  //
5537
- // Public Methods
5165
+ // Public Properties
5538
5166
  //
5539
5167
  // --------------------------------------------------------------------------
5540
- transform(value) {
5541
- if (_.isNaN(value)) {
5542
- return '---';
5543
- }
5544
- let item = MomentDatePipe.parseMoment(value);
5545
- let duration = moment.duration(moment().diff(item));
5546
- let format = null;
5547
- if (Math.abs(duration.asYears()) >= 1) {
5548
- format = MomentDateAdaptivePipe.YEAR_FORMAT;
5549
- }
5550
- else if (Math.abs(duration.asMonths()) >= 1) {
5551
- format = MomentDateAdaptivePipe.MONTH_FORMAT;
5552
- }
5553
- else if (Math.abs(duration.asDays()) >= 1) {
5554
- format = MomentDateAdaptivePipe.DAY_FORMAT;
5555
- }
5556
- else {
5557
- format = MomentDateAdaptivePipe.HOUR_FORMAT;
5558
- }
5559
- return item.format(format);
5168
+ get events() {
5169
+ return this.observer.asObservable();
5170
+ }
5171
+ get windows() {
5172
+ return this._windows;
5560
5173
  }
5561
5174
  }
5562
- // --------------------------------------------------------------------------
5563
- //
5564
- // Constants
5565
- //
5566
- // --------------------------------------------------------------------------
5567
- MomentDateAdaptivePipe.HOUR_FORMAT = 'HH:ss';
5568
- MomentDateAdaptivePipe.DAY_FORMAT = 'DD MMM HH:ss';
5569
- MomentDateAdaptivePipe.MONTH_FORMAT = 'DD MMM HH:ss';
5570
- MomentDateAdaptivePipe.YEAR_FORMAT = 'LLL';
5571
- MomentDateAdaptivePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateAdaptivePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5572
- MomentDateAdaptivePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateAdaptivePipe, name: "viMomentAdaptiveDate" });
5573
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateAdaptivePipe, decorators: [{
5574
- type: Pipe,
5575
- args: [{
5576
- name: 'viMomentAdaptiveDate'
5577
- }]
5578
- }] });
5579
-
5580
- class MomentDateFromNowPipe {
5175
+ WindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, deps: [{ token: i1.MatDialog }, { token: i1$1.LanguageService }, { token: CookieService }], target: i0.ɵɵFactoryTarget.Injectable });
5176
+ WindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, providedIn: 'root' });
5177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowService, decorators: [{
5178
+ type: Injectable,
5179
+ args: [{ providedIn: 'root' }]
5180
+ }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i1$1.LanguageService }, { type: CookieService }]; } });
5181
+ class PropertiesManager extends Destroyable {
5581
5182
  // --------------------------------------------------------------------------
5582
5183
  //
5583
- // Public Methods
5184
+ // Constructor
5584
5185
  //
5585
5186
  // --------------------------------------------------------------------------
5586
- transform(value, format) {
5587
- return MomentDatePipe.fromNow(value, format);
5187
+ constructor(cookies) {
5188
+ super();
5189
+ this.cookies = cookies;
5588
5190
  }
5589
- }
5590
- MomentDateFromNowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateFromNowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5591
- MomentDateFromNowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateFromNowPipe, name: "viMomentDateFromNow" });
5592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateFromNowPipe, decorators: [{
5593
- type: Pipe,
5594
- args: [{
5595
- name: 'viMomentDateFromNow'
5596
- }]
5597
- }] });
5598
-
5599
- class MomentTimePipe {
5600
5191
  // --------------------------------------------------------------------------
5601
5192
  //
5602
- // Public Methods
5193
+ // Public Methods
5603
5194
  //
5604
5195
  // --------------------------------------------------------------------------
5605
- transform(timeMilliseconds, format) {
5606
- if (_.isNil(timeMilliseconds)) {
5607
- return '---';
5196
+ load(name, config) {
5197
+ let item = this.cookies.getObject(name + 'Window');
5198
+ if (!item) {
5199
+ return;
5608
5200
  }
5609
- return moment()
5610
- .startOf('day')
5611
- .add(timeMilliseconds, 'milliseconds')
5612
- .format(format || MomentTimePipe.DEFAULT_FORMAT);
5201
+ if (item.hasOwnProperty('width')) {
5202
+ config.defaultWidth = item.width;
5203
+ }
5204
+ if (item.hasOwnProperty('height')) {
5205
+ config.defaultHeight = item.height;
5206
+ }
5207
+ }
5208
+ save(name, window) {
5209
+ this.cookies.putObject(name + 'Window', {
5210
+ width: window.getWidth(),
5211
+ height: window.getHeight()
5212
+ });
5213
+ }
5214
+ destroy() {
5215
+ if (this.isDestroyed) {
5216
+ return;
5217
+ }
5218
+ super.destroy();
5219
+ this.cookies = null;
5613
5220
  }
5614
5221
  }
5615
- // --------------------------------------------------------------------------
5616
- //
5617
- // Constants
5618
- //
5619
- // --------------------------------------------------------------------------
5620
- MomentTimePipe.DEFAULT_FORMAT = 'hh:mm:ss';
5621
- MomentTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5622
- MomentTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentTimePipe, name: "viMomentTime" });
5623
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentTimePipe, decorators: [{
5624
- type: Pipe,
5625
- args: [{
5626
- name: 'viMomentTime'
5627
- }]
5628
- }] });
5222
+ var WindowServiceEvent;
5223
+ (function (WindowServiceEvent) {
5224
+ WindowServiceEvent["OPEN_STARTED"] = "OPEN_STARTED";
5225
+ WindowServiceEvent["OPENED"] = "OPENED";
5226
+ WindowServiceEvent["OPEN_FINISHED"] = "OPEN_FINISHED";
5227
+ WindowServiceEvent["CLOSED"] = "CLOSED";
5228
+ WindowServiceEvent["SETTED_ON_TOP"] = "SETTED_ON_TOP";
5229
+ })(WindowServiceEvent || (WindowServiceEvent = {}));
5629
5230
 
5630
- class NgModelErrorPipe {
5231
+ class BottomSheetService extends Destroyable {
5631
5232
  // --------------------------------------------------------------------------
5632
5233
  //
5633
- // Constructor
5234
+ // Constructor
5634
5235
  //
5635
5236
  // --------------------------------------------------------------------------
5636
- constructor(language) {
5237
+ constructor(dialog, language) {
5238
+ super();
5239
+ this.dialog = dialog;
5637
5240
  this.language = language;
5241
+ this.observer = new Subject();
5242
+ this.defaultFactory = new WindowFactory(BottomSheetBaseComponent);
5243
+ this.questionComponent = WindowQuestionComponent;
5638
5244
  }
5639
5245
  // --------------------------------------------------------------------------
5640
5246
  //
5641
- // Public Methods
5247
+ // Protected Methods
5642
5248
  //
5643
5249
  // --------------------------------------------------------------------------
5644
- transform(value) {
5645
- if (_.isNil(value)) {
5646
- return null;
5250
+ getFactory(component, config) {
5251
+ return this.defaultFactory;
5252
+ }
5253
+ // --------------------------------------------------------------------------
5254
+ //
5255
+ // Public Methods
5256
+ //
5257
+ // --------------------------------------------------------------------------
5258
+ open(component, config) {
5259
+ let reference = this.dialog.open(component, config);
5260
+ let window = this.getFactory(component, config).create({ config, reference: reference, overlay: reference._overlayRef });
5261
+ this.observer.next(new ObservableData(WindowServiceEvent.OPEN_STARTED, window));
5262
+ let subscription = window.events.subscribe(event => {
5263
+ switch (event) {
5264
+ case WindowServiceEvent.OPENED:
5265
+ this.observer.next(new ObservableData(WindowServiceEvent.OPENED, window));
5266
+ this.observer.next(new ObservableData(WindowServiceEvent.OPEN_FINISHED, window));
5267
+ break;
5268
+ case WindowServiceEvent.CLOSED:
5269
+ subscription.unsubscribe();
5270
+ this.observer.next(new ObservableData(WindowServiceEvent.CLOSED, window));
5271
+ break;
5272
+ }
5273
+ });
5274
+ return window.content;
5275
+ }
5276
+ removeAll() { }
5277
+ destroy() {
5278
+ if (this.isDestroyed) {
5279
+ return;
5647
5280
  }
5648
- let keys = _.keys(value);
5649
- if (_.isEmpty(keys)) {
5650
- return null;
5281
+ super.destroy();
5282
+ this.removeAll();
5283
+ if (!_.isNil(this.observer)) {
5284
+ this.observer.complete();
5285
+ this.observer = null;
5651
5286
  }
5652
- let key = keys[0];
5653
- return this.translateError(key, value[key]);
5287
+ this.defaultFactory = null;
5288
+ this.questionComponent = null;
5289
+ this.dialog = null;
5290
+ this.language = null;
5654
5291
  }
5655
- translateError(key, value) {
5656
- return this.language.translate('error.form.' + key, value);
5292
+ // --------------------------------------------------------------------------
5293
+ //
5294
+ // Additional Methods
5295
+ //
5296
+ // --------------------------------------------------------------------------
5297
+ info(translationId, translation, questionOptions, configOptions) {
5298
+ let text = this.language.translate(translationId, translation);
5299
+ let config = _.assign(new WindowConfig(true, false, 450), configOptions);
5300
+ config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.INFO, text }));
5301
+ return this.open(this.questionComponent, config).config.data;
5302
+ }
5303
+ question(translationId, translation, questionOptions, configOptions) {
5304
+ let text = this.language.translate(translationId, translation);
5305
+ let config = _.assign(new WindowConfig(true, false, 450), configOptions);
5306
+ config.data = new QuestionManager(_.assign(questionOptions, { mode: QuestionMode.QUESTION, text }));
5307
+ return this.open(this.questionComponent, config).config.data;
5657
5308
  }
5658
- }
5659
- NgModelErrorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgModelErrorPipe, deps: [{ token: i1$1.LanguageService }], target: i0.ɵɵFactoryTarget.Pipe });
5660
- NgModelErrorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgModelErrorPipe, name: "viNgModelError" });
5661
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgModelErrorPipe, decorators: [{
5662
- type: Pipe,
5663
- args: [{
5664
- name: 'viNgModelError'
5665
- }]
5666
- }], ctorParameters: function () { return [{ type: i1$1.LanguageService }]; } });
5667
-
5668
- class SanitizePipe {
5669
5309
  // --------------------------------------------------------------------------
5670
5310
  //
5671
- // Constructor
5311
+ // Public Properties
5672
5312
  //
5673
5313
  // --------------------------------------------------------------------------
5674
- constructor(sanitizer) {
5675
- this.sanitizer = sanitizer;
5314
+ get events() {
5315
+ return this.observer.asObservable();
5676
5316
  }
5317
+ }
5318
+ BottomSheetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetService, deps: [{ token: i1$2.MatBottomSheet }, { token: i1$1.LanguageService }], target: i0.ɵɵFactoryTarget.Injectable });
5319
+ BottomSheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetService, providedIn: 'root' });
5320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetService, decorators: [{
5321
+ type: Injectable,
5322
+ args: [{ providedIn: 'root' }]
5323
+ }], ctorParameters: function () { return [{ type: i1$2.MatBottomSheet }, { type: i1$1.LanguageService }]; } });
5324
+
5325
+ const IMPORTS$4 = [CommonModule, FormsModule, MatBottomSheetModule, MatButtonModule, LanguageModule];
5326
+ const ENTRY_COMPONENTS$3 = [BottomSheetCloseElementComponent];
5327
+ const DECLARATIONS$4 = [...ENTRY_COMPONENTS$3];
5328
+ const EXPORTS$3 = [...DECLARATIONS$4];
5329
+ class BottomSheetModule {
5677
5330
  // --------------------------------------------------------------------------
5678
5331
  //
5679
- // Public Methods
5332
+ // Static Methods
5680
5333
  //
5681
5334
  // --------------------------------------------------------------------------
5682
- transform(value, type = 'html') {
5683
- if (_.isNil(value)) {
5684
- return null;
5685
- }
5686
- switch (type) {
5687
- case 'html':
5688
- return this.sanitizer.bypassSecurityTrustHtml(value);
5689
- case 'style':
5690
- return this.sanitizer.bypassSecurityTrustStyle(value);
5691
- case 'script':
5692
- return this.sanitizer.bypassSecurityTrustScript(value);
5693
- case 'url':
5694
- return this.sanitizer.bypassSecurityTrustUrl(value);
5695
- case 'resourceUrl':
5696
- return this.sanitizer.bypassSecurityTrustResourceUrl(value);
5697
- default:
5698
- throw new Error('Invalid safe type specified: ' + type);
5699
- }
5335
+ static forRoot() {
5336
+ return {
5337
+ ngModule: BottomSheetModule,
5338
+ providers: [
5339
+ BottomSheetService
5340
+ /*
5341
+ {
5342
+ provide: BottomSheetService,
5343
+ deps: [MatBottomSheet, LanguageService],
5344
+ useClass: BottomSheetService
5345
+ }
5346
+ */
5347
+ ]
5348
+ };
5700
5349
  }
5701
5350
  }
5702
- SanitizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SanitizePipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
5703
- SanitizePipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SanitizePipe, name: "viSanitize" });
5704
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SanitizePipe, decorators: [{
5705
- type: Pipe,
5351
+ BottomSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5352
+ BottomSheetModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, declarations: [BottomSheetCloseElementComponent], imports: [CommonModule, FormsModule, MatBottomSheetModule, MatButtonModule, LanguageModule], exports: [BottomSheetCloseElementComponent] });
5353
+ BottomSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, imports: [IMPORTS$4] });
5354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BottomSheetModule, decorators: [{
5355
+ type: NgModule,
5706
5356
  args: [{
5707
- name: 'viSanitize'
5357
+ imports: IMPORTS$4,
5358
+ declarations: DECLARATIONS$4,
5359
+ exports: EXPORTS$3
5708
5360
  }]
5709
- }], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; } });
5361
+ }] });
5710
5362
 
5711
- class StartCasePipe {
5363
+ class NotificationImpl extends WindowBase {
5712
5364
  // --------------------------------------------------------------------------
5713
5365
  //
5714
- // Public Methods
5366
+ // Constructor
5715
5367
  //
5716
5368
  // --------------------------------------------------------------------------
5717
- transform(value) {
5718
- if (!value) {
5719
- return '---';
5720
- }
5721
- return value.charAt(0).toUpperCase() + value.slice(1);
5369
+ constructor(properties) {
5370
+ super();
5371
+ this.setClosed = () => {
5372
+ this.emit(WindowEvent.CLOSED);
5373
+ this.destroy();
5374
+ };
5375
+ this.setOpened = () => {
5376
+ this.emit(WindowEvent.OPENED);
5377
+ };
5378
+ this.observer = new Subject();
5379
+ this.properties = properties;
5380
+ this.content.notification = this;
5381
+ // Have to save for unsubscribe on destroy
5382
+ this._container = this.properties.overlay.overlayElement;
5383
+ this.setProperties();
5384
+ this.getReference().afterOpened().pipe(takeUntil$1(this.destroyed)).subscribe(this.setOpened);
5385
+ this.getReference().afterClosed().pipe(takeUntil$1(this.destroyed)).subscribe(this.setClosed);
5386
+ this.observer
5387
+ .pipe(filter$1(event => event === WindowEvent.CONTENT_READY), takeUntil$1(this.destroyed))
5388
+ .subscribe(this.updatePosition);
5722
5389
  }
5723
- }
5724
- StartCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StartCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5725
- StartCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StartCasePipe, name: "viStartCase" });
5726
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StartCasePipe, decorators: [{
5727
- type: Pipe,
5728
- args: [{
5729
- name: 'viStartCase'
5730
- }]
5731
- }] });
5732
-
5733
- class TimePipe {
5734
5390
  // --------------------------------------------------------------------------
5735
5391
  //
5736
- // Public Methods
5392
+ // Protected Methods
5737
5393
  //
5738
5394
  // --------------------------------------------------------------------------
5739
- transform(milliseconds, format) {
5740
- milliseconds = Number(milliseconds);
5741
- if (_.isNaN(milliseconds)) {
5742
- return '---';
5395
+ setProperties() {
5396
+ super.setProperties();
5397
+ ViewUtil.addClass(this.container, 'vi-notification');
5398
+ }
5399
+ getConfig() {
5400
+ return this.properties.config;
5401
+ }
5402
+ getContainer() {
5403
+ return this.container;
5404
+ }
5405
+ getReference() {
5406
+ return this.properties.reference;
5407
+ }
5408
+ // --------------------------------------------------------------------------
5409
+ //
5410
+ // Public Methods
5411
+ //
5412
+ // --------------------------------------------------------------------------
5413
+ emit(event) {
5414
+ this.observer.next(event);
5415
+ }
5416
+ close() {
5417
+ this.getReference().close();
5418
+ }
5419
+ remove() {
5420
+ this.close();
5421
+ this.observer.next(NotificationEvent.REMOVED);
5422
+ }
5423
+ destroy() {
5424
+ if (this.isDestroyed) {
5425
+ return;
5743
5426
  }
5744
- if (_.isNil(format)) {
5745
- format = TimePipe.DEFAULT_FORMAT;
5427
+ super.destroy();
5428
+ if (!_.isNil(this.observer)) {
5429
+ this.observer.complete();
5430
+ this.observer = null;
5746
5431
  }
5747
- return FinancePipe.format(milliseconds / DateUtil.MILISECONDS_SECOND, format);
5432
+ this.properties = null;
5433
+ this._container = null;
5748
5434
  }
5749
- }
5750
- // --------------------------------------------------------------------------
5751
- //
5752
- // Static Properties
5753
- //
5754
- // --------------------------------------------------------------------------
5755
- TimePipe.DEFAULT_FORMAT = '00:00:00';
5756
- TimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5757
- TimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TimePipe, name: "viTime" });
5758
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TimePipe, decorators: [{
5759
- type: Pipe,
5760
- args: [{
5761
- name: 'viTime'
5762
- }]
5763
- }] });
5764
-
5765
- class TruncatePipe {
5766
5435
  // --------------------------------------------------------------------------
5767
5436
  //
5768
- // Public Methods
5437
+ // Size Methods
5769
5438
  //
5770
5439
  // --------------------------------------------------------------------------
5771
- transform(value, maxLength) {
5772
- if (!value) {
5773
- return '---';
5774
- }
5775
- return _.truncate(value, { length: maxLength });
5440
+ getWidth() {
5441
+ return this.calculateWidth();
5442
+ }
5443
+ getHeight() {
5444
+ return this.calculateHeight();
5445
+ }
5446
+ setWidth(value) {
5447
+ this.width = value;
5448
+ }
5449
+ setHeight(value) {
5450
+ this.height = value;
5451
+ }
5452
+ setSize(width, height) {
5453
+ this.setWidth(width);
5454
+ this.setHeight(height);
5776
5455
  }
5777
- }
5778
- TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5779
- TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TruncatePipe, name: "viTruncate" });
5780
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TruncatePipe, decorators: [{
5781
- type: Pipe,
5782
- args: [{
5783
- name: 'viTruncate'
5784
- }]
5785
- }] });
5786
-
5787
- class PrettifyPipe {
5788
5456
  // --------------------------------------------------------------------------
5789
5457
  //
5790
- // Constructor
5458
+ // Move Methods
5791
5459
  //
5792
5460
  // --------------------------------------------------------------------------
5793
- constructor() { }
5461
+ getX() {
5462
+ return this.x;
5463
+ }
5464
+ setX(value) {
5465
+ this.x = value;
5466
+ }
5467
+ getY() {
5468
+ return this.y;
5469
+ }
5470
+ setY(value) {
5471
+ this.y = value;
5472
+ }
5473
+ move(x, y) {
5474
+ this.setX(x);
5475
+ this.setY(y);
5476
+ }
5794
5477
  // --------------------------------------------------------------------------
5795
5478
  //
5796
- // Public Methods
5479
+ // Public Properties
5797
5480
  //
5798
5481
  // --------------------------------------------------------------------------
5799
- transform(value) {
5800
- let isNil = _.isNil(value);
5801
- if (!isNil && !_.isNumber(value)) {
5802
- isNil = _.isEmpty(value);
5803
- }
5804
- return !isNil ? value : PrettifyPipe.EMPTY_SYMBOL;
5482
+ get events() {
5483
+ return this.observer.asObservable();
5484
+ }
5485
+ get config() {
5486
+ return this.properties.config;
5487
+ }
5488
+ get content() {
5489
+ return this.properties.reference ? this.properties.reference.componentInstance : null;
5490
+ }
5491
+ get container() {
5492
+ return this._container;
5805
5493
  }
5806
5494
  }
5807
- // --------------------------------------------------------------------------
5808
- //
5809
- // Static Properties
5810
- //
5811
- // --------------------------------------------------------------------------
5812
- PrettifyPipe.EMPTY_SYMBOL = '-';
5813
- PrettifyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PrettifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5814
- PrettifyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PrettifyPipe, name: "viPrettify" });
5815
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PrettifyPipe, decorators: [{
5816
- type: Pipe,
5817
- args: [{
5818
- name: 'viPrettify'
5819
- }]
5820
- }], ctorParameters: function () { return []; } });
5821
5495
 
5822
- class ThemeAssetDirective extends Destroyable {
5496
+ class NotificationBaseComponent extends NotificationImpl {
5497
+ }
5498
+
5499
+ class INotificationContent extends DestroyableContainer {
5823
5500
  // --------------------------------------------------------------------------
5824
5501
  //
5825
- // Constructor
5502
+ // Constructor
5826
5503
  //
5827
5504
  // --------------------------------------------------------------------------
5828
- constructor(element, theme, themeAsset) {
5505
+ constructor(container) {
5829
5506
  super();
5830
- this.theme = theme;
5831
- this.themeAsset = themeAsset;
5832
- this._extension = 'png';
5833
- this._isFile = false;
5834
- this._isImage = false;
5835
- this._isVideo = false;
5836
- this._isSound = false;
5837
- this._isBackground = false;
5838
- this._isIgnoreTheme = true;
5839
- this.element = ViewUtil.parseElement(element.nativeElement);
5840
- this.theme.changed.pipe(takeUntil(this.destroyed)).subscribe(() => {
5841
- this.isTriedThemeDefault = false;
5842
- this.setSourceProperties();
5843
- });
5507
+ this.container = container;
5508
+ this.timerHandler = () => this.handleCloseClick();
5844
5509
  }
5845
5510
  // --------------------------------------------------------------------------
5846
5511
  //
5847
- // Private Methods
5512
+ // Private Methods
5848
5513
  //
5849
5514
  // --------------------------------------------------------------------------
5850
- getSource(id) {
5851
- if (_.isNil(id)) {
5852
- return null;
5853
- }
5854
- if (this.isImage) {
5855
- return this.themeAsset.getImage(id, this.extension, this.isIgnoreTheme);
5856
- }
5857
- if (this.isBackground) {
5858
- return this.themeAsset.getBackground(id, this.extension, this.isIgnoreTheme);
5859
- }
5860
- if (this.isSound) {
5861
- return this.themeAsset.getSound(id, this.extension, this.isIgnoreTheme);
5862
- }
5863
- if (this.isVideo) {
5864
- return this.themeAsset.getVideo(id, this.extension, this.isIgnoreTheme);
5515
+ commitNotificationProperties() {
5516
+ this.config = this.notification.config;
5517
+ }
5518
+ commitConfigProperties() {
5519
+ this.clearTimer();
5520
+ if (this.config.closeDuration > 0) {
5521
+ this.timer = setTimeout(this.timerHandler, this.config.closeDuration);
5865
5522
  }
5866
- if (this.isFile) {
5867
- return this.themeAsset.getFile(id, this.extension, this.isIgnoreTheme);
5523
+ }
5524
+ clearTimer() {
5525
+ if (!_.isNil(this.timer)) {
5526
+ clearTimeout(this.timer);
5527
+ this.timer = null;
5868
5528
  }
5869
- return this.themeAsset.getIcon(id, this.extension, this.isIgnoreTheme);
5870
5529
  }
5871
5530
  // --------------------------------------------------------------------------
5872
5531
  //
5873
- // Event Handlers
5532
+ // Public Methods
5874
5533
  //
5875
5534
  // --------------------------------------------------------------------------
5876
- errorLoadingHandler(event) {
5877
- this.errorHandler(event);
5535
+ close() {
5536
+ if (!_.isNil(this.notification)) {
5537
+ this.notification.close();
5538
+ }
5878
5539
  }
5879
- errorHandler(event) {
5880
- if (this.isTriedThemeDefault) {
5540
+ remove() {
5541
+ if (!_.isNil(this.notification)) {
5542
+ this.notification.remove();
5543
+ }
5544
+ }
5545
+ emit(event) {
5546
+ if (!_.isNil(this.notification)) {
5547
+ this.notification.emit(event);
5548
+ }
5549
+ }
5550
+ destroy() {
5551
+ if (this.isDestroyed) {
5881
5552
  return;
5882
5553
  }
5883
- this.isTriedThemeDefault = true;
5884
- this.source = this.getSource(this.getDefaultSourceId());
5885
- this.commitSourceProperties();
5554
+ super.destroy();
5555
+ this.clearTimer();
5556
+ this.config = null;
5557
+ this.notification = null;
5886
5558
  }
5887
5559
  // --------------------------------------------------------------------------
5888
5560
  //
5889
- // Protected Methods
5561
+ // Event Handlers
5890
5562
  //
5891
5563
  // --------------------------------------------------------------------------
5892
- setSourceProperties() {
5893
- this.source = this.getSource(this.getSourceId(this.theme.theme));
5894
- this.commitSourceProperties();
5895
- }
5896
- getSourceId(theme) {
5897
- return !_.isNil(theme) ? this.name + _.capitalize(theme.name) : null;
5564
+ ngAfterViewInit() {
5565
+ this.emit(WindowEvent.CONTENT_READY);
5898
5566
  }
5899
- getDefaultSourceId() {
5900
- return this.themeAsset.getName(this.name, this.isIgnoreTheme);
5567
+ handleCloseClick() {
5568
+ this.clearTimer();
5569
+ if (!_.isNil(this.config) && this.config.isRemoveAfterClose) {
5570
+ this.remove();
5571
+ }
5572
+ else {
5573
+ this.close();
5574
+ }
5901
5575
  }
5902
5576
  // --------------------------------------------------------------------------
5903
5577
  //
5904
- // Public Methods
5578
+ // Proxy Public Properties
5905
5579
  //
5906
5580
  // --------------------------------------------------------------------------
5907
- destroy() {
5908
- if (this.isDestroyed) {
5909
- return;
5910
- }
5911
- super.destroy();
5912
- this.name = null;
5913
- this.theme = null;
5914
- this.element = null;
5581
+ get data() {
5582
+ return this.config ? this.config.data : null;
5583
+ }
5584
+ get events() {
5585
+ return this.notification ? this.notification.events : null;
5915
5586
  }
5916
5587
  // --------------------------------------------------------------------------
5917
5588
  //
5918
- // Public Properties
5589
+ // Public Properties
5919
5590
  //
5920
5591
  // --------------------------------------------------------------------------
5921
- set isSound(value) {
5922
- if (value === this._isSound) {
5923
- return;
5924
- }
5925
- this._isSound = value;
5926
- this.setSourceProperties();
5927
- }
5928
- get isSound() {
5929
- return this._isSound;
5592
+ get notification() {
5593
+ return this._notification;
5930
5594
  }
5931
- set isVideo(value) {
5932
- if (value === this._isVideo) {
5595
+ set notification(value) {
5596
+ if (value === this._notification) {
5933
5597
  return;
5934
5598
  }
5935
- this._isVideo = value;
5936
- this.setSourceProperties();
5937
- }
5938
- get isVideo() {
5939
- return this._isVideo;
5940
- }
5941
- set isFile(value) {
5942
- if (value === this._isFile) {
5943
- return;
5599
+ this._notification = value;
5600
+ if (this._notification) {
5601
+ this.commitNotificationProperties();
5944
5602
  }
5945
- this._isFile = value;
5946
- this.setSourceProperties();
5947
5603
  }
5948
- get isFile() {
5949
- return this._isFile;
5950
- }
5951
- set isImage(value) {
5952
- if (value === this._isImage) {
5604
+ set config(value) {
5605
+ if (value === this._config) {
5953
5606
  return;
5954
5607
  }
5955
- this._isImage = value;
5956
- this.setSourceProperties();
5608
+ this._config = value;
5609
+ if (this._config) {
5610
+ this.commitConfigProperties();
5611
+ }
5957
5612
  }
5958
- get isImage() {
5959
- return this._isImage;
5613
+ get config() {
5614
+ return this._config;
5960
5615
  }
5961
- set isBackground(value) {
5962
- if (value === this._isBackground) {
5963
- return;
5616
+ }
5617
+ INotificationContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: INotificationContent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
5618
+ INotificationContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: INotificationContent, selector: "ng-component", inputs: { config: "config" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
5619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: INotificationContent, decorators: [{
5620
+ type: Component,
5621
+ args: [{ template: '' }]
5622
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { config: [{
5623
+ type: Input
5624
+ }] } });
5625
+
5626
+ class NotificationQuestionBaseComponent extends INotificationContent {
5627
+ // --------------------------------------------------------------------------
5628
+ //
5629
+ // Protected Methods
5630
+ //
5631
+ // --------------------------------------------------------------------------
5632
+ commitConfigProperties() {
5633
+ super.commitConfigProperties();
5634
+ if (this.isInfo) {
5635
+ ViewUtil.addClass(this.container, 'mouse-active');
5964
5636
  }
5965
- this._isBackground = value;
5966
- this.setSourceProperties();
5967
- }
5968
- get isBackground() {
5969
- return this._isBackground;
5637
+ this.data.closePromise.then(() => {
5638
+ if (!this.isDestroyed) {
5639
+ this.remove();
5640
+ }
5641
+ });
5970
5642
  }
5971
- set isIgnoreTheme(value) {
5972
- if (value === this._isIgnoreTheme) {
5973
- return;
5643
+ // --------------------------------------------------------------------------
5644
+ //
5645
+ // Event Handlers
5646
+ //
5647
+ // --------------------------------------------------------------------------
5648
+ clickHandler() {
5649
+ if (this.isInfo) {
5650
+ this.data.closeClickHandler();
5974
5651
  }
5975
- this._isIgnoreTheme = value;
5976
- this.setSourceProperties();
5977
5652
  }
5978
- get isIgnoreTheme() {
5979
- return this._isIgnoreTheme;
5653
+ // --------------------------------------------------------------------------
5654
+ //
5655
+ // Protected Properties
5656
+ //
5657
+ // --------------------------------------------------------------------------
5658
+ get isInfo() {
5659
+ return this.data ? this.data.isInfo : false;
5980
5660
  }
5981
- get name() {
5982
- return this._name;
5661
+ }
5662
+ NotificationQuestionBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationQuestionBaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5663
+ NotificationQuestionBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: NotificationQuestionBaseComponent, selector: "ng-component", host: { listeners: { "click": "clickHandler()" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
5664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationQuestionBaseComponent, decorators: [{
5665
+ type: Component,
5666
+ args: [{ template: '' }]
5667
+ }], propDecorators: { clickHandler: [{
5668
+ type: HostListener,
5669
+ args: ['click']
5670
+ }] } });
5671
+
5672
+ class NotificationComponent extends NotificationQuestionBaseComponent {
5673
+ // --------------------------------------------------------------------------
5674
+ //
5675
+ // Constructor
5676
+ //
5677
+ // --------------------------------------------------------------------------
5678
+ constructor(container, language, notifications) {
5679
+ super(container);
5680
+ this.language = language;
5681
+ this.notifications = notifications;
5682
+ ViewUtil.addClasses(container.element, 'd-block');
5683
+ ViewUtil.setAttribute(container.element, 'tabindex', '-1');
5983
5684
  }
5984
- set name(value) {
5985
- if (value === this._name) {
5986
- return;
5685
+ // --------------------------------------------------------------------------
5686
+ //
5687
+ // Protected Methods
5688
+ //
5689
+ // --------------------------------------------------------------------------
5690
+ commitConfigProperties() {
5691
+ super.commitConfigProperties();
5692
+ if (this.language.isHasTranslation(this.data.options.yesTextId)) {
5693
+ this.data.yesText = this.language.translate(this.data.options.yesTextId);
5987
5694
  }
5988
- if (!_.isNil(this._name)) {
5989
- this.removeSourceProperties();
5695
+ if (this.language.isHasTranslation(this.data.options.notTextId)) {
5696
+ this.data.notText = this.language.translate(this.data.options.notTextId);
5990
5697
  }
5991
- this._name = value;
5992
- if (!_.isNil(value)) {
5993
- this.setSourceProperties();
5698
+ if (this.language.isHasTranslation(this.data.options.checkTextId)) {
5699
+ this.data.checkText = this.language.translate(this.data.options.checkTextId);
5994
5700
  }
5995
- }
5996
- get extension() {
5997
- return this._extension;
5998
- }
5999
- set extension(value) {
6000
- if (value === this._extension) {
6001
- return;
5701
+ if (this.language.isHasTranslation(this.data.options.closeTextId)) {
5702
+ this.data.closeText = this.language.translate(this.data.options.closeTextId);
6002
5703
  }
6003
- this._extension = value;
6004
- if (!_.isNil(value)) {
6005
- this.setSourceProperties();
5704
+ }
5705
+ // --------------------------------------------------------------------------
5706
+ //
5707
+ // Public Methods
5708
+ //
5709
+ // --------------------------------------------------------------------------
5710
+ remove() {
5711
+ super.remove();
5712
+ if (_.isNil(this.notification)) {
5713
+ this.notifications.remove(this.config);
6006
5714
  }
6007
5715
  }
6008
5716
  }
6009
- ThemeAssetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }, { token: i1$4.ThemeAssetService }], target: i0.ɵɵFactoryTarget.Directive });
6010
- ThemeAssetDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeAssetDirective, inputs: { isSound: "isSound", isVideo: "isVideo", isFile: "isFile", isImage: "isImage", isBackground: "isBackground", isIgnoreTheme: "isIgnoreTheme", name: "name", extension: "extension" }, host: { listeners: { "error": "errorLoadingHandler($event)" } }, usesInheritance: true, ngImport: i0 });
6011
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetDirective, decorators: [{
6012
- type: Directive
6013
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }, { type: i1$4.ThemeAssetService }]; }, propDecorators: { errorLoadingHandler: [{
6014
- type: HostListener,
6015
- args: ['error', ['$event']]
6016
- }], isSound: [{
6017
- type: Input
6018
- }], isVideo: [{
6019
- type: Input
6020
- }], isFile: [{
6021
- type: Input
6022
- }], isImage: [{
6023
- type: Input
6024
- }], isBackground: [{
6025
- type: Input
6026
- }], isIgnoreTheme: [{
6027
- type: Input
6028
- }], name: [{
6029
- type: Input
6030
- }], extension: [{
6031
- type: Input
6032
- }] } });
5717
+ NotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1$1.LanguageService }, { token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
5718
+ NotificationComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: NotificationComponent, selector: "vi-notification", usesInheritance: true, ngImport: i0, template: "<p class=\"text m-4 text-center mouse-inactive text-word-wrap-break-word\" [innerHTML]=\"data?.text\"></p>\n\n<div class=\"text-center border-sm-top p-3\" *ngIf=\"data?.isQuestion\">\n\n <button class=\"mr-3 me-3\" (click)=\"data?.yesClickHandler()\" tabindex=\"-1\" color=\"primary\" mat-stroked-button>\n <span [innerHTML]=\"data?.yesText\"></span>\n </button>\n\n <button (click)=\"data?.notClickHandler()\" tabindex=\"-1\" mat-stroked-button>\n <span [innerHTML]=\"data?.notText\"></span>\n </button>\n\n</div>", styles: [":host{max-width:280px;min-width:200px;box-sizing:border-box}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationComponent, decorators: [{
5720
+ type: Component,
5721
+ args: [{ selector: 'vi-notification', template: "<p class=\"text m-4 text-center mouse-inactive text-word-wrap-break-word\" [innerHTML]=\"data?.text\"></p>\n\n<div class=\"text-center border-sm-top p-3\" *ngIf=\"data?.isQuestion\">\n\n <button class=\"mr-3 me-3\" (click)=\"data?.yesClickHandler()\" tabindex=\"-1\" color=\"primary\" mat-stroked-button>\n <span [innerHTML]=\"data?.yesText\"></span>\n </button>\n\n <button (click)=\"data?.notClickHandler()\" tabindex=\"-1\" mat-stroked-button>\n <span [innerHTML]=\"data?.notText\"></span>\n </button>\n\n</div>", styles: [":host{max-width:280px;min-width:200px;box-sizing:border-box}\n"] }]
5722
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i1$1.LanguageService }, { type: NotificationService }]; } });
6033
5723
 
6034
- class ThemeAssetBackgroundDirective extends ThemeAssetDirective {
5724
+ class NotificationFactory {
6035
5725
  // --------------------------------------------------------------------------
6036
5726
  //
6037
- // Constructor
5727
+ // Constructor
6038
5728
  //
6039
5729
  // --------------------------------------------------------------------------
6040
- constructor(element, theme, themeAsset) {
6041
- super(element, theme, themeAsset);
5730
+ constructor(classType) {
5731
+ this.classType = classType;
6042
5732
  }
6043
5733
  // --------------------------------------------------------------------------
6044
5734
  //
6045
- // Private Methods
5735
+ // Public Methods
6046
5736
  //
6047
5737
  // --------------------------------------------------------------------------
6048
- commitSourceProperties() {
6049
- let value = 'url(' + this.source + ')';
6050
- ViewUtil.setStyle(this.element, 'backgroundImage', value);
5738
+ create(properties) {
5739
+ return new this.classType(properties);
6051
5740
  }
6052
- removeSourceProperties() {
6053
- ViewUtil.removeStyle(this.element, 'backgroundImage');
5741
+ }
5742
+
5743
+ const IMPORTS$3 = [CommonModule, FormsModule, MatDialogModule, MatButtonModule, LanguageModule];
5744
+ const ENTRY_COMPONENTS$2 = [];
5745
+ const DECLARATIONS$3 = [NotificationComponent, ...ENTRY_COMPONENTS$2];
5746
+ const EXPORTS$2 = [...DECLARATIONS$3];
5747
+ class NotificationModule {
5748
+ // --------------------------------------------------------------------------
5749
+ //
5750
+ // Static Methods
5751
+ //
5752
+ // --------------------------------------------------------------------------
5753
+ static forRoot() {
5754
+ return {
5755
+ ngModule: NotificationService,
5756
+ providers: [
5757
+ {
5758
+ provide: NotificationService,
5759
+ deps: [MatDialog, LanguageService],
5760
+ useFactory: notificationServiceFactory
5761
+ }
5762
+ ]
5763
+ };
6054
5764
  }
6055
5765
  }
6056
- ThemeAssetBackgroundDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetBackgroundDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }, { token: i1$4.ThemeAssetService }], target: i0.ɵɵFactoryTarget.Directive });
6057
- ThemeAssetBackgroundDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeAssetBackgroundDirective, selector: "[vi-theme-background]", usesInheritance: true, ngImport: i0 });
6058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetBackgroundDirective, decorators: [{
6059
- type: Directive,
5766
+ NotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5767
+ NotificationModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, declarations: [NotificationComponent], imports: [CommonModule, FormsModule, MatDialogModule, MatButtonModule, LanguageModule], exports: [NotificationComponent] });
5768
+ NotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, imports: [IMPORTS$3] });
5769
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationModule, decorators: [{
5770
+ type: NgModule,
6060
5771
  args: [{
6061
- selector: '[vi-theme-background]'
5772
+ imports: IMPORTS$3,
5773
+ declarations: DECLARATIONS$3,
5774
+ exports: EXPORTS$2
6062
5775
  }]
6063
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }, { type: i1$4.ThemeAssetService }]; } });
5776
+ }] });
5777
+ function notificationServiceFactory(dialog, language) {
5778
+ let item = new NotificationService(dialog, language);
5779
+ item.factory = new NotificationFactory(NotificationBaseComponent);
5780
+ item.questionComponent = NotificationComponent;
5781
+ return item;
5782
+ }
6064
5783
 
6065
- class ThemeAssetImageDirective extends ThemeAssetDirective {
5784
+ class CamelCasePipe {
6066
5785
  // --------------------------------------------------------------------------
6067
5786
  //
6068
5787
  // Constructor
6069
5788
  //
6070
5789
  // --------------------------------------------------------------------------
6071
- constructor(element, theme, themeAsset) {
6072
- super(element, theme, themeAsset);
5790
+ constructor() { }
5791
+ // --------------------------------------------------------------------------
5792
+ //
5793
+ // Public Methods
5794
+ //
5795
+ // --------------------------------------------------------------------------
5796
+ transform(value) {
5797
+ if (!value) {
5798
+ return '---';
5799
+ }
5800
+ return _.camelCase(value);
6073
5801
  }
5802
+ }
5803
+ CamelCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CamelCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5804
+ CamelCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CamelCasePipe, name: "viCamelCase" });
5805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CamelCasePipe, decorators: [{
5806
+ type: Pipe,
5807
+ args: [{
5808
+ name: 'viCamelCase'
5809
+ }]
5810
+ }], ctorParameters: function () { return []; } });
5811
+
5812
+ class FinancePipe {
6074
5813
  // --------------------------------------------------------------------------
6075
5814
  //
6076
- // Private Methods
5815
+ // Static Methods
6077
5816
  //
6078
5817
  // --------------------------------------------------------------------------
6079
- commitSourceProperties() {
6080
- this.element.src = this.source;
5818
+ static format(value, format) {
5819
+ value = Number(value);
5820
+ try {
5821
+ return numeral(value).format(format);
5822
+ }
5823
+ catch (error) {
5824
+ return value.toString();
5825
+ }
6081
5826
  }
6082
- removeSourceProperties() {
6083
- this.element.src = null;
5827
+ // --------------------------------------------------------------------------
5828
+ //
5829
+ // Public Methods
5830
+ //
5831
+ // --------------------------------------------------------------------------
5832
+ transform(value, format, isNeedPlus = false) {
5833
+ value = Number(value);
5834
+ if (_.isNaN(value)) {
5835
+ return '---';
5836
+ }
5837
+ if (_.isNil(format)) {
5838
+ format = FinancePipe.DEFAULT_FORMAT;
5839
+ }
5840
+ if (isNeedPlus) {
5841
+ format = '+' + format;
5842
+ }
5843
+ return FinancePipe.format(value, format);
6084
5844
  }
6085
5845
  }
6086
- ThemeAssetImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetImageDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }, { token: i1$4.ThemeAssetService }], target: i0.ɵɵFactoryTarget.Directive });
6087
- ThemeAssetImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeAssetImageDirective, selector: "[vi-theme-image]", usesInheritance: true, ngImport: i0 });
6088
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetImageDirective, decorators: [{
6089
- type: Directive,
5846
+ // --------------------------------------------------------------------------
5847
+ //
5848
+ // Static Properties
5849
+ //
5850
+ // --------------------------------------------------------------------------
5851
+ FinancePipe.DEFAULT_FORMAT = '0,0';
5852
+ FinancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5853
+ FinancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinancePipe, name: "viFinance" });
5854
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinancePipe, decorators: [{
5855
+ type: Pipe,
6090
5856
  args: [{
6091
- selector: '[vi-theme-image]'
5857
+ name: 'viFinance'
6092
5858
  }]
6093
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }, { type: i1$4.ThemeAssetService }]; } });
5859
+ }] });
6094
5860
 
6095
- class ThemeToggleDirective extends Destroyable {
5861
+ class MomentDatePipe {
6096
5862
  // --------------------------------------------------------------------------
6097
5863
  //
6098
- // Constructor
5864
+ // Static Methods
6099
5865
  //
6100
5866
  // --------------------------------------------------------------------------
6101
- constructor(theme) {
6102
- super();
6103
- this.theme = theme;
5867
+ static parseMoment(value, format) {
5868
+ if (_.isDate(value)) {
5869
+ return moment(value);
5870
+ }
5871
+ if (_.isString(value)) {
5872
+ return moment(value, format);
5873
+ }
5874
+ if (_.isNumber(value)) {
5875
+ return moment().milliseconds(value);
5876
+ }
5877
+ return value;
5878
+ }
5879
+ static fromNow(value, format = 'LLL') {
5880
+ if (_.isNil(value)) {
5881
+ return '---';
5882
+ }
5883
+ let item = MomentDatePipe.parseMoment(value);
5884
+ let date = item.fromNow();
5885
+ date = date.charAt(0).toUpperCase() + date.slice(1);
5886
+ if (!_.isNil(format)) {
5887
+ date += ' (' + item.format(format) + ')';
5888
+ }
5889
+ return date;
5890
+ }
5891
+ static toConditionValue(value) {
5892
+ if (_.isNil(value)) {
5893
+ return undefined;
5894
+ }
5895
+ value = value.toString();
5896
+ let item = MomentDatePipe.parseMoment(RemoveFilterableCondition(value));
5897
+ return item.isValid() ? `${GetFilterableCondition(value) || '='}${item.toDate().toString()}` : undefined;
6104
5898
  }
6105
5899
  // --------------------------------------------------------------------------
6106
5900
  //
6107
- // Event Handlers
5901
+ // Public Methods
6108
5902
  //
6109
5903
  // --------------------------------------------------------------------------
6110
- clickHandler(event) {
6111
- let themes = this.theme.themes.collection;
6112
- let length = themes.length;
6113
- if (length < 2) {
6114
- return;
6115
- }
6116
- let index = 0;
6117
- if (this.theme.theme) {
6118
- index = themes.indexOf(this.theme.theme);
6119
- if (index < length - 1) {
6120
- index++;
6121
- }
6122
- else {
6123
- index = 0;
6124
- }
5904
+ transform(value, format) {
5905
+ if (_.isNil(value)) {
5906
+ return '---';
6125
5907
  }
6126
- this.theme.theme = themes[index];
5908
+ let moment = MomentDatePipe.parseMoment(value);
5909
+ return moment.format(format || MomentDatePipe.DEFAULT_FORMAT);
6127
5910
  }
5911
+ }
5912
+ // --------------------------------------------------------------------------
5913
+ //
5914
+ // Constants
5915
+ //
5916
+ // --------------------------------------------------------------------------
5917
+ MomentDatePipe.DEFAULT_FORMAT = 'LLL';
5918
+ MomentDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5919
+ MomentDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDatePipe, name: "viMomentDate" });
5920
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDatePipe, decorators: [{
5921
+ type: Pipe,
5922
+ args: [{
5923
+ name: 'viMomentDate'
5924
+ }]
5925
+ }] });
5926
+
5927
+ class MomentDateAdaptivePipe {
6128
5928
  // --------------------------------------------------------------------------
6129
5929
  //
6130
5930
  // Public Methods
6131
5931
  //
6132
5932
  // --------------------------------------------------------------------------
6133
- destroy() {
6134
- if (this.isDestroyed) {
6135
- return;
5933
+ transform(value) {
5934
+ if (_.isNaN(value)) {
5935
+ return '---';
6136
5936
  }
6137
- super.destroy();
6138
- this.theme = null;
5937
+ let item = MomentDatePipe.parseMoment(value);
5938
+ let duration = moment.duration(moment().diff(item));
5939
+ let format = null;
5940
+ if (Math.abs(duration.asYears()) >= 1) {
5941
+ format = MomentDateAdaptivePipe.YEAR_FORMAT;
5942
+ }
5943
+ else if (Math.abs(duration.asMonths()) >= 1) {
5944
+ format = MomentDateAdaptivePipe.MONTH_FORMAT;
5945
+ }
5946
+ else if (Math.abs(duration.asDays()) >= 1) {
5947
+ format = MomentDateAdaptivePipe.DAY_FORMAT;
5948
+ }
5949
+ else {
5950
+ format = MomentDateAdaptivePipe.HOUR_FORMAT;
5951
+ }
5952
+ return item.format(format);
6139
5953
  }
6140
5954
  }
6141
- ThemeToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeToggleDirective, deps: [{ token: i1$4.ThemeService }], target: i0.ɵɵFactoryTarget.Directive });
6142
- ThemeToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeToggleDirective, selector: "[vi-theme-toggle]", host: { listeners: { "click": "clickHandler($event)" } }, usesInheritance: true, ngImport: i0 });
6143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeToggleDirective, decorators: [{
6144
- type: Directive,
5955
+ // --------------------------------------------------------------------------
5956
+ //
5957
+ // Constants
5958
+ //
5959
+ // --------------------------------------------------------------------------
5960
+ MomentDateAdaptivePipe.HOUR_FORMAT = 'HH:ss';
5961
+ MomentDateAdaptivePipe.DAY_FORMAT = 'DD MMM HH:ss';
5962
+ MomentDateAdaptivePipe.MONTH_FORMAT = 'DD MMM HH:ss';
5963
+ MomentDateAdaptivePipe.YEAR_FORMAT = 'LLL';
5964
+ MomentDateAdaptivePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateAdaptivePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5965
+ MomentDateAdaptivePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateAdaptivePipe, name: "viMomentAdaptiveDate" });
5966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateAdaptivePipe, decorators: [{
5967
+ type: Pipe,
6145
5968
  args: [{
6146
- selector: '[vi-theme-toggle]'
5969
+ name: 'viMomentAdaptiveDate'
6147
5970
  }]
6148
- }], ctorParameters: function () { return [{ type: i1$4.ThemeService }]; }, propDecorators: { clickHandler: [{
6149
- type: HostListener,
6150
- args: ['click', ['$event']]
6151
- }] } });
5971
+ }] });
6152
5972
 
6153
- class ThemeStyleDirective extends Destroyable {
5973
+ class MomentDateFromNowPipe {
6154
5974
  // --------------------------------------------------------------------------
6155
5975
  //
6156
- // Constructor
5976
+ // Public Methods
6157
5977
  //
6158
5978
  // --------------------------------------------------------------------------
6159
- constructor(element, theme) {
6160
- super();
6161
- this.theme = theme;
6162
- this.element = ViewUtil.parseElement(element.nativeElement);
6163
- this.theme.changed.pipe(takeUntil(this.destroyed)).subscribe(() => this.stylePropertiesAdd());
5979
+ transform(value, format) {
5980
+ return MomentDatePipe.fromNow(value, format);
6164
5981
  }
5982
+ }
5983
+ MomentDateFromNowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateFromNowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5984
+ MomentDateFromNowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateFromNowPipe, name: "viMomentDateFromNow" });
5985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentDateFromNowPipe, decorators: [{
5986
+ type: Pipe,
5987
+ args: [{
5988
+ name: 'viMomentDateFromNow'
5989
+ }]
5990
+ }] });
5991
+
5992
+ class MomentTimePipe {
6165
5993
  // --------------------------------------------------------------------------
6166
5994
  //
6167
- // Protected Methods
5995
+ // Public Methods
6168
5996
  //
6169
5997
  // --------------------------------------------------------------------------
6170
- commitStyleProperties(name, value) {
6171
- ViewUtil.setStyle(this.element, name, value, this.flags);
6172
- }
6173
- stylePropertiesCheck() {
6174
- if (this.isNeedStyleAdd()) {
6175
- this.stylePropertiesAdd();
6176
- }
6177
- else if (this.isNeedStyleRemove()) {
6178
- this.stylePropertiesRemove();
5998
+ transform(timeMilliseconds, format) {
5999
+ if (_.isNil(timeMilliseconds)) {
6000
+ return '---';
6179
6001
  }
6002
+ return moment()
6003
+ .startOf('day')
6004
+ .add(timeMilliseconds, 'milliseconds')
6005
+ .format(format || MomentTimePipe.DEFAULT_FORMAT);
6180
6006
  }
6181
- stylePropertiesRemove() {
6182
- ViewUtil.removeStyle(this.element, this.styleName);
6183
- }
6184
- stylePropertiesAdd() {
6185
- this.commitStyleProperties(this.styleName, this.theme.getStyle(this.key));
6186
- }
6187
- isNeedStyleAdd() {
6188
- return !_.isNil(this.theme.theme) && !_.isNil(this.styleName);
6189
- }
6190
- isNeedStyleRemove() {
6191
- return !_.isNil(this.styleName);
6192
- }
6007
+ }
6008
+ // --------------------------------------------------------------------------
6009
+ //
6010
+ // Constants
6011
+ //
6012
+ // --------------------------------------------------------------------------
6013
+ MomentTimePipe.DEFAULT_FORMAT = 'hh:mm:ss';
6014
+ MomentTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6015
+ MomentTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentTimePipe, name: "viMomentTime" });
6016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MomentTimePipe, decorators: [{
6017
+ type: Pipe,
6018
+ args: [{
6019
+ name: 'viMomentTime'
6020
+ }]
6021
+ }] });
6022
+
6023
+ class NgModelErrorPipe {
6193
6024
  // --------------------------------------------------------------------------
6194
6025
  //
6195
- // Public Methods
6026
+ // Constructor
6196
6027
  //
6197
6028
  // --------------------------------------------------------------------------
6198
- destroy() {
6199
- if (this.isDestroyed) {
6200
- return;
6201
- }
6202
- super.destroy();
6203
- this.key = null;
6204
- this.theme = null;
6205
- this.element = null;
6029
+ constructor(language) {
6030
+ this.language = language;
6206
6031
  }
6207
6032
  // --------------------------------------------------------------------------
6208
6033
  //
6209
- // Public Properties
6034
+ // Public Methods
6210
6035
  //
6211
6036
  // --------------------------------------------------------------------------
6212
- get flags() {
6213
- return this._flags;
6214
- }
6215
- set flags(value) {
6216
- if (value === this._flags) {
6217
- return;
6037
+ transform(value) {
6038
+ if (_.isNil(value)) {
6039
+ return null;
6218
6040
  }
6219
- this._flags = value;
6220
- this.stylePropertiesCheck();
6221
- }
6222
- get styleName() {
6223
- return this._styleName;
6224
- }
6225
- set styleName(value) {
6226
- if (value === this._styleName) {
6227
- return;
6041
+ let keys = _.keys(value);
6042
+ if (_.isEmpty(keys)) {
6043
+ return null;
6228
6044
  }
6229
- this._styleName = value;
6230
- this.stylePropertiesCheck();
6231
- }
6232
- get key() {
6233
- return this._key;
6045
+ let key = keys[0];
6046
+ return this.translateError(key, value[key]);
6234
6047
  }
6235
- set key(value) {
6236
- if (value === this._key) {
6237
- return;
6238
- }
6239
- this._key = value;
6240
- if (!_.isNil(value)) {
6241
- this.stylePropertiesCheck();
6242
- }
6048
+ translateError(key, value) {
6049
+ return this.language.translate('error.form.' + key, value);
6243
6050
  }
6244
6051
  }
6245
- ThemeStyleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }], target: i0.ɵɵFactoryTarget.Directive });
6246
- ThemeStyleDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeStyleDirective, selector: "[vi-theme-style]", inputs: { flags: "flags", styleName: "styleName", key: ["vi-theme-style", "key"] }, usesInheritance: true, ngImport: i0 });
6247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleDirective, decorators: [{
6248
- type: Directive,
6052
+ NgModelErrorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgModelErrorPipe, deps: [{ token: i1$1.LanguageService }], target: i0.ɵɵFactoryTarget.Pipe });
6053
+ NgModelErrorPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgModelErrorPipe, name: "viNgModelError" });
6054
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgModelErrorPipe, decorators: [{
6055
+ type: Pipe,
6249
6056
  args: [{
6250
- selector: '[vi-theme-style]'
6057
+ name: 'viNgModelError'
6251
6058
  }]
6252
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }]; }, propDecorators: { flags: [{
6253
- type: Input
6254
- }], styleName: [{
6255
- type: Input
6256
- }], key: [{
6257
- type: Input,
6258
- args: ['vi-theme-style']
6259
- }] } });
6059
+ }], ctorParameters: function () { return [{ type: i1$1.LanguageService }]; } });
6260
6060
 
6261
- class ThemeStyleHoverDirective extends ThemeStyleDirective {
6061
+ class SanitizePipe {
6262
6062
  // --------------------------------------------------------------------------
6263
6063
  //
6264
6064
  // Constructor
6265
6065
  //
6266
6066
  // --------------------------------------------------------------------------
6267
- constructor(element, theme) {
6268
- super(element, theme);
6269
- // --------------------------------------------------------------------------
6270
- //
6271
- // Properties
6272
- //
6273
- // --------------------------------------------------------------------------
6274
- this._isHover = false;
6275
- // --------------------------------------------------------------------------
6276
- //
6277
- // Event Handlers
6278
- //
6279
- // --------------------------------------------------------------------------
6280
- this.mouseEnter = (event) => {
6281
- this.isHover = true;
6282
- };
6283
- this.mouseLeave = (event) => {
6284
- this.isHover = false;
6285
- };
6286
- this.flags = RendererStyleFlags2.Important;
6287
- this.element.addEventListener('mouseenter', this.mouseEnter, false);
6288
- this.element.addEventListener('mouseleave', this.mouseLeave, false);
6067
+ constructor(sanitizer) {
6068
+ this.sanitizer = sanitizer;
6069
+ }
6070
+ // --------------------------------------------------------------------------
6071
+ //
6072
+ // Public Methods
6073
+ //
6074
+ // --------------------------------------------------------------------------
6075
+ transform(value, type = 'html') {
6076
+ if (_.isNil(value)) {
6077
+ return null;
6078
+ }
6079
+ switch (type) {
6080
+ case 'html':
6081
+ return this.sanitizer.bypassSecurityTrustHtml(value);
6082
+ case 'style':
6083
+ return this.sanitizer.bypassSecurityTrustStyle(value);
6084
+ case 'script':
6085
+ return this.sanitizer.bypassSecurityTrustScript(value);
6086
+ case 'url':
6087
+ return this.sanitizer.bypassSecurityTrustUrl(value);
6088
+ case 'resourceUrl':
6089
+ return this.sanitizer.bypassSecurityTrustResourceUrl(value);
6090
+ default:
6091
+ throw new Error('Invalid safe type specified: ' + type);
6092
+ }
6289
6093
  }
6094
+ }
6095
+ SanitizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SanitizePipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
6096
+ SanitizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SanitizePipe, name: "viSanitize" });
6097
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SanitizePipe, decorators: [{
6098
+ type: Pipe,
6099
+ args: [{
6100
+ name: 'viSanitize'
6101
+ }]
6102
+ }], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; } });
6103
+
6104
+ class StartCasePipe {
6290
6105
  // --------------------------------------------------------------------------
6291
6106
  //
6292
- // Protected Methods
6107
+ // Public Methods
6293
6108
  //
6294
6109
  // --------------------------------------------------------------------------
6295
- isNeedStyleAdd() {
6296
- return this.isHover && super.isNeedStyleAdd();
6297
- }
6298
- isNeedStyleRemove() {
6299
- return !this.isHover || super.isNeedStyleRemove();
6110
+ transform(value) {
6111
+ if (!value) {
6112
+ return '---';
6113
+ }
6114
+ return value.charAt(0).toUpperCase() + value.slice(1);
6300
6115
  }
6116
+ }
6117
+ StartCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StartCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6118
+ StartCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StartCasePipe, name: "viStartCase" });
6119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: StartCasePipe, decorators: [{
6120
+ type: Pipe,
6121
+ args: [{
6122
+ name: 'viStartCase'
6123
+ }]
6124
+ }] });
6125
+
6126
+ class TimePipe {
6301
6127
  // --------------------------------------------------------------------------
6302
6128
  //
6303
6129
  // Public Methods
6304
6130
  //
6305
6131
  // --------------------------------------------------------------------------
6306
- destroy() {
6307
- if (this.isDestroyed) {
6308
- return;
6132
+ transform(milliseconds, format) {
6133
+ milliseconds = Number(milliseconds);
6134
+ if (_.isNaN(milliseconds)) {
6135
+ return '---';
6309
6136
  }
6310
- this.element.removeEventListener('mouseenter', this.mouseEnter, false);
6311
- this.element.removeEventListener('mouseleave', this.mouseLeave, false);
6312
- super.destroy();
6137
+ if (_.isNil(format)) {
6138
+ format = TimePipe.DEFAULT_FORMAT;
6139
+ }
6140
+ return FinancePipe.format(milliseconds / DateUtil.MILISECONDS_SECOND, format);
6313
6141
  }
6142
+ }
6143
+ // --------------------------------------------------------------------------
6144
+ //
6145
+ // Static Properties
6146
+ //
6147
+ // --------------------------------------------------------------------------
6148
+ TimePipe.DEFAULT_FORMAT = '00:00:00';
6149
+ TimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6150
+ TimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TimePipe, name: "viTime" });
6151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TimePipe, decorators: [{
6152
+ type: Pipe,
6153
+ args: [{
6154
+ name: 'viTime'
6155
+ }]
6156
+ }] });
6157
+
6158
+ class TruncatePipe {
6314
6159
  // --------------------------------------------------------------------------
6315
6160
  //
6316
- // Public Properties
6161
+ // Public Methods
6317
6162
  //
6318
6163
  // --------------------------------------------------------------------------
6319
- get isHover() {
6320
- return this._isHover;
6321
- }
6322
- set isHover(value) {
6323
- if (value === this._isHover) {
6324
- return;
6164
+ transform(value, maxLength) {
6165
+ if (!value) {
6166
+ return '---';
6325
6167
  }
6326
- this._isHover = value;
6327
- this.stylePropertiesCheck();
6328
- }
6329
- get key() {
6330
- return super.key;
6331
- }
6332
- set key(value) {
6333
- super.key = value;
6334
- }
6335
- get styleName() {
6336
- return super.styleName;
6337
- }
6338
- set styleName(value) {
6339
- super.styleName = value;
6340
- }
6341
- get flags() {
6342
- return super.flags;
6343
- }
6344
- set flags(value) {
6345
- super.flags = value;
6168
+ return _.truncate(value, { length: maxLength });
6346
6169
  }
6347
6170
  }
6348
- ThemeStyleHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleHoverDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }], target: i0.ɵɵFactoryTarget.Directive });
6349
- ThemeStyleHoverDirectivedir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeStyleHoverDirective, selector: "[vi-theme-style-hover]", inputs: { key: ["vi-theme-style-hover", "key"], styleName: "styleName", flags: "flags" }, usesInheritance: true, ngImport: i0 });
6350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleHoverDirective, decorators: [{
6351
- type: Directive,
6171
+ TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6172
+ TruncatePipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TruncatePipe, name: "viTruncate" });
6173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TruncatePipe, decorators: [{
6174
+ type: Pipe,
6352
6175
  args: [{
6353
- selector: '[vi-theme-style-hover]'
6176
+ name: 'viTruncate'
6354
6177
  }]
6355
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }]; }, propDecorators: { key: [{
6356
- type: Input,
6357
- args: ['vi-theme-style-hover']
6358
- }], styleName: [{
6359
- type: Input
6360
- }], flags: [{
6361
- type: Input
6362
- }] } });
6178
+ }] });
6363
6179
 
6364
- let declarations = [ThemeToggleDirective, ThemeAssetImageDirective, ThemeAssetBackgroundDirective, ThemeStyleDirective, ThemeStyleHoverDirective];
6365
- class ThemeModule {
6180
+ class PrettifyPipe {
6366
6181
  // --------------------------------------------------------------------------
6367
6182
  //
6368
- // Static Methods
6183
+ // Constructor
6369
6184
  //
6370
6185
  // --------------------------------------------------------------------------
6371
- static forRoot(options) {
6372
- return {
6373
- ngModule: ThemeModule,
6374
- providers: [
6375
- {
6376
- provide: THEME_OPTIONS,
6377
- useValue: options || {}
6378
- },
6379
- {
6380
- provide: ThemeService,
6381
- deps: [CookieService, THEME_OPTIONS],
6382
- useFactory: themeServiceFactory
6383
- },
6384
- {
6385
- provide: ThemeAssetService,
6386
- deps: [ThemeService],
6387
- useFactory: themeAssetServiceFactory
6388
- }
6389
- ]
6390
- };
6186
+ constructor() { }
6187
+ // --------------------------------------------------------------------------
6188
+ //
6189
+ // Public Methods
6190
+ //
6191
+ // --------------------------------------------------------------------------
6192
+ transform(value) {
6193
+ let isNil = _.isNil(value);
6194
+ if (!isNil && !_.isNumber(value)) {
6195
+ isNil = _.isEmpty(value);
6196
+ }
6197
+ return !isNil ? value : PrettifyPipe.EMPTY_SYMBOL;
6391
6198
  }
6392
6199
  }
6393
- ThemeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6394
- ThemeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, declarations: [ThemeToggleDirective, ThemeAssetImageDirective, ThemeAssetBackgroundDirective, ThemeStyleDirective, ThemeStyleHoverDirective], imports: [CookieModule], exports: [ThemeToggleDirective, ThemeAssetImageDirective, ThemeAssetBackgroundDirective, ThemeStyleDirective, ThemeStyleHoverDirective] });
6395
- ThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, imports: [[CookieModule]] });
6396
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, decorators: [{
6397
- type: NgModule,
6200
+ // --------------------------------------------------------------------------
6201
+ //
6202
+ // Static Properties
6203
+ //
6204
+ // --------------------------------------------------------------------------
6205
+ PrettifyPipe.EMPTY_SYMBOL = '-';
6206
+ PrettifyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PrettifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6207
+ PrettifyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PrettifyPipe, name: "viPrettify" });
6208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PrettifyPipe, decorators: [{
6209
+ type: Pipe,
6398
6210
  args: [{
6399
- imports: [CookieModule],
6400
- declarations,
6401
- exports: declarations
6211
+ name: 'viPrettify'
6402
6212
  }]
6403
- }] });
6404
- function themeServiceFactory(cookie, options) {
6405
- if (!_.isNil(options) && _.isNil(options.service)) {
6406
- options.service = cookie;
6407
- }
6408
- return new ThemeService(options);
6409
- }
6410
- function themeAssetServiceFactory(theme) {
6411
- return new ThemeAssetService(theme);
6412
- }
6413
- const THEME_OPTIONS = new InjectionToken(`THEME_OPTIONS`);
6213
+ }], ctorParameters: function () { return []; } });
6414
6214
 
6415
- class WindowDragAreaDirective extends Destroyable {
6215
+ class ThemeAssetDirective extends Destroyable {
6416
6216
  // --------------------------------------------------------------------------
6417
6217
  //
6418
- // Constructor
6218
+ // Constructor
6419
6219
  //
6420
6220
  // --------------------------------------------------------------------------
6421
- constructor(element) {
6221
+ constructor(element, theme, themeAsset) {
6422
6222
  super();
6423
- this.element = element;
6424
- // --------------------------------------------------------------------------
6425
- //
6426
- // Event Handlers
6427
- //
6428
- // --------------------------------------------------------------------------
6429
- this.dragStartHandler = (event) => {
6430
- this._window.dragStartHandler(event);
6431
- };
6432
- this.dragMoveHandler = (event) => {
6433
- this._window.dragMoveHandler(event);
6434
- };
6223
+ this.theme = theme;
6224
+ this.themeAsset = themeAsset;
6225
+ this._extension = 'png';
6226
+ this._isFile = false;
6227
+ this._isImage = false;
6228
+ this._isVideo = false;
6229
+ this._isSound = false;
6230
+ this._isBackground = false;
6231
+ this._isIgnoreTheme = true;
6232
+ this.element = ViewUtil.parseElement(element.nativeElement);
6233
+ this.theme.changed.pipe(takeUntil(this.destroyed)).subscribe(() => {
6234
+ this.isTriedThemeDefault = false;
6235
+ this.setSourceProperties();
6236
+ });
6237
+ }
6238
+ // --------------------------------------------------------------------------
6239
+ //
6240
+ // Private Methods
6241
+ //
6242
+ // --------------------------------------------------------------------------
6243
+ getSource(id) {
6244
+ if (_.isNil(id)) {
6245
+ return null;
6246
+ }
6247
+ if (this.isImage) {
6248
+ return this.themeAsset.getImage(id, this.extension, this.isIgnoreTheme);
6249
+ }
6250
+ if (this.isBackground) {
6251
+ return this.themeAsset.getBackground(id, this.extension, this.isIgnoreTheme);
6252
+ }
6253
+ if (this.isSound) {
6254
+ return this.themeAsset.getSound(id, this.extension, this.isIgnoreTheme);
6255
+ }
6256
+ if (this.isVideo) {
6257
+ return this.themeAsset.getVideo(id, this.extension, this.isIgnoreTheme);
6258
+ }
6259
+ if (this.isFile) {
6260
+ return this.themeAsset.getFile(id, this.extension, this.isIgnoreTheme);
6261
+ }
6262
+ return this.themeAsset.getIcon(id, this.extension, this.isIgnoreTheme);
6263
+ }
6264
+ // --------------------------------------------------------------------------
6265
+ //
6266
+ // Event Handlers
6267
+ //
6268
+ // --------------------------------------------------------------------------
6269
+ errorLoadingHandler(event) {
6270
+ this.errorHandler(event);
6271
+ }
6272
+ errorHandler(event) {
6273
+ if (this.isTriedThemeDefault) {
6274
+ return;
6275
+ }
6276
+ this.isTriedThemeDefault = true;
6277
+ this.source = this.getSource(this.getDefaultSourceId());
6278
+ this.commitSourceProperties();
6435
6279
  }
6436
6280
  // --------------------------------------------------------------------------
6437
6281
  //
6438
- // Public Methods
6282
+ // Protected Methods
6283
+ //
6284
+ // --------------------------------------------------------------------------
6285
+ setSourceProperties() {
6286
+ this.source = this.getSource(this.getSourceId(this.theme.theme));
6287
+ this.commitSourceProperties();
6288
+ }
6289
+ getSourceId(theme) {
6290
+ return !_.isNil(theme) ? this.name + _.capitalize(theme.name) : null;
6291
+ }
6292
+ getDefaultSourceId() {
6293
+ return this.themeAsset.getName(this.name, this.isIgnoreTheme);
6294
+ }
6295
+ // --------------------------------------------------------------------------
6296
+ //
6297
+ // Public Methods
6439
6298
  //
6440
6299
  // --------------------------------------------------------------------------
6441
6300
  destroy() {
@@ -6443,368 +6302,529 @@ class WindowDragAreaDirective extends Destroyable {
6443
6302
  return;
6444
6303
  }
6445
6304
  super.destroy();
6446
- if (!_.isNil(this._interactable)) {
6447
- this._interactable.unset();
6448
- this._interactable = null;
6449
- }
6305
+ this.name = null;
6306
+ this.theme = null;
6450
6307
  this.element = null;
6451
6308
  }
6452
6309
  // --------------------------------------------------------------------------
6453
6310
  //
6454
- // Private Methods
6311
+ // Public Properties
6455
6312
  //
6456
6313
  // --------------------------------------------------------------------------
6457
- commitWindowProperties() {
6458
- if (!this.window.config || this.window.config.isModal) {
6314
+ set isSound(value) {
6315
+ if (value === this._isSound) {
6459
6316
  return;
6460
6317
  }
6461
- this.interactable.draggable(true);
6462
- this.interactable.on('dragmove', this.dragMoveHandler);
6463
- this.interactable.on('dragstart', this.dragStartHandler);
6318
+ this._isSound = value;
6319
+ this.setSourceProperties();
6320
+ }
6321
+ get isSound() {
6322
+ return this._isSound;
6323
+ }
6324
+ set isVideo(value) {
6325
+ if (value === this._isVideo) {
6326
+ return;
6327
+ }
6328
+ this._isVideo = value;
6329
+ this.setSourceProperties();
6330
+ }
6331
+ get isVideo() {
6332
+ return this._isVideo;
6333
+ }
6334
+ set isFile(value) {
6335
+ if (value === this._isFile) {
6336
+ return;
6337
+ }
6338
+ this._isFile = value;
6339
+ this.setSourceProperties();
6340
+ }
6341
+ get isFile() {
6342
+ return this._isFile;
6343
+ }
6344
+ set isImage(value) {
6345
+ if (value === this._isImage) {
6346
+ return;
6347
+ }
6348
+ this._isImage = value;
6349
+ this.setSourceProperties();
6350
+ }
6351
+ get isImage() {
6352
+ return this._isImage;
6353
+ }
6354
+ set isBackground(value) {
6355
+ if (value === this._isBackground) {
6356
+ return;
6357
+ }
6358
+ this._isBackground = value;
6359
+ this.setSourceProperties();
6360
+ }
6361
+ get isBackground() {
6362
+ return this._isBackground;
6363
+ }
6364
+ set isIgnoreTheme(value) {
6365
+ if (value === this._isIgnoreTheme) {
6366
+ return;
6367
+ }
6368
+ this._isIgnoreTheme = value;
6369
+ this.setSourceProperties();
6370
+ }
6371
+ get isIgnoreTheme() {
6372
+ return this._isIgnoreTheme;
6373
+ }
6374
+ get name() {
6375
+ return this._name;
6376
+ }
6377
+ set name(value) {
6378
+ if (value === this._name) {
6379
+ return;
6380
+ }
6381
+ if (!_.isNil(this._name)) {
6382
+ this.removeSourceProperties();
6383
+ }
6384
+ this._name = value;
6385
+ if (!_.isNil(value)) {
6386
+ this.setSourceProperties();
6387
+ }
6388
+ }
6389
+ get extension() {
6390
+ return this._extension;
6391
+ }
6392
+ set extension(value) {
6393
+ if (value === this._extension) {
6394
+ return;
6395
+ }
6396
+ this._extension = value;
6397
+ if (!_.isNil(value)) {
6398
+ this.setSourceProperties();
6399
+ }
6464
6400
  }
6401
+ }
6402
+ ThemeAssetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }, { token: i1$4.ThemeAssetService }], target: i0.ɵɵFactoryTarget.Directive });
6403
+ ThemeAssetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeAssetDirective, inputs: { isSound: "isSound", isVideo: "isVideo", isFile: "isFile", isImage: "isImage", isBackground: "isBackground", isIgnoreTheme: "isIgnoreTheme", name: "name", extension: "extension" }, host: { listeners: { "error": "errorLoadingHandler($event)" } }, usesInheritance: true, ngImport: i0 });
6404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetDirective, decorators: [{
6405
+ type: Directive
6406
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }, { type: i1$4.ThemeAssetService }]; }, propDecorators: { errorLoadingHandler: [{
6407
+ type: HostListener,
6408
+ args: ['error', ['$event']]
6409
+ }], isSound: [{
6410
+ type: Input
6411
+ }], isVideo: [{
6412
+ type: Input
6413
+ }], isFile: [{
6414
+ type: Input
6415
+ }], isImage: [{
6416
+ type: Input
6417
+ }], isBackground: [{
6418
+ type: Input
6419
+ }], isIgnoreTheme: [{
6420
+ type: Input
6421
+ }], name: [{
6422
+ type: Input
6423
+ }], extension: [{
6424
+ type: Input
6425
+ }] } });
6426
+
6427
+ class ThemeAssetBackgroundDirective extends ThemeAssetDirective {
6465
6428
  // --------------------------------------------------------------------------
6466
6429
  //
6467
- // Private Properties
6430
+ // Constructor
6468
6431
  //
6469
6432
  // --------------------------------------------------------------------------
6470
- get interactable() {
6471
- if (!this._interactable) {
6472
- this._interactable = interact.default(this.element.nativeElement);
6473
- //this._interactable.styleCursor(false);
6474
- }
6475
- return this._interactable;
6433
+ constructor(element, theme, themeAsset) {
6434
+ super(element, theme, themeAsset);
6476
6435
  }
6477
6436
  // --------------------------------------------------------------------------
6478
6437
  //
6479
- // Public Properties
6438
+ // Private Methods
6480
6439
  //
6481
6440
  // --------------------------------------------------------------------------
6482
- set window(value) {
6483
- if (value === this._window) {
6484
- return;
6485
- }
6486
- this._window = value;
6487
- if (this._window) {
6488
- this.commitWindowProperties();
6489
- }
6441
+ commitSourceProperties() {
6442
+ let value = 'url(' + this.source + ')';
6443
+ ViewUtil.setStyle(this.element, 'backgroundImage', value);
6490
6444
  }
6491
- get window() {
6492
- return this._window;
6445
+ removeSourceProperties() {
6446
+ ViewUtil.removeStyle(this.element, 'backgroundImage');
6493
6447
  }
6494
6448
  }
6495
- WindowDragAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowDragAreaDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
6496
- WindowDragAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: WindowDragAreaDirective, selector: "[vi-window-drag-area]", inputs: { window: ["vi-window-drag-area", "window"] }, usesInheritance: true, ngImport: i0 });
6497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowDragAreaDirective, decorators: [{
6449
+ ThemeAssetBackgroundDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetBackgroundDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }, { token: i1$4.ThemeAssetService }], target: i0.ɵɵFactoryTarget.Directive });
6450
+ ThemeAssetBackgroundDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeAssetBackgroundDirective, selector: "[vi-theme-background]", usesInheritance: true, ngImport: i0 });
6451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetBackgroundDirective, decorators: [{
6498
6452
  type: Directive,
6499
6453
  args: [{
6500
- selector: '[vi-window-drag-area]'
6454
+ selector: '[vi-theme-background]'
6501
6455
  }]
6502
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { window: [{
6503
- type: Input,
6504
- args: ['vi-window-drag-area']
6505
- }] } });
6456
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }, { type: i1$4.ThemeAssetService }]; } });
6506
6457
 
6507
- class WindowCloseElementComponent extends WindowElement {
6458
+ class ThemeAssetImageDirective extends ThemeAssetDirective {
6508
6459
  // --------------------------------------------------------------------------
6509
6460
  //
6510
- // Constructor
6461
+ // Constructor
6511
6462
  //
6512
6463
  // --------------------------------------------------------------------------
6513
- constructor(element) {
6514
- super(element);
6464
+ constructor(element, theme, themeAsset) {
6465
+ super(element, theme, themeAsset);
6515
6466
  }
6516
6467
  // --------------------------------------------------------------------------
6517
6468
  //
6518
- // Private Methods
6469
+ // Private Methods
6519
6470
  //
6520
6471
  // --------------------------------------------------------------------------
6521
- createChildren() {
6522
- super.createChildren();
6523
- if (!_.isNil(WindowCloseElementComponent.ICON_VALUE)) {
6524
- ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowCloseElementComponent.ICON_VALUE);
6525
- }
6526
- if (!_.isNil(WindowCloseElementComponent.ICON_CLASS)) {
6527
- ViewUtil.addClasses(this.nativeElement, WindowCloseElementComponent.ICON_CLASS);
6528
- }
6529
- ViewUtil.addClass(this.nativeElement, 'mouse-active');
6472
+ commitSourceProperties() {
6473
+ this.element.src = this.source;
6530
6474
  }
6531
- // --------------------------------------------------------------------------
6532
- //
6533
- // Event Handlers
6534
- //
6535
- // --------------------------------------------------------------------------
6536
- clickHandler(event) {
6537
- super.clickHandler(event);
6538
- if (!_.isNil(this.window)) {
6539
- this.window.close();
6540
- }
6475
+ removeSourceProperties() {
6476
+ this.element.src = null;
6541
6477
  }
6542
6478
  }
6543
- // --------------------------------------------------------------------------
6544
- //
6545
- // Constants
6546
- //
6547
- // --------------------------------------------------------------------------
6548
- WindowCloseElementComponent.ICON_CLASS = 'fas fa-times';
6549
- WindowCloseElementComponent.ICON_VALUE = null;
6550
- WindowCloseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowCloseElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6551
- WindowCloseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowCloseElementComponent, selector: "vi-window-close-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
6552
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowCloseElementComponent, decorators: [{
6553
- type: Component,
6554
- args: [{ selector: 'vi-window-close-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
6555
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
6479
+ ThemeAssetImageDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetImageDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }, { token: i1$4.ThemeAssetService }], target: i0.ɵɵFactoryTarget.Directive });
6480
+ ThemeAssetImageDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeAssetImageDirective, selector: "[vi-theme-image]", usesInheritance: true, ngImport: i0 });
6481
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeAssetImageDirective, decorators: [{
6482
+ type: Directive,
6483
+ args: [{
6484
+ selector: '[vi-theme-image]'
6485
+ }]
6486
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }, { type: i1$4.ThemeAssetService }]; } });
6556
6487
 
6557
- class WindowResizeElementComponent extends WindowElement {
6488
+ class ThemeToggleDirective extends Destroyable {
6558
6489
  // --------------------------------------------------------------------------
6559
6490
  //
6560
- // Constructor
6491
+ // Constructor
6561
6492
  //
6562
6493
  // --------------------------------------------------------------------------
6563
- constructor(element) {
6564
- super(element);
6494
+ constructor(theme) {
6495
+ super();
6496
+ this.theme = theme;
6565
6497
  }
6566
6498
  // --------------------------------------------------------------------------
6567
6499
  //
6568
- // Private Methods
6500
+ // Event Handlers
6569
6501
  //
6570
6502
  // --------------------------------------------------------------------------
6571
- createChildren() {
6572
- super.createChildren();
6573
- if (!_.isNil(WindowResizeElementComponent.ICON_VALUE)) {
6574
- ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowResizeElementComponent.ICON_VALUE);
6503
+ clickHandler(event) {
6504
+ let themes = this.theme.themes.collection;
6505
+ let length = themes.length;
6506
+ if (length < 2) {
6507
+ return;
6575
6508
  }
6576
- if (!_.isNil(WindowResizeElementComponent.ICON_CLASS)) {
6577
- ViewUtil.addClasses(this.nativeElement, WindowResizeElementComponent.ICON_CLASS);
6509
+ let index = 0;
6510
+ if (this.theme.theme) {
6511
+ index = themes.indexOf(this.theme.theme);
6512
+ if (index < length - 1) {
6513
+ index++;
6514
+ }
6515
+ else {
6516
+ index = 0;
6517
+ }
6578
6518
  }
6579
- ViewUtil.setStyle(this.nativeElement, 'cursor', 'pointer');
6519
+ this.theme.theme = themes[index];
6580
6520
  }
6581
6521
  // --------------------------------------------------------------------------
6582
6522
  //
6583
- // Event Handlers
6523
+ // Public Methods
6584
6524
  //
6585
6525
  // --------------------------------------------------------------------------
6586
- clickHandler(event) {
6587
- super.clickHandler(event);
6588
- if (!_.isNil(this.window)) {
6526
+ destroy() {
6527
+ if (this.isDestroyed) {
6528
+ return;
6589
6529
  }
6530
+ super.destroy();
6531
+ this.theme = null;
6590
6532
  }
6591
6533
  }
6592
- // --------------------------------------------------------------------------
6593
- //
6594
- // Constants
6595
- //
6596
- // --------------------------------------------------------------------------
6597
- WindowResizeElementComponent.ICON_CLASS = 'fas fa-arrows-alt';
6598
- WindowResizeElementComponent.ICON_VALUE = null;
6599
- WindowResizeElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowResizeElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6600
- WindowResizeElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowResizeElementComponent, selector: "vi-window-resize-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
6601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowResizeElementComponent, decorators: [{
6602
- type: Component,
6603
- args: [{ selector: 'vi-window-resize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
6604
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
6534
+ ThemeToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeToggleDirective, deps: [{ token: i1$4.ThemeService }], target: i0.ɵɵFactoryTarget.Directive });
6535
+ ThemeToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeToggleDirective, selector: "[vi-theme-toggle]", host: { listeners: { "click": "clickHandler($event)" } }, usesInheritance: true, ngImport: i0 });
6536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeToggleDirective, decorators: [{
6537
+ type: Directive,
6538
+ args: [{
6539
+ selector: '[vi-theme-toggle]'
6540
+ }]
6541
+ }], ctorParameters: function () { return [{ type: i1$4.ThemeService }]; }, propDecorators: { clickHandler: [{
6542
+ type: HostListener,
6543
+ args: ['click', ['$event']]
6544
+ }] } });
6605
6545
 
6606
- class WindowMinimizeElementComponent extends WindowElement {
6546
+ class ThemeStyleDirective extends Destroyable {
6607
6547
  // --------------------------------------------------------------------------
6608
6548
  //
6609
- // Constructor
6549
+ // Constructor
6610
6550
  //
6611
6551
  // --------------------------------------------------------------------------
6612
- constructor(element) {
6613
- super(element);
6614
- // --------------------------------------------------------------------------
6615
- //
6616
- // Private Methods
6617
- //
6618
- // --------------------------------------------------------------------------
6619
- this.commitIconProperties = () => {
6620
- let icon = this.window.isMinimized ? WindowMinimizeElementComponent.ICON_MAXIMIZE_VALUE : WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE;
6621
- ViewUtil.setProperty(this.nativeElement, 'innerHTML', icon);
6622
- };
6552
+ constructor(element, theme) {
6553
+ super();
6554
+ this.theme = theme;
6555
+ this.element = ViewUtil.parseElement(element.nativeElement);
6556
+ this.theme.changed.pipe(takeUntil(this.destroyed)).subscribe(() => this.stylePropertiesAdd());
6623
6557
  }
6624
6558
  // --------------------------------------------------------------------------
6625
6559
  //
6626
- // Protected Methods
6560
+ // Protected Methods
6627
6561
  //
6628
6562
  // --------------------------------------------------------------------------
6629
- commitWindowProperties() {
6630
- super.commitWindowProperties();
6631
- this.window.events.pipe(takeUntil(this.destroyed)).subscribe(event => {
6632
- if (event === WindowEvent.MINIMIZED_CHANGED) {
6633
- this.commitIconProperties();
6634
- }
6635
- });
6563
+ commitStyleProperties(name, value) {
6564
+ ViewUtil.setStyle(this.element, name, value, this.flags);
6636
6565
  }
6637
- createChildren() {
6638
- super.createChildren();
6639
- if (!_.isNil(WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE)) {
6640
- ViewUtil.setProperty(this.nativeElement, 'innerHTML', WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE);
6566
+ stylePropertiesCheck() {
6567
+ if (this.isNeedStyleAdd()) {
6568
+ this.stylePropertiesAdd();
6641
6569
  }
6642
- if (!_.isNil(WindowMinimizeElementComponent.ICON_CLASS)) {
6643
- ViewUtil.addClasses(this.nativeElement, WindowMinimizeElementComponent.ICON_CLASS);
6570
+ else if (this.isNeedStyleRemove()) {
6571
+ this.stylePropertiesRemove();
6644
6572
  }
6645
- ViewUtil.addClass(this.nativeElement, 'mouse-active');
6646
6573
  }
6647
- // --------------------------------------------------------------------------
6648
- //
6649
- // Event Handlers
6650
- //
6651
- // --------------------------------------------------------------------------
6652
- clickHandler(event) {
6653
- super.clickHandler(event);
6654
- if (!_.isNil(this.window)) {
6655
- this.window.isMinimized = !this.window.isMinimized;
6656
- }
6574
+ stylePropertiesRemove() {
6575
+ ViewUtil.removeStyle(this.element, this.styleName);
6576
+ }
6577
+ stylePropertiesAdd() {
6578
+ this.commitStyleProperties(this.styleName, this.theme.getStyle(this.key));
6579
+ }
6580
+ isNeedStyleAdd() {
6581
+ return !_.isNil(this.theme.theme) && !_.isNil(this.styleName);
6582
+ }
6583
+ isNeedStyleRemove() {
6584
+ return !_.isNil(this.styleName);
6657
6585
  }
6658
- }
6659
- // --------------------------------------------------------------------------
6660
- //
6661
- // Constants
6662
- //
6663
- // --------------------------------------------------------------------------
6664
- WindowMinimizeElementComponent.ICON_CLASS = null;
6665
- WindowMinimizeElementComponent.ICON_MINIMIZE_VALUE = null;
6666
- WindowMinimizeElementComponent.ICON_MAXIMIZE_VALUE = null;
6667
- WindowMinimizeElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMinimizeElementComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6668
- WindowMinimizeElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: WindowMinimizeElementComponent, selector: "vi-window-minimize-element", usesInheritance: true, ngImport: i0, template: '', isInline: true, styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] });
6669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowMinimizeElementComponent, decorators: [{
6670
- type: Component,
6671
- args: [{ selector: 'vi-window-minimize-element', template: '', styles: [":host{display:block;position:absolute;color:#fff;background-color:#0006;border-radius:50%;padding:8px;font-size:14px;font-weight:700;text-align:center}:host:hover{background-color:#0009}:host.small{font-size:10px;padding:4px}\n"] }]
6672
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
6673
-
6674
- class WindowResizeable extends WindowImpl {
6675
6586
  // --------------------------------------------------------------------------
6676
6587
  //
6677
- // Protected Methods
6588
+ // Public Methods
6678
6589
  //
6679
6590
  // --------------------------------------------------------------------------
6680
- setProperties() {
6681
- super.setProperties();
6682
- if (!this.config.isResizeable) {
6591
+ destroy() {
6592
+ if (this.isDestroyed) {
6683
6593
  return;
6684
6594
  }
6685
- ViewUtil.addClass(this.container, 'vi-resizeable');
6686
- if (_.isNil(this.resizeMoveHandlerProxy)) {
6687
- this.resizeMoveHandlerProxy = this.resizeMoveHandler.bind(this);
6688
- }
6689
- let edges = {};
6690
- edges.top = true;
6691
- edges.left = true;
6692
- edges.right = true;
6693
- edges.bottom = true;
6694
- let param = {};
6695
- param.edges = edges;
6696
- this.interactable.resizable(param);
6697
- this.interactable.on('resizemove', this.resizeMoveHandlerProxy);
6595
+ super.destroy();
6596
+ this.key = null;
6597
+ this.theme = null;
6598
+ this.element = null;
6698
6599
  }
6699
6600
  // --------------------------------------------------------------------------
6700
6601
  //
6701
- // Event Handlers
6602
+ // Public Properties
6702
6603
  //
6703
6604
  // --------------------------------------------------------------------------
6704
- resizeMoveHandler(event) {
6705
- if (this.isMinimized) {
6605
+ get flags() {
6606
+ return this._flags;
6607
+ }
6608
+ set flags(value) {
6609
+ if (value === this._flags) {
6706
6610
  return;
6707
6611
  }
6708
- let isChanged = event.dx !== 0 || event.dy !== 0;
6709
- if (!isChanged) {
6612
+ this._flags = value;
6613
+ this.stylePropertiesCheck();
6614
+ }
6615
+ get styleName() {
6616
+ return this._styleName;
6617
+ }
6618
+ set styleName(value) {
6619
+ if (value === this._styleName) {
6710
6620
  return;
6711
6621
  }
6712
- if (event.dx !== 0) {
6713
- let width = this.getWidth();
6714
- if (_.isNaN(width)) {
6715
- width = this.calculateWidth();
6716
- }
6717
- this.setWidth(width + event.dx, false);
6622
+ this._styleName = value;
6623
+ this.stylePropertiesCheck();
6624
+ }
6625
+ get key() {
6626
+ return this._key;
6627
+ }
6628
+ set key(value) {
6629
+ if (value === this._key) {
6630
+ return;
6718
6631
  }
6719
- if (event.dy !== 0) {
6720
- let height = this.getHeight();
6721
- if (_.isNaN(height)) {
6722
- height = this.calculateHeight();
6723
- }
6724
- this.setHeight(height + event.dy, false);
6632
+ this._key = value;
6633
+ if (!_.isNil(value)) {
6634
+ this.stylePropertiesCheck();
6725
6635
  }
6726
- this.resizeHandler();
6636
+ }
6637
+ }
6638
+ ThemeStyleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }], target: i0.ɵɵFactoryTarget.Directive });
6639
+ ThemeStyleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeStyleDirective, selector: "[vi-theme-style]", inputs: { flags: "flags", styleName: "styleName", key: ["vi-theme-style", "key"] }, usesInheritance: true, ngImport: i0 });
6640
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleDirective, decorators: [{
6641
+ type: Directive,
6642
+ args: [{
6643
+ selector: '[vi-theme-style]'
6644
+ }]
6645
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }]; }, propDecorators: { flags: [{
6646
+ type: Input
6647
+ }], styleName: [{
6648
+ type: Input
6649
+ }], key: [{
6650
+ type: Input,
6651
+ args: ['vi-theme-style']
6652
+ }] } });
6653
+
6654
+ class ThemeStyleHoverDirective extends ThemeStyleDirective {
6655
+ // --------------------------------------------------------------------------
6656
+ //
6657
+ // Constructor
6658
+ //
6659
+ // --------------------------------------------------------------------------
6660
+ constructor(element, theme) {
6661
+ super(element, theme);
6662
+ // --------------------------------------------------------------------------
6663
+ //
6664
+ // Properties
6665
+ //
6666
+ // --------------------------------------------------------------------------
6667
+ this._isHover = false;
6668
+ // --------------------------------------------------------------------------
6669
+ //
6670
+ // Event Handlers
6671
+ //
6672
+ // --------------------------------------------------------------------------
6673
+ this.mouseEnter = (event) => {
6674
+ this.isHover = true;
6675
+ };
6676
+ this.mouseLeave = (event) => {
6677
+ this.isHover = false;
6678
+ };
6679
+ this.flags = RendererStyleFlags2.Important;
6680
+ this.element.addEventListener('mouseenter', this.mouseEnter, false);
6681
+ this.element.addEventListener('mouseleave', this.mouseLeave, false);
6682
+ }
6683
+ // --------------------------------------------------------------------------
6684
+ //
6685
+ // Protected Methods
6686
+ //
6687
+ // --------------------------------------------------------------------------
6688
+ isNeedStyleAdd() {
6689
+ return this.isHover && super.isNeedStyleAdd();
6690
+ }
6691
+ isNeedStyleRemove() {
6692
+ return !this.isHover || super.isNeedStyleRemove();
6727
6693
  }
6728
6694
  // --------------------------------------------------------------------------
6729
6695
  //
6730
- // Public Properties
6696
+ // Public Methods
6731
6697
  //
6732
6698
  // --------------------------------------------------------------------------
6733
6699
  destroy() {
6734
6700
  if (this.isDestroyed) {
6735
6701
  return;
6736
6702
  }
6703
+ this.element.removeEventListener('mouseenter', this.mouseEnter, false);
6704
+ this.element.removeEventListener('mouseleave', this.mouseLeave, false);
6737
6705
  super.destroy();
6738
- this.resizeMoveHandlerProxy = null;
6739
- if (!_.isNil(this._interactable)) {
6740
- this._interactable.unset();
6741
- this._interactable = null;
6742
- }
6743
6706
  }
6744
6707
  // --------------------------------------------------------------------------
6745
6708
  //
6746
- // Private Properties
6709
+ // Public Properties
6747
6710
  //
6748
6711
  // --------------------------------------------------------------------------
6749
- get interactable() {
6750
- if (_.isNil(this._interactable)) {
6751
- this._interactable = interact.default(this.container);
6752
- // this._interactable.styleCursor(false);
6712
+ get isHover() {
6713
+ return this._isHover;
6714
+ }
6715
+ set isHover(value) {
6716
+ if (value === this._isHover) {
6717
+ return;
6753
6718
  }
6754
- return this._interactable;
6719
+ this._isHover = value;
6720
+ this.stylePropertiesCheck();
6721
+ }
6722
+ get key() {
6723
+ return super.key;
6724
+ }
6725
+ set key(value) {
6726
+ super.key = value;
6727
+ }
6728
+ get styleName() {
6729
+ return super.styleName;
6730
+ }
6731
+ set styleName(value) {
6732
+ super.styleName = value;
6733
+ }
6734
+ get flags() {
6735
+ return super.flags;
6736
+ }
6737
+ set flags(value) {
6738
+ super.flags = value;
6755
6739
  }
6756
6740
  }
6741
+ ThemeStyleHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleHoverDirective, deps: [{ token: i0.ElementRef }, { token: i1$4.ThemeService }], target: i0.ɵɵFactoryTarget.Directive });
6742
+ ThemeStyleHoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ThemeStyleHoverDirective, selector: "[vi-theme-style-hover]", inputs: { key: ["vi-theme-style-hover", "key"], styleName: "styleName", flags: "flags" }, usesInheritance: true, ngImport: i0 });
6743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeStyleHoverDirective, decorators: [{
6744
+ type: Directive,
6745
+ args: [{
6746
+ selector: '[vi-theme-style-hover]'
6747
+ }]
6748
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$4.ThemeService }]; }, propDecorators: { key: [{
6749
+ type: Input,
6750
+ args: ['vi-theme-style-hover']
6751
+ }], styleName: [{
6752
+ type: Input
6753
+ }], flags: [{
6754
+ type: Input
6755
+ }] } });
6757
6756
 
6758
- class WindowDragable extends WindowResizeable {
6759
- constructor() {
6760
- // --------------------------------------------------------------------------
6761
- //
6762
- // Properties Methods
6763
- //
6764
- // --------------------------------------------------------------------------
6765
- super(...arguments);
6766
- this.isWasDragged = false;
6767
- }
6757
+ let declarations = [ThemeToggleDirective, ThemeAssetImageDirective, ThemeAssetBackgroundDirective, ThemeStyleDirective, ThemeStyleHoverDirective];
6758
+ class ThemeModule {
6768
6759
  // --------------------------------------------------------------------------
6769
6760
  //
6770
- // Protected Methods
6761
+ // Static Methods
6771
6762
  //
6772
6763
  // --------------------------------------------------------------------------
6773
- setProperties() {
6774
- super.setProperties();
6775
- if (this.config.isModal) {
6776
- return;
6777
- }
6778
- ViewUtil.addClass(this.container, 'vi-draggable');
6779
- if (!this.config.isContentDragable) {
6780
- return;
6781
- }
6782
- this.dragMoveHandlerProxy = this.dragMoveHandler.bind(this);
6783
- this.dragStartHandlerProxy = this.dragStartHandler.bind(this);
6784
- let param = {};
6785
- this.interactable.draggable(param);
6786
- this.interactable.on('dragmove', this.dragMoveHandlerProxy);
6787
- this.interactable.on('dragstart', this.dragStartHandlerProxy);
6764
+ static forRoot(options) {
6765
+ return {
6766
+ ngModule: ThemeModule,
6767
+ providers: [
6768
+ {
6769
+ provide: THEME_OPTIONS,
6770
+ useValue: options || {}
6771
+ },
6772
+ {
6773
+ provide: ThemeService,
6774
+ deps: [CookieService, THEME_OPTIONS],
6775
+ useFactory: themeServiceFactory
6776
+ },
6777
+ {
6778
+ provide: ThemeAssetService,
6779
+ deps: [ThemeService],
6780
+ useFactory: themeAssetServiceFactory
6781
+ }
6782
+ ]
6783
+ };
6788
6784
  }
6789
- isNeedClickStopPropagation(event) {
6790
- return this.isWasDragged || super.isNeedClickStopPropagation(event);
6785
+ }
6786
+ ThemeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6787
+ ThemeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, declarations: [ThemeToggleDirective, ThemeAssetImageDirective, ThemeAssetBackgroundDirective, ThemeStyleDirective, ThemeStyleHoverDirective], imports: [CookieModule], exports: [ThemeToggleDirective, ThemeAssetImageDirective, ThemeAssetBackgroundDirective, ThemeStyleDirective, ThemeStyleHoverDirective] });
6788
+ ThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, imports: [[CookieModule]] });
6789
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ThemeModule, decorators: [{
6790
+ type: NgModule,
6791
+ args: [{
6792
+ imports: [CookieModule],
6793
+ declarations,
6794
+ exports: declarations
6795
+ }]
6796
+ }] });
6797
+ function themeServiceFactory(cookie, options) {
6798
+ if (!_.isNil(options) && _.isNil(options.service)) {
6799
+ options.service = cookie;
6791
6800
  }
6801
+ return new ThemeService(options);
6802
+ }
6803
+ function themeAssetServiceFactory(theme) {
6804
+ return new ThemeAssetService(theme);
6805
+ }
6806
+ const THEME_OPTIONS = new InjectionToken(`THEME_OPTIONS`);
6807
+
6808
+ class WindowDragAreaDirective extends Destroyable {
6792
6809
  // --------------------------------------------------------------------------
6793
6810
  //
6794
- // Event Handlers
6811
+ // Constructor
6795
6812
  //
6796
6813
  // --------------------------------------------------------------------------
6797
- dragStartHandler(event) {
6798
- this.isWasDragged = true;
6799
- }
6800
- dragMoveHandler(event) {
6801
- let x = this.getX() + event.dx;
6802
- let y = this.getY() + event.dy;
6803
- this.move(x, y);
6804
- }
6805
- mouseClickHandler(event) {
6806
- super.mouseClickHandler(event);
6807
- this.isWasDragged = false;
6814
+ constructor(element) {
6815
+ super();
6816
+ this.element = element;
6817
+ // --------------------------------------------------------------------------
6818
+ //
6819
+ // Event Handlers
6820
+ //
6821
+ // --------------------------------------------------------------------------
6822
+ this.dragStartHandler = (event) => {
6823
+ this._window.dragStartHandler(event);
6824
+ };
6825
+ this.dragMoveHandler = (event) => {
6826
+ this._window.dragMoveHandler(event);
6827
+ };
6808
6828
  }
6809
6829
  // --------------------------------------------------------------------------
6810
6830
  //
@@ -6816,74 +6836,66 @@ class WindowDragable extends WindowResizeable {
6816
6836
  return;
6817
6837
  }
6818
6838
  super.destroy();
6819
- this.dragMoveHandlerProxy = null;
6820
- this.dragStartHandlerProxy = null;
6839
+ if (!_.isNil(this._interactable)) {
6840
+ this._interactable.unset();
6841
+ this._interactable = null;
6842
+ }
6843
+ this.element = null;
6821
6844
  }
6822
- }
6823
-
6824
- class WindowBaseComponent extends WindowDragable {
6825
6845
  // --------------------------------------------------------------------------
6826
6846
  //
6827
- // Protected Methods
6847
+ // Private Methods
6828
6848
  //
6829
6849
  // --------------------------------------------------------------------------
6830
- elementsCreate() {
6831
- super.elementsCreate();
6832
- if (!(this.content.container instanceof ViewContainerRef)) {
6850
+ commitWindowProperties() {
6851
+ if (!this.window.config || this.window.config.isModal) {
6833
6852
  return;
6834
6853
  }
6835
- if (!this.config.disableClose) {
6836
- this.elementAdd(this.content.container.createComponent(WindowBaseComponent.CLOSE_COMPONENT));
6837
- }
6838
- if (this.config.isResizeable) {
6839
- this.elementAdd(this.content.container.createComponent(WindowBaseComponent.RESIZE_COMPONENT));
6840
- }
6841
- if (this.config.isMinimizable) {
6842
- this.elementAdd(this.content.container.createComponent(WindowBaseComponent.MINIMIZE_COMPONENT));
6843
- }
6844
- }
6845
- commitIsBlinkProperties() {
6846
- ViewUtil.toggleClass(this.container, this.blinkClass, this.isBlink);
6847
- }
6848
- commitIsDisabledProperties() {
6849
- ViewUtil.toggleClass(this.container, this.disabledClass, this.isDisabled);
6850
- ViewUtil.toggleClass(this.content.element, this.disabledClass, this.isDisabled);
6851
- ViewUtil.toggleClass(this.content.element.nativeElement.parentElement, this.disabledClass, this.isDisabled);
6852
- }
6853
- commitIsShakingProperties() {
6854
- ViewUtil.toggleClasses(this.container, this.shakingClass, this.isShaking);
6855
- }
6856
- commitIsMinimizedProperties() {
6857
- ViewUtil.toggleClass(this.container, this.minimizedClass, this.isMinimized);
6858
- ViewUtil.toggleClass(this.content.element, this.minimizedClass, this.isMinimized);
6859
- ViewUtil.toggleClass(this.content.element.nativeElement.parentElement, this.minimizedClass, this.isMinimized);
6854
+ this.interactable.draggable(true);
6855
+ this.interactable.on('dragmove', this.dragMoveHandler);
6856
+ this.interactable.on('dragstart', this.dragStartHandler);
6860
6857
  }
6861
6858
  // --------------------------------------------------------------------------
6862
6859
  //
6863
- // Protected Properties
6860
+ // Private Properties
6864
6861
  //
6865
6862
  // --------------------------------------------------------------------------
6866
- get blinkClass() {
6867
- return 'vi-blink';
6868
- }
6869
- get disabledClass() {
6870
- return 'vi-disabled';
6863
+ get interactable() {
6864
+ if (!this._interactable) {
6865
+ this._interactable = interact.default(this.element.nativeElement);
6866
+ //this._interactable.styleCursor(false);
6867
+ }
6868
+ return this._interactable;
6871
6869
  }
6872
- get minimizedClass() {
6873
- return 'vi-minimized';
6870
+ // --------------------------------------------------------------------------
6871
+ //
6872
+ // Public Properties
6873
+ //
6874
+ // --------------------------------------------------------------------------
6875
+ set window(value) {
6876
+ if (value === this._window) {
6877
+ return;
6878
+ }
6879
+ this._window = value;
6880
+ if (this._window) {
6881
+ this.commitWindowProperties();
6882
+ }
6874
6883
  }
6875
- get shakingClass() {
6876
- return 'shake-constant shake-horizontal';
6884
+ get window() {
6885
+ return this._window;
6877
6886
  }
6878
6887
  }
6879
- // --------------------------------------------------------------------------
6880
- //
6881
- // Static Properties
6882
- //
6883
- // --------------------------------------------------------------------------
6884
- WindowBaseComponent.CLOSE_COMPONENT = WindowCloseElementComponent;
6885
- WindowBaseComponent.RESIZE_COMPONENT = WindowResizeElementComponent;
6886
- WindowBaseComponent.MINIMIZE_COMPONENT = WindowMinimizeElementComponent;
6888
+ WindowDragAreaDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowDragAreaDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
6889
+ WindowDragAreaDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: WindowDragAreaDirective, selector: "[vi-window-drag-area]", inputs: { window: ["vi-window-drag-area", "window"] }, usesInheritance: true, ngImport: i0 });
6890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WindowDragAreaDirective, decorators: [{
6891
+ type: Directive,
6892
+ args: [{
6893
+ selector: '[vi-window-drag-area]'
6894
+ }]
6895
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { window: [{
6896
+ type: Input,
6897
+ args: ['vi-window-drag-area']
6898
+ }] } });
6887
6899
 
6888
6900
  const IMPORTS$2 = [CommonModule, FormsModule, MatButtonModule, MatDialogModule, CookieModule, LanguageModule];
6889
6901
  const ENTRY_COMPONENTS$1 = [WindowQuestionComponent, WindowCloseElementComponent, WindowResizeElementComponent, WindowMinimizeElementComponent];
@@ -6898,6 +6910,8 @@ class WindowModule {
6898
6910
  static forRoot() {
6899
6911
  return {
6900
6912
  ngModule: WindowModule,
6913
+ providers: [WindowService]
6914
+ /*
6901
6915
  providers: [
6902
6916
  {
6903
6917
  provide: WindowService,
@@ -6905,6 +6919,7 @@ class WindowModule {
6905
6919
  useFactory: windowServiceFactory
6906
6920
  }
6907
6921
  ]
6922
+ */
6908
6923
  };
6909
6924
  }
6910
6925
  }
@@ -6919,12 +6934,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
6919
6934
  exports: EXPORTS$1
6920
6935
  }]
6921
6936
  }] });
6922
- function windowServiceFactory(dialog, language, cookies) {
6923
- let item = new WindowService(dialog, language, cookies);
6924
- item.factory = new WindowFactory(WindowBaseComponent);
6925
- item.questionComponent = WindowQuestionComponent;
6926
- return item;
6927
- }
6928
6937
 
6929
6938
  class MenuTriggerForDirective extends MatMenuTrigger {
6930
6939
  //--------------------------------------------------------------------------
@@ -9890,5 +9899,5 @@ class TransportLazyModule {
9890
9899
  * Generated bundle index. Do not edit.
9891
9900
  */
9892
9901
 
9893
- export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableCellStyleNamePipe, CdkTableCellValuePipe, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkComponent, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, HTMLTitleDirective, INotification, INotificationContent, IUser, IVICommonOptions, IWindow, IWindowContent, InfiniteScrollDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageMatPaginatorIntl, LanguageModule, LanguageMomentDateAdapter, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LanguageSelectorComponent, LazyModuleLoader, ListItem, ListItems, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginIfCanGuard, LoginNotGuard, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, MenuTriggerForDirective, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationBaseComponent, NotificationComponent, NotificationConfig, NotificationEvent, NotificationFactory, NotificationModule, NotificationService, NotificationServiceEvent, PipeBaseService, PrettifyPipe, PropertiesManager, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, ScrollCheckDirective, ScrollDirective, SelectListComponent, SelectListItem, SelectListItems, SelectOnFocusDirective, ShellBaseComponent, StartCasePipe, THEME_OPTIONS, TabGroupComponent, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TransportLazy, TransportLazyModule, TransportLazyModuleLoadedEvent, TruncatePipe, UserBaseService, UserBaseServiceEvent, VICommonModule, VIComponentModule, VI_ANGULAR_OPTIONS, ViewUtil, WINDOW_CONTENT_CONTAINER, WindowAlign, WindowBase, WindowBaseComponent, WindowCloseElementComponent, WindowConfig, WindowDragAreaDirective, WindowEvent, WindowFactory, WindowImpl, WindowMinimizeElementComponent, WindowModule, WindowQuestionBaseComponent, WindowQuestionComponent, WindowResizeElementComponent, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory, windowServiceFactory };
9902
+ export { APPLICATION_INJECTOR, ApplicationBaseComponent, ApplicationComponent, AspectRatioResizeDirective, AssetBackgroundDirective, AssetBackgroundPipe, AssetFilePipe, AssetIconPipe, AssetImagePipe, AssetModule, AssetSoundPipe, AssetVideoPipe, AutoScrollBottomDirective, BootstrapBreakpoint, BootstrapBreakpointService, BootstrapBreakpointServiceEvent, BottomSheetBaseComponent, BottomSheetService, COOKIE_OPTIONS, CamelCasePipe, CanDeactivateGuard, CdkTableBaseComponent, CdkTableCellClassNamePipe, CdkTableCellStyleNamePipe, CdkTableCellValuePipe, CdkTableColumnClassNamePipe, CdkTableColumnStyleNamePipe, CdkTableDataSource, CdkTableFilterableComponent, CdkTableFilterableMapCollection, CdkTablePaginableBookmarkComponent, CdkTablePaginableBookmarkMapCollection, CdkTablePaginableComponent, CdkTablePaginableMapCollection, CdkTableRowClassNamePipe, CdkTableRowStyleNamePipe, ClickToCopyDirective, ClickToSelectDirective, CookieModule, CookieOptions, CookieService, Direction, FinancePipe, FocusDirective, FocusManager, FormElementAsync, FormElementSync, HTMLContentTitleDirective, HTMLTitleDirective, INotification, INotificationContent, IUser, IVICommonOptions, IWindow, IWindowContent, InfiniteScrollDirective, LANGUAGE_OPTIONS, LanguageDirective, LanguageHasDirective, LanguageMatPaginatorIntl, LanguageModule, LanguageMomentDateAdapter, LanguagePipe, LanguagePipeHas, LanguagePipeHasPure, LanguagePipePure, LanguageRequireResolver, LanguageResolver, LanguageSelectorComponent, LazyModuleLoader, ListItem, ListItems, LoginBaseService, LoginBaseServiceEvent, LoginGuard, LoginIfCanGuard, LoginNotGuard, LoginRequireResolver, LoginResolver, MenuItem, MenuItemBase, MenuItems, MenuListComponent, MenuTriggerForDirective, MessageBaseComponent, MomentDateAdaptivePipe, MomentDateFromNowPipe, MomentDatePipe, MomentTimePipe, NavigationMenuItem, NgModelErrorPipe, NotificationBaseComponent, NotificationComponent, NotificationConfig, NotificationEvent, NotificationFactory, NotificationModule, NotificationService, NotificationServiceEvent, PipeBaseService, PrettifyPipe, PropertiesManager, QuestionEvent, QuestionManager, QuestionMode, ResizeDirective, ResizeManager, RouterBaseService, SanitizePipe, ScrollCheckDirective, ScrollDirective, SelectListComponent, SelectListItem, SelectListItems, SelectOnFocusDirective, ShellBaseComponent, StartCasePipe, THEME_OPTIONS, TabGroupComponent, ThemeAssetBackgroundDirective, ThemeAssetDirective, ThemeAssetImageDirective, ThemeModule, ThemeStyleDirective, ThemeStyleHoverDirective, ThemeToggleDirective, TimePipe, TransportLazy, TransportLazyModule, TransportLazyModuleLoadedEvent, TruncatePipe, UserBaseService, UserBaseServiceEvent, VICommonModule, VIComponentModule, VI_ANGULAR_OPTIONS, ViewUtil, WINDOW_CONTENT_CONTAINER, WindowAlign, WindowBase, WindowBaseComponent, WindowCloseElementComponent, WindowConfig, WindowDragAreaDirective, WindowElement, WindowEvent, WindowFactory, WindowImpl, WindowMinimizeElementComponent, WindowModule, WindowQuestionBaseComponent, WindowQuestionComponent, WindowResizeElementComponent, WindowService, WindowServiceEvent, cookieServiceFactory, languageServiceFactory, loggerServiceFactory, notificationServiceFactory, themeAssetServiceFactory, themeServiceFactory };
9894
9903
  //# sourceMappingURL=ts-core-angular.mjs.map