@budibase/frontend-core 3.13.7 → 3.13.9

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "3.13.7",
3
+ "version": "3.13.9",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
@@ -17,5 +17,5 @@
17
17
  "shortid": "2.2.15",
18
18
  "socket.io-client": "^4.7.5"
19
19
  },
20
- "gitHead": "b355225dbd910bcf4fd937e8b0aeff63e4d90478"
20
+ "gitHead": "30a44240184250ea133efd48416ad2a33ee16d60"
21
21
  }
package/src/api/tables.ts CHANGED
@@ -38,6 +38,7 @@ export interface TableEndpoints {
38
38
  getTable: (tableId: string) => Promise<FindTableResponse>
39
39
  saveTable: (table: SaveTableRequest) => Promise<SaveTableResponse>
40
40
  deleteTable: (id: string, rev: string) => Promise<DeleteTableResponse>
41
+ duplicateTable: (tableId: string) => Promise<SaveTableResponse>
41
42
  validateNewTableImport: (
42
43
  rows: Row[],
43
44
  schema: TableSchema
@@ -189,4 +190,14 @@ export const buildTableEndpoints = (API: BaseAPIClient): TableEndpoints => ({
189
190
  },
190
191
  })
191
192
  },
193
+
194
+ /**
195
+ * Duplicates a table without its data.
196
+ * @param tableId the ID of the table to duplicate
197
+ */
198
+ duplicateTable: async tableId => {
199
+ return await API.post({
200
+ url: `/api/tables/${tableId}/duplicate`,
201
+ })
202
+ },
192
203
  })
@@ -405,7 +405,7 @@
405
405
  Move right
406
406
  </MenuItem>
407
407
  <MenuItem
408
- disabled={column.primaryDisplay}
408
+ disabled={column.primaryDisplay || !$config.canHideColumns}
409
409
  icon="eye-slash"
410
410
  on:click={hideColumn}
411
411
  >
@@ -448,8 +448,12 @@
448
448
  }
449
449
 
450
450
  /* Search icon */
451
+ .column-icon {
452
+ width: 18px;
453
+ }
451
454
  .search-icon {
452
455
  display: none;
456
+ width: 18px;
453
457
  }
454
458
  .header-cell.searchable:not(.open):hover .search-icon,
455
459
  .header-cell.searchable.searching .search-icon {
@@ -48,6 +48,7 @@
48
48
  export let darkMode = false
49
49
  export let isCloud = null
50
50
  export let aiEnabled = false
51
+ export let canHideColumns = true
51
52
 
52
53
  // Unique identifier for DOM nodes inside this instance
53
54
  const gridID = `grid-${Math.random().toString().slice(2)}`
@@ -104,6 +105,7 @@
104
105
  darkMode,
105
106
  isCloud,
106
107
  aiEnabled,
108
+ canHideColumns,
107
109
  })
108
110
 
109
111
  // Derive min height and make available in context
@@ -216,7 +218,7 @@
216
218
  /* Variables */
217
219
  --accent-color: var(--primaryColor, var(--spectrum-global-color-blue-400));
218
220
  --grid-background: var(--spectrum-global-color-gray-50);
219
- --grid-background-alt: var(--spectrum-global-color-gray-100);
221
+ --grid-background-alt: var(--background);
220
222
  --header-cell-background: var(
221
223
  --custom-header-cell-background,
222
224
  var(--spectrum-global-color-gray-100)
@@ -228,7 +230,7 @@
228
230
  --cell-spacing: 4px;
229
231
  --cell-border: 1px solid var(--spectrum-global-color-gray-200);
230
232
  --cell-font-size: 14px;
231
- --cell-font-color: var(--spectrum-global-color-gray-800);
233
+ --cell-font-color: var(--spectrum-global-color-gray-900);
232
234
  flex: 1 1 auto;
233
235
  display: flex;
234
236
  flex-direction: column;
@@ -238,6 +240,7 @@
238
240
  overflow: hidden;
239
241
  background: var(--grid-background);
240
242
  min-height: var(--min-height);
243
+ font-weight: 500;
241
244
  }
242
245
  .grid,
243
246
  .grid :global(*) {
@@ -75,6 +75,7 @@ export interface BaseStoreProps {
75
75
  canExpandRows?: boolean
76
76
  canSaveSchema?: boolean
77
77
  minHeight?: number
78
+ canHideColumns?: boolean
78
79
  }
79
80
 
80
81
  export interface BaseStore {