@adminforth/bulk-ai-flow 1.4.0 → 1.4.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/dist/index.js CHANGED
@@ -172,13 +172,16 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
172
172
  isImageGeneration: this.options.generateImages ? Object.keys(this.options.generateImages).length > 0 : false
173
173
  }
174
174
  };
175
- if (!this.resourceConfig.options.pageInjections) {
176
- this.resourceConfig.options.pageInjections = {};
175
+ if (!resourceConfig.options.pageInjections) {
176
+ resourceConfig.options.pageInjections = {};
177
177
  }
178
- if (!this.resourceConfig.options.pageInjections.list) {
179
- this.resourceConfig.options.pageInjections.list = {};
178
+ if (!resourceConfig.options.pageInjections.list) {
179
+ resourceConfig.options.pageInjections.list = {};
180
180
  }
181
- this.resourceConfig.options.pageInjections.list.threeDotsDropdownItems = [pageInjection];
181
+ if (!resourceConfig.options.pageInjections.list.threeDotsDropdownItems) {
182
+ resourceConfig.options.pageInjections.list.threeDotsDropdownItems = [];
183
+ }
184
+ resourceConfig.options.pageInjections.list.threeDotsDropdownItems.push(pageInjection);
182
185
  });
183
186
  }
184
187
  validateConfigAfterDiscover(adminforth, resourceConfig) {
package/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AdminForthPlugin, Filters } from "adminforth";
2
- import type { IAdminForth, IHttpServer, AdminForthResourcePages, AdminForthResourceColumn, AdminForthDataTypes, AdminForthResource } from "adminforth";
2
+ import type { IAdminForth, IHttpServer, AdminForthComponentDeclaration, AdminForthResourceColumn, AdminForthDataTypes, AdminForthResource } from "adminforth";
3
3
  import type { PluginOptions } from './types.js';
4
4
  import { json } from "stream/consumers";
5
5
  import Handlebars, { compile } from 'handlebars';
@@ -192,15 +192,18 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
192
192
  isImageGeneration: this.options.generateImages ? Object.keys(this.options.generateImages).length > 0 : false
193
193
  }
194
194
  }
195
-
196
- if (!this.resourceConfig.options.pageInjections) {
197
- this.resourceConfig.options.pageInjections = {};
195
+
196
+ if (!resourceConfig.options.pageInjections) {
197
+ resourceConfig.options.pageInjections = {};
198
+ }
199
+ if (!resourceConfig.options.pageInjections.list) {
200
+ resourceConfig.options.pageInjections.list = {};
198
201
  }
199
- if (!this.resourceConfig.options.pageInjections.list) {
200
- this.resourceConfig.options.pageInjections.list = {};
202
+ if (!resourceConfig.options.pageInjections.list.threeDotsDropdownItems) {
203
+ resourceConfig.options.pageInjections.list.threeDotsDropdownItems = [];
201
204
  }
202
205
 
203
- this.resourceConfig.options.pageInjections.list.threeDotsDropdownItems = [pageInjection];
206
+ (resourceConfig.options.pageInjections.list.threeDotsDropdownItems as AdminForthComponentDeclaration[]).push(pageInjection);
204
207
  }
205
208
 
206
209
  validateConfigAfterDiscover(adminforth: IAdminForth, resourceConfig: AdminForthResource) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },