lexgui 8.2.2 → 8.2.3
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/build/components/BaseComponent.d.ts +75 -73
- package/build/components/Form.d.ts +14 -8
- package/build/components/TextInput.d.ts +13 -11
- package/build/core/Namespace.js +1 -1
- package/build/core/Namespace.js.map +1 -1
- package/build/extensions/AssetView.d.ts +137 -137
- package/build/extensions/AssetView.js +1 -1
- package/build/extensions/AssetView.js.map +1 -1
- package/build/extensions/Audio.js +163 -163
- package/build/extensions/Audio.js.map +1 -1
- package/build/extensions/DocMaker.d.ts +28 -27
- package/build/extensions/DocMaker.js +354 -331
- package/build/extensions/DocMaker.js.map +1 -1
- package/build/lexgui.all.js +204 -115
- package/build/lexgui.all.js.map +1 -1
- package/build/lexgui.all.min.js +1 -1
- package/build/lexgui.all.module.js +204 -115
- package/build/lexgui.all.module.js.map +1 -1
- package/build/lexgui.all.module.min.js +1 -1
- package/build/lexgui.css +55 -44
- package/build/lexgui.js +152 -86
- package/build/lexgui.js.map +1 -1
- package/build/lexgui.min.css +2 -2
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +152 -86
- package/build/lexgui.module.js.map +1 -1
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +19 -1
- package/demo.js +2 -2
- package/examples/all-components.html +15 -1
- package/examples/editor.html +8 -6
- package/package.json +1 -1
|
@@ -1,73 +1,75 @@
|
|
|
1
|
-
export declare enum ComponentType {
|
|
2
|
-
NONE = 0,
|
|
3
|
-
TEXT = 1,
|
|
4
|
-
TEXTAREA = 2,
|
|
5
|
-
BUTTON = 3,
|
|
6
|
-
SELECT = 4,
|
|
7
|
-
CHECKBOX = 5,
|
|
8
|
-
TOGGLE = 6,
|
|
9
|
-
RADIO = 7,
|
|
10
|
-
BUTTONS = 8,
|
|
11
|
-
COLOR = 9,
|
|
12
|
-
RANGE = 10,
|
|
13
|
-
NUMBER = 11,
|
|
14
|
-
TITLE = 12,
|
|
15
|
-
VECTOR = 13,
|
|
16
|
-
TREE = 14,
|
|
17
|
-
PROGRESS = 15,
|
|
18
|
-
FILE = 16,
|
|
19
|
-
LAYERS = 17,
|
|
20
|
-
ARRAY = 18,
|
|
21
|
-
LIST = 19,
|
|
22
|
-
TAGS = 20,
|
|
23
|
-
CURVE = 21,
|
|
24
|
-
CARD = 22,
|
|
25
|
-
IMAGE = 23,
|
|
26
|
-
CONTENT = 24,
|
|
27
|
-
CUSTOM = 25,
|
|
28
|
-
SEPARATOR = 26,
|
|
29
|
-
KNOB = 27,
|
|
30
|
-
SIZE = 28,
|
|
31
|
-
OTP = 29,
|
|
32
|
-
PAD = 30,
|
|
33
|
-
FORM = 31,
|
|
34
|
-
DIAL = 32,
|
|
35
|
-
COUNTER = 33,
|
|
36
|
-
TABLE = 34,
|
|
37
|
-
TABS = 35,
|
|
38
|
-
DATE = 36,
|
|
39
|
-
MAP2D = 37,
|
|
40
|
-
LABEL = 39,
|
|
41
|
-
BLANK = 40,
|
|
42
|
-
RATE = 41
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* @class BaseComponent
|
|
46
|
-
*/
|
|
47
|
-
export declare class BaseComponent {
|
|
48
|
-
type: ComponentType;
|
|
49
|
-
name: string | null | undefined;
|
|
50
|
-
customName?: string;
|
|
51
|
-
options: any;
|
|
52
|
-
root: any;
|
|
53
|
-
customIdx: number;
|
|
54
|
-
disabled: boolean;
|
|
55
|
-
onSetValue?: (v: any, b?: boolean, e?: any) => void;
|
|
56
|
-
onGetValue?: () => any;
|
|
57
|
-
onAllowPaste?: (b: boolean) => boolean;
|
|
58
|
-
onResize: (r?: any) => void;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
1
|
+
export declare enum ComponentType {
|
|
2
|
+
NONE = 0,
|
|
3
|
+
TEXT = 1,
|
|
4
|
+
TEXTAREA = 2,
|
|
5
|
+
BUTTON = 3,
|
|
6
|
+
SELECT = 4,
|
|
7
|
+
CHECKBOX = 5,
|
|
8
|
+
TOGGLE = 6,
|
|
9
|
+
RADIO = 7,
|
|
10
|
+
BUTTONS = 8,
|
|
11
|
+
COLOR = 9,
|
|
12
|
+
RANGE = 10,
|
|
13
|
+
NUMBER = 11,
|
|
14
|
+
TITLE = 12,
|
|
15
|
+
VECTOR = 13,
|
|
16
|
+
TREE = 14,
|
|
17
|
+
PROGRESS = 15,
|
|
18
|
+
FILE = 16,
|
|
19
|
+
LAYERS = 17,
|
|
20
|
+
ARRAY = 18,
|
|
21
|
+
LIST = 19,
|
|
22
|
+
TAGS = 20,
|
|
23
|
+
CURVE = 21,
|
|
24
|
+
CARD = 22,
|
|
25
|
+
IMAGE = 23,
|
|
26
|
+
CONTENT = 24,
|
|
27
|
+
CUSTOM = 25,
|
|
28
|
+
SEPARATOR = 26,
|
|
29
|
+
KNOB = 27,
|
|
30
|
+
SIZE = 28,
|
|
31
|
+
OTP = 29,
|
|
32
|
+
PAD = 30,
|
|
33
|
+
FORM = 31,
|
|
34
|
+
DIAL = 32,
|
|
35
|
+
COUNTER = 33,
|
|
36
|
+
TABLE = 34,
|
|
37
|
+
TABS = 35,
|
|
38
|
+
DATE = 36,
|
|
39
|
+
MAP2D = 37,
|
|
40
|
+
LABEL = 39,
|
|
41
|
+
BLANK = 40,
|
|
42
|
+
RATE = 41
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @class BaseComponent
|
|
46
|
+
*/
|
|
47
|
+
export declare class BaseComponent {
|
|
48
|
+
type: ComponentType;
|
|
49
|
+
name: string | null | undefined;
|
|
50
|
+
customName?: string;
|
|
51
|
+
options: any;
|
|
52
|
+
root: any;
|
|
53
|
+
customIdx: number;
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
onSetValue?: (v: any, b?: boolean, e?: any) => void;
|
|
56
|
+
onGetValue?: () => any;
|
|
57
|
+
onAllowPaste?: (b: boolean) => boolean;
|
|
58
|
+
onResize: (r?: any) => void;
|
|
59
|
+
onSetDisabled?: (disabled?: boolean) => void;
|
|
60
|
+
_initialValue: any;
|
|
61
|
+
static NO_CONTEXT_TYPES: ComponentType[];
|
|
62
|
+
constructor(type: ComponentType, name?: string | null | undefined, value?: any, options?: any);
|
|
63
|
+
static _dispatchEvent(element: any, type: any, data?: any, bubbles?: any, cancelable?: any): void;
|
|
64
|
+
_addResetProperty(container: any, callback: any): any;
|
|
65
|
+
_canPaste(): boolean;
|
|
66
|
+
_trigger(event: any, callback: any, scope?: any): void;
|
|
67
|
+
value(): any;
|
|
68
|
+
set(value: any, skipCallback?: boolean, event?: any): void;
|
|
69
|
+
oncontextmenu(e: any): void;
|
|
70
|
+
copy(): void;
|
|
71
|
+
paste(): void;
|
|
72
|
+
typeName(): string | undefined;
|
|
73
|
+
setDisabled(disabled: boolean): void;
|
|
74
|
+
refresh(value?: any): void;
|
|
75
|
+
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { BaseComponent } from './BaseComponent';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { BaseComponent } from './BaseComponent';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
/**
|
|
4
|
+
* @class Form
|
|
5
|
+
* @description Form Component
|
|
6
|
+
*/
|
|
7
|
+
export declare class Form extends BaseComponent {
|
|
8
|
+
data: any;
|
|
9
|
+
formData: any;
|
|
10
|
+
primaryButton: Button | undefined;
|
|
11
|
+
constructor(name: string, data: any, callback: any, options?: any);
|
|
12
|
+
submit(): void;
|
|
13
|
+
syncInputs(): void;
|
|
14
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { BaseComponent } from './BaseComponent';
|
|
2
|
-
/**
|
|
3
|
-
* @class TextInput
|
|
4
|
-
* @description TextInput Component
|
|
5
|
-
*/
|
|
6
|
-
export declare class TextInput extends BaseComponent {
|
|
7
|
-
valid: (s: string, m?: string) => boolean;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { BaseComponent } from './BaseComponent';
|
|
2
|
+
/**
|
|
3
|
+
* @class TextInput
|
|
4
|
+
* @description TextInput Component
|
|
5
|
+
*/
|
|
6
|
+
export declare class TextInput extends BaseComponent {
|
|
7
|
+
valid: (s: string, m?: string) => boolean;
|
|
8
|
+
input: HTMLInputElement | HTMLAnchorElement;
|
|
9
|
+
_triggerEvent: Event | undefined;
|
|
10
|
+
_lastValueTriggered?: any;
|
|
11
|
+
constructor(name: string | null, value?: string, callback?: any, options?: any);
|
|
12
|
+
syncFromDOM(skipCallback?: boolean): void;
|
|
13
|
+
}
|
package/build/core/Namespace.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Namespace.js","sources":["../../src/core/Namespace.ts"],"sourcesContent":["// Namespace.ts @jxarco\r\n\r\n/**\r\n * Main namespace\r\n * @namespace LX\r\n */\r\n\r\nconst g = globalThis as any;\r\n\r\n// Update global namespace if not present (Loading module)\r\n// Extension scripts rely on LX being globally available\r\nlet LX: any = g.LX;\r\n\r\nif ( !LX )\r\n{\r\n LX = {\r\n version: '8.2.
|
|
1
|
+
{"version":3,"file":"Namespace.js","sources":["../../src/core/Namespace.ts"],"sourcesContent":["// Namespace.ts @jxarco\r\n\r\n/**\r\n * Main namespace\r\n * @namespace LX\r\n */\r\n\r\nconst g = globalThis as any;\r\n\r\n// Update global namespace if not present (Loading module)\r\n// Extension scripts rely on LX being globally available\r\nlet LX: any = g.LX;\r\n\r\nif ( !LX )\r\n{\r\n LX = {\r\n version: '8.2.3',\r\n ready: false,\r\n extensions: [], // Store extensions used\r\n extraCommandbarEntries: [], // User specific entries for command bar\r\n signals: {}, // Events and triggers\r\n activeDraggable: null, // Watch for the current active draggable\r\n\r\n spacingMode: 'default',\r\n layoutMode: 'app',\r\n\r\n MOUSE_LEFT_CLICK: 0,\r\n MOUSE_MIDDLE_CLICK: 1,\r\n MOUSE_RIGHT_CLICK: 2,\r\n\r\n MOUSE_DOUBLE_CLICK: 2,\r\n MOUSE_TRIPLE_CLICK: 3,\r\n\r\n CURVE_MOVEOUT_CLAMP: 0,\r\n CURVE_MOVEOUT_DELETE: 1,\r\n\r\n DRAGGABLE_Z_INDEX: 101\r\n };\r\n\r\n g.LX = LX;\r\n}\r\n\r\nexport { LX };\r\n"],"names":[],"mappings":";AAAA;AAEA;;;AAGG;AAEH,MAAM,CAAC,GAAG,UAAiB;AAE3B;AACA;AACA,IAAI,EAAE,GAAQ,CAAC,CAAC;AAEhB,IAAK,CAAC,EAAE,EACR;AACI,IAAA,EAAE,GAAG;AACD,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,KAAK,EAAE,KAAK;QACZ,UAAU,EAAE,EAAE;QACd,sBAAsB,EAAE,EAAE;QAC1B,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,IAAI;AAErB,QAAA,WAAW,EAAE,SAAS;AACtB,QAAA,UAAU,EAAE,KAAK;AAEjB,QAAA,gBAAgB,EAAE,CAAC;AACnB,QAAA,kBAAkB,EAAE,CAAC;AACrB,QAAA,iBAAiB,EAAE,CAAC;AAEpB,QAAA,kBAAkB,EAAE,CAAC;AACrB,QAAA,kBAAkB,EAAE,CAAC;AAErB,QAAA,mBAAmB,EAAE,CAAC;AACtB,QAAA,oBAAoB,EAAE,CAAC;AAEvB,QAAA,iBAAiB,EAAE;KACtB;AAED,IAAA,CAAC,CAAC,EAAE,GAAG,EAAE;AACb;;;;"}
|
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import { LX } from '../core/Namespace';
|
|
2
|
-
declare const Area: any;
|
|
3
|
-
declare const Panel: any;
|
|
4
|
-
declare const NodeTree: any;
|
|
5
|
-
declare const Tree: any;
|
|
6
|
-
export type AssetViewAction = 'select' | 'dbl_click' | 'check' | 'clone' | 'move' | 'delete' | 'rename' | 'enter_folder' | 'create-folder' | 'refresh-content' | 'node-drag';
|
|
7
|
-
export interface AssetViewItem {
|
|
8
|
-
id: string;
|
|
9
|
-
type: string;
|
|
10
|
-
children: AssetViewItem[];
|
|
11
|
-
parent?: AssetViewItem;
|
|
12
|
-
path?: string;
|
|
13
|
-
src?: string;
|
|
14
|
-
dir?: AssetViewItem[];
|
|
15
|
-
domEl?: HTMLElement;
|
|
16
|
-
metadata: any;
|
|
17
|
-
}
|
|
18
|
-
interface AssetViewEvent {
|
|
19
|
-
type: AssetViewAction;
|
|
20
|
-
items?: AssetViewItem[];
|
|
21
|
-
result?: AssetViewItem[];
|
|
22
|
-
from?: AssetViewItem;
|
|
23
|
-
to?: AssetViewItem;
|
|
24
|
-
where?: AssetViewItem;
|
|
25
|
-
oldName?: string;
|
|
26
|
-
newName?: string;
|
|
27
|
-
search?: any[];
|
|
28
|
-
userInitiated: boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Signature for cancelable events.
|
|
32
|
-
* `resolve()` MUST be called by the user to perform the UI action
|
|
33
|
-
*/
|
|
34
|
-
export type AssetViewEventCallback = (event: AssetViewEvent, resolve?: (...args: any[]) => void) => boolean | void | Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* @class AssetView
|
|
37
|
-
* @description Asset container with Tree for file system
|
|
38
|
-
*/
|
|
39
|
-
export declare class AssetView {
|
|
40
|
-
static LAYOUT_GRID: number;
|
|
41
|
-
static LAYOUT_COMPACT: number;
|
|
42
|
-
static LAYOUT_LIST: number;
|
|
43
|
-
static CONTENT_SORT_ASC: number;
|
|
44
|
-
static CONTENT_SORT_DESC: number;
|
|
45
|
-
root: HTMLElement;
|
|
46
|
-
area: typeof Area | null;
|
|
47
|
-
content: HTMLElement;
|
|
48
|
-
leftPanel: typeof Panel | null;
|
|
49
|
-
toolsPanel: any;
|
|
50
|
-
contentPanel: any;
|
|
51
|
-
previewPanel: any;
|
|
52
|
-
tree: typeof NodeTree | null;
|
|
53
|
-
prevData: AssetViewItem[];
|
|
54
|
-
nextData: AssetViewItem[];
|
|
55
|
-
data: AssetViewItem[];
|
|
56
|
-
currentData: AssetViewItem[];
|
|
57
|
-
currentFolder: AssetViewItem | undefined;
|
|
58
|
-
rootItem: AssetViewItem;
|
|
59
|
-
path: string[];
|
|
60
|
-
rootPath: string;
|
|
61
|
-
selectedItem: AssetViewItem | undefined;
|
|
62
|
-
allowedTypes: any;
|
|
63
|
-
searchValue: string;
|
|
64
|
-
filter: string;
|
|
65
|
-
gridScale: number;
|
|
66
|
-
layout: number;
|
|
67
|
-
sortMode: number;
|
|
68
|
-
skipBrowser: boolean;
|
|
69
|
-
skipPreview: boolean;
|
|
70
|
-
useNativeTitle: boolean;
|
|
71
|
-
onlyFolders: boolean;
|
|
72
|
-
allowMultipleSelection: boolean;
|
|
73
|
-
previewActions: any[];
|
|
74
|
-
contextMenu: any[];
|
|
75
|
-
itemContextMenuOptions: any;
|
|
76
|
-
private _assetsPerPage;
|
|
77
|
-
get assetsPerPage(): any;
|
|
78
|
-
set assetsPerPage(v: any);
|
|
79
|
-
_callbacks: Record<string, AssetViewEventCallback>;
|
|
80
|
-
_lastSortBy: string;
|
|
81
|
-
_paginator: typeof LX.Pagination | undefined;
|
|
82
|
-
_scriptCodeDialog: typeof LX.Dialog | undefined;
|
|
83
|
-
_moveItemDialog: typeof LX.Dialog | undefined;
|
|
84
|
-
_movingItem: AssetViewItem | undefined;
|
|
85
|
-
constructor(options?: any);
|
|
86
|
-
/**
|
|
87
|
-
* @method on
|
|
88
|
-
* @description Stores an event callback for the desired action
|
|
89
|
-
*/
|
|
90
|
-
on(eventName: string, callback: AssetViewEventCallback): void;
|
|
91
|
-
/**
|
|
92
|
-
* @method load
|
|
93
|
-
* @description Loads and processes the input data
|
|
94
|
-
*/
|
|
95
|
-
load(data: any): void;
|
|
96
|
-
/**
|
|
97
|
-
* @method addItem
|
|
98
|
-
* @description Creates an item DOM element
|
|
99
|
-
*/
|
|
100
|
-
addItem(item: AssetViewItem, childIndex: number | undefined, updateTree?: boolean): HTMLLIElement;
|
|
101
|
-
/**
|
|
102
|
-
* @method clear
|
|
103
|
-
* @description Creates all AssetView container panels
|
|
104
|
-
*/
|
|
105
|
-
clear(): void;
|
|
106
|
-
_processData(data: any, parent?: AssetViewItem): void;
|
|
107
|
-
_updatePath(): void;
|
|
108
|
-
_createNavigationBar(panel: typeof Panel): void;
|
|
109
|
-
_createTreePanel(area: typeof Area): void;
|
|
110
|
-
_subscribeTreeEvents(tree: typeof Tree): void;
|
|
111
|
-
_setContentLayout(layoutMode: number): void;
|
|
112
|
-
_createContentPanel(area: typeof Area): void;
|
|
113
|
-
_makeNameFilterFn(searchValue: string): (name: string) => boolean;
|
|
114
|
-
_refreshContent(searchValue?: string, filter?: string, userInitiated?: boolean): void;
|
|
115
|
-
_previewAsset(file: AssetViewItem): void;
|
|
116
|
-
_processDrop(e: DragEvent): void;
|
|
117
|
-
_sortData(sortBy?: string, sortMode?: number): void;
|
|
118
|
-
_enterFolder(folderItem: AssetViewItem | undefined, storeCurrent?: boolean): Promise<void>;
|
|
119
|
-
_removeItemFromParent(item: AssetViewItem): boolean;
|
|
120
|
-
_requestDeleteItem(item: AssetViewItem): void;
|
|
121
|
-
_deleteItem(item: AssetViewItem): void;
|
|
122
|
-
_requestMoveItemToFolder(item: AssetViewItem, folder: AssetViewItem): void;
|
|
123
|
-
_moveItemToFolder(item: AssetViewItem, folder: AssetViewItem): void;
|
|
124
|
-
_moveItem(item: AssetViewItem, defaultFolder?: AssetViewItem | AssetViewItem[]): void;
|
|
125
|
-
_requestCloneItem(item: AssetViewItem): false | undefined;
|
|
126
|
-
_cloneItem(item: AssetViewItem): AssetViewItem;
|
|
127
|
-
_getClonedName(originalName: string, siblings: any[]): string;
|
|
128
|
-
_requestRenameItem(item: AssetViewItem, newName: string, treeEvent?: boolean): void;
|
|
129
|
-
_renameItem(item: AssetViewItem, newName: string, data?: AssetViewItem[]): void;
|
|
130
|
-
_renameItemPopover(item: AssetViewItem): void;
|
|
131
|
-
_requestCreateFolder(folder?: AssetViewItem): void;
|
|
132
|
-
_createFolder(folder?: AssetViewItem, newFolderName?: string): AssetViewItem;
|
|
133
|
-
_openScriptInEditor(script: any): void;
|
|
134
|
-
_setAssetsPerPage(n: number): void;
|
|
135
|
-
_lastModifiedToStringDate(lm: number): string;
|
|
136
|
-
}
|
|
137
|
-
export {};
|
|
1
|
+
import { LX } from '../core/Namespace';
|
|
2
|
+
declare const Area: any;
|
|
3
|
+
declare const Panel: any;
|
|
4
|
+
declare const NodeTree: any;
|
|
5
|
+
declare const Tree: any;
|
|
6
|
+
export type AssetViewAction = 'select' | 'dbl_click' | 'check' | 'clone' | 'move' | 'delete' | 'rename' | 'enter_folder' | 'create-folder' | 'refresh-content' | 'node-drag';
|
|
7
|
+
export interface AssetViewItem {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
children: AssetViewItem[];
|
|
11
|
+
parent?: AssetViewItem;
|
|
12
|
+
path?: string;
|
|
13
|
+
src?: string;
|
|
14
|
+
dir?: AssetViewItem[];
|
|
15
|
+
domEl?: HTMLElement;
|
|
16
|
+
metadata: any;
|
|
17
|
+
}
|
|
18
|
+
interface AssetViewEvent {
|
|
19
|
+
type: AssetViewAction;
|
|
20
|
+
items?: AssetViewItem[];
|
|
21
|
+
result?: AssetViewItem[];
|
|
22
|
+
from?: AssetViewItem;
|
|
23
|
+
to?: AssetViewItem;
|
|
24
|
+
where?: AssetViewItem;
|
|
25
|
+
oldName?: string;
|
|
26
|
+
newName?: string;
|
|
27
|
+
search?: any[];
|
|
28
|
+
userInitiated: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Signature for cancelable events.
|
|
32
|
+
* `resolve()` MUST be called by the user to perform the UI action
|
|
33
|
+
*/
|
|
34
|
+
export type AssetViewEventCallback = (event: AssetViewEvent, resolve?: (...args: any[]) => void) => boolean | void | Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* @class AssetView
|
|
37
|
+
* @description Asset container with Tree for file system
|
|
38
|
+
*/
|
|
39
|
+
export declare class AssetView {
|
|
40
|
+
static LAYOUT_GRID: number;
|
|
41
|
+
static LAYOUT_COMPACT: number;
|
|
42
|
+
static LAYOUT_LIST: number;
|
|
43
|
+
static CONTENT_SORT_ASC: number;
|
|
44
|
+
static CONTENT_SORT_DESC: number;
|
|
45
|
+
root: HTMLElement;
|
|
46
|
+
area: typeof Area | null;
|
|
47
|
+
content: HTMLElement;
|
|
48
|
+
leftPanel: typeof Panel | null;
|
|
49
|
+
toolsPanel: any;
|
|
50
|
+
contentPanel: any;
|
|
51
|
+
previewPanel: any;
|
|
52
|
+
tree: typeof NodeTree | null;
|
|
53
|
+
prevData: AssetViewItem[];
|
|
54
|
+
nextData: AssetViewItem[];
|
|
55
|
+
data: AssetViewItem[];
|
|
56
|
+
currentData: AssetViewItem[];
|
|
57
|
+
currentFolder: AssetViewItem | undefined;
|
|
58
|
+
rootItem: AssetViewItem;
|
|
59
|
+
path: string[];
|
|
60
|
+
rootPath: string;
|
|
61
|
+
selectedItem: AssetViewItem | undefined;
|
|
62
|
+
allowedTypes: any;
|
|
63
|
+
searchValue: string;
|
|
64
|
+
filter: string;
|
|
65
|
+
gridScale: number;
|
|
66
|
+
layout: number;
|
|
67
|
+
sortMode: number;
|
|
68
|
+
skipBrowser: boolean;
|
|
69
|
+
skipPreview: boolean;
|
|
70
|
+
useNativeTitle: boolean;
|
|
71
|
+
onlyFolders: boolean;
|
|
72
|
+
allowMultipleSelection: boolean;
|
|
73
|
+
previewActions: any[];
|
|
74
|
+
contextMenu: any[];
|
|
75
|
+
itemContextMenuOptions: any;
|
|
76
|
+
private _assetsPerPage;
|
|
77
|
+
get assetsPerPage(): any;
|
|
78
|
+
set assetsPerPage(v: any);
|
|
79
|
+
_callbacks: Record<string, AssetViewEventCallback>;
|
|
80
|
+
_lastSortBy: string;
|
|
81
|
+
_paginator: typeof LX.Pagination | undefined;
|
|
82
|
+
_scriptCodeDialog: typeof LX.Dialog | undefined;
|
|
83
|
+
_moveItemDialog: typeof LX.Dialog | undefined;
|
|
84
|
+
_movingItem: AssetViewItem | undefined;
|
|
85
|
+
constructor(options?: any);
|
|
86
|
+
/**
|
|
87
|
+
* @method on
|
|
88
|
+
* @description Stores an event callback for the desired action
|
|
89
|
+
*/
|
|
90
|
+
on(eventName: string, callback: AssetViewEventCallback): void;
|
|
91
|
+
/**
|
|
92
|
+
* @method load
|
|
93
|
+
* @description Loads and processes the input data
|
|
94
|
+
*/
|
|
95
|
+
load(data: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* @method addItem
|
|
98
|
+
* @description Creates an item DOM element
|
|
99
|
+
*/
|
|
100
|
+
addItem(item: AssetViewItem, childIndex: number | undefined, updateTree?: boolean): HTMLLIElement;
|
|
101
|
+
/**
|
|
102
|
+
* @method clear
|
|
103
|
+
* @description Creates all AssetView container panels
|
|
104
|
+
*/
|
|
105
|
+
clear(): void;
|
|
106
|
+
_processData(data: any, parent?: AssetViewItem): void;
|
|
107
|
+
_updatePath(): void;
|
|
108
|
+
_createNavigationBar(panel: typeof Panel): void;
|
|
109
|
+
_createTreePanel(area: typeof Area): void;
|
|
110
|
+
_subscribeTreeEvents(tree: typeof Tree): void;
|
|
111
|
+
_setContentLayout(layoutMode: number): void;
|
|
112
|
+
_createContentPanel(area: typeof Area): void;
|
|
113
|
+
_makeNameFilterFn(searchValue: string): (name: string) => boolean;
|
|
114
|
+
_refreshContent(searchValue?: string, filter?: string, userInitiated?: boolean): void;
|
|
115
|
+
_previewAsset(file: AssetViewItem): void;
|
|
116
|
+
_processDrop(e: DragEvent): void;
|
|
117
|
+
_sortData(sortBy?: string, sortMode?: number): void;
|
|
118
|
+
_enterFolder(folderItem: AssetViewItem | undefined, storeCurrent?: boolean): Promise<void>;
|
|
119
|
+
_removeItemFromParent(item: AssetViewItem): boolean;
|
|
120
|
+
_requestDeleteItem(item: AssetViewItem): void;
|
|
121
|
+
_deleteItem(item: AssetViewItem): void;
|
|
122
|
+
_requestMoveItemToFolder(item: AssetViewItem, folder: AssetViewItem): void;
|
|
123
|
+
_moveItemToFolder(item: AssetViewItem, folder: AssetViewItem): void;
|
|
124
|
+
_moveItem(item: AssetViewItem, defaultFolder?: AssetViewItem | AssetViewItem[]): void;
|
|
125
|
+
_requestCloneItem(item: AssetViewItem): false | undefined;
|
|
126
|
+
_cloneItem(item: AssetViewItem): AssetViewItem;
|
|
127
|
+
_getClonedName(originalName: string, siblings: any[]): string;
|
|
128
|
+
_requestRenameItem(item: AssetViewItem, newName: string, treeEvent?: boolean): void;
|
|
129
|
+
_renameItem(item: AssetViewItem, newName: string, data?: AssetViewItem[]): void;
|
|
130
|
+
_renameItemPopover(item: AssetViewItem): void;
|
|
131
|
+
_requestCreateFolder(folder?: AssetViewItem): void;
|
|
132
|
+
_createFolder(folder?: AssetViewItem, newFolderName?: string): AssetViewItem;
|
|
133
|
+
_openScriptInEditor(script: any): void;
|
|
134
|
+
_setAssetsPerPage(n: number): void;
|
|
135
|
+
_lastModifiedToStringDate(lm: number): string;
|
|
136
|
+
}
|
|
137
|
+
export {};
|
|
@@ -365,7 +365,7 @@ class AssetView {
|
|
|
365
365
|
options.push({ name: o.name, icon: o.icon, callback: o.callback?.bind(that, item) });
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
options.push(null, { name: 'Delete', icon: 'Trash2', className: '
|
|
368
|
+
options.push(null, { name: 'Delete', icon: 'Trash2', className: 'destructive',
|
|
369
369
|
callback: that._requestDeleteItem.bind(that, item) });
|
|
370
370
|
LX.addClass(that.contentPanel.root, 'pointer-events-none');
|
|
371
371
|
LX.addDropdownMenu(e.target, options, { side: 'right', align: 'start', event: e, onBlur: () => {
|