@firestitch/app-message 9.1.4 → 9.1.5

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.
Files changed (38) hide show
  1. package/app/modules/message-queues/components/queues/queues.component.d.ts +3 -1
  2. package/app/modules/message-queues/services/message-queue.service.d.ts +9 -0
  3. package/bundles/firestitch-app-message.umd.js +80 -53
  4. package/bundles/firestitch-app-message.umd.js.map +1 -1
  5. package/bundles/firestitch-app-message.umd.min.js +1 -1
  6. package/bundles/firestitch-app-message.umd.min.js.map +1 -1
  7. package/esm2015/app/modules/message-queues/components/queue/queue.component.js +2 -2
  8. package/esm2015/app/modules/message-queues/components/queues/queues.component.js +9 -12
  9. package/esm2015/app/modules/message-queues/message-queues.module.js +6 -2
  10. package/esm2015/app/modules/message-queues/services/message-queue.service.js +31 -0
  11. package/esm2015/firestitch-app-message.js +2 -2
  12. package/esm2015/public_api.js +2 -1
  13. package/esm5/app/modules/message-queues/components/queue/queue.component.js +2 -2
  14. package/esm5/app/modules/message-queues/components/queues/queues.component.js +9 -12
  15. package/esm5/app/modules/message-queues/message-queues.module.js +6 -2
  16. package/esm5/app/modules/message-queues/services/message-queue.service.js +33 -0
  17. package/esm5/firestitch-app-message.js +2 -2
  18. package/esm5/public_api.js +2 -1
  19. package/fesm2015/firestitch-app-message.js +76 -52
  20. package/fesm2015/firestitch-app-message.js.map +1 -1
  21. package/fesm5/firestitch-app-message.js +81 -55
  22. package/fesm5/firestitch-app-message.js.map +1 -1
  23. package/firestitch-app-message.d.ts +1 -1
  24. package/firestitch-app-message.metadata.json +1 -1
  25. package/package.json +1 -1
  26. package/public_api.d.ts +1 -0
  27. package/app/modules/message-queues/components/index.d.ts +0 -3
  28. package/app/modules/message-queues/components/queue/index.d.ts +0 -1
  29. package/app/modules/message-queues/components/queues/index.d.ts +0 -1
  30. package/app/modules/message-queues/components/recipient/index.d.ts +0 -1
  31. package/esm2015/app/modules/message-queues/components/index.js +0 -4
  32. package/esm2015/app/modules/message-queues/components/queue/index.js +0 -2
  33. package/esm2015/app/modules/message-queues/components/queues/index.js +0 -2
  34. package/esm2015/app/modules/message-queues/components/recipient/index.js +0 -2
  35. package/esm5/app/modules/message-queues/components/index.js +0 -4
  36. package/esm5/app/modules/message-queues/components/queue/index.js +0 -2
  37. package/esm5/app/modules/message-queues/components/queues/index.js +0 -2
  38. package/esm5/app/modules/message-queues/components/recipient/index.js +0 -2
@@ -3,16 +3,18 @@ import { MatDialog } from '@angular/material/dialog';
3
3
  import { FsListComponent, FsListConfig } from '@firestitch/list';
4
4
  import { MessageQueueState } from '../../enums/message-queue-state.enum';
5
5
  import { FsAppMessageConfig } from '../../../app-message/interfaces';
6
+ import { FsMessageQueueService } from '../../services/message-queue.service';
6
7
  export declare class QueuesComponent implements OnInit, OnDestroy {
7
8
  private _config;
8
9
  private _dialog;
10
+ private _messageQueueService;
9
11
  list: FsListComponent;
10
12
  query: {};
11
13
  config: FsListConfig;
12
14
  messageQueueStates: {};
13
15
  MessageQueueState: typeof MessageQueueState;
14
16
  private _destroy$;
15
- constructor(_config: FsAppMessageConfig, _dialog: MatDialog);
17
+ constructor(_config: FsAppMessageConfig, _dialog: MatDialog, _messageQueueService: FsMessageQueueService);
16
18
  ngOnInit(): void;
17
19
  open(messageQueue: any): void;
18
20
  ngOnDestroy(): void;
@@ -0,0 +1,9 @@
1
+ import { OnDestroy } from "@angular/core";
2
+ import { MatDialog } from "@angular/material/dialog";
3
+ export declare class FsMessageQueueService implements OnDestroy {
4
+ private _dialog;
5
+ private _destroy$;
6
+ constructor(_dialog: MatDialog);
7
+ openMessageQueue(messageQueueId: number, options?: any): import("rxjs").Observable<any>;
8
+ ngOnDestroy(): void;
9
+ }
@@ -521,19 +521,6 @@
521
521
  return FsAppMessagesModule;
522
522
  }());
523
523
 
524
- var EmailMessageQueueFormat;
525
- (function (EmailMessageQueueFormat) {
526
- EmailMessageQueueFormat["Text"] = "T";
527
- EmailMessageQueueFormat["HTML"] = "H";
528
- EmailMessageQueueFormat["RichText"] = "R";
529
- })(EmailMessageQueueFormat || (EmailMessageQueueFormat = {}));
530
-
531
- var MessageQueueType;
532
- (function (MessageQueueType) {
533
- MessageQueueType["Sms"] = "S";
534
- MessageQueueType["Email"] = "E";
535
- })(MessageQueueType || (MessageQueueType = {}));
536
-
537
524
  var MessageQueueState;
538
525
  (function (MessageQueueState) {
539
526
  MessageQueueState["Sent"] = "S";
@@ -555,6 +542,19 @@
555
542
  { name: 'Failed', value: MessageQueueState.Failed }
556
543
  ];
557
544
 
545
+ var EmailMessageQueueFormat;
546
+ (function (EmailMessageQueueFormat) {
547
+ EmailMessageQueueFormat["Text"] = "T";
548
+ EmailMessageQueueFormat["HTML"] = "H";
549
+ EmailMessageQueueFormat["RichText"] = "R";
550
+ })(EmailMessageQueueFormat || (EmailMessageQueueFormat = {}));
551
+
552
+ var MessageQueueType;
553
+ (function (MessageQueueType) {
554
+ MessageQueueType["Sms"] = "S";
555
+ MessageQueueType["Email"] = "E";
556
+ })(MessageQueueType || (MessageQueueType = {}));
557
+
558
558
  var QueueComponent = /** @class */ (function () {
559
559
  function QueueComponent(_config, _message, _prompt, _dialog, _data) {
560
560
  this._config = _config;
@@ -571,7 +571,7 @@
571
571
  this.messageQueueStates = indexNameValue(MessageQueueStates);
572
572
  this.resendMessageQueue = this._config.resendMessageQueue;
573
573
  this.forwardMessageQueue = this._config.forwardMessageQueue;
574
- this._config.loadMessageQueue(this._data.messageQueue.id)
574
+ this._config.loadMessageQueue(this._data.messageQueueId)
575
575
  .subscribe(function (messageQueue) {
576
576
  _this.messageQueue = messageQueue;
577
577
  if (_this.messageQueue.emailMessageQueue) {
@@ -732,10 +732,37 @@
732
732
  return QueueComponent;
733
733
  }());
734
734
 
735
+ var FsMessageQueueService = /** @class */ (function () {
736
+ function FsMessageQueueService(_dialog) {
737
+ this._dialog = _dialog;
738
+ this._destroy$ = new rxjs.Subject();
739
+ }
740
+ FsMessageQueueService.prototype.openMessageQueue = function (messageQueueId, options) {
741
+ if (options === void 0) { options = {}; }
742
+ return this._dialog.open(QueueComponent, __assign(__assign({}, options), { data: {
743
+ messageQueueId: messageQueueId,
744
+ }, width: options.width || '85%' })).afterClosed()
745
+ .pipe(operators.takeUntil(this._destroy$));
746
+ };
747
+ FsMessageQueueService.prototype.ngOnDestroy = function () {
748
+ this._destroy$.next();
749
+ this._destroy$.complete();
750
+ };
751
+ FsMessageQueueService.ctorParameters = function () { return [
752
+ { type: dialog.MatDialog }
753
+ ]; };
754
+ FsMessageQueueService = __decorate([
755
+ core.Injectable(),
756
+ __metadata("design:paramtypes", [dialog.MatDialog])
757
+ ], FsMessageQueueService);
758
+ return FsMessageQueueService;
759
+ }());
760
+
735
761
  var QueuesComponent = /** @class */ (function () {
736
- function QueuesComponent(_config, _dialog) {
762
+ function QueuesComponent(_config, _dialog, _messageQueueService) {
737
763
  this._config = _config;
738
764
  this._dialog = _dialog;
765
+ this._messageQueueService = _messageQueueService;
739
766
  this.list = null;
740
767
  this.query = {};
741
768
  this.config = null;
@@ -824,13 +851,7 @@
824
851
  };
825
852
  QueuesComponent.prototype.open = function (messageQueue) {
826
853
  var _this = this;
827
- this._dialog.open(QueueComponent, {
828
- data: {
829
- messageQueue: messageQueue,
830
- },
831
- width: '85%'
832
- })
833
- .afterClosed()
854
+ this._messageQueueService.openMessageQueue(messageQueue.id)
834
855
  .pipe(operators.takeUntil(this._destroy$))
835
856
  .subscribe(function () {
836
857
  _this.list.reload();
@@ -842,7 +863,8 @@
842
863
  };
843
864
  QueuesComponent.ctorParameters = function () { return [
844
865
  { type: undefined, decorators: [{ type: core.Inject, args: [FS_APP_MESSAGE_CONFIG,] }] },
845
- { type: dialog.MatDialog }
866
+ { type: dialog.MatDialog },
867
+ { type: FsMessageQueueService }
846
868
  ]; };
847
869
  __decorate([
848
870
  core.ViewChild(list.FsListComponent, { static: true }),
@@ -859,11 +881,41 @@
859
881
  styles: [":host ::ng-deep .col-recipients small+small:before{content:\", \"}:host ::ng-deep .col-state .state-F,:host ::ng-deep .col-state .state-P{color:#d8524e}"]
860
882
  }),
861
883
  __param(0, core.Inject(FS_APP_MESSAGE_CONFIG)),
862
- __metadata("design:paramtypes", [Object, dialog.MatDialog])
884
+ __metadata("design:paramtypes", [Object, dialog.MatDialog,
885
+ FsMessageQueueService])
863
886
  ], QueuesComponent);
864
887
  return QueuesComponent;
865
888
  }());
866
889
 
890
+ var RecipientComponent = /** @class */ (function () {
891
+ function RecipientComponent() {
892
+ }
893
+ RecipientComponent.prototype.ngOnInit = function () {
894
+ var icons = {
895
+ 'S': { name: 'check_circle', tooltip: 'Sent' },
896
+ 'E': { name: 'offline_bolt', tooltip: 'Sending' },
897
+ 'F': { name: 'info', tooltip: 'Failed' },
898
+ };
899
+ this.icon = icons[this.state];
900
+ };
901
+ __decorate([
902
+ core.Input(),
903
+ __metadata("design:type", Object)
904
+ ], RecipientComponent.prototype, "name", void 0);
905
+ __decorate([
906
+ core.Input(),
907
+ __metadata("design:type", Object)
908
+ ], RecipientComponent.prototype, "state", void 0);
909
+ RecipientComponent = __decorate([
910
+ core.Component({
911
+ selector: 'app-recipient',
912
+ template: "<span class=\"recipient\">\n <span class=\"name\">{{name}}</span>\n <mat-icon *ngIf=\"icon\" [class]=\"'state-' + state\" [matTooltip]=\"icon.tooltip\">{{icon.name}}</mat-icon>\n</span>",
913
+ styles: ["mat-icon{font-size:14px;width:14px;height:14px;line-height:normal;margin-left:2px}mat-icon.state-S{color:#5fa099}mat-icon.state-E{color:#fbbc04}mat-icon.state-F{color:#d8524e}.recipient{display:inline-flex;align-items:center}"]
914
+ })
915
+ ], RecipientComponent);
916
+ return RecipientComponent;
917
+ }());
918
+
867
919
  var LinkifyPipe = /** @class */ (function () {
868
920
  function LinkifyPipe() {
869
921
  }
@@ -906,35 +958,6 @@
906
958
  return TruncatePipe;
907
959
  }());
908
960
 
909
- var RecipientComponent = /** @class */ (function () {
910
- function RecipientComponent() {
911
- }
912
- RecipientComponent.prototype.ngOnInit = function () {
913
- var icons = {
914
- 'S': { name: 'check_circle', tooltip: 'Sent' },
915
- 'E': { name: 'offline_bolt', tooltip: 'Sending' },
916
- 'F': { name: 'info', tooltip: 'Failed' },
917
- };
918
- this.icon = icons[this.state];
919
- };
920
- __decorate([
921
- core.Input(),
922
- __metadata("design:type", Object)
923
- ], RecipientComponent.prototype, "name", void 0);
924
- __decorate([
925
- core.Input(),
926
- __metadata("design:type", Object)
927
- ], RecipientComponent.prototype, "state", void 0);
928
- RecipientComponent = __decorate([
929
- core.Component({
930
- selector: 'app-recipient',
931
- template: "<span class=\"recipient\">\n <span class=\"name\">{{name}}</span>\n <mat-icon *ngIf=\"icon\" [class]=\"'state-' + state\" [matTooltip]=\"icon.tooltip\">{{icon.name}}</mat-icon>\n</span>",
932
- styles: ["mat-icon{font-size:14px;width:14px;height:14px;line-height:normal;margin-left:2px}mat-icon.state-S{color:#5fa099}mat-icon.state-E{color:#fbbc04}mat-icon.state-F{color:#d8524e}.recipient{display:inline-flex;align-items:center}"]
933
- })
934
- ], RecipientComponent);
935
- return RecipientComponent;
936
- }());
937
-
938
961
  var FsAppMessageQueuesModule = /** @class */ (function () {
939
962
  function FsAppMessageQueuesModule() {
940
963
  }
@@ -970,6 +993,9 @@
970
993
  exports: [
971
994
  QueuesComponent,
972
995
  QueueComponent,
996
+ ],
997
+ providers: [
998
+ FsMessageQueueService
973
999
  ]
974
1000
  })
975
1001
  ], FsAppMessageQueuesModule);
@@ -1269,6 +1295,7 @@
1269
1295
  exports.FsAppMessageTemplatesModule = FsAppMessageTemplatesModule;
1270
1296
  exports.FsAppMessageWebhooksModule = FsAppMessageWebhooksModule;
1271
1297
  exports.FsAppMessagesModule = FsAppMessagesModule;
1298
+ exports.FsMessageQueueService = FsMessageQueueService;
1272
1299
  exports.MessageComponent = MessageComponent;
1273
1300
  exports.MessagesComponent = MessagesComponent;
1274
1301
  exports.QueueComponent = QueueComponent;