@morscherlab/mint-sdk 1.3.0-beta.5 → 1.3.0-beta.6
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/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +2 -2
- package/dist/{components-BTzcqrJp.js → components-C-CAD2Ma.js} +4 -4
- package/dist/components-C-CAD2Ma.js.map +1 -0
- package/dist/composables/index.js +3 -3
- package/dist/composables/usePlatformContext.d.ts +3 -0
- package/dist/{composables-Doqb7g1z.js → composables-BKhsoONv.js} +3 -3
- package/dist/{composables-Doqb7g1z.js.map → composables-BKhsoONv.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/install.js +1 -1
- package/dist/styles.css +22 -55
- package/dist/templates/index.js +1 -1
- package/dist/{templates-DgAG5kMq.js → templates-DcxyATPT.js} +30 -43
- package/dist/templates-DcxyATPT.js.map +1 -0
- package/dist/types/platform.d.ts +2 -0
- package/dist/{validation-DILksa0c.js → validation-kbTxfKYD.js} +2 -2
- package/dist/{validation-DILksa0c.js.map → validation-kbTxfKYD.js.map} +1 -1
- package/package.json +1 -1
- package/src/__tests__/components/AppTopBar.test.ts +8 -0
- package/src/__tests__/components/FileUploader.test.ts +6 -9
- package/src/__tests__/templates/templatesDeprecation.test.ts +8 -1
- package/src/components/AppTopBar.vue +4 -1
- package/src/components/FileUploader.vue +30 -46
- package/src/components/index.ts +3 -3
- package/src/styles/components/file-uploader.css +22 -55
- package/src/types/platform.ts +2 -0
- package/dist/components-BTzcqrJp.js.map +0 -1
- package/dist/templates-DgAG5kMq.js.map +0 -1
|
@@ -2588,8 +2588,7 @@ var _hoisted_3$6 = [
|
|
|
2588
2588
|
"webkitdirectory"
|
|
2589
2589
|
];
|
|
2590
2590
|
var _hoisted_4$6 = { class: "mint-file-uploader__content" };
|
|
2591
|
-
var _hoisted_5$5 = {
|
|
2592
|
-
var _hoisted_6$5 = {
|
|
2591
|
+
var _hoisted_5$5 = {
|
|
2593
2592
|
key: 0,
|
|
2594
2593
|
class: "mint-file-uploader__icon",
|
|
2595
2594
|
fill: "none",
|
|
@@ -2599,7 +2598,7 @@ var _hoisted_6$5 = {
|
|
|
2599
2598
|
"stroke-linejoin": "round",
|
|
2600
2599
|
viewBox: "0 0 24 24"
|
|
2601
2600
|
};
|
|
2602
|
-
var
|
|
2601
|
+
var _hoisted_6$5 = {
|
|
2603
2602
|
key: 1,
|
|
2604
2603
|
class: "mint-file-uploader__icon",
|
|
2605
2604
|
fill: "none",
|
|
@@ -2609,29 +2608,24 @@ var _hoisted_7$5 = {
|
|
|
2609
2608
|
"stroke-linejoin": "round",
|
|
2610
2609
|
viewBox: "0 0 24 24"
|
|
2611
2610
|
};
|
|
2612
|
-
var
|
|
2613
|
-
var
|
|
2614
|
-
var _hoisted_10$2 = {
|
|
2615
|
-
key: 0,
|
|
2616
|
-
class: "mint-file-uploader__formats"
|
|
2617
|
-
};
|
|
2618
|
-
var _hoisted_11$1 = {
|
|
2611
|
+
var _hoisted_7$5 = { class: "mint-file-uploader__text" };
|
|
2612
|
+
var _hoisted_8$5 = {
|
|
2619
2613
|
key: 0,
|
|
2620
2614
|
class: "mint-file-uploader__actions"
|
|
2621
2615
|
};
|
|
2622
|
-
var
|
|
2616
|
+
var _hoisted_9$3 = {
|
|
2623
2617
|
key: 1,
|
|
2624
2618
|
class: "mint-file-uploader__folder-summary"
|
|
2625
2619
|
};
|
|
2626
|
-
var
|
|
2627
|
-
var
|
|
2628
|
-
var
|
|
2629
|
-
var
|
|
2630
|
-
var
|
|
2631
|
-
var
|
|
2632
|
-
var
|
|
2633
|
-
var
|
|
2634
|
-
var
|
|
2620
|
+
var _hoisted_10$2 = { class: "mint-file-uploader__folder-info" };
|
|
2621
|
+
var _hoisted_11$1 = { class: "mint-file-uploader__folder-details" };
|
|
2622
|
+
var _hoisted_12$1 = { class: "mint-file-uploader__folder-name" };
|
|
2623
|
+
var _hoisted_13$1 = { class: "mint-file-uploader__folder-count" };
|
|
2624
|
+
var _hoisted_14$1 = { class: "mint-file-uploader__file-info" };
|
|
2625
|
+
var _hoisted_15$1 = { class: "mint-file-uploader__file-meta" };
|
|
2626
|
+
var _hoisted_16$1 = { class: "mint-file-uploader__file-name" };
|
|
2627
|
+
var _hoisted_17$1 = { class: "mint-file-uploader__file-size" };
|
|
2628
|
+
var _hoisted_18$1 = ["aria-label", "onClick"];
|
|
2635
2629
|
//#endregion
|
|
2636
2630
|
//#region src/components/FileUploader.vue
|
|
2637
2631
|
var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2666,7 +2660,6 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2666
2660
|
const props = __props;
|
|
2667
2661
|
const emit = __emit;
|
|
2668
2662
|
const isDragOver = ref(false);
|
|
2669
|
-
const dragCount = ref(0);
|
|
2670
2663
|
const inputRef = ref();
|
|
2671
2664
|
const selectedFiles = ref([]);
|
|
2672
2665
|
const folderName = ref(null);
|
|
@@ -2677,14 +2670,9 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2677
2670
|
}, { immediate: true });
|
|
2678
2671
|
const isFolder = computed(() => props.mode === "folder");
|
|
2679
2672
|
const isMixed = computed(() => props.mode === "file+folder");
|
|
2680
|
-
const
|
|
2681
|
-
if (
|
|
2682
|
-
|
|
2683
|
-
return `Release to add ${dragCount.value} file${dragCount.value === 1 ? "" : "s"}`;
|
|
2684
|
-
}
|
|
2685
|
-
if (isMixed.value) return "Drop files or a folder, or click to choose files";
|
|
2686
|
-
if (isFolder.value) return "Drop a folder, or click to choose";
|
|
2687
|
-
return props.multiple ? "Drop files, or click to choose" : "Drop a file, or click to choose";
|
|
2673
|
+
const acceptLabel = computed(() => {
|
|
2674
|
+
if (!props.accept) return isFolder.value ? "a folder" : "any file";
|
|
2675
|
+
return props.accept.split(",").map((a) => a.trim().replace(".", "").toUpperCase()).join(", ");
|
|
2688
2676
|
});
|
|
2689
2677
|
const maxSizeLabel = computed(() => {
|
|
2690
2678
|
if (!props.maxSize) return null;
|
|
@@ -2693,8 +2681,6 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2693
2681
|
if (props.maxSize >= 1024) return `${(props.maxSize / 1024).toFixed(1)} KB`;
|
|
2694
2682
|
return `${props.maxSize} bytes`;
|
|
2695
2683
|
});
|
|
2696
|
-
/** Accepted formats exactly as the caller wrote them, plus the size cap. */
|
|
2697
|
-
const formatsLabel = computed(() => [props.accept?.split(",").map((a) => a.trim()).filter(Boolean).join(" "), maxSizeLabel.value && `max ${maxSizeLabel.value}`].filter(Boolean).join(" · "));
|
|
2698
2684
|
const fileTypeMap = {
|
|
2699
2685
|
csv: {
|
|
2700
2686
|
color: "#10B981",
|
|
@@ -2903,10 +2889,7 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2903
2889
|
}
|
|
2904
2890
|
function handleDragOver(event) {
|
|
2905
2891
|
event.preventDefault();
|
|
2906
|
-
if (!props.disabled)
|
|
2907
|
-
isDragOver.value = true;
|
|
2908
|
-
dragCount.value = event.dataTransfer?.items?.length ?? 0;
|
|
2909
|
-
}
|
|
2892
|
+
if (!props.disabled) isDragOver.value = true;
|
|
2910
2893
|
}
|
|
2911
2894
|
function handleDragLeave() {
|
|
2912
2895
|
isDragOver.value = false;
|
|
@@ -2965,9 +2948,13 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2965
2948
|
webkitdirectory: isFolder.value || void 0,
|
|
2966
2949
|
class: "mint-file-uploader__input",
|
|
2967
2950
|
onChange: handleInputChange
|
|
2968
|
-
}, null, 40, _hoisted_3$6), createElementVNode("div", _hoisted_4$6, [
|
|
2969
|
-
|
|
2970
|
-
|
|
2951
|
+
}, null, 40, _hoisted_3$6), createElementVNode("div", _hoisted_4$6, [isFolder.value ? (openBlock(), createElementBlock("svg", _hoisted_5$5, [..._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$5, [..._cache[1] || (_cache[1] = [
|
|
2952
|
+
createElementVNode("path", { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" }, null, -1),
|
|
2953
|
+
createElementVNode("path", { d: "m16 16-4-4-4 4" }, null, -1),
|
|
2954
|
+
createElementVNode("path", { d: "M12 12v9" }, null, -1)
|
|
2955
|
+
])])), createElementVNode("p", _hoisted_7$5, toDisplayString(isMixed.value ? "Drop files or a folder, or click to choose files" : `Drop ${acceptLabel.value} or click`), 1)])], 42, _hoisted_2$6),
|
|
2956
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_8$5, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true),
|
|
2957
|
+
__props.showFiles && isFolder.value && folderName.value && selectedFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$3, [createElementVNode("div", _hoisted_10$2, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "mint-file-uploader__folder-icon-wrapper" }, [createElementVNode("svg", {
|
|
2971
2958
|
class: "mint-file-uploader__folder-icon",
|
|
2972
2959
|
fill: "none",
|
|
2973
2960
|
stroke: "currentColor",
|
|
@@ -2975,7 +2962,7 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2975
2962
|
"stroke-linecap": "round",
|
|
2976
2963
|
"stroke-linejoin": "round",
|
|
2977
2964
|
viewBox: "0 0 24 24"
|
|
2978
|
-
}, [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",
|
|
2965
|
+
}, [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$1, [createElementVNode("span", _hoisted_12$1, toDisplayString(folderName.value), 1), createElementVNode("span", _hoisted_13$1, toDisplayString(selectedFiles.value.length) + " file" + toDisplayString(selectedFiles.value.length !== 1 ? "s" : ""), 1)])]), createElementVNode("button", {
|
|
2979
2966
|
type: "button",
|
|
2980
2967
|
"aria-label": "Clear folder",
|
|
2981
2968
|
class: "mint-file-uploader__remove-btn",
|
|
@@ -2999,10 +2986,10 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
2999
2986
|
return openBlock(), createElementBlock("li", {
|
|
3000
2987
|
key: `${file.name}-${file.size}-${index}`,
|
|
3001
2988
|
class: "mint-file-uploader__file"
|
|
3002
|
-
}, [createElementVNode("div",
|
|
2989
|
+
}, [createElementVNode("div", _hoisted_14$1, [createElementVNode("span", {
|
|
3003
2990
|
class: "mint-file-uploader__file-badge",
|
|
3004
2991
|
style: normalizeStyle({ "--badge-color": getFileType(file.name).color })
|
|
3005
|
-
}, toDisplayString(getFileType(file.name).label), 5), createElementVNode("div",
|
|
2992
|
+
}, toDisplayString(getFileType(file.name).label), 5), createElementVNode("div", _hoisted_15$1, [createElementVNode("span", _hoisted_16$1, toDisplayString(file.name), 1), createElementVNode("span", _hoisted_17$1, toDisplayString(formatFileSize(file.size)), 1)])]), createElementVNode("button", {
|
|
3006
2993
|
type: "button",
|
|
3007
2994
|
"aria-label": `Remove ${file.name}`,
|
|
3008
2995
|
class: "mint-file-uploader__remove-btn",
|
|
@@ -3015,7 +3002,7 @@ var FileUploader_default = /* @__PURE__ */ defineComponent({
|
|
|
3015
3002
|
"stroke-linecap": "round",
|
|
3016
3003
|
"stroke-linejoin": "round",
|
|
3017
3004
|
viewBox: "0 0 24 24"
|
|
3018
|
-
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])], 8,
|
|
3005
|
+
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])], 8, _hoisted_18$1)]);
|
|
3019
3006
|
}), 128))]),
|
|
3020
3007
|
_: 1
|
|
3021
3008
|
})) : createCommentVNode("", true)
|
|
@@ -12314,4 +12301,4 @@ function getBioTemplateControlDefaults(target) {
|
|
|
12314
12301
|
//#endregion
|
|
12315
12302
|
export { toTimeCourseDataFrame as $, FormulaInput_default as $n, snapToSlot as $r, getBioTemplatePackInfo as $t, createSamplePrepTemplate as A, getControlDefaults as An, isPluginSecretLocked as Ar, toCalibrationCurveDataFrame as At, toBioTemplateComponentProps as B, getDefaultControlView as Bn, addMinutes$1 as Br, validateInstrumentRunData as Bt, createFlowCytometryPanelTemplate as C, SAMPLE_GROUP_TOKENS as Cn, FileUploader_default as Cr, toInstrumentRunRows as Ct, createTimeCourseTemplate as D, hslToHex as Dn, PLUGIN_SECRET_FORMAT_REF as Dr, toFlowPanelDataFrame as Dt, createProtocolStepsTemplate as E, hexToHsl as En, PLUGIN_SECRET_FORMAT_KEY as Er, toFlowPanelColumns as Et, getBioTemplateComponentProps as F, controlsToSettingsSchema as Fn, pluginSecretState as Fr, toAssayMatrixSampleOptions as Ft, toTemplateDataFrame as G, getFieldRegistryEntry as Gn, formatDuration as Gr, validateSamplePrepData as Gt, toBioTemplateComponentPropsById as H, omitUndefined as Hn, durationMinutes as Hr, validateProtocolStepsData as Ht, listBioTemplateComponentBindings as I, controlsToSidebarPanels as In, setPluginSecret as Ir, validateAssayMatrixData as It, toDoseConditions as J, UnitInput_default as Jn, fromMinutes as Jr, bioTemplatePresets as Jt, toWellMapArray as K, getTypeDefault as Kn, formatTime as Kr, validateSampleSheetData as Kt, toBioTemplateComponentBindings as L, controlsToTopBarSettingsConfig as Ln, usesPluginSecretReferences as Lr, validateCalibrationCurveData as Lt, createPlateMapTemplate as M, controlsToFormSchema as Mn, keepPluginSecret as Mr, toAssayMatrixColumns as Mt, bioTemplatePresetControlValuesToOptions as N, controlsToSectionFormSchema as Nn, pluginSecretId as Nr, toAssayMatrixDataFrame as Nt, createCalibrationCurveTemplate as O, defineControlComponentBindings as On, PLUGIN_SECRET_REF_KEY as Or, toFlowPanelRows as Ot, getBioTemplateComponentBindings as P, controlsToSectionFormSchemas as Pn, pluginSecretLabel as Pr, toAssayMatrixRows as Pt, toTimeCourseColumns as Q, useSequenceUtils as Qn, rangesOverlap as Qr, bioTemplatePacks as Qt, toBioTemplateComponentBindingsById as R, controlsToViewIds as Rn, TagsInput_default as Rr, validateDoseResponseData as Rt, createInstrumentRunTemplate as S, SAMPLE_COLOR_SCALE as Sn, _plugin_vue_export_helper_default as Sr, toInstrumentRunDataFrame as St, createAssayMatrixTemplate as T, deriveShade as Tn, SecretInput_default as Tr, toInstrumentRunSteps as Tt, toBioTemplateComponentSnippets as U, recordValue as Un, findAvailableSlots as Ur, validateQpcrPlateData as Ut, toBioTemplateComponentPropsByComponent as V, normalizeControlDefinition as Vn, compareTime as Vr, validatePlateMapData as Vt, toBioTemplateComponentUsage as W, replaceRecord as Wn, findNearestTimeSlotIndex as Wr, validateReagentListData as Wt, toPlateMapEditorState as X, MoleculeInput_default as Xn, isTimeInRange as Xr, listBioTemplatePresets as Xt, toDoseLayoutState as Y, useConcentrationUnits as Yn, generateTimeSlots as Yr, getBioTemplatePresetInfo as Yt, toWellPlateWells as Z, SequenceInput_default as Zn, parseTime as Zr, searchBioTemplatePresets as Zt, createElisaAssayCollection as _, createPlateRowLabels as _n, resolveJobCapabilities as _r, toProtocolColumns as _t, getBioTemplateControlDefaults as a, useListSelection as ai, searchBioTemplateCatalog as an, getInjectedPlatformContext as ar, toSampleRows as at, createQpcrExpressionCollection as b, rowIndex as bn, isRecord as br, toProtocolSteps as bt, listBioTemplatePresetControlSchemas as c, BaseRadioGroup_default as ci, createTemplateCollection as cn, resolveCurrentPluginId as cr, toSamplePrepRows as ct, createBioTemplatePresetCollectionFromControls as d, Tooltip_default as di, ensureTemplateFromCollection as dn, usePluginJobs as dr, toReagentListItems as dt, toMinutes as ei, listBioTemplatePacks as en, ATOMIC_WEIGHTS as er, toTimeCourseRows as et, createWellPlateScreenCollection as f, BaseTextarea_default as fi, extractTemplateCollection as fn, isActiveJobStatus as fr, toReagentRows as ft, createFlowCytometryAssayCollection as g, createPlateColumnLabels as gn, normalizeJobState as gr, toQpcrWellPlateWells as gt, createWesternBlotAssayCollection as h, WELL_PLATE_SIZE_CONFIGS as hn, normalizeJobPercent as hr, toQpcrRows as ht, createBioTemplateControlToolkit as i, MultiSelect_default as ii, listBioTemplateCatalog as in, currentExperimentFromContext as ir, toSampleOptions as it, createSampleSheetTemplate as j, useControlSchema as jn, isPluginSecretRef as jr, toCalibrationCurveRows as jt, createDoseResponseTemplate as k, defineControls as kn, clearPluginSecret as kr, toCalibrationCurveColumns as kt, requireBioTemplateControlSchema as l, BaseToggle_default as li, createTemplateEnvelope as ln, createGeneratedAnalysisTransport as lr, toReagentColumns as lt, createDefaultBioTemplate as m, PLATE_CONFIGS as mn, jobStatusLabel as mr, toQpcrDataFrame as mt, bioTemplateControlsToSectionFormSchemas as n, DatePicker_default as ni, bioTemplateCatalog as nn, GeneratedPathInput_default as nr, toSampleColumns as nt, getBioTemplateControlSchema as o, useSelectionLimit as oi, TEMPLATE_COLLECTION_KEY as on, parseExperimentId as or, toSamplePrepColumns as ot, createBioTemplatePackCollection as p, getTemplateData as pn, isTerminalJobStatus as pr, toQpcrColumns as pt, racksFromPlateState as q, ConcentrationInput_default as qn, formatTimeSlot as qr, validateTimeCourseData as qt, bioTemplateControlsToSidebarPanels as r, useDropdownState as ri, getBioTemplateInfo as rn, GENERATED_JOBS_API_KEY as rr, toSampleDataFrame as rt, listBioTemplateControlSchemas as s, BaseSlider_default as si, assertTemplateEnvelope as sn, resolveCurrentExperimentId as sr, toSamplePrepDataFrame as st, bioTemplateControlsToFormSchema as t, useTimeUtils as ti, searchBioTemplatePacks as tn, useChemicalFormula as tr, toTimeCourseSteps as tt, createBioTemplatePresetCollection as u, BaseCheckbox_default as ui, ensureTemplateEnvelope as un, useGeneratedAnalysis as ur, toReagentDataFrame as ut, createTargetedMetabolomicsCollection as v, createWellGrid as vn, useEventStream as vr, toProtocolDataFrame as vt, createReagentListTemplate as w, SLOT_ORDER as wn, NumberInput_default as wr, toInstrumentRunScheduleEvents as wt, createQpcrPlateTemplate as x, rowLabel as xn, useMenuKeyboard as xr, toInstrumentRunColumns as xt, createLcmsBatchCollection as y, getRectangleWellIds as yn, DateTimePicker_default as yr, toProtocolRows as yt, toBioTemplateComponentImports as z, controlsToViewItems as zn, TimePicker_default as zr, validateFlowCytometryPanelData as zt };
|
|
12316
12303
|
|
|
12317
|
-
//# sourceMappingURL=templates-
|
|
12304
|
+
//# sourceMappingURL=templates-DcxyATPT.js.map
|