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.js
CHANGED
|
@@ -8710,7 +8710,6 @@ var ComboBox = React__default["default"].forwardRef(function ComboBox(_a, ref) {
|
|
|
8710
8710
|
}); });
|
|
8711
8711
|
React.useEffect(function () {
|
|
8712
8712
|
var _a;
|
|
8713
|
-
console.log(selectedItem);
|
|
8714
8713
|
if (!selectedItem) {
|
|
8715
8714
|
setInputValue('');
|
|
8716
8715
|
}
|
|
@@ -13323,7 +13322,7 @@ const $d08ef79370b62062$export$371ab307eab489c0 = $d08ef79370b62062$export$e4f69
|
|
|
13323
13322
|
const $d08ef79370b62062$export$c3468e2714d175fa = $d08ef79370b62062$export$42355ae145153fb6;
|
|
13324
13323
|
const $d08ef79370b62062$export$21b07c8f274aebd5 = $d08ef79370b62062$export$34b8980744021ec5;
|
|
13325
13324
|
|
|
13326
|
-
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}";
|
|
13325
|
+
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}";
|
|
13327
13326
|
styleInject(css_248z$e);
|
|
13328
13327
|
|
|
13329
13328
|
var Dropdown = function (_a) {
|
|
@@ -13351,7 +13350,7 @@ var Dropdown = function (_a) {
|
|
|
13351
13350
|
React__default["default"].createElement($d08ef79370b62062$export$c3468e2714d175fa, { style: {
|
|
13352
13351
|
position: 'absolute',
|
|
13353
13352
|
display: 'inline-flex',
|
|
13354
|
-
left:
|
|
13353
|
+
left: 14,
|
|
13355
13354
|
} },
|
|
13356
13355
|
React__default["default"].createElement(CheckCircle$1, null)),
|
|
13357
13356
|
o.label));
|
|
@@ -13363,7 +13362,7 @@ var Dropdown = function (_a) {
|
|
|
13363
13362
|
React__default["default"].createElement("div", { style: {
|
|
13364
13363
|
position: 'absolute',
|
|
13365
13364
|
display: 'inline-flex',
|
|
13366
|
-
left:
|
|
13365
|
+
left: 14,
|
|
13367
13366
|
} }, o.icon),
|
|
13368
13367
|
o.label)));
|
|
13369
13368
|
default:
|
|
@@ -13371,7 +13370,7 @@ var Dropdown = function (_a) {
|
|
|
13371
13370
|
React__default["default"].createElement("div", { style: {
|
|
13372
13371
|
position: 'absolute',
|
|
13373
13372
|
display: 'inline-flex',
|
|
13374
|
-
left:
|
|
13373
|
+
left: 14,
|
|
13375
13374
|
} }, o.icon),
|
|
13376
13375
|
o.label));
|
|
13377
13376
|
}
|
|
@@ -13381,7 +13380,11 @@ var Dropdown = function (_a) {
|
|
|
13381
13380
|
React__default["default"].createElement($d08ef79370b62062$export$7c6e2c02157bb7d2, __assign({ className: "poll-select-content" }, contentProps),
|
|
13382
13381
|
optionGroups.map(function (group, i, a) { return (React__default["default"].createElement(ConditionalWrapper, { condition: typeof group.type !== 'undefined', wrapper: function (children) { return (group.type === 'radio'
|
|
13383
13382
|
?
|
|
13384
|
-
React__default["default"].createElement($d08ef79370b62062$export$a98f0dcb43a68a25, { value: group.value
|
|
13383
|
+
React__default["default"].createElement($d08ef79370b62062$export$a98f0dcb43a68a25, { value: group.value, style: {
|
|
13384
|
+
display: 'flex',
|
|
13385
|
+
flexDirection: 'column',
|
|
13386
|
+
gap: 2
|
|
13387
|
+
} }, children)
|
|
13385
13388
|
:
|
|
13386
13389
|
React__default["default"].createElement($d08ef79370b62062$export$eb2fcfdbd7ba97d4, { style: {
|
|
13387
13390
|
display: 'flex',
|
|
@@ -41816,6 +41819,9 @@ var SelectProject = function (_a) {
|
|
|
41816
41819
|
if (lodash_isequal(valueRef.current, selProject)) {
|
|
41817
41820
|
return;
|
|
41818
41821
|
}
|
|
41822
|
+
if (selProject && selProject.name) {
|
|
41823
|
+
comboBoxRef.current.setInputValue(selProject.name);
|
|
41824
|
+
}
|
|
41819
41825
|
comboBoxRef.current.selectItem(selProject);
|
|
41820
41826
|
valueRef.current = selProject;
|
|
41821
41827
|
// don't call onChange for undefined values
|
|
@@ -41823,7 +41829,6 @@ var SelectProject = function (_a) {
|
|
|
41823
41829
|
}, [selProject, onChange]);
|
|
41824
41830
|
React.useEffect(function () {
|
|
41825
41831
|
setSelProject(value);
|
|
41826
|
-
console.log(value);
|
|
41827
41832
|
}, [value]);
|
|
41828
41833
|
var onScrollReachEnd = React.useCallback(function () {
|
|
41829
41834
|
// already loaded all runs
|
|
@@ -42002,6 +42007,9 @@ var SelectRecipe = function (_a) {
|
|
|
42002
42007
|
if (lodash_isequal(valueRef.current, selRecipe)) {
|
|
42003
42008
|
return;
|
|
42004
42009
|
}
|
|
42010
|
+
if (selRecipe && selRecipe.metadata && selRecipe.metadata.name) {
|
|
42011
|
+
comboBoxRef.current.setInputValue(selRecipe.metadata.name);
|
|
42012
|
+
}
|
|
42005
42013
|
comboBoxRef.current.selectItem(selRecipe);
|
|
42006
42014
|
valueRef.current = selRecipe;
|
|
42007
42015
|
onChange && selRecipe && onChange(selRecipe);
|
|
@@ -44228,17 +44236,21 @@ var CreateStudy = function (_a) {
|
|
|
44228
44236
|
if (!basePath) {
|
|
44229
44237
|
throw new Error('CreateStudy: client.configuration.basepath not defined.');
|
|
44230
44238
|
}
|
|
44239
|
+
// for streamlit apps have to use window.open instead of window.location.href
|
|
44231
44240
|
window.open("".concat(basePath, "/").concat(accountName, "/projects/").concat(projectName, "/studies/").concat(studyId));
|
|
44232
44241
|
}, [basePath]);
|
|
44233
44242
|
var handleCreateStudy = React.useCallback(function (name, data, description, localConfig) {
|
|
44234
44243
|
if (!state || !state.recipe || !state.recipe.source) {
|
|
44235
44244
|
return new Promise(function (resolve, reject) { return resolve(); });
|
|
44236
44245
|
}
|
|
44246
|
+
var handleSuccess = createStudySuccess !== null && createStudySuccess !== void 0 ? createStudySuccess : handleCreateStudySuccess;
|
|
44247
|
+
// don't attempt navigation if the study is a local study
|
|
44248
|
+
var handleWebSuccess = localConfig && localConfig.isLocalJob ? handleSuccess : undefined;
|
|
44237
44249
|
if (host !== 'web') {
|
|
44238
|
-
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig,
|
|
44250
|
+
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig, handleWebSuccess);
|
|
44239
44251
|
}
|
|
44240
44252
|
else {
|
|
44241
|
-
return createStudy({ name: name, recipe: state.recipe, description: description }, data,
|
|
44253
|
+
return createStudy({ name: name, recipe: state.recipe, description: description }, data, handleWebSuccess);
|
|
44242
44254
|
}
|
|
44243
44255
|
}, [state, host, createLocalStudy, createStudy, createStudySuccess, handleCreateStudySuccess]);
|
|
44244
44256
|
return (React__default["default"].createElement("div", { "data-testid": "CreateProject", style: __assign(__assign({}, defaultStyle), style) },
|
|
@@ -46018,7 +46030,6 @@ var SelectRun = function (_a) {
|
|
|
46018
46030
|
};
|
|
46019
46031
|
// deselect items
|
|
46020
46032
|
if (comboBoxRef.current) {
|
|
46021
|
-
console.log('clear selection');
|
|
46022
46033
|
comboBoxRef.current.selectItem(null);
|
|
46023
46034
|
}
|
|
46024
46035
|
setRuns([]);
|
|
@@ -46060,6 +46071,17 @@ var SelectRun = function (_a) {
|
|
|
46060
46071
|
if (lodash_isequal(valueRef.current, selRun)) {
|
|
46061
46072
|
return;
|
|
46062
46073
|
}
|
|
46074
|
+
if (selRun && selRun.id) {
|
|
46075
|
+
if (selRun.recipe &&
|
|
46076
|
+
selRun.recipe.metadata &&
|
|
46077
|
+
selRun.recipe.metadata.name &&
|
|
46078
|
+
selRun.status) {
|
|
46079
|
+
comboBoxRef.current.setInputValue("".concat(selRun.recipe.metadata.name, ":").concat(selRun.status));
|
|
46080
|
+
}
|
|
46081
|
+
else {
|
|
46082
|
+
comboBoxRef.current.setInputValue(selRun.id);
|
|
46083
|
+
}
|
|
46084
|
+
}
|
|
46063
46085
|
comboBoxRef.current.selectItem(selRun);
|
|
46064
46086
|
valueRef.current = selRun;
|
|
46065
46087
|
// don't call onChange for undefined values
|
|
@@ -46184,6 +46206,14 @@ var SelectStudy = function (_a) {
|
|
|
46184
46206
|
if (lodash_isequal(valueRef.current, selStudy)) {
|
|
46185
46207
|
return;
|
|
46186
46208
|
}
|
|
46209
|
+
if (selStudy && selStudy.id) {
|
|
46210
|
+
if (selStudy.spec.name) {
|
|
46211
|
+
comboBoxRef.current.setInputValue(selStudy.spec.name);
|
|
46212
|
+
}
|
|
46213
|
+
else {
|
|
46214
|
+
comboBoxRef.current.setInputValue(selStudy.id);
|
|
46215
|
+
}
|
|
46216
|
+
}
|
|
46187
46217
|
comboBoxRef.current.selectItem(selStudy);
|
|
46188
46218
|
valueRef.current = selStudy;
|
|
46189
46219
|
// don't call onChange for undefined values
|