ngx-t-forms-types 0.0.9 → 0.0.11

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.
Files changed (30) hide show
  1. package/dist/interfaces/Form/ArrayFunctions.d.ts +2 -0
  2. package/dist/interfaces/FormBuilder/DefaultEelement.js +42 -11
  3. package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.d.ts +18 -9
  4. package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.js +1 -1
  5. package/dist/interfaces/FormBuilder/FormInputKeys.d.ts +8 -1
  6. package/dist/interfaces/FormBuilder/FormInputKeys.js +7 -0
  7. package/dist/interfaces/FormBuilder/elementEditor.d.ts +6 -1
  8. package/dist/interfaces/FormBuilder/elementEditor.js +5 -0
  9. package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +135 -3
  10. package/dist/interfaces/FormBuilder/workflowSelectionConfig.d.ts +7 -0
  11. package/dist/interfaces/FormSlide/accessTree.d.ts +2 -6
  12. package/dist/interfaces/Tower/ITowerFormSteps.d.ts +5 -0
  13. package/dist/interfaces/Tower/index.d.ts +2 -2
  14. package/dist/interfaces/environment/IStoreFunctions.d.ts +5 -1
  15. package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +8 -6
  16. package/dist/interfaces/formInput/BasicFormInputInterface.js +2 -1
  17. package/dist/interfaces/formInput/MscoaInput.d.ts +8 -0
  18. package/dist/interfaces/formInput/ToggleInputInterface.d.ts +2 -0
  19. package/dist/interfaces/formInput/WorkflowAdjudication.d.ts +37 -0
  20. package/dist/interfaces/formInput/WorkflowAdjudication.js +7 -0
  21. package/dist/interfaces/formInput/WorkflowDocumentPicker.d.ts +17 -0
  22. package/dist/interfaces/formInput/WorkflowDocumentPicker.js +8 -0
  23. package/dist/interfaces/formInput/index.d.ts +5 -3
  24. package/dist/interfaces/formInput/index.js +3 -1
  25. package/dist/schemas/DocmentPickerInputSchema.d.ts +3 -0
  26. package/dist/schemas/DocmentPickerInputSchema.js +10 -0
  27. package/dist/schemas/FormInputSchema.js +14 -3
  28. package/package.json +2 -2
  29. package/dist/interfaces/formInput/TableSelectionInput.d.ts +0 -6
  30. package/dist/interfaces/formInput/TableSelectionInput.js +0 -1
@@ -6,4 +6,6 @@ export declare enum FunctionTypes {
6
6
  export interface IArrayFunction {
7
7
  function: FunctionTypes;
8
8
  expression: string;
9
+ id: string;
10
+ inEdit?: boolean;
9
11
  }
@@ -126,6 +126,8 @@ export const DefaultInputConfig = {
126
126
  AllFormInputPrimaryKeys.Value,
127
127
  AllFormInputPrimaryKeys.LabelPosition,
128
128
  AllFormInputPrimaryKeys.HintLabel,
129
+ AllFormInputPrimaryKeys.TrueLabel,
130
+ AllFormInputPrimaryKeys.FalseLabel,
129
131
  ],
130
132
  elementTemplate: {
131
133
  element: ElementTypes.Toggle,
@@ -138,6 +140,8 @@ export const DefaultInputConfig = {
138
140
  colSize: 12,
139
141
  validators: [],
140
142
  dataType: InputDataTypes.Boolean,
143
+ falseLabel: 'Yes',
144
+ trueLabel: 'No',
141
145
  },
142
146
  },
143
147
  [ElementTypes.Select]: {
@@ -553,8 +557,8 @@ export const DefaultInputConfig = {
553
557
  colSize: 12,
554
558
  },
555
559
  },
556
- [ElementTypes.TableSelection]: {
557
- label: 'Table selection',
560
+ [ElementTypes.WorkflowDocumentPicker]: {
561
+ label: 'Workflow Document Picker',
558
562
  illustration: '/assets/tableSelect.svg',
559
563
  disabled: false,
560
564
  requiredProperties: [
@@ -562,6 +566,7 @@ export const DefaultInputConfig = {
562
566
  AllFormInputPrimaryKeys.Appearance,
563
567
  AllFormInputPrimaryKeys.FormControlName,
564
568
  AllFormInputPrimaryKeys.Required,
569
+ AllFormInputPrimaryKeys.WorkflowPickerConfig,
565
570
  ],
566
571
  properties: [
567
572
  AllFormInputPrimaryKeys.Label,
@@ -569,25 +574,51 @@ export const DefaultInputConfig = {
569
574
  AllFormInputPrimaryKeys.FormControlName,
570
575
  AllFormInputPrimaryKeys.Validators,
571
576
  AllFormInputPrimaryKeys.Required,
572
- AllFormInputPrimaryKeys.MatOptions,
573
577
  AllFormInputPrimaryKeys.Value,
574
578
  AllFormInputPrimaryKeys.HintLabel,
575
- FormInputKeys.SelectUpto,
576
- FormInputKeys.TableConfig,
579
+ AllFormInputPrimaryKeys.WorkflowPickerConfig,
577
580
  ],
578
581
  elementTemplate: {
579
- element: ElementTypes.TableSelection,
582
+ element: ElementTypes.WorkflowDocumentPicker,
583
+ appearance: 'outline',
584
+ isCalculatedField: false,
585
+ required: true,
586
+ onlySetTempErrorOnTouch: false,
587
+ colSize: 12,
588
+ validators: [],
589
+ dataType: InputDataTypes.String,
590
+ },
591
+ },
592
+ [ElementTypes.WorkflowAdjudication]: {
593
+ label: 'Workflow Adjudication',
594
+ illustration: '/assets/tableSelect.svg',
595
+ disabled: false,
596
+ requiredProperties: [
597
+ AllFormInputPrimaryKeys.Label,
598
+ AllFormInputPrimaryKeys.Appearance,
599
+ AllFormInputPrimaryKeys.FormControlName,
600
+ AllFormInputPrimaryKeys.Required,
601
+ AllFormInputPrimaryKeys.AdjudicationStep,
602
+ ],
603
+ properties: [
604
+ AllFormInputPrimaryKeys.Label,
605
+ AllFormInputPrimaryKeys.Appearance,
606
+ AllFormInputPrimaryKeys.FormControlName,
607
+ AllFormInputPrimaryKeys.Validators,
608
+ AllFormInputPrimaryKeys.Required,
609
+ AllFormInputPrimaryKeys.Value,
610
+ AllFormInputPrimaryKeys.HintLabel,
611
+ AllFormInputPrimaryKeys.AdjudicationStep,
612
+ AllFormInputPrimaryKeys.AdjudicationPointTypes
613
+ ],
614
+ elementTemplate: {
615
+ element: ElementTypes.WorkflowAdjudication,
580
616
  appearance: 'outline',
581
617
  isCalculatedField: false,
582
618
  required: true,
583
619
  onlySetTempErrorOnTouch: false,
584
620
  colSize: 12,
585
- selectUpto: 2,
586
621
  validators: [],
587
- tableConfig: {
588
- displayedColumnsInOrder: [],
589
- columnsConfig: {}
590
- },
591
622
  dataType: InputDataTypes.Array,
592
623
  },
593
624
  },
@@ -1,7 +1,8 @@
1
- import { ElementTypes, IToggleInput, ITextareaProperties, IDateRangePickerInput, IFileUploadInput, IMultiple, ITableSelectionInput } from "../formInput";
1
+ import { ElementTypes, IToggleInput, ITextareaProperties, IDateRangePickerInput, IFileUploadInput, IMultiple, IWorkflowAdjudicationInput } from "../formInput";
2
2
  import { IFormElementTemplate } from "../formInput/BasicFormInputInterface";
3
3
  import { IMscoaFormInput } from "../formInput/MscoaInput";
4
4
  import { IRichTextEditor } from "../formInput/RichTextEditorInput";
5
+ import { IWorkflowDocumentPicker } from "../formInput/WorkflowDocumentPicker";
5
6
  import { AllFormInputPrimaryKeys, FormInputKeys, SpecialElementKeys } from "./FormInputKeys";
6
7
  export interface DefaultInputConfigInterface {
7
8
  [ElementTypes.Input]: {
@@ -108,14 +109,6 @@ export interface DefaultInputConfigInterface {
108
109
  elementTemplate: IFormElementTemplate;
109
110
  requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
110
111
  };
111
- [ElementTypes.TableSelection]: {
112
- label: string;
113
- disabled: boolean;
114
- illustration: string;
115
- properties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
116
- elementTemplate: ITableSelectionInput;
117
- requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
118
- };
119
112
  [ElementTypes.MultipleInput]: {
120
113
  label: string;
121
114
  disabled: boolean;
@@ -140,4 +133,20 @@ export interface DefaultInputConfigInterface {
140
133
  elementTemplate: IMscoaFormInput;
141
134
  requiredProperties: Array<FormInputKeys | SpecialElementKeys | AllFormInputPrimaryKeys>;
142
135
  };
136
+ [ElementTypes.WorkflowDocumentPicker]: {
137
+ label: string;
138
+ disabled: boolean;
139
+ illustration: string;
140
+ properties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
141
+ elementTemplate: IWorkflowDocumentPicker;
142
+ requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
143
+ };
144
+ [ElementTypes.WorkflowAdjudication]: {
145
+ label: string;
146
+ disabled: boolean;
147
+ illustration: string;
148
+ properties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
149
+ elementTemplate: IWorkflowAdjudicationInput;
150
+ requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
151
+ };
143
152
  }
@@ -1 +1 @@
1
- import { ElementTypes } from "../formInput";
1
+ import { ElementTypes, } from "../formInput";
@@ -41,6 +41,7 @@ export declare enum AllFormInputPrimaryKeys {
41
41
  Element = "element",
42
42
  ColSize = "colSize",
43
43
  Label = "label",
44
+ WorkflowPickerConfig = "workflowPickerConfig",
44
45
  FormControlName = "formControlName",
45
46
  Appearance = "appearance",
46
47
  Required = "required",
@@ -84,5 +85,11 @@ export declare enum AllFormInputPrimaryKeys {
84
85
  Status = "status",
85
86
  ViewType = "viewType",
86
87
  FormIsOpen = "formIsOpen",
87
- LinkedSegmentId = "linkedSegmentId"
88
+ LinkedSegmentId = "linkedSegmentId",
89
+ CanReload = "canReload",
90
+ WorkflowFormForScoreSheet = "workflowFormForScoreSheet",
91
+ AdjudicationStep = "adjudicationStep",
92
+ AdjudicationPointTypes = "adjudicationPointTypes",
93
+ TrueLabel = "trueLabel",
94
+ FalseLabel = "falseLabel"
88
95
  }
@@ -45,6 +45,7 @@ export var AllFormInputPrimaryKeys;
45
45
  AllFormInputPrimaryKeys["Element"] = "element";
46
46
  AllFormInputPrimaryKeys["ColSize"] = "colSize";
47
47
  AllFormInputPrimaryKeys["Label"] = "label";
48
+ AllFormInputPrimaryKeys["WorkflowPickerConfig"] = "workflowPickerConfig";
48
49
  AllFormInputPrimaryKeys["FormControlName"] = "formControlName";
49
50
  AllFormInputPrimaryKeys["Appearance"] = "appearance";
50
51
  AllFormInputPrimaryKeys["Required"] = "required";
@@ -89,4 +90,10 @@ export var AllFormInputPrimaryKeys;
89
90
  AllFormInputPrimaryKeys["ViewType"] = "viewType";
90
91
  AllFormInputPrimaryKeys["FormIsOpen"] = "formIsOpen";
91
92
  AllFormInputPrimaryKeys["LinkedSegmentId"] = "linkedSegmentId";
93
+ AllFormInputPrimaryKeys["CanReload"] = "canReload";
94
+ AllFormInputPrimaryKeys["WorkflowFormForScoreSheet"] = "workflowFormForScoreSheet";
95
+ AllFormInputPrimaryKeys["AdjudicationStep"] = "adjudicationStep";
96
+ AllFormInputPrimaryKeys["AdjudicationPointTypes"] = "adjudicationPointTypes";
97
+ AllFormInputPrimaryKeys["TrueLabel"] = "trueLabel";
98
+ AllFormInputPrimaryKeys["FalseLabel"] = "falseLabel";
92
99
  })(AllFormInputPrimaryKeys || (AllFormInputPrimaryKeys = {}));
@@ -10,6 +10,10 @@ export declare enum ElementEditorTypes {
10
10
  Toggle = "toggle",// Note the typo here; check if it should be 'toggle'
11
11
  Range = "range",
12
12
  ChipSelect = "chipSelect",
13
+ WorkflowPicker = "workflowPicker",
14
+ SelectMember = "selectMember",
15
+ WorkflowStepPicker = "workflowStepPicker",
16
+ FormPicker = "formPicker",
13
17
  OptionSelect = "optionSelect",
14
18
  SelectionOptions = "selectionOptions",
15
19
  ApiCall = "apiCall",
@@ -28,7 +32,8 @@ export declare enum ElementEditorTypes {
28
32
  ChipOptionsCreator = "chipOptionsCreator",
29
33
  default = "default",
30
34
  DataSourcePicker = "dataSourcePicker",
31
- ListLabelConfigEditor = "listLabelConfigEditor"
35
+ ListLabelConfigEditor = "listLabelConfigEditor",
36
+ DecisionGateSettings = "decisionGateSettings"
32
37
  }
33
38
  export interface ElementEditorConfigInterface {
34
39
  editorSections: Array<ElementEditorConfigSectionInterface>;
@@ -4,6 +4,10 @@ export var ElementEditorTypes;
4
4
  ElementEditorTypes["Toggle"] = "toggle";
5
5
  ElementEditorTypes["Range"] = "range";
6
6
  ElementEditorTypes["ChipSelect"] = "chipSelect";
7
+ ElementEditorTypes["WorkflowPicker"] = "workflowPicker";
8
+ ElementEditorTypes["SelectMember"] = "selectMember";
9
+ ElementEditorTypes["WorkflowStepPicker"] = "workflowStepPicker";
10
+ ElementEditorTypes["FormPicker"] = "formPicker";
7
11
  ElementEditorTypes["OptionSelect"] = "optionSelect";
8
12
  ElementEditorTypes["SelectionOptions"] = "selectionOptions";
9
13
  ElementEditorTypes["ApiCall"] = "apiCall";
@@ -23,6 +27,7 @@ export var ElementEditorTypes;
23
27
  ElementEditorTypes["default"] = "default";
24
28
  ElementEditorTypes["DataSourcePicker"] = "dataSourcePicker";
25
29
  ElementEditorTypes["ListLabelConfigEditor"] = "listLabelConfigEditor";
30
+ ElementEditorTypes["DecisionGateSettings"] = "decisionGateSettings";
26
31
  })(ElementEditorTypes || (ElementEditorTypes = {}));
27
32
  // interface TStringExpressionValidationTest{
28
33
  // expression: string;
@@ -1,6 +1,6 @@
1
1
  import { CurrenciesList } from "../../../Configs/currencies";
2
2
  import { DatePipeOptions } from "../../../Configs/datePipes";
3
- import { ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from "../../formInput";
3
+ import { AdjudicationSteps, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from "../../formInput";
4
4
  import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterface";
5
5
  import { InputFileType } from "../../formInput/FileUploadInputInterface";
6
6
  import { RichTextEditorType } from "../../formInput/RichTextEditorInput";
@@ -203,8 +203,140 @@ export var ElementConfig = {
203
203
  },
204
204
  ],
205
205
  options: Object.values(RichTextEditorType).map((type) => ({ label: type, value: type })),
206
- id: "9e98d072-cea9-4ee0-a085-0a8998ec0d7a"
207
- }
206
+ id: "26d1de77-58bf-4e3a-a5d2-a1328d209cd1"
207
+ },
208
+ {
209
+ name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
210
+ editType: ElementEditorTypes.WorkflowPicker,
211
+ label: 'Document options workflow',
212
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'workflowId'],
213
+ hint: 'Select a workflow to manage document options for this input.',
214
+ id: "ed16ad54-3a6c-407d-8b67-779ff23786db",
215
+ },
216
+ {
217
+ name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
218
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentSourceType'],
219
+ hint: `Choose the source type for document options: 'Postman API' fetches from an external API, 'Data Pipeline' pulls from MongoDB.`,
220
+ editType: ElementEditorTypes.ChipSelect,
221
+ label: 'Document options source type',
222
+ clearOnChange: [
223
+ [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource'],
224
+ ],
225
+ options: [
226
+ { label: 'Postman API', value: DataSources.Api },
227
+ { label: 'Data Pipeline', value: DataSources.MongoDb },
228
+ ],
229
+ id: "f04cc297-9b22-403a-afe4-4fb2e84fa503"
230
+ },
231
+ {
232
+ name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
233
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource'],
234
+ editType: ElementEditorTypes.ApiCall,
235
+ additionalTest: [
236
+ {
237
+ expression: `documentSourceType === ${DataSources.Api}`,
238
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentSourceType'],
239
+ },
240
+ ],
241
+ clearOnChange: [
242
+ [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource'],
243
+ ],
244
+ hint: `Select an API endpoint from your Postman collection to fetch document options. Configure headers, payload format, and response mapping as needed.`,
245
+ label: 'Select doc option API endpoint',
246
+ id: "ecb1ea0e-3d2d-447f-a68e-48f1378fc0a7"
247
+ },
248
+ {
249
+ name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
250
+ deepBind: [
251
+ AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource',
252
+ 'backEndConfig',
253
+ 'minimumInputRequired',
254
+ ],
255
+ additionalTest: [
256
+ {
257
+ testType: 'exists',
258
+ deepBind: [
259
+ AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource',
260
+ 'backEndConfig',
261
+ 'minimumInputRequired',
262
+ ],
263
+ }
264
+ ],
265
+ hint: `These are payload fields that are required to be filled in order to fetch data from the selected source`,
266
+ editType: ElementEditorTypes.RequiredInputs,
267
+ label: 'Set up required inputs',
268
+ id: "c1e79e55-18b7-4c4c-8b16-5f792f34e0be"
269
+ },
270
+ {
271
+ name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
272
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource', 'valueAccessRules'],
273
+ hint: `Map the fetched data to the input value. This is useful when the fetched data is an object and you want to map a specific field to the input value.It also allow data transformation before setting the value`,
274
+ fetchOptions: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource', '_id'],
275
+ additionalTest: [
276
+ {
277
+ expression: `documentSourceType === ${DataSources.Api}`,
278
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentSourceType'],
279
+ },
280
+ ],
281
+ editType: ElementEditorTypes.ApiValueAccessRules,
282
+ label: 'Map value to fetched data',
283
+ id: "9ccb074d-00be-4c90-8989-2309e9faed10"
284
+ },
285
+ {
286
+ name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
287
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource'],
288
+ additionalTest: [
289
+ {
290
+ expression: "documentSourceType === mongoPipeline",
291
+ deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentSourceType'],
292
+ },
293
+ ],
294
+ editType: ElementEditorTypes.MongoPipelineBuilder,
295
+ label: 'Configure MongoDB pipeline',
296
+ hint: `Create a MongoDB aggregation pipeline to fetch document options from your database.`,
297
+ id: "1b826f36-08ad-46b5-86ea-c1c48fd90f51"
298
+ },
299
+ {
300
+ name: AllFormInputPrimaryKeys.AdjudicationStep,
301
+ label: 'Adjudication step type',
302
+ deepBind: [AllFormInputPrimaryKeys.AdjudicationStep],
303
+ hint: `Select the adjudication step type for this input. This determines how the input will be used in the adjudication process.`,
304
+ id: "fb93e65a-d56a-4979-9615-5138133df919",
305
+ editType: ElementEditorTypes.ChipSelect,
306
+ options: Object.values(AdjudicationSteps).map((type) => ({ label: type, value: type })),
307
+ },
308
+ {
309
+ name: AllFormInputPrimaryKeys.AdjudicationPointTypes,
310
+ deepBind: [AllFormInputPrimaryKeys.AdjudicationPointTypes],
311
+ editType: ElementEditorTypes.ChipOptionsCreator,
312
+ additionalTest: [
313
+ {
314
+ expression: `${AllFormInputPrimaryKeys.AdjudicationStep} === ${AdjudicationSteps.ScoreCreation}`,
315
+ deepBind: [AllFormInputPrimaryKeys.AdjudicationStep],
316
+ }
317
+ ],
318
+ label: 'Adjudication point types',
319
+ hint: `Configure adjudication point types for this input.
320
+ This allows grouping or filtering points based on specific criteria, such as 'Functional', 'Financial'.
321
+ .`,
322
+ id: "88e9e85c-66d8-4df3-9742-eba1f7e47a01"
323
+ },
324
+ {
325
+ name: AllFormInputPrimaryKeys.FalseLabel,
326
+ deepBind: [AllFormInputPrimaryKeys.FalseLabel],
327
+ editType: ElementEditorTypes.Input,
328
+ id: "1787396c-cce6-4ae0-942f-6f7f0ec26fef",
329
+ label: 'False label',
330
+ hint: `Label for the false state of a toggle input.`,
331
+ },
332
+ {
333
+ name: AllFormInputPrimaryKeys.TrueLabel,
334
+ deepBind: [AllFormInputPrimaryKeys.TrueLabel],
335
+ editType: ElementEditorTypes.Input,
336
+ id: "a4647022-ab27-4ce6-8853-0b295ec3b0ce",
337
+ label: 'True label',
338
+ hint: `Label for the true state of a toggle input. This is used when the input type is 'toggle' or 'checkbox'.`,
339
+ },
208
340
  ],
209
341
  },
210
342
  {
@@ -1,3 +1,5 @@
1
+ import { InputDataTypes, InputPipeTypes } from "../formInput";
2
+ import { DocumentLitsLabelConfigInterfaceValueType } from "../workflow";
1
3
  export interface IWorkflowOption {
2
4
  name: string;
3
5
  createdAt: Date;
@@ -5,3 +7,8 @@ export interface IWorkflowOption {
5
7
  isDocument: boolean;
6
8
  id: string;
7
9
  }
10
+ export interface IWorkflowDocListCols {
11
+ label: string;
12
+ formControlName: string;
13
+ type?: DocumentLitsLabelConfigInterfaceValueType | InputDataTypes | undefined | InputPipeTypes;
14
+ }
@@ -1,3 +1,4 @@
1
+ import { IArrayFunction } from "../Form/ArrayFunctions";
1
2
  export interface TreeNode {
2
3
  key: string;
3
4
  value: any;
@@ -6,12 +7,7 @@ export interface TreeNode {
6
7
  inEdit?: boolean;
7
8
  path: string[];
8
9
  keyIsArrayIndex?: boolean;
9
- functions: {
10
- function: "filter" | "find";
11
- id: string;
12
- expression: string;
13
- inEdit?: boolean;
14
- }[];
10
+ functions: IArrayFunction[];
15
11
  }
16
12
  export interface FlatNode {
17
13
  expandable: boolean;
@@ -5,11 +5,16 @@ import { FormListSection, FormStateErrors, IFormsInitStateInterface, LocalFormSt
5
5
  import { DatabaseFormInterface } from '../Form/formInterface';
6
6
  import { ActivatedRouteSnapshot } from '@angular/router';
7
7
  export interface ITowerStepColumn extends FormColumnInputs {
8
+ canReload: IInputCanReload;
8
9
  inputConfigErrors: {
9
10
  key: string;
10
11
  message: string;
11
12
  }[];
12
13
  }
14
+ export interface IInputCanReload {
15
+ emit: () => void;
16
+ canReload: boolean;
17
+ }
13
18
  export interface ITowerFormSteps {
14
19
  label: string;
15
20
  sectionId: string;
@@ -1,2 +1,2 @@
1
- import { FormsStoreSelectorsInterface, ITowerFormSteps } from "./ITowerFormSteps";
2
- export { ITowerFormSteps, FormsStoreSelectorsInterface };
1
+ import { FormsStoreSelectorsInterface, ITowerFormSteps, ITowerStepColumn } from "./ITowerFormSteps";
2
+ export { ITowerFormSteps, FormsStoreSelectorsInterface, ITowerStepColumn };
@@ -1,10 +1,11 @@
1
1
  import { Observable } from "rxjs";
2
- import { DatabaseFormInterface, FileUploadFn, FormInterface } from "../Form";
2
+ import { DatabaseFormInterface, FileUploadFn, FormColumnInputs, FormInterface } from "../Form";
3
3
  import { IWorkflowOption } from "../FormBuilder";
4
4
  import { IGetTreeResponse } from "../formInput";
5
5
  import { FormListSection } from "../Form/IFormsInitStateInterface";
6
6
  import { IUserSignature } from "../formInput/userSignature";
7
7
  import { PointGroup } from "signature_pad";
8
+ import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig";
8
9
  export interface DialogConfig {
9
10
  title: string;
10
11
  message: string;
@@ -37,6 +38,9 @@ export interface IStoreFunctions {
37
38
  toastSuccess: (message: string) => void;
38
39
  toastError: (message: string) => void;
39
40
  workflows: () => Observable<IWorkflowOption[]>;
41
+ getWorkflowCols: (workflowId: string) => Observable<IWorkflowDocListCols[]>;
42
+ getCurrentFormAvailableInputOptions: () => Observable<Array<FormColumnInputs>>;
43
+ getSelectedDocument: (documentId: string) => Observable<any>;
40
44
  getScoaTree: () => Observable<IGetTreeResponse>;
41
45
  getSCOAAccount(SCOAAccount: string): Observable<any>;
42
46
  editForm: (formId: string) => void;
@@ -1,5 +1,5 @@
1
1
  import { MatFormFieldAppearance } from "@angular/material/form-field";
2
- import { IFileUploadInput, IMatrixInput, IScoaInput, IMultiple, ITableSelectionInput, IToggleInput } from ".";
2
+ import { IFileUploadInput, IMatrixInput, IScoaInput, IMultiple, IToggleInput, IWorkflowAdjudicationInput } from ".";
3
3
  import { ConditionalInputRule } from "./ConditionalInputRule";
4
4
  import { IDateRangePickerInput } from "./DateRangePickerInput";
5
5
  import { FormControlCustomValidatorsInterface } from "./FormControlCustomValidatorsInterface";
@@ -7,7 +7,8 @@ import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
7
7
  import { ITextareaProperties } from "./TextAreaInput";
8
8
  import { CalculatedFieldRules } from "./calculatedFieldRules";
9
9
  import { IRichTextEditor } from "./RichTextEditorInput";
10
- export type FormColumnInputs = IBasicFormInput & ITableSelectionInput & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple & IScoaInput & IRichTextEditor;
10
+ import { IWorkflowDocumentPicker } from "./WorkflowDocumentPicker";
11
+ export type FormColumnInputs = IBasicFormInput & IWorkflowDocumentPicker & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple & IScoaInput & IRichTextEditor & IWorkflowAdjudicationInput;
11
12
  export declare enum ElementTypes {
12
13
  Input = "input",
13
14
  Location = "location",
@@ -22,10 +23,11 @@ export declare enum ElementTypes {
22
23
  Signature = "signature",
23
24
  ImageCapture = "imageCapture",
24
25
  SectionTitle = "sectionTitle",
25
- TableSelection = "tableSelection",
26
26
  MultipleInput = "multipleInput",
27
27
  Editor = "editor",
28
- MscoaSelection = "mscoaSelection"
28
+ MscoaSelection = "mscoaSelection",
29
+ WorkflowDocumentPicker = "workflowDocumentPicker",
30
+ WorkflowAdjudication = "workflowAdjudication"
29
31
  }
30
32
  export declare enum InputTypes {
31
33
  Text = "text",
@@ -118,8 +120,8 @@ export interface IBasicFormInput extends IFormElementTemplate {
118
120
  max?: number | string | Date | MaxMinCustomScripts;
119
121
  tourContent?: string;
120
122
  viewType?: InputViewTypes;
121
- maxLength?: number;
122
- minLength?: number;
123
+ maxLength?: number | string;
124
+ minLength?: number | string;
123
125
  placeholder?: string;
124
126
  pattern?: string;
125
127
  spellcheck?: boolean;
@@ -16,11 +16,12 @@ export var ElementTypes;
16
16
  ElementTypes["ImageCapture"] = "imageCapture";
17
17
  // OcrInput = 'ocrInput',
18
18
  ElementTypes["SectionTitle"] = "sectionTitle";
19
- ElementTypes["TableSelection"] = "tableSelection";
20
19
  // MatrixTable = 'matrixTable',
21
20
  ElementTypes["MultipleInput"] = "multipleInput";
22
21
  ElementTypes["Editor"] = "editor";
23
22
  ElementTypes["MscoaSelection"] = "mscoaSelection";
23
+ ElementTypes["WorkflowDocumentPicker"] = "workflowDocumentPicker";
24
+ ElementTypes["WorkflowAdjudication"] = "workflowAdjudication";
24
25
  // Add other types as needed
25
26
  })(ElementTypes || (ElementTypes = {}));
26
27
  export var InputTypes;
@@ -13,4 +13,12 @@ export interface IMscoaFormInput extends IBasicFormInput {
13
13
  export interface ScoaInnerInput extends FormColumnInputs {
14
14
  linkedSegmentId: string;
15
15
  }
16
+ export interface ScoreSheetItem {
17
+ id: string;
18
+ formControlName: string;
19
+ totalPoints: number;
20
+ description: string;
21
+ label: string;
22
+ [key: string]: number | string;
23
+ }
16
24
  export declare var MSCOA_INPUT_DEFAULT_MAT_OPTIONS: MatDataOptionsInterface;
@@ -5,4 +5,6 @@ export declare enum LabelPosition {
5
5
  }
6
6
  export interface IToggleInput extends IBasicFormInput {
7
7
  labelPosition?: LabelPosition;
8
+ trueLabel?: string;
9
+ falseLabel?: string;
8
10
  }
@@ -0,0 +1,37 @@
1
+ import { IBasicFormInput } from "./BasicFormInputInterface";
2
+ export interface WorkflowAdjudicationScoreSheetValue {
3
+ id: string;
4
+ formControlName: string;
5
+ totalPoints: number;
6
+ description: string;
7
+ pointType?: string;
8
+ inputId?: string;
9
+ isEditRow?: boolean;
10
+ }
11
+ export interface WorkflowAdjudicationMicroFlowReviewValue {
12
+ id: string;
13
+ adj_microFlow_review: boolean;
14
+ nameOfBidder: string;
15
+ supplierNumber: string;
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ adjudicationPricePreferenceCalculation: number;
19
+ reference: string;
20
+ }
21
+ export interface WorkflowAdjudicationResponseElectedSupplierSelectionValue {
22
+ id: string;
23
+ supplierNumber: string;
24
+ resolutionNotes: string;
25
+ resolutionAttachment: string;
26
+ }
27
+ export declare enum AdjudicationSteps {
28
+ ScoreCreation = "scoreCreation",
29
+ SubMissionReview = "subMissionReview",
30
+ PointAssignment = "pointAssignment",
31
+ SupplierSelection = "supplierSelection"
32
+ }
33
+ export interface IWorkflowAdjudicationInput extends IBasicFormInput {
34
+ workflowFormForScoreSheet: string;
35
+ adjudicationStep: AdjudicationSteps;
36
+ adjudicationPointTypes: string[];
37
+ }
@@ -0,0 +1,7 @@
1
+ export var AdjudicationSteps;
2
+ (function (AdjudicationSteps) {
3
+ AdjudicationSteps["ScoreCreation"] = "scoreCreation";
4
+ AdjudicationSteps["SubMissionReview"] = "subMissionReview";
5
+ AdjudicationSteps["PointAssignment"] = "pointAssignment";
6
+ AdjudicationSteps["SupplierSelection"] = "supplierSelection";
7
+ })(AdjudicationSteps || (AdjudicationSteps = {}));
@@ -0,0 +1,17 @@
1
+ import { APIDataFetchingConfigurationInterface, DataSources, MongoDbPipeLineConfigInterface } from "./APIDataFetchingConfigurationInterface";
2
+ import { IBasicFormInput } from "./BasicFormInputInterface";
3
+ export interface IWorkflowDocumentPicker extends IBasicFormInput {
4
+ workflowPickerConfig: IWorkflowDocumentPickerConfig;
5
+ }
6
+ export interface IWorkflowDocumentPickerConfig {
7
+ workflowId: string;
8
+ documentSourceType: DataSources;
9
+ documentsSource: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface;
10
+ }
11
+ export declare enum workflowStepStatus {
12
+ PENDING = "pending",
13
+ IN_PROGRESS = "in-progress",
14
+ REJECTED = "rejected",
15
+ ESCALATED = "escalated",
16
+ COMPLETE = "complete"
17
+ }
@@ -0,0 +1,8 @@
1
+ export var workflowStepStatus;
2
+ (function (workflowStepStatus) {
3
+ workflowStepStatus["PENDING"] = "pending";
4
+ workflowStepStatus["IN_PROGRESS"] = "in-progress";
5
+ workflowStepStatus["REJECTED"] = "rejected";
6
+ workflowStepStatus["ESCALATED"] = "escalated";
7
+ workflowStepStatus["COMPLETE"] = "complete";
8
+ })(workflowStepStatus || (workflowStepStatus = {}));
@@ -1,4 +1,5 @@
1
1
  import { IFolderItem, IPostmanCollection } from "../FormBuilder/postmanCollection";
2
+ import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig";
2
3
  import { TreeNode } from "../FormSlide/accessTree";
3
4
  import { APIDataFetchingConfigurationInterface, InputAPIDataId, MongoDbPipeLineConfigInterface } from "./APIDataFetchingConfigurationInterface";
4
5
  import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, IBasicFormInput, InputDataTypes, InputPipeTypes, InputTypes } from "./BasicFormInputInterface";
@@ -10,14 +11,15 @@ import { IAccountSegmentTreeKeys, IGetTreeResponse, IIncludedSegmentConfig, ISco
10
11
  import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
11
12
  import { IMatrixInput } from "./MatrixInputInterface";
12
13
  import { MinInputMapInput, MinInputTypes, MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface";
13
- import { ScoaInnerInput } from "./MscoaInput";
14
+ import { ScoaInnerInput, ScoreSheetItem } from "./MscoaInput";
14
15
  import { IMultiple, IMultipleInputCal } from "./MultipleInterface";
15
16
  import { TableColumnConfigInterface, TableConfigurationsInterface } from "./TableConfigurationsInterface";
16
- import { ITableSelectionInput } from "./TableSelectionInput";
17
17
  import { ITextareaProperties } from "./TextAreaInput";
18
18
  import { IToggleInput } from "./ToggleInputInterface";
19
+ import { AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, WorkflowAdjudicationScoreSheetValue } from "./WorkflowAdjudication";
20
+ import { IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus } from "./WorkflowDocumentPicker";
19
21
  import { CalculatedFieldRules } from "./calculatedFieldRules";
20
22
  import { CalculationFunctions, calculationVariableInterface } from "./calculationVariableInterface";
21
23
  import { ValidationError, ValidationOptions } from "./schema";
22
24
  import { IUserSignature } from "./userSignature";
23
- export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, ITableSelectionInput, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IScoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IScoaAccount, IScoaInputConfig, ITableScoaSelectionRow, ScoaSegmentValue, IIncludedSegmentConfig, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys };
25
+ export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IBasicFormInput, IFileUploadInput, IDateRangePickerInput, ITextareaProperties, IToggleInput, IMatrixInput, IMultiple, IMultipleInputCal, IScoaInput, TableConfigurationsInterface, TableColumnConfigInterface, FormControlCustomValidatorsInterface, MinimumInputRequiredInterface, MinInputMapInput, CalculatedFieldRules, calculationVariableInterface, APIDataFetchingConfigurationInterface, IGetTreeResponse, CalculationFunctions, TreeNode, IPostmanCollection, IFolderItem, FileUploadInputValueInterface, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, IScoaAccount, IScoaInputConfig, ITableScoaSelectionRow, ScoaSegmentValue, IIncludedSegmentConfig, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus, IWorkflowDocListCols, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem };
@@ -1,7 +1,9 @@
1
1
  import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from "./BasicFormInputInterface";
2
2
  import { AllDocumentFileExtensions, AllImageFileExtensions, InputFileType, UploadTypes } from "./FileUploadInputInterface";
3
3
  import { MinInputTypes } from "./MinimumInputRequiredInterface";
4
+ import { AdjudicationSteps } from "./WorkflowAdjudication";
5
+ import { workflowStepStatus } from "./WorkflowDocumentPicker";
4
6
  import { CalculationFunctions } from "./calculationVariableInterface";
5
7
  export {
6
8
  ///ENUMS
7
- ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType };
9
+ ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, workflowStepStatus, AdjudicationSteps };
@@ -0,0 +1,3 @@
1
+ import Joi from 'joi';
2
+ declare const workflowDocumentPickerConfigSchema: Joi.ObjectSchema<any>;
3
+ export { workflowDocumentPickerConfigSchema };
@@ -0,0 +1,10 @@
1
+ import Joi from 'joi';
2
+ import { APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema } from './MatOptionsSchema';
3
+ import { DataSources } from '../interfaces/FormBuilder';
4
+ // Schema for IWorkflowDocumentPickerConfig
5
+ const workflowDocumentPickerConfigSchema = Joi.object({
6
+ workflowId: Joi.string().required(),
7
+ documentSourceType: Joi.string().valid(...Object.values(DataSources)).required(),
8
+ documentsSource: Joi.alternatives().try(APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema, Joi.object()).required(),
9
+ });
10
+ export { workflowDocumentPickerConfigSchema };
@@ -1,6 +1,6 @@
1
1
  import Joi from 'joi';
2
2
  import { AllFormInputPrimaryKeys } from '../interfaces/FormBuilder';
3
- import { AutocapitalizeOptions, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from '../interfaces/formInput';
3
+ import { AdjudicationSteps, AutocapitalizeOptions, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from '../interfaces/formInput';
4
4
  // import { InputFileType } from '../interfaces/formInput/FileUploadInputInterface';
5
5
  // import { LabelPosition } from '../interfaces/formInput/ToggleInputInterface';
6
6
  // import { MscoaInputConfigSchema } from './MscoaConfigSchema';
@@ -15,6 +15,7 @@ import { MatDataOptionsSchema } from './MatOptionsSchema';
15
15
  import { CalculationFunctions } from '../interfaces/formInput/calculationVariableInterface';
16
16
  import { RichTextEditorType } from '../interfaces/formInput/RichTextEditorInput';
17
17
  import { InputViewTypes } from '../interfaces/formInput/BasicFormInputInterface';
18
+ import { workflowDocumentPickerConfigSchema } from './DocmentPickerInputSchema';
18
19
  export const baseFormColumnInputsSchema = Joi.object({
19
20
  [AllFormInputPrimaryKeys.Id]: Joi.string().optional(),
20
21
  [AllFormInputPrimaryKeys.SectionId]: Joi.string().optional(),
@@ -30,10 +31,12 @@ export const baseFormColumnInputsSchema = Joi.object({
30
31
  [AllFormInputPrimaryKeys.FileType]: Joi.string().valid(...Object.values(InputFileType)).optional(),
31
32
  [AllFormInputPrimaryKeys.SingleSelect]: Joi.boolean().optional(),
32
33
  [AllFormInputPrimaryKeys.LabelPosition]: Joi.string().valid(...Object.values(LabelPosition)).optional(),
34
+ [AllFormInputPrimaryKeys.FalseLabel]: Joi.string().optional(),
35
+ [AllFormInputPrimaryKeys.TrueLabel]: Joi.string().optional(),
33
36
  [AllFormInputPrimaryKeys.Min]: Joi.alternatives().try(Joi.number(), Joi.string(), Joi.date()).optional(),
34
37
  [AllFormInputPrimaryKeys.Max]: Joi.alternatives().try(Joi.number(), Joi.string(), Joi.date()).optional(),
35
- [AllFormInputPrimaryKeys.MinLength]: Joi.number().integer().optional(),
36
- [AllFormInputPrimaryKeys.MaxLength]: Joi.number().integer().optional(),
38
+ [AllFormInputPrimaryKeys.MinLength]: Joi.alternatives().try(Joi.number(), Joi.string()).optional(),
39
+ [AllFormInputPrimaryKeys.MaxLength]: Joi.alternatives().try(Joi.number(), Joi.string()).optional(),
37
40
  [AllFormInputPrimaryKeys.LinkedSegmentId]: Joi.string().optional(),
38
41
  [AllFormInputPrimaryKeys.MscoaConfig]: MscoaInputConfigSchema.optional(),
39
42
  [AllFormInputPrimaryKeys.SystemDefault]: Joi.boolean().optional(),
@@ -71,6 +74,14 @@ export const baseFormColumnInputsSchema = Joi.object({
71
74
  [AllFormInputPrimaryKeys.Status]: Joi.object().pattern(Joi.string(), Joi.string()).optional(),
72
75
  [AllFormInputPrimaryKeys.ViewType]: Joi.string().valid(...Object.values(InputViewTypes)).optional(),
73
76
  [AllFormInputPrimaryKeys.FormIsOpen]: Joi.boolean().optional(),
77
+ [AllFormInputPrimaryKeys.WorkflowFormForScoreSheet]: Joi.string().optional(),
78
+ [AllFormInputPrimaryKeys.AdjudicationStep]: Joi.string().valid(...Object.values(AdjudicationSteps)).optional(),
79
+ [AllFormInputPrimaryKeys.AdjudicationPointTypes]: Joi.array().items(Joi.string()).optional(),
80
+ [AllFormInputPrimaryKeys.WorkflowPickerConfig]: workflowDocumentPickerConfigSchema.optional(),
81
+ [AllFormInputPrimaryKeys.CanReload]: Joi.object({
82
+ emit: Joi.function().required(),
83
+ canReload: Joi.boolean().required()
84
+ }).optional(),
74
85
  }).id('formColumnInputs');
75
86
  const formColumnInputsSchema = baseFormColumnInputsSchema.append({
76
87
  [AllFormInputPrimaryKeys.FormInputs]: Joi.array().items(Joi.link('#formColumnInputs')).optional()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-t-forms-types",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
5
5
  "keywords": [
6
6
  "typings",
@@ -29,7 +29,7 @@
29
29
  "test": "karma start",
30
30
  "clean": "rimraf dist",
31
31
  "build": "npm run clean && tsc",
32
- "build:prod": "npm run build --mode production",
32
+ "build:prod": "npm run build --mode production",
33
33
  "prepublishOnly": "npm run build",
34
34
  "dev": "npm run build --watch"
35
35
  },
@@ -1,6 +0,0 @@
1
- import { IBasicFormInput } from './BasicFormInputInterface';
2
- import { TableConfigurationsInterface } from './TableConfigurationsInterface';
3
- export interface ITableSelectionInput extends IBasicFormInput {
4
- selectUpto?: number;
5
- tableConfig?: TableConfigurationsInterface;
6
- }
@@ -1 +0,0 @@
1
- export {};