chayns-api 1.0.2 → 1.0.4

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 (130) 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 -0
  5. package/LICENSE +21 -21
  6. package/README.md +47 -47
  7. package/dist/cjs/calls/dialogs/date.js +10 -10
  8. package/dist/cjs/calls/index.js +100 -95
  9. package/dist/cjs/calls/sendMessage.js +8 -8
  10. package/dist/cjs/calls/visibilityChangeListener.js +4 -4
  11. package/dist/cjs/hooks/geoLocationListener.js +4 -4
  12. package/dist/cjs/hooks/scrollListener.js +8 -8
  13. package/dist/cjs/hooks/useAccessToken.js +2 -2
  14. package/dist/cjs/hooks/useCurrentPage.js +2 -2
  15. package/dist/cjs/hooks/useCustomData.js +2 -2
  16. package/dist/cjs/hooks/useDevice.js +2 -2
  17. package/dist/cjs/hooks/useEnvironment.js +2 -2
  18. package/dist/cjs/hooks/useFunctions.js +2 -2
  19. package/dist/cjs/hooks/useIsAdminMode.js +2 -2
  20. package/dist/cjs/hooks/useLanguage.js +2 -2
  21. package/dist/cjs/hooks/usePages.js +4 -4
  22. package/dist/cjs/hooks/useParameters.js +2 -2
  23. package/dist/cjs/hooks/useSite.js +2 -2
  24. package/dist/cjs/hooks/useUser.js +2 -2
  25. package/dist/cjs/hooks/useValues.js +2 -2
  26. package/dist/cjs/hooks/windowMetricsListener.js +4 -4
  27. package/dist/cjs/util/deviceHelper.js +1 -1
  28. package/dist/cjs/wrapper/AppWrapper.js +5 -0
  29. package/dist/cjs/wrapper/FrameWrapper.js +4 -0
  30. package/dist/esm/calls/dialogs/date.js +34 -34
  31. package/dist/esm/calls/index.js +100 -94
  32. package/dist/esm/calls/sendMessage.js +8 -8
  33. package/dist/esm/calls/visibilityChangeListener.js +4 -4
  34. package/dist/esm/hooks/geoLocationListener.js +4 -4
  35. package/dist/esm/hooks/scrollListener.js +8 -8
  36. package/dist/esm/hooks/useAccessToken.js +2 -2
  37. package/dist/esm/hooks/useCurrentPage.js +2 -2
  38. package/dist/esm/hooks/useCustomData.js +2 -2
  39. package/dist/esm/hooks/useDevice.js +2 -2
  40. package/dist/esm/hooks/useEnvironment.js +2 -2
  41. package/dist/esm/hooks/useFunctions.js +2 -2
  42. package/dist/esm/hooks/useIsAdminMode.js +2 -2
  43. package/dist/esm/hooks/useLanguage.js +2 -2
  44. package/dist/esm/hooks/usePages.js +4 -4
  45. package/dist/esm/hooks/useParameters.js +2 -2
  46. package/dist/esm/hooks/useSite.js +2 -2
  47. package/dist/esm/hooks/useUser.js +2 -2
  48. package/dist/esm/hooks/useValues.js +2 -2
  49. package/dist/esm/hooks/windowMetricsListener.js +4 -4
  50. package/dist/esm/util/deviceHelper.js +1 -1
  51. package/dist/esm/wrapper/AppWrapper.js +5 -0
  52. package/dist/esm/wrapper/FrameWrapper.js +4 -0
  53. package/dist/types/calls/dialogs/alert.d.ts +1 -1
  54. package/dist/types/calls/dialogs/chaynsDialog.d.ts +24 -24
  55. package/dist/types/calls/dialogs/close.d.ts +1 -1
  56. package/dist/types/calls/dialogs/communication.d.ts +3 -3
  57. package/dist/types/calls/dialogs/confirm.d.ts +13 -13
  58. package/dist/types/calls/dialogs/date.d.ts +96 -96
  59. package/dist/types/calls/dialogs/dropUpAlert.d.ts +5 -5
  60. package/dist/types/calls/dialogs/fileSelect.d.ts +16 -16
  61. package/dist/types/calls/dialogs/iFrame.d.ts +10 -10
  62. package/dist/types/calls/dialogs/index.d.ts +14 -14
  63. package/dist/types/calls/dialogs/input.d.ts +15 -15
  64. package/dist/types/calls/dialogs/mediaSelect.d.ts +8 -8
  65. package/dist/types/calls/dialogs/open.d.ts +1 -1
  66. package/dist/types/calls/dialogs/select.d.ts +6 -6
  67. package/dist/types/calls/dialogs/signature.d.ts +7 -7
  68. package/dist/types/calls/dialogs/toast.d.ts +1 -1
  69. package/dist/types/calls/dialogs/utils/callback.d.ts +1 -1
  70. package/dist/types/calls/dialogs/utils/is.d.ts +4 -4
  71. package/dist/types/calls/getUserInfo.d.ts +9 -9
  72. package/dist/types/calls/index.d.ts +229 -225
  73. package/dist/types/calls/sendMessage.d.ts +13 -13
  74. package/dist/types/calls/visibilityChangeListener.d.ts +9 -9
  75. package/dist/types/components/ChaynsContext.d.ts +3 -3
  76. package/dist/types/components/ChaynsProvider.d.ts +13 -13
  77. package/dist/types/components/WaitUntil.d.ts +7 -7
  78. package/dist/types/components/withCompatMode.d.ts +13 -13
  79. package/dist/types/helper/apiListenerHelper.d.ts +6 -6
  80. package/dist/types/hooks/geoLocationListener.d.ts +18 -18
  81. package/dist/types/hooks/index.d.ts +16 -16
  82. package/dist/types/hooks/scrollListener.d.ts +28 -28
  83. package/dist/types/hooks/useAccessToken.d.ts +5 -5
  84. package/dist/types/hooks/useCurrentPage.d.ts +4 -4
  85. package/dist/types/hooks/useCustomData.d.ts +4 -4
  86. package/dist/types/hooks/useDevice.d.ts +5 -5
  87. package/dist/types/hooks/useEnvironment.d.ts +5 -5
  88. package/dist/types/hooks/useFunctions.d.ts +5 -5
  89. package/dist/types/hooks/useIsAdminMode.d.ts +4 -4
  90. package/dist/types/hooks/useLanguage.d.ts +5 -5
  91. package/dist/types/hooks/usePages.d.ts +18 -18
  92. package/dist/types/hooks/useParameters.d.ts +5 -5
  93. package/dist/types/hooks/useSite.d.ts +5 -5
  94. package/dist/types/hooks/useUser.d.ts +5 -5
  95. package/dist/types/hooks/useValues.d.ts +5 -5
  96. package/dist/types/hooks/windowMetricsListener.d.ts +11 -11
  97. package/dist/types/host/ChaynsHost.d.ts +28 -28
  98. package/dist/types/host/iframe/HostIframe.d.ts +24 -24
  99. package/dist/types/host/iframe/utils/useUpdateData.d.ts +3 -3
  100. package/dist/types/host/module/ModuleHost.d.ts +23 -23
  101. package/dist/types/host/module/utils/loadComponent.d.ts +1 -1
  102. package/dist/types/host/module/utils/useDynamicScript.d.ts +9 -9
  103. package/dist/types/index.d.ts +16 -16
  104. package/dist/types/types/IChaynsReact.d.ts +622 -621
  105. package/dist/types/types/dialog.d.ts +41 -41
  106. package/dist/types/util/appCall.d.ts +2 -2
  107. package/dist/types/util/deviceHelper.d.ts +7 -7
  108. package/dist/types/util/heightHelper.d.ts +1 -1
  109. package/dist/types/util/postIframeForm.d.ts +1 -1
  110. package/dist/types/wrapper/AppWrapper.d.ts +18 -18
  111. package/dist/types/wrapper/FrameWrapper.d.ts +15 -15
  112. package/dist/types/wrapper/ModuleFederationWrapper.d.ts +10 -10
  113. package/dist/types/wrapper/SsrWrapper.d.ts +11 -11
  114. package/package.json +76 -76
  115. package/toolkit.config.js +52 -52
  116. package/tsconfig.json +56 -56
  117. package/dist/cjs/calls/dialogs/utils/environment.js +0 -10
  118. package/dist/cjs/client.js +0 -93
  119. package/dist/cjs/components/ChaynsModuleProvider.js +0 -457
  120. package/dist/cjs/host/module/PagemakerFrame.js +0 -105
  121. package/dist/cjs/types/DynamicApiImport.d.js +0 -5
  122. package/dist/esm/calls/dialogs/utils/environment.js +0 -3
  123. package/dist/esm/client.js +0 -8
  124. package/dist/esm/components/ChaynsModuleProvider.js +0 -517
  125. package/dist/esm/host/module/PagemakerFrame.js +0 -97
  126. package/dist/esm/types/DynamicApiImport.d.js +0 -1
  127. package/dist/types/calls/dialogs/utils/environment.d.ts +0 -3
  128. package/dist/types/client.d.ts +0 -7
  129. package/dist/types/components/ChaynsModuleProvider.d.ts +0 -170
  130. package/dist/types/host/module/PagemakerFrame.d.ts +0 -22
@@ -17,7 +17,7 @@ const getDeviceInfo = (userAgent, acceptHeader) => {
17
17
  appName = _IChaynsReact.AppName.David;
18
18
  } else if (match) {
19
19
  appName = _IChaynsReact.AppName.Location;
20
- } else if (/dface|h96pp|h96max|jabiru|chaynsterminal|wayter|odroidn2p/i.test(navigator.userAgent)) {
20
+ } else if (/dface|h96pp|h96max|jabiru|chaynsterminal|wayter|odroidn2p/i.test(userAgent)) {
21
21
  appName = _IChaynsReact.AppName.ChaynsLauncher;
22
22
  }
23
23
  const result = {};
@@ -308,6 +308,11 @@ class AppWrapper {
308
308
  top: position
309
309
  });
310
310
  },
311
+ scrollByY: (value, duration) => {
312
+ window.scrollBy({
313
+ top: value
314
+ });
315
+ },
311
316
  sendMessageToGroup: async (groupId, message) => {
312
317
  return (0, _sendMessage.sendMessageToGroup)(this, message, groupId);
313
318
  },
@@ -229,6 +229,10 @@ class FrameWrapper {
229
229
  vibrate: async value => {
230
230
  if (!this.initialized) await this.ready;
231
231
  return this.exposedFunctions.vibrate(value);
232
+ },
233
+ scrollByY: async (value, duration) => {
234
+ if (!this.initialized) await this.ready;
235
+ return this.exposedFunctions.scrollByY(value, duration);
232
236
  }
233
237
  };
234
238
  initialized = false;
@@ -3,32 +3,32 @@ import { isDate, isNumber, isObject } from './utils/is';
3
3
  import { open } from './open';
4
4
  import { getDevice } from "../index";
5
5
 
6
- /**
7
- * The config object for date dialog
8
- * @typedef {Object} dateConfig
9
- * @property {Date} preSelect - The date object which should be preselected.
10
- * @property {Date} minDate - The min date which you could select.
11
- * @property {Date} maxDate - The max date which you could select.
12
- * @property {dateDialogType} dateType - The type of dialog you want to display.
13
- * @property {number} minuteIntervall - The interval for special minutes, possible are 2, 3, 4, 5, 6, 12, 15, 20, 30. Default is 1.
14
- * @property {string} message - The message that is displayed above the date dialog, only in apps supported
15
- * @property {string} title - The title that is displayed above the message, only in apps supported
6
+ /**
7
+ * The config object for date dialog
8
+ * @typedef {Object} dateConfig
9
+ * @property {Date} preSelect - The date object which should be preselected.
10
+ * @property {Date} minDate - The min date which you could select.
11
+ * @property {Date} maxDate - The max date which you could select.
12
+ * @property {dateDialogType} dateType - The type of dialog you want to display.
13
+ * @property {number} minuteIntervall - The interval for special minutes, possible are 2, 3, 4, 5, 6, 12, 15, 20, 30. Default is 1.
14
+ * @property {string} message - The message that is displayed above the date dialog, only in apps supported
15
+ * @property {string} title - The title that is displayed above the message, only in apps supported
16
16
  */
17
17
 
18
- /**
19
- * This call will open a date select dialog.
20
- * <div>Call: 30</div>
21
- * @param {dateConfig} config - Define the configuration of this call
22
- * @return {Promise} contains a timestamp as result
23
- * @example chayns.dialog.date({
24
- * 'dateType': chayns.dialog.dateType.DATE_TIME,
25
- * 'preSelect': new Date(2018, 6, 14, 0, 0, 0),
26
- * 'minDate': new Date(2018, 6, 1, 15, 0, 0),
27
- * 'maxDate': new Date(2019, 6, 1, 0, 23, 0),
28
- * 'minuteInterval': 15
29
- * ).then(function (data) {
30
- * console.log(data);
31
- * });
18
+ /**
19
+ * This call will open a date select dialog.
20
+ * <div>Call: 30</div>
21
+ * @param {dateConfig} config - Define the configuration of this call
22
+ * @return {Promise} contains a timestamp as result
23
+ * @example chayns.dialog.date({
24
+ * 'dateType': chayns.dialog.dateType.DATE_TIME,
25
+ * 'preSelect': new Date(2018, 6, 14, 0, 0, 0),
26
+ * 'minDate': new Date(2018, 6, 1, 15, 0, 0),
27
+ * 'maxDate': new Date(2019, 6, 1, 0, 23, 0),
28
+ * 'minuteInterval': 15
29
+ * ).then(function (data) {
30
+ * console.log(data);
31
+ * });
32
32
  */
33
33
 
34
34
  export function date() {
@@ -165,18 +165,18 @@ export function advancedDate() {
165
165
  });
166
166
  }
167
167
 
168
- /**
169
- * @typedef {number} dateDialogType
168
+ /**
169
+ * @typedef {number} dateDialogType
170
170
  */
171
171
 
172
- /**
173
- * Enum for date dialog
174
- * <div>DATE will open a dialog where you can select a special day</div>
175
- * <div>TIME will open a dialog where you can only select a special time</div>
176
- * <div>DATE_TIME will open a dialog where you can select a special time on a special day</div>
177
- * @readonly
178
- * @enum {dateDialogType}
179
- * @type {{DATE: number, TIME: number, DATE_TIME: number}}
172
+ /**
173
+ * Enum for date dialog
174
+ * <div>DATE will open a dialog where you can select a special day</div>
175
+ * <div>TIME will open a dialog where you can only select a special time</div>
176
+ * <div>DATE_TIME will open a dialog where you can select a special time on a special day</div>
177
+ * @readonly
178
+ * @enum {dateDialogType}
179
+ * @type {{DATE: number, TIME: number, DATE_TIME: number}}
180
180
  */
181
181
  export const dateType = {
182
182
  'DATE': 1,
@@ -1,70 +1,70 @@
1
1
  import { moduleWrapper } from '../components/ChaynsProvider';
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 adds a listener to get the actual height of the page.
25
- * @category Event listener
23
+ /**
24
+ * This adds a listener to get the actual height of the page.
25
+ * @category Event listener
26
26
  */
27
27
  export const addWindowMetricsListener = function () {
28
28
  return moduleWrapper.current.functions.addWindowMetricsListener(...arguments);
29
- }; /**
30
- * Allows a custom callback function to be defined
29
+ }; /**
30
+ * Allows a custom callback function to be defined
31
31
  */
32
32
  export const customCallbackFunction = function () {
33
33
  return moduleWrapper.current.functions.customCallbackFunction(...arguments);
34
34
  };
35
- /**
36
- * Get the accessToken from the user.
35
+ /**
36
+ * Get the accessToken from the user.
37
37
  */
38
38
  export const getAccessToken = function () {
39
39
  return moduleWrapper.current.functions.getAccessToken(...arguments);
40
40
  };
41
- /**
42
- * This method returns a list of installed share/social media apps.
41
+ /**
42
+ * This method returns a list of installed share/social media apps.
43
43
  */
44
44
  export const getAvailableSharingServices = function () {
45
45
  return moduleWrapper.current.functions.getAvailableSharingServices(...arguments);
46
46
  };
47
- /**
48
- * This method determines your location. If you want to track a route, use addGeoLocationListener.
47
+ /**
48
+ * This method determines your location. If you want to track a route, use addGeoLocationListener.
49
49
  */
50
50
  export const getGeoLocation = function () {
51
51
  return moduleWrapper.current.functions.getGeoLocation(...arguments);
52
52
  };
53
- /**
54
- * This method returns user information for a specific user.
55
- * @category User functions
53
+ /**
54
+ * This method returns user information for a specific user.
55
+ * @category User functions
56
56
  */
57
57
  export const getUserInfo = function () {
58
58
  return moduleWrapper.current.functions.getUserInfo(...arguments);
59
59
  };
60
- /**
61
- * Return the current scroll position of the top frame
60
+ /**
61
+ * Return the current scroll position of the top frame
62
62
  */
63
63
  export const getScrollPosition = function () {
64
64
  return moduleWrapper.current.functions.getScrollPosition(...arguments);
65
65
  };
66
- /**
67
- * Returns the window metrics.
66
+ /**
67
+ * Returns the window metrics.
68
68
  */
69
69
  export const getWindowMetrics = function () {
70
70
  return moduleWrapper.current.functions.getWindowMetrics(...arguments);
@@ -77,193 +77,199 @@ export const invokeCall = function () {
77
77
  export const invokeDialogCall = function () {
78
78
  return moduleWrapper.current.functions.invokeDialogCall(...arguments);
79
79
  };
80
- /**
81
- * This method will show a login dialog where the user has the opportunity to log in.
80
+ /**
81
+ * This method will show a login dialog where the user has the opportunity to log in.
82
82
  */
83
83
  export const login = function () {
84
84
  return moduleWrapper.current.functions.login(...arguments);
85
85
  };
86
- /**
87
- * This method will logout the user
86
+ /**
87
+ * This method will logout the user
88
88
  */
89
89
  export const logout = function () {
90
90
  return moduleWrapper.current.functions.logout(...arguments);
91
91
  };
92
- /**
93
- * This function navigates you to the previous site.
92
+ /**
93
+ * This function navigates you to the previous site.
94
94
  */
95
95
  export const navigateBack = function () {
96
96
  return moduleWrapper.current.functions.navigateBack(...arguments);
97
97
  };
98
- /**
99
- * The images specified in the url array is shown in gallery mode.
98
+ /**
99
+ * The images specified in the url array is shown in gallery mode.
100
100
  */
101
101
  export const openImage = function () {
102
102
  return moduleWrapper.current.functions.openImage(...arguments);
103
103
  };
104
- /**
105
- * Opens an URL in the chayns environment.
104
+ /**
105
+ * Opens an URL in the chayns environment.
106
106
  */
107
107
  export const openUrl = function () {
108
108
  return moduleWrapper.current.functions.openUrl(...arguments);
109
109
  };
110
- /**
111
- * The video specified in the URL is shown in video mode.
110
+ /**
111
+ * The video specified in the URL is shown in video mode.
112
112
  */
113
113
  export const openVideo = function () {
114
114
  return moduleWrapper.current.functions.openVideo(...arguments);
115
115
  };
116
- /**
117
- * Refresh badge count in navigation, user information and pages
116
+ /**
117
+ * Refresh badge count in navigation, user information and pages
118
118
  */
119
119
  export const refreshData = function () {
120
120
  return moduleWrapper.current.functions.refreshData(...arguments);
121
121
  };
122
- /**
123
- * Refresh accesstoken, should only be used when user object changes, not when token is invalid
122
+ /**
123
+ * Refresh accesstoken, should only be used when user object changes, not when token is invalid
124
124
  */
125
125
  export const refreshAccessToken = function () {
126
126
  return moduleWrapper.current.functions.refreshAccessToken(...arguments);
127
127
  };
128
- /**
129
- * This removes a listener to determine your location.
130
- * @category Event listener
128
+ /**
129
+ * This removes a listener to determine your location.
130
+ * @category Event listener
131
131
  */
132
132
  export const removeGeoLocationListener = function () {
133
133
  return moduleWrapper.current.functions.removeGeoLocationListener(...arguments);
134
134
  };
135
- /**
136
- * Removes scroll listener.
137
- * @category Event listener
135
+ /**
136
+ * Removes scroll listener.
137
+ * @category Event listener
138
138
  */
139
139
  export const removeScrollListener = function () {
140
140
  return moduleWrapper.current.functions.removeScrollListener(...arguments);
141
141
  };
142
- /**
143
- * Removes visibility change listener.
144
- * @category Event listener
142
+ /**
143
+ * Removes visibility change listener.
144
+ * @category Event listener
145
145
  */
146
146
  export const removeVisibilityChangeListener = function () {
147
147
  return moduleWrapper.current.functions.removeVisibilityChangeListener(...arguments);
148
148
  };
149
- /**
150
- * Removes window metrics listener.
151
- * @category Event listener
149
+ /**
150
+ * Removes window metrics listener.
151
+ * @category Event listener
152
152
  */
153
153
  export const removeWindowMetricsListener = function () {
154
154
  return moduleWrapper.current.functions.removeWindowMetricsListener(...arguments);
155
155
  };
156
- /**
157
- * Select other page on chayns site.
156
+ /**
157
+ * Select other page on chayns site.
158
158
  */
159
159
  export const selectPage = function () {
160
160
  return moduleWrapper.current.functions.selectPage(...arguments);
161
161
  };
162
- /**
163
- * Scrolls to specific position.
162
+ /**
163
+ * Scrolls by specific amount.
164
+ */
165
+ export const scrollByY = function () {
166
+ return moduleWrapper.current.functions.scrollByY(...arguments);
167
+ };
168
+ /**
169
+ * Scrolls to specific position.
164
170
  */
165
171
  export const scrollToY = function () {
166
172
  return moduleWrapper.current.functions.scrollToY(...arguments);
167
173
  };
168
- /**
169
- * Sends intercom message to group.
174
+ /**
175
+ * Sends intercom message to group.
170
176
  */
171
177
  export const sendMessageToGroup = function () {
172
178
  return moduleWrapper.current.functions.sendMessageToGroup(...arguments);
173
179
  };
174
- /**
175
- * Sends intercom message to page.
180
+ /**
181
+ * Sends intercom message to page.
176
182
  */
177
183
  export const sendMessageToPage = function () {
178
184
  return moduleWrapper.current.functions.sendMessageToPage(...arguments);
179
185
  };
180
- /**
181
- * Sends intercom message to an user.
186
+ /**
187
+ * Sends intercom message to an user.
182
188
  */
183
189
  export const sendMessageToUser = function () {
184
190
  return moduleWrapper.current.functions.sendMessageToUser(...arguments);
185
191
  };
186
- /**
187
- * Switches admin mode, also toggles admin switch in top frame.
192
+ /**
193
+ * Switches admin mode, also toggles admin switch in top frame.
188
194
  */
189
195
  export const setAdminMode = function () {
190
196
  return moduleWrapper.current.functions.setAdminMode(...arguments);
191
197
  };
192
- /**
193
- * Sets the display timeout, only works in chayns App.
198
+ /**
199
+ * Sets the display timeout, only works in chayns App.
194
200
  */
195
201
  export const setDisplayTimeout = function () {
196
202
  return moduleWrapper.current.functions.setDisplayTimeout(...arguments);
197
203
  };
198
- /**
199
- * Enables or disables a button which floats over the page.
204
+ /**
205
+ * Enables or disables a button which floats over the page.
200
206
  */
201
207
  export const setFloatingButton = function () {
202
208
  return moduleWrapper.current.functions.setFloatingButton(...arguments);
203
209
  };
204
- /**
205
- * Sets the height of the page.
210
+ /**
211
+ * Sets the height of the page.
206
212
  */
207
213
  export const setHeight = function () {
208
214
  return moduleWrapper.current.functions.setHeight(...arguments);
209
215
  };
210
- /**
211
- * Enables or disables the ability to refresh a page
216
+ /**
217
+ * Enables or disables the ability to refresh a page
212
218
  */
213
219
  export const setRefreshScrollEnabled = function () {
214
220
  return moduleWrapper.current.functions.setRefreshScrollEnabled(...arguments);
215
221
  };
216
- /**
217
- * Scans a qr-code and returns the result
222
+ /**
223
+ * Scans a qr-code and returns the result
218
224
  */
219
225
  export const setScanQrCode = function () {
220
226
  return moduleWrapper.current.functions.setScanQrCode(...arguments);
221
227
  };
222
- /**
223
- * Temporarily change design settings in top frame
228
+ /**
229
+ * Temporarily change design settings in top frame
224
230
  */
225
231
  export const setTempDesignSettings = function () {
226
232
  return moduleWrapper.current.functions.setTempDesignSettings(...arguments);
227
233
  };
228
- /**
229
- * Shows or hide a waitcursor
234
+ /**
235
+ * Shows or hide a waitcursor
230
236
  */
231
237
  export const setWaitCursor = function () {
232
238
  return moduleWrapper.current.functions.setWaitCursor(...arguments);
233
239
  };
234
- /**
235
- * Retrieves the value that is assigned to the key from a storage outside the frame
240
+ /**
241
+ * Retrieves the value that is assigned to the key from a storage outside the frame
236
242
  */
237
243
  export const storageGetItem = function () {
238
244
  return moduleWrapper.current.functions.storageGetItem(...arguments);
239
245
  };
240
- /**
241
- * Removes the value that is assigned to the key from a storage outside the frame
246
+ /**
247
+ * Removes the value that is assigned to the key from a storage outside the frame
242
248
  */
243
249
  export const storageRemoveItem = function () {
244
250
  return moduleWrapper.current.functions.storageRemoveItem(...arguments);
245
251
  };
246
- /**
247
- * Sets the value that is assigned to the key from a storage outside the frame
252
+ /**
253
+ * Sets the value that is assigned to the key from a storage outside the frame
248
254
  */
249
255
  export const storageSetItem = function () {
250
256
  return moduleWrapper.current.functions.storageSetItem(...arguments);
251
257
  };
252
- /**
253
- * This method lets a smartphone vibrate for the given time.
258
+ /**
259
+ * This method lets a smartphone vibrate for the given time.
254
260
  */
255
261
  export const vibrate = function () {
256
262
  return moduleWrapper.current.functions.vibrate(...arguments);
257
263
  };
258
- /**
259
- * Displays an overlay
264
+ /**
265
+ * Displays an overlay
260
266
  */
261
267
  export const setOverlay = function () {
262
268
  return moduleWrapper.current.functions.setOverlay(...arguments);
263
269
  };
264
- /**
265
- * Returns user information, only when user is logged in
266
- * @category User functions
270
+ /**
271
+ * Returns user information, only when user is logged in
272
+ * @category User functions
267
273
  */
268
274
  export const getUser = () => moduleWrapper.current.values.user;
269
275
  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,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,8 +2,8 @@ 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
5
+ /**
6
+ * @category Hooks
7
7
  */
8
8
  export const useAccessToken = accessToken => {
9
9
  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,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);