@beeintel/batch-image 1.0.0 → 1.1.0

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.
Files changed (56) hide show
  1. package/README.md +7 -3
  2. package/dist/chunks/{AdjustToolPanel-B6dtlFlj.js → AdjustToolPanel-DCNhkuE4.js} +21 -20
  3. package/dist/chunks/BackgroundToolPanel-D3TILm-m.js +43 -0
  4. package/dist/chunks/{BatchMaterials-DDoJTaS5.js → BatchMaterials-BPJeE3y9.js} +1 -1
  5. package/dist/chunks/BatchModeChoices-BuP83uOq.js +118 -0
  6. package/dist/chunks/{BatchOutputColorPicker-D7WIDS4_.js → BatchOutputColorPicker-CZoQzBII.js} +2 -2
  7. package/dist/chunks/BatchReferenceFields-B7SL__lu.js +308 -0
  8. package/dist/chunks/BeautifyToolPanel-DsTOjndh.js +220 -0
  9. package/dist/chunks/{BrandMarkToolPanel-vKobk_R3.js → BrandMarkToolPanel-Cob9bPYT.js} +319 -333
  10. package/dist/chunks/{ContentTrimControl-BKCJEst5.js → ContentTrimControl-CKNfHz_u.js} +2 -2
  11. package/dist/chunks/{CropToolPanel-C_sW5tWL.js → CropToolPanel-6MiynTP2.js} +60 -56
  12. package/dist/chunks/CutoutToolPanel-V-AUrbwz.js +78 -0
  13. package/dist/chunks/DisclosureToolPanel-DvouSIbA.js +72 -0
  14. package/dist/chunks/ExpandToolPanel-C98UZmBx.js +69 -0
  15. package/dist/chunks/{ImageEffectsToolPanel-CsDIBpT6.js → ImageEffectsToolPanel-hA0TlEix.js} +63 -52
  16. package/dist/chunks/{IpAuditToolPanel-CduDfFh-.js → IpAuditToolPanel-BCQ8Kewh.js} +15 -13
  17. package/dist/chunks/{ListingToolPanel-8pJ2_zvI.js → ListingToolPanel-DH-xpvLp.js} +170 -184
  18. package/dist/chunks/{MaterialSelectionPlate-CW7HaS6v.js → MaterialSelectionPlate-CQBIf6ZJ.js} +4 -4
  19. package/dist/chunks/MetadataToolPanel-z4RK3JCb.js +116 -0
  20. package/dist/chunks/{OrientToolPanel-C1AzQchm.js → OrientToolPanel-BwtT0xKI.js} +3 -3
  21. package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-DIRuJ1De.js +122 -0
  22. package/dist/chunks/ResizeToolPanel-BVeZbKJl.js +1171 -0
  23. package/dist/chunks/RetouchToolPanel-CqSzWVOK.js +358 -0
  24. package/dist/chunks/ShadowToolPanel-BgsCgLay.js +258 -0
  25. package/dist/chunks/SvgExportToolPanel-CdCXYYHF.js +208 -0
  26. package/dist/chunks/TranslationToolPanel-D4ETI6sf.js +102 -0
  27. package/dist/chunks/{UpscaleToolPanel-BRIgpszs.js → UpscaleToolPanel-D_hmQLEi.js} +44 -39
  28. package/dist/chunks/arrow-up-C1vBvuff.js +18 -0
  29. package/dist/chunks/{entry-CboOSe2r.js → entry-DVV89YMR.js} +7614 -7498
  30. package/dist/chunks/{loader-circle-CylCgDqP.js → loader-circle-GPucRX_4.js} +1 -1
  31. package/dist/chunks/{motionFeatures-D67ghPG1.js → motionFeatures-_pQ-ZW4p.js} +1 -1
  32. package/dist/chunks/{search-BwsDnulU.js → search-CUAg5uDr.js} +1 -1
  33. package/dist/config.d.ts +6 -0
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +6 -5
  36. package/dist/node/cli.mjs +0 -0
  37. package/dist/resources.json +104 -94
  38. package/dist/slots.d.ts +2 -0
  39. package/dist/style.css +1 -1
  40. package/dist/tool-links.d.ts +10 -0
  41. package/dist/types/batch/public/config.d.ts +6 -0
  42. package/package.json +9 -8
  43. package/dist/chunks/BackgroundToolPanel-C3Rr9d4S.js +0 -41
  44. package/dist/chunks/BatchModeChoices-DeBARgvY.js +0 -111
  45. package/dist/chunks/BatchReferenceFields-Cr5WgFRJ.js +0 -316
  46. package/dist/chunks/BeautifyToolPanel-DDZXDQKM.js +0 -215
  47. package/dist/chunks/CutoutToolPanel-B7ObmiWd.js +0 -73
  48. package/dist/chunks/DisclosureToolPanel-F3ccFJIF.js +0 -76
  49. package/dist/chunks/ExpandToolPanel-BKjj5UJA.js +0 -67
  50. package/dist/chunks/MetadataToolPanel-C8XJOamN.js +0 -104
  51. package/dist/chunks/PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js +0 -102
  52. package/dist/chunks/ResizeToolPanel-DWikcj2G.js +0 -1178
  53. package/dist/chunks/RetouchToolPanel-B4eQKk2W.js +0 -350
  54. package/dist/chunks/ShadowToolPanel-Bbj76hQd.js +0 -254
  55. package/dist/chunks/SvgExportToolPanel-BRxpzd7q.js +0 -219
  56. package/dist/chunks/TranslationToolPanel-Bxv8U2WY.js +0 -125
@@ -0,0 +1,10 @@
1
+ import type { WorkspaceDisplay } from './contracts';
2
+ export interface WorkspaceToolLink {
3
+ readonly toolId: string;
4
+ readonly entryId?: string;
5
+ readonly groupId: string;
6
+ readonly title: string;
7
+ readonly href: string;
8
+ }
9
+ /** Stable links for landing pages; each target is resolved by the workspace on load. */
10
+ export declare function listWorkspaceToolLinks(workspaceUrl: string, locale?: NonNullable<WorkspaceDisplay['locale']>): readonly WorkspaceToolLink[];
@@ -27,6 +27,10 @@ export interface WorkspaceNavigationRequest {
27
27
  readonly toolId?: string;
28
28
  readonly entryId?: string;
29
29
  }
30
+ export interface WorkspaceToolLocation {
31
+ readonly toolId?: string;
32
+ readonly entryId?: string;
33
+ }
30
34
  export interface WorkspaceConfig {
31
35
  toolOptions?: {
32
36
  translation?: {
@@ -43,6 +47,8 @@ export interface WorkspaceConfig {
43
47
  /** The host opens its route/container. The core never constructs a product URL. */
44
48
  navigation?: {
45
49
  openWorkspace(request: WorkspaceNavigationRequest): void | Promise<void>;
50
+ /** Optional URL sync for hosts with tool landing pages. */
51
+ onToolChange?(location: WorkspaceToolLocation): void;
46
52
  };
47
53
  parameterDefaults?: readonly WorkspaceParameterDefault[];
48
54
  capabilities?: readonly WorkspaceCapability[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beeintel/batch-image",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Embeddable batch image workspace for Vue applications",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -34,6 +34,13 @@
34
34
  "sideEffects": [
35
35
  "**/*.css"
36
36
  ],
37
+ "scripts": {
38
+ "build": "node scripts/build.mjs",
39
+ "watch": "node scripts/watch.mjs",
40
+ "typecheck": "vue-tsc --noEmit",
41
+ "test": "vitest run --maxWorkers=1 --config vitest.config.ts",
42
+ "prepack": "pnpm run build"
43
+ },
37
44
  "peerDependencies": {
38
45
  "vue": "^3.5.0",
39
46
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
@@ -84,11 +91,5 @@
84
91
  "vite": {
85
92
  "optional": true
86
93
  }
87
- },
88
- "scripts": {
89
- "build": "node scripts/build.mjs",
90
- "watch": "node scripts/watch.mjs",
91
- "typecheck": "vue-tsc --noEmit",
92
- "test": "vitest run --maxWorkers=1 --config vitest.config.ts"
93
94
  }
94
- }
95
+ }
@@ -1,41 +0,0 @@
1
- import { defineComponent as u, openBlock as m, createBlock as f, withCtx as l, createElementVNode as o, toDisplayString as c, unref as t, createVNode as d } from "vue";
2
- import { F as x, G as b, _ as p } from "./entry-CboOSe2r.js";
3
- import { u as P, _ as g, n as k } from "./PluginActionFooter.vue_vue_type_script_setup_true_lang-BGe419qz.js";
4
- import { B as v } from "./BatchOutputColorPicker-D7WIDS4_.js";
5
- const B = ["disabled"], _ = { class: "output-color-field" }, C = /* @__PURE__ */ u({
6
- __name: "BackgroundToolPanel",
7
- props: {
8
- context: {}
9
- },
10
- setup(e) {
11
- const { ui: a } = x(), s = e, i = P(() => s.context);
12
- return (h, n) => (m(), f(b, { context: e.context }, {
13
- actions: l(() => [
14
- d(g, {
15
- context: e.context,
16
- available: t(k)(e.context)
17
- }, null, 8, ["context", "available"])
18
- ]),
19
- default: l(() => [
20
- o("fieldset", {
21
- class: "tool-fields plugin-fields",
22
- disabled: e.context.readonly
23
- }, [
24
- o("p", null, c(t(a)("common.toolPanel_018bab40")), 1),
25
- o("div", _, [
26
- o("span", null, c(t(a)("common.toolPanel_243779ee")), 1),
27
- d(v, {
28
- "model-value": t(i).backgroundColor,
29
- disabled: e.context.readonly,
30
- "onUpdate:modelValue": n[0] || (n[0] = (r) => e.context.updateDraft({ backgroundColor: r }))
31
- }, null, 8, ["model-value", "disabled"])
32
- ])
33
- ], 8, B)
34
- ]),
35
- _: 1
36
- }, 8, ["context"]));
37
- }
38
- }), I = /* @__PURE__ */ p(C, [["__scopeId", "data-v-99612892"]]);
39
- export {
40
- I as default
41
- };
@@ -1,111 +0,0 @@
1
- import { defineComponent as L, openBlock as a, createElementBlock as s, createElementVNode as o, toDisplayString as b, unref as r, Fragment as h, renderList as m, createCommentVNode as g } from "vue";
2
- import { F as B, D as M, _ as v } from "./entry-CboOSe2r.js";
3
- const C = { class: "batch-mode-choices" }, V = { class: "mode-label" }, A = ["aria-label"], D = ["aria-label", "aria-pressed", "disabled", "onClick", "onKeydown"], E = ["src"], I = {
4
- key: 1,
5
- viewBox: "0 0 120 76",
6
- "aria-hidden": "true"
7
- }, N = {
8
- fill: "#f3f5ed",
9
- stroke: "#899774",
10
- "stroke-width": "1.4"
11
- }, S = ["y"], F = ["y"], H = { key: 2 }, K = /* @__PURE__ */ L({
12
- __name: "BatchModeChoices",
13
- props: {
14
- modelValue: {},
15
- label: {},
16
- options: {},
17
- disabled: { type: Boolean }
18
- },
19
- emits: ["update:modelValue"],
20
- setup(i, { emit: k }) {
21
- const { ui: R, uiText: d, batchI18n: x } = B(), { displayState: w } = M(), u = i, p = k;
22
- function f(n) {
23
- !u.disabled && !n.disabled && p("update:modelValue", n.value);
24
- }
25
- function _(n, t) {
26
- if (!["ArrowLeft", "ArrowRight"].includes(n.key)) return;
27
- n.preventDefault(), n.stopPropagation();
28
- const e = (n.key === "ArrowRight" ? 1 : -1) * (w.value.direction === "rtl" ? -1 : 1), l = u.options.indexOf(t);
29
- for (let c = l + e; c >= 0 && c < u.options.length; c += e) {
30
- const y = u.options[c];
31
- if (!(y.disabled || u.disabled)) {
32
- f(y), n.currentTarget.parentElement?.querySelectorAll("button")[c]?.focus();
33
- break;
34
- }
35
- }
36
- }
37
- return (n, t) => (a(), s("section", C, [
38
- o("span", V, b(r(d)(i.label)), 1),
39
- o("div", {
40
- class: "mode-options",
41
- role: "group",
42
- "aria-label": r(d)(i.label)
43
- }, [
44
- (a(!0), s(h, null, m(i.options, (e) => (a(), s("button", {
45
- key: e.value,
46
- type: "button",
47
- "aria-label": r(d)(i.label) + (r(x).global.locale.value === "zh-CN" ? ":" : ": ") + r(d)(e.label),
48
- "aria-pressed": i.modelValue === e.value,
49
- disabled: i.disabled || e.disabled,
50
- onClick: (l) => f(e),
51
- onKeydown: (l) => _(l, e)
52
- }, [
53
- e.image ? (a(), s("img", {
54
- key: 0,
55
- src: e.image,
56
- alt: ""
57
- }, null, 8, E)) : e.flow ? (a(), s("svg", I, [
58
- o("g", N, [
59
- e.flow === "one-to-many" ? (a(), s(h, { key: 0 }, [
60
- t[0] || (t[0] = o("rect", {
61
- x: "8",
62
- y: "26",
63
- width: "25",
64
- height: "26",
65
- rx: "4"
66
- }, null, -1)),
67
- (a(), s(h, null, m([5, 28, 51], (l) => o("rect", {
68
- key: l,
69
- x: "87",
70
- y: l,
71
- width: "25",
72
- height: "20",
73
- rx: "3"
74
- }, null, 8, S)), 64)),
75
- t[1] || (t[1] = o("path", {
76
- d: "M39 39H76M65 31L77 39L65 47M83 15L77 39L83 61",
77
- fill: "none"
78
- }, null, -1))
79
- ], 64)) : (a(), s(h, { key: 1 }, [
80
- (a(), s(h, null, m([5, 28, 51], (l) => o("rect", {
81
- key: l,
82
- x: "8",
83
- y: l,
84
- width: "25",
85
- height: "20",
86
- rx: "3"
87
- }, null, 8, F)), 64)),
88
- t[2] || (t[2] = o("rect", {
89
- x: "87",
90
- y: "26",
91
- width: "25",
92
- height: "26",
93
- rx: "4"
94
- }, null, -1)),
95
- t[3] || (t[3] = o("path", {
96
- d: "M39 15L45 39L39 61M46 39H77M65 31L77 39L65 47",
97
- fill: "none"
98
- }, null, -1))
99
- ], 64))
100
- ])
101
- ])) : g("", !0),
102
- o("strong", null, b(r(d)(e.label)), 1),
103
- e.description ? (a(), s("small", H, b(r(d)(e.description)), 1)) : g("", !0)
104
- ], 40, D))), 128))
105
- ], 8, A)
106
- ]));
107
- }
108
- }), z = /* @__PURE__ */ v(K, [["__scopeId", "data-v-aed5bfa1"]]);
109
- export {
110
- z as B
111
- };
@@ -1,316 +0,0 @@
1
- import { defineComponent as x, inject as ee, ref as R, computed as P, watch as B, onUnmounted as ae, openBlock as m, createElementBlock as v, unref as a, normalizeClass as te, createElementVNode as n, toDisplayString as u, Fragment as T, renderList as A, createCommentVNode as y, createVNode as V, createTextVNode as L, nextTick as M } from "vue";
2
- import { J as S, aQ as le, F as re, aa as ne, aR as oe, aw as se, aj as ce, ah as ie, ay as ue, _ as de } from "./entry-CboOSe2r.js";
3
- import { L as fe } from "./loader-circle-CylCgDqP.js";
4
- /**
5
- * @license @lucide/vue v1.47.0 - ISC
6
- *
7
- * This source code is licensed under the ISC license.
8
- * See the LICENSE file in the root directory of this source tree.
9
- */
10
- const me = {
11
- name: "arrow-down",
12
- size: 24,
13
- node: [
14
- ["path", { d: "M12 5v14", key: "s699le" }],
15
- ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
16
- ]
17
- }, ve = S(me);
18
- /**
19
- * @license @lucide/vue v1.47.0 - ISC
20
- *
21
- * This source code is licensed under the ISC license.
22
- * See the LICENSE file in the root directory of this source tree.
23
- */
24
- const be = {
25
- name: "arrow-up",
26
- size: 24,
27
- node: [
28
- ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
29
- ["path", { d: "M12 19V5", key: "x0mq9r" }]
30
- ]
31
- }, pe = S(be), he = ["aria-label"], ge = { class: "retouch-reference-heading" }, we = { class: "hint" }, ye = ["aria-label", "disabled"], ke = { class: "retouch-reference-list" }, Fe = { class: "retouch-reference-title" }, Re = ["src", "alt"], Ve = { class: "reference-number" }, _e = ["aria-label", "disabled", "onClick"], Ce = ["title"], Le = { class: "reference-settings" }, Ue = { class: "reference-order" }, Ie = ["aria-label", "disabled", "onClick"], Ee = ["aria-label", "disabled", "onClick"], Ne = { key: 0 }, Oe = ["aria-label", "value", "disabled", "onChange"], $e = { value: "" }, ze = ["value"], De = ["aria-label", "value", "disabled", "placeholder", "onInput"], je = {
32
- key: 0,
33
- class: "reference-pending",
34
- role: "status"
35
- }, Pe = {
36
- key: 1,
37
- class: "reference-add"
38
- }, Be = ["aria-label", "disabled"], Te = { class: "reference-upload-copy" }, Ae = {
39
- key: 0,
40
- class: "tool-note",
41
- role: "alert"
42
- }, Me = ["aria-label", "disabled"], Se = {
43
- key: 1,
44
- role: "alert",
45
- class: "retouch-error"
46
- }, qe = /* @__PURE__ */ x({
47
- __name: "BatchReferenceFields",
48
- props: {
49
- modelValue: {},
50
- writer: { type: Boolean },
51
- candidates: { default: () => [] },
52
- roles: { default: () => [] },
53
- defaultRoleLabel: { default: "" },
54
- maxCount: { default: le },
55
- title: { default: "共用参考图" },
56
- description: { default: "整批共用同一组。每张待改图为图 1,参考依顺序为图 2–11;用途可选,具体修改以文字要求为准。" },
57
- numberOffset: { default: 2 },
58
- uploadLabel: { default: "上传参考图" },
59
- confirmLabel: { default: "确认当前参考集合" },
60
- purposePlaceholder: { default: "例如:只参考颜色,不复制商品" }
61
- },
62
- emits: ["update:modelValue", "busy"],
63
- setup(t, { emit: q }) {
64
- const { ui: i, uiText: f } = re(), { uploadLocal: W } = ne(), X = ee(
65
- oe,
66
- (e) => W(e, e.name)
67
- ), o = t, I = q, H = se(() => o.modelValue.references), E = R(), d = R(0), p = R(""), J = P(() => p.value ? i({
68
- capacity: "common.referenceFields_5f066788",
69
- format: "common.referenceFields_7bf5d70a",
70
- upload: "common.referenceFields_dc2e4820"
71
- }[p.value], {
72
- p0: p.value === "capacity" ? o.maxCount : f(o.title)
73
- }) : ""), _ = R(!1), h = R(/* @__PURE__ */ new Map());
74
- let w = !1, k = 0;
75
- const F = (e) => `${e.assetId}:${e.assetVersionId}`, C = P(
76
- () => Math.max(0, o.maxCount - o.modelValue.references.length - d.value)
77
- );
78
- B(d, (e) => I("busy", e > 0), { immediate: !0 }), B(
79
- () => o.writer,
80
- (e) => {
81
- e || k++;
82
- }
83
- );
84
- function g(e) {
85
- !o.writer || w || I("update:modelValue", {
86
- references: o.modelValue.references,
87
- referenceUploadNeedsReview: o.modelValue.referenceUploadNeedsReview,
88
- ...e
89
- });
90
- }
91
- function N(e, s) {
92
- g({
93
- references: o.modelValue.references.map(
94
- (l, r) => r === e ? { ...l, ...s } : l
95
- )
96
- });
97
- }
98
- function O(e, s) {
99
- const l = [...o.modelValue.references], r = e + s;
100
- r < 0 || r >= l.length || ([l[e], l[r]] = [l[r], l[e]], g({ references: l }));
101
- }
102
- function K(e) {
103
- if (!o.writer) return;
104
- const s = o.modelValue.references[e];
105
- if (!s) return;
106
- const l = F(s), r = h.value.get(l);
107
- o.modelValue.references.some((c, b) => b !== e && F(c) === l) || (r && URL.revokeObjectURL(r), h.value.delete(l)), g({ references: o.modelValue.references.filter((c, b) => b !== e) });
108
- }
109
- function $(e) {
110
- return H.get(e) || h.value.get(F(e)) || "";
111
- }
112
- async function Q(e) {
113
- const s = e.target, l = [...s.files ?? []];
114
- s.value = "", await U(l);
115
- }
116
- function G(e) {
117
- e.dataTransfer?.types.includes("Files") && (e.preventDefault(), e.stopPropagation(), _.value = o.writer && !d.value && !!C.value);
118
- }
119
- async function Y(e) {
120
- e.dataTransfer?.types.includes("Files") && (e.preventDefault(), e.stopPropagation(), _.value = !1, await U([...e.dataTransfer.files ?? []]));
121
- }
122
- function Z(e) {
123
- const s = ue(e);
124
- s.length && (e.preventDefault(), e.stopPropagation(), U(s));
125
- }
126
- async function U(e) {
127
- if (!e.length || !o.writer || d.value) return;
128
- if (p.value = "", e.length > C.value) {
129
- p.value = "capacity";
130
- return;
131
- }
132
- if (e.some(
133
- (c) => !["image/png", "image/jpeg", "image/webp"].includes(c.type) || !c.size || c.size > 25 * 1024 * 1024
134
- )) {
135
- p.value = "format";
136
- return;
137
- }
138
- const s = !!o.modelValue.referenceUploadNeedsReview, l = k;
139
- let r = !1;
140
- g({ referenceUploadNeedsReview: !0 }), d.value = e.length;
141
- try {
142
- for (const c of e) {
143
- if (w || !o.writer || l !== k) return;
144
- try {
145
- const b = await X(c);
146
- if (w || !o.writer || l !== k) return;
147
- if (!b.assetId || !b.assetVersionId || !/^[a-fA-F0-9]{64}$/.test(b.sha256))
148
- throw new Error("Invalid upload receipt");
149
- const z = {
150
- assetId: b.assetId,
151
- assetVersionId: b.assetVersionId,
152
- sha256: b.sha256,
153
- name: c.name
154
- }, D = F(z), j = h.value.get(D);
155
- j && URL.revokeObjectURL(j), h.value.set(D, URL.createObjectURL(c)), g({ references: [...o.modelValue.references, z] }), await M();
156
- } catch {
157
- r = !0, w || (p.value = "upload");
158
- } finally {
159
- d.value--;
160
- }
161
- }
162
- await M(), !w && o.writer && l === k && !r && !s && g({ referenceUploadNeedsReview: !1 });
163
- } finally {
164
- d.value = 0;
165
- }
166
- }
167
- return ae(() => {
168
- w = !0;
169
- for (const e of h.value.values()) URL.revokeObjectURL(e);
170
- h.value.clear();
171
- }), (e, s) => (m(), v("section", {
172
- tabindex: "0",
173
- onPaste: Z,
174
- class: te(["retouch-references", { dragging: _.value }]),
175
- "aria-label": a(f)(t.title),
176
- onDragover: G,
177
- onDragleave: s[2] || (s[2] = (l) => _.value = !1),
178
- onDrop: Y
179
- }, [
180
- n("div", ge, [
181
- n("strong", null, u(a(f)(t.title)), 1),
182
- n("span", null, u(t.modelValue.references.length) + " / " + u(t.maxCount), 1)
183
- ]),
184
- n("p", we, u(a(f)(t.description)), 1),
185
- n("input", {
186
- ref_key: "fileInput",
187
- ref: E,
188
- type: "file",
189
- accept: "image/png,image/jpeg,image/webp",
190
- multiple: "",
191
- class: "retouch-file-input",
192
- "aria-label": a(f)(t.uploadLabel),
193
- disabled: !t.writer || d.value > 0 || !C.value,
194
- onChange: Q
195
- }, null, 40, ye),
196
- n("ol", ke, [
197
- (m(!0), v(T, null, A(t.modelValue.references, (l, r) => (m(), v("li", {
198
- key: `${F(l)}:${r}`,
199
- class: "retouch-reference batch-reference"
200
- }, [
201
- n("div", Fe, [
202
- $(l) ? (m(), v("img", {
203
- key: 0,
204
- src: $(l),
205
- alt: l.name,
206
- loading: "lazy"
207
- }, null, 8, Re)) : y("", !0),
208
- n("strong", Ve, u(a(i)("common.referenceFields_d7084142", { p0: r + t.numberOffset })), 1),
209
- n("button", {
210
- type: "button",
211
- "aria-label": a(i)("common.referenceFields_405c85b2", { p0: r + t.numberOffset }),
212
- disabled: !t.writer,
213
- onClick: (c) => K(r)
214
- }, [
215
- V(a(ce), { size: 14 })
216
- ], 8, _e)
217
- ]),
218
- n("small", {
219
- class: "reference-name",
220
- title: l.name
221
- }, u(l.name), 9, Ce),
222
- n("details", Le, [
223
- n("summary", null, u(a(i)("common.referenceFields_75359a48")), 1),
224
- n("div", Ue, [
225
- n("button", {
226
- type: "button",
227
- "aria-label": a(i)("common.referenceFields_8aa5f1b3", { p0: r + t.numberOffset }),
228
- disabled: !t.writer || r === 0 || d.value > 0,
229
- onClick: (c) => O(r, -1)
230
- }, [
231
- V(a(pe), { size: 14 }),
232
- L(u(a(i)("common.referenceFields_708c9687")), 1)
233
- ], 8, Ie),
234
- n("button", {
235
- type: "button",
236
- "aria-label": a(i)("common.referenceFields_18e2d946", { p0: r + t.numberOffset }),
237
- disabled: !t.writer || r === t.modelValue.references.length - 1 || d.value > 0,
238
- onClick: (c) => O(r, 1)
239
- }, [
240
- V(a(ve), { size: 14 }),
241
- L(u(a(i)("common.referenceFields_c0714215")), 1)
242
- ], 8, Ee)
243
- ]),
244
- t.roles.length ? (m(), v("label", Ne, [
245
- L(u(a(i)("common.referenceFields_76335454")), 1),
246
- n("select", {
247
- "aria-label": a(i)("common.referenceFields_1e100229", { p0: r + t.numberOffset }),
248
- value: l.role ?? "",
249
- disabled: !t.writer,
250
- onChange: (c) => N(r, {
251
- role: c.target.value || void 0
252
- })
253
- }, [
254
- n("option", $e, u(t.defaultRoleLabel ? a(i)("common.referenceFields_0acbcb84", {
255
- p0: a(f)(t.defaultRoleLabel)
256
- }) : a(i)("common.referenceFields_f91a63a1")), 1),
257
- (m(!0), v(T, null, A(t.roles, (c) => (m(), v("option", {
258
- key: c.value,
259
- value: c.value
260
- }, u(a(f)(c.label)), 9, ze))), 128))
261
- ], 40, Oe)
262
- ])) : y("", !0),
263
- n("label", null, [
264
- L(u(a(i)("common.referenceFields_d59f7895")), 1),
265
- n("input", {
266
- "aria-label": a(i)("common.referenceFields_17d29b80", { p0: r + t.numberOffset }),
267
- value: l.purpose,
268
- disabled: !t.writer,
269
- maxlength: "500",
270
- placeholder: a(f)(t.purposePlaceholder),
271
- onInput: (c) => N(r, { purpose: c.target.value })
272
- }, null, 40, De)
273
- ])
274
- ])
275
- ]))), 128)),
276
- d.value ? (m(), v("li", je, [
277
- V(a(fe), { size: 22 }),
278
- n("span", null, u(a(i)("common.referenceFields_d8690492", { p0: d.value })), 1)
279
- ])) : y("", !0),
280
- !d.value && C.value ? (m(), v("li", Pe, [
281
- n("button", {
282
- type: "button",
283
- class: "retouch-add-card",
284
- "aria-label": a(i)("common.referenceFields_bdb86a11", { p0: a(f)(t.title) }),
285
- disabled: !t.writer,
286
- onClick: s[0] || (s[0] = (l) => E.value?.click())
287
- }, [
288
- V(a(ie), { size: 25 }),
289
- n("span", Te, [
290
- n("strong", null, u(a(i)("common.app_9f0d4e46")), 1),
291
- n("small", null, u(a(i)("common.referenceFields_e4eea1f1")), 1)
292
- ])
293
- ], 8, Be)
294
- ])) : y("", !0)
295
- ]),
296
- t.modelValue.referenceUploadNeedsReview && !d.value ? (m(), v("div", Ae, [
297
- n("p", null, u(a(i)("common.referenceFields_20637ce7", {
298
- p0: a(f)(t.title),
299
- p1: t.modelValue.references.length
300
- })), 1),
301
- n("button", {
302
- type: "button",
303
- "aria-label": a(f)(t.confirmLabel),
304
- disabled: !t.writer || d.value > 0,
305
- onClick: s[1] || (s[1] = (l) => {
306
- g({ referenceUploadNeedsReview: !1 }), p.value = "";
307
- })
308
- }, u(a(i)("common.referenceFields_850fe99f")), 9, Me)
309
- ])) : y("", !0),
310
- p.value ? (m(), v("p", Se, u(J.value), 1)) : y("", !0)
311
- ], 42, he));
312
- }
313
- }), Je = /* @__PURE__ */ de(qe, [["__scopeId", "data-v-677a7f55"]]);
314
- export {
315
- Je as B
316
- };