@hedhog/admin 0.48.13 → 0.48.15

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.
@@ -2,7 +2,7 @@ import { DashboardCoreService } from './dashboard-core.service';
2
2
  export declare class DashboardCoreController {
3
3
  private readonly dashboardCoreService;
4
4
  constructor(dashboardCoreService: DashboardCoreService);
5
- fromSlug(slug: string): Promise<({
5
+ fromSlug(slug: string, locale: any): Promise<({
6
6
  dashboard_user: {
7
7
  id: number;
8
8
  created_at: Date;
@@ -14,6 +14,28 @@ export declare class DashboardCoreController {
14
14
  y_axis: number;
15
15
  item_id: number;
16
16
  }[];
17
+ dashboard_component: {
18
+ dashboard_component_locale: {
19
+ name: string;
20
+ created_at: Date;
21
+ updated_at: Date;
22
+ locale_id: number;
23
+ component_id: number;
24
+ }[];
25
+ } & {
26
+ path: string;
27
+ id: number;
28
+ created_at: Date;
29
+ updated_at: Date;
30
+ slug: string;
31
+ min_width: number;
32
+ max_width: number | null;
33
+ min_height: number;
34
+ max_height: number | null;
35
+ width: number;
36
+ height: number;
37
+ is_resizable: boolean;
38
+ };
17
39
  } & {
18
40
  id: number;
19
41
  created_at: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-core.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBACa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAGvE,QAAQ,CAAgB,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAGrC"}
1
+ {"version":3,"file":"dashboard-core.controller.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBACa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,oBAAoB;IAGvE,QAAQ,CAAgB,IAAI,EAAE,MAAM,EAAY,MAAM,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvD"}
@@ -13,22 +13,24 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.DashboardCoreController = void 0;
16
+ const locale_1 = require("@hedhog/locale");
16
17
  const common_1 = require("@nestjs/common");
17
18
  const dashboard_core_service_1 = require("./dashboard-core.service");
18
19
  let DashboardCoreController = class DashboardCoreController {
19
20
  constructor(dashboardCoreService) {
20
21
  this.dashboardCoreService = dashboardCoreService;
21
22
  }
22
- fromSlug(slug) {
23
- return this.dashboardCoreService.fromSlug(slug);
23
+ fromSlug(slug, locale) {
24
+ return this.dashboardCoreService.fromSlug(slug, locale);
24
25
  }
25
26
  };
26
27
  exports.DashboardCoreController = DashboardCoreController;
27
28
  __decorate([
28
29
  (0, common_1.Get)(':slug'),
29
30
  __param(0, (0, common_1.Param)('slug')),
31
+ __param(1, (0, locale_1.Locale)()),
30
32
  __metadata("design:type", Function),
31
- __metadata("design:paramtypes", [String]),
33
+ __metadata("design:paramtypes", [String, Object]),
32
34
  __metadata("design:returntype", void 0)
33
35
  ], DashboardCoreController.prototype, "fromSlug", null);
34
36
  exports.DashboardCoreController = DashboardCoreController = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-core.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwD;AACxD,qEAAgE;AAGzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAG3E,QAAQ,CAAgB,IAAY;QAClC,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AAPY,0DAAuB;AAIlC;IADC,IAAA,YAAG,EAAC,OAAO,CAAC;IACH,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;;;;uDAEtB;kCANU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEwB,6CAAoB;GAD5D,uBAAuB,CAOnC"}
1
+ {"version":3,"file":"dashboard-core.controller.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAwC;AACxC,2CAAwD;AACxD,qEAAgE;AAGzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,oBAA0C;QAA1C,yBAAoB,GAApB,oBAAoB,CAAsB;IAAG,CAAC;IAG3E,QAAQ,CAAgB,IAAY,EAAY,MAAM;QACpD,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;CACF,CAAA;AAPY,0DAAuB;AAIlC;IADC,IAAA,YAAG,EAAC,OAAO,CAAC;IACH,WAAA,IAAA,cAAK,EAAC,MAAM,CAAC,CAAA;IAAgB,WAAA,IAAA,eAAM,GAAE,CAAA;;;;uDAE9C;kCANU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEwB,6CAAoB;GAD5D,uBAAuB,CAOnC"}
@@ -2,7 +2,7 @@ import { PrismaService } from '@hedhog/prisma';
2
2
  export declare class DashboardCoreService {
3
3
  private readonly prismaService;
4
4
  constructor(prismaService: PrismaService);
5
- fromSlug(slug: string): Promise<({
5
+ fromSlug(slug: string, code: string): Promise<({
6
6
  dashboard_user: {
7
7
  id: number;
8
8
  created_at: Date;
@@ -14,6 +14,28 @@ export declare class DashboardCoreService {
14
14
  y_axis: number;
15
15
  item_id: number;
16
16
  }[];
17
+ dashboard_component: {
18
+ dashboard_component_locale: {
19
+ name: string;
20
+ created_at: Date;
21
+ updated_at: Date;
22
+ locale_id: number;
23
+ component_id: number;
24
+ }[];
25
+ } & {
26
+ path: string;
27
+ id: number;
28
+ created_at: Date;
29
+ updated_at: Date;
30
+ slug: string;
31
+ min_width: number;
32
+ max_width: number | null;
33
+ min_height: number;
34
+ max_height: number | null;
35
+ width: number;
36
+ height: number;
37
+ is_resizable: boolean;
38
+ };
17
39
  } & {
18
40
  id: number;
19
41
  created_at: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-core.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,QAAQ,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAQ5B"}
1
+ {"version":3,"file":"dashboard-core.service.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEnD,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB1C"}
@@ -16,11 +16,22 @@ let DashboardCoreService = class DashboardCoreService {
16
16
  constructor(prismaService) {
17
17
  this.prismaService = prismaService;
18
18
  }
19
- async fromSlug(slug) {
19
+ async fromSlug(slug, code) {
20
20
  return this.prismaService.dashboard_item.findMany({
21
21
  where: { dashboard: { slug } },
22
22
  include: {
23
23
  dashboard_user: true,
24
+ dashboard_component: {
25
+ include: {
26
+ dashboard_component_locale: {
27
+ where: {
28
+ locale: {
29
+ code,
30
+ },
31
+ },
32
+ },
33
+ },
34
+ },
24
35
  },
25
36
  });
26
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-core.service.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA+C;AAC/C,2CAA4C;AAGrC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC;YAChD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE;YAC9B,OAAO,EAAE;gBACP,cAAc,EAAE,IAAI;aACrB;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAXY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEiC,sBAAa;GAD9C,oBAAoB,CAWhC"}
1
+ {"version":3,"file":"dashboard-core.service.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-core/dashboard-core.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA+C;AAC/C,2CAA4C;AAGrC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D,KAAK,CAAC,QAAQ,CAAC,IAAY,EAAE,IAAY;QACvC,OAAO,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC;YAChD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE;YAC9B,OAAO,EAAE;gBACP,cAAc,EAAE,IAAI;gBACpB,mBAAmB,EAAE;oBACnB,OAAO,EAAE;wBACP,0BAA0B,EAAE;4BAC1B,KAAK,EAAE;gCACL,MAAM,EAAE;oCACN,IAAI;iCACL;6BACF;yBACF;qBACF;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAtBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEiC,sBAAa;GAD9C,oBAAoB,CAsBhC"}
package/hedhog.yaml CHANGED
@@ -815,6 +815,9 @@ data:
815
815
  path: '@/components/dashboard/SystemInfo'
816
816
  width: 1
817
817
  height: 1
818
+ name:
819
+ en: System Info
820
+ pt: Informações do Sistema
818
821
  dashboard_item:
819
822
  - component_id:
820
823
  where:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedhog/admin",
3
- "version": "0.48.13",
3
+ "version": "0.48.15",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,3 +1,4 @@
1
+ import { Locale } from '@hedhog/locale';
1
2
  import { Controller, Get, Param } from '@nestjs/common';
2
3
  import { DashboardCoreService } from './dashboard-core.service';
3
4
 
@@ -6,7 +7,7 @@ export class DashboardCoreController {
6
7
  constructor(private readonly dashboardCoreService: DashboardCoreService) {}
7
8
 
8
9
  @Get(':slug')
9
- fromSlug(@Param('slug') slug: string) {
10
- return this.dashboardCoreService.fromSlug(slug);
10
+ fromSlug(@Param('slug') slug: string, @Locale() locale) {
11
+ return this.dashboardCoreService.fromSlug(slug, locale);
11
12
  }
12
13
  }
@@ -5,11 +5,22 @@ import { Injectable } from '@nestjs/common';
5
5
  export class DashboardCoreService {
6
6
  constructor(private readonly prismaService: PrismaService) {}
7
7
 
8
- async fromSlug(slug: string) {
8
+ async fromSlug(slug: string, code: string) {
9
9
  return this.prismaService.dashboard_item.findMany({
10
10
  where: { dashboard: { slug } },
11
11
  include: {
12
12
  dashboard_user: true,
13
+ dashboard_component: {
14
+ include: {
15
+ dashboard_component_locale: {
16
+ where: {
17
+ locale: {
18
+ code,
19
+ },
20
+ },
21
+ },
22
+ },
23
+ },
13
24
  },
14
25
  });
15
26
  }