smoothly 0.1.92 → 0.1.93

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.
@@ -212,6 +212,8 @@ var Action;
212
212
  function apply(formatter, state, action) {
213
213
  var _a, _b;
214
214
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
215
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
216
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
215
217
  if (action) {
216
218
  if (action.ctrlKey || action.metaKey) {
217
219
  if (action.key == "a")
@@ -343,7 +345,7 @@ class Handler {
343
345
  return typeof value == "string" ? value : undefined;
344
346
  }
345
347
  format(unformated) {
346
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
348
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
347
349
  }
348
350
  unformat(formated) {
349
351
  return formated;
@@ -379,7 +381,7 @@ class Handler {
379
381
  result = result.prepend("0");
380
382
  if (result.value.length > 1)
381
383
  result = result.insert(2, " / ");
382
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
384
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
383
385
  }
384
386
  unformat(formated) {
385
387
  return formated.delete(" / ");
@@ -407,8 +409,8 @@ class Handler {
407
409
  }
408
410
  format(unformated) {
409
411
  const issuer = getIssuer(unformated.value);
410
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
411
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
412
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
413
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
412
414
  }
413
415
  unformat(formated) {
414
416
  return formated.delete(" ");
@@ -1537,7 +1539,7 @@ class Handler {
1537
1539
  }
1538
1540
  fromString(value) {
1539
1541
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
1540
- return result && !isNaN(result) ? result : undefined;
1542
+ return result != undefined && !isNaN(result) ? result : undefined;
1541
1543
  }
1542
1544
  format(unformated) {
1543
1545
  var _a;
@@ -37577,6 +37577,8 @@ exports.Action = void 0;
37577
37577
  function apply(formatter, state, action) {
37578
37578
  var _a, _b;
37579
37579
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
37580
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
37581
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
37580
37582
  if (action) {
37581
37583
  if (action.ctrlKey || action.metaKey) {
37582
37584
  if (action.key == "a")
@@ -37702,7 +37704,7 @@ class Handler {
37702
37704
  return typeof value == "string" ? value : undefined;
37703
37705
  }
37704
37706
  format(unformated) {
37705
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
37707
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
37706
37708
  }
37707
37709
  unformat(formated) {
37708
37710
  return formated;
@@ -37735,7 +37737,7 @@ class Handler {
37735
37737
  result = result.prepend("0");
37736
37738
  if (result.value.length > 1)
37737
37739
  result = result.insert(2, " / ");
37738
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
37740
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
37739
37741
  }
37740
37742
  unformat(formated) {
37741
37743
  return formated.delete(" / ");
@@ -37760,8 +37762,8 @@ class Handler {
37760
37762
  }
37761
37763
  format(unformated) {
37762
37764
  const issuer = getIssuer(unformated.value);
37763
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
37764
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
37765
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
37766
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
37765
37767
  }
37766
37768
  unformat(formated) {
37767
37769
  return formated.delete(" ");
@@ -38842,7 +38844,7 @@ class Handler {
38842
38844
  }
38843
38845
  fromString(value) {
38844
38846
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
38845
- return result && !isNaN(result) ? result : undefined;
38847
+ return result != undefined && !isNaN(result) ? result : undefined;
38846
38848
  }
38847
38849
  format(unformated) {
38848
38850
  var _a;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-138c41c2.js');
6
- const index$1 = require('./index-bc3845e8.js');
6
+ const index$1 = require('./index-d66869d7.js');
7
7
  require('./_commonjsHelpers-10109b76.js');
8
8
  require('./index-ac32385c.js');
9
9
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-138c41c2.js');
6
6
  const index$2 = require('./index-ac32385c.js');
7
- const index$1 = require('./index-bc3845e8.js');
7
+ const index$1 = require('./index-d66869d7.js');
8
8
  require('./_commonjsHelpers-10109b76.js');
9
9
 
10
10
  const styleCss = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight)}[hidden].sc-smoothly-input-h{display:none}label.sc-smoothly-input{position:absolute;left:0.4em;top:0.6em;color:rgb(var(--smoothly-text-tint));opacity:0.8;user-select:none;cursor:inherit;transition:font-size 0.1s;transition-timing-function:ease}input.sc-smoothly-input{padding:1em 0.2em 0.2em 0.2em;width:calc(100% - 0.4em);background:none;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family)}smoothly-icon.sc-smoothly-input{display:none;position:absolute;right:0.2em;top:0.6em}input.sc-smoothly-input:invalid+smoothly-icon.sc-smoothly-input{display:block}.has-value.sc-smoothly-input-h>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}.sc-smoothly-input-h:focus-within>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}input.sc-smoothly-input:focus{outline:none}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill:hover,input.sc-smoothly-input:-webkit-autofill:focus,input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 30px unset inset !important;-webkit-box-shadow:0 0 0 30px unset inset !important}input.sc-smoothly-input:-webkit-autofill{-webkit-text-fill-color:unset !important}input.sc-smoothly-input:-internal-autofill-previewed,input.sc-smoothly-input:-internal-autofill-selected,textarea.sc-smoothly-input:-internal-autofill-previewed,textarea.sc-smoothly-input:-internal-autofill-selected,select.sc-smoothly-input:-internal-autofill-previewed,select.sc-smoothly-input:-internal-autofill-selected{background-color:none !important;background-image:none !important;color:unset !important}";
@@ -40456,6 +40456,8 @@ var Action;
40456
40456
  function apply(formatter, state, action) {
40457
40457
  var _a, _b;
40458
40458
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
40459
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
40460
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
40459
40461
  if (action) {
40460
40462
  if (action.ctrlKey || action.metaKey) {
40461
40463
  if (action.key == "a")
@@ -40587,7 +40589,7 @@ class Handler {
40587
40589
  return typeof value == "string" ? value : undefined;
40588
40590
  }
40589
40591
  format(unformated) {
40590
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
40592
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
40591
40593
  }
40592
40594
  unformat(formated) {
40593
40595
  return formated;
@@ -40623,7 +40625,7 @@ class Handler {
40623
40625
  result = result.prepend("0");
40624
40626
  if (result.value.length > 1)
40625
40627
  result = result.insert(2, " / ");
40626
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
40628
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
40627
40629
  }
40628
40630
  unformat(formated) {
40629
40631
  return formated.delete(" / ");
@@ -40651,8 +40653,8 @@ class Handler {
40651
40653
  }
40652
40654
  format(unformated) {
40653
40655
  const issuer = getIssuer(unformated.value);
40654
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
40655
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
40656
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
40657
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
40656
40658
  }
40657
40659
  unformat(formated) {
40658
40660
  return formated.delete(" ");
@@ -41781,7 +41783,7 @@ class Handler {
41781
41783
  }
41782
41784
  fromString(value) {
41783
41785
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
41784
- return result && !isNaN(result) ? result : undefined;
41786
+ return result != undefined && !isNaN(result) ? result : undefined;
41785
41787
  }
41786
41788
  format(unformated) {
41787
41789
  var _a;
@@ -210,6 +210,8 @@ var Action;
210
210
  function apply(formatter, state, action) {
211
211
  var _a, _b;
212
212
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
213
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
214
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
213
215
  if (action) {
214
216
  if (action.ctrlKey || action.metaKey) {
215
217
  if (action.key == "a")
@@ -341,7 +343,7 @@ class Handler {
341
343
  return typeof value == "string" ? value : undefined;
342
344
  }
343
345
  format(unformated) {
344
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
346
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
345
347
  }
346
348
  unformat(formated) {
347
349
  return formated;
@@ -377,7 +379,7 @@ class Handler {
377
379
  result = result.prepend("0");
378
380
  if (result.value.length > 1)
379
381
  result = result.insert(2, " / ");
380
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
382
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
381
383
  }
382
384
  unformat(formated) {
383
385
  return formated.delete(" / ");
@@ -405,8 +407,8 @@ class Handler {
405
407
  }
406
408
  format(unformated) {
407
409
  const issuer = getIssuer(unformated.value);
408
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
409
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
410
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
411
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
410
412
  }
411
413
  unformat(formated) {
412
414
  return formated.delete(" ");
@@ -1535,7 +1537,7 @@ class Handler {
1535
1537
  }
1536
1538
  fromString(value) {
1537
1539
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
1538
- return result && !isNaN(result) ? result : undefined;
1540
+ return result != undefined && !isNaN(result) ? result : undefined;
1539
1541
  }
1540
1542
  format(unformated) {
1541
1543
  var _a;
@@ -37573,6 +37573,8 @@ exports.Action = void 0;
37573
37573
  function apply(formatter, state, action) {
37574
37574
  var _a, _b;
37575
37575
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
37576
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
37577
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
37576
37578
  if (action) {
37577
37579
  if (action.ctrlKey || action.metaKey) {
37578
37580
  if (action.key == "a")
@@ -37698,7 +37700,7 @@ class Handler {
37698
37700
  return typeof value == "string" ? value : undefined;
37699
37701
  }
37700
37702
  format(unformated) {
37701
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
37703
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
37702
37704
  }
37703
37705
  unformat(formated) {
37704
37706
  return formated;
@@ -37731,7 +37733,7 @@ class Handler {
37731
37733
  result = result.prepend("0");
37732
37734
  if (result.value.length > 1)
37733
37735
  result = result.insert(2, " / ");
37734
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
37736
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
37735
37737
  }
37736
37738
  unformat(formated) {
37737
37739
  return formated.delete(" / ");
@@ -37756,8 +37758,8 @@ class Handler {
37756
37758
  }
37757
37759
  format(unformated) {
37758
37760
  const issuer = getIssuer(unformated.value);
37759
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
37760
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
37761
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
37762
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
37761
37763
  }
37762
37764
  unformat(formated) {
37763
37765
  return formated.delete(" ");
@@ -38838,7 +38840,7 @@ class Handler {
38838
38840
  }
38839
38841
  fromString(value) {
38840
38842
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
38841
- return result && !isNaN(result) ? result : undefined;
38843
+ return result != undefined && !isNaN(result) ? result : undefined;
38842
38844
  }
38843
38845
  format(unformated) {
38844
38846
  var _a;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h } from './index-02a70ac1.js';
2
- import { d as dist } from './index-37a67c97.js';
2
+ import { d as dist } from './index-401c6ce3.js';
3
3
  import './_commonjsHelpers-8fe71198.js';
4
4
  import './index-a5a08f46.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, i as createEvent, h, k as Host } from './index-02a70ac1.js';
2
2
  import { d as dist$1 } from './index-a5a08f46.js';
3
- import { d as dist } from './index-37a67c97.js';
3
+ import { d as dist } from './index-401c6ce3.js';
4
4
  import './_commonjsHelpers-8fe71198.js';
5
5
 
6
6
  const styleCss = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight)}[hidden].sc-smoothly-input-h{display:none}label.sc-smoothly-input{position:absolute;left:0.4em;top:0.6em;color:rgb(var(--smoothly-text-tint));opacity:0.8;user-select:none;cursor:inherit;transition:font-size 0.1s;transition-timing-function:ease}input.sc-smoothly-input{padding:1em 0.2em 0.2em 0.2em;width:calc(100% - 0.4em);background:none;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family)}smoothly-icon.sc-smoothly-input{display:none;position:absolute;right:0.2em;top:0.6em}input.sc-smoothly-input:invalid+smoothly-icon.sc-smoothly-input{display:block}.has-value.sc-smoothly-input-h>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}.sc-smoothly-input-h:focus-within>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}input.sc-smoothly-input:focus{outline:none}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill:hover,input.sc-smoothly-input:-webkit-autofill:focus,input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 30px unset inset !important;-webkit-box-shadow:0 0 0 30px unset inset !important}input.sc-smoothly-input:-webkit-autofill{-webkit-text-fill-color:unset !important}input.sc-smoothly-input:-internal-autofill-previewed,input.sc-smoothly-input:-internal-autofill-selected,textarea.sc-smoothly-input:-internal-autofill-previewed,textarea.sc-smoothly-input:-internal-autofill-selected,select.sc-smoothly-input:-internal-autofill-previewed,select.sc-smoothly-input:-internal-autofill-selected{background-color:none !important;background-image:none !important;color:unset !important}";
@@ -210,6 +210,8 @@ var Action;
210
210
  function apply(formatter, state, action) {
211
211
  var _a, _b;
212
212
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
213
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
214
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
213
215
  if (action) {
214
216
  if (action.ctrlKey || action.metaKey) {
215
217
  if (action.key == "a")
@@ -341,7 +343,7 @@ class Handler {
341
343
  return typeof value == "string" ? value : undefined;
342
344
  }
343
345
  format(unformated) {
344
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
346
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
345
347
  }
346
348
  unformat(formated) {
347
349
  return formated;
@@ -377,7 +379,7 @@ class Handler {
377
379
  result = result.prepend("0");
378
380
  if (result.value.length > 1)
379
381
  result = result.insert(2, " / ");
380
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
382
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
381
383
  }
382
384
  unformat(formated) {
383
385
  return formated.delete(" / ");
@@ -405,8 +407,8 @@ class Handler {
405
407
  }
406
408
  format(unformated) {
407
409
  const issuer = getIssuer(unformated.value);
408
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
409
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
410
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
411
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
410
412
  }
411
413
  unformat(formated) {
412
414
  return formated.delete(" ");
@@ -1535,7 +1537,7 @@ class Handler {
1535
1537
  }
1536
1538
  fromString(value) {
1537
1539
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
1538
- return result && !isNaN(result) ? result : undefined;
1540
+ return result != undefined && !isNaN(result) ? result : undefined;
1539
1541
  }
1540
1542
  format(unformated) {
1541
1543
  var _a;