@adminforth/bulk-ai-flow 1.7.2 → 1.7.4

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,687 bytes received 134 bytes 361,642.00 bytes/sec
15
- total size is 180,152 speedup is 1.00
14
+ sent 180,683 bytes received 134 bytes 361,634.00 bytes/sec
15
+ total size is 180,148 speedup is 1.00
@@ -11,9 +11,8 @@
11
11
  >
12
12
  <div
13
13
  class="bulk-vision-dialog flex items-center justify-center relative w-[100vw] h-[100vh] max-h-[100vh] md:w-auto md:max-w-[95vw] md:min-w-[640px] md:h-auto md:max-h-[90vh] bg-white dark:bg-gray-900 rounded-none md:rounded-md shadow-2xl overflow-hidden"
14
- @click.stop
15
14
  >
16
- <div class="bulk-vision-table flex flex-col items-center justify-evenly gap-3 md:gap-4 w-full h-full p-4 md:p-6 overflow-y-auto overflow-x-auto">
15
+ <div class="bulk-vision-table flex flex-col items-center justify-evenly md:max-h-[90vh] gap-3 md:gap-4 w-full h-full p-4 md:p-6 overflow-y-auto overflow-x-auto">
17
16
  <button type="button"
18
17
  @click="closeDialog"
19
18
  class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white" >
@@ -11,9 +11,8 @@
11
11
  >
12
12
  <div
13
13
  class="bulk-vision-dialog flex items-center justify-center relative w-[100vw] h-[100vh] max-h-[100vh] md:w-auto md:max-w-[95vw] md:min-w-[640px] md:h-auto md:max-h-[90vh] bg-white dark:bg-gray-900 rounded-none md:rounded-md shadow-2xl overflow-hidden"
14
- @click.stop
15
14
  >
16
- <div class="bulk-vision-table flex flex-col items-center justify-evenly gap-3 md:gap-4 w-full h-full p-4 md:p-6 overflow-y-auto overflow-x-auto">
15
+ <div class="bulk-vision-table flex flex-col items-center justify-evenly md:max-h-[90vh] gap-3 md:gap-4 w-full h-full p-4 md:p-6 overflow-y-auto overflow-x-auto">
17
16
  <button type="button"
18
17
  @click="closeDialog"
19
18
  class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white" >
package/dist/index.js CHANGED
@@ -266,9 +266,9 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
266
266
  handler: (body) => __awaiter(this, void 0, void 0, function* () {
267
267
  let records = [];
268
268
  const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
269
- for (const record of body.body.record) {
270
- records.push(yield this.adminforth.resource(this.resourceConfig.resourceId).get([Filters.EQ(primaryKeyColumn.name, record)]));
271
- records[records.length - 1]._label = this.resourceConfig.recordLabel(records[records.length - 1]);
269
+ records = yield this.adminforth.resource(this.resourceConfig.resourceId).list([Filters.IN(primaryKeyColumn.name, body.body.record)]);
270
+ for (const [index, record] of records.entries()) {
271
+ records[index]._label = this.resourceConfig.recordLabel(records[index]);
272
272
  }
273
273
  return {
274
274
  records,
package/index.ts CHANGED
@@ -312,9 +312,9 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
312
312
  handler: async ( body ) => {
313
313
  let records = [];
314
314
  const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
315
- for( const record of body.body.record ) {
316
- records.push(await this.adminforth.resource(this.resourceConfig.resourceId).get( [Filters.EQ(primaryKeyColumn.name, record)] ));
317
- records[records.length - 1]._label = this.resourceConfig.recordLabel(records[records.length - 1]);
315
+ records = await this.adminforth.resource(this.resourceConfig.resourceId).list([Filters.IN(primaryKeyColumn.name, body.body.record)]);
316
+ for( const [index, record] of records.entries() ) {
317
+ records[index]._label = this.resourceConfig.recordLabel(records[index]);
318
318
  }
319
319
  return {
320
320
  records,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },