tychat-contracts 1.6.11 → 1.6.13

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.
@@ -16,6 +16,11 @@ export declare class DashboardWidgetDto {
16
16
  x: number;
17
17
  /** Largura em colunas (1–12). */
18
18
  w: number;
19
+ /**
20
+ * Altura em linhas da grelha CSS (`grid-row: span h`), alinhada a `gridAutoRows` do painel.
21
+ * Omitir = 1 (compatível com layouts antigos).
22
+ */
23
+ h?: number;
19
24
  /** Ordem de leitura (menor = primeiro). */
20
25
  order: number;
21
26
  title?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-layout.dto.d.ts","sourceRoot":"","sources":["../../src/panel-rbac/dashboard-layout.dto.ts"],"names":[],"mappings":"AAeA,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,4EASxB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,i4BAoC7B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,sBAAsB,CAE/E;AAED,qBAAa,kBAAkB;IAG7B,EAAE,EAAE,MAAM,CAAC;IAKX,UAAU,EAAE,sBAAsB,CAAC;IAKnC,SAAS,EAAE,kBAAkB,CAAC;IAE9B,0CAA0C;IAK1C,CAAC,EAAE,MAAM,CAAC;IAEV,iCAAiC;IAKjC,CAAC,EAAE,MAAM,CAAC;IAEV,2CAA2C;IAI3C,KAAK,EAAE,MAAM,CAAC;IAMd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,kBAAkB;IAK7B,OAAO,EAAE,MAAM,CAAC;IAOhB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B"}
1
+ {"version":3,"file":"dashboard-layout.dto.d.ts","sourceRoot":"","sources":["../../src/panel-rbac/dashboard-layout.dto.ts"],"names":[],"mappings":"AAgBA,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,4EASxB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,i4BAoC7B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,sBAAsB,CAE/E;AAED,qBAAa,kBAAkB;IAG7B,EAAE,EAAE,MAAM,CAAC;IAKX,UAAU,EAAE,sBAAsB,CAAC;IAKnC,SAAS,EAAE,kBAAkB,CAAC;IAE9B,0CAA0C;IAK1C,CAAC,EAAE,MAAM,CAAC;IAEV,iCAAiC;IAKjC,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;IAOH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX,2CAA2C;IAI3C,KAAK,EAAE,MAAM,CAAC;IAMd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,kBAAkB;IAK7B,OAAO,EAAE,MAAM,CAAC;IAOhB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B"}
@@ -77,6 +77,11 @@ class DashboardWidgetDto {
77
77
  x;
78
78
  /** Largura em colunas (1–12). */
79
79
  w;
80
+ /**
81
+ * Altura em linhas da grelha CSS (`grid-row: span h`), alinhada a `gridAutoRows` do painel.
82
+ * Omitir = 1 (compatível com layouts antigos).
83
+ */
84
+ h;
80
85
  /** Ordem de leitura (menor = primeiro). */
81
86
  order;
82
87
  title;
@@ -113,6 +118,15 @@ __decorate([
113
118
  (0, class_validator_1.Max)(12),
114
119
  __metadata("design:type", Number)
115
120
  ], DashboardWidgetDto.prototype, "w", void 0);
121
+ __decorate([
122
+ (0, swagger_1.ApiPropertyOptional)({ minimum: 1, maximum: 12, default: 1 }),
123
+ (0, class_validator_1.IsOptional)(),
124
+ (0, class_transformer_1.Type)(() => Number),
125
+ (0, class_validator_1.IsInt)(),
126
+ (0, class_validator_1.Min)(1),
127
+ (0, class_validator_1.Max)(12),
128
+ __metadata("design:type", Number)
129
+ ], DashboardWidgetDto.prototype, "h", void 0);
116
130
  __decorate([
117
131
  (0, swagger_1.ApiProperty)(),
118
132
  (0, class_validator_1.IsInt)(),
@@ -123,7 +137,7 @@ __decorate([
123
137
  (0, swagger_1.ApiPropertyOptional)({ description: 'Título opcional no painel' }),
124
138
  (0, class_validator_1.IsOptional)(),
125
139
  (0, class_validator_1.IsString)(),
126
- (0, class_validator_1.Max)(120),
140
+ (0, class_validator_1.MaxLength)(120),
127
141
  __metadata("design:type", String)
128
142
  ], DashboardWidgetDto.prototype, "title", void 0);
129
143
  class DashboardLayoutDto {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.6.11",
3
+ "version": "1.6.13",
4
4
  "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,7 @@ import {
9
9
  IsString,
10
10
  IsUUID,
11
11
  Max,
12
+ MaxLength,
12
13
  Min,
13
14
  ValidateNested,
14
15
  } from 'class-validator';
@@ -104,6 +105,18 @@ export class DashboardWidgetDto {
104
105
  @Max(12)
105
106
  w: number;
106
107
 
108
+ /**
109
+ * Altura em linhas da grelha CSS (`grid-row: span h`), alinhada a `gridAutoRows` do painel.
110
+ * Omitir = 1 (compatível com layouts antigos).
111
+ */
112
+ @ApiPropertyOptional({ minimum: 1, maximum: 12, default: 1 })
113
+ @IsOptional()
114
+ @Type(() => Number)
115
+ @IsInt()
116
+ @Min(1)
117
+ @Max(12)
118
+ h?: number;
119
+
107
120
  /** Ordem de leitura (menor = primeiro). */
108
121
  @ApiProperty()
109
122
  @IsInt()
@@ -113,7 +126,7 @@ export class DashboardWidgetDto {
113
126
  @ApiPropertyOptional({ description: 'Título opcional no painel' })
114
127
  @IsOptional()
115
128
  @IsString()
116
- @Max(120)
129
+ @MaxLength(120)
117
130
  title?: string;
118
131
  }
119
132