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