mol_tree2 1.0.707 → 1.0.708

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/web.mjs CHANGED
@@ -1371,6 +1371,13 @@ var $;
1371
1371
  else
1372
1372
  return [input.data('.' + first.text())];
1373
1373
  },
1374
+ '?.[]': (input, belt) => {
1375
+ const first = input.kids[0];
1376
+ if (first.type)
1377
+ return sequence('?.[', '', ']')(input, belt);
1378
+ else
1379
+ return [input.data('?.' + first.text())];
1380
+ },
1374
1381
  ':': (input, belt) => {
1375
1382
  const first = input.kids[0];
1376
1383
  if (first.type)
package/web.test.js CHANGED
@@ -5232,7 +5232,7 @@ var $;
5232
5232
  return null;
5233
5233
  }
5234
5234
  event(){
5235
- return {...(super.event()), "keydown": (next) => (this.keydown(next))};
5235
+ return {...(super.event()), "keydown": (next) => (this?.keydown(next))};
5236
5236
  }
5237
5237
  key(){
5238
5238
  return {};
@@ -5409,13 +5409,13 @@ var $;
5409
5409
  return "";
5410
5410
  }
5411
5411
  value_changed(next){
5412
- return (this.value(next));
5412
+ return (this?.value(next));
5413
5413
  }
5414
5414
  hint(){
5415
5415
  return "";
5416
5416
  }
5417
5417
  hint_visible(){
5418
- return (this.hint());
5418
+ return (this?.hint());
5419
5419
  }
5420
5420
  spellcheck(){
5421
5421
  return true;
@@ -5455,8 +5455,8 @@ var $;
5455
5455
  }
5456
5456
  Submit(){
5457
5457
  const obj = new this.$.$mol_hotkey();
5458
- (obj.mod_ctrl) = () => ((this.submit_with_ctrl()));
5459
- (obj.key) = () => ({"enter": (next) => (this.submit(next))});
5458
+ (obj.mod_ctrl) = () => ((this?.submit_with_ctrl()));
5459
+ (obj.key) = () => ({"enter": (next) => (this?.submit(next))});
5460
5460
  return obj;
5461
5461
  }
5462
5462
  dom_name(){
@@ -5476,34 +5476,34 @@ var $;
5476
5476
  return [0, 0];
5477
5477
  }
5478
5478
  auto(){
5479
- return [(this.selection_watcher()), (this.error_report())];
5479
+ return [(this?.selection_watcher()), (this?.error_report())];
5480
5480
  }
5481
5481
  field(){
5482
5482
  return {
5483
5483
  ...(super.field()),
5484
- "disabled": (this.disabled()),
5485
- "value": (this.value_changed()),
5486
- "placeholder": (this.hint_visible()),
5487
- "spellcheck": (this.spellcheck()),
5488
- "autocomplete": (this.autocomplete_native()),
5489
- "selectionEnd": (this.selection_end()),
5490
- "selectionStart": (this.selection_start()),
5491
- "inputMode": (this.keyboard()),
5492
- "enterkeyhint": (this.enter())
5484
+ "disabled": (this?.disabled()),
5485
+ "value": (this?.value_changed()),
5486
+ "placeholder": (this?.hint_visible()),
5487
+ "spellcheck": (this?.spellcheck()),
5488
+ "autocomplete": (this?.autocomplete_native()),
5489
+ "selectionEnd": (this?.selection_end()),
5490
+ "selectionStart": (this?.selection_start()),
5491
+ "inputMode": (this?.keyboard()),
5492
+ "enterkeyhint": (this?.enter())
5493
5493
  };
5494
5494
  }
5495
5495
  attr(){
5496
5496
  return {
5497
5497
  ...(super.attr()),
5498
- "maxlength": (this.length_max()),
5499
- "type": (this.type())
5498
+ "maxlength": (this?.length_max()),
5499
+ "type": (this?.type())
5500
5500
  };
5501
5501
  }
5502
5502
  event(){
5503
- return {...(super.event()), "input": (next) => (this.event_change(next))};
5503
+ return {...(super.event()), "input": (next) => (this?.event_change(next))};
5504
5504
  }
5505
5505
  plugins(){
5506
- return [(this.Submit())];
5506
+ return [(this?.Submit())];
5507
5507
  }
5508
5508
  };
5509
5509
  ($mol_mem(($.$mol_string.prototype), "value"));
@@ -5692,7 +5692,7 @@ var $;
5692
5692
  return 0;
5693
5693
  }
5694
5694
  sub(){
5695
- return [(this.title())];
5695
+ return [(this?.title())];
5696
5696
  }
5697
5697
  };
5698
5698
 
@@ -5770,16 +5770,16 @@ var $;
5770
5770
  return "";
5771
5771
  }
5772
5772
  sub(){
5773
- return (this.parts());
5773
+ return (this?.parts());
5774
5774
  }
5775
5775
  Low(id){
5776
5776
  const obj = new this.$.$mol_paragraph();
5777
- (obj.sub) = () => ([(this.string(id))]);
5777
+ (obj.sub) = () => ([(this?.string(id))]);
5778
5778
  return obj;
5779
5779
  }
5780
5780
  High(id){
5781
5781
  const obj = new this.$.$mol_paragraph();
5782
- (obj.sub) = () => ([(this.string(id))]);
5782
+ (obj.sub) = () => ([(this?.string(id))]);
5783
5783
  return obj;
5784
5784
  }
5785
5785
  };
@@ -5897,13 +5897,13 @@ var $;
5897
5897
  return null;
5898
5898
  }
5899
5899
  attr(){
5900
- return {...(super.attr()), "mol_theme": (this.theme())};
5900
+ return {...(super.attr()), "mol_theme": (this?.theme())};
5901
5901
  }
5902
5902
  style(){
5903
5903
  return {...(super.style()), "minHeight": "1em"};
5904
5904
  }
5905
5905
  sub(){
5906
- return [(this.value())];
5906
+ return [(this?.value())];
5907
5907
  }
5908
5908
  };
5909
5909
 
@@ -5942,7 +5942,7 @@ var $;
5942
5942
  return "";
5943
5943
  }
5944
5944
  hint_safe(){
5945
- return (this.hint());
5945
+ return (this?.hint());
5946
5946
  }
5947
5947
  error(){
5948
5948
  return "";
@@ -5961,26 +5961,26 @@ var $;
5961
5961
  event(){
5962
5962
  return {
5963
5963
  ...(super.event()),
5964
- "click": (next) => (this.event_activate(next)),
5965
- "dblclick": (next) => (this.clicks(next)),
5966
- "keydown": (next) => (this.event_key_press(next))
5964
+ "click": (next) => (this?.event_activate(next)),
5965
+ "dblclick": (next) => (this?.clicks(next)),
5966
+ "keydown": (next) => (this?.event_key_press(next))
5967
5967
  };
5968
5968
  }
5969
5969
  attr(){
5970
5970
  return {
5971
5971
  ...(super.attr()),
5972
- "disabled": (this.disabled()),
5972
+ "disabled": (this?.disabled()),
5973
5973
  "role": "button",
5974
- "tabindex": (this.tab_index()),
5975
- "title": (this.hint_safe())
5974
+ "tabindex": (this?.tab_index()),
5975
+ "title": (this?.hint_safe())
5976
5976
  };
5977
5977
  }
5978
5978
  sub(){
5979
- return [(this.title())];
5979
+ return [(this?.title())];
5980
5980
  }
5981
5981
  Speck(){
5982
5982
  const obj = new this.$.$mol_speck();
5983
- (obj.value) = () => ((this.error()));
5983
+ (obj.value) = () => ((this?.error()));
5984
5984
  return obj;
5985
5985
  }
5986
5986
  };