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/node.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/node.test.js CHANGED
@@ -1362,6 +1362,13 @@ var $;
1362
1362
  else
1363
1363
  return [input.data('.' + first.text())];
1364
1364
  },
1365
+ '?.[]': (input, belt) => {
1366
+ const first = input.kids[0];
1367
+ if (first.type)
1368
+ return sequence('?.[', '', ']')(input, belt);
1369
+ else
1370
+ return [input.data('?.' + first.text())];
1371
+ },
1365
1372
  ':': (input, belt) => {
1366
1373
  const first = input.kids[0];
1367
1374
  if (first.type)
@@ -7319,7 +7326,7 @@ var $;
7319
7326
  return null;
7320
7327
  }
7321
7328
  event(){
7322
- return {...(super.event()), "keydown": (next) => (this.keydown(next))};
7329
+ return {...(super.event()), "keydown": (next) => (this?.keydown(next))};
7323
7330
  }
7324
7331
  key(){
7325
7332
  return {};
@@ -7496,13 +7503,13 @@ var $;
7496
7503
  return "";
7497
7504
  }
7498
7505
  value_changed(next){
7499
- return (this.value(next));
7506
+ return (this?.value(next));
7500
7507
  }
7501
7508
  hint(){
7502
7509
  return "";
7503
7510
  }
7504
7511
  hint_visible(){
7505
- return (this.hint());
7512
+ return (this?.hint());
7506
7513
  }
7507
7514
  spellcheck(){
7508
7515
  return true;
@@ -7542,8 +7549,8 @@ var $;
7542
7549
  }
7543
7550
  Submit(){
7544
7551
  const obj = new this.$.$mol_hotkey();
7545
- (obj.mod_ctrl) = () => ((this.submit_with_ctrl()));
7546
- (obj.key) = () => ({"enter": (next) => (this.submit(next))});
7552
+ (obj.mod_ctrl) = () => ((this?.submit_with_ctrl()));
7553
+ (obj.key) = () => ({"enter": (next) => (this?.submit(next))});
7547
7554
  return obj;
7548
7555
  }
7549
7556
  dom_name(){
@@ -7563,34 +7570,34 @@ var $;
7563
7570
  return [0, 0];
7564
7571
  }
7565
7572
  auto(){
7566
- return [(this.selection_watcher()), (this.error_report())];
7573
+ return [(this?.selection_watcher()), (this?.error_report())];
7567
7574
  }
7568
7575
  field(){
7569
7576
  return {
7570
7577
  ...(super.field()),
7571
- "disabled": (this.disabled()),
7572
- "value": (this.value_changed()),
7573
- "placeholder": (this.hint_visible()),
7574
- "spellcheck": (this.spellcheck()),
7575
- "autocomplete": (this.autocomplete_native()),
7576
- "selectionEnd": (this.selection_end()),
7577
- "selectionStart": (this.selection_start()),
7578
- "inputMode": (this.keyboard()),
7579
- "enterkeyhint": (this.enter())
7578
+ "disabled": (this?.disabled()),
7579
+ "value": (this?.value_changed()),
7580
+ "placeholder": (this?.hint_visible()),
7581
+ "spellcheck": (this?.spellcheck()),
7582
+ "autocomplete": (this?.autocomplete_native()),
7583
+ "selectionEnd": (this?.selection_end()),
7584
+ "selectionStart": (this?.selection_start()),
7585
+ "inputMode": (this?.keyboard()),
7586
+ "enterkeyhint": (this?.enter())
7580
7587
  };
7581
7588
  }
7582
7589
  attr(){
7583
7590
  return {
7584
7591
  ...(super.attr()),
7585
- "maxlength": (this.length_max()),
7586
- "type": (this.type())
7592
+ "maxlength": (this?.length_max()),
7593
+ "type": (this?.type())
7587
7594
  };
7588
7595
  }
7589
7596
  event(){
7590
- return {...(super.event()), "input": (next) => (this.event_change(next))};
7597
+ return {...(super.event()), "input": (next) => (this?.event_change(next))};
7591
7598
  }
7592
7599
  plugins(){
7593
- return [(this.Submit())];
7600
+ return [(this?.Submit())];
7594
7601
  }
7595
7602
  };
7596
7603
  ($mol_mem(($.$mol_string.prototype), "value"));
@@ -7779,7 +7786,7 @@ var $;
7779
7786
  return 0;
7780
7787
  }
7781
7788
  sub(){
7782
- return [(this.title())];
7789
+ return [(this?.title())];
7783
7790
  }
7784
7791
  };
7785
7792
 
@@ -7857,16 +7864,16 @@ var $;
7857
7864
  return "";
7858
7865
  }
7859
7866
  sub(){
7860
- return (this.parts());
7867
+ return (this?.parts());
7861
7868
  }
7862
7869
  Low(id){
7863
7870
  const obj = new this.$.$mol_paragraph();
7864
- (obj.sub) = () => ([(this.string(id))]);
7871
+ (obj.sub) = () => ([(this?.string(id))]);
7865
7872
  return obj;
7866
7873
  }
7867
7874
  High(id){
7868
7875
  const obj = new this.$.$mol_paragraph();
7869
- (obj.sub) = () => ([(this.string(id))]);
7876
+ (obj.sub) = () => ([(this?.string(id))]);
7870
7877
  return obj;
7871
7878
  }
7872
7879
  };
@@ -7984,13 +7991,13 @@ var $;
7984
7991
  return null;
7985
7992
  }
7986
7993
  attr(){
7987
- return {...(super.attr()), "mol_theme": (this.theme())};
7994
+ return {...(super.attr()), "mol_theme": (this?.theme())};
7988
7995
  }
7989
7996
  style(){
7990
7997
  return {...(super.style()), "minHeight": "1em"};
7991
7998
  }
7992
7999
  sub(){
7993
- return [(this.value())];
8000
+ return [(this?.value())];
7994
8001
  }
7995
8002
  };
7996
8003
 
@@ -8029,7 +8036,7 @@ var $;
8029
8036
  return "";
8030
8037
  }
8031
8038
  hint_safe(){
8032
- return (this.hint());
8039
+ return (this?.hint());
8033
8040
  }
8034
8041
  error(){
8035
8042
  return "";
@@ -8048,26 +8055,26 @@ var $;
8048
8055
  event(){
8049
8056
  return {
8050
8057
  ...(super.event()),
8051
- "click": (next) => (this.event_activate(next)),
8052
- "dblclick": (next) => (this.clicks(next)),
8053
- "keydown": (next) => (this.event_key_press(next))
8058
+ "click": (next) => (this?.event_activate(next)),
8059
+ "dblclick": (next) => (this?.clicks(next)),
8060
+ "keydown": (next) => (this?.event_key_press(next))
8054
8061
  };
8055
8062
  }
8056
8063
  attr(){
8057
8064
  return {
8058
8065
  ...(super.attr()),
8059
- "disabled": (this.disabled()),
8066
+ "disabled": (this?.disabled()),
8060
8067
  "role": "button",
8061
- "tabindex": (this.tab_index()),
8062
- "title": (this.hint_safe())
8068
+ "tabindex": (this?.tab_index()),
8069
+ "title": (this?.hint_safe())
8063
8070
  };
8064
8071
  }
8065
8072
  sub(){
8066
- return [(this.title())];
8073
+ return [(this?.title())];
8067
8074
  }
8068
8075
  Speck(){
8069
8076
  const obj = new this.$.$mol_speck();
8070
- (obj.value) = () => ((this.error()));
8077
+ (obj.value) = () => ((this?.error()));
8071
8078
  return obj;
8072
8079
  }
8073
8080
  };