dara-components 1.21.7__py3-none-any.whl → 1.21.9__py3-none-any.whl

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.
@@ -32701,6 +32701,10 @@
32701
32701
  line-height: 1.1;
32702
32702
  }
32703
32703
 
32704
+ h1 code {
32705
+ font-size: 2.5rem;
32706
+ }
32707
+
32704
32708
  h2 {
32705
32709
  margin-top: 2rem;
32706
32710
  margin-bottom: 1rem;
@@ -32710,6 +32714,10 @@
32710
32714
  line-height: 1.3;
32711
32715
  }
32712
32716
 
32717
+ h2 code {
32718
+ font-size: 2rem;
32719
+ }
32720
+
32713
32721
  h3 {
32714
32722
  margin-top: 1.6rem;
32715
32723
  margin-bottom: 0.6rem;
@@ -32719,6 +32727,10 @@
32719
32727
  line-height: 1.25;
32720
32728
  }
32721
32729
 
32730
+ h3 code {
32731
+ font-size: 1.25rem;
32732
+ }
32733
+
32722
32734
  h4 {
32723
32735
  margin-top: 1.5rem;
32724
32736
  margin-bottom: 0.5rem;
@@ -32744,14 +32756,6 @@
32744
32756
  color: ${(props) => props.theme.colors.grey5};
32745
32757
  }
32746
32758
 
32747
- h2 code {
32748
- font-size: 0.875rem;
32749
- }
32750
-
32751
- h3 code {
32752
- font-size: 0.9rem;
32753
- }
32754
-
32755
32759
  pre:first-child {
32756
32760
  margin-top: 0;
32757
32761
  }
@@ -61011,7 +61015,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
61011
61015
  const isNil = /* @__PURE__ */ getDefaultExportFromCjs$1(isNilExports);
61012
61016
  var isObjectExports = requireIsObject();
61013
61017
  const isObject = /* @__PURE__ */ getDefaultExportFromCjs$1(isObjectExports);
61014
- const isPrimitive = (val) => isNil(val) || !isObject(val);
61018
+ const isPrimitive = (val) => !isNil(val) && !isObject(val);
61015
61019
  function getMultiselectItems(values2, items) {
61016
61020
  if (!values2) {
61017
61021
  return [];
@@ -61059,21 +61063,24 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
61059
61063
  }
61060
61064
  return items;
61061
61065
  }, [items]);
61062
- const toItem = (val) => {
61063
- const matchingItem = formattedItems.find((item) => {
61064
- if (isItem(item)) {
61065
- if (isPrimitive(item.value) && isPrimitive(val)) {
61066
- return String(item.value) === String(val);
61066
+ const toItem = React$1.useCallback(
61067
+ (val) => {
61068
+ const matchingItem = formattedItems.find((item) => {
61069
+ if (isItem(item)) {
61070
+ if (isPrimitive(item.value) && isPrimitive(val)) {
61071
+ return String(item.value) === String(val);
61072
+ }
61073
+ return isEqual$4(item.value, val);
61067
61074
  }
61068
- return isEqual$4(item.value, val);
61075
+ return false;
61076
+ });
61077
+ if (matchingItem) {
61078
+ return matchingItem;
61069
61079
  }
61070
- return false;
61071
- });
61072
- if (matchingItem) {
61073
- return matchingItem;
61074
- }
61075
- return isPrimitive(val) ? { label: String(val), value: val } : val;
61076
- };
61080
+ return isPrimitive(val) ? { label: String(val), value: val } : val;
61081
+ },
61082
+ [formattedItems]
61083
+ );
61077
61084
  const onChangeAction = core$1.useAction(props.onchange);
61078
61085
  const itemHasListSection = React$1.useRef(null);
61079
61086
  if (itemHasListSection.current === null) {
@@ -61093,7 +61100,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
61093
61100
  },
61094
61101
  [setValue]
61095
61102
  );
61096
- const selectedItem2 = React$1.useMemo(() => toItem(value), [value]);
61103
+ const selectedItem2 = React$1.useMemo(() => toItem(value), [value, toItem]);
61097
61104
  return /* @__PURE__ */ React.createElement(
61098
61105
  StyledSectionedList,
61099
61106
  {
@@ -61118,13 +61125,13 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
61118
61125
  formCtx2.updateForm(currentSelection);
61119
61126
  }
61120
61127
  },
61121
- [setValue]
61128
+ [formCtx2, onChangeAction, setValue]
61122
61129
  );
61123
61130
  const selectedItems = React$1.useMemo(() => {
61124
61131
  const found = getMultiselectItems(value, itemArray);
61125
61132
  const explicitValues = Array.isArray(value) ? value.map(toItem) : value;
61126
61133
  return isEmpty(found) ? explicitValues ?? null : found;
61127
- }, [formattedItems, value]);
61134
+ }, [itemArray, toItem, value]);
61128
61135
  return /* @__PURE__ */ React.createElement(
61129
61136
  StyledMultiSelect,
61130
61137
  {
@@ -61142,7 +61149,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
61142
61149
  }
61143
61150
  const selectedItem = React$1.useMemo(
61144
61151
  () => itemArray.find((item) => String(item.value) === String(value)) ?? toItem(value) ?? null,
61145
- [value]
61152
+ [itemArray, toItem, value]
61146
61153
  );
61147
61154
  const onSelect = React$1.useCallback(
61148
61155
  (item) => {
@@ -61152,7 +61159,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
61152
61159
  formCtx2.updateForm(item.value);
61153
61160
  }
61154
61161
  },
61155
- [setValue, onChangeAction]
61162
+ [setValue, onChangeAction, formCtx2]
61156
61163
  );
61157
61164
  if (props.searchable) {
61158
61165
  return /* @__PURE__ */ React.createElement(
@@ -113449,6 +113456,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
113449
113456
  line-height: 1.1;
113450
113457
  }
113451
113458
 
113459
+ h1 code {
113460
+ font-size: 2.5rem;
113461
+ }
113462
+
113452
113463
  h2 {
113453
113464
  margin-top: 2rem;
113454
113465
  margin-bottom: 1rem;
@@ -113458,6 +113469,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
113458
113469
  line-height: 1.3;
113459
113470
  }
113460
113471
 
113472
+ h2 code {
113473
+ font-size: 2rem;
113474
+ }
113475
+
113461
113476
  h3 {
113462
113477
  margin-top: 1.6rem;
113463
113478
  margin-bottom: 0.6rem;
@@ -113467,6 +113482,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
113467
113482
  line-height: 1.25;
113468
113483
  }
113469
113484
 
113485
+ h3 code {
113486
+ font-size: 1.25rem;
113487
+ }
113488
+
113470
113489
  h4 {
113471
113490
  margin-top: 1.5rem;
113472
113491
  margin-bottom: 0.5rem;
@@ -113492,14 +113511,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
113492
113511
  color: ${(e3) => e3.theme.colors.grey5};
113493
113512
  }
113494
113513
 
113495
- h2 code {
113496
- font-size: 0.875rem;
113497
- }
113498
-
113499
- h3 code {
113500
- font-size: 0.9rem;
113501
- }
113502
-
113503
113514
  pre:first-child {
113504
113515
  margin-top: 0;
113505
113516
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-components
3
- Version: 1.21.7
3
+ Version: 1.21.9
4
4
  Summary: Components for the Dara Framework
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Dist: bokeh (>=3.1.0,<3.2.0)
17
17
  Requires-Dist: cai-causal-graph (>=0.3.6)
18
18
  Requires-Dist: certifi (>=2024.7.4)
19
- Requires-Dist: dara-core (==1.21.7)
19
+ Requires-Dist: dara-core (==1.21.9)
20
20
  Requires-Dist: dill (>=0.3.0,<0.4.0)
21
21
  Requires-Dist: matplotlib (>=2.0.0)
22
22
  Requires-Dist: pandas (>=1.1.0,<3.0.0)
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
28
28
 
29
29
  # Dara Components
30
30
 
31
- <img src="https://github.com/causalens/dara/blob/v1.21.7/img/dara_light.svg?raw=true">
31
+ <img src="https://github.com/causalens/dara/blob/v1.21.9/img/dara_light.svg?raw=true">
32
32
 
33
33
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
34
34
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -79,9 +79,9 @@ dara/components/smart/data_slicer/utils/core.py,sha256=4M_HA8oBzAkHklHgmaJ-qiKA3
79
79
  dara/components/smart/data_slicer/utils/data_preview.py,sha256=OAphjMrm3F76XmJ09X7sZSeOeKqGJFwN5ooo3qcyrG4,1722
80
80
  dara/components/smart/data_slicer/utils/plotting.py,sha256=TB00576kbA6y1eRuZBe09UAcZmluY4iJsKmYnXZ3hWQ,3389
81
81
  dara/components/smart/hierarchy.py,sha256=3RtHj68gA8H_X9FxQdaeSJloTqe8ciH52ku6f7zy33M,2902
82
- dara/components/umd/dara.components.umd.js,sha256=7ygHW_QGvsU1j6r5yTAsaXw8mBY2IZs32GJHsolYgU4,6855260
82
+ dara/components/umd/dara.components.umd.js,sha256=dnoqtLQt21gIW8c1B7_ZYF4Q049SnzgH42r0QvoruJc,6855502
83
83
  dara/components/umd/style.css,sha256=Qm0_kcxXBDoXvvPTc7YCttkl1zMFifdcp-KufTunPNY,162729
84
- dara_components-1.21.7.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
85
- dara_components-1.21.7.dist-info/METADATA,sha256=OIfpqx7j1jMnAJ1aZXFbx-k7xqhKtnSHgLQAxRC642I,2743
86
- dara_components-1.21.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
87
- dara_components-1.21.7.dist-info/RECORD,,
84
+ dara_components-1.21.9.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
85
+ dara_components-1.21.9.dist-info/METADATA,sha256=7oGIciQZiN0ZhI1cuwOSyU_hDLvLkDtzn_k_2J8iXeU,2743
86
+ dara_components-1.21.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
87
+ dara_components-1.21.9.dist-info/RECORD,,