chayns-api 3.2.4 → 3.3.0-beta.1
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.selectType = exports.WeekDayType = exports.ToastType = exports.TappEvent = exports.SnapshotType = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnvironment = exports.RuntimeEnviroment = exports.MediaType = exports.LoginState = exports.Language = exports.IconType = exports.IconStyle = exports.IOSFeedbackVibration = 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.DesignSettingsUpdateTappViewModes = exports.DesignSettingsUpdateSeasonTypes = exports.DesignSettingsUpdateGalleryAnimationTypes = exports.DesignSettingsUpdateCoverTypes = exports.DesignSettingsUpdateBackgroundType = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AppFlavor = exports.AccessMode = void 0;
|
|
6
|
+
exports.selectType = exports.WeekDayType = exports.ToastType = exports.TappEvent = exports.SnapshotType = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnvironment = exports.RuntimeEnviroment = exports.MediaType = exports.LoginState = exports.Language = exports.IconType = exports.IconStyle = exports.IOSFeedbackVibration = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.FloatingButtonAnimation = exports.FileExplorerSortType = exports.FileExplorerFilterType = exports.Environment = exports.DialogType = exports.DialogSelectType = exports.DialogInputType = exports.DialogIconType = exports.DialogButtonType = exports.DialogAnimation = exports.DeviceOs = exports.DesignSettingsUpdateTappViewModes = exports.DesignSettingsUpdateSeasonTypes = exports.DesignSettingsUpdateGalleryAnimationTypes = exports.DesignSettingsUpdateCoverTypes = exports.DesignSettingsUpdateBackgroundType = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AppFlavor = exports.AccessMode = void 0;
|
|
7
7
|
let DateType = exports.DateType = function (DateType) {
|
|
8
8
|
DateType[DateType["DATE"] = 0] = "DATE";
|
|
9
9
|
DateType[DateType["TIME"] = 1] = "TIME";
|
|
@@ -27,6 +27,17 @@ let ToastType = exports.ToastType = function (ToastType) {
|
|
|
27
27
|
ToastType[ToastType["ERROR"] = 4] = "ERROR";
|
|
28
28
|
return ToastType;
|
|
29
29
|
}({});
|
|
30
|
+
let FileExplorerFilterType = exports.FileExplorerFilterType = function (FileExplorerFilterType) {
|
|
31
|
+
FileExplorerFilterType["FILES"] = "files";
|
|
32
|
+
FileExplorerFilterType["FOLDERS"] = "folders";
|
|
33
|
+
return FileExplorerFilterType;
|
|
34
|
+
}({});
|
|
35
|
+
let FileExplorerSortType = exports.FileExplorerSortType = function (FileExplorerSortType) {
|
|
36
|
+
FileExplorerSortType["NONE"] = "none";
|
|
37
|
+
FileExplorerSortType["ALPHABETICAL_ASC"] = "alphabetical-asc";
|
|
38
|
+
FileExplorerSortType["ALPHABETICAL_DESC"] = "alphabetical-desc";
|
|
39
|
+
return FileExplorerSortType;
|
|
40
|
+
}({});
|
|
30
41
|
let DialogInputType = exports.DialogInputType = function (DialogInputType) {
|
|
31
42
|
DialogInputType["NUMBER"] = "number";
|
|
32
43
|
DialogInputType["PASSWORD"] = "password";
|
|
@@ -316,6 +327,7 @@ let DialogType = exports.DialogType = function (DialogType) {
|
|
|
316
327
|
DialogType["CONFIRM"] = "confirm";
|
|
317
328
|
DialogType["DATE"] = "date";
|
|
318
329
|
DialogType["FILE_SELECT"] = "fileSelect";
|
|
330
|
+
DialogType["FILE_EXPLORER"] = "fileExplorer";
|
|
319
331
|
DialogType["IFRAME"] = "iframe";
|
|
320
332
|
DialogType["MODULE"] = "module";
|
|
321
333
|
DialogType["INPUT"] = "input";
|
|
@@ -21,6 +21,17 @@ export let ToastType = function (ToastType) {
|
|
|
21
21
|
ToastType[ToastType["ERROR"] = 4] = "ERROR";
|
|
22
22
|
return ToastType;
|
|
23
23
|
}({});
|
|
24
|
+
export let FileExplorerFilterType = function (FileExplorerFilterType) {
|
|
25
|
+
FileExplorerFilterType["FILES"] = "files";
|
|
26
|
+
FileExplorerFilterType["FOLDERS"] = "folders";
|
|
27
|
+
return FileExplorerFilterType;
|
|
28
|
+
}({});
|
|
29
|
+
export let FileExplorerSortType = function (FileExplorerSortType) {
|
|
30
|
+
FileExplorerSortType["NONE"] = "none";
|
|
31
|
+
FileExplorerSortType["ALPHABETICAL_ASC"] = "alphabetical-asc";
|
|
32
|
+
FileExplorerSortType["ALPHABETICAL_DESC"] = "alphabetical-desc";
|
|
33
|
+
return FileExplorerSortType;
|
|
34
|
+
}({});
|
|
24
35
|
export let DialogInputType = function (DialogInputType) {
|
|
25
36
|
DialogInputType["NUMBER"] = "number";
|
|
26
37
|
DialogInputType["PASSWORD"] = "password";
|
|
@@ -310,6 +321,7 @@ export let DialogType = function (DialogType) {
|
|
|
310
321
|
DialogType["CONFIRM"] = "confirm";
|
|
311
322
|
DialogType["DATE"] = "date";
|
|
312
323
|
DialogType["FILE_SELECT"] = "fileSelect";
|
|
324
|
+
DialogType["FILE_EXPLORER"] = "fileExplorer";
|
|
313
325
|
DialogType["IFRAME"] = "iframe";
|
|
314
326
|
DialogType["MODULE"] = "module";
|
|
315
327
|
DialogType["INPUT"] = "input";
|
|
@@ -69,6 +69,40 @@ export interface DialogFileSelect {
|
|
|
69
69
|
exclude?: Array<string> | string;
|
|
70
70
|
directory?: boolean;
|
|
71
71
|
}
|
|
72
|
+
export interface DialogFileExplorer {
|
|
73
|
+
type: DialogType.FILE_EXPLORER;
|
|
74
|
+
rootFolderName: string;
|
|
75
|
+
items: FileExplorerItem[];
|
|
76
|
+
onLoad: (id?: string | number) => void;
|
|
77
|
+
onFilterChange?: (value: FileExplorerFilterChange) => void;
|
|
78
|
+
}
|
|
79
|
+
export declare enum FileExplorerFilterType {
|
|
80
|
+
FILES = "files",
|
|
81
|
+
FOLDERS = "folders"
|
|
82
|
+
}
|
|
83
|
+
export declare enum FileExplorerSortType {
|
|
84
|
+
NONE = "none",
|
|
85
|
+
ALPHABETICAL_ASC = "alphabetical-asc",
|
|
86
|
+
ALPHABETICAL_DESC = "alphabetical-desc"
|
|
87
|
+
}
|
|
88
|
+
export interface FileExplorerFilterChange {
|
|
89
|
+
currentFolderId?: string | number;
|
|
90
|
+
searchString: string;
|
|
91
|
+
filter: FileExplorerFilterType[];
|
|
92
|
+
sortType: FileExplorerSortType;
|
|
93
|
+
}
|
|
94
|
+
export type FileExplorerItem = FileExplorerFolder | FileExplorerFile;
|
|
95
|
+
export interface FileExplorerFolder {
|
|
96
|
+
id: string | number;
|
|
97
|
+
name: string;
|
|
98
|
+
count: number;
|
|
99
|
+
children: FileExplorerItem[];
|
|
100
|
+
}
|
|
101
|
+
export interface FileExplorerFile {
|
|
102
|
+
id: string | number;
|
|
103
|
+
name: string;
|
|
104
|
+
mimeType: string;
|
|
105
|
+
}
|
|
72
106
|
export interface DialogConfirm {
|
|
73
107
|
type: DialogType.CONFIRM;
|
|
74
108
|
}
|
|
@@ -89,7 +123,7 @@ export interface BaseDialog {
|
|
|
89
123
|
}) => void;
|
|
90
124
|
footer?: string;
|
|
91
125
|
}
|
|
92
|
-
export type Dialog<T = object> = BaseDialog & (DialogAlert | DialogConfirm | DialogInput | DialogModule<T> | DialogIFrame<T> | DialogSelect | DialogDate | DialogToast | DialogSignature | DialogFileSelect);
|
|
126
|
+
export type Dialog<T = object> = BaseDialog & (DialogAlert | DialogConfirm | DialogInput | DialogModule<T> | DialogIFrame<T> | DialogSelect | DialogDate | DialogToast | DialogSignature | DialogFileSelect | DialogFileExplorer);
|
|
93
127
|
export interface DialogSignature {
|
|
94
128
|
type: DialogType.SIGNATURE;
|
|
95
129
|
}
|
|
@@ -449,8 +483,9 @@ export interface ChaynsReactFunctions {
|
|
|
449
483
|
})): DialogHandler<Date[]>;
|
|
450
484
|
createDialog(config: BaseDialog & DialogDate): DialogHandler<Date>;
|
|
451
485
|
createDialog(config: BaseDialog & DialogFileSelect): DialogHandler<DialogResultFile[]>;
|
|
486
|
+
createDialog(config: BaseDialog & DialogFileExplorer): DialogHandler<string | number>;
|
|
452
487
|
createDialog<Input = any, Result = unknown>(config: BaseDialog & (DialogModule<Input> | DialogIFrame<Input>)): DialogHandler<Result>;
|
|
453
|
-
createDialog<Input = any, Result = unknown>(config: BaseDialog & (DialogAlert | DialogConfirm | DialogToast | DialogInput | DialogSignature | DialogSelect | DialogDate | DialogFileSelect | DialogIFrame<Input> | DialogModule<Input>)): DialogHandler<any>;
|
|
488
|
+
createDialog<Input = any, Result = unknown>(config: BaseDialog & (DialogAlert | DialogConfirm | DialogToast | DialogInput | DialogSignature | DialogSelect | DialogDate | DialogFileSelect | DialogFileExplorer | DialogIFrame<Input> | DialogModule<Input>)): DialogHandler<any>;
|
|
454
489
|
openDialog: (value: any, callback: (data: any) => any) => Promise<any>;
|
|
455
490
|
closeDialog: (dialogId: number) => Promise<void>;
|
|
456
491
|
setDialogResult: (buttonType: DialogButtonType, result: any) => Promise<void>;
|
|
@@ -513,7 +548,6 @@ export interface RefreshData {
|
|
|
513
548
|
suffix?: boolean;
|
|
514
549
|
tapps?: boolean;
|
|
515
550
|
user?: boolean;
|
|
516
|
-
userImage?: boolean;
|
|
517
551
|
chaynsProData?: boolean;
|
|
518
552
|
ignoreUacCache?: boolean;
|
|
519
553
|
chaynsInfo?: boolean;
|
|
@@ -1027,6 +1061,7 @@ export declare enum DialogType {
|
|
|
1027
1061
|
CONFIRM = "confirm",
|
|
1028
1062
|
DATE = "date",
|
|
1029
1063
|
FILE_SELECT = "fileSelect",
|
|
1064
|
+
FILE_EXPLORER = "fileExplorer",
|
|
1030
1065
|
IFRAME = "iframe",
|
|
1031
1066
|
MODULE = "module",
|
|
1032
1067
|
INPUT = "input",
|