@budibase/bbui 3.20.13 → 3.20.15

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/dist/bbui.mjs CHANGED
@@ -3682,13 +3682,13 @@ function create_fragment$1X(u) {
3682
3682
  "id",
3683
3683
  /*id*/
3684
3684
  u[1]
3685
- ), attr(b, "class", "spectrum-Checkbox-box"), attr(l, "class", S = "spectrum-Checkbox spectrum-Checkbox--emphasized " + /*sizeClass*/
3686
- u[6] + " svelte-19fatlf"), toggle_class(
3685
+ ), attr(b, "class", "spectrum-Checkbox-box"), attr(l, "class", S = "spectrum-Checkbox " + /*sizeClass*/
3686
+ u[6] + " svelte-19fatlf"), toggle_class(l, "spectrum-Checkbox--emphasized", !/*disabled*/
3687
+ u[3]), toggle_class(
3687
3688
  l,
3688
- "checked",
3689
- /*value*/
3690
- u[0] || /*indeterminate*/
3691
- u[5]
3689
+ "is-disabled",
3690
+ /*disabled*/
3691
+ u[3]
3692
3692
  ), toggle_class(
3693
3693
  l,
3694
3694
  "readonly",
@@ -3722,14 +3722,15 @@ function create_fragment$1X(u) {
3722
3722
  M[j] = null;
3723
3723
  }), check_outros()), ~v ? (y = M[v], y || (y = M[v] = L[v](H), y.c()), transition_in(y, 1), y.m(b, null)) : y = null), /*text*/
3724
3724
  H[2] ? N ? N.p(H, z) : (N = create_if_block$R(H), N.c(), N.m(l, null)) : N && (N.d(1), N = null), (!T || z & /*sizeClass*/
3725
- 64 && S !== (S = "spectrum-Checkbox spectrum-Checkbox--emphasized " + /*sizeClass*/
3726
- H[6] + " svelte-19fatlf")) && attr(l, "class", S), (!T || z & /*sizeClass, value, indeterminate*/
3727
- 97) && toggle_class(
3725
+ 64 && S !== (S = "spectrum-Checkbox " + /*sizeClass*/
3726
+ H[6] + " svelte-19fatlf")) && attr(l, "class", S), (!T || z & /*sizeClass, disabled*/
3727
+ 72) && toggle_class(l, "spectrum-Checkbox--emphasized", !/*disabled*/
3728
+ H[3]), (!T || z & /*sizeClass, disabled*/
3729
+ 72) && toggle_class(
3728
3730
  l,
3729
- "checked",
3730
- /*value*/
3731
- H[0] || /*indeterminate*/
3732
- H[5]
3731
+ "is-disabled",
3732
+ /*disabled*/
3733
+ H[3]
3733
3734
  ), (!T || z & /*sizeClass, readonly*/
3734
3735
  80) && toggle_class(
3735
3736
  l,
@@ -54614,10 +54615,18 @@ class CellRenderer extends SvelteComponent {
54614
54615
  const SelectEditRenderer_svelte_svelte_type_style_lang = "";
54615
54616
  function create_if_block_1$3(u) {
54616
54617
  let l, f;
54617
- return l = new Checkbox_1({ props: { value: (
54618
- /*selected*/
54619
- u[0]
54620
- ) } }), {
54618
+ return l = new Checkbox_1({
54619
+ props: {
54620
+ value: (
54621
+ /*selected*/
54622
+ u[0]
54623
+ ),
54624
+ disabled: (
54625
+ /*data*/
54626
+ u[4].__disabled
54627
+ )
54628
+ }
54629
+ }), {
54621
54630
  c() {
54622
54631
  create_component(l.$$.fragment);
54623
54632
  },
@@ -54628,7 +54637,9 @@ function create_if_block_1$3(u) {
54628
54637
  const b = {};
54629
54638
  m & /*selected*/
54630
54639
  1 && (b.value = /*selected*/
54631
- p[0]), l.$set(b);
54640
+ p[0]), m & /*data*/
54641
+ 16 && (b.disabled = /*data*/
54642
+ p[4].__disabled), l.$set(b);
54632
54643
  },
54633
54644
  i(p) {
54634
54645
  f || (transition_in(l.$$.fragment, p), f = !0);
@@ -55952,7 +55963,7 @@ function instance$b(u, l, f) {
55952
55963
  const Je = ze[Oe], Ue = Ye[Oe];
55953
55964
  return Me === "Descending" ? Je > Ue ? -1 : 1 : Je > Ue ? 1 : -1;
55954
55965
  })), xe = (se) => {
55955
- se.sortable !== !1 && (se.name === fe ? f(16, Z = Z === "Descending" ? "Ascending" : "Descending") : (f(15, fe = se.name), f(16, Z = "Descending")), ce("sort", { column: fe, order: Z }));
55966
+ q || se.sortable !== !1 && (se.name === fe ? f(16, Z = Z === "Descending" ? "Ascending" : "Descending") : (f(15, fe = se.name), f(16, Z = "Descending")), ce("sort", { column: fe, order: Z }));
55956
55967
  }, Qe = (se) => {
55957
55968
  let Oe = se == null ? void 0 : se.displayName;
55958
55969
  return se && Oe === void 0 && (Oe = se.name), Oe || "";
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.13",
4
+ "version": "3.20.15",
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": "104666064bccf2667772e62ec951ad390de5000e"
109
+ "gitHead": "29787f399c811acf15104c21c88e2355fb726eb3"
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,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
  }