neo.mjs 4.3.8 → 4.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.3.8",
3
+ "version": "4.3.9",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -45,8 +45,9 @@
45
45
  }
46
46
 
47
47
  &.label-bottom {
48
- align-items : start;
49
- flex-direction: column-reverse;
48
+ align-items : stretch;
49
+ flex-direction : column-reverse;
50
+ justify-content: start;
50
51
 
51
52
  .neo-textfield-label {
52
53
  margin-top: 3px;
@@ -164,7 +165,7 @@
164
165
  }
165
166
 
166
167
  &.label-top {
167
- align-items : start;
168
+ align-items : stretch;
168
169
  flex-direction: column;
169
170
 
170
171
  .neo-textfield-label {
@@ -405,7 +405,7 @@ class Base extends CoreBase {
405
405
  vdomRoot.cls = [...value];
406
406
  } else {
407
407
  // we need to merge changes
408
- cls = [...me.wrapperCls, ...value];
408
+ cls = NeoArray.union(me.wrapperCls, value);
409
409
  NeoArray.remove(cls, NeoArray.difference(oldValue, value));
410
410
  vdom.cls = cls;
411
411
  }
@@ -729,7 +729,7 @@ class Base extends CoreBase {
729
729
 
730
730
  if (vdom === vdomRoot) {
731
731
  // we need to merge changes
732
- cls = [...cls, ...value];
732
+ cls = NeoArray.union(cls, value);
733
733
  NeoArray.remove(cls, NeoArray.difference(oldValue, value));
734
734
  vdom.cls = cls;
735
735
 
@@ -347,6 +347,9 @@ class Text extends Base {
347
347
  me.updateCenterBorderElWidth(false);
348
348
  }, 20);
349
349
  }
350
+ } else {
351
+ // changes from e.g. left to top
352
+ me.updateInputWidth();
350
353
  }
351
354
  }
352
355
 
@@ -972,8 +975,12 @@ class Text extends Base {
972
975
  reset(value=null) {
973
976
  let me = this;
974
977
 
975
- if (value && me.clearToOriginalValue) {
976
- me.originalConfig.value = value;
978
+ if (me.clearToOriginalValue) {
979
+ if (value) {
980
+ me.originalConfig.value = value;
981
+ } else {
982
+ value = me.originalConfig.value
983
+ }
977
984
  }
978
985
 
979
986
  super.reset(value);
@@ -439,7 +439,7 @@ class Helper extends Base {
439
439
 
440
440
  Object.entries(value).forEach(([key, value]) => {
441
441
  if (!(oldVnode.attributes.hasOwnProperty(key) && oldVnode.attributes[key] === value)) {
442
- if (!Neo.isString(value) && Neo.isEmpty(value)) {
442
+ if (value !== null && !Neo.isString(value) && Neo.isEmpty(value)) {
443
443
  // ignore empty arrays & objects
444
444
  } else {
445
445
  attributes[key] = value;