pollination-react-io 1.22.1 → 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/index.esm.js +15 -7
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15 -7
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -13296,7 +13296,7 @@ const $d08ef79370b62062$export$371ab307eab489c0 = $d08ef79370b62062$export$e4f69
|
|
|
13296
13296
|
const $d08ef79370b62062$export$c3468e2714d175fa = $d08ef79370b62062$export$42355ae145153fb6;
|
|
13297
13297
|
const $d08ef79370b62062$export$21b07c8f274aebd5 = $d08ef79370b62062$export$34b8980744021ec5;
|
|
13298
13298
|
|
|
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 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}";
|
|
13300
13300
|
styleInject(css_248z$e);
|
|
13301
13301
|
|
|
13302
13302
|
var Dropdown = function (_a) {
|
|
@@ -13324,7 +13324,7 @@ var Dropdown = function (_a) {
|
|
|
13324
13324
|
React__default.createElement($d08ef79370b62062$export$c3468e2714d175fa, { style: {
|
|
13325
13325
|
position: 'absolute',
|
|
13326
13326
|
display: 'inline-flex',
|
|
13327
|
-
left:
|
|
13327
|
+
left: 14,
|
|
13328
13328
|
} },
|
|
13329
13329
|
React__default.createElement(CheckCircle$1, null)),
|
|
13330
13330
|
o.label));
|
|
@@ -13336,7 +13336,7 @@ var Dropdown = function (_a) {
|
|
|
13336
13336
|
React__default.createElement("div", { style: {
|
|
13337
13337
|
position: 'absolute',
|
|
13338
13338
|
display: 'inline-flex',
|
|
13339
|
-
left:
|
|
13339
|
+
left: 14,
|
|
13340
13340
|
} }, o.icon),
|
|
13341
13341
|
o.label)));
|
|
13342
13342
|
default:
|
|
@@ -13344,7 +13344,7 @@ var Dropdown = function (_a) {
|
|
|
13344
13344
|
React__default.createElement("div", { style: {
|
|
13345
13345
|
position: 'absolute',
|
|
13346
13346
|
display: 'inline-flex',
|
|
13347
|
-
left:
|
|
13347
|
+
left: 14,
|
|
13348
13348
|
} }, o.icon),
|
|
13349
13349
|
o.label));
|
|
13350
13350
|
}
|
|
@@ -13354,7 +13354,11 @@ var Dropdown = function (_a) {
|
|
|
13354
13354
|
React__default.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2, __assign({ className: "poll-select-content" }, contentProps),
|
|
13355
13355
|
optionGroups.map(function (group, i, a) { return (React__default.createElement(ConditionalWrapper, { condition: typeof group.type !== 'undefined', wrapper: function (children) { return (group.type === 'radio'
|
|
13356
13356
|
?
|
|
13357
|
-
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)
|
|
13358
13362
|
:
|
|
13359
13363
|
React__default.createElement($d08ef79370b62062$export$eb2fcfdbd7ba97d4, { style: {
|
|
13360
13364
|
display: 'flex',
|
|
@@ -44206,17 +44210,21 @@ var CreateStudy = function (_a) {
|
|
|
44206
44210
|
if (!basePath) {
|
|
44207
44211
|
throw new Error('CreateStudy: client.configuration.basepath not defined.');
|
|
44208
44212
|
}
|
|
44213
|
+
// for streamlit apps have to use window.open instead of window.location.href
|
|
44209
44214
|
window.open("".concat(basePath, "/").concat(accountName, "/projects/").concat(projectName, "/studies/").concat(studyId));
|
|
44210
44215
|
}, [basePath]);
|
|
44211
44216
|
var handleCreateStudy = useCallback(function (name, data, description, localConfig) {
|
|
44212
44217
|
if (!state || !state.recipe || !state.recipe.source) {
|
|
44213
44218
|
return new Promise(function (resolve, reject) { return resolve(); });
|
|
44214
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;
|
|
44215
44223
|
if (host !== 'web') {
|
|
44216
|
-
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig,
|
|
44224
|
+
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig, handleWebSuccess);
|
|
44217
44225
|
}
|
|
44218
44226
|
else {
|
|
44219
|
-
return createStudy({ name: name, recipe: state.recipe, description: description }, data,
|
|
44227
|
+
return createStudy({ name: name, recipe: state.recipe, description: description }, data, handleWebSuccess);
|
|
44220
44228
|
}
|
|
44221
44229
|
}, [state, host, createLocalStudy, createStudy, createStudySuccess, handleCreateStudySuccess]);
|
|
44222
44230
|
return (React__default.createElement("div", { "data-testid": "CreateProject", style: __assign(__assign({}, defaultStyle), style) },
|