dara-components 1.16.23__py3-none-any.whl → 1.17.1__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.
- dara/components/umd/dara.components.umd.js +16 -50
- {dara_components-1.16.23.dist-info → dara_components-1.17.1.dist-info}/METADATA +3 -3
- {dara_components-1.16.23.dist-info → dara_components-1.17.1.dist-info}/RECORD +5 -5
- {dara_components-1.16.23.dist-info → dara_components-1.17.1.dist-info}/LICENSE +0 -0
- {dara_components-1.16.23.dist-info → dara_components-1.17.1.dist-info}/WHEEL +0 -0
|
@@ -50715,53 +50715,6 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50715
50715
|
const tag2 = props.numbered ? "ol" : "ul";
|
|
50716
50716
|
return /* @__PURE__ */ React__default.default.createElement(StyledTag$2, { $rawCss: css2, as: tag2, style: style2 }, items.map((item, index2) => /* @__PURE__ */ React__default.default.createElement("li", { key: `li-${index2}`, style: { textAlign: "left" } }, item)));
|
|
50717
50717
|
}
|
|
50718
|
-
function isConditionTrue(operator2, value, other) {
|
|
50719
|
-
if (operator2 === core$1.ConditionOperator.EQUAL) {
|
|
50720
|
-
return value === other;
|
|
50721
|
-
}
|
|
50722
|
-
if (operator2 === core$1.ConditionOperator.NOT_EQUAL) {
|
|
50723
|
-
return value !== other;
|
|
50724
|
-
}
|
|
50725
|
-
if (operator2 === core$1.ConditionOperator.GREATER_EQUAL) {
|
|
50726
|
-
return value >= other;
|
|
50727
|
-
}
|
|
50728
|
-
if (operator2 === core$1.ConditionOperator.GREATER_THAN) {
|
|
50729
|
-
return value > other;
|
|
50730
|
-
}
|
|
50731
|
-
if (operator2 === core$1.ConditionOperator.LESS_EQUAL) {
|
|
50732
|
-
return value <= other;
|
|
50733
|
-
}
|
|
50734
|
-
if (operator2 === core$1.ConditionOperator.LESS_THAN) {
|
|
50735
|
-
return value < other;
|
|
50736
|
-
}
|
|
50737
|
-
if (operator2 === core$1.ConditionOperator.TRUTHY) {
|
|
50738
|
-
return !!value;
|
|
50739
|
-
}
|
|
50740
|
-
throw new Error(`Unexpected operator ${String(operator2)} passed to conditional (If) component`);
|
|
50741
|
-
}
|
|
50742
|
-
function If$1(props) {
|
|
50743
|
-
const value = core$1.useAnyVariable(props.condition.variable);
|
|
50744
|
-
const other = core$1.useAnyVariable(props.condition.other);
|
|
50745
|
-
const conditionResult = React.useMemo(
|
|
50746
|
-
() => isConditionTrue(props.condition.operator, value, other),
|
|
50747
|
-
[props.condition, value, other]
|
|
50748
|
-
);
|
|
50749
|
-
const children2 = React.useMemo(() => {
|
|
50750
|
-
return conditionResult ? props.true_children : props.false_children;
|
|
50751
|
-
}, [conditionResult, props.false_children, props.true_children]);
|
|
50752
|
-
return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, children2.map((child, idx) => /* @__PURE__ */ React__default.default.createElement(core$1.DynamicComponent, { component: child, key: `if-${idx}-${child.name}-${String(conditionResult)}` })));
|
|
50753
|
-
}
|
|
50754
|
-
function isCondition(condition) {
|
|
50755
|
-
return condition && !!condition.operator;
|
|
50756
|
-
}
|
|
50757
|
-
function useConditionOrVariable(arg2) {
|
|
50758
|
-
if (isCondition(arg2)) {
|
|
50759
|
-
const value = core$1.useVariable(arg2.variable)[0];
|
|
50760
|
-
const other = core$1.useVariable(arg2.other)[0];
|
|
50761
|
-
return isConditionTrue(arg2.operator, value, other);
|
|
50762
|
-
}
|
|
50763
|
-
return core$1.useVariable(arg2)[0];
|
|
50764
|
-
}
|
|
50765
50718
|
const StyledButton$1 = core$1.injectCss(R__default.default(Button$3)`
|
|
50766
50719
|
flex: ${(props) => props.isSimpleButton ? void 0 : "1 1 100%"};
|
|
50767
50720
|
`);
|
|
@@ -50770,7 +50723,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50770
50723
|
const [style2, css2] = core$1.useComponentStyles(props);
|
|
50771
50724
|
const onClick = core$1.useAction(props.onclick);
|
|
50772
50725
|
const loading = core$1.useActionIsLoading(props.onclick);
|
|
50773
|
-
const disabled2 = useConditionOrVariable(props.disabled);
|
|
50726
|
+
const disabled2 = core$1.useConditionOrVariable(props.disabled);
|
|
50774
50727
|
const Icon2 = props.icon ? core$1.getIcon(props.icon) : null;
|
|
50775
50728
|
const iconColor = Array.isArray(props.children) ? ((_c = (_b2 = (_a2 = props.children) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.props) == null ? void 0 : _c.color) || "inherit" : "inherit";
|
|
50776
50729
|
return /* @__PURE__ */ React__default.default.createElement(
|
|
@@ -51970,6 +51923,18 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51970
51923
|
}
|
|
51971
51924
|
);
|
|
51972
51925
|
}
|
|
51926
|
+
function If$1(props) {
|
|
51927
|
+
const value = core$1.useAnyVariable(props.condition.variable);
|
|
51928
|
+
const other = core$1.useAnyVariable(props.condition.other);
|
|
51929
|
+
const conditionResult = React.useMemo(
|
|
51930
|
+
() => core$1.isConditionTrue(props.condition.operator, value, other),
|
|
51931
|
+
[props.condition, value, other]
|
|
51932
|
+
);
|
|
51933
|
+
const children2 = React.useMemo(() => {
|
|
51934
|
+
return conditionResult ? props.true_children : props.false_children;
|
|
51935
|
+
}, [conditionResult, props.false_children, props.true_children]);
|
|
51936
|
+
return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, children2.map((child, idx) => /* @__PURE__ */ React__default.default.createElement(core$1.DynamicComponent, { component: child, key: `if-${idx}-${child.name}-${String(conditionResult)}` })));
|
|
51937
|
+
}
|
|
51973
51938
|
const ImageComponent = R__default.default.div`
|
|
51974
51939
|
display: flex;
|
|
51975
51940
|
`;
|
|
@@ -60284,6 +60249,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
60284
60249
|
const theme2 = useClTheme();
|
|
60285
60250
|
const display_ctx = React.useContext(core$1.DisplayCtx);
|
|
60286
60251
|
const color2 = ["anchor", "button"].includes(display_ctx.component) ? props.color : props.color || theme2.colors.text;
|
|
60252
|
+
const displayText = React.useMemo(() => typeof text2 === "string" ? text2.trimEnd() : JSON.stringify(text2), [text2]);
|
|
60287
60253
|
if (["anchor", "paragraph"].includes(display_ctx.component)) {
|
|
60288
60254
|
return /* @__PURE__ */ React__default.default.createElement(
|
|
60289
60255
|
StyledSpan,
|
|
@@ -60301,7 +60267,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
60301
60267
|
...style2
|
|
60302
60268
|
}
|
|
60303
60269
|
},
|
|
60304
|
-
|
|
60270
|
+
displayText
|
|
60305
60271
|
);
|
|
60306
60272
|
}
|
|
60307
60273
|
const tag2 = props.formatted ? "pre" : "div";
|
|
@@ -60318,7 +60284,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
60318
60284
|
...style2
|
|
60319
60285
|
}
|
|
60320
60286
|
},
|
|
60321
|
-
|
|
60287
|
+
displayText
|
|
60322
60288
|
);
|
|
60323
60289
|
}
|
|
60324
60290
|
const StyledTextarea = core$1.injectCss(TextArea);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dara-components
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.17.1
|
|
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.
|
|
19
|
+
Requires-Dist: dara-core (==1.17.1)
|
|
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.
|
|
31
|
+
<img src="https://github.com/causalens/dara/blob/v1.17.1/img/dara_light.svg?raw=true">
|
|
32
32
|
|
|
33
33
|

|
|
34
34
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
@@ -78,9 +78,9 @@ dara/components/smart/data_slicer/utils/core.py,sha256=6BrmG-iwQCuwUAKQ-y9zFKLei
|
|
|
78
78
|
dara/components/smart/data_slicer/utils/data_preview.py,sha256=OAphjMrm3F76XmJ09X7sZSeOeKqGJFwN5ooo3qcyrG4,1722
|
|
79
79
|
dara/components/smart/data_slicer/utils/plotting.py,sha256=JYzdQLXdAD0A8k2W-764xUr7zN0Ri5nf3OQ2Nb_iuiY,3313
|
|
80
80
|
dara/components/smart/hierarchy.py,sha256=9-QzEtbvP-arejhjsgl4Y5o5KHHzg6H1IGmwrX63450,2905
|
|
81
|
-
dara/components/umd/dara.components.umd.js,sha256=
|
|
81
|
+
dara/components/umd/dara.components.umd.js,sha256=wd3hJbDR9foK3P0zwnCn-QyFz_-lqBhRtCxaNyR0mig,18294530
|
|
82
82
|
dara/components/umd/style.css,sha256=Qm0_kcxXBDoXvvPTc7YCttkl1zMFifdcp-KufTunPNY,162729
|
|
83
|
-
dara_components-1.
|
|
84
|
-
dara_components-1.
|
|
85
|
-
dara_components-1.
|
|
86
|
-
dara_components-1.
|
|
83
|
+
dara_components-1.17.1.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
|
|
84
|
+
dara_components-1.17.1.dist-info/METADATA,sha256=83gNrWIepnjBlxLBGjt80QRxSb_Qp_B4IX8VHQOFObU,2743
|
|
85
|
+
dara_components-1.17.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
86
|
+
dara_components-1.17.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|