native-document 1.0.99 → 1.0.101

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.
@@ -1828,7 +1828,7 @@ var NativeComponents = (function (exports) {
1828
1828
 
1829
1829
  const Store = StoreFactory();
1830
1830
 
1831
- Store.create('locale', 'fr');
1831
+ Store.create('locale', navigator.language.split('-')[0] || 'en');
1832
1832
 
1833
1833
  const $parseDateParts = (value, locale) => {
1834
1834
  const d = new Date(value);
@@ -1864,7 +1864,6 @@ var NativeComponents = (function (exports) {
1864
1864
  };
1865
1865
 
1866
1866
  const Formatters = {
1867
-
1868
1867
  currency: (value, locale, { currency = 'XOF', notation, minimumFractionDigits, maximumFractionDigits } = {}) =>
1869
1868
  new Intl.NumberFormat(locale, {
1870
1869
  style: 'currency',
@@ -2434,7 +2433,7 @@ var NativeComponents = (function (exports) {
2434
2433
  }
2435
2434
 
2436
2435
  const formatter = Formatters[type];
2437
- const localeObservable = Store.follow('locale');
2436
+ const localeObservable = Formatters.locale;
2438
2437
 
2439
2438
  return Observable.computed(() => formatter(self.val(), localeObservable.val(), options),
2440
2439
  [self, localeObservable]
@@ -1622,7 +1622,7 @@ var NativeDocument = (function (exports) {
1622
1622
 
1623
1623
  const Store = StoreFactory();
1624
1624
 
1625
- Store.create('locale', 'fr');
1625
+ Store.create('locale', navigator.language.split('-')[0] || 'en');
1626
1626
 
1627
1627
  const $parseDateParts = (value, locale) => {
1628
1628
  const d = new Date(value);
@@ -1658,7 +1658,6 @@ var NativeDocument = (function (exports) {
1658
1658
  };
1659
1659
 
1660
1660
  const Formatters = {
1661
-
1662
1661
  currency: (value, locale, { currency = 'XOF', notation, minimumFractionDigits, maximumFractionDigits } = {}) =>
1663
1662
  new Intl.NumberFormat(locale, {
1664
1663
  style: 'currency',
@@ -2266,7 +2265,7 @@ var NativeDocument = (function (exports) {
2266
2265
  }
2267
2266
 
2268
2267
  const formatter = Formatters[type];
2269
- const localeObservable = Store.follow('locale');
2268
+ const localeObservable = Formatters.locale;
2270
2269
 
2271
2270
  return Observable.computed(() => formatter(self.val(), localeObservable.val(), options),
2272
2271
  [self, localeObservable]
@@ -6318,13 +6317,13 @@ var NativeDocument = (function (exports) {
6318
6317
  *
6319
6318
  * @param {string} path
6320
6319
  */
6321
- this.match = function(path) {
6320
+ this.match = function(path) {
6322
6321
  path = '/'+trim(path, '/');
6323
6322
  const match = getPattern().exec(path);
6324
6323
  if(!match) return false;
6325
6324
  const params = {};
6326
6325
 
6327
- getPattern().exec(path).forEach((value, index) => {
6326
+ match.forEach((value, index) => {
6328
6327
  if(index < 1) return;
6329
6328
  const name = $paramsNames[index - 1];
6330
6329
  params[name] = value;
@@ -7146,6 +7145,7 @@ var NativeDocument = (function (exports) {
7146
7145
  exports.$ = $;
7147
7146
  exports.ElementCreator = ElementCreator;
7148
7147
  exports.HtmlElementWrapper = HtmlElementWrapper;
7148
+ exports.LocalStorage = LocalStorage;
7149
7149
  exports.NDElement = NDElement;
7150
7150
  exports.Observable = Observable;
7151
7151
  exports.PluginsManager = PluginsManager;