lexgui 0.6.1 → 0.6.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/changelog.md CHANGED
@@ -2,7 +2,32 @@
2
2
 
3
3
  ## dev
4
4
 
5
- ## 0.6.1 (master)
5
+ ## 0.6.3 (master)
6
+
7
+ Widgets:
8
+ - New Map2D Widget (For NNI).
9
+ - Fixed `NodeTree.select` when item is not shown.
10
+ - Fixed issue corrupting table body when manual sorting in Table Widget.
11
+
12
+ Fixed `autoTheme` on start with `dark` color scheme.
13
+ Improved Context Menu docs section.
14
+ Added a few more icon solid variants.
15
+ Minor fixes.
16
+
17
+ ## 0.6.2
18
+
19
+ Widgets:
20
+ - Fixed Title Widget class override.
21
+ - Fixed Select list focusout issue.
22
+ - Added `success` theme color to supported widgets.
23
+ - Table active filters are now displayed in each filter button.
24
+ - Added support for Range Filter in Table Widget.
25
+ - Fixed dragging over drag-icon location in Number&Vector Widget inputs.
26
+
27
+ Added a few more icon solid variants.
28
+ Minor CSS tweaks.
29
+
30
+ ## 0.6.1
6
31
 
7
32
  Widgets:
8
33
  - Support back `options.selected` in ComboButtons Widget as `ValueType|Array<ValueType>`.
package/demo.js CHANGED
@@ -7,6 +7,16 @@ window.LX = LX;
7
7
 
8
8
  const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
9
9
 
10
+ const map2Dpoints = [
11
+ { "name": "angry", "pos": [-0.29348334680286725,-0.8813498603327697] },
12
+ { "name": "happy", "pos": [0.5728906393051147,-0.2508566975593567] },
13
+ { "name": "sad", "pos": [-0.542498156289837,0.3795300176749039] },
14
+ { "name": "calm", "pos": [0.46099435955317536,0.6203009288162395] },
15
+ { "name": "bored", "pos": [-0.349232931016368,0.8103832270857154] },
16
+ { "name": "frustrated", "pos": [-0.49046521102390306,-0.5708814736724744] },
17
+ { "name": "smile", "pos": [0.5762101669277435,0.20211987262339348] },
18
+ { "name": "upset", "pos": [-0.5796645457655041,-0.1907168771335228] }
19
+ ];
10
20
 
11
21
  // Menubar
12
22
  {
@@ -173,7 +183,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
173
183
  'actions': [
174
184
  {
175
185
  'name': 'Open script',
176
- 'icon': 'Script'
186
+ 'icon': 'Scroll'
177
187
  }
178
188
  ]
179
189
  }
@@ -235,6 +245,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
235
245
  panel.addText("Name", "node_1");
236
246
  panel.addCheckbox("Visibility", true, null, { className: "accent" });
237
247
  panel.addLayers("Layers", 10, null);
248
+ panel.addMap2D("Map2D", map2Dpoints, null, { size: [ 300, 300 ] });
238
249
 
239
250
  panel.addTitle( "Transform" );
240
251
  panel.addVector3( "Position", [0.0, 0.0, 0.0] );
@@ -361,7 +372,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
361
372
  {
362
373
  // Buttons
363
374
  {
364
- const mailPreviewHeader = LX.makeContainer( [ "100%", "59.59px" ], "flex flex-row border-bottom p-1", "", right );
375
+ const mailPreviewHeader = LX.makeContainer( [ "100%", "43.5px" ], "flex flex-row border-bottom p-1", "", right );
365
376
 
366
377
  mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Archive", tooltip: true, buttonClass: "bg-none", icon: "Archive" } ).root );
367
378
  mailPreviewHeader.appendChild( new LX.Button( null, "", null, { title: "Move to junk", tooltip: true, buttonClass: "bg-none", icon: "ArchiveX" } ).root );
@@ -421,7 +432,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
421
432
  LX.toast( "Message sent!", "To:" + mail.email, { timeout: 5000, action: { name: "Undo", callback: ( toast, actionName, event ) => {
422
433
  toast.close();
423
434
  } } } );
424
- }, { className: "ml-auto", buttonClass: "contrast" } );
435
+ }, { className: "ml-auto", buttonClass: "contrast px-2" } );
425
436
  previewButtons.appendChild( sendButton.root );
426
437
  };
427
438
  }
@@ -439,17 +450,17 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
439
450
  `, tasksContainer );
440
451
 
441
452
  const tableWidget = new LX.Table(null, {
442
- head: ["Name", "Status", "Priority"],
453
+ head: [ "Name", "Status", "Priority", "ID" ],
443
454
  body: [
444
- ["Alice", "In Progress", "High"],
445
- ["Bob", "Backlog", "Medium"],
446
- ["Prince", "Canceled", "Low"],
447
- ["Sean", "Done", "High"],
448
- ["Carter", "In Progress", "Medium"],
449
- ["James", "Backlog", "Low"],
450
- ["Mickey", "Todo", "Low"],
451
- ["Charlie", "Canceled", "Low"],
452
- ["Potato", "Todo", "High"]
455
+ [ "Alice", "In Progress", "High", 1 ],
456
+ [ "Bob", "Backlog", "Medium", 2 ],
457
+ [ "Prince", "Canceled", "Low", 3 ],
458
+ [ "Sean", "Done", "High", 4 ],
459
+ [ "Carter", "In Progress", "Medium", 5 ],
460
+ [ "James", "Backlog", "Low", 6 ],
461
+ [ "Mickey", "Todo", "Low", 7 ],
462
+ [ "Charlie", "Canceled", "Low", 8 ],
463
+ [ "Potato", "Todo", "High", 9 ]
453
464
  ]
454
465
  }, {
455
466
  selectable: true,
@@ -459,6 +470,7 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
459
470
  customFilters: [
460
471
  { name: "Status", options: ["Backlog", "Todo", "In Progress", "Done", "Cancelled"] },
461
472
  { name: "Priority", options: ["Low", "Medium", "High"] },
473
+ { name: "ID", type: "range", min: 0, max: 9, step: 1, units: "hr" },
462
474
  ],
463
475
  rowActions: [
464
476
  { icon: "Edit", title: "Edit Row" },
@@ -469,7 +481,9 @@ const area = await LX.init( { layoutMode: "document", rootClass: "wrapper" } );
469
481
  return [
470
482
  { name: "Export" },
471
483
  { name: "Make a copy" },
472
- { name: "Favourite" }
484
+ { name: "Favourite" },
485
+ null,
486
+ { name: "Delete", icon: "Trash2", className: "fg-error" },
473
487
  ]
474
488
  }
475
489
  });
@@ -96,16 +96,18 @@
96
96
  buttonsLeftPanel.addButton(null, "Secondary", null, { buttonClass: "secondary" });
97
97
  buttonsLeftPanel.addButton(null, "Accent", null, { buttonClass: "accent" });
98
98
  buttonsLeftPanel.addButton(null, "Contrast", null, { buttonClass: "contrast" });
99
- buttonsLeftPanel.addButton(null, "Warning", null, { buttonClass: "warning" });
99
+ buttonsLeftPanel.addButton(null, "Success", null, { buttonClass: "success" });
100
100
  buttonsLeftPanel.addButton(null, "Error", null, { buttonClass: "error" });
101
+ buttonsLeftPanel.addButton(null, "Warning", null, { buttonClass: "warning" });
101
102
  buttonsLeftPanel.branch("Disabled Buttons", { closed: closedDefault });
102
103
  buttonsLeftPanel.addButton(null, "Classic", null, { disabled: true });
103
104
  buttonsLeftPanel.addButton(null, "Primary", null, { disabled: true, buttonClass: "primary" });
104
105
  buttonsLeftPanel.addButton(null, "Secondary", null, { disabled: true, buttonClass: "secondary" });
105
106
  buttonsLeftPanel.addButton(null, "Accent", null, { disabled: true, buttonClass: "accent" });
106
107
  buttonsLeftPanel.addButton(null, "Contrast", null, { disabled: true, buttonClass: "contrast" });
107
- buttonsLeftPanel.addButton(null, "Warning", null, { disabled: true, buttonClass: "warning" });
108
+ buttonsLeftPanel.addButton(null, "Success", null, { disabled: true, buttonClass: "success" });
108
109
  buttonsLeftPanel.addButton(null, "Error", null, { disabled: true, buttonClass: "error" });
110
+ buttonsLeftPanel.addButton(null, "Warning", null, { disabled: true, buttonClass: "warning" });
109
111
  buttonsLeftPanel.branch("Advanced Buttons", { closed: closedDefault });
110
112
  buttonsLeftPanel.addButton("Icon Button", "Not used", null, { icon: "Skull" });
111
113
  buttonsLeftPanel.sameLine();
@@ -127,16 +129,18 @@
127
129
  buttonsRightPanel.addButton(null, "Secondary Outline", null, { buttonClass: "secondary outline" });
128
130
  buttonsRightPanel.addButton(null, "Accent Outline", null, { buttonClass: "accent outline" });
129
131
  buttonsRightPanel.addButton(null, "Contrast Outline", null, { buttonClass: "contrast outline" });
130
- buttonsRightPanel.addButton(null, "Warning Outline", null, { buttonClass: "warning outline" });
132
+ buttonsRightPanel.addButton(null, "Success Outline", null, { buttonClass: "success outline" });
131
133
  buttonsRightPanel.addButton(null, "Error Outline", null, { buttonClass: "error outline" });
134
+ buttonsRightPanel.addButton(null, "Warning Outline", null, { buttonClass: "warning outline" });
132
135
  buttonsRightPanel.branch("Dashed Buttons", { closed: closedDefault });
133
136
  buttonsRightPanel.addButton(null, "Classic Dashed", null, { buttonClass: "dashed" });
134
137
  buttonsRightPanel.addButton(null, "Primary Dashed", null, { buttonClass: "primary dashed" });
135
138
  buttonsRightPanel.addButton(null, "Secondary Dashed", null, { buttonClass: "secondary dashed" });
136
139
  buttonsRightPanel.addButton(null, "Accent Dashed", null, { buttonClass: "accent dashed" });
137
140
  buttonsRightPanel.addButton(null, "Contrast Dashed", null, { buttonClass: "contrast dashed" });
138
- buttonsRightPanel.addButton(null, "Warning Dashed", null, { buttonClass: "warning dashed" });
141
+ buttonsRightPanel.addButton(null, "Success Dashed", null, { buttonClass: "success dashed" });
139
142
  buttonsRightPanel.addButton(null, "Error Dashed", null, { buttonClass: "error dashed" });
143
+ buttonsRightPanel.addButton(null, "Warning Dashed", null, { buttonClass: "warning dashed" });
140
144
  buttonsRightPanel.branch("Combo Buttons", { closed: closedDefault });
141
145
  buttonsRightPanel.addComboButtons("Classic Combo", comboValues);
142
146
  buttonsRightPanel.addComboButtons("Toggle Combo", comboValues, { toggle: true });
@@ -158,8 +162,9 @@
158
162
  checkLeftPanel.addCheckbox(null, true, null, { className: "secondary", label: "Secondary" });
159
163
  checkLeftPanel.addCheckbox(null, true, null, { className: "accent", label: "Accent" });
160
164
  checkLeftPanel.addCheckbox(null, true, null, { className: "contrast", label: "Contrast" });
161
- checkLeftPanel.addCheckbox(null, true, null, { className: "warning", label: "Warning" });
165
+ checkLeftPanel.addCheckbox(null, true, null, { className: "success", label: "Success" });
162
166
  checkLeftPanel.addCheckbox(null, true, null, { className: "error", label: "Error" });
167
+ checkLeftPanel.addCheckbox(null, true, null, { className: "warning", label: "Warning" });
163
168
  }
164
169
 
165
170
  // Radiogroup
@@ -177,16 +182,18 @@
177
182
  checkRightPanel.addToggle(null, true, null, { className: "secondary", label: "Secondary" });
178
183
  checkRightPanel.addToggle(null, true, null, { className: "accent", label: "Accent" });
179
184
  checkRightPanel.addToggle(null, true, null, { className: "contrast", label: "Contrast" });
180
- checkRightPanel.addToggle(null, true, null, { className: "warning", label: "Warning" });
185
+ checkRightPanel.addToggle(null, true, null, { className: "success", label: "Success" });
181
186
  checkRightPanel.addToggle(null, true, null, { className: "error", label: "Error" });
187
+ checkRightPanel.addToggle(null, true, null, { className: "warning", label: "Warning" });
182
188
  checkRightPanel.branch("Outline Toggles", { closed: closedDefault });
183
189
  checkRightPanel.addToggle(null, true, null, { label: "Classic" });
184
190
  checkRightPanel.addToggle(null, true, null, { className: "primary outline", label: "Primary" });
185
191
  checkRightPanel.addToggle(null, true, null, { className: "secondary outline", label: "Secondary" });
186
192
  checkRightPanel.addToggle(null, true, null, { className: "accent outline", label: "Accent" });
187
193
  checkRightPanel.addToggle(null, true, null, { className: "contrast outline", label: "Contrast" });
188
- checkRightPanel.addToggle(null, true, null, { className: "warning outline", label: "Warning" });
194
+ checkRightPanel.addToggle(null, true, null, { className: "success outline", label: "Success" });
189
195
  checkRightPanel.addToggle(null, true, null, { className: "error outline", label: "Error" });
196
+ checkRightPanel.addToggle(null, true, null, { className: "warning outline", label: "Warning" });
190
197
  }
191
198
 
192
199
  // Test Inputs
@@ -226,8 +233,9 @@
226
233
  panelB.addRange("Secondary", 4, null, { min: 0, max: 10, step: 1, className: "secondary" });
227
234
  panelB.addRange("Accent", 3, null, { min: 0, max: 10, step: 1, className: "accent" });
228
235
  panelB.addRange("Contrast", 5, null, { min: 0, max: 10, step: 1, className: "contrast" });
229
- panelB.addRange("Warning", 2, null, { min: 0, max: 10, step: 1, className: "warning" });
236
+ panelB.addRange("Success", 9, null, { min: 0, max: 10, step: 1, className: "success" });
230
237
  panelB.addRange("Error", 6, null, { min: 0, max: 10, step: 1, className: "error" });
238
+ panelB.addRange("Warning", 2, null, { min: 0, max: 10, step: 1, className: "warning" });
231
239
  panelB.addRange("Inverted", 22, null, { min: 20, max: 48, step: 1, left: true });
232
240
  panelB.addRange("NoFill", 10, null, { min: 1, max: 48, step: 1, fill: false });
233
241
  panelB.addRange("Disabled", 29, null, { min: 1, max: 48, step: 1, disabled: true });
@@ -269,7 +277,7 @@
269
277
  'actions': [
270
278
  {
271
279
  'name': 'Open script',
272
- 'icon': 'Script',
280
+ 'icon': 'Scroll',
273
281
  'callback': function (node) {
274
282
  console.log(node.id + ": Script opened!")
275
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lexgui",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "JS library to create web graphical user interfaces",
5
5
  "type": "module",
6
6
  "main": "./build/lexgui.js",