pollination-react-io 1.22.0 → 1.22.2
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/build/CreateStudy/CreateStudy.types.d.ts +1 -1
- package/build/index.esm.js +40 -10
- package/build/index.esm.js.map +1 -1
- package/build/index.js +40 -10
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -8684,7 +8684,6 @@ var ComboBox = React__default.forwardRef(function ComboBox(_a, ref) {
|
|
|
8684
8684
|
}); });
|
|
8685
8685
|
useEffect(function () {
|
|
8686
8686
|
var _a;
|
|
8687
|
-
console.log(selectedItem);
|
|
8688
8687
|
if (!selectedItem) {
|
|
8689
8688
|
setInputValue('');
|
|
8690
8689
|
}
|
|
@@ -13297,7 +13296,7 @@ const $d08ef79370b62062$export$371ab307eab489c0 = $d08ef79370b62062$export$e4f69
|
|
|
13297
13296
|
const $d08ef79370b62062$export$c3468e2714d175fa = $d08ef79370b62062$export$42355ae145153fb6;
|
|
13298
13297
|
const $d08ef79370b62062$export$21b07c8f274aebd5 = $d08ef79370b62062$export$34b8980744021ec5;
|
|
13299
13298
|
|
|
13300
|
-
var css_248z$e = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.poll-select-content {\n display: flex;\n flex-direction: column;\n width: fit-content;\n background-color: white;\n border: 1px solid var(--slate8);\n border-radius: 4px;\n padding: 10px 8px;\n box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 6px 2px;\n z-index: 1000;\n}\n\n.poll-select-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n border-radius: 2px;\n padding: 2px 4px 2px 30px;\n transition: background-color 0.15s linear, color 0.15s linear;\n cursor: pointer;\n}\n\n.poll-select-item[data-state=checked] {\n background-color: var(--primary2);\n color: white;\n}\n\n.poll-select-item[data-state=checked] > svg {\n fill: white;\n}\n\n.poll-select-item[data-disabled] {\n cursor: default;\n color: var(--slate9);\n}\n\n.poll-select-item[data-disabled]:hover {\n background-color: white;\n color: var(--slate9);\n}\n\n.poll-select-item:focus-visible {\n background-color: var(--primary0);\n outline: solid 1px var(--primary);\n color: unset;\n outline-color: var(--primary);\n}\n\n.poll-select-item:hover {\n background-color: var(--primary0);\n color: unset;\n fill: unset;\n}\n\n.poll-separator {\n background-color: #d0d7de;\n height: 1px;\n width: 100%;\n margin: 4px 0;\n}";
|
|
13299
|
+
var css_248z$e = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.poll-select-content {\n display: flex;\n flex-direction: column;\n width: fit-content;\n background-color: white;\n border: 1px solid var(--slate8);\n border-radius: 4px;\n padding: 10px 8px;\n gap: 4px;\n box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 6px 2px;\n z-index: 1000;\n}\n\n.poll-select-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n border-radius: 2px;\n padding: 2px 4px 2px 30px;\n transition: background-color 0.15s linear, color 0.15s linear;\n cursor: pointer;\n}\n\n.poll-select-item[data-state=checked] {\n background-color: var(--primary2);\n color: white;\n}\n\n.poll-select-item[data-state=checked] > svg {\n fill: white;\n}\n\n.poll-select-item[data-disabled] {\n cursor: default;\n color: var(--slate9);\n}\n\n.poll-select-item[data-disabled]:hover {\n background-color: white;\n color: var(--slate9);\n}\n\n.poll-select-item:focus-visible {\n background-color: var(--primary0);\n outline: solid 1px var(--primary);\n color: unset;\n outline-color: var(--primary);\n}\n\n.poll-select-item:hover {\n background-color: var(--primary0);\n color: unset;\n fill: unset;\n}\n\n.poll-separator {\n background-color: #d0d7de;\n height: 1px;\n width: 100%;\n margin: 4px 0;\n}";
|
|
13301
13300
|
styleInject(css_248z$e);
|
|
13302
13301
|
|
|
13303
13302
|
var Dropdown = function (_a) {
|
|
@@ -13325,7 +13324,7 @@ var Dropdown = function (_a) {
|
|
|
13325
13324
|
React__default.createElement($d08ef79370b62062$export$c3468e2714d175fa, { style: {
|
|
13326
13325
|
position: 'absolute',
|
|
13327
13326
|
display: 'inline-flex',
|
|
13328
|
-
left:
|
|
13327
|
+
left: 14,
|
|
13329
13328
|
} },
|
|
13330
13329
|
React__default.createElement(CheckCircle$1, null)),
|
|
13331
13330
|
o.label));
|
|
@@ -13337,7 +13336,7 @@ var Dropdown = function (_a) {
|
|
|
13337
13336
|
React__default.createElement("div", { style: {
|
|
13338
13337
|
position: 'absolute',
|
|
13339
13338
|
display: 'inline-flex',
|
|
13340
|
-
left:
|
|
13339
|
+
left: 14,
|
|
13341
13340
|
} }, o.icon),
|
|
13342
13341
|
o.label)));
|
|
13343
13342
|
default:
|
|
@@ -13345,7 +13344,7 @@ var Dropdown = function (_a) {
|
|
|
13345
13344
|
React__default.createElement("div", { style: {
|
|
13346
13345
|
position: 'absolute',
|
|
13347
13346
|
display: 'inline-flex',
|
|
13348
|
-
left:
|
|
13347
|
+
left: 14,
|
|
13349
13348
|
} }, o.icon),
|
|
13350
13349
|
o.label));
|
|
13351
13350
|
}
|
|
@@ -13355,7 +13354,11 @@ var Dropdown = function (_a) {
|
|
|
13355
13354
|
React__default.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2, __assign({ className: "poll-select-content" }, contentProps),
|
|
13356
13355
|
optionGroups.map(function (group, i, a) { return (React__default.createElement(ConditionalWrapper, { condition: typeof group.type !== 'undefined', wrapper: function (children) { return (group.type === 'radio'
|
|
13357
13356
|
?
|
|
13358
|
-
React__default.createElement($d08ef79370b62062$export$a98f0dcb43a68a25, { value: group.value
|
|
13357
|
+
React__default.createElement($d08ef79370b62062$export$a98f0dcb43a68a25, { value: group.value, style: {
|
|
13358
|
+
display: 'flex',
|
|
13359
|
+
flexDirection: 'column',
|
|
13360
|
+
gap: 2
|
|
13361
|
+
} }, children)
|
|
13359
13362
|
:
|
|
13360
13363
|
React__default.createElement($d08ef79370b62062$export$eb2fcfdbd7ba97d4, { style: {
|
|
13361
13364
|
display: 'flex',
|
|
@@ -41790,6 +41793,9 @@ var SelectProject = function (_a) {
|
|
|
41790
41793
|
if (lodash_isequal(valueRef.current, selProject)) {
|
|
41791
41794
|
return;
|
|
41792
41795
|
}
|
|
41796
|
+
if (selProject && selProject.name) {
|
|
41797
|
+
comboBoxRef.current.setInputValue(selProject.name);
|
|
41798
|
+
}
|
|
41793
41799
|
comboBoxRef.current.selectItem(selProject);
|
|
41794
41800
|
valueRef.current = selProject;
|
|
41795
41801
|
// don't call onChange for undefined values
|
|
@@ -41797,7 +41803,6 @@ var SelectProject = function (_a) {
|
|
|
41797
41803
|
}, [selProject, onChange]);
|
|
41798
41804
|
useEffect(function () {
|
|
41799
41805
|
setSelProject(value);
|
|
41800
|
-
console.log(value);
|
|
41801
41806
|
}, [value]);
|
|
41802
41807
|
var onScrollReachEnd = useCallback(function () {
|
|
41803
41808
|
// already loaded all runs
|
|
@@ -41976,6 +41981,9 @@ var SelectRecipe = function (_a) {
|
|
|
41976
41981
|
if (lodash_isequal(valueRef.current, selRecipe)) {
|
|
41977
41982
|
return;
|
|
41978
41983
|
}
|
|
41984
|
+
if (selRecipe && selRecipe.metadata && selRecipe.metadata.name) {
|
|
41985
|
+
comboBoxRef.current.setInputValue(selRecipe.metadata.name);
|
|
41986
|
+
}
|
|
41979
41987
|
comboBoxRef.current.selectItem(selRecipe);
|
|
41980
41988
|
valueRef.current = selRecipe;
|
|
41981
41989
|
onChange && selRecipe && onChange(selRecipe);
|
|
@@ -44202,17 +44210,21 @@ var CreateStudy = function (_a) {
|
|
|
44202
44210
|
if (!basePath) {
|
|
44203
44211
|
throw new Error('CreateStudy: client.configuration.basepath not defined.');
|
|
44204
44212
|
}
|
|
44213
|
+
// for streamlit apps have to use window.open instead of window.location.href
|
|
44205
44214
|
window.open("".concat(basePath, "/").concat(accountName, "/projects/").concat(projectName, "/studies/").concat(studyId));
|
|
44206
44215
|
}, [basePath]);
|
|
44207
44216
|
var handleCreateStudy = useCallback(function (name, data, description, localConfig) {
|
|
44208
44217
|
if (!state || !state.recipe || !state.recipe.source) {
|
|
44209
44218
|
return new Promise(function (resolve, reject) { return resolve(); });
|
|
44210
44219
|
}
|
|
44220
|
+
var handleSuccess = createStudySuccess !== null && createStudySuccess !== void 0 ? createStudySuccess : handleCreateStudySuccess;
|
|
44221
|
+
// don't attempt navigation if the study is a local study
|
|
44222
|
+
var handleWebSuccess = localConfig && localConfig.isLocalJob ? handleSuccess : undefined;
|
|
44211
44223
|
if (host !== 'web') {
|
|
44212
|
-
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig,
|
|
44224
|
+
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig, handleWebSuccess);
|
|
44213
44225
|
}
|
|
44214
44226
|
else {
|
|
44215
|
-
return createStudy({ name: name, recipe: state.recipe, description: description }, data,
|
|
44227
|
+
return createStudy({ name: name, recipe: state.recipe, description: description }, data, handleWebSuccess);
|
|
44216
44228
|
}
|
|
44217
44229
|
}, [state, host, createLocalStudy, createStudy, createStudySuccess, handleCreateStudySuccess]);
|
|
44218
44230
|
return (React__default.createElement("div", { "data-testid": "CreateProject", style: __assign(__assign({}, defaultStyle), style) },
|
|
@@ -45992,7 +46004,6 @@ var SelectRun = function (_a) {
|
|
|
45992
46004
|
};
|
|
45993
46005
|
// deselect items
|
|
45994
46006
|
if (comboBoxRef.current) {
|
|
45995
|
-
console.log('clear selection');
|
|
45996
46007
|
comboBoxRef.current.selectItem(null);
|
|
45997
46008
|
}
|
|
45998
46009
|
setRuns([]);
|
|
@@ -46034,6 +46045,17 @@ var SelectRun = function (_a) {
|
|
|
46034
46045
|
if (lodash_isequal(valueRef.current, selRun)) {
|
|
46035
46046
|
return;
|
|
46036
46047
|
}
|
|
46048
|
+
if (selRun && selRun.id) {
|
|
46049
|
+
if (selRun.recipe &&
|
|
46050
|
+
selRun.recipe.metadata &&
|
|
46051
|
+
selRun.recipe.metadata.name &&
|
|
46052
|
+
selRun.status) {
|
|
46053
|
+
comboBoxRef.current.setInputValue("".concat(selRun.recipe.metadata.name, ":").concat(selRun.status));
|
|
46054
|
+
}
|
|
46055
|
+
else {
|
|
46056
|
+
comboBoxRef.current.setInputValue(selRun.id);
|
|
46057
|
+
}
|
|
46058
|
+
}
|
|
46037
46059
|
comboBoxRef.current.selectItem(selRun);
|
|
46038
46060
|
valueRef.current = selRun;
|
|
46039
46061
|
// don't call onChange for undefined values
|
|
@@ -46158,6 +46180,14 @@ var SelectStudy = function (_a) {
|
|
|
46158
46180
|
if (lodash_isequal(valueRef.current, selStudy)) {
|
|
46159
46181
|
return;
|
|
46160
46182
|
}
|
|
46183
|
+
if (selStudy && selStudy.id) {
|
|
46184
|
+
if (selStudy.spec.name) {
|
|
46185
|
+
comboBoxRef.current.setInputValue(selStudy.spec.name);
|
|
46186
|
+
}
|
|
46187
|
+
else {
|
|
46188
|
+
comboBoxRef.current.setInputValue(selStudy.id);
|
|
46189
|
+
}
|
|
46190
|
+
}
|
|
46161
46191
|
comboBoxRef.current.selectItem(selStudy);
|
|
46162
46192
|
valueRef.current = selStudy;
|
|
46163
46193
|
// don't call onChange for undefined values
|