chayns-api 1.0.25 → 1.0.27-0
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/dist/cjs/components/AppDialogWrapper.js +1 -1
- package/dist/cjs/host/module/utils/loadComponent.js +2 -2
- package/dist/cjs/types/IChaynsReact.js +8 -1
- package/dist/esm/components/AppDialogWrapper.js +1 -1
- package/dist/esm/host/module/utils/loadComponent.js +2 -2
- package/dist/esm/types/IChaynsReact.js +6 -0
- package/dist/types/types/IChaynsReact.d.ts +28 -13
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ const AppDialogWrapper = ({
|
|
|
30
30
|
type: "client-module",
|
|
31
31
|
system: {
|
|
32
32
|
module: './AppWrapper',
|
|
33
|
-
url: 'https://tapp
|
|
33
|
+
url: 'https://tapp.chayns-static.space/api/dialog-v2/v1/remoteEntry.js',
|
|
34
34
|
scope: 'dialog_v2'
|
|
35
35
|
}
|
|
36
36
|
}, data, {
|
|
@@ -50,8 +50,8 @@ function loadComponent(scope, module, url, skipCompatMode = false, preventSingle
|
|
|
50
50
|
requiredVersion,
|
|
51
51
|
environment
|
|
52
52
|
} = Module.default;
|
|
53
|
-
const matchReactVersion = requiredVersion && Object.keys(__webpack_share_scopes__.default.react).
|
|
54
|
-
return
|
|
53
|
+
const matchReactVersion = requiredVersion && _semver.default.satisfies(hostVersion, requiredVersion) && !Object.keys(__webpack_share_scopes__.default.react).some(version => {
|
|
54
|
+
return _semver.default.gt(version, hostVersion) && _semver.default.satisfies(version, requiredVersion);
|
|
55
55
|
});
|
|
56
56
|
if (!matchReactVersion || environment !== 'production') {
|
|
57
57
|
return {
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
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.DialogButtonType = exports.DeviceOs = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
|
|
6
|
+
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.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) {
|
|
10
|
+
DateType[DateType["DATE"] = 0] = "DATE";
|
|
11
|
+
DateType[DateType["TIME"] = 1] = "TIME";
|
|
12
|
+
DateType[DateType["DATE_TIME"] = 2] = "DATE_TIME";
|
|
13
|
+
})(DateType || (exports.DateType = DateType = {}));
|
|
7
14
|
let DialogButtonType;
|
|
8
15
|
exports.DialogButtonType = DialogButtonType;
|
|
9
16
|
(function (DialogButtonType) {
|
|
@@ -22,7 +22,7 @@ const AppDialogWrapper = _ref => {
|
|
|
22
22
|
type: "client-module",
|
|
23
23
|
system: {
|
|
24
24
|
module: './AppWrapper',
|
|
25
|
-
url: 'https://tapp
|
|
25
|
+
url: 'https://tapp.chayns-static.space/api/dialog-v2/v1/remoteEntry.js',
|
|
26
26
|
scope: 'dialog_v2'
|
|
27
27
|
}
|
|
28
28
|
}, data, {
|
|
@@ -45,8 +45,8 @@ export default function loadComponent(scope, module, url) {
|
|
|
45
45
|
requiredVersion,
|
|
46
46
|
environment
|
|
47
47
|
} = Module.default;
|
|
48
|
-
const matchReactVersion = requiredVersion && Object.keys(__webpack_share_scopes__.default.react).
|
|
49
|
-
return
|
|
48
|
+
const matchReactVersion = requiredVersion && semver.satisfies(hostVersion, requiredVersion) && !Object.keys(__webpack_share_scopes__.default.react).some(version => {
|
|
49
|
+
return semver.gt(version, hostVersion) && semver.satisfies(version, requiredVersion);
|
|
50
50
|
});
|
|
51
51
|
if (!matchReactVersion || environment !== 'production') {
|
|
52
52
|
return {
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export let DateType;
|
|
2
|
+
(function (DateType) {
|
|
3
|
+
DateType[DateType["DATE"] = 0] = "DATE";
|
|
4
|
+
DateType[DateType["TIME"] = 1] = "TIME";
|
|
5
|
+
DateType[DateType["DATE_TIME"] = 2] = "DATE_TIME";
|
|
6
|
+
})(DateType || (DateType = {}));
|
|
1
7
|
export let DialogButtonType;
|
|
2
8
|
(function (DialogButtonType) {
|
|
3
9
|
DialogButtonType[DialogButtonType["OK"] = 1] = "OK";
|
|
@@ -5,13 +5,30 @@ export type DialogButton = {
|
|
|
5
5
|
type: DialogButtonType;
|
|
6
6
|
text: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export declare enum DateType {
|
|
9
|
+
DATE = 0,
|
|
10
|
+
TIME = 1,
|
|
11
|
+
DATE_TIME = 2
|
|
12
|
+
}
|
|
13
|
+
export interface DialogDate {
|
|
14
|
+
type: DialogType.DATE;
|
|
15
|
+
minDate: Date;
|
|
16
|
+
maxDate: Date;
|
|
17
|
+
minDuration?: number;
|
|
18
|
+
minuteInterval?: number;
|
|
19
|
+
preselect?: Date;
|
|
20
|
+
dateType?: DateType;
|
|
21
|
+
multiselect?: boolean;
|
|
22
|
+
monthSelect?: boolean;
|
|
23
|
+
yearSelect?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface BaseDialog {
|
|
9
26
|
text?: string;
|
|
10
27
|
buttons?: DialogButton[];
|
|
11
28
|
dialogId: number;
|
|
12
|
-
}
|
|
13
|
-
export type Dialog = BaseDialog & (DialogInput | DialogModule | DialogIFrame | DialogSelect);
|
|
14
|
-
export
|
|
29
|
+
}
|
|
30
|
+
export type Dialog = BaseDialog & (DialogInput | DialogModule | DialogIFrame | DialogSelect | DialogDate);
|
|
31
|
+
export interface DialogModule {
|
|
15
32
|
type: DialogType.MODULE;
|
|
16
33
|
system: {
|
|
17
34
|
url: string;
|
|
@@ -19,19 +36,17 @@ export type DialogModule = {
|
|
|
19
36
|
scope: string;
|
|
20
37
|
};
|
|
21
38
|
dialogInput: object;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export type DialogIFrame = {
|
|
39
|
+
}
|
|
40
|
+
export interface DialogIFrame {
|
|
25
41
|
type: DialogType.IFRAME;
|
|
26
42
|
url: string;
|
|
27
43
|
dialogInput: object;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export type DialogInput = {
|
|
44
|
+
}
|
|
45
|
+
export interface DialogInput {
|
|
31
46
|
type: DialogType.INPUT;
|
|
32
47
|
placeholder: string;
|
|
33
|
-
}
|
|
34
|
-
export
|
|
48
|
+
}
|
|
49
|
+
export interface DialogSelect {
|
|
35
50
|
type: DialogType.SELECT;
|
|
36
51
|
list: {
|
|
37
52
|
id: number;
|
|
@@ -39,7 +54,7 @@ export type DialogSelect = {
|
|
|
39
54
|
disabled?: boolean;
|
|
40
55
|
isSelected?: boolean;
|
|
41
56
|
}[];
|
|
42
|
-
}
|
|
57
|
+
}
|
|
43
58
|
export declare enum DialogButtonType {
|
|
44
59
|
OK = 1,
|
|
45
60
|
CANCEL = -1,
|