1; 2{ 3 try { 4 let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack; 5 n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2094cdfe-0097-44c5-9854-f0d4be5c11df", e._sentryDebugIdIdentifier = "sentry-dbid-2094cdfe-0097-44c5-9854-f0d4be5c11df"); 6 } catch (e) { 7 } 8} 9; 10import { d as defineComponent, i as toRefs, j as useModel, u as useI18n, k as ref, l as computed, p as watch, r as resolveComponent, o as openBlock, g as createBlock, w as withCtx, b as createVNode, e as createTextVNode, t as toDisplayString, f as unref, M as mdiClose, h as createBaseVNode, c as createElementBlock, x as createCommentVNode, n as normalizeClass, m as mergeProps, F as Fragment, y as mergeModels, _ as _export_sfc } from "./index-jnpBjG05.js"; 11import { a as getBundleTitle } from "./index-qVJxi8tm.js"; 12const _hoisted_1 = { class: "helper-text" }; 13const _hoisted_2 = { 14 key: 0, 15 class: "error-text" 16}; 17const _hoisted_3 = { 18 key: 0, 19 class: "error-text" 20}; 21const _hoisted_4 = { class: "textarea-info" }; 22const _hoisted_5 = { class: "helper-text" }; 23const _hoisted_6 = { class: "helper-text" }; 24const _hoisted_7 = { 25 key: 0, 26 class: "error-text" 27}; 28const _hoisted_8 = { class: "textarea-info" }; 29const _hoisted_9 = { class: "helper-text" }; 30const _hoisted_10 = { class: "helper-text" }; 31const _hoisted_11 = { 32 key: 0, 33 class: "error-text" 34}; 35const _hoisted_12 = { class: "step-two" }; 36const _hoisted_13 = { class: "mb-2" }; 37const _hoisted_14 = { class: "collection-type-options mt-1" }; 38const _hoisted_15 = { class: "option-description" }; 39const _hoisted_16 = { class: "option-description" }; 40const _hoisted_17 = { 41 key: 0, 42 class: "error-text mt-1" 43}; 44const _hoisted_18 = { class: "mt-1" }; 45const _hoisted_19 = { class: "text-green" }; 46const _hoisted_20 = { class: "format-text" }; 47const _hoisted_21 = { class: "format-text" }; 48const _hoisted_22 = { class: "helper-text mt-2" }; 49const _hoisted_23 = { 50 key: 1, 51 class: "error-text mt-1" 52}; 53const _hoisted_24 = { 54 key: 0, 55 class: "mb-8" 56}; 57const _hoisted_25 = { class: "helper-text" }; 58const maxCharacters = 500; 59const _sfc_main = /* @__PURE__ */ defineComponent({ 60 __name: "CreateOrUpdateBundleModal", 61 props: /* @__PURE__ */ mergeModels({ 62 collaborationUrn: {}, 63 type: {}, 64 bundle: {}, 65 bundleGroups: {} 66 }, { 67 "visible": { type: Boolean, ...{ 68 required: true 69 } }, 70 "visibleModifiers": {} 71 }), 72 emits: /* @__PURE__ */ mergeModels(["create", "update", "show-snackbar"], ["update:visible"]), 73 setup(__props, { emit: __emit }) { 74 const props = __props; 75 const { collaborationUrn, type, bundle, bundleGroups } = toRefs(props); 76 const visible = useModel(__props, "visible"); 77 const { t } = useI18n({ inheritLocale: true, useScope: "local" }); 78 const emit = __emit; 79 const fileUploadKey = ref(0); 80 const imageConfig = { 81 maxSize: 10 * 1024 * 1024, 82 // 10MB 83 validTypes: ["image/png", "image/jpg", "image/jpeg"] 84 }; 85 const saving = ref(false); 86 const currentStep = ref(1); 87 const createInitialFormState = () => ({ 88 status: "", 89 nameDutch: "", 90 nameEnglish: "", 91 descriptionDutch: "", 92 descriptionEnglish: "", 93 collectionType: "", 94 imageFile: null, 95 imageUrl: null, 96 parentId: null 97 }); 98 const createInitialErrors = () => ({ 99 status: "", 100 nameDutch: "", 101 nameEnglish: "", 102 descriptionDutch: "", 103 descriptionEnglish: "", 104 collectionType: "", 105 imageFile: "", 106 imageUrl: "", 107 parentId: "" 108 }); 109 const formData = ref(createInitialFormState()); 110 const errors = ref(createInitialErrors()); 111 const deleteExistingImage = ref(false); 112 const bundleGroupOptions = computed(() => { 113 return bundleGroups?.value?.map((bundle2) => { 114 const title = getBundleTitle(bundle2); 115 return { 116 id: bundle2.id, 117 title 118 }; 119 }); 120 }); 121 const onFileChange = (value) => { 122 let file = null; 123 if (Array.isArray(value)) { 124 file = value[0] ?? null; 125 } else { 126 file = value; 127 } 128 formData.value.imageFile = file; 129 if (file) { 130 formData.value.imageUrl = null; 131 } 132 validateField("imageFile"); 133 }; 134 const removeExistingImage = () => { 135 formData.value.imageUrl = null; 136 formData.value.imageFile = null; 137 deleteExistingImage.value = true; 138 fileUploadKey.value++; 139 }; 140 const prefillForm = () => { 141 if (bundle?.value && type.value === "update") { 142 formData.value = { 143 status: bundle.value.publish_status, 144 nameDutch: bundle.value.title?.nl || "", 145 nameEnglish: bundle.value.title?.en || "", 146 descriptionDutch: bundle.value.description?.nl || "", 147 descriptionEnglish: bundle.value.description?.en || "", 148 collectionType: bundle.value.type, 149 imageFile: null, 150 imageUrl: bundle.value.image_url ?? null, 151 parentId: bundle.value.parent_id || null 152 }; 153 } else { 154 formData.value = createInitialFormState(); 155 } 156 }; 157 const validationRules = { 158 status: (value) => !value ? t("errors.field-required") : "", 159 nameDutch: (value) => !value.trim() ? t("errors.title-required") : "", 160 nameEnglish: (value) => !value.trim() ? t("errors.title-required") : "", 161 descriptionDutch: (value) => { 162 if (value.length > maxCharacters) return t("errors.max-characters-exceeded", { max: maxCharacters }); 163 return ""; 164 }, 165 descriptionEnglish: (value) => { 166 if (value.length > maxCharacters) return t("errors.max-characters-exceeded", { max: maxCharacters }); 167 return ""; 168 }, 169 collectionType: (value) => !value ? t("errors.field-required") : "", 170 imageFile: (file) => { 171 if (!file) return ""; 172 if (!imageConfig.validTypes.includes(file.type)) { 173 return t("errors.image-format-invalid"); 174 } 175 if (file.size > imageConfig.maxSize) { 176 return t("errors.image-size-exceeded"); 177 } 178 return ""; 179 }, 180 imageUrl: () => "", 181 parentId: () => "" 182 }; 183 const isStepOneValid = computed(() => { 184 const { status, nameDutch, nameEnglish, descriptionDutch, descriptionEnglish } = formData.value; 185 return !!status && !!nameDutch.trim() && !!nameEnglish.trim() && descriptionDutch.length <= maxCharacters && descriptionEnglish.length <= maxCharacters; 186 }); 187 const isStepTwoValid = computed(() => { 188 const { collectionType, imageFile } = formData.value; 189 return !!collectionType && validationRules.imageFile(imageFile) === ""; 190 }); 191 const isFormValid = computed(() => isStepOneValid.value && isStepTwoValid.value); 192 watch( 193 bundle, 194 () => { 195 prefillForm(); 196 }, 197 { immediate: true } 198 ); 199 watch(visible, (newValue) => { 200 if (newValue) { 201 prefillForm(); 202 currentStep.value = 1; 203 } else { 204 resetForm(); 205 } 206 }); 207 const resetForm = () => { 208 formData.value = createInitialFormState(); 209 errors.value = createInitialErrors(); 210 }; 211 const validateField = (field) => { 212 const validator = validationRules[field]; 213 if (validator) { 214 errors.value[field] = validator(formData.value[field]); 215 } 216 }; 217 const validateForm = () => {
218 Object.keys(validationRules).forEach((field) => { 219 validateField(field); 220 }); 221 return !Object.values(errors.value).some((error) => error !== ""); 222 }; 223 const createBundleData = () => ({ 224 title: { 225 nl: formData.value.nameDutch, 226 en: formData.value.nameEnglish 227 }, 228 description: { 229 nl: formData.value.descriptionDutch, 230 en: formData.value.descriptionEnglish 231 }, 232 type: formData.value.collectionType, 233 allow_bundles: false, 234 allow_materials: true, 235 publish_status: formData.value.status, 236 owner_type: "collaboration", 237 owner_identifier: collaborationUrn.value, 238 parent_id: formData.value.parentId, 239 order_in_parent: 0 240 }); 241 const updateBundleData = () => ({ 242 ...bundle.value, 243 publish_status: formData.value.status, 244 title: { 245 nl: formData.value.nameDutch, 246 en: formData.value.nameEnglish 247 }, 248 description: { 249 nl: formData.value.descriptionDutch, 250 en: formData.value.descriptionEnglish 251 }, 252 image_url: formData.value.imageUrl, 253 type: formData.value.collectionType, 254 parent_id: formData.value.parentId || null 255 }); 256 async function onSave() { 257 if (!validateForm()) { 258 return; 259 } 260 saving.value = true; 261 const newBundle = type.value === "create" ? createBundleData() : updateBundleData(); 262 const imageFile = formData.value.imageFile ?? void 0; 263 if (type.value === "create") { 264 emit("create", newBundle, imageFile); 265 } else if (type.value === "update") { 266 emit("update", newBundle, deleteExistingImage.value, imageFile); 267 } 268 saving.value = false; 269 visible.value = false; 270 } 271 return (_ctx, _cache) => { 272 const _component_v_icon = resolveComponent("v-icon"); 273 const _component_v_card_title = resolveComponent("v-card-title"); 274 const _component_v_radio = resolveComponent("v-radio"); 275 const _component_v_radio_group = resolveComponent("v-radio-group"); 276 const _component_v_text_field = resolveComponent("v-text-field"); 277 const _component_v_textarea = resolveComponent("v-textarea"); 278 const _component_v_card_text = resolveComponent("v-card-text"); 279 const _component_v_avatar = resolveComponent("v-avatar"); 280 const _component_v_file_upload_item = resolveComponent("v-file-upload-item"); 281 const _component_v_file_upload = resolveComponent("v-file-upload"); 282 const _component_v_img = resolveComponent("v-img"); 283 const _component_v_select = resolveComponent("v-select"); 284 const _component_v_form = resolveComponent("v-form"); 285 const _component_v_btn = resolveComponent("v-btn"); 286 const _component_v_card_actions = resolveComponent("v-card-actions"); 287 const _component_v_card = resolveComponent("v-card"); 288 const _component_v_dialog = resolveComponent("v-dialog"); 289 return openBlock(), createBlock(_component_v_dialog, { 290 modelValue: visible.value, 291 "onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => visible.value = $event), 292 width: "auto" 293 }, { 294 default: withCtx(() => [ 295 createVNode(_component_v_card, null, { 296 default: withCtx(() => [ 297 createVNode(_component_v_card_title, { class: "bg-green d-flex align-center justify-space-between" }, { 298 default: withCtx(() => [ 299 createTextVNode(toDisplayString(unref(type) === "create" ? unref(t)("add-collection") : unref(t)("edit-collection")) + " ", 1), 300 createVNode(_component_v_icon, { 301 icon: unref(mdiClose), 302 onClick: _cache[0] || (_cache[0] = ($event) => visible.value = false) 303 }, null, 8, ["icon"]) 304 ]), 305 _: 1 306 }), 307 createVNode(_component_v_form, { 308 ref: "formRef", 309 class: "form" 310 }, { 311 default: withCtx(() => [ 312 currentStep.value === 1 ? (openBlock(), createBlock(_component_v_card_text, { 313 key: 0, 314 class: "content" 315 }, { 316 default: withCtx(() => [ 317 createBaseVNode("h3", null, toDisplayString(unref(t)("step-one")), 1), 318 createBaseVNode("div", null, [ 319 createBaseVNode("label", null, toDisplayString(unref(t)("labels.collection-status")), 1), 320 createVNode(_component_v_radio_group, { 321 modelValue: formData.value.status, 322 "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value.status = $event), 323 inline: "", 324 "error-messages": errors.value.status, 325 onBlur: _cache[2] || (_cache[2] = ($event) => validateField("status")) 326 }, { 327 default: withCtx(() => [ 328 createVNode(_component_v_radio, { 329 color: "green", 330 label: unref(t)("labels.collection-status-published"), 331 value: "public" 332 }, null, 8, ["label"]), 333 createVNode(_component_v_radio, { 334 color: "green", 335 label: unref(t)("labels.collection-status-draft"), 336 value: "draft" 337 }, null, 8, ["label"]) 338 ]), 339 _: 1 340 }, 8, ["modelValue", "error-messages"]), 341 createBaseVNode("div", _hoisted_1, toDisplayString(unref(t)("helper-text.collection-status")), 1) 342 ]), 343 createBaseVNode("div", null, [ 344 createBaseVNode("label", null, toDisplayString(unref(t)("labels.collection-name-dutch")), 1), 345 createVNode(_component_v_text_field, { 346 modelValue: formData.value.nameDutch, 347 "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => formData.value.nameDutch = $event), 348 class: "mt-1", 349 variant: "outlined", 350 density: "comfortable", 351 "error-messages": errors.value.nameDutch, 352 "hide-details": "", 353 onBlur: _cache[4] || (_cache[4] = ($event) => validateField("nameDutch")) 354 }, null, 8, ["modelValue", "error-messages"]), 355 errors.value.nameDutch ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(errors.value.nameDutch), 1)) : createCommentVNode("", true) 356 ]), 357 createBaseVNode("div", null, [ 358 createBaseVNode("label", null, toDisplayString(unref(t)("labels.collection-name-english")), 1), 359 createVNode(_component_v_text_field, { 360 modelValue: formData.value.nameEnglish, 361 "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => formData.value.nameEnglish = $event), 362 class: "mt-1", 363 variant: "outlined", 364 density: "comfortable", 365 "error-messages": errors.value.nameEnglish, 366 "hide-details": "", 367 onBlur: _cache[6] || (_cache[6] = ($event) => validateField("nameEnglish")) 368 }, null, 8, ["modelValue", "error-messages"]), 369 errors.value.nameEnglish ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(errors.value.nameEnglish), 1)) : createCommentVNode("", true) 370 ]), 371 createBaseVNode("div", null, [ 372 createBaseVNode("label", null, toDisplayString(unref(t)("labels.collection-description-dutch")), 1), 373 createVNode(_component_v_textarea, { 374 modelValue: formData.value.descriptionDutch, 375 "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => formData.value.descriptionDutch = $event), 376 class: normalizeClass(["mt-1", { "counter-exceeded": formData.value.descriptionDutch.length > maxCharacters }]), 377 rows: "5", 378 variant: "outlined", 379 counter: maxCharacters, 380 "hide-details": "", 381 onBlur: _cache[8] || (_cache[8] = ($event) => validateField("descriptionDutch")) 382 }, null, 8, ["modelValue", "class"]), 383 createBaseVNode("div", _hoisted_4, [ 384 createBaseVNode("span", _hoisted_5, toDisplayString(unref(t)("helper-text.max-characters")), 1), 385 createBaseVNode("span", _hoisted_6, toDisplayString(formData.value.descriptionDutch.length) + "/" + toDisplayString(maxCharacters), 1) 386 ]), 387 errors.value.descriptionDutch ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(errors.value.descriptionDutch), 1)) : createCommentVNode("", true) 388 ]), 389 createBaseVNode("div", null, [ 390 createBaseVNode("label", null, toDisplayString(unref(t)("labels.collection-description-english")), 1), 391 createVNode(_component_v_textarea, { 392 modelValue: formData.value.descriptionEnglish, 393 "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => formData.value.descriptionEnglish = $event), 394 class: normalizeClass(["mt-1", { "counter-exceeded": formData.value.descriptionEnglish.length > maxCharacters }]), 395 rows: "5", 396 variant: "outlined", 397 counter: maxCharacters, 398 "hide-details": "", 399 onBlur: _cache[10] || (_cache[10] = ($event) => validateField("descriptionEnglish")) 400 }, null, 8, ["modelValue", "class"]), 401 createBaseVNode("div", _hoisted_8, [ 402 createBaseVNode("span", _hoisted_9, toDisplayString(unref(t)("helper-text.max-characters")), 1), 403 createBaseVNode("span", _hoisted_10, toDisplayString(formData.value.descriptionEnglish.length) + "/" + toDisplayString(maxCharacters), 1) 404 ]), 405 errors.value.descriptionEnglish ? (openBlock(), createElementBlock("div", _hoisted_11, toDisplayString(errors.value.descriptionEnglish), 1)) : createCommentVNode("", true) 406 ]) 407 ]), 408 _: 1 409 })) : createCommentVNode("", true), 410 currentStep.value === 2 ? (openBlock(), createBlock(_component_v_card_text, { key: 1 }, { 411 default: withCtx(() => [ 412 createBaseVNode("div", _hoisted_12, [ 413 createBaseVNode("div", null, [ 414 createBaseVNode("h3", null, toDisplayString(unref(t)("step-two")), 1) 415 ]), 416 createBaseVNode("div", null, [ 417 createBaseVNode("label", _hoisted_13, toDisplayString(unref(t)("labels.collection-type")), 1), 418 createBaseVNode("div", _hoisted_14, [ 419 createBaseVNode("div", { 420 class: normalizeClass(["collection-type-option", { selected: formData.value.collectionType === "dynamic" }]), 421 onClick: _cache[11] || (_cache[11] = ($event) => formData.value.collectionType = "dynamic") 422 }, [ 423 createBaseVNode("h4", { 424 class: normalizeClass({ selected: formData.value.collectionType === "dynamic" }) 425 }, toDisplayString(unref(t)("labels.collection-dynamic")), 3), 426 createBaseVNode("div", _hoisted_15, toDisplayString(unref(t)("helper-text.collection-dynamic")) + ".", 1) 427 ], 2), 428 createBaseVNode("div", { 429 class: normalizeClass(["collection-type-option", { selected: formData.value.collectionType === "static" }]), 430 onClick: _cache[12] || (_cache[12] = ($event) => formData.value.collectionType = "static") 431 }, [ 432 createBaseVNode("h4", { 433 class: normalizeClass({ selected: formData.value.collectionType === "static" }) 434 }, toDisplayString(unref(t)("labels.collection-static")), 3), 435 createBaseVNode("div", _hoisted_16, toDisplayString(unref(t)("helper-text.collection-static")), 1) 436 ], 2) 437 ]), 438 errors.value.collectionType ? (openBlock(), createElementBlock("div", _hoisted_17, toDisplayString(errors.value.collectionType), 1)) : createCommentVNode("", true) 439 ]), 440 createBaseVNode("div", null, [ 441 createBaseVNode("label", null, toDisplayString(unref(t)("labels.collection-image")), 1
441), 442 createBaseVNode("div", _hoisted_18, [ 443 (openBlock(), createBlock(_component_v_file_upload, { 444 key: fileUploadKey.value, 445 accept: "image/png, image/jpg, image/jpeg", 446 density: "compact", 447 clearable: "", 448 "onUpdate:modelValue": onFileChange 449 }, { 450 item: withCtx(({ props: itemProps }) => [ 451 createVNode(_component_v_file_upload_item, mergeProps(itemProps, { 452 lines: "one", 453 nav: "" 454 }), { 455 prepend: withCtx(() => [ 456 createVNode(_component_v_avatar, { 457 size: "32", 458 rounded: "" 459 }) 460 ]), 461 clear: withCtx(({ props: clearProps }) => [ 462 createBaseVNode("div", mergeProps({ class: "clear d-inline-block" }, clearProps), toDisplayString(unref(t)("clear")), 17) 463 ]), 464 _: 2 465 }, 1040) 466 ]), 467 title: withCtx(() => [ 468 createBaseVNode("div", null, [ 469 createBaseVNode("span", _hoisted_19, toDisplayString(unref(t)("labels.choose-file")), 1), 470 createBaseVNode("span", null, toDisplayString(unref(t)("labels.drag-file")), 1), 471 createBaseVNode("div", _hoisted_20, toDisplayString(unref(t)("helper-text.collection-image-format")), 1), 472 createBaseVNode("div", _hoisted_21, toDisplayString(unref(t)("helper-text.collection-image-size")), 1) 473 ]) 474 ]), 475 _: 1 476 })), 477 formData.value.imageUrl && !formData.value.imageFile ? (openBlock(), createBlock(_component_v_file_upload_item, { 478 key: 0, 479 lines: "one", 480 nav: "" 481 }, { 482 prepend: withCtx(() => [ 483 createVNode(_component_v_avatar, { 484 size: "32", 485 rounded: "" 486 }, { 487 default: withCtx(() => [ 488 createVNode(_component_v_img, { 489 src: formData.value.imageUrl, 490 cover: "" 491 }, null, 8, ["src"]) 492 ]), 493 _: 1 494 }) 495 ]), 496 append: withCtx(() => [ 497 createBaseVNode("div", { 498 class: "clear d-inline-block", 499 onClick: removeExistingImage 500 }, toDisplayString(unref(t)("clear")), 1) 501 ]), 502 _: 1 503 })) : createCommentVNode("", true), 504 createBaseVNode("div", _hoisted_22, toDisplayString(unref(t)("helper-text.collection-image")), 1), 505 errors.value.imageFile ? (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(errors.value.imageFile), 1)) : createCommentVNode("", true) 506 ]) 507 ]), 508 bundleGroupOptions.value?.length ? (openBlock(), createElementBlock("div", _hoisted_24, [ 509 createBaseVNode("label", null, toDisplayString(unref(t)("labels.bundle-group")), 1), 510 createVNode(_component_v_select, { 511 modelValue: formData.value.parentId, 512 "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => formData.value.parentId = $event), 513 class: "custom-select mt-1", 514 items: bundleGroupOptions.value, 515 "item-title": "title", 516 "item-value": "id", 517 variant: "outlined", 518 clearable: "" 519 }, null, 8, ["modelValue", "items"]), 520 createBaseVNode("div", _hoisted_25, toDisplayString(unref(t)("helper-text.bundle-group")), 1) 521 ])) : createCommentVNode("", true) 522 ]) 523 ]), 524 _: 1 525 })) : createCommentVNode("", true) 526 ]), 527 _: 1 528 }, 512), 529 createVNode(_component_v_card_actions, { class: "d-flex justify-end ga-3 px-6 py-6" }, {
530 default: withCtx(() => [ 531 currentStep.value === 1 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [ 532 createVNode(_component_v_btn, { 533 color: "gray", 534 variant: "outlined", 535 height: "51", 536 class: "px-6", 537 onClick: _cache[14] || (_cache[14] = ($event) => visible.value = false) 538 }, { 539 default: withCtx(() => [ 540 createTextVNode(toDisplayString(unref(t)("cancel")), 1) 541 ]), 542 _: 1 543 }), 544 createVNode(_component_v_btn, { 545 class: "bg-yellow text-black px-6", 546 height: "51", 547 disabled: !isStepOneValid.value, 548 onClick: _cache[15] || (_cache[15] = ($event) => currentStep.value = 2) 549 }, { 550 default: withCtx(() => [ 551 createTextVNode(toDisplayString(unref(t)("next")), 1) 552 ]), 553 _: 1 554 }, 8, ["disabled"]) 555 ], 64)) : currentStep.value === 2 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [ 556 createVNode(_component_v_btn, { 557 color: "gray", 558 variant: "outlined", 559 height: "51", 560 class: "px-6", 561 onClick: _cache[16] || (_cache[16] = ($event) => currentStep.value = 1) 562 }, { 563 default: withCtx(() => [ 564 createTextVNode(toDisplayString(unref(t)("previous")), 1) 565 ]), 566 _: 1 567 }), 568 createVNode(_component_v_btn, { 569 class: "bg-yellow text-black px-6", 570 height: "51", 571 disabled: !isFormValid.value || saving.value, 572 loading: saving.value, 573 onClick: onSave 574 }, { 575 default: withCtx(() => [ 576 createTextVNode(toDisplayString(unref(type) === "create" ? unref(t)("add-save") : unref(t)("edit-save")), 1) 577 ]), 578 _: 1 579 }, 8, ["disabled", "loading"]) 580 ], 64)) : createCommentVNode("", true) 581 ]), 582 _: 1 583 }) 584 ]), 585 _: 1 586 }) 587 ]), 588 _: 1 589 }, 8, ["modelValue"]); 590 }; 591 } 592}); 593function block0(Component) { 594 const _Component = Component; 595 _Component.__i18n = _Component.__i18n || []; 596 _Component.__i18n.push({ 597 "locale": "", 598 "resource": { 599 "en-US": { 600 "add-collection": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add collection" } }, 601 "edit-collection": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Edit collection" } }, 602 "cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Cancel" } }, 603 "add-save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add collection" } }, 604 "edit-save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Save changes" } }, 605 "next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Next" } }, 606 "previous": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Previous step" } }, 607 "step-one": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Step 1 of 2" } }, 608 "step-two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Step 2 of 2" } }, 609 "clear": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Delete file" } }, 610 "labels": { 611 "collection-status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collection status*" } }, 612 "collection-status-draft": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Set as draft" } }, 613 "collection-status-published": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Published" } },
614 "collection-name-dutch": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collection name* (Dutch)" } }, 615 "collection-name-english": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collection name* (English)" } }, 616 "collection-description-dutch": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collection description (Dutch)" } }, 617 "collection-description-english": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collection description(English)" } }, 618 "collection-image": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collection image" } }, 619 "collection-type": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collection type*" } }, 620 "collection-dynamic": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Dynamic collection" } }, 621 "collection-static": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Static collection" } }, 622 "choose-file": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Choose file " } }, 623 "drag-file": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "or drag and drop file here" } }, 624 "bundle-group": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Select collection group (optional)" } } 625 }, 626 "errors": { 627 "field-required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "This field is required." } }, 628 "title-required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "This is a mandatory field. Enter a title for your collection." } }, 629 "max-characters-exceeded": { "t": 0, "b": { "t": 2, "i": [{ "t": 3, "v": "Maximum of " }, { "t": 4, "k": "max" }, { "t": 3, "v": " characters exceeded" }] } }, 630 "image-format-invalid": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Invalid file format. Please use PNG or JPG." } }, 631 "image-size-exceeded": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "File size too large. Maximum 10MB allowed." } } 632 }, 633 "helper-text": { 634 "collection-status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collections set as draft won't be visible for your audience." } }, 635 "collection-image": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "You can add or change this image later." } }, 636 "collection-image-format": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "PNG, jpg files up to 10MB" } }, 637 "collection-image-size": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Recommended size is 400 x 215" } }, 638 "collection-dynamic": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Automatically includes all resources that match chosen metadata." } }, 639 "collection-static": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Manually add resources one by one, like dragging files into a folder." } }, 640 "max-characters": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Maximum number of characters" } }, 641 "bundle-group": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Choose the collection group where this collection should be placed." } } 642 }, 643 "update-successful-message": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Update successful" } }, 644 "update-failed-message": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Update failed" } } 645 }, 646 "nl-NL": { 647 "add-collection": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie toevoegen" } }, 648 "edit-collection": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie bewerken" } }, 649 "cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Annuleren" } }, 650 "add-save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie toevoegen" } }, 651 "edit-save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bewaar wijzigingen" } }, 652 "next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Volgende" } }, 653 "previous": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vorige stap" } }, 654 "step-one": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Stap 1 van 2" } }, 655 "step-two": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Stap 2 van 2" } }, 656 "clear": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Verwijder bestand" } }, 657 "labels": { 658 "collection-status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie status*" } }, 659 "collection-status-draft": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bewaar als concept" } }, 660 "collection-status-published": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Gepubliceerd" } },
661 "collection-name-dutch": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie naam* (Nederlands)" } }, 662 "collection-name-english": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie naam* (Engels)" } }, 663 "collection-description-dutch": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie omschrijving (Nederlands)" } }, 664 "collection-description-english": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie omschrijving (Engels)" } }, 665 "collection-image": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie afbeelding" } }, 666 "collection-type": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collectie soort*" } }, 667 "collection-dynamic": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Dynamische collectie" } }, 668 "collection-static": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Statische collectie" } }, 669 "choose-file": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Kies een bestand " } }, 670 "drag-file": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "of sleep het bestand hierheen" } }, 671 "bundle-group": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Selecteer collectie groep (optioneel)" } } 672 }, 673 "errors": { 674 "field-required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Dit veld is verplicht." } }, 675 "title-required": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Dit is een verplicht veld. Vul een titel in voor je collectie." } }, 676 "max-characters-exceeded": { "t": 0, "b": { "t": 2, "i": [{ "t": 3, "v": "Maximum van " }, { "t": 4, "k": "max" }, { "t": 3, "v": " tekens overschreden" }] } }, 677 "image-format-invalid": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ongeldig bestandsformaat. Gebruik PNG of JPG." } }, 678 "image-size-exceeded": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bestand is te groot. Maximum 10MB toegestaan." } } 679 }, 680 "helper-text": { 681 "collection-status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Collecties die als concept bewaart zijn, zullen niet zic
681htbaar zijn voor het publiek." } }, 682 "collection-image": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Dit kun je later nog toevoegen of wijzigen." } }, 683 "collection-image-format": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "PNG, jpg bestanden tot 10MB" } }, 684 "collection-image-size": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aanbevolen formaat is 400 x 215" } }, 685 "collection-dynamic": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Voegt automatisch alle bronnen toe die overeenkomen met de gekozen metadata." } }, 686 "collection-static": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Voeg handmatig bronnen één voor één toe, zoals bestanden in een map slepen." } }, 687 "max-characters": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Maximaal aantal tekens" } }, 688 "bundle-group": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Kies de collectie groep waar deze collectie in geplaatst moet worden." } } 689 }, 690 "update-successful-message": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bijwerken geslaagd" } }, 691 "update-failed-message": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bijwerken mislukt" } } 692 } 693 } 694 }); 695} 696if (typeof block0 === "function") block0(_sfc_main); 697const CreateOrUpdateBundleModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-730cd74c"]]); 698export { 699 CreateOrUpdateBundleModal as C 700}; 701//# sourceMappingURL=CreateOrUpdateBundleModal-Cjr5kPIg.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.