chayns-api 1.0.35 → 1.0.36

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.
@@ -4,74 +4,80 @@ 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.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.Environment = exports.DialogType = exports.DialogSelectType = exports.DialogInputType = exports.DialogButtonType = exports.DeviceOs = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
7
- let DateType;
8
- exports.DateType = DateType;
9
- (function (DateType) {
7
+ let DateType = /*#__PURE__*/function (DateType) {
10
8
  DateType[DateType["DATE"] = 0] = "DATE";
11
9
  DateType[DateType["TIME"] = 1] = "TIME";
12
10
  DateType[DateType["DATE_TIME"] = 2] = "DATE_TIME";
13
- })(DateType || (exports.DateType = DateType = {}));
14
- let ToastType;
15
- exports.ToastType = ToastType;
16
- (function (ToastType) {
11
+ return DateType;
12
+ }({});
13
+ exports.DateType = DateType;
14
+ let ToastType = /*#__PURE__*/function (ToastType) {
17
15
  ToastType[ToastType["NEUTRAL"] = 1] = "NEUTRAL";
18
16
  ToastType[ToastType["SUCCESS"] = 2] = "SUCCESS";
19
17
  ToastType[ToastType["WARNING"] = 3] = "WARNING";
20
18
  ToastType[ToastType["ERROR"] = 4] = "ERROR";
21
- })(ToastType || (exports.ToastType = ToastType = {}));
22
- let DialogInputType; // TEXTAREA = 'textarea', TODO Add this type when textarea is implemented in new chayns-components in dialog-v2
23
- exports.DialogInputType = DialogInputType;
24
- (function (DialogInputType) {
19
+ return ToastType;
20
+ }({});
21
+ exports.ToastType = ToastType;
22
+ let DialogInputType = /*#__PURE__*/function (DialogInputType) {
25
23
  DialogInputType["NUMBER"] = "number";
26
24
  DialogInputType["PASSWORD"] = "password";
27
25
  DialogInputType["TELEPHONE"] = "tel";
28
26
  DialogInputType["TEXT"] = "text";
29
- })(DialogInputType || (exports.DialogInputType = DialogInputType = {}));
30
- let DialogSelectType;
31
- exports.DialogSelectType = DialogSelectType;
32
- (function (DialogSelectType) {
27
+ DialogInputType["TEXTAREA"] = "textarea";
28
+ return DialogInputType;
29
+ }({});
30
+ exports.DialogInputType = DialogInputType;
31
+ let DialogSelectType = /*#__PURE__*/function (DialogSelectType) {
33
32
  DialogSelectType[DialogSelectType["DEFAULT"] = 0] = "DEFAULT";
34
33
  DialogSelectType[DialogSelectType["ICON"] = 1] = "ICON";
35
- })(DialogSelectType || (exports.DialogSelectType = DialogSelectType = {}));
36
- let DialogButtonType;
37
- exports.DialogButtonType = DialogButtonType;
38
- (function (DialogButtonType) {
34
+ return DialogSelectType;
35
+ }({});
36
+ exports.DialogSelectType = DialogSelectType;
37
+ let DialogButtonType = /*#__PURE__*/function (DialogButtonType) {
39
38
  DialogButtonType[DialogButtonType["OK"] = 1] = "OK";
40
39
  DialogButtonType[DialogButtonType["CANCEL"] = -1] = "CANCEL";
41
40
  DialogButtonType[DialogButtonType["NEGATIVE"] = 0] = "NEGATIVE";
42
- })(DialogButtonType || (exports.DialogButtonType = DialogButtonType = {}));
43
- let ScreenSize;
44
- exports.ScreenSize = ScreenSize;
45
- (function (ScreenSize) {
41
+ return DialogButtonType;
42
+ }({});
43
+ exports.DialogButtonType = DialogButtonType;
44
+ let ScreenSize = /*#__PURE__*/function (ScreenSize) {
46
45
  ScreenSize[ScreenSize["XS"] = 0] = "XS";
47
46
  ScreenSize[ScreenSize["SM"] = 1] = "SM";
48
47
  ScreenSize[ScreenSize["MD"] = 2] = "MD";
49
48
  ScreenSize[ScreenSize["LG"] = 3] = "LG";
50
49
  ScreenSize[ScreenSize["XL"] = 4] = "XL";
51
- })(ScreenSize || (exports.ScreenSize = ScreenSize = {}));
52
- let AccessMode;
53
- exports.AccessMode = AccessMode;
54
- (function (AccessMode) {
50
+ return ScreenSize;
51
+ }({});
52
+ /**
53
+ * @ignore
54
+ */
55
+ /**
56
+ * @ignore
57
+ */
58
+ exports.ScreenSize = ScreenSize;
59
+ let AccessMode = /*#__PURE__*/function (AccessMode) {
55
60
  AccessMode[AccessMode["public"] = 0] = "public";
56
61
  AccessMode[AccessMode["protected"] = 1] = "protected";
57
62
  AccessMode[AccessMode["private"] = 2] = "private";
58
- })(AccessMode || (exports.AccessMode = AccessMode = {}));
59
- let ScanQrCodeCodeType;
60
- exports.ScanQrCodeCodeType = ScanQrCodeCodeType;
61
- (function (ScanQrCodeCodeType) {
63
+ return AccessMode;
64
+ }({});
65
+ exports.AccessMode = AccessMode;
66
+ let ScanQrCodeCodeType = /*#__PURE__*/function (ScanQrCodeCodeType) {
62
67
  ScanQrCodeCodeType[ScanQrCodeCodeType["QR"] = 0] = "QR";
63
68
  ScanQrCodeCodeType[ScanQrCodeCodeType["BARCODE"] = 0] = "BARCODE";
64
69
  ScanQrCodeCodeType[ScanQrCodeCodeType["ALL"] = 2] = "ALL";
65
- })(ScanQrCodeCodeType || (exports.ScanQrCodeCodeType = ScanQrCodeCodeType = {}));
66
- let ScanQrCodeCameraTypes;
67
- exports.ScanQrCodeCameraTypes = ScanQrCodeCameraTypes;
68
- (function (ScanQrCodeCameraTypes) {
70
+ return ScanQrCodeCodeType;
71
+ }({});
72
+ exports.ScanQrCodeCodeType = ScanQrCodeCodeType;
73
+ let ScanQrCodeCameraTypes = /*#__PURE__*/function (ScanQrCodeCameraTypes) {
69
74
  ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["AUTO"] = 0] = "AUTO";
70
75
  ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["BACK"] = 1] = "BACK";
71
76
  ScanQrCodeCameraTypes[ScanQrCodeCameraTypes["FRONT"] = 2] = "FRONT";
72
- })(ScanQrCodeCameraTypes || (exports.ScanQrCodeCameraTypes = ScanQrCodeCameraTypes = {}));
73
- var IOSFeedbackVibration;
74
- (function (IOSFeedbackVibration) {
77
+ return ScanQrCodeCameraTypes;
78
+ }({});
79
+ exports.ScanQrCodeCameraTypes = ScanQrCodeCameraTypes;
80
+ var IOSFeedbackVibration = /*#__PURE__*/function (IOSFeedbackVibration) {
75
81
  IOSFeedbackVibration[IOSFeedbackVibration["Unknown"] = 0] = "Unknown";
76
82
  IOSFeedbackVibration[IOSFeedbackVibration["SelectionChanged"] = 1] = "SelectionChanged";
77
83
  IOSFeedbackVibration[IOSFeedbackVibration["NotificationError"] = 2] = "NotificationError";
@@ -82,25 +88,25 @@ var IOSFeedbackVibration;
82
88
  IOSFeedbackVibration[IOSFeedbackVibration["Heavy"] = 7] = "Heavy";
83
89
  IOSFeedbackVibration[IOSFeedbackVibration["Soft"] = 8] = "Soft";
84
90
  IOSFeedbackVibration[IOSFeedbackVibration["Rigid"] = 9] = "Rigid";
85
- })(IOSFeedbackVibration || (IOSFeedbackVibration = {}));
91
+ return IOSFeedbackVibration;
92
+ }(IOSFeedbackVibration || {});
86
93
  // region design settings
87
- var SnapshotType;
88
- (function (SnapshotType) {
94
+ var SnapshotType = /*#__PURE__*/function (SnapshotType) {
89
95
  SnapshotType["Background"] = "background";
90
96
  SnapshotType["Settings"] = "settings";
91
97
  SnapshotType["ColorScheme"] = "colorScheme";
92
98
  SnapshotType["Cover"] = "cover";
93
99
  SnapshotType["Tapp"] = "tapp";
94
- })(SnapshotType || (SnapshotType = {}));
95
- var DesignSettingsUpdateBackgroundType;
96
- (function (DesignSettingsUpdateBackgroundType) {
100
+ return SnapshotType;
101
+ }(SnapshotType || {});
102
+ var DesignSettingsUpdateBackgroundType = /*#__PURE__*/function (DesignSettingsUpdateBackgroundType) {
97
103
  DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["None"] = 0] = "None";
98
104
  DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Image"] = 1] = "Image";
99
105
  DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Video"] = 2] = "Video";
100
106
  DesignSettingsUpdateBackgroundType[DesignSettingsUpdateBackgroundType["Color"] = 3] = "Color";
101
- })(DesignSettingsUpdateBackgroundType || (DesignSettingsUpdateBackgroundType = {}));
102
- var DesignSettingsUpdateSeasonTypes;
103
- (function (DesignSettingsUpdateSeasonTypes) {
107
+ return DesignSettingsUpdateBackgroundType;
108
+ }(DesignSettingsUpdateBackgroundType || {});
109
+ var DesignSettingsUpdateSeasonTypes = /*#__PURE__*/function (DesignSettingsUpdateSeasonTypes) {
104
110
  DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["None"] = 0] = "None";
105
111
  DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Snowm"] = 1] = "Snowm";
106
112
  DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Confetti"] = 2] = "Confetti";
@@ -110,95 +116,94 @@ var DesignSettingsUpdateSeasonTypes;
110
116
  DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Eastern"] = 6] = "Eastern";
111
117
  DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Clover"] = 7] = "Clover";
112
118
  DesignSettingsUpdateSeasonTypes[DesignSettingsUpdateSeasonTypes["Coins"] = 8] = "Coins";
113
- })(DesignSettingsUpdateSeasonTypes || (DesignSettingsUpdateSeasonTypes = {}));
114
- var DesignSettingsUpdateGalleryAnimationTypes;
115
- (function (DesignSettingsUpdateGalleryAnimationTypes) {
119
+ return DesignSettingsUpdateSeasonTypes;
120
+ }(DesignSettingsUpdateSeasonTypes || {});
121
+ var DesignSettingsUpdateGalleryAnimationTypes = /*#__PURE__*/function (DesignSettingsUpdateGalleryAnimationTypes) {
116
122
  DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Swipe"] = 0] = "Swipe";
117
123
  DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Fade"] = 1] = "Fade";
118
124
  DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["Parallax"] = 2] = "Parallax";
119
125
  DesignSettingsUpdateGalleryAnimationTypes[DesignSettingsUpdateGalleryAnimationTypes["KenBurns"] = 3] = "KenBurns";
120
- })(DesignSettingsUpdateGalleryAnimationTypes || (DesignSettingsUpdateGalleryAnimationTypes = {}));
121
- var DesignSettingsUpdateCoverTypes;
122
- (function (DesignSettingsUpdateCoverTypes) {
126
+ return DesignSettingsUpdateGalleryAnimationTypes;
127
+ }(DesignSettingsUpdateGalleryAnimationTypes || {});
128
+ var DesignSettingsUpdateCoverTypes = /*#__PURE__*/function (DesignSettingsUpdateCoverTypes) {
123
129
  DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Image"] = 0] = "Image";
124
130
  DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Video"] = 1] = "Video";
125
131
  DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Slideshow"] = 2] = "Slideshow";
126
132
  DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["Frame"] = 3] = "Frame";
127
133
  DesignSettingsUpdateCoverTypes[DesignSettingsUpdateCoverTypes["None"] = 4] = "None";
128
- })(DesignSettingsUpdateCoverTypes || (DesignSettingsUpdateCoverTypes = {}));
129
- var DesignSettingsUpdateColorSchemeMode;
130
- (function (DesignSettingsUpdateColorSchemeMode) {
134
+ return DesignSettingsUpdateCoverTypes;
135
+ }(DesignSettingsUpdateCoverTypes || {});
136
+ var DesignSettingsUpdateColorSchemeMode = /*#__PURE__*/function (DesignSettingsUpdateColorSchemeMode) {
131
137
  DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Normal"] = 0] = "Normal";
132
138
  DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Dark"] = 1] = "Dark";
133
139
  DesignSettingsUpdateColorSchemeMode[DesignSettingsUpdateColorSchemeMode["Bright"] = 2] = "Bright";
134
- })(DesignSettingsUpdateColorSchemeMode || (DesignSettingsUpdateColorSchemeMode = {}));
135
- var DesignSettingsUpdateTappViewModes;
136
- (function (DesignSettingsUpdateTappViewModes) {
140
+ return DesignSettingsUpdateColorSchemeMode;
141
+ }(DesignSettingsUpdateColorSchemeMode || {});
142
+ var DesignSettingsUpdateTappViewModes = /*#__PURE__*/function (DesignSettingsUpdateTappViewModes) {
137
143
  DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Normal"] = 0] = "Normal";
138
144
  DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Exclusive"] = 1] = "Exclusive";
139
145
  DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Wide"] = 2] = "Wide";
140
146
  DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["Fullscreen"] = 3] = "Fullscreen";
141
147
  DesignSettingsUpdateTappViewModes[DesignSettingsUpdateTappViewModes["FullscreenWithBackground"] = 4] = "FullscreenWithBackground";
142
- })(DesignSettingsUpdateTappViewModes || (DesignSettingsUpdateTappViewModes = {}));
143
- var LoginState;
144
- (function (LoginState) {
148
+ return DesignSettingsUpdateTappViewModes;
149
+ }(DesignSettingsUpdateTappViewModes || {}); // endregion
150
+ var LoginState = /*#__PURE__*/function (LoginState) {
145
151
  LoginState[LoginState["FACEBOOK"] = 0] = "FACEBOOK";
146
152
  LoginState[LoginState["T_WEB"] = 1] = "T_WEB";
147
153
  LoginState[LoginState["LoginFailed"] = 2] = "LoginFailed";
148
154
  LoginState[LoginState["AlreadyLoggedIn"] = 3] = "AlreadyLoggedIn";
149
155
  LoginState[LoginState["SUCCESS"] = 4] = "SUCCESS";
150
- })(LoginState || (LoginState = {}));
151
- let FloatingButtonPosition;
152
- exports.FloatingButtonPosition = FloatingButtonPosition;
153
- (function (FloatingButtonPosition) {
156
+ return LoginState;
157
+ }(LoginState || {});
158
+ let FloatingButtonPosition = /*#__PURE__*/function (FloatingButtonPosition) {
154
159
  FloatingButtonPosition[FloatingButtonPosition["Right"] = 0] = "Right";
155
160
  FloatingButtonPosition[FloatingButtonPosition["Center"] = 1] = "Center";
156
161
  FloatingButtonPosition[FloatingButtonPosition["Left"] = 2] = "Left";
157
- })(FloatingButtonPosition || (exports.FloatingButtonPosition = FloatingButtonPosition = {}));
158
- let SharingApp;
159
- exports.SharingApp = SharingApp;
160
- (function (SharingApp) {
162
+ return FloatingButtonPosition;
163
+ }({});
164
+ exports.FloatingButtonPosition = FloatingButtonPosition;
165
+ let SharingApp = /*#__PURE__*/function (SharingApp) {
161
166
  SharingApp[SharingApp["Mail"] = 0] = "Mail";
162
167
  SharingApp[SharingApp["WhatsApp"] = 1] = "WhatsApp";
163
168
  SharingApp[SharingApp["Facebook"] = 2] = "Facebook";
164
169
  SharingApp[SharingApp["FacebookMessenger"] = 3] = "FacebookMessenger";
165
170
  SharingApp[SharingApp["GooglePlus"] = 4] = "GooglePlus";
166
171
  SharingApp[SharingApp["Twitter"] = 5] = "Twitter";
167
- })(SharingApp || (exports.SharingApp = SharingApp = {}));
168
- let TappEvent;
169
- exports.TappEvent = TappEvent;
170
- (function (TappEvent) {
172
+ return SharingApp;
173
+ }({});
174
+ exports.SharingApp = SharingApp;
175
+ let TappEvent = /*#__PURE__*/function (TappEvent) {
171
176
  TappEvent[TappEvent["OnShow"] = 0] = "OnShow";
172
177
  TappEvent[TappEvent["OnHide"] = 1] = "OnHide";
173
178
  TappEvent[TappEvent["OnRefresh"] = 2] = "OnRefresh";
174
179
  TappEvent[TappEvent["OnOpenCcScanner"] = 3] = "OnOpenCcScanner";
175
180
  TappEvent[TappEvent["OnCloseCcScanner"] = 4] = "OnCloseCcScanner";
176
- })(TappEvent || (exports.TappEvent = TappEvent = {}));
177
- let IconType;
178
- exports.IconType = IconType;
179
- (function (IconType) {
181
+ return TappEvent;
182
+ }({});
183
+ exports.TappEvent = TappEvent;
184
+ let IconType = /*#__PURE__*/function (IconType) {
180
185
  IconType[IconType["Font"] = 0] = "Font";
181
186
  IconType[IconType["Base64"] = 1] = "Base64";
182
187
  IconType[IconType["Url"] = 2] = "Url";
183
- })(IconType || (exports.IconType = IconType = {}));
184
- let Gender;
185
- exports.Gender = Gender;
186
- (function (Gender) {
188
+ return IconType;
189
+ }({});
190
+ exports.IconType = IconType;
191
+ let Gender = /*#__PURE__*/function (Gender) {
187
192
  Gender[Gender["Unknown"] = 0] = "Unknown";
188
193
  Gender[Gender["male"] = 1] = "male";
189
194
  Gender[Gender["female"] = 2] = "female";
190
195
  Gender[Gender["diverse"] = 9] = "diverse";
191
- })(Gender || (exports.Gender = Gender = {}));
192
- let ColorMode;
193
- exports.ColorMode = ColorMode;
194
- (function (ColorMode) {
196
+ return Gender;
197
+ }({});
198
+ exports.Gender = Gender;
199
+ let ColorMode = /*#__PURE__*/function (ColorMode) {
195
200
  ColorMode[ColorMode["Classic"] = 0] = "Classic";
196
201
  ColorMode[ColorMode["Dark"] = 1] = "Dark";
197
202
  ColorMode[ColorMode["Light"] = 2] = "Light";
198
- })(ColorMode || (exports.ColorMode = ColorMode = {}));
199
- let Language;
200
- exports.Language = Language;
201
- (function (Language) {
203
+ return ColorMode;
204
+ }({});
205
+ exports.ColorMode = ColorMode;
206
+ let Language = /*#__PURE__*/function (Language) {
202
207
  Language["Unknown"] = "unknown";
203
208
  Language["German"] = "de";
204
209
  Language["English"] = "en";
@@ -210,57 +215,57 @@ exports.Language = Language;
210
215
  Language["Turkish"] = "tr";
211
216
  Language["Polish"] = "pl";
212
217
  Language["Ukrainian"] = "uk";
213
- })(Language || (exports.Language = Language = {}));
214
- let RuntimeEnviroment;
215
- exports.RuntimeEnviroment = RuntimeEnviroment;
216
- (function (RuntimeEnviroment) {
218
+ return Language;
219
+ }({});
220
+ exports.Language = Language;
221
+ let RuntimeEnviroment = /*#__PURE__*/function (RuntimeEnviroment) {
217
222
  RuntimeEnviroment[RuntimeEnviroment["Unknown"] = 0] = "Unknown";
218
223
  RuntimeEnviroment[RuntimeEnviroment["ChaynsDe"] = 1] = "ChaynsDe";
219
224
  RuntimeEnviroment[RuntimeEnviroment["ChaynsWeb"] = 2] = "ChaynsWeb";
220
225
  RuntimeEnviroment[RuntimeEnviroment["ChaynsRuntime"] = 3] = "ChaynsRuntime";
221
226
  RuntimeEnviroment[RuntimeEnviroment["IntercomPlugin"] = 4] = "IntercomPlugin";
222
227
  RuntimeEnviroment[RuntimeEnviroment["PagemakerPlugin"] = 5] = "PagemakerPlugin";
223
- })(RuntimeEnviroment || (exports.RuntimeEnviroment = RuntimeEnviroment = {}));
224
- let DeviceOs;
225
- exports.DeviceOs = DeviceOs;
226
- (function (DeviceOs) {
228
+ return RuntimeEnviroment;
229
+ }({});
230
+ exports.RuntimeEnviroment = RuntimeEnviroment;
231
+ let DeviceOs = /*#__PURE__*/function (DeviceOs) {
227
232
  DeviceOs["Unknown"] = "unknown";
228
233
  DeviceOs["Android"] = "android";
229
234
  DeviceOs["IOS"] = "ios";
230
235
  DeviceOs["Windows"] = "windows";
231
236
  DeviceOs["MacOs"] = "macos";
232
237
  DeviceOs["Linux"] = "linux";
233
- })(DeviceOs || (exports.DeviceOs = DeviceOs = {}));
234
- let AppName;
235
- exports.AppName = AppName;
236
- (function (AppName) {
238
+ return DeviceOs;
239
+ }({});
240
+ exports.DeviceOs = DeviceOs;
241
+ let AppName = /*#__PURE__*/function (AppName) {
237
242
  AppName[AppName["Unknown"] = 0] = "Unknown";
238
243
  AppName[AppName["David"] = 1] = "David";
239
244
  AppName[AppName["Chayns"] = 2] = "Chayns";
240
245
  AppName[AppName["Location"] = 3] = "Location";
241
246
  AppName[AppName["Intercom"] = 4] = "Intercom";
242
247
  AppName[AppName["ChaynsLauncher"] = 5] = "ChaynsLauncher";
243
- })(AppName || (exports.AppName = AppName = {}));
244
- let BrowserName;
245
- exports.BrowserName = BrowserName;
246
- (function (BrowserName) {
248
+ return AppName;
249
+ }({});
250
+ exports.AppName = AppName;
251
+ let BrowserName = /*#__PURE__*/function (BrowserName) {
247
252
  BrowserName["Unknown"] = "unknown";
248
253
  BrowserName["Chrome"] = "chrome";
249
254
  BrowserName["Safari"] = "safari";
250
255
  BrowserName["Firefox"] = "firefox";
251
256
  BrowserName["Edge"] = "edge";
252
- })(BrowserName || (exports.BrowserName = BrowserName = {}));
253
- let Environment;
254
- exports.Environment = Environment;
255
- (function (Environment) {
257
+ return BrowserName;
258
+ }({});
259
+ exports.BrowserName = BrowserName;
260
+ let Environment = /*#__PURE__*/function (Environment) {
256
261
  Environment[Environment["Development"] = 0] = "Development";
257
262
  Environment[Environment["Qa"] = 1] = "Qa";
258
263
  Environment[Environment["Staging"] = 2] = "Staging";
259
264
  Environment[Environment["Production"] = 3] = "Production";
260
- })(Environment || (exports.Environment = Environment = {}));
261
- let Font;
262
- exports.Font = Font;
263
- (function (Font) {
265
+ return Environment;
266
+ }({});
267
+ exports.Environment = Environment;
268
+ let Font = /*#__PURE__*/function (Font) {
264
269
  Font[Font["Unknown"] = 0] = "Unknown";
265
270
  Font[Font["Roboto"] = 1] = "Roboto";
266
271
  Font[Font["OpenSans"] = 2] = "OpenSans";
@@ -289,15 +294,15 @@ exports.Font = Font;
289
294
  Font[Font["RobotoBold"] = 25] = "RobotoBold";
290
295
  Font[Font["RobotoRegular"] = 26] = "RobotoRegular";
291
296
  Font[Font["Inter"] = 27] = "Inter";
292
- })(Font || (exports.Font = Font = {}));
293
- var selectType;
294
- (function (selectType) {
297
+ return Font;
298
+ }({});
299
+ exports.Font = Font;
300
+ var selectType = /*#__PURE__*/function (selectType) {
295
301
  selectType[selectType["DEFAULT"] = 0] = "DEFAULT";
296
302
  selectType[selectType["ICON"] = 1] = "ICON";
297
- })(selectType || (selectType = {}));
298
- let DialogType;
299
- exports.DialogType = DialogType;
300
- (function (DialogType) {
303
+ return selectType;
304
+ }(selectType || {});
305
+ let DialogType = /*#__PURE__*/function (DialogType) {
301
306
  DialogType["ALERT"] = "alert";
302
307
  DialogType["CONFIRM"] = "confirm";
303
308
  DialogType["DATE"] = "date";
@@ -307,4 +312,6 @@ exports.DialogType = DialogType;
307
312
  DialogType["INPUT"] = "input";
308
313
  DialogType["SELECT"] = "select";
309
314
  DialogType["TOAST"] = "toast";
310
- })(DialogType || (exports.DialogType = DialogType = {}));
315
+ return DialogType;
316
+ }({});
317
+ exports.DialogType = DialogType;
@@ -7,9 +7,9 @@ exports.default = void 0;
7
7
  // @ts-nocheck
8
8
 
9
9
  const invokeAppCall = call => {
10
- var _window$webkit, _window$webkit$messag, _window$chaynsApp, _window$chaynsElectro;
10
+ var _window$webkit, _window$chaynsApp, _window$chaynsElectro;
11
11
  call = JSON.stringify(call);
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) {
12
+ if ((_window$webkit = window.webkit) !== null && _window$webkit !== void 0 && (_window$webkit = _window$webkit.messageHandlers) !== null && _window$webkit !== void 0 && _window$webkit.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);
@@ -11,9 +11,9 @@ const getDeviceInfo = (userAgent, acceptHeader) => {
11
11
  const parsedUA = (0, _detectBrowser.parseUserAgent)(userAgent);
12
12
  let appName = _IChaynsReact.AppName.Unknown;
13
13
  const match = /(?:my)?chayns\/(?<version>\d+).*(?<siteId>\d{5}-\d{5})/i.exec(userAgent);
14
- if ((match === null || match === void 0 ? void 0 : (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups.siteId) === '60021-08989') {
14
+ if ((match === null || match === void 0 || (_match$groups = match.groups) === null || _match$groups === void 0 ? void 0 : _match$groups.siteId) === '60021-08989') {
15
15
  appName = _IChaynsReact.AppName.Chayns;
16
- } 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') {
16
+ } else if ((match === null || match === void 0 || (_match$groups2 = match.groups) === null || _match$groups2 === void 0 ? void 0 : _match$groups2.siteId) === '77892-10814') {
17
17
  appName = _IChaynsReact.AppName.David;
18
18
  } else if (match) {
19
19
  appName = _IChaynsReact.AppName.Location;
@@ -24,7 +24,7 @@ const getDeviceInfo = (userAgent, acceptHeader) => {
24
24
  result.browser = {
25
25
  name: parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.name,
26
26
  version: parsedUA === null || parsedUA === void 0 ? void 0 : parsedUA.version,
27
- 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,
27
+ majorVersion: Number.parseInt((_parsedUA$version$spl = parsedUA === null || parsedUA === 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,
28
28
  isWebPSupported: acceptHeader.includes('image/webp')
29
29
  };
30
30
  result.app = {
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _moduleWrapper = require("../components/moduleWrapper");
8
+ var _FrameWrapper = require("./FrameWrapper");
9
+ class StaticChaynsApi {
10
+ constructor() {
11
+ const wrapper = new _FrameWrapper.FrameWrapper();
12
+ _moduleWrapper.moduleWrapper.current = wrapper;
13
+ this._wrapper = wrapper;
14
+ this.ready = wrapper.init();
15
+ this.addDataListener = wrapper.addDataListener;
16
+ Object.entries(wrapper.functions).forEach(([k, v]) => {
17
+ this[k] = v;
18
+ });
19
+ }
20
+ getSite = () => this._wrapper.values.site;
21
+ }
22
+ var _default = StaticChaynsApi;
23
+ exports.default = _default;
@@ -30,7 +30,6 @@ import { getDevice } from "../index";
30
30
  * console.log(data);
31
31
  * });
32
32
  */
33
-
34
33
  export function date() {
35
34
  let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
36
35
  let {
@@ -1,4 +1,4 @@
1
- import { moduleWrapper } from '../components/ChaynsProvider';
1
+ import { moduleWrapper } from '../components/moduleWrapper';
2
2
  /**
3
3
  * This adds a listener to determine your location.
4
4
  * @category Event listener
@@ -7,12 +7,11 @@ import { FrameWrapper } from '../wrapper/FrameWrapper';
7
7
  import { ModuleFederationWrapper } from '../wrapper/ModuleFederationWrapper';
8
8
  import { SsrWrapper } from '../wrapper/SsrWrapper';
9
9
  import { ChaynsContext, ChaynsFunctionsContext } from './ChaynsContext';
10
- import AppDialogWrapper from "./AppDialogWrapper";
10
+ import AppDialogWrapper from './AppDialogWrapper';
11
+ import { moduleWrapper } from './moduleWrapper';
11
12
 
12
13
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
13
- export const moduleWrapper = {
14
- current: undefined
15
- };
14
+
16
15
  const isServer = typeof window === 'undefined';
17
16
  const InitialDataProvider = /*#__PURE__*/React.memo(_ref => {
18
17
  let {
@@ -0,0 +1,3 @@
1
+ export const moduleWrapper = {
2
+ current: undefined
3
+ };
@@ -10,7 +10,7 @@ export const useDialogState = () => {
10
10
  const addDataListener = useContextSelector(ChaynsFunctionsContext, v => v === null || v === void 0 ? void 0 : v.addDialogHostEventListener);
11
11
  const isClosingRequested = useContextSelector(ChaynsContext, v => {
12
12
  var _v$dialog;
13
- return v === null || v === void 0 ? void 0 : (_v$dialog = v.dialog) === null || _v$dialog === void 0 ? void 0 : _v$dialog.isClosingRequested;
13
+ return v === null || v === void 0 || (_v$dialog = v.dialog) === null || _v$dialog === void 0 ? void 0 : _v$dialog.isClosingRequested;
14
14
  });
15
15
  return {
16
16
  setResult,
@@ -26,7 +26,7 @@ export const useDialogState = () => {
26
26
  export const useDialogData = () => {
27
27
  const inputData = useContextSelector(ChaynsContext, v => {
28
28
  var _v$dialog2;
29
- return v === null || v === void 0 ? void 0 : (_v$dialog2 = v.dialog) === null || _v$dialog2 === void 0 ? void 0 : _v$dialog2.dialogInput;
29
+ return v === null || v === void 0 || (_v$dialog2 = v.dialog) === null || _v$dialog2 === void 0 ? void 0 : _v$dialog2.dialogInput;
30
30
  });
31
31
  return inputData;
32
32
  };
@@ -1,6 +1,6 @@
1
1
  import { useContextSelector } from 'use-context-selector';
2
2
  import { ChaynsContext } from '../components/ChaynsContext';
3
- import { moduleWrapper } from "../components/ChaynsProvider";
3
+ import { moduleWrapper } from '../components/moduleWrapper';
4
4
  /**
5
5
  * @category Hooks
6
6
  */
package/dist/esm/index.js CHANGED
@@ -8,6 +8,7 @@ export * from './hooks';
8
8
  export * from './components/WaitUntil';
9
9
  export * from './types/IChaynsReact';
10
10
  export * from './components/withCompatMode';
11
+ export { default as StaticChaynsApi } from './wrapper/StaticChaynsApi';
11
12
  export { default as DialogHandler } from './handler/DialogHandler';
12
13
  import * as _dialog from './calls/dialogs/index';
13
14
  export { _dialog as dialog };