smoothly 0.3.7 → 0.3.8

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.
@@ -12551,7 +12551,7 @@ class StateEditor {
12551
12551
  if (typeof start == "string" && typeof end == "string") {
12552
12552
  let s;
12553
12553
  result = this;
12554
- while ((s = result.value.search(start)) > -1)
12554
+ while ((s = result.value.indexOf(start)) > -1)
12555
12555
  result = result.replace(s, s + start.length, end);
12556
12556
  }
12557
12557
  else if (typeof start == "number" && typeof end == "number") {
@@ -12593,7 +12593,7 @@ class StateEditor {
12593
12593
  else if (typeof start == "string") {
12594
12594
  let s;
12595
12595
  result = this;
12596
- while ((s = result.value.search(start)) > -1)
12596
+ while ((s = result.value.indexOf(start)) > -1)
12597
12597
  result = result.delete(s, s + start.length);
12598
12598
  }
12599
12599
  else
@@ -31624,11 +31624,11 @@ exports.register = exports.Base = void 0;
31624
31624
 
31625
31625
 
31626
31626
  class Base {
31627
- constructor(seperator) {
31628
- this.seperator = seperator;
31627
+ constructor(separator) {
31628
+ this.separator = separator;
31629
31629
  }
31630
- unformat(formated) {
31631
- return formated.delete(this.seperator);
31630
+ unformat(formatted) {
31631
+ return formatted.delete(this.separator);
31632
31632
  }
31633
31633
  daysInMonth(value) {
31634
31634
  var _a;
@@ -31661,12 +31661,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
31661
31661
 
31662
31662
 
31663
31663
  class Handler extends Base_1.Base {
31664
- constructor(seperator) {
31665
- super(seperator);
31664
+ constructor(separator) {
31665
+ super(separator);
31666
31666
  }
31667
31667
  toString(data) {
31668
31668
  return (data === null || data === void 0 ? void 0 : data.length) == 10
31669
- ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
31669
+ ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.separator)
31670
31670
  : "";
31671
31671
  }
31672
31672
  fromString(value) {
@@ -31678,12 +31678,12 @@ class Handler extends Base_1.Base {
31678
31678
  if (result.get(0, 1) > "3")
31679
31679
  result = result.insert(0, "0");
31680
31680
  if (result.value.length > 1)
31681
- result = result.insert(2, this.seperator);
31681
+ result = result.insert(2, this.separator);
31682
31682
  if (result.get(3, 1) > "1")
31683
31683
  result = result.insert(3, "0");
31684
31684
  if (result.value.length > 4)
31685
- result = result.insert(5, this.seperator);
31686
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.seperator)) });
31685
+ result = result.insert(5, this.separator);
31686
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.separator)) });
31687
31687
  }
31688
31688
  allowed(symbol, state) {
31689
31689
  return state.selection.start == 1 && state.value[0] == "3"
@@ -31714,12 +31714,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
31714
31714
 
31715
31715
 
31716
31716
  class Handler extends Base_1.Base {
31717
- constructor(seperator) {
31718
- super(seperator);
31717
+ constructor(separator) {
31718
+ super(separator);
31719
31719
  }
31720
31720
  toString(data) {
31721
31721
  return (data === null || data === void 0 ? void 0 : data.length) == 10
31722
- ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
31722
+ ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.separator)
31723
31723
  : "";
31724
31724
  }
31725
31725
  fromString(value) {
@@ -31731,12 +31731,12 @@ class Handler extends Base_1.Base {
31731
31731
  if (result.get(0, 1) > "1")
31732
31732
  result = result.insert(0, "0");
31733
31733
  if (result.value.length > 1)
31734
- result = result.insert(2, this.seperator);
31734
+ result = result.insert(2, this.separator);
31735
31735
  if (result.get(3, 1) > (result.get(0, 2) == "02" ? "2" : "3"))
31736
31736
  result = result.insert(3, "0");
31737
31737
  if (result.value.length > 4)
31738
- result = result.insert(5, this.seperator);
31739
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.seperator)) });
31738
+ result = result.insert(5, this.separator);
31739
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.separator)) });
31740
31740
  }
31741
31741
  allowed(symbol, state) {
31742
31742
  const result = state.selection.start == 1 && state.value[0] == "1"
@@ -31762,8 +31762,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
31762
31762
 
31763
31763
 
31764
31764
  class Handler extends Base_1.Base {
31765
- constructor(seperator) {
31766
- super(seperator);
31765
+ constructor(separator) {
31766
+ super(separator);
31767
31767
  }
31768
31768
  toString(data) {
31769
31769
  return typeof data != "string" ? "" : data;
@@ -31775,16 +31775,16 @@ class Handler extends Base_1.Base {
31775
31775
  format(unformatted) {
31776
31776
  let result = unformatted;
31777
31777
  if (result.value.length > 3) {
31778
- result = result.insert(4, this.seperator);
31778
+ result = result.insert(4, this.separator);
31779
31779
  if (result.get(5, 1) > "1")
31780
31780
  result = result.insert(5, "0");
31781
31781
  if (result.value.length > 6) {
31782
- result = result.insert(7, this.seperator);
31782
+ result = result.insert(7, this.separator);
31783
31783
  if (result.get(8, 1) > this.daysInMonth(unformatted.value).toString().substring(0, 1))
31784
31784
  result = result.insert(8, "0");
31785
31785
  }
31786
31786
  }
31787
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.seperator)) });
31787
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.separator)) });
31788
31788
  }
31789
31789
  allowed(symbol, state) {
31790
31790
  const daysInMonth = this.daysInMonth(state.value);
@@ -14148,7 +14148,7 @@ class StateEditor {
14148
14148
  if (typeof start == "string" && typeof end == "string") {
14149
14149
  let s;
14150
14150
  result = this;
14151
- while ((s = result.value.search(start)) > -1)
14151
+ while ((s = result.value.indexOf(start)) > -1)
14152
14152
  result = result.replace(s, s + start.length, end);
14153
14153
  }
14154
14154
  else if (typeof start == "number" && typeof end == "number") {
@@ -14190,7 +14190,7 @@ class StateEditor {
14190
14190
  else if (typeof start == "string") {
14191
14191
  let s;
14192
14192
  result = this;
14193
- while ((s = result.value.search(start)) > -1)
14193
+ while ((s = result.value.indexOf(start)) > -1)
14194
14194
  result = result.delete(s, s + start.length);
14195
14195
  }
14196
14196
  else
@@ -33221,11 +33221,11 @@ exports.register = exports.Base = void 0;
33221
33221
 
33222
33222
 
33223
33223
  class Base {
33224
- constructor(seperator) {
33225
- this.seperator = seperator;
33224
+ constructor(separator) {
33225
+ this.separator = separator;
33226
33226
  }
33227
- unformat(formated) {
33228
- return formated.delete(this.seperator);
33227
+ unformat(formatted) {
33228
+ return formatted.delete(this.separator);
33229
33229
  }
33230
33230
  daysInMonth(value) {
33231
33231
  var _a;
@@ -33258,12 +33258,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
33258
33258
 
33259
33259
 
33260
33260
  class Handler extends Base_1.Base {
33261
- constructor(seperator) {
33262
- super(seperator);
33261
+ constructor(separator) {
33262
+ super(separator);
33263
33263
  }
33264
33264
  toString(data) {
33265
33265
  return (data === null || data === void 0 ? void 0 : data.length) == 10
33266
- ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
33266
+ ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.separator)
33267
33267
  : "";
33268
33268
  }
33269
33269
  fromString(value) {
@@ -33275,12 +33275,12 @@ class Handler extends Base_1.Base {
33275
33275
  if (result.get(0, 1) > "3")
33276
33276
  result = result.insert(0, "0");
33277
33277
  if (result.value.length > 1)
33278
- result = result.insert(2, this.seperator);
33278
+ result = result.insert(2, this.separator);
33279
33279
  if (result.get(3, 1) > "1")
33280
33280
  result = result.insert(3, "0");
33281
33281
  if (result.value.length > 4)
33282
- result = result.insert(5, this.seperator);
33283
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.seperator)) });
33282
+ result = result.insert(5, this.separator);
33283
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.separator)) });
33284
33284
  }
33285
33285
  allowed(symbol, state) {
33286
33286
  return state.selection.start == 1 && state.value[0] == "3"
@@ -33311,12 +33311,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
33311
33311
 
33312
33312
 
33313
33313
  class Handler extends Base_1.Base {
33314
- constructor(seperator) {
33315
- super(seperator);
33314
+ constructor(separator) {
33315
+ super(separator);
33316
33316
  }
33317
33317
  toString(data) {
33318
33318
  return (data === null || data === void 0 ? void 0 : data.length) == 10
33319
- ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
33319
+ ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.separator)
33320
33320
  : "";
33321
33321
  }
33322
33322
  fromString(value) {
@@ -33328,12 +33328,12 @@ class Handler extends Base_1.Base {
33328
33328
  if (result.get(0, 1) > "1")
33329
33329
  result = result.insert(0, "0");
33330
33330
  if (result.value.length > 1)
33331
- result = result.insert(2, this.seperator);
33331
+ result = result.insert(2, this.separator);
33332
33332
  if (result.get(3, 1) > (result.get(0, 2) == "02" ? "2" : "3"))
33333
33333
  result = result.insert(3, "0");
33334
33334
  if (result.value.length > 4)
33335
- result = result.insert(5, this.seperator);
33336
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.seperator)) });
33335
+ result = result.insert(5, this.separator);
33336
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.separator)) });
33337
33337
  }
33338
33338
  allowed(symbol, state) {
33339
33339
  const result = state.selection.start == 1 && state.value[0] == "1"
@@ -33359,8 +33359,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
33359
33359
 
33360
33360
 
33361
33361
  class Handler extends Base_1.Base {
33362
- constructor(seperator) {
33363
- super(seperator);
33362
+ constructor(separator) {
33363
+ super(separator);
33364
33364
  }
33365
33365
  toString(data) {
33366
33366
  return typeof data != "string" ? "" : data;
@@ -33372,16 +33372,16 @@ class Handler extends Base_1.Base {
33372
33372
  format(unformatted) {
33373
33373
  let result = unformatted;
33374
33374
  if (result.value.length > 3) {
33375
- result = result.insert(4, this.seperator);
33375
+ result = result.insert(4, this.separator);
33376
33376
  if (result.get(5, 1) > "1")
33377
33377
  result = result.insert(5, "0");
33378
33378
  if (result.value.length > 6) {
33379
- result = result.insert(7, this.seperator);
33379
+ result = result.insert(7, this.separator);
33380
33380
  if (result.get(8, 1) > this.daysInMonth(unformatted.value).toString().substring(0, 1))
33381
33381
  result = result.insert(8, "0");
33382
33382
  }
33383
33383
  }
33384
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.seperator)) });
33384
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.separator)) });
33385
33385
  }
33386
33386
  allowed(symbol, state) {
33387
33387
  const daysInMonth = this.daysInMonth(state.value);
@@ -12547,7 +12547,7 @@ class StateEditor {
12547
12547
  if (typeof start == "string" && typeof end == "string") {
12548
12548
  let s;
12549
12549
  result = this;
12550
- while ((s = result.value.search(start)) > -1)
12550
+ while ((s = result.value.indexOf(start)) > -1)
12551
12551
  result = result.replace(s, s + start.length, end);
12552
12552
  }
12553
12553
  else if (typeof start == "number" && typeof end == "number") {
@@ -12589,7 +12589,7 @@ class StateEditor {
12589
12589
  else if (typeof start == "string") {
12590
12590
  let s;
12591
12591
  result = this;
12592
- while ((s = result.value.search(start)) > -1)
12592
+ while ((s = result.value.indexOf(start)) > -1)
12593
12593
  result = result.delete(s, s + start.length);
12594
12594
  }
12595
12595
  else
@@ -31620,11 +31620,11 @@ exports.register = exports.Base = void 0;
31620
31620
 
31621
31621
 
31622
31622
  class Base {
31623
- constructor(seperator) {
31624
- this.seperator = seperator;
31623
+ constructor(separator) {
31624
+ this.separator = separator;
31625
31625
  }
31626
- unformat(formated) {
31627
- return formated.delete(this.seperator);
31626
+ unformat(formatted) {
31627
+ return formatted.delete(this.separator);
31628
31628
  }
31629
31629
  daysInMonth(value) {
31630
31630
  var _a;
@@ -31657,12 +31657,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
31657
31657
 
31658
31658
 
31659
31659
  class Handler extends Base_1.Base {
31660
- constructor(seperator) {
31661
- super(seperator);
31660
+ constructor(separator) {
31661
+ super(separator);
31662
31662
  }
31663
31663
  toString(data) {
31664
31664
  return (data === null || data === void 0 ? void 0 : data.length) == 10
31665
- ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
31665
+ ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.separator)
31666
31666
  : "";
31667
31667
  }
31668
31668
  fromString(value) {
@@ -31674,12 +31674,12 @@ class Handler extends Base_1.Base {
31674
31674
  if (result.get(0, 1) > "3")
31675
31675
  result = result.insert(0, "0");
31676
31676
  if (result.value.length > 1)
31677
- result = result.insert(2, this.seperator);
31677
+ result = result.insert(2, this.separator);
31678
31678
  if (result.get(3, 1) > "1")
31679
31679
  result = result.insert(3, "0");
31680
31680
  if (result.value.length > 4)
31681
- result = result.insert(5, this.seperator);
31682
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.seperator)) });
31681
+ result = result.insert(5, this.separator);
31682
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|[12][0-9]|3[01])", "(0[1-9]|1[012])", "\\d{4}$"].join(this.separator)) });
31683
31683
  }
31684
31684
  allowed(symbol, state) {
31685
31685
  return state.selection.start == 1 && state.value[0] == "3"
@@ -31710,12 +31710,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
31710
31710
 
31711
31711
 
31712
31712
  class Handler extends Base_1.Base {
31713
- constructor(seperator) {
31714
- super(seperator);
31713
+ constructor(separator) {
31714
+ super(separator);
31715
31715
  }
31716
31716
  toString(data) {
31717
31717
  return (data === null || data === void 0 ? void 0 : data.length) == 10
31718
- ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
31718
+ ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.separator)
31719
31719
  : "";
31720
31720
  }
31721
31721
  fromString(value) {
@@ -31727,12 +31727,12 @@ class Handler extends Base_1.Base {
31727
31727
  if (result.get(0, 1) > "1")
31728
31728
  result = result.insert(0, "0");
31729
31729
  if (result.value.length > 1)
31730
- result = result.insert(2, this.seperator);
31730
+ result = result.insert(2, this.separator);
31731
31731
  if (result.get(3, 1) > (result.get(0, 2) == "02" ? "2" : "3"))
31732
31732
  result = result.insert(3, "0");
31733
31733
  if (result.value.length > 4)
31734
- result = result.insert(5, this.seperator);
31735
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.seperator)) });
31734
+ result = result.insert(5, this.separator);
31735
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])", "\\d{4}$"].join(this.separator)) });
31736
31736
  }
31737
31737
  allowed(symbol, state) {
31738
31738
  const result = state.selection.start == 1 && state.value[0] == "1"
@@ -31758,8 +31758,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
31758
31758
 
31759
31759
 
31760
31760
  class Handler extends Base_1.Base {
31761
- constructor(seperator) {
31762
- super(seperator);
31761
+ constructor(separator) {
31762
+ super(separator);
31763
31763
  }
31764
31764
  toString(data) {
31765
31765
  return typeof data != "string" ? "" : data;
@@ -31771,16 +31771,16 @@ class Handler extends Base_1.Base {
31771
31771
  format(unformatted) {
31772
31772
  let result = unformatted;
31773
31773
  if (result.value.length > 3) {
31774
- result = result.insert(4, this.seperator);
31774
+ result = result.insert(4, this.separator);
31775
31775
  if (result.get(5, 1) > "1")
31776
31776
  result = result.insert(5, "0");
31777
31777
  if (result.value.length > 6) {
31778
- result = result.insert(7, this.seperator);
31778
+ result = result.insert(7, this.separator);
31779
31779
  if (result.get(8, 1) > this.daysInMonth(unformatted.value).toString().substring(0, 1))
31780
31780
  result = result.insert(8, "0");
31781
31781
  }
31782
31782
  }
31783
- return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.seperator)) });
31783
+ return Object.assign(Object.assign({}, result), { type: "text", length: [0, 10], pattern: new RegExp(["^\\d{4}", "(0[1-9]|1[012])", "(0[1-9]|[12][0-9]|3[01])$"].join(this.separator)) });
31784
31784
  }
31785
31785
  allowed(symbol, state) {
31786
31786
  const daysInMonth = this.daysInMonth(state.value);