chayns-api 2.0.1-0 → 2.0.2

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 (152) hide show
  1. package/.babelrc +30 -30
  2. package/.eslintrc +17 -17
  3. package/.github/workflows/deploy_docs.yml +28 -28
  4. package/.github/workflows/publish.yml +21 -21
  5. package/LICENSE +21 -21
  6. package/README.md +67 -54
  7. package/dist/cjs/calls/dialogs/date.js +34 -34
  8. package/dist/cjs/calls/index.js +108 -108
  9. package/dist/cjs/calls/sendMessage.js +8 -8
  10. package/dist/cjs/calls/visibilityChangeListener.js +4 -4
  11. package/dist/cjs/components/AppDialogWrapper.js +2 -2
  12. package/dist/cjs/components/ChaynsProvider.js +1 -1
  13. package/dist/cjs/components/ErrorBoundary.js +1 -1
  14. package/dist/cjs/components/withCompatMode.js +3 -3
  15. package/dist/cjs/components/withHydrationBoundary.js +3 -3
  16. package/dist/cjs/hooks/geoLocationListener.js +4 -4
  17. package/dist/cjs/hooks/scrollListener.js +8 -8
  18. package/dist/cjs/hooks/useAccessToken.js +3 -3
  19. package/dist/cjs/hooks/useCurrentPage.js +2 -2
  20. package/dist/cjs/hooks/useCustomData.js +2 -2
  21. package/dist/cjs/hooks/useDevice.js +2 -2
  22. package/dist/cjs/hooks/useDialogState.js +4 -4
  23. package/dist/cjs/hooks/useEnvironment.js +2 -2
  24. package/dist/cjs/hooks/useFunctions.js +2 -2
  25. package/dist/cjs/hooks/useIsAdminMode.js +2 -2
  26. package/dist/cjs/hooks/useLanguage.js +2 -2
  27. package/dist/cjs/hooks/usePages.js +4 -4
  28. package/dist/cjs/hooks/useParameters.js +2 -2
  29. package/dist/cjs/hooks/useSite.js +2 -2
  30. package/dist/cjs/hooks/useUser.js +2 -2
  31. package/dist/cjs/hooks/useValues.js +2 -2
  32. package/dist/cjs/hooks/windowMetricsListener.js +4 -4
  33. package/dist/cjs/host/ChaynsHost.js +1 -1
  34. package/dist/cjs/host/iframe/HostIframe.js +2 -2
  35. package/dist/cjs/host/module/ModuleHost.js +1 -1
  36. package/dist/cjs/host/module/utils/loadComponent.js +1 -1
  37. package/dist/cjs/index.js +1 -1
  38. package/dist/cjs/types/IChaynsReact.js +4 -4
  39. package/dist/cjs/util/heightHelper.js +1 -1
  40. package/dist/cjs/util/initModuleFederationSharing.js +1 -1
  41. package/dist/cjs/wrapper/AppWrapper.js +1 -1
  42. package/dist/cjs/wrapper/FrameWrapper.js +1 -1
  43. package/dist/cjs/wrapper/ModuleFederationWrapper.js +1 -1
  44. package/dist/cjs/wrapper/StaticChaynsApi.js +1 -1
  45. package/dist/esm/calls/dialogs/date.js +34 -34
  46. package/dist/esm/calls/index.js +108 -108
  47. package/dist/esm/calls/sendMessage.js +8 -8
  48. package/dist/esm/calls/visibilityChangeListener.js +4 -4
  49. package/dist/esm/components/AppDialogWrapper.js +1 -1
  50. package/dist/esm/components/withCompatMode.js +2 -2
  51. package/dist/esm/components/withHydrationBoundary.js +3 -3
  52. package/dist/esm/handler/DialogHandler.js +1 -1
  53. package/dist/esm/hooks/geoLocationListener.js +4 -4
  54. package/dist/esm/hooks/scrollListener.js +8 -8
  55. package/dist/esm/hooks/useAccessToken.js +3 -3
  56. package/dist/esm/hooks/useCurrentPage.js +2 -2
  57. package/dist/esm/hooks/useCustomData.js +2 -2
  58. package/dist/esm/hooks/useDevice.js +2 -2
  59. package/dist/esm/hooks/useDialogState.js +4 -4
  60. package/dist/esm/hooks/useEnvironment.js +2 -2
  61. package/dist/esm/hooks/useFunctions.js +2 -2
  62. package/dist/esm/hooks/useIsAdminMode.js +2 -2
  63. package/dist/esm/hooks/useLanguage.js +2 -2
  64. package/dist/esm/hooks/usePages.js +4 -4
  65. package/dist/esm/hooks/useParameters.js +2 -2
  66. package/dist/esm/hooks/useSite.js +2 -2
  67. package/dist/esm/hooks/useUser.js +2 -2
  68. package/dist/esm/hooks/useValues.js +2 -2
  69. package/dist/esm/hooks/windowMetricsListener.js +4 -4
  70. package/dist/esm/host/iframe/HostIframe.js +1 -1
  71. package/dist/esm/types/IChaynsReact.js +4 -4
  72. package/dist/esm/wrapper/AppWrapper.js +1 -1
  73. package/dist/esm/wrapper/FrameWrapper.js +1 -1
  74. package/dist/esm/wrapper/StaticChaynsApi.js +1 -1
  75. package/dist/types/calls/dialogs/alert.d.ts +1 -1
  76. package/dist/types/calls/dialogs/chaynsDialog.d.ts +24 -24
  77. package/dist/types/calls/dialogs/close.d.ts +1 -1
  78. package/dist/types/calls/dialogs/communication.d.ts +3 -3
  79. package/dist/types/calls/dialogs/confirm.d.ts +13 -13
  80. package/dist/types/calls/dialogs/date.d.ts +96 -96
  81. package/dist/types/calls/dialogs/dropUpAlert.d.ts +5 -5
  82. package/dist/types/calls/dialogs/fileSelect.d.ts +16 -16
  83. package/dist/types/calls/dialogs/iFrame.d.ts +10 -10
  84. package/dist/types/calls/dialogs/index.d.ts +14 -14
  85. package/dist/types/calls/dialogs/input.d.ts +15 -15
  86. package/dist/types/calls/dialogs/mediaSelect.d.ts +8 -8
  87. package/dist/types/calls/dialogs/open.d.ts +1 -1
  88. package/dist/types/calls/dialogs/select.d.ts +6 -6
  89. package/dist/types/calls/dialogs/signature.d.ts +7 -7
  90. package/dist/types/calls/dialogs/toast.d.ts +1 -1
  91. package/dist/types/calls/dialogs/utils/callback.d.ts +1 -1
  92. package/dist/types/calls/dialogs/utils/is.d.ts +4 -4
  93. package/dist/types/calls/getUserInfo.d.ts +9 -9
  94. package/dist/types/calls/index.d.ts +259 -265
  95. package/dist/types/calls/sendMessage.d.ts +13 -13
  96. package/dist/types/calls/visibilityChangeListener.d.ts +9 -9
  97. package/dist/types/components/AppDialogWrapper.d.ts +5 -5
  98. package/dist/types/components/ChaynsContext.d.ts +3 -3
  99. package/dist/types/components/ChaynsProvider.d.ts +11 -11
  100. package/dist/types/components/ErrorBoundary.d.ts +13 -13
  101. package/dist/types/components/WaitUntil.d.ts +7 -7
  102. package/dist/types/components/moduleWrapper.d.ts +4 -4
  103. package/dist/types/components/withCompatMode.d.ts +14 -14
  104. package/dist/types/components/withHydrationBoundary.d.ts +24 -17
  105. package/dist/types/constants/hydrationContext.d.ts +6 -9
  106. package/dist/types/constants/index.d.ts +1 -1
  107. package/dist/types/constants/languages.d.ts +12 -12
  108. package/dist/types/handler/DialogHandler.d.ts +24 -24
  109. package/dist/types/helper/apiListenerHelper.d.ts +6 -6
  110. package/dist/types/hooks/geoLocationListener.d.ts +18 -18
  111. package/dist/types/hooks/index.d.ts +17 -17
  112. package/dist/types/hooks/scrollListener.d.ts +28 -28
  113. package/dist/types/hooks/useAccessToken.d.ts +6 -6
  114. package/dist/types/hooks/useCurrentPage.d.ts +7 -7
  115. package/dist/types/hooks/useCustomData.d.ts +4 -4
  116. package/dist/types/hooks/useDevice.d.ts +5 -5
  117. package/dist/types/hooks/useDialogState.d.ts +9 -9
  118. package/dist/types/hooks/useEnvironment.d.ts +5 -5
  119. package/dist/types/hooks/useFunctions.d.ts +5 -5
  120. package/dist/types/hooks/useIsAdminMode.d.ts +4 -4
  121. package/dist/types/hooks/useLanguage.d.ts +5 -5
  122. package/dist/types/hooks/usePages.d.ts +18 -18
  123. package/dist/types/hooks/useParameters.d.ts +5 -5
  124. package/dist/types/hooks/useSite.d.ts +5 -5
  125. package/dist/types/hooks/useUser.d.ts +5 -5
  126. package/dist/types/hooks/useValues.d.ts +5 -5
  127. package/dist/types/hooks/windowMetricsListener.d.ts +11 -11
  128. package/dist/types/host/ChaynsHost.d.ts +29 -29
  129. package/dist/types/host/iframe/HostIframe.d.ts +26 -26
  130. package/dist/types/host/iframe/utils/useUpdateData.d.ts +3 -3
  131. package/dist/types/host/module/ModuleHost.d.ts +28 -28
  132. package/dist/types/host/module/utils/loadComponent.d.ts +3 -3
  133. package/dist/types/index.d.ts +20 -20
  134. package/dist/types/types/IChaynsReact.d.ts +896 -896
  135. package/dist/types/types/dialog.d.ts +41 -41
  136. package/dist/types/util/appCall.d.ts +2 -2
  137. package/dist/types/util/bindChaynsApi.d.ts +1 -1
  138. package/dist/types/util/deviceHelper.d.ts +9 -9
  139. package/dist/types/util/heightHelper.d.ts +1 -1
  140. package/dist/types/util/initModuleFederationSharing.d.ts +3 -3
  141. package/dist/types/util/is.d.ts +5 -5
  142. package/dist/types/util/postIframeForm.d.ts +1 -1
  143. package/dist/types/util/transferNestedFunctions.d.ts +1 -1
  144. package/dist/types/util/url.d.ts +1 -1
  145. package/dist/types/wrapper/AppWrapper.d.ts +19 -19
  146. package/dist/types/wrapper/FrameWrapper.d.ts +15 -15
  147. package/dist/types/wrapper/ModuleFederationWrapper.d.ts +10 -10
  148. package/dist/types/wrapper/SsrWrapper.d.ts +11 -11
  149. package/dist/types/wrapper/StaticChaynsApi.d.ts +16 -16
  150. package/package.json +88 -88
  151. package/toolkit.config.js +20 -20
  152. package/tsconfig.json +56 -56
@@ -1,78 +1,78 @@
1
1
  import { moduleWrapper } from '../components/moduleWrapper';
2
- /**
3
- * This adds a listener to determine your location.
4
- * @category Event listener
2
+ /**
3
+ * This adds a listener to determine your location.
4
+ * @category Event listener
5
5
  */
6
6
  export const addGeoLocationListener = function () {
7
7
  return moduleWrapper.current.functions.addGeoLocationListener(...arguments);
8
8
  };
9
- /**
10
- * Adds a listener for scroll event by user.
11
- * @category Event listener
9
+ /**
10
+ * Adds a listener for scroll event by user.
11
+ * @category Event listener
12
12
  */
13
13
  export const addScrollListener = function () {
14
14
  return moduleWrapper.current.functions.addScrollListener(...arguments);
15
15
  };
16
- /**
17
- * This method will be executed when the page gets displayed or hidden.
18
- * @category Event listener
16
+ /**
17
+ * This method will be executed when the page gets displayed or hidden.
18
+ * @category Event listener
19
19
  */
20
20
  export const addVisibilityChangeListener = function () {
21
21
  return moduleWrapper.current.functions.addVisibilityChangeListener(...arguments);
22
22
  };
23
- /**
24
- * This method will be executed when the toolbar gets displayed or hidden.
25
- * @category Event listener
23
+ /**
24
+ * This method will be executed when the toolbar gets displayed or hidden.
25
+ * @category Event listener
26
26
  */
27
27
  export const addToolbarChangeListener = function () {
28
28
  return moduleWrapper.current.functions.addToolbarChangeListener(...arguments);
29
29
  };
30
30
 
31
- /**
32
- * This adds a listener to get the actual height of the page.
33
- * @category Event listener
31
+ /**
32
+ * This adds a listener to get the actual height of the page.
33
+ * @category Event listener
34
34
  */
35
35
  export const addWindowMetricsListener = function () {
36
36
  return moduleWrapper.current.functions.addWindowMetricsListener(...arguments);
37
- }; /**
38
- * Allows a custom callback function to be defined
37
+ }; /**
38
+ * Allows a custom callback function to be defined
39
39
  */
40
40
  export const customCallbackFunction = function () {
41
41
  return moduleWrapper.current.functions.customCallbackFunction(...arguments);
42
42
  };
43
- /**
44
- * Get the accessToken from the user.
43
+ /**
44
+ * Get the accessToken from the user.
45
45
  */
46
46
  export const getAccessToken = function () {
47
47
  return moduleWrapper.current.functions.getAccessToken(...arguments);
48
48
  };
49
- /**
50
- * This method returns a list of installed share/social media apps.
49
+ /**
50
+ * This method returns a list of installed share/social media apps.
51
51
  */
52
52
  export const getAvailableSharingServices = function () {
53
53
  return moduleWrapper.current.functions.getAvailableSharingServices(...arguments);
54
54
  };
55
- /**
56
- * This method determines your location. If you want to track a route, use addGeoLocationListener.
55
+ /**
56
+ * This method determines your location. If you want to track a route, use addGeoLocationListener.
57
57
  */
58
58
  export const getGeoLocation = function () {
59
59
  return moduleWrapper.current.functions.getGeoLocation(...arguments);
60
60
  };
61
- /**
62
- * This method returns user information for a specific user.
63
- * @category User functions
61
+ /**
62
+ * This method returns user information for a specific user.
63
+ * @category User functions
64
64
  */
65
65
  export const getUserInfo = function () {
66
66
  return moduleWrapper.current.functions.getUserInfo(...arguments);
67
67
  };
68
- /**
69
- * Return the current scroll position of the top frame
68
+ /**
69
+ * Return the current scroll position of the top frame
70
70
  */
71
71
  export const getScrollPosition = function () {
72
72
  return moduleWrapper.current.functions.getScrollPosition(...arguments);
73
73
  };
74
- /**
75
- * Returns the window metrics.
74
+ /**
75
+ * Returns the window metrics.
76
76
  */
77
77
  export const getWindowMetrics = function () {
78
78
  return moduleWrapper.current.functions.getWindowMetrics(...arguments);
@@ -85,223 +85,223 @@ export const invokeCall = function () {
85
85
  export const invokeDialogCall = function () {
86
86
  return moduleWrapper.current.functions.invokeDialogCall(...arguments);
87
87
  };
88
- /**
89
- * This method will show a login dialog where the user has the opportunity to log in.
88
+ /**
89
+ * This method will show a login dialog where the user has the opportunity to log in.
90
90
  */
91
91
  export const login = function () {
92
92
  return moduleWrapper.current.functions.login(...arguments);
93
93
  };
94
- /**
95
- * This method will logout the user
94
+ /**
95
+ * This method will logout the user
96
96
  */
97
97
  export const logout = function () {
98
98
  return moduleWrapper.current.functions.logout(...arguments);
99
99
  };
100
- /**
101
- * This function navigates you to the previous site.
100
+ /**
101
+ * This function navigates you to the previous site.
102
102
  */
103
103
  export const navigateBack = function () {
104
104
  return moduleWrapper.current.functions.navigateBack(...arguments);
105
105
  };
106
- /**
107
- * The images specified in the url array is shown in gallery mode.
106
+ /**
107
+ * The images specified in the url array is shown in gallery mode.
108
108
  */
109
109
  export const openImage = function () {
110
110
  return moduleWrapper.current.functions.openImage(...arguments);
111
111
  };
112
- /**
113
- * The images and videos specified in the items array is shown in gallery mode.
112
+ /**
113
+ * The images and videos specified in the items array is shown in gallery mode.
114
114
  */
115
115
  export const openMedia = function () {
116
116
  return moduleWrapper.current.functions.openMedia(...arguments);
117
117
  };
118
- /**
119
- * Opens an URL in the chayns environment.
118
+ /**
119
+ * Opens an URL in the chayns environment.
120
120
  */
121
121
  export const openUrl = function () {
122
122
  return moduleWrapper.current.functions.openUrl(...arguments);
123
123
  };
124
- /**
125
- * The video specified in the URL is shown in video mode.
124
+ /**
125
+ * The video specified in the URL is shown in video mode.
126
126
  */
127
127
  export const openVideo = function () {
128
128
  return moduleWrapper.current.functions.openVideo(...arguments);
129
129
  };
130
- /**
131
- * Refresh badge count in navigation, user information and pages
130
+ /**
131
+ * Refresh badge count in navigation, user information and pages
132
132
  */
133
133
  export const refreshData = function () {
134
134
  return moduleWrapper.current.functions.refreshData(...arguments);
135
135
  };
136
- /**
137
- * Refresh accesstoken, should only be used when user object changes, not when token is invalid
136
+ /**
137
+ * Refresh accesstoken, should only be used when user object changes, not when token is invalid
138
138
  */
139
139
  export const refreshAccessToken = function () {
140
140
  return moduleWrapper.current.functions.refreshAccessToken(...arguments);
141
141
  };
142
- /**
143
- * This removes a listener to determine your location.
144
- * @category Event listener
142
+ /**
143
+ * This removes a listener to determine your location.
144
+ * @category Event listener
145
145
  */
146
146
  export const removeGeoLocationListener = function () {
147
147
  return moduleWrapper.current.functions.removeGeoLocationListener(...arguments);
148
148
  };
149
- /**
150
- * This removes a listener for changing toolbar visibility
151
- * @category Event listener
149
+ /**
150
+ * This removes a listener for changing toolbar visibility
151
+ * @category Event listener
152
152
  */
153
153
  export const removeToolbarChangeListener = function () {
154
154
  return moduleWrapper.current.functions.removeToolbarChangeListener(...arguments);
155
155
  };
156
- /**
157
- * Removes scroll listener.
158
- * @category Event listener
156
+ /**
157
+ * Removes scroll listener.
158
+ * @category Event listener
159
159
  */
160
160
  export const removeScrollListener = function () {
161
161
  return moduleWrapper.current.functions.removeScrollListener(...arguments);
162
162
  };
163
- /**
164
- * Removes visibility change listener.
165
- * @category Event listener
163
+ /**
164
+ * Removes visibility change listener.
165
+ * @category Event listener
166
166
  */
167
167
  export const removeVisibilityChangeListener = function () {
168
168
  return moduleWrapper.current.functions.removeVisibilityChangeListener(...arguments);
169
169
  };
170
- /**
171
- * Removes window metrics listener.
172
- * @category Event listener
170
+ /**
171
+ * Removes window metrics listener.
172
+ * @category Event listener
173
173
  */
174
174
  export const removeWindowMetricsListener = function () {
175
175
  return moduleWrapper.current.functions.removeWindowMetricsListener(...arguments);
176
176
  };
177
- /**
178
- * Select other page on chayns site.
177
+ /**
178
+ * Select other page on chayns site.
179
179
  */
180
180
  export const selectPage = function () {
181
181
  return moduleWrapper.current.functions.selectPage(...arguments);
182
182
  };
183
- /**
184
- * Scrolls by specific amount.
183
+ /**
184
+ * Scrolls by specific amount.
185
185
  */
186
186
  export const scrollByY = function () {
187
187
  return moduleWrapper.current.functions.scrollByY(...arguments);
188
188
  };
189
- /**
190
- * Scrolls to specific position.
189
+ /**
190
+ * Scrolls to specific position.
191
191
  */
192
192
  export const scrollToY = function () {
193
193
  return moduleWrapper.current.functions.scrollToY(...arguments);
194
194
  };
195
- /**
196
- * Sends intercom message to group.
195
+ /**
196
+ * Sends intercom message to group.
197
197
  */
198
198
  export const sendMessageToGroup = function () {
199
199
  return moduleWrapper.current.functions.sendMessageToGroup(...arguments);
200
200
  };
201
- /**
202
- * Sends intercom message to page.
201
+ /**
202
+ * Sends intercom message to page.
203
203
  */
204
204
  export const sendMessageToPage = function () {
205
205
  return moduleWrapper.current.functions.sendMessageToPage(...arguments);
206
206
  };
207
- /**
208
- * Sends intercom message to an user.
207
+ /**
208
+ * Sends intercom message to an user.
209
209
  */
210
210
  export const sendMessageToUser = function () {
211
211
  return moduleWrapper.current.functions.sendMessageToUser(...arguments);
212
212
  };
213
- /**
214
- * Switches admin mode, also toggles admin switch in top frame.
213
+ /**
214
+ * Switches admin mode, also toggles admin switch in top frame.
215
215
  */
216
216
  export const setAdminMode = function () {
217
217
  return moduleWrapper.current.functions.setAdminMode(...arguments);
218
218
  };
219
- /**
220
- * Sets the display timeout, only works in chayns App.
219
+ /**
220
+ * Sets the display timeout, only works in chayns App.
221
221
  */
222
222
  export const setDisplayTimeout = function () {
223
223
  return moduleWrapper.current.functions.setDisplayTimeout(...arguments);
224
224
  };
225
- /**
226
- * Enables or disables a button which floats over the page.
225
+ /**
226
+ * Enables or disables a button which floats over the page.
227
227
  */
228
228
  export const setFloatingButton = function () {
229
229
  return moduleWrapper.current.functions.setFloatingButton(...arguments);
230
230
  };
231
- /**
232
- * Sets the height of the page.
231
+ /**
232
+ * Sets the height of the page.
233
233
  */
234
234
  export const setHeight = function () {
235
235
  return moduleWrapper.current.functions.setHeight(...arguments);
236
236
  };
237
- /**
238
- * Enables or disables the ability to refresh a page
237
+ /**
238
+ * Enables or disables the ability to refresh a page
239
239
  */
240
240
  export const setRefreshScrollEnabled = function () {
241
241
  return moduleWrapper.current.functions.setRefreshScrollEnabled(...arguments);
242
242
  };
243
- /**
244
- * Scans a qr-code and returns the result
243
+ /**
244
+ * Scans a qr-code and returns the result
245
245
  */
246
246
  export const setScanQrCode = function () {
247
247
  return moduleWrapper.current.functions.setScanQrCode(...arguments);
248
248
  };
249
- /**
250
- * Temporarily change design settings in top frame
249
+ /**
250
+ * Temporarily change design settings in top frame
251
251
  */
252
252
  export const setTempDesignSettings = function () {
253
253
  return moduleWrapper.current.functions.setTempDesignSettings(...arguments);
254
254
  };
255
- /**
256
- * Shows or hide a waitcursor
255
+ /**
256
+ * Shows or hide a waitcursor
257
257
  */
258
258
  export const setWaitCursor = function () {
259
259
  return moduleWrapper.current.functions.setWaitCursor(...arguments);
260
260
  };
261
- /**
262
- * Retrieves the value that is assigned to the key from a storage outside the frame
261
+ /**
262
+ * Retrieves the value that is assigned to the key from a storage outside the frame
263
263
  */
264
264
  export const storageGetItem = function () {
265
265
  return moduleWrapper.current.functions.storageGetItem(...arguments);
266
266
  };
267
- /**
268
- * Removes the value that is assigned to the key from a storage outside the frame
267
+ /**
268
+ * Removes the value that is assigned to the key from a storage outside the frame
269
269
  */
270
270
  export const storageRemoveItem = function () {
271
271
  return moduleWrapper.current.functions.storageRemoveItem(...arguments);
272
272
  };
273
- /**
274
- * Sets the value that is assigned to the key from a storage outside the frame
273
+ /**
274
+ * Sets the value that is assigned to the key from a storage outside the frame
275
275
  */
276
276
  export const storageSetItem = function () {
277
277
  return moduleWrapper.current.functions.storageSetItem(...arguments);
278
278
  };
279
- /**
280
- * This method lets a smartphone vibrate for the given time.
279
+ /**
280
+ * This method lets a smartphone vibrate for the given time.
281
281
  */
282
282
  export const vibrate = function () {
283
283
  return moduleWrapper.current.functions.vibrate(...arguments);
284
284
  };
285
285
 
286
- /**
287
- * This method creates a dialog
286
+ /**
287
+ * This method creates a dialog
288
288
  */
289
289
  // @ts-ignore
290
290
  export const createDialog = config => moduleWrapper.current.functions.createDialog(config);
291
- /**
292
- * Displays an overlay
291
+ /**
292
+ * Displays an overlay
293
293
  */
294
294
  export const setOverlay = function () {
295
295
  return moduleWrapper.current.functions.setOverlay(...arguments);
296
296
  };
297
297
 
298
- /**
299
- * Generates a temp accesstoken, only valid for short period of time (~3 days), works only when no user is logged in
298
+ /**
299
+ * Generates a temp accesstoken, only valid for short period of time (~3 days), works only when no user is logged in
300
300
  */
301
301
  export const addAnonymousAccount = () => moduleWrapper.current.functions.addAnonymousAccount();
302
- /**
303
- * Returns user information, only when user is logged in
304
- * @category User functions
302
+ /**
303
+ * Returns user information, only when user is logged in
304
+ * @category User functions
305
305
  */
306
306
  export const getUser = () => moduleWrapper.current.values.user;
307
307
  export const getSite = () => moduleWrapper.current.values.site;
@@ -1,6 +1,6 @@
1
1
  const INTERCOM_URL = 'https://sub54.tobit.com/rest/api';
2
- /**
3
- * @category Intercom functions
2
+ /**
3
+ * @category Intercom functions
4
4
  */
5
5
  export const sendMessageToUser = async (api, object, receiverUserId) => {
6
6
  var _api$values$user;
@@ -34,8 +34,8 @@ export const sendMessageToUser = async (api, object, receiverUserId) => {
34
34
  }
35
35
  });
36
36
  };
37
- /**
38
- * @category Intercom functions
37
+ /**
38
+ * @category Intercom functions
39
39
  */
40
40
  export const sendMessageToPage = async (api, object) => {
41
41
  var _api$values$user2;
@@ -66,8 +66,8 @@ export const sendMessageToPage = async (api, object) => {
66
66
  }
67
67
  });
68
68
  };
69
- /**
70
- * @category Intercom functions
69
+ /**
70
+ * @category Intercom functions
71
71
  */
72
72
  export const sendMessageToGroup = async (api, object, groupId) => {
73
73
  if (!object.text) {
@@ -96,8 +96,8 @@ export const sendMessageToGroup = async (api, object, groupId) => {
96
96
  }
97
97
  });
98
98
  };
99
- /**
100
- * @category Intercom functions
99
+ /**
100
+ * @category Intercom functions
101
101
  */
102
102
  function sendMessage(endpoint, token, body) {
103
103
  return fetch(`${INTERCOM_URL}${endpoint}`, {
@@ -6,8 +6,8 @@ const handleVisibilityChange = () => {
6
6
  });
7
7
  };
8
8
 
9
- /**
10
- * @category Event listener
9
+ /**
10
+ * @category Event listener
11
11
  */
12
12
  export const addVisibilityChangeListener = callback => {
13
13
  const {
@@ -19,8 +19,8 @@ export const addVisibilityChangeListener = callback => {
19
19
  }
20
20
  return id;
21
21
  };
22
- /**
23
- * @category Event listener
22
+ /**
23
+ * @category Event listener
24
24
  */
25
25
  export const removeVisibilityChangeListener = id => {
26
26
  const shouldRemove = removeApiListener(key, id);
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useEffect, useState } from 'react';
3
3
  import ChaynsHost from '../host/ChaynsHost';
4
4
  import { useFunctions, useValues } from '../hooks';
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  /* eslint-disable react/jsx-props-no-spreading */
3
3
 
4
4
  import React, { PureComponent } from 'react';
@@ -51,7 +51,7 @@ export const withCompatMode = Component => {
51
51
  if (this.root) {
52
52
  this.root.unmount();
53
53
  } else {
54
- ReactDOM.render( /*#__PURE__*/React.createElement(React.Fragment, null), this.ref.current);
54
+ ReactDOM.render(/*#__PURE__*/React.createElement(React.Fragment, null), this.ref.current);
55
55
  }
56
56
  }
57
57
  render() {
@@ -1,7 +1,7 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useContext, useEffect, useState } from 'react';
3
3
  import { HydrationContext } from '../constants';
4
- const withHydrationBoundary = (Component, initializer, useHydrationId, useProps) => {
4
+ function withHydrationBoundary(Component, initializer, useHydrationId, useProps) {
5
5
  return _ref => {
6
6
  let {
7
7
  id: idProp,
@@ -46,5 +46,5 @@ const withHydrationBoundary = (Component, initializer, useHydrationId, useProps)
46
46
  value: store
47
47
  }), children);
48
48
  };
49
- };
49
+ }
50
50
  export default withHydrationBoundary;
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  export default class DialogHandler {
@@ -1,8 +1,8 @@
1
1
  import { useContextSelector } from 'use-context-selector';
2
2
  import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { ChaynsFunctionsContext } from '../components/ChaynsContext';
4
- /**
5
- * @category Hooks
4
+ /**
5
+ * @category Hooks
6
6
  */
7
7
  export const useGeoLocationListener = () => {
8
8
  const addListener = useContextSelector(ChaynsFunctionsContext, v => v.addGeoLocationListener);
@@ -17,8 +17,8 @@ export const useGeoLocationListener = () => {
17
17
  // eslint-disable-next-line react-hooks/exhaustive-deps
18
18
  }, []);
19
19
  };
20
- /**
21
- * @category Hooks
20
+ /**
21
+ * @category Hooks
22
22
  */
23
23
  export const useGeoLocation = function () {
24
24
  let {
@@ -2,8 +2,8 @@ import { useContextSelector } from 'use-context-selector';
2
2
  import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { ChaynsFunctionsContext } from '../components/ChaynsContext';
4
4
  import { useWindowMetrics } from './windowMetricsListener';
5
- /**
6
- * @category Hooks
5
+ /**
6
+ * @category Hooks
7
7
  */
8
8
  export const useScrollListener = () => {
9
9
  const addListener = useContextSelector(ChaynsFunctionsContext, v => v.addScrollListener);
@@ -18,8 +18,8 @@ export const useScrollListener = () => {
18
18
  // eslint-disable-next-line react-hooks/exhaustive-deps
19
19
  }, []);
20
20
  };
21
- /**
22
- * @category Hooks
21
+ /**
22
+ * @category Hooks
23
23
  */
24
24
  export const useScrollPosition = function () {
25
25
  let {
@@ -46,8 +46,8 @@ export const useScrollPosition = function () {
46
46
  }, [getScrollPosition]);
47
47
  return value;
48
48
  };
49
- /**
50
- * @category Hooks
49
+ /**
50
+ * @category Hooks
51
51
  */
52
52
  export const useScrollOffsetTop = function () {
53
53
  let {
@@ -69,8 +69,8 @@ export const useScrollOffsetTop = function () {
69
69
  }
70
70
  return 0;
71
71
  };
72
- /**
73
- * @category Hooks
72
+ /**
73
+ * @category Hooks
74
74
  */
75
75
  export const useScrollOffsetBottom = function () {
76
76
  let {
@@ -2,9 +2,9 @@ import { useEffect, useState } from "react";
2
2
  import { useContextSelector } from "use-context-selector";
3
3
  import { ChaynsFunctionsContext } from "../components/ChaynsContext";
4
4
 
5
- /**
6
- * @category Hooks
7
- * @deprecated Use {@link getAccessToken} instead
5
+ /**
6
+ * @category Hooks
7
+ * @deprecated Use {@link getAccessToken} instead
8
8
  */
9
9
  export const useAccessToken = accessToken => {
10
10
  const [token, setToken] = useState(null);
@@ -1,7 +1,7 @@
1
1
  import { useContextSelector } from 'use-context-selector';
2
2
  import { ChaynsContext } from '../components/ChaynsContext';
3
3
 
4
- /**
5
- * @category Hooks
4
+ /**
5
+ * @category Hooks
6
6
  */
7
7
  export const useCurrentPage = () => useContextSelector(ChaynsContext, v => v === null || v === void 0 ? void 0 : v.currentPage);
@@ -1,7 +1,7 @@
1
1
  import { useContextSelector } from 'use-context-selector';
2
2
  import { ChaynsContext } from '../components/ChaynsContext';
3
3
 
4
- /**
5
- * @category Hooks
4
+ /**
5
+ * @category Hooks
6
6
  */
7
7
  export const useCustomData = () => useContextSelector(ChaynsContext, v => v === null || v === void 0 ? void 0 : v.customData);
@@ -1,6 +1,6 @@
1
1
  import { useContextSelector } from 'use-context-selector';
2
2
  import { ChaynsContext } from '../components/ChaynsContext';
3
- /**
4
- * @category Hooks
3
+ /**
4
+ * @category Hooks
5
5
  */
6
6
  export const useDevice = () => useContextSelector(ChaynsContext, v => v === null || v === void 0 ? void 0 : v.device);
@@ -1,8 +1,8 @@
1
1
  import { useContextSelector } from 'use-context-selector';
2
2
  import { ChaynsContext, ChaynsFunctionsContext } from '../components/ChaynsContext';
3
3
 
4
- /**
5
- * @category Hooks
4
+ /**
5
+ * @category Hooks
6
6
  */
7
7
  export const useDialogState = () => {
8
8
  const setResult = useContextSelector(ChaynsFunctionsContext, v => v === null || v === void 0 ? void 0 : v.setDialogResult);
@@ -20,8 +20,8 @@ export const useDialogState = () => {
20
20
  };
21
21
  };
22
22
 
23
- /**
24
- * @category Hooks
23
+ /**
24
+ * @category Hooks
25
25
  */
26
26
  export const useDialogData = () => {
27
27
  const inputData = useContextSelector(ChaynsContext, v => {
@@ -1,6 +1,6 @@
1
1
  import { useContextSelector } from 'use-context-selector';
2
2
  import { ChaynsContext } from '../components/ChaynsContext';
3
- /**
4
- * @category Hooks
3
+ /**
4
+ * @category Hooks
5
5
  */
6
6
  export const useEnvironment = () => useContextSelector(ChaynsContext, v => v === null || v === void 0 ? void 0 : v.environment);