chayns-api 1.0.47 → 1.0.48
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 +54 -54
- package/dist/cjs/calls/dialogs/chaynsDialog.js +6 -3
- package/dist/cjs/calls/dialogs/date.js +12 -39
- package/dist/cjs/calls/dialogs/fileSelect.js +2 -1
- package/dist/cjs/calls/dialogs/input.js +3 -2
- package/dist/cjs/calls/dialogs/select.js +3 -2
- package/dist/cjs/calls/getUserInfo.js +2 -1
- package/dist/cjs/calls/index.js +121 -114
- package/dist/cjs/calls/sendMessage.js +8 -8
- package/dist/cjs/calls/visibilityChangeListener.js +4 -4
- package/dist/cjs/components/AppDialogWrapper.js +4 -3
- package/dist/cjs/components/ChaynsContext.js +4 -2
- package/dist/cjs/components/ChaynsProvider.js +5 -4
- package/dist/cjs/components/moduleWrapper.js +3 -2
- package/dist/cjs/components/withCompatMode.js +3 -3
- 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/useCustomData.js +2 -2
- package/dist/cjs/hooks/useDevice.js +2 -2
- package/dist/cjs/hooks/useDialogState.js +6 -6
- 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 +2 -1
- package/dist/cjs/host/iframe/HostIframe.js +5 -3
- package/dist/cjs/host/iframe/utils/useUpdateData.js +2 -1
- package/dist/cjs/host/module/ModuleHost.js +4 -3
- package/dist/cjs/host/module/utils/useDynamicScript.js +6 -4
- package/dist/cjs/index.js +5 -4
- package/dist/cjs/types/IChaynsReact.js +134 -114
- package/dist/cjs/util/appCall.js +4 -3
- package/dist/cjs/util/deviceHelper.js +5 -4
- package/dist/cjs/util/transferNestedFunctions.js +2 -2
- package/dist/cjs/wrapper/AppWrapper.js +3 -3
- package/dist/cjs/wrapper/FrameWrapper.js +2 -2
- package/dist/cjs/wrapper/StaticChaynsApi.js +2 -1
- package/dist/esm/calls/dialogs/date.js +34 -34
- package/dist/esm/calls/index.js +106 -106
- package/dist/esm/calls/sendMessage.js +8 -8
- package/dist/esm/calls/visibilityChangeListener.js +4 -4
- package/dist/esm/components/ChaynsProvider.js +1 -1
- package/dist/esm/handler/DialogHandler.js +2 -2
- 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/useCustomData.js +2 -2
- package/dist/esm/hooks/useDevice.js +2 -2
- package/dist/esm/hooks/useDialogState.js +6 -6
- 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 -0
- package/dist/esm/types/IChaynsReact.js +108 -117
- package/dist/esm/util/appCall.js +2 -2
- package/dist/esm/util/deviceHelper.js +3 -3
- package/dist/esm/wrapper/AppWrapper.js +3 -3
- package/dist/esm/wrapper/FrameWrapper.js +2 -2
- package/dist/esm/wrapper/StaticChaynsApi.js +2 -2
- 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 +251 -251
- 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 +13 -13
- package/dist/types/handler/DialogHandler.d.ts +18 -18
- 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 +17 -17
- 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/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 +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 +30 -30
- 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 +27 -27
- 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 +19 -19
- package/dist/types/types/IChaynsReact.d.ts +809 -809
- 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/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 +15 -15
- package/dist/types/wrapper/ModuleFederationWrapper.d.ts +10 -10
- package/dist/types/wrapper/SsrWrapper.d.ts +11 -11
- package/dist/types/wrapper/StaticChaynsApi.d.ts +9 -9
- package/package.json +78 -78
- package/toolkit.config.js +20 -20
- package/tsconfig.json +56 -56
|
@@ -4,71 +4,75 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
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.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
|
|
7
|
+
let DateType;
|
|
8
|
+
exports.DateType = DateType;
|
|
9
|
+
(function (DateType) {
|
|
8
10
|
DateType[DateType["DATE"] = 0] = "DATE";
|
|
9
11
|
DateType[DateType["TIME"] = 1] = "TIME";
|
|
10
12
|
DateType[DateType["DATE_TIME"] = 2] = "DATE_TIME";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
})(DateType || (exports.DateType = DateType = {}));
|
|
14
|
+
let ToastType;
|
|
15
|
+
exports.ToastType = ToastType;
|
|
16
|
+
(function (ToastType) {
|
|
14
17
|
ToastType[ToastType["NEUTRAL"] = 1] = "NEUTRAL";
|
|
15
18
|
ToastType[ToastType["SUCCESS"] = 2] = "SUCCESS";
|
|
16
19
|
ToastType[ToastType["WARNING"] = 3] = "WARNING";
|
|
17
20
|
ToastType[ToastType["ERROR"] = 4] = "ERROR";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
})(ToastType || (exports.ToastType = ToastType = {}));
|
|
22
|
+
let DialogInputType;
|
|
23
|
+
exports.DialogInputType = DialogInputType;
|
|
24
|
+
(function (DialogInputType) {
|
|
21
25
|
DialogInputType["NUMBER"] = "number";
|
|
22
26
|
DialogInputType["PASSWORD"] = "password";
|
|
23
27
|
DialogInputType["TELEPHONE"] = "tel";
|
|
24
28
|
DialogInputType["TEXT"] = "text";
|
|
25
29
|
DialogInputType["TEXTAREA"] = "textarea";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
})(DialogInputType || (exports.DialogInputType = DialogInputType = {}));
|
|
31
|
+
let DialogSelectType;
|
|
32
|
+
exports.DialogSelectType = DialogSelectType;
|
|
33
|
+
(function (DialogSelectType) {
|
|
29
34
|
DialogSelectType[DialogSelectType["DEFAULT"] = 0] = "DEFAULT";
|
|
30
35
|
DialogSelectType[DialogSelectType["ICON"] = 1] = "ICON";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
})(DialogSelectType || (exports.DialogSelectType = DialogSelectType = {}));
|
|
37
|
+
let DialogButtonType;
|
|
38
|
+
exports.DialogButtonType = DialogButtonType;
|
|
39
|
+
(function (DialogButtonType) {
|
|
34
40
|
DialogButtonType[DialogButtonType["OK"] = 1] = "OK";
|
|
35
41
|
DialogButtonType[DialogButtonType["CANCEL"] = -1] = "CANCEL";
|
|
36
42
|
DialogButtonType[DialogButtonType["NEGATIVE"] = 0] = "NEGATIVE";
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
})(DialogButtonType || (exports.DialogButtonType = DialogButtonType = {}));
|
|
44
|
+
let ScreenSize;
|
|
45
|
+
exports.ScreenSize = ScreenSize;
|
|
46
|
+
(function (ScreenSize) {
|
|
40
47
|
ScreenSize[ScreenSize["XS"] = 0] = "XS";
|
|
41
48
|
ScreenSize[ScreenSize["SM"] = 1] = "SM";
|
|
42
49
|
ScreenSize[ScreenSize["MD"] = 2] = "MD";
|
|
43
50
|
ScreenSize[ScreenSize["LG"] = 3] = "LG";
|
|
44
51
|
ScreenSize[ScreenSize["XL"] = 4] = "XL";
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/
|
|
50
|
-
/**
|
|
51
|
-
* @ignore
|
|
52
|
-
*/
|
|
53
|
-
let AccessMode = exports.AccessMode = /*#__PURE__*/function (AccessMode) {
|
|
52
|
+
})(ScreenSize || (exports.ScreenSize = ScreenSize = {}));
|
|
53
|
+
let AccessMode;
|
|
54
|
+
exports.AccessMode = AccessMode;
|
|
55
|
+
(function (AccessMode) {
|
|
54
56
|
AccessMode[AccessMode["public"] = 0] = "public";
|
|
55
57
|
AccessMode[AccessMode["protected"] = 1] = "protected";
|
|
56
58
|
AccessMode[AccessMode["private"] = 2] = "private";
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
})(AccessMode || (exports.AccessMode = AccessMode = {}));
|
|
60
|
+
let ScanQrCodeCodeType;
|
|
61
|
+
exports.ScanQrCodeCodeType = ScanQrCodeCodeType;
|
|
62
|
+
(function (ScanQrCodeCodeType) {
|
|
60
63
|
ScanQrCodeCodeType[ScanQrCodeCodeType["QR"] = 0] = "QR";
|
|
61
64
|
ScanQrCodeCodeType[ScanQrCodeCodeType["BARCODE"] = 0] = "BARCODE";
|
|
62
65
|
ScanQrCodeCodeType[ScanQrCodeCodeType["ALL"] = 2] = "ALL";
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
})(ScanQrCodeCodeType || (exports.ScanQrCodeCodeType = ScanQrCodeCodeType = {}));
|
|
67
|
+
let ScanQrCodeCameraTypes;
|
|
68
|
+
exports.ScanQrCodeCameraTypes = ScanQrCodeCameraTypes;
|
|
69
|
+
(function (ScanQrCodeCameraTypes) {
|
|
66
70
|
ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["AUTO"] = 0] = "AUTO";
|
|
67
71
|
ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["BACK"] = 1] = "BACK";
|
|
68
72
|
ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["FRONT"] = 2] = "FRONT";
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
})(ScanQrCodeCameraTypes || (exports.ScanQrCodeCameraTypes = ScanQrCodeCameraTypes = {}));
|
|
74
|
+
var IOSFeedbackVibration;
|
|
75
|
+
(function (IOSFeedbackVibration) {
|
|
72
76
|
IOSFeedbackVibration[IOSFeedbackVibration["Unknown"] = 0] = "Unknown";
|
|
73
77
|
IOSFeedbackVibration[IOSFeedbackVibration["SelectionChanged"] = 1] = "SelectionChanged";
|
|
74
78
|
IOSFeedbackVibration[IOSFeedbackVibration["NotificationError"] = 2] = "NotificationError";
|
|
@@ -79,25 +83,25 @@ var IOSFeedbackVibration = /*#__PURE__*/function (IOSFeedbackVibration) {
|
|
|
79
83
|
IOSFeedbackVibration[IOSFeedbackVibration["Heavy"] = 7] = "Heavy";
|
|
80
84
|
IOSFeedbackVibration[IOSFeedbackVibration["Soft"] = 8] = "Soft";
|
|
81
85
|
IOSFeedbackVibration[IOSFeedbackVibration["Rigid"] = 9] = "Rigid";
|
|
82
|
-
|
|
83
|
-
}(IOSFeedbackVibration || {});
|
|
86
|
+
})(IOSFeedbackVibration || (IOSFeedbackVibration = {}));
|
|
84
87
|
// region design settings
|
|
85
|
-
var SnapshotType
|
|
88
|
+
var SnapshotType;
|
|
89
|
+
(function (SnapshotType) {
|
|
86
90
|
SnapshotType["Background"] = "background";
|
|
87
91
|
SnapshotType["Settings"] = "settings";
|
|
88
92
|
SnapshotType["ColorScheme"] = "colorScheme";
|
|
89
93
|
SnapshotType["Cover"] = "cover";
|
|
90
94
|
SnapshotType["Tapp"] = "tapp";
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
})(SnapshotType || (SnapshotType = {}));
|
|
96
|
+
var DesignSettingsUpdateBackgroundType;
|
|
97
|
+
(function (DesignSettingsUpdateBackgroundType) {
|
|
94
98
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["None"] = 0] = "None";
|
|
95
99
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Image"] = 1] = "Image";
|
|
96
100
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Video"] = 2] = "Video";
|
|
97
101
|
DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Color"] = 3] = "Color";
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
})(DesignSettingsUpdateBackgroundType || (DesignSettingsUpdateBackgroundType = {}));
|
|
103
|
+
var DesignSettingsUpdateSeasonTypes;
|
|
104
|
+
(function (DesignSettingsUpdateSeasonTypes) {
|
|
101
105
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["None"] = 0] = "None";
|
|
102
106
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Snowm"] = 1] = "Snowm";
|
|
103
107
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Confetti"] = 2] = "Confetti";
|
|
@@ -107,88 +111,95 @@ var DesignSettingsUpdateSeasonTypes = /*#__PURE__*/function (DesignSettingsUpdat
|
|
|
107
111
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Eastern"] = 6] = "Eastern";
|
|
108
112
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Clover"] = 7] = "Clover";
|
|
109
113
|
DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Coins"] = 8] = "Coins";
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
})(DesignSettingsUpdateSeasonTypes || (DesignSettingsUpdateSeasonTypes = {}));
|
|
115
|
+
var DesignSettingsUpdateGalleryAnimationTypes;
|
|
116
|
+
(function (DesignSettingsUpdateGalleryAnimationTypes) {
|
|
113
117
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Swipe"] = 0] = "Swipe";
|
|
114
118
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Fade"] = 1] = "Fade";
|
|
115
119
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Parallax"] = 2] = "Parallax";
|
|
116
120
|
DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["KenBurns"] = 3] = "KenBurns";
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
})(DesignSettingsUpdateGalleryAnimationTypes || (DesignSettingsUpdateGalleryAnimationTypes = {}));
|
|
122
|
+
var DesignSettingsUpdateCoverTypes;
|
|
123
|
+
(function (DesignSettingsUpdateCoverTypes) {
|
|
120
124
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Image"] = 0] = "Image";
|
|
121
125
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Video"] = 1] = "Video";
|
|
122
126
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Slideshow"] = 2] = "Slideshow";
|
|
123
127
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Frame"] = 3] = "Frame";
|
|
124
128
|
DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["None"] = 4] = "None";
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
})(DesignSettingsUpdateCoverTypes || (DesignSettingsUpdateCoverTypes = {}));
|
|
130
|
+
var DesignSettingsUpdateColorSchemeMode;
|
|
131
|
+
(function (DesignSettingsUpdateColorSchemeMode) {
|
|
128
132
|
DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Normal"] = 0] = "Normal";
|
|
129
133
|
DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Dark"] = 1] = "Dark";
|
|
130
134
|
DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Bright"] = 2] = "Bright";
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
})(DesignSettingsUpdateColorSchemeMode || (DesignSettingsUpdateColorSchemeMode = {}));
|
|
136
|
+
var DesignSettingsUpdateTappViewModes;
|
|
137
|
+
(function (DesignSettingsUpdateTappViewModes) {
|
|
134
138
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Normal"] = 0] = "Normal";
|
|
135
139
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Exclusive"] = 1] = "Exclusive";
|
|
136
140
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Wide"] = 2] = "Wide";
|
|
137
141
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Fullscreen"] = 3] = "Fullscreen";
|
|
138
142
|
DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["FullscreenWithBackground"] = 4] = "FullscreenWithBackground";
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
})(DesignSettingsUpdateTappViewModes || (DesignSettingsUpdateTappViewModes = {}));
|
|
144
|
+
var LoginState;
|
|
145
|
+
(function (LoginState) {
|
|
142
146
|
LoginState[LoginState["FACEBOOK"] = 0] = "FACEBOOK";
|
|
143
147
|
LoginState[LoginState["T_WEB"] = 1] = "T_WEB";
|
|
144
148
|
LoginState[LoginState["LoginFailed"] = 2] = "LoginFailed";
|
|
145
149
|
LoginState[LoginState["AlreadyLoggedIn"] = 3] = "AlreadyLoggedIn";
|
|
146
150
|
LoginState[LoginState["SUCCESS"] = 4] = "SUCCESS";
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
151
|
+
})(LoginState || (LoginState = {}));
|
|
152
|
+
let FloatingButtonPosition;
|
|
153
|
+
exports.FloatingButtonPosition = FloatingButtonPosition;
|
|
154
|
+
(function (FloatingButtonPosition) {
|
|
150
155
|
FloatingButtonPosition[FloatingButtonPosition["Right"] = 0] = "Right";
|
|
151
156
|
FloatingButtonPosition[FloatingButtonPosition["Center"] = 1] = "Center";
|
|
152
157
|
FloatingButtonPosition[FloatingButtonPosition["Left"] = 2] = "Left";
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
})(FloatingButtonPosition || (exports.FloatingButtonPosition = FloatingButtonPosition = {}));
|
|
159
|
+
let SharingApp;
|
|
160
|
+
exports.SharingApp = SharingApp;
|
|
161
|
+
(function (SharingApp) {
|
|
156
162
|
SharingApp[SharingApp["Mail"] = 0] = "Mail";
|
|
157
163
|
SharingApp[SharingApp["WhatsApp"] = 1] = "WhatsApp";
|
|
158
164
|
SharingApp[SharingApp["Facebook"] = 2] = "Facebook";
|
|
159
165
|
SharingApp[SharingApp["FacebookMessenger"] = 3] = "FacebookMessenger";
|
|
160
166
|
SharingApp[SharingApp["GooglePlus"] = 4] = "GooglePlus";
|
|
161
167
|
SharingApp[SharingApp["Twitter"] = 5] = "Twitter";
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
168
|
+
})(SharingApp || (exports.SharingApp = SharingApp = {}));
|
|
169
|
+
let TappEvent;
|
|
170
|
+
exports.TappEvent = TappEvent;
|
|
171
|
+
(function (TappEvent) {
|
|
165
172
|
TappEvent[TappEvent["OnShow"] = 0] = "OnShow";
|
|
166
173
|
TappEvent[TappEvent["OnHide"] = 1] = "OnHide";
|
|
167
174
|
TappEvent[TappEvent["OnRefresh"] = 2] = "OnRefresh";
|
|
168
175
|
TappEvent[TappEvent["OnOpenCcScanner"] = 3] = "OnOpenCcScanner";
|
|
169
176
|
TappEvent[TappEvent["OnCloseCcScanner"] = 4] = "OnCloseCcScanner";
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
177
|
+
})(TappEvent || (exports.TappEvent = TappEvent = {}));
|
|
178
|
+
let IconType;
|
|
179
|
+
exports.IconType = IconType;
|
|
180
|
+
(function (IconType) {
|
|
173
181
|
IconType[IconType["Font"] = 0] = "Font";
|
|
174
182
|
IconType[IconType["Base64"] = 1] = "Base64";
|
|
175
183
|
IconType[IconType["Url"] = 2] = "Url";
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
184
|
+
})(IconType || (exports.IconType = IconType = {}));
|
|
185
|
+
let Gender;
|
|
186
|
+
exports.Gender = Gender;
|
|
187
|
+
(function (Gender) {
|
|
179
188
|
Gender[Gender["Unknown"] = 0] = "Unknown";
|
|
180
189
|
Gender[Gender["male"] = 1] = "male";
|
|
181
190
|
Gender[Gender["female"] = 2] = "female";
|
|
182
191
|
Gender[Gender["diverse"] = 9] = "diverse";
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
192
|
+
})(Gender || (exports.Gender = Gender = {}));
|
|
193
|
+
let ColorMode;
|
|
194
|
+
exports.ColorMode = ColorMode;
|
|
195
|
+
(function (ColorMode) {
|
|
186
196
|
ColorMode[ColorMode["Classic"] = 0] = "Classic";
|
|
187
197
|
ColorMode[ColorMode["Dark"] = 1] = "Dark";
|
|
188
198
|
ColorMode[ColorMode["Light"] = 2] = "Light";
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
199
|
+
})(ColorMode || (exports.ColorMode = ColorMode = {}));
|
|
200
|
+
let Language;
|
|
201
|
+
exports.Language = Language;
|
|
202
|
+
(function (Language) {
|
|
192
203
|
Language["Unknown"] = "unknown";
|
|
193
204
|
Language["German"] = "de";
|
|
194
205
|
Language["English"] = "en";
|
|
@@ -200,27 +211,30 @@ let Language = exports.Language = /*#__PURE__*/function (Language) {
|
|
|
200
211
|
Language["Turkish"] = "tr";
|
|
201
212
|
Language["Polish"] = "pl";
|
|
202
213
|
Language["Ukrainian"] = "uk";
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
214
|
+
})(Language || (exports.Language = Language = {}));
|
|
215
|
+
let RuntimeEnviroment;
|
|
216
|
+
exports.RuntimeEnviroment = RuntimeEnviroment;
|
|
217
|
+
(function (RuntimeEnviroment) {
|
|
206
218
|
RuntimeEnviroment[RuntimeEnviroment["Unknown"] = 0] = "Unknown";
|
|
207
219
|
RuntimeEnviroment[RuntimeEnviroment["ChaynsDe"] = 1] = "ChaynsDe";
|
|
208
220
|
RuntimeEnviroment[RuntimeEnviroment["ChaynsWeb"] = 2] = "ChaynsWeb";
|
|
209
221
|
RuntimeEnviroment[RuntimeEnviroment["ChaynsRuntime"] = 3] = "ChaynsRuntime";
|
|
210
222
|
RuntimeEnviroment[RuntimeEnviroment["IntercomPlugin"] = 4] = "IntercomPlugin";
|
|
211
223
|
RuntimeEnviroment[RuntimeEnviroment["PagemakerPlugin"] = 5] = "PagemakerPlugin";
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
224
|
+
})(RuntimeEnviroment || (exports.RuntimeEnviroment = RuntimeEnviroment = {}));
|
|
225
|
+
let DeviceOs;
|
|
226
|
+
exports.DeviceOs = DeviceOs;
|
|
227
|
+
(function (DeviceOs) {
|
|
215
228
|
DeviceOs["Unknown"] = "unknown";
|
|
216
229
|
DeviceOs["Android"] = "android";
|
|
217
230
|
DeviceOs["IOS"] = "ios";
|
|
218
231
|
DeviceOs["Windows"] = "windows";
|
|
219
232
|
DeviceOs["MacOs"] = "macos";
|
|
220
233
|
DeviceOs["Linux"] = "linux";
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
234
|
+
})(DeviceOs || (exports.DeviceOs = DeviceOs = {}));
|
|
235
|
+
let AppName;
|
|
236
|
+
exports.AppName = AppName;
|
|
237
|
+
(function (AppName) {
|
|
224
238
|
AppName[AppName["Unknown"] = 0] = "Unknown";
|
|
225
239
|
AppName[AppName["David"] = 1] = "David";
|
|
226
240
|
AppName[AppName["Chayns"] = 2] = "Chayns";
|
|
@@ -229,24 +243,27 @@ let AppName = exports.AppName = /*#__PURE__*/function (AppName) {
|
|
|
229
243
|
AppName[AppName["ChaynsLauncher"] = 5] = "ChaynsLauncher";
|
|
230
244
|
AppName[AppName["TobitChat"] = 6] = "TobitChat";
|
|
231
245
|
AppName[AppName["Sidekick"] = 7] = "Sidekick";
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
246
|
+
})(AppName || (exports.AppName = AppName = {}));
|
|
247
|
+
let BrowserName;
|
|
248
|
+
exports.BrowserName = BrowserName;
|
|
249
|
+
(function (BrowserName) {
|
|
235
250
|
BrowserName["Unknown"] = "unknown";
|
|
236
251
|
BrowserName["Chrome"] = "chrome";
|
|
237
252
|
BrowserName["Safari"] = "safari";
|
|
238
253
|
BrowserName["Firefox"] = "firefox";
|
|
239
254
|
BrowserName["Edge"] = "edge";
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
255
|
+
})(BrowserName || (exports.BrowserName = BrowserName = {}));
|
|
256
|
+
let Environment;
|
|
257
|
+
exports.Environment = Environment;
|
|
258
|
+
(function (Environment) {
|
|
243
259
|
Environment[Environment["Development"] = 0] = "Development";
|
|
244
260
|
Environment[Environment["Qa"] = 1] = "Qa";
|
|
245
261
|
Environment[Environment["Staging"] = 2] = "Staging";
|
|
246
262
|
Environment[Environment["Production"] = 3] = "Production";
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
263
|
+
})(Environment || (exports.Environment = Environment = {}));
|
|
264
|
+
let Font;
|
|
265
|
+
exports.Font = Font;
|
|
266
|
+
(function (Font) {
|
|
250
267
|
Font[Font["Unknown"] = 0] = "Unknown";
|
|
251
268
|
Font[Font["Roboto"] = 1] = "Roboto";
|
|
252
269
|
Font[Font["OpenSans"] = 2] = "OpenSans";
|
|
@@ -275,14 +292,15 @@ let Font = exports.Font = /*#__PURE__*/function (Font) {
|
|
|
275
292
|
Font[Font["RobotoBold"] = 25] = "RobotoBold";
|
|
276
293
|
Font[Font["RobotoRegular"] = 26] = "RobotoRegular";
|
|
277
294
|
Font[Font["Inter"] = 27] = "Inter";
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
295
|
+
})(Font || (exports.Font = Font = {}));
|
|
296
|
+
var selectType;
|
|
297
|
+
(function (selectType) {
|
|
281
298
|
selectType[selectType["DEFAULT"] = 0] = "DEFAULT";
|
|
282
299
|
selectType[selectType["ICON"] = 1] = "ICON";
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
300
|
+
})(selectType || (selectType = {}));
|
|
301
|
+
let DialogType;
|
|
302
|
+
exports.DialogType = DialogType;
|
|
303
|
+
(function (DialogType) {
|
|
286
304
|
DialogType["ALERT"] = "alert";
|
|
287
305
|
DialogType["CONFIRM"] = "confirm";
|
|
288
306
|
DialogType["DATE"] = "date";
|
|
@@ -292,20 +310,22 @@ let DialogType = exports.DialogType = /*#__PURE__*/function (DialogType) {
|
|
|
292
310
|
DialogType["INPUT"] = "input";
|
|
293
311
|
DialogType["SELECT"] = "select";
|
|
294
312
|
DialogType["TOAST"] = "toast";
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
313
|
+
})(DialogType || (exports.DialogType = DialogType = {}));
|
|
314
|
+
let MediaType;
|
|
315
|
+
exports.MediaType = MediaType;
|
|
316
|
+
(function (MediaType) {
|
|
298
317
|
MediaType["IMAGE"] = "image";
|
|
299
318
|
MediaType["VIDEO"] = "video";
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
319
|
+
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
320
|
+
let DialogAnimation;
|
|
321
|
+
exports.DialogAnimation = DialogAnimation;
|
|
322
|
+
(function (DialogAnimation) {
|
|
303
323
|
DialogAnimation["CONFETTI"] = "confetti";
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
324
|
+
})(DialogAnimation || (exports.DialogAnimation = DialogAnimation = {}));
|
|
325
|
+
let DialogIconType;
|
|
326
|
+
exports.DialogIconType = DialogIconType;
|
|
327
|
+
(function (DialogIconType) {
|
|
307
328
|
DialogIconType["SuccessIcon"] = "%%DialogSuccessIcon%%";
|
|
308
329
|
DialogIconType["WarningIcon"] = "%%DialogWarningIcon%%";
|
|
309
330
|
DialogIconType["ErrorIcon"] = "%%DialogErrorIcon%%";
|
|
310
|
-
|
|
311
|
-
}({});
|
|
331
|
+
})(DialogIconType || (exports.DialogIconType = DialogIconType = {}));
|
package/dist/cjs/util/appCall.js
CHANGED
|
@@ -7,9 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
// @ts-nocheck
|
|
8
8
|
|
|
9
9
|
const invokeAppCall = call => {
|
|
10
|
-
var _window$webkit, _window$chaynsApp, _window$chaynsElectro;
|
|
10
|
+
var _window$webkit, _window$webkit$messag, _window$chaynsApp, _window$chaynsElectro;
|
|
11
11
|
call = JSON.stringify(call);
|
|
12
|
-
if ((_window$webkit = window.webkit) !== null && _window$webkit !== void 0 && (_window$webkit = _window$webkit.messageHandlers) !== null && _window$webkit !== void 0 && _window$webkit.jsonCall) {
|
|
12
|
+
if ((_window$webkit = window.webkit) !== null && _window$webkit !== void 0 && (_window$webkit$messag = _window$webkit.messageHandlers) !== null && _window$webkit$messag !== void 0 && _window$webkit$messag.jsonCall) {
|
|
13
13
|
window.webkit.messageHandlers.jsonCall.postMessage(call);
|
|
14
14
|
} else if ((_window$chaynsApp = window.chaynsApp) !== null && _window$chaynsApp !== void 0 && _window$chaynsApp.jsonCall) {
|
|
15
15
|
window.chaynsApp.jsonCall(call);
|
|
@@ -19,4 +19,5 @@ const invokeAppCall = call => {
|
|
|
19
19
|
throw new Error('jsoncall interface not found');
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
var _default =
|
|
22
|
+
var _default = invokeAppCall;
|
|
23
|
+
exports.default = _default;
|
|
@@ -15,9 +15,9 @@ const getDeviceInfo = (userAgent, acceptHeader) => {
|
|
|
15
15
|
appName = _IChaynsReact.AppName.TobitChat;
|
|
16
16
|
} else if (/\ssidekick\/\d+/i.test(userAgent)) {
|
|
17
17
|
appName = _IChaynsReact.AppName.Sidekick;
|
|
18
|
-
} else if ((match === null || match === void 0
|
|
18
|
+
} else if ((match === null || match === void 0 ? void 0 : (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups.siteId) === '60021-08989') {
|
|
19
19
|
appName = _IChaynsReact.AppName.Chayns;
|
|
20
|
-
} else if ((match === null || match === void 0
|
|
20
|
+
} else if ((match === null || match === void 0 ? void 0 : (_match$groups2 = match.groups) === null || _match$groups2 === void 0 ? void 0 : _match$groups2.siteId) === '77892-10814') {
|
|
21
21
|
appName = _IChaynsReact.AppName.David;
|
|
22
22
|
} else if (match) {
|
|
23
23
|
appName = _IChaynsReact.AppName.Location;
|
|
@@ -28,7 +28,7 @@ const getDeviceInfo = (userAgent, acceptHeader) => {
|
|
|
28
28
|
result.browser = {
|
|
29
29
|
name: parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.name,
|
|
30
30
|
version: parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.version,
|
|
31
|
-
majorVersion: Number.parseInt((_parsedUA$version$spl = parsedUA === null || parsedUA === void 0
|
|
31
|
+
majorVersion: Number.parseInt((_parsedUA$version$spl = parsedUA === null || parsedUA === void 0 ? void 0 : (_parsedUA$version = parsedUA.version) === null || _parsedUA$version === void 0 ? void 0 : _parsedUA$version.split('.')[0]) !== null && _parsedUA$version$spl !== void 0 ? _parsedUA$version$spl : '0', 10) || 0,
|
|
32
32
|
isWebPSupported: acceptHeader.includes('image/webp')
|
|
33
33
|
};
|
|
34
34
|
result.app = {
|
|
@@ -70,4 +70,5 @@ const getScreenSize = width => {
|
|
|
70
70
|
return value;
|
|
71
71
|
};
|
|
72
72
|
exports.getScreenSize = getScreenSize;
|
|
73
|
-
var _default =
|
|
73
|
+
var _default = getDeviceInfo;
|
|
74
|
+
exports.default = _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var Comlink = _interopRequireWildcard(require("comlink"));
|
|
4
|
-
function _getRequireWildcardCache(
|
|
5
|
-
function _interopRequireWildcard(
|
|
4
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
5
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
8
|
Comlink.transferHandlers.set("FUNCTION", {
|
|
@@ -12,8 +12,8 @@ var _deviceHelper = _interopRequireWildcard(require("../util/deviceHelper"));
|
|
|
12
12
|
var _getUserInfo = _interopRequireDefault(require("../calls/getUserInfo"));
|
|
13
13
|
var _sendMessage = require("../calls/sendMessage");
|
|
14
14
|
var _apiListenerHelper = require("../helper/apiListenerHelper");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
// @ts-nocheck
|
|
@@ -292,7 +292,7 @@ class AppWrapper {
|
|
|
292
292
|
window[callbackName] = ({
|
|
293
293
|
retVal
|
|
294
294
|
}) => {
|
|
295
|
-
callback === null || callback === void 0
|
|
295
|
+
callback === null || callback === void 0 ? void 0 : callback(retVal);
|
|
296
296
|
delete window[callbackName];
|
|
297
297
|
};
|
|
298
298
|
const callObj = {
|
|
@@ -12,8 +12,8 @@ var _getUserInfo = _interopRequireDefault(require("../calls/getUserInfo"));
|
|
|
12
12
|
var _sendMessage = require("../calls/sendMessage");
|
|
13
13
|
var _heightHelper = require("../util/heightHelper");
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
18
18
|
|
|
19
19
|
class FrameWrapper {
|
|
@@ -3,32 +3,32 @@ import { isDate, isNumber, isObject } from './utils/is';
|
|
|
3
3
|
import { open } from './open';
|
|
4
4
|
import { getDevice } from "../index";
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* The config object for date dialog
|
|
8
|
-
* @typedef {Object} dateConfig
|
|
9
|
-
* @property {Date} preSelect - The date object which should be preselected.
|
|
10
|
-
* @property {Date} minDate - The min date which you could select.
|
|
11
|
-
* @property {Date} maxDate - The max date which you could select.
|
|
12
|
-
* @property {dateDialogType} dateType - The type of dialog you want to display.
|
|
13
|
-
* @property {number} minuteIntervall - The interval for special minutes, possible are 2, 3, 4, 5, 6, 12, 15, 20, 30. Default is 1.
|
|
14
|
-
* @property {string} message - The message that is displayed above the date dialog, only in apps supported
|
|
15
|
-
* @property {string} title - The title that is displayed above the message, only in apps supported
|
|
6
|
+
/**
|
|
7
|
+
* The config object for date dialog
|
|
8
|
+
* @typedef {Object} dateConfig
|
|
9
|
+
* @property {Date} preSelect - The date object which should be preselected.
|
|
10
|
+
* @property {Date} minDate - The min date which you could select.
|
|
11
|
+
* @property {Date} maxDate - The max date which you could select.
|
|
12
|
+
* @property {dateDialogType} dateType - The type of dialog you want to display.
|
|
13
|
+
* @property {number} minuteIntervall - The interval for special minutes, possible are 2, 3, 4, 5, 6, 12, 15, 20, 30. Default is 1.
|
|
14
|
+
* @property {string} message - The message that is displayed above the date dialog, only in apps supported
|
|
15
|
+
* @property {string} title - The title that is displayed above the message, only in apps supported
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* This call will open a date select dialog.
|
|
20
|
-
* <div>Call: 30</div>
|
|
21
|
-
* @param {dateConfig} config - Define the configuration of this call
|
|
22
|
-
* @return {Promise} contains a timestamp as result
|
|
23
|
-
* @example chayns.dialog.date({
|
|
24
|
-
* 'dateType': chayns.dialog.dateType.DATE_TIME,
|
|
25
|
-
* 'preSelect': new Date(2018, 6, 14, 0, 0, 0),
|
|
26
|
-
* 'minDate': new Date(2018, 6, 1, 15, 0, 0),
|
|
27
|
-
* 'maxDate': new Date(2019, 6, 1, 0, 23, 0),
|
|
28
|
-
* 'minuteInterval': 15
|
|
29
|
-
* ).then(function (data) {
|
|
30
|
-
* console.log(data);
|
|
31
|
-
* });
|
|
18
|
+
/**
|
|
19
|
+
* This call will open a date select dialog.
|
|
20
|
+
* <div>Call: 30</div>
|
|
21
|
+
* @param {dateConfig} config - Define the configuration of this call
|
|
22
|
+
* @return {Promise} contains a timestamp as result
|
|
23
|
+
* @example chayns.dialog.date({
|
|
24
|
+
* 'dateType': chayns.dialog.dateType.DATE_TIME,
|
|
25
|
+
* 'preSelect': new Date(2018, 6, 14, 0, 0, 0),
|
|
26
|
+
* 'minDate': new Date(2018, 6, 1, 15, 0, 0),
|
|
27
|
+
* 'maxDate': new Date(2019, 6, 1, 0, 23, 0),
|
|
28
|
+
* 'minuteInterval': 15
|
|
29
|
+
* ).then(function (data) {
|
|
30
|
+
* console.log(data);
|
|
31
|
+
* });
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
export function date() {
|
|
@@ -165,18 +165,18 @@ export function advancedDate() {
|
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
/**
|
|
169
|
-
* @typedef {number} dateDialogType
|
|
168
|
+
/**
|
|
169
|
+
* @typedef {number} dateDialogType
|
|
170
170
|
*/
|
|
171
171
|
|
|
172
|
-
/**
|
|
173
|
-
* Enum for date dialog
|
|
174
|
-
* <div>DATE will open a dialog where you can select a special day</div>
|
|
175
|
-
* <div>TIME will open a dialog where you can only select a special time</div>
|
|
176
|
-
* <div>DATE_TIME will open a dialog where you can select a special time on a special day</div>
|
|
177
|
-
* @readonly
|
|
178
|
-
* @enum {dateDialogType}
|
|
179
|
-
* @type {{DATE: number, TIME: number, DATE_TIME: number}}
|
|
172
|
+
/**
|
|
173
|
+
* Enum for date dialog
|
|
174
|
+
* <div>DATE will open a dialog where you can select a special day</div>
|
|
175
|
+
* <div>TIME will open a dialog where you can only select a special time</div>
|
|
176
|
+
* <div>DATE_TIME will open a dialog where you can select a special time on a special day</div>
|
|
177
|
+
* @readonly
|
|
178
|
+
* @enum {dateDialogType}
|
|
179
|
+
* @type {{DATE: number, TIME: number, DATE_TIME: number}}
|
|
180
180
|
*/
|
|
181
181
|
export const dateType = {
|
|
182
182
|
'DATE': 1,
|