@morscherlab/mint-sdk 1.0.63 → 1.1.0-beta.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/README.md +101 -2
- package/dist/EmptyState-D1c4RdC7.js +638 -0
- package/dist/EmptyState-D1c4RdC7.js.map +1 -0
- package/dist/{ExperimentPopover-BbPkIFsI.js → ExperimentPopover-BFw3QX8L.js} +10 -9
- package/dist/{ExperimentPopover-BbPkIFsI.js.map → ExperimentPopover-BFw3QX8L.js.map} +1 -1
- package/dist/{ExperimentSelectorModal-DZeSd-yr.js → ExperimentSelectorModal-B7w6k3Y8.js} +12 -216
- package/dist/ExperimentSelectorModal-B7w6k3Y8.js.map +1 -0
- package/dist/{SettingsModal-CJgLadsN.js → SettingsModal-DPDwCbXK.js} +12 -9
- package/dist/{SettingsModal-CJgLadsN.js.map → SettingsModal-DPDwCbXK.js.map} +1 -1
- package/dist/__tests__/components/GeneratedPlotlyResult.test.d.ts +1 -0
- package/dist/__tests__/components/GeneratedPluginView.test.d.ts +1 -0
- package/dist/__tests__/components/GeneratedResultRenderer.test.d.ts +1 -0
- package/dist/__tests__/components/InstrumentAlertLog.test.d.ts +1 -0
- package/dist/__tests__/composables/useGeneratedAnalysis.test.d.ts +1 -0
- package/dist/__tests__/generatedUi.test.d.ts +1 -0
- package/dist/{analysisArtifactTypes-Cu40dzSG.js → analysisArtifactTypes-ejqR8MX3.js} +1 -1
- package/dist/analysisArtifactTypes-ejqR8MX3.js.map +1 -0
- package/dist/{auth-DZAwEeis.js → auth-B87xM--s.js} +1 -1
- package/dist/{auth-DZAwEeis.js.map → auth-B87xM--s.js.map} +1 -1
- package/dist/chunk-BoAXSpZd.js +33 -0
- package/dist/components/AppSidebar.vue.d.ts +1 -1
- package/dist/components/AutoGroupModal.vue.d.ts +2 -2
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +2 -2
- package/dist/components/CollapsibleCard.vue.d.ts +1 -1
- package/dist/components/ComponentBindingRenderer.vue.d.ts +1 -1
- package/dist/components/ConfirmDialog.vue.d.ts +1 -1
- package/dist/components/ExperimentDataViewer.vue.d.ts +1 -1
- package/dist/components/ExperimentTimeline.vue.d.ts +1 -1
- package/dist/components/FileUploader.vue.d.ts +4 -2
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/FormActions.vue.d.ts +1 -1
- package/dist/components/FormBuilder.vue.d.ts +1 -1
- package/dist/components/GeneratedPathInput.vue.d.ts +12 -0
- package/dist/components/GeneratedPlotlyResult.vue.d.ts +11 -0
- package/dist/components/GeneratedPluginView.vue.d.ts +10 -0
- package/dist/components/GeneratedResultRenderer.vue.d.ts +6 -0
- package/dist/components/JobsStatusTray.vue.d.ts +5 -1
- package/dist/components/LcmsSequenceTable.vue.d.ts +1 -1
- package/dist/components/SampleLegend.vue.d.ts +1 -1
- package/dist/components/SampleSelector.vue.d.ts +2 -2
- package/dist/components/SettingsModal.vue.d.ts +1 -1
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +2 -2
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +8 -9
- package/dist/components/internal/PlateMapEditorToolbarInternal.vue.d.ts +2 -2
- package/dist/{components-DdzHh3a_.js → components-UfkPN1bK.js} +2255 -2303
- package/dist/components-UfkPN1bK.js.map +1 -0
- package/dist/composables/index.d.ts +2 -3
- package/dist/composables/index.js +10 -11
- package/dist/composables/platformContextHelpers.d.ts +0 -2
- package/dist/composables/useAnalysisArtifacts.d.ts +1 -3
- package/dist/composables/useGeneratedAnalysis.d.ts +62 -0
- package/dist/composables/useJobsStatusTray.d.ts +48 -4
- package/dist/composables/usePlatformContext.d.ts +3 -0
- package/dist/composables/usePluginClient.d.ts +6 -3
- package/dist/{composables-BUUphBqg.js → composables-B512bWJP.js} +155 -74
- package/dist/composables-B512bWJP.js.map +1 -0
- package/dist/experiment-utils-CxkruZ3G.js +392 -0
- package/dist/experiment-utils-CxkruZ3G.js.map +1 -0
- package/dist/generated/schema.d.ts +7 -0
- package/dist/generated-ui/main.d.ts +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -18
- package/dist/index.js.map +1 -1
- package/dist/install.js +7 -8
- package/dist/install.js.map +1 -1
- package/dist/plotly.min-BR53hja4.js +180634 -0
- package/dist/plotly.min-BR53hja4.js.map +1 -0
- package/dist/stores/auth.d.ts +2 -2
- package/dist/stores/index.js +1 -1
- package/dist/styles.css +10543 -10404
- package/dist/templates/index.js +4 -3
- package/dist/templates/packs.d.ts +0 -1
- package/dist/{templates-CNbPQNID.js → templates-Cttbjbyc.js} +2 -4
- package/dist/templates-Cttbjbyc.js.map +1 -0
- package/dist/types/analysisArtifactTypes.d.ts +0 -8
- package/dist/types/form-builder.d.ts +1 -1
- package/dist/types/generated-ui.d.ts +170 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js +1 -1
- package/dist/types/instrument.d.ts +1 -0
- package/dist/types/jobs.d.ts +7 -1
- package/dist/types/platform.d.ts +2 -0
- package/dist/{useControlSchema-BZNdalmL.js → useControlSchema-Dallso-L.js} +1852 -171
- package/dist/useControlSchema-Dallso-L.js.map +1 -0
- package/dist/{useDropdownState-Bb-c_PeE.js → useDropdownState-gVaMXtwW.js} +2 -2
- package/dist/{useDropdownState-Bb-c_PeE.js.map → useDropdownState-gVaMXtwW.js.map} +1 -1
- package/dist/{useExperimentSelector-DRbj6vse.js → useExperimentSelector-BMjzNcf2.js} +4 -255
- package/dist/useExperimentSelector-BMjzNcf2.js.map +1 -0
- package/dist/{useFormBuilder-DKekvXRs.js → useFormBuilder-BXaaDI41.js} +2 -2
- package/dist/{useFormBuilder-DKekvXRs.js.map → useFormBuilder-BXaaDI41.js.map} +1 -1
- package/dist/{useAnalysisArtifacts-C3l0a0vu.js → useProtocolTemplates-BP7_4RGQ.js} +307 -475
- package/dist/useProtocolTemplates-BP7_4RGQ.js.map +1 -0
- package/package.json +7 -3
- package/src/__tests__/components/GeneratedPathInput.test.ts +132 -0
- package/src/__tests__/components/GeneratedPlotlyResult.test.ts +117 -0
- package/src/__tests__/components/GeneratedPluginView.test.ts +230 -0
- package/src/__tests__/components/GeneratedResultRenderer.test.ts +93 -0
- package/src/__tests__/components/InstrumentAlertLog.test.ts +59 -0
- package/src/__tests__/composables/formBuilderRegistry.test.ts +5 -1
- package/src/__tests__/composables/useAnalysisArtifacts.test.ts +1 -74
- package/src/__tests__/composables/useApi.test.ts +8 -0
- package/src/__tests__/composables/useGeneratedAnalysis.test.ts +1740 -0
- package/src/__tests__/composables/useJobsStatusTray.test.ts +179 -1
- package/src/__tests__/composables/usePlatformContext.test.ts +28 -0
- package/src/__tests__/composables/usePluginClient.test.ts +366 -20
- package/src/__tests__/composables/usePluginConfig.test.ts +323 -7
- package/src/__tests__/docs/extractDocsTemplates.test.ts +0 -1
- package/src/__tests__/generatedUi.test.ts +119 -0
- package/src/__tests__/templates/templates.test.ts +1 -1
- package/src/components/FileUploader.vue +49 -11
- package/src/components/GeneratedPathInput.vue +218 -0
- package/src/components/GeneratedPlotlyResult.vue +87 -0
- package/src/components/GeneratedPluginView.vue +279 -0
- package/src/components/GeneratedResultRenderer.vue +137 -0
- package/src/components/InstrumentAlertLog.vue +2 -2
- package/src/components/JobsStatusTray.vue +14 -8
- package/src/components/index.ts +4 -0
- package/src/composables/formBuilderRegistry.ts +2 -0
- package/src/composables/index.ts +18 -5
- package/src/composables/platformContextHelpers.ts +3 -10
- package/src/composables/useAnalysisArtifacts.ts +0 -48
- package/src/composables/useApi.ts +1 -0
- package/src/composables/useGeneratedAnalysis.ts +1252 -0
- package/src/composables/useJobsStatusTray.ts +234 -45
- package/src/composables/usePluginClient.ts +152 -25
- package/src/composables/usePluginConfig.ts +156 -20
- package/src/generated/schema.ts +130 -0
- package/src/generated-ui/main.ts +21 -0
- package/src/index.ts +3 -0
- package/src/jobs.ts +5 -0
- package/src/plotly-dist.d.ts +3 -0
- package/src/templates/packs.ts +0 -3
- package/src/types/analysisArtifactTypes.ts +0 -9
- package/src/types/form-builder.ts +1 -0
- package/src/types/generated-ui.ts +176 -0
- package/src/types/index.ts +2 -1
- package/src/types/instrument.ts +1 -0
- package/src/types/jobs.ts +10 -1
- package/src/types/platform.ts +2 -0
- package/dist/BaseButton-Dgqrze41.js +0 -74
- package/dist/BaseButton-Dgqrze41.js.map +0 -1
- package/dist/BaseModal-B9UA8Y_I.js +0 -165
- package/dist/BaseModal-B9UA8Y_I.js.map +0 -1
- package/dist/BaseSelect-ekgr9fDo.js +0 -179
- package/dist/BaseSelect-ekgr9fDo.js.map +0 -1
- package/dist/ExperimentPopover-Ryusjrhv.js +0 -4
- package/dist/ExperimentSelectorModal-Cg4-LXBD.js +0 -5
- package/dist/ExperimentSelectorModal-DZeSd-yr.js.map +0 -1
- package/dist/SettingsModal-Bl_9w2Y3.js +0 -5
- package/dist/analysisArtifactTypes-Cu40dzSG.js.map +0 -1
- package/dist/components-DdzHh3a_.js.map +0 -1
- package/dist/composables/analysisArtifactTarget.d.ts +0 -5
- package/dist/composables-BUUphBqg.js.map +0 -1
- package/dist/experiment-utils-Bfa7CwPU.js +0 -108
- package/dist/experiment-utils-Bfa7CwPU.js.map +0 -1
- package/dist/templates-CNbPQNID.js.map +0 -1
- package/dist/useAnalysisArtifacts-C3l0a0vu.js.map +0 -1
- package/dist/useControlSchema-BZNdalmL.js.map +0 -1
- package/dist/useEventListener-CfVkP9Xz.js +0 -57
- package/dist/useEventListener-CfVkP9Xz.js.map +0 -1
- package/dist/useExperimentSelector-DRbj6vse.js.map +0 -1
- package/src/__tests__/composables/analysisArtifactTarget.test.ts +0 -77
- package/src/composables/analysisArtifactTarget.ts +0 -53
- /package/dist/__tests__/{composables/analysisArtifactTarget.test.d.ts → components/GeneratedPathInput.test.d.ts} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as useDropdownState } from "./useDropdownState-
|
|
4
|
-
import {
|
|
1
|
+
import { d as BaseModal_default, f as useEventListener, p as BaseButton_default, s as formatExperimentDate } from "./experiment-utils-CxkruZ3G.js";
|
|
2
|
+
import { c as BaseSelect_default, l as normalizeOptionInput, n as Skeleton_default, o as useApi, r as useRequestSyncState, s as BasePill_default, t as EmptyState_default, u as BaseInput_default } from "./EmptyState-D1c4RdC7.js";
|
|
3
|
+
import { t as useDropdownState } from "./useDropdownState-gVaMXtwW.js";
|
|
4
|
+
import { hasAllPermissions } from "./permissions.js";
|
|
5
|
+
import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, isRef, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, reactive, ref, renderList, renderSlot, shallowRef, toDisplayString, toValue, unref, useSlots, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
5
6
|
//#region src/components/BaseTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var _hoisted_1$
|
|
7
|
+
var _hoisted_1$21 = [
|
|
7
8
|
"value",
|
|
8
9
|
"placeholder",
|
|
9
10
|
"disabled",
|
|
@@ -71,7 +72,7 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
71
72
|
onInput: handleInput,
|
|
72
73
|
onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus", $event)),
|
|
73
74
|
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event))
|
|
74
|
-
}, null, 42, _hoisted_1$
|
|
75
|
+
}, null, 42, _hoisted_1$21);
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
78
|
});
|
|
@@ -1062,9 +1063,9 @@ var computePosition = (reference, floating, options) => {
|
|
|
1062
1063
|
};
|
|
1063
1064
|
//#endregion
|
|
1064
1065
|
//#region src/components/Tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
1065
|
-
var _hoisted_1$
|
|
1066
|
-
var _hoisted_2$
|
|
1067
|
-
var _hoisted_3$
|
|
1066
|
+
var _hoisted_1$20 = ["aria-describedby"];
|
|
1067
|
+
var _hoisted_2$19 = { class: "mint-tooltip__body" };
|
|
1068
|
+
var _hoisted_3$17 = {
|
|
1068
1069
|
key: 0,
|
|
1069
1070
|
class: "mint-tooltip__shortcut"
|
|
1070
1071
|
};
|
|
@@ -1159,13 +1160,13 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
1159
1160
|
maxWidth: resolvedMaxWidth(__props.maxWidth)
|
|
1160
1161
|
}),
|
|
1161
1162
|
role: "tooltip"
|
|
1162
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
1163
|
+
}, [createElementVNode("span", _hoisted_2$19, toDisplayString(__props.text), 1), __props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$17, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)], 6)) : createCommentVNode("", true)]))], 40, _hoisted_1$20);
|
|
1163
1164
|
};
|
|
1164
1165
|
}
|
|
1165
1166
|
});
|
|
1166
1167
|
//#endregion
|
|
1167
1168
|
//#region src/components/BaseCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
1168
|
-
var _hoisted_1$
|
|
1169
|
+
var _hoisted_1$19 = {
|
|
1169
1170
|
key: 0,
|
|
1170
1171
|
class: "mint-checkbox__row-svg",
|
|
1171
1172
|
viewBox: "0 0 24 24",
|
|
@@ -1175,18 +1176,18 @@ var _hoisted_1$16 = {
|
|
|
1175
1176
|
"stroke-linecap": "round",
|
|
1176
1177
|
"stroke-linejoin": "round"
|
|
1177
1178
|
};
|
|
1178
|
-
var _hoisted_2$
|
|
1179
|
-
var _hoisted_3$
|
|
1180
|
-
var _hoisted_4$
|
|
1179
|
+
var _hoisted_2$18 = ["d"];
|
|
1180
|
+
var _hoisted_3$16 = ["d"];
|
|
1181
|
+
var _hoisted_4$15 = {
|
|
1181
1182
|
key: 1,
|
|
1182
1183
|
class: "mint-checkbox__row-text-icon"
|
|
1183
1184
|
};
|
|
1184
|
-
var _hoisted_5$
|
|
1185
|
+
var _hoisted_5$13 = {
|
|
1185
1186
|
key: 1,
|
|
1186
1187
|
class: "mint-checkbox__copy"
|
|
1187
1188
|
};
|
|
1188
|
-
var _hoisted_6$
|
|
1189
|
-
var _hoisted_7$
|
|
1189
|
+
var _hoisted_6$13 = { class: "mint-checkbox__input-wrapper" };
|
|
1190
|
+
var _hoisted_7$11 = [
|
|
1190
1191
|
"checked",
|
|
1191
1192
|
"disabled",
|
|
1192
1193
|
"aria-label"
|
|
@@ -1240,16 +1241,16 @@ var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
1240
1241
|
class: "mint-checkbox__row-icon",
|
|
1241
1242
|
style: normalizeStyle(iconStyle()),
|
|
1242
1243
|
"aria-hidden": "true"
|
|
1243
|
-
}, [isSvgIcon(props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
1244
|
+
}, [isSvgIcon(props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$19, [Array.isArray(props.icon) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.icon, (d, i) => {
|
|
1244
1245
|
return openBlock(), createElementBlock("path", {
|
|
1245
1246
|
key: i,
|
|
1246
1247
|
d
|
|
1247
|
-
}, null, 8, _hoisted_2$
|
|
1248
|
+
}, null, 8, _hoisted_2$18);
|
|
1248
1249
|
}), 128)) : (openBlock(), createElementBlock("path", {
|
|
1249
1250
|
key: 1,
|
|
1250
1251
|
d: props.icon
|
|
1251
|
-
}, null, 8, _hoisted_3$
|
|
1252
|
-
props.variant === "row" && props.label ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
1252
|
+
}, null, 8, _hoisted_3$16))])) : (openBlock(), createElementBlock("span", _hoisted_4$15, toDisplayString(props.icon), 1))], 4)) : createCommentVNode("", true),
|
|
1253
|
+
props.variant === "row" && props.label ? (openBlock(), createElementBlock("span", _hoisted_5$13, [props.description ? (openBlock(), createBlock(Tooltip_default, {
|
|
1253
1254
|
key: 0,
|
|
1254
1255
|
text: props.description,
|
|
1255
1256
|
position: "right",
|
|
@@ -1265,14 +1266,14 @@ var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
1265
1266
|
key: 1,
|
|
1266
1267
|
class: normalizeClass(["mint-checkbox__label", `mint-checkbox__label--${props.size}`])
|
|
1267
1268
|
}, toDisplayString(props.label), 3))])) : createCommentVNode("", true),
|
|
1268
|
-
createElementVNode("div", _hoisted_6$
|
|
1269
|
+
createElementVNode("div", _hoisted_6$13, [createElementVNode("input", {
|
|
1269
1270
|
type: "checkbox",
|
|
1270
1271
|
checked: props.modelValue,
|
|
1271
1272
|
disabled: props.disabled,
|
|
1272
1273
|
"aria-label": props.label || "Checkbox",
|
|
1273
1274
|
class: "mint-checkbox__native",
|
|
1274
1275
|
onChange: handleChange
|
|
1275
|
-
}, null, 40, _hoisted_7$
|
|
1276
|
+
}, null, 40, _hoisted_7$11), createElementVNode("div", { class: normalizeClass([
|
|
1276
1277
|
"mint-checkbox__box",
|
|
1277
1278
|
`mint-checkbox__box--${props.size}`,
|
|
1278
1279
|
props.modelValue ? "mint-checkbox__box--checked" : ""
|
|
@@ -1299,7 +1300,7 @@ var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
1299
1300
|
});
|
|
1300
1301
|
//#endregion
|
|
1301
1302
|
//#region src/components/BaseToggle.vue?vue&type=script&setup=true&lang.ts
|
|
1302
|
-
var _hoisted_1$
|
|
1303
|
+
var _hoisted_1$18 = {
|
|
1303
1304
|
key: 0,
|
|
1304
1305
|
class: "mint-toggle__row-svg",
|
|
1305
1306
|
viewBox: "0 0 24 24",
|
|
@@ -1309,17 +1310,17 @@ var _hoisted_1$15 = {
|
|
|
1309
1310
|
"stroke-linecap": "round",
|
|
1310
1311
|
"stroke-linejoin": "round"
|
|
1311
1312
|
};
|
|
1312
|
-
var _hoisted_2$
|
|
1313
|
-
var _hoisted_3$
|
|
1314
|
-
var _hoisted_4$
|
|
1313
|
+
var _hoisted_2$17 = ["d"];
|
|
1314
|
+
var _hoisted_3$15 = ["d"];
|
|
1315
|
+
var _hoisted_4$14 = {
|
|
1315
1316
|
key: 1,
|
|
1316
1317
|
class: "mint-toggle__row-text-icon"
|
|
1317
1318
|
};
|
|
1318
|
-
var _hoisted_5$
|
|
1319
|
+
var _hoisted_5$12 = {
|
|
1319
1320
|
key: 1,
|
|
1320
1321
|
class: "mint-toggle__copy"
|
|
1321
1322
|
};
|
|
1322
|
-
var _hoisted_6$
|
|
1323
|
+
var _hoisted_6$12 = [
|
|
1323
1324
|
"tabindex",
|
|
1324
1325
|
"aria-checked",
|
|
1325
1326
|
"aria-label"
|
|
@@ -1386,16 +1387,16 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1386
1387
|
class: "mint-toggle__row-icon",
|
|
1387
1388
|
style: normalizeStyle(iconStyle()),
|
|
1388
1389
|
"aria-hidden": "true"
|
|
1389
|
-
}, [isSvgIcon(__props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
1390
|
+
}, [isSvgIcon(__props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$18, [Array.isArray(__props.icon) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.icon, (d, i) => {
|
|
1390
1391
|
return openBlock(), createElementBlock("path", {
|
|
1391
1392
|
key: i,
|
|
1392
1393
|
d
|
|
1393
|
-
}, null, 8, _hoisted_2$
|
|
1394
|
+
}, null, 8, _hoisted_2$17);
|
|
1394
1395
|
}), 128)) : (openBlock(), createElementBlock("path", {
|
|
1395
1396
|
key: 1,
|
|
1396
1397
|
d: __props.icon
|
|
1397
|
-
}, null, 8, _hoisted_3$
|
|
1398
|
-
__props.variant === "row" && __props.label ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
1398
|
+
}, null, 8, _hoisted_3$15))])) : (openBlock(), createElementBlock("span", _hoisted_4$14, toDisplayString(__props.icon), 1))], 4)) : createCommentVNode("", true),
|
|
1399
|
+
__props.variant === "row" && __props.label ? (openBlock(), createElementBlock("span", _hoisted_5$12, [__props.description ? (openBlock(), createBlock(Tooltip_default, {
|
|
1399
1400
|
key: 0,
|
|
1400
1401
|
text: __props.description,
|
|
1401
1402
|
position: "right",
|
|
@@ -1426,7 +1427,7 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1426
1427
|
"mint-toggle__knob",
|
|
1427
1428
|
`mint-toggle__knob--${__props.size}`,
|
|
1428
1429
|
__props.modelValue ? `mint-toggle__knob--on-${__props.size}` : "mint-toggle__knob--off"
|
|
1429
|
-
]) }, null, 2)], 42, _hoisted_6$
|
|
1430
|
+
]) }, null, 2)], 42, _hoisted_6$12),
|
|
1430
1431
|
__props.label && __props.variant !== "row" ? (openBlock(), createElementBlock("span", {
|
|
1431
1432
|
key: 2,
|
|
1432
1433
|
class: normalizeClass(["mint-toggle__label", `mint-toggle__label--${__props.size}`])
|
|
@@ -1437,7 +1438,7 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1437
1438
|
});
|
|
1438
1439
|
//#endregion
|
|
1439
1440
|
//#region src/components/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1440
|
-
var _hoisted_1$
|
|
1441
|
+
var _hoisted_1$17 = [
|
|
1441
1442
|
"name",
|
|
1442
1443
|
"value",
|
|
1443
1444
|
"checked",
|
|
@@ -1445,9 +1446,9 @@ var _hoisted_1$14 = [
|
|
|
1445
1446
|
"aria-describedby",
|
|
1446
1447
|
"onChange"
|
|
1447
1448
|
];
|
|
1448
|
-
var _hoisted_2$
|
|
1449
|
-
var _hoisted_3$
|
|
1450
|
-
var _hoisted_4$
|
|
1449
|
+
var _hoisted_2$16 = { class: "mint-radio-option__content" };
|
|
1450
|
+
var _hoisted_3$14 = ["id"];
|
|
1451
|
+
var _hoisted_4$13 = [
|
|
1451
1452
|
"name",
|
|
1452
1453
|
"value",
|
|
1453
1454
|
"checked",
|
|
@@ -1455,9 +1456,9 @@ var _hoisted_4$11 = [
|
|
|
1455
1456
|
"aria-describedby",
|
|
1456
1457
|
"onChange"
|
|
1457
1458
|
];
|
|
1458
|
-
var _hoisted_5$
|
|
1459
|
-
var _hoisted_6$
|
|
1460
|
-
var _hoisted_7$
|
|
1459
|
+
var _hoisted_5$11 = { class: "mint-radio-option__head" };
|
|
1460
|
+
var _hoisted_6$11 = { class: "mint-radio-option__title" };
|
|
1461
|
+
var _hoisted_7$10 = ["id"];
|
|
1461
1462
|
//#endregion
|
|
1462
1463
|
//#region src/components/BaseRadioGroup.vue
|
|
1463
1464
|
var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1508,18 +1509,18 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1508
1509
|
"aria-describedby": option.description ? `${props.name}-${option.value}-desc` : void 0,
|
|
1509
1510
|
class: "mint-radio-option__native",
|
|
1510
1511
|
onChange: ($event) => handleChange(option.value)
|
|
1511
|
-
}, null, 40, _hoisted_1$
|
|
1512
|
+
}, null, 40, _hoisted_1$17), createElementVNode("div", { class: normalizeClass([
|
|
1512
1513
|
"mint-radio-option__circle",
|
|
1513
1514
|
`mint-radio-option__circle--${props.size}`,
|
|
1514
1515
|
props.modelValue === option.value ? "mint-radio-option__circle--checked" : ""
|
|
1515
1516
|
]) }, [props.modelValue === option.value ? (openBlock(), createElementBlock("div", {
|
|
1516
1517
|
key: 0,
|
|
1517
1518
|
class: normalizeClass(["mint-radio-option__dot", `mint-radio-option__dot--${props.size}`])
|
|
1518
|
-
}, null, 2)) : createCommentVNode("", true)], 2)], 2), createElementVNode("div", _hoisted_2$
|
|
1519
|
+
}, null, 2)) : createCommentVNode("", true)], 2)], 2), createElementVNode("div", _hoisted_2$16, [createElementVNode("span", { class: normalizeClass(["mint-radio-option__label", `mint-radio-option__label--${props.size}`]) }, toDisplayString(option.label), 3), option.description ? (openBlock(), createElementBlock("span", {
|
|
1519
1520
|
key: 0,
|
|
1520
1521
|
id: `${props.name}-${option.value}-desc`,
|
|
1521
1522
|
class: normalizeClass(["mint-radio-option__description", `mint-radio-option__description--${props.size}`])
|
|
1522
|
-
}, toDisplayString(option.description), 11, _hoisted_3$
|
|
1523
|
+
}, toDisplayString(option.description), 11, _hoisted_3$14)) : createCommentVNode("", true)])], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1523
1524
|
createElementVNode("input", {
|
|
1524
1525
|
type: "radio",
|
|
1525
1526
|
name: props.name,
|
|
@@ -1529,20 +1530,20 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1529
1530
|
"aria-describedby": option.description ? `${props.name}-${option.value}-desc` : void 0,
|
|
1530
1531
|
class: "mint-radio-option__native",
|
|
1531
1532
|
onChange: ($event) => handleChange(option.value)
|
|
1532
|
-
}, null, 40, _hoisted_4$
|
|
1533
|
-
createElementVNode("div", _hoisted_5$
|
|
1533
|
+
}, null, 40, _hoisted_4$13),
|
|
1534
|
+
createElementVNode("div", _hoisted_5$11, [createElementVNode("div", { class: normalizeClass([
|
|
1534
1535
|
"mint-radio-option__circle",
|
|
1535
1536
|
`mint-radio-option__circle--${props.size}`,
|
|
1536
1537
|
props.modelValue === option.value ? "mint-radio-option__circle--checked" : ""
|
|
1537
1538
|
]) }, [props.modelValue === option.value ? (openBlock(), createElementBlock("div", {
|
|
1538
1539
|
key: 0,
|
|
1539
1540
|
class: normalizeClass(["mint-radio-option__dot", `mint-radio-option__dot--${props.size}`])
|
|
1540
|
-
}, null, 2)) : createCommentVNode("", true)], 2), createElementVNode("span", _hoisted_6$
|
|
1541
|
+
}, null, 2)) : createCommentVNode("", true)], 2), createElementVNode("span", _hoisted_6$11, toDisplayString(option.label), 1)]),
|
|
1541
1542
|
option.description ? (openBlock(), createElementBlock("span", {
|
|
1542
1543
|
key: 0,
|
|
1543
1544
|
id: `${props.name}-${option.value}-desc`,
|
|
1544
1545
|
class: "mint-radio-option__description"
|
|
1545
|
-
}, toDisplayString(option.description), 9, _hoisted_7$
|
|
1546
|
+
}, toDisplayString(option.description), 9, _hoisted_7$10)) : createCommentVNode("", true)
|
|
1546
1547
|
], 64))], 2);
|
|
1547
1548
|
}), 128))], 2);
|
|
1548
1549
|
};
|
|
@@ -1550,8 +1551,8 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1550
1551
|
});
|
|
1551
1552
|
//#endregion
|
|
1552
1553
|
//#region src/components/BaseSlider.vue?vue&type=script&setup=true&lang.ts
|
|
1553
|
-
var _hoisted_1$
|
|
1554
|
-
var _hoisted_2$
|
|
1554
|
+
var _hoisted_1$16 = { class: "mint-slider__container" };
|
|
1555
|
+
var _hoisted_2$15 = [
|
|
1555
1556
|
"value",
|
|
1556
1557
|
"min",
|
|
1557
1558
|
"max",
|
|
@@ -1562,7 +1563,7 @@ var _hoisted_2$12 = [
|
|
|
1562
1563
|
"aria-valuemax",
|
|
1563
1564
|
"aria-valuenow"
|
|
1564
1565
|
];
|
|
1565
|
-
var _hoisted_3$
|
|
1566
|
+
var _hoisted_3$13 = {
|
|
1566
1567
|
key: 0,
|
|
1567
1568
|
class: "mint-slider__value"
|
|
1568
1569
|
};
|
|
@@ -1624,7 +1625,7 @@ var BaseSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
1624
1625
|
emit("update:modelValue", Number(target.value));
|
|
1625
1626
|
}
|
|
1626
1627
|
return (_ctx, _cache) => {
|
|
1627
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(["mint-slider", { "mint-slider--disabled": __props.disabled }]) }, [createElementVNode("div", _hoisted_1$
|
|
1628
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["mint-slider", { "mint-slider--disabled": __props.disabled }]) }, [createElementVNode("div", _hoisted_1$16, [
|
|
1628
1629
|
createElementVNode("div", {
|
|
1629
1630
|
class: "mint-slider__track",
|
|
1630
1631
|
style: normalizeStyle({ height: `${sizeConfig.value.height}px` })
|
|
@@ -1653,7 +1654,7 @@ var BaseSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
1653
1654
|
onMouseup: _cache[1] || (_cache[1] = ($event) => isDragging.value = false),
|
|
1654
1655
|
onTouchstartPassive: _cache[2] || (_cache[2] = ($event) => isDragging.value = true),
|
|
1655
1656
|
onTouchend: _cache[3] || (_cache[3] = ($event) => isDragging.value = false)
|
|
1656
|
-
}, null, 40, _hoisted_2$
|
|
1657
|
+
}, null, 40, _hoisted_2$15),
|
|
1657
1658
|
createElementVNode("div", {
|
|
1658
1659
|
class: normalizeClass(["mint-slider__thumb", { "mint-slider__thumb--dragging": isDragging.value }]),
|
|
1659
1660
|
style: normalizeStyle({
|
|
@@ -1662,7 +1663,7 @@ var BaseSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
1662
1663
|
left: thumbPosition.value
|
|
1663
1664
|
})
|
|
1664
1665
|
}, null, 6)
|
|
1665
|
-
]), __props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
1666
|
+
]), __props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$13, toDisplayString(currentValue.value), 1)) : createCommentVNode("", true)], 2);
|
|
1666
1667
|
};
|
|
1667
1668
|
}
|
|
1668
1669
|
});
|
|
@@ -1788,22 +1789,22 @@ function uniqueValues(values) {
|
|
|
1788
1789
|
}
|
|
1789
1790
|
//#endregion
|
|
1790
1791
|
//#region src/components/MultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
1791
|
-
var _hoisted_1$
|
|
1792
|
+
var _hoisted_1$15 = {
|
|
1792
1793
|
key: 0,
|
|
1793
1794
|
class: "mint-multi-select__placeholder"
|
|
1794
1795
|
};
|
|
1795
|
-
var _hoisted_2$
|
|
1796
|
+
var _hoisted_2$14 = {
|
|
1796
1797
|
class: "mint-multi-select__options",
|
|
1797
1798
|
role: "group"
|
|
1798
1799
|
};
|
|
1799
|
-
var _hoisted_3$
|
|
1800
|
+
var _hoisted_3$12 = [
|
|
1800
1801
|
"aria-checked",
|
|
1801
1802
|
"disabled",
|
|
1802
1803
|
"onClick",
|
|
1803
1804
|
"onKeydown"
|
|
1804
1805
|
];
|
|
1805
|
-
var _hoisted_4$
|
|
1806
|
-
var _hoisted_5$
|
|
1806
|
+
var _hoisted_4$12 = { class: "mint-multi-select__chip-label" };
|
|
1807
|
+
var _hoisted_5$10 = {
|
|
1807
1808
|
key: 0,
|
|
1808
1809
|
class: "mint-multi-select__chip-check",
|
|
1809
1810
|
viewBox: "0 0 24 24",
|
|
@@ -1813,7 +1814,7 @@ var _hoisted_5$8 = {
|
|
|
1813
1814
|
"stroke-linecap": "round",
|
|
1814
1815
|
"stroke-linejoin": "round"
|
|
1815
1816
|
};
|
|
1816
|
-
var _hoisted_6$
|
|
1817
|
+
var _hoisted_6$10 = {
|
|
1817
1818
|
key: 1,
|
|
1818
1819
|
class: "mint-multi-select__summary"
|
|
1819
1820
|
};
|
|
@@ -1868,8 +1869,8 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1868
1869
|
`mint-multi-select--${__props.size}`,
|
|
1869
1870
|
__props.disabled ? "mint-multi-select--disabled" : ""
|
|
1870
1871
|
]) }, [
|
|
1871
|
-
__props.modelValue.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1872
|
-
createElementVNode("div", _hoisted_2$
|
|
1872
|
+
__props.modelValue.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$15, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true),
|
|
1873
|
+
createElementVNode("div", _hoisted_2$14, [(openBlock(true), createElementBlock(Fragment, null, renderList(normalizedOptions.value, (option) => {
|
|
1873
1874
|
return openBlock(), createElementBlock("button", {
|
|
1874
1875
|
key: String(option.value),
|
|
1875
1876
|
type: "button",
|
|
@@ -1885,9 +1886,9 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1885
1886
|
]),
|
|
1886
1887
|
onClick: ($event) => toggleOption(option),
|
|
1887
1888
|
onKeydown: ($event) => handleKeydown($event, option)
|
|
1888
|
-
}, [createElementVNode("span", _hoisted_4$
|
|
1889
|
+
}, [createElementVNode("span", _hoisted_4$12, toDisplayString(option.label), 1), isSelected(option.value) ? (openBlock(), createElementBlock("svg", _hoisted_5$10, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M20 6 9 17l-5-5" }, null, -1)])])) : createCommentVNode("", true)], 42, _hoisted_3$12);
|
|
1889
1890
|
}), 128))]),
|
|
1890
|
-
__props.modelValue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
1891
|
+
__props.modelValue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$10, toDisplayString(selectedLabels.value.join(", ")), 1)) : createCommentVNode("", true)
|
|
1891
1892
|
], 2);
|
|
1892
1893
|
};
|
|
1893
1894
|
}
|
|
@@ -1998,14 +1999,14 @@ function startOfDay(date) {
|
|
|
1998
1999
|
}
|
|
1999
2000
|
//#endregion
|
|
2000
2001
|
//#region src/components/internal/CalendarGridPanelInternal.vue?vue&type=script&setup=true&lang.ts
|
|
2001
|
-
var _hoisted_1$
|
|
2002
|
-
var _hoisted_2$
|
|
2003
|
-
var _hoisted_3$
|
|
2004
|
-
var _hoisted_4$
|
|
2005
|
-
var _hoisted_5$
|
|
2006
|
-
var _hoisted_6$
|
|
2007
|
-
var _hoisted_7$
|
|
2008
|
-
var _hoisted_8$
|
|
2002
|
+
var _hoisted_1$14 = { class: "mint-calendar-grid-panel" };
|
|
2003
|
+
var _hoisted_2$13 = { class: "mint-date-picker__header" };
|
|
2004
|
+
var _hoisted_3$11 = ["aria-label"];
|
|
2005
|
+
var _hoisted_4$11 = { class: "mint-date-picker__month-year" };
|
|
2006
|
+
var _hoisted_5$9 = ["aria-label"];
|
|
2007
|
+
var _hoisted_6$9 = { class: "mint-date-picker__weekdays" };
|
|
2008
|
+
var _hoisted_7$9 = { class: "mint-date-picker__grid" };
|
|
2009
|
+
var _hoisted_8$7 = [
|
|
2009
2010
|
"disabled",
|
|
2010
2011
|
"aria-label",
|
|
2011
2012
|
"aria-selected",
|
|
@@ -2049,8 +2050,8 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2049
2050
|
});
|
|
2050
2051
|
}
|
|
2051
2052
|
return (_ctx, _cache) => {
|
|
2052
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2053
|
-
createElementVNode("div", _hoisted_2$
|
|
2053
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
2054
|
+
createElementVNode("div", _hoisted_2$13, [
|
|
2054
2055
|
createElementVNode("button", {
|
|
2055
2056
|
type: "button",
|
|
2056
2057
|
class: "mint-date-picker__nav-btn",
|
|
@@ -2064,8 +2065,8 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2064
2065
|
"stroke-linecap": "round",
|
|
2065
2066
|
"stroke-linejoin": "round",
|
|
2066
2067
|
"aria-hidden": "true"
|
|
2067
|
-
}, [createElementVNode("path", { d: "m15 18-6-6 6-6" })], -1)])], 8, _hoisted_3$
|
|
2068
|
-
createElementVNode("span", _hoisted_4$
|
|
2068
|
+
}, [createElementVNode("path", { d: "m15 18-6-6 6-6" })], -1)])], 8, _hoisted_3$11),
|
|
2069
|
+
createElementVNode("span", _hoisted_4$11, toDisplayString(__props.monthYear), 1),
|
|
2069
2070
|
createElementVNode("button", {
|
|
2070
2071
|
type: "button",
|
|
2071
2072
|
class: "mint-date-picker__nav-btn",
|
|
@@ -2079,15 +2080,15 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2079
2080
|
"stroke-linecap": "round",
|
|
2080
2081
|
"stroke-linejoin": "round",
|
|
2081
2082
|
"aria-hidden": "true"
|
|
2082
|
-
}, [createElementVNode("path", { d: "m9 18 6-6-6-6" })], -1)])], 8, _hoisted_5$
|
|
2083
|
+
}, [createElementVNode("path", { d: "m9 18 6-6-6-6" })], -1)])], 8, _hoisted_5$9)
|
|
2083
2084
|
]),
|
|
2084
|
-
createElementVNode("div", _hoisted_6$
|
|
2085
|
+
createElementVNode("div", _hoisted_6$9, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.weekDays, (day) => {
|
|
2085
2086
|
return openBlock(), createElementBlock("div", {
|
|
2086
2087
|
key: day,
|
|
2087
2088
|
class: "mint-date-picker__weekday"
|
|
2088
2089
|
}, toDisplayString(day), 1);
|
|
2089
2090
|
}), 128))]),
|
|
2090
|
-
createElementVNode("div", _hoisted_7$
|
|
2091
|
+
createElementVNode("div", _hoisted_7$9, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.days, (day, index) => {
|
|
2091
2092
|
return openBlock(), createElementBlock("button", {
|
|
2092
2093
|
key: index,
|
|
2093
2094
|
type: "button",
|
|
@@ -2102,7 +2103,7 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2102
2103
|
isToday(day.date) && !isSameDay(day.date, __props.selectedDate) ? "mint-date-picker__day--today" : ""
|
|
2103
2104
|
]),
|
|
2104
2105
|
onClick: ($event) => emit("select", day)
|
|
2105
|
-
}, toDisplayString(day.date.getDate()), 11, _hoisted_8$
|
|
2106
|
+
}, toDisplayString(day.date.getDate()), 11, _hoisted_8$7);
|
|
2106
2107
|
}), 128))])
|
|
2107
2108
|
]);
|
|
2108
2109
|
};
|
|
@@ -2110,12 +2111,12 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2110
2111
|
});
|
|
2111
2112
|
//#endregion
|
|
2112
2113
|
//#region src/components/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
2113
|
-
var _hoisted_1$
|
|
2114
|
+
var _hoisted_1$13 = [
|
|
2114
2115
|
"value",
|
|
2115
2116
|
"placeholder",
|
|
2116
2117
|
"disabled"
|
|
2117
2118
|
];
|
|
2118
|
-
var _hoisted_2$
|
|
2119
|
+
var _hoisted_2$12 = { class: "mint-date-picker__footer" };
|
|
2119
2120
|
//#endregion
|
|
2120
2121
|
//#region src/components/DatePicker.vue
|
|
2121
2122
|
var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2230,7 +2231,7 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2230
2231
|
__props.disabled ? "mint-date-picker__input--disabled" : ""
|
|
2231
2232
|
]),
|
|
2232
2233
|
onClick: toggleCalendar
|
|
2233
|
-
}, null, 10, _hoisted_1$
|
|
2234
|
+
}, null, 10, _hoisted_1$13), _cache[0] || (_cache[0] = createStaticVNode("<div class=\"mint-date-picker__icon\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 2v4\"></path><path d=\"M16 2v4\"></path><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"></rect><path d=\"M3 10h18\"></path></svg></div>", 1))], 512), (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, {
|
|
2234
2235
|
"enter-active-class": "mint-date-picker__dropdown-enter-active",
|
|
2235
2236
|
"enter-from-class": "mint-date-picker__dropdown-enter-from",
|
|
2236
2237
|
"enter-to-class": "mint-date-picker__dropdown-enter-to",
|
|
@@ -2262,7 +2263,7 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2262
2263
|
"selected-date",
|
|
2263
2264
|
"onPreviousMonth",
|
|
2264
2265
|
"onNextMonth"
|
|
2265
|
-
]), createElementVNode("div", _hoisted_2$
|
|
2266
|
+
]), createElementVNode("div", _hoisted_2$12, [createElementVNode("button", {
|
|
2266
2267
|
type: "button",
|
|
2267
2268
|
class: "mint-date-picker__footer-btn mint-date-picker__today-btn",
|
|
2268
2269
|
onClick: goToToday
|
|
@@ -2408,18 +2409,18 @@ function useTimeUtils() {
|
|
|
2408
2409
|
}
|
|
2409
2410
|
//#endregion
|
|
2410
2411
|
//#region src/components/TimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
2411
|
-
var _hoisted_1$
|
|
2412
|
-
var _hoisted_2$
|
|
2412
|
+
var _hoisted_1$12 = { class: "mint-time-picker__input-wrapper" };
|
|
2413
|
+
var _hoisted_2$11 = [
|
|
2413
2414
|
"value",
|
|
2414
2415
|
"placeholder",
|
|
2415
2416
|
"disabled",
|
|
2416
2417
|
"aria-expanded"
|
|
2417
2418
|
];
|
|
2418
|
-
var _hoisted_3$
|
|
2419
|
+
var _hoisted_3$10 = {
|
|
2419
2420
|
key: 0,
|
|
2420
2421
|
class: "mint-time-picker__dropdown"
|
|
2421
2422
|
};
|
|
2422
|
-
var _hoisted_4$
|
|
2423
|
+
var _hoisted_4$10 = [
|
|
2423
2424
|
"aria-selected",
|
|
2424
2425
|
"aria-disabled",
|
|
2425
2426
|
"onClick"
|
|
@@ -2561,7 +2562,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2561
2562
|
ref: rootRef,
|
|
2562
2563
|
class: "mint-time-picker",
|
|
2563
2564
|
onKeydown: handleKeydown
|
|
2564
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
2565
|
+
}, [createElementVNode("div", _hoisted_1$12, [
|
|
2565
2566
|
createElementVNode("input", {
|
|
2566
2567
|
type: "text",
|
|
2567
2568
|
readonly: "",
|
|
@@ -2578,7 +2579,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2578
2579
|
"aria-haspopup": "listbox",
|
|
2579
2580
|
"aria-expanded": unref(isOpen),
|
|
2580
2581
|
onClick: toggleDropdown
|
|
2581
|
-
}, null, 10, _hoisted_2$
|
|
2582
|
+
}, null, 10, _hoisted_2$11),
|
|
2582
2583
|
__props.clearable && __props.modelValue ? (openBlock(), createElementBlock("button", {
|
|
2583
2584
|
key: 0,
|
|
2584
2585
|
type: "button",
|
|
@@ -2613,7 +2614,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2613
2614
|
"leave-from-class": "mint-time-picker__dropdown-leave-from",
|
|
2614
2615
|
"leave-to-class": "mint-time-picker__dropdown-leave-to"
|
|
2615
2616
|
}, {
|
|
2616
|
-
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2617
|
+
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", _hoisted_3$10, [createElementVNode("ul", {
|
|
2617
2618
|
ref_key: "listRef",
|
|
2618
2619
|
ref: listRef,
|
|
2619
2620
|
class: "mint-time-picker__list",
|
|
@@ -2632,7 +2633,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2632
2633
|
index === highlightedIndex.value && !isSlotDisabled(slot) ? "mint-time-picker__slot--highlighted" : ""
|
|
2633
2634
|
]),
|
|
2634
2635
|
onClick: ($event) => selectSlot(slot)
|
|
2635
|
-
}, toDisplayString(unref(formatTimeSlot)(slot, __props.format)), 11, _hoisted_4$
|
|
2636
|
+
}, toDisplayString(unref(formatTimeSlot)(slot, __props.format)), 11, _hoisted_4$10);
|
|
2636
2637
|
}), 128))], 512)])) : createCommentVNode("", true)]),
|
|
2637
2638
|
_: 1
|
|
2638
2639
|
})], 544);
|
|
@@ -2641,19 +2642,19 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2641
2642
|
});
|
|
2642
2643
|
//#endregion
|
|
2643
2644
|
//#region src/components/TagsInput.vue?vue&type=script&setup=true&lang.ts
|
|
2644
|
-
var _hoisted_1$
|
|
2645
|
+
var _hoisted_1$11 = {
|
|
2645
2646
|
key: 0,
|
|
2646
2647
|
class: "mint-tags-input__categories"
|
|
2647
2648
|
};
|
|
2648
|
-
var _hoisted_2$
|
|
2649
|
-
var _hoisted_3$
|
|
2650
|
-
var _hoisted_4$
|
|
2651
|
-
var _hoisted_5$
|
|
2649
|
+
var _hoisted_2$10 = ["disabled", "onClick"];
|
|
2650
|
+
var _hoisted_3$9 = ["aria-label", "onClick"];
|
|
2651
|
+
var _hoisted_4$9 = ["placeholder", "disabled"];
|
|
2652
|
+
var _hoisted_5$8 = {
|
|
2652
2653
|
key: 0,
|
|
2653
2654
|
class: "mint-tags-input__dropdown"
|
|
2654
2655
|
};
|
|
2655
|
-
var _hoisted_6$
|
|
2656
|
-
var _hoisted_7$
|
|
2656
|
+
var _hoisted_6$8 = ["onMousedown"];
|
|
2657
|
+
var _hoisted_7$8 = {
|
|
2657
2658
|
key: 0,
|
|
2658
2659
|
class: "mint-tags-input__dropdown-count"
|
|
2659
2660
|
};
|
|
@@ -2796,7 +2797,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2796
2797
|
__props.disabled ? "mint-tags-input--disabled" : "",
|
|
2797
2798
|
__props.categories.length ? "mint-tags-input--categorized" : ""
|
|
2798
2799
|
])
|
|
2799
|
-
}, [__props.categories.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2800
|
+
}, [__props.categories.length ? (openBlock(), createElementBlock("div", _hoisted_1$11, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.categories, (cat) => {
|
|
2800
2801
|
return openBlock(), createElementBlock("button", {
|
|
2801
2802
|
key: cat.prefix,
|
|
2802
2803
|
type: "button",
|
|
@@ -2807,7 +2808,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2807
2808
|
]),
|
|
2808
2809
|
disabled: __props.disabled,
|
|
2809
2810
|
onClick: ($event) => setCategory(cat.prefix)
|
|
2810
|
-
}, toDisplayString(cat.name), 11, _hoisted_2$
|
|
2811
|
+
}, toDisplayString(cat.name), 11, _hoisted_2$10);
|
|
2811
2812
|
}), 128))])) : createCommentVNode("", true), createElementVNode("div", {
|
|
2812
2813
|
class: "mint-tags-input__field",
|
|
2813
2814
|
onClick: focusInput
|
|
@@ -2834,7 +2835,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2834
2835
|
"stroke-linecap": "round",
|
|
2835
2836
|
"stroke-linejoin": "round",
|
|
2836
2837
|
viewBox: "0 0 24 24"
|
|
2837
|
-
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])], 8, _hoisted_3$
|
|
2838
|
+
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])], 8, _hoisted_3$9)) : createCommentVNode("", true)], 2);
|
|
2838
2839
|
}), 128)),
|
|
2839
2840
|
withDirectives(createElementVNode("input", {
|
|
2840
2841
|
ref_key: "inputRef",
|
|
@@ -2849,14 +2850,14 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2849
2850
|
onFocus: handleFocus,
|
|
2850
2851
|
onBlur: handleBlur,
|
|
2851
2852
|
onInput: onInputEvent
|
|
2852
|
-
}, null, 42, _hoisted_4$
|
|
2853
|
-
unref(dropdownOpen) && filteredSuggestions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
2853
|
+
}, null, 42, _hoisted_4$9), [[vModelText, inputValue.value]]),
|
|
2854
|
+
unref(dropdownOpen) && filteredSuggestions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$8, [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredSuggestions.value, (sug, i) => {
|
|
2854
2855
|
return openBlock(), createElementBlock("button", {
|
|
2855
2856
|
key: sug.value,
|
|
2856
2857
|
type: "button",
|
|
2857
2858
|
class: normalizeClass(["mint-tags-input__dropdown-item", i === highlightedIndex.value ? "mint-tags-input__dropdown-item--highlighted" : ""]),
|
|
2858
2859
|
onMousedown: withModifiers(($event) => addTag(sug.value), ["prevent"])
|
|
2859
|
-
}, [createElementVNode("span", null, toDisplayString(sug.value), 1), sug.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_7$
|
|
2860
|
+
}, [createElementVNode("span", null, toDisplayString(sug.value), 1), sug.count !== void 0 ? (openBlock(), createElementBlock("span", _hoisted_7$8, toDisplayString(sug.count), 1)) : createCommentVNode("", true)], 42, _hoisted_6$8);
|
|
2860
2861
|
}), 128))])) : createCommentVNode("", true)
|
|
2861
2862
|
])], 2);
|
|
2862
2863
|
};
|
|
@@ -2864,8 +2865,8 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2864
2865
|
});
|
|
2865
2866
|
//#endregion
|
|
2866
2867
|
//#region src/components/NumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
2867
|
-
var _hoisted_1$
|
|
2868
|
-
var _hoisted_2$
|
|
2868
|
+
var _hoisted_1$10 = { class: "mint-number-input__field" };
|
|
2869
|
+
var _hoisted_2$9 = [
|
|
2869
2870
|
"value",
|
|
2870
2871
|
"min",
|
|
2871
2872
|
"max",
|
|
@@ -2873,17 +2874,17 @@ var _hoisted_2$6 = [
|
|
|
2873
2874
|
"disabled",
|
|
2874
2875
|
"placeholder"
|
|
2875
2876
|
];
|
|
2876
|
-
var _hoisted_3$
|
|
2877
|
+
var _hoisted_3$8 = {
|
|
2877
2878
|
key: 0,
|
|
2878
2879
|
class: "mint-number-input__unit"
|
|
2879
2880
|
};
|
|
2880
|
-
var _hoisted_4$
|
|
2881
|
+
var _hoisted_4$8 = {
|
|
2881
2882
|
class: "mint-number-input__steppers",
|
|
2882
2883
|
"aria-hidden": "true"
|
|
2883
2884
|
};
|
|
2884
|
-
var _hoisted_5$
|
|
2885
|
-
var _hoisted_6$
|
|
2886
|
-
var _hoisted_7$
|
|
2885
|
+
var _hoisted_5$7 = ["disabled"];
|
|
2886
|
+
var _hoisted_6$7 = ["disabled"];
|
|
2887
|
+
var _hoisted_7$7 = [
|
|
2887
2888
|
"value",
|
|
2888
2889
|
"min",
|
|
2889
2890
|
"max",
|
|
@@ -2967,7 +2968,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2967
2968
|
isSliderMode.value ? "mint-number-input--slider" : "mint-number-input--stepper",
|
|
2968
2969
|
__props.error ? "mint-number-input--error" : "",
|
|
2969
2970
|
__props.disabled ? "mint-number-input--disabled" : ""
|
|
2970
|
-
]) }, [createElementVNode("div", _hoisted_1$
|
|
2971
|
+
]) }, [createElementVNode("div", _hoisted_1$10, [
|
|
2971
2972
|
createElementVNode("input", {
|
|
2972
2973
|
type: "number",
|
|
2973
2974
|
value: __props.modelValue,
|
|
@@ -2978,9 +2979,9 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2978
2979
|
placeholder: __props.placeholder,
|
|
2979
2980
|
class: normalizeClass(["mint-number-input__input", `mint-number-input__input--${__props.size}`]),
|
|
2980
2981
|
onInput: handleInput
|
|
2981
|
-
}, null, 42, _hoisted_2$
|
|
2982
|
-
__props.unit ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
2983
|
-
createElementVNode("div", _hoisted_4$
|
|
2982
|
+
}, null, 42, _hoisted_2$9),
|
|
2983
|
+
__props.unit ? (openBlock(), createElementBlock("span", _hoisted_3$8, toDisplayString(__props.unit), 1)) : createCommentVNode("", true),
|
|
2984
|
+
createElementVNode("div", _hoisted_4$8, [createElementVNode("button", {
|
|
2984
2985
|
type: "button",
|
|
2985
2986
|
tabindex: "-1",
|
|
2986
2987
|
"aria-label": "Increase value",
|
|
@@ -2994,7 +2995,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2994
2995
|
"stroke-width": "1.5",
|
|
2995
2996
|
"stroke-linecap": "round",
|
|
2996
2997
|
"stroke-linejoin": "round"
|
|
2997
|
-
}, [createElementVNode("path", { d: "M1 5l4-4 4 4" })], -1)])], 8, _hoisted_5$
|
|
2998
|
+
}, [createElementVNode("path", { d: "M1 5l4-4 4 4" })], -1)])], 8, _hoisted_5$7), createElementVNode("button", {
|
|
2998
2999
|
type: "button",
|
|
2999
3000
|
tabindex: "-1",
|
|
3000
3001
|
"aria-label": "Decrease value",
|
|
@@ -3008,7 +3009,7 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
3008
3009
|
"stroke-width": "1.5",
|
|
3009
3010
|
"stroke-linecap": "round",
|
|
3010
3011
|
"stroke-linejoin": "round"
|
|
3011
|
-
}, [createElementVNode("path", { d: "M1 1l4 4 4-4" })], -1)])], 8, _hoisted_6$
|
|
3012
|
+
}, [createElementVNode("path", { d: "M1 1l4 4 4-4" })], -1)])], 8, _hoisted_6$7)])
|
|
3012
3013
|
]), isSliderMode.value ? (openBlock(), createElementBlock("input", {
|
|
3013
3014
|
key: 0,
|
|
3014
3015
|
type: "range",
|
|
@@ -3020,26 +3021,26 @@ var NumberInput_default = /* @__PURE__ */ defineComponent({
|
|
|
3020
3021
|
style: normalizeStyle({ "--mint-slider-fill": `${sliderPercent.value}%` }),
|
|
3021
3022
|
class: "mint-number-input__slider",
|
|
3022
3023
|
onInput: handleSliderInput
|
|
3023
|
-
}, null, 44, _hoisted_7$
|
|
3024
|
+
}, null, 44, _hoisted_7$7)) : createCommentVNode("", true)], 2);
|
|
3024
3025
|
};
|
|
3025
3026
|
}
|
|
3026
3027
|
});
|
|
3027
3028
|
//#endregion
|
|
3028
3029
|
//#region src/components/FileUploader.vue?vue&type=script&setup=true&lang.ts
|
|
3029
|
-
var _hoisted_1$
|
|
3030
|
-
var _hoisted_2$
|
|
3030
|
+
var _hoisted_1$9 = { class: "mint-file-uploader" };
|
|
3031
|
+
var _hoisted_2$8 = [
|
|
3031
3032
|
"aria-label",
|
|
3032
3033
|
"aria-disabled",
|
|
3033
3034
|
"onKeydown"
|
|
3034
3035
|
];
|
|
3035
|
-
var _hoisted_3$
|
|
3036
|
+
var _hoisted_3$7 = [
|
|
3036
3037
|
"accept",
|
|
3037
3038
|
"multiple",
|
|
3038
3039
|
"disabled",
|
|
3039
3040
|
"webkitdirectory"
|
|
3040
3041
|
];
|
|
3041
|
-
var _hoisted_4$
|
|
3042
|
-
var _hoisted_5$
|
|
3042
|
+
var _hoisted_4$7 = { class: "mint-file-uploader__content" };
|
|
3043
|
+
var _hoisted_5$6 = {
|
|
3043
3044
|
key: 0,
|
|
3044
3045
|
class: "mint-file-uploader__icon",
|
|
3045
3046
|
fill: "none",
|
|
@@ -3049,7 +3050,7 @@ var _hoisted_5$4 = {
|
|
|
3049
3050
|
"stroke-linejoin": "round",
|
|
3050
3051
|
viewBox: "0 0 24 24"
|
|
3051
3052
|
};
|
|
3052
|
-
var _hoisted_6$
|
|
3053
|
+
var _hoisted_6$6 = {
|
|
3053
3054
|
key: 1,
|
|
3054
3055
|
class: "mint-file-uploader__icon",
|
|
3055
3056
|
fill: "none",
|
|
@@ -3059,22 +3060,22 @@ var _hoisted_6$4 = {
|
|
|
3059
3060
|
"stroke-linejoin": "round",
|
|
3060
3061
|
viewBox: "0 0 24 24"
|
|
3061
3062
|
};
|
|
3062
|
-
var _hoisted_7$
|
|
3063
|
-
var _hoisted_8$
|
|
3063
|
+
var _hoisted_7$6 = { class: "mint-file-uploader__text" };
|
|
3064
|
+
var _hoisted_8$6 = {
|
|
3064
3065
|
key: 0,
|
|
3065
3066
|
class: "mint-file-uploader__actions"
|
|
3066
3067
|
};
|
|
3067
|
-
var _hoisted_9$
|
|
3068
|
+
var _hoisted_9$3 = {
|
|
3068
3069
|
key: 1,
|
|
3069
3070
|
class: "mint-file-uploader__folder-summary"
|
|
3070
3071
|
};
|
|
3071
|
-
var _hoisted_10$
|
|
3072
|
-
var _hoisted_11$
|
|
3073
|
-
var _hoisted_12$
|
|
3074
|
-
var _hoisted_13$
|
|
3075
|
-
var _hoisted_14$
|
|
3076
|
-
var _hoisted_15$
|
|
3077
|
-
var _hoisted_16$
|
|
3072
|
+
var _hoisted_10$3 = { class: "mint-file-uploader__folder-info" };
|
|
3073
|
+
var _hoisted_11$3 = { class: "mint-file-uploader__folder-details" };
|
|
3074
|
+
var _hoisted_12$3 = { class: "mint-file-uploader__folder-name" };
|
|
3075
|
+
var _hoisted_13$2 = { class: "mint-file-uploader__folder-count" };
|
|
3076
|
+
var _hoisted_14$2 = { class: "mint-file-uploader__file-info" };
|
|
3077
|
+
var _hoisted_15$2 = { class: "mint-file-uploader__file-meta" };
|
|
3078
|
+
var _hoisted_16$2 = { class: "mint-file-uploader__file-name" };
|
|
3078
3079
|
var _hoisted_17$1 = { class: "mint-file-uploader__file-size" };
|
|
3079
3080
|
var _hoisted_18$1 = ["aria-label", "onClick"];
|
|
3080
3081
|
//#endregion
|
|
@@ -3095,7 +3096,11 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3095
3096
|
size: { default: "md" },
|
|
3096
3097
|
mode: { default: "file" }
|
|
3097
3098
|
},
|
|
3098
|
-
emits: [
|
|
3099
|
+
emits: [
|
|
3100
|
+
"upload",
|
|
3101
|
+
"remove",
|
|
3102
|
+
"error"
|
|
3103
|
+
],
|
|
3099
3104
|
setup(__props, { emit: __emit }) {
|
|
3100
3105
|
/** Drag-and-drop file upload zone with type filtering, size validation, and folder mode. */
|
|
3101
3106
|
const props = __props;
|
|
@@ -3241,19 +3246,24 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3241
3246
|
}
|
|
3242
3247
|
return validFiles;
|
|
3243
3248
|
}
|
|
3244
|
-
function handleFiles(files, folder) {
|
|
3249
|
+
function handleFiles(files, folder, explicitRelativePaths) {
|
|
3250
|
+
const candidates = Array.from(files);
|
|
3245
3251
|
const validFiles = validateFiles(files);
|
|
3246
3252
|
if (validFiles.length === 0) return;
|
|
3253
|
+
const relativePaths = validFiles.map((file) => {
|
|
3254
|
+
const candidateIndex = candidates.indexOf(file);
|
|
3255
|
+
return explicitRelativePaths?.[candidateIndex] || file.webkitRelativePath || (folder ? `${folder}/${file.name}` : file.name);
|
|
3256
|
+
});
|
|
3247
3257
|
if (isFolder.value) {
|
|
3248
3258
|
folderName.value = folder || extractFolderName(validFiles);
|
|
3249
3259
|
selectedFiles.value = validFiles;
|
|
3250
|
-
emit("upload", validFiles);
|
|
3260
|
+
emit("upload", validFiles, folderName.value ?? void 0, relativePaths);
|
|
3251
3261
|
} else if (!props.multiple) {
|
|
3252
3262
|
selectedFiles.value = [validFiles[0]];
|
|
3253
|
-
emit("upload", [validFiles[0]]);
|
|
3263
|
+
emit("upload", [validFiles[0]], void 0, [relativePaths[0]]);
|
|
3254
3264
|
} else {
|
|
3255
3265
|
selectedFiles.value = [...selectedFiles.value, ...validFiles];
|
|
3256
|
-
emit("upload", validFiles);
|
|
3266
|
+
emit("upload", validFiles, void 0, relativePaths);
|
|
3257
3267
|
}
|
|
3258
3268
|
}
|
|
3259
3269
|
function extractFolderName(files) {
|
|
@@ -3271,20 +3281,24 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3271
3281
|
}
|
|
3272
3282
|
async function handleFolderDrop(items) {
|
|
3273
3283
|
const files = [];
|
|
3284
|
+
const relativePaths = [];
|
|
3274
3285
|
let folderNameFromDrop;
|
|
3275
3286
|
for (const item of Array.from(items)) {
|
|
3276
3287
|
const entry = item.webkitGetAsEntry?.();
|
|
3277
3288
|
if (entry?.isDirectory) {
|
|
3278
3289
|
folderNameFromDrop = entry.name;
|
|
3279
|
-
await readDirectory(entry, files);
|
|
3290
|
+
await readDirectory(entry, files, relativePaths, entry.name);
|
|
3280
3291
|
} else if (entry?.isFile) {
|
|
3281
3292
|
const file = await getFile(entry);
|
|
3282
|
-
if (file)
|
|
3293
|
+
if (file) {
|
|
3294
|
+
files.push(file);
|
|
3295
|
+
relativePaths.push(file.name);
|
|
3296
|
+
}
|
|
3283
3297
|
}
|
|
3284
3298
|
}
|
|
3285
|
-
if (files.length > 0) handleFiles(files, folderNameFromDrop);
|
|
3299
|
+
if (files.length > 0) handleFiles(files, folderNameFromDrop, relativePaths);
|
|
3286
3300
|
}
|
|
3287
|
-
async function readDirectory(directory, files) {
|
|
3301
|
+
async function readDirectory(directory, files, relativePaths, prefix) {
|
|
3288
3302
|
const reader = directory.createReader();
|
|
3289
3303
|
let batch;
|
|
3290
3304
|
do {
|
|
@@ -3293,8 +3307,11 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3293
3307
|
});
|
|
3294
3308
|
for (const entry of batch) if (entry.isFile) {
|
|
3295
3309
|
const file = await getFile(entry);
|
|
3296
|
-
if (file)
|
|
3297
|
-
|
|
3310
|
+
if (file) {
|
|
3311
|
+
files.push(file);
|
|
3312
|
+
relativePaths.push(`${prefix}/${file.name}`);
|
|
3313
|
+
}
|
|
3314
|
+
} else if (entry.isDirectory) await readDirectory(entry, files, relativePaths, `${prefix}/${entry.name}`);
|
|
3298
3315
|
} while (batch.length > 0);
|
|
3299
3316
|
}
|
|
3300
3317
|
function getFile(entry) {
|
|
@@ -3318,12 +3335,16 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3318
3335
|
if (!props.disabled) inputRef.value?.click();
|
|
3319
3336
|
}
|
|
3320
3337
|
function removeFile(index) {
|
|
3338
|
+
const removed = selectedFiles.value[index];
|
|
3321
3339
|
selectedFiles.value = selectedFiles.value.filter((_, i) => i !== index);
|
|
3322
3340
|
if (isFolder.value && selectedFiles.value.length === 0) folderName.value = null;
|
|
3341
|
+
if (removed) emit("remove", [removed]);
|
|
3323
3342
|
}
|
|
3324
3343
|
function clearAll() {
|
|
3344
|
+
const removed = [...selectedFiles.value];
|
|
3325
3345
|
selectedFiles.value = [];
|
|
3326
3346
|
folderName.value = null;
|
|
3347
|
+
if (removed.length) emit("remove", removed);
|
|
3327
3348
|
}
|
|
3328
3349
|
function formatFileSize(bytes) {
|
|
3329
3350
|
if (bytes >= 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
@@ -3331,7 +3352,7 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3331
3352
|
return `${bytes} bytes`;
|
|
3332
3353
|
}
|
|
3333
3354
|
return (_ctx, _cache) => {
|
|
3334
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3355
|
+
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
3335
3356
|
createElementVNode("div", {
|
|
3336
3357
|
role: "button",
|
|
3337
3358
|
tabindex: "0",
|
|
@@ -3359,13 +3380,13 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3359
3380
|
webkitdirectory: isFolder.value || void 0,
|
|
3360
3381
|
class: "mint-file-uploader__input",
|
|
3361
3382
|
onChange: handleInputChange
|
|
3362
|
-
}, null, 40, _hoisted_3$
|
|
3383
|
+
}, null, 40, _hoisted_3$7), createElementVNode("div", _hoisted_4$7, [isFolder.value ? (openBlock(), createElementBlock("svg", _hoisted_5$6, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_6$6, [..._cache[1] || (_cache[1] = [
|
|
3363
3384
|
createElementVNode("path", { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" }, null, -1),
|
|
3364
3385
|
createElementVNode("path", { d: "m16 16-4-4-4 4" }, null, -1),
|
|
3365
3386
|
createElementVNode("path", { d: "M12 12v9" }, null, -1)
|
|
3366
|
-
])])), createElementVNode("p", _hoisted_7$
|
|
3367
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
3368
|
-
isFolder.value && folderName.value && selectedFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
3387
|
+
])])), createElementVNode("p", _hoisted_7$6, " Drop " + toDisplayString(acceptLabel.value) + " or click ", 1)])], 42, _hoisted_2$8),
|
|
3388
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_8$6, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true),
|
|
3389
|
+
isFolder.value && folderName.value && selectedFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$3, [createElementVNode("div", _hoisted_10$3, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "mint-file-uploader__folder-icon-wrapper" }, [createElementVNode("svg", {
|
|
3369
3390
|
class: "mint-file-uploader__folder-icon",
|
|
3370
3391
|
fill: "none",
|
|
3371
3392
|
stroke: "currentColor",
|
|
@@ -3373,7 +3394,7 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3373
3394
|
"stroke-linecap": "round",
|
|
3374
3395
|
"stroke-linejoin": "round",
|
|
3375
3396
|
viewBox: "0 0 24 24"
|
|
3376
|
-
}, [createElementVNode("path", { d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" })])], -1)), createElementVNode("div", _hoisted_11$
|
|
3397
|
+
}, [createElementVNode("path", { d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" })])], -1)), createElementVNode("div", _hoisted_11$3, [createElementVNode("span", _hoisted_12$3, toDisplayString(folderName.value), 1), createElementVNode("span", _hoisted_13$2, toDisplayString(selectedFiles.value.length) + " file" + toDisplayString(selectedFiles.value.length !== 1 ? "s" : ""), 1)])]), createElementVNode("button", {
|
|
3377
3398
|
type: "button",
|
|
3378
3399
|
"aria-label": "Clear folder",
|
|
3379
3400
|
class: "mint-file-uploader__remove-btn",
|
|
@@ -3397,10 +3418,10 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3397
3418
|
return openBlock(), createElementBlock("li", {
|
|
3398
3419
|
key: `${file.name}-${file.size}-${index}`,
|
|
3399
3420
|
class: "mint-file-uploader__file"
|
|
3400
|
-
}, [createElementVNode("div", _hoisted_14$
|
|
3421
|
+
}, [createElementVNode("div", _hoisted_14$2, [createElementVNode("span", {
|
|
3401
3422
|
class: "mint-file-uploader__file-badge",
|
|
3402
3423
|
style: normalizeStyle({ "--badge-color": getFileType(file.name).color })
|
|
3403
|
-
}, toDisplayString(getFileType(file.name).label), 5), createElementVNode("div", _hoisted_15$
|
|
3424
|
+
}, toDisplayString(getFileType(file.name).label), 5), createElementVNode("div", _hoisted_15$2, [createElementVNode("span", _hoisted_16$2, toDisplayString(file.name), 1), createElementVNode("span", _hoisted_17$1, toDisplayString(formatFileSize(file.size)), 1)])]), createElementVNode("button", {
|
|
3404
3425
|
type: "button",
|
|
3405
3426
|
"aria-label": `Remove ${file.name}`,
|
|
3406
3427
|
class: "mint-file-uploader__remove-btn",
|
|
@@ -3422,25 +3443,152 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3422
3443
|
}
|
|
3423
3444
|
});
|
|
3424
3445
|
//#endregion
|
|
3446
|
+
//#region src/components/AlertBox.vue?vue&type=script&setup=true&lang.ts
|
|
3447
|
+
var _hoisted_1$8 = {
|
|
3448
|
+
key: 0,
|
|
3449
|
+
class: "mint-alert__icon mint-alert__icon--success",
|
|
3450
|
+
viewBox: "0 0 24 24",
|
|
3451
|
+
fill: "none",
|
|
3452
|
+
stroke: "currentColor",
|
|
3453
|
+
"stroke-width": "2",
|
|
3454
|
+
"stroke-linecap": "round",
|
|
3455
|
+
"stroke-linejoin": "round"
|
|
3456
|
+
};
|
|
3457
|
+
var _hoisted_2$7 = {
|
|
3458
|
+
key: 1,
|
|
3459
|
+
class: "mint-alert__icon mint-alert__icon--error",
|
|
3460
|
+
viewBox: "0 0 24 24",
|
|
3461
|
+
fill: "none",
|
|
3462
|
+
stroke: "currentColor",
|
|
3463
|
+
"stroke-width": "2",
|
|
3464
|
+
"stroke-linecap": "round",
|
|
3465
|
+
"stroke-linejoin": "round"
|
|
3466
|
+
};
|
|
3467
|
+
var _hoisted_3$6 = {
|
|
3468
|
+
key: 2,
|
|
3469
|
+
class: "mint-alert__icon mint-alert__icon--warning",
|
|
3470
|
+
viewBox: "0 0 24 24",
|
|
3471
|
+
fill: "none",
|
|
3472
|
+
stroke: "currentColor",
|
|
3473
|
+
"stroke-width": "2",
|
|
3474
|
+
"stroke-linecap": "round",
|
|
3475
|
+
"stroke-linejoin": "round"
|
|
3476
|
+
};
|
|
3477
|
+
var _hoisted_4$6 = {
|
|
3478
|
+
key: 3,
|
|
3479
|
+
class: "mint-alert__icon mint-alert__icon--info",
|
|
3480
|
+
viewBox: "0 0 24 24",
|
|
3481
|
+
fill: "none",
|
|
3482
|
+
stroke: "currentColor",
|
|
3483
|
+
"stroke-width": "2",
|
|
3484
|
+
"stroke-linecap": "round",
|
|
3485
|
+
"stroke-linejoin": "round"
|
|
3486
|
+
};
|
|
3487
|
+
var _hoisted_5$5 = { class: "mint-alert__content" };
|
|
3488
|
+
var _hoisted_6$5 = {
|
|
3489
|
+
key: 0,
|
|
3490
|
+
class: "mint-alert__title"
|
|
3491
|
+
};
|
|
3492
|
+
var _hoisted_7$5 = { class: "mint-alert__message" };
|
|
3493
|
+
var _hoisted_8$5 = {
|
|
3494
|
+
key: 4,
|
|
3495
|
+
class: "mint-alert__actions"
|
|
3496
|
+
};
|
|
3497
|
+
//#endregion
|
|
3498
|
+
//#region src/components/AlertBox.vue
|
|
3499
|
+
var AlertBox_default = /* @__PURE__ */ defineComponent({
|
|
3500
|
+
__name: "AlertBox",
|
|
3501
|
+
props: {
|
|
3502
|
+
type: { default: "info" },
|
|
3503
|
+
title: {},
|
|
3504
|
+
dismissible: {
|
|
3505
|
+
type: Boolean,
|
|
3506
|
+
default: false
|
|
3507
|
+
},
|
|
3508
|
+
actionLabel: {}
|
|
3509
|
+
},
|
|
3510
|
+
emits: ["dismiss", "action"],
|
|
3511
|
+
setup(__props, { emit: __emit }) {
|
|
3512
|
+
/** Inline alert banner with semantic icon, title, message slot, optional action button, and optional dismiss button. */
|
|
3513
|
+
const props = __props;
|
|
3514
|
+
const emit = __emit;
|
|
3515
|
+
const slots = useSlots();
|
|
3516
|
+
const hasActions = () => !!props.actionLabel || !!slots.actions;
|
|
3517
|
+
return (_ctx, _cache) => {
|
|
3518
|
+
return openBlock(), createElementBlock("div", {
|
|
3519
|
+
class: normalizeClass(["mint-alert", `mint-alert--${props.type}`]),
|
|
3520
|
+
role: "alert"
|
|
3521
|
+
}, [
|
|
3522
|
+
props.type === "success" ? (openBlock(), createElementBlock("svg", _hoisted_1$8, [..._cache[2] || (_cache[2] = [createElementVNode("circle", {
|
|
3523
|
+
cx: "12",
|
|
3524
|
+
cy: "12",
|
|
3525
|
+
r: "10"
|
|
3526
|
+
}, null, -1), createElementVNode("path", { d: "m9 12 2 2 4-4" }, null, -1)])])) : props.type === "error" ? (openBlock(), createElementBlock("svg", _hoisted_2$7, [..._cache[3] || (_cache[3] = [
|
|
3527
|
+
createElementVNode("circle", {
|
|
3528
|
+
cx: "12",
|
|
3529
|
+
cy: "12",
|
|
3530
|
+
r: "10"
|
|
3531
|
+
}, null, -1),
|
|
3532
|
+
createElementVNode("path", { d: "m15 9-6 6" }, null, -1),
|
|
3533
|
+
createElementVNode("path", { d: "m9 9 6 6" }, null, -1)
|
|
3534
|
+
])])) : props.type === "warning" ? (openBlock(), createElementBlock("svg", _hoisted_3$6, [..._cache[4] || (_cache[4] = [
|
|
3535
|
+
createElementVNode("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }, null, -1),
|
|
3536
|
+
createElementVNode("path", { d: "M12 9v4" }, null, -1),
|
|
3537
|
+
createElementVNode("path", { d: "M12 17h.01" }, null, -1)
|
|
3538
|
+
])])) : (openBlock(), createElementBlock("svg", _hoisted_4$6, [..._cache[5] || (_cache[5] = [
|
|
3539
|
+
createElementVNode("circle", {
|
|
3540
|
+
cx: "12",
|
|
3541
|
+
cy: "12",
|
|
3542
|
+
r: "10"
|
|
3543
|
+
}, null, -1),
|
|
3544
|
+
createElementVNode("path", { d: "M12 16v-4" }, null, -1),
|
|
3545
|
+
createElementVNode("path", { d: "M12 8h.01" }, null, -1)
|
|
3546
|
+
])])),
|
|
3547
|
+
createElementVNode("div", _hoisted_5$5, [props.title ? (openBlock(), createElementBlock("h4", _hoisted_6$5, toDisplayString(props.title), 1)) : createCommentVNode("", true), createElementVNode("div", _hoisted_7$5, [renderSlot(_ctx.$slots, "default")])]),
|
|
3548
|
+
hasActions() ? (openBlock(), createElementBlock("div", _hoisted_8$5, [renderSlot(_ctx.$slots, "actions", {}, () => [createElementVNode("button", {
|
|
3549
|
+
type: "button",
|
|
3550
|
+
class: normalizeClass(["mint-alert__action-btn", `mint-alert__action-btn--${props.type}`]),
|
|
3551
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("action"))
|
|
3552
|
+
}, toDisplayString(props.actionLabel), 3)])])) : createCommentVNode("", true),
|
|
3553
|
+
props.dismissible ? (openBlock(), createElementBlock("button", {
|
|
3554
|
+
key: 5,
|
|
3555
|
+
type: "button",
|
|
3556
|
+
class: "mint-alert__dismiss",
|
|
3557
|
+
"aria-label": "Dismiss",
|
|
3558
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("dismiss"))
|
|
3559
|
+
}, [..._cache[6] || (_cache[6] = [createElementVNode("svg", {
|
|
3560
|
+
class: "mint-alert__dismiss-icon",
|
|
3561
|
+
viewBox: "0 0 24 24",
|
|
3562
|
+
fill: "none",
|
|
3563
|
+
stroke: "currentColor",
|
|
3564
|
+
"stroke-width": "2",
|
|
3565
|
+
"stroke-linecap": "round",
|
|
3566
|
+
"stroke-linejoin": "round"
|
|
3567
|
+
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])])) : createCommentVNode("", true)
|
|
3568
|
+
], 2);
|
|
3569
|
+
};
|
|
3570
|
+
}
|
|
3571
|
+
});
|
|
3572
|
+
//#endregion
|
|
3425
3573
|
//#region src/components/DateTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
3426
|
-
var _hoisted_1$
|
|
3427
|
-
var _hoisted_2$
|
|
3574
|
+
var _hoisted_1$7 = { class: "mint-datetime-picker__input-wrapper" };
|
|
3575
|
+
var _hoisted_2$6 = [
|
|
3428
3576
|
"value",
|
|
3429
3577
|
"placeholder",
|
|
3430
3578
|
"disabled"
|
|
3431
3579
|
];
|
|
3432
|
-
var _hoisted_3$
|
|
3580
|
+
var _hoisted_3$5 = {
|
|
3433
3581
|
key: 0,
|
|
3434
3582
|
class: "mint-datetime-picker__dropdown",
|
|
3435
3583
|
role: "dialog",
|
|
3436
3584
|
"aria-modal": "true",
|
|
3437
3585
|
"aria-label": "Date and time picker"
|
|
3438
3586
|
};
|
|
3439
|
-
var _hoisted_4$
|
|
3440
|
-
var _hoisted_5$
|
|
3441
|
-
var _hoisted_6$
|
|
3442
|
-
var _hoisted_7$
|
|
3443
|
-
var _hoisted_8$
|
|
3587
|
+
var _hoisted_4$5 = { class: "mint-datetime-picker__calendar-section" };
|
|
3588
|
+
var _hoisted_5$4 = { class: "mint-datetime-picker__time-section" };
|
|
3589
|
+
var _hoisted_6$4 = { class: "mint-datetime-picker__time-grid" };
|
|
3590
|
+
var _hoisted_7$4 = ["disabled", "onClick"];
|
|
3591
|
+
var _hoisted_8$4 = { class: "mint-datetime-picker__footer" };
|
|
3444
3592
|
//#endregion
|
|
3445
3593
|
//#region src/components/DateTimePicker.vue
|
|
3446
3594
|
var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -3561,7 +3709,7 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3561
3709
|
ref_key: "rootRef",
|
|
3562
3710
|
ref: rootRef,
|
|
3563
3711
|
class: "mint-datetime-picker"
|
|
3564
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
3712
|
+
}, [createElementVNode("div", _hoisted_1$7, [
|
|
3565
3713
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "mint-datetime-picker__icon-calendar" }, [createElementVNode("svg", {
|
|
3566
3714
|
fill: "none",
|
|
3567
3715
|
stroke: "currentColor",
|
|
@@ -3586,7 +3734,7 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3586
3734
|
]),
|
|
3587
3735
|
"aria-label": "Select date and time",
|
|
3588
3736
|
onClick: toggleDropdown
|
|
3589
|
-
}, null, 10, _hoisted_2$
|
|
3737
|
+
}, null, 10, _hoisted_2$6),
|
|
3590
3738
|
_cache[1] || (_cache[1] = createElementVNode("div", { class: "mint-datetime-picker__icon-clock" }, [createElementVNode("svg", {
|
|
3591
3739
|
fill: "none",
|
|
3592
3740
|
stroke: "currentColor",
|
|
@@ -3605,8 +3753,8 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3605
3753
|
"leave-from-class": "mint-datetime-picker__dropdown-leave-from",
|
|
3606
3754
|
"leave-to-class": "mint-datetime-picker__dropdown-leave-to"
|
|
3607
3755
|
}, {
|
|
3608
|
-
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
3609
|
-
createElementVNode("div", _hoisted_4$
|
|
3756
|
+
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
3757
|
+
createElementVNode("div", _hoisted_4$5, [createVNode(CalendarGridPanelInternal_default, {
|
|
3610
3758
|
"week-days": unref(weekDays),
|
|
3611
3759
|
"month-year": unref(monthYear),
|
|
3612
3760
|
days: unref(calendarDays),
|
|
@@ -3625,7 +3773,7 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3625
3773
|
"onNextMonth"
|
|
3626
3774
|
])]),
|
|
3627
3775
|
_cache[3] || (_cache[3] = createElementVNode("div", { class: "mint-datetime-picker__divider" }, null, -1)),
|
|
3628
|
-
createElementVNode("div", _hoisted_5$
|
|
3776
|
+
createElementVNode("div", _hoisted_5$4, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "mint-datetime-picker__time-label" }, "Time", -1)), createElementVNode("div", _hoisted_6$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(timeSlots.value, (time) => {
|
|
3629
3777
|
return openBlock(), createElementBlock("button", {
|
|
3630
3778
|
key: time,
|
|
3631
3779
|
type: "button",
|
|
@@ -3636,9 +3784,9 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3636
3784
|
isTimeDisabled(time) ? "mint-datetime-picker__time-chip--disabled" : ""
|
|
3637
3785
|
]),
|
|
3638
3786
|
onClick: ($event) => selectTime(time)
|
|
3639
|
-
}, toDisplayString(unref(formatTimeSlot)(time, __props.timeFormat)), 11, _hoisted_7$
|
|
3787
|
+
}, toDisplayString(unref(formatTimeSlot)(time, __props.timeFormat)), 11, _hoisted_7$4);
|
|
3640
3788
|
}), 128))])]),
|
|
3641
|
-
createElementVNode("div", _hoisted_8$
|
|
3789
|
+
createElementVNode("div", _hoisted_8$4, [createElementVNode("div", null, [createElementVNode("button", {
|
|
3642
3790
|
type: "button",
|
|
3643
3791
|
class: "mint-datetime-picker__footer-btn",
|
|
3644
3792
|
onClick: goToToday
|
|
@@ -3659,6 +3807,1534 @@ var DateTimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
3659
3807
|
}
|
|
3660
3808
|
});
|
|
3661
3809
|
//#endregion
|
|
3810
|
+
//#region src/jobs.ts
|
|
3811
|
+
var ACTIVE_JOB_STATUSES = new Set([
|
|
3812
|
+
"awaiting_input",
|
|
3813
|
+
"queued",
|
|
3814
|
+
"running"
|
|
3815
|
+
]);
|
|
3816
|
+
var TERMINAL_JOB_STATUSES = new Set([
|
|
3817
|
+
"completed",
|
|
3818
|
+
"failed",
|
|
3819
|
+
"cancelled"
|
|
3820
|
+
]);
|
|
3821
|
+
/** Resolve action support while retaining one-cycle legacy status inference. */
|
|
3822
|
+
function resolveJobCapabilities(job) {
|
|
3823
|
+
const legacyCanCancel = job.status === "queued" || job.status === "running";
|
|
3824
|
+
const legacyCanDelete = TERMINAL_JOB_STATUSES.has(job.status);
|
|
3825
|
+
return {
|
|
3826
|
+
can_cancel: typeof job.can_cancel === "boolean" ? job.can_cancel : legacyCanCancel,
|
|
3827
|
+
can_delete: typeof job.can_delete === "boolean" ? job.can_delete : legacyCanDelete
|
|
3828
|
+
};
|
|
3829
|
+
}
|
|
3830
|
+
/** Clamp invalid or out-of-range progress values for safe display. */
|
|
3831
|
+
function normalizeJobPercent(value) {
|
|
3832
|
+
if (!Number.isFinite(value)) return 0;
|
|
3833
|
+
return Math.min(100, Math.max(0, value));
|
|
3834
|
+
}
|
|
3835
|
+
/** Create a detached canonical state without changing the transport input. */
|
|
3836
|
+
function normalizeJobState(job) {
|
|
3837
|
+
const capabilities = resolveJobCapabilities(job);
|
|
3838
|
+
return {
|
|
3839
|
+
...job,
|
|
3840
|
+
definition_id: job.definition_id ?? (typeof job.metadata.definition_id === "string" ? job.metadata.definition_id : null),
|
|
3841
|
+
result_status: job.result_status ?? (job.status === "completed" && job.metadata.has_result === true ? "available" : "none"),
|
|
3842
|
+
result_expires_at: job.result_expires_at ?? null,
|
|
3843
|
+
progress: {
|
|
3844
|
+
...job.progress,
|
|
3845
|
+
percent: normalizeJobPercent(job.progress.percent)
|
|
3846
|
+
},
|
|
3847
|
+
warnings: [...job.warnings],
|
|
3848
|
+
folders: [...job.folders],
|
|
3849
|
+
metadata: { ...job.metadata },
|
|
3850
|
+
...capabilities
|
|
3851
|
+
};
|
|
3852
|
+
}
|
|
3853
|
+
function isActiveJobStatus(status) {
|
|
3854
|
+
return ACTIVE_JOB_STATUSES.has(status);
|
|
3855
|
+
}
|
|
3856
|
+
function isTerminalJobStatus(status) {
|
|
3857
|
+
return TERMINAL_JOB_STATUSES.has(status);
|
|
3858
|
+
}
|
|
3859
|
+
function jobStatusLabel(status) {
|
|
3860
|
+
return {
|
|
3861
|
+
awaiting_input: "Waiting for input",
|
|
3862
|
+
queued: "Queued",
|
|
3863
|
+
running: "Running",
|
|
3864
|
+
completed: "Completed",
|
|
3865
|
+
failed: "Failed",
|
|
3866
|
+
cancelled: "Cancelled"
|
|
3867
|
+
}[status];
|
|
3868
|
+
}
|
|
3869
|
+
//#endregion
|
|
3870
|
+
//#region src/composables/useGeneratedAnalysis.ts
|
|
3871
|
+
var ACTIVE_STATUSES = new Set([
|
|
3872
|
+
"awaiting_input",
|
|
3873
|
+
"queued",
|
|
3874
|
+
"running"
|
|
3875
|
+
]);
|
|
3876
|
+
var AUTH_TOKEN_KEY = "mint-auth-token";
|
|
3877
|
+
var SESSION_NOT_FOUND_DETAIL = "Session not found";
|
|
3878
|
+
var MAX_RESULT_CACHE_ENTRIES = 32;
|
|
3879
|
+
var MAX_RESULT_RETRIES = 3;
|
|
3880
|
+
var DOWNLOAD_URL_REFRESH_SKEW_MS = 3e4;
|
|
3881
|
+
var GeneratedAnalysisRequestError = class extends Error {
|
|
3882
|
+
constructor(status, detail) {
|
|
3883
|
+
super(typeof detail === "string" ? detail : `Request failed (${status})`);
|
|
3884
|
+
this.status = status;
|
|
3885
|
+
this.detail = detail;
|
|
3886
|
+
this.name = "GeneratedAnalysisRequestError";
|
|
3887
|
+
}
|
|
3888
|
+
};
|
|
3889
|
+
function createGeneratedAnalysisTransport(options = {}) {
|
|
3890
|
+
const fetcher = options.fetcher ?? globalThis.fetch.bind(globalThis);
|
|
3891
|
+
const getAccessToken = options.getAccessToken ?? readStoredAccessToken;
|
|
3892
|
+
return async (input, init = {}) => {
|
|
3893
|
+
const headers = new Headers(init.headers);
|
|
3894
|
+
const accessToken = getAccessToken();
|
|
3895
|
+
if (accessToken && !headers.has("Authorization")) headers.set("Authorization", `Bearer ${accessToken}`);
|
|
3896
|
+
return await fetcher(input, {
|
|
3897
|
+
credentials: "same-origin",
|
|
3898
|
+
...init,
|
|
3899
|
+
headers
|
|
3900
|
+
});
|
|
3901
|
+
};
|
|
3902
|
+
}
|
|
3903
|
+
function useGeneratedAnalysis(options) {
|
|
3904
|
+
return createPluginJobs(options, "/generated/manifest");
|
|
3905
|
+
}
|
|
3906
|
+
function usePluginJobs(options) {
|
|
3907
|
+
return createPluginJobs(options);
|
|
3908
|
+
}
|
|
3909
|
+
function createPluginJobs(options, manifestPath) {
|
|
3910
|
+
const baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
3911
|
+
const transport = options.transport ?? createGeneratedAnalysisTransport();
|
|
3912
|
+
const storage = createGeneratedSessionStorage(options.storage);
|
|
3913
|
+
const createId = options.createId ?? (() => globalThis.crypto.randomUUID());
|
|
3914
|
+
const pollInterval = options.pollInterval ?? 750;
|
|
3915
|
+
const streamEnabled = options.stream ?? true;
|
|
3916
|
+
const streamReconnectDelay = options.streamReconnectDelay ?? 1500;
|
|
3917
|
+
const tabKey = `mint:generated:${baseUrl}:tab`;
|
|
3918
|
+
const sessionKey = `mint:generated:${baseUrl}:session`;
|
|
3919
|
+
const manifest = shallowRef(null);
|
|
3920
|
+
const session = shallowRef(null);
|
|
3921
|
+
const jobs = shallowRef([]);
|
|
3922
|
+
const jobRevisions = /* @__PURE__ */ new Map();
|
|
3923
|
+
const pendingJobOperations = /* @__PURE__ */ new Map();
|
|
3924
|
+
const resultCache = shallowRef({});
|
|
3925
|
+
const isLoading = ref(false);
|
|
3926
|
+
const isSubmitting = ref(false);
|
|
3927
|
+
const error = shallowRef(null);
|
|
3928
|
+
const status = shallowRef("idle");
|
|
3929
|
+
let pollTimer;
|
|
3930
|
+
let streamReconnectTimer;
|
|
3931
|
+
let streamController;
|
|
3932
|
+
let streamConnected = false;
|
|
3933
|
+
let streamConnecting = false;
|
|
3934
|
+
let disposed = false;
|
|
3935
|
+
let paused = false;
|
|
3936
|
+
let initialized = false;
|
|
3937
|
+
let initializePromise;
|
|
3938
|
+
let refreshPromise;
|
|
3939
|
+
let initializeRefreshPromise;
|
|
3940
|
+
let jobsRevision = 0;
|
|
3941
|
+
let resultCacheOrder = [];
|
|
3942
|
+
const resultRequests = /* @__PURE__ */ new Map();
|
|
3943
|
+
const jobWaiters = /* @__PURE__ */ new Map();
|
|
3944
|
+
const resultRetryAttempts = /* @__PURE__ */ new Map();
|
|
3945
|
+
const resultRetryTimers = /* @__PURE__ */ new Map();
|
|
3946
|
+
const downloadRefreshTimers = /* @__PURE__ */ new Map();
|
|
3947
|
+
const latestResult = computed(() => {
|
|
3948
|
+
const job = currentCompletedJob();
|
|
3949
|
+
return job ? resultForJob(job.job_id) : null;
|
|
3950
|
+
});
|
|
3951
|
+
function initialize() {
|
|
3952
|
+
if (disposed) return Promise.reject(/* @__PURE__ */ new Error("Plugin jobs runtime is disposed"));
|
|
3953
|
+
if (initialized) return Promise.resolve();
|
|
3954
|
+
if (initializePromise) return initializePromise;
|
|
3955
|
+
isLoading.value = true;
|
|
3956
|
+
error.value = null;
|
|
3957
|
+
status.value = "initializing";
|
|
3958
|
+
const pending = (async () => {
|
|
3959
|
+
if (manifestPath) {
|
|
3960
|
+
const loadedManifest = await request(manifestPath, { method: "GET" });
|
|
3961
|
+
if (!disposed) manifest.value = loadedManifest;
|
|
3962
|
+
}
|
|
3963
|
+
const resolvedSession = await resolveSession();
|
|
3964
|
+
if (disposed) return;
|
|
3965
|
+
session.value = resolvedSession;
|
|
3966
|
+
await refreshJobs();
|
|
3967
|
+
if (disposed) return;
|
|
3968
|
+
initialized = true;
|
|
3969
|
+
status.value = paused ? "paused" : "ready";
|
|
3970
|
+
if (streamEnabled && !paused) connectJobStream();
|
|
3971
|
+
})().catch((cause) => {
|
|
3972
|
+
if (!disposed) {
|
|
3973
|
+
error.value = errorMessage(cause, "Failed to initialize generated analysis");
|
|
3974
|
+
status.value = "error";
|
|
3975
|
+
}
|
|
3976
|
+
throw cause;
|
|
3977
|
+
}).finally(() => {
|
|
3978
|
+
if (initializePromise === pending) initializePromise = void 0;
|
|
3979
|
+
if (!disposed) isLoading.value = false;
|
|
3980
|
+
});
|
|
3981
|
+
initializePromise = pending;
|
|
3982
|
+
return pending;
|
|
3983
|
+
}
|
|
3984
|
+
async function resolveSession() {
|
|
3985
|
+
let tabId = storage.getItem(tabKey);
|
|
3986
|
+
if (!tabId) {
|
|
3987
|
+
tabId = createId();
|
|
3988
|
+
storage.setItem(tabKey, tabId);
|
|
3989
|
+
}
|
|
3990
|
+
const storedSessionId = storage.getItem(sessionKey);
|
|
3991
|
+
const existing = (await request("/jobs/sessions", { method: "GET" })).sessions.find((candidate) => candidate.id === storedSessionId && candidate.tab_id === tabId);
|
|
3992
|
+
if (existing) return existing;
|
|
3993
|
+
const created = await request("/jobs/sessions", {
|
|
3994
|
+
method: "POST",
|
|
3995
|
+
body: JSON.stringify({ tab_id: tabId })
|
|
3996
|
+
});
|
|
3997
|
+
storage.setItem(sessionKey, created.id);
|
|
3998
|
+
return created;
|
|
3999
|
+
}
|
|
4000
|
+
async function submit(definitionId, inputs) {
|
|
4001
|
+
if (!session.value) throw new Error("Generated analysis session is not initialized");
|
|
4002
|
+
const clientRequestId = createId();
|
|
4003
|
+
isSubmitting.value = true;
|
|
4004
|
+
error.value = null;
|
|
4005
|
+
try {
|
|
4006
|
+
let jobInput;
|
|
4007
|
+
try {
|
|
4008
|
+
jobInput = await submitToSession(session.value.id, clientRequestId, await stagePathInputs(inputs, session.value.id));
|
|
4009
|
+
} catch (cause) {
|
|
4010
|
+
if (!isSessionNotFoundError(cause)) throw cause;
|
|
4011
|
+
session.value = await resolveSession();
|
|
4012
|
+
jobInput = await submitToSession(session.value.id, clientRequestId, await stagePathInputs(inputs, session.value.id));
|
|
4013
|
+
}
|
|
4014
|
+
const job = upsertJob(jobInput, definitionId);
|
|
4015
|
+
if (!streamConnected) schedulePoll();
|
|
4016
|
+
return job;
|
|
4017
|
+
} catch (cause) {
|
|
4018
|
+
error.value = errorMessage(cause, "Failed to submit analysis");
|
|
4019
|
+
throw cause;
|
|
4020
|
+
} finally {
|
|
4021
|
+
isSubmitting.value = false;
|
|
4022
|
+
}
|
|
4023
|
+
function submitToSession(sessionId, requestId, stagedInputs) {
|
|
4024
|
+
return request("/jobs", {
|
|
4025
|
+
method: "POST",
|
|
4026
|
+
body: JSON.stringify({
|
|
4027
|
+
definition_id: definitionId,
|
|
4028
|
+
inputs: stagedInputs,
|
|
4029
|
+
session_id: sessionId,
|
|
4030
|
+
client_request_id: requestId
|
|
4031
|
+
})
|
|
4032
|
+
});
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
async function uploadPath(input) {
|
|
4036
|
+
if (!session.value) throw new Error("Generated analysis session is not initialized");
|
|
4037
|
+
return uploadPathForSession(input, session.value.id);
|
|
4038
|
+
}
|
|
4039
|
+
async function uploadStagedPart(input) {
|
|
4040
|
+
const jobId = jobIdFromReference(input.job);
|
|
4041
|
+
const body = new FormData();
|
|
4042
|
+
body.append("file", input.file);
|
|
4043
|
+
body.append("metadata", JSON.stringify(input.metadata));
|
|
4044
|
+
if (input.expectedSize !== void 0) body.append("expected_size", String(input.expectedSize));
|
|
4045
|
+
if (input.expectedSha256 !== void 0) body.append("expected_sha256", input.expectedSha256);
|
|
4046
|
+
return request(`/jobs/${encodeURIComponent(jobId)}/parts/${encodeStagedPartKey(input.key)}`, {
|
|
4047
|
+
method: "PUT",
|
|
4048
|
+
body,
|
|
4049
|
+
signal: input.signal
|
|
4050
|
+
});
|
|
4051
|
+
}
|
|
4052
|
+
function getJobStaging(job, pagination = {}) {
|
|
4053
|
+
const jobId = jobIdFromReference(job);
|
|
4054
|
+
const query = new URLSearchParams();
|
|
4055
|
+
if (pagination.offset !== void 0) query.set("offset", String(pagination.offset));
|
|
4056
|
+
if (pagination.limit !== void 0) query.set("limit", String(pagination.limit));
|
|
4057
|
+
const suffix = query.size > 0 ? `?${query}` : "";
|
|
4058
|
+
return request(`/jobs/${encodeURIComponent(jobId)}/staging${suffix}`, { method: "GET" });
|
|
4059
|
+
}
|
|
4060
|
+
async function sealJob(job) {
|
|
4061
|
+
const jobId = jobIdFromReference(job);
|
|
4062
|
+
const revision = beginJobOperation(jobId);
|
|
4063
|
+
try {
|
|
4064
|
+
return mergeJobResponse(await request(`/jobs/${encodeURIComponent(jobId)}/seal`, { method: "POST" }), revision);
|
|
4065
|
+
} finally {
|
|
4066
|
+
finishJobOperation(jobId);
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
async function uploadPathForSession(input, sessionId) {
|
|
4070
|
+
if (!input.files.length || input.files.length !== input.relativePaths.length) throw new Error("Path upload requires one relative path for each file");
|
|
4071
|
+
const body = new FormData();
|
|
4072
|
+
body.append("session_id", sessionId);
|
|
4073
|
+
if (input.rootName) body.append("root_name", input.rootName);
|
|
4074
|
+
for (let index = 0; index < input.files.length; index += 1) {
|
|
4075
|
+
body.append("files", input.files[index]);
|
|
4076
|
+
body.append("relative_paths", input.relativePaths[index]);
|
|
4077
|
+
}
|
|
4078
|
+
return request("/jobs/uploads", {
|
|
4079
|
+
method: "POST",
|
|
4080
|
+
body,
|
|
4081
|
+
signal: input.signal,
|
|
4082
|
+
headers: { "X-Mint-Job-Session": sessionId }
|
|
4083
|
+
});
|
|
4084
|
+
}
|
|
4085
|
+
async function stagePathInputs(inputs, sessionId) {
|
|
4086
|
+
return await stagePathValue(inputs, sessionId);
|
|
4087
|
+
}
|
|
4088
|
+
async function stagePathValue(value, sessionId) {
|
|
4089
|
+
if (typeof File !== "undefined" && value instanceof File) return { token: (await uploadPathForSession({
|
|
4090
|
+
kind: "path",
|
|
4091
|
+
files: [value],
|
|
4092
|
+
relativePaths: [value.name]
|
|
4093
|
+
}, sessionId)).token };
|
|
4094
|
+
if (isPluginJobPathInput(value)) return { token: (await uploadPathForSession(value, sessionId)).token };
|
|
4095
|
+
if (Array.isArray(value)) return await Promise.all(value.map((item) => stagePathValue(item, sessionId)));
|
|
4096
|
+
if (value && typeof value === "object") {
|
|
4097
|
+
const entries = await Promise.all(Object.entries(value).map(async ([key, child]) => [key, await stagePathValue(child, sessionId)]));
|
|
4098
|
+
return Object.fromEntries(entries);
|
|
4099
|
+
}
|
|
4100
|
+
return value;
|
|
4101
|
+
}
|
|
4102
|
+
function refreshJobs() {
|
|
4103
|
+
if (disposed) return Promise.resolve(jobs.value);
|
|
4104
|
+
if (refreshPromise) return refreshPromise;
|
|
4105
|
+
const revision = jobsRevision;
|
|
4106
|
+
const pending = request("/jobs", { method: "GET" }).then((payload) => {
|
|
4107
|
+
if (disposed || revision !== jobsRevision) return jobs.value;
|
|
4108
|
+
replaceJobs(payload.jobs);
|
|
4109
|
+
error.value = null;
|
|
4110
|
+
if (!paused && !streamConnected && jobs.value.some((job) => ACTIVE_STATUSES.has(job.status))) schedulePoll();
|
|
4111
|
+
return jobs.value;
|
|
4112
|
+
}).finally(() => {
|
|
4113
|
+
if (refreshPromise === pending) refreshPromise = void 0;
|
|
4114
|
+
});
|
|
4115
|
+
refreshPromise = pending;
|
|
4116
|
+
return pending;
|
|
4117
|
+
}
|
|
4118
|
+
function refresh() {
|
|
4119
|
+
if (disposed) return Promise.resolve(jobs.value);
|
|
4120
|
+
if (initialized) return refreshJobs();
|
|
4121
|
+
if (initializeRefreshPromise) return initializeRefreshPromise;
|
|
4122
|
+
const pending = initialize().then(() => jobs.value).finally(() => {
|
|
4123
|
+
if (initializeRefreshPromise === pending) initializeRefreshPromise = void 0;
|
|
4124
|
+
});
|
|
4125
|
+
initializeRefreshPromise = pending;
|
|
4126
|
+
return pending;
|
|
4127
|
+
}
|
|
4128
|
+
async function getJob(jobId, options = {}) {
|
|
4129
|
+
const revision = beginJobOperation(jobId);
|
|
4130
|
+
try {
|
|
4131
|
+
return mergeJobResponse(await request(`/jobs/${encodeURIComponent(jobId)}`, {
|
|
4132
|
+
method: "GET",
|
|
4133
|
+
signal: options.signal
|
|
4134
|
+
}), revision);
|
|
4135
|
+
} finally {
|
|
4136
|
+
finishJobOperation(jobId);
|
|
4137
|
+
}
|
|
4138
|
+
}
|
|
4139
|
+
function waitForJob(job, options = {}) {
|
|
4140
|
+
if (disposed) return Promise.reject(/* @__PURE__ */ new Error("Plugin jobs runtime is disposed"));
|
|
4141
|
+
if (options.signal?.aborted) return Promise.reject(pluginJobWaitAbort(options.signal));
|
|
4142
|
+
const jobId = jobIdFromReference(job);
|
|
4143
|
+
const current = typeof job === "string" ? jobs.value.find((candidate) => candidate.job_id === jobId) : jobs.value.find((candidate) => candidate.job_id === jobId) ?? job;
|
|
4144
|
+
if (current && !ACTIVE_STATUSES.has(current.status)) return terminalWaitResult(current, options.rejectOnFailure === true);
|
|
4145
|
+
if (paused) return Promise.reject(/* @__PURE__ */ new Error("Plugin jobs runtime is paused"));
|
|
4146
|
+
return new Promise((resolve, reject) => {
|
|
4147
|
+
const waiter = {
|
|
4148
|
+
resolve,
|
|
4149
|
+
reject,
|
|
4150
|
+
rejectOnFailure: options.rejectOnFailure === true,
|
|
4151
|
+
signal: options.signal
|
|
4152
|
+
};
|
|
4153
|
+
if (options.signal) {
|
|
4154
|
+
waiter.abort = () => {
|
|
4155
|
+
removeJobWaiter(jobId, waiter);
|
|
4156
|
+
reject(pluginJobWaitAbort(options.signal));
|
|
4157
|
+
};
|
|
4158
|
+
options.signal.addEventListener("abort", waiter.abort, { once: true });
|
|
4159
|
+
}
|
|
4160
|
+
const waiting = jobWaiters.get(jobId) ?? /* @__PURE__ */ new Set();
|
|
4161
|
+
waiting.add(waiter);
|
|
4162
|
+
jobWaiters.set(jobId, waiting);
|
|
4163
|
+
if (!paused) {
|
|
4164
|
+
if (streamEnabled) connectJobStream();
|
|
4165
|
+
if (!streamConnected) schedulePoll();
|
|
4166
|
+
}
|
|
4167
|
+
getJob(jobId, { signal: options.signal }).catch((cause) => {
|
|
4168
|
+
if (current && isRetryableJobLookupError(cause)) {
|
|
4169
|
+
if (!streamConnected) schedulePoll();
|
|
4170
|
+
return;
|
|
4171
|
+
}
|
|
4172
|
+
removeJobWaiter(jobId, waiter);
|
|
4173
|
+
reject(cause);
|
|
4174
|
+
});
|
|
4175
|
+
});
|
|
4176
|
+
}
|
|
4177
|
+
function settleJobWaiters(job) {
|
|
4178
|
+
if (ACTIVE_STATUSES.has(job.status)) return;
|
|
4179
|
+
const waiting = jobWaiters.get(job.job_id);
|
|
4180
|
+
if (!waiting) return;
|
|
4181
|
+
jobWaiters.delete(job.job_id);
|
|
4182
|
+
for (const waiter of waiting) {
|
|
4183
|
+
if (waiter.abort && waiter.signal) waiter.signal.removeEventListener("abort", waiter.abort);
|
|
4184
|
+
terminalWaitResult(job, waiter.rejectOnFailure).then(waiter.resolve, waiter.reject);
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
function rejectJobWaiters(jobId, cause) {
|
|
4188
|
+
const waiting = jobWaiters.get(jobId);
|
|
4189
|
+
if (!waiting) return;
|
|
4190
|
+
jobWaiters.delete(jobId);
|
|
4191
|
+
for (const waiter of waiting) {
|
|
4192
|
+
if (waiter.abort && waiter.signal) waiter.signal.removeEventListener("abort", waiter.abort);
|
|
4193
|
+
waiter.reject(cause);
|
|
4194
|
+
}
|
|
4195
|
+
}
|
|
4196
|
+
function removeJobWaiter(jobId, waiter) {
|
|
4197
|
+
const waiting = jobWaiters.get(jobId);
|
|
4198
|
+
if (!waiting) return;
|
|
4199
|
+
waiting.delete(waiter);
|
|
4200
|
+
if (waiting.size === 0) jobWaiters.delete(jobId);
|
|
4201
|
+
if (waiter.abort && waiter.signal) waiter.signal.removeEventListener("abort", waiter.abort);
|
|
4202
|
+
}
|
|
4203
|
+
function jobsFor(definitionId) {
|
|
4204
|
+
return jobs.value.filter((job) => job.definition_id === definitionId);
|
|
4205
|
+
}
|
|
4206
|
+
function canonicalJob(input, fallbackDefinitionId) {
|
|
4207
|
+
const normalized = normalizeJobState(input);
|
|
4208
|
+
const definitionId = normalized.definition_id ?? fallbackDefinitionId ?? null;
|
|
4209
|
+
return {
|
|
4210
|
+
...normalized,
|
|
4211
|
+
definition_id: definitionId,
|
|
4212
|
+
metadata: definitionId ? {
|
|
4213
|
+
...normalized.metadata,
|
|
4214
|
+
definition_id: definitionId
|
|
4215
|
+
} : normalized.metadata
|
|
4216
|
+
};
|
|
4217
|
+
}
|
|
4218
|
+
function recordJobsMutation(jobIds) {
|
|
4219
|
+
jobsRevision += 1;
|
|
4220
|
+
for (const jobId of jobIds) jobRevisions.set(jobId, (jobRevisions.get(jobId) ?? 0) + 1);
|
|
4221
|
+
}
|
|
4222
|
+
function beginJobOperation(jobId) {
|
|
4223
|
+
pendingJobOperations.set(jobId, (pendingJobOperations.get(jobId) ?? 0) + 1);
|
|
4224
|
+
return jobRevisions.get(jobId) ?? 0;
|
|
4225
|
+
}
|
|
4226
|
+
function finishJobOperation(jobId) {
|
|
4227
|
+
const remaining = (pendingJobOperations.get(jobId) ?? 1) - 1;
|
|
4228
|
+
if (remaining > 0) pendingJobOperations.set(jobId, remaining);
|
|
4229
|
+
else pendingJobOperations.delete(jobId);
|
|
4230
|
+
pruneJobRevisions();
|
|
4231
|
+
}
|
|
4232
|
+
function pruneJobRevisions() {
|
|
4233
|
+
const retained = new Set([...jobs.value.map((job) => job.job_id), ...pendingJobOperations.keys()]);
|
|
4234
|
+
for (const jobId of jobRevisions.keys()) if (!retained.has(jobId)) jobRevisions.delete(jobId);
|
|
4235
|
+
}
|
|
4236
|
+
function replaceJobs(inputs) {
|
|
4237
|
+
const previousJobs = new Map(jobs.value.map((job) => [job.job_id, job]));
|
|
4238
|
+
const previousJobIds = new Set(jobs.value.map((job) => job.job_id));
|
|
4239
|
+
const nextJobs = inputs.map((input) => {
|
|
4240
|
+
const incoming = canonicalJob(input);
|
|
4241
|
+
const current = previousJobs.get(incoming.job_id);
|
|
4242
|
+
return current && shouldPreserveJobLifecycle(current, incoming) ? current : incoming;
|
|
4243
|
+
});
|
|
4244
|
+
const nextJobIds = new Set(nextJobs.map((job) => job.job_id));
|
|
4245
|
+
recordJobsMutation(new Set([...previousJobIds, ...nextJobIds]));
|
|
4246
|
+
jobs.value = nextJobs;
|
|
4247
|
+
for (const job of nextJobs) settleJobWaiters(job);
|
|
4248
|
+
for (const jobId of previousJobIds) if (!nextJobIds.has(jobId)) rejectJobWaiters(jobId, /* @__PURE__ */ new Error(`Job ${jobId} is no longer available`));
|
|
4249
|
+
pruneResultState();
|
|
4250
|
+
pruneJobRevisions();
|
|
4251
|
+
return nextJobs;
|
|
4252
|
+
}
|
|
4253
|
+
function upsertJob(input, fallbackDefinitionId) {
|
|
4254
|
+
const incoming = canonicalJob(input, fallbackDefinitionId);
|
|
4255
|
+
const current = jobs.value.find((candidate) => candidate.job_id === incoming.job_id);
|
|
4256
|
+
const job = current && shouldPreserveJobLifecycle(current, incoming) ? current : incoming;
|
|
4257
|
+
if (job === current) {
|
|
4258
|
+
settleJobWaiters(job);
|
|
4259
|
+
pruneResultState();
|
|
4260
|
+
pruneJobRevisions();
|
|
4261
|
+
return job;
|
|
4262
|
+
}
|
|
4263
|
+
jobs.value = [job, ...jobs.value.filter((candidate) => candidate.job_id !== job.job_id)];
|
|
4264
|
+
recordJobsMutation([job.job_id]);
|
|
4265
|
+
settleJobWaiters(job);
|
|
4266
|
+
pruneResultState();
|
|
4267
|
+
pruneJobRevisions();
|
|
4268
|
+
return job;
|
|
4269
|
+
}
|
|
4270
|
+
function mergeJobResponse(input, expectedRevision) {
|
|
4271
|
+
const incoming = canonicalJob(input);
|
|
4272
|
+
const current = jobs.value.find((candidate) => candidate.job_id === incoming.job_id);
|
|
4273
|
+
if (disposed) return current ?? incoming;
|
|
4274
|
+
if (current && shouldPreserveJobLifecycle(current, incoming)) return current;
|
|
4275
|
+
if (expectedRevision === (jobRevisions.get(incoming.job_id) ?? 0)) return upsertJob(incoming);
|
|
4276
|
+
if (current && jobLifecycleRank(incoming.status) > jobLifecycleRank(current.status)) return upsertJob(incoming);
|
|
4277
|
+
return current ?? incoming;
|
|
4278
|
+
}
|
|
4279
|
+
function currentCompletedJob() {
|
|
4280
|
+
const activeSessionId = session.value?.id;
|
|
4281
|
+
return jobs.value.find((candidate) => candidate.session_id === activeSessionId && candidate.status === "completed" && candidate.result_status === "available");
|
|
4282
|
+
}
|
|
4283
|
+
function resultForJob(jobId) {
|
|
4284
|
+
return resultCache.value[jobId] ?? null;
|
|
4285
|
+
}
|
|
4286
|
+
function loadResult(job) {
|
|
4287
|
+
return loadResultInternal(job);
|
|
4288
|
+
}
|
|
4289
|
+
function loadResultInternal(job, forceRefresh = false) {
|
|
4290
|
+
if (disposed || !isLoadableResultJob(job)) return Promise.resolve(null);
|
|
4291
|
+
const cached = resultForJob(job.job_id);
|
|
4292
|
+
if (cached && !forceRefresh && !managedDownloadNeedsRefresh(cached)) return Promise.resolve(cached);
|
|
4293
|
+
const pending = resultRequests.get(job.job_id);
|
|
4294
|
+
if (pending) return pending;
|
|
4295
|
+
const requestResult = request(`/jobs/${encodeURIComponent(job.job_id)}/result`, { method: "GET" }).then((result) => {
|
|
4296
|
+
if (!disposed && isCurrentResultJob(job.job_id)) {
|
|
4297
|
+
cacheResult(job.job_id, result);
|
|
4298
|
+
clearResultRetry(job.job_id);
|
|
4299
|
+
error.value = null;
|
|
4300
|
+
}
|
|
4301
|
+
return result;
|
|
4302
|
+
}).catch((cause) => {
|
|
4303
|
+
if (!disposed && isCurrentResultJob(job.job_id)) {
|
|
4304
|
+
error.value = errorMessage(cause, "Failed to load analysis result");
|
|
4305
|
+
if (cached && isManagedDownloadResult(cached)) handleManagedDownloadRefreshFailure(job, cause);
|
|
4306
|
+
else scheduleResultRetry(job, cause);
|
|
4307
|
+
}
|
|
4308
|
+
return null;
|
|
4309
|
+
}).finally(() => {
|
|
4310
|
+
resultRequests.delete(job.job_id);
|
|
4311
|
+
});
|
|
4312
|
+
resultRequests.set(job.job_id, requestResult);
|
|
4313
|
+
return requestResult;
|
|
4314
|
+
}
|
|
4315
|
+
function cacheResult(jobId, result) {
|
|
4316
|
+
resultCacheOrder = [jobId, ...resultCacheOrder.filter((candidate) => candidate !== jobId)].slice(0, MAX_RESULT_CACHE_ENTRIES);
|
|
4317
|
+
const retained = new Set(resultCacheOrder);
|
|
4318
|
+
resultCache.value = Object.fromEntries([...Object.entries(resultCache.value).filter(([candidate]) => retained.has(candidate) && candidate !== jobId), [jobId, result]]);
|
|
4319
|
+
for (const candidate of downloadRefreshTimers.keys()) if (!retained.has(candidate)) clearManagedDownloadRefresh(candidate);
|
|
4320
|
+
scheduleManagedDownloadRefresh(jobId, managedDownloadRefreshDelay(result));
|
|
4321
|
+
}
|
|
4322
|
+
function pruneResultState() {
|
|
4323
|
+
const loadableJobIds = new Set(jobs.value.filter((job) => isLoadableResultJob(job)).map((job) => job.job_id));
|
|
4324
|
+
resultCacheOrder = resultCacheOrder.filter((jobId) => loadableJobIds.has(jobId)).slice(0, MAX_RESULT_CACHE_ENTRIES);
|
|
4325
|
+
const retained = new Set(resultCacheOrder);
|
|
4326
|
+
resultCache.value = Object.fromEntries(Object.entries(resultCache.value).filter(([jobId]) => retained.has(jobId)));
|
|
4327
|
+
for (const jobId of resultRetryTimers.keys()) if (!loadableJobIds.has(jobId)) clearResultRetry(jobId);
|
|
4328
|
+
for (const jobId of resultRetryAttempts.keys()) if (!loadableJobIds.has(jobId)) clearResultRetry(jobId);
|
|
4329
|
+
for (const jobId of downloadRefreshTimers.keys()) if (!loadableJobIds.has(jobId) || !retained.has(jobId)) clearManagedDownloadRefresh(jobId);
|
|
4330
|
+
}
|
|
4331
|
+
function scheduleManagedDownloadRefresh(jobId, delay) {
|
|
4332
|
+
clearManagedDownloadRefresh(jobId);
|
|
4333
|
+
if (delay === null || disposed || paused) return;
|
|
4334
|
+
downloadRefreshTimers.set(jobId, setTimeout(() => {
|
|
4335
|
+
downloadRefreshTimers.delete(jobId);
|
|
4336
|
+
if (disposed || paused) return;
|
|
4337
|
+
const current = jobs.value.find((candidate) => candidate.job_id === jobId);
|
|
4338
|
+
if (current && isLoadableResultJob(current)) loadResultInternal(current, true);
|
|
4339
|
+
}, Math.max(0, delay)));
|
|
4340
|
+
}
|
|
4341
|
+
function clearManagedDownloadRefresh(jobId) {
|
|
4342
|
+
const timer = downloadRefreshTimers.get(jobId);
|
|
4343
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
4344
|
+
downloadRefreshTimers.delete(jobId);
|
|
4345
|
+
}
|
|
4346
|
+
function handleManagedDownloadRefreshFailure(job, cause) {
|
|
4347
|
+
if (cause instanceof GeneratedAnalysisRequestError) {
|
|
4348
|
+
if (cause.status === 404 || cause.status === 410) {
|
|
4349
|
+
discardCachedResult(job.job_id);
|
|
4350
|
+
jobs.value = jobs.value.map((candidate) => candidate.job_id === job.job_id ? {
|
|
4351
|
+
...candidate,
|
|
4352
|
+
result_status: "expired"
|
|
4353
|
+
} : candidate);
|
|
4354
|
+
recordJobsMutation([job.job_id]);
|
|
4355
|
+
return;
|
|
4356
|
+
}
|
|
4357
|
+
if (cause.status === 401 || cause.status === 403) {
|
|
4358
|
+
discardCachedResult(job.job_id);
|
|
4359
|
+
return;
|
|
4360
|
+
}
|
|
4361
|
+
}
|
|
4362
|
+
scheduleResultRetry(job, cause, true);
|
|
4363
|
+
}
|
|
4364
|
+
function discardCachedResult(jobId) {
|
|
4365
|
+
clearResultRetry(jobId);
|
|
4366
|
+
clearManagedDownloadRefresh(jobId);
|
|
4367
|
+
resultCacheOrder = resultCacheOrder.filter((candidate) => candidate !== jobId);
|
|
4368
|
+
const retainedResults = { ...resultCache.value };
|
|
4369
|
+
delete retainedResults[jobId];
|
|
4370
|
+
resultCache.value = retainedResults;
|
|
4371
|
+
}
|
|
4372
|
+
function isLoadableResultJob(job) {
|
|
4373
|
+
return job.status === "completed" && job.result_status === "available";
|
|
4374
|
+
}
|
|
4375
|
+
function isCurrentResultJob(jobId) {
|
|
4376
|
+
const job = jobs.value.find((candidate) => candidate.job_id === jobId);
|
|
4377
|
+
return job !== void 0 && isLoadableResultJob(job);
|
|
4378
|
+
}
|
|
4379
|
+
function scheduleResultRetry(job, cause, forceRefresh = false) {
|
|
4380
|
+
if (paused || !isRetryableResultError(cause) || resultRetryTimers.has(job.job_id)) return;
|
|
4381
|
+
const attempt = resultRetryAttempts.get(job.job_id) ?? 0;
|
|
4382
|
+
if (attempt >= MAX_RESULT_RETRIES) return;
|
|
4383
|
+
resultRetryAttempts.set(job.job_id, attempt + 1);
|
|
4384
|
+
resultRetryTimers.set(job.job_id, setTimeout(() => {
|
|
4385
|
+
resultRetryTimers.delete(job.job_id);
|
|
4386
|
+
const current = jobs.value.find((candidate) => candidate.job_id === job.job_id);
|
|
4387
|
+
if (!paused && current && isLoadableResultJob(current)) loadResultInternal(current, forceRefresh);
|
|
4388
|
+
}, pollInterval * 2 ** attempt));
|
|
4389
|
+
}
|
|
4390
|
+
function clearResultRetry(jobId) {
|
|
4391
|
+
const timer = resultRetryTimers.get(jobId);
|
|
4392
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
4393
|
+
resultRetryTimers.delete(jobId);
|
|
4394
|
+
resultRetryAttempts.delete(jobId);
|
|
4395
|
+
}
|
|
4396
|
+
function schedulePoll() {
|
|
4397
|
+
if (disposed || paused || streamConnected || pollTimer !== void 0) return;
|
|
4398
|
+
pollTimer = setTimeout(async () => {
|
|
4399
|
+
pollTimer = void 0;
|
|
4400
|
+
if (disposed) return;
|
|
4401
|
+
try {
|
|
4402
|
+
await refreshJobs();
|
|
4403
|
+
} catch (cause) {
|
|
4404
|
+
error.value = errorMessage(cause, "Failed to refresh analysis jobs");
|
|
4405
|
+
if (jobs.value.some((job) => ACTIVE_STATUSES.has(job.status))) schedulePoll();
|
|
4406
|
+
}
|
|
4407
|
+
}, pollInterval);
|
|
4408
|
+
}
|
|
4409
|
+
async function connectJobStream() {
|
|
4410
|
+
if (disposed || paused || streamConnecting || streamConnected) return;
|
|
4411
|
+
streamConnecting = true;
|
|
4412
|
+
streamController = new AbortController();
|
|
4413
|
+
try {
|
|
4414
|
+
const response = await transport(`${baseUrl}/jobs/events`, {
|
|
4415
|
+
method: "GET",
|
|
4416
|
+
headers: { Accept: "text/event-stream" },
|
|
4417
|
+
signal: streamController.signal
|
|
4418
|
+
});
|
|
4419
|
+
if (!response.ok) throw new Error(`Job stream failed (${response.status})`);
|
|
4420
|
+
if (!response.body) throw new Error("Job stream response has no readable body");
|
|
4421
|
+
streamConnected = true;
|
|
4422
|
+
if (pollTimer !== void 0) {
|
|
4423
|
+
clearTimeout(pollTimer);
|
|
4424
|
+
pollTimer = void 0;
|
|
4425
|
+
}
|
|
4426
|
+
await consumeJobStream(response.body);
|
|
4427
|
+
} catch (cause) {
|
|
4428
|
+
if (!isAbortError(cause) && !disposed) {
|
|
4429
|
+
if (jobs.value.some((job) => ACTIVE_STATUSES.has(job.status))) schedulePoll();
|
|
4430
|
+
}
|
|
4431
|
+
} finally {
|
|
4432
|
+
streamConnected = false;
|
|
4433
|
+
streamConnecting = false;
|
|
4434
|
+
streamController = void 0;
|
|
4435
|
+
if (!disposed && !paused) scheduleStreamReconnect();
|
|
4436
|
+
}
|
|
4437
|
+
}
|
|
4438
|
+
async function consumeJobStream(body) {
|
|
4439
|
+
const reader = body.getReader();
|
|
4440
|
+
const decoder = new TextDecoder();
|
|
4441
|
+
let buffer = "";
|
|
4442
|
+
try {
|
|
4443
|
+
while (!disposed) {
|
|
4444
|
+
const { done, value } = await reader.read();
|
|
4445
|
+
buffer += decoder.decode(value, { stream: !done });
|
|
4446
|
+
const blocks = buffer.split(/\r?\n\r?\n/);
|
|
4447
|
+
buffer = blocks.pop() ?? "";
|
|
4448
|
+
for (const block of blocks) applyJobStreamEvent(block);
|
|
4449
|
+
if (done) {
|
|
4450
|
+
if (buffer.trim()) applyJobStreamEvent(buffer);
|
|
4451
|
+
return;
|
|
4452
|
+
}
|
|
4453
|
+
}
|
|
4454
|
+
} finally {
|
|
4455
|
+
reader.releaseLock();
|
|
4456
|
+
}
|
|
4457
|
+
}
|
|
4458
|
+
function applyJobStreamEvent(block) {
|
|
4459
|
+
let event = "message";
|
|
4460
|
+
const data = [];
|
|
4461
|
+
for (const line of block.split(/\r?\n/)) {
|
|
4462
|
+
if (!line || line.startsWith(":")) continue;
|
|
4463
|
+
if (line.startsWith("event:")) event = line.slice(6).trim();
|
|
4464
|
+
if (line.startsWith("data:")) data.push(line.slice(5).trimStart());
|
|
4465
|
+
}
|
|
4466
|
+
if (!data.length) return;
|
|
4467
|
+
const payload = JSON.parse(data.join("\n"));
|
|
4468
|
+
if (event === "snapshot" && "jobs" in payload) replaceJobs(payload.jobs);
|
|
4469
|
+
else if (event === "job" || event === "terminal") upsertJob(payload);
|
|
4470
|
+
error.value = null;
|
|
4471
|
+
}
|
|
4472
|
+
function scheduleStreamReconnect() {
|
|
4473
|
+
if (disposed || paused || streamReconnectTimer !== void 0) return;
|
|
4474
|
+
streamReconnectTimer = setTimeout(() => {
|
|
4475
|
+
streamReconnectTimer = void 0;
|
|
4476
|
+
connectJobStream();
|
|
4477
|
+
}, streamReconnectDelay);
|
|
4478
|
+
}
|
|
4479
|
+
async function cancelJob(job) {
|
|
4480
|
+
const jobId = typeof job === "string" ? job : job.job_id;
|
|
4481
|
+
const revision = beginJobOperation(jobId);
|
|
4482
|
+
try {
|
|
4483
|
+
return mergeJobResponse(await request(`/jobs/${encodeURIComponent(jobId)}/cancel`, { method: "POST" }), revision);
|
|
4484
|
+
} finally {
|
|
4485
|
+
finishJobOperation(jobId);
|
|
4486
|
+
}
|
|
4487
|
+
}
|
|
4488
|
+
async function deleteJob(job) {
|
|
4489
|
+
const jobId = typeof job === "string" ? job : job.job_id;
|
|
4490
|
+
await request(`/jobs/${encodeURIComponent(jobId)}`, { method: "DELETE" });
|
|
4491
|
+
jobs.value = jobs.value.filter((candidate) => candidate.job_id !== jobId);
|
|
4492
|
+
recordJobsMutation([jobId]);
|
|
4493
|
+
rejectJobWaiters(jobId, /* @__PURE__ */ new Error(`Job ${jobId} was deleted`));
|
|
4494
|
+
discardCachedResult(jobId);
|
|
4495
|
+
pruneJobRevisions();
|
|
4496
|
+
return true;
|
|
4497
|
+
}
|
|
4498
|
+
async function clearFinishedJobs(definitionId) {
|
|
4499
|
+
const payload = await request(`/jobs${definitionId === void 0 ? "" : `?definition_id=${encodeURIComponent(definitionId)}`}`, { method: "DELETE" });
|
|
4500
|
+
if (payload.deleted > 0) await refreshJobs();
|
|
4501
|
+
return payload.deleted;
|
|
4502
|
+
}
|
|
4503
|
+
const jobsAdapter = {
|
|
4504
|
+
listJobs: async () => ({ jobs: await refreshJobs() }),
|
|
4505
|
+
cancelJob: async (job) => cancelJob(job),
|
|
4506
|
+
deleteJob: async (job) => deleteJob(job),
|
|
4507
|
+
clearFinishedJobs: async () => clearFinishedJobs()
|
|
4508
|
+
};
|
|
4509
|
+
function pause() {
|
|
4510
|
+
if (disposed || paused) return;
|
|
4511
|
+
paused = true;
|
|
4512
|
+
status.value = "paused";
|
|
4513
|
+
if (pollTimer !== void 0) clearTimeout(pollTimer);
|
|
4514
|
+
if (streamReconnectTimer !== void 0) clearTimeout(streamReconnectTimer);
|
|
4515
|
+
pollTimer = void 0;
|
|
4516
|
+
streamReconnectTimer = void 0;
|
|
4517
|
+
for (const jobId of resultRetryTimers.keys()) clearResultRetry(jobId);
|
|
4518
|
+
for (const jobId of downloadRefreshTimers.keys()) clearManagedDownloadRefresh(jobId);
|
|
4519
|
+
streamController?.abort();
|
|
4520
|
+
}
|
|
4521
|
+
function resume() {
|
|
4522
|
+
if (disposed || !paused) return;
|
|
4523
|
+
paused = false;
|
|
4524
|
+
status.value = initialized ? "ready" : "idle";
|
|
4525
|
+
if (!initialized) return;
|
|
4526
|
+
for (const [jobId, result] of Object.entries(resultCache.value)) scheduleManagedDownloadRefresh(jobId, managedDownloadRefreshDelay(result));
|
|
4527
|
+
if (streamEnabled) connectJobStream();
|
|
4528
|
+
else if (jobs.value.some((job) => ACTIVE_STATUSES.has(job.status))) schedulePoll();
|
|
4529
|
+
}
|
|
4530
|
+
function dispose() {
|
|
4531
|
+
if (disposed) return;
|
|
4532
|
+
disposed = true;
|
|
4533
|
+
paused = true;
|
|
4534
|
+
status.value = "disposed";
|
|
4535
|
+
if (pollTimer !== void 0) clearTimeout(pollTimer);
|
|
4536
|
+
if (streamReconnectTimer !== void 0) clearTimeout(streamReconnectTimer);
|
|
4537
|
+
pollTimer = void 0;
|
|
4538
|
+
streamReconnectTimer = void 0;
|
|
4539
|
+
for (const timer of resultRetryTimers.values()) clearTimeout(timer);
|
|
4540
|
+
resultRetryTimers.clear();
|
|
4541
|
+
resultRetryAttempts.clear();
|
|
4542
|
+
for (const timer of downloadRefreshTimers.values()) clearTimeout(timer);
|
|
4543
|
+
downloadRefreshTimers.clear();
|
|
4544
|
+
const cause = /* @__PURE__ */ new Error("Plugin jobs runtime is disposed");
|
|
4545
|
+
for (const jobId of jobWaiters.keys()) rejectJobWaiters(jobId, cause);
|
|
4546
|
+
jobRevisions.clear();
|
|
4547
|
+
pendingJobOperations.clear();
|
|
4548
|
+
streamController?.abort();
|
|
4549
|
+
}
|
|
4550
|
+
async function request(path, init) {
|
|
4551
|
+
const response = await transport(`${baseUrl}${path}`, {
|
|
4552
|
+
...init,
|
|
4553
|
+
headers: {
|
|
4554
|
+
Accept: "application/json",
|
|
4555
|
+
...init.body && !(init.body instanceof FormData) ? { "Content-Type": "application/json" } : {},
|
|
4556
|
+
...init.headers
|
|
4557
|
+
}
|
|
4558
|
+
});
|
|
4559
|
+
if (!response.ok) {
|
|
4560
|
+
const payload = await response.json().catch(() => null);
|
|
4561
|
+
throw new GeneratedAnalysisRequestError(response.status, payload?.detail);
|
|
4562
|
+
}
|
|
4563
|
+
return await response.json();
|
|
4564
|
+
}
|
|
4565
|
+
onScopeDispose(dispose);
|
|
4566
|
+
if (options.immediate) initialize().catch(() => void 0);
|
|
4567
|
+
return {
|
|
4568
|
+
manifest,
|
|
4569
|
+
session,
|
|
4570
|
+
jobs,
|
|
4571
|
+
latestResult,
|
|
4572
|
+
isLoading,
|
|
4573
|
+
isSubmitting,
|
|
4574
|
+
error,
|
|
4575
|
+
status,
|
|
4576
|
+
initialize,
|
|
4577
|
+
ready: initialize,
|
|
4578
|
+
uploadPath,
|
|
4579
|
+
uploadStagedPart,
|
|
4580
|
+
getJobStaging,
|
|
4581
|
+
sealJob,
|
|
4582
|
+
submit,
|
|
4583
|
+
loadResult,
|
|
4584
|
+
resultForJob,
|
|
4585
|
+
refreshJobs,
|
|
4586
|
+
refresh,
|
|
4587
|
+
getJob,
|
|
4588
|
+
waitForJob,
|
|
4589
|
+
jobsFor,
|
|
4590
|
+
cancelJob,
|
|
4591
|
+
deleteJob,
|
|
4592
|
+
clearFinishedJobs,
|
|
4593
|
+
pause,
|
|
4594
|
+
resume,
|
|
4595
|
+
dispose,
|
|
4596
|
+
jobsAdapter
|
|
4597
|
+
};
|
|
4598
|
+
}
|
|
4599
|
+
function jobIdFromReference(job) {
|
|
4600
|
+
return typeof job === "string" ? job : job.job_id;
|
|
4601
|
+
}
|
|
4602
|
+
function encodeStagedPartKey(key) {
|
|
4603
|
+
return key.split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
4604
|
+
}
|
|
4605
|
+
function jobLifecycleRank(status) {
|
|
4606
|
+
if (status === "awaiting_input") return 0;
|
|
4607
|
+
if (status === "queued") return 1;
|
|
4608
|
+
if (status === "running") return 2;
|
|
4609
|
+
return 3;
|
|
4610
|
+
}
|
|
4611
|
+
function shouldPreserveJobLifecycle(current, incoming) {
|
|
4612
|
+
const currentRank = jobLifecycleRank(current.status);
|
|
4613
|
+
const incomingRank = jobLifecycleRank(incoming.status);
|
|
4614
|
+
return incomingRank < currentRank || currentRank === 3 && incomingRank === 3 && current.status !== incoming.status;
|
|
4615
|
+
}
|
|
4616
|
+
function terminalWaitResult(job, rejectOnFailure) {
|
|
4617
|
+
if (rejectOnFailure && (job.status === "failed" || job.status === "cancelled")) return Promise.reject(new Error(job.error ?? `Job ${job.job_id} ${job.status}`));
|
|
4618
|
+
return Promise.resolve(job);
|
|
4619
|
+
}
|
|
4620
|
+
function pluginJobWaitAbort(signal) {
|
|
4621
|
+
if (signal.reason !== void 0) return signal.reason;
|
|
4622
|
+
const cause = /* @__PURE__ */ new Error("Waiting for job was aborted");
|
|
4623
|
+
cause.name = "AbortError";
|
|
4624
|
+
return cause;
|
|
4625
|
+
}
|
|
4626
|
+
function isPluginJobPathInput(value) {
|
|
4627
|
+
return Boolean(value && typeof value === "object" && "kind" in value && value.kind === "path" && "files" in value && Array.isArray(value.files) && "relativePaths" in value && Array.isArray(value.relativePaths));
|
|
4628
|
+
}
|
|
4629
|
+
function readStoredAccessToken() {
|
|
4630
|
+
try {
|
|
4631
|
+
return globalThis.localStorage?.getItem(AUTH_TOKEN_KEY) ?? null;
|
|
4632
|
+
} catch {
|
|
4633
|
+
return null;
|
|
4634
|
+
}
|
|
4635
|
+
}
|
|
4636
|
+
function createGeneratedSessionStorage(candidate) {
|
|
4637
|
+
const fallback = /* @__PURE__ */ new Map();
|
|
4638
|
+
let delegate;
|
|
4639
|
+
let available = true;
|
|
4640
|
+
try {
|
|
4641
|
+
delegate = candidate ?? globalThis.sessionStorage;
|
|
4642
|
+
} catch {
|
|
4643
|
+
available = false;
|
|
4644
|
+
}
|
|
4645
|
+
return {
|
|
4646
|
+
getItem(key) {
|
|
4647
|
+
if (available && delegate) try {
|
|
4648
|
+
return delegate.getItem(key) ?? fallback.get(key) ?? null;
|
|
4649
|
+
} catch {
|
|
4650
|
+
available = false;
|
|
4651
|
+
}
|
|
4652
|
+
return fallback.get(key) ?? null;
|
|
4653
|
+
},
|
|
4654
|
+
setItem(key, value) {
|
|
4655
|
+
fallback.set(key, value);
|
|
4656
|
+
if (available && delegate) try {
|
|
4657
|
+
delegate.setItem(key, value);
|
|
4658
|
+
} catch {
|
|
4659
|
+
available = false;
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
};
|
|
4663
|
+
}
|
|
4664
|
+
function isAbortError(error) {
|
|
4665
|
+
return error instanceof DOMException && error.name === "AbortError";
|
|
4666
|
+
}
|
|
4667
|
+
function isSessionNotFoundError(error) {
|
|
4668
|
+
return error instanceof GeneratedAnalysisRequestError && error.status === 404 && error.detail === SESSION_NOT_FOUND_DETAIL;
|
|
4669
|
+
}
|
|
4670
|
+
function isRetryableResultError(error) {
|
|
4671
|
+
return !(error instanceof GeneratedAnalysisRequestError) || error.status === 409 || error.status === 429 || error.status >= 500;
|
|
4672
|
+
}
|
|
4673
|
+
function isRetryableJobLookupError(error) {
|
|
4674
|
+
return !(error instanceof GeneratedAnalysisRequestError) || error.status === 408 || error.status === 429 || error.status >= 500;
|
|
4675
|
+
}
|
|
4676
|
+
function isManagedDownloadResult(result) {
|
|
4677
|
+
return result.kind === "artifact" && result.managed === true;
|
|
4678
|
+
}
|
|
4679
|
+
function managedDownloadNeedsRefresh(result) {
|
|
4680
|
+
if (!isManagedDownloadResult(result)) return false;
|
|
4681
|
+
if (!result.download_url || !result.download_expires_at) return true;
|
|
4682
|
+
const expiresAt = Date.parse(result.download_expires_at);
|
|
4683
|
+
return !Number.isFinite(expiresAt) || expiresAt <= Date.now() + DOWNLOAD_URL_REFRESH_SKEW_MS;
|
|
4684
|
+
}
|
|
4685
|
+
function managedDownloadRefreshDelay(result) {
|
|
4686
|
+
if (!isManagedDownloadResult(result)) return null;
|
|
4687
|
+
if (!result.download_url || !result.download_expires_at) return null;
|
|
4688
|
+
const expiresAt = Date.parse(result.download_expires_at);
|
|
4689
|
+
if (!Number.isFinite(expiresAt)) return null;
|
|
4690
|
+
const remaining = expiresAt - Date.now();
|
|
4691
|
+
return remaining <= DOWNLOAD_URL_REFRESH_SKEW_MS ? remaining : remaining - DOWNLOAD_URL_REFRESH_SKEW_MS;
|
|
4692
|
+
}
|
|
4693
|
+
function errorMessage(error, fallback) {
|
|
4694
|
+
return error instanceof Error ? error.message : fallback;
|
|
4695
|
+
}
|
|
4696
|
+
//#endregion
|
|
4697
|
+
//#region src/composables/platformContextHelpers.ts
|
|
4698
|
+
function getInjectedPlatformContext() {
|
|
4699
|
+
if (typeof window === "undefined") return void 0;
|
|
4700
|
+
return window.__MINT_PLATFORM__;
|
|
4701
|
+
}
|
|
4702
|
+
function getInjectedExperimentContext() {
|
|
4703
|
+
return getInjectedPlatformContext();
|
|
4704
|
+
}
|
|
4705
|
+
function currentExperimentFromContext(context = getInjectedExperimentContext()) {
|
|
4706
|
+
const candidate = context?.currentExperiment ?? context?.experiment;
|
|
4707
|
+
return candidate && typeof candidate === "object" ? candidate : void 0;
|
|
4708
|
+
}
|
|
4709
|
+
function currentExperimentIdFromContext(context = getInjectedExperimentContext()) {
|
|
4710
|
+
return parseExperimentId(context?.currentExperimentId ?? context?.experimentId ?? context?.currentExperiment ?? context?.experiment);
|
|
4711
|
+
}
|
|
4712
|
+
function currentExperimentIdFromUrl() {
|
|
4713
|
+
if (typeof window === "undefined") return void 0;
|
|
4714
|
+
const params = new URLSearchParams(window.location.search);
|
|
4715
|
+
return parseExperimentId(params.get("experimentId") ?? params.get("experiment_id")) ?? experimentIdFromPath(window.location.pathname) ?? experimentIdFromPath(window.location.hash.replace(/^#\/?/, "/"));
|
|
4716
|
+
}
|
|
4717
|
+
function resolveCurrentExperimentId(context = getInjectedExperimentContext()) {
|
|
4718
|
+
return currentExperimentIdFromContext(context) ?? currentExperimentIdFromUrl();
|
|
4719
|
+
}
|
|
4720
|
+
function parseExperimentId(value) {
|
|
4721
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
4722
|
+
if (typeof value === "string" && value.trim()) {
|
|
4723
|
+
const parsed = Number(value);
|
|
4724
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
4725
|
+
}
|
|
4726
|
+
if (value && typeof value === "object" && "id" in value) return parseExperimentId(value.id);
|
|
4727
|
+
}
|
|
4728
|
+
function experimentIdFromPath(path) {
|
|
4729
|
+
const segments = path.split("/").filter(Boolean);
|
|
4730
|
+
for (let index = 0; index < segments.length - 1; index += 1) {
|
|
4731
|
+
const segment = segments[index]?.toLowerCase();
|
|
4732
|
+
if (segment === "experiment" || segment === "experiments") return parseExperimentId(decodeURIComponent(segments[index + 1] ?? ""));
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
//#endregion
|
|
4736
|
+
//#region src/composables/useAnalysisArtifacts.ts
|
|
4737
|
+
/** Lists and manages analysis artifacts through the user-facing platform API. */
|
|
4738
|
+
function useAnalysisArtifacts(options = {}) {
|
|
4739
|
+
const injectedContext = getInjectedPlatformContext();
|
|
4740
|
+
const api = useApi({ baseUrl: options.apiBaseUrl ?? injectedContext?.platformApiUrl });
|
|
4741
|
+
const currentExperimentId = computed(() => toValue(options.experimentId) ?? resolveCurrentExperimentId(injectedContext));
|
|
4742
|
+
const hasCurrentExperiment = computed(() => currentExperimentId.value !== void 0);
|
|
4743
|
+
const scopePluginId = computed(() => toValue(options.pluginId) ?? null);
|
|
4744
|
+
const request = useRequestSyncState("Analysis artifact request failed.");
|
|
4745
|
+
const fetchedArtifacts = ref([]);
|
|
4746
|
+
const selectedDetail = ref(null);
|
|
4747
|
+
const loadingCount = ref(0);
|
|
4748
|
+
const mutatingCount = ref(0);
|
|
4749
|
+
const isLoading = computed(() => loadingCount.value > 0);
|
|
4750
|
+
const isMutating = computed(() => mutatingCount.value > 0);
|
|
4751
|
+
const search = ref("");
|
|
4752
|
+
const statusFilter = ref("active");
|
|
4753
|
+
const pluginFilter = ref(null);
|
|
4754
|
+
const needsArchived = computed(() => Boolean(toValue(options.includeArchived)) || statusFilter.value !== "active");
|
|
4755
|
+
const artifacts = computed(() => scopePluginId.value ? fetchedArtifacts.value.filter((artifact) => artifact.plugin_id === scopePluginId.value) : fetchedArtifacts.value);
|
|
4756
|
+
const visibleArtifacts = computed(() => {
|
|
4757
|
+
const query = search.value.trim().toLowerCase();
|
|
4758
|
+
return artifacts.value.filter((artifact) => {
|
|
4759
|
+
if (statusFilter.value !== "all" && artifact.status !== statusFilter.value) return false;
|
|
4760
|
+
if (pluginFilter.value && artifact.plugin_id !== pluginFilter.value) return false;
|
|
4761
|
+
if (!query) return true;
|
|
4762
|
+
return artifact.display_name.toLowerCase().includes(query) || artifact.artifact_key.toLowerCase().includes(query);
|
|
4763
|
+
});
|
|
4764
|
+
});
|
|
4765
|
+
let listToken = 0;
|
|
4766
|
+
let detailToken = 0;
|
|
4767
|
+
const hasRequestedList = ref(false);
|
|
4768
|
+
function currentExperimentIdOrError(action) {
|
|
4769
|
+
const id = currentExperimentId.value;
|
|
4770
|
+
if (id === void 0) {
|
|
4771
|
+
request.setError(`No current experiment is selected for ${action}`);
|
|
4772
|
+
return;
|
|
4773
|
+
}
|
|
4774
|
+
return id;
|
|
4775
|
+
}
|
|
4776
|
+
function replaceArtifact(summary) {
|
|
4777
|
+
const index = fetchedArtifacts.value.findIndex((artifact) => artifact.id === summary.id);
|
|
4778
|
+
if (index >= 0) fetchedArtifacts.value.splice(index, 1, summary);
|
|
4779
|
+
}
|
|
4780
|
+
async function list() {
|
|
4781
|
+
const experimentId = currentExperimentIdOrError("listing analysis artifacts");
|
|
4782
|
+
if (experimentId === void 0) {
|
|
4783
|
+
fetchedArtifacts.value = [];
|
|
4784
|
+
return [];
|
|
4785
|
+
}
|
|
4786
|
+
const token = ++listToken;
|
|
4787
|
+
hasRequestedList.value = true;
|
|
4788
|
+
loadingCount.value += 1;
|
|
4789
|
+
request.clearError();
|
|
4790
|
+
try {
|
|
4791
|
+
const data = await api.get(`/experiments/${experimentId}/analysis-artifacts?include_archived=${needsArchived.value}`);
|
|
4792
|
+
if (token !== listToken) return artifacts.value;
|
|
4793
|
+
fetchedArtifacts.value = [...data?.artifacts ?? []];
|
|
4794
|
+
request.markLoaded();
|
|
4795
|
+
return artifacts.value;
|
|
4796
|
+
} catch (err) {
|
|
4797
|
+
if (token !== listToken) return [];
|
|
4798
|
+
request.setError(err);
|
|
4799
|
+
fetchedArtifacts.value = [];
|
|
4800
|
+
return [];
|
|
4801
|
+
} finally {
|
|
4802
|
+
loadingCount.value -= 1;
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
async function getDetail(artifactId) {
|
|
4806
|
+
const experimentId = currentExperimentIdOrError("loading an analysis artifact");
|
|
4807
|
+
if (experimentId === void 0) return null;
|
|
4808
|
+
const token = ++detailToken;
|
|
4809
|
+
loadingCount.value += 1;
|
|
4810
|
+
request.clearError();
|
|
4811
|
+
try {
|
|
4812
|
+
const detail = await api.get(`/experiments/${experimentId}/analysis-artifacts/${artifactId}`);
|
|
4813
|
+
if (token !== detailToken) return null;
|
|
4814
|
+
selectedDetail.value = detail;
|
|
4815
|
+
request.markLoaded();
|
|
4816
|
+
return detail;
|
|
4817
|
+
} catch (err) {
|
|
4818
|
+
if (token !== detailToken) return null;
|
|
4819
|
+
request.setError(err);
|
|
4820
|
+
return null;
|
|
4821
|
+
} finally {
|
|
4822
|
+
loadingCount.value -= 1;
|
|
4823
|
+
}
|
|
4824
|
+
}
|
|
4825
|
+
async function mutate(action, operation) {
|
|
4826
|
+
const experimentId = currentExperimentIdOrError(action);
|
|
4827
|
+
if (experimentId === void 0) return null;
|
|
4828
|
+
mutatingCount.value += 1;
|
|
4829
|
+
request.clearError();
|
|
4830
|
+
try {
|
|
4831
|
+
const summary = await operation(experimentId);
|
|
4832
|
+
replaceArtifact(summary);
|
|
4833
|
+
request.markSaved();
|
|
4834
|
+
return summary;
|
|
4835
|
+
} catch (err) {
|
|
4836
|
+
request.setError(err);
|
|
4837
|
+
return null;
|
|
4838
|
+
} finally {
|
|
4839
|
+
mutatingCount.value -= 1;
|
|
4840
|
+
}
|
|
4841
|
+
}
|
|
4842
|
+
async function updateMetadata(artifactId, updates) {
|
|
4843
|
+
return mutate("updating artifact metadata", (experimentId) => api.patch(`/experiments/${experimentId}/analysis-artifacts/${artifactId}`, updates));
|
|
4844
|
+
}
|
|
4845
|
+
async function archive(artifactId) {
|
|
4846
|
+
return mutate("archiving an analysis artifact", (experimentId) => api.post(`/experiments/${experimentId}/analysis-artifacts/${artifactId}/archive`));
|
|
4847
|
+
}
|
|
4848
|
+
async function restore(artifactId) {
|
|
4849
|
+
return mutate("restoring an analysis artifact", (experimentId) => api.post(`/experiments/${experimentId}/analysis-artifacts/${artifactId}/restore`));
|
|
4850
|
+
}
|
|
4851
|
+
function hasArtifactKey(artifactKey) {
|
|
4852
|
+
return artifacts.value.some((artifact) => artifact.artifact_key === artifactKey);
|
|
4853
|
+
}
|
|
4854
|
+
/** Drop experiment-scoped state and orphan every in-flight response. */
|
|
4855
|
+
function clear() {
|
|
4856
|
+
listToken += 1;
|
|
4857
|
+
detailToken += 1;
|
|
4858
|
+
fetchedArtifacts.value = [];
|
|
4859
|
+
selectedDetail.value = null;
|
|
4860
|
+
request.clearError();
|
|
4861
|
+
}
|
|
4862
|
+
watch([currentExperimentId, needsArchived], ([experimentId], [previousExperimentId]) => {
|
|
4863
|
+
if (experimentId !== previousExperimentId) clear();
|
|
4864
|
+
if (experimentId === void 0) return;
|
|
4865
|
+
if (options.immediate || hasRequestedList.value) list();
|
|
4866
|
+
}, { immediate: options.immediate });
|
|
4867
|
+
return {
|
|
4868
|
+
artifacts,
|
|
4869
|
+
visibleArtifacts,
|
|
4870
|
+
selectedDetail,
|
|
4871
|
+
currentExperimentId,
|
|
4872
|
+
hasCurrentExperiment,
|
|
4873
|
+
isLoading,
|
|
4874
|
+
isMutating,
|
|
4875
|
+
error: request.error,
|
|
4876
|
+
lastLoadedAt: request.lastLoadedAt,
|
|
4877
|
+
search,
|
|
4878
|
+
statusFilter,
|
|
4879
|
+
pluginFilter,
|
|
4880
|
+
list,
|
|
4881
|
+
refresh: list,
|
|
4882
|
+
getDetail,
|
|
4883
|
+
updateMetadata,
|
|
4884
|
+
archive,
|
|
4885
|
+
restore,
|
|
4886
|
+
hasArtifactKey,
|
|
4887
|
+
clear
|
|
4888
|
+
};
|
|
4889
|
+
}
|
|
4890
|
+
//#endregion
|
|
4891
|
+
//#region src/components/ArtifactSelectorModal.vue?vue&type=script&setup=true&lang.ts
|
|
4892
|
+
var _hoisted_1$6 = { class: "mint-artifact-selector__filters-row" };
|
|
4893
|
+
var _hoisted_2$5 = { class: "mint-artifact-selector__search" };
|
|
4894
|
+
var _hoisted_3$4 = { class: "mint-artifact-selector__filter-select" };
|
|
4895
|
+
var _hoisted_4$4 = {
|
|
4896
|
+
key: 0,
|
|
4897
|
+
class: "mint-artifact-selector__filter-select"
|
|
4898
|
+
};
|
|
4899
|
+
var _hoisted_5$3 = {
|
|
4900
|
+
key: 0,
|
|
4901
|
+
class: "mint-artifact-selector__skeleton"
|
|
4902
|
+
};
|
|
4903
|
+
var _hoisted_6$3 = { class: "mint-artifact-selector__skeleton-content" };
|
|
4904
|
+
var _hoisted_7$3 = {
|
|
4905
|
+
key: 1,
|
|
4906
|
+
class: "mint-artifact-selector__error"
|
|
4907
|
+
};
|
|
4908
|
+
var _hoisted_8$3 = [
|
|
4909
|
+
"id",
|
|
4910
|
+
"aria-selected",
|
|
4911
|
+
"onClick",
|
|
4912
|
+
"onMouseenter"
|
|
4913
|
+
];
|
|
4914
|
+
var _hoisted_9$2 = { class: "mint-artifact-selector__row-content" };
|
|
4915
|
+
var _hoisted_10$2 = { class: "mint-artifact-selector__name" };
|
|
4916
|
+
var _hoisted_11$2 = { class: "mint-artifact-selector__key" };
|
|
4917
|
+
var _hoisted_12$2 = { class: "mint-artifact-selector__meta" };
|
|
4918
|
+
var _hoisted_13$1 = { class: "mint-artifact-selector__plugin" };
|
|
4919
|
+
var _hoisted_14$1 = { class: "mint-artifact-selector__row-side" };
|
|
4920
|
+
var _hoisted_15$1 = ["disabled", "onClick"];
|
|
4921
|
+
var _hoisted_16$1 = ["disabled", "onClick"];
|
|
4922
|
+
var LISTBOX_ID = "mint-artifact-selector-listbox";
|
|
4923
|
+
//#endregion
|
|
4924
|
+
//#region src/components/ArtifactSelectorModal.vue
|
|
4925
|
+
var ArtifactSelectorModal_default = /* @__PURE__ */ defineComponent({
|
|
4926
|
+
__name: "ArtifactSelectorModal",
|
|
4927
|
+
props: {
|
|
4928
|
+
modelValue: { type: Boolean },
|
|
4929
|
+
experimentId: { default: null },
|
|
4930
|
+
pluginId: { default: null },
|
|
4931
|
+
currentArtifactId: { default: null },
|
|
4932
|
+
includeArchived: {
|
|
4933
|
+
type: Boolean,
|
|
4934
|
+
default: false
|
|
4935
|
+
},
|
|
4936
|
+
fetchDetailOnSelect: {
|
|
4937
|
+
type: Boolean,
|
|
4938
|
+
default: false
|
|
4939
|
+
},
|
|
4940
|
+
title: { default: "Select Analysis Artifact" },
|
|
4941
|
+
size: { default: "full" }
|
|
4942
|
+
},
|
|
4943
|
+
emits: [
|
|
4944
|
+
"update:modelValue",
|
|
4945
|
+
"select",
|
|
4946
|
+
"selectDetail",
|
|
4947
|
+
"archive",
|
|
4948
|
+
"restore"
|
|
4949
|
+
],
|
|
4950
|
+
setup(__props, { emit: __emit }) {
|
|
4951
|
+
/** Modal for browsing and selecting an analysis artifact of an experiment, with filters and keyboard nav. */
|
|
4952
|
+
const props = __props;
|
|
4953
|
+
const emit = __emit;
|
|
4954
|
+
const { artifacts, visibleArtifacts, isLoading, isMutating, error, search, statusFilter, pluginFilter, list, getDetail, archive, restore } = useAnalysisArtifacts({
|
|
4955
|
+
experimentId: () => props.experimentId ?? void 0,
|
|
4956
|
+
pluginId: () => props.pluginId,
|
|
4957
|
+
includeArchived: () => props.includeArchived
|
|
4958
|
+
});
|
|
4959
|
+
const injectedContext = getInjectedPlatformContext();
|
|
4960
|
+
const canManage = computed(() => {
|
|
4961
|
+
const user = injectedContext?.user;
|
|
4962
|
+
return user ? hasAllPermissions(user, ["experiments.edit"]) : true;
|
|
4963
|
+
});
|
|
4964
|
+
const STATUS_FILTER_OPTIONS = [
|
|
4965
|
+
{
|
|
4966
|
+
value: "active",
|
|
4967
|
+
label: "Active"
|
|
4968
|
+
},
|
|
4969
|
+
{
|
|
4970
|
+
value: "archived",
|
|
4971
|
+
label: "Archived"
|
|
4972
|
+
},
|
|
4973
|
+
{
|
|
4974
|
+
value: "all",
|
|
4975
|
+
label: "All statuses"
|
|
4976
|
+
}
|
|
4977
|
+
];
|
|
4978
|
+
const pluginFilterOptions = computed(() => [{
|
|
4979
|
+
value: "",
|
|
4980
|
+
label: "All plugins"
|
|
4981
|
+
}, ...[...new Set(artifacts.value.map((artifact) => artifact.plugin_id))].sort().map((pluginId) => ({
|
|
4982
|
+
value: pluginId,
|
|
4983
|
+
label: pluginId
|
|
4984
|
+
}))]);
|
|
4985
|
+
const canChoosePlugin = computed(() => !props.pluginId && pluginFilterOptions.value.length > 2);
|
|
4986
|
+
const activeIndex = ref(-1);
|
|
4987
|
+
const listRef = ref(null);
|
|
4988
|
+
function optionId(artifact) {
|
|
4989
|
+
return `mint-artifact-option-${artifact.id}`;
|
|
4990
|
+
}
|
|
4991
|
+
const activeDescendantId = computed(() => {
|
|
4992
|
+
const artifact = visibleArtifacts.value[activeIndex.value];
|
|
4993
|
+
return activeIndex.value >= 0 && artifact ? optionId(artifact) : void 0;
|
|
4994
|
+
});
|
|
4995
|
+
const hasResults = computed(() => !isLoading.value && !error.value && visibleArtifacts.value.length > 0);
|
|
4996
|
+
function statusVariant(status) {
|
|
4997
|
+
return status === "archived" ? "warning" : "success";
|
|
4998
|
+
}
|
|
4999
|
+
function formatArtifactDate(artifact) {
|
|
5000
|
+
const date = artifact.updated_at ?? artifact.created_at;
|
|
5001
|
+
return date ? formatExperimentDate(date) : "";
|
|
5002
|
+
}
|
|
5003
|
+
async function handleSelect(artifact) {
|
|
5004
|
+
if (props.fetchDetailOnSelect) {
|
|
5005
|
+
const detail = await getDetail(artifact.id);
|
|
5006
|
+
if (!detail) return;
|
|
5007
|
+
emit("selectDetail", detail);
|
|
5008
|
+
}
|
|
5009
|
+
emit("select", artifact);
|
|
5010
|
+
emit("update:modelValue", false);
|
|
5011
|
+
}
|
|
5012
|
+
async function handleArchive(artifact) {
|
|
5013
|
+
const archived = await archive(artifact.id);
|
|
5014
|
+
if (archived) emit("archive", archived);
|
|
5015
|
+
}
|
|
5016
|
+
async function handleRestore(artifact) {
|
|
5017
|
+
const restored = await restore(artifact.id);
|
|
5018
|
+
if (restored) emit("restore", restored);
|
|
5019
|
+
}
|
|
5020
|
+
function handleKeydown(event) {
|
|
5021
|
+
const rows = visibleArtifacts.value;
|
|
5022
|
+
if (!rows.length) return;
|
|
5023
|
+
if (event.target?.closest(".mint-artifact-selector__action")) return;
|
|
5024
|
+
switch (event.key) {
|
|
5025
|
+
case "ArrowDown":
|
|
5026
|
+
event.preventDefault();
|
|
5027
|
+
activeIndex.value = Math.min(activeIndex.value + 1, rows.length - 1);
|
|
5028
|
+
scrollActiveIntoView();
|
|
5029
|
+
break;
|
|
5030
|
+
case "ArrowUp":
|
|
5031
|
+
event.preventDefault();
|
|
5032
|
+
activeIndex.value = Math.max(activeIndex.value - 1, 0);
|
|
5033
|
+
scrollActiveIntoView();
|
|
5034
|
+
break;
|
|
5035
|
+
case "Enter":
|
|
5036
|
+
event.preventDefault();
|
|
5037
|
+
if (activeIndex.value >= 0 && activeIndex.value < rows.length) handleSelect(rows[activeIndex.value]);
|
|
5038
|
+
break;
|
|
5039
|
+
}
|
|
5040
|
+
}
|
|
5041
|
+
function scrollActiveIntoView() {
|
|
5042
|
+
nextTick(() => {
|
|
5043
|
+
(listRef.value?.querySelector(".mint-artifact-selector__row--focused"))?.scrollIntoView({ block: "nearest" });
|
|
5044
|
+
});
|
|
5045
|
+
}
|
|
5046
|
+
watch(visibleArtifacts, () => {
|
|
5047
|
+
activeIndex.value = -1;
|
|
5048
|
+
});
|
|
5049
|
+
watch(() => props.modelValue, (isOpen) => {
|
|
5050
|
+
if (isOpen) {
|
|
5051
|
+
activeIndex.value = -1;
|
|
5052
|
+
statusFilter.value = props.includeArchived ? "all" : "active";
|
|
5053
|
+
list();
|
|
5054
|
+
}
|
|
5055
|
+
}, { immediate: true });
|
|
5056
|
+
return (_ctx, _cache) => {
|
|
5057
|
+
return openBlock(), createBlock(BaseModal_default, {
|
|
5058
|
+
"model-value": __props.modelValue,
|
|
5059
|
+
title: __props.title,
|
|
5060
|
+
size: __props.size,
|
|
5061
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => emit("update:modelValue", $event))
|
|
5062
|
+
}, {
|
|
5063
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
5064
|
+
class: "mint-artifact-selector",
|
|
5065
|
+
onKeydown: handleKeydown
|
|
5066
|
+
}, [createElementVNode("div", _hoisted_1$6, [
|
|
5067
|
+
createElementVNode("div", _hoisted_2$5, [createVNode(BaseInput_default, {
|
|
5068
|
+
modelValue: unref(search),
|
|
5069
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(search) ? search.value = $event : null),
|
|
5070
|
+
placeholder: "Search artifacts...",
|
|
5071
|
+
size: "sm",
|
|
5072
|
+
type: "search",
|
|
5073
|
+
role: "combobox",
|
|
5074
|
+
"aria-label": "Search analysis artifacts",
|
|
5075
|
+
"aria-expanded": hasResults.value,
|
|
5076
|
+
"aria-controls": LISTBOX_ID,
|
|
5077
|
+
"aria-activedescendant": activeDescendantId.value
|
|
5078
|
+
}, null, 8, [
|
|
5079
|
+
"modelValue",
|
|
5080
|
+
"aria-expanded",
|
|
5081
|
+
"aria-activedescendant"
|
|
5082
|
+
])]),
|
|
5083
|
+
createElementVNode("div", _hoisted_3$4, [createVNode(BaseSelect_default, {
|
|
5084
|
+
"model-value": unref(statusFilter),
|
|
5085
|
+
options: STATUS_FILTER_OPTIONS,
|
|
5086
|
+
size: "sm",
|
|
5087
|
+
"aria-label": "Filter by status",
|
|
5088
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = (v) => statusFilter.value = v)
|
|
5089
|
+
}, null, 8, ["model-value"])]),
|
|
5090
|
+
canChoosePlugin.value ? (openBlock(), createElementBlock("div", _hoisted_4$4, [createVNode(BaseSelect_default, {
|
|
5091
|
+
"model-value": unref(pluginFilter) ?? "",
|
|
5092
|
+
options: pluginFilterOptions.value,
|
|
5093
|
+
size: "sm",
|
|
5094
|
+
"aria-label": "Filter by plugin",
|
|
5095
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = (v) => pluginFilter.value = String(v) || null)
|
|
5096
|
+
}, null, 8, ["model-value", "options"])])) : createCommentVNode("", true)
|
|
5097
|
+
]), unref(isLoading) ? (openBlock(), createElementBlock("div", _hoisted_5$3, [(openBlock(), createElementBlock(Fragment, null, renderList(4, (n) => {
|
|
5098
|
+
return createElementVNode("div", {
|
|
5099
|
+
key: n,
|
|
5100
|
+
class: "mint-artifact-selector__skeleton-row"
|
|
5101
|
+
}, [createElementVNode("div", _hoisted_6$3, [createVNode(Skeleton_default, {
|
|
5102
|
+
width: 120 + n * 20,
|
|
5103
|
+
height: "14px"
|
|
5104
|
+
}, null, 8, ["width"]), createVNode(Skeleton_default, {
|
|
5105
|
+
width: "80px",
|
|
5106
|
+
height: "10px"
|
|
5107
|
+
})]), createVNode(Skeleton_default, {
|
|
5108
|
+
width: "60px",
|
|
5109
|
+
height: "20px",
|
|
5110
|
+
variant: "rounded"
|
|
5111
|
+
})]);
|
|
5112
|
+
}), 64))])) : unref(error) ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(unref(error)), 1)) : unref(visibleArtifacts).length === 0 ? (openBlock(), createBlock(EmptyState_default, {
|
|
5113
|
+
key: 2,
|
|
5114
|
+
title: "No analysis artifacts found",
|
|
5115
|
+
description: "Artifacts appear here once an analysis saves results for this experiment.",
|
|
5116
|
+
size: "sm"
|
|
5117
|
+
})) : (openBlock(), createElementBlock("div", {
|
|
5118
|
+
key: 3,
|
|
5119
|
+
id: LISTBOX_ID,
|
|
5120
|
+
ref_key: "listRef",
|
|
5121
|
+
ref: listRef,
|
|
5122
|
+
class: "mint-artifact-selector__list",
|
|
5123
|
+
role: "listbox",
|
|
5124
|
+
"aria-label": "Analysis artifacts"
|
|
5125
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(visibleArtifacts), (artifact, idx) => {
|
|
5126
|
+
return openBlock(), createElementBlock("div", {
|
|
5127
|
+
id: optionId(artifact),
|
|
5128
|
+
key: artifact.id,
|
|
5129
|
+
class: normalizeClass(["mint-artifact-selector__row", {
|
|
5130
|
+
"mint-artifact-selector__row--active": artifact.id === __props.currentArtifactId,
|
|
5131
|
+
"mint-artifact-selector__row--focused": idx === activeIndex.value,
|
|
5132
|
+
"mint-artifact-selector__row--archived": artifact.status === "archived"
|
|
5133
|
+
}]),
|
|
5134
|
+
role: "option",
|
|
5135
|
+
"aria-selected": artifact.id === __props.currentArtifactId,
|
|
5136
|
+
onClick: ($event) => handleSelect(artifact),
|
|
5137
|
+
onMouseenter: ($event) => activeIndex.value = idx
|
|
5138
|
+
}, [createElementVNode("div", _hoisted_9$2, [createElementVNode("div", _hoisted_10$2, [createTextVNode(toDisplayString(artifact.display_name) + " ", 1), createElementVNode("code", _hoisted_11$2, toDisplayString(artifact.artifact_key), 1)]), createElementVNode("div", _hoisted_12$2, [
|
|
5139
|
+
createElementVNode("span", _hoisted_13$1, toDisplayString(artifact.plugin_id), 1),
|
|
5140
|
+
createElementVNode("span", null, toDisplayString(artifact.result_keys.length) + " result" + toDisplayString(artifact.result_keys.length === 1 ? "" : "s"), 1),
|
|
5141
|
+
createElementVNode("span", null, toDisplayString(formatArtifactDate(artifact)), 1)
|
|
5142
|
+
])]), createElementVNode("div", _hoisted_14$1, [createVNode(BasePill_default, {
|
|
5143
|
+
variant: statusVariant(artifact.status),
|
|
5144
|
+
size: "sm"
|
|
5145
|
+
}, {
|
|
5146
|
+
default: withCtx(() => [createTextVNode(toDisplayString(artifact.status), 1)]),
|
|
5147
|
+
_: 2
|
|
5148
|
+
}, 1032, ["variant"]), canManage.value && artifact.status === "active" ? (openBlock(), createElementBlock("button", {
|
|
5149
|
+
key: 0,
|
|
5150
|
+
type: "button",
|
|
5151
|
+
class: "mint-artifact-selector__action",
|
|
5152
|
+
disabled: unref(isMutating),
|
|
5153
|
+
onClick: withModifiers(($event) => handleArchive(artifact), ["stop"])
|
|
5154
|
+
}, " Archive ", 8, _hoisted_15$1)) : canManage.value && artifact.status === "archived" ? (openBlock(), createElementBlock("button", {
|
|
5155
|
+
key: 1,
|
|
5156
|
+
type: "button",
|
|
5157
|
+
class: "mint-artifact-selector__action",
|
|
5158
|
+
disabled: unref(isMutating),
|
|
5159
|
+
onClick: withModifiers(($event) => handleRestore(artifact), ["stop"])
|
|
5160
|
+
}, " Restore ", 8, _hoisted_16$1)) : createCommentVNode("", true)])], 42, _hoisted_8$3);
|
|
5161
|
+
}), 128))], 512))], 32)]),
|
|
5162
|
+
_: 1
|
|
5163
|
+
}, 8, [
|
|
5164
|
+
"model-value",
|
|
5165
|
+
"title",
|
|
5166
|
+
"size"
|
|
5167
|
+
]);
|
|
5168
|
+
};
|
|
5169
|
+
}
|
|
5170
|
+
});
|
|
5171
|
+
//#endregion
|
|
5172
|
+
//#region src/components/GeneratedPathInput.vue?vue&type=script&setup=true&lang.ts
|
|
5173
|
+
var _hoisted_1$5 = { class: "mint-generated-path-input" };
|
|
5174
|
+
var _hoisted_2$4 = {
|
|
5175
|
+
class: "mint-generated-path-input__modes",
|
|
5176
|
+
role: "group",
|
|
5177
|
+
"aria-label": "Path type"
|
|
5178
|
+
};
|
|
5179
|
+
var GeneratedPathInput_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5180
|
+
__name: "GeneratedPathInput",
|
|
5181
|
+
props: {
|
|
5182
|
+
modelValue: {},
|
|
5183
|
+
disabled: { type: Boolean },
|
|
5184
|
+
multiple: { type: Boolean }
|
|
5185
|
+
},
|
|
5186
|
+
emits: ["update:modelValue"],
|
|
5187
|
+
setup(__props, { emit: __emit }) {
|
|
5188
|
+
const props = __props;
|
|
5189
|
+
const emit = __emit;
|
|
5190
|
+
const mode = ref("file");
|
|
5191
|
+
const artifactOpen = ref(false);
|
|
5192
|
+
const artifactLoading = ref(false);
|
|
5193
|
+
const artifactError = ref("");
|
|
5194
|
+
const platform = getInjectedPlatformContext();
|
|
5195
|
+
const experimentId = resolveCurrentExperimentId(platform);
|
|
5196
|
+
const canSelectArtifact = computed(() => Boolean(platform?.isIntegrated && experimentId));
|
|
5197
|
+
const transport = createGeneratedAnalysisTransport();
|
|
5198
|
+
function selectMode(nextMode) {
|
|
5199
|
+
mode.value = nextMode;
|
|
5200
|
+
emit("update:modelValue", null);
|
|
5201
|
+
}
|
|
5202
|
+
function selectFiles(files, rootName, relativePaths) {
|
|
5203
|
+
const paths = relativePaths ?? files.map((file) => file.name);
|
|
5204
|
+
const selections = props.multiple && !rootName ? files.map((file, index) => ({
|
|
5205
|
+
kind: "path",
|
|
5206
|
+
files: [file],
|
|
5207
|
+
relativePaths: [paths[index] ?? file.name]
|
|
5208
|
+
})) : [{
|
|
5209
|
+
kind: "path",
|
|
5210
|
+
files,
|
|
5211
|
+
relativePaths: paths,
|
|
5212
|
+
...rootName ? { rootName } : {}
|
|
5213
|
+
}];
|
|
5214
|
+
if (props.multiple) emit("update:modelValue", [...Array.isArray(props.modelValue) ? props.modelValue : [], ...selections]);
|
|
5215
|
+
else emit("update:modelValue", selections[0] ?? null);
|
|
5216
|
+
}
|
|
5217
|
+
function removeFiles(files) {
|
|
5218
|
+
const removed = new Set(files);
|
|
5219
|
+
const remaining = (Array.isArray(props.modelValue) ? props.modelValue : props.modelValue ? [props.modelValue] : []).flatMap((selection) => {
|
|
5220
|
+
const indexes = selection.files.map((file, index) => removed.has(file) ? -1 : index).filter((index) => index >= 0);
|
|
5221
|
+
if (!indexes.length) return [];
|
|
5222
|
+
return [{
|
|
5223
|
+
...selection,
|
|
5224
|
+
files: indexes.map((index) => selection.files[index]),
|
|
5225
|
+
relativePaths: indexes.map((index) => selection.relativePaths[index])
|
|
5226
|
+
}];
|
|
5227
|
+
});
|
|
5228
|
+
emit("update:modelValue", props.multiple ? remaining : remaining[0] ?? null);
|
|
5229
|
+
}
|
|
5230
|
+
async function selectArtifact(detail) {
|
|
5231
|
+
artifactLoading.value = true;
|
|
5232
|
+
artifactError.value = "";
|
|
5233
|
+
try {
|
|
5234
|
+
const reference = artifactFileReference(detail);
|
|
5235
|
+
const resolvedExperimentId = reference.experiment_id ?? detail.experiment_id;
|
|
5236
|
+
const pluginId = reference.plugin_id ?? detail.plugin_id;
|
|
5237
|
+
const response = await transport(`${(platform?.platformApiUrl ?? "/api").replace(/\/$/, "")}/experiments/${resolvedExperimentId}/objects/${reference.key.split("/").map(encodeURIComponent).join("/")}?plugin_id=${encodeURIComponent(pluginId)}&format=raw`, { method: "GET" });
|
|
5238
|
+
if (!response.ok) throw new Error(`Artifact download failed (${response.status})`);
|
|
5239
|
+
const resultFilename = String(detail.result.filename ?? "");
|
|
5240
|
+
const keySegments = reference.key.split("/");
|
|
5241
|
+
const filename = reference.filename || resultFilename || keySegments[keySegments.length - 1] || "artifact.bin";
|
|
5242
|
+
const contentType = reference.content_type ?? response.headers.get("Content-Type") ?? "application/octet-stream";
|
|
5243
|
+
selectFiles([new File([await response.blob()], filename, { type: contentType })], void 0, [filename]);
|
|
5244
|
+
} catch (cause) {
|
|
5245
|
+
artifactError.value = cause instanceof Error ? cause.message : "Failed to load artifact";
|
|
5246
|
+
} finally {
|
|
5247
|
+
artifactLoading.value = false;
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
5250
|
+
function artifactFileReference(detail) {
|
|
5251
|
+
if (detail.result.schema_version !== "mint.analysis_file.v1") throw new Error("Only file-backed analysis artifacts can be used as a path");
|
|
5252
|
+
const reference = detail.result.file;
|
|
5253
|
+
if (!reference || typeof reference !== "object" || !("key" in reference)) throw new Error("The selected artifact has no file reference");
|
|
5254
|
+
const candidate = reference;
|
|
5255
|
+
if (typeof candidate.key !== "string" || !candidate.key) throw new Error("The selected artifact has no object key");
|
|
5256
|
+
return {
|
|
5257
|
+
key: candidate.key,
|
|
5258
|
+
...typeof candidate.plugin_id === "string" ? { plugin_id: candidate.plugin_id } : {},
|
|
5259
|
+
...typeof candidate.experiment_id === "number" ? { experiment_id: candidate.experiment_id } : {},
|
|
5260
|
+
...typeof candidate.filename === "string" ? { filename: candidate.filename } : {},
|
|
5261
|
+
...typeof candidate.content_type === "string" ? { content_type: candidate.content_type } : {}
|
|
5262
|
+
};
|
|
5263
|
+
}
|
|
5264
|
+
return (_ctx, _cache) => {
|
|
5265
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
5266
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
5267
|
+
createVNode(BaseButton_default, {
|
|
5268
|
+
size: "sm",
|
|
5269
|
+
variant: mode.value === "file" ? "primary" : "secondary",
|
|
5270
|
+
disabled: __props.disabled,
|
|
5271
|
+
onClick: _cache[0] || (_cache[0] = ($event) => selectMode("file"))
|
|
5272
|
+
}, {
|
|
5273
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" File ", -1)])]),
|
|
5274
|
+
_: 1
|
|
5275
|
+
}, 8, ["variant", "disabled"]),
|
|
5276
|
+
createVNode(BaseButton_default, {
|
|
5277
|
+
size: "sm",
|
|
5278
|
+
variant: mode.value === "folder" ? "primary" : "secondary",
|
|
5279
|
+
disabled: __props.disabled,
|
|
5280
|
+
onClick: _cache[1] || (_cache[1] = ($event) => selectMode("folder"))
|
|
5281
|
+
}, {
|
|
5282
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" Folder ", -1)])]),
|
|
5283
|
+
_: 1
|
|
5284
|
+
}, 8, ["variant", "disabled"]),
|
|
5285
|
+
canSelectArtifact.value ? (openBlock(), createBlock(BaseButton_default, {
|
|
5286
|
+
key: 0,
|
|
5287
|
+
size: "sm",
|
|
5288
|
+
variant: "secondary",
|
|
5289
|
+
disabled: __props.disabled,
|
|
5290
|
+
loading: artifactLoading.value,
|
|
5291
|
+
onClick: _cache[2] || (_cache[2] = ($event) => artifactOpen.value = true)
|
|
5292
|
+
}, {
|
|
5293
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" Existing artifact ", -1)])]),
|
|
5294
|
+
_: 1
|
|
5295
|
+
}, 8, ["disabled", "loading"])) : createCommentVNode("", true)
|
|
5296
|
+
]),
|
|
5297
|
+
(openBlock(), createBlock(FileUploader_default, {
|
|
5298
|
+
key: mode.value,
|
|
5299
|
+
mode: mode.value,
|
|
5300
|
+
multiple: __props.multiple && mode.value === "file",
|
|
5301
|
+
disabled: __props.disabled,
|
|
5302
|
+
onUpload: selectFiles,
|
|
5303
|
+
onRemove: removeFiles
|
|
5304
|
+
}, null, 8, [
|
|
5305
|
+
"mode",
|
|
5306
|
+
"multiple",
|
|
5307
|
+
"disabled"
|
|
5308
|
+
])),
|
|
5309
|
+
artifactError.value ? (openBlock(), createBlock(AlertBox_default, {
|
|
5310
|
+
key: 0,
|
|
5311
|
+
type: "error",
|
|
5312
|
+
message: artifactError.value
|
|
5313
|
+
}, null, 8, ["message"])) : createCommentVNode("", true),
|
|
5314
|
+
canSelectArtifact.value ? (openBlock(), createBlock(ArtifactSelectorModal_default, {
|
|
5315
|
+
key: 1,
|
|
5316
|
+
modelValue: artifactOpen.value,
|
|
5317
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => artifactOpen.value = $event),
|
|
5318
|
+
"experiment-id": unref(experimentId),
|
|
5319
|
+
"fetch-detail-on-select": true,
|
|
5320
|
+
title: "Select a file artifact",
|
|
5321
|
+
onSelectDetail: selectArtifact
|
|
5322
|
+
}, null, 8, ["modelValue", "experiment-id"])) : createCommentVNode("", true)
|
|
5323
|
+
]);
|
|
5324
|
+
};
|
|
5325
|
+
}
|
|
5326
|
+
});
|
|
5327
|
+
//#endregion
|
|
5328
|
+
//#region \0plugin-vue:export-helper
|
|
5329
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
5330
|
+
const target = sfc.__vccOpts || sfc;
|
|
5331
|
+
for (const [key, val] of props) target[key] = val;
|
|
5332
|
+
return target;
|
|
5333
|
+
};
|
|
5334
|
+
//#endregion
|
|
5335
|
+
//#region src/components/GeneratedPathInput.vue
|
|
5336
|
+
var GeneratedPathInput_default = /* @__PURE__ */ _plugin_vue_export_helper_default(GeneratedPathInput_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-9011f2f2"]]);
|
|
5337
|
+
//#endregion
|
|
3662
5338
|
//#region src/composables/useChemicalFormula.ts
|
|
3663
5339
|
var ATOMIC_WEIGHTS = {
|
|
3664
5340
|
H: 1.008,
|
|
@@ -5149,6 +6825,11 @@ var registry = {
|
|
|
5149
6825
|
defaults: {},
|
|
5150
6826
|
vModel: false
|
|
5151
6827
|
},
|
|
6828
|
+
path: {
|
|
6829
|
+
component: GeneratedPathInput_default,
|
|
6830
|
+
defaults: {},
|
|
6831
|
+
vModel: true
|
|
6832
|
+
},
|
|
5152
6833
|
formula: {
|
|
5153
6834
|
component: FormulaInput_default,
|
|
5154
6835
|
defaults: {},
|
|
@@ -5951,6 +7632,6 @@ function useControlSchema(controls, options = {}) {
|
|
|
5951
7632
|
};
|
|
5952
7633
|
}
|
|
5953
7634
|
//#endregion
|
|
5954
|
-
export {
|
|
7635
|
+
export { resolveJobCapabilities as $, useConcentrationUnits as A, Tooltip_default as At, useAnalysisArtifacts as B, controlsToViewIds as C, MultiSelect_default as Ct, getTypeDefault as D, BaseRadioGroup_default as Dt, getFieldRegistryEntry as E, BaseSlider_default as Et, ATOMIC_WEIGHTS as F, createGeneratedAnalysisTransport as G, getInjectedPlatformContext as H, useChemicalFormula as I, isActiveJobStatus as J, useGeneratedAnalysis as K, GeneratedPathInput_default as L, SequenceInput_default as M, useSequenceUtils as N, ConcentrationInput_default as O, BaseToggle_default as Ot, FormulaInput_default as P, normalizeJobState as Q, _plugin_vue_export_helper_default as R, controlsToTopBarSettingsConfig as S, DatePicker_default as St, getDefaultControlView as T, useSelectionLimit as Tt, parseExperimentId as U, currentExperimentFromContext as V, resolveCurrentExperimentId as W, jobStatusLabel as X, isTerminalJobStatus as Y, normalizeJobPercent as Z, controlsToFormSchema as _, parseTime as _t, defineDoseCalculatorControlProps as a, TimePicker_default as at, controlsToSettingsSchema as b, toMinutes as bt, defineWellPlateDoseComponentBindings as c, durationMinutes as ct, defineControlModel as d, formatDuration as dt, DateTimePicker_default as et, resolveControlModel as f, formatTime as ft, mergeControlWorkspaceOptions as g, isTimeInRange as gt, controlValuesToComponentProps as h, generateTimeSlots as ht, useControlSchema as i, TagsInput_default as it, MoleculeInput_default as j, BaseTextarea_default as jt, UnitInput_default as k, BaseCheckbox_default as kt, defineWellPlateDoseControlProps as l, findAvailableSlots as lt, controlValuesToComponentBindingsById as m, fromMinutes as mt, defineControls as n, FileUploader_default as nt, defineDoseDesignControlModel as o, addMinutes as ot, controlValuesToComponentBindings as p, formatTimeSlot as pt, usePluginJobs as q, getControlDefaults as r, NumberInput_default as rt, defineWellPlateControlProps as s, compareTime as st, defineControlComponentBindings as t, AlertBox_default as tt, useControlWorkspace as u, findNearestTimeSlotIndex as ut, controlsToSectionFormSchema as v, rangesOverlap as vt, controlsToViewItems as w, useListSelection as wt, controlsToSidebarPanels as x, useTimeUtils as xt, controlsToSectionFormSchemas as y, snapToSlot as yt, ArtifactSelectorModal_default as z };
|
|
5955
7636
|
|
|
5956
|
-
//# sourceMappingURL=useControlSchema-
|
|
7637
|
+
//# sourceMappingURL=useControlSchema-Dallso-L.js.map
|