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.
- package/.babelrc +30 -30
- package/.eslintrc +17 -17
- package/.github/workflows/deploy_docs.yml +28 -28
- package/.github/workflows/publish.yml +21 -0
- package/LICENSE +21 -21
- package/README.md +47 -47
- package/dist/cjs/calls/dialogs/date.js +10 -10
- package/dist/cjs/calls/index.js +100 -95
- package/dist/cjs/calls/sendMessage.js +8 -8
- package/dist/cjs/calls/visibilityChangeListener.js +4 -4
- package/dist/cjs/hooks/geoLocationListener.js +4 -4
- package/dist/cjs/hooks/scrollListener.js +8 -8
- package/dist/cjs/hooks/useAccessToken.js +2 -2
- package/dist/cjs/hooks/useCurrentPage.js +2 -2
- package/dist/cjs/hooks/useCustomData.js +2 -2
- package/dist/cjs/hooks/useDevice.js +2 -2
- 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/util/deviceHelper.js +1 -1
- package/dist/cjs/wrapper/AppWrapper.js +5 -0
- package/dist/cjs/wrapper/FrameWrapper.js +4 -0
- package/dist/esm/calls/dialogs/date.js +34 -34
- package/dist/esm/calls/index.js +100 -94
- package/dist/esm/calls/sendMessage.js +8 -8
- package/dist/esm/calls/visibilityChangeListener.js +4 -4
- package/dist/esm/hooks/geoLocationListener.js +4 -4
- package/dist/esm/hooks/scrollListener.js +8 -8
- package/dist/esm/hooks/useAccessToken.js +2 -2
- package/dist/esm/hooks/useCurrentPage.js +2 -2
- package/dist/esm/hooks/useCustomData.js +2 -2
- package/dist/esm/hooks/useDevice.js +2 -2
- 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/util/deviceHelper.js +1 -1
- package/dist/esm/wrapper/AppWrapper.js +5 -0
- package/dist/esm/wrapper/FrameWrapper.js +4 -0
- 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 +229 -225
- package/dist/types/calls/sendMessage.d.ts +13 -13
- package/dist/types/calls/visibilityChangeListener.d.ts +9 -9
- package/dist/types/components/ChaynsContext.d.ts +3 -3
- package/dist/types/components/ChaynsProvider.d.ts +13 -13
- package/dist/types/components/WaitUntil.d.ts +7 -7
- package/dist/types/components/withCompatMode.d.ts +13 -13
- package/dist/types/helper/apiListenerHelper.d.ts +6 -6
- package/dist/types/hooks/geoLocationListener.d.ts +18 -18
- package/dist/types/hooks/index.d.ts +16 -16
- package/dist/types/hooks/scrollListener.d.ts +28 -28
- package/dist/types/hooks/useAccessToken.d.ts +5 -5
- package/dist/types/hooks/useCurrentPage.d.ts +4 -4
- package/dist/types/hooks/useCustomData.d.ts +4 -4
- package/dist/types/hooks/useDevice.d.ts +5 -5
- package/dist/types/hooks/useEnvironment.d.ts +5 -5
- package/dist/types/hooks/useFunctions.d.ts +5 -5
- 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 +5 -5
- package/dist/types/hooks/useValues.d.ts +5 -5
- package/dist/types/hooks/windowMetricsListener.d.ts +11 -11
- package/dist/types/host/ChaynsHost.d.ts +28 -28
- package/dist/types/host/iframe/HostIframe.d.ts +24 -24
- package/dist/types/host/iframe/utils/useUpdateData.d.ts +3 -3
- package/dist/types/host/module/ModuleHost.d.ts +23 -23
- package/dist/types/host/module/utils/loadComponent.d.ts +1 -1
- package/dist/types/host/module/utils/useDynamicScript.d.ts +9 -9
- package/dist/types/index.d.ts +16 -16
- package/dist/types/types/IChaynsReact.d.ts +622 -621
- package/dist/types/types/dialog.d.ts +41 -41
- package/dist/types/util/appCall.d.ts +2 -2
- package/dist/types/util/deviceHelper.d.ts +7 -7
- package/dist/types/util/heightHelper.d.ts +1 -1
- package/dist/types/util/postIframeForm.d.ts +1 -1
- package/dist/types/wrapper/AppWrapper.d.ts +18 -18
- package/dist/types/wrapper/FrameWrapper.d.ts +15 -15
- package/dist/types/wrapper/ModuleFederationWrapper.d.ts +10 -10
- package/dist/types/wrapper/SsrWrapper.d.ts +11 -11
- package/package.json +76 -76
- package/toolkit.config.js +52 -52
- package/tsconfig.json +56 -56
- package/dist/cjs/calls/dialogs/utils/environment.js +0 -10
- package/dist/cjs/client.js +0 -93
- package/dist/cjs/components/ChaynsModuleProvider.js +0 -457
- package/dist/cjs/host/module/PagemakerFrame.js +0 -105
- package/dist/cjs/types/DynamicApiImport.d.js +0 -5
- package/dist/esm/calls/dialogs/utils/environment.js +0 -3
- package/dist/esm/client.js +0 -8
- package/dist/esm/components/ChaynsModuleProvider.js +0 -517
- package/dist/esm/host/module/PagemakerFrame.js +0 -97
- package/dist/esm/types/DynamicApiImport.d.js +0 -1
- package/dist/types/calls/dialogs/utils/environment.d.ts +0 -3
- package/dist/types/client.d.ts +0 -7
- package/dist/types/components/ChaynsModuleProvider.d.ts +0 -170
- package/dist/types/host/module/PagemakerFrame.d.ts +0 -22
package/dist/cjs/calls/index.js
CHANGED
|
@@ -3,63 +3,63 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.vibrate = exports.user = exports.storageSetItem = exports.storageRemoveItem = exports.storageGetItem = exports.site = exports.setWaitCursor = exports.setTempDesignSettings = exports.setScanQrCode = exports.setRefreshScrollEnabled = exports.setOverlay = exports.setHeight = exports.setFloatingButton = exports.setDisplayTimeout = exports.setAdminMode = exports.sendMessageToUser = exports.sendMessageToPage = exports.sendMessageToGroup = exports.selectPage = exports.scrollToY = exports.removeWindowMetricsListener = exports.removeVisibilityChangeListener = exports.removeScrollListener = exports.removeGeoLocationListener = exports.refreshData = exports.refreshAccessToken = exports.parameters = exports.pages = exports.openVideo = exports.openUrl = exports.openImage = exports.navigateBack = exports.logout = exports.login = exports.language = exports.invokeDialogCall = exports.invokeCall = exports.getWindowMetrics = exports.getUserInfo = exports.getUser = exports.getSite = exports.getScrollPosition = exports.getParameters = exports.getPages = exports.getLanguage = exports.getGeoLocation = exports.getEnvironment = exports.getDevice = exports.getAvailableSharingServices = exports.getAccessToken = exports.environment = exports.device = exports.customCallbackFunction = exports.addWindowMetricsListener = exports.addVisibilityChangeListener = exports.addScrollListener = exports.addGeoLocationListener = void 0;
|
|
6
|
+
exports.vibrate = exports.user = exports.storageSetItem = exports.storageRemoveItem = exports.storageGetItem = exports.site = exports.setWaitCursor = exports.setTempDesignSettings = exports.setScanQrCode = exports.setRefreshScrollEnabled = exports.setOverlay = exports.setHeight = exports.setFloatingButton = exports.setDisplayTimeout = exports.setAdminMode = exports.sendMessageToUser = exports.sendMessageToPage = exports.sendMessageToGroup = exports.selectPage = exports.scrollToY = exports.scrollByY = exports.removeWindowMetricsListener = exports.removeVisibilityChangeListener = exports.removeScrollListener = exports.removeGeoLocationListener = exports.refreshData = exports.refreshAccessToken = exports.parameters = exports.pages = exports.openVideo = exports.openUrl = exports.openImage = exports.navigateBack = exports.logout = exports.login = exports.language = exports.invokeDialogCall = exports.invokeCall = exports.getWindowMetrics = exports.getUserInfo = exports.getUser = exports.getSite = exports.getScrollPosition = exports.getParameters = exports.getPages = exports.getLanguage = exports.getGeoLocation = exports.getEnvironment = exports.getDevice = exports.getAvailableSharingServices = exports.getAccessToken = exports.environment = exports.device = exports.customCallbackFunction = exports.addWindowMetricsListener = exports.addVisibilityChangeListener = exports.addScrollListener = exports.addGeoLocationListener = void 0;
|
|
7
7
|
var _ChaynsProvider = require("../components/ChaynsProvider");
|
|
8
|
-
/**
|
|
9
|
-
* This adds a listener to determine your location.
|
|
10
|
-
* @category Event listener
|
|
8
|
+
/**
|
|
9
|
+
* This adds a listener to determine your location.
|
|
10
|
+
* @category Event listener
|
|
11
11
|
*/
|
|
12
12
|
const addGeoLocationListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.addGeoLocationListener(...args);
|
|
13
|
-
/**
|
|
14
|
-
* Adds a listener for scroll event by user.
|
|
15
|
-
* @category Event listener
|
|
13
|
+
/**
|
|
14
|
+
* Adds a listener for scroll event by user.
|
|
15
|
+
* @category Event listener
|
|
16
16
|
*/
|
|
17
17
|
exports.addGeoLocationListener = addGeoLocationListener;
|
|
18
18
|
const addScrollListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.addScrollListener(...args);
|
|
19
|
-
/**
|
|
20
|
-
* This method will be executed when the page gets displayed or hidden.
|
|
21
|
-
* @category Event listener
|
|
19
|
+
/**
|
|
20
|
+
* This method will be executed when the page gets displayed or hidden.
|
|
21
|
+
* @category Event listener
|
|
22
22
|
*/
|
|
23
23
|
exports.addScrollListener = addScrollListener;
|
|
24
24
|
const addVisibilityChangeListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.addVisibilityChangeListener(...args);
|
|
25
|
-
/**
|
|
26
|
-
* This adds a listener to get the actual height of the page.
|
|
27
|
-
* @category Event listener
|
|
25
|
+
/**
|
|
26
|
+
* This adds a listener to get the actual height of the page.
|
|
27
|
+
* @category Event listener
|
|
28
28
|
*/
|
|
29
29
|
exports.addVisibilityChangeListener = addVisibilityChangeListener;
|
|
30
|
-
const addWindowMetricsListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.addWindowMetricsListener(...args); /**
|
|
31
|
-
* Allows a custom callback function to be defined
|
|
30
|
+
const addWindowMetricsListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.addWindowMetricsListener(...args); /**
|
|
31
|
+
* Allows a custom callback function to be defined
|
|
32
32
|
*/
|
|
33
33
|
exports.addWindowMetricsListener = addWindowMetricsListener;
|
|
34
34
|
const customCallbackFunction = (...args) => _ChaynsProvider.moduleWrapper.current.functions.customCallbackFunction(...args);
|
|
35
|
-
/**
|
|
36
|
-
* Get the accessToken from the user.
|
|
35
|
+
/**
|
|
36
|
+
* Get the accessToken from the user.
|
|
37
37
|
*/
|
|
38
38
|
exports.customCallbackFunction = customCallbackFunction;
|
|
39
39
|
const getAccessToken = (...args) => _ChaynsProvider.moduleWrapper.current.functions.getAccessToken(...args);
|
|
40
|
-
/**
|
|
41
|
-
* This method returns a list of installed share/social media apps.
|
|
40
|
+
/**
|
|
41
|
+
* This method returns a list of installed share/social media apps.
|
|
42
42
|
*/
|
|
43
43
|
exports.getAccessToken = getAccessToken;
|
|
44
44
|
const getAvailableSharingServices = (...args) => _ChaynsProvider.moduleWrapper.current.functions.getAvailableSharingServices(...args);
|
|
45
|
-
/**
|
|
46
|
-
* This method determines your location. If you want to track a route, use addGeoLocationListener.
|
|
45
|
+
/**
|
|
46
|
+
* This method determines your location. If you want to track a route, use addGeoLocationListener.
|
|
47
47
|
*/
|
|
48
48
|
exports.getAvailableSharingServices = getAvailableSharingServices;
|
|
49
49
|
const getGeoLocation = (...args) => _ChaynsProvider.moduleWrapper.current.functions.getGeoLocation(...args);
|
|
50
|
-
/**
|
|
51
|
-
* This method returns user information for a specific user.
|
|
52
|
-
* @category User functions
|
|
50
|
+
/**
|
|
51
|
+
* This method returns user information for a specific user.
|
|
52
|
+
* @category User functions
|
|
53
53
|
*/
|
|
54
54
|
exports.getGeoLocation = getGeoLocation;
|
|
55
55
|
const getUserInfo = (...args) => _ChaynsProvider.moduleWrapper.current.functions.getUserInfo(...args);
|
|
56
|
-
/**
|
|
57
|
-
* Return the current scroll position of the top frame
|
|
56
|
+
/**
|
|
57
|
+
* Return the current scroll position of the top frame
|
|
58
58
|
*/
|
|
59
59
|
exports.getUserInfo = getUserInfo;
|
|
60
60
|
const getScrollPosition = (...args) => _ChaynsProvider.moduleWrapper.current.functions.getScrollPosition(...args);
|
|
61
|
-
/**
|
|
62
|
-
* Returns the window metrics.
|
|
61
|
+
/**
|
|
62
|
+
* Returns the window metrics.
|
|
63
63
|
*/
|
|
64
64
|
exports.getScrollPosition = getScrollPosition;
|
|
65
65
|
const getWindowMetrics = (...args) => _ChaynsProvider.moduleWrapper.current.functions.getWindowMetrics(...args);
|
|
@@ -69,163 +69,168 @@ const invokeCall = (...args) => _ChaynsProvider.moduleWrapper.current.functions.
|
|
|
69
69
|
/** @internal */
|
|
70
70
|
exports.invokeCall = invokeCall;
|
|
71
71
|
const invokeDialogCall = (...args) => _ChaynsProvider.moduleWrapper.current.functions.invokeDialogCall(...args);
|
|
72
|
-
/**
|
|
73
|
-
* This method will show a login dialog where the user has the opportunity to log in.
|
|
72
|
+
/**
|
|
73
|
+
* This method will show a login dialog where the user has the opportunity to log in.
|
|
74
74
|
*/
|
|
75
75
|
exports.invokeDialogCall = invokeDialogCall;
|
|
76
76
|
const login = (...args) => _ChaynsProvider.moduleWrapper.current.functions.login(...args);
|
|
77
|
-
/**
|
|
78
|
-
* This method will logout the user
|
|
77
|
+
/**
|
|
78
|
+
* This method will logout the user
|
|
79
79
|
*/
|
|
80
80
|
exports.login = login;
|
|
81
81
|
const logout = (...args) => _ChaynsProvider.moduleWrapper.current.functions.logout(...args);
|
|
82
|
-
/**
|
|
83
|
-
* This function navigates you to the previous site.
|
|
82
|
+
/**
|
|
83
|
+
* This function navigates you to the previous site.
|
|
84
84
|
*/
|
|
85
85
|
exports.logout = logout;
|
|
86
86
|
const navigateBack = (...args) => _ChaynsProvider.moduleWrapper.current.functions.navigateBack(...args);
|
|
87
|
-
/**
|
|
88
|
-
* The images specified in the url array is shown in gallery mode.
|
|
87
|
+
/**
|
|
88
|
+
* The images specified in the url array is shown in gallery mode.
|
|
89
89
|
*/
|
|
90
90
|
exports.navigateBack = navigateBack;
|
|
91
91
|
const openImage = (...args) => _ChaynsProvider.moduleWrapper.current.functions.openImage(...args);
|
|
92
|
-
/**
|
|
93
|
-
* Opens an URL in the chayns environment.
|
|
92
|
+
/**
|
|
93
|
+
* Opens an URL in the chayns environment.
|
|
94
94
|
*/
|
|
95
95
|
exports.openImage = openImage;
|
|
96
96
|
const openUrl = (...args) => _ChaynsProvider.moduleWrapper.current.functions.openUrl(...args);
|
|
97
|
-
/**
|
|
98
|
-
* The video specified in the URL is shown in video mode.
|
|
97
|
+
/**
|
|
98
|
+
* The video specified in the URL is shown in video mode.
|
|
99
99
|
*/
|
|
100
100
|
exports.openUrl = openUrl;
|
|
101
101
|
const openVideo = (...args) => _ChaynsProvider.moduleWrapper.current.functions.openVideo(...args);
|
|
102
|
-
/**
|
|
103
|
-
* Refresh badge count in navigation, user information and pages
|
|
102
|
+
/**
|
|
103
|
+
* Refresh badge count in navigation, user information and pages
|
|
104
104
|
*/
|
|
105
105
|
exports.openVideo = openVideo;
|
|
106
106
|
const refreshData = (...args) => _ChaynsProvider.moduleWrapper.current.functions.refreshData(...args);
|
|
107
|
-
/**
|
|
108
|
-
* Refresh accesstoken, should only be used when user object changes, not when token is invalid
|
|
107
|
+
/**
|
|
108
|
+
* Refresh accesstoken, should only be used when user object changes, not when token is invalid
|
|
109
109
|
*/
|
|
110
110
|
exports.refreshData = refreshData;
|
|
111
111
|
const refreshAccessToken = (...args) => _ChaynsProvider.moduleWrapper.current.functions.refreshAccessToken(...args);
|
|
112
|
-
/**
|
|
113
|
-
* This removes a listener to determine your location.
|
|
114
|
-
* @category Event listener
|
|
112
|
+
/**
|
|
113
|
+
* This removes a listener to determine your location.
|
|
114
|
+
* @category Event listener
|
|
115
115
|
*/
|
|
116
116
|
exports.refreshAccessToken = refreshAccessToken;
|
|
117
117
|
const removeGeoLocationListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.removeGeoLocationListener(...args);
|
|
118
|
-
/**
|
|
119
|
-
* Removes scroll listener.
|
|
120
|
-
* @category Event listener
|
|
118
|
+
/**
|
|
119
|
+
* Removes scroll listener.
|
|
120
|
+
* @category Event listener
|
|
121
121
|
*/
|
|
122
122
|
exports.removeGeoLocationListener = removeGeoLocationListener;
|
|
123
123
|
const removeScrollListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.removeScrollListener(...args);
|
|
124
|
-
/**
|
|
125
|
-
* Removes visibility change listener.
|
|
126
|
-
* @category Event listener
|
|
124
|
+
/**
|
|
125
|
+
* Removes visibility change listener.
|
|
126
|
+
* @category Event listener
|
|
127
127
|
*/
|
|
128
128
|
exports.removeScrollListener = removeScrollListener;
|
|
129
129
|
const removeVisibilityChangeListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.removeVisibilityChangeListener(...args);
|
|
130
|
-
/**
|
|
131
|
-
* Removes window metrics listener.
|
|
132
|
-
* @category Event listener
|
|
130
|
+
/**
|
|
131
|
+
* Removes window metrics listener.
|
|
132
|
+
* @category Event listener
|
|
133
133
|
*/
|
|
134
134
|
exports.removeVisibilityChangeListener = removeVisibilityChangeListener;
|
|
135
135
|
const removeWindowMetricsListener = (...args) => _ChaynsProvider.moduleWrapper.current.functions.removeWindowMetricsListener(...args);
|
|
136
|
-
/**
|
|
137
|
-
* Select other page on chayns site.
|
|
136
|
+
/**
|
|
137
|
+
* Select other page on chayns site.
|
|
138
138
|
*/
|
|
139
139
|
exports.removeWindowMetricsListener = removeWindowMetricsListener;
|
|
140
140
|
const selectPage = (...args) => _ChaynsProvider.moduleWrapper.current.functions.selectPage(...args);
|
|
141
|
-
/**
|
|
142
|
-
* Scrolls
|
|
141
|
+
/**
|
|
142
|
+
* Scrolls by specific amount.
|
|
143
143
|
*/
|
|
144
144
|
exports.selectPage = selectPage;
|
|
145
|
+
const scrollByY = (...args) => _ChaynsProvider.moduleWrapper.current.functions.scrollByY(...args);
|
|
146
|
+
/**
|
|
147
|
+
* Scrolls to specific position.
|
|
148
|
+
*/
|
|
149
|
+
exports.scrollByY = scrollByY;
|
|
145
150
|
const scrollToY = (...args) => _ChaynsProvider.moduleWrapper.current.functions.scrollToY(...args);
|
|
146
|
-
/**
|
|
147
|
-
* Sends intercom message to group.
|
|
151
|
+
/**
|
|
152
|
+
* Sends intercom message to group.
|
|
148
153
|
*/
|
|
149
154
|
exports.scrollToY = scrollToY;
|
|
150
155
|
const sendMessageToGroup = (...args) => _ChaynsProvider.moduleWrapper.current.functions.sendMessageToGroup(...args);
|
|
151
|
-
/**
|
|
152
|
-
* Sends intercom message to page.
|
|
156
|
+
/**
|
|
157
|
+
* Sends intercom message to page.
|
|
153
158
|
*/
|
|
154
159
|
exports.sendMessageToGroup = sendMessageToGroup;
|
|
155
160
|
const sendMessageToPage = (...args) => _ChaynsProvider.moduleWrapper.current.functions.sendMessageToPage(...args);
|
|
156
|
-
/**
|
|
157
|
-
* Sends intercom message to an user.
|
|
161
|
+
/**
|
|
162
|
+
* Sends intercom message to an user.
|
|
158
163
|
*/
|
|
159
164
|
exports.sendMessageToPage = sendMessageToPage;
|
|
160
165
|
const sendMessageToUser = (...args) => _ChaynsProvider.moduleWrapper.current.functions.sendMessageToUser(...args);
|
|
161
|
-
/**
|
|
162
|
-
* Switches admin mode, also toggles admin switch in top frame.
|
|
166
|
+
/**
|
|
167
|
+
* Switches admin mode, also toggles admin switch in top frame.
|
|
163
168
|
*/
|
|
164
169
|
exports.sendMessageToUser = sendMessageToUser;
|
|
165
170
|
const setAdminMode = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setAdminMode(...args);
|
|
166
|
-
/**
|
|
167
|
-
* Sets the display timeout, only works in chayns App.
|
|
171
|
+
/**
|
|
172
|
+
* Sets the display timeout, only works in chayns App.
|
|
168
173
|
*/
|
|
169
174
|
exports.setAdminMode = setAdminMode;
|
|
170
175
|
const setDisplayTimeout = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setDisplayTimeout(...args);
|
|
171
|
-
/**
|
|
172
|
-
* Enables or disables a button which floats over the page.
|
|
176
|
+
/**
|
|
177
|
+
* Enables or disables a button which floats over the page.
|
|
173
178
|
*/
|
|
174
179
|
exports.setDisplayTimeout = setDisplayTimeout;
|
|
175
180
|
const setFloatingButton = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setFloatingButton(...args);
|
|
176
|
-
/**
|
|
177
|
-
* Sets the height of the page.
|
|
181
|
+
/**
|
|
182
|
+
* Sets the height of the page.
|
|
178
183
|
*/
|
|
179
184
|
exports.setFloatingButton = setFloatingButton;
|
|
180
185
|
const setHeight = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setHeight(...args);
|
|
181
|
-
/**
|
|
182
|
-
* Enables or disables the ability to refresh a page
|
|
186
|
+
/**
|
|
187
|
+
* Enables or disables the ability to refresh a page
|
|
183
188
|
*/
|
|
184
189
|
exports.setHeight = setHeight;
|
|
185
190
|
const setRefreshScrollEnabled = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setRefreshScrollEnabled(...args);
|
|
186
|
-
/**
|
|
187
|
-
* Scans a qr-code and returns the result
|
|
191
|
+
/**
|
|
192
|
+
* Scans a qr-code and returns the result
|
|
188
193
|
*/
|
|
189
194
|
exports.setRefreshScrollEnabled = setRefreshScrollEnabled;
|
|
190
195
|
const setScanQrCode = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setScanQrCode(...args);
|
|
191
|
-
/**
|
|
192
|
-
* Temporarily change design settings in top frame
|
|
196
|
+
/**
|
|
197
|
+
* Temporarily change design settings in top frame
|
|
193
198
|
*/
|
|
194
199
|
exports.setScanQrCode = setScanQrCode;
|
|
195
200
|
const setTempDesignSettings = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setTempDesignSettings(...args);
|
|
196
|
-
/**
|
|
197
|
-
* Shows or hide a waitcursor
|
|
201
|
+
/**
|
|
202
|
+
* Shows or hide a waitcursor
|
|
198
203
|
*/
|
|
199
204
|
exports.setTempDesignSettings = setTempDesignSettings;
|
|
200
205
|
const setWaitCursor = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setWaitCursor(...args);
|
|
201
|
-
/**
|
|
202
|
-
* Retrieves the value that is assigned to the key from a storage outside the frame
|
|
206
|
+
/**
|
|
207
|
+
* Retrieves the value that is assigned to the key from a storage outside the frame
|
|
203
208
|
*/
|
|
204
209
|
exports.setWaitCursor = setWaitCursor;
|
|
205
210
|
const storageGetItem = (...args) => _ChaynsProvider.moduleWrapper.current.functions.storageGetItem(...args);
|
|
206
|
-
/**
|
|
207
|
-
* Removes the value that is assigned to the key from a storage outside the frame
|
|
211
|
+
/**
|
|
212
|
+
* Removes the value that is assigned to the key from a storage outside the frame
|
|
208
213
|
*/
|
|
209
214
|
exports.storageGetItem = storageGetItem;
|
|
210
215
|
const storageRemoveItem = (...args) => _ChaynsProvider.moduleWrapper.current.functions.storageRemoveItem(...args);
|
|
211
|
-
/**
|
|
212
|
-
* Sets the value that is assigned to the key from a storage outside the frame
|
|
216
|
+
/**
|
|
217
|
+
* Sets the value that is assigned to the key from a storage outside the frame
|
|
213
218
|
*/
|
|
214
219
|
exports.storageRemoveItem = storageRemoveItem;
|
|
215
220
|
const storageSetItem = (...args) => _ChaynsProvider.moduleWrapper.current.functions.storageSetItem(...args);
|
|
216
|
-
/**
|
|
217
|
-
* This method lets a smartphone vibrate for the given time.
|
|
221
|
+
/**
|
|
222
|
+
* This method lets a smartphone vibrate for the given time.
|
|
218
223
|
*/
|
|
219
224
|
exports.storageSetItem = storageSetItem;
|
|
220
225
|
const vibrate = (...args) => _ChaynsProvider.moduleWrapper.current.functions.vibrate(...args);
|
|
221
|
-
/**
|
|
222
|
-
* Displays an overlay
|
|
226
|
+
/**
|
|
227
|
+
* Displays an overlay
|
|
223
228
|
*/
|
|
224
229
|
exports.vibrate = vibrate;
|
|
225
230
|
const setOverlay = (...args) => _ChaynsProvider.moduleWrapper.current.functions.setOverlay(...args);
|
|
226
|
-
/**
|
|
227
|
-
* Returns user information, only when user is logged in
|
|
228
|
-
* @category User functions
|
|
231
|
+
/**
|
|
232
|
+
* Returns user information, only when user is logged in
|
|
233
|
+
* @category User functions
|
|
229
234
|
*/
|
|
230
235
|
exports.setOverlay = setOverlay;
|
|
231
236
|
const getUser = () => _ChaynsProvider.moduleWrapper.current.values.user;
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.sendMessageToUser = exports.sendMessageToPage = exports.sendMessageToGroup = void 0;
|
|
7
7
|
const INTERCOM_URL = 'https://sub54.tobit.com/rest/api';
|
|
8
|
-
/**
|
|
9
|
-
* @category Intercom functions
|
|
8
|
+
/**
|
|
9
|
+
* @category Intercom functions
|
|
10
10
|
*/
|
|
11
11
|
const sendMessageToUser = async (api, object, receiverUserId) => {
|
|
12
12
|
var _api$values$user;
|
|
@@ -40,8 +40,8 @@ const sendMessageToUser = async (api, object, receiverUserId) => {
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
/**
|
|
44
|
-
* @category Intercom functions
|
|
43
|
+
/**
|
|
44
|
+
* @category Intercom functions
|
|
45
45
|
*/
|
|
46
46
|
exports.sendMessageToUser = sendMessageToUser;
|
|
47
47
|
const sendMessageToPage = async (api, object) => {
|
|
@@ -73,8 +73,8 @@ const sendMessageToPage = async (api, object) => {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
/**
|
|
77
|
-
* @category Intercom functions
|
|
76
|
+
/**
|
|
77
|
+
* @category Intercom functions
|
|
78
78
|
*/
|
|
79
79
|
exports.sendMessageToPage = sendMessageToPage;
|
|
80
80
|
const sendMessageToGroup = async (api, object, groupId) => {
|
|
@@ -104,8 +104,8 @@ const sendMessageToGroup = async (api, object, groupId) => {
|
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
|
-
/**
|
|
108
|
-
* @category Intercom functions
|
|
107
|
+
/**
|
|
108
|
+
* @category Intercom functions
|
|
109
109
|
*/
|
|
110
110
|
exports.sendMessageToGroup = sendMessageToGroup;
|
|
111
111
|
function sendMessage(endpoint, token, body) {
|
|
@@ -12,8 +12,8 @@ const handleVisibilityChange = () => {
|
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* @category Event listener
|
|
15
|
+
/**
|
|
16
|
+
* @category Event listener
|
|
17
17
|
*/
|
|
18
18
|
const addVisibilityChangeListener = callback => {
|
|
19
19
|
const {
|
|
@@ -25,8 +25,8 @@ const addVisibilityChangeListener = callback => {
|
|
|
25
25
|
}
|
|
26
26
|
return id;
|
|
27
27
|
};
|
|
28
|
-
/**
|
|
29
|
-
* @category Event listener
|
|
28
|
+
/**
|
|
29
|
+
* @category Event listener
|
|
30
30
|
*/
|
|
31
31
|
exports.addVisibilityChangeListener = addVisibilityChangeListener;
|
|
32
32
|
const removeVisibilityChangeListener = id => {
|
|
@@ -7,8 +7,8 @@ exports.useGeoLocationListener = exports.useGeoLocation = void 0;
|
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
10
|
-
/**
|
|
11
|
-
* @category Hooks
|
|
10
|
+
/**
|
|
11
|
+
* @category Hooks
|
|
12
12
|
*/
|
|
13
13
|
const useGeoLocationListener = () => {
|
|
14
14
|
const addListener = (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsFunctionsContext, v => v.addGeoLocationListener);
|
|
@@ -23,8 +23,8 @@ const useGeoLocationListener = () => {
|
|
|
23
23
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
24
|
}, []);
|
|
25
25
|
};
|
|
26
|
-
/**
|
|
27
|
-
* @category Hooks
|
|
26
|
+
/**
|
|
27
|
+
* @category Hooks
|
|
28
28
|
*/
|
|
29
29
|
exports.useGeoLocationListener = useGeoLocationListener;
|
|
30
30
|
const useGeoLocation = ({
|
|
@@ -8,8 +8,8 @@ var _useContextSelector = require("use-context-selector");
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
10
10
|
var _windowMetricsListener = require("./windowMetricsListener");
|
|
11
|
-
/**
|
|
12
|
-
* @category Hooks
|
|
11
|
+
/**
|
|
12
|
+
* @category Hooks
|
|
13
13
|
*/
|
|
14
14
|
const useScrollListener = () => {
|
|
15
15
|
const addListener = (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsFunctionsContext, v => v.addScrollListener);
|
|
@@ -24,8 +24,8 @@ const useScrollListener = () => {
|
|
|
24
24
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25
25
|
}, []);
|
|
26
26
|
};
|
|
27
|
-
/**
|
|
28
|
-
* @category Hooks
|
|
27
|
+
/**
|
|
28
|
+
* @category Hooks
|
|
29
29
|
*/
|
|
30
30
|
exports.useScrollListener = useScrollListener;
|
|
31
31
|
const useScrollPosition = ({
|
|
@@ -52,8 +52,8 @@ const useScrollPosition = ({
|
|
|
52
52
|
}, [getScrollPosition]);
|
|
53
53
|
return value;
|
|
54
54
|
};
|
|
55
|
-
/**
|
|
56
|
-
* @category Hooks
|
|
55
|
+
/**
|
|
56
|
+
* @category Hooks
|
|
57
57
|
*/
|
|
58
58
|
exports.useScrollPosition = useScrollPosition;
|
|
59
59
|
const useScrollOffsetTop = ({
|
|
@@ -75,8 +75,8 @@ const useScrollOffsetTop = ({
|
|
|
75
75
|
}
|
|
76
76
|
return 0;
|
|
77
77
|
};
|
|
78
|
-
/**
|
|
79
|
-
* @category Hooks
|
|
78
|
+
/**
|
|
79
|
+
* @category Hooks
|
|
80
80
|
*/
|
|
81
81
|
exports.useScrollOffsetTop = useScrollOffsetTop;
|
|
82
82
|
const useScrollOffsetBottom = ({
|
|
@@ -7,8 +7,8 @@ exports.useAccessToken = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _useContextSelector = require("use-context-selector");
|
|
9
9
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
10
|
-
/**
|
|
11
|
-
* @category Hooks
|
|
10
|
+
/**
|
|
11
|
+
* @category Hooks
|
|
12
12
|
*/
|
|
13
13
|
const useAccessToken = accessToken => {
|
|
14
14
|
const [token, setToken] = (0, _react.useState)(null);
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useCurrentPage = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useCurrentPage = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => v === null || v === void 0 ? void 0 : v.currentPage);
|
|
13
13
|
exports.useCurrentPage = useCurrentPage;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useCustomData = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useCustomData = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => v === null || v === void 0 ? void 0 : v.customData);
|
|
13
13
|
exports.useCustomData = useCustomData;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useDevice = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useDevice = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => v === null || v === void 0 ? void 0 : v.device);
|
|
13
13
|
exports.useDevice = useDevice;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useEnvironment = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useEnvironment = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => v === null || v === void 0 ? void 0 : v.environment);
|
|
13
13
|
exports.useEnvironment = useEnvironment;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useFunctions = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useFunctions = () => {
|
|
13
13
|
const t = (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsFunctionsContext, f => f || {});
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useIsAdminMode = void 0;
|
|
7
7
|
var _useContextSelector2 = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useIsAdminMode = () => {
|
|
13
13
|
var _useContextSelector;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useLanguage = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useLanguage = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => v === null || v === void 0 ? void 0 : v.language);
|
|
13
13
|
exports.useLanguage = useLanguage;
|
|
@@ -7,8 +7,8 @@ exports.usePages = exports.usePage = exports.getPage = void 0;
|
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
9
|
var _ChaynsProvider = require("../components/ChaynsProvider");
|
|
10
|
-
/**
|
|
11
|
-
* @category Hooks
|
|
10
|
+
/**
|
|
11
|
+
* @category Hooks
|
|
12
12
|
*/
|
|
13
13
|
const usePages = ({
|
|
14
14
|
siteId
|
|
@@ -21,8 +21,8 @@ const usePages = ({
|
|
|
21
21
|
}
|
|
22
22
|
return pages;
|
|
23
23
|
};
|
|
24
|
-
/**
|
|
25
|
-
* @category Hooks
|
|
24
|
+
/**
|
|
25
|
+
* @category Hooks
|
|
26
26
|
*/
|
|
27
27
|
exports.usePages = usePages;
|
|
28
28
|
const usePage = ({
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useParameters = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useParameters = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => (v === null || v === void 0 ? void 0 : v.parameters) || []);
|
|
13
13
|
exports.useParameters = useParameters;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useSite = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useSite = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => v === null || v === void 0 ? void 0 : v.site);
|
|
13
13
|
exports.useSite = useSite;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useUser = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useUser = () => (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => (v === null || v === void 0 ? void 0 : v.user) || {});
|
|
13
13
|
exports.useUser = useUser;
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useValues = void 0;
|
|
7
7
|
var _useContextSelector = require("use-context-selector");
|
|
8
8
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
11
|
*/
|
|
12
12
|
const useValues = () => {
|
|
13
13
|
const t = (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsContext, v => v || {});
|
|
@@ -8,8 +8,8 @@ var _useContextSelector = require("use-context-selector");
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _ChaynsContext = require("../components/ChaynsContext");
|
|
10
10
|
var _IChaynsReact = require("../types/IChaynsReact");
|
|
11
|
-
/**
|
|
12
|
-
* @category Hooks
|
|
11
|
+
/**
|
|
12
|
+
* @category Hooks
|
|
13
13
|
*/
|
|
14
14
|
const useWindowMetricsListener = () => {
|
|
15
15
|
const addListener = (0, _useContextSelector.useContextSelector)(_ChaynsContext.ChaynsFunctionsContext, v => v.addWindowMetricsListener);
|
|
@@ -24,8 +24,8 @@ const useWindowMetricsListener = () => {
|
|
|
24
24
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25
25
|
}, []);
|
|
26
26
|
};
|
|
27
|
-
/**
|
|
28
|
-
* @category Hooks
|
|
27
|
+
/**
|
|
28
|
+
* @category Hooks
|
|
29
29
|
*/
|
|
30
30
|
exports.useWindowMetricsListener = useWindowMetricsListener;
|
|
31
31
|
const useWindowMetrics = ({
|