lexgui 0.7.12 → 0.7.14

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,36 @@
2
2
 
3
3
  ## dev
4
4
 
5
- ## 0.7.12 (master)
5
+ ## 0.7.14 (master)
6
+
7
+ CodeEditor:
8
+ - Added support for add/remove multi-line indentation.
9
+ - Improved language detection on copy text.
10
+ - Few more keywords added to JS and TS highlighting.
11
+ - Fixed `charWidth` value when editor font isn't loaded.
12
+ - Fixed autocomplete box position when opened near the window limit.
13
+ - Fixed autocomplete box issue when selecting options using arrows.
14
+ - Fixed issue loading files using drag&drop.
15
+ - Fixed tab visibility bug when using explorer mode.
16
+ - Fixed line swap minor setting incorrect active line.
17
+
18
+ ## 0.7.13
19
+
20
+ Added `LX.validateValueAtPattern`.
21
+ TextInput now receive `options.pattern` as an Object, instead of text.
22
+ Added support for `options.email` in `LX.buildTextPattern`.
23
+
24
+ Form Component:
25
+ - Fixed `options.secondaryActionCallback`.
26
+ - Improve validation errors by adding field-specific error messages.
27
+
28
+ CodeEditor:
29
+ - Support for JS/TS String interpolation highlighting.
30
+ - Fixed Ctrl+Arrow horizontal scroll.
31
+ - Fixed some issues reseting cursor position.
32
+ - Fixed cursor horizontal scrolling issues.
33
+
34
+ ## 0.7.12
6
35
 
7
36
  Added support column actions in Table Component.
8
37
 
@@ -182,6 +182,7 @@
182
182
  {
183
183
  name: "Account", submenu: [
184
184
  { name: "Login", icon: "User", callback: createLoginForm },
185
+ { name: "Signup", icon: "User", callback: openSignUpDialog },
185
186
  ]
186
187
  },
187
188
  {
@@ -967,10 +968,9 @@
967
968
  });
968
969
  panel.addText("Camera", "Canon EOS 80D", null, { disabled: true });
969
970
  panel.addText("Text", "Warning text", null, { warning: true });
970
- const patternOptions = { uppercase: true }
971
971
  panel.addText("Text With Validator Pattern", "", (value, event) => {
972
972
  console.log(value);
973
- }, { pattern: LX.buildTextPattern(patternOptions) });
973
+ }, { pattern: { uppercase: true } });
974
974
  panel.addTextArea("Notes", "", (value, event) => {
975
975
  console.log(value);
976
976
  }, { placeholder: 'Some notes...' });
@@ -1016,6 +1016,33 @@
1016
1016
 
1017
1017
  }
1018
1018
 
1019
+ function openSignUpDialog()
1020
+ {
1021
+ const dialog = new LX.Dialog( "Create account", ( p ) => {
1022
+
1023
+ const formData = {
1024
+ name: { label: "Name", value: "", icon: "User", pattern: { minLength: 3, noSpaces: true } },
1025
+ email: { label: "Email", value: "", icon: "AtSign", pattern: { email: true } },
1026
+ password: { label: "Password", value: "", type: "password", icon: "Key", pattern: { minLength: 4, digit: true } },
1027
+ confirmPassword: { label: "Confirm password", value: "", type: "password", icon: "Key", pattern: { fieldMatchName: "password" } }
1028
+ };
1029
+
1030
+ const form = p.addForm( null, formData, async (value, errors) => {
1031
+
1032
+ console.log(errors)
1033
+
1034
+ errorMsg.set( "" );
1035
+
1036
+ if( errors.length )
1037
+ {
1038
+ const err = errors[ 0 ];
1039
+ errorMsg.set( `${ err.entry }: ${ err.messages.join( "\n" ) }` );
1040
+ }
1041
+ }, { primaryActionName: "SignUp" });
1042
+ const errorMsg = p.addTextArea( null, "", null, { inputClass: "fg-secondary", disabled: true, fitHeight: true } );
1043
+ }, { modal: true } );
1044
+ }
1045
+
1019
1046
  function createLoginForm() {
1020
1047
 
1021
1048
  let dialog = new LX.Dialog('Login', panel => {
@@ -1025,14 +1052,14 @@
1025
1052
  value: "",
1026
1053
  placeholder: "Enter username",
1027
1054
  icon: "User",
1028
- pattern: LX.buildTextPattern({ minLength: 3 })
1055
+ pattern: { minLength: 3 }
1029
1056
  },
1030
1057
  Password: {
1031
1058
  value: "",
1032
1059
  type: "password",
1033
1060
  placeholder: "Enter password",
1034
1061
  icon: "KeyRound",
1035
- pattern: LX.buildTextPattern({ lowercase: true, uppercase: true, digit: true, minLength: 6 })
1062
+ pattern: { lowercase: true, uppercase: true, digit: true, minLength: 6 }
1036
1063
  }
1037
1064
  };
1038
1065
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lexgui",
3
- "version": "0.7.12",
3
+ "version": "0.7.14",
4
4
  "description": "JS library to create web graphical user interfaces",
5
5
  "type": "module",
6
6
  "main": "./build/lexgui.js",