@bbn/bbn 1.0.397 → 1.0.399

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/dist/db.js CHANGED
@@ -274,6 +274,7 @@ var db = {
274
274
  _stores: {},
275
275
  ok: idb !== undefined,
276
276
  updateStructure: function (storeName, structure, req) {
277
+ bbn.fn.log("Updating structure for store:", storeName, structure, req);
277
278
  var primary = structure.keys.PRIMARY.columns.length > 1 ? structure.keys.PRIMARY.columns : structure.keys.PRIMARY.columns[0];
278
279
  var stores = req.objectStoreNames;
279
280
  if (!stores.contains(storeName)) {
package/dist/env.d.ts CHANGED
@@ -30,5 +30,6 @@ declare const _default: {
30
30
  ignoreUnload: boolean;
31
31
  historyDisabled: boolean;
32
32
  nav: string;
33
+ online: boolean;
33
34
  };
34
35
  export default _default;
package/dist/env.js CHANGED
@@ -39,5 +39,6 @@ export default {
39
39
  loggingLevel: 5,
40
40
  ignoreUnload: false,
41
41
  historyDisabled: false,
42
- nav: 'ajax'
42
+ nav: 'ajax',
43
+ online: window.navigator.onLine
43
44
  };
package/dist/fn/init.js CHANGED
@@ -178,6 +178,12 @@ export default function init(cfg, force) {
178
178
  }
179
179
  };
180
180
  }
181
+ window.addEventListener('online', function () {
182
+ bbn.env.online = true;
183
+ });
184
+ window.addEventListener('offline', function () {
185
+ bbn.env.online = false;
186
+ });
181
187
  bbn.env.isInit = true;
182
188
  document.dispatchEvent(new Event("bbninit"));
183
189
  if (bbn.env.logging) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.397",
3
+ "version": "1.0.399",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",