ngx-t-forms-types 0.0.9 → 0.0.10

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.
@@ -553,8 +553,8 @@ export const DefaultInputConfig = {
553
553
  colSize: 12,
554
554
  },
555
555
  },
556
- [ElementTypes.TableSelection]: {
557
- label: 'Table selection',
556
+ [ElementTypes.WorkflowDocumentPicker]: {
557
+ label: 'Workflow Document Picker',
558
558
  illustration: '/assets/tableSelect.svg',
559
559
  disabled: false,
560
560
  requiredProperties: [
@@ -562,6 +562,7 @@ export const DefaultInputConfig = {
562
562
  AllFormInputPrimaryKeys.Appearance,
563
563
  AllFormInputPrimaryKeys.FormControlName,
564
564
  AllFormInputPrimaryKeys.Required,
565
+ AllFormInputPrimaryKeys.WorkflowPickerConfig,
565
566
  ],
566
567
  properties: [
567
568
  AllFormInputPrimaryKeys.Label,
@@ -569,26 +570,19 @@ export const DefaultInputConfig = {
569
570
  AllFormInputPrimaryKeys.FormControlName,
570
571
  AllFormInputPrimaryKeys.Validators,
571
572
  AllFormInputPrimaryKeys.Required,
572
- AllFormInputPrimaryKeys.MatOptions,
573
573
  AllFormInputPrimaryKeys.Value,
574
574
  AllFormInputPrimaryKeys.HintLabel,
575
- FormInputKeys.SelectUpto,
576
- FormInputKeys.TableConfig,
575
+ AllFormInputPrimaryKeys.WorkflowPickerConfig,
577
576
  ],
578
577
  elementTemplate: {
579
- element: ElementTypes.TableSelection,
578
+ element: ElementTypes.WorkflowDocumentPicker,
580
579
  appearance: 'outline',
581
580
  isCalculatedField: false,
582
581
  required: true,
583
582
  onlySetTempErrorOnTouch: false,
584
583
  colSize: 12,
585
- selectUpto: 2,
586
584
  validators: [],
587
- tableConfig: {
588
- displayedColumnsInOrder: [],
589
- columnsConfig: {}
590
- },
591
- dataType: InputDataTypes.Array,
585
+ dataType: InputDataTypes.String,
592
586
  },
593
587
  },
594
588
  // [ElementTypes.MatrixTable]: {
@@ -1,7 +1,8 @@
1
- import { ElementTypes, IToggleInput, ITextareaProperties, IDateRangePickerInput, IFileUploadInput, IMultiple, ITableSelectionInput } from "../formInput";
1
+ import { ElementTypes, IToggleInput, ITextareaProperties, IDateRangePickerInput, IFileUploadInput, IMultiple } 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,12 @@ 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
+ };
143
144
  }
@@ -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",
@@ -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";
@@ -10,6 +10,7 @@ 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",
13
14
  OptionSelect = "optionSelect",
14
15
  SelectionOptions = "selectionOptions",
15
16
  ApiCall = "apiCall",
@@ -4,6 +4,7 @@ export var ElementEditorTypes;
4
4
  ElementEditorTypes["Toggle"] = "toggle";
5
5
  ElementEditorTypes["Range"] = "range";
6
6
  ElementEditorTypes["ChipSelect"] = "chipSelect";
7
+ ElementEditorTypes["WorkflowPicker"] = "workflowPicker";
7
8
  ElementEditorTypes["OptionSelect"] = "optionSelect";
8
9
  ElementEditorTypes["SelectionOptions"] = "selectionOptions";
9
10
  ElementEditorTypes["ApiCall"] = "apiCall";
@@ -203,8 +203,99 @@ 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
+ },
208
299
  ],
209
300
  },
210
301
  {
@@ -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
+ }
@@ -5,6 +5,7 @@ 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: boolean;
8
9
  inputConfigErrors: {
9
10
  key: string;
10
11
  message: string;
@@ -5,6 +5,7 @@ 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,8 @@ 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
+ getSelectedDocument: (documentId: string) => Observable<any>;
40
43
  getScoaTree: () => Observable<IGetTreeResponse>;
41
44
  getSCOAAccount(SCOAAccount: string): Observable<any>;
42
45
  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 } 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;
11
12
  export declare enum ElementTypes {
12
13
  Input = "input",
13
14
  Location = "location",
@@ -22,10 +23,10 @@ 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"
29
30
  }
30
31
  export declare enum InputTypes {
31
32
  Text = "text",
@@ -16,11 +16,11 @@ 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
24
  // Add other types as needed
25
25
  })(ElementTypes || (ElementTypes = {}));
26
26
  export var InputTypes;
@@ -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";
@@ -13,11 +14,11 @@ import { MinInputMapInput, MinInputTypes, MinimumInputRequiredInterface } from "
13
14
  import { ScoaInnerInput } 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 { IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus } from "./WorkflowDocumentPicker";
19
20
  import { CalculatedFieldRules } from "./calculatedFieldRules";
20
21
  import { CalculationFunctions, calculationVariableInterface } from "./calculationVariableInterface";
21
22
  import { ValidationError, ValidationOptions } from "./schema";
22
23
  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 };
24
+ 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 };
@@ -1,7 +1,8 @@
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 { workflowStepStatus } from "./WorkflowDocumentPicker";
4
5
  import { CalculationFunctions } from "./calculationVariableInterface";
5
6
  export {
6
7
  ///ENUMS
7
- ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType };
8
+ ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, workflowStepStatus };
@@ -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 };
@@ -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(),
@@ -71,6 +72,7 @@ export const baseFormColumnInputsSchema = Joi.object({
71
72
  [AllFormInputPrimaryKeys.Status]: Joi.object().pattern(Joi.string(), Joi.string()).optional(),
72
73
  [AllFormInputPrimaryKeys.ViewType]: Joi.string().valid(...Object.values(InputViewTypes)).optional(),
73
74
  [AllFormInputPrimaryKeys.FormIsOpen]: Joi.boolean().optional(),
75
+ [AllFormInputPrimaryKeys.WorkflowPickerConfig]: workflowDocumentPickerConfigSchema.optional(),
74
76
  }).id('formColumnInputs');
75
77
  const formColumnInputsSchema = baseFormColumnInputsSchema.append({
76
78
  [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.10",
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 {};