chayns-api 2.1.3-3 → 2.1.5
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 +31 -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/chaynsDialog.js +0 -2
- package/dist/cjs/calls/dialogs/communication.js +0 -2
- package/dist/cjs/calls/dialogs/confirm.js +0 -1
- package/dist/cjs/calls/dialogs/date.js +0 -50
- package/dist/cjs/calls/dialogs/iFrame.js +1 -1
- package/dist/cjs/calls/index.js +1 -162
- package/dist/cjs/calls/sendMessage.js +0 -12
- package/dist/cjs/calls/visibilityChangeListener.js +0 -7
- package/dist/cjs/components/AppDialogWrapper.js +3 -3
- package/dist/cjs/components/ChaynsContext.js +1 -1
- package/dist/cjs/components/ChaynsProvider.js +6 -10
- package/dist/cjs/components/ErrorBoundary.js +1 -1
- package/dist/cjs/components/WaitUntil.js +0 -2
- package/dist/cjs/components/withCompatMode.js +9 -13
- package/dist/cjs/components/withHydrationBoundary.js +2 -2
- package/dist/cjs/constants/hydrationContext.js +1 -3
- package/dist/cjs/constants/languages.js +1 -1
- package/dist/cjs/handler/DialogHandler.js +0 -4
- package/dist/cjs/hooks/geoLocationListener.js +0 -7
- package/dist/cjs/hooks/scrollListener.js +0 -14
- package/dist/cjs/hooks/useAccessToken.js +0 -4
- package/dist/cjs/hooks/useCurrentPage.js +0 -3
- package/dist/cjs/hooks/useCustomCallbackFunction.js +0 -4
- package/dist/cjs/hooks/useCustomData.js +0 -3
- package/dist/cjs/hooks/useDevice.js +0 -3
- package/dist/cjs/hooks/useDialogState.js +0 -7
- package/dist/cjs/hooks/useEnvironment.js +0 -3
- package/dist/cjs/hooks/useFunctions.js +0 -3
- package/dist/cjs/hooks/useIsAdminMode.js +0 -3
- package/dist/cjs/hooks/useLanguage.js +0 -3
- package/dist/cjs/hooks/usePages.js +0 -6
- package/dist/cjs/hooks/useParameters.js +0 -3
- package/dist/cjs/hooks/useSite.js +0 -3
- package/dist/cjs/hooks/useUser.js +0 -3
- package/dist/cjs/hooks/useValues.js +0 -3
- package/dist/cjs/hooks/windowMetricsListener.js +0 -7
- package/dist/cjs/host/ChaynsHost.js +3 -4
- package/dist/cjs/host/iframe/HostIframe.js +4 -23
- package/dist/cjs/host/module/ModuleHost.js +5 -9
- package/dist/cjs/host/module/utils/loadComponent.js +4 -5
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/IChaynsReact.js +39 -46
- package/dist/cjs/util/appCall.js +0 -2
- package/dist/cjs/util/deviceHelper.js +0 -4
- package/dist/cjs/util/heightHelper.js +1 -1
- package/dist/cjs/util/initModuleFederationSharing.js +2 -6
- package/dist/cjs/util/postIframeForm.js +0 -1
- package/dist/cjs/util/transferNestedFunctions.js +0 -3
- package/dist/cjs/wrapper/AppWrapper.js +6 -20
- package/dist/cjs/wrapper/FrameWrapper.js +2 -7
- package/dist/cjs/wrapper/ModuleFederationWrapper.js +1 -3
- package/dist/cjs/wrapper/StaticChaynsApi.js +1 -1
- package/dist/esm/calls/dialogs/chaynsDialog.js +0 -2
- package/dist/esm/calls/dialogs/communication.js +0 -2
- package/dist/esm/calls/dialogs/confirm.js +0 -1
- package/dist/esm/calls/dialogs/date.js +0 -51
- package/dist/esm/calls/dialogs/iFrame.js +1 -1
- package/dist/esm/calls/index.js +1 -162
- package/dist/esm/calls/sendMessage.js +0 -12
- package/dist/esm/calls/visibilityChangeListener.js +0 -7
- package/dist/esm/components/AppDialogWrapper.js +2 -2
- package/dist/esm/components/ChaynsContext.js +1 -1
- package/dist/esm/components/ChaynsProvider.js +5 -10
- package/dist/esm/components/WaitUntil.js +0 -2
- package/dist/esm/components/withCompatMode.js +8 -14
- package/dist/esm/components/withHydrationBoundary.js +2 -2
- package/dist/esm/constants/hydrationContext.js +1 -3
- package/dist/esm/constants/languages.js +1 -1
- package/dist/esm/handler/DialogHandler.js +1 -5
- package/dist/esm/hooks/geoLocationListener.js +0 -7
- package/dist/esm/hooks/scrollListener.js +0 -14
- package/dist/esm/hooks/useAccessToken.js +0 -5
- package/dist/esm/hooks/useCurrentPage.js +0 -4
- package/dist/esm/hooks/useCustomCallbackFunction.js +0 -5
- package/dist/esm/hooks/useCustomData.js +0 -4
- package/dist/esm/hooks/useDevice.js +0 -3
- package/dist/esm/hooks/useDialogState.js +0 -8
- package/dist/esm/hooks/useEnvironment.js +0 -3
- package/dist/esm/hooks/useFunctions.js +0 -4
- package/dist/esm/hooks/useIsAdminMode.js +0 -3
- package/dist/esm/hooks/useLanguage.js +0 -3
- package/dist/esm/hooks/usePages.js +0 -6
- package/dist/esm/hooks/useParameters.js +0 -3
- package/dist/esm/hooks/useSite.js +0 -3
- package/dist/esm/hooks/useUser.js +0 -3
- package/dist/esm/hooks/useValues.js +0 -4
- package/dist/esm/hooks/windowMetricsListener.js +0 -7
- package/dist/esm/host/ChaynsHost.js +2 -3
- package/dist/esm/host/iframe/HostIframe.js +3 -22
- package/dist/esm/host/module/ModuleHost.js +4 -8
- package/dist/esm/host/module/utils/loadComponent.js +3 -4
- package/dist/esm/types/IChaynsReact.js +39 -49
- package/dist/esm/util/appCall.js +0 -2
- package/dist/esm/util/deviceHelper.js +0 -4
- package/dist/esm/util/initModuleFederationSharing.js +1 -5
- package/dist/esm/util/postIframeForm.js +0 -1
- package/dist/esm/util/transferNestedFunctions.js +0 -2
- package/dist/esm/wrapper/AppWrapper.js +6 -20
- package/dist/esm/wrapper/FrameWrapper.js +2 -6
- package/dist/esm/wrapper/ModuleFederationWrapper.js +1 -3
- 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 +43 -43
- 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 +5 -5
- 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 +5 -5
- 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 +898 -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
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.WeekDayType = exports.ToastType = exports.TappEvent = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnviroment = exports.MediaType = exports.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.FloatingButtonAnimation = exports.Environment = exports.DialogType = exports.DialogSelectType = exports.DialogInputType = exports.DialogIconType = exports.DialogButtonType = exports.DialogAnimation = exports.DeviceOs = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
|
|
7
|
-
let DateType = exports.DateType =
|
|
7
|
+
let DateType = exports.DateType = function (DateType) {
|
|
8
8
|
DateType[DateType["DATE"] = 0] = "DATE";
|
|
9
9
|
DateType[DateType["TIME"] = 1] = "TIME";
|
|
10
10
|
DateType[DateType["DATE_TIME"] = 2] = "DATE_TIME";
|
|
11
11
|
return DateType;
|
|
12
12
|
}({});
|
|
13
|
-
let WeekDayType = exports.WeekDayType =
|
|
13
|
+
let WeekDayType = exports.WeekDayType = function (WeekDayType) {
|
|
14
14
|
WeekDayType[WeekDayType["SUNDAY"] = 0] = "SUNDAY";
|
|
15
15
|
WeekDayType[WeekDayType["MONDAY"] = 1] = "MONDAY";
|
|
16
16
|
WeekDayType[WeekDayType["TUESDAY"] = 2] = "TUESDAY";
|
|
@@ -20,14 +20,14 @@ let WeekDayType = exports.WeekDayType = /*#__PURE__*/function (WeekDayType) {
|
|
|
20
20
|
WeekDayType[WeekDayType["SATURDAY"] = 6] = "SATURDAY";
|
|
21
21
|
return WeekDayType;
|
|
22
22
|
}({});
|
|
23
|
-
let ToastType = exports.ToastType =
|
|
23
|
+
let ToastType = exports.ToastType = function (ToastType) {
|
|
24
24
|
ToastType[ToastType["NEUTRAL"] = 1] = "NEUTRAL";
|
|
25
25
|
ToastType[ToastType["SUCCESS"] = 2] = "SUCCESS";
|
|
26
26
|
ToastType[ToastType["WARNING"] = 3] = "WARNING";
|
|
27
27
|
ToastType[ToastType["ERROR"] = 4] = "ERROR";
|
|
28
28
|
return ToastType;
|
|
29
29
|
}({});
|
|
30
|
-
let DialogInputType = exports.DialogInputType =
|
|
30
|
+
let DialogInputType = exports.DialogInputType = function (DialogInputType) {
|
|
31
31
|
DialogInputType["NUMBER"] = "number";
|
|
32
32
|
DialogInputType["PASSWORD"] = "password";
|
|
33
33
|
DialogInputType["TELEPHONE"] = "tel";
|
|
@@ -35,20 +35,20 @@ let DialogInputType = exports.DialogInputType = /*#__PURE__*/function (DialogInp
|
|
|
35
35
|
DialogInputType["TEXTAREA"] = "textarea";
|
|
36
36
|
return DialogInputType;
|
|
37
37
|
}({});
|
|
38
|
-
let DialogSelectType = exports.DialogSelectType =
|
|
38
|
+
let DialogSelectType = exports.DialogSelectType = function (DialogSelectType) {
|
|
39
39
|
DialogSelectType[DialogSelectType["DEFAULT"] = 0] = "DEFAULT";
|
|
40
40
|
DialogSelectType[DialogSelectType["ICON"] = 1] = "ICON";
|
|
41
41
|
DialogSelectType[DialogSelectType["IMAGE"] = 2] = "IMAGE";
|
|
42
42
|
DialogSelectType[DialogSelectType["SIMPLE"] = 3] = "SIMPLE";
|
|
43
43
|
return DialogSelectType;
|
|
44
44
|
}({});
|
|
45
|
-
let DialogButtonType = exports.DialogButtonType =
|
|
45
|
+
let DialogButtonType = exports.DialogButtonType = function (DialogButtonType) {
|
|
46
46
|
DialogButtonType[DialogButtonType["OK"] = 1] = "OK";
|
|
47
47
|
DialogButtonType[DialogButtonType["CANCEL"] = -1] = "CANCEL";
|
|
48
48
|
DialogButtonType[DialogButtonType["NEGATIVE"] = 0] = "NEGATIVE";
|
|
49
49
|
return DialogButtonType;
|
|
50
50
|
}({});
|
|
51
|
-
let ScreenSize = exports.ScreenSize =
|
|
51
|
+
let ScreenSize = exports.ScreenSize = function (ScreenSize) {
|
|
52
52
|
ScreenSize[ScreenSize["XS"] = 0] = "XS";
|
|
53
53
|
ScreenSize[ScreenSize["SM"] = 1] = "SM";
|
|
54
54
|
ScreenSize[ScreenSize["MD"] = 2] = "MD";
|
|
@@ -56,31 +56,25 @@ let ScreenSize = exports.ScreenSize = /*#__PURE__*/function (ScreenSize) {
|
|
|
56
56
|
ScreenSize[ScreenSize["XL"] = 4] = "XL";
|
|
57
57
|
return ScreenSize;
|
|
58
58
|
}({});
|
|
59
|
-
|
|
60
|
-
* @ignore
|
|
61
|
-
*/
|
|
62
|
-
/**
|
|
63
|
-
* @ignore
|
|
64
|
-
*/
|
|
65
|
-
let AccessMode = exports.AccessMode = /*#__PURE__*/function (AccessMode) {
|
|
59
|
+
let AccessMode = exports.AccessMode = function (AccessMode) {
|
|
66
60
|
AccessMode[AccessMode["public"] = 0] = "public";
|
|
67
61
|
AccessMode[AccessMode["protected"] = 1] = "protected";
|
|
68
62
|
AccessMode[AccessMode["private"] = 2] = "private";
|
|
69
63
|
return AccessMode;
|
|
70
64
|
}({});
|
|
71
|
-
let ScanQrCodeCodeType = exports.ScanQrCodeCodeType =
|
|
65
|
+
let ScanQrCodeCodeType = exports.ScanQrCodeCodeType = function (ScanQrCodeCodeType) {
|
|
72
66
|
ScanQrCodeCodeType[ScanQrCodeCodeType["QR"] = 0] = "QR";
|
|
73
67
|
ScanQrCodeCodeType[ScanQrCodeCodeType["BARCODE"] = 0] = "BARCODE";
|
|
74
68
|
ScanQrCodeCodeType[ScanQrCodeCodeType["ALL"] = 2] = "ALL";
|
|
75
69
|
return ScanQrCodeCodeType;
|
|
76
70
|
}({});
|
|
77
|
-
let ScanQrCodeCameraTypes = exports.ScanQrCodeCameraTypes =
|
|
71
|
+
let ScanQrCodeCameraTypes = exports.ScanQrCodeCameraTypes = function (ScanQrCodeCameraTypes) {
|
|
78
72
|
ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["AUTO"] = 0] = "AUTO";
|
|
79
73
|
ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["BACK"] = 1] = "BACK";
|
|
80
74
|
ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["FRONT"] = 2] = "FRONT";
|
|
81
75
|
return ScanQrCodeCameraTypes;
|
|
82
76
|
}({});
|
|
83
|
-
var IOSFeedbackVibration =
|
|
77
|
+
var IOSFeedbackVibration = function (IOSFeedbackVibration) {
|
|
84
78
|
IOSFeedbackVibration[IOSFeedbackVibration["Unknown"] = 0] = "Unknown";
|
|
85
79
|
IOSFeedbackVibration[IOSFeedbackVibration["SelectionChanged"] = 1] = "SelectionChanged";
|
|
86
80
|
IOSFeedbackVibration[IOSFeedbackVibration["NotificationError"] = 2] = "NotificationError";
|
|
@@ -93,8 +87,7 @@ var IOSFeedbackVibration = /*#__PURE__*/function (IOSFeedbackVibration) {
|
|
|
93
87
|
IOSFeedbackVibration[IOSFeedbackVibration["Rigid"] = 9] = "Rigid";
|
|
94
88
|
return IOSFeedbackVibration;
|
|
95
89
|
}(IOSFeedbackVibration || {});
|
|
96
|
-
|
|
97
|
-
var SnapshotType = /*#__PURE__*/function (SnapshotType) {
|
|
90
|
+
var SnapshotType = function (SnapshotType) {
|
|
98
91
|
SnapshotType["Background"] = "background";
|
|
99
92
|
SnapshotType["Settings"] = "settings";
|
|
100
93
|
SnapshotType["ColorScheme"] = "colorScheme";
|
|
@@ -102,14 +95,14 @@ var SnapshotType = /*#__PURE__*/function (SnapshotType) {
|
|
|
102
95
|
SnapshotType["Tapp"] = "tapp";
|
|
103
96
|
return SnapshotType;
|
|
104
97
|
}(SnapshotType || {});
|
|
105
|
-
var DesignSettingsUpdateBackgroundType =
|
|
98
|
+
var DesignSettingsUpdateBackgroundType = function (DesignSettingsUpdateBackgroundType) {
|
|
106
99
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["None"] = 0] = "None";
|
|
107
100
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Image"] = 1] = "Image";
|
|
108
101
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Video"] = 2] = "Video";
|
|
109
102
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Color"] = 3] = "Color";
|
|
110
103
|
return DesignSettingsUpdateBackgroundType;
|
|
111
104
|
}(DesignSettingsUpdateBackgroundType || {});
|
|
112
|
-
var DesignSettingsUpdateSeasonTypes =
|
|
105
|
+
var DesignSettingsUpdateSeasonTypes = function (DesignSettingsUpdateSeasonTypes) {
|
|
113
106
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["None"] = 0] = "None";
|
|
114
107
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Snowm"] = 1] = "Snowm";
|
|
115
108
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Confetti"] = 2] = "Confetti";
|
|
@@ -121,14 +114,14 @@ var DesignSettingsUpdateSeasonTypes = /*#__PURE__*/function (DesignSettingsUpdat
|
|
|
121
114
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Coins"] = 8] = "Coins";
|
|
122
115
|
return DesignSettingsUpdateSeasonTypes;
|
|
123
116
|
}(DesignSettingsUpdateSeasonTypes || {});
|
|
124
|
-
var DesignSettingsUpdateGalleryAnimationTypes =
|
|
117
|
+
var DesignSettingsUpdateGalleryAnimationTypes = function (DesignSettingsUpdateGalleryAnimationTypes) {
|
|
125
118
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Swipe"] = 0] = "Swipe";
|
|
126
119
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Fade"] = 1] = "Fade";
|
|
127
120
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Parallax"] = 2] = "Parallax";
|
|
128
121
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["KenBurns"] = 3] = "KenBurns";
|
|
129
122
|
return DesignSettingsUpdateGalleryAnimationTypes;
|
|
130
123
|
}(DesignSettingsUpdateGalleryAnimationTypes || {});
|
|
131
|
-
var DesignSettingsUpdateCoverTypes =
|
|
124
|
+
var DesignSettingsUpdateCoverTypes = function (DesignSettingsUpdateCoverTypes) {
|
|
132
125
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Image"] = 0] = "Image";
|
|
133
126
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Video"] = 1] = "Video";
|
|
134
127
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Slideshow"] = 2] = "Slideshow";
|
|
@@ -136,21 +129,21 @@ var DesignSettingsUpdateCoverTypes = /*#__PURE__*/function (DesignSettingsUpdate
|
|
|
136
129
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["None"] = 4] = "None";
|
|
137
130
|
return DesignSettingsUpdateCoverTypes;
|
|
138
131
|
}(DesignSettingsUpdateCoverTypes || {});
|
|
139
|
-
var DesignSettingsUpdateColorSchemeMode =
|
|
132
|
+
var DesignSettingsUpdateColorSchemeMode = function (DesignSettingsUpdateColorSchemeMode) {
|
|
140
133
|
DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Normal"] = 0] = "Normal";
|
|
141
134
|
DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Dark"] = 1] = "Dark";
|
|
142
135
|
DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Bright"] = 2] = "Bright";
|
|
143
136
|
return DesignSettingsUpdateColorSchemeMode;
|
|
144
137
|
}(DesignSettingsUpdateColorSchemeMode || {});
|
|
145
|
-
var DesignSettingsUpdateTappViewModes =
|
|
138
|
+
var DesignSettingsUpdateTappViewModes = function (DesignSettingsUpdateTappViewModes) {
|
|
146
139
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Normal"] = 0] = "Normal";
|
|
147
140
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Exclusive"] = 1] = "Exclusive";
|
|
148
141
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Wide"] = 2] = "Wide";
|
|
149
142
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Fullscreen"] = 3] = "Fullscreen";
|
|
150
143
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["FullscreenWithBackground"] = 4] = "FullscreenWithBackground";
|
|
151
144
|
return DesignSettingsUpdateTappViewModes;
|
|
152
|
-
}(DesignSettingsUpdateTappViewModes || {});
|
|
153
|
-
var LoginState =
|
|
145
|
+
}(DesignSettingsUpdateTappViewModes || {});
|
|
146
|
+
var LoginState = function (LoginState) {
|
|
154
147
|
LoginState[LoginState["FACEBOOK"] = 0] = "FACEBOOK";
|
|
155
148
|
LoginState[LoginState["T_WEB"] = 1] = "T_WEB";
|
|
156
149
|
LoginState[LoginState["LoginFailed"] = 2] = "LoginFailed";
|
|
@@ -158,19 +151,19 @@ var LoginState = /*#__PURE__*/function (LoginState) {
|
|
|
158
151
|
LoginState[LoginState["SUCCESS"] = 4] = "SUCCESS";
|
|
159
152
|
return LoginState;
|
|
160
153
|
}(LoginState || {});
|
|
161
|
-
let FloatingButtonPosition = exports.FloatingButtonPosition =
|
|
154
|
+
let FloatingButtonPosition = exports.FloatingButtonPosition = function (FloatingButtonPosition) {
|
|
162
155
|
FloatingButtonPosition[FloatingButtonPosition["Right"] = 0] = "Right";
|
|
163
156
|
FloatingButtonPosition[FloatingButtonPosition["Center"] = 1] = "Center";
|
|
164
157
|
FloatingButtonPosition[FloatingButtonPosition["Left"] = 2] = "Left";
|
|
165
158
|
return FloatingButtonPosition;
|
|
166
159
|
}({});
|
|
167
|
-
let FloatingButtonAnimation = exports.FloatingButtonAnimation =
|
|
160
|
+
let FloatingButtonAnimation = exports.FloatingButtonAnimation = function (FloatingButtonAnimation) {
|
|
168
161
|
FloatingButtonAnimation["None"] = "none";
|
|
169
162
|
FloatingButtonAnimation["FadeIn"] = "fade-in";
|
|
170
163
|
FloatingButtonAnimation["Pulse"] = "pulse";
|
|
171
164
|
return FloatingButtonAnimation;
|
|
172
165
|
}({});
|
|
173
|
-
let SharingApp = exports.SharingApp =
|
|
166
|
+
let SharingApp = exports.SharingApp = function (SharingApp) {
|
|
174
167
|
SharingApp[SharingApp["Mail"] = 0] = "Mail";
|
|
175
168
|
SharingApp[SharingApp["WhatsApp"] = 1] = "WhatsApp";
|
|
176
169
|
SharingApp[SharingApp["Facebook"] = 2] = "Facebook";
|
|
@@ -179,7 +172,7 @@ let SharingApp = exports.SharingApp = /*#__PURE__*/function (SharingApp) {
|
|
|
179
172
|
SharingApp[SharingApp["Twitter"] = 5] = "Twitter";
|
|
180
173
|
return SharingApp;
|
|
181
174
|
}({});
|
|
182
|
-
let TappEvent = exports.TappEvent =
|
|
175
|
+
let TappEvent = exports.TappEvent = function (TappEvent) {
|
|
183
176
|
TappEvent[TappEvent["OnShow"] = 0] = "OnShow";
|
|
184
177
|
TappEvent[TappEvent["OnHide"] = 1] = "OnHide";
|
|
185
178
|
TappEvent[TappEvent["OnRefresh"] = 2] = "OnRefresh";
|
|
@@ -187,26 +180,26 @@ let TappEvent = exports.TappEvent = /*#__PURE__*/function (TappEvent) {
|
|
|
187
180
|
TappEvent[TappEvent["OnCloseCcScanner"] = 4] = "OnCloseCcScanner";
|
|
188
181
|
return TappEvent;
|
|
189
182
|
}({});
|
|
190
|
-
let IconType = exports.IconType =
|
|
183
|
+
let IconType = exports.IconType = function (IconType) {
|
|
191
184
|
IconType[IconType["Font"] = 0] = "Font";
|
|
192
185
|
IconType[IconType["Base64"] = 1] = "Base64";
|
|
193
186
|
IconType[IconType["Url"] = 2] = "Url";
|
|
194
187
|
return IconType;
|
|
195
188
|
}({});
|
|
196
|
-
let Gender = exports.Gender =
|
|
189
|
+
let Gender = exports.Gender = function (Gender) {
|
|
197
190
|
Gender[Gender["Unknown"] = 0] = "Unknown";
|
|
198
191
|
Gender[Gender["male"] = 1] = "male";
|
|
199
192
|
Gender[Gender["female"] = 2] = "female";
|
|
200
193
|
Gender[Gender["diverse"] = 9] = "diverse";
|
|
201
194
|
return Gender;
|
|
202
195
|
}({});
|
|
203
|
-
let ColorMode = exports.ColorMode =
|
|
196
|
+
let ColorMode = exports.ColorMode = function (ColorMode) {
|
|
204
197
|
ColorMode[ColorMode["Classic"] = 0] = "Classic";
|
|
205
198
|
ColorMode[ColorMode["Dark"] = 1] = "Dark";
|
|
206
199
|
ColorMode[ColorMode["Light"] = 2] = "Light";
|
|
207
200
|
return ColorMode;
|
|
208
201
|
}({});
|
|
209
|
-
let Language = exports.Language =
|
|
202
|
+
let Language = exports.Language = function (Language) {
|
|
210
203
|
Language["Unknown"] = "unknown";
|
|
211
204
|
Language["German"] = "de";
|
|
212
205
|
Language["English"] = "en";
|
|
@@ -220,7 +213,7 @@ let Language = exports.Language = /*#__PURE__*/function (Language) {
|
|
|
220
213
|
Language["Ukrainian"] = "uk";
|
|
221
214
|
return Language;
|
|
222
215
|
}({});
|
|
223
|
-
let RuntimeEnviroment = exports.RuntimeEnviroment =
|
|
216
|
+
let RuntimeEnviroment = exports.RuntimeEnviroment = function (RuntimeEnviroment) {
|
|
224
217
|
RuntimeEnviroment[RuntimeEnviroment["Unknown"] = 0] = "Unknown";
|
|
225
218
|
RuntimeEnviroment[RuntimeEnviroment["ChaynsDe"] = 1] = "ChaynsDe";
|
|
226
219
|
RuntimeEnviroment[RuntimeEnviroment["ChaynsWeb"] = 2] = "ChaynsWeb";
|
|
@@ -230,7 +223,7 @@ let RuntimeEnviroment = exports.RuntimeEnviroment = /*#__PURE__*/function (Runti
|
|
|
230
223
|
RuntimeEnviroment[RuntimeEnviroment["Dialog"] = 6] = "Dialog";
|
|
231
224
|
return RuntimeEnviroment;
|
|
232
225
|
}({});
|
|
233
|
-
let DeviceOs = exports.DeviceOs =
|
|
226
|
+
let DeviceOs = exports.DeviceOs = function (DeviceOs) {
|
|
234
227
|
DeviceOs["Unknown"] = "unknown";
|
|
235
228
|
DeviceOs["Android"] = "android";
|
|
236
229
|
DeviceOs["IOS"] = "ios";
|
|
@@ -239,7 +232,7 @@ let DeviceOs = exports.DeviceOs = /*#__PURE__*/function (DeviceOs) {
|
|
|
239
232
|
DeviceOs["Linux"] = "linux";
|
|
240
233
|
return DeviceOs;
|
|
241
234
|
}({});
|
|
242
|
-
let AppName = exports.AppName =
|
|
235
|
+
let AppName = exports.AppName = function (AppName) {
|
|
243
236
|
AppName[AppName["Unknown"] = 0] = "Unknown";
|
|
244
237
|
AppName[AppName["David"] = 1] = "David";
|
|
245
238
|
AppName[AppName["Chayns"] = 2] = "Chayns";
|
|
@@ -251,7 +244,7 @@ let AppName = exports.AppName = /*#__PURE__*/function (AppName) {
|
|
|
251
244
|
AppName[AppName["Team"] = 8] = "Team";
|
|
252
245
|
return AppName;
|
|
253
246
|
}({});
|
|
254
|
-
let BrowserName = exports.BrowserName =
|
|
247
|
+
let BrowserName = exports.BrowserName = function (BrowserName) {
|
|
255
248
|
BrowserName["Unknown"] = "unknown";
|
|
256
249
|
BrowserName["Chrome"] = "chrome";
|
|
257
250
|
BrowserName["Safari"] = "safari";
|
|
@@ -259,14 +252,14 @@ let BrowserName = exports.BrowserName = /*#__PURE__*/function (BrowserName) {
|
|
|
259
252
|
BrowserName["Edge"] = "edge";
|
|
260
253
|
return BrowserName;
|
|
261
254
|
}({});
|
|
262
|
-
let Environment = exports.Environment =
|
|
255
|
+
let Environment = exports.Environment = function (Environment) {
|
|
263
256
|
Environment[Environment["Development"] = 0] = "Development";
|
|
264
257
|
Environment[Environment["Qa"] = 1] = "Qa";
|
|
265
258
|
Environment[Environment["Staging"] = 2] = "Staging";
|
|
266
259
|
Environment[Environment["Production"] = 3] = "Production";
|
|
267
260
|
return Environment;
|
|
268
261
|
}({});
|
|
269
|
-
let Font = exports.Font =
|
|
262
|
+
let Font = exports.Font = function (Font) {
|
|
270
263
|
Font[Font["Unknown"] = 0] = "Unknown";
|
|
271
264
|
Font[Font["Roboto"] = 1] = "Roboto";
|
|
272
265
|
Font[Font["OpenSans"] = 2] = "OpenSans";
|
|
@@ -297,12 +290,12 @@ let Font = exports.Font = /*#__PURE__*/function (Font) {
|
|
|
297
290
|
Font[Font["Inter"] = 27] = "Inter";
|
|
298
291
|
return Font;
|
|
299
292
|
}({});
|
|
300
|
-
var selectType =
|
|
293
|
+
var selectType = function (selectType) {
|
|
301
294
|
selectType[selectType["DEFAULT"] = 0] = "DEFAULT";
|
|
302
295
|
selectType[selectType["ICON"] = 1] = "ICON";
|
|
303
296
|
return selectType;
|
|
304
297
|
}(selectType || {});
|
|
305
|
-
let DialogType = exports.DialogType =
|
|
298
|
+
let DialogType = exports.DialogType = function (DialogType) {
|
|
306
299
|
DialogType["ALERT"] = "alert";
|
|
307
300
|
DialogType["CONFIRM"] = "confirm";
|
|
308
301
|
DialogType["DATE"] = "date";
|
|
@@ -315,16 +308,16 @@ let DialogType = exports.DialogType = /*#__PURE__*/function (DialogType) {
|
|
|
315
308
|
DialogType["SIGNATURE"] = "signature";
|
|
316
309
|
return DialogType;
|
|
317
310
|
}({});
|
|
318
|
-
let MediaType = exports.MediaType =
|
|
311
|
+
let MediaType = exports.MediaType = function (MediaType) {
|
|
319
312
|
MediaType["IMAGE"] = "image";
|
|
320
313
|
MediaType["VIDEO"] = "video";
|
|
321
314
|
return MediaType;
|
|
322
315
|
}({});
|
|
323
|
-
let DialogAnimation = exports.DialogAnimation =
|
|
316
|
+
let DialogAnimation = exports.DialogAnimation = function (DialogAnimation) {
|
|
324
317
|
DialogAnimation["CONFETTI"] = "confetti";
|
|
325
318
|
return DialogAnimation;
|
|
326
319
|
}({});
|
|
327
|
-
let DialogIconType = exports.DialogIconType =
|
|
320
|
+
let DialogIconType = exports.DialogIconType = function (DialogIconType) {
|
|
328
321
|
DialogIconType["SuccessIcon"] = "%%DialogSuccessIcon%%";
|
|
329
322
|
DialogIconType["WarningIcon"] = "%%DialogWarningIcon%%";
|
|
330
323
|
DialogIconType["ErrorIcon"] = "%%DialogErrorIcon%%";
|
package/dist/cjs/util/appCall.js
CHANGED
|
@@ -49,21 +49,17 @@ const getDeviceInfo = (userAgent, acceptHeader, {
|
|
|
49
49
|
};
|
|
50
50
|
result.imei = imei;
|
|
51
51
|
result.engine = uaParser.getEngine();
|
|
52
|
-
// TODO: breaking change on next minor and use object with name and version
|
|
53
52
|
result.os = ((_uaParser$getOS = uaParser.getOS()) === null || _uaParser$getOS === void 0 ? void 0 : _uaParser$getOS.name) === 'Android' ? 'Android OS' : (_uaParser$getOS2 = uaParser.getOS()) === null || _uaParser$getOS2 === void 0 ? void 0 : _uaParser$getOS2.name;
|
|
54
53
|
result.osVersion = (_uaParser$getOS3 = uaParser.getOS()) === null || _uaParser$getOS3 === void 0 ? void 0 : _uaParser$getOS3.version;
|
|
55
54
|
if (typeof window !== 'undefined') {
|
|
56
55
|
result.screenSize = getScreenSize(window.innerWidth);
|
|
57
56
|
result.isTouch = getClientDeviceInfo().isTouch;
|
|
58
57
|
} else {
|
|
59
|
-
// estimate size over user agent, very inaccurate, could be improved by setting a cookie with the screensize
|
|
60
58
|
const screenSizeByUA = /mobi/i.test(userAgent) ? _IChaynsReact.ScreenSize.SM : _IChaynsReact.ScreenSize.XL;
|
|
61
59
|
result.screenSize = appName !== _IChaynsReact.AppName.Unknown ? _IChaynsReact.ScreenSize.XS : screenSizeByUA;
|
|
62
60
|
}
|
|
63
61
|
return result;
|
|
64
62
|
};
|
|
65
|
-
|
|
66
|
-
// Infos that are only available on client or iframe side
|
|
67
63
|
const getClientDeviceInfo = () => ({
|
|
68
64
|
isTouch: navigator.maxTouchPoints > 0 && window.matchMedia('(pointer: coarse)').matches
|
|
69
65
|
});
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.setTappHeight = void 0;
|
|
7
7
|
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const setTappHeight = setHeight => {
|
|
10
10
|
document.documentElement.style.overflow = 'hidden';
|
|
11
11
|
void setHeight(document.body.offsetHeight);
|
|
@@ -6,17 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.initModuleFederationSharing = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
let ReactDOMClient;
|
|
11
11
|
try {
|
|
12
12
|
ReactDOMClient = require('react-dom/client');
|
|
13
|
-
} catch (e) {
|
|
14
|
-
// do nothing
|
|
15
|
-
}
|
|
13
|
+
} catch (e) {}
|
|
16
14
|
const initModuleFederationSharing = ({
|
|
17
15
|
name
|
|
18
16
|
}) => {
|
|
19
|
-
// forces single instance of module federation runtime
|
|
20
17
|
if (globalThis.moduleFederationRuntime) {
|
|
21
18
|
return;
|
|
22
19
|
}
|
|
@@ -37,7 +34,6 @@ const initModuleFederationSharing = ({
|
|
|
37
34
|
},
|
|
38
35
|
'react-dom': {
|
|
39
36
|
version: _react.default.version,
|
|
40
|
-
// intended, because react dom.version is not identical to package json react version (hash in version)
|
|
41
37
|
scope: 'chayns-api',
|
|
42
38
|
lib: () => _reactDom.default
|
|
43
39
|
}
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
var Comlink = _interopRequireWildcard(require("comlink"));
|
|
4
4
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
5
5
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
6
|
-
// @ts-nocheck
|
|
7
|
-
|
|
8
6
|
Comlink.transferHandlers.set("FUNCTION", {
|
|
9
7
|
canHandle: obj => {
|
|
10
8
|
return obj && typeof obj === "object" && Object.values(obj).some(x => typeof x === 'function');
|
|
@@ -28,7 +26,6 @@ Comlink.transferHandlers.set("FUNCTION", {
|
|
|
28
26
|
},
|
|
29
27
|
deserialize(obj) {
|
|
30
28
|
obj._functionKeys.forEach(x => {
|
|
31
|
-
// under certain conditions deserialize can be called more than once on same object
|
|
32
29
|
if (obj[x] instanceof MessagePort) {
|
|
33
30
|
obj[x].start();
|
|
34
31
|
obj[x] = Comlink.wrap(obj[x]);
|
|
@@ -16,10 +16,7 @@ var _languages = require("../constants/languages");
|
|
|
16
16
|
var _is = require("../util/is");
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
-
function _interopRequireDefault(
|
|
20
|
-
/* eslint-disable */
|
|
21
|
-
// @ts-nocheck
|
|
22
|
-
|
|
19
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
20
|
let appWrapperDialogId = 0;
|
|
24
21
|
class AppWrapper {
|
|
25
22
|
values = null;
|
|
@@ -46,9 +43,7 @@ class AppWrapper {
|
|
|
46
43
|
if (tappId) {
|
|
47
44
|
try {
|
|
48
45
|
tappId = Number.parseInt(tappId, 10);
|
|
49
|
-
} catch {
|
|
50
|
-
// ignore
|
|
51
|
-
}
|
|
46
|
+
} catch {}
|
|
52
47
|
}
|
|
53
48
|
let language = AppInfo.Language;
|
|
54
49
|
if (!language) {
|
|
@@ -64,9 +59,7 @@ class AppWrapper {
|
|
|
64
59
|
if (typeof userId === 'string') {
|
|
65
60
|
try {
|
|
66
61
|
userId = Number.parseInt(userId, 10);
|
|
67
|
-
} catch {
|
|
68
|
-
// ignore
|
|
69
|
-
}
|
|
62
|
+
} catch {}
|
|
70
63
|
}
|
|
71
64
|
return {
|
|
72
65
|
device: (0, _deviceHelper.default)(navigator.userAgent, 'image/webp', {
|
|
@@ -382,10 +375,7 @@ class AppWrapper {
|
|
|
382
375
|
const {
|
|
383
376
|
shouldRemove
|
|
384
377
|
} = (0, _apiListenerHelper.removeApiListener)('geoLocationListener', id);
|
|
385
|
-
if (shouldRemove) {
|
|
386
|
-
// App does not support removal of request geo location call with permanent true which makes this a
|
|
387
|
-
// no-op
|
|
388
|
-
}
|
|
378
|
+
if (shouldRemove) {}
|
|
389
379
|
},
|
|
390
380
|
removeScrollListener: async id => {
|
|
391
381
|
const {
|
|
@@ -400,17 +390,13 @@ class AppWrapper {
|
|
|
400
390
|
const {
|
|
401
391
|
shouldRemove
|
|
402
392
|
} = (0, _apiListenerHelper.removeApiListener)('visibilityChangeListener', id);
|
|
403
|
-
if (shouldRemove) {
|
|
404
|
-
// App does not support removal of onActivate callback which makes this a no-op
|
|
405
|
-
}
|
|
393
|
+
if (shouldRemove) {}
|
|
406
394
|
},
|
|
407
395
|
removeToolbarChangeListener: async id => {
|
|
408
396
|
const {
|
|
409
397
|
shouldRemove
|
|
410
398
|
} = (0, _apiListenerHelper.removeApiListener)('toolbarChangeListener', id);
|
|
411
|
-
if (shouldRemove) {
|
|
412
|
-
// App does not support removal of onToolbarBarRemove callback which makes this a no-op
|
|
413
|
-
}
|
|
399
|
+
if (shouldRemove) {}
|
|
414
400
|
},
|
|
415
401
|
removeWindowMetricsListener: async id => {
|
|
416
402
|
const shouldRemove = (0, _apiListenerHelper.removeApiListener)('windowMetricsListener', id);
|
|
@@ -11,11 +11,9 @@ var _apiListenerHelper = require("../helper/apiListenerHelper");
|
|
|
11
11
|
var _getUserInfo = _interopRequireDefault(require("../calls/getUserInfo"));
|
|
12
12
|
var _sendMessage = require("../calls/sendMessage");
|
|
13
13
|
var _heightHelper = require("../util/heightHelper");
|
|
14
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
18
|
-
|
|
19
17
|
class FrameWrapper {
|
|
20
18
|
resolve = null;
|
|
21
19
|
exposedFunctions = null;
|
|
@@ -199,7 +197,6 @@ class FrameWrapper {
|
|
|
199
197
|
callback();
|
|
200
198
|
}
|
|
201
199
|
});
|
|
202
|
-
// @ts-ignore
|
|
203
200
|
return this.exposedFunctions.setFloatingButton(value, cb);
|
|
204
201
|
},
|
|
205
202
|
setHeight: async value => {
|
|
@@ -293,9 +290,7 @@ class FrameWrapper {
|
|
|
293
290
|
if (!this.initialized) await this.ready;
|
|
294
291
|
const listenerKey = `dialogHostEventListener`;
|
|
295
292
|
const shouldRemove = (0, _apiListenerHelper.removeApiListener)(listenerKey, id);
|
|
296
|
-
if (shouldRemove) {
|
|
297
|
-
// this.exposedFunctions.removeDialogHostEventListener(0);
|
|
298
|
-
}
|
|
293
|
+
if (shouldRemove) {}
|
|
299
294
|
},
|
|
300
295
|
removeDialogClientEventListener: async () => {},
|
|
301
296
|
addAnonymousAccount: async () => {
|
|
@@ -9,7 +9,7 @@ var _visibilityChangeListener = require("../calls/visibilityChangeListener");
|
|
|
9
9
|
var _apiListenerHelper = require("../helper/apiListenerHelper");
|
|
10
10
|
var _getUserInfo = _interopRequireDefault(require("../calls/getUserInfo"));
|
|
11
11
|
var _sendMessage = require("../calls/sendMessage");
|
|
12
|
-
function _interopRequireDefault(
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
class ModuleFederationWrapper {
|
|
14
14
|
listeners = [];
|
|
15
15
|
constructor(values, functions) {
|
|
@@ -21,9 +21,7 @@ class ModuleFederationWrapper {
|
|
|
21
21
|
this.functions.sendMessageToGroup = async (groupId, object) => (0, _sendMessage.sendMessageToGroup)(this, object, groupId);
|
|
22
22
|
this.functions.sendMessageToPage = async object => (0, _sendMessage.sendMessageToPage)(this, object);
|
|
23
23
|
this.functions.sendMessageToUser = async (userId, object) => (0, _sendMessage.sendMessageToUser)(this, object, userId);
|
|
24
|
-
// make all functions async to be consistent with frame wrapper
|
|
25
24
|
Object.entries(functions).forEach(([k, fn]) => {
|
|
26
|
-
// eslint-disable-next-line
|
|
27
25
|
this.functions[k] = async (...args) => fn(...args);
|
|
28
26
|
});
|
|
29
27
|
this.functions.createDialog = config => {
|
|
@@ -10,7 +10,7 @@ var _deviceHelper = _interopRequireDefault(require("../util/deviceHelper"));
|
|
|
10
10
|
var _AppWrapper = require("./AppWrapper");
|
|
11
11
|
var _FrameWrapper = require("./FrameWrapper");
|
|
12
12
|
var _ModuleFederationWrapper = require("./ModuleFederationWrapper");
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
class StaticChaynsApi {
|
|
15
15
|
constructor(values, functions) {
|
|
16
16
|
var _deviceInfo$app$name, _deviceInfo$app;
|
|
@@ -6,7 +6,6 @@ export const buttonText = {
|
|
|
6
6
|
'en': 'Yes',
|
|
7
7
|
'nl': 'Ja'
|
|
8
8
|
}['de'] || 'Yes',
|
|
9
|
-
// TODO: Language
|
|
10
9
|
'NO': {
|
|
11
10
|
'de': 'Nein',
|
|
12
11
|
'en': 'No',
|
|
@@ -41,7 +40,6 @@ export function chaynsDialog(config) {
|
|
|
41
40
|
config.callback = getCallbackName(callbackName);
|
|
42
41
|
if (config.dialog) {
|
|
43
42
|
config.dialog.callType = dialogAction.ALERT_CONFIRM;
|
|
44
|
-
// @ts-ignore
|
|
45
43
|
return open(config.dialog).then(data => Promise.resolve(data.selection ? data : data.buttonType));
|
|
46
44
|
}
|
|
47
45
|
return "unsupported";
|
|
@@ -3,7 +3,6 @@ export function confirm() {
|
|
|
3
3
|
let title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
4
4
|
let message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
5
5
|
let config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6
|
-
// backward compatibility
|
|
7
6
|
if (Array.isArray(config)) {
|
|
8
7
|
config = {
|
|
9
8
|
'buttons': config
|