chayns-api 2.0.9-1 → 2.0.9
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.
- package/.babelrc +30 -30
- package/.eslintrc +17 -17
- package/.github/workflows/deploy_docs.yml +28 -28
- package/.github/workflows/publish.yml +21 -21
- package/LICENSE +21 -21
- package/README.md +67 -67
- package/dist/cjs/calls/dialogs/date.js +34 -34
- package/dist/cjs/calls/index.js +108 -108
- package/dist/cjs/calls/sendMessage.js +8 -8
- package/dist/cjs/calls/visibilityChangeListener.js +4 -4
- package/dist/cjs/components/AppDialogWrapper.js +2 -2
- package/dist/cjs/components/ChaynsProvider.js +1 -1
- package/dist/cjs/components/ErrorBoundary.js +1 -1
- package/dist/cjs/components/withCompatMode.js +3 -3
- package/dist/cjs/components/withHydrationBoundary.js +1 -1
- package/dist/cjs/hooks/geoLocationListener.js +4 -4
- package/dist/cjs/hooks/scrollListener.js +8 -8
- package/dist/cjs/hooks/useAccessToken.js +3 -3
- package/dist/cjs/hooks/useCurrentPage.js +2 -2
- package/dist/cjs/hooks/useCustomCallbackFunction.js +3 -3
- package/dist/cjs/hooks/useCustomData.js +2 -2
- package/dist/cjs/hooks/useDevice.js +2 -2
- package/dist/cjs/hooks/useDialogState.js +4 -4
- package/dist/cjs/hooks/useEnvironment.js +2 -2
- package/dist/cjs/hooks/useFunctions.js +2 -2
- package/dist/cjs/hooks/useIsAdminMode.js +2 -2
- package/dist/cjs/hooks/useLanguage.js +2 -2
- package/dist/cjs/hooks/usePages.js +4 -4
- package/dist/cjs/hooks/useParameters.js +2 -2
- package/dist/cjs/hooks/useSite.js +2 -2
- package/dist/cjs/hooks/useUser.js +2 -2
- package/dist/cjs/hooks/useValues.js +2 -2
- package/dist/cjs/hooks/windowMetricsListener.js +4 -4
- package/dist/cjs/host/ChaynsHost.js +1 -1
- package/dist/cjs/host/iframe/HostIframe.js +2 -2
- package/dist/cjs/host/module/ModuleHost.js +1 -1
- package/dist/cjs/host/module/utils/loadComponent.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/IChaynsReact.js +4 -4
- package/dist/cjs/util/heightHelper.js +1 -1
- package/dist/cjs/util/initModuleFederationSharing.js +1 -1
- package/dist/cjs/wrapper/AppWrapper.js +1 -1
- package/dist/cjs/wrapper/FrameWrapper.js +1 -1
- package/dist/cjs/wrapper/ModuleFederationWrapper.js +1 -1
- package/dist/cjs/wrapper/StaticChaynsApi.js +1 -1
- package/dist/esm/calls/dialogs/date.js +34 -34
- package/dist/esm/calls/index.js +108 -108
- package/dist/esm/calls/sendMessage.js +8 -8
- package/dist/esm/calls/visibilityChangeListener.js +4 -4
- package/dist/esm/components/AppDialogWrapper.js +1 -1
- package/dist/esm/components/withCompatMode.js +2 -2
- package/dist/esm/components/withHydrationBoundary.js +1 -1
- package/dist/esm/handler/DialogHandler.js +1 -1
- package/dist/esm/hooks/geoLocationListener.js +4 -4
- package/dist/esm/hooks/scrollListener.js +8 -8
- package/dist/esm/hooks/useAccessToken.js +3 -3
- package/dist/esm/hooks/useCurrentPage.js +2 -2
- package/dist/esm/hooks/useCustomCallbackFunction.js +3 -3
- package/dist/esm/hooks/useCustomData.js +2 -2
- package/dist/esm/hooks/useDevice.js +2 -2
- package/dist/esm/hooks/useDialogState.js +4 -4
- package/dist/esm/hooks/useEnvironment.js +2 -2
- package/dist/esm/hooks/useFunctions.js +2 -2
- package/dist/esm/hooks/useIsAdminMode.js +2 -2
- package/dist/esm/hooks/useLanguage.js +2 -2
- package/dist/esm/hooks/usePages.js +4 -4
- package/dist/esm/hooks/useParameters.js +2 -2
- package/dist/esm/hooks/useSite.js +2 -2
- package/dist/esm/hooks/useUser.js +2 -2
- package/dist/esm/hooks/useValues.js +2 -2
- package/dist/esm/hooks/windowMetricsListener.js +4 -4
- package/dist/esm/host/iframe/HostIframe.js +1 -1
- package/dist/esm/types/IChaynsReact.js +4 -4
- package/dist/esm/wrapper/AppWrapper.js +1 -1
- package/dist/esm/wrapper/FrameWrapper.js +1 -1
- package/dist/esm/wrapper/ModuleFederationWrapper.js +1 -1
- package/dist/esm/wrapper/SsrWrapper.js +1 -1
- package/dist/esm/wrapper/StaticChaynsApi.js +1 -1
- package/dist/types/calls/dialogs/alert.d.ts +1 -1
- package/dist/types/calls/dialogs/chaynsDialog.d.ts +24 -24
- package/dist/types/calls/dialogs/close.d.ts +1 -1
- package/dist/types/calls/dialogs/communication.d.ts +3 -3
- package/dist/types/calls/dialogs/confirm.d.ts +13 -13
- package/dist/types/calls/dialogs/date.d.ts +96 -96
- package/dist/types/calls/dialogs/dropUpAlert.d.ts +5 -5
- package/dist/types/calls/dialogs/fileSelect.d.ts +16 -16
- package/dist/types/calls/dialogs/iFrame.d.ts +10 -10
- package/dist/types/calls/dialogs/index.d.ts +14 -14
- package/dist/types/calls/dialogs/input.d.ts +15 -15
- package/dist/types/calls/dialogs/mediaSelect.d.ts +8 -8
- package/dist/types/calls/dialogs/open.d.ts +1 -1
- package/dist/types/calls/dialogs/select.d.ts +6 -6
- package/dist/types/calls/dialogs/signature.d.ts +7 -7
- package/dist/types/calls/dialogs/toast.d.ts +1 -1
- package/dist/types/calls/dialogs/utils/callback.d.ts +1 -1
- package/dist/types/calls/dialogs/utils/is.d.ts +4 -4
- package/dist/types/calls/getUserInfo.d.ts +9 -9
- package/dist/types/calls/index.d.ts +255 -255
- package/dist/types/calls/sendMessage.d.ts +13 -13
- package/dist/types/calls/visibilityChangeListener.d.ts +9 -9
- package/dist/types/components/AppDialogWrapper.d.ts +5 -5
- package/dist/types/components/ChaynsContext.d.ts +3 -3
- package/dist/types/components/ChaynsProvider.d.ts +11 -11
- package/dist/types/components/ErrorBoundary.d.ts +13 -13
- package/dist/types/components/WaitUntil.d.ts +7 -7
- package/dist/types/components/moduleWrapper.d.ts +4 -4
- package/dist/types/components/withCompatMode.d.ts +14 -14
- package/dist/types/components/withHydrationBoundary.d.ts +24 -24
- package/dist/types/constants/hydrationContext.d.ts +6 -6
- package/dist/types/constants/index.d.ts +1 -1
- package/dist/types/constants/languages.d.ts +12 -12
- package/dist/types/handler/DialogHandler.d.ts +24 -24
- package/dist/types/helper/apiListenerHelper.d.ts +6 -6
- package/dist/types/hooks/context.d.ts +3 -3
- package/dist/types/hooks/geoLocationListener.d.ts +18 -18
- package/dist/types/hooks/index.d.ts +18 -18
- package/dist/types/hooks/scrollListener.d.ts +28 -28
- package/dist/types/hooks/useAccessToken.d.ts +6 -6
- package/dist/types/hooks/useCurrentPage.d.ts +4 -4
- package/dist/types/hooks/useCustomCallbackFunction.d.ts +5 -5
- package/dist/types/hooks/useCustomData.d.ts +4 -4
- package/dist/types/hooks/useDevice.d.ts +5 -5
- package/dist/types/hooks/useDialogState.d.ts +9 -9
- package/dist/types/hooks/useEnvironment.d.ts +5 -5
- package/dist/types/hooks/useFunctions.d.ts +4 -4
- package/dist/types/hooks/useIsAdminMode.d.ts +4 -4
- package/dist/types/hooks/useLanguage.d.ts +5 -5
- package/dist/types/hooks/usePages.d.ts +18 -18
- package/dist/types/hooks/useParameters.d.ts +5 -5
- package/dist/types/hooks/useSite.d.ts +5 -5
- package/dist/types/hooks/useUser.d.ts +4 -4
- package/dist/types/hooks/useValues.d.ts +4 -4
- package/dist/types/hooks/windowMetricsListener.d.ts +11 -11
- package/dist/types/host/ChaynsHost.d.ts +29 -29
- package/dist/types/host/iframe/HostIframe.d.ts +26 -26
- package/dist/types/host/iframe/utils/useUpdateData.d.ts +3 -3
- package/dist/types/host/module/ModuleHost.d.ts +28 -28
- package/dist/types/host/module/utils/loadComponent.d.ts +3 -3
- package/dist/types/index.d.ts +20 -20
- package/dist/types/types/IChaynsReact.d.ts +899 -899
- package/dist/types/types/dialog.d.ts +41 -41
- package/dist/types/util/appCall.d.ts +2 -2
- package/dist/types/util/bindChaynsApi.d.ts +1 -1
- package/dist/types/util/deviceHelper.d.ts +9 -9
- package/dist/types/util/heightHelper.d.ts +1 -1
- package/dist/types/util/initModuleFederationSharing.d.ts +3 -3
- package/dist/types/util/is.d.ts +5 -5
- package/dist/types/util/postIframeForm.d.ts +1 -1
- package/dist/types/util/transferNestedFunctions.d.ts +1 -1
- package/dist/types/util/url.d.ts +1 -1
- package/dist/types/wrapper/AppWrapper.d.ts +22 -22
- package/dist/types/wrapper/FrameWrapper.d.ts +18 -18
- package/dist/types/wrapper/ModuleFederationWrapper.d.ts +13 -13
- package/dist/types/wrapper/SsrWrapper.d.ts +14 -14
- package/dist/types/wrapper/StaticChaynsApi.d.ts +16 -16
- package/package.json +88 -88
- package/toolkit.config.js +20 -20
- package/tsconfig.json +56 -56
package/dist/esm/calls/index.js
CHANGED
|
@@ -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 (
|
|
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 (
|
|
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(
|
|
54
|
+
ReactDOM.render(/*#__PURE__*/React.createElement(React.Fragment, null), this.ref.current);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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
4
|
function withHydrationBoundary(Component, initializer, useHydrationId, useProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { useFunctionsSelector } from './context';
|
|
3
|
-
/**
|
|
4
|
-
* @category Hooks
|
|
3
|
+
/**
|
|
4
|
+
* @category Hooks
|
|
5
5
|
*/
|
|
6
6
|
export const useGeoLocationListener = () => {
|
|
7
7
|
const addListener = useFunctionsSelector(f => f.addGeoLocationListener);
|
|
@@ -16,8 +16,8 @@ export const useGeoLocationListener = () => {
|
|
|
16
16
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
17
|
}, []);
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
20
|
-
* @category Hooks
|
|
19
|
+
/**
|
|
20
|
+
* @category Hooks
|
|
21
21
|
*/
|
|
22
22
|
export const useGeoLocation = function () {
|
|
23
23
|
let {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { useWindowMetrics } from './windowMetricsListener';
|
|
3
3
|
import { useFunctionsSelector } from './context';
|
|
4
|
-
/**
|
|
5
|
-
* @category Hooks
|
|
4
|
+
/**
|
|
5
|
+
* @category Hooks
|
|
6
6
|
*/
|
|
7
7
|
export const useScrollListener = () => {
|
|
8
8
|
const addListener = useFunctionsSelector(f => f.addScrollListener);
|
|
@@ -17,8 +17,8 @@ export const useScrollListener = () => {
|
|
|
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 useScrollPosition = function () {
|
|
24
24
|
let {
|
|
@@ -45,8 +45,8 @@ export const useScrollPosition = function () {
|
|
|
45
45
|
}, [getScrollPosition]);
|
|
46
46
|
return value;
|
|
47
47
|
};
|
|
48
|
-
/**
|
|
49
|
-
* @category Hooks
|
|
48
|
+
/**
|
|
49
|
+
* @category Hooks
|
|
50
50
|
*/
|
|
51
51
|
export const useScrollOffsetTop = function () {
|
|
52
52
|
let {
|
|
@@ -68,8 +68,8 @@ export const useScrollOffsetTop = function () {
|
|
|
68
68
|
}
|
|
69
69
|
return 0;
|
|
70
70
|
};
|
|
71
|
-
/**
|
|
72
|
-
* @category Hooks
|
|
71
|
+
/**
|
|
72
|
+
* @category Hooks
|
|
73
73
|
*/
|
|
74
74
|
export const useScrollOffsetBottom = function () {
|
|
75
75
|
let {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { useFunctionsSelector } from './context';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* @category Hooks
|
|
6
|
-
* @deprecated Use {@link getAccessToken} instead
|
|
4
|
+
/**
|
|
5
|
+
* @category Hooks
|
|
6
|
+
* @deprecated Use {@link getAccessToken} instead
|
|
7
7
|
*/
|
|
8
8
|
export const useAccessToken = accessToken => {
|
|
9
9
|
const [token, setToken] = useState(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFunctionsSelector } from './context';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @category Hooks
|
|
5
|
-
* Returns customCallbackFunction
|
|
3
|
+
/**
|
|
4
|
+
* @category Hooks
|
|
5
|
+
* Returns customCallbackFunction
|
|
6
6
|
*/
|
|
7
7
|
export const useCustomCallbackFunction = () => useFunctionsSelector(f => f.customCallbackFunction);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFunctionsSelector, useValuesSelector } from './context';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @category Hooks
|
|
3
|
+
/**
|
|
4
|
+
* @category Hooks
|
|
5
5
|
*/
|
|
6
6
|
export const useDialogState = () => {
|
|
7
7
|
const setResult = useFunctionsSelector(f => f.setDialogResult);
|
|
@@ -19,8 +19,8 @@ export const useDialogState = () => {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* @category Hooks
|
|
22
|
+
/**
|
|
23
|
+
* @category Hooks
|
|
24
24
|
*/
|
|
25
25
|
export const useDialogData = () => {
|
|
26
26
|
return useValuesSelector(v => {
|