@zoho_apptics/apptics-js-sdk 1.0.2 → 2.0.0-beta.1

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 (243) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/LICENSE +13 -0
  3. package/README.md +846 -11
  4. package/dist/apptics.esm.min.js +3 -0
  5. package/dist/apptics.esm.min.js.map +1 -0
  6. package/dist/apptics.min.js +3 -0
  7. package/dist/apptics.min.js.map +1 -0
  8. package/dist/chunks/lifecycle-VYr43KcB.min.js +3 -0
  9. package/dist/chunks/lifecycle-VYr43KcB.min.js.map +1 -0
  10. package/dist/cjs/auto-init.d.ts +8 -0
  11. package/dist/cjs/auto-init.js +32 -0
  12. package/dist/cjs/core/attempts.d.ts +28 -0
  13. package/dist/cjs/core/attempts.js +113 -0
  14. package/dist/cjs/core/batch.d.ts +32 -0
  15. package/dist/cjs/core/batch.js +116 -0
  16. package/dist/cjs/core/callsite.d.ts +34 -0
  17. package/dist/cjs/core/callsite.js +115 -0
  18. package/dist/cjs/core/consent.d.ts +27 -0
  19. package/dist/cjs/core/consent.js +132 -0
  20. package/dist/cjs/core/constants.d.ts +237 -0
  21. package/dist/cjs/core/constants.js +315 -0
  22. package/dist/cjs/core/db.d.ts +48 -0
  23. package/dist/cjs/core/db.js +467 -0
  24. package/dist/cjs/core/debug.d.ts +22 -0
  25. package/dist/cjs/core/debug.js +88 -0
  26. package/dist/cjs/core/env.d.ts +28 -0
  27. package/dist/cjs/core/env.js +267 -0
  28. package/dist/cjs/core/framework-id.d.ts +1 -0
  29. package/dist/cjs/core/framework-id.js +9 -0
  30. package/dist/cjs/core/guard.d.ts +11 -0
  31. package/dist/cjs/core/guard.js +86 -0
  32. package/dist/cjs/core/hooks.d.ts +39 -0
  33. package/dist/cjs/core/hooks.js +22 -0
  34. package/dist/cjs/core/locks.d.ts +9 -0
  35. package/dist/cjs/core/locks.js +22 -0
  36. package/dist/cjs/core/logger.d.ts +15 -0
  37. package/dist/cjs/core/logger.js +50 -0
  38. package/dist/cjs/core/state.d.ts +70 -0
  39. package/dist/cjs/core/state.js +78 -0
  40. package/dist/cjs/core/storage.d.ts +61 -0
  41. package/dist/cjs/core/storage.js +327 -0
  42. package/dist/cjs/core/stylesheet.d.ts +8 -0
  43. package/dist/cjs/core/stylesheet.js +29 -0
  44. package/dist/cjs/core/transport.d.ts +85 -0
  45. package/dist/cjs/core/transport.js +456 -0
  46. package/dist/cjs/core/utils.d.ts +26 -0
  47. package/dist/cjs/core/utils.js +175 -0
  48. package/dist/cjs/core/validate.d.ts +18 -0
  49. package/dist/cjs/core/validate.js +233 -0
  50. package/dist/cjs/device/appversion.d.ts +15 -0
  51. package/dist/cjs/device/appversion.js +170 -0
  52. package/dist/cjs/device/index.d.ts +34 -0
  53. package/dist/cjs/device/index.js +472 -0
  54. package/dist/cjs/engagement/api-rules.d.ts +49 -0
  55. package/dist/cjs/engagement/api-rules.js +206 -0
  56. package/dist/cjs/engagement/auto-api.d.ts +7 -0
  57. package/dist/cjs/engagement/auto-api.js +200 -0
  58. package/dist/cjs/engagement/auto-screen.d.ts +18 -0
  59. package/dist/cjs/engagement/auto-screen.js +305 -0
  60. package/dist/cjs/engagement/defined-events.d.ts +23 -0
  61. package/dist/cjs/engagement/defined-events.js +58 -0
  62. package/dist/cjs/engagement/send.d.ts +6 -0
  63. package/dist/cjs/engagement/send.js +104 -0
  64. package/dist/cjs/engagement/session.d.ts +51 -0
  65. package/dist/cjs/engagement/session.js +463 -0
  66. package/dist/cjs/engagement/track.d.ts +56 -0
  67. package/dist/cjs/engagement/track.js +375 -0
  68. package/dist/cjs/errors/send.d.ts +6 -0
  69. package/dist/cjs/errors/send.js +73 -0
  70. package/dist/cjs/errors/track.d.ts +4 -0
  71. package/dist/cjs/errors/track.js +167 -0
  72. package/dist/cjs/feedback/controls.d.ts +37 -0
  73. package/dist/cjs/feedback/controls.js +316 -0
  74. package/dist/cjs/feedback/index.d.ts +9 -0
  75. package/dist/cjs/feedback/index.js +56 -0
  76. package/dist/cjs/feedback/logs.d.ts +45 -0
  77. package/dist/cjs/feedback/logs.js +241 -0
  78. package/dist/cjs/feedback/quartz.d.ts +18 -0
  79. package/dist/cjs/feedback/quartz.js +105 -0
  80. package/dist/cjs/feedback/send.d.ts +28 -0
  81. package/dist/cjs/feedback/send.js +203 -0
  82. package/dist/cjs/feedback/styles.d.ts +10 -0
  83. package/dist/cjs/feedback/styles.js +8 -0
  84. package/dist/cjs/feedback/template.d.ts +2 -0
  85. package/dist/cjs/feedback/template.js +162 -0
  86. package/dist/cjs/feedback/ui.d.ts +63 -0
  87. package/dist/cjs/feedback/ui.js +709 -0
  88. package/dist/cjs/heatmap/send.d.ts +13 -0
  89. package/dist/cjs/heatmap/send.js +82 -0
  90. package/dist/cjs/heatmap/track.d.ts +4 -0
  91. package/dist/cjs/heatmap/track.js +448 -0
  92. package/dist/cjs/index.d.ts +22 -0
  93. package/dist/cjs/index.js +162 -0
  94. package/dist/cjs/lifecycle.d.ts +21 -0
  95. package/dist/cjs/lifecycle.js +734 -0
  96. package/dist/cjs/package.json +3 -0
  97. package/dist/cjs/remoteconfig/country.d.ts +4 -0
  98. package/dist/cjs/remoteconfig/country.js +73 -0
  99. package/dist/cjs/remoteconfig/custom.d.ts +10 -0
  100. package/dist/cjs/remoteconfig/custom.js +58 -0
  101. package/dist/cjs/remoteconfig/evaluate.d.ts +24 -0
  102. package/dist/cjs/remoteconfig/evaluate.js +184 -0
  103. package/dist/cjs/remoteconfig/fetch.d.ts +24 -0
  104. package/dist/cjs/remoteconfig/fetch.js +200 -0
  105. package/dist/cjs/remoteconfig/index.d.ts +15 -0
  106. package/dist/cjs/remoteconfig/index.js +116 -0
  107. package/dist/cjs/remoteconfig/store.d.ts +18 -0
  108. package/dist/cjs/remoteconfig/store.js +98 -0
  109. package/dist/cjs/remoteconfig/tz-countries.d.ts +8 -0
  110. package/dist/cjs/remoteconfig/tz-countries.js +13 -0
  111. package/dist/cjs/remotelog/gate.d.ts +2 -0
  112. package/dist/cjs/remotelog/gate.js +28 -0
  113. package/dist/cjs/remotelog/index.d.ts +8 -0
  114. package/dist/cjs/remotelog/logger.d.ts +22 -0
  115. package/dist/cjs/remotelog/logger.js +111 -0
  116. package/dist/cjs/remotelog/send.d.ts +13 -0
  117. package/dist/cjs/remotelog/send.js +153 -0
  118. package/dist/cjs/remotelogger/index.d.ts +12 -0
  119. package/dist/cjs/remotelogger/index.js +18 -0
  120. package/dist/cjs/scheduler.d.ts +8 -0
  121. package/dist/cjs/scheduler.js +78 -0
  122. package/dist/cjs/types.d.ts +385 -0
  123. package/dist/cjs/user/index.d.ts +33 -0
  124. package/dist/cjs/user/index.js +183 -0
  125. package/dist/esm/auto-init.d.ts +8 -0
  126. package/dist/esm/auto-init.js +29 -0
  127. package/dist/esm/core/attempts.d.ts +28 -0
  128. package/dist/esm/core/attempts.js +106 -0
  129. package/dist/esm/core/batch.d.ts +32 -0
  130. package/dist/esm/core/batch.js +109 -0
  131. package/dist/esm/core/callsite.d.ts +34 -0
  132. package/dist/esm/core/callsite.js +110 -0
  133. package/dist/esm/core/consent.d.ts +27 -0
  134. package/dist/esm/core/consent.js +122 -0
  135. package/dist/esm/core/constants.d.ts +237 -0
  136. package/dist/esm/core/constants.js +292 -0
  137. package/dist/esm/core/db.d.ts +48 -0
  138. package/dist/esm/core/db.js +453 -0
  139. package/dist/esm/core/debug.d.ts +22 -0
  140. package/dist/esm/core/debug.js +81 -0
  141. package/dist/esm/core/env.d.ts +28 -0
  142. package/dist/esm/core/env.js +251 -0
  143. package/dist/esm/core/framework-id.d.ts +1 -0
  144. package/dist/esm/core/framework-id.js +7 -0
  145. package/dist/esm/core/guard.d.ts +11 -0
  146. package/dist/esm/core/guard.js +83 -0
  147. package/dist/esm/core/hooks.d.ts +39 -0
  148. package/dist/esm/core/hooks.js +20 -0
  149. package/dist/esm/core/locks.d.ts +9 -0
  150. package/dist/esm/core/locks.js +20 -0
  151. package/dist/esm/core/logger.d.ts +15 -0
  152. package/dist/esm/core/logger.js +46 -0
  153. package/dist/esm/core/state.d.ts +70 -0
  154. package/dist/esm/core/state.js +73 -0
  155. package/dist/esm/core/storage.d.ts +61 -0
  156. package/dist/esm/core/storage.js +314 -0
  157. package/dist/esm/core/stylesheet.d.ts +8 -0
  158. package/dist/esm/core/stylesheet.js +27 -0
  159. package/dist/esm/core/transport.d.ts +85 -0
  160. package/dist/esm/core/transport.js +439 -0
  161. package/dist/esm/core/utils.d.ts +26 -0
  162. package/dist/esm/core/utils.js +161 -0
  163. package/dist/esm/core/validate.d.ts +18 -0
  164. package/dist/esm/core/validate.js +226 -0
  165. package/dist/esm/device/appversion.d.ts +15 -0
  166. package/dist/esm/device/appversion.js +164 -0
  167. package/dist/esm/device/index.d.ts +34 -0
  168. package/dist/esm/device/index.js +461 -0
  169. package/dist/esm/engagement/api-rules.d.ts +49 -0
  170. package/dist/esm/engagement/api-rules.js +199 -0
  171. package/dist/esm/engagement/auto-api.d.ts +7 -0
  172. package/dist/esm/engagement/auto-api.js +198 -0
  173. package/dist/esm/engagement/auto-screen.d.ts +18 -0
  174. package/dist/esm/engagement/auto-screen.js +301 -0
  175. package/dist/esm/engagement/defined-events.d.ts +23 -0
  176. package/dist/esm/engagement/defined-events.js +55 -0
  177. package/dist/esm/engagement/send.d.ts +6 -0
  178. package/dist/esm/engagement/send.js +101 -0
  179. package/dist/esm/engagement/session.d.ts +51 -0
  180. package/dist/esm/engagement/session.js +448 -0
  181. package/dist/esm/engagement/track.d.ts +56 -0
  182. package/dist/esm/engagement/track.js +365 -0
  183. package/dist/esm/errors/send.d.ts +6 -0
  184. package/dist/esm/errors/send.js +70 -0
  185. package/dist/esm/errors/track.d.ts +4 -0
  186. package/dist/esm/errors/track.js +163 -0
  187. package/dist/esm/feedback/controls.d.ts +37 -0
  188. package/dist/esm/feedback/controls.js +309 -0
  189. package/dist/esm/feedback/index.d.ts +9 -0
  190. package/dist/esm/feedback/index.js +51 -0
  191. package/dist/esm/feedback/logs.d.ts +45 -0
  192. package/dist/esm/feedback/logs.js +227 -0
  193. package/dist/esm/feedback/quartz.d.ts +18 -0
  194. package/dist/esm/feedback/quartz.js +99 -0
  195. package/dist/esm/feedback/send.d.ts +28 -0
  196. package/dist/esm/feedback/send.js +198 -0
  197. package/dist/esm/feedback/styles.d.ts +10 -0
  198. package/dist/esm/feedback/styles.js +4 -0
  199. package/dist/esm/feedback/template.d.ts +2 -0
  200. package/dist/esm/feedback/template.js +159 -0
  201. package/dist/esm/feedback/ui.d.ts +63 -0
  202. package/dist/esm/feedback/ui.js +703 -0
  203. package/dist/esm/heatmap/send.d.ts +13 -0
  204. package/dist/esm/heatmap/send.js +79 -0
  205. package/dist/esm/heatmap/track.d.ts +4 -0
  206. package/dist/esm/heatmap/track.js +445 -0
  207. package/dist/esm/index.d.ts +22 -0
  208. package/dist/esm/index.js +150 -0
  209. package/dist/esm/lifecycle.d.ts +21 -0
  210. package/dist/esm/lifecycle.js +729 -0
  211. package/dist/esm/package.json +3 -0
  212. package/dist/esm/remoteconfig/country.d.ts +4 -0
  213. package/dist/esm/remoteconfig/country.js +70 -0
  214. package/dist/esm/remoteconfig/custom.d.ts +10 -0
  215. package/dist/esm/remoteconfig/custom.js +54 -0
  216. package/dist/esm/remoteconfig/evaluate.d.ts +24 -0
  217. package/dist/esm/remoteconfig/evaluate.js +179 -0
  218. package/dist/esm/remoteconfig/fetch.d.ts +24 -0
  219. package/dist/esm/remoteconfig/fetch.js +196 -0
  220. package/dist/esm/remoteconfig/index.d.ts +15 -0
  221. package/dist/esm/remoteconfig/index.js +111 -0
  222. package/dist/esm/remoteconfig/store.d.ts +18 -0
  223. package/dist/esm/remoteconfig/store.js +91 -0
  224. package/dist/esm/remoteconfig/tz-countries.d.ts +8 -0
  225. package/dist/esm/remoteconfig/tz-countries.js +11 -0
  226. package/dist/esm/remotelog/gate.d.ts +2 -0
  227. package/dist/esm/remotelog/gate.js +26 -0
  228. package/dist/esm/remotelog/index.d.ts +8 -0
  229. package/dist/esm/remotelog/logger.d.ts +22 -0
  230. package/dist/esm/remotelog/logger.js +108 -0
  231. package/dist/esm/remotelog/send.d.ts +13 -0
  232. package/dist/esm/remotelog/send.js +149 -0
  233. package/dist/esm/remotelogger/index.d.ts +12 -0
  234. package/dist/esm/remotelogger/index.js +13 -0
  235. package/dist/esm/scheduler.d.ts +8 -0
  236. package/dist/esm/scheduler.js +74 -0
  237. package/dist/esm/types.d.ts +385 -0
  238. package/dist/esm/user/index.d.ts +33 -0
  239. package/dist/esm/user/index.js +176 -0
  240. package/dist/feedback.esm.min.js +3 -0
  241. package/dist/feedback.esm.min.js.map +1 -0
  242. package/package.json +122 -7
  243. package/src/appticssdk.js +0 -1
@@ -0,0 +1,316 @@
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
+ 'use strict';
3
+
4
+ var logger = require('../core/logger.js');
5
+ var hooks = require('../core/hooks.js');
6
+ var storage = require('../core/storage.js');
7
+ var utils = require('../core/utils.js');
8
+ var state = require('../core/state.js');
9
+ var logs = require('./logs.js');
10
+
11
+ /**
12
+ * The three controls at the top and bottom of the feedback form: the user picker, the
13
+ * log/diagnostics toggles with their data viewer, and dragging the dialog by its header.
14
+ *
15
+ * They live here rather than in ui.ts so that init() stays about assembling the modal, and each
16
+ * control can be wired (and read back) on its own.
17
+ */
18
+ const ANONYMOUS = 'anonymous'; // no i18n
19
+ const ANONYMOUS_LABEL = 'Anonymous'; // no i18n
20
+ /** Read by core/transport when it builds the feedback request's parameters. */
21
+ const userChoice = { anonymous: true, userid: '', groupid: '' }; // no i18n
22
+ /** Whether the next submission carries the stored logs and diagnostics. Unset means "decide from what is stored". */
23
+ const logChoice = {};
24
+ function resetUserChoice() {
25
+ userChoice.anonymous = true;
26
+ userChoice.userid = ''; // no i18n
27
+ userChoice.groupid = ''; // no i18n
28
+ }
29
+ /**
30
+ * Who a sendFeedback() report, made without the form, is attributed to: nobody when `anonymous`,
31
+ * else the user AppticsUser.setUser set (or the active registered one, status 1). Returns a function
32
+ * that puts back the choice that was there, so a form left open keeps its own.
33
+ */
34
+ function chooseUserForSend(anonymous) {
35
+ var before = { anonymous: userChoice.anonymous, userid: userChoice.userid, groupid: userChoice.groupid };
36
+ resetUserChoice();
37
+ if (!anonymous) {
38
+ // the user setUser set on this page, else the active one of those registered before
39
+ var active = !utils.isEmpty(state._ZAP._user_info.userid) ? state._ZAP._user_info : null;
40
+ storedUsers().forEach(function (user) {
41
+ if (!active && user && user.status == 1 && !utils.isEmpty(user.userid)) {
42
+ active = user;
43
+ }
44
+ });
45
+ if (active) {
46
+ userChoice.anonymous = false;
47
+ userChoice.userid = String(active.userid);
48
+ userChoice.groupid = String(active.groupid || ''); // no i18n
49
+ }
50
+ }
51
+ return function restore() {
52
+ userChoice.anonymous = before.anonymous;
53
+ userChoice.userid = before.userid;
54
+ userChoice.groupid = before.groupid;
55
+ };
56
+ }
57
+ /** Every distinct registered user, by the address the picker shows. */
58
+ function storedUsers() {
59
+ var users = storage.user_defaults.item('users'); // no i18n
60
+ return Array.isArray(users) ? users : [];
61
+ }
62
+ function pickerItems(users) {
63
+ var items = [{ value: ANONYMOUS, label: ANONYMOUS_LABEL }];
64
+ var seen = {};
65
+ users.forEach(function (user) {
66
+ var mam = user && user.mam;
67
+ if (!utils.isEmpty(mam) && !seen[mam]) {
68
+ seen[mam] = true;
69
+ items.push({ value: String(mam), label: String(mam) });
70
+ }
71
+ });
72
+ return items;
73
+ }
74
+ const SVG_NS = 'http://www.w3.org/2000/svg'; // no i18n
75
+ /** The tick beside the picked option. */
76
+ function tickIcon() {
77
+ var svg = document.createElementNS(SVG_NS, 'svg'); // no i18n
78
+ svg.setAttribute('viewBox', '0 0 14 10'); // no i18n
79
+ svg.setAttribute('width', '14'); // no i18n
80
+ svg.setAttribute('height', '10'); // no i18n
81
+ svg.setAttribute('fill', 'none'); // no i18n
82
+ var path = document.createElementNS(SVG_NS, 'path'); // no i18n
83
+ path.setAttribute('d', 'M1 5l4 4 8-8'); // no i18n
84
+ path.setAttribute('stroke', '#0078d4'); // no i18n
85
+ path.setAttribute('stroke-width', '2'); // no i18n
86
+ path.setAttribute('stroke-linecap', 'round'); // no i18n
87
+ path.setAttribute('stroke-linejoin', 'round'); // no i18n
88
+ svg.appendChild(path);
89
+ return svg;
90
+ }
91
+ /**
92
+ * The "User" dropdown above the description. It lists Anonymous plus every registered user, and
93
+ * starts on the active one (status 1) unless the caller asked for anonymous.
94
+ */
95
+ function wireUserPicker(modal, forceAnonymous) {
96
+ var trigger = modal.querySelector('#zasdkEmailTrigger'); // no i18n
97
+ var panel = modal.querySelector('#zasdkEmailPanel'); // no i18n
98
+ var label = modal.querySelector('#zasdkEmailLabel'); // no i18n
99
+ var list = modal.querySelector('#zasdkEmailList'); // no i18n
100
+ var dropdown = modal.querySelector('#zasdkEmailDropdown'); // no i18n
101
+ if (!trigger || !panel || !label || !list || !dropdown) {
102
+ return;
103
+ }
104
+ var users = storedUsers();
105
+ var items = pickerItems(users);
106
+ var selected = ANONYMOUS;
107
+ resetUserChoice();
108
+ if (!forceAnonymous) {
109
+ var active = null;
110
+ users.forEach(function (user) {
111
+ if (!active && user && user.status == 1 && !utils.isEmpty(user.mam)) {
112
+ active = user;
113
+ }
114
+ });
115
+ if (active) {
116
+ select(String(active.mam));
117
+ }
118
+ }
119
+ function select(value) {
120
+ selected = value;
121
+ userChoice.anonymous = value === ANONYMOUS;
122
+ var matched = null;
123
+ if (!userChoice.anonymous) {
124
+ users.forEach(function (user) {
125
+ if (!matched && user && user.mam === value) {
126
+ matched = user;
127
+ }
128
+ });
129
+ }
130
+ userChoice.userid = matched ? String(matched.userid || '') : ''; // no i18n
131
+ userChoice.groupid = matched ? String(matched.groupid || '') : ''; // no i18n
132
+ label.textContent = userChoice.anonymous ? ANONYMOUS_LABEL : value;
133
+ render();
134
+ }
135
+ function render() {
136
+ list.innerHTML = ''; // no i18n
137
+ if (items.length === 0) {
138
+ var empty = document.createElement('div'); // no i18n
139
+ empty.className = 'zasdk-select-empty'; // no i18n
140
+ empty.textContent = 'No users to choose from'; // no i18n
141
+ list.appendChild(empty);
142
+ return;
143
+ }
144
+ items.forEach(function (item) {
145
+ var isSelected = item.value === selected;
146
+ var option = document.createElement('li'); // no i18n
147
+ option.className = 'zasdk-select-option' + (isSelected ? ' zasdk-option-selected' : ''); // no i18n
148
+ option.setAttribute('data-value', item.value); // no i18n
149
+ var text = document.createElement('span'); // no i18n
150
+ text.textContent = item.label;
151
+ option.appendChild(text);
152
+ if (isSelected) {
153
+ option.appendChild(tickIcon());
154
+ }
155
+ list.appendChild(option);
156
+ });
157
+ }
158
+ trigger.addEventListener('click', function (event) {
159
+ event.stopPropagation();
160
+ var open = panel.style.display !== 'none'; // no i18n
161
+ panel.style.display = open ? 'none' : 'block'; // no i18n
162
+ if (!open) {
163
+ render();
164
+ }
165
+ });
166
+ list.addEventListener('click', function (event) {
167
+ var option = event.target.closest('.zasdk-select-option'); // no i18n
168
+ if (!option) {
169
+ return;
170
+ }
171
+ select(String(option.getAttribute('data-value'))); // no i18n
172
+ panel.style.display = 'none'; // no i18n
173
+ });
174
+ // closing on focusout rather than a document click keeps it working inside a shadow root
175
+ dropdown.setAttribute('tabindex', '0'); // no i18n
176
+ dropdown.addEventListener('focusout', function (event) {
177
+ if (!dropdown.contains(event.relatedTarget)) {
178
+ panel.style.display = 'none'; // no i18n
179
+ }
180
+ });
181
+ render();
182
+ }
183
+ /** Shows `content` in the viewer panel over the form. */
184
+ function openViewer(modal, title, content) {
185
+ var viewer = modal.querySelector('#zasdkDataViewer'); // no i18n
186
+ var viewerTitle = modal.querySelector('#zasdkViewerTitle'); // no i18n
187
+ var viewerContent = modal.querySelector('#zasdkViewerContent'); // no i18n
188
+ if (!viewer || !viewerTitle || !viewerContent) {
189
+ return;
190
+ }
191
+ viewerTitle.textContent = title;
192
+ viewerContent.textContent = content || '(No data available)'; // no i18n
193
+ viewer.style.display = 'flex'; // no i18n
194
+ }
195
+ /**
196
+ * The two "Include …" switches and the viewer behind their View links. A row is shown only when
197
+ * there is something to include, and is then on by default, so a submission carries what the app
198
+ * recorded unless the user turns it off.
199
+ */
200
+ function wireLogControls(modal, opts) {
201
+ var logToggle = modal.querySelector('#zasdkIncludeLogToggle'); // no i18n
202
+ var diagToggle = modal.querySelector('#zasdkIncludeDiagToggle'); // no i18n
203
+ var section = modal.querySelector('.zasdk-toggles-section'); // no i18n
204
+ var separator = modal.querySelector('.zasdk-toggle-separator'); // no i18n
205
+ var viewLogs = modal.querySelector('#zasdkViewLogsBtn'); // no i18n
206
+ var viewDiag = modal.querySelector('#zasdkViewDiagBtn'); // no i18n
207
+ var viewerClose = modal.querySelector('#zasdkViewerClose'); // no i18n
208
+ var viewer = modal.querySelector('#zasdkDataViewer'); // no i18n
209
+ if (!logToggle || !diagToggle || !section) {
210
+ return;
211
+ }
212
+ var logRow = logToggle.closest('.zasdk-toggle-row'); // no i18n
213
+ var diagRow = diagToggle.closest('.zasdk-toggle-row'); // no i18n
214
+ logChoice.includeLog = opts.includeLog === true ? true : undefined;
215
+ logChoice.includeDyninfo = opts.includeDyninfo === true ? true : undefined;
216
+ // hidden until the reads come back, so an empty section never flashes into view
217
+ section.style.display = 'none'; // no i18n
218
+ Promise.all([logs.hasLogLines(), logs.hasDiagnostics()]).then(function ([anyLogs, anyDiagnostics]) {
219
+ if (logRow)
220
+ logRow.style.display = anyLogs ? '' : 'none'; // no i18n
221
+ if (diagRow)
222
+ diagRow.style.display = anyDiagnostics ? '' : 'none'; // no i18n
223
+ if (separator)
224
+ separator.style.display = anyLogs && anyDiagnostics ? '' : 'none'; // no i18n
225
+ section.style.display = anyLogs || anyDiagnostics ? '' : 'none'; // no i18n
226
+ // on when there is data, unless the caller already decided
227
+ logToggle.checked = opts.includeLog === true || anyLogs;
228
+ diagToggle.checked = opts.includeDyninfo === true || anyDiagnostics;
229
+ logChoice.includeLog = logToggle.checked;
230
+ logChoice.includeDyninfo = diagToggle.checked;
231
+ }).catch(function (err) {
232
+ logger.Console.warn('apptics: could not read the stored logs: ' + String(err)); // no i18n
233
+ });
234
+ logToggle.addEventListener('change', function () {
235
+ logChoice.includeLog = logToggle.checked;
236
+ });
237
+ diagToggle.addEventListener('change', function () {
238
+ logChoice.includeDyninfo = diagToggle.checked;
239
+ });
240
+ if (viewLogs) {
241
+ viewLogs.addEventListener('click', function () {
242
+ logs.logText().then(function (text) {
243
+ openViewer(modal, 'System Logs', text); // no i18n
244
+ });
245
+ });
246
+ }
247
+ if (viewDiag) {
248
+ viewDiag.addEventListener('click', function () {
249
+ logs.diagnosticsText().then(function (text) {
250
+ openViewer(modal, 'Diagnostic Information', text); // no i18n
251
+ });
252
+ });
253
+ }
254
+ if (viewerClose && viewer) {
255
+ viewerClose.addEventListener('click', function () {
256
+ viewer.style.display = 'none'; // no i18n
257
+ });
258
+ }
259
+ }
260
+ /**
261
+ * Drags the dialog by its header. The right/bottom placement from the stylesheet is converted to
262
+ * an explicit left/top on the first drag, so the offsets have something to add to, and the box is
263
+ * kept inside the viewport.
264
+ */
265
+ function wireDrag(box) {
266
+ var header = box.querySelector('.zasdk-header'); // no i18n
267
+ if (!header) {
268
+ return;
269
+ }
270
+ var startX = 0, startY = 0, boxLeft = 0, boxTop = 0, dragging = false;
271
+ header.addEventListener('mousedown', function (event) {
272
+ if (event.target.closest('.zasdk-close')) { // no i18n
273
+ return; // the close button is not a drag handle
274
+ }
275
+ if (!box.style.left || box.style.left === 'auto') { // no i18n
276
+ var rect = box.getBoundingClientRect();
277
+ box.style.right = 'auto'; // no i18n
278
+ box.style.bottom = 'auto'; // no i18n
279
+ box.style.left = rect.left + 'px'; // no i18n
280
+ box.style.top = rect.top + 'px'; // no i18n
281
+ }
282
+ dragging = true;
283
+ startX = event.clientX;
284
+ startY = event.clientY;
285
+ boxLeft = parseInt(box.style.left, 10);
286
+ boxTop = parseInt(box.style.top, 10);
287
+ header.style.cursor = 'grabbing'; // no i18n
288
+ event.preventDefault();
289
+ });
290
+ document.addEventListener('mousemove', function (event) {
291
+ if (!dragging) {
292
+ return;
293
+ }
294
+ var left = boxLeft + (event.clientX - startX);
295
+ var top = boxTop + (event.clientY - startY);
296
+ box.style.left = Math.max(0, Math.min(left, window.innerWidth - box.offsetWidth)) + 'px'; // no i18n
297
+ box.style.top = Math.max(0, Math.min(top, window.innerHeight - box.offsetHeight)) + 'px'; // no i18n
298
+ });
299
+ document.addEventListener('mouseup', function () {
300
+ if (dragging) {
301
+ dragging = false;
302
+ header.style.cursor = 'grab'; // no i18n
303
+ }
304
+ });
305
+ }
306
+ // core/transport asks for the picked user when it builds the feedback request's parameters
307
+ hooks.hooks.feedbackUser = function () {
308
+ return userChoice.anonymous || utils.isEmpty(userChoice.userid) ? null : userChoice;
309
+ };
310
+
311
+ exports.chooseUserForSend = chooseUserForSend;
312
+ exports.logChoice = logChoice;
313
+ exports.userChoice = userChoice;
314
+ exports.wireDrag = wireDrag;
315
+ exports.wireLogControls = wireLogControls;
316
+ exports.wireUserPicker = wireUserPicker;
@@ -0,0 +1,9 @@
1
+ import type { AppticsFeedbackApi } from '../types.js';
2
+ export type { FeedbackOpenOptions, SendFeedbackOptions } from '../types.js';
3
+ /**
4
+ * Android's AppticsFeedback: the form, sending feedback without it, and the context recorded for
5
+ * the next one. Every feedback call, addFeedbackLog and addDiagnosticsInfo included, is here and
6
+ * only here: the main entry has no AppticsFeedback.
7
+ */
8
+ export declare const AppticsFeedback: AppticsFeedbackApi;
9
+ export default AppticsFeedback;
@@ -0,0 +1,56 @@
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var guard = require('../core/guard.js');
7
+ var constants = require('../core/constants.js');
8
+ var logger = require('../core/logger.js');
9
+ var lifecycle = require('../lifecycle.js');
10
+ var ui = require('./ui.js');
11
+ var logs = require('./logs.js');
12
+
13
+ /**
14
+ * Optional feedback modal, shipped as its own entry point:
15
+ * import { AppticsFeedback } from '@zoho_apptics/apptics-js-sdk/feedback';
16
+ * AppticsFeedback.feedbackFormOpen();
17
+ * Apps that never import it don't pay for the modal or its markup.
18
+ * The <script> build includes it, so snippet users are unaffected.
19
+ */
20
+ const feedbackFormOpenGuarded = guard.guard('AppticsFeedback.feedbackFormOpen', ui.feedbackFormOpen); // no i18n
21
+ const feedbackFormCloseGuarded = guard.guard('AppticsFeedback.feedbackFormClose', ui.feedbackFormClose); // no i18n
22
+ const addFeedbackLogGuarded = guard.guard('AppticsFeedback.addFeedbackLog', logs.addFeedbackLog); // no i18n
23
+ const addDiagnosticsInfoGuarded = guard.guard('AppticsFeedback.addDiagnosticsInfo', logs.addDiagnosticsInfo); // no i18n
24
+ const setFeedbackThemeGuarded = guard.guard('AppticsFeedback.setFeedbackTheme', ui.setFeedbackTheme); // no i18n
25
+ /** Resolves once the feedback is sent; rejects when it wasn't (SDK not started, offline, refused). */
26
+ const sendFeedbackGuarded = guard.guard('AppticsFeedback.sendFeedback', function (...args) {
27
+ return lifecycle.ready().then(function (started) {
28
+ if (!started) {
29
+ throw new Error('AppticsFeedback.sendFeedback: not sent, the SDK has not started; call Apptics.init() first'); // no i18n
30
+ }
31
+ return ui.sendFeedback(...args);
32
+ }).catch(function (err) {
33
+ logger.Console.error('AppticsFeedback.sendFeedback failed:', err); // no i18n
34
+ throw err;
35
+ });
36
+ });
37
+ /* each call a function of its own, with the parameter names the console shows (see forward) */
38
+ /**
39
+ * Android's AppticsFeedback: the form, sending feedback without it, and the context recorded for
40
+ * the next one. Every feedback call, addFeedbackLog and addDiagnosticsInfo included, is here and
41
+ * only here: the main entry has no AppticsFeedback.
42
+ */
43
+ const AppticsFeedback = {
44
+ /** The feedback types: BUG, FEEDBACK, HELP, REPORT. */
45
+ AP_FEEDBACK_TYPE: constants.AP_FEEDBACK_TYPE,
46
+ feedbackFormOpen: function feedbackFormOpen(options) { return guard.forward(feedbackFormOpenGuarded, arguments); },
47
+ feedbackFormClose: function feedbackFormClose() { return guard.forward(feedbackFormCloseGuarded, arguments); },
48
+ sendFeedback: function sendFeedback(options) { return guard.forward(sendFeedbackGuarded, arguments); },
49
+ addFeedbackLog: function addFeedbackLog(message) { return guard.forward(addFeedbackLogGuarded, arguments); },
50
+ addDiagnosticsInfo: function addDiagnosticsInfo(heading, key, value) { return guard.forward(addDiagnosticsInfoGuarded, arguments); },
51
+ /** The form's theme from now on, and of a form open now: 'light', 'dark' or 'auto'. */
52
+ setFeedbackTheme: function setFeedbackTheme(theme) { return guard.forward(setFeedbackThemeGuarded, arguments); },
53
+ };
54
+
55
+ exports.AppticsFeedback = AppticsFeedback;
56
+ exports.default = AppticsFeedback;
@@ -0,0 +1,45 @@
1
+ /** Neither rendered file is sent above this size (the 1.x limit). */
2
+ export declare const MAX_LOG_FILE_SIZE: number;
3
+ export declare const LOG_FILE_NAME = "feedbacklog.txt";
4
+ export declare const DYNINFO_FILE_NAME = "dyninfo.txt";
5
+ /** One rendered file, with the ids to remove once the server has it. */
6
+ export interface RenderedFile {
7
+ file: File;
8
+ ids: string[];
9
+ }
10
+ /** Drops the oldest entries once the store is over MAX_ENTRIES. */
11
+ export declare function trimStoredLogs(): Promise<void>;
12
+ /**
13
+ * Records a timestamped line for the next feedback submission, sent as feedbacklog.txt.
14
+ * Ignores anything that isn't a non-empty string, as 1.x did.
15
+ */
16
+ export declare function addFeedbackLog(message: string): void;
17
+ /**
18
+ * Records a diagnostics entry, `value` under `key` in the `heading` block of dyninfo.txt. All three
19
+ * are required: an entry without a value says nothing, so it is refused and the console says why.
20
+ * A value of 0 or false is a value.
21
+ */
22
+ export declare function addDiagnosticsInfo(heading: string, key: string, value: unknown): void;
23
+ /** Removes every stored entry. */
24
+ export declare function clearFeedbackLogs(): Promise<void>;
25
+ /** Removes the entries a submission carried, by the ids the rendered files reported. */
26
+ export declare function feedbacklog_transactions_remove(sentIds: string[]): Promise<void>;
27
+ /** feedbacklog.txt from the stored log lines, or null when there are none. */
28
+ export declare function toLogFile(): Promise<RenderedFile | null>;
29
+ /**
30
+ * The log lines for showing in the modal before sending, each time in the visitor's local zone.
31
+ * The file that is sent (toLogFile) keeps the ISO 8601 UTC stamps, so the server and anything
32
+ * that parses it are unaffected.
33
+ */
34
+ export declare function logText(): Promise<string>;
35
+ /** The diagnostics entries as dyninfo.txt would carry them, without the device info block. */
36
+ export declare function diagnosticsText(): Promise<string>;
37
+ /** True when any log line is waiting, so the modal knows whether to offer the toggle. */
38
+ export declare function hasLogLines(): Promise<boolean>;
39
+ /**
40
+ * dyninfo.txt: the stored diagnostics entries followed by a [Device Info] block holding
41
+ * `deviceInfo`. Returns null only when there is nothing at all to put in it.
42
+ */
43
+ export declare function toDyninfoFile(deviceInfo: string | null): Promise<RenderedFile | null>;
44
+ /** True when any diagnostics entry is waiting, so a submission knows to send dyninfo unasked. */
45
+ export declare function hasDiagnostics(): Promise<boolean>;
@@ -0,0 +1,241 @@
1
+ /*! @zoho_apptics/apptics-js-sdk v2.0.0-beta.1 | (c) Zoho Corporation Private Limited | see LICENSE */
2
+ 'use strict';
3
+
4
+ var logger = require('../core/logger.js');
5
+ var db = require('../core/db.js');
6
+ var storage = require('../core/storage.js');
7
+ var state = require('../core/state.js');
8
+ var utils = require('../core/utils.js');
9
+
10
+ /**
11
+ * Log lines and diagnostics entries an app records for its next feedback submission.
12
+ *
13
+ * addFeedbackLog() and addDiagnosticsInfo() accumulate entries in the `logs` store; a feedback
14
+ * submission renders them into the files feedback/add carries (feedbacklog.txt and dyninfo.txt)
15
+ * and removes the ones it took with it, so entries added while a submission is in flight survive.
16
+ *
17
+ * This module deliberately depends on core only, never on the modal, so the main entry point can
18
+ * expose the two collection functions without pulling the feedback UI into an app's bundle.
19
+ */
20
+ /** Entries beyond this are dropped oldest-first, so an app that never submits can't grow forever. */
21
+ const MAX_ENTRIES = 1000;
22
+ /** A single message longer than this is truncated rather than stored whole. */
23
+ const MAX_MESSAGE_LENGTH = 10000;
24
+ /** Neither rendered file is sent above this size (the 1.x limit). */
25
+ const MAX_LOG_FILE_SIZE = 2 * 1024 * 1024;
26
+ /** Bursts of addFeedbackLog() calls coalesce into one trim. */
27
+ const TRIM_DELAY_MS = 2000;
28
+ const LOG_FILE_NAME = 'feedbacklog.txt'; // no i18n
29
+ const DYNINFO_FILE_NAME = 'dyninfo.txt'; // no i18n
30
+ // the types the entries are stored under (2.0.0-beta and 1.x said log and diagnostics)
31
+ const LOG = db.FEEDBACK_LOG;
32
+ const DIAGNOSTICS = db.FEEDBACK_DIAGNOSTICS;
33
+ let trimScheduled = false;
34
+ /** Drops the oldest entries once the store is over MAX_ENTRIES. */
35
+ function trimStoredLogs() {
36
+ return storage.feedbacklog_transactions.all().then(function (items) {
37
+ const excess = items.length - MAX_ENTRIES;
38
+ if (excess <= 0) {
39
+ return undefined;
40
+ }
41
+ logger.Console.warn('apptics: dropping ' + excess + ' oldest feedback log entries (cap is ' + MAX_ENTRIES + ')'); // no i18n
42
+ return storage.feedbacklog_transactions.remove(items.slice(0, excess));
43
+ });
44
+ }
45
+ /** One trim per burst of adds, so a chatty app pays for one pass over the store, not one per line. */
46
+ function scheduleTrim() {
47
+ if (trimScheduled) {
48
+ return;
49
+ }
50
+ trimScheduled = true;
51
+ setTimeout(function () {
52
+ trimScheduled = false;
53
+ trimStoredLogs();
54
+ }, TRIM_DELAY_MS);
55
+ }
56
+ function store(item) {
57
+ storage.feedbacklog_transactions.add(item);
58
+ scheduleTrim();
59
+ }
60
+ function truncate(text) {
61
+ return text.length > MAX_MESSAGE_LENGTH ? text.slice(0, MAX_MESSAGE_LENGTH) + '…' : text;
62
+ }
63
+ /**
64
+ * Records a timestamped line for the next feedback submission, sent as feedbacklog.txt.
65
+ * Ignores anything that isn't a non-empty string, as 1.x did.
66
+ */
67
+ function addFeedbackLog(message) {
68
+ if (typeof message !== 'string' || message.length === 0) { // no i18n
69
+ return;
70
+ }
71
+ store({ type: LOG, happenedat: utils.nowMs(), message: truncate(message) });
72
+ }
73
+ /**
74
+ * Records a diagnostics key/value under a heading, sent inside dyninfo.txt.
75
+ * Entries sharing a heading are grouped together in the file.
76
+ */
77
+ /** Messages already printed, so a call repeated in a loop says so once. */
78
+ const refusedSaid = {};
79
+ function refuse(message) {
80
+ if (!refusedSaid[message]) {
81
+ refusedSaid[message] = true;
82
+ logger.warnAlways('AppticsFeedback.addDiagnosticsInfo: ' + message + ', so the entry is not recorded'); // no i18n
83
+ }
84
+ }
85
+ /**
86
+ * Records a diagnostics entry, `value` under `key` in the `heading` block of dyninfo.txt. All three
87
+ * are required: an entry without a value says nothing, so it is refused and the console says why.
88
+ * A value of 0 or false is a value.
89
+ */
90
+ function addDiagnosticsInfo(heading, key, value) {
91
+ if (typeof heading !== 'string' || heading.length === 0) { // no i18n
92
+ refuse('a heading is required');
93
+ return;
94
+ }
95
+ if (typeof key !== 'string' || key.length === 0) { // no i18n
96
+ refuse('a key is required');
97
+ return;
98
+ }
99
+ if (value === undefined || value === null || value === '') { // no i18n
100
+ refuse('a value is required for "' + heading + '" / "' + key + '"');
101
+ return;
102
+ }
103
+ store({
104
+ type: DIAGNOSTICS,
105
+ happenedat: utils.nowMs(),
106
+ heading: heading,
107
+ key: key,
108
+ value: truncate(String(value)),
109
+ });
110
+ }
111
+ /** Removes the entries a submission carried, by the ids the rendered files reported. */
112
+ function feedbacklog_transactions_remove(sentIds) {
113
+ return storage.feedbacklog_transactions.remove(sentIds.map(function (id) { return { id: id }; }));
114
+ }
115
+ /** Entries of one type, oldest first, skipping any that have passed batch_request_timeout. */
116
+ function entriesOfType(type) {
117
+ return storage.feedbacklog_transactions.all().then(function (items) {
118
+ return items.filter(function (item) {
119
+ return item.type === type && !state.isExpired(item.happenedat);
120
+ });
121
+ });
122
+ }
123
+ /** ISO 8601, from the stored time or a 1.x entry's own timestamp string. */
124
+ function stamp(item) {
125
+ if (typeof item.timestamp === 'string' && item.timestamp.length > 0) {
126
+ return item.timestamp; // migrated from 1.x, which stored the ISO string
127
+ }
128
+ return new Date(typeof item.happenedat === 'number' ? item.happenedat : utils.nowMs()).toISOString();
129
+ }
130
+ function ids(items) {
131
+ return items.map(function (item) { return String(item.id); });
132
+ }
133
+ /** `[heading]` blocks of `key: value` lines, in the order the headings first appeared. */
134
+ function groupDiagnostics(items) {
135
+ const order = [];
136
+ const grouped = {};
137
+ items.forEach(function (item) {
138
+ const heading = String(item.heading);
139
+ if (!grouped[heading]) {
140
+ grouped[heading] = [];
141
+ order.push(heading);
142
+ }
143
+ grouped[heading].push(item.key + ': ' + item.value); // no i18n
144
+ });
145
+ return order.map(function (heading) {
146
+ return '[' + heading + ']\n' + grouped[heading].join('\n'); // no i18n
147
+ }).join('\n\n'); // no i18n
148
+ }
149
+ function asFile(name, content, items) {
150
+ const file = new File([content], name, { type: 'text/plain' }); // no i18n
151
+ if (file.size > MAX_LOG_FILE_SIZE) {
152
+ logger.Console.warn('apptics: ' + name + ' is over ' + (MAX_LOG_FILE_SIZE / (1024 * 1024)) + ' MB, not sending it'); // no i18n
153
+ return null;
154
+ }
155
+ return { file: file, ids: ids(items) };
156
+ }
157
+ function renderLogLines(items) {
158
+ return items.map(function (item) {
159
+ return '[' + stamp(item) + '] ' + item.message; // no i18n
160
+ }).join('\n'); // no i18n
161
+ }
162
+ /** feedbacklog.txt from the stored log lines, or null when there are none. */
163
+ function toLogFile() {
164
+ return entriesOfType(LOG).then(function (items) {
165
+ if (items.length === 0) {
166
+ return null;
167
+ }
168
+ return asFile(LOG_FILE_NAME, renderLogLines(items), items);
169
+ });
170
+ }
171
+ /** `16 Oct 2026, 11:53:48 PM IST`: a log line's time in the visitor's own zone, for the viewer. */
172
+ function readableStamp(item) {
173
+ var iso = stamp(item);
174
+ var d = new Date(iso);
175
+ if (isNaN(d.getTime())) {
176
+ return iso;
177
+ }
178
+ return d.toLocaleDateString(undefined, { day: '2-digit', month: 'short', year: 'numeric' }) + ', ' + // no i18n
179
+ d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit', second: '2-digit', timeZoneName: 'short' }); // no i18n
180
+ }
181
+ /**
182
+ * The log lines for showing in the modal before sending, each time in the visitor's local zone.
183
+ * The file that is sent (toLogFile) keeps the ISO 8601 UTC stamps, so the server and anything
184
+ * that parses it are unaffected.
185
+ */
186
+ function logText() {
187
+ return entriesOfType(LOG).then(function (items) {
188
+ return items.map(function (item) {
189
+ return '[' + readableStamp(item) + '] ' + item.message; // no i18n
190
+ }).join('\n'); // no i18n
191
+ });
192
+ }
193
+ /** The diagnostics entries as dyninfo.txt would carry them, without the device info block. */
194
+ function diagnosticsText() {
195
+ return entriesOfType(DIAGNOSTICS).then(groupDiagnostics);
196
+ }
197
+ /** True when any log line is waiting, so the modal knows whether to offer the toggle. */
198
+ function hasLogLines() {
199
+ return entriesOfType(LOG).then(function (items) {
200
+ return items.length > 0;
201
+ });
202
+ }
203
+ /**
204
+ * dyninfo.txt: the stored diagnostics entries followed by a [Device Info] block holding
205
+ * `deviceInfo`. Returns null only when there is nothing at all to put in it.
206
+ */
207
+ function toDyninfoFile(deviceInfo) {
208
+ return entriesOfType(DIAGNOSTICS).then(function (items) {
209
+ const blocks = [];
210
+ if (items.length > 0) {
211
+ blocks.push(groupDiagnostics(items));
212
+ }
213
+ if (deviceInfo) {
214
+ blocks.push('[Device Info]\n' + deviceInfo); // no i18n
215
+ }
216
+ if (blocks.length === 0) {
217
+ return null;
218
+ }
219
+ return asFile(DYNINFO_FILE_NAME, blocks.join('\n\n'), items); // no i18n
220
+ });
221
+ }
222
+ /** True when any diagnostics entry is waiting, so a submission knows to send dyninfo unasked. */
223
+ function hasDiagnostics() {
224
+ return entriesOfType(DIAGNOSTICS).then(function (items) {
225
+ return items.length > 0;
226
+ });
227
+ }
228
+
229
+ exports.DYNINFO_FILE_NAME = DYNINFO_FILE_NAME;
230
+ exports.LOG_FILE_NAME = LOG_FILE_NAME;
231
+ exports.MAX_LOG_FILE_SIZE = MAX_LOG_FILE_SIZE;
232
+ exports.addDiagnosticsInfo = addDiagnosticsInfo;
233
+ exports.addFeedbackLog = addFeedbackLog;
234
+ exports.diagnosticsText = diagnosticsText;
235
+ exports.feedbacklog_transactions_remove = feedbacklog_transactions_remove;
236
+ exports.hasDiagnostics = hasDiagnostics;
237
+ exports.hasLogLines = hasLogLines;
238
+ exports.logText = logText;
239
+ exports.toDyninfoFile = toDyninfoFile;
240
+ exports.toLogFile = toLogFile;
241
+ exports.trimStoredLogs = trimStoredLogs;