c2-clinical 1.0.58 → 1.0.60

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.
@@ -86,13 +86,20 @@ export declare enum VariantViewEnum {
86
86
  LIST = "LIST"
87
87
  }
88
88
  export declare enum TypeButtonAction {
89
- OPEN_MODAL = "OPEN_MODAL"
89
+ OPEN_MODAL = "OPEN_MODAL",
90
+ CANCEL_MODAL = "CANCEL_MODAL",
91
+ CONFIRM_MODAL = "CONFIRM_MODAL"
90
92
  }
91
93
  export declare enum TypeValidationEnum {
92
- TIP = "TIP",
93
94
  WARNING = "WARNING",
94
95
  VALIDATION = "VALIDATION"
95
96
  }
97
+ export declare enum TypeTipEnum {
98
+ IMAGE = "IMAGE",
99
+ VIDEO = "VIDEO",
100
+ HTML = "HTML",
101
+ TEXT = "TEXT"
102
+ }
96
103
  export declare enum TypeOutputValidationEnum {
97
104
  TEXT = "TEXT",
98
105
  LINK = "LINK",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeMessageEnum = exports.TypeOutputValidationEnum = exports.TypeValidationEnum = exports.TypeButtonAction = exports.VariantViewEnum = exports.TypeAnswerEnum = exports.TypeFormUnitEnum = exports.OwnerEnum = exports.TypeFormEnum = exports.CategoryFormEnum = exports.MetTargetConditionEnum = exports.StatusQPCEnum = exports.GenreEnum = exports.ChannelNotificationEnum = exports.QAStatusEnum = void 0;
3
+ exports.TypeMessageEnum = exports.TypeOutputValidationEnum = exports.TypeTipEnum = exports.TypeValidationEnum = exports.TypeButtonAction = exports.VariantViewEnum = exports.TypeAnswerEnum = exports.TypeFormUnitEnum = exports.OwnerEnum = exports.TypeFormEnum = exports.CategoryFormEnum = exports.MetTargetConditionEnum = exports.StatusQPCEnum = exports.GenreEnum = exports.ChannelNotificationEnum = exports.QAStatusEnum = void 0;
4
4
  var QAStatusEnum;
5
5
  (function (QAStatusEnum) {
6
6
  QAStatusEnum["ANSWERED"] = "ANSWERED";
@@ -102,13 +102,21 @@ var VariantViewEnum;
102
102
  var TypeButtonAction;
103
103
  (function (TypeButtonAction) {
104
104
  TypeButtonAction["OPEN_MODAL"] = "OPEN_MODAL";
105
+ TypeButtonAction["CANCEL_MODAL"] = "CANCEL_MODAL";
106
+ TypeButtonAction["CONFIRM_MODAL"] = "CONFIRM_MODAL";
105
107
  })(TypeButtonAction || (exports.TypeButtonAction = TypeButtonAction = {}));
106
108
  var TypeValidationEnum;
107
109
  (function (TypeValidationEnum) {
108
- TypeValidationEnum["TIP"] = "TIP";
109
110
  TypeValidationEnum["WARNING"] = "WARNING";
110
111
  TypeValidationEnum["VALIDATION"] = "VALIDATION";
111
112
  })(TypeValidationEnum || (exports.TypeValidationEnum = TypeValidationEnum = {}));
113
+ var TypeTipEnum;
114
+ (function (TypeTipEnum) {
115
+ TypeTipEnum["IMAGE"] = "IMAGE";
116
+ TypeTipEnum["VIDEO"] = "VIDEO";
117
+ TypeTipEnum["HTML"] = "HTML";
118
+ TypeTipEnum["TEXT"] = "TEXT";
119
+ })(TypeTipEnum || (exports.TypeTipEnum = TypeTipEnum = {}));
112
120
  var TypeOutputValidationEnum;
113
121
  (function (TypeOutputValidationEnum) {
114
122
  TypeOutputValidationEnum["TEXT"] = "TEXT";
@@ -1,7 +1,21 @@
1
1
  import { Schema, Types } from "mongoose";
2
2
  import { IDefault } from "../Default";
3
- import { CategoryFormEnum, TypeAnswerEnum, TypeButtonAction, VariantViewEnum, TypeFormUnitEnum, TypeOutputValidationEnum, TypeValidationEnum } from "../enum";
3
+ import { CategoryFormEnum, TypeAnswerEnum, TypeButtonAction, TypeFormUnitEnum, TypeOutputValidationEnum, TypeTipEnum, TypeValidationEnum, VariantViewEnum } from "../enum";
4
4
  import { IForm } from "./Form";
5
+ export interface IModalConfig {
6
+ title: string;
7
+ description: string;
8
+ labelButtonCancel: string;
9
+ labelButtonConfirm: string;
10
+ }
11
+ export interface ITip {
12
+ type: TypeTipEnum;
13
+ title: string;
14
+ text: string;
15
+ html: string;
16
+ url: string;
17
+ thumb: string;
18
+ }
5
19
  /**
6
20
  * Utilizado para FormUnitTypeEnum = GRAPHIC
7
21
  */
@@ -44,6 +58,9 @@ export interface IFormUnit extends IDefault {
44
58
  graphicData: any;
45
59
  requestGraphicData: IRequestGraphicData[];
46
60
  children?: IFormUnit[];
61
+ modalConfig?: IModalConfig;
62
+ showTips?: boolean;
63
+ tips?: ITip[];
47
64
  }
48
65
  export interface IQuestionOption {
49
66
  sequence: number;
@@ -216,6 +233,29 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
216
233
  body?: any;
217
234
  dataset?: any;
218
235
  }>;
236
+ showTips: any;
237
+ tips: Types.DocumentArray<{
238
+ type: string;
239
+ text?: string | null | undefined;
240
+ url?: string | null | undefined;
241
+ thumb?: string | null | undefined;
242
+ title?: string | null | undefined;
243
+ html?: string | null | undefined;
244
+ }, Types.Subdocument<Types.ObjectId, any, {
245
+ type: string;
246
+ text?: string | null | undefined;
247
+ url?: string | null | undefined;
248
+ thumb?: string | null | undefined;
249
+ title?: string | null | undefined;
250
+ html?: string | null | undefined;
251
+ }> & {
252
+ type: string;
253
+ text?: string | null | undefined;
254
+ url?: string | null | undefined;
255
+ thumb?: string | null | undefined;
256
+ title?: string | null | undefined;
257
+ html?: string | null | undefined;
258
+ }>;
219
259
  account?: any;
220
260
  description?: string | null | undefined;
221
261
  reference?: any;
@@ -230,6 +270,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
230
270
  measurementUnit?: string | null | undefined;
231
271
  formulaToAnswer?: string | null | undefined;
232
272
  graphicData?: any;
273
+ modalConfig?: any;
233
274
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{} & {
234
275
  type: string;
235
276
  required: any;
@@ -301,6 +342,29 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
301
342
  body?: any;
302
343
  dataset?: any;
303
344
  }>;
345
+ showTips: any;
346
+ tips: Types.DocumentArray<{
347
+ type: string;
348
+ text?: string | null | undefined;
349
+ url?: string | null | undefined;
350
+ thumb?: string | null | undefined;
351
+ title?: string | null | undefined;
352
+ html?: string | null | undefined;
353
+ }, Types.Subdocument<Types.ObjectId, any, {
354
+ type: string;
355
+ text?: string | null | undefined;
356
+ url?: string | null | undefined;
357
+ thumb?: string | null | undefined;
358
+ title?: string | null | undefined;
359
+ html?: string | null | undefined;
360
+ }> & {
361
+ type: string;
362
+ text?: string | null | undefined;
363
+ url?: string | null | undefined;
364
+ thumb?: string | null | undefined;
365
+ title?: string | null | undefined;
366
+ html?: string | null | undefined;
367
+ }>;
304
368
  account?: any;
305
369
  description?: string | null | undefined;
306
370
  reference?: any;
@@ -315,6 +379,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
315
379
  measurementUnit?: string | null | undefined;
316
380
  formulaToAnswer?: string | null | undefined;
317
381
  graphicData?: any;
382
+ modalConfig?: any;
318
383
  }>, {}> & import("mongoose").FlatRecord<{} & {
319
384
  type: string;
320
385
  required: any;
@@ -386,6 +451,29 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
386
451
  body?: any;
387
452
  dataset?: any;
388
453
  }>;
454
+ showTips: any;
455
+ tips: Types.DocumentArray<{
456
+ type: string;
457
+ text?: string | null | undefined;
458
+ url?: string | null | undefined;
459
+ thumb?: string | null | undefined;
460
+ title?: string | null | undefined;
461
+ html?: string | null | undefined;
462
+ }, Types.Subdocument<Types.ObjectId, any, {
463
+ type: string;
464
+ text?: string | null | undefined;
465
+ url?: string | null | undefined;
466
+ thumb?: string | null | undefined;
467
+ title?: string | null | undefined;
468
+ html?: string | null | undefined;
469
+ }> & {
470
+ type: string;
471
+ text?: string | null | undefined;
472
+ url?: string | null | undefined;
473
+ thumb?: string | null | undefined;
474
+ title?: string | null | undefined;
475
+ html?: string | null | undefined;
476
+ }>;
389
477
  account?: any;
390
478
  description?: string | null | undefined;
391
479
  reference?: any;
@@ -400,6 +488,7 @@ export declare const FormUnitSchema: Schema<any, import("mongoose").Model<any, a
400
488
  measurementUnit?: string | null | undefined;
401
489
  formulaToAnswer?: string | null | undefined;
402
490
  graphicData?: any;
491
+ modalConfig?: any;
403
492
  }> & {
404
493
  _id: Types.ObjectId;
405
494
  } & {
@@ -62,7 +62,29 @@ exports.FormUnitSchema = new mongoose_1.Schema({
62
62
  required: { type: Boolean, default: false },
63
63
  //DADOS PARA GRAFICOS
64
64
  graphicData: { type: mongoose_1.Schema.Types.Mixed },
65
- requestGraphicData: { type: [exports.RequestGraphicDataSchema] }
65
+ requestGraphicData: { type: [exports.RequestGraphicDataSchema] },
66
+ //DADOS PARA MODAL
67
+ modalConfig: {
68
+ type: {
69
+ title: { type: String },
70
+ description: { type: String },
71
+ labelButtonCancel: { type: String },
72
+ labelButtonConfirm: { type: String }
73
+ }
74
+ },
75
+ showTips: { type: Boolean, default: true }, // Indica se os tips serão exibidos ou não, replicado aos filhos (via parent)
76
+ tips: {
77
+ type: [
78
+ {
79
+ type: { type: String, enum: enum_1.TypeTipEnum, required: true },
80
+ title: { type: String }, // Título do tip
81
+ text: { type: String }, // Conteúdo em texto.
82
+ html: { type: String }, // Conteúdo em HTML, etc.
83
+ url: { type: String }, // URL para imagens ou vídeos
84
+ thumb: { type: String } // Miniatura para imagens ou vídeos
85
+ }
86
+ ]
87
+ }
66
88
  }, {
67
89
  timestamps: { createdAt: "createdAtDateTime", updatedAt: "updatedAtDateTime" }
68
90
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-clinical",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "Biblioteca Typescript para API NodeJS",
5
5
  "repository": "https://github.com/cabralsilva/c2-clinical.git",
6
6
  "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",