inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* @module modules/file-browser
*/
import type { IFileBrowser } from "../../../types/index";
/**
* Removes a file from the server
* @private
*/
export declare function deleteFile(fb: IFileBrowser, name: string, source: string): Promise<void>;

View File

@@ -0,0 +1,17 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* Removes a file from the server
* @private
*/
export function deleteFile(fb, name, source) {
return fb.dataProvider
.fileRemove(fb.state.currentPath, name, source)
.then(message => {
fb.status(message || fb.i18n('File "%s" was deleted', name), true);
})
.catch(fb.status);
}

View File

@@ -0,0 +1,14 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* @module modules/file-browser
*/
import type { IFileBrowser } from "../../../types/index";
/**
* Loads a list of files and adds them to the state
* @private
*/
export declare function loadItems(fb: IFileBrowser): Promise<any>;

View File

@@ -0,0 +1,27 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* Loads a list of files and adds them to the state
* @private
*/
export function loadItems(fb) {
fb.files.setMod('active', true);
fb.files.setMod('loading', true);
return fb.dataProvider
.items(fb.state.currentPath, fb.state.currentSource, {
sortBy: fb.state.sortBy,
onlyImages: fb.state.onlyImages,
filterWord: fb.state.filterWord
})
.then(resp => {
if (resp) {
fb.state.elements = resp;
fb.state.activeElements = [];
}
})
.catch(fb.status)
.finally(() => fb.files.setMod('loading', false));
}

View File

@@ -0,0 +1,14 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* @module modules/file-browser
*/
import type { IFileBrowser } from "../../../types/index";
/**
* Loads a list of directories
* @private
*/
export declare function loadTree(fb: IFileBrowser): Promise<any>;

View File

@@ -0,0 +1,29 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import { Dom } from "../../../core/dom/index.js";
import { loadItems } from "./load-items.js";
/**
* Loads a list of directories
* @private
*/
export async function loadTree(fb) {
fb.tree.setMod('active', true);
Dom.detach(fb.tree.container);
const items = loadItems(fb);
if (fb.o.showFoldersPanel) {
fb.tree.setMod('loading', true);
const tree = fb.dataProvider
.tree(fb.state.currentPath, fb.state.currentSource)
.then(resp => {
fb.state.sources = resp;
})
.catch(fb.status)
.finally(() => fb.tree.setMod('loading', false));
return Promise.all([tree, items]);
}
fb.tree.setMod('active', false);
return items;
}