@bluepic/embed 0.4.0-next.167 → 0.4.0-next.168
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/bluepic-embed.iife.js +197 -191
- package/dist/bluepic-embed.umd.js +200 -194
- package/dist/components/BxTable.vue.d.ts +2 -0
- package/dist/components/TemplateEditor/BatchCell.vue.d.ts +18 -0
- package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +258 -0
- package/dist/components/TemplateEditor/BatchExportPopup.vue.d.ts +66 -0
- package/dist/components/TemplateEditor/BatchImportPopup.vue.d.ts +25 -0
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +28 -0
- package/dist/components/fields/ImageEdit.vue.d.ts +6 -0
- package/dist/embed/embed.d.ts +56 -4
- package/dist/main.cjs +112 -106
- package/dist/main.mjs +27971 -25694
- package/dist/style.css +1 -1
- package/dist/util/batch/csv.d.ts +58 -0
- package/dist/util/batch/export.d.ts +77 -0
- package/dist/util/batch/fields.d.ts +22 -0
- package/dist/util/batch/parseCSV.d.ts +72 -0
- package/dist/util/batch/useBatchRows.d.ts +67 -0
- package/dist/util/export.d.ts +3 -0
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@ export interface BxTableColumn {
|
|
|
7
7
|
width?: string;
|
|
8
8
|
/** Header text for assistive tech only, e.g. an actions column. */
|
|
9
9
|
srOnlyLabel?: boolean;
|
|
10
|
+
/** Class(es) put on the header cell — the caller puts the same on its `<td>`s. */
|
|
11
|
+
class?: string;
|
|
10
12
|
/**
|
|
11
13
|
* Pin the column while the table scrolls sideways. Pinned columns must be
|
|
12
14
|
* the outermost ones (the first N / the last N); anything else is ignored.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BluepicField } from '@bluepic/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: BluepicField;
|
|
4
|
+
/** The row's data object — mutated in place. */
|
|
5
|
+
data: Record<string, unknown>;
|
|
6
|
+
labelId?: string;
|
|
7
|
+
/** Header bulk control: route every write through `onBulkUpdate` instead. */
|
|
8
|
+
bulk?: boolean;
|
|
9
|
+
onBulkUpdate?: (bindingKey: string, value: unknown) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
change: (bindingKey: string, value: unknown) => any;
|
|
13
|
+
activate: () => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onChange?: ((bindingKey: string, value: unknown) => any) | undefined;
|
|
16
|
+
onActivate?: (() => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { nextTick } from 'vue';
|
|
2
|
+
import type { Template } from '@bluepic/types';
|
|
3
|
+
import { type BxTableColumn } from '../BxTable.vue';
|
|
4
|
+
import type { BatchRowsModel } from '../../util/batch/useBatchRows';
|
|
5
|
+
/**
|
|
6
|
+
* The batch editor: a BxTable with one row per dataset and one column per
|
|
7
|
+
* field. Owns nothing but the table chrome — the rows live in `batch`
|
|
8
|
+
* (`useBatchRows`, created by BxTemplateEditor so the live preview and the
|
|
9
|
+
* export share the same model).
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
serial?: Template.Serial;
|
|
13
|
+
batch: BatchRowsModel;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
16
|
+
tableRef: import("vue").Ref<({
|
|
17
|
+
$: import("vue").ComponentInternalInstance;
|
|
18
|
+
$data: {};
|
|
19
|
+
$props: {
|
|
20
|
+
readonly columns?: BxTableColumn[] | undefined;
|
|
21
|
+
readonly bordered?: boolean | undefined;
|
|
22
|
+
readonly radius?: "none" | "sm" | "md" | "lg" | undefined;
|
|
23
|
+
readonly variant?: "plain" | "card" | undefined;
|
|
24
|
+
readonly hoverable?: boolean | undefined;
|
|
25
|
+
readonly dense?: boolean | undefined;
|
|
26
|
+
readonly stickyHeader?: boolean | undefined;
|
|
27
|
+
readonly fill?: boolean | undefined;
|
|
28
|
+
readonly maxHeight?: string | undefined;
|
|
29
|
+
readonly stickyColumns?: {
|
|
30
|
+
left?: number;
|
|
31
|
+
right?: number;
|
|
32
|
+
} | undefined;
|
|
33
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
34
|
+
$attrs: import("vue").Attrs;
|
|
35
|
+
$refs: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
$slots: Readonly<{
|
|
39
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
42
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
43
|
+
$host: Element | null;
|
|
44
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
45
|
+
$el: any;
|
|
46
|
+
$options: import("vue").ComponentOptionsBase<Readonly<{
|
|
47
|
+
columns?: BxTableColumn[];
|
|
48
|
+
bordered?: boolean;
|
|
49
|
+
radius?: "none" | "sm" | "md" | "lg";
|
|
50
|
+
variant?: "plain" | "card";
|
|
51
|
+
hoverable?: boolean;
|
|
52
|
+
dense?: boolean;
|
|
53
|
+
stickyHeader?: boolean;
|
|
54
|
+
fill?: boolean;
|
|
55
|
+
maxHeight?: string;
|
|
56
|
+
stickyColumns?: {
|
|
57
|
+
left?: number;
|
|
58
|
+
right?: number;
|
|
59
|
+
};
|
|
60
|
+
}> & Readonly<{}>, {
|
|
61
|
+
wrapperRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
62
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
63
|
+
fill: boolean;
|
|
64
|
+
bordered: boolean;
|
|
65
|
+
hoverable: boolean;
|
|
66
|
+
radius: "none" | "sm" | "md" | "lg";
|
|
67
|
+
maxHeight: string;
|
|
68
|
+
variant: "plain" | "card";
|
|
69
|
+
columns: BxTableColumn[];
|
|
70
|
+
dense: boolean;
|
|
71
|
+
stickyHeader: boolean;
|
|
72
|
+
stickyColumns: {
|
|
73
|
+
left?: number;
|
|
74
|
+
right?: number;
|
|
75
|
+
};
|
|
76
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
77
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
78
|
+
created?: (() => void) | (() => void)[];
|
|
79
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
80
|
+
mounted?: (() => void) | (() => void)[];
|
|
81
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
82
|
+
updated?: (() => void) | (() => void)[];
|
|
83
|
+
activated?: (() => void) | (() => void)[];
|
|
84
|
+
deactivated?: (() => void) | (() => void)[];
|
|
85
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
86
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
87
|
+
destroyed?: (() => void) | (() => void)[];
|
|
88
|
+
unmounted?: (() => void) | (() => void)[];
|
|
89
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
90
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
91
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
92
|
+
};
|
|
93
|
+
$forceUpdate: () => void;
|
|
94
|
+
$nextTick: typeof nextTick;
|
|
95
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
96
|
+
} & Readonly<{
|
|
97
|
+
fill: boolean;
|
|
98
|
+
bordered: boolean;
|
|
99
|
+
hoverable: boolean;
|
|
100
|
+
radius: "none" | "sm" | "md" | "lg";
|
|
101
|
+
maxHeight: string;
|
|
102
|
+
variant: "plain" | "card";
|
|
103
|
+
columns: BxTableColumn[];
|
|
104
|
+
dense: boolean;
|
|
105
|
+
stickyHeader: boolean;
|
|
106
|
+
stickyColumns: {
|
|
107
|
+
left?: number;
|
|
108
|
+
right?: number;
|
|
109
|
+
};
|
|
110
|
+
}> & Omit<Readonly<{
|
|
111
|
+
columns?: BxTableColumn[];
|
|
112
|
+
bordered?: boolean;
|
|
113
|
+
radius?: "none" | "sm" | "md" | "lg";
|
|
114
|
+
variant?: "plain" | "card";
|
|
115
|
+
hoverable?: boolean;
|
|
116
|
+
dense?: boolean;
|
|
117
|
+
stickyHeader?: boolean;
|
|
118
|
+
fill?: boolean;
|
|
119
|
+
maxHeight?: string;
|
|
120
|
+
stickyColumns?: {
|
|
121
|
+
left?: number;
|
|
122
|
+
right?: number;
|
|
123
|
+
};
|
|
124
|
+
}> & Readonly<{}>, "wrapperRef" | ("fill" | "bordered" | "hoverable" | "radius" | "maxHeight" | "variant" | "columns" | "dense" | "stickyHeader" | "stickyColumns")> & {
|
|
125
|
+
wrapperRef: HTMLDivElement | undefined;
|
|
126
|
+
} & {} & import("vue").ComponentCustomProperties & {} & {
|
|
127
|
+
$slots: {
|
|
128
|
+
default?: () => import("vue").VNode[] | import("vue").VNode;
|
|
129
|
+
'header-cell'?: (scope: {
|
|
130
|
+
column: BxTableColumn;
|
|
131
|
+
index: number;
|
|
132
|
+
}) => import("vue").VNode[] | import("vue").VNode;
|
|
133
|
+
};
|
|
134
|
+
}) | undefined, ({
|
|
135
|
+
$: import("vue").ComponentInternalInstance;
|
|
136
|
+
$data: {};
|
|
137
|
+
$props: {
|
|
138
|
+
readonly columns?: BxTableColumn[] | undefined;
|
|
139
|
+
readonly bordered?: boolean | undefined;
|
|
140
|
+
readonly radius?: "none" | "sm" | "md" | "lg" | undefined;
|
|
141
|
+
readonly variant?: "plain" | "card" | undefined;
|
|
142
|
+
readonly hoverable?: boolean | undefined;
|
|
143
|
+
readonly dense?: boolean | undefined;
|
|
144
|
+
readonly stickyHeader?: boolean | undefined;
|
|
145
|
+
readonly fill?: boolean | undefined;
|
|
146
|
+
readonly maxHeight?: string | undefined;
|
|
147
|
+
readonly stickyColumns?: {
|
|
148
|
+
left?: number;
|
|
149
|
+
right?: number;
|
|
150
|
+
} | undefined;
|
|
151
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
152
|
+
$attrs: import("vue").Attrs;
|
|
153
|
+
$refs: {
|
|
154
|
+
[x: string]: unknown;
|
|
155
|
+
};
|
|
156
|
+
$slots: Readonly<{
|
|
157
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
158
|
+
}>;
|
|
159
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
160
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
161
|
+
$host: Element | null;
|
|
162
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
163
|
+
$el: any;
|
|
164
|
+
$options: import("vue").ComponentOptionsBase<Readonly<{
|
|
165
|
+
columns?: BxTableColumn[];
|
|
166
|
+
bordered?: boolean;
|
|
167
|
+
radius?: "none" | "sm" | "md" | "lg";
|
|
168
|
+
variant?: "plain" | "card";
|
|
169
|
+
hoverable?: boolean;
|
|
170
|
+
dense?: boolean;
|
|
171
|
+
stickyHeader?: boolean;
|
|
172
|
+
fill?: boolean;
|
|
173
|
+
maxHeight?: string;
|
|
174
|
+
stickyColumns?: {
|
|
175
|
+
left?: number;
|
|
176
|
+
right?: number;
|
|
177
|
+
};
|
|
178
|
+
}> & Readonly<{}>, {
|
|
179
|
+
wrapperRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
180
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
181
|
+
fill: boolean;
|
|
182
|
+
bordered: boolean;
|
|
183
|
+
hoverable: boolean;
|
|
184
|
+
radius: "none" | "sm" | "md" | "lg";
|
|
185
|
+
maxHeight: string;
|
|
186
|
+
variant: "plain" | "card";
|
|
187
|
+
columns: BxTableColumn[];
|
|
188
|
+
dense: boolean;
|
|
189
|
+
stickyHeader: boolean;
|
|
190
|
+
stickyColumns: {
|
|
191
|
+
left?: number;
|
|
192
|
+
right?: number;
|
|
193
|
+
};
|
|
194
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
195
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
196
|
+
created?: (() => void) | (() => void)[];
|
|
197
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
198
|
+
mounted?: (() => void) | (() => void)[];
|
|
199
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
200
|
+
updated?: (() => void) | (() => void)[];
|
|
201
|
+
activated?: (() => void) | (() => void)[];
|
|
202
|
+
deactivated?: (() => void) | (() => void)[];
|
|
203
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
204
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
205
|
+
destroyed?: (() => void) | (() => void)[];
|
|
206
|
+
unmounted?: (() => void) | (() => void)[];
|
|
207
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
208
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
209
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
210
|
+
};
|
|
211
|
+
$forceUpdate: () => void;
|
|
212
|
+
$nextTick: typeof nextTick;
|
|
213
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
214
|
+
} & Readonly<{
|
|
215
|
+
fill: boolean;
|
|
216
|
+
bordered: boolean;
|
|
217
|
+
hoverable: boolean;
|
|
218
|
+
radius: "none" | "sm" | "md" | "lg";
|
|
219
|
+
maxHeight: string;
|
|
220
|
+
variant: "plain" | "card";
|
|
221
|
+
columns: BxTableColumn[];
|
|
222
|
+
dense: boolean;
|
|
223
|
+
stickyHeader: boolean;
|
|
224
|
+
stickyColumns: {
|
|
225
|
+
left?: number;
|
|
226
|
+
right?: number;
|
|
227
|
+
};
|
|
228
|
+
}> & Omit<Readonly<{
|
|
229
|
+
columns?: BxTableColumn[];
|
|
230
|
+
bordered?: boolean;
|
|
231
|
+
radius?: "none" | "sm" | "md" | "lg";
|
|
232
|
+
variant?: "plain" | "card";
|
|
233
|
+
hoverable?: boolean;
|
|
234
|
+
dense?: boolean;
|
|
235
|
+
stickyHeader?: boolean;
|
|
236
|
+
fill?: boolean;
|
|
237
|
+
maxHeight?: string;
|
|
238
|
+
stickyColumns?: {
|
|
239
|
+
left?: number;
|
|
240
|
+
right?: number;
|
|
241
|
+
};
|
|
242
|
+
}> & Readonly<{}>, "wrapperRef" | ("fill" | "bordered" | "hoverable" | "radius" | "maxHeight" | "variant" | "columns" | "dense" | "stickyHeader" | "stickyColumns")> & {
|
|
243
|
+
wrapperRef: HTMLDivElement | undefined;
|
|
244
|
+
} & {} & import("vue").ComponentCustomProperties & {} & {
|
|
245
|
+
$slots: {
|
|
246
|
+
default?: () => import("vue").VNode[] | import("vue").VNode;
|
|
247
|
+
'header-cell'?: (scope: {
|
|
248
|
+
column: BxTableColumn;
|
|
249
|
+
index: number;
|
|
250
|
+
}) => import("vue").VNode[] | import("vue").VNode;
|
|
251
|
+
};
|
|
252
|
+
}) | undefined>;
|
|
253
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
254
|
+
import: () => any;
|
|
255
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
256
|
+
onImport?: (() => any) | undefined;
|
|
257
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
258
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { BatchFileFormat, BatchNaming } from '../../util/batch/export';
|
|
2
|
+
import type { BatchCsvFormat } from '../../util/batch/csv';
|
|
3
|
+
export type BatchExportKind = 'files' | 'csv';
|
|
4
|
+
export interface BatchExportRunOptions {
|
|
5
|
+
kind: BatchExportKind;
|
|
6
|
+
format: BatchFileFormat | BatchCsvFormat;
|
|
7
|
+
naming: BatchNaming;
|
|
8
|
+
delimiter: ',' | ';';
|
|
9
|
+
prewarm: boolean;
|
|
10
|
+
signal: AbortSignal;
|
|
11
|
+
onProgress: (progress: {
|
|
12
|
+
done: number;
|
|
13
|
+
total: number;
|
|
14
|
+
failed?: number;
|
|
15
|
+
current?: number;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface BatchExportRunResult {
|
|
19
|
+
/** What to hand out: the zip / single file, or the CSV. */
|
|
20
|
+
output?: {
|
|
21
|
+
blob: Blob;
|
|
22
|
+
fileName: string;
|
|
23
|
+
};
|
|
24
|
+
/** Files count (files export) — for the wording. */
|
|
25
|
+
fileCount?: number;
|
|
26
|
+
/** CSV rows whose render URL is over budget (1-based). */
|
|
27
|
+
overBudget?: number[];
|
|
28
|
+
/** Pre-warm outcome (CSV). */
|
|
29
|
+
prewarmed?: {
|
|
30
|
+
done: number;
|
|
31
|
+
failed: number;
|
|
32
|
+
};
|
|
33
|
+
cancelled?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The batch export dialog: choose format + naming, see what it costs, run,
|
|
37
|
+
* download. The parent supplies `run` — this component only knows the shape
|
|
38
|
+
* of the choices and the progress, not how rendering works.
|
|
39
|
+
*/
|
|
40
|
+
type __VLS_Props = {
|
|
41
|
+
kind: BatchExportKind;
|
|
42
|
+
rowCount: number;
|
|
43
|
+
templateName: string;
|
|
44
|
+
isVideoTemplate: boolean;
|
|
45
|
+
/** Rows a video batch may contain (tier). */
|
|
46
|
+
videoBatchMaxSize: number;
|
|
47
|
+
/** Whether outputs are charged in this context (false = preview / trusted). */
|
|
48
|
+
consumesCredits: boolean;
|
|
49
|
+
/** Text bindings usable as file names: label → binding key. */
|
|
50
|
+
namingBindings: {
|
|
51
|
+
label: string;
|
|
52
|
+
key: string;
|
|
53
|
+
}[];
|
|
54
|
+
run: (opts: BatchExportRunOptions) => Promise<BatchExportRunResult>;
|
|
55
|
+
};
|
|
56
|
+
declare function cancelRun(): void;
|
|
57
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
58
|
+
cancelRun: typeof cancelRun;
|
|
59
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
60
|
+
cancel: () => any;
|
|
61
|
+
done: (result: BatchExportRunResult) => any;
|
|
62
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
63
|
+
onCancel?: (() => any) | undefined;
|
|
64
|
+
onDone?: ((result: BatchExportRunResult) => any) | undefined;
|
|
65
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type BatchColumnField } from '../../util/batch/fields';
|
|
2
|
+
/**
|
|
3
|
+
* Import rows into the batch: parse (delimiter + per-cell type inference from
|
|
4
|
+
* the studio's parseCSV), match columns to fields, convert per field type.
|
|
5
|
+
* Columns whose header IS a binding key are matched up front — that is what
|
|
6
|
+
* "Export as CSV" writes, so a round trip needs no clicking.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
columns: BatchColumnField[];
|
|
10
|
+
currentRowCount: number;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
cancel: () => any;
|
|
14
|
+
confirm: (payload: {
|
|
15
|
+
datasets: Record<string, unknown>[];
|
|
16
|
+
mode: "append" | "replace";
|
|
17
|
+
}) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onCancel?: (() => any) | undefined;
|
|
20
|
+
onConfirm?: ((payload: {
|
|
21
|
+
datasets: Record<string, unknown>[];
|
|
22
|
+
mode: "append" | "replace";
|
|
23
|
+
}) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -2,6 +2,7 @@ import { BluepicField, FieldsBridge, Studio, Template } from '@bluepic/types';
|
|
|
2
2
|
import { VNode } from 'vue';
|
|
3
3
|
import { type AssetProxyConfig } from '../../util/assetProxy';
|
|
4
4
|
import { z } from '@hono/zod-openapi';
|
|
5
|
+
import { type BatchRow } from '../../util/batch/useBatchRows';
|
|
5
6
|
import 'swiper/css';
|
|
6
7
|
import 'swiper/css/navigation';
|
|
7
8
|
import 'swiper/css/pagination';
|
|
@@ -98,6 +99,29 @@ type __VLS_Props = {
|
|
|
98
99
|
* (bx-template → PostHog `template_render_*`). Omit to disable analytics.
|
|
99
100
|
*/
|
|
100
101
|
analytics?: ExportAnalyticsSink;
|
|
102
|
+
/**
|
|
103
|
+
* Batch editor (campaign `config.editMode`): `single` is the classic editor,
|
|
104
|
+
* `batch` a table of rows with the live preview following the active row,
|
|
105
|
+
* `all` both behind a Single | Batch switch in the header. Absent = single.
|
|
106
|
+
*/
|
|
107
|
+
editMode?: 'single' | 'batch' | 'all';
|
|
108
|
+
/**
|
|
109
|
+
* Rows a VIDEO batch export may contain, from the paying team's tier
|
|
110
|
+
* (public campaign `videoBatchMaxSize`). Absent = 1.
|
|
111
|
+
*/
|
|
112
|
+
videoBatchMaxSize?: number;
|
|
113
|
+
/** URL render API scope (`image.bluepic.io/<orgSlug>/<alias>.png`) for CSV links. */
|
|
114
|
+
orgSlug?: string;
|
|
115
|
+
/** This template's URL-render alias, if published under one. */
|
|
116
|
+
templateAlias?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Origin of the URL render API this editor should link to in CSV exports
|
|
119
|
+
* (`https://image.bluepic.io`, staging `https://image-staging.bluepic.io`).
|
|
120
|
+
* Absent = derived from `apiBaseUrl` / production.
|
|
121
|
+
*/
|
|
122
|
+
urlRenderBaseUrl?: string;
|
|
123
|
+
/** Host-owned batch rows (`v-model:batchRows`). Absent = session storage only. */
|
|
124
|
+
batchRows?: BatchRow[];
|
|
101
125
|
};
|
|
102
126
|
type __VLS_Slots = {
|
|
103
127
|
legal: () => VNode[] | VNode;
|
|
@@ -2946,13 +2970,17 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
2946
2970
|
[k: string]: unknown;
|
|
2947
2971
|
}) => any;
|
|
2948
2972
|
back: () => any;
|
|
2973
|
+
"update:batchRows": (args_0: BatchRow[]) => any;
|
|
2949
2974
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
2950
2975
|
"onUpdate:data"?: ((args_0: {
|
|
2951
2976
|
[k: string]: unknown;
|
|
2952
2977
|
}) => any) | undefined;
|
|
2953
2978
|
onBack?: (() => any) | undefined;
|
|
2979
|
+
"onUpdate:batchRows"?: ((args_0: BatchRow[]) => any) | undefined;
|
|
2954
2980
|
}>, {
|
|
2955
2981
|
zoomAndPan: boolean;
|
|
2982
|
+
editMode: "single" | "batch" | "all";
|
|
2983
|
+
videoBatchMaxSize: number;
|
|
2956
2984
|
preCacheLocalRendering: boolean;
|
|
2957
2985
|
liveViewOffsetDesktop: {
|
|
2958
2986
|
top: number;
|
|
@@ -14,6 +14,11 @@ type __VLS_Props = {
|
|
|
14
14
|
maxSize?: number;
|
|
15
15
|
bridge: FieldsBridge;
|
|
16
16
|
mobile?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Table-cell layout (batch editor): a small thumbnail with icon-only
|
|
19
|
+
* actions in a row, instead of the card layout with labelled buttons.
|
|
20
|
+
*/
|
|
21
|
+
compact?: boolean;
|
|
17
22
|
field?: BluepicField;
|
|
18
23
|
allowCropImage: boolean;
|
|
19
24
|
aspectRatio: number;
|
|
@@ -45,6 +50,7 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
45
50
|
uploadLabel: string;
|
|
46
51
|
actionsLabel: string;
|
|
47
52
|
mobile: boolean;
|
|
53
|
+
compact: boolean;
|
|
48
54
|
resetCropOnChange: boolean;
|
|
49
55
|
allowPadding: boolean;
|
|
50
56
|
autoCrop: boolean;
|
package/dist/embed/embed.d.ts
CHANGED
|
@@ -63,10 +63,17 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
63
63
|
left: number;
|
|
64
64
|
} | undefined;
|
|
65
65
|
readonly analytics?: import("../main").ExportAnalyticsSink | undefined;
|
|
66
|
+
readonly editMode?: "single" | "batch" | "all" | undefined;
|
|
67
|
+
readonly videoBatchMaxSize?: number | undefined;
|
|
68
|
+
readonly orgSlug?: string | undefined;
|
|
69
|
+
readonly templateAlias?: string | null | undefined;
|
|
70
|
+
readonly urlRenderBaseUrl?: string | undefined;
|
|
71
|
+
readonly batchRows?: import("../util/batch/useBatchRows").BatchRow[] | undefined;
|
|
66
72
|
readonly "onUpdate:data"?: ((args_0: {
|
|
67
73
|
[k: string]: unknown;
|
|
68
74
|
}) => any) | undefined;
|
|
69
75
|
readonly onBack?: (() => any) | undefined;
|
|
76
|
+
readonly "onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
70
77
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
71
78
|
$attrs: import("vue").Attrs;
|
|
72
79
|
$refs: {
|
|
@@ -80,7 +87,7 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
80
87
|
$host: Element | null;
|
|
81
88
|
$emit: ((event: "update:data", args_0: {
|
|
82
89
|
[k: string]: unknown;
|
|
83
|
-
}) => void) & ((event: "back") => void);
|
|
90
|
+
}) => void) & ((event: "back") => void) & ((event: "update:batchRows", args_0: import("../util/batch/useBatchRows").BatchRow[]) => void);
|
|
84
91
|
$el: any;
|
|
85
92
|
$options: import("vue").ComponentOptionsBase<Readonly<{
|
|
86
93
|
bxCoreVersion?: string;
|
|
@@ -133,11 +140,18 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
133
140
|
left: number;
|
|
134
141
|
};
|
|
135
142
|
analytics?: import("../main").ExportAnalyticsSink;
|
|
143
|
+
editMode?: "single" | "batch" | "all";
|
|
144
|
+
videoBatchMaxSize?: number;
|
|
145
|
+
orgSlug?: string;
|
|
146
|
+
templateAlias?: string | null;
|
|
147
|
+
urlRenderBaseUrl?: string;
|
|
148
|
+
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
136
149
|
}> & Readonly<{
|
|
137
150
|
"onUpdate:data"?: ((args_0: {
|
|
138
151
|
[k: string]: unknown;
|
|
139
152
|
}) => any) | undefined;
|
|
140
153
|
onBack?: (() => any) | undefined;
|
|
154
|
+
"onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
141
155
|
}>, {
|
|
142
156
|
templateViewRef: Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
143
157
|
bxCoreVersion?: string;
|
|
@@ -2981,8 +2995,11 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
2981
2995
|
[k: string]: unknown;
|
|
2982
2996
|
}) => any;
|
|
2983
2997
|
back: () => any;
|
|
2998
|
+
"update:batchRows": (args_0: import("../util/batch/useBatchRows").BatchRow[]) => any;
|
|
2984
2999
|
}, string, {
|
|
2985
3000
|
zoomAndPan: boolean;
|
|
3001
|
+
editMode: "single" | "batch" | "all";
|
|
3002
|
+
videoBatchMaxSize: number;
|
|
2986
3003
|
preCacheLocalRendering: boolean;
|
|
2987
3004
|
liveViewOffsetDesktop: {
|
|
2988
3005
|
top: number;
|
|
@@ -3018,6 +3035,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3018
3035
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
3019
3036
|
} & Readonly<{
|
|
3020
3037
|
zoomAndPan: boolean;
|
|
3038
|
+
editMode: "single" | "batch" | "all";
|
|
3039
|
+
videoBatchMaxSize: number;
|
|
3021
3040
|
preCacheLocalRendering: boolean;
|
|
3022
3041
|
liveViewOffsetDesktop: {
|
|
3023
3042
|
top: number;
|
|
@@ -3082,12 +3101,19 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3082
3101
|
left: number;
|
|
3083
3102
|
};
|
|
3084
3103
|
analytics?: import("../main").ExportAnalyticsSink;
|
|
3104
|
+
editMode?: "single" | "batch" | "all";
|
|
3105
|
+
videoBatchMaxSize?: number;
|
|
3106
|
+
orgSlug?: string;
|
|
3107
|
+
templateAlias?: string | null;
|
|
3108
|
+
urlRenderBaseUrl?: string;
|
|
3109
|
+
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
3085
3110
|
}> & Readonly<{
|
|
3086
3111
|
"onUpdate:data"?: ((args_0: {
|
|
3087
3112
|
[k: string]: unknown;
|
|
3088
3113
|
}) => any) | undefined;
|
|
3089
3114
|
onBack?: (() => any) | undefined;
|
|
3090
|
-
|
|
3115
|
+
"onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
3116
|
+
}>, "templateViewRef" | ("zoomAndPan" | "editMode" | "videoBatchMaxSize" | "preCacheLocalRendering" | "liveViewOffsetDesktop" | "liveViewOffsetMobile")> & {
|
|
3091
3117
|
templateViewRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3092
3118
|
bxCoreVersion?: string;
|
|
3093
3119
|
cloudflarePagesHostname?: string;
|
|
@@ -4568,10 +4594,17 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
4568
4594
|
left: number;
|
|
4569
4595
|
} | undefined;
|
|
4570
4596
|
readonly analytics?: import("../main").ExportAnalyticsSink | undefined;
|
|
4597
|
+
readonly editMode?: "single" | "batch" | "all" | undefined;
|
|
4598
|
+
readonly videoBatchMaxSize?: number | undefined;
|
|
4599
|
+
readonly orgSlug?: string | undefined;
|
|
4600
|
+
readonly templateAlias?: string | null | undefined;
|
|
4601
|
+
readonly urlRenderBaseUrl?: string | undefined;
|
|
4602
|
+
readonly batchRows?: import("../util/batch/useBatchRows").BatchRow[] | undefined;
|
|
4571
4603
|
readonly "onUpdate:data"?: ((args_0: {
|
|
4572
4604
|
[k: string]: unknown;
|
|
4573
4605
|
}) => any) | undefined;
|
|
4574
4606
|
readonly onBack?: (() => any) | undefined;
|
|
4607
|
+
readonly "onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
4575
4608
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
4576
4609
|
$attrs: import("vue").Attrs;
|
|
4577
4610
|
$refs: {
|
|
@@ -4585,7 +4618,7 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
4585
4618
|
$host: Element | null;
|
|
4586
4619
|
$emit: ((event: "update:data", args_0: {
|
|
4587
4620
|
[k: string]: unknown;
|
|
4588
|
-
}) => void) & ((event: "back") => void);
|
|
4621
|
+
}) => void) & ((event: "back") => void) & ((event: "update:batchRows", args_0: import("../util/batch/useBatchRows").BatchRow[]) => void);
|
|
4589
4622
|
$el: any;
|
|
4590
4623
|
$options: import("vue").ComponentOptionsBase<Readonly<{
|
|
4591
4624
|
bxCoreVersion?: string;
|
|
@@ -4638,11 +4671,18 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
4638
4671
|
left: number;
|
|
4639
4672
|
};
|
|
4640
4673
|
analytics?: import("../main").ExportAnalyticsSink;
|
|
4674
|
+
editMode?: "single" | "batch" | "all";
|
|
4675
|
+
videoBatchMaxSize?: number;
|
|
4676
|
+
orgSlug?: string;
|
|
4677
|
+
templateAlias?: string | null;
|
|
4678
|
+
urlRenderBaseUrl?: string;
|
|
4679
|
+
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
4641
4680
|
}> & Readonly<{
|
|
4642
4681
|
"onUpdate:data"?: ((args_0: {
|
|
4643
4682
|
[k: string]: unknown;
|
|
4644
4683
|
}) => any) | undefined;
|
|
4645
4684
|
onBack?: (() => any) | undefined;
|
|
4685
|
+
"onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
4646
4686
|
}>, {
|
|
4647
4687
|
templateViewRef: Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
4648
4688
|
bxCoreVersion?: string;
|
|
@@ -7486,8 +7526,11 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
7486
7526
|
[k: string]: unknown;
|
|
7487
7527
|
}) => any;
|
|
7488
7528
|
back: () => any;
|
|
7529
|
+
"update:batchRows": (args_0: import("../util/batch/useBatchRows").BatchRow[]) => any;
|
|
7489
7530
|
}, string, {
|
|
7490
7531
|
zoomAndPan: boolean;
|
|
7532
|
+
editMode: "single" | "batch" | "all";
|
|
7533
|
+
videoBatchMaxSize: number;
|
|
7491
7534
|
preCacheLocalRendering: boolean;
|
|
7492
7535
|
liveViewOffsetDesktop: {
|
|
7493
7536
|
top: number;
|
|
@@ -7523,6 +7566,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
7523
7566
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
7524
7567
|
} & Readonly<{
|
|
7525
7568
|
zoomAndPan: boolean;
|
|
7569
|
+
editMode: "single" | "batch" | "all";
|
|
7570
|
+
videoBatchMaxSize: number;
|
|
7526
7571
|
preCacheLocalRendering: boolean;
|
|
7527
7572
|
liveViewOffsetDesktop: {
|
|
7528
7573
|
top: number;
|
|
@@ -7587,12 +7632,19 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
7587
7632
|
left: number;
|
|
7588
7633
|
};
|
|
7589
7634
|
analytics?: import("../main").ExportAnalyticsSink;
|
|
7635
|
+
editMode?: "single" | "batch" | "all";
|
|
7636
|
+
videoBatchMaxSize?: number;
|
|
7637
|
+
orgSlug?: string;
|
|
7638
|
+
templateAlias?: string | null;
|
|
7639
|
+
urlRenderBaseUrl?: string;
|
|
7640
|
+
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
7590
7641
|
}> & Readonly<{
|
|
7591
7642
|
"onUpdate:data"?: ((args_0: {
|
|
7592
7643
|
[k: string]: unknown;
|
|
7593
7644
|
}) => any) | undefined;
|
|
7594
7645
|
onBack?: (() => any) | undefined;
|
|
7595
|
-
|
|
7646
|
+
"onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
7647
|
+
}>, "templateViewRef" | ("zoomAndPan" | "editMode" | "videoBatchMaxSize" | "preCacheLocalRendering" | "liveViewOffsetDesktop" | "liveViewOffsetMobile")> & {
|
|
7596
7648
|
templateViewRef: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
7597
7649
|
bxCoreVersion?: string;
|
|
7598
7650
|
cloudflarePagesHostname?: string;
|