lexgui 8.2.1 → 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 +1 -1
- package/build/extensions/AssetView.js +5 -5
- 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/CodeEditor.js +5054 -5054
- package/build/extensions/DocMaker.d.ts +28 -27
- package/build/extensions/DocMaker.js +49 -26
- package/build/extensions/DocMaker.js.map +1 -1
- package/build/extensions/Timeline.js +3948 -3948
- package/build/extensions/VideoEditor.d.ts +150 -150
- package/build/extensions/VideoEditor.js +1014 -1014
- package/build/lexgui.all.js +209 -120
- package/build/lexgui.all.js.map +1 -1
- package/build/lexgui.all.min.js +1 -1
- package/build/lexgui.all.module.js +209 -120
- package/build/lexgui.all.module.js.map +1 -1
- package/build/lexgui.all.module.min.js +1 -1
- package/build/lexgui.css +68 -54
- package/build/lexgui.js +153 -87
- 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 +153 -87
- package/build/lexgui.module.js.map +1 -1
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +29 -1
- package/demo.js +2 -2
- package/examples/all-components.html +16 -2
- package/examples/asset-view.html +1 -1
- package/examples/editor.html +8 -6
- package/examples/side-bar.html +3 -1
- 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;;;;"}
|
|
@@ -129,7 +129,7 @@ export declare class AssetView {
|
|
|
129
129
|
_renameItem(item: AssetViewItem, newName: string, data?: AssetViewItem[]): void;
|
|
130
130
|
_renameItemPopover(item: AssetViewItem): void;
|
|
131
131
|
_requestCreateFolder(folder?: AssetViewItem): void;
|
|
132
|
-
_createFolder(folder?: AssetViewItem): AssetViewItem;
|
|
132
|
+
_createFolder(folder?: AssetViewItem, newFolderName?: string): AssetViewItem;
|
|
133
133
|
_openScriptInEditor(script: any): void;
|
|
134
134
|
_setAssetsPerPage(n: number): void;
|
|
135
135
|
_lastModifiedToStringDate(lm: number): string;
|
|
@@ -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: () => {
|
|
@@ -1332,7 +1332,7 @@ class AssetView {
|
|
|
1332
1332
|
const onBeforeCreateFolder = this._callbacks['beforeCreateFolder'];
|
|
1333
1333
|
const onCreateFolder = this._callbacks['createFolder'];
|
|
1334
1334
|
const resolve = (...args) => {
|
|
1335
|
-
const newFolder = this._createFolder(folder);
|
|
1335
|
+
const newFolder = this._createFolder(folder, ...args);
|
|
1336
1336
|
const event = {
|
|
1337
1337
|
type: 'create-folder',
|
|
1338
1338
|
result: [newFolder],
|
|
@@ -1354,14 +1354,14 @@ class AssetView {
|
|
|
1354
1354
|
resolve();
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
_createFolder(folder) {
|
|
1357
|
+
_createFolder(folder, newFolderName) {
|
|
1358
1358
|
folder = folder ?? this.currentFolder;
|
|
1359
1359
|
if (!folder) {
|
|
1360
1360
|
throw ('_createFolder: Something went wrong!');
|
|
1361
1361
|
}
|
|
1362
1362
|
const dir = folder.children ?? folder;
|
|
1363
1363
|
const newFolder = {
|
|
1364
|
-
id: this._getClonedName('New Folder', dir),
|
|
1364
|
+
id: this._getClonedName(newFolderName ?? 'New Folder', dir),
|
|
1365
1365
|
type: 'folder',
|
|
1366
1366
|
children: [],
|
|
1367
1367
|
parent: this.currentFolder,
|
|
@@ -1373,7 +1373,7 @@ class AssetView {
|
|
|
1373
1373
|
if (this._moveItemDialog && this._movingItem) {
|
|
1374
1374
|
this._moveItem(this._movingItem, folder);
|
|
1375
1375
|
}
|
|
1376
|
-
return
|
|
1376
|
+
return newFolder;
|
|
1377
1377
|
}
|
|
1378
1378
|
_openScriptInEditor(script) {
|
|
1379
1379
|
if (this._scriptCodeDialog) {
|