n8n-editor-ui
Version:
Workflow Editor UI for n8n
90 lines (89 loc) • 3.97 kB
JavaScript
;
(function () {
System.register(["./vue.runtime.esm-bundler-legacy--Sn1h8On.js", "./useTelemetry-legacy-B3pzzkAE.js", "./TagsDropdown-legacy-Cv3fj7k3.js"], function (_export, _context) {
"use strict";
var computed, defineComponent, createBlock, openBlock, useUIStore, ANNOTATION_TAGS_MANAGER_MODAL_KEY, useAnnotationTagsStore, TagsDropdown_default, AnnotationTagsDropdown_ee_vue_vue_type_script_setup_true_lang_default, AnnotationTagsDropdown_ee_default;
return {
setters: [function (_vueRuntimeEsmBundlerLegacy003Js) {
computed = _vueRuntimeEsmBundlerLegacy003Js.C;
defineComponent = _vueRuntimeEsmBundlerLegacy003Js.P;
createBlock = _vueRuntimeEsmBundlerLegacy003Js.T;
openBlock = _vueRuntimeEsmBundlerLegacy003Js.et;
}, function (_useTelemetryLegacy00HJs) {
useUIStore = _useTelemetryLegacy00HJs.Fi;
ANNOTATION_TAGS_MANAGER_MODAL_KEY = _useTelemetryLegacy00HJs.No;
useAnnotationTagsStore = _useTelemetryLegacy00HJs.gn;
}, function (_TagsDropdownLegacy033Js) {
TagsDropdown_default = _TagsDropdownLegacy033Js.t;
}],
execute: function () {
//#region src/features/shared/tags/components/AnnotationTagsDropdown.ee.vue?vue&type=script&setup=true&lang.ts
AnnotationTagsDropdown_ee_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */defineComponent({
__name: "AnnotationTagsDropdown.ee",
props: {
placeholder: {
default: ""
},
modelValue: {
default: () => []
},
createEnabled: {
type: Boolean,
default: false
},
eventBus: {
default: null
}
},
emits: ["update:modelValue", "esc", "blur"],
setup(__props, {
emit: __emit
}) {
const props = __props;
const emit = __emit;
const tagsStore = useAnnotationTagsStore();
const uiStore = useUIStore();
const selectedTags = computed({
get: () => props.modelValue,
set: value => emit("update:modelValue", value)
});
const allTags = computed(() => tagsStore.allTags);
const isLoading = computed(() => tagsStore.isLoading);
const tagsById = computed(() => tagsStore.tagsById);
async function createTag(name) {
return await tagsStore.create(name);
}
function handleManageTags() {
uiStore.openModal(ANNOTATION_TAGS_MANAGER_MODAL_KEY);
}
function handleEsc() {
emit("esc");
}
function handleBlur() {
emit("blur");
}
tagsStore.fetchAll();
return (_ctx, _cache) => {
return openBlock(), createBlock(TagsDropdown_default, {
modelValue: selectedTags.value,
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => selectedTags.value = $event),
placeholder: _ctx.placeholder,
"create-enabled": _ctx.createEnabled,
"event-bus": _ctx.eventBus,
"all-tags": allTags.value,
"is-loading": isLoading.value,
"tags-by-id": tagsById.value,
"create-tag": createTag,
onManageTags: handleManageTags,
onEsc: handleEsc,
onBlur: handleBlur
}, null, 8, ["modelValue", "placeholder", "create-enabled", "event-bus", "all-tags", "is-loading", "tags-by-id"]);
};
}
}); //#endregion
//#region src/features/shared/tags/components/AnnotationTagsDropdown.ee.vue
_export("t", AnnotationTagsDropdown_ee_default = AnnotationTagsDropdown_ee_vue_vue_type_script_setup_true_lang_default); //#endregion
}
};
});
})();