rapida-partner 1.1.8 → 1.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapida-partner",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "index.ts",
6
6
  "files": [
@@ -1,4 +1,5 @@
1
1
  export enum EDataType {
2
+ NODATA = "nodata",
2
3
  TEXT = "text",
3
4
  NUMBER = "number",
4
5
  PASSWORD = "password",
@@ -0,0 +1,11 @@
1
+ import type { IFormCondition } from "./form-condition.interface";
2
+ import type { IForm } from "./form.interface";
3
+ import type { IBusinessRule } from "./project.interface";
4
+
5
+ export interface IFormInheritance {
6
+ type: "inheritance";
7
+ form: IForm;
8
+ conditions?: IFormCondition[];
9
+ todo?: string;
10
+ businessRules?: IBusinessRule[];
11
+ }
@@ -3,9 +3,11 @@ import type { EDataType } from "../enums/form.enum";
3
3
  import type { IFormArray } from "./form-array.interface";
4
4
  import type { IFormAutocomplete } from "./form-autocomplete.interface";
5
5
  import type { IFormButton } from "./form-button.interface";
6
+ import type { IFormCondition } from "./form-condition.interface";
6
7
  import type { IFormDatePicker } from "./form-datepicker.interface";
7
8
  import type { IFormFieldset } from "./form-fieldset.interface";
8
9
  import type { IFormFile } from "./form-file.interface";
10
+ import type { IFormInheritance } from "./form-inheritance.interface";
9
11
  import type { IFormInput } from "./form-input.interface";
10
12
  import type { IFormSelect } from "./form-select.interface";
11
13
  import type { IFormTab } from "./form-tab.interface";
@@ -24,6 +26,7 @@ export interface IForm {
24
26
  endpoint: string;
25
27
  actions: ("create" | "get" | "getById" | "update" | "delete" | "clone")[];
26
28
  request?: IContractRequest;
29
+ conditions?: IFormCondition[];
27
30
  }[];
28
31
  kanban?: {
29
32
  status: "toDo" | "inProgress" | "done";
@@ -43,6 +46,7 @@ interface IFormContractGeneral {
43
46
 
44
47
  interface IContractRequest {
45
48
  entity: string,
49
+ relatedEntity?: string,
46
50
  description?: string,
47
51
  fields: IContractRequestField[]
48
52
  }
@@ -86,4 +90,5 @@ export type IFormElement =
86
90
  | IFormFieldset
87
91
  | IFormButton
88
92
  | IFormFile
89
- | IFormDatePicker;
93
+ | IFormDatePicker
94
+ | IFormInheritance;
@@ -0,0 +1,24 @@
1
+ {
2
+ "$id": "form-inheritance.ref.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "type": {
7
+ "type": "string",
8
+ "const": "inheritance"
9
+ },
10
+ "form": {
11
+ "$ref": "form.ref.json"
12
+ },
13
+ "conditions": {
14
+ "$ref": "form-condition.ref.json"
15
+ },
16
+ "todo": {
17
+ "type": "string"
18
+ },
19
+ "businessRules": {
20
+ "$ref": "business-rules.ref.json"
21
+ }
22
+ },
23
+ "required": ["type", "form"]
24
+ }
@@ -123,6 +123,9 @@
123
123
  }
124
124
  },
125
125
  "required": ["entity", "fields"]
126
+ },
127
+ "conditions": {
128
+ "$ref": "form-condition.ref.json"
126
129
  }
127
130
  },
128
131
  "required": ["endpoint", "actions"]
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "$id": "types-datatype.ref.json",
3
3
  "enum": [
4
+ "nodata",
4
5
  "text",
5
6
  "number",
6
7
  "password",