@morscherlab/mint-sdk 1.2.0-beta.4 → 1.2.0-beta.5
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/{EmptyState-p90quq8Z.js → EmptyState-NBqf2_8z.js} +2 -2
- package/dist/{EmptyState-p90quq8Z.js.map → EmptyState-NBqf2_8z.js.map} +1 -1
- package/dist/{ExperimentPopover-tLwJ7XF4.js → ExperimentPopover-CfOdh5Rm.js} +3 -3
- package/dist/{ExperimentPopover-tLwJ7XF4.js.map → ExperimentPopover-CfOdh5Rm.js.map} +1 -1
- package/dist/{ExperimentSelectorModal-B6P2msT4.js → ExperimentSelectorModal-DvIagrxY.js} +4 -4
- package/dist/{ExperimentSelectorModal-B6P2msT4.js.map → ExperimentSelectorModal-DvIagrxY.js.map} +1 -1
- package/dist/{SettingsModal-CkNM8qAI.js → SettingsModal-W3TYfnP9.js} +4 -7
- package/dist/SettingsModal-W3TYfnP9.js.map +1 -0
- package/dist/__tests__/components/PluginWorkspaceView.internal.test.d.ts +1 -0
- package/dist/__tests__/components/SecretInput.test.d.ts +1 -0
- package/dist/__tests__/components/WellEditPopupInternal.test.d.ts +1 -0
- package/dist/components/AppAvatarMenu.vue.d.ts +4 -0
- package/dist/components/AppSidebar.vue.d.ts +1 -1
- package/dist/components/BioTemplateExperimentWorkspaceView.vue.d.ts +1 -1
- package/dist/components/DropdownButton.vue.d.ts +2 -0
- package/dist/components/FitPanel.vue.d.ts +1 -1
- package/dist/components/PluginWorkspaceView.props.d.ts +29 -1
- package/dist/components/PluginWorkspaceView.vue.d.ts +5 -5
- package/dist/components/SecretInput.vue.d.ts +28 -0
- package/dist/components/SmartGroupFieldRecipe.vue.d.ts +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +8 -8
- package/dist/components/internal/WellEditPopupInternal.vue.d.ts +3 -1
- package/dist/components/internal/WorkspaceControlsInternal.vue.d.ts +23 -0
- package/dist/components/internal/WorkspaceShellInternal.vue.d.ts +70 -0
- package/dist/components/internal/WorkspaceSidebarInternal.vue.d.ts +43 -0
- package/dist/{components-MGNL6tRn.js → components-B80gV0P6.js} +575 -561
- package/dist/components-B80gV0P6.js.map +1 -0
- package/dist/composables/flattenWorkspaceBindings.d.ts +61 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/index.js +9 -9
- package/dist/composables/pluginWorkspaceModel.d.ts +164 -0
- package/dist/composables/useAsync.d.ts +5 -1
- package/dist/composables/useBioTemplateWorkspace.d.ts +4 -20
- package/dist/composables/useCommandHistory.d.ts +5 -1
- package/dist/composables/useFocusTrap.d.ts +21 -0
- package/dist/composables/useMenuKeyboard.d.ts +29 -0
- package/dist/composables/useOptimisticMutation.d.ts +5 -1
- package/dist/composables/usePluginWorkspace.d.ts +51 -0
- package/dist/composables/useResourceCrud.d.ts +5 -1
- package/dist/composables/useRovingFocus.d.ts +24 -0
- package/dist/composables/useWellPainting.d.ts +5 -1
- package/dist/composables/useWellPlateAdapter.d.ts +5 -1
- package/dist/composables/useWellPlateValidation.d.ts +5 -1
- package/dist/composables/workspaceRecipes.d.ts +188 -0
- package/dist/{composables-CKxOcvgh.js → composables-C8mmD5ta.js} +65 -17
- package/dist/composables-C8mmD5ta.js.map +1 -0
- package/dist/{experiment-utils-CLnzPPq5.js → experiment-utils-DV3DrvE_.js} +70 -51
- package/dist/experiment-utils-DV3DrvE_.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -13
- package/dist/install.js +7 -7
- package/dist/styles.css +100 -49
- package/dist/templates/builderReadUtils.d.ts +1 -1
- package/dist/templates/index.js +4 -4
- package/dist/{templates-BTJ9C9Kb.js → templates-CK72aKO1.js} +14 -23
- package/dist/templates-CK72aKO1.js.map +1 -0
- package/dist/types/form-builder.d.ts +1 -1
- package/dist/{useControlSchema-CXhxTul7.js → useControlSchema-_OVhavKq.js} +280 -63
- package/dist/useControlSchema-_OVhavKq.js.map +1 -0
- package/dist/{useDropdownState-DSb3BC3N.js → useDropdownState-D5G4UvWd.js} +2 -2
- package/dist/{useDropdownState-DSb3BC3N.js.map → useDropdownState-D5G4UvWd.js.map} +1 -1
- package/dist/{useExperimentSelector-D0pjj9WH.js → useExperimentSelector-DSEckf_g.js} +3 -3
- package/dist/{useExperimentSelector-D0pjj9WH.js.map → useExperimentSelector-DSEckf_g.js.map} +1 -1
- package/dist/{useFormBuilder-CuOFB3aP.js → useFormBuilder-Bd714C7y.js} +2 -2
- package/dist/{useFormBuilder-CuOFB3aP.js.map → useFormBuilder-Bd714C7y.js.map} +1 -1
- package/dist/{useProtocolTemplates-BWhQIWV5.js → useProtocolTemplates-Dq5Pzwyd.js} +481 -46
- package/dist/useProtocolTemplates-Dq5Pzwyd.js.map +1 -0
- package/dist/utils/pluginSecrets.d.ts +53 -0
- package/dist/utils/records.d.ts +4 -0
- package/package.json +1 -1
- package/src/__tests__/components/AppAvatarMenu.test.ts +123 -0
- package/src/__tests__/components/BaseTabs.test.ts +67 -0
- package/src/__tests__/components/DropdownButton.test.ts +134 -0
- package/src/__tests__/components/PluginWorkspaceView.internal.test.ts +230 -0
- package/src/__tests__/components/SecretInput.test.ts +87 -0
- package/src/__tests__/components/WellEditPopupInternal.test.ts +108 -0
- package/src/__tests__/composables/usePluginClient.test.ts +140 -0
- package/src/components/AppAvatarMenu.vue +34 -3
- package/src/components/BaseModal.vue +8 -56
- package/src/components/BaseTabs.vue +26 -1
- package/src/components/BioTemplateExperimentWorkspaceView.vue +10 -21
- package/src/components/BioTemplatePackWorkspaceView.vue +11 -15
- package/src/components/BioTemplatePresetWorkspaceView.vue +8 -13
- package/src/components/ComponentBindingRenderer.vue +1 -3
- package/src/components/ControlWorkspaceView.vue +11 -22
- package/src/components/DoseDesignWorkspaceView.vue +6 -25
- package/src/components/DropdownButton.vue +32 -2
- package/src/components/PluginWorkspaceView.props.ts +38 -0
- package/src/components/PluginWorkspaceView.vue +53 -224
- package/src/components/SecretInput.story.vue +79 -0
- package/src/components/SecretInput.vue +150 -0
- package/src/components/index.ts +9 -0
- package/src/components/internal/WellEditPopupInternal.vue +20 -1
- package/src/components/internal/WorkspaceControlsInternal.vue +20 -0
- package/src/components/internal/WorkspaceShellInternal.vue +125 -0
- package/src/components/internal/WorkspaceSidebarInternal.vue +82 -0
- package/src/composables/experimentDesignData.ts +1 -3
- package/src/composables/flattenWorkspaceBindings.ts +104 -0
- package/src/composables/formBuilderRegistry.ts +5 -0
- package/src/composables/index.ts +26 -0
- package/src/composables/pluginWorkspaceModel.ts +182 -0
- package/src/composables/useAsync.ts +5 -1
- package/src/composables/useBioTemplatePackWorkspace.ts +15 -9
- package/src/composables/useBioTemplatePresetWorkspace.ts +14 -15
- package/src/composables/useBioTemplateWorkspace.ts +18 -43
- package/src/composables/useCommandHistory.ts +5 -1
- package/src/composables/useFocusTrap.ts +91 -0
- package/src/composables/useMenuKeyboard.ts +90 -0
- package/src/composables/useOptimisticMutation.ts +5 -1
- package/src/composables/usePluginClient.ts +42 -4
- package/src/composables/usePluginWorkspace.ts +208 -0
- package/src/composables/useResourceCrud.ts +5 -1
- package/src/composables/useRovingFocus.ts +66 -0
- package/src/composables/useWellPainting.ts +5 -1
- package/src/composables/useWellPlateAdapter.ts +5 -1
- package/src/composables/useWellPlateValidation.ts +5 -1
- package/src/composables/workspaceRecipes.ts +267 -0
- package/src/index.ts +16 -0
- package/src/styles/components/secret-input.css +60 -0
- package/src/styles/index.css +1 -0
- package/src/templates/builderReadUtils.ts +1 -3
- package/src/templates/componentTargetResolvers.ts +1 -3
- package/src/templates/controlSchemaTargets.ts +1 -3
- package/src/types/form-builder.ts +1 -0
- package/src/utils/formModelSync.ts +1 -3
- package/src/utils/pluginIcon.ts +1 -3
- package/src/utils/pluginSecrets.ts +102 -0
- package/src/utils/records.ts +9 -0
- package/dist/SettingsModal-CkNM8qAI.js.map +0 -1
- package/dist/components-MGNL6tRn.js.map +0 -1
- package/dist/composables-CKxOcvgh.js.map +0 -1
- package/dist/experiment-utils-CLnzPPq5.js.map +0 -1
- package/dist/templates-BTJ9C9Kb.js.map +0 -1
- package/dist/useControlSchema-CXhxTul7.js.map +0 -1
- package/dist/useProtocolTemplates-BWhQIWV5.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as formatExperimentDate, f as BaseModal_default,
|
|
2
|
-
import { a as BaseSelect_default, i as BasePill_default, n as Skeleton_default, o as normalizeOptionInput, r as useRequestSyncState, s as BaseInput_default, t as EmptyState_default } from "./EmptyState-
|
|
3
|
-
import { t as useDropdownState } from "./useDropdownState-
|
|
1
|
+
import { c as formatExperimentDate, f as BaseModal_default, h as BaseButton_default, m as useEventListener } from "./experiment-utils-DV3DrvE_.js";
|
|
2
|
+
import { a as BaseSelect_default, i as BasePill_default, n as Skeleton_default, o as normalizeOptionInput, r as useRequestSyncState, s as BaseInput_default, t as EmptyState_default } from "./EmptyState-NBqf2_8z.js";
|
|
3
|
+
import { t as useDropdownState } from "./useDropdownState-D5G4UvWd.js";
|
|
4
4
|
import { r as useApi } from "./useApi-CDBq6z23.js";
|
|
5
5
|
import { hasAllPermissions } from "./permissions.js";
|
|
6
6
|
import { Fragment, Teleport, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, getCurrentScope, 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";
|
|
7
7
|
//#region src/components/BaseTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var _hoisted_1$
|
|
8
|
+
var _hoisted_1$22 = [
|
|
9
9
|
"value",
|
|
10
10
|
"placeholder",
|
|
11
11
|
"disabled",
|
|
@@ -73,7 +73,7 @@ var BaseTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
73
73
|
onInput: handleInput,
|
|
74
74
|
onFocus: _cache[0] || (_cache[0] = ($event) => emit("focus", $event)),
|
|
75
75
|
onBlur: _cache[1] || (_cache[1] = ($event) => emit("blur", $event))
|
|
76
|
-
}, null, 42, _hoisted_1$
|
|
76
|
+
}, null, 42, _hoisted_1$22);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
});
|
|
@@ -1064,9 +1064,9 @@ var computePosition = (reference, floating, options) => {
|
|
|
1064
1064
|
};
|
|
1065
1065
|
//#endregion
|
|
1066
1066
|
//#region src/components/Tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
1067
|
-
var _hoisted_1$
|
|
1068
|
-
var _hoisted_2$
|
|
1069
|
-
var _hoisted_3$
|
|
1067
|
+
var _hoisted_1$21 = ["aria-describedby"];
|
|
1068
|
+
var _hoisted_2$20 = { class: "mint-tooltip__body" };
|
|
1069
|
+
var _hoisted_3$18 = {
|
|
1070
1070
|
key: 0,
|
|
1071
1071
|
class: "mint-tooltip__shortcut"
|
|
1072
1072
|
};
|
|
@@ -1161,13 +1161,13 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
1161
1161
|
maxWidth: resolvedMaxWidth(__props.maxWidth)
|
|
1162
1162
|
}),
|
|
1163
1163
|
role: "tooltip"
|
|
1164
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
1164
|
+
}, [createElementVNode("span", _hoisted_2$20, toDisplayString(__props.text), 1), __props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$18, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)], 6)) : createCommentVNode("", true)]))], 40, _hoisted_1$21);
|
|
1165
1165
|
};
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
1168
1168
|
//#endregion
|
|
1169
1169
|
//#region src/components/BaseCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
1170
|
-
var _hoisted_1$
|
|
1170
|
+
var _hoisted_1$20 = {
|
|
1171
1171
|
key: 0,
|
|
1172
1172
|
class: "mint-checkbox__row-svg",
|
|
1173
1173
|
viewBox: "0 0 24 24",
|
|
@@ -1177,8 +1177,8 @@ var _hoisted_1$19 = {
|
|
|
1177
1177
|
"stroke-linecap": "round",
|
|
1178
1178
|
"stroke-linejoin": "round"
|
|
1179
1179
|
};
|
|
1180
|
-
var _hoisted_2$
|
|
1181
|
-
var _hoisted_3$
|
|
1180
|
+
var _hoisted_2$19 = ["d"];
|
|
1181
|
+
var _hoisted_3$17 = ["d"];
|
|
1182
1182
|
var _hoisted_4$15 = {
|
|
1183
1183
|
key: 1,
|
|
1184
1184
|
class: "mint-checkbox__row-text-icon"
|
|
@@ -1242,15 +1242,15 @@ var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
1242
1242
|
class: "mint-checkbox__row-icon",
|
|
1243
1243
|
style: normalizeStyle(iconStyle()),
|
|
1244
1244
|
"aria-hidden": "true"
|
|
1245
|
-
}, [isSvgIcon(props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
1245
|
+
}, [isSvgIcon(props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$20, [Array.isArray(props.icon) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.icon, (d, i) => {
|
|
1246
1246
|
return openBlock(), createElementBlock("path", {
|
|
1247
1247
|
key: i,
|
|
1248
1248
|
d
|
|
1249
|
-
}, null, 8, _hoisted_2$
|
|
1249
|
+
}, null, 8, _hoisted_2$19);
|
|
1250
1250
|
}), 128)) : (openBlock(), createElementBlock("path", {
|
|
1251
1251
|
key: 1,
|
|
1252
1252
|
d: props.icon
|
|
1253
|
-
}, null, 8, _hoisted_3$
|
|
1253
|
+
}, null, 8, _hoisted_3$17))])) : (openBlock(), createElementBlock("span", _hoisted_4$15, toDisplayString(props.icon), 1))], 4)) : createCommentVNode("", true),
|
|
1254
1254
|
props.variant === "row" && props.label ? (openBlock(), createElementBlock("span", _hoisted_5$13, [props.description ? (openBlock(), createBlock(Tooltip_default, {
|
|
1255
1255
|
key: 0,
|
|
1256
1256
|
text: props.description,
|
|
@@ -1301,7 +1301,7 @@ var BaseCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
1301
1301
|
});
|
|
1302
1302
|
//#endregion
|
|
1303
1303
|
//#region src/components/BaseToggle.vue?vue&type=script&setup=true&lang.ts
|
|
1304
|
-
var _hoisted_1$
|
|
1304
|
+
var _hoisted_1$19 = {
|
|
1305
1305
|
key: 0,
|
|
1306
1306
|
class: "mint-toggle__row-svg",
|
|
1307
1307
|
viewBox: "0 0 24 24",
|
|
@@ -1311,8 +1311,8 @@ var _hoisted_1$18 = {
|
|
|
1311
1311
|
"stroke-linecap": "round",
|
|
1312
1312
|
"stroke-linejoin": "round"
|
|
1313
1313
|
};
|
|
1314
|
-
var _hoisted_2$
|
|
1315
|
-
var _hoisted_3$
|
|
1314
|
+
var _hoisted_2$18 = ["d"];
|
|
1315
|
+
var _hoisted_3$16 = ["d"];
|
|
1316
1316
|
var _hoisted_4$14 = {
|
|
1317
1317
|
key: 1,
|
|
1318
1318
|
class: "mint-toggle__row-text-icon"
|
|
@@ -1389,15 +1389,15 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1389
1389
|
class: "mint-toggle__row-icon",
|
|
1390
1390
|
style: normalizeStyle(iconStyle()),
|
|
1391
1391
|
"aria-hidden": "true"
|
|
1392
|
-
}, [isSvgIcon(__props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
1392
|
+
}, [isSvgIcon(__props.icon) ? (openBlock(), createElementBlock("svg", _hoisted_1$19, [Array.isArray(__props.icon) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.icon, (d, i) => {
|
|
1393
1393
|
return openBlock(), createElementBlock("path", {
|
|
1394
1394
|
key: i,
|
|
1395
1395
|
d
|
|
1396
|
-
}, null, 8, _hoisted_2$
|
|
1396
|
+
}, null, 8, _hoisted_2$18);
|
|
1397
1397
|
}), 128)) : (openBlock(), createElementBlock("path", {
|
|
1398
1398
|
key: 1,
|
|
1399
1399
|
d: __props.icon
|
|
1400
|
-
}, null, 8, _hoisted_3$
|
|
1400
|
+
}, null, 8, _hoisted_3$16))])) : (openBlock(), createElementBlock("span", _hoisted_4$14, toDisplayString(__props.icon), 1))], 4)) : createCommentVNode("", true),
|
|
1401
1401
|
__props.variant === "row" && __props.label ? (openBlock(), createElementBlock("span", _hoisted_5$12, [__props.description ? (openBlock(), createBlock(Tooltip_default, {
|
|
1402
1402
|
key: 0,
|
|
1403
1403
|
text: __props.description,
|
|
@@ -1440,7 +1440,7 @@ var BaseToggle_default = /* @__PURE__ */ defineComponent({
|
|
|
1440
1440
|
});
|
|
1441
1441
|
//#endregion
|
|
1442
1442
|
//#region src/components/BaseRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
1443
|
-
var _hoisted_1$
|
|
1443
|
+
var _hoisted_1$18 = [
|
|
1444
1444
|
"name",
|
|
1445
1445
|
"value",
|
|
1446
1446
|
"checked",
|
|
@@ -1448,8 +1448,8 @@ var _hoisted_1$17 = [
|
|
|
1448
1448
|
"aria-describedby",
|
|
1449
1449
|
"onChange"
|
|
1450
1450
|
];
|
|
1451
|
-
var _hoisted_2$
|
|
1452
|
-
var _hoisted_3$
|
|
1451
|
+
var _hoisted_2$17 = { class: "mint-radio-option__content" };
|
|
1452
|
+
var _hoisted_3$15 = ["id"];
|
|
1453
1453
|
var _hoisted_4$13 = [
|
|
1454
1454
|
"name",
|
|
1455
1455
|
"value",
|
|
@@ -1511,18 +1511,18 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1511
1511
|
"aria-describedby": option.description ? `${props.name}-${option.value}-desc` : void 0,
|
|
1512
1512
|
class: "mint-radio-option__native",
|
|
1513
1513
|
onChange: ($event) => handleChange(option.value)
|
|
1514
|
-
}, null, 40, _hoisted_1$
|
|
1514
|
+
}, null, 40, _hoisted_1$18), createElementVNode("div", { class: normalizeClass([
|
|
1515
1515
|
"mint-radio-option__circle",
|
|
1516
1516
|
`mint-radio-option__circle--${props.size}`,
|
|
1517
1517
|
props.modelValue === option.value ? "mint-radio-option__circle--checked" : ""
|
|
1518
1518
|
]) }, [props.modelValue === option.value ? (openBlock(), createElementBlock("div", {
|
|
1519
1519
|
key: 0,
|
|
1520
1520
|
class: normalizeClass(["mint-radio-option__dot", `mint-radio-option__dot--${props.size}`])
|
|
1521
|
-
}, null, 2)) : createCommentVNode("", true)], 2)], 2), createElementVNode("div", _hoisted_2$
|
|
1521
|
+
}, null, 2)) : createCommentVNode("", true)], 2)], 2), createElementVNode("div", _hoisted_2$17, [createElementVNode("span", { class: normalizeClass(["mint-radio-option__label", `mint-radio-option__label--${props.size}`]) }, toDisplayString(option.label), 3), option.description ? (openBlock(), createElementBlock("span", {
|
|
1522
1522
|
key: 0,
|
|
1523
1523
|
id: `${props.name}-${option.value}-desc`,
|
|
1524
1524
|
class: normalizeClass(["mint-radio-option__description", `mint-radio-option__description--${props.size}`])
|
|
1525
|
-
}, toDisplayString(option.description), 11, _hoisted_3$
|
|
1525
|
+
}, toDisplayString(option.description), 11, _hoisted_3$15)) : createCommentVNode("", true)])], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1526
1526
|
createElementVNode("input", {
|
|
1527
1527
|
type: "radio",
|
|
1528
1528
|
name: props.name,
|
|
@@ -1553,8 +1553,8 @@ var BaseRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
1553
1553
|
});
|
|
1554
1554
|
//#endregion
|
|
1555
1555
|
//#region src/components/BaseSlider.vue?vue&type=script&setup=true&lang.ts
|
|
1556
|
-
var _hoisted_1$
|
|
1557
|
-
var _hoisted_2$
|
|
1556
|
+
var _hoisted_1$17 = { class: "mint-slider__container" };
|
|
1557
|
+
var _hoisted_2$16 = [
|
|
1558
1558
|
"value",
|
|
1559
1559
|
"min",
|
|
1560
1560
|
"max",
|
|
@@ -1565,7 +1565,7 @@ var _hoisted_2$15 = [
|
|
|
1565
1565
|
"aria-valuemax",
|
|
1566
1566
|
"aria-valuenow"
|
|
1567
1567
|
];
|
|
1568
|
-
var _hoisted_3$
|
|
1568
|
+
var _hoisted_3$14 = {
|
|
1569
1569
|
key: 0,
|
|
1570
1570
|
class: "mint-slider__value"
|
|
1571
1571
|
};
|
|
@@ -1627,7 +1627,7 @@ var BaseSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
1627
1627
|
emit("update:modelValue", Number(target.value));
|
|
1628
1628
|
}
|
|
1629
1629
|
return (_ctx, _cache) => {
|
|
1630
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(["mint-slider", { "mint-slider--disabled": __props.disabled }]) }, [createElementVNode("div", _hoisted_1$
|
|
1630
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["mint-slider", { "mint-slider--disabled": __props.disabled }]) }, [createElementVNode("div", _hoisted_1$17, [
|
|
1631
1631
|
createElementVNode("div", {
|
|
1632
1632
|
class: "mint-slider__track",
|
|
1633
1633
|
style: normalizeStyle({ height: `${sizeConfig.value.height}px` })
|
|
@@ -1656,7 +1656,7 @@ var BaseSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
1656
1656
|
onMouseup: _cache[1] || (_cache[1] = ($event) => isDragging.value = false),
|
|
1657
1657
|
onTouchstartPassive: _cache[2] || (_cache[2] = ($event) => isDragging.value = true),
|
|
1658
1658
|
onTouchend: _cache[3] || (_cache[3] = ($event) => isDragging.value = false)
|
|
1659
|
-
}, null, 40, _hoisted_2$
|
|
1659
|
+
}, null, 40, _hoisted_2$16),
|
|
1660
1660
|
createElementVNode("div", {
|
|
1661
1661
|
class: normalizeClass(["mint-slider__thumb", { "mint-slider__thumb--dragging": isDragging.value }]),
|
|
1662
1662
|
style: normalizeStyle({
|
|
@@ -1665,7 +1665,7 @@ var BaseSlider_default = /* @__PURE__ */ defineComponent({
|
|
|
1665
1665
|
left: thumbPosition.value
|
|
1666
1666
|
})
|
|
1667
1667
|
}, null, 6)
|
|
1668
|
-
]), __props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
1668
|
+
]), __props.showValue ? (openBlock(), createElementBlock("span", _hoisted_3$14, toDisplayString(currentValue.value), 1)) : createCommentVNode("", true)], 2);
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
1671
1671
|
});
|
|
@@ -1791,15 +1791,15 @@ function uniqueValues(values) {
|
|
|
1791
1791
|
}
|
|
1792
1792
|
//#endregion
|
|
1793
1793
|
//#region src/components/MultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
1794
|
-
var _hoisted_1$
|
|
1794
|
+
var _hoisted_1$16 = {
|
|
1795
1795
|
key: 0,
|
|
1796
1796
|
class: "mint-multi-select__placeholder"
|
|
1797
1797
|
};
|
|
1798
|
-
var _hoisted_2$
|
|
1798
|
+
var _hoisted_2$15 = {
|
|
1799
1799
|
class: "mint-multi-select__options",
|
|
1800
1800
|
role: "group"
|
|
1801
1801
|
};
|
|
1802
|
-
var _hoisted_3$
|
|
1802
|
+
var _hoisted_3$13 = [
|
|
1803
1803
|
"aria-checked",
|
|
1804
1804
|
"disabled",
|
|
1805
1805
|
"onClick",
|
|
@@ -1871,8 +1871,8 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1871
1871
|
`mint-multi-select--${__props.size}`,
|
|
1872
1872
|
__props.disabled ? "mint-multi-select--disabled" : ""
|
|
1873
1873
|
]) }, [
|
|
1874
|
-
__props.modelValue.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1875
|
-
createElementVNode("div", _hoisted_2$
|
|
1874
|
+
__props.modelValue.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$16, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true),
|
|
1875
|
+
createElementVNode("div", _hoisted_2$15, [(openBlock(true), createElementBlock(Fragment, null, renderList(normalizedOptions.value, (option) => {
|
|
1876
1876
|
return openBlock(), createElementBlock("button", {
|
|
1877
1877
|
key: String(option.value),
|
|
1878
1878
|
type: "button",
|
|
@@ -1888,7 +1888,7 @@ var MultiSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
1888
1888
|
]),
|
|
1889
1889
|
onClick: ($event) => toggleOption(option),
|
|
1890
1890
|
onKeydown: ($event) => handleKeydown($event, option)
|
|
1891
|
-
}, [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$
|
|
1891
|
+
}, [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$13);
|
|
1892
1892
|
}), 128))]),
|
|
1893
1893
|
__props.modelValue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$10, toDisplayString(selectedLabels.value.join(", ")), 1)) : createCommentVNode("", true)
|
|
1894
1894
|
], 2);
|
|
@@ -2001,9 +2001,9 @@ function startOfDay(date) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
//#endregion
|
|
2003
2003
|
//#region src/components/internal/CalendarGridPanelInternal.vue?vue&type=script&setup=true&lang.ts
|
|
2004
|
-
var _hoisted_1$
|
|
2005
|
-
var _hoisted_2$
|
|
2006
|
-
var _hoisted_3$
|
|
2004
|
+
var _hoisted_1$15 = { class: "mint-calendar-grid-panel" };
|
|
2005
|
+
var _hoisted_2$14 = { class: "mint-date-picker__header" };
|
|
2006
|
+
var _hoisted_3$12 = ["aria-label"];
|
|
2007
2007
|
var _hoisted_4$11 = { class: "mint-date-picker__month-year" };
|
|
2008
2008
|
var _hoisted_5$9 = ["aria-label"];
|
|
2009
2009
|
var _hoisted_6$9 = { class: "mint-date-picker__weekdays" };
|
|
@@ -2052,8 +2052,8 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
2054
2054
|
return (_ctx, _cache) => {
|
|
2055
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2056
|
-
createElementVNode("div", _hoisted_2$
|
|
2055
|
+
return openBlock(), createElementBlock("div", _hoisted_1$15, [
|
|
2056
|
+
createElementVNode("div", _hoisted_2$14, [
|
|
2057
2057
|
createElementVNode("button", {
|
|
2058
2058
|
type: "button",
|
|
2059
2059
|
class: "mint-date-picker__nav-btn",
|
|
@@ -2067,7 +2067,7 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2067
2067
|
"stroke-linecap": "round",
|
|
2068
2068
|
"stroke-linejoin": "round",
|
|
2069
2069
|
"aria-hidden": "true"
|
|
2070
|
-
}, [createElementVNode("path", { d: "m15 18-6-6 6-6" })], -1)])], 8, _hoisted_3$
|
|
2070
|
+
}, [createElementVNode("path", { d: "m15 18-6-6 6-6" })], -1)])], 8, _hoisted_3$12),
|
|
2071
2071
|
createElementVNode("span", _hoisted_4$11, toDisplayString(__props.monthYear), 1),
|
|
2072
2072
|
createElementVNode("button", {
|
|
2073
2073
|
type: "button",
|
|
@@ -2113,12 +2113,12 @@ var CalendarGridPanelInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
2113
2113
|
});
|
|
2114
2114
|
//#endregion
|
|
2115
2115
|
//#region src/components/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
2116
|
-
var _hoisted_1$
|
|
2116
|
+
var _hoisted_1$14 = [
|
|
2117
2117
|
"value",
|
|
2118
2118
|
"placeholder",
|
|
2119
2119
|
"disabled"
|
|
2120
2120
|
];
|
|
2121
|
-
var _hoisted_2$
|
|
2121
|
+
var _hoisted_2$13 = { class: "mint-date-picker__footer" };
|
|
2122
2122
|
//#endregion
|
|
2123
2123
|
//#region src/components/DatePicker.vue
|
|
2124
2124
|
var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2233,7 +2233,7 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2233
2233
|
__props.disabled ? "mint-date-picker__input--disabled" : ""
|
|
2234
2234
|
]),
|
|
2235
2235
|
onClick: toggleCalendar
|
|
2236
|
-
}, null, 10, _hoisted_1$
|
|
2236
|
+
}, null, 10, _hoisted_1$14), _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, {
|
|
2237
2237
|
"enter-active-class": "mint-date-picker__dropdown-enter-active",
|
|
2238
2238
|
"enter-from-class": "mint-date-picker__dropdown-enter-from",
|
|
2239
2239
|
"enter-to-class": "mint-date-picker__dropdown-enter-to",
|
|
@@ -2265,7 +2265,7 @@ var DatePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2265
2265
|
"selected-date",
|
|
2266
2266
|
"onPreviousMonth",
|
|
2267
2267
|
"onNextMonth"
|
|
2268
|
-
]), createElementVNode("div", _hoisted_2$
|
|
2268
|
+
]), createElementVNode("div", _hoisted_2$13, [createElementVNode("button", {
|
|
2269
2269
|
type: "button",
|
|
2270
2270
|
class: "mint-date-picker__footer-btn mint-date-picker__today-btn",
|
|
2271
2271
|
onClick: goToToday
|
|
@@ -2411,14 +2411,14 @@ function useTimeUtils() {
|
|
|
2411
2411
|
}
|
|
2412
2412
|
//#endregion
|
|
2413
2413
|
//#region src/components/TimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
2414
|
-
var _hoisted_1$
|
|
2415
|
-
var _hoisted_2$
|
|
2414
|
+
var _hoisted_1$13 = { class: "mint-time-picker__input-wrapper" };
|
|
2415
|
+
var _hoisted_2$12 = [
|
|
2416
2416
|
"value",
|
|
2417
2417
|
"placeholder",
|
|
2418
2418
|
"disabled",
|
|
2419
2419
|
"aria-expanded"
|
|
2420
2420
|
];
|
|
2421
|
-
var _hoisted_3$
|
|
2421
|
+
var _hoisted_3$11 = {
|
|
2422
2422
|
key: 0,
|
|
2423
2423
|
class: "mint-time-picker__dropdown"
|
|
2424
2424
|
};
|
|
@@ -2564,7 +2564,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2564
2564
|
ref: rootRef,
|
|
2565
2565
|
class: "mint-time-picker",
|
|
2566
2566
|
onKeydown: handleKeydown
|
|
2567
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
2567
|
+
}, [createElementVNode("div", _hoisted_1$13, [
|
|
2568
2568
|
createElementVNode("input", {
|
|
2569
2569
|
type: "text",
|
|
2570
2570
|
readonly: "",
|
|
@@ -2581,7 +2581,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2581
2581
|
"aria-haspopup": "listbox",
|
|
2582
2582
|
"aria-expanded": unref(isOpen),
|
|
2583
2583
|
onClick: toggleDropdown
|
|
2584
|
-
}, null, 10, _hoisted_2$
|
|
2584
|
+
}, null, 10, _hoisted_2$12),
|
|
2585
2585
|
__props.clearable && __props.modelValue ? (openBlock(), createElementBlock("button", {
|
|
2586
2586
|
key: 0,
|
|
2587
2587
|
type: "button",
|
|
@@ -2616,7 +2616,7 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2616
2616
|
"leave-from-class": "mint-time-picker__dropdown-leave-from",
|
|
2617
2617
|
"leave-to-class": "mint-time-picker__dropdown-leave-to"
|
|
2618
2618
|
}, {
|
|
2619
|
-
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2619
|
+
default: withCtx(() => [unref(isOpen) ? (openBlock(), createElementBlock("div", _hoisted_3$11, [createElementVNode("ul", {
|
|
2620
2620
|
ref_key: "listRef",
|
|
2621
2621
|
ref: listRef,
|
|
2622
2622
|
class: "mint-time-picker__list",
|
|
@@ -2644,12 +2644,12 @@ var TimePicker_default = /* @__PURE__ */ defineComponent({
|
|
|
2644
2644
|
});
|
|
2645
2645
|
//#endregion
|
|
2646
2646
|
//#region src/components/TagsInput.vue?vue&type=script&setup=true&lang.ts
|
|
2647
|
-
var _hoisted_1$
|
|
2647
|
+
var _hoisted_1$12 = {
|
|
2648
2648
|
key: 0,
|
|
2649
2649
|
class: "mint-tags-input__categories"
|
|
2650
2650
|
};
|
|
2651
|
-
var _hoisted_2$
|
|
2652
|
-
var _hoisted_3$
|
|
2651
|
+
var _hoisted_2$11 = ["disabled", "onClick"];
|
|
2652
|
+
var _hoisted_3$10 = ["aria-label", "onClick"];
|
|
2653
2653
|
var _hoisted_4$9 = ["placeholder", "disabled"];
|
|
2654
2654
|
var _hoisted_5$8 = {
|
|
2655
2655
|
key: 0,
|
|
@@ -2799,7 +2799,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2799
2799
|
__props.disabled ? "mint-tags-input--disabled" : "",
|
|
2800
2800
|
__props.categories.length ? "mint-tags-input--categorized" : ""
|
|
2801
2801
|
])
|
|
2802
|
-
}, [__props.categories.length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2802
|
+
}, [__props.categories.length ? (openBlock(), createElementBlock("div", _hoisted_1$12, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.categories, (cat) => {
|
|
2803
2803
|
return openBlock(), createElementBlock("button", {
|
|
2804
2804
|
key: cat.prefix,
|
|
2805
2805
|
type: "button",
|
|
@@ -2810,7 +2810,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2810
2810
|
]),
|
|
2811
2811
|
disabled: __props.disabled,
|
|
2812
2812
|
onClick: ($event) => setCategory(cat.prefix)
|
|
2813
|
-
}, toDisplayString(cat.name), 11, _hoisted_2$
|
|
2813
|
+
}, toDisplayString(cat.name), 11, _hoisted_2$11);
|
|
2814
2814
|
}), 128))])) : createCommentVNode("", true), createElementVNode("div", {
|
|
2815
2815
|
class: "mint-tags-input__field",
|
|
2816
2816
|
onClick: focusInput
|
|
@@ -2837,7 +2837,7 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2837
2837
|
"stroke-linecap": "round",
|
|
2838
2838
|
"stroke-linejoin": "round",
|
|
2839
2839
|
viewBox: "0 0 24 24"
|
|
2840
|
-
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])], 8, _hoisted_3$
|
|
2840
|
+
}, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])], 8, _hoisted_3$10)) : createCommentVNode("", true)], 2);
|
|
2841
2841
|
}), 128)),
|
|
2842
2842
|
withDirectives(createElementVNode("input", {
|
|
2843
2843
|
ref_key: "inputRef",
|
|
@@ -2866,6 +2866,207 @@ var TagsInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2866
2866
|
}
|
|
2867
2867
|
});
|
|
2868
2868
|
//#endregion
|
|
2869
|
+
//#region src/utils/pluginSecrets.ts
|
|
2870
|
+
/**
|
|
2871
|
+
* Stable references for plugin secret settings.
|
|
2872
|
+
*
|
|
2873
|
+
* A settings response never carries a secret's value. Every secret leaf is a
|
|
2874
|
+
* marker instead:
|
|
2875
|
+
*
|
|
2876
|
+
* - `{ "$secret": "sec_…", "set": true }` — a stored secret, referenced by a
|
|
2877
|
+
* stable opaque id. Send the marker back unchanged to keep the stored value.
|
|
2878
|
+
* - `null` — nothing stored at that position.
|
|
2879
|
+
* - `{ "$secret": null, "locked": true }` — the effective value comes from the
|
|
2880
|
+
* environment and is never written back.
|
|
2881
|
+
*
|
|
2882
|
+
* On save each secret leaf accepts the reference, a plain string (a new value),
|
|
2883
|
+
* or `null` (clear). Payloads carry `secret_format: "ref"` so a `null` reads as
|
|
2884
|
+
* a deliberate clear rather than the deprecated "unchanged" placeholder.
|
|
2885
|
+
*/
|
|
2886
|
+
/** Reserved marker key that references a stored secret. */
|
|
2887
|
+
var PLUGIN_SECRET_REF_KEY = "$secret";
|
|
2888
|
+
/** Reserved payload key declaring which secret wire format a client speaks. */
|
|
2889
|
+
var PLUGIN_SECRET_FORMAT_KEY = "secret_format";
|
|
2890
|
+
/** Wire format published and understood by this SDK. */
|
|
2891
|
+
var PLUGIN_SECRET_FORMAT_REF = "ref";
|
|
2892
|
+
var MARKER_KEYS = new Set([
|
|
2893
|
+
PLUGIN_SECRET_REF_KEY,
|
|
2894
|
+
"set",
|
|
2895
|
+
"locked"
|
|
2896
|
+
]);
|
|
2897
|
+
/** Return whether one settings value is a `$secret` reference marker. */
|
|
2898
|
+
function isPluginSecretRef(value) {
|
|
2899
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
2900
|
+
const record = value;
|
|
2901
|
+
if (!("$secret" in record)) return false;
|
|
2902
|
+
return Object.keys(record).every((key) => MARKER_KEYS.has(key));
|
|
2903
|
+
}
|
|
2904
|
+
/** Return the stored secret id behind a marker, or `null` when nothing is stored. */
|
|
2905
|
+
function pluginSecretId(value) {
|
|
2906
|
+
if (!isPluginSecretRef(value)) return null;
|
|
2907
|
+
return typeof value.$secret === "string" ? value.$secret : null;
|
|
2908
|
+
}
|
|
2909
|
+
/** Classify one secret field for display: stored, unset, or environment-provided. */
|
|
2910
|
+
function pluginSecretState(value) {
|
|
2911
|
+
if (isPluginSecretRef(value)) {
|
|
2912
|
+
if (value.locked) return "environment";
|
|
2913
|
+
return typeof value.$secret === "string" ? "set" : "unset";
|
|
2914
|
+
}
|
|
2915
|
+
return typeof value === "string" && value.length > 0 ? "set" : "unset";
|
|
2916
|
+
}
|
|
2917
|
+
/** Human label for one secret field's state. */
|
|
2918
|
+
function pluginSecretLabel(value) {
|
|
2919
|
+
const state = pluginSecretState(value);
|
|
2920
|
+
if (state === "environment") return "Provided by environment";
|
|
2921
|
+
return state === "set" ? "Set" : "Not set";
|
|
2922
|
+
}
|
|
2923
|
+
/** Whether a secret field is read-only because the environment supplies it. */
|
|
2924
|
+
function isPluginSecretLocked(value) {
|
|
2925
|
+
return isPluginSecretRef(value) && value.locked === true;
|
|
2926
|
+
}
|
|
2927
|
+
/**
|
|
2928
|
+
* Value to submit for an untouched secret field: the reference, unchanged.
|
|
2929
|
+
*
|
|
2930
|
+
* A locked marker round-trips too, which is how the platform keeps a stored
|
|
2931
|
+
* value that an environment variable currently hides.
|
|
2932
|
+
*/
|
|
2933
|
+
function keepPluginSecret(current) {
|
|
2934
|
+
if (isPluginSecretRef(current)) return { ...current };
|
|
2935
|
+
return null;
|
|
2936
|
+
}
|
|
2937
|
+
/** Value to submit when the user typed a new secret. */
|
|
2938
|
+
function setPluginSecret(value) {
|
|
2939
|
+
return value;
|
|
2940
|
+
}
|
|
2941
|
+
/** Value to submit when the user cleared a secret. */
|
|
2942
|
+
function clearPluginSecret() {
|
|
2943
|
+
return null;
|
|
2944
|
+
}
|
|
2945
|
+
/** Whether a settings response declares the `$secret` reference wire format. */
|
|
2946
|
+
function usesPluginSecretReferences(response) {
|
|
2947
|
+
if (!response || typeof response !== "object") return false;
|
|
2948
|
+
return response[PLUGIN_SECRET_FORMAT_KEY] === "ref";
|
|
2949
|
+
}
|
|
2950
|
+
//#endregion
|
|
2951
|
+
//#region src/components/SecretInput.vue?vue&type=script&setup=true&lang.ts
|
|
2952
|
+
var _hoisted_1$11 = { class: "mint-secret-input__status" };
|
|
2953
|
+
var _hoisted_2$10 = {
|
|
2954
|
+
key: 0,
|
|
2955
|
+
class: "mint-secret-input__hint"
|
|
2956
|
+
};
|
|
2957
|
+
var _hoisted_3$9 = { class: "mint-secret-input__actions" };
|
|
2958
|
+
//#endregion
|
|
2959
|
+
//#region src/components/SecretInput.vue
|
|
2960
|
+
var SecretInput_default = /* @__PURE__ */ defineComponent({
|
|
2961
|
+
__name: "SecretInput",
|
|
2962
|
+
props: {
|
|
2963
|
+
modelValue: { default: null },
|
|
2964
|
+
placeholder: { default: "Enter a new value" },
|
|
2965
|
+
disabled: {
|
|
2966
|
+
type: Boolean,
|
|
2967
|
+
default: false
|
|
2968
|
+
},
|
|
2969
|
+
error: {
|
|
2970
|
+
type: Boolean,
|
|
2971
|
+
default: false
|
|
2972
|
+
},
|
|
2973
|
+
size: { default: "md" },
|
|
2974
|
+
changeLabel: { default: "Change" },
|
|
2975
|
+
clearLabel: { default: "Clear" }
|
|
2976
|
+
},
|
|
2977
|
+
emits: ["update:modelValue"],
|
|
2978
|
+
setup(__props, { emit: __emit }) {
|
|
2979
|
+
/** Edits one plugin secret setting: shows set / not set / provided by environment, and submits a `$secret` reference, a new value, or `null`. */
|
|
2980
|
+
const props = __props;
|
|
2981
|
+
const emit = __emit;
|
|
2982
|
+
/** The reference this field started from, so an abandoned edit can restore it. */
|
|
2983
|
+
const storedReference = ref(keepPluginSecret(props.modelValue));
|
|
2984
|
+
const isEditing = ref(typeof props.modelValue === "string");
|
|
2985
|
+
watch(() => props.modelValue, (value) => {
|
|
2986
|
+
if (isPluginSecretRef(value)) {
|
|
2987
|
+
storedReference.value = keepPluginSecret(value);
|
|
2988
|
+
isEditing.value = false;
|
|
2989
|
+
}
|
|
2990
|
+
});
|
|
2991
|
+
const state = computed(() => pluginSecretState(props.modelValue));
|
|
2992
|
+
const locked = computed(() => isPluginSecretLocked(props.modelValue) || isPluginSecretLocked(storedReference.value));
|
|
2993
|
+
const statusLabel = computed(() => isEditing.value ? "New value" : pluginSecretLabel(props.modelValue));
|
|
2994
|
+
const typedValue = computed(() => typeof props.modelValue === "string" ? props.modelValue : "");
|
|
2995
|
+
const canClear = computed(() => !locked.value && (state.value === "set" || isEditing.value));
|
|
2996
|
+
function startEditing() {
|
|
2997
|
+
if (props.disabled || locked.value) return;
|
|
2998
|
+
isEditing.value = true;
|
|
2999
|
+
emit("update:modelValue", setPluginSecret(""));
|
|
3000
|
+
}
|
|
3001
|
+
function updateTyped(value) {
|
|
3002
|
+
emit("update:modelValue", setPluginSecret(value == null ? "" : String(value)));
|
|
3003
|
+
}
|
|
3004
|
+
function cancelEditing() {
|
|
3005
|
+
isEditing.value = false;
|
|
3006
|
+
emit("update:modelValue", storedReference.value ? { ...storedReference.value } : null);
|
|
3007
|
+
}
|
|
3008
|
+
function clear() {
|
|
3009
|
+
if (props.disabled || locked.value) return;
|
|
3010
|
+
isEditing.value = false;
|
|
3011
|
+
storedReference.value = null;
|
|
3012
|
+
emit("update:modelValue", clearPluginSecret());
|
|
3013
|
+
}
|
|
3014
|
+
return (_ctx, _cache) => {
|
|
3015
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["mint-secret-input", { "mint-secret-input--error": __props.error }]) }, [
|
|
3016
|
+
createElementVNode("div", _hoisted_1$11, [createElementVNode("span", { class: normalizeClass(["mint-secret-input__badge", `mint-secret-input__badge--${isEditing.value ? "pending" : state.value}`]) }, toDisplayString(statusLabel.value), 3), locked.value ? (openBlock(), createElementBlock("span", _hoisted_2$10, " This value comes from the environment and cannot be edited here. ")) : createCommentVNode("", true)]),
|
|
3017
|
+
isEditing.value ? (openBlock(), createBlock(BaseInput_default, {
|
|
3018
|
+
key: 0,
|
|
3019
|
+
type: "password",
|
|
3020
|
+
autocomplete: "new-password",
|
|
3021
|
+
"model-value": typedValue.value,
|
|
3022
|
+
placeholder: __props.placeholder,
|
|
3023
|
+
disabled: __props.disabled,
|
|
3024
|
+
error: __props.error,
|
|
3025
|
+
size: __props.size,
|
|
3026
|
+
"onUpdate:modelValue": updateTyped
|
|
3027
|
+
}, null, 8, [
|
|
3028
|
+
"model-value",
|
|
3029
|
+
"placeholder",
|
|
3030
|
+
"disabled",
|
|
3031
|
+
"error",
|
|
3032
|
+
"size"
|
|
3033
|
+
])) : createCommentVNode("", true),
|
|
3034
|
+
createElementVNode("div", _hoisted_3$9, [!isEditing.value ? (openBlock(), createBlock(BaseButton_default, {
|
|
3035
|
+
key: 0,
|
|
3036
|
+
type: "button",
|
|
3037
|
+
variant: "secondary",
|
|
3038
|
+
size: __props.size === "lg" ? "md" : "sm",
|
|
3039
|
+
disabled: __props.disabled || locked.value,
|
|
3040
|
+
onClick: startEditing
|
|
3041
|
+
}, {
|
|
3042
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.changeLabel), 1)]),
|
|
3043
|
+
_: 1
|
|
3044
|
+
}, 8, ["size", "disabled"])) : (openBlock(), createBlock(BaseButton_default, {
|
|
3045
|
+
key: 1,
|
|
3046
|
+
type: "button",
|
|
3047
|
+
variant: "ghost",
|
|
3048
|
+
size: __props.size === "lg" ? "md" : "sm",
|
|
3049
|
+
disabled: __props.disabled,
|
|
3050
|
+
onClick: cancelEditing
|
|
3051
|
+
}, {
|
|
3052
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Cancel ", -1)])]),
|
|
3053
|
+
_: 1
|
|
3054
|
+
}, 8, ["size", "disabled"])), canClear.value ? (openBlock(), createBlock(BaseButton_default, {
|
|
3055
|
+
key: 2,
|
|
3056
|
+
type: "button",
|
|
3057
|
+
variant: "ghost",
|
|
3058
|
+
size: __props.size === "lg" ? "md" : "sm",
|
|
3059
|
+
disabled: __props.disabled,
|
|
3060
|
+
onClick: clear
|
|
3061
|
+
}, {
|
|
3062
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.clearLabel), 1)]),
|
|
3063
|
+
_: 1
|
|
3064
|
+
}, 8, ["size", "disabled"])) : createCommentVNode("", true)])
|
|
3065
|
+
], 2);
|
|
3066
|
+
};
|
|
3067
|
+
}
|
|
3068
|
+
});
|
|
3069
|
+
//#endregion
|
|
2869
3070
|
//#region src/components/NumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
2870
3071
|
var _hoisted_1$10 = { class: "mint-number-input__field" };
|
|
2871
3072
|
var _hoisted_2$9 = [
|
|
@@ -3579,6 +3780,16 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
3579
3780
|
return target;
|
|
3580
3781
|
};
|
|
3581
3782
|
//#endregion
|
|
3783
|
+
//#region src/utils/records.ts
|
|
3784
|
+
/** Narrow an unknown value to a plain object (arrays and null excluded). */
|
|
3785
|
+
function isRecord(value) {
|
|
3786
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3787
|
+
}
|
|
3788
|
+
/** Narrow an unknown value to any non-null object, arrays included. */
|
|
3789
|
+
function isObjectLike(value) {
|
|
3790
|
+
return typeof value === "object" && value !== null;
|
|
3791
|
+
}
|
|
3792
|
+
//#endregion
|
|
3582
3793
|
//#region src/components/DateTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
3583
3794
|
var _hoisted_1$7 = { class: "mint-datetime-picker__input-wrapper" };
|
|
3584
3795
|
var _hoisted_2$6 = [
|
|
@@ -6945,6 +7156,11 @@ var registry = {
|
|
|
6945
7156
|
defaults: { type: "password" },
|
|
6946
7157
|
vModel: true
|
|
6947
7158
|
},
|
|
7159
|
+
secret: {
|
|
7160
|
+
component: SecretInput_default,
|
|
7161
|
+
defaults: {},
|
|
7162
|
+
vModel: true
|
|
7163
|
+
},
|
|
6948
7164
|
tel: {
|
|
6949
7165
|
component: BaseInput_default,
|
|
6950
7166
|
defaults: { type: "tel" },
|
|
@@ -7069,6 +7285,7 @@ function getTypeDefault(type) {
|
|
|
7069
7285
|
case "slider": return;
|
|
7070
7286
|
case "multiselect":
|
|
7071
7287
|
case "tags": return [];
|
|
7288
|
+
case "secret": return null;
|
|
7072
7289
|
default: return "";
|
|
7073
7290
|
}
|
|
7074
7291
|
}
|
|
@@ -7856,6 +8073,6 @@ function useControlSchema(controls, options = {}) {
|
|
|
7856
8073
|
};
|
|
7857
8074
|
}
|
|
7858
8075
|
//#endregion
|
|
7859
|
-
export { resolveJobCapabilities as $, useConcentrationUnits as A,
|
|
8076
|
+
export { resolveJobCapabilities as $, useConcentrationUnits as A, formatTimeSlot as At, currentExperimentFromContext as B, MultiSelect_default as Bt, controlsToViewIds as C, addMinutes as Ct, getTypeDefault as D, findNearestTimeSlotIndex as Dt, getFieldRegistryEntry as E, findAvailableSlots as Et, ATOMIC_WEIGHTS as F, rangesOverlap as Ft, createGeneratedAnalysisTransport as G, BaseToggle_default as Gt, parseExperimentId as H, useSelectionLimit as Ht, useChemicalFormula as I, snapToSlot as It, isActiveJobStatus as J, computePosition as Jt, useGeneratedAnalysis as K, BaseCheckbox_default as Kt, GeneratedPathInput_default as L, toMinutes as Lt, SequenceInput_default as M, generateTimeSlots as Mt, useSequenceUtils as N, isTimeInRange as Nt, ConcentrationInput_default as O, formatDuration as Ot, FormulaInput_default as P, parseTime as Pt, normalizeJobState as Q, BaseTextarea_default as Qt, ArtifactSelectorModal_default as R, useTimeUtils as Rt, controlsToTopBarSettingsConfig as S, TimePicker_default as St, getDefaultControlView as T, durationMinutes as Tt, resolveCurrentExperimentId as U, BaseSlider_default as Ut, getInjectedPlatformContext as V, useListSelection as Vt, resolveCurrentPluginId as W, BaseRadioGroup_default as Wt, jobStatusLabel as X, offset as Xt, isTerminalJobStatus as Y, flip as Yt, normalizeJobPercent as Z, shift as Zt, controlsToFormSchema as _, pluginSecretLabel as _t, defineDoseCalculatorControlProps as a, AlertBox_default as at, controlsToSettingsSchema as b, usesPluginSecretReferences as bt, defineWellPlateDoseComponentBindings as c, SecretInput_default as ct, defineControlModel as d, PLUGIN_SECRET_REF_KEY as dt, useEventStream as et, resolveControlModel as f, clearPluginSecret as ft, mergeControlWorkspaceOptions as g, pluginSecretId as gt, controlValuesToComponentProps as h, keepPluginSecret as ht, useControlSchema as i, _plugin_vue_export_helper_default as it, MoleculeInput_default as j, fromMinutes as jt, UnitInput_default as k, formatTime as kt, defineWellPlateDoseControlProps as l, PLUGIN_SECRET_FORMAT_KEY as lt, controlValuesToComponentBindingsById as m, isPluginSecretRef as mt, defineControls as n, isObjectLike as nt, defineDoseDesignControlModel as o, FileUploader_default as ot, controlValuesToComponentBindings as p, isPluginSecretLocked as pt, usePluginJobs as q, Tooltip_default as qt, getControlDefaults as r, isRecord as rt, defineWellPlateControlProps as s, NumberInput_default as st, defineControlComponentBindings as t, DateTimePicker_default as tt, useControlWorkspace as u, PLUGIN_SECRET_FORMAT_REF as ut, controlsToSectionFormSchema as v, pluginSecretState as vt, controlsToViewItems as w, compareTime as wt, controlsToSidebarPanels as x, TagsInput_default as xt, controlsToSectionFormSchemas as y, setPluginSecret as yt, useAnalysisArtifacts as z, DatePicker_default as zt };
|
|
7860
8077
|
|
|
7861
|
-
//# sourceMappingURL=useControlSchema-
|
|
8078
|
+
//# sourceMappingURL=useControlSchema-_OVhavKq.js.map
|