@budibase/frontend-core 2.5.6-alpha.36 → 2.5.6-alpha.38

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.5.6-alpha.36",
3
+ "version": "2.5.6-alpha.38",
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.5.6-alpha.36",
10
- "@budibase/shared-core": "2.5.6-alpha.36",
9
+ "@budibase/bbui": "2.5.6-alpha.38",
10
+ "@budibase/shared-core": "2.5.6-alpha.38",
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": "6169dc58d2c2e62f2af975cd17f6c97e8366d422"
16
+ "gitHead": "03695de7840c264f3513663a31c27c05b23b888c"
17
17
  }
@@ -1,5 +1,6 @@
1
1
  <script>
2
2
  import { onMount, tick } from "svelte"
3
+ import { clickOutside } from "@budibase/bbui"
3
4
 
4
5
  export let value
5
6
  export let focused = false
@@ -60,6 +61,7 @@
60
61
  on:change={handleChange}
61
62
  on:wheel|stopPropagation
62
63
  spellcheck="false"
64
+ use:clickOutside={close}
63
65
  />
64
66
  {:else}
65
67
  <div class="long-form-cell" on:click={editable ? open : null} class:editable>
@@ -2,6 +2,13 @@
2
2
  import TextCell from "./TextCell.svelte"
3
3
 
4
4
  export let api
5
+ export let onChange
6
+
7
+ const numberOnChange = value => {
8
+ const float = parseFloat(value)
9
+ const newValue = isNaN(float) ? null : float
10
+ onChange(newValue)
11
+ }
5
12
  </script>
6
13
 
7
- <TextCell {...$$props} bind:api type="number" />
14
+ <TextCell {...$$props} onChange={numberOnChange} bind:api type="number" />
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import { Icon } from "@budibase/bbui"
2
+ import { Icon, clickOutside } from "@budibase/bbui"
3
3
  import { getColor } from "../lib/utils"
4
4
  import { onMount } from "svelte"
5
5
 
@@ -118,6 +118,7 @@
118
118
  class:invertX
119
119
  class:invertY
120
120
  on:wheel={e => e.stopPropagation()}
121
+ use:clickOutside={close}
121
122
  >
122
123
  {#each options as option, idx}
123
124
  {@const color = getOptionColor(option)}
@@ -18,7 +18,7 @@
18
18
  <script>
19
19
  import { getColor } from "../lib/utils"
20
20
  import { onMount, getContext } from "svelte"
21
- import { Icon, Input, ProgressCircle } from "@budibase/bbui"
21
+ import { Icon, Input, ProgressCircle, clickOutside } from "@budibase/bbui"
22
22
  import { debounce } from "../../../utils/utils"
23
23
 
24
24
  export let value
@@ -284,7 +284,13 @@
284
284
  </div>
285
285
 
286
286
  {#if isOpen}
287
- <div class="dropdown" class:invertX class:invertY on:wheel|stopPropagation>
287
+ <div
288
+ class="dropdown"
289
+ class:invertX
290
+ class:invertY
291
+ on:wheel|stopPropagation
292
+ use:clickOutside={close}
293
+ >
288
294
  <div class="search">
289
295
  <Input
290
296
  autofocus