@kws3/ui 1.5.7 → 1.5.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.
@@ -47,7 +47,7 @@
47
47
  {:else}
48
48
  <div class="level-item">
49
49
  {#if showTotal}
50
- <strong>Total {meta.total} {entityName}</strong>
50
+ <strong>Total {totalItems} {entityName}</strong>
51
51
  {:else if showCurrent}
52
52
  {#if meta.total > 0}Showing {meta.offset * 1 + 1} to {meta.offset *
53
53
  1 +
@@ -72,12 +72,12 @@
72
72
  {/if}
73
73
  {/if}
74
74
  {#if showTotal}
75
- <strong>{meta.total} {entityName}</strong>
75
+ <strong>{totalItems} {entityName}</strong>
76
76
  {/if}
77
77
  </div>
78
78
  {:else if showPerPage && showTotal && !showCurrent}
79
79
  <div class="level-item pagination-showing">
80
- <strong>Total {meta.total} {entityName}</strong>
80
+ <strong>Total {totalItems} {entityName}</strong>
81
81
  </div>
82
82
  {/if}
83
83
 
@@ -204,6 +204,7 @@
204
204
  _perPageOptions = ret;
205
205
  }
206
206
 
207
+ $: totalItems = meta && meta.total ? meta.total : 0;
207
208
  $: currentPage = Math.floor(meta.offset / meta.limit);
208
209
  $: totalPages = Math.ceil(meta.total / (meta.limit || 1));
209
210
  $: totalPages, currentPage, breakThreshold, calculatePages();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kws3/ui",
3
- "version": "1.5.7",
3
+ "version": "1.5.8",
4
4
  "description": "UI components for use with Svelte v3 applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,5 +28,5 @@
28
28
  "text-mask-core": "^5.1.2",
29
29
  "tippy.js": "^6.3.1"
30
30
  },
31
- "gitHead": "68ac0e4a0c88268dac739f25bcc16fab2b6ea941"
31
+ "gitHead": "83046c7c9f3208ecace614fe22b152f00248bd06"
32
32
  }