@apia/uploader-controller 4.0.102 → 5.0.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.
- package/dist/UploaderApi.d.ts +181 -0
- package/dist/UploaderApi.d.ts.map +1 -0
- package/dist/UploaderApi.js +1268 -0
- package/dist/UploaderApi.js.map +1 -0
- package/dist/UploaderModalController.d.ts +54 -0
- package/dist/UploaderModalController.d.ts.map +1 -0
- package/dist/UploaderModalController.js +269 -0
- package/dist/UploaderModalController.js.map +1 -0
- package/dist/directories/DirectoriesPicker.d.ts +29 -0
- package/dist/directories/DirectoriesPicker.d.ts.map +1 -0
- package/dist/directories/DirectoriesPicker.js +108 -0
- package/dist/directories/DirectoriesPicker.js.map +1 -0
- package/dist/directories/FilePicker.d.ts +14 -0
- package/dist/directories/FilePicker.d.ts.map +1 -0
- package/dist/directories/FilePicker.js +36 -0
- package/dist/directories/FilePicker.js.map +1 -0
- package/dist/directories/nodes/DirectoryPickerFolderNode.d.ts +16 -0
- package/dist/directories/nodes/DirectoryPickerFolderNode.d.ts.map +1 -0
- package/dist/directories/nodes/DirectoryPickerFolderNode.js +115 -0
- package/dist/directories/nodes/DirectoryPickerFolderNode.js.map +1 -0
- package/dist/directories/nodes/DocumentNode.d.ts +11 -0
- package/dist/directories/nodes/DocumentNode.d.ts.map +1 -0
- package/dist/directories/nodes/DocumentNode.js +16 -0
- package/dist/directories/nodes/DocumentNode.js.map +1 -0
- package/dist/directories/nodes/FilePickerFolderNode.d.ts +12 -0
- package/dist/directories/nodes/FilePickerFolderNode.d.ts.map +1 -0
- package/dist/directories/nodes/FilePickerFolderNode.js +91 -0
- package/dist/directories/nodes/FilePickerFolderNode.js.map +1 -0
- package/dist/directories/types.d.ts +57 -0
- package/dist/directories/types.d.ts.map +1 -0
- package/dist/directories/utils.d.ts +17 -0
- package/dist/directories/utils.d.ts.map +1 -0
- package/dist/directories/utils.js +17 -0
- package/dist/directories/utils.js.map +1 -0
- package/dist/index.d.ts +11 -618
- package/dist/index.js +9 -1893
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +285 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/util.d.ts +6 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +25 -0
- package/dist/util.js.map +1 -0
- package/package.json +5 -6
- package/LICENSE.md +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,619 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
id: string;
|
|
13
|
-
modalConfig: TModalConfig;
|
|
14
|
-
};
|
|
15
|
-
maxFiles: number;
|
|
16
|
-
modalController: UploaderModalController | null;
|
|
17
|
-
langs: Record<number, string> | undefined;
|
|
18
|
-
currentConfiguration: TUploaderLoadCurrentFunctionMessages | undefined;
|
|
19
|
-
showConfirmMessage: boolean;
|
|
20
|
-
state: UploaderState;
|
|
21
|
-
get filesArray(): TUploaderFileInfo[];
|
|
22
|
-
get id(): string;
|
|
23
|
-
get modalConfig(): TModalConfig;
|
|
24
|
-
constructor(props: {
|
|
25
|
-
context: UploadContext;
|
|
26
|
-
id: string;
|
|
27
|
-
modalConfig: TModalConfig;
|
|
28
|
-
});
|
|
29
|
-
get context(): UploadContext;
|
|
30
|
-
init(): Promise<void>;
|
|
31
|
-
protected buildModalController(conf?: {
|
|
32
|
-
langId?: number;
|
|
33
|
-
translatingFile?: TUploaderFileInfo;
|
|
34
|
-
versionFile?: TUploaderFileInfo;
|
|
35
|
-
}): UploaderModalController;
|
|
36
|
-
onStartUpload(files?: File[]): Promise<void>;
|
|
37
|
-
onTranslateUpload(conf: {
|
|
38
|
-
langId: number;
|
|
39
|
-
translatingFile: TUploaderFileInfo;
|
|
40
|
-
}, files?: File[]): Promise<void>;
|
|
41
|
-
onVersionUpload(file: TUploaderFileInfo, conf?: {
|
|
42
|
-
newFiles?: File[];
|
|
43
|
-
langId?: number;
|
|
44
|
-
translatingFile?: TUploaderFileInfo;
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
autoLock(): Promise<boolean>;
|
|
47
|
-
notify(notification: NotificationDefinition): void;
|
|
48
|
-
protected getAjaxUrl(): string;
|
|
49
|
-
getDocTypes(): TDocType[];
|
|
50
|
-
getCurrentDocTypeId(): string;
|
|
51
|
-
getCurrentDocType(): TDocType | undefined;
|
|
52
|
-
getInProgressFiles(): File[];
|
|
53
|
-
getHiddenFiles(): File[];
|
|
54
|
-
getExistingFiles(): Record<string, TUploaderFileInfo>;
|
|
55
|
-
getProgress(): number;
|
|
56
|
-
getHasAllDocTypes(): boolean | undefined;
|
|
57
|
-
getDocumentInfo({ docId: apiId, downloadDocId: docId, }: TRequireOnlyOne<{
|
|
58
|
-
docId: string;
|
|
59
|
-
downloadDocId: string;
|
|
60
|
-
}>, newElem?: boolean): Promise<({
|
|
61
|
-
canClose: boolean;
|
|
62
|
-
type: string;
|
|
63
|
-
} & {
|
|
64
|
-
function: {
|
|
65
|
-
name: string;
|
|
66
|
-
} & {
|
|
67
|
-
data: {
|
|
68
|
-
onClose: string;
|
|
69
|
-
general: TApiaDocumentDefinition;
|
|
70
|
-
permissions: {
|
|
71
|
-
pool: TDocumentPermission | TDocumentPermission[];
|
|
72
|
-
user: TDocumentPermission | TDocumentPermission[];
|
|
73
|
-
};
|
|
74
|
-
versions: {
|
|
75
|
-
version: TDocumentVersion | TDocumentVersion[];
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
currentUsrPems: {
|
|
79
|
-
usrCanModify: boolean;
|
|
80
|
-
};
|
|
81
|
-
metadatas: {
|
|
82
|
-
metadata: TDocumentMetadata | TDocumentMetadata[];
|
|
83
|
-
};
|
|
84
|
-
docDownHistory: {
|
|
85
|
-
docHistory: TDocumentDownloadHistory | TDocumentDownloadHistory[];
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
} & _apia_util.TNotificationMessage) | null>;
|
|
89
|
-
/**
|
|
90
|
-
* This method searches for the provided id in several places:
|
|
91
|
-
*
|
|
92
|
-
* If it's found in the current files, returns it.
|
|
93
|
-
* If not, it searches the provided docId in the translations map of each uploaded file.
|
|
94
|
-
*/
|
|
95
|
-
getDocument(docId: string): TUploaderFileInfo | undefined;
|
|
96
|
-
protected updateDocument(docId: string, newValue: TUploaderFileInfo): void;
|
|
97
|
-
protected deleteDocument(docId: string): void;
|
|
98
|
-
clearFile(name: string): void;
|
|
99
|
-
clearFiles(): void;
|
|
100
|
-
clearState(): void;
|
|
101
|
-
checkLockDocument(id: string, shouldNotifyUnlocked?: boolean): Promise<string | boolean>;
|
|
102
|
-
setCurrentDocTypeId(docTypeId: string): void;
|
|
103
|
-
ajaxUploadStart(newFiles?: File[]): Promise<boolean | undefined>;
|
|
104
|
-
reloadMetadata(props?: Partial<{
|
|
105
|
-
docId: string;
|
|
106
|
-
docTypeId: number | string;
|
|
107
|
-
}>, additionalProps?: Record<string, unknown>): Promise<void>;
|
|
108
|
-
saveDroppedFiles(unprocessedFiles: File[], conf?: TSaveDroppedFilesConf): Promise<boolean>;
|
|
109
|
-
checkWebDavLock(docId: string): Promise<unknown>;
|
|
110
|
-
checkSignature(file: TUploaderFileInfo): Promise<_apia_api2.TApiaApiAxiosResponse<({
|
|
111
|
-
markedToSign: boolean;
|
|
112
|
-
} & _apia_util.TNotificationMessage) | null> | null>;
|
|
113
|
-
editDocument(id: string): Promise<void>;
|
|
114
|
-
downloadVersion(fileId: string, version?: string): Promise<void>;
|
|
115
|
-
downloadDocument(id: string, version?: string): Promise<void>;
|
|
116
|
-
ajaxDeleteDocument(id: string, langId?: number): Promise<void>;
|
|
117
|
-
version(file: TUploaderFileInfo, conf?: {
|
|
118
|
-
newFiles?: File[];
|
|
119
|
-
langId?: number;
|
|
120
|
-
translatingFile?: TUploaderFileInfo;
|
|
121
|
-
}): Promise<void>;
|
|
122
|
-
versionFileInfo(file: TUploaderFileInfo): Promise<void>;
|
|
123
|
-
pickFileById(id: string): Promise<void>;
|
|
124
|
-
markFileToSign(id: string, langId?: string): Promise<void>;
|
|
125
|
-
/**
|
|
126
|
-
* Por el momento realiza la descarga de todos los archivos
|
|
127
|
-
* que estén subidos.
|
|
128
|
-
*/
|
|
129
|
-
downloadMultipleDocuments(): void;
|
|
130
|
-
confirmDropModal(conf?: {
|
|
131
|
-
langId?: number;
|
|
132
|
-
translatingFile?: TUploaderFileInfo;
|
|
133
|
-
}): Promise<boolean>;
|
|
134
|
-
protected getLoadCurrentDocumentsParameters(params: Record<string, unknown>): Record<string, unknown>;
|
|
135
|
-
loadCurrentDocuments(): Promise<void>;
|
|
136
|
-
lockDocument(id: string): Promise<void>;
|
|
137
|
-
protected evaluateDeleteDocumentResult(result: unknown): boolean;
|
|
138
|
-
setTranslationFile(file: TUploaderFileInfo, docId: string, langId: number): void;
|
|
139
|
-
protected getCheckSignatureParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
140
|
-
protected getAjaxUploadFileStatusParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
141
|
-
protected getAjaxUploadStartParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
142
|
-
protected getConfirmDropModalParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
143
|
-
protected getCheckLockDocumentParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
144
|
-
protected getCheckWebDavLockParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
145
|
-
protected getConfirmDropModalPostdata(props: Record<string, unknown>): Record<string, unknown>;
|
|
146
|
-
protected getConfirmDropModalMetadataString: ({ metadata, }: {
|
|
147
|
-
metadata: TDocumentMetadata[];
|
|
148
|
-
}) => string;
|
|
149
|
-
protected getConfirmDropModalPermissionsString: ({ poolsPermissions, usersPermissions, }: {
|
|
150
|
-
poolsPermissions: IPoolsPermissions[];
|
|
151
|
-
usersPermissions: IUsersPermissions[];
|
|
152
|
-
}) => string;
|
|
153
|
-
protected getConfirmDropModalAdditionalMetadataString: (additionalMetadata: TDocumentMetadata[] | []) => string;
|
|
154
|
-
protected getDeleteDocumentParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
155
|
-
protected getClearTempFilesParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
156
|
-
protected getDocumentInfoParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
157
|
-
protected getDownloadMultipleDocumentsParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
158
|
-
protected getEditDocumentParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
159
|
-
protected getLockDocumentParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
160
|
-
protected getMarkFileToSignParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
161
|
-
protected getProcessDroppedFilesParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
162
|
-
protected getProcessDroppedFilesPostdata(props: Record<string, unknown>): Record<string, unknown>;
|
|
163
|
-
protected getReloadMetadataParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
164
|
-
protected getSaveDroppedFilesParameters(props: Record<string, unknown>): Record<string, unknown>;
|
|
165
|
-
protected filterAlreadyUploadedFiles(files: File[], conf?: TSaveDroppedFilesConf): File[];
|
|
166
|
-
protected filterByFilesAmountLimit(files: File[]): File[];
|
|
167
|
-
protected filterAcceptedFiles(files: File[], shouldNotify?: boolean, docTypeId?: string | TDocType): File[];
|
|
168
|
-
protected filterExistingFiles(files: File[], conf?: TSaveDroppedFilesConf): File[];
|
|
169
|
-
protected filterVersioningFiles(files: File[], conf?: {
|
|
170
|
-
langId?: number;
|
|
171
|
-
strictMode?: boolean;
|
|
172
|
-
translatingFile?: TUploaderFileInfo;
|
|
173
|
-
shouldReset?: boolean;
|
|
174
|
-
}): File[];
|
|
175
|
-
parseFileDefinition: (file: TFileUploaded) => TUploaderFileInfo;
|
|
176
|
-
getLoadFileSystemStructureTree(): Record<string, unknown>;
|
|
177
|
-
getLoadFilesForFolderParameters(): Record<string, unknown>;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
type TFilePickerProps = {
|
|
181
|
-
controller?: DirectoriesPicker;
|
|
182
|
-
onFilePick: (file: string) => unknown;
|
|
183
|
-
};
|
|
184
|
-
type TDocumentStructure = {
|
|
185
|
-
dLckByCurrUsr: string;
|
|
186
|
-
docLock: string;
|
|
187
|
-
folder: string;
|
|
188
|
-
id: string;
|
|
189
|
-
moreDocs: number;
|
|
190
|
-
name: string;
|
|
191
|
-
};
|
|
192
|
-
type TFolderStructure = {
|
|
193
|
-
addToggler: boolean;
|
|
194
|
-
allEdit: 'M' | 'R';
|
|
195
|
-
canWrite: boolean;
|
|
196
|
-
date: string;
|
|
197
|
-
desc: string;
|
|
198
|
-
edit: boolean;
|
|
199
|
-
id: string;
|
|
200
|
-
level: string;
|
|
201
|
-
name: string;
|
|
202
|
-
parent: string;
|
|
203
|
-
selectedFolder: boolean;
|
|
204
|
-
};
|
|
205
|
-
type TDirectoriesPickerResponse = {
|
|
206
|
-
documents: {
|
|
207
|
-
document: TDocumentStructure | TDocumentStructure[];
|
|
208
|
-
documentInfo: {
|
|
209
|
-
folder: string;
|
|
210
|
-
moreDocs: number;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
folder: TFolderStructure[];
|
|
214
|
-
};
|
|
215
|
-
type TFilesPickerResponse = {
|
|
216
|
-
folders: {
|
|
217
|
-
folder: TFolderStructure | TFolderStructure[];
|
|
218
|
-
};
|
|
219
|
-
documents: {
|
|
220
|
-
document: TDocumentStructure | TDocumentStructure[];
|
|
221
|
-
documentInfo: {
|
|
222
|
-
folder: string;
|
|
223
|
-
moreDocs: number;
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
type TCreateTreeNode = {
|
|
228
|
-
id?: string;
|
|
229
|
-
parentId: string;
|
|
230
|
-
} & Omit<Partial<MobXTreeNodeState>, 'children'>;
|
|
231
|
-
|
|
232
|
-
declare class DirectoryPickerFolderNode extends MobXTreeNode {
|
|
233
|
-
protected loadMoreDocsNode: MobXTreeNode | null;
|
|
234
|
-
protected removeLoadMoreDocsNode(): void;
|
|
235
|
-
isLoadingMore: boolean;
|
|
236
|
-
constructor(parent: DirectoryPickerFolderNode | DirectoriesPicker, { parentId, id, ...props }: TCreateTreeNode);
|
|
237
|
-
getTree(): DirectoriesPicker;
|
|
238
|
-
loadMore(focus?: boolean): Promise<void>;
|
|
239
|
-
refresh(): Promise<void>;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
declare class DocumentNode extends MobXTreeNode {
|
|
243
|
-
constructor(parent: DirectoryPickerFolderNode | DirectoriesPicker, { parentId, id, ...props }: TCreateTreeNode);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
declare class DirectoriesPicker extends MobXTree {
|
|
247
|
-
api: UploaderApi;
|
|
248
|
-
isLoading: boolean;
|
|
249
|
-
renderers: TModalConfig['renderers'];
|
|
250
|
-
constructor(api: UploaderApi);
|
|
251
|
-
createDocument(nodeProps: TCreateTreeNode): DocumentNode;
|
|
252
|
-
createFolder(nodeProps: TCreateTreeNode): DirectoryPickerFolderNode;
|
|
253
|
-
initialLoad(): Promise<void>;
|
|
254
|
-
getFolderStructureParams(): {
|
|
255
|
-
ajaxUrl: string;
|
|
256
|
-
action: string;
|
|
257
|
-
preventAsXmlParameter: boolean;
|
|
258
|
-
isAjax: boolean;
|
|
259
|
-
isXml: boolean;
|
|
260
|
-
docId: string | undefined;
|
|
261
|
-
};
|
|
262
|
-
getNodeHandler(nodeProps: TCreateTreeNode): DirectoryPickerFolderNode;
|
|
263
|
-
parseStructureResponse(res: any): TFolderStructure[] | null;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
declare class UploaderModalController {
|
|
267
|
-
api: UploaderApi;
|
|
268
|
-
modalConfig: TModalConfig;
|
|
269
|
-
conf?: {
|
|
270
|
-
langId?: number;
|
|
271
|
-
translatingFile?: TUploaderFileInfo;
|
|
272
|
-
versionFile?: TUploaderFileInfo;
|
|
273
|
-
} | undefined;
|
|
274
|
-
directories: DirectoriesPicker | null;
|
|
275
|
-
state: UploaderModalState;
|
|
276
|
-
constructor(api: UploaderApi, modalConfig: TModalConfig, conf?: {
|
|
277
|
-
langId?: number;
|
|
278
|
-
translatingFile?: TUploaderFileInfo;
|
|
279
|
-
versionFile?: TUploaderFileInfo;
|
|
280
|
-
} | undefined);
|
|
281
|
-
get allMetadata(): TDocumentMetadata[];
|
|
282
|
-
get allowAllType(): "" | "M" | "R";
|
|
283
|
-
get description(): string;
|
|
284
|
-
get docFolder(): number | undefined;
|
|
285
|
-
get docExpDate(): string | undefined;
|
|
286
|
-
get docTypes(): TDocType[];
|
|
287
|
-
get freeMetadata(): TDocumentMetadata[];
|
|
288
|
-
get exitingFiles(): Record<string, TUploaderFileInfo>;
|
|
289
|
-
get inProgressFiles(): File[];
|
|
290
|
-
get hiddenFiles(): File[];
|
|
291
|
-
get progress(): number;
|
|
292
|
-
get metadata(): TDocumentMetadata[];
|
|
293
|
-
get selectedDocTypeId(): string;
|
|
294
|
-
get selectedDocType(): TDocType | undefined;
|
|
295
|
-
addMetadata(): void;
|
|
296
|
-
addFiles(files: File[]): void;
|
|
297
|
-
addDirectoryFile(file: TApiaDocumentDefinition): void;
|
|
298
|
-
changeDocType(docTypeId: string): Promise<void>;
|
|
299
|
-
clearDirectoryFile(): void;
|
|
300
|
-
clearFile(name: string): void;
|
|
301
|
-
clearFiles(): void;
|
|
302
|
-
clearState(): void;
|
|
303
|
-
clearPartialState(): void;
|
|
304
|
-
onCloseModal(): void;
|
|
305
|
-
confirm(): Promise<boolean>;
|
|
306
|
-
deleteMetadata(indices: number[]): void;
|
|
307
|
-
deletePermission(item: IPoolsPermissions | IUsersPermissions): void;
|
|
308
|
-
protected onChangeExtension(): void;
|
|
309
|
-
setDescription(desc: string): void;
|
|
310
|
-
protected resetMetadata(): Promise<void>;
|
|
311
|
-
validate(): boolean;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
type TUploadModalOpener = (controller: UploaderModalController) => void;
|
|
315
|
-
type UploaderModalState = {
|
|
316
|
-
fileReqError: boolean;
|
|
317
|
-
metadata: {
|
|
318
|
-
metadataArray: TDocumentMetadata[];
|
|
319
|
-
isFreeMetadata: boolean;
|
|
320
|
-
freeMetadataArray: TDocumentMetadata[];
|
|
321
|
-
};
|
|
322
|
-
fromDirectoryFile: TApiaDocumentDefinition | null;
|
|
323
|
-
docFolder?: number;
|
|
324
|
-
docPath?: string;
|
|
325
|
-
docExpDate?: string;
|
|
326
|
-
description: string;
|
|
327
|
-
isReadonly?: boolean;
|
|
328
|
-
permissions: {
|
|
329
|
-
allowAllType: 'M' | 'R' | '';
|
|
330
|
-
users: IUsersPermissions[];
|
|
331
|
-
pools: IPoolsPermissions[];
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
type UploaderState = {
|
|
335
|
-
progress: number;
|
|
336
|
-
allowedTypes: TDocType[];
|
|
337
|
-
selectedDocTypeId: string;
|
|
338
|
-
versioningFile: TUploaderFileInfo | null;
|
|
339
|
-
inProgressFiles: File[];
|
|
340
|
-
hiddenFiles: File[];
|
|
341
|
-
files: Record<string, TUploaderFileInfo>;
|
|
342
|
-
translatedFiles: Map<string, Map<number, TUploaderFileInfo>>;
|
|
343
|
-
hasAllDocTypes?: boolean;
|
|
344
|
-
selectedFiles: string[];
|
|
345
|
-
};
|
|
346
|
-
interface IUsersPermissions {
|
|
347
|
-
userId: string;
|
|
348
|
-
userLogin: string;
|
|
349
|
-
canUpdate: boolean;
|
|
350
|
-
}
|
|
351
|
-
interface IPoolsPermissions {
|
|
352
|
-
poolId: string;
|
|
353
|
-
poolName: string;
|
|
354
|
-
canUpdate: boolean;
|
|
355
|
-
}
|
|
356
|
-
type TUploaderFileInfo = Omit<TFileUploaded, 'locked' | 'userLocking'> & {
|
|
357
|
-
canEdit?: boolean;
|
|
358
|
-
canRead?: boolean;
|
|
359
|
-
isLocked: boolean;
|
|
360
|
-
locked?: boolean;
|
|
361
|
-
isLockedByMe: boolean;
|
|
362
|
-
isVirtual: boolean;
|
|
363
|
-
lockingUser: string;
|
|
364
|
-
};
|
|
365
|
-
type TFileUploaded = {
|
|
366
|
-
canEdit?: boolean;
|
|
367
|
-
canWrite?: boolean;
|
|
368
|
-
canRead?: boolean;
|
|
369
|
-
description?: string;
|
|
370
|
-
docDescription?: string;
|
|
371
|
-
docId: string;
|
|
372
|
-
docLang?: string;
|
|
373
|
-
docLangGroup?: string;
|
|
374
|
-
docName?: string;
|
|
375
|
-
docSize?: string;
|
|
376
|
-
docTypeFreeMetadata?: boolean;
|
|
377
|
-
docTypeId?: string;
|
|
378
|
-
docTypeLabel?: string;
|
|
379
|
-
docTypeTitle: string;
|
|
380
|
-
downloadDocId: string;
|
|
381
|
-
isMarkedToSign: boolean;
|
|
382
|
-
markedToSign: boolean;
|
|
383
|
-
lock?: string | boolean;
|
|
384
|
-
isLocked?: string | boolean;
|
|
385
|
-
lockedBy?: string;
|
|
386
|
-
name?: string;
|
|
387
|
-
onlyInformation: boolean;
|
|
388
|
-
prefix: string;
|
|
389
|
-
preview: string;
|
|
390
|
-
sign?: string | boolean;
|
|
391
|
-
size?: string;
|
|
392
|
-
userLocking: string;
|
|
393
|
-
virtualDoc?: boolean;
|
|
394
|
-
locked?: boolean;
|
|
395
|
-
};
|
|
396
|
-
type TAjaxUploadStart = TApiaLoad<TApiaFunction<{
|
|
397
|
-
general: {
|
|
398
|
-
isDocTypeDisabled: boolean;
|
|
399
|
-
useDocTypePermitted: boolean;
|
|
400
|
-
createMode: boolean;
|
|
401
|
-
allowAllTypes: string;
|
|
402
|
-
allDocTypes: boolean;
|
|
403
|
-
};
|
|
404
|
-
docTypes: {
|
|
405
|
-
docType: TDocType | TDocType[];
|
|
406
|
-
};
|
|
407
|
-
metadatas: {
|
|
408
|
-
metadata: TDocumentMetadata | TDocumentMetadata[];
|
|
409
|
-
};
|
|
410
|
-
}, false>>;
|
|
411
|
-
type TDocType = {
|
|
412
|
-
docExts: string;
|
|
413
|
-
maxSize: number;
|
|
414
|
-
id: string;
|
|
415
|
-
title: string;
|
|
416
|
-
free: boolean;
|
|
417
|
-
selected: boolean;
|
|
418
|
-
};
|
|
419
|
-
type TDocumentMetadata = {
|
|
420
|
-
free: string;
|
|
421
|
-
id: string;
|
|
422
|
-
name: string;
|
|
423
|
-
required: 'Y' | 'N';
|
|
424
|
-
title: string;
|
|
425
|
-
type: 'S' | 'N' | 'D';
|
|
426
|
-
value: string;
|
|
427
|
-
errorMessage: string;
|
|
428
|
-
labelErrorMessage: string;
|
|
429
|
-
};
|
|
430
|
-
type TModalConfig = {
|
|
431
|
-
allowDocumentsMonitor: boolean;
|
|
432
|
-
collapsePermissions: boolean;
|
|
433
|
-
collapseDirectories: boolean;
|
|
434
|
-
collapseMetadata: boolean;
|
|
435
|
-
monitorId?: number;
|
|
436
|
-
oneClickUpload: boolean;
|
|
437
|
-
rootFolder?: string;
|
|
438
|
-
showExpDate: boolean;
|
|
439
|
-
showPermissions: boolean;
|
|
440
|
-
showMetadata: boolean;
|
|
441
|
-
translationId?: string;
|
|
442
|
-
allowPickFromDirectories: boolean;
|
|
443
|
-
showDirectoriesStructure: boolean;
|
|
444
|
-
defaultDirectory?: number;
|
|
445
|
-
/**
|
|
446
|
-
* Renderers
|
|
447
|
-
*
|
|
448
|
-
* Due to avoid react policy on controllers we cannot declare ReactComponent here.
|
|
449
|
-
*/
|
|
450
|
-
renderers?: {
|
|
451
|
-
FolderIconRenderer?: any;
|
|
452
|
-
FileIconRenderer: any;
|
|
453
|
-
LoadMoreRenderer?: any;
|
|
454
|
-
LockedFolderIconRenderer?: any;
|
|
455
|
-
};
|
|
456
|
-
};
|
|
457
|
-
type TUploaderLoadCurrentFunctionMessages = {
|
|
458
|
-
allowSign: boolean;
|
|
459
|
-
allowLock: boolean;
|
|
460
|
-
allowMultiple: boolean;
|
|
461
|
-
readOnly: boolean;
|
|
462
|
-
};
|
|
463
|
-
type TSaveDroppedFilesConf = {
|
|
464
|
-
langId?: number;
|
|
465
|
-
strictMode?: boolean;
|
|
466
|
-
translatingFile?: TUploaderFileInfo;
|
|
467
|
-
shouldReset?: boolean;
|
|
468
|
-
};
|
|
469
|
-
type TAjaxUploadFileStatus = TApiaLoad<TApiaFunction<{
|
|
470
|
-
message: {
|
|
471
|
-
label: string;
|
|
472
|
-
name: string;
|
|
473
|
-
}[];
|
|
474
|
-
}>>;
|
|
475
|
-
type TProcessDroppedFiles = TApiaLoad<TApiaFunction<{
|
|
476
|
-
principal: {
|
|
477
|
-
docInfo: TDocInfo | TDocInfo[];
|
|
478
|
-
docTypes: {
|
|
479
|
-
'data-free': boolean;
|
|
480
|
-
docTypeExtensions: string;
|
|
481
|
-
docTypeId: string;
|
|
482
|
-
docTypeMaxSize: number;
|
|
483
|
-
docTypeName: string;
|
|
484
|
-
};
|
|
485
|
-
elemInfo: {
|
|
486
|
-
elemId: string;
|
|
487
|
-
elemType: string;
|
|
488
|
-
};
|
|
489
|
-
};
|
|
490
|
-
}, false>>;
|
|
491
|
-
type TDocInfo = {
|
|
492
|
-
docInfoName: string;
|
|
493
|
-
docInfoSize: string;
|
|
494
|
-
docInfoTmpId: string;
|
|
495
|
-
docInfoType: string;
|
|
496
|
-
};
|
|
497
|
-
type TConfirmDropModal = TApiaLoad<TApiaFunction<{
|
|
498
|
-
general: TFileUploaded | TFileUploaded[];
|
|
499
|
-
fromForm: {
|
|
500
|
-
fromForm: {
|
|
501
|
-
fromForm: boolean;
|
|
502
|
-
}[];
|
|
503
|
-
};
|
|
504
|
-
}, false>>;
|
|
505
|
-
type TApiaDocumentDefinition = {
|
|
506
|
-
docDesc: string;
|
|
507
|
-
docTypeLabel: string;
|
|
508
|
-
docId: string;
|
|
509
|
-
prefix: string;
|
|
510
|
-
docSize: string;
|
|
511
|
-
docDate: string;
|
|
512
|
-
docDwnExternal: string;
|
|
513
|
-
docExpDate: string;
|
|
514
|
-
docFolder: string;
|
|
515
|
-
docFolderPath: string;
|
|
516
|
-
docUsu: string;
|
|
517
|
-
docAllPoolPerm: 'M' | 'R' | '';
|
|
518
|
-
docName: string;
|
|
519
|
-
docTypeId: string;
|
|
520
|
-
locked: boolean;
|
|
521
|
-
downloadDocId: string;
|
|
522
|
-
};
|
|
523
|
-
type TUploaderLoadCurrentFunction = {
|
|
524
|
-
general?: TFileUploaded | TFileUploaded[];
|
|
525
|
-
messages: {
|
|
526
|
-
message: {
|
|
527
|
-
name: keyof TUploaderLoadCurrentFunctionMessages;
|
|
528
|
-
label: boolean;
|
|
529
|
-
} | {
|
|
530
|
-
name: keyof TUploaderLoadCurrentFunctionMessages;
|
|
531
|
-
label: boolean;
|
|
532
|
-
}[];
|
|
533
|
-
};
|
|
534
|
-
};
|
|
535
|
-
type TDocumentInformation = TApiaLoad<TApiaFunction<{
|
|
536
|
-
data: {
|
|
537
|
-
onClose: string;
|
|
538
|
-
general: TApiaDocumentDefinition;
|
|
539
|
-
permissions: {
|
|
540
|
-
pool: TDocumentPermission | TDocumentPermission[];
|
|
541
|
-
user: TDocumentPermission | TDocumentPermission[];
|
|
542
|
-
};
|
|
543
|
-
versions: {
|
|
544
|
-
version: TDocumentVersion | TDocumentVersion[];
|
|
545
|
-
};
|
|
546
|
-
};
|
|
547
|
-
currentUsrPems: {
|
|
548
|
-
usrCanModify: boolean;
|
|
549
|
-
};
|
|
550
|
-
metadatas: {
|
|
551
|
-
metadata: TDocumentMetadata | TDocumentMetadata[];
|
|
552
|
-
};
|
|
553
|
-
docDownHistory: {
|
|
554
|
-
docHistory: TDocumentDownloadHistory | TDocumentDownloadHistory[];
|
|
555
|
-
};
|
|
556
|
-
}, false>>;
|
|
557
|
-
type TDocumentPermission = {
|
|
558
|
-
id: string;
|
|
559
|
-
name: string;
|
|
560
|
-
permType: 'R' | 'M';
|
|
561
|
-
};
|
|
562
|
-
type TDocumentDownloadHistory = {
|
|
563
|
-
hisDwn: string;
|
|
564
|
-
hisUsr: string;
|
|
565
|
-
hisVer: string;
|
|
566
|
-
};
|
|
567
|
-
type TDocumentVersion = {
|
|
568
|
-
verUser: string;
|
|
569
|
-
verNumber: string;
|
|
570
|
-
verDate: string;
|
|
571
|
-
};
|
|
572
|
-
type TRequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
573
|
-
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
574
|
-
}[Keys];
|
|
575
|
-
interface UploadContext extends ApiContext {
|
|
576
|
-
currentUserLogin: string;
|
|
577
|
-
docLangs: string;
|
|
578
|
-
everyoneCanUpdate: boolean;
|
|
579
|
-
openModal: () => unknown;
|
|
580
|
-
ownerCanUpdate: boolean;
|
|
581
|
-
readonly: boolean;
|
|
582
|
-
allowTranslation: boolean;
|
|
583
|
-
IN_MONITOR: boolean;
|
|
584
|
-
WEBDAV_SERVER: string;
|
|
585
|
-
WEBDAV_INSTALLER_URL: string;
|
|
586
|
-
ITHit: any;
|
|
587
|
-
}
|
|
588
|
-
type TOnUploadProgress = (progress: number) => void;
|
|
589
|
-
|
|
590
|
-
declare const parseFileDefinition: (context: UploadContext, fileDefinition: TFileUploaded | TUploaderFileInfo, isSignRequired: boolean) => TUploaderFileInfo;
|
|
591
|
-
|
|
592
|
-
declare class FilePicker extends DirectoriesPicker {
|
|
593
|
-
constructor(api: UploaderApi);
|
|
594
|
-
getNodeHandler(nodeProps: TCreateTreeNode): DirectoryPickerFolderNode;
|
|
595
|
-
getFolderStructureParams(): any;
|
|
596
|
-
parseStructureResponse(res: any): TFolderStructure[] | null;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
declare class FilePickerFolderNode extends DirectoryPickerFolderNode {
|
|
600
|
-
private params;
|
|
601
|
-
constructor(parent: DirectoryPickerFolderNode | DirectoriesPicker, props: TCreateTreeNode, params?: Record<string, unknown>);
|
|
602
|
-
loadMore(focus?: boolean): Promise<void>;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
declare const DirectoryPickerActions: {
|
|
606
|
-
ajaxUrl: (api: UploaderApi) => string;
|
|
607
|
-
loadFolderStructure: string;
|
|
608
|
-
loadFilesForFolder: string;
|
|
609
|
-
};
|
|
610
|
-
declare const FilePickerActions: {
|
|
611
|
-
ajaxUrl: string;
|
|
612
|
-
loadFileSystemStructureTree: string;
|
|
613
|
-
loadFilesForFolder: string;
|
|
614
|
-
loadFolderStructure: string;
|
|
615
|
-
};
|
|
616
|
-
declare function makeId(str: string): string;
|
|
617
|
-
|
|
618
|
-
export { DirectoriesPicker, DirectoryPickerActions, DirectoryPickerFolderNode, DocumentNode, FilePicker, FilePickerActions, FilePickerFolderNode, type IPoolsPermissions, type IUsersPermissions, type TAjaxUploadFileStatus, type TAjaxUploadStart, type TApiaDocumentDefinition, type TConfirmDropModal, type TCreateTreeNode, type TDirectoriesPickerResponse, type TDocInfo, type TDocType, type TDocumentDownloadHistory, type TDocumentInformation, type TDocumentMetadata, type TDocumentPermission, type TDocumentStructure, type TDocumentVersion, type TFilePickerProps, type TFileUploaded, type TFilesPickerResponse, type TFolderStructure, type TModalConfig, type TOnUploadProgress, type TProcessDroppedFiles, type TRequireOnlyOne, type TSaveDroppedFilesConf, type TUploadModalOpener, type TUploaderFileInfo, type TUploaderLoadCurrentFunction, type TUploaderLoadCurrentFunctionMessages, type UploadContext, UploaderApi, UploaderModalController, type UploaderModalState, type UploaderState, makeId, parseFileDefinition };
|
|
1
|
+
export { IPoolsPermissions, IUsersPermissions, TAjaxUploadFileStatus, TAjaxUploadStart, TApiaDocumentDefinition, TConfirmDropModal, TDocInfo, TDocType, TDocumentDownloadHistory, TDocumentInformation, TDocumentMetadata, TDocumentPermission, TDocumentVersion, TFileUploaded, TModalConfig, TOnUploadProgress, TProcessDroppedFiles, TRequireOnlyOne, TSaveDroppedFilesConf, TUploadModalOpener, TUploaderFileInfo, TUploaderLoadCurrentFunction, TUploaderLoadCurrentFunctionMessages, UploadContext, UploaderModalState, UploaderState } from './types.js';
|
|
2
|
+
export { UploaderApi } from './UploaderApi.js';
|
|
3
|
+
export { UploaderModalController } from './UploaderModalController.js';
|
|
4
|
+
export { parseFileDefinition } from './util.js';
|
|
5
|
+
export { DirectoriesPicker } from './directories/DirectoriesPicker.js';
|
|
6
|
+
export { FilePicker } from './directories/FilePicker.js';
|
|
7
|
+
export { DirectoryPickerFolderNode } from './directories/nodes/DirectoryPickerFolderNode.js';
|
|
8
|
+
export { DocumentNode } from './directories/nodes/DocumentNode.js';
|
|
9
|
+
export { FilePickerFolderNode } from './directories/nodes/FilePickerFolderNode.js';
|
|
10
|
+
export { TCreateTreeNode, TDirectoriesPickerResponse, TDocumentStructure, TFilePickerProps, TFilesPickerResponse, TFolderStructure } from './directories/types.js';
|
|
11
|
+
export { DirectoryPickerActions, FilePickerActions, makeId } from './directories/utils.js';
|
|
619
12
|
//# sourceMappingURL=index.d.ts.map
|