@budibase/frontend-core 2.7.37-alpha.9 → 2.7.37

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,17 +1,17 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "2.7.37-alpha.9",
3
+ "version": "2.7.37",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
7
7
  "svelte": "src/index.js",
8
8
  "dependencies": {
9
- "@budibase/bbui": "2.7.37-alpha.9",
10
- "@budibase/shared-core": "2.7.37-alpha.9",
9
+ "@budibase/bbui": "2.7.37",
10
+ "@budibase/shared-core": "2.7.37",
11
11
  "dayjs": "^1.11.7",
12
12
  "lodash": "^4.17.21",
13
13
  "socket.io-client": "^4.6.1",
14
14
  "svelte": "^3.46.2"
15
15
  },
16
- "gitHead": "2aac6560bb5aa05a6cb230590da477cfb3824eca"
16
+ "gitHead": "aab075e7e2c0dbc39b678d4df7ae748ab931c393"
17
17
  }
@@ -8,7 +8,8 @@
8
8
  SmallRowHeight,
9
9
  } from "../lib/constants"
10
10
 
11
- const { stickyColumn, columns, rowHeight, table } = getContext("grid")
11
+ const { stickyColumn, columns, rowHeight, table, fixedRowHeight } =
12
+ getContext("grid")
12
13
 
13
14
  // Some constants for column width options
14
15
  const smallColSize = 120
@@ -86,6 +87,7 @@
86
87
  <div class="options">
87
88
  {#each rowSizeOptions as option}
88
89
  <ActionButton
90
+ disabled={$fixedRowHeight}
89
91
  quiet
90
92
  selected={$rowHeight === option.size}
91
93
  on:click={() => changeRowHeight(option.size)}
@@ -118,15 +120,15 @@
118
120
  <style>
119
121
  .content {
120
122
  padding: 12px;
123
+ display: flex;
124
+ flex-direction: column;
125
+ gap: 16px;
121
126
  }
122
127
  .size {
123
128
  display: flex;
124
129
  flex-direction: column;
125
130
  gap: 8px;
126
131
  }
127
- .size:first-child {
128
- margin-bottom: 16px;
129
- }
130
132
  .options {
131
133
  display: flex;
132
134
  align-items: center;
@@ -43,7 +43,7 @@
43
43
  export let initialFilter = null
44
44
  export let initialSortColumn = null
45
45
  export let initialSortOrder = null
46
- export let initialRowHeight = null
46
+ export let fixedRowHeight = null
47
47
  export let notifySuccess = null
48
48
  export let notifyError = null
49
49
 
@@ -90,7 +90,7 @@
90
90
  initialFilter,
91
91
  initialSortColumn,
92
92
  initialSortOrder,
93
- initialRowHeight,
93
+ fixedRowHeight,
94
94
  notifySuccess,
95
95
  notifyError,
96
96
  })
@@ -10,7 +10,7 @@ export const createStores = context => {
10
10
  const initialSortColumn = getProp("initialSortColumn")
11
11
  const initialSortOrder = getProp("initialSortOrder")
12
12
  const initialFilter = getProp("initialFilter")
13
- const initialRowHeight = getProp("initialRowHeight")
13
+ const fixedRowHeight = getProp("fixedRowHeight")
14
14
  const schemaOverrides = getProp("schemaOverrides")
15
15
  const columnWhitelist = getProp("columnWhitelist")
16
16
  const notifySuccess = getProp("notifySuccess")
@@ -22,7 +22,7 @@ export const createStores = context => {
22
22
  initialSortColumn,
23
23
  initialSortOrder,
24
24
  initialFilter,
25
- initialRowHeight,
25
+ fixedRowHeight,
26
26
  schemaOverrides,
27
27
  columnWhitelist,
28
28
  notifySuccess,
@@ -14,7 +14,7 @@ export const createStores = context => {
14
14
  const focusedCellAPI = writable(null)
15
15
  const selectedRows = writable({})
16
16
  const hoveredRowId = writable(null)
17
- const rowHeight = writable(props.initialRowHeight || DefaultRowHeight)
17
+ const rowHeight = writable(props.fixedRowHeight || DefaultRowHeight)
18
18
  const previousFocusedRowId = writable(null)
19
19
  const gridFocused = writable(false)
20
20
  const isDragging = writable(false)
@@ -134,7 +134,7 @@ export const initialise = context => {
134
134
  hoveredRowId,
135
135
  table,
136
136
  rowHeight,
137
- initialRowHeight,
137
+ fixedRowHeight,
138
138
  } = context
139
139
 
140
140
  // Ensure we clear invalid rows from state if they disappear
@@ -187,13 +187,15 @@ export const initialise = context => {
187
187
  }
188
188
  })
189
189
 
190
- // Pull row height from table
190
+ // Pull row height from table as long as we don't have a fixed height
191
191
  table.subscribe($table => {
192
- rowHeight.set($table?.rowHeight || DefaultRowHeight)
192
+ if (!get(fixedRowHeight)) {
193
+ rowHeight.set($table?.rowHeight || DefaultRowHeight)
194
+ }
193
195
  })
194
196
 
195
197
  // Reset row height when initial row height prop changes
196
- initialRowHeight.subscribe(height => {
198
+ fixedRowHeight.subscribe(height => {
197
199
  if (height) {
198
200
  rowHeight.set(height)
199
201
  } else {