@urga-panel/ur-panels-core 1.0.7 → 1.0.8

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.
@@ -28,6 +28,7 @@ export declare abstract class ProjectInfoService extends Service {
28
28
  requiredServices: any[];
29
29
  };
30
30
  abstract pages: ProjectsPages;
31
+ abstract frontServices: any;
31
32
  constructor(ots: ProjectInfoOts);
32
33
  protected onSetup(options?: ServiceSetupOptions): Promise<ServiceResponse>;
33
34
  protected onStart(): Promise<ServiceResponse>;
@@ -11,6 +11,13 @@ export class ProjectInfoService extends Service {
11
11
  this.ots = ots;
12
12
  }
13
13
  async onSetup(options) {
14
+ Object.keys(this.frontServices).forEach(async (tag) => {
15
+ const service = this.ots.abilities.createChildService?.(tag, this.frontServices[tag].serviceRef || PageService);
16
+ if (service) {
17
+ this.frontServices[tag].service = service;
18
+ }
19
+ await service.setup();
20
+ });
14
21
  // Create a service for each page
15
22
  Object.keys(this.pages).forEach(async (tag) => {
16
23
  const service = this.ots.abilities.createChildService?.("ProjectPage-" + tag, this.pages[tag].serviceRef || PageService);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urga-panel/ur-panels-core",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,12 +34,24 @@ export abstract class ProjectInfoService extends Service {
34
34
  }
35
35
 
36
36
  abstract pages: ProjectsPages;
37
+ abstract frontServices: any;
37
38
 
38
39
  constructor(public ots: ProjectInfoOts) {
39
40
  super({ ...ots });
40
41
  }
41
42
 
42
43
  protected async onSetup(options?: ServiceSetupOptions): Promise<ServiceResponse> {
44
+
45
+ Object.keys(this.frontServices).forEach(async tag => {
46
+ const service = this.ots.abilities.createChildService?.(tag,
47
+ this.frontServices[tag].serviceRef || PageService
48
+ );
49
+ if (service) {
50
+ this.frontServices[tag].service = service as PageService;
51
+ }
52
+ await service.setup();
53
+ });
54
+
43
55
  // Create a service for each page
44
56
  Object.keys(this.pages).forEach(async tag => {
45
57
  const service = this.ots.abilities.createChildService?.("ProjectPage-" + tag,