@adminforth/bulk-ai-flow 1.18.12 → 1.19.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.
- package/build.log +2 -2
- package/custom/VisionAction.vue +11 -7
- package/dist/custom/VisionAction.vue +11 -7
- package/dist/index.js +3 -0
- package/index.ts +5 -0
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -13,5 +13,5 @@ custom/package-lock.json
|
|
|
13
13
|
custom/package.json
|
|
14
14
|
custom/tsconfig.json
|
|
15
15
|
|
|
16
|
-
sent
|
|
17
|
-
total size is 92,
|
|
16
|
+
sent 93,308 bytes received 172 bytes 186,960.00 bytes/sec
|
|
17
|
+
total size is 92,672 speedup is 0.99
|
package/custom/VisionAction.vue
CHANGED
|
@@ -65,6 +65,8 @@
|
|
|
65
65
|
:tableColumnsIndexes="tableColumnsIndexes"
|
|
66
66
|
:selected="selected"
|
|
67
67
|
:oldData="oldData"
|
|
68
|
+
:isError="isError"
|
|
69
|
+
:errorMessage="errorMessage"
|
|
68
70
|
:isAiResponseReceivedAnalizeImage="isAiResponseReceivedAnalizeImage"
|
|
69
71
|
:isAiResponseReceivedAnalizeNoImage="isAiResponseReceivedAnalizeNoImage"
|
|
70
72
|
:isAiResponseReceivedImage="isAiResponseReceivedImage"
|
|
@@ -147,13 +149,8 @@ const props = defineProps<{
|
|
|
147
149
|
meta: any,
|
|
148
150
|
resource: AdminForthResourceCommon,
|
|
149
151
|
adminUser: AdminUser,
|
|
150
|
-
updateList:
|
|
151
|
-
|
|
152
|
-
required: true
|
|
153
|
-
},
|
|
154
|
-
clearCheckboxes: {
|
|
155
|
-
type: Function
|
|
156
|
-
}
|
|
152
|
+
updateList: () => any,
|
|
153
|
+
clearCheckboxes?: () => any,
|
|
157
154
|
}>();
|
|
158
155
|
|
|
159
156
|
defineExpose({
|
|
@@ -326,6 +323,13 @@ function fillCarouselSaveImages() {
|
|
|
326
323
|
|
|
327
324
|
|
|
328
325
|
function formatLabel(str) {
|
|
326
|
+
const labelsMap = props.meta?.columnLabels || {};
|
|
327
|
+
let labelFromMeta = labelsMap[str];
|
|
328
|
+
if (!labelFromMeta) {
|
|
329
|
+
const match = Object.keys(labelsMap).find(k => k.toLowerCase() === String(str).toLowerCase());
|
|
330
|
+
if (match) labelFromMeta = labelsMap[match];
|
|
331
|
+
}
|
|
332
|
+
if (labelFromMeta) return labelFromMeta;
|
|
329
333
|
return str
|
|
330
334
|
.split('_')
|
|
331
335
|
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
@@ -65,6 +65,8 @@
|
|
|
65
65
|
:tableColumnsIndexes="tableColumnsIndexes"
|
|
66
66
|
:selected="selected"
|
|
67
67
|
:oldData="oldData"
|
|
68
|
+
:isError="isError"
|
|
69
|
+
:errorMessage="errorMessage"
|
|
68
70
|
:isAiResponseReceivedAnalizeImage="isAiResponseReceivedAnalizeImage"
|
|
69
71
|
:isAiResponseReceivedAnalizeNoImage="isAiResponseReceivedAnalizeNoImage"
|
|
70
72
|
:isAiResponseReceivedImage="isAiResponseReceivedImage"
|
|
@@ -147,13 +149,8 @@ const props = defineProps<{
|
|
|
147
149
|
meta: any,
|
|
148
150
|
resource: AdminForthResourceCommon,
|
|
149
151
|
adminUser: AdminUser,
|
|
150
|
-
updateList:
|
|
151
|
-
|
|
152
|
-
required: true
|
|
153
|
-
},
|
|
154
|
-
clearCheckboxes: {
|
|
155
|
-
type: Function
|
|
156
|
-
}
|
|
152
|
+
updateList: () => any,
|
|
153
|
+
clearCheckboxes?: () => any,
|
|
157
154
|
}>();
|
|
158
155
|
|
|
159
156
|
defineExpose({
|
|
@@ -326,6 +323,13 @@ function fillCarouselSaveImages() {
|
|
|
326
323
|
|
|
327
324
|
|
|
328
325
|
function formatLabel(str) {
|
|
326
|
+
const labelsMap = props.meta?.columnLabels || {};
|
|
327
|
+
let labelFromMeta = labelsMap[str];
|
|
328
|
+
if (!labelFromMeta) {
|
|
329
|
+
const match = Object.keys(labelsMap).find(k => k.toLowerCase() === String(str).toLowerCase());
|
|
330
|
+
if (match) labelFromMeta = labelsMap[match];
|
|
331
|
+
}
|
|
332
|
+
if (labelFromMeta) return labelFromMeta;
|
|
329
333
|
return str
|
|
330
334
|
.split('_')
|
|
331
335
|
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
package/dist/index.js
CHANGED
|
@@ -541,6 +541,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
541
541
|
}
|
|
542
542
|
const outputFields = Object.assign(Object.assign(Object.assign({}, this.options.fillFieldsFromImages), this.options.fillPlainFields), (this.options.generateImages || {}));
|
|
543
543
|
const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
|
|
544
|
+
// Map of column technical names to their display labels from resource config
|
|
545
|
+
const columnLabels = Object.fromEntries((this.resourceConfig.columns || []).map((c) => [c.name, c.label || c.name]));
|
|
544
546
|
const pageInjection = {
|
|
545
547
|
file: this.componentPath('VisionAction.vue'),
|
|
546
548
|
meta: {
|
|
@@ -548,6 +550,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
548
550
|
outputFields: outputFields,
|
|
549
551
|
actionName: this.options.actionName,
|
|
550
552
|
columnEnums: columnEnums,
|
|
553
|
+
columnLabels: columnLabels,
|
|
551
554
|
outputImageFields: outputImageFields,
|
|
552
555
|
outputFieldsForAnalizeFromImages: outputFieldsForAnalizeFromImages,
|
|
553
556
|
outputPlainFields: outputPlainFields,
|
package/index.ts
CHANGED
|
@@ -533,6 +533,10 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
533
533
|
};
|
|
534
534
|
|
|
535
535
|
const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
|
|
536
|
+
// Map of column technical names to their display labels from resource config
|
|
537
|
+
const columnLabels: Record<string, string> = Object.fromEntries(
|
|
538
|
+
(this.resourceConfig.columns || []).map((c: any) => [c.name, c.label || c.name])
|
|
539
|
+
);
|
|
536
540
|
|
|
537
541
|
const pageInjection = {
|
|
538
542
|
file: this.componentPath('VisionAction.vue'),
|
|
@@ -541,6 +545,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
541
545
|
outputFields: outputFields,
|
|
542
546
|
actionName: this.options.actionName,
|
|
543
547
|
columnEnums: columnEnums,
|
|
548
|
+
columnLabels: columnLabels,
|
|
544
549
|
outputImageFields: outputImageFields,
|
|
545
550
|
outputFieldsForAnalizeFromImages: outputFieldsForAnalizeFromImages,
|
|
546
551
|
outputPlainFields: outputPlainFields,
|