pollination-react-io 1.21.0 → 1.22.0
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/ComboFileSelector/ComboFileSelector.types.d.ts +8 -2
- package/build/ConfigureLocalRun/ConfigureLocalRun.d.ts +1 -0
- package/build/CreateStudy/CreateStudy.types.d.ts +7 -0
- package/build/SelectAccount/SelectAccount.types.d.ts +2 -2
- package/build/SelectCloudArtifacts/SelectCloudArtifacts.types.d.ts +2 -6
- package/build/SelectLocalArtifactNative/SelectLocalArtifactNative.types.d.ts +3 -2
- package/build/SelectProject/SelectProject.types.d.ts +2 -2
- package/build/SelectRecipe/SelectRecipe.types.d.ts +2 -2
- package/build/SelectRun/SelectRun.types.d.ts +2 -2
- package/build/SelectStudy/SelectStudy.types.d.ts +2 -2
- package/build/hooks/useCreateStudy.d.ts +2 -1
- package/build/index.esm.js +215 -208
- package/build/index.esm.js.map +1 -1
- package/build/index.js +215 -208
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -618,7 +618,7 @@ function styleInject(css, ref) {
|
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
|
|
621
|
-
var css_248z$j = ":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-button {\n z-index: 10;\n display: flex;\n background-color: var(--primary);\n border: 1px solid var(--primary);\n color: white;\n padding: 8px 16px;\n line-height: 1.5rem;\n align-items: center;\n gap: 8px;\n border-radius: 4px;\n transition: background-color 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s, color 0.25s;\n text-overflow: ellipsis;\n
|
|
621
|
+
var css_248z$j = ":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-button {\n z-index: 10;\n display: flex;\n background-color: var(--primary);\n border: 1px solid var(--primary);\n color: white;\n padding: 8px 16px;\n line-height: 1.5rem;\n align-items: center;\n gap: 8px;\n border-radius: 4px;\n transition: background-color 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s, color 0.25s;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.poll-button:active {\n box-shadow: inset 0px 0px 9px 4px #096dd9;\n}\n\n.poll-button:disabled {\n background-color: var(--slate3);\n color: var(--slate11);\n cursor: default;\n border-color: var(--slate11);\n cursor: default;\n box-shadow: none;\n}";
|
|
622
622
|
styleInject(css_248z$j);
|
|
623
623
|
|
|
624
624
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -8650,8 +8650,8 @@ var ComboBox = React__default.forwardRef(function ComboBox(_a, ref) {
|
|
|
8650
8650
|
var items = _a.items, renderItem = _a.renderItem, setSelected = _a.setSelected, onClear = _a.onClear, onScrollReachEnd = _a.onScrollReachEnd, _b = _a.stateReducer, stateReducer = _b === void 0 ? function (state, _a) {
|
|
8651
8651
|
_a.type; var changes = _a.changes;
|
|
8652
8652
|
return changes;
|
|
8653
|
-
} : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c,
|
|
8654
|
-
var
|
|
8653
|
+
} : _b, header = _a.header, footer = _a.footer, inputStyle = _a.inputStyle, menuStyle = _a.menuStyle, inputProps = _a.inputProps, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.hidden, hidden = _d === void 0 ? false : _d, _e = _a.loading, loading = _e === void 0 ? false : _e, _f = _a.icon, icon = _f === void 0 ? React__default.createElement(CursorText$1, null) : _f, _g = _a.maxHeight, maxHeight = _g === void 0 ? 180 : _g, _h = _a.noMatchText, noMatchText = _h === void 0 ? 'No matching items' : _h;
|
|
8654
|
+
var _j = useState(items), inputItems = _j[0], setInputItems = _j[1];
|
|
8655
8655
|
useEffect(function () {
|
|
8656
8656
|
setInputItems(items);
|
|
8657
8657
|
}, [items]);
|
|
@@ -8660,7 +8660,7 @@ var ComboBox = React__default.forwardRef(function ComboBox(_a, ref) {
|
|
|
8660
8660
|
lodash_debounce(onScrollReachEnd, 1000, { leading: true, trailing: false })
|
|
8661
8661
|
: undefined;
|
|
8662
8662
|
}, [onScrollReachEnd]);
|
|
8663
|
-
var
|
|
8663
|
+
var _k = useCombobox({
|
|
8664
8664
|
items: inputItems,
|
|
8665
8665
|
onInputValueChange: function (_a) {
|
|
8666
8666
|
var inputValue = _a.inputValue;
|
|
@@ -8675,7 +8675,7 @@ var ComboBox = React__default.forwardRef(function ComboBox(_a, ref) {
|
|
|
8675
8675
|
stateReducer: stateReducer
|
|
8676
8676
|
// to what extent is this necessary?
|
|
8677
8677
|
// environment: environment ? environment : undefined
|
|
8678
|
-
}), isOpen =
|
|
8678
|
+
}), isOpen = _k.isOpen, getToggleButtonProps = _k.getToggleButtonProps, getMenuProps = _k.getMenuProps, getInputProps = _k.getInputProps, getComboboxProps = _k.getComboboxProps, highlightedIndex = _k.highlightedIndex, getItemProps = _k.getItemProps, openMenu = _k.openMenu, closeMenu = _k.closeMenu, selectItem = _k.selectItem, selectedItem = _k.selectedItem, inputValue = _k.inputValue, setInputValue = _k.setInputValue;
|
|
8679
8679
|
useImperativeHandle(ref, function () { return ({
|
|
8680
8680
|
selectItem: selectItem,
|
|
8681
8681
|
selectedItem: selectedItem,
|
|
@@ -8684,10 +8684,14 @@ var ComboBox = React__default.forwardRef(function ComboBox(_a, ref) {
|
|
|
8684
8684
|
}); });
|
|
8685
8685
|
useEffect(function () {
|
|
8686
8686
|
var _a;
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8687
|
+
console.log(selectedItem);
|
|
8688
|
+
if (!selectedItem) {
|
|
8689
|
+
setInputValue('');
|
|
8690
|
+
}
|
|
8691
|
+
else {
|
|
8692
|
+
// @ts-ignore
|
|
8693
|
+
setInputValue((_a = selectedItem.key) !== null && _a !== void 0 ? _a : selectedItem.name);
|
|
8694
|
+
}
|
|
8691
8695
|
setSelected && setSelected(selectedItem);
|
|
8692
8696
|
closeMenu();
|
|
8693
8697
|
}, [closeMenu, selectedItem, setInputValue, setSelected]);
|
|
@@ -13293,7 +13297,7 @@ const $d08ef79370b62062$export$371ab307eab489c0 = $d08ef79370b62062$export$e4f69
|
|
|
13293
13297
|
const $d08ef79370b62062$export$c3468e2714d175fa = $d08ef79370b62062$export$42355ae145153fb6;
|
|
13294
13298
|
const $d08ef79370b62062$export$21b07c8f274aebd5 = $d08ef79370b62062$export$34b8980744021ec5;
|
|
13295
13299
|
|
|
13296
|
-
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:
|
|
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}";
|
|
13297
13301
|
styleInject(css_248z$e);
|
|
13298
13302
|
|
|
13299
13303
|
var Dropdown = function (_a) {
|
|
@@ -13350,8 +13354,14 @@ var Dropdown = function (_a) {
|
|
|
13350
13354
|
React__default.createElement($d08ef79370b62062$export$41fb9f06171c75f4, { asChild: true, disabled: disabled }, trigger),
|
|
13351
13355
|
React__default.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2, __assign({ className: "poll-select-content" }, contentProps),
|
|
13352
13356
|
optionGroups.map(function (group, i, a) { return (React__default.createElement(ConditionalWrapper, { condition: typeof group.type !== 'undefined', wrapper: function (children) { return (group.type === 'radio'
|
|
13353
|
-
?
|
|
13354
|
-
|
|
13357
|
+
?
|
|
13358
|
+
React__default.createElement($d08ef79370b62062$export$a98f0dcb43a68a25, { value: group.value }, children)
|
|
13359
|
+
:
|
|
13360
|
+
React__default.createElement($d08ef79370b62062$export$eb2fcfdbd7ba97d4, { style: {
|
|
13361
|
+
display: 'flex',
|
|
13362
|
+
flexDirection: 'column',
|
|
13363
|
+
gap: 2
|
|
13364
|
+
} }, children)); }, key: "".concat(group.type, "-").concat(i) },
|
|
13355
13365
|
group.options.map(renderItem),
|
|
13356
13366
|
i !== a.length - 1 && React__default.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9, { key: "dropdown-separator-".concat(i), className: "poll-separator" }))); }),
|
|
13357
13367
|
arrow && (React__default.createElement($d08ef79370b62062$export$21b07c8f274aebd5, { style: {
|
|
@@ -37921,27 +37931,19 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
|
37921
37931
|
});
|
|
37922
37932
|
}
|
|
37923
37933
|
// true for files selected via SelectCloudArtifacts
|
|
37924
|
-
if (typeof value.
|
|
37934
|
+
if (typeof value.key === 'string') {
|
|
37925
37935
|
resolve({
|
|
37926
37936
|
name: name,
|
|
37927
37937
|
type: 'JobPathArgument',
|
|
37928
37938
|
source: {
|
|
37929
37939
|
type: 'ProjectFolder',
|
|
37930
|
-
path: value.
|
|
37940
|
+
path: value.key
|
|
37931
37941
|
}
|
|
37932
37942
|
});
|
|
37933
37943
|
}
|
|
37934
37944
|
// true for files selected via SelectLocalArtifactNative
|
|
37935
37945
|
if (typeof value.pollination_local_path === 'string') {
|
|
37936
|
-
reject('Running cloud simulations with local artifacts not
|
|
37937
|
-
// resolve({
|
|
37938
|
-
// name,
|
|
37939
|
-
// type: 'JobPathArgument',
|
|
37940
|
-
// source: {
|
|
37941
|
-
// type: 'ProjectFolder',
|
|
37942
|
-
// path: value.pollination_local_path
|
|
37943
|
-
// }
|
|
37944
|
-
// })
|
|
37946
|
+
reject('Running cloud simulations with local artifacts is not supported.');
|
|
37945
37947
|
}
|
|
37946
37948
|
// true for file uploaders
|
|
37947
37949
|
if (value instanceof File) {
|
|
@@ -37965,8 +37967,6 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
|
37965
37967
|
var processEntryLocal = useCallback(function (_a, input, cloudProjectName) {
|
|
37966
37968
|
var name = _a[0], value = _a[1];
|
|
37967
37969
|
return new Promise(function (resolve, reject) {
|
|
37968
|
-
console.log('name: ', name);
|
|
37969
|
-
console.log('value: ', value);
|
|
37970
37970
|
var type = input.type;
|
|
37971
37971
|
if (type !== 'DAGFileInput') {
|
|
37972
37972
|
resolve({
|
|
@@ -37988,8 +37988,8 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
|
37988
37988
|
// first download artifact and turn it into a blob
|
|
37989
37989
|
// then save it to the users machine and provide
|
|
37990
37990
|
// the name to the jobInfo object
|
|
37991
|
-
if (typeof value.
|
|
37992
|
-
downloadArtifact(value.
|
|
37991
|
+
if (typeof value.key === 'string') {
|
|
37992
|
+
downloadArtifact(value.key)
|
|
37993
37993
|
.then(function (url) {
|
|
37994
37994
|
fetch(url)
|
|
37995
37995
|
.then(function (response) { return response.blob().then(function (blob) {
|
|
@@ -38068,9 +38068,9 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
|
38068
38068
|
});
|
|
38069
38069
|
});
|
|
38070
38070
|
}, [accountName, client, processEntryCloud, projectName]);
|
|
38071
|
-
var createLocalStudy = useCallback(function (_a, data, _b, key) {
|
|
38071
|
+
var createLocalStudy = useCallback(function (_a, data, _b, onSuccess, key) {
|
|
38072
38072
|
var name = _a.name, description = _a.description, recipe = _a.recipe;
|
|
38073
|
-
var localCPUCount = _b.localCPUCount, localRunFolder = _b.localRunFolder, isLocalJob = _b.isLocalJob, cloudProjectName = _b.cloudProjectName;
|
|
38073
|
+
var localCPUCount = _b.localCPUCount, localRunFolder = _b.localRunFolder, isLocalJob = _b.isLocalJob, cloudProjectName = _b.cloudProjectName, cloudProjectOwner = _b.cloudProjectOwner;
|
|
38074
38074
|
if (key === void 0) { key = performance.now().toString(); }
|
|
38075
38075
|
return __awaiter$1(void 0, void 0, void 0, function () {
|
|
38076
38076
|
var job, jobInfo, response;
|
|
@@ -38099,13 +38099,20 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
|
38099
38099
|
Job: job,
|
|
38100
38100
|
IsLocalJob: isLocalJob,
|
|
38101
38101
|
LocalCPUNumber: localCPUCount,
|
|
38102
|
-
LocalRunFolder: localRunFolder
|
|
38102
|
+
LocalRunFolder: localRunFolder,
|
|
38103
|
+
CloudProject: cloudProjectName,
|
|
38104
|
+
ProjectOwner: cloudProjectOwner,
|
|
38105
|
+
SubFolderPath: ''
|
|
38103
38106
|
};
|
|
38107
|
+
console.log(jobInfo);
|
|
38104
38108
|
response = sendMessageDotNet({
|
|
38105
38109
|
action: 'AddStudy',
|
|
38106
38110
|
data: jobInfo,
|
|
38107
38111
|
uniqueId: key
|
|
38108
38112
|
});
|
|
38113
|
+
if (response) {
|
|
38114
|
+
onSuccess && onSuccess(cloudProjectOwner, cloudProjectName, localRunFolder);
|
|
38115
|
+
}
|
|
38109
38116
|
return [2 /*return*/, response];
|
|
38110
38117
|
}
|
|
38111
38118
|
});
|
|
@@ -40604,17 +40611,20 @@ var getFileIcon$1 = function (type, disabled) {
|
|
|
40604
40611
|
|
|
40605
40612
|
var SelectCloudArtifacts = function (_a) {
|
|
40606
40613
|
var _b, _c;
|
|
40607
|
-
var projectOwner = _a.projectOwner, projectName = _a.projectName, jobId = _a.jobId,
|
|
40608
|
-
var host = getHost();
|
|
40614
|
+
var projectOwner = _a.projectOwner, projectName = _a.projectName, jobId = _a.jobId, value = _a.value, hidden = _a.hidden, _d = _a.fileNameMatch, fileNameMatch = _d === void 0 ? '.*' : _d, onChange = _a.onChange, client = _a.client;
|
|
40609
40615
|
var comboBoxRef = useRef(null);
|
|
40610
40616
|
var listArtifacts = useArtifacts(projectOwner, projectName, client).listArtifacts;
|
|
40611
|
-
var
|
|
40612
|
-
var
|
|
40613
|
-
|
|
40614
|
-
var
|
|
40615
|
-
var
|
|
40616
|
-
|
|
40617
|
-
|
|
40617
|
+
var valueRef = useRef();
|
|
40618
|
+
var _e = useState(), selArtifact = _e[0], setSelArtifact = _e[1];
|
|
40619
|
+
var _f = useState(false), loading = _f[0], setLoading = _f[1];
|
|
40620
|
+
var _g = useState({ folders: [], files: [] }), artifacts = _g[0], setArtifacts = _g[1];
|
|
40621
|
+
var _h = useState(value ?
|
|
40622
|
+
[value.key.split('/').slice(0, -1).join('/')]
|
|
40623
|
+
:
|
|
40624
|
+
[]), path = _h[0], setPath = _h[1];
|
|
40625
|
+
var handleClear = useCallback(function () {
|
|
40626
|
+
setPath([]);
|
|
40627
|
+
}, []);
|
|
40618
40628
|
useEffect(function () {
|
|
40619
40629
|
setLoading(true);
|
|
40620
40630
|
listArtifacts(path, jobId)
|
|
@@ -40622,41 +40632,33 @@ var SelectCloudArtifacts = function (_a) {
|
|
|
40622
40632
|
var folders = facts.filter(function (f) { return f.file_type === 'folder'; });
|
|
40623
40633
|
var files = facts.filter(function (f) { return f.file_type === 'file'; });
|
|
40624
40634
|
setArtifacts({ folders: folders, files: files });
|
|
40625
|
-
// Support default selections
|
|
40626
|
-
if (comboBoxRef.current && defaultValueRef.current) {
|
|
40627
|
-
var defaultFile = files.find(function (f) { return f.file_name === defaultValueRef.current; });
|
|
40628
|
-
if (defaultFile) {
|
|
40629
|
-
comboBoxRef.current.selectItem(defaultFile);
|
|
40630
|
-
defaultValueRef.current = undefined;
|
|
40631
|
-
setSelArtifact(defaultFile);
|
|
40632
|
-
}
|
|
40633
|
-
}
|
|
40634
40635
|
})
|
|
40635
40636
|
.finally(function () { return setLoading(false); });
|
|
40636
|
-
}, [
|
|
40637
|
-
client,
|
|
40638
|
-
defaultValue,
|
|
40639
|
-
fileNameMatch,
|
|
40640
|
-
host,
|
|
40641
|
-
jobId,
|
|
40642
|
-
listArtifacts,
|
|
40643
|
-
onChange,
|
|
40644
|
-
path,
|
|
40645
|
-
]);
|
|
40637
|
+
}, [jobId, listArtifacts, path]);
|
|
40646
40638
|
useEffect(function () {
|
|
40647
40639
|
if (!selArtifact || selArtifact.file_type !== 'folder')
|
|
40648
40640
|
return;
|
|
40649
40641
|
setPath(function (path) {
|
|
40650
40642
|
var newPath = ["".concat(path, "/").concat(selArtifact.file_name)];
|
|
40651
|
-
pathRef.current = ["".concat(path, "/").concat(selArtifact.file_name)];
|
|
40652
40643
|
return newPath;
|
|
40653
40644
|
});
|
|
40654
|
-
}, [
|
|
40645
|
+
}, [selArtifact]);
|
|
40655
40646
|
useEffect(function () {
|
|
40656
|
-
|
|
40647
|
+
// nonmemoized value from react-hook-form or other parent causes infinite rerendering
|
|
40648
|
+
if (lodash_isequal(valueRef.current, selArtifact)) {
|
|
40657
40649
|
return;
|
|
40658
|
-
|
|
40650
|
+
}
|
|
40651
|
+
// if selection is a folder instead of an artifact
|
|
40652
|
+
if (selArtifact && selArtifact.file_type !== 'file')
|
|
40653
|
+
return;
|
|
40654
|
+
comboBoxRef.current.selectItem(selArtifact);
|
|
40655
|
+
valueRef.current = selArtifact;
|
|
40656
|
+
// don't call onChange for undefined values
|
|
40657
|
+
onChange && selArtifact && onChange(selArtifact);
|
|
40659
40658
|
}, [onChange, selArtifact]);
|
|
40659
|
+
useEffect(function () {
|
|
40660
|
+
setSelArtifact(value);
|
|
40661
|
+
}, [value]);
|
|
40660
40662
|
var stateReducer = useCallback(function (state, actionAndChanges) {
|
|
40661
40663
|
var type = actionAndChanges.type, changes = actionAndChanges.changes;
|
|
40662
40664
|
switch (type) {
|
|
@@ -40694,7 +40696,7 @@ var SelectCloudArtifacts = function (_a) {
|
|
|
40694
40696
|
} },
|
|
40695
40697
|
icon,
|
|
40696
40698
|
item.name));
|
|
40697
|
-
}, setSelected: setSelArtifact, onClear:
|
|
40699
|
+
}, setSelected: setSelArtifact, onClear: handleClear, loading: loading, disabled: !projectName || !projectOwner, hidden: hidden, icon: React__default.createElement(CloudPlus$1, null), header: path.length > 0 &&
|
|
40698
40700
|
React__default.createElement("div", { key: "header", style: {
|
|
40699
40701
|
width: '100%',
|
|
40700
40702
|
display: 'flex',
|
|
@@ -40715,9 +40717,7 @@ var SelectCloudArtifacts = function (_a) {
|
|
|
40715
40717
|
cursor: 'pointer',
|
|
40716
40718
|
alignItems: 'center',
|
|
40717
40719
|
gap: 8,
|
|
40718
|
-
}, onClick:
|
|
40719
|
-
setPath([]);
|
|
40720
|
-
} },
|
|
40720
|
+
}, onClick: handleClear },
|
|
40721
40721
|
React__default.createElement(FolderFill$1, null),
|
|
40722
40722
|
"Root"),
|
|
40723
40723
|
React__default.createElement(ChevronRight$1, null),
|
|
@@ -40756,12 +40756,9 @@ styleInject(css_248z$5);
|
|
|
40756
40756
|
// separate multiple extensions in a filter pattern with a semicolon. Example:
|
|
40757
40757
|
// "Image files (*.bmp, *.jpg)|*.bmp;*.jpg|All files (*.*)|*.*"
|
|
40758
40758
|
var SelectLocalArtifactNative = function (_a) {
|
|
40759
|
-
var
|
|
40760
|
-
var
|
|
40759
|
+
var _b = _a.key, key = _b === void 0 ? performance.now().toString() : _b, value = _a.value, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.buttonLabel, buttonLabel = _d === void 0 ? 'Select File' : _d, _e = _a.fileMatchPattern, fileMatchPattern = _e === void 0 ? 'All Files (*.*)|*.*' : _e, _f = _a.mode, mode = _f === void 0 ? 'file' : _f, onChange = _a.onChange;
|
|
40760
|
+
var valueRef = useRef();
|
|
40761
40761
|
var _g = useState(), selPath = _g[0], setSelPath = _g[1];
|
|
40762
|
-
useEffect(function () {
|
|
40763
|
-
setKey(defaultKey);
|
|
40764
|
-
}, [defaultKey]);
|
|
40765
40762
|
var handleSelectNative = useCallback(function () {
|
|
40766
40763
|
if (!checkDotNet())
|
|
40767
40764
|
;
|
|
@@ -40781,11 +40778,20 @@ var SelectLocalArtifactNative = function (_a) {
|
|
|
40781
40778
|
console.log(error);
|
|
40782
40779
|
}
|
|
40783
40780
|
if (res && typeof res.data === 'string') {
|
|
40784
|
-
onChange(res.data);
|
|
40785
40781
|
setSelPath(res.data);
|
|
40786
40782
|
}
|
|
40787
|
-
}, [fileMatchPattern, key, mode
|
|
40788
|
-
|
|
40783
|
+
}, [fileMatchPattern, key, mode]);
|
|
40784
|
+
useEffect(function () {
|
|
40785
|
+
if (valueRef.current === selPath) {
|
|
40786
|
+
return;
|
|
40787
|
+
}
|
|
40788
|
+
valueRef.current = selPath;
|
|
40789
|
+
onChange && selPath && onChange(selPath);
|
|
40790
|
+
}, [onChange, selPath]);
|
|
40791
|
+
useEffect(function () {
|
|
40792
|
+
setSelPath(value);
|
|
40793
|
+
}, [value]);
|
|
40794
|
+
return (React__default.createElement(Button, { onClick: handleSelectNative, disabled: disabled || !checkPollinationPanel() },
|
|
40789
40795
|
React__default.createElement("div", { style: {
|
|
40790
40796
|
display: 'flex',
|
|
40791
40797
|
} }, selPath ? React__default.createElement(CheckCircle$1, { size: 16 }) : mode === 'file' ? React__default.createElement(FileEarmark$1, { size: 16 }) : React__default.createElement(FolderPlus$1, { size: 16 })),
|
|
@@ -40793,9 +40799,9 @@ var SelectLocalArtifactNative = function (_a) {
|
|
|
40793
40799
|
};
|
|
40794
40800
|
|
|
40795
40801
|
var ComboFileSelector = function (_a) {
|
|
40796
|
-
var projectOwner = _a.projectOwner, projectName = _a.projectName,
|
|
40802
|
+
var projectOwner = _a.projectOwner, projectName = _a.projectName, value = _a.value, _b = _a.hidden, hidden = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, defaultOption = _a.defaultOption, optionsConfig = _a.optionsConfig, _d = _a.mode, mode = _d === void 0 ? 'cloud' : _d, onChange = _a.onChange, client = _a.client, inputProps = _a.inputProps;
|
|
40797
40803
|
var host = getHost();
|
|
40798
|
-
var
|
|
40804
|
+
var _e = useState(function () {
|
|
40799
40805
|
if (typeof defaultOption !== 'undefined') {
|
|
40800
40806
|
return defaultOption;
|
|
40801
40807
|
}
|
|
@@ -40813,7 +40819,7 @@ var ComboFileSelector = function (_a) {
|
|
|
40813
40819
|
// web, cloud
|
|
40814
40820
|
return 'get_cloud';
|
|
40815
40821
|
}
|
|
40816
|
-
}), option =
|
|
40822
|
+
}), option = _e[0], setOption = _e[1];
|
|
40817
40823
|
useEffect(function () {
|
|
40818
40824
|
setOption(defaultOption);
|
|
40819
40825
|
}, [defaultOption]);
|
|
@@ -40827,21 +40833,24 @@ var ComboFileSelector = function (_a) {
|
|
|
40827
40833
|
} },
|
|
40828
40834
|
!hidden &&
|
|
40829
40835
|
React__default.createElement(ButtonGroup, null,
|
|
40830
|
-
|
|
40831
|
-
|
|
40832
|
-
|
|
40833
|
-
|
|
40834
|
-
|
|
40835
|
-
|
|
40836
|
-
|
|
40837
|
-
|
|
40838
|
-
|
|
40839
|
-
|
|
40840
|
-
|
|
40841
|
-
|
|
40842
|
-
|
|
40843
|
-
|
|
40836
|
+
(typeof optionsConfig['get_file'] === 'undefined' || optionsConfig['get_file']) &&
|
|
40837
|
+
React__default.createElement("button", { type: 'button', disabled: disabled, onClick: function () { return setOption('get_file'); }, style: {
|
|
40838
|
+
display: 'flex',
|
|
40839
|
+
boxShadow: !disabled && option === 'get_file' ?
|
|
40840
|
+
'inset 0px 0px 9px 4px #096dd9' : undefined
|
|
40841
|
+
} },
|
|
40842
|
+
React__default.createElement(FileEarmarkArrowUp$1, null),
|
|
40843
|
+
"Upload"),
|
|
40844
|
+
(typeof optionsConfig['get_cloud'] === 'undefined' || optionsConfig['get_cloud']) &&
|
|
40845
|
+
React__default.createElement("button", { type: 'button', disabled: disabled, onClick: function () { return setOption('get_cloud'); }, style: {
|
|
40846
|
+
display: 'flex',
|
|
40847
|
+
boxShadow: !disabled && option === 'get_cloud' ?
|
|
40848
|
+
'inset 0px 0px 9px 4px #096dd9' : undefined
|
|
40849
|
+
} },
|
|
40850
|
+
React__default.createElement(CloudPlus$1, null),
|
|
40851
|
+
"Cloud"),
|
|
40844
40852
|
(host !== 'web' || option === 'get_model') &&
|
|
40853
|
+
(typeof optionsConfig['get_model'] === 'undefined' || optionsConfig['get_model']) &&
|
|
40845
40854
|
React__default.createElement("button", { type: 'button', disabled: disabled, onClick: function () { return setOption('get_model'); }, style: {
|
|
40846
40855
|
display: 'flex',
|
|
40847
40856
|
boxShadow: !disabled && option === 'get_model' ?
|
|
@@ -40850,6 +40859,7 @@ var ComboFileSelector = function (_a) {
|
|
|
40850
40859
|
React__default.createElement(ArrowUpSquare$1, null),
|
|
40851
40860
|
"CAD"),
|
|
40852
40861
|
(host !== 'web' || option === 'get_local') &&
|
|
40862
|
+
(typeof optionsConfig['get_local'] === 'undefined' || optionsConfig['get_local']) &&
|
|
40853
40863
|
React__default.createElement("button", { type: 'button', disabled: disabled, onClick: function () { return setOption('get_local'); }, style: {
|
|
40854
40864
|
display: 'flex',
|
|
40855
40865
|
boxShadow: !disabled && option === 'get_local' ?
|
|
@@ -40865,7 +40875,7 @@ var ComboFileSelector = function (_a) {
|
|
|
40865
40875
|
case 'get_model':
|
|
40866
40876
|
return (React__default.createElement(GetModel, { onChange: onChange, inputProps: inputProps, showHelpText: false }));
|
|
40867
40877
|
case 'get_cloud':
|
|
40868
|
-
return (React__default.createElement(SelectCloudArtifacts, { projectOwner: projectOwner, projectName: projectName,
|
|
40878
|
+
return (React__default.createElement(SelectCloudArtifacts, { projectOwner: projectOwner, projectName: projectName, value: value, hidden: hidden, fileNameMatch: typeof inputProps.accept === 'string' ?
|
|
40869
40879
|
".*(".concat(inputProps.accept.replace(/\./g, '').split(', ').join('$|'), "$)") : undefined, onChange: onChange, client: client }));
|
|
40870
40880
|
case 'get_local':
|
|
40871
40881
|
return (React__default.createElement(SelectLocalArtifactNative, { onChange: handleLocalArtifactSelect, buttonLabel: "Select ".concat(inputProps.accept.split(',').length > 1 ?
|
|
@@ -40880,7 +40890,8 @@ var _defaultConfig = {
|
|
|
40880
40890
|
localCPUCount: 1,
|
|
40881
40891
|
localRunFolder: 'C:',
|
|
40882
40892
|
isLocalJob: false,
|
|
40883
|
-
cloudProjectName: undefined
|
|
40893
|
+
cloudProjectName: undefined,
|
|
40894
|
+
cloudProjectOwner: undefined
|
|
40884
40895
|
};
|
|
40885
40896
|
var ConfigureLocalRun = function (_a) {
|
|
40886
40897
|
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, defaultVal = _a.defaultVal, onChange = _a.onChange;
|
|
@@ -41720,11 +41731,12 @@ TabPanel.defaultProps = defaultProps;
|
|
|
41720
41731
|
|
|
41721
41732
|
var SelectProject = function (_a) {
|
|
41722
41733
|
var _b, _c;
|
|
41723
|
-
var authUser = _a.authUser, client = _a.client, projectOwner = _a.projectOwner,
|
|
41734
|
+
var authUser = _a.authUser, client = _a.client, projectOwner = _a.projectOwner, value = _a.value, onChange = _a.onChange;
|
|
41724
41735
|
var comboBoxRef = useRef();
|
|
41725
|
-
var
|
|
41726
|
-
var
|
|
41727
|
-
var
|
|
41736
|
+
var valueRef = useRef();
|
|
41737
|
+
var _d = useState(), selProject = _d[0], setSelProject = _d[1];
|
|
41738
|
+
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
|
41739
|
+
var _f = useState([]), projects = _f[0], setProjects = _f[1];
|
|
41728
41740
|
var totalProjectsRef = useRef({
|
|
41729
41741
|
loaded: 0,
|
|
41730
41742
|
total: undefined
|
|
@@ -41734,7 +41746,6 @@ var SelectProject = function (_a) {
|
|
|
41734
41746
|
owner: (_b = [projectOwner]) !== null && _b !== void 0 ? _b : (authUser && [authUser.username]),
|
|
41735
41747
|
page: 1,
|
|
41736
41748
|
perPage: 10,
|
|
41737
|
-
ids: defaultValue
|
|
41738
41749
|
}), queryConfig = _h[0], setQueryConfig = _h[1];
|
|
41739
41750
|
// resetting query
|
|
41740
41751
|
useEffect(function () {
|
|
@@ -41745,11 +41756,11 @@ var SelectProject = function (_a) {
|
|
|
41745
41756
|
};
|
|
41746
41757
|
// deselect items
|
|
41747
41758
|
if (comboBoxRef.current) {
|
|
41748
|
-
comboBoxRef.current.selectItem(
|
|
41759
|
+
comboBoxRef.current.selectItem(value);
|
|
41749
41760
|
}
|
|
41750
41761
|
setProjects([]);
|
|
41751
|
-
setQueryConfig(function (q) { return (__assign(__assign({}, q), { owner: [projectOwner],
|
|
41752
|
-
}, [
|
|
41762
|
+
setQueryConfig(function (q) { return (__assign(__assign({}, q), { owner: [projectOwner], page: 1 })); });
|
|
41763
|
+
}, [projectOwner, value]);
|
|
41753
41764
|
var fetchProjects = useCallback(function (queryConfig) {
|
|
41754
41765
|
if (!authUser || !client || !client.projects)
|
|
41755
41766
|
return;
|
|
@@ -41775,17 +41786,19 @@ var SelectProject = function (_a) {
|
|
|
41775
41786
|
fetchProjects(queryConfig);
|
|
41776
41787
|
}, [fetchProjects, queryConfig]);
|
|
41777
41788
|
useEffect(function () {
|
|
41778
|
-
|
|
41779
|
-
|
|
41780
|
-
// if this were to become a multiselect could use defaultValue.includes(p.id)
|
|
41781
|
-
// other things would have to change
|
|
41782
|
-
var selDefault = projects.find(function (p) { return p.id === defaultValue[0]; });
|
|
41783
|
-
if (selDefault) {
|
|
41784
|
-
setSelProject(selDefault);
|
|
41785
|
-
comboBoxRef.current.selectItem(selDefault);
|
|
41789
|
+
// nonmemoized value from react-hook-form or other parent causes infinite rerendering
|
|
41790
|
+
if (lodash_isequal(valueRef.current, selProject)) {
|
|
41786
41791
|
return;
|
|
41787
41792
|
}
|
|
41788
|
-
|
|
41793
|
+
comboBoxRef.current.selectItem(selProject);
|
|
41794
|
+
valueRef.current = selProject;
|
|
41795
|
+
// don't call onChange for undefined values
|
|
41796
|
+
onChange && selProject && onChange(selProject);
|
|
41797
|
+
}, [selProject, onChange]);
|
|
41798
|
+
useEffect(function () {
|
|
41799
|
+
setSelProject(value);
|
|
41800
|
+
console.log(value);
|
|
41801
|
+
}, [value]);
|
|
41789
41802
|
var onScrollReachEnd = useCallback(function () {
|
|
41790
41803
|
// already loaded all runs
|
|
41791
41804
|
var _a = totalProjectsRef.current, total = _a.total, loaded = _a.loaded;
|
|
@@ -41793,7 +41806,7 @@ var SelectProject = function (_a) {
|
|
|
41793
41806
|
return;
|
|
41794
41807
|
setQueryConfig(function (q) { return (__assign(__assign({}, q), { page: q.page ? q.page + 1 : 1 })); });
|
|
41795
41808
|
}, []);
|
|
41796
|
-
return (React__default.createElement(ComboBox, { ref: comboBoxRef, items: projects !== null && projects !== void 0 ? projects : [], setSelected: setSelProject, onClear: function () { return
|
|
41809
|
+
return (React__default.createElement(ComboBox, { ref: comboBoxRef, items: projects !== null && projects !== void 0 ? projects : [], setSelected: setSelProject, onClear: function () { return setSelProject(undefined); }, inputProps: {
|
|
41797
41810
|
placeholder: 'Select a project...',
|
|
41798
41811
|
}, loading: loading, disabled: !authUser || !queryConfig.owner, footer: (React__default.createElement("div", { key: "footer", style: {
|
|
41799
41812
|
width: '100%',
|
|
@@ -41805,19 +41818,20 @@ var SelectProject = function (_a) {
|
|
|
41805
41818
|
|
|
41806
41819
|
var SelectAccount = function (_a) {
|
|
41807
41820
|
var _b;
|
|
41808
|
-
var authUser = _a.authUser, client = _a.client,
|
|
41821
|
+
var authUser = _a.authUser, client = _a.client, value = _a.value, onChange = _a.onChange;
|
|
41809
41822
|
var comboBoxRef = useRef();
|
|
41810
|
-
var _c = useState(
|
|
41811
|
-
var _d = useState(
|
|
41823
|
+
var _c = useState(value), selAccount = _c[0], setSelAccount = _c[1];
|
|
41824
|
+
var _d = useState(function () { return authUser ? [authUser] : []; }), accounts = _d[0], setAccounts = _d[1];
|
|
41825
|
+
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
|
41812
41826
|
var totalAccountsRef = useRef({
|
|
41813
41827
|
loaded: 0,
|
|
41814
41828
|
total: undefined
|
|
41815
41829
|
});
|
|
41816
|
-
var
|
|
41817
|
-
var
|
|
41830
|
+
var _f = useState(0), total = _f[0], setTotal = _f[1];
|
|
41831
|
+
var _g = useState({
|
|
41818
41832
|
page: 1,
|
|
41819
41833
|
perPage: 25,
|
|
41820
|
-
}), queryConfig =
|
|
41834
|
+
}), queryConfig = _g[0], setQueryConfig = _g[1];
|
|
41821
41835
|
// resetting query
|
|
41822
41836
|
useEffect(function () {
|
|
41823
41837
|
if (!authUser)
|
|
@@ -41827,13 +41841,9 @@ var SelectAccount = function (_a) {
|
|
|
41827
41841
|
loaded: 0,
|
|
41828
41842
|
total: undefined
|
|
41829
41843
|
};
|
|
41830
|
-
// deselect items
|
|
41831
|
-
if (comboBoxRef.current) {
|
|
41832
|
-
comboBoxRef.current.selectItem(null);
|
|
41833
|
-
}
|
|
41834
41844
|
setAccounts([authUser]);
|
|
41835
41845
|
setQueryConfig(function (q) { return (__assign(__assign({}, q), { member: [authUser === null || authUser === void 0 ? void 0 : authUser.username], page: 1 })); });
|
|
41836
|
-
}, [authUser,
|
|
41846
|
+
}, [authUser, onChange, value]);
|
|
41837
41847
|
var fetchOrganizations = useCallback(function (queryConfig) {
|
|
41838
41848
|
if (!authUser || !client || !client.orgs)
|
|
41839
41849
|
return;
|
|
@@ -41860,16 +41870,13 @@ var SelectAccount = function (_a) {
|
|
|
41860
41870
|
fetchOrganizations(queryConfig);
|
|
41861
41871
|
}, [fetchOrganizations, queryConfig]);
|
|
41862
41872
|
useEffect(function () {
|
|
41863
|
-
|
|
41864
|
-
|
|
41865
|
-
|
|
41866
|
-
|
|
41867
|
-
|
|
41868
|
-
|
|
41869
|
-
|
|
41870
|
-
return;
|
|
41871
|
-
}
|
|
41872
|
-
}, [defaultValue, accounts, setSelAccount, authUser]);
|
|
41873
|
+
comboBoxRef.current.selectItem(selAccount);
|
|
41874
|
+
// comboBoxRef.current.setInputValue( selAccount.name )
|
|
41875
|
+
onChange && onChange(selAccount);
|
|
41876
|
+
}, [onChange, selAccount]);
|
|
41877
|
+
useEffect(function () {
|
|
41878
|
+
setSelAccount(value);
|
|
41879
|
+
}, [value]);
|
|
41873
41880
|
var onScrollReachEnd = useCallback(function () {
|
|
41874
41881
|
// already loaded all runs
|
|
41875
41882
|
var _a = totalAccountsRef.current, total = _a.total, loaded = _a.loaded;
|
|
@@ -41908,21 +41915,23 @@ var SelectAccount = function (_a) {
|
|
|
41908
41915
|
|
|
41909
41916
|
var SelectRecipe = function (_a) {
|
|
41910
41917
|
var _b, _c;
|
|
41911
|
-
var authUser = _a.authUser, client = _a.client, projectName = _a.projectName, projectOwner = _a.projectOwner,
|
|
41918
|
+
var authUser = _a.authUser, client = _a.client, projectName = _a.projectName, projectOwner = _a.projectOwner, value = _a.value, onChange = _a.onChange;
|
|
41912
41919
|
var comboBoxRef = useRef();
|
|
41913
|
-
var
|
|
41920
|
+
var valueRef = useRef();
|
|
41921
|
+
var _d = useState(), selRecipe = _d[0], setSelRecipe = _d[1];
|
|
41914
41922
|
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
|
41923
|
+
var _f = useState(), recipes = _f[0], setRecipes = _f[1];
|
|
41915
41924
|
var totalRecipesRef = useRef({
|
|
41916
41925
|
loaded: 0,
|
|
41917
41926
|
total: undefined
|
|
41918
41927
|
});
|
|
41919
|
-
var
|
|
41920
|
-
var
|
|
41928
|
+
var _g = useState(0), total = _g[0], setTotal = _g[1];
|
|
41929
|
+
var _h = useState({
|
|
41921
41930
|
owner: projectOwner !== null && projectOwner !== void 0 ? projectOwner : (authUser && authUser.username),
|
|
41922
41931
|
name: projectName,
|
|
41923
41932
|
page: 1,
|
|
41924
41933
|
perPage: 10,
|
|
41925
|
-
}), queryConfig =
|
|
41934
|
+
}), queryConfig = _h[0], setQueryConfig = _h[1];
|
|
41926
41935
|
// resetting query
|
|
41927
41936
|
useEffect(function () {
|
|
41928
41937
|
// reset total loaded
|
|
@@ -41932,11 +41941,11 @@ var SelectRecipe = function (_a) {
|
|
|
41932
41941
|
};
|
|
41933
41942
|
// deselect items
|
|
41934
41943
|
if (comboBoxRef.current) {
|
|
41935
|
-
comboBoxRef.current.selectItem(
|
|
41944
|
+
comboBoxRef.current.selectItem(value);
|
|
41936
41945
|
}
|
|
41937
41946
|
setRecipes([]);
|
|
41938
41947
|
setQueryConfig(function (q) { return (__assign(__assign({}, q), { owner: projectOwner, name: projectName, page: 1 })); });
|
|
41939
|
-
}, [projectOwner, projectName]);
|
|
41948
|
+
}, [projectOwner, projectName, value]);
|
|
41940
41949
|
var fetchRecipes = useCallback(function (queryConfig) {
|
|
41941
41950
|
if (!authUser || !client || !client.projects)
|
|
41942
41951
|
return;
|
|
@@ -41962,6 +41971,18 @@ var SelectRecipe = function (_a) {
|
|
|
41962
41971
|
useEffect(function () {
|
|
41963
41972
|
fetchRecipes(queryConfig);
|
|
41964
41973
|
}, [fetchRecipes, queryConfig]);
|
|
41974
|
+
useEffect(function () {
|
|
41975
|
+
// nonmemoized value from react-hook-form or other parent causes infinite rerendering
|
|
41976
|
+
if (lodash_isequal(valueRef.current, selRecipe)) {
|
|
41977
|
+
return;
|
|
41978
|
+
}
|
|
41979
|
+
comboBoxRef.current.selectItem(selRecipe);
|
|
41980
|
+
valueRef.current = selRecipe;
|
|
41981
|
+
onChange && selRecipe && onChange(selRecipe);
|
|
41982
|
+
}, [selRecipe, onChange]);
|
|
41983
|
+
useEffect(function () {
|
|
41984
|
+
setSelRecipe(value);
|
|
41985
|
+
}, [value]);
|
|
41965
41986
|
var onScrollReachEnd = useCallback(function () {
|
|
41966
41987
|
var _a = totalRecipesRef.current, total = _a.total, loaded = _a.loaded;
|
|
41967
41988
|
if (total && loaded >= total)
|
|
@@ -44002,7 +44023,7 @@ var RecipeInputsForm = function (_a) {
|
|
|
44002
44023
|
var _b, _c;
|
|
44003
44024
|
var recipe = _a.recipe, controlledValues = _a.controlledValues, onSubmit = _a.onSubmit, projectName = _a.projectName, projectOwner = _a.projectOwner, client = _a.client;
|
|
44004
44025
|
var _d = useState(false), loading = _d[0], setLoading = _d[1];
|
|
44005
|
-
var _e = useState(__assign(__assign({}, _defaultConfig), { cloudProjectName: projectName })), localConfig = _e[0], setLocalConfig = _e[1];
|
|
44026
|
+
var _e = useState(__assign(__assign({}, _defaultConfig), { cloudProjectName: projectName, cloudProjectOwner: projectOwner })), localConfig = _e[0], setLocalConfig = _e[1];
|
|
44006
44027
|
var schema = generateSchema(recipe.inputs);
|
|
44007
44028
|
var host = getHost();
|
|
44008
44029
|
var _f = useForm({
|
|
@@ -44050,9 +44071,7 @@ var RecipeInputsForm = function (_a) {
|
|
|
44050
44071
|
gap: 20
|
|
44051
44072
|
} },
|
|
44052
44073
|
React__default.createElement(FormInput, { name: 'study-name', description: 'Study name is a required field.', errorMessage: errors['study-name'] ? (_b = errors['study-name']) === null || _b === void 0 ? void 0 : _b.message : undefined },
|
|
44053
|
-
React__default.createElement(TextInput, { inputProps: __assign({ form: recipe.metadata.name }, register('study-name')),
|
|
44054
|
-
// @ts-ignore
|
|
44055
|
-
reset: function () { return resetField('study-name'); } })),
|
|
44074
|
+
React__default.createElement(TextInput, { inputProps: __assign({ form: recipe.metadata.name }, register('study-name')), reset: function () { return resetField('study-name'); } })),
|
|
44056
44075
|
host !== 'web' &&
|
|
44057
44076
|
React__default.createElement(ConfigureLocalRun, { onChange: function (localConfig) { return setLocalConfig(localConfig); }, defaultVal: localConfig }),
|
|
44058
44077
|
React__default.createElement(Tabs, { forceRenderTabPanel: true },
|
|
@@ -44076,8 +44095,8 @@ var RecipeInputsForm = function (_a) {
|
|
|
44076
44095
|
gap: 8
|
|
44077
44096
|
} }, g.map(function (input, i) {
|
|
44078
44097
|
var _a;
|
|
44079
|
-
var hidden = controlledValues && controlledValues[input.name] ? controlledValues[input.name].hidden : false;
|
|
44080
44098
|
var defaultValue = controlledValues && controlledValues[input.name] ? controlledValues[input.name].value : input.default;
|
|
44099
|
+
var hidden = controlledValues && controlledValues[input.name] ? controlledValues[input.name].hidden : false;
|
|
44081
44100
|
var inputProps = __assign({}, register(input.name, {
|
|
44082
44101
|
valueAsNumber: ['DAGIntegerInput', 'DAGNumberInput'].includes(input.type)
|
|
44083
44102
|
}));
|
|
@@ -44090,11 +44109,15 @@ var RecipeInputsForm = function (_a) {
|
|
|
44090
44109
|
// @ts-ignore
|
|
44091
44110
|
, {
|
|
44092
44111
|
// @ts-ignore
|
|
44093
|
-
name: input.name, control: control, render: function (_a) {
|
|
44094
|
-
var _b = _a.field
|
|
44112
|
+
name: input.name, control: control, defaultValue: defaultValue, render: function (_a) {
|
|
44113
|
+
var _b = _a.field, value = _b.value, onChange = _b.onChange, field = __rest(_b, ["value", "onChange"]);
|
|
44095
44114
|
return (React__default.createElement(ComboFileSelector, { projectOwner: projectOwner, projectName: projectName, defaultOption: input.extensions &&
|
|
44096
44115
|
input.extensions.includes('hbjson') &&
|
|
44097
|
-
host !== 'web' ? 'get_model' : 'get_cloud',
|
|
44116
|
+
host !== 'web' ? 'get_model' : 'get_cloud', optionsConfig: {
|
|
44117
|
+
get_model: input.extensions.includes('hbjson') && host !== 'web',
|
|
44118
|
+
get_local: host !== 'web',
|
|
44119
|
+
get_file: host === 'web'
|
|
44120
|
+
}, value: value, onChange: onChange, client: client, inputProps: __assign(__assign({}, field), { accept: input.extensions.map(function (e) { return ".".concat(e); }).join(', ') }), hidden: hidden }));
|
|
44098
44121
|
} });
|
|
44099
44122
|
case 'DAGStringInput':
|
|
44100
44123
|
return typeof ((_a = input.spec) === null || _a === void 0 ? void 0 : _a.enum) !== 'undefined' ?
|
|
@@ -44151,7 +44174,7 @@ var defaultStyle = {
|
|
|
44151
44174
|
};
|
|
44152
44175
|
var CreateStudy = function (_a) {
|
|
44153
44176
|
var _b;
|
|
44154
|
-
var authUser = _a.authUser, client = _a.client, style = _a.style;
|
|
44177
|
+
var authUser = _a.authUser, client = _a.client, style = _a.style, controlledRecipeInputs = _a.controlledRecipeInputs, createStudySuccess = _a.createStudySuccess;
|
|
44155
44178
|
var _c = useState(0), activeTabIndex = _c[0], setActiveTabIndex = _c[1];
|
|
44156
44179
|
var _d = useState(initialState), state = _d[0], setState = _d[1];
|
|
44157
44180
|
var setSelAccount = useCallback(function (account) {
|
|
@@ -44182,16 +44205,16 @@ var CreateStudy = function (_a) {
|
|
|
44182
44205
|
window.open("".concat(basePath, "/").concat(accountName, "/projects/").concat(projectName, "/studies/").concat(studyId));
|
|
44183
44206
|
}, [basePath]);
|
|
44184
44207
|
var handleCreateStudy = useCallback(function (name, data, description, localConfig) {
|
|
44185
|
-
if (!state.recipe || !state.recipe.source) {
|
|
44208
|
+
if (!state || !state.recipe || !state.recipe.source) {
|
|
44186
44209
|
return new Promise(function (resolve, reject) { return resolve(); });
|
|
44187
44210
|
}
|
|
44188
44211
|
if (host !== 'web') {
|
|
44189
|
-
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig);
|
|
44212
|
+
return createLocalStudy({ name: name, recipe: state.recipe, description: description }, data, localConfig, createStudySuccess);
|
|
44190
44213
|
}
|
|
44191
44214
|
else {
|
|
44192
|
-
return createStudy({ name: name, recipe: state.recipe, description: description }, data, handleCreateStudySuccess);
|
|
44215
|
+
return createStudy({ name: name, recipe: state.recipe, description: description }, data, createStudySuccess !== null && createStudySuccess !== void 0 ? createStudySuccess : handleCreateStudySuccess);
|
|
44193
44216
|
}
|
|
44194
|
-
}, [
|
|
44217
|
+
}, [state, host, createLocalStudy, createStudy, createStudySuccess, handleCreateStudySuccess]);
|
|
44195
44218
|
return (React__default.createElement("div", { "data-testid": "CreateProject", style: __assign(__assign({}, defaultStyle), style) },
|
|
44196
44219
|
React__default.createElement(Tabs, { selectedIndex: activeTabIndex, onSelect: function (index) { return setActiveTabIndex(index); }, forceRenderTabPanel: true },
|
|
44197
44220
|
React__default.createElement("div", { style: {
|
|
@@ -44215,12 +44238,12 @@ var CreateStudy = function (_a) {
|
|
|
44215
44238
|
gap: 8
|
|
44216
44239
|
} },
|
|
44217
44240
|
React__default.createElement(Label, { label: state.account ? state.account.name : 'Account' },
|
|
44218
|
-
React__default.createElement(SelectAccount, { authUser: authUser, client: client,
|
|
44241
|
+
React__default.createElement(SelectAccount, { authUser: authUser, client: client, onChange: setSelAccount })),
|
|
44219
44242
|
React__default.createElement(Label, { label: state.project ? state.project.name : 'Project' },
|
|
44220
|
-
React__default.createElement(SelectProject, { authUser: authUser, client: client,
|
|
44243
|
+
React__default.createElement(SelectProject, { authUser: authUser, client: client, onChange: setSelProject, projectOwner: projectOwner })),
|
|
44221
44244
|
React__default.createElement(Label, { label: state.recipe && state.recipe.metadata ?
|
|
44222
44245
|
state.recipe.metadata.name : 'Recipe' },
|
|
44223
|
-
React__default.createElement(SelectRecipe, { authUser: authUser, client: client, projectOwner: projectOwner, projectName: state.project ? state === null || state === void 0 ? void 0 : state.project.name : undefined,
|
|
44246
|
+
React__default.createElement(SelectRecipe, { authUser: authUser, client: client, projectOwner: projectOwner, projectName: state.project ? state === null || state === void 0 ? void 0 : state.project.name : undefined, onChange: setSelRecipe })))),
|
|
44224
44247
|
state.recipe &&
|
|
44225
44248
|
React__default.createElement(React__default.Fragment, null,
|
|
44226
44249
|
React__default.createElement(TabPanel, { style: {
|
|
@@ -44238,7 +44261,7 @@ var CreateStudy = function (_a) {
|
|
|
44238
44261
|
.split('-')
|
|
44239
44262
|
.map(function (v) { return v.charAt(0).toUpperCase() + v.slice(1); })
|
|
44240
44263
|
.join(' ')),
|
|
44241
|
-
React__default.createElement(RecipeInputsForm, { client: client, projectOwner: projectOwner, projectName: projectSlug, recipe: state.recipe, onSubmit: handleCreateStudy })))))));
|
|
44264
|
+
React__default.createElement(RecipeInputsForm, { client: client, projectOwner: projectOwner, projectName: projectSlug, recipe: state.recipe, onSubmit: handleCreateStudy, controlledValues: controlledRecipeInputs })))))));
|
|
44242
44265
|
};
|
|
44243
44266
|
|
|
44244
44267
|
// Generated with util/create-component.js
|
|
@@ -45942,11 +45965,12 @@ var SelectLocalArtifacts = function (_a) {
|
|
|
45942
45965
|
|
|
45943
45966
|
var SelectRun = function (_a) {
|
|
45944
45967
|
var _b, _c;
|
|
45945
|
-
var authUser = _a.authUser, client = _a.client, projectOwner = _a.projectOwner, projectName = _a.projectName, jobId = _a.jobId,
|
|
45968
|
+
var authUser = _a.authUser, client = _a.client, projectOwner = _a.projectOwner, projectName = _a.projectName, jobId = _a.jobId, value = _a.value, onChange = _a.onChange;
|
|
45946
45969
|
var comboBoxRef = useRef();
|
|
45947
|
-
var
|
|
45948
|
-
var
|
|
45949
|
-
var
|
|
45970
|
+
var valueRef = useRef();
|
|
45971
|
+
var _d = useState(), selRun = _d[0], setSelRun = _d[1];
|
|
45972
|
+
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
|
45973
|
+
var _f = useState(), runs = _f[0], setRuns = _f[1];
|
|
45950
45974
|
var totalRunsRef = useRef({
|
|
45951
45975
|
loaded: 0,
|
|
45952
45976
|
total: undefined
|
|
@@ -46006,27 +46030,18 @@ var SelectRun = function (_a) {
|
|
|
46006
46030
|
fetchRuns(queryConfig);
|
|
46007
46031
|
}, [fetchRuns, queryConfig]);
|
|
46008
46032
|
useEffect(function () {
|
|
46009
|
-
|
|
46033
|
+
// nonmemoized value from react-hook-form or other parent causes infinite rerendering
|
|
46034
|
+
if (lodash_isequal(valueRef.current, selRun)) {
|
|
46010
46035
|
return;
|
|
46011
|
-
|
|
46012
|
-
|
|
46013
|
-
|
|
46014
|
-
|
|
46015
|
-
|
|
46016
|
-
|
|
46017
|
-
|
|
46018
|
-
|
|
46019
|
-
|
|
46020
|
-
if (!state)
|
|
46021
|
-
return [data];
|
|
46022
|
-
var newRuns = __spreadArray(__spreadArray([], state, true), [data], false);
|
|
46023
|
-
var uniqueRuns = newRuns.filter(function (run, i, arr) { return arr.findIndex(function (v) { return v.id === run.id; }) === i; });
|
|
46024
|
-
return uniqueRuns;
|
|
46025
|
-
});
|
|
46026
|
-
setSelRun(data);
|
|
46027
|
-
comboBoxRef.current.selectItem(__assign(__assign({}, data), { name: "".concat(data.recipe.metadata.name, " : ").concat(data.status.status) }));
|
|
46028
|
-
});
|
|
46029
|
-
}, [client, defaultValue, projectName, projectOwner, setSelRun]);
|
|
46036
|
+
}
|
|
46037
|
+
comboBoxRef.current.selectItem(selRun);
|
|
46038
|
+
valueRef.current = selRun;
|
|
46039
|
+
// don't call onChange for undefined values
|
|
46040
|
+
onChange && selRun && onChange(selRun);
|
|
46041
|
+
}, [selRun, onChange]);
|
|
46042
|
+
useEffect(function () {
|
|
46043
|
+
setSelRun(value);
|
|
46044
|
+
}, [value]);
|
|
46030
46045
|
var onScrollReachEnd = useCallback(function () {
|
|
46031
46046
|
// already loaded all runs
|
|
46032
46047
|
var _a = totalRunsRef.current, total = _a.total, loaded = _a.loaded;
|
|
@@ -46051,7 +46066,7 @@ var SelectRun = function (_a) {
|
|
|
46051
46066
|
width: 24,
|
|
46052
46067
|
display: 'flex',
|
|
46053
46068
|
justifyContent: 'flex-end'
|
|
46054
|
-
}, className: 'secondary' }, "".concat(i)))); }, setSelected: setSelRun, onClear: function () { return
|
|
46069
|
+
}, className: 'secondary' }, "".concat(i)))); }, setSelected: setSelRun, onClear: function () { return setSelRun(undefined); }, inputProps: {
|
|
46055
46070
|
placeholder: 'Select a run...',
|
|
46056
46071
|
}, loading: loading, disabled: !authUser || !queryConfig.name || !queryConfig.owner, footer: (React__default.createElement("div", { key: "footer", style: {
|
|
46057
46072
|
width: '100%',
|
|
@@ -46076,11 +46091,12 @@ var formatStudy = function (study) {
|
|
|
46076
46091
|
};
|
|
46077
46092
|
var SelectStudy = function (_a) {
|
|
46078
46093
|
var _b, _c;
|
|
46079
|
-
var authUser = _a.authUser, client = _a.client, projectName = _a.projectName, projectOwner = _a.projectOwner,
|
|
46094
|
+
var authUser = _a.authUser, client = _a.client, projectName = _a.projectName, projectOwner = _a.projectOwner, value = _a.value, onChange = _a.onChange;
|
|
46080
46095
|
var comboBoxRef = useRef();
|
|
46081
|
-
var
|
|
46082
|
-
var
|
|
46083
|
-
var
|
|
46096
|
+
var valueRef = useRef();
|
|
46097
|
+
var _d = useState(), selStudy = _d[0], setSelStudy = _d[1];
|
|
46098
|
+
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
|
46099
|
+
var _f = useState([]), studies = _f[0], setStudies = _f[1];
|
|
46084
46100
|
var totalRunsRef = useRef({
|
|
46085
46101
|
loaded: 0,
|
|
46086
46102
|
total: undefined
|
|
@@ -46101,11 +46117,11 @@ var SelectStudy = function (_a) {
|
|
|
46101
46117
|
};
|
|
46102
46118
|
// deselect items
|
|
46103
46119
|
if (comboBoxRef.current) {
|
|
46104
|
-
comboBoxRef.current.selectItem(
|
|
46120
|
+
comboBoxRef.current.selectItem(value);
|
|
46105
46121
|
}
|
|
46106
46122
|
setStudies([]);
|
|
46107
46123
|
setQueryConfig(function (q) { return (__assign(__assign({}, q), { owner: projectOwner, name: projectName, page: 1 })); });
|
|
46108
|
-
}, [projectOwner, projectName]);
|
|
46124
|
+
}, [projectOwner, projectName, value]);
|
|
46109
46125
|
var fetchStudies = useCallback(function (queryConfig) {
|
|
46110
46126
|
if (!authUser || !client || !client.jobs)
|
|
46111
46127
|
return;
|
|
@@ -46138,27 +46154,18 @@ var SelectStudy = function (_a) {
|
|
|
46138
46154
|
fetchStudies(queryConfig);
|
|
46139
46155
|
}, [fetchStudies, queryConfig]);
|
|
46140
46156
|
useEffect(function () {
|
|
46141
|
-
|
|
46157
|
+
// nonmemoized value from react-hook-form or other parent causes infinite rerendering
|
|
46158
|
+
if (lodash_isequal(valueRef.current, selStudy)) {
|
|
46142
46159
|
return;
|
|
46143
|
-
|
|
46144
|
-
|
|
46145
|
-
|
|
46146
|
-
|
|
46147
|
-
|
|
46148
|
-
|
|
46149
|
-
|
|
46150
|
-
|
|
46151
|
-
|
|
46152
|
-
if (!state)
|
|
46153
|
-
return [data];
|
|
46154
|
-
var newStudies = __spreadArray(__spreadArray([], state, true), [data], false);
|
|
46155
|
-
var uniqueStudies = newStudies.filter(function (study, i, arr) { return arr.findIndex(function (v) { return v.id === study.id; }) === i; });
|
|
46156
|
-
return uniqueStudies;
|
|
46157
|
-
});
|
|
46158
|
-
setSelStudy(data);
|
|
46159
|
-
comboBoxRef.current.selectItem(formatStudy(data));
|
|
46160
|
-
});
|
|
46161
|
-
}, [client, defaultValue, projectName, projectOwner, setSelStudy]);
|
|
46160
|
+
}
|
|
46161
|
+
comboBoxRef.current.selectItem(selStudy);
|
|
46162
|
+
valueRef.current = selStudy;
|
|
46163
|
+
// don't call onChange for undefined values
|
|
46164
|
+
onChange && selStudy && onChange(selStudy);
|
|
46165
|
+
}, [selStudy, onChange]);
|
|
46166
|
+
useEffect(function () {
|
|
46167
|
+
setSelStudy(value);
|
|
46168
|
+
}, [value]);
|
|
46162
46169
|
var onScrollReachEnd = useCallback(function () {
|
|
46163
46170
|
// already loaded all runs
|
|
46164
46171
|
var _a = totalRunsRef.current, total = _a.total, loaded = _a.loaded;
|
|
@@ -46166,7 +46173,7 @@ var SelectStudy = function (_a) {
|
|
|
46166
46173
|
return;
|
|
46167
46174
|
setQueryConfig(function (q) { return (__assign(__assign({}, q), { page: q.page ? q.page + 1 : 1 })); });
|
|
46168
46175
|
}, []);
|
|
46169
|
-
return (React__default.createElement(ComboBox, { ref: comboBoxRef, items: (_b = studies === null || studies === void 0 ? void 0 : studies.map(formatStudy)) !== null && _b !== void 0 ? _b : [], setSelected: setSelStudy, onClear: function () { return
|
|
46176
|
+
return (React__default.createElement(ComboBox, { ref: comboBoxRef, items: (_b = studies === null || studies === void 0 ? void 0 : studies.map(formatStudy)) !== null && _b !== void 0 ? _b : [], setSelected: setSelStudy, onClear: function () { return setSelStudy(undefined); }, inputProps: {
|
|
46170
46177
|
placeholder: 'Select a study...',
|
|
46171
46178
|
}, loading: loading, disabled: !authUser || !queryConfig.name || !queryConfig.owner, footer: (React__default.createElement("div", { key: "footer", style: {
|
|
46172
46179
|
width: '100%',
|