ngx-t-forms-types 0.0.8 → 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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interfaces/Form/formSubmissionHandleInterface.d.ts +8 -1
- package/dist/interfaces/Form/index.d.ts +2 -2
- package/dist/interfaces/FormBuilder/DefaultEelement.js +6 -12
- package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.d.ts +10 -9
- package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.js +1 -1
- package/dist/interfaces/FormBuilder/FormInputKeys.d.ts +2 -0
- package/dist/interfaces/FormBuilder/FormInputKeys.js +2 -0
- package/dist/interfaces/FormBuilder/elementEditor.d.ts +4 -1
- package/dist/interfaces/FormBuilder/elementEditor.js +3 -0
- package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +100 -2
- package/dist/interfaces/FormBuilder/workflowSelectionConfig.d.ts +7 -0
- package/dist/interfaces/Tower/ITowerFormSteps.d.ts +1 -0
- package/dist/interfaces/environment/IStoreFunctions.d.ts +3 -0
- package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +6 -4
- package/dist/interfaces/formInput/BasicFormInputInterface.js +1 -1
- package/dist/interfaces/formInput/WorkflowDocumentPicker.d.ts +17 -0
- package/dist/interfaces/formInput/WorkflowDocumentPicker.js +8 -0
- package/dist/interfaces/formInput/index.d.ts +3 -2
- package/dist/interfaces/formInput/index.js +2 -1
- package/dist/interfaces/workflow/DocumentSectionConfigurationsInterface.d.ts +45 -0
- package/dist/interfaces/workflow/DocumentSectionConfigurationsInterface.js +19 -0
- package/dist/interfaces/workflow/index.d.ts +2 -0
- package/dist/interfaces/workflow/index.js +2 -0
- package/dist/schemas/DocmentPickerInputSchema.d.ts +3 -0
- package/dist/schemas/DocmentPickerInputSchema.js +10 -0
- package/dist/schemas/FormInputSchema.js +3 -0
- package/package.json +2 -1
- package/dist/interfaces/formInput/TableSelectionInput.d.ts +0 -6
- package/dist/interfaces/formInput/TableSelectionInput.js +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export * from './interfaces/formInput/index';
|
|
|
5
5
|
export * from './interfaces/FormBuilder/index';
|
|
6
6
|
export * from './interfaces/environment/index';
|
|
7
7
|
export * from './interfaces/pipeline-builder/index';
|
|
8
|
+
export * from './interfaces/workflow/index';
|
|
8
9
|
export * from './schemas/index';
|
package/dist/index.js
CHANGED
|
@@ -5,4 +5,5 @@ export * from './interfaces/formInput/index';
|
|
|
5
5
|
export * from './interfaces/FormBuilder/index';
|
|
6
6
|
export * from './interfaces/environment/index';
|
|
7
7
|
export * from './interfaces/pipeline-builder/index';
|
|
8
|
+
export * from './interfaces/workflow/index';
|
|
8
9
|
export * from './schemas/index';
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { APIDataFetchingConfigurationInterface } from "../formInput";
|
|
1
|
+
import { APIDataFetchingConfigurationInterface, MongoDbPipeLineConfigInterface } from "../formInput";
|
|
2
|
+
import { DataSources } from "../formInput/APIDataFetchingConfigurationInterface";
|
|
2
3
|
export interface FormSubmissionHandleInterface {
|
|
3
4
|
innerComponentShowSubmitButton?: boolean;
|
|
4
5
|
canSubmitAPI?: Array<APIDataFetchingConfigurationInterface>;
|
|
5
6
|
submissionAPI: Array<APIDataFetchingConfigurationInterface>;
|
|
6
7
|
submissionMessage?: string;
|
|
7
8
|
}
|
|
9
|
+
export interface IReportDataSources {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
source: DataSources;
|
|
13
|
+
config: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface;
|
|
14
|
+
}
|
|
@@ -7,6 +7,6 @@ import { FileData, FileUploadFn } from "./FileUploadFn";
|
|
|
7
7
|
import { IFormChangeHistory } from "./formChangeHistory";
|
|
8
8
|
import { IFormActions, InClassFormUtilsInterface, InClassFormUtilsWithSectionsInterface } from "./FormInClassUtils";
|
|
9
9
|
import { FormInterface, DatabaseFormInterface } from "./formInterface";
|
|
10
|
-
import { FormSubmissionHandleInterface } from "./formSubmissionHandleInterface";
|
|
10
|
+
import { FormSubmissionHandleInterface, IReportDataSources } from "./formSubmissionHandleInterface";
|
|
11
11
|
import { FormListSection, FormStateErrors, IFormsInitStateInterface, LocalFormStateSelectorInterface } from "./IFormsInitStateInterface";
|
|
12
|
-
export { CustomConfigInterface, InClassFormUtilsInterface, InClassFormUtilsWithSectionsInterface, FormInterface, DatabaseFormInterface, FormSubmissionHandleInterface, FormColumnInputs, IFormActions, NgxTFormsConfig, FileUploadFn, FileData, FormListSection, LocalFormStateSelectorInterface, IFormsInitStateInterface, FormStateErrors, IArrayFunction, OLD_FormInterface, IAllInputs, IFormChangeHistory };
|
|
12
|
+
export { CustomConfigInterface, InClassFormUtilsInterface, InClassFormUtilsWithSectionsInterface, FormInterface, DatabaseFormInterface, FormSubmissionHandleInterface, FormColumnInputs, IFormActions, NgxTFormsConfig, FileUploadFn, FileData, FormListSection, LocalFormStateSelectorInterface, IFormsInitStateInterface, FormStateErrors, IArrayFunction, OLD_FormInterface, IAllInputs, IFormChangeHistory, IReportDataSources };
|
|
@@ -553,8 +553,8 @@ export const DefaultInputConfig = {
|
|
|
553
553
|
colSize: 12,
|
|
554
554
|
},
|
|
555
555
|
},
|
|
556
|
-
[ElementTypes.
|
|
557
|
-
label: '
|
|
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
|
-
|
|
576
|
-
FormInputKeys.TableConfig,
|
|
575
|
+
AllFormInputPrimaryKeys.WorkflowPickerConfig,
|
|
577
576
|
],
|
|
578
577
|
elementTemplate: {
|
|
579
|
-
element: ElementTypes.
|
|
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
|
-
|
|
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
|
|
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",
|
|
@@ -56,6 +57,7 @@ export declare enum AllFormInputPrimaryKeys {
|
|
|
56
57
|
MaxLength = "maxLength",
|
|
57
58
|
HandleLabel = "handleLabel",
|
|
58
59
|
MscoaConfig = "mscoaConfig",
|
|
60
|
+
SystemDefault = "systemDefault",
|
|
59
61
|
Value = "value",
|
|
60
62
|
DataType = "dataType",
|
|
61
63
|
Readonly = "readonly",
|
|
@@ -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";
|
|
@@ -60,6 +61,7 @@ export var AllFormInputPrimaryKeys;
|
|
|
60
61
|
AllFormInputPrimaryKeys["MaxLength"] = "maxLength";
|
|
61
62
|
AllFormInputPrimaryKeys["HandleLabel"] = "handleLabel";
|
|
62
63
|
AllFormInputPrimaryKeys["MscoaConfig"] = "mscoaConfig";
|
|
64
|
+
AllFormInputPrimaryKeys["SystemDefault"] = "systemDefault";
|
|
63
65
|
AllFormInputPrimaryKeys["Value"] = "value";
|
|
64
66
|
AllFormInputPrimaryKeys["DataType"] = "dataType";
|
|
65
67
|
AllFormInputPrimaryKeys["Readonly"] = "readonly";
|
|
@@ -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",
|
|
@@ -26,7 +27,9 @@ export declare enum ElementEditorTypes {
|
|
|
26
27
|
ConfigMscoaAdditionalInputs = "configMscoaAdditionalInputs",
|
|
27
28
|
MongoPipelineBuilder = "mongoPipelineBuilder",
|
|
28
29
|
ChipOptionsCreator = "chipOptionsCreator",
|
|
29
|
-
default = "default"
|
|
30
|
+
default = "default",
|
|
31
|
+
DataSourcePicker = "dataSourcePicker",
|
|
32
|
+
ListLabelConfigEditor = "listLabelConfigEditor"
|
|
30
33
|
}
|
|
31
34
|
export interface ElementEditorConfigInterface {
|
|
32
35
|
editorSections: Array<ElementEditorConfigSectionInterface>;
|
|
@@ -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";
|
|
@@ -21,6 +22,8 @@ export var ElementEditorTypes;
|
|
|
21
22
|
ElementEditorTypes["MongoPipelineBuilder"] = "mongoPipelineBuilder";
|
|
22
23
|
ElementEditorTypes["ChipOptionsCreator"] = "chipOptionsCreator";
|
|
23
24
|
ElementEditorTypes["default"] = "default";
|
|
25
|
+
ElementEditorTypes["DataSourcePicker"] = "dataSourcePicker";
|
|
26
|
+
ElementEditorTypes["ListLabelConfigEditor"] = "listLabelConfigEditor";
|
|
24
27
|
})(ElementEditorTypes || (ElementEditorTypes = {}));
|
|
25
28
|
// interface TStringExpressionValidationTest{
|
|
26
29
|
// expression: string;
|
|
@@ -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: "
|
|
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
|
{
|
|
@@ -235,6 +326,13 @@ export var ElementConfig = {
|
|
|
235
326
|
label: 'Set as readonly field',
|
|
236
327
|
id: "cdc5173b-8464-4e03-b0fb-6258437fa50b"
|
|
237
328
|
},
|
|
329
|
+
{
|
|
330
|
+
name: SpecialElementKeys.Default,
|
|
331
|
+
editType: ElementEditorTypes.Toggle,
|
|
332
|
+
deepBind: [AllFormInputPrimaryKeys.SystemDefault],
|
|
333
|
+
label: 'Set as system default',
|
|
334
|
+
id: "dbe19360-c923-467a-a7aa-000452af6c5d"
|
|
335
|
+
},
|
|
238
336
|
{
|
|
239
337
|
name: AllFormInputPrimaryKeys.IServeInputWithRequisitionItems,
|
|
240
338
|
deepBind: ['iServeInputWithRequisitionItems'],
|
|
@@ -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,
|
|
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
|
-
|
|
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",
|
|
@@ -87,6 +88,7 @@ export interface IFormElementTemplate {
|
|
|
87
88
|
element: ElementTypes;
|
|
88
89
|
dataType: InputDataTypes;
|
|
89
90
|
appearance: MatFormFieldAppearance;
|
|
91
|
+
systemDefault?: boolean;
|
|
90
92
|
type?: InputTypes;
|
|
91
93
|
required: boolean;
|
|
92
94
|
colSize: number;
|
|
@@ -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,
|
|
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,45 @@
|
|
|
1
|
+
export declare enum SectionTypeGroups {
|
|
2
|
+
Transactions = "transactions",
|
|
3
|
+
Processes = "processes",
|
|
4
|
+
System = "system",
|
|
5
|
+
FormPreview = "formPreview",
|
|
6
|
+
Home = "home",
|
|
7
|
+
Transaction = "transaction",
|
|
8
|
+
Report = "Report"
|
|
9
|
+
}
|
|
10
|
+
export interface DocumentSectionConfigurationsInterface {
|
|
11
|
+
sectionTitle: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
getSectionList: {
|
|
14
|
+
submissionId: string;
|
|
15
|
+
httpEndPoint: string;
|
|
16
|
+
};
|
|
17
|
+
documentDetailsConfig?: {
|
|
18
|
+
title: string;
|
|
19
|
+
};
|
|
20
|
+
sectionGroup: SectionTypeGroups;
|
|
21
|
+
docuListConfig?: DocumentLitsConfigInterface;
|
|
22
|
+
}
|
|
23
|
+
export interface DocumentLitsConfigInterface {
|
|
24
|
+
segments: any[];
|
|
25
|
+
activeSegment: string;
|
|
26
|
+
labelConfiguration: DocumentLitsLabelConfigInterface[];
|
|
27
|
+
}
|
|
28
|
+
export declare enum DocumentLitsLabelConfigInterfaceValueType {
|
|
29
|
+
currency = "currency",
|
|
30
|
+
number = "number",
|
|
31
|
+
string = "string",
|
|
32
|
+
date = "date",
|
|
33
|
+
daysAgo = "daysAgo",
|
|
34
|
+
systemReference = "systemReference"
|
|
35
|
+
}
|
|
36
|
+
export interface DocumentLitsLabelConfigInterface {
|
|
37
|
+
label: string;
|
|
38
|
+
formControlName: string;
|
|
39
|
+
isHidden?: boolean;
|
|
40
|
+
stepName: string | null;
|
|
41
|
+
valueType: DocumentLitsLabelConfigInterfaceValueType;
|
|
42
|
+
}
|
|
43
|
+
export interface GridListLabelConfigInterface {
|
|
44
|
+
labelConfiguration: DocumentLitsLabelConfigInterface[];
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var SectionTypeGroups;
|
|
2
|
+
(function (SectionTypeGroups) {
|
|
3
|
+
SectionTypeGroups["Transactions"] = "transactions";
|
|
4
|
+
SectionTypeGroups["Processes"] = "processes";
|
|
5
|
+
SectionTypeGroups["System"] = "system";
|
|
6
|
+
SectionTypeGroups["FormPreview"] = "formPreview";
|
|
7
|
+
SectionTypeGroups["Home"] = "home";
|
|
8
|
+
SectionTypeGroups["Transaction"] = "transaction";
|
|
9
|
+
SectionTypeGroups["Report"] = "Report";
|
|
10
|
+
})(SectionTypeGroups || (SectionTypeGroups = {}));
|
|
11
|
+
export var DocumentLitsLabelConfigInterfaceValueType;
|
|
12
|
+
(function (DocumentLitsLabelConfigInterfaceValueType) {
|
|
13
|
+
DocumentLitsLabelConfigInterfaceValueType["currency"] = "currency";
|
|
14
|
+
DocumentLitsLabelConfigInterfaceValueType["number"] = "number";
|
|
15
|
+
DocumentLitsLabelConfigInterfaceValueType["string"] = "string";
|
|
16
|
+
DocumentLitsLabelConfigInterfaceValueType["date"] = "date";
|
|
17
|
+
DocumentLitsLabelConfigInterfaceValueType["daysAgo"] = "daysAgo";
|
|
18
|
+
DocumentLitsLabelConfigInterfaceValueType["systemReference"] = "systemReference";
|
|
19
|
+
})(DocumentLitsLabelConfigInterfaceValueType || (DocumentLitsLabelConfigInterfaceValueType = {}));
|
|
@@ -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(),
|
|
@@ -36,6 +37,7 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
36
37
|
[AllFormInputPrimaryKeys.MaxLength]: Joi.number().integer().optional(),
|
|
37
38
|
[AllFormInputPrimaryKeys.LinkedSegmentId]: Joi.string().optional(),
|
|
38
39
|
[AllFormInputPrimaryKeys.MscoaConfig]: MscoaInputConfigSchema.optional(),
|
|
40
|
+
[AllFormInputPrimaryKeys.SystemDefault]: Joi.boolean().optional(),
|
|
39
41
|
[AllFormInputPrimaryKeys.Value]: Joi.alternatives().try(Joi.number(), Joi.string().allow(''), Joi.boolean(), Joi.date(), Joi.object(), Joi.array().items(Joi.object())).optional(),
|
|
40
42
|
[AllFormInputPrimaryKeys.DataType]: Joi.string().valid(...Object.values(InputDataTypes)).required(),
|
|
41
43
|
[AllFormInputPrimaryKeys.Readonly]: Joi.boolean().optional(),
|
|
@@ -70,6 +72,7 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
70
72
|
[AllFormInputPrimaryKeys.Status]: Joi.object().pattern(Joi.string(), Joi.string()).optional(),
|
|
71
73
|
[AllFormInputPrimaryKeys.ViewType]: Joi.string().valid(...Object.values(InputViewTypes)).optional(),
|
|
72
74
|
[AllFormInputPrimaryKeys.FormIsOpen]: Joi.boolean().optional(),
|
|
75
|
+
[AllFormInputPrimaryKeys.WorkflowPickerConfig]: workflowDocumentPickerConfigSchema.optional(),
|
|
73
76
|
}).id('formColumnInputs');
|
|
74
77
|
const formColumnInputsSchema = baseFormColumnInputsSchema.append({
|
|
75
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.
|
|
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,6 +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
33
|
"prepublishOnly": "npm run build",
|
|
33
34
|
"dev": "npm run build --watch"
|
|
34
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 {};
|