@budibase/frontend-core 2.11.13 → 2.11.15-alpha.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.
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "2.11.13",
3
+ "version": "2.11.15-alpha.0",
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.11.13",
10
- "@budibase/shared-core": "2.11.13",
9
+ "@budibase/bbui": "2.11.15-alpha.0",
10
+ "@budibase/shared-core": "2.11.15-alpha.0",
11
11
  "dayjs": "^1.10.8",
12
12
  "lodash": "^4.17.21",
13
13
  "socket.io-client": "^4.6.1",
14
14
  "svelte": "^3.46.2"
15
15
  },
16
- "gitHead": "897a146a28a8970a0ef194d77baf3516b5b76821"
16
+ "gitHead": "f23ea2d19206b434781d145c498582d091effa8c"
17
17
  }
@@ -17,13 +17,24 @@
17
17
  const { config, dispatch, selectedRows } = getContext("grid")
18
18
  const svelteDispatch = createEventDispatcher()
19
19
 
20
- const select = () => {
20
+ const select = e => {
21
+ e.stopPropagation()
21
22
  svelteDispatch("select")
22
23
  const id = row?._id
23
24
  if (id) {
24
25
  selectedRows.actions.toggleRow(id)
25
26
  }
26
27
  }
28
+
29
+ const bulkDelete = e => {
30
+ e.stopPropagation()
31
+ dispatch("request-bulk-delete")
32
+ }
33
+
34
+ const expand = e => {
35
+ e.stopPropagation()
36
+ svelteDispatch("expand")
37
+ }
27
38
  </script>
28
39
 
29
40
  <GridCell
@@ -56,7 +67,7 @@
56
67
  {/if}
57
68
  {/if}
58
69
  {#if rowSelected && $config.canDeleteRows}
59
- <div class="delete" on:click={() => dispatch("request-bulk-delete")}>
70
+ <div class="delete" on:click={bulkDelete}>
60
71
  <Icon
61
72
  name="Delete"
62
73
  size="S"
@@ -65,12 +76,7 @@
65
76
  </div>
66
77
  {:else}
67
78
  <div class="expand" class:visible={$config.canExpandRows && expandable}>
68
- <Icon
69
- size="S"
70
- name="Maximize"
71
- hoverable
72
- on:click={() => svelteDispatch("expand")}
73
- />
79
+ <Icon size="S" name="Maximize" hoverable on:click={expand} />
74
80
  </div>
75
81
  {/if}
76
82
  </div>
@@ -17,6 +17,7 @@
17
17
  columnHorizontalInversionIndex,
18
18
  contentLines,
19
19
  isDragging,
20
+ dispatch,
20
21
  } = getContext("grid")
21
22
 
22
23
  $: rowSelected = !!$selectedRows[row._id]
@@ -30,6 +31,7 @@
30
31
  on:focus
31
32
  on:mouseenter={$isDragging ? null : () => ($hoveredRowId = row._id)}
32
33
  on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)}
34
+ on:click={() => dispatch("rowclick", row)}
33
35
  >
34
36
  {#each $renderedColumns as column, columnIdx (column.name)}
35
37
  {@const cellId = `${row._id}-${column.name}`}
@@ -74,6 +74,7 @@
74
74
  class="row"
75
75
  on:mouseenter={$isDragging ? null : () => ($hoveredRowId = row._id)}
76
76
  on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)}
77
+ on:click={() => dispatch("rowclick", row)}
77
78
  >
78
79
  <GutterCell {row} {rowFocused} {rowHovered} {rowSelected} />
79
80
  {#if $stickyColumn}