@ua/react-native-airship 23.0.0 → 23.1.0

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 (210) hide show
  1. package/android/gradle.properties +1 -1
  2. package/ios/AirshipReactNative.swift +12 -1
  3. package/ios/MessageWebViewWrapper.swift +1 -0
  4. package/lib/module/AirshipEmbeddedView.js +1 -1
  5. package/lib/module/AirshipEmbeddedView.js.map +1 -1
  6. package/lib/module/MessageView.js +1 -1
  7. package/lib/module/MessageView.js.map +1 -1
  8. package/lib/module/NativeRNAirship.ts +138 -0
  9. package/lib/module/RNAirshipEmbeddedViewNativeComponent.ts +9 -0
  10. package/lib/module/RNAirshipMessageViewNativeComponent.ts +41 -0
  11. package/lib/typescript/package.json +1 -0
  12. package/lib/typescript/src/AirshipActions.d.ts.map +1 -0
  13. package/lib/typescript/src/AirshipAnalytics.d.ts.map +1 -0
  14. package/lib/typescript/src/AirshipChannel.d.ts.map +1 -0
  15. package/lib/typescript/src/AirshipContact.d.ts.map +1 -0
  16. package/lib/typescript/src/AirshipEmbeddedView.d.ts.map +1 -0
  17. package/lib/typescript/src/AirshipFeatureFlagManager.d.ts.map +1 -0
  18. package/lib/typescript/src/AirshipInApp.d.ts.map +1 -0
  19. package/lib/typescript/src/AirshipLiveActivityManager.d.ts.map +1 -0
  20. package/lib/typescript/src/AirshipLiveUpdateManager.d.ts.map +1 -0
  21. package/lib/typescript/src/AirshipLocale.d.ts.map +1 -0
  22. package/lib/typescript/src/AirshipMessageCenter.d.ts.map +1 -0
  23. package/lib/typescript/src/AirshipPreferenceCenter.d.ts.map +1 -0
  24. package/lib/typescript/src/AirshipPrivacyManager.d.ts.map +1 -0
  25. package/lib/typescript/src/AirshipPush.d.ts.map +1 -0
  26. package/lib/typescript/src/AirshipRoot.d.ts.map +1 -0
  27. package/lib/typescript/src/AttributeEditor.d.ts.map +1 -0
  28. package/lib/typescript/src/MessageView.d.ts.map +1 -0
  29. package/lib/typescript/src/NativeRNAirship.d.ts.map +1 -0
  30. package/lib/typescript/src/RNAirshipEmbeddedViewNativeComponent.d.ts.map +1 -0
  31. package/lib/typescript/src/RNAirshipMessageViewNativeComponent.d.ts.map +1 -0
  32. package/lib/typescript/src/ScopedSubscriptionListEditor.d.ts.map +1 -0
  33. package/lib/typescript/src/SubscriptionListEditor.d.ts.map +1 -0
  34. package/lib/typescript/src/TagEditor.d.ts.map +1 -0
  35. package/lib/typescript/src/TagGroupEditor.d.ts.map +1 -0
  36. package/lib/typescript/src/UAEventEmitter.d.ts.map +1 -0
  37. package/lib/typescript/src/index.d.ts.map +1 -0
  38. package/lib/typescript/src/types.d.ts.map +1 -0
  39. package/package.json +24 -62
  40. package/react-native-airship.podspec +1 -1
  41. package/lib/commonjs/AirshipActions.js +0 -31
  42. package/lib/commonjs/AirshipActions.js.map +0 -1
  43. package/lib/commonjs/AirshipAnalytics.js +0 -54
  44. package/lib/commonjs/AirshipAnalytics.js.map +0 -1
  45. package/lib/commonjs/AirshipChannel.js +0 -115
  46. package/lib/commonjs/AirshipChannel.js.map +0 -1
  47. package/lib/commonjs/AirshipContact.js +0 -90
  48. package/lib/commonjs/AirshipContact.js.map +0 -1
  49. package/lib/commonjs/AirshipEmbeddedView.js +0 -28
  50. package/lib/commonjs/AirshipEmbeddedView.js.map +0 -1
  51. package/lib/commonjs/AirshipFeatureFlagManager.js +0 -76
  52. package/lib/commonjs/AirshipFeatureFlagManager.js.map +0 -1
  53. package/lib/commonjs/AirshipInApp.js +0 -108
  54. package/lib/commonjs/AirshipInApp.js.map +0 -1
  55. package/lib/commonjs/AirshipLiveActivityManager.js +0 -61
  56. package/lib/commonjs/AirshipLiveActivityManager.js.map +0 -1
  57. package/lib/commonjs/AirshipLiveUpdateManager.js +0 -68
  58. package/lib/commonjs/AirshipLiveUpdateManager.js.map +0 -1
  59. package/lib/commonjs/AirshipLocale.js +0 -41
  60. package/lib/commonjs/AirshipLocale.js.map +0 -1
  61. package/lib/commonjs/AirshipMessageCenter.js +0 -111
  62. package/lib/commonjs/AirshipMessageCenter.js.map +0 -1
  63. package/lib/commonjs/AirshipPreferenceCenter.js +0 -48
  64. package/lib/commonjs/AirshipPreferenceCenter.js.map +0 -1
  65. package/lib/commonjs/AirshipPrivacyManager.js +0 -60
  66. package/lib/commonjs/AirshipPrivacyManager.js.map +0 -1
  67. package/lib/commonjs/AirshipPush.js +0 -264
  68. package/lib/commonjs/AirshipPush.js.map +0 -1
  69. package/lib/commonjs/AirshipRoot.js +0 -115
  70. package/lib/commonjs/AirshipRoot.js.map +0 -1
  71. package/lib/commonjs/AttributeEditor.js +0 -89
  72. package/lib/commonjs/AttributeEditor.js.map +0 -1
  73. package/lib/commonjs/MessageView.js +0 -85
  74. package/lib/commonjs/MessageView.js.map +0 -1
  75. package/lib/commonjs/NativeRNAirship.js +0 -9
  76. package/lib/commonjs/NativeRNAirship.js.map +0 -1
  77. package/lib/commonjs/RNAirshipEmbeddedViewNativeComponent.js +0 -11
  78. package/lib/commonjs/RNAirshipEmbeddedViewNativeComponent.js.map +0 -1
  79. package/lib/commonjs/RNAirshipMessageViewNativeComponent.js +0 -11
  80. package/lib/commonjs/RNAirshipMessageViewNativeComponent.js.map +0 -1
  81. package/lib/commonjs/ScopedSubscriptionListEditor.js +0 -76
  82. package/lib/commonjs/ScopedSubscriptionListEditor.js.map +0 -1
  83. package/lib/commonjs/SubscriptionListEditor.js +0 -70
  84. package/lib/commonjs/SubscriptionListEditor.js.map +0 -1
  85. package/lib/commonjs/TagEditor.js +0 -66
  86. package/lib/commonjs/TagEditor.js.map +0 -1
  87. package/lib/commonjs/TagGroupEditor.js +0 -87
  88. package/lib/commonjs/TagGroupEditor.js.map +0 -1
  89. package/lib/commonjs/UAEventEmitter.js +0 -79
  90. package/lib/commonjs/UAEventEmitter.js.map +0 -1
  91. package/lib/commonjs/index.js +0 -217
  92. package/lib/commonjs/index.js.map +0 -1
  93. package/lib/commonjs/types.js +0 -340
  94. package/lib/commonjs/types.js.map +0 -1
  95. package/lib/module/NativeRNAirship.js +0 -5
  96. package/lib/module/NativeRNAirship.js.map +0 -1
  97. package/lib/module/RNAirshipEmbeddedViewNativeComponent.js +0 -6
  98. package/lib/module/RNAirshipEmbeddedViewNativeComponent.js.map +0 -1
  99. package/lib/module/RNAirshipMessageViewNativeComponent.js +0 -6
  100. package/lib/module/RNAirshipMessageViewNativeComponent.js.map +0 -1
  101. package/lib/typescript/commonjs/package.json +0 -1
  102. package/lib/typescript/commonjs/src/AirshipActions.d.ts.map +0 -1
  103. package/lib/typescript/commonjs/src/AirshipAnalytics.d.ts.map +0 -1
  104. package/lib/typescript/commonjs/src/AirshipChannel.d.ts.map +0 -1
  105. package/lib/typescript/commonjs/src/AirshipContact.d.ts.map +0 -1
  106. package/lib/typescript/commonjs/src/AirshipEmbeddedView.d.ts.map +0 -1
  107. package/lib/typescript/commonjs/src/AirshipFeatureFlagManager.d.ts.map +0 -1
  108. package/lib/typescript/commonjs/src/AirshipInApp.d.ts.map +0 -1
  109. package/lib/typescript/commonjs/src/AirshipLiveActivityManager.d.ts.map +0 -1
  110. package/lib/typescript/commonjs/src/AirshipLiveUpdateManager.d.ts.map +0 -1
  111. package/lib/typescript/commonjs/src/AirshipLocale.d.ts.map +0 -1
  112. package/lib/typescript/commonjs/src/AirshipMessageCenter.d.ts.map +0 -1
  113. package/lib/typescript/commonjs/src/AirshipPreferenceCenter.d.ts.map +0 -1
  114. package/lib/typescript/commonjs/src/AirshipPrivacyManager.d.ts.map +0 -1
  115. package/lib/typescript/commonjs/src/AirshipPush.d.ts.map +0 -1
  116. package/lib/typescript/commonjs/src/AirshipRoot.d.ts.map +0 -1
  117. package/lib/typescript/commonjs/src/AttributeEditor.d.ts.map +0 -1
  118. package/lib/typescript/commonjs/src/MessageView.d.ts.map +0 -1
  119. package/lib/typescript/commonjs/src/NativeRNAirship.d.ts.map +0 -1
  120. package/lib/typescript/commonjs/src/RNAirshipEmbeddedViewNativeComponent.d.ts.map +0 -1
  121. package/lib/typescript/commonjs/src/RNAirshipMessageViewNativeComponent.d.ts.map +0 -1
  122. package/lib/typescript/commonjs/src/ScopedSubscriptionListEditor.d.ts.map +0 -1
  123. package/lib/typescript/commonjs/src/SubscriptionListEditor.d.ts.map +0 -1
  124. package/lib/typescript/commonjs/src/TagEditor.d.ts.map +0 -1
  125. package/lib/typescript/commonjs/src/TagGroupEditor.d.ts.map +0 -1
  126. package/lib/typescript/commonjs/src/UAEventEmitter.d.ts.map +0 -1
  127. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  128. package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
  129. package/lib/typescript/module/src/AirshipActions.d.ts +0 -18
  130. package/lib/typescript/module/src/AirshipActions.d.ts.map +0 -1
  131. package/lib/typescript/module/src/AirshipAnalytics.d.ts +0 -35
  132. package/lib/typescript/module/src/AirshipAnalytics.d.ts.map +0 -1
  133. package/lib/typescript/module/src/AirshipChannel.d.ts +0 -69
  134. package/lib/typescript/module/src/AirshipChannel.d.ts.map +0 -1
  135. package/lib/typescript/module/src/AirshipContact.d.ts +0 -53
  136. package/lib/typescript/module/src/AirshipContact.d.ts.map +0 -1
  137. package/lib/typescript/module/src/AirshipEmbeddedView.d.ts +0 -19
  138. package/lib/typescript/module/src/AirshipEmbeddedView.d.ts.map +0 -1
  139. package/lib/typescript/module/src/AirshipFeatureFlagManager.d.ts +0 -51
  140. package/lib/typescript/module/src/AirshipFeatureFlagManager.d.ts.map +0 -1
  141. package/lib/typescript/module/src/AirshipInApp.d.ts +0 -47
  142. package/lib/typescript/module/src/AirshipInApp.d.ts.map +0 -1
  143. package/lib/typescript/module/src/AirshipLiveActivityManager.d.ts +0 -39
  144. package/lib/typescript/module/src/AirshipLiveActivityManager.d.ts.map +0 -1
  145. package/lib/typescript/module/src/AirshipLiveUpdateManager.d.ts +0 -43
  146. package/lib/typescript/module/src/AirshipLiveUpdateManager.d.ts.map +0 -1
  147. package/lib/typescript/module/src/AirshipLocale.d.ts +0 -24
  148. package/lib/typescript/module/src/AirshipLocale.d.ts.map +0 -1
  149. package/lib/typescript/module/src/AirshipMessageCenter.d.ts +0 -74
  150. package/lib/typescript/module/src/AirshipMessageCenter.d.ts.map +0 -1
  151. package/lib/typescript/module/src/AirshipPreferenceCenter.d.ts +0 -32
  152. package/lib/typescript/module/src/AirshipPreferenceCenter.d.ts.map +0 -1
  153. package/lib/typescript/module/src/AirshipPrivacyManager.d.ts +0 -38
  154. package/lib/typescript/module/src/AirshipPrivacyManager.d.ts.map +0 -1
  155. package/lib/typescript/module/src/AirshipPush.d.ts +0 -161
  156. package/lib/typescript/module/src/AirshipPush.d.ts.map +0 -1
  157. package/lib/typescript/module/src/AirshipRoot.d.ts +0 -84
  158. package/lib/typescript/module/src/AirshipRoot.d.ts.map +0 -1
  159. package/lib/typescript/module/src/AttributeEditor.d.ts +0 -55
  160. package/lib/typescript/module/src/AttributeEditor.d.ts.map +0 -1
  161. package/lib/typescript/module/src/MessageView.d.ts +0 -108
  162. package/lib/typescript/module/src/MessageView.d.ts.map +0 -1
  163. package/lib/typescript/module/src/NativeRNAirship.d.ts +0 -99
  164. package/lib/typescript/module/src/NativeRNAirship.d.ts.map +0 -1
  165. package/lib/typescript/module/src/RNAirshipEmbeddedViewNativeComponent.d.ts +0 -7
  166. package/lib/typescript/module/src/RNAirshipEmbeddedViewNativeComponent.d.ts.map +0 -1
  167. package/lib/typescript/module/src/RNAirshipMessageViewNativeComponent.d.ts +0 -26
  168. package/lib/typescript/module/src/RNAirshipMessageViewNativeComponent.d.ts.map +0 -1
  169. package/lib/typescript/module/src/ScopedSubscriptionListEditor.d.ts +0 -60
  170. package/lib/typescript/module/src/ScopedSubscriptionListEditor.d.ts.map +0 -1
  171. package/lib/typescript/module/src/SubscriptionListEditor.d.ts +0 -51
  172. package/lib/typescript/module/src/SubscriptionListEditor.d.ts.map +0 -1
  173. package/lib/typescript/module/src/TagEditor.d.ts +0 -47
  174. package/lib/typescript/module/src/TagEditor.d.ts.map +0 -1
  175. package/lib/typescript/module/src/TagGroupEditor.d.ts +0 -61
  176. package/lib/typescript/module/src/TagGroupEditor.d.ts.map +0 -1
  177. package/lib/typescript/module/src/UAEventEmitter.d.ts +0 -27
  178. package/lib/typescript/module/src/UAEventEmitter.d.ts.map +0 -1
  179. package/lib/typescript/module/src/index.d.ts +0 -25
  180. package/lib/typescript/module/src/index.d.ts.map +0 -1
  181. package/lib/typescript/module/src/types.d.ts +0 -938
  182. package/lib/typescript/module/src/types.d.ts.map +0 -1
  183. /package/lib/{typescript/module → module}/package.json +0 -0
  184. /package/lib/typescript/{commonjs/src → src}/AirshipActions.d.ts +0 -0
  185. /package/lib/typescript/{commonjs/src → src}/AirshipAnalytics.d.ts +0 -0
  186. /package/lib/typescript/{commonjs/src → src}/AirshipChannel.d.ts +0 -0
  187. /package/lib/typescript/{commonjs/src → src}/AirshipContact.d.ts +0 -0
  188. /package/lib/typescript/{commonjs/src → src}/AirshipEmbeddedView.d.ts +0 -0
  189. /package/lib/typescript/{commonjs/src → src}/AirshipFeatureFlagManager.d.ts +0 -0
  190. /package/lib/typescript/{commonjs/src → src}/AirshipInApp.d.ts +0 -0
  191. /package/lib/typescript/{commonjs/src → src}/AirshipLiveActivityManager.d.ts +0 -0
  192. /package/lib/typescript/{commonjs/src → src}/AirshipLiveUpdateManager.d.ts +0 -0
  193. /package/lib/typescript/{commonjs/src → src}/AirshipLocale.d.ts +0 -0
  194. /package/lib/typescript/{commonjs/src → src}/AirshipMessageCenter.d.ts +0 -0
  195. /package/lib/typescript/{commonjs/src → src}/AirshipPreferenceCenter.d.ts +0 -0
  196. /package/lib/typescript/{commonjs/src → src}/AirshipPrivacyManager.d.ts +0 -0
  197. /package/lib/typescript/{commonjs/src → src}/AirshipPush.d.ts +0 -0
  198. /package/lib/typescript/{commonjs/src → src}/AirshipRoot.d.ts +0 -0
  199. /package/lib/typescript/{commonjs/src → src}/AttributeEditor.d.ts +0 -0
  200. /package/lib/typescript/{commonjs/src → src}/MessageView.d.ts +0 -0
  201. /package/lib/typescript/{commonjs/src → src}/NativeRNAirship.d.ts +0 -0
  202. /package/lib/typescript/{commonjs/src → src}/RNAirshipEmbeddedViewNativeComponent.d.ts +0 -0
  203. /package/lib/typescript/{commonjs/src → src}/RNAirshipMessageViewNativeComponent.d.ts +0 -0
  204. /package/lib/typescript/{commonjs/src → src}/ScopedSubscriptionListEditor.d.ts +0 -0
  205. /package/lib/typescript/{commonjs/src → src}/SubscriptionListEditor.d.ts +0 -0
  206. /package/lib/typescript/{commonjs/src → src}/TagEditor.d.ts +0 -0
  207. /package/lib/typescript/{commonjs/src → src}/TagGroupEditor.d.ts +0 -0
  208. /package/lib/typescript/{commonjs/src → src}/UAEventEmitter.d.ts +0 -0
  209. /package/lib/typescript/{commonjs/src → src}/index.d.ts +0 -0
  210. /package/lib/typescript/{commonjs/src → src}/types.d.ts +0 -0
@@ -1,89 +0,0 @@
1
- /* Copyright Airship and Contributors */
2
-
3
- 'use strict';
4
-
5
- /**
6
- * Attribute operation
7
- * @hidden
8
- */
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- exports.AttributeEditor = void 0;
13
- /**
14
- * Editor for attributes.
15
- */
16
- class AttributeEditor {
17
- /**
18
- * AttributeEditor constructor
19
- *
20
- * @hidden
21
- * @param onApply The apply function
22
- */
23
- constructor(onApply) {
24
- this.onApply = onApply;
25
- this.operations = [];
26
- }
27
-
28
- /**
29
- * Adds an attribute.
30
- *
31
- * @param value The attribute value.
32
- * @param name The attribute name.
33
- * @return The attribute editor instance.
34
- */
35
- setAttribute(name, value) {
36
- var attributeValue;
37
- var attributeType;
38
- if (typeof value === 'boolean') {
39
- // No boolean attribute type. Convert value to string.
40
- attributeValue = value.toString();
41
- attributeType = 'string';
42
- } else {
43
- attributeValue = value;
44
- if (typeof value === 'string') {
45
- attributeType = 'string';
46
- } else if (typeof attributeValue === 'number') {
47
- attributeType = 'number';
48
- } else if (value instanceof Date) {
49
- // JavaScript's date type doesn't pass through the JS to native bridge.
50
- // Dates are instead serialized as milliseconds since epoch.
51
- attributeType = 'date';
52
- attributeValue = value.getTime();
53
- } else {
54
- throw 'Unsupported attribute type: ' + typeof attributeValue;
55
- }
56
- }
57
- const operation = {
58
- action: 'set',
59
- value: attributeValue,
60
- key: name,
61
- type: attributeType
62
- };
63
- this.operations.push(operation);
64
- return this;
65
- }
66
-
67
- /**
68
- * Removes an attribute.
69
- * @param name The name of the attribute to remove.
70
- * @return The attribute editor instance.
71
- */
72
- removeAttribute(name) {
73
- const operation = {
74
- action: 'remove',
75
- key: name
76
- };
77
- this.operations.push(operation);
78
- return this;
79
- }
80
-
81
- /**
82
- * Applies the attribute operations.
83
- */
84
- apply() {
85
- return this.onApply(this.operations);
86
- }
87
- }
88
- exports.AttributeEditor = AttributeEditor;
89
- //# sourceMappingURL=AttributeEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","AttributeEditor","constructor","onApply","operations","setAttribute","name","attributeValue","attributeType","toString","Date","getTime","operation","action","key","type","push","removeAttribute","apply"],"sourceRoot":"../../src","sources":["AttributeEditor.ts"],"mappings":"AAAA;;AAEA,YAAY;;AAEZ;AACA;AACA;AACA;AAHAA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,eAAA;AAuBA;AACA;AACA;AACO,MAAMA,eAAe,CAAC;EAI3B;AACF;AACA;AACA;AACA;AACA;EACEC,WAAWA,CAACC,OAA4D,EAAE;IACxE,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAG,EAAE;EACtB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,YAAYA,CACVC,IAAY,EACZN,KAAuC,EACtB;IACjB,IAAIO,cAAsC;IAC1C,IAAIC,aAA2C;IAE/C,IAAI,OAAOR,KAAK,KAAK,SAAS,EAAE;MAC9B;MACAO,cAAc,GAAGP,KAAK,CAACS,QAAQ,CAAC,CAAC;MACjCD,aAAa,GAAG,QAAQ;IAC1B,CAAC,MAAM;MACLD,cAAc,GAAGP,KAAK;MACtB,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;QAC7BQ,aAAa,GAAG,QAAQ;MAC1B,CAAC,MAAM,IAAI,OAAOD,cAAc,KAAK,QAAQ,EAAE;QAC7CC,aAAa,GAAG,QAAQ;MAC1B,CAAC,MAAM,IAAIR,KAAK,YAAYU,IAAI,EAAE;QAChC;QACA;QACAF,aAAa,GAAG,MAAM;QACtBD,cAAc,GAAGP,KAAK,CAACW,OAAO,CAAC,CAAC;MAClC,CAAC,MAAM;QACL,MAAM,8BAA8B,GAAG,OAAOJ,cAAc;MAC9D;IACF;IAEA,MAAMK,SAAS,GAAG;MAChBC,MAAM,EAAE,KAAK;MACbb,KAAK,EAAEO,cAAc;MACrBO,GAAG,EAAER,IAAI;MACTS,IAAI,EAAEP;IACR,CAAC;IACD,IAAI,CAACJ,UAAU,CAACY,IAAI,CAACJ,SAAS,CAAC;IAE/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACEK,eAAeA,CAACX,IAAY,EAAmB;IAC7C,MAAMM,SAAS,GAAG;MAAEC,MAAM,EAAE,QAAQ;MAAEC,GAAG,EAAER;IAAK,CAAC;IACjD,IAAI,CAACF,UAAU,CAACY,IAAI,CAACJ,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;EACEM,KAAKA,CAAA,EAAkB;IACrB,OAAO,IAAI,CAACf,OAAO,CAAC,IAAI,CAACC,UAAU,CAAC;EACtC;AACF;AAACL,OAAA,CAAAE,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1,85 +0,0 @@
1
- /* Copyright Airship and Contributors */
2
-
3
- 'use strict';
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.MessageView = exports.MessageLoadError = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _RNAirshipMessageViewNativeComponent = _interopRequireDefault(require("./RNAirshipMessageViewNativeComponent.js"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- /**
14
- * Enum of possible message load errors
15
- */
16
- let MessageLoadError = exports.MessageLoadError = /*#__PURE__*/function (MessageLoadError) {
17
- /**
18
- * The message is not available.
19
- */
20
- MessageLoadError["NotAvailable"] = "MESSAGE_NOT_AVAILABLE";
21
- /**
22
- * Failed to fetch the message.
23
- */
24
- MessageLoadError["FetchFailed"] = "FAILED_TO_FETCH_MESSAGE";
25
- /**
26
- * Failed to load the message.
27
- */
28
- MessageLoadError["LoadFailed"] = "MESSAGE_LOAD_FAILED";
29
- return MessageLoadError;
30
- }({});
31
- /**
32
- * Message load started event.
33
- */
34
- /**
35
- * Message load finished event.
36
- */
37
- /**
38
- * Message load error event.
39
- */
40
- /**
41
- * Message closed event
42
- */
43
- /**
44
- * MessageView props
45
- */
46
- /**
47
- * Inbox message view component.
48
- */
49
- class MessageView extends _react.default.Component {
50
- _onLoadStarted = event => {
51
- if (!this.props.onLoadStarted) {
52
- return;
53
- }
54
- this.props.onLoadStarted(event.nativeEvent);
55
- };
56
- _onLoadFinished = event => {
57
- if (!this.props.onLoadFinished) {
58
- return;
59
- }
60
- this.props.onLoadFinished(event.nativeEvent);
61
- };
62
- _onLoadError = event => {
63
- if (!this.props.onLoadError) {
64
- return;
65
- }
66
- this.props.onLoadError(event.nativeEvent);
67
- };
68
- _onClose = event => {
69
- if (!this.props.onClose) {
70
- return;
71
- }
72
- this.props.onClose(event.nativeEvent);
73
- };
74
- render() {
75
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RNAirshipMessageViewNativeComponent.default, {
76
- ...this.props,
77
- onLoadError: this._onLoadError,
78
- onLoadStarted: this._onLoadStarted,
79
- onLoadFinished: this._onLoadFinished,
80
- onClose: this._onClose
81
- });
82
- }
83
- }
84
- exports.MessageView = MessageView;
85
- //# sourceMappingURL=MessageView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","MessageView","MessageLoadError","_react","_interopRequireDefault","require","_RNAirshipMessageViewNativeComponent","_jsxRuntime","e","__esModule","default","React","Component","_onLoadStarted","event","props","onLoadStarted","nativeEvent","_onLoadFinished","onLoadFinished","_onLoadError","onLoadError","_onClose","onClose","render","jsx"],"sourceRoot":"../../src","sources":["MessageView.tsx"],"mappings":"AAAA;;AAEA,YAAY;;AAACA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,WAAA,GAAAF,OAAA,CAAAG,gBAAA;AAEb,IAAAC,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,oCAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAyE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzE;AACA;AACA;AAFA,IAGYN,gBAAgB,GAAAH,OAAA,CAAAG,gBAAA,0BAAhBA,gBAAgB;EAC1B;AACF;AACA;EAHYA,gBAAgB;EAK1B;AACF;AACA;EAPYA,gBAAgB;EAS1B;AACF;AACA;EAXYA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAe5B;AACA;AACA;AAQA;AACA;AACA;AAQA;AACA;AACA;AAgBA;AACA;AACA;AAQA;AACA;AACA;AAmCA;AACA;AACA;AACO,MAAMD,WAAW,SAASU,cAAK,CAACC,SAAS,CAAmB;EACjEC,cAAc,GAAIC,KAAoD,IAAK;IACzE,IAAI,CAAC,IAAI,CAACC,KAAK,CAACC,aAAa,EAAE;MAC7B;IACF;IACA,IAAI,CAACD,KAAK,CAACC,aAAa,CAACF,KAAK,CAACG,WAAW,CAAC;EAC7C,CAAC;EAEDC,eAAe,GAAIJ,KAAqD,IAAK;IAC3E,IAAI,CAAC,IAAI,CAACC,KAAK,CAACI,cAAc,EAAE;MAC9B;IACF;IACA,IAAI,CAACJ,KAAK,CAACI,cAAc,CAACL,KAAK,CAACG,WAAW,CAAC;EAC9C,CAAC;EAEDG,YAAY,GAAIN,KAAkD,IAAK;IACrE,IAAI,CAAC,IAAI,CAACC,KAAK,CAACM,WAAW,EAAE;MAC3B;IACF;IACA,IAAI,CAACN,KAAK,CAACM,WAAW,CAACP,KAAK,CAACG,WAAW,CAAC;EAC3C,CAAC;EAEDK,QAAQ,GAAIR,KAA+C,IAAK;IAC9D,IAAI,CAAC,IAAI,CAACC,KAAK,CAACQ,OAAO,EAAE;MACvB;IACF;IACA,IAAI,CAACR,KAAK,CAACQ,OAAO,CAACT,KAAK,CAACG,WAAW,CAAC;EACvC,CAAC;EAEDO,MAAMA,CAAA,EAAG;IACP,oBACE,IAAAjB,WAAA,CAAAkB,GAAA,EAACnB,oCAAA,CAAAI,OAAoB;MAAA,GACf,IAAI,CAACK,KAAK;MACdM,WAAW,EAAE,IAAI,CAACD,YAAa;MAC/BJ,aAAa,EAAE,IAAI,CAACH,cAAe;MACnCM,cAAc,EAAE,IAAI,CAACD,eAAgB;MACrCK,OAAO,EAAE,IAAI,CAACD;IAAS,CACxB,CAAC;EAEN;AACF;AAACvB,OAAA,CAAAE,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _reactNative = require("react-native");
8
- var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('RNAirship');
9
- //# sourceMappingURL=NativeRNAirship.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRNAirship.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAwIpCC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- // @ts-ignore
10
- var _default = exports.default = (0, _codegenNativeComponent.default)('RNAirshipEmbeddedView');
11
- //# sourceMappingURL=RNAirshipEmbeddedViewNativeComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent"],"sourceRoot":"../../src","sources":["RNAirshipEmbeddedViewNativeComponent.ts"],"mappings":";;;;;;AACA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAD7F;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAQe,IAAAG,+BAAsB,EAAc,uBAAuB,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- // @ts-ignore
10
- var _default = exports.default = (0, _codegenNativeComponent.default)('RNAirshipMessageView');
11
- //# sourceMappingURL=RNAirshipMessageViewNativeComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent"],"sourceRoot":"../../src","sources":["RNAirshipMessageViewNativeComponent.ts"],"mappings":";;;;;;AACA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAD7F;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAwCe,IAAAG,+BAAsB,EAAc,sBAAsB,CAAC","ignoreList":[]}
@@ -1,76 +0,0 @@
1
- /* Copyright Airship and Contributors */
2
-
3
- 'use strict';
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.ScopedSubscriptionListEditor = void 0;
9
- /**
10
- * Enum of internal scoped subscription list update type.
11
- * @hidden
12
- */
13
- var ScopedSubscriptionListOperationAction = /*#__PURE__*/function (ScopedSubscriptionListOperationAction) {
14
- ScopedSubscriptionListOperationAction["subscribe"] = "subscribe";
15
- ScopedSubscriptionListOperationAction["unsubscribe"] = "unsubscribe";
16
- return ScopedSubscriptionListOperationAction;
17
- }(ScopedSubscriptionListOperationAction || {});
18
- /**
19
- * Scoped subscription list operation.
20
- * @hidden
21
- */
22
- /**
23
- * Scoped subscription list editor.
24
- */
25
- class ScopedSubscriptionListEditor {
26
- /**
27
- */
28
- constructor(onApply) {
29
- this.onApply = onApply;
30
- this.operations = [];
31
- }
32
-
33
- /**
34
- * Subscribes to a list in the given scope.
35
- *
36
- * @param subscriptionListId The subscription list identifier.
37
- * @param scope The subscription scope to subscribe.
38
- * @return The editor instance.
39
- */
40
- subscribe(subscriptionListId, scope) {
41
- const operation = {
42
- listId: subscriptionListId,
43
- action: ScopedSubscriptionListOperationAction.subscribe,
44
- scope: scope
45
- };
46
- this.operations.push(operation);
47
- return this;
48
- }
49
-
50
- /**
51
- * Unsubscribe from a list.
52
- *
53
- * @param subscriptionListId The subscription list identifier.
54
- * @param scope The subscription scope to unsubscribe.
55
- * @return The editor instance.
56
- */
57
- unsubscribe(subscriptionListId, scope) {
58
- const operation = {
59
- listId: subscriptionListId,
60
- action: ScopedSubscriptionListOperationAction.unsubscribe,
61
- scope: scope
62
- };
63
- this.operations.push(operation);
64
- return this;
65
- }
66
-
67
- /**
68
- * Applies subscription list changes.
69
- *
70
- */
71
- apply() {
72
- return this.onApply(this.operations);
73
- }
74
- }
75
- exports.ScopedSubscriptionListEditor = ScopedSubscriptionListEditor;
76
- //# sourceMappingURL=ScopedSubscriptionListEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","ScopedSubscriptionListEditor","ScopedSubscriptionListOperationAction","constructor","onApply","operations","subscribe","subscriptionListId","scope","operation","listId","action","push","unsubscribe","apply"],"sourceRoot":"../../src","sources":["ScopedSubscriptionListEditor.ts"],"mappings":"AAAA;;AAEA,YAAY;;AAACA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,4BAAA;AAIb;AACA;AACA;AACA;AAHA,IAIKC,qCAAqC,0BAArCA,qCAAqC;EAArCA,qCAAqC;EAArCA,qCAAqC;EAAA,OAArCA,qCAAqC;AAAA,EAArCA,qCAAqC;AAK1C;AACA;AACA;AACA;AAgBA;AACA;AACA;AACO,MAAMD,4BAA4B,CAAC;EAMxC;AACF;EACEE,WAAWA,CACTC,OAEkB,EAClB;IACA,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAG,EAAE;EACtB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,SAASA,CAACC,kBAA0B,EAAEC,KAAwB,EAAgC;IAC5F,MAAMC,SAAS,GAAG;MAChBC,MAAM,EAAEH,kBAAkB;MAC1BI,MAAM,EAAET,qCAAqC,CAACI,SAAS;MACvDE,KAAK,EAAEA;IACT,CAAC;IACD,IAAI,CAACH,UAAU,CAACO,IAAI,CAACH,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEI,WAAWA,CAACN,kBAA0B,EAAEC,KAAwB,EAAgC;IAC9F,MAAMC,SAAS,GAAG;MAChBC,MAAM,EAAEH,kBAAkB;MAC1BI,MAAM,EAAET,qCAAqC,CAACW,WAAW;MACzDL,KAAK,EAAEA;IACT,CAAC;IACD,IAAI,CAACH,UAAU,CAACO,IAAI,CAACH,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;EACEK,KAAKA,CAAA,EAAkB;IACrB,OAAO,IAAI,CAACV,OAAO,CAAC,IAAI,CAACC,UAAU,CAAC;EACtC;AACF;AAACN,OAAA,CAAAE,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -1,70 +0,0 @@
1
- /* Copyright Airship and Contributors */
2
-
3
- 'use strict';
4
-
5
- /**
6
- * Enum of internal subscription list update type.
7
- * @hidden
8
- */
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- exports.SubscriptionListEditor = void 0;
13
- var SubscriptionListOperationAction = /*#__PURE__*/function (SubscriptionListOperationAction) {
14
- SubscriptionListOperationAction["subscribe"] = "subscribe";
15
- SubscriptionListOperationAction["unsubscribe"] = "unsubscribe";
16
- return SubscriptionListOperationAction;
17
- }(SubscriptionListOperationAction || {});
18
- /**
19
- * Subscription list operation.
20
- * @hidden
21
- */
22
- /**
23
- * Subscription list editor.
24
- */
25
- class SubscriptionListEditor {
26
- operations = [];
27
- constructor(onApply) {
28
- this.onApply = onApply;
29
- }
30
-
31
- /**
32
- * Subscribes to a list.
33
- *
34
- * @param subscriptionListId The subscription list identifier.
35
- * @return The editor instance.
36
- */
37
- subscribe(subscriptionListId) {
38
- const operation = {
39
- listId: subscriptionListId,
40
- action: SubscriptionListOperationAction.subscribe
41
- };
42
- this.operations.push(operation);
43
- return this;
44
- }
45
-
46
- /**
47
- * Unsubscribe from a list.
48
- *
49
- * @param subscriptionListId The subscription list identifier.
50
- * @return The editor instance.
51
- */
52
- unsubscribe(subscriptionListId) {
53
- const operation = {
54
- listId: subscriptionListId,
55
- action: SubscriptionListOperationAction.unsubscribe
56
- };
57
- this.operations.push(operation);
58
- return this;
59
- }
60
-
61
- /**
62
- * Applies subscription list changes.
63
- *
64
- */
65
- apply() {
66
- return this.onApply(this.operations);
67
- }
68
- }
69
- exports.SubscriptionListEditor = SubscriptionListEditor;
70
- //# sourceMappingURL=SubscriptionListEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","SubscriptionListEditor","SubscriptionListOperationAction","operations","constructor","onApply","subscribe","subscriptionListId","operation","listId","action","push","unsubscribe","apply"],"sourceRoot":"../../src","sources":["SubscriptionListEditor.ts"],"mappings":"AAAA;;AAEA,YAAY;;AAEZ;AACA;AACA;AACA;AAHAA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,sBAAA;AAAA,IAIKC,+BAA+B,0BAA/BA,+BAA+B;EAA/BA,+BAA+B;EAA/BA,+BAA+B;EAAA,OAA/BA,+BAA+B;AAAA,EAA/BA,+BAA+B;AAKpC;AACA;AACA;AACA;AAYA;AACA;AACA;AACO,MAAMD,sBAAsB,CAAC;EAC1BE,UAAU,GAAgC,EAAE;EAEpDC,WAAWA,CACQC,OAEC,EAClB;IAAA,KAHiBA,OAEC,GAFDA,OAEC;EACjB;;EAEH;AACF;AACA;AACA;AACA;AACA;EACEC,SAASA,CAACC,kBAA0B,EAA0B;IAC5D,MAAMC,SAAS,GAAG;MAChBC,MAAM,EAAEF,kBAAkB;MAC1BG,MAAM,EAAER,+BAA+B,CAACI;IAC1C,CAAC;IACD,IAAI,CAACH,UAAU,CAACQ,IAAI,CAACH,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEI,WAAWA,CAACL,kBAA0B,EAA0B;IAC9D,MAAMC,SAAS,GAAG;MAChBC,MAAM,EAAEF,kBAAkB;MAC1BG,MAAM,EAAER,+BAA+B,CAACU;IAC1C,CAAC;IACD,IAAI,CAACT,UAAU,CAACQ,IAAI,CAACH,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;EACEK,KAAKA,CAAA,EAAkB;IACrB,OAAO,IAAI,CAACR,OAAO,CAAC,IAAI,CAACF,UAAU,CAAC;EACtC;AACF;AAACJ,OAAA,CAAAE,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1,66 +0,0 @@
1
- /* Copyright Airship and Contributors */
2
-
3
- 'use strict';
4
-
5
- /**
6
- * Tag operation.
7
- * @hidden
8
- */
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- exports.TagEditor = void 0;
13
- /**
14
- * Editor for device tags.
15
- */
16
- class TagEditor {
17
- /**
18
- * TagEditor constructor
19
- *
20
- * @hidden
21
- * @param onApply The apply function
22
- */
23
- constructor(onApply) {
24
- this.onApply = onApply;
25
- this.operations = [];
26
- }
27
-
28
- /**
29
- * Adds tags to a channel.
30
- *
31
- * @param tags Tags to add.
32
- * @return The tag editor instance.
33
- */
34
- addTags(tags) {
35
- const operation = {
36
- operationType: 'add',
37
- tags: tags
38
- };
39
- this.operations.push(operation);
40
- return this;
41
- }
42
-
43
- /**
44
- * Removes tags from the channel.
45
- *
46
- * @param tags Tags to remove.
47
- * @return The tag editor instance.
48
- */
49
- removeTags(tags) {
50
- const operation = {
51
- operationType: 'remove',
52
- tags: tags
53
- };
54
- this.operations.push(operation);
55
- return this;
56
- }
57
-
58
- /**
59
- * Applies the tag changes.
60
- */
61
- apply() {
62
- return this.onApply(this.operations);
63
- }
64
- }
65
- exports.TagEditor = TagEditor;
66
- //# sourceMappingURL=TagEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","TagEditor","constructor","onApply","operations","addTags","tags","operation","operationType","push","removeTags","apply"],"sourceRoot":"../../src","sources":["TagEditor.ts"],"mappings":"AAAA;;AAEA,YAAY;;AAEZ;AACA;AACA;AACA;AAHAA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,SAAA;AAeA;AACA;AACA;AACO,MAAMA,SAAS,CAAC;EAIrB;AACF;AACA;AACA;AACA;AACA;EACEC,WAAWA,CAACC,OAAsD,EAAE;IAClE,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAG,EAAE;EACtB;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEC,OAAOA,CAACC,IAAc,EAAa;IACjC,MAAMC,SAAS,GAAG;MAAEC,aAAa,EAAE,KAAK;MAAEF,IAAI,EAAEA;IAAK,CAAC;IACtD,IAAI,CAACF,UAAU,CAACK,IAAI,CAACF,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;EACEG,UAAUA,CAACJ,IAAc,EAAa;IACpC,MAAMC,SAAS,GAAG;MAAEC,aAAa,EAAE,QAAQ;MAAEF,IAAI,EAAEA;IAAK,CAAC;IACzD,IAAI,CAACF,UAAU,CAACK,IAAI,CAACF,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;EACEI,KAAKA,CAAA,EAAkB;IACrB,OAAO,IAAI,CAACR,OAAO,CAAC,IAAI,CAACC,UAAU,CAAC;EACtC;AACF;AAACL,OAAA,CAAAE,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -1,87 +0,0 @@
1
- /* Copyright Airship and Contributors */
2
-
3
- 'use strict';
4
-
5
- /**
6
- * Tag group operation.
7
- * @hidden
8
- */
9
- Object.defineProperty(exports, "__esModule", {
10
- value: true
11
- });
12
- exports.TagGroupEditor = void 0;
13
- /**
14
- * Editor for tag groups.
15
- */
16
- class TagGroupEditor {
17
- /**
18
- * TagGroupEditor constructor
19
- *
20
- * @hidden
21
- * @param onApply The apply function
22
- */
23
- constructor(onApply) {
24
- this.onApply = onApply;
25
- this.operations = [];
26
- }
27
-
28
- /**
29
- * Adds tags to a tag group.
30
- *
31
- * @param tagGroup The tag group.
32
- * @param tags Tags to add.
33
- * @return The tag group editor instance.
34
- */
35
- addTags(group, tags) {
36
- const operation = {
37
- operationType: 'add',
38
- group: group,
39
- tags: tags
40
- };
41
- this.operations.push(operation);
42
- return this;
43
- }
44
-
45
- /**
46
- * Removes tags from the tag group.
47
- *
48
- * @param tagGroup The tag group.
49
- * @param tags Tags to remove.
50
- * @return The tag group editor instance.
51
- */
52
- removeTags(group, tags) {
53
- const operation = {
54
- operationType: 'remove',
55
- group: group,
56
- tags: tags
57
- };
58
- this.operations.push(operation);
59
- return this;
60
- }
61
-
62
- /**
63
- * Overwrite the current set of tags on the Tag Group.
64
- *
65
- * @param tagGroup The tag group.
66
- * @param tags Tags to set.
67
- * @return The tag group editor instance.
68
- */
69
- setTags(group, tags) {
70
- const operation = {
71
- operationType: 'set',
72
- group: group,
73
- tags: tags
74
- };
75
- this.operations.push(operation);
76
- return this;
77
- }
78
-
79
- /**
80
- * Applies the tag changes.
81
- */
82
- apply() {
83
- return this.onApply(this.operations);
84
- }
85
- }
86
- exports.TagGroupEditor = TagGroupEditor;
87
- //# sourceMappingURL=TagGroupEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","TagGroupEditor","constructor","onApply","operations","addTags","group","tags","operation","operationType","push","removeTags","setTags","apply"],"sourceRoot":"../../src","sources":["TagGroupEditor.ts"],"mappings":"AAAA;;AAEA,YAAY;;AAEZ;AACA;AACA;AACA;AAHAA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,cAAA;AAmBA;AACA;AACA;AACO,MAAMA,cAAc,CAAC;EAI1B;AACF;AACA;AACA;AACA;AACA;EACEC,WAAWA,CAACC,OAA2D,EAAE;IACvE,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,UAAU,GAAG,EAAE;EACtB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,OAAOA,CAACC,KAAa,EAAEC,IAAc,EAAkB;IACrD,MAAMC,SAAS,GAAG;MAAEC,aAAa,EAAE,KAAK;MAAEH,KAAK,EAAEA,KAAK;MAAEC,IAAI,EAAEA;IAAK,CAAC;IACpE,IAAI,CAACH,UAAU,CAACM,IAAI,CAACF,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEG,UAAUA,CAACL,KAAa,EAAEC,IAAc,EAAkB;IACxD,MAAMC,SAAS,GAAG;MAAEC,aAAa,EAAE,QAAQ;MAAEH,KAAK,EAAEA,KAAK;MAAEC,IAAI,EAAEA;IAAK,CAAC;IACvE,IAAI,CAACH,UAAU,CAACM,IAAI,CAACF,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACEI,OAAOA,CAACN,KAAa,EAAEC,IAAmB,EAAkB;IAC1D,MAAMC,SAAS,GAAG;MAAEC,aAAa,EAAE,KAAK;MAAEH,KAAK,EAAEA,KAAK;MAAEC,IAAI,EAAEA;IAAK,CAAC;IACpE,IAAI,CAACH,UAAU,CAACM,IAAI,CAACF,SAAS,CAAC;IAC/B,OAAO,IAAI;EACb;;EAEA;AACF;AACA;EACEK,KAAKA,CAAA,EAAkB;IACrB,OAAO,IAAI,CAACV,OAAO,CAAC,IAAI,CAACC,UAAU,CAAC;EACtC;AACF;AAACL,OAAA,CAAAE,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -1,79 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.UAEventEmitter = exports.Subscription = void 0;
7
- var _reactNative = require("react-native");
8
- /* Copyright Airship and Contributors */
9
-
10
- /**
11
- * SDK event emitter.
12
- *
13
- * @hidden
14
- */
15
- class UAEventEmitter {
16
- listeners = new Map();
17
- constructor(nativeModule) {
18
- this.nativeModule = nativeModule;
19
- this.eventEmitter = new _reactNative.NativeEventEmitter(nativeModule);
20
- if (_reactNative.Platform.OS === 'android') {
21
- _reactNative.AppRegistry.registerHeadlessTask('AirshipAndroidBackgroundEventTask', () => {
22
- return () => this.dispatchEvents(true);
23
- });
24
- }
25
- this.eventEmitter.addListener('com.airship.pending_events', async () => {
26
- return this.dispatchEvents(false);
27
- });
28
- }
29
- removeListener(eventType, listener) {
30
- var typedListeners = this.listeners.get(eventType);
31
- if (typedListeners) {
32
- typedListeners = typedListeners.filter(obj => obj !== listener);
33
- this.listeners.set(eventType, typedListeners);
34
- }
35
- }
36
- addListener(eventType, listener) {
37
- if (!this.listeners.get(eventType)) {
38
- this.listeners.set(eventType, new Array());
39
- }
40
- this.listeners.get(eventType)?.push(listener);
41
- this.nativeModule.airshipListenerAdded(eventType);
42
- }
43
- removeAllListeners(eventType) {
44
- this.listeners.set(eventType, new Array());
45
- }
46
- async dispatchEvents(isHeadlessJS) {
47
- let actions = Array.from(this.listeners.keys()).map(async key => {
48
- let typedListeners = this.listeners.get(key);
49
- if (typedListeners == null) {
50
- return Promise.resolve();
51
- }
52
- let events = await this.nativeModule.takePendingEvents(key, isHeadlessJS);
53
- return Promise.all(typedListeners.map(async listener => {
54
- for (const event of events) {
55
- await listener(event);
56
- }
57
- }));
58
- });
59
- return Promise.all(actions);
60
- }
61
- }
62
-
63
- /**
64
- * A listener subscription.
65
- */
66
- exports.UAEventEmitter = UAEventEmitter;
67
- class Subscription {
68
- constructor(onRemove) {
69
- this.onRemove = onRemove;
70
- }
71
- /**
72
- * Removes the listener.
73
- */
74
- remove() {
75
- this.onRemove();
76
- }
77
- }
78
- exports.Subscription = Subscription;
79
- //# sourceMappingURL=UAEventEmitter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","UAEventEmitter","listeners","Map","constructor","nativeModule","eventEmitter","NativeEventEmitter","Platform","OS","AppRegistry","registerHeadlessTask","dispatchEvents","addListener","removeListener","eventType","listener","typedListeners","get","filter","obj","set","Array","push","airshipListenerAdded","removeAllListeners","isHeadlessJS","actions","from","keys","map","key","Promise","resolve","events","takePendingEvents","all","event","exports","Subscription","onRemove","remove"],"sourceRoot":"../../src","sources":["UAEventEmitter.ts"],"mappings":"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","ignoreList":[]}