@budibase/bbui 3.20.14 → 3.21.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,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "3.20.14",
4
+ "version": "3.21.0",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.ts",
7
7
  "module": "dist/bbui.mjs",
@@ -106,5 +106,5 @@
106
106
  }
107
107
  }
108
108
  },
109
- "gitHead": "722993643f9b1df9b424e04b8e4bc2a8705b3849"
109
+ "gitHead": "89497e01938534167c4ffbe74cdd4090e3e7c3a5"
110
110
  }
@@ -1,9 +1,9 @@
1
1
  <script lang="ts">
2
+ import { Icon } from "@budibase/bbui"
2
3
  import "@spectrum-css/checkbox/dist/index-vars.css"
3
4
  import "@spectrum-css/fieldgroup/dist/index-vars.css"
4
5
  import { createEventDispatcher } from "svelte"
5
6
  import type { ChangeEventHandler } from "svelte/elements"
6
- import { Icon } from "@budibase/bbui"
7
7
 
8
8
  export let value = false
9
9
  export let id: string | undefined = undefined
@@ -22,8 +22,9 @@
22
22
  </script>
23
23
 
24
24
  <label
25
- class="spectrum-Checkbox spectrum-Checkbox--emphasized {sizeClass}"
26
- class:checked={value || indeterminate}
25
+ class="spectrum-Checkbox {sizeClass}"
26
+ class:spectrum-Checkbox--emphasized={!disabled}
27
+ class:is-disabled={disabled}
27
28
  class:readonly
28
29
  >
29
30
  <input
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
- import EasyMDE from "easymde"
2
+ import type EasyMDE from "easymde"
3
3
  import "easymde/dist/easymde.min.css"
4
- import { onMount } from "svelte"
4
+ import { onDestroy, onMount } from "svelte"
5
5
 
6
6
  export let height: string | null = null
7
7
  export let scroll: boolean = true
@@ -13,8 +13,9 @@
13
13
 
14
14
  let element: HTMLTextAreaElement | undefined = undefined
15
15
 
16
- onMount(() => {
16
+ onMount(async () => {
17
17
  height = height || "200px"
18
+ const { default: EasyMDE } = await import("easymde")
18
19
  mde = new EasyMDE({
19
20
  element,
20
21
  spellChecker: false,
@@ -24,11 +25,10 @@
24
25
  minHeight: scroll ? undefined : height,
25
26
  ...easyMDEOptions,
26
27
  })
28
+ })
27
29
 
28
- // Revert the editor when we unmount
29
- return () => {
30
- mde?.toTextArea()
31
- }
30
+ onDestroy(() => {
31
+ mde?.toTextArea()
32
32
  })
33
33
 
34
34
  $: styleString = getStyleString(fullScreenOffset)
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
- import Checkbox from "../Form/Checkbox.svelte"
3
2
  import ActionButton from "../ActionButton/ActionButton.svelte"
3
+ import Checkbox from "../Form/Checkbox.svelte"
4
4
 
5
5
  export let selected: boolean | undefined
6
6
  export let onEdit: (_e: Event) => void
@@ -11,7 +11,7 @@
11
11
 
12
12
  <div>
13
13
  {#if allowSelectRows && data.__selectable !== false}
14
- <Checkbox value={selected} />
14
+ <Checkbox value={selected} disabled={data.__disabled} />
15
15
  {/if}
16
16
  {#if allowEditRows}
17
17
  <ActionButton size="S" on:click={onEdit}>Edit</ActionButton>
@@ -1,12 +1,12 @@
1
1
  <script lang="ts">
2
- import { createEventDispatcher, onMount } from "svelte"
3
2
  import "@spectrum-css/table/dist/index-vars.css"
4
- import CellRenderer from "./CellRenderer.svelte"
5
- import SelectEditRenderer from "./SelectEditRenderer.svelte"
6
- import { cloneDeep, deepGet } from "../helpers"
7
- import ProgressCircle from "../ProgressCircle/ProgressCircle.svelte"
3
+ import { createEventDispatcher, onMount } from "svelte"
8
4
  import Checkbox from "../Form/Checkbox.svelte"
5
+ import { cloneDeep, deepGet } from "../helpers"
9
6
  import Icon from "../Icon/Icon.svelte"
7
+ import ProgressCircle from "../ProgressCircle/ProgressCircle.svelte"
8
+ import CellRenderer from "./CellRenderer.svelte"
9
+ import SelectEditRenderer from "./SelectEditRenderer.svelte"
10
10
 
11
11
  /**
12
12
  /**
@@ -199,6 +199,9 @@
199
199
  }
200
200
 
201
201
  const sortBy = (fieldSchema: Record<string, any>): void => {
202
+ if (disableSorting) {
203
+ return
204
+ }
202
205
  if (fieldSchema.sortable === false) {
203
206
  return
204
207
  }