@budibase/bbui 1.0.98-alpha.8 → 1.0.100

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "1.0.98-alpha.8",
4
+ "version": "1.0.100",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@adobe/spectrum-css-workflow-icons": "^1.2.1",
41
- "@budibase/string-templates": "^1.0.98-alpha.8",
41
+ "@budibase/string-templates": "^1.0.100",
42
42
  "@spectrum-css/actionbutton": "^1.0.1",
43
43
  "@spectrum-css/actiongroup": "^1.0.1",
44
44
  "@spectrum-css/avatar": "^3.0.2",
@@ -84,5 +84,5 @@
84
84
  "svelte-flatpickr": "^3.2.3",
85
85
  "svelte-portal": "^1.0.0"
86
86
  },
87
- "gitHead": "54a848845e623a6052d5bb4341eda9cede5bcd1a"
87
+ "gitHead": "b8678e2f560a0c7d172b3b69e260973bc37c8277"
88
88
  }
@@ -13,7 +13,6 @@
13
13
  export let icon = undefined
14
14
  export let active = false
15
15
  export let tooltip = undefined
16
- export let dataCy
17
16
 
18
17
  let showTooltip = false
19
18
  </script>
@@ -28,7 +27,6 @@
28
27
  class:active
29
28
  class="spectrum-Button spectrum-Button--size{size.toUpperCase()}"
30
29
  {disabled}
31
- data-cy={dataCy}
32
30
  on:click|preventDefault
33
31
  on:mouseover={() => (showTooltip = true)}
34
32
  on:focus={() => (showTooltip = true)}
@@ -5,7 +5,6 @@
5
5
  import Divider from "../Divider/Divider.svelte"
6
6
  import Icon from "../Icon/Icon.svelte"
7
7
  import Context from "../context"
8
- import ProgressCircle from "../ProgressCircle/ProgressCircle.svelte"
9
8
 
10
9
  export let title = undefined
11
10
  export let size = "S"
@@ -103,22 +102,15 @@
103
102
  <Button group secondary on:click={close}>{cancelText}</Button>
104
103
  {/if}
105
104
  {#if showConfirmButton}
106
- <span class="confirm-wrap">
107
- <Button
108
- group
109
- cta
110
- {...$$restProps}
111
- disabled={confirmDisabled}
112
- on:click={confirm}
113
- >
114
- {#if loading}
115
- <ProgressCircle overBackground={true} size="S" />
116
- {/if}
117
- {#if !loading}
118
- {confirmText}
119
- {/if}
120
- </Button>
121
- </span>
105
+ <Button
106
+ group
107
+ cta
108
+ {...$$restProps}
109
+ disabled={confirmDisabled}
110
+ on:click={confirm}
111
+ >
112
+ {confirmText}
113
+ </Button>
122
114
  {/if}
123
115
  </div>
124
116
  {/if}
@@ -177,8 +169,4 @@
177
169
  .spectrum-Dialog-buttonGroup {
178
170
  padding-left: 0;
179
171
  }
180
-
181
- .confirm-wrap :global(.spectrum-Button-label) {
182
- display: contents;
183
- }
184
172
  </style>
@@ -56,7 +56,6 @@
56
56
  $: if (!loading) loaded = true
57
57
  $: fields = getFields(schema, showAutoColumns, autoSortColumns)
58
58
  $: rows = fields?.length ? data || [] : []
59
- $: totalRowCount = rows?.length || 0
60
59
  $: visibleRowCount = getVisibleRowCount(
61
60
  loaded,
62
61
  height,
@@ -64,12 +63,7 @@
64
63
  rowCount,
65
64
  rowHeight
66
65
  )
67
- $: heightStyle = getHeightStyle(
68
- visibleRowCount,
69
- rowCount,
70
- totalRowCount,
71
- rowHeight
72
- )
66
+ $: contentStyle = getContentStyle(visibleRowCount, rowCount, rowHeight)
73
67
  $: sortedRows = sortRows(rows, sortColumn, sortOrder)
74
68
  $: gridStyle = getGridStyle(fields, schema, showEditColumn)
75
69
  $: showEditColumn = allowEditRows || allowSelectRows
@@ -113,16 +107,11 @@
113
107
  return Math.min(allRows, Math.ceil(height / rowHeight))
114
108
  }
115
109
 
116
- const getHeightStyle = (
117
- visibleRowCount,
118
- rowCount,
119
- totalRowCount,
120
- rowHeight
121
- ) => {
122
- if (!rowCount || !visibleRowCount || totalRowCount <= rowCount) {
110
+ const getContentStyle = (visibleRows, rowCount, rowHeight) => {
111
+ if (!rowCount || !visibleRows) {
123
112
  return ""
124
113
  }
125
- return `height: ${headerHeight + visibleRowCount * rowHeight}px;`
114
+ return `height: ${headerHeight + visibleRows * rowHeight}px;`
126
115
  }
127
116
 
128
117
  const getGridStyle = (fields, schema, showEditColumn) => {
@@ -275,11 +264,11 @@
275
264
  style={`--row-height: ${rowHeight}px; --header-height: ${headerHeight}px;`}
276
265
  >
277
266
  {#if !loaded}
278
- <div class="loading" style={heightStyle}>
267
+ <div class="loading" style={contentStyle}>
279
268
  <ProgressCircle />
280
269
  </div>
281
270
  {:else}
282
- <div class="spectrum-Table" style={`${heightStyle}${gridStyle}`}>
271
+ <div class="spectrum-Table" style={`${contentStyle}${gridStyle}`}>
283
272
  {#if fields.length}
284
273
  <div class="spectrum-Table-head">
285
274
  {#if showEditColumn}