textbrowser 0.51.0 → 0.52.0

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.
Files changed (42) hide show
  1. package/CHANGES.md +5 -0
  2. package/dist/WorkInfo-es.js +318 -78
  3. package/dist/activateCallback-es.js +9 -0
  4. package/dist/index-es.js +2569 -1732
  5. package/dist/index-es.min.js +4 -4
  6. package/dist/resources/activateCallback.d.ts.map +1 -1
  7. package/dist/resources/index.d.ts +1 -1
  8. package/dist/resources/index.d.ts.map +1 -1
  9. package/dist/resources/resultsDisplay.d.ts +4 -4
  10. package/dist/resources/resultsDisplay.d.ts.map +1 -1
  11. package/dist/resources/templates/index.d.ts.map +1 -1
  12. package/dist/resources/templates/utils/dom.d.ts +1 -1
  13. package/dist/resources/templates/utils/dom.d.ts.map +1 -1
  14. package/dist/resources/templates/workDisplay.d.ts.map +1 -1
  15. package/dist/resources/utils/IntlURLSearchParams.d.ts +4 -4
  16. package/dist/resources/utils/IntlURLSearchParams.d.ts.map +1 -1
  17. package/dist/resources/utils/Metadata.d.ts +2 -2
  18. package/dist/resources/utils/Metadata.d.ts.map +1 -1
  19. package/dist/resources/utils/Params.d.ts.map +1 -1
  20. package/dist/resources/utils/Plugin.d.ts +14 -10
  21. package/dist/resources/utils/Plugin.d.ts.map +1 -1
  22. package/dist/resources/utils/ServiceWorker.d.ts.map +1 -1
  23. package/dist/resources/utils/dialogs.d.ts +2 -2
  24. package/dist/resources/utils/dialogs.d.ts.map +1 -1
  25. package/dist/resources/utils/getLocaleFallbackResults.d.ts +1 -1
  26. package/dist/resources/utils/getLocaleFallbackResults.d.ts.map +1 -1
  27. package/dist/server/main.d.ts +2 -1
  28. package/dist/server/main.d.ts.map +1 -1
  29. package/package.json +20 -20
  30. package/resources/activateCallback.js +6 -0
  31. package/resources/index.js +10 -11
  32. package/resources/resultsDisplay.js +4 -2
  33. package/resources/templates/index.js +0 -1
  34. package/resources/templates/workDisplay.js +0 -1
  35. package/resources/user-sample.js +1 -0
  36. package/resources/utils/Metadata.js +3 -1
  37. package/resources/utils/Plugin.js +11 -5
  38. package/resources/utils/ServiceWorker.js +1 -2
  39. package/resources/utils/WorkInfo.js +1 -1
  40. package/resources/utils/getLocaleFallbackResults.js +3 -1
  41. package/server/main.js +9 -3
  42. package/sw-sample.js +2 -1
@@ -13,11 +13,13 @@
13
13
  */
14
14
  const {ceil} = Math;
15
15
 
16
+ /* eslint-disable jsdoc/reject-any-type -- Generic */
16
17
  /**
17
18
  * @param {any[]} arr
18
19
  * @param {number} size
19
20
  */
20
21
  const arrayChunk = (arr, size) => {
22
+ /* eslint-enable jsdoc/reject-any-type -- Generic */
21
23
  return Array.from({length: ceil(arr.length / size)}, (_, i) => {
22
24
  const offset = i * size;
23
25
  return arr.slice(offset, offset + size);
@@ -30,11 +32,13 @@ const arrayChunk = (arr, size) => {
30
32
  // files in cache?
31
33
  // Todo: Check `oldVersion` and run this first if still too old
32
34
 
35
+ /* eslint-disable jsdoc/reject-any-type -- Generic */
33
36
  /**
34
37
  * @callback Logger
35
38
  * @param {...any} args
36
39
  * @returns {void}
37
40
  */
41
+ /* eslint-enable jsdoc/reject-any-type -- Generic */
38
42
 
39
43
  /**
40
44
  * @param {object} cfg
@@ -57,11 +61,13 @@ async function activateCallback ({
57
61
  await r.json()
58
62
  );
59
63
 
64
+ /* eslint-disable jsdoc/reject-any-type -- Generic */
60
65
  /**
61
66
  * @param {any[]} arr
62
67
  * @param {string} path
63
68
  */
64
69
  const addJSONFetch = (arr, path) => {
70
+ /* eslint-enable jsdoc/reject-any-type -- Generic */
65
71
  arr.push(
66
72
  (async () => (await fetch(basePath + path)).json())()
67
73
  );
@@ -182,6 +188,8 @@ async function activateCallback ({
182
188
  // need to transform them to objects! See https://github.com/w3c/IndexedDB/issues/209
183
189
 
184
190
  /**
191
+ * The `value` property alone contains the latter
192
+ * `(Integer|string)[]` value.
185
193
  * @type {{
186
194
  * [key: string]: string|Integer|(Integer|string)[]
187
195
  * }}
@@ -190,6 +198,7 @@ async function activateCallback ({
190
198
  value: tableRow
191
199
  };
192
200
  uniqueColumnIndexes.forEach((colIdx) => {
201
+ // Indexed like c0, c1, c2, etc.
193
202
  objRow[colIdx] = tableRow[Number.parseInt(colIdx.slice(1))];
194
203
  });
195
204
  // log('objRow', objRow);