@adminforth/bulk-ai-flow 1.6.0 → 1.7.1

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 CHANGED
@@ -11,5 +11,5 @@ custom/tsconfig.json
11
11
  custom/visionAction.vue
12
12
  custom/visionTable.vue
13
13
 
14
- sent 180,778 bytes received 134 bytes 361,824.00 bytes/sec
15
- total size is 180,250 speedup is 1.00
14
+ sent 180,710 bytes received 134 bytes 361,688.00 bytes/sec
15
+ total size is 180,175 speedup is 1.00
@@ -114,14 +114,14 @@ const checkedCount = ref(0);
114
114
  const openDialog = async () => {
115
115
  confirmDialog.value.open();
116
116
  await getRecords();
117
- if (props.meta.isFieldsForAnalizeFromImages || props.meta.isImageGeneration) {
117
+ if (props.meta.isAttachFiles) {
118
118
  await getImages();
119
119
  }
120
120
  tableHeaders.value = generateTableHeaders(props.meta.outputFields);
121
121
  const result = generateTableColumns();
122
122
  tableColumns.value = result.tableData;
123
123
  tableColumnsIndexes.value = result.indexes;
124
- customFieldNames.value = tableHeaders.value.slice(props.meta.isFieldsForAnalizeFromImages ? 3 : 2).map(h => h.fieldName);
124
+ customFieldNames.value = tableHeaders.value.slice((props.meta.isAttachFiles) ? 3 : 2).map(h => h.fieldName);
125
125
  setSelected();
126
126
  for (let i = 0; i < selected.value?.length; i++) {
127
127
  openGenerationCarousel.value[i] = props.meta.outputImageFields?.reduce((acc,key) =>{
@@ -189,7 +189,7 @@ function generateTableHeaders(outputFields) {
189
189
 
190
190
  headers.push({ label: 'Checkboxes', fieldName: 'checkboxes' });
191
191
  headers.push({ label: 'Field name', fieldName: 'label' });
192
- if (props.meta.isFieldsForAnalizeFromImages) {
192
+ if (props.meta.isAttachFiles) {
193
193
  headers.push({ label: 'Source Images', fieldName: 'images' });
194
194
  }
195
195
  for (const key in outputFields) {
@@ -114,14 +114,14 @@ const checkedCount = ref(0);
114
114
  const openDialog = async () => {
115
115
  confirmDialog.value.open();
116
116
  await getRecords();
117
- if (props.meta.isFieldsForAnalizeFromImages || props.meta.isImageGeneration) {
117
+ if (props.meta.isAttachFiles) {
118
118
  await getImages();
119
119
  }
120
120
  tableHeaders.value = generateTableHeaders(props.meta.outputFields);
121
121
  const result = generateTableColumns();
122
122
  tableColumns.value = result.tableData;
123
123
  tableColumnsIndexes.value = result.indexes;
124
- customFieldNames.value = tableHeaders.value.slice(props.meta.isFieldsForAnalizeFromImages ? 3 : 2).map(h => h.fieldName);
124
+ customFieldNames.value = tableHeaders.value.slice((props.meta.isAttachFiles) ? 3 : 2).map(h => h.fieldName);
125
125
  setSelected();
126
126
  for (let i = 0; i < selected.value?.length; i++) {
127
127
  openGenerationCarousel.value[i] = props.meta.outputImageFields?.reduce((acc,key) =>{
@@ -189,7 +189,7 @@ function generateTableHeaders(outputFields) {
189
189
 
190
190
  headers.push({ label: 'Checkboxes', fieldName: 'checkboxes' });
191
191
  headers.push({ label: 'Field name', fieldName: 'label' });
192
- if (props.meta.isFieldsForAnalizeFromImages) {
192
+ if (props.meta.isAttachFiles) {
193
193
  headers.push({ label: 'Source Images', fieldName: 'images' });
194
194
  }
195
195
  for (const key in outputFields) {
package/dist/index.js CHANGED
@@ -153,7 +153,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
153
153
  outputImagesPluginInstanceIds: outputImagesPluginInstanceIds,
154
154
  isFieldsForAnalizeFromImages: this.options.fillFieldsFromImages ? Object.keys(this.options.fillFieldsFromImages).length > 0 : false,
155
155
  isFieldsForAnalizePlain: this.options.fillPlainFields ? Object.keys(this.options.fillPlainFields).length > 0 : false,
156
- isImageGeneration: this.options.generateImages ? Object.keys(this.options.generateImages).length > 0 : false
156
+ isImageGeneration: this.options.generateImages ? Object.keys(this.options.generateImages).length > 0 : false,
157
+ isAttachFiles: this.options.attachFiles ? true : false,
157
158
  }
158
159
  };
159
160
  if (!resourceConfig.options.pageInjections) {
@@ -174,7 +175,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
174
175
  instanceUniqueRepresentation(pluginOptions) {
175
176
  // optional method to return unique string representation of plugin instance.
176
177
  // Needed if plugin can have multiple instances on one resource
177
- return `single`;
178
+ return `${this.pluginOptions.actionName}`;
178
179
  }
179
180
  setupEndpoints(server) {
180
181
  server.endpoint({
package/index.ts CHANGED
@@ -180,7 +180,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
180
180
  outputImagesPluginInstanceIds: outputImagesPluginInstanceIds,
181
181
  isFieldsForAnalizeFromImages: this.options.fillFieldsFromImages ? Object.keys(this.options.fillFieldsFromImages).length > 0 : false,
182
182
  isFieldsForAnalizePlain: this.options.fillPlainFields ? Object.keys(this.options.fillPlainFields).length > 0 : false,
183
- isImageGeneration: this.options.generateImages ? Object.keys(this.options.generateImages).length > 0 : false
183
+ isImageGeneration: this.options.generateImages ? Object.keys(this.options.generateImages).length > 0 : false,
184
+ isAttachFiles: this.options.attachFiles ? true : false,
184
185
  }
185
186
  }
186
187
 
@@ -204,7 +205,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
204
205
  instanceUniqueRepresentation(pluginOptions: any) : string {
205
206
  // optional method to return unique string representation of plugin instance.
206
207
  // Needed if plugin can have multiple instances on one resource
207
- return `single`;
208
+ return `${this.pluginOptions.actionName}`;
208
209
  }
209
210
 
210
211
  setupEndpoints(server: IHttpServer) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },