@genesislcap/foundation-fdc3 14.192.0 → 14.192.2-FUI-2127.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,16 @@
1
1
  import { __awaiter, __decorate } from "tslib";
2
- import { attr, customElement, FASTElement } from '@genesislcap/web-core';
2
+ import { LifecycleMixin } from '@genesislcap/foundation-utils';
3
+ import { attr, customElement, FoundationElement } from '@genesislcap/web-core';
3
4
  import { FDC3 } from '../fdc3';
4
5
  /**
5
6
  * fdc3-raise-intent
6
7
  * @alpha
7
8
  */
8
- let Fdc3RaiseIntent = class Fdc3RaiseIntent extends FASTElement {
9
+ let Fdc3RaiseIntent = class Fdc3RaiseIntent extends LifecycleMixin(FoundationElement) {
9
10
  constructor() {
10
11
  super(...arguments);
11
12
  this.sendEventOnChannel = (e) => __awaiter(this, void 0, void 0, function* () {
12
- let id = e.data || e.detail;
13
+ let id = e.detail.data || e.detail;
13
14
  if (this.mappingFunction) {
14
15
  id = this.mappingFunction(id);
15
16
  }
@@ -20,6 +21,13 @@ let Fdc3RaiseIntent = class Fdc3RaiseIntent extends FASTElement {
20
21
  yield this.fdc3.raiseIntent(context, this.intentName);
21
22
  });
22
23
  }
24
+ deepClone() {
25
+ const copy = super.deepClone();
26
+ if (this.mappingFunction) {
27
+ copy.mappingFunction = this.mappingFunction.bind(copy);
28
+ }
29
+ return copy;
30
+ }
23
31
  connectedCallback() {
24
32
  this.parentElement.addEventListener(this.eventName, this.sendEventOnChannel);
25
33
  }
@@ -202,15 +202,25 @@
202
202
  {
203
203
  "kind": "MethodSignature",
204
204
  "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#addChannelListener:member(1)",
205
- "docComment": "/**\n * Helper function to add a context listener on a channel with a handler for channel messages\n *\n * @param channelName - name of the channel\n *\n * @param channelType - type of the channel\n *\n * @param callback - handler to for the channel context listener\n */\n",
205
+ "docComment": "/**\n * Helper function to add a context listener on a channel with a handler for channel messages\n *\n * @param channel - instance of a channel\n *\n * @param channelType - type of the channel context\n *\n * @param callback - handler to for the channel context listener\n */\n",
206
206
  "excerptTokens": [
207
207
  {
208
208
  "kind": "Content",
209
- "text": "addChannelListener(channelName: "
209
+ "text": "addChannelListener(channel: "
210
+ },
211
+ {
212
+ "kind": "Reference",
213
+ "text": "FDC3Channel",
214
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Channel:interface"
210
215
  },
211
216
  {
212
217
  "kind": "Content",
213
- "text": "string"
218
+ "text": " | "
219
+ },
220
+ {
221
+ "kind": "Reference",
222
+ "text": "Channel",
223
+ "canonicalReference": "@finos/fdc3!Channel:interface"
214
224
  },
215
225
  {
216
226
  "kind": "Content",
@@ -257,33 +267,33 @@
257
267
  ],
258
268
  "isOptional": false,
259
269
  "returnTypeTokenRange": {
260
- "startIndex": 7,
261
- "endIndex": 11
270
+ "startIndex": 9,
271
+ "endIndex": 13
262
272
  },
263
273
  "releaseTag": "Public",
264
274
  "overloadIndex": 1,
265
275
  "parameters": [
266
276
  {
267
- "parameterName": "channelName",
277
+ "parameterName": "channel",
268
278
  "parameterTypeTokenRange": {
269
279
  "startIndex": 1,
270
- "endIndex": 2
280
+ "endIndex": 4
271
281
  },
272
282
  "isOptional": false
273
283
  },
274
284
  {
275
285
  "parameterName": "channelType",
276
286
  "parameterTypeTokenRange": {
277
- "startIndex": 3,
278
- "endIndex": 4
287
+ "startIndex": 5,
288
+ "endIndex": 6
279
289
  },
280
290
  "isOptional": false
281
291
  },
282
292
  {
283
293
  "parameterName": "callback",
284
294
  "parameterTypeTokenRange": {
285
- "startIndex": 5,
286
- "endIndex": 6
295
+ "startIndex": 7,
296
+ "endIndex": 8
287
297
  },
288
298
  "isOptional": false
289
299
  }
@@ -515,6 +525,113 @@
515
525
  ],
516
526
  "name": "broadcastOnChannelEventHandler"
517
527
  },
528
+ {
529
+ "kind": "MethodSignature",
530
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#broadcastOnCurrentChannel:member(1)",
531
+ "docComment": "/**\n * Broadcasts a message on the current app channel\n *\n * @param type - type of the channel\n *\n * @param payload - payload sent to the channel\n */\n",
532
+ "excerptTokens": [
533
+ {
534
+ "kind": "Content",
535
+ "text": "broadcastOnCurrentChannel(payload: "
536
+ },
537
+ {
538
+ "kind": "Content",
539
+ "text": "any"
540
+ },
541
+ {
542
+ "kind": "Content",
543
+ "text": ", type?: "
544
+ },
545
+ {
546
+ "kind": "Content",
547
+ "text": "string"
548
+ },
549
+ {
550
+ "kind": "Content",
551
+ "text": "): "
552
+ },
553
+ {
554
+ "kind": "Reference",
555
+ "text": "Promise",
556
+ "canonicalReference": "!Promise:interface"
557
+ },
558
+ {
559
+ "kind": "Content",
560
+ "text": "<void>"
561
+ },
562
+ {
563
+ "kind": "Content",
564
+ "text": ";"
565
+ }
566
+ ],
567
+ "isOptional": false,
568
+ "returnTypeTokenRange": {
569
+ "startIndex": 5,
570
+ "endIndex": 7
571
+ },
572
+ "releaseTag": "Public",
573
+ "overloadIndex": 1,
574
+ "parameters": [
575
+ {
576
+ "parameterName": "payload",
577
+ "parameterTypeTokenRange": {
578
+ "startIndex": 1,
579
+ "endIndex": 2
580
+ },
581
+ "isOptional": false
582
+ },
583
+ {
584
+ "parameterName": "type",
585
+ "parameterTypeTokenRange": {
586
+ "startIndex": 3,
587
+ "endIndex": 4
588
+ },
589
+ "isOptional": true
590
+ }
591
+ ],
592
+ "name": "broadcastOnCurrentChannel"
593
+ },
594
+ {
595
+ "kind": "PropertySignature",
596
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#currentChannelObs:member",
597
+ "docComment": "/**\n * Observable which emits the current channel When a new channel is joined a new value is emitted\n *\n * @public\n */\n",
598
+ "excerptTokens": [
599
+ {
600
+ "kind": "Content",
601
+ "text": "currentChannelObs: "
602
+ },
603
+ {
604
+ "kind": "Reference",
605
+ "text": "Observable",
606
+ "canonicalReference": "rxjs!Observable:class"
607
+ },
608
+ {
609
+ "kind": "Content",
610
+ "text": "<"
611
+ },
612
+ {
613
+ "kind": "Reference",
614
+ "text": "FDC3Channel",
615
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Channel:interface"
616
+ },
617
+ {
618
+ "kind": "Content",
619
+ "text": ">"
620
+ },
621
+ {
622
+ "kind": "Content",
623
+ "text": ";"
624
+ }
625
+ ],
626
+ "isReadonly": false,
627
+ "isOptional": false,
628
+ "releaseTag": "Public",
629
+ "name": "currentChannelObs",
630
+ "propertyTypeTokenRange": {
631
+ "startIndex": 1,
632
+ "endIndex": 5
633
+ }
634
+ },
518
635
  {
519
636
  "kind": "MethodSignature",
520
637
  "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#findIntent:member(1)",
@@ -753,18 +870,46 @@
753
870
  ],
754
871
  "name": "getOrCreateChannel"
755
872
  },
873
+ {
874
+ "kind": "MethodSignature",
875
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#init:member(1)",
876
+ "docComment": "/**\n * Method to initialize the fdc3 service. The service will check if the fdc3 agent has been initialized and emit via the isReadyObs when ready. The service will store the current app channel internally\n */\n",
877
+ "excerptTokens": [
878
+ {
879
+ "kind": "Content",
880
+ "text": "init(): "
881
+ },
882
+ {
883
+ "kind": "Content",
884
+ "text": "void"
885
+ },
886
+ {
887
+ "kind": "Content",
888
+ "text": ";"
889
+ }
890
+ ],
891
+ "isOptional": false,
892
+ "returnTypeTokenRange": {
893
+ "startIndex": 1,
894
+ "endIndex": 2
895
+ },
896
+ "releaseTag": "Public",
897
+ "overloadIndex": 1,
898
+ "parameters": [],
899
+ "name": "init"
900
+ },
756
901
  {
757
902
  "kind": "PropertySignature",
758
- "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#isReady:member",
759
- "docComment": "/**\n * Whether the FDC3 API is ready.\n *\n * @public\n */\n",
903
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#isInteropFdc3:member",
904
+ "docComment": "/**\n * Check if the interop global is available.\n *\n * @public\n */\n",
760
905
  "excerptTokens": [
761
906
  {
762
907
  "kind": "Content",
763
- "text": "isReady: "
908
+ "text": "isInteropFdc3: "
764
909
  },
765
910
  {
766
911
  "kind": "Content",
767
- "text": "boolean"
912
+ "text": "() => boolean"
768
913
  },
769
914
  {
770
915
  "kind": "Content",
@@ -774,12 +919,44 @@
774
919
  "isReadonly": false,
775
920
  "isOptional": false,
776
921
  "releaseTag": "Public",
777
- "name": "isReady",
922
+ "name": "isInteropFdc3",
778
923
  "propertyTypeTokenRange": {
779
924
  "startIndex": 1,
780
925
  "endIndex": 2
781
926
  }
782
927
  },
928
+ {
929
+ "kind": "PropertySignature",
930
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#isReadyObs:member",
931
+ "docComment": "/**\n * Observable indicating the FDC3 API is ready.\n *\n * @public\n */\n",
932
+ "excerptTokens": [
933
+ {
934
+ "kind": "Content",
935
+ "text": "isReadyObs: "
936
+ },
937
+ {
938
+ "kind": "Reference",
939
+ "text": "Observable",
940
+ "canonicalReference": "rxjs!Observable:class"
941
+ },
942
+ {
943
+ "kind": "Content",
944
+ "text": "<true>"
945
+ },
946
+ {
947
+ "kind": "Content",
948
+ "text": ";"
949
+ }
950
+ ],
951
+ "isReadonly": false,
952
+ "isOptional": false,
953
+ "releaseTag": "Public",
954
+ "name": "isReadyObs",
955
+ "propertyTypeTokenRange": {
956
+ "startIndex": 1,
957
+ "endIndex": 3
958
+ }
959
+ },
783
960
  {
784
961
  "kind": "MethodSignature",
785
962
  "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#joinChannel:member(1)",
@@ -906,6 +1083,66 @@
906
1083
  }
907
1084
  ],
908
1085
  "name": "raiseIntent"
1086
+ },
1087
+ {
1088
+ "kind": "MethodSignature",
1089
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3#raiseIntentForContext:member(1)",
1090
+ "docComment": "/**\n * Raises an intent against an application based purely on the context data.\n *\n * @param context - The context to use.\n *\n * @returns A promise that resolves with the result of the intent resolution.\n *\n * @public\n */\n",
1091
+ "excerptTokens": [
1092
+ {
1093
+ "kind": "Content",
1094
+ "text": "raiseIntentForContext(context: "
1095
+ },
1096
+ {
1097
+ "kind": "Reference",
1098
+ "text": "FDC3Context",
1099
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3Context:interface"
1100
+ },
1101
+ {
1102
+ "kind": "Content",
1103
+ "text": "): "
1104
+ },
1105
+ {
1106
+ "kind": "Reference",
1107
+ "text": "Promise",
1108
+ "canonicalReference": "!Promise:interface"
1109
+ },
1110
+ {
1111
+ "kind": "Content",
1112
+ "text": "<"
1113
+ },
1114
+ {
1115
+ "kind": "Reference",
1116
+ "text": "FDC3IntentResolution",
1117
+ "canonicalReference": "@genesislcap/foundation-fdc3!FDC3IntentResolution:interface"
1118
+ },
1119
+ {
1120
+ "kind": "Content",
1121
+ "text": ">"
1122
+ },
1123
+ {
1124
+ "kind": "Content",
1125
+ "text": ";"
1126
+ }
1127
+ ],
1128
+ "isOptional": false,
1129
+ "returnTypeTokenRange": {
1130
+ "startIndex": 3,
1131
+ "endIndex": 7
1132
+ },
1133
+ "releaseTag": "Public",
1134
+ "overloadIndex": 1,
1135
+ "parameters": [
1136
+ {
1137
+ "parameterName": "context",
1138
+ "parameterTypeTokenRange": {
1139
+ "startIndex": 1,
1140
+ "endIndex": 2
1141
+ },
1142
+ "isOptional": false
1143
+ }
1144
+ ],
1145
+ "name": "raiseIntentForContext"
909
1146
  }
910
1147
  ],
911
1148
  "extendsTokenRanges": []