ngx-t-forms-types 0.0.15 → 0.0.17
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/interfaces/Form/IFormsInitStateInterface.d.ts +1 -0
- package/dist/interfaces/Form/formInterface.d.ts +1 -0
- package/dist/interfaces/FormBuilder/DefaultEelement.js +50 -2
- package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.d.ts +11 -4
- package/dist/interfaces/FormBuilder/FormInputKeys.d.ts +4 -1
- package/dist/interfaces/FormBuilder/FormInputKeys.js +3 -0
- package/dist/interfaces/FormBuilder/elementEditor.d.ts +2 -1
- package/dist/interfaces/FormBuilder/elementEditor.js +1 -0
- package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +224 -15
- package/dist/interfaces/environment/IStoreFunctions.d.ts +25 -2
- package/dist/interfaces/environment/IStoreFunctions.js +1 -1
- package/dist/interfaces/environment/environment.d.ts +7 -0
- package/dist/interfaces/environment/index.d.ts +3 -2
- package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +5 -3
- package/dist/interfaces/formInput/BasicFormInputInterface.js +1 -0
- package/dist/interfaces/formInput/IMscoaAccount.d.ts +20 -1
- package/dist/interfaces/formInput/IMscoaAccount.js +6 -1
- package/dist/interfaces/formInput/ISelectInputInterface.d.ts +13 -0
- package/dist/interfaces/formInput/MultipleInterface.d.ts +1 -0
- package/dist/interfaces/formInput/WorkflowDocumentPicker.d.ts +7 -2
- package/dist/interfaces/formInput/WorkflowDocumentPicker.js +1 -0
- package/dist/interfaces/formInput/calculatedFieldRules.d.ts +2 -0
- package/dist/interfaces/formInput/index.d.ts +4 -4
- package/dist/interfaces/formInput/index.js +3 -2
- package/dist/interfaces/workflow/DocumentSectionConfigurationsInterface.d.ts +10 -1
- package/dist/interfaces/workflow/DocumentSectionConfigurationsInterface.js +9 -0
- package/dist/interfaces/workflow/index.d.ts +2 -2
- package/dist/interfaces/workflow/index.js +2 -2
- package/dist/schemas/CalculatedFieldRulesSchema.js +2 -0
- package/dist/schemas/DocmentPickerInputSchema.js +4 -2
- package/dist/schemas/FormInputSchema.d.ts +1 -0
- package/dist/schemas/FormInputSchema.js +14 -0
- package/dist/schemas/MscoaConfigSchema.js +6 -0
- package/dist/schemas/customValidationSchema.d.ts +1 -0
- package/dist/schemas/customValidationSchema.js +5 -1
- package/package.json +5 -2
|
@@ -7,6 +7,7 @@ export interface LocalFormStateSelectorInterface extends FormInterface {
|
|
|
7
7
|
archived: boolean;
|
|
8
8
|
busy: boolean;
|
|
9
9
|
errors: FormValidationErrorsInterface[];
|
|
10
|
+
systemDefault: boolean;
|
|
10
11
|
}
|
|
11
12
|
export interface LocalFormsStateInterface extends DatabaseFormInterface {
|
|
12
13
|
errors: FormValidationErrorsInterface[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AutocapitalizeOptions, ElementTypes, InputDataTypes, InputTypes } from "../formInput";
|
|
2
2
|
import { OptionSelectTypes } from "../formInput/BasicFormInputInterface";
|
|
3
3
|
import { InputFileType } from "../formInput/FileUploadInputInterface";
|
|
4
|
+
import { AccountingBasis } from "../formInput/IMscoaAccount";
|
|
4
5
|
import { MSCOA_INPUT_DEFAULT_MAT_OPTIONS } from "../formInput/MscoaInput";
|
|
5
6
|
import { RichTextEditorType } from "../formInput/RichTextEditorInput";
|
|
6
7
|
import { LabelPosition } from "../formInput/ToggleInputInterface";
|
|
@@ -174,7 +175,7 @@ export const DefaultInputConfig = {
|
|
|
174
175
|
AllFormInputPrimaryKeys.DataType,
|
|
175
176
|
SpecialElementKeys.MatOptionsApiCall,
|
|
176
177
|
AllFormInputPrimaryKeys.OptionSelectType,
|
|
177
|
-
AllFormInputPrimaryKeys.AllowMultipleSelection
|
|
178
|
+
AllFormInputPrimaryKeys.AllowMultipleSelection,
|
|
178
179
|
],
|
|
179
180
|
elementTemplate: {
|
|
180
181
|
element: ElementTypes.Select,
|
|
@@ -189,6 +190,50 @@ export const DefaultInputConfig = {
|
|
|
189
190
|
allowMultipleSelection: false,
|
|
190
191
|
},
|
|
191
192
|
},
|
|
193
|
+
[ElementTypes.PaginatedSelectionTable]: {
|
|
194
|
+
label: 'Paginated Selection Table',
|
|
195
|
+
illustration: '/assets/select.svg',
|
|
196
|
+
disabled: false,
|
|
197
|
+
requiredProperties: [
|
|
198
|
+
AllFormInputPrimaryKeys.Label,
|
|
199
|
+
AllFormInputPrimaryKeys.Appearance,
|
|
200
|
+
AllFormInputPrimaryKeys.DataType,
|
|
201
|
+
AllFormInputPrimaryKeys.FormControlName,
|
|
202
|
+
AllFormInputPrimaryKeys.MatOptions,
|
|
203
|
+
AllFormInputPrimaryKeys.PaginationSelectionConfig
|
|
204
|
+
],
|
|
205
|
+
properties: [
|
|
206
|
+
AllFormInputPrimaryKeys.Label,
|
|
207
|
+
AllFormInputPrimaryKeys.Appearance,
|
|
208
|
+
AllFormInputPrimaryKeys.FormControlName,
|
|
209
|
+
AllFormInputPrimaryKeys.Validators,
|
|
210
|
+
AllFormInputPrimaryKeys.Required,
|
|
211
|
+
AllFormInputPrimaryKeys.ColSize,
|
|
212
|
+
AllFormInputPrimaryKeys.Value,
|
|
213
|
+
AllFormInputPrimaryKeys.MatOptions,
|
|
214
|
+
AllFormInputPrimaryKeys.HintLabel,
|
|
215
|
+
FormInputKeys.SuffixIcon,
|
|
216
|
+
FormInputKeys.PrefixIcon,
|
|
217
|
+
FormInputKeys.PrefixText,
|
|
218
|
+
FormInputKeys.SuffixText,
|
|
219
|
+
AllFormInputPrimaryKeys.DataType,
|
|
220
|
+
SpecialElementKeys.MatOptionsApiCall,
|
|
221
|
+
AllFormInputPrimaryKeys.AllowMultipleSelection,
|
|
222
|
+
AllFormInputPrimaryKeys.PaginationSelectionConfig
|
|
223
|
+
],
|
|
224
|
+
elementTemplate: {
|
|
225
|
+
element: ElementTypes.PaginatedSelectionTable,
|
|
226
|
+
required: true,
|
|
227
|
+
onlySetTempErrorOnTouch: false,
|
|
228
|
+
colSize: 12,
|
|
229
|
+
validators: [],
|
|
230
|
+
appearance: 'outline',
|
|
231
|
+
isCalculatedField: false,
|
|
232
|
+
dataType: InputDataTypes.String,
|
|
233
|
+
optionSelectType: OptionSelectTypes.DropDown, // Default to dropdown,
|
|
234
|
+
allowMultipleSelection: false,
|
|
235
|
+
},
|
|
236
|
+
},
|
|
192
237
|
[ElementTypes.IconSelect]: {
|
|
193
238
|
label: 'iconSelect',
|
|
194
239
|
illustration: '/assets/iconselection.svg',
|
|
@@ -583,6 +628,7 @@ export const DefaultInputConfig = {
|
|
|
583
628
|
AllFormInputPrimaryKeys.Value,
|
|
584
629
|
AllFormInputPrimaryKeys.HintLabel,
|
|
585
630
|
AllFormInputPrimaryKeys.WorkflowPickerConfig,
|
|
631
|
+
AllFormInputPrimaryKeys.AllowMultipleSelection,
|
|
586
632
|
],
|
|
587
633
|
elementTemplate: {
|
|
588
634
|
element: ElementTypes.WorkflowDocumentPicker,
|
|
@@ -769,7 +815,9 @@ export const DefaultInputConfig = {
|
|
|
769
815
|
mscoaConfig: {
|
|
770
816
|
showAllSegments: false,
|
|
771
817
|
segments: [],
|
|
772
|
-
|
|
818
|
+
accountValueLabel: 'SCOAAccount',
|
|
819
|
+
inputs: [],
|
|
820
|
+
accountingBasis: AccountingBasis.Dual,
|
|
773
821
|
},
|
|
774
822
|
dataType: InputDataTypes.Object
|
|
775
823
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ElementTypes, IToggleInput, ITextareaProperties, IDateRangePickerInput, IFileUploadInput, IMultiple, IWorkflowAdjudicationInput } from "../formInput";
|
|
1
|
+
import { ElementTypes, IToggleInput, ITextareaProperties, IDateRangePickerInput, IFileUploadInput, IMultiple, IWorkflowAdjudicationInput, IScoaInput } from "../formInput";
|
|
2
2
|
import { IFormElementTemplate } from "../formInput/BasicFormInputInterface";
|
|
3
|
-
import { ISelectInputInterface } from "../formInput/ISelectInputInterface";
|
|
4
|
-
import { IMscoaFormInput } from "../formInput/MscoaInput";
|
|
3
|
+
import { IPaginatedSelectionTableInputInterface, ISelectInputInterface } from "../formInput/ISelectInputInterface";
|
|
5
4
|
import { IRichTextEditor } from "../formInput/RichTextEditorInput";
|
|
6
5
|
import { IWorkflowDocumentPicker } from "../formInput/WorkflowDocumentPicker";
|
|
7
6
|
import { AllFormInputPrimaryKeys, FormInputKeys, SpecialElementKeys } from "./FormInputKeys";
|
|
@@ -46,6 +45,14 @@ export interface DefaultInputConfigInterface {
|
|
|
46
45
|
elementTemplate: ISelectInputInterface;
|
|
47
46
|
requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
|
|
48
47
|
};
|
|
48
|
+
[ElementTypes.PaginatedSelectionTable]: {
|
|
49
|
+
label: string;
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
illustration: string;
|
|
52
|
+
properties: Array<FormInputKeys | SpecialElementKeys | AllFormInputPrimaryKeys>;
|
|
53
|
+
elementTemplate: IPaginatedSelectionTableInputInterface;
|
|
54
|
+
requiredProperties: Array<FormInputKeys | AllFormInputPrimaryKeys>;
|
|
55
|
+
};
|
|
49
56
|
[ElementTypes.IconSelect]: {
|
|
50
57
|
label: string;
|
|
51
58
|
illustration: string;
|
|
@@ -131,7 +138,7 @@ export interface DefaultInputConfigInterface {
|
|
|
131
138
|
disabled: boolean;
|
|
132
139
|
illustration: string;
|
|
133
140
|
properties: Array<FormInputKeys | SpecialElementKeys | AllFormInputPrimaryKeys>;
|
|
134
|
-
elementTemplate:
|
|
141
|
+
elementTemplate: IScoaInput;
|
|
135
142
|
requiredProperties: Array<FormInputKeys | SpecialElementKeys | AllFormInputPrimaryKeys>;
|
|
136
143
|
};
|
|
137
144
|
[ElementTypes.WorkflowDocumentPicker]: {
|
|
@@ -94,5 +94,8 @@ export declare enum AllFormInputPrimaryKeys {
|
|
|
94
94
|
TrueLabel = "trueLabel",
|
|
95
95
|
FalseLabel = "falseLabel",
|
|
96
96
|
OptionSelectType = "optionSelectType",
|
|
97
|
-
AllowMultipleSelection = "allowMultipleSelection"
|
|
97
|
+
AllowMultipleSelection = "allowMultipleSelection",
|
|
98
|
+
GroupBy = "groupBy",
|
|
99
|
+
ConditionalInputConfig = "conditionalInputConfig",
|
|
100
|
+
PaginationSelectionConfig = "paginationSelectionConfig"
|
|
98
101
|
}
|
|
@@ -99,4 +99,7 @@ export var AllFormInputPrimaryKeys;
|
|
|
99
99
|
AllFormInputPrimaryKeys["FalseLabel"] = "falseLabel";
|
|
100
100
|
AllFormInputPrimaryKeys["OptionSelectType"] = "optionSelectType";
|
|
101
101
|
AllFormInputPrimaryKeys["AllowMultipleSelection"] = "allowMultipleSelection";
|
|
102
|
+
AllFormInputPrimaryKeys["GroupBy"] = "groupBy";
|
|
103
|
+
AllFormInputPrimaryKeys["ConditionalInputConfig"] = "conditionalInputConfig";
|
|
104
|
+
AllFormInputPrimaryKeys["PaginationSelectionConfig"] = "paginationSelectionConfig";
|
|
102
105
|
})(AllFormInputPrimaryKeys || (AllFormInputPrimaryKeys = {}));
|
|
@@ -34,7 +34,8 @@ export declare enum ElementEditorTypes {
|
|
|
34
34
|
DataSourcePicker = "dataSourcePicker",
|
|
35
35
|
ListLabelConfigEditor = "listLabelConfigEditor",
|
|
36
36
|
DecisionGateSettings = "decisionGateSettings",
|
|
37
|
-
RecordListManager = "recordListManager"
|
|
37
|
+
RecordListManager = "recordListManager",
|
|
38
|
+
MapMatOptionsKeys = "mapMatOptionsKeys"
|
|
38
39
|
}
|
|
39
40
|
export interface ElementEditorConfigInterface {
|
|
40
41
|
editorSections: Array<ElementEditorConfigSectionInterface>;
|
|
@@ -29,6 +29,7 @@ export var ElementEditorTypes;
|
|
|
29
29
|
ElementEditorTypes["ListLabelConfigEditor"] = "listLabelConfigEditor";
|
|
30
30
|
ElementEditorTypes["DecisionGateSettings"] = "decisionGateSettings";
|
|
31
31
|
ElementEditorTypes["RecordListManager"] = "recordListManager";
|
|
32
|
+
ElementEditorTypes["MapMatOptionsKeys"] = "mapMatOptionsKeys";
|
|
32
33
|
})(ElementEditorTypes || (ElementEditorTypes = {}));
|
|
33
34
|
// interface TStringExpressionValidationTest{
|
|
34
35
|
// expression: string;
|
|
@@ -4,6 +4,7 @@ import { AdjudicationSteps, ElementTypes, InputDataTypes, InputPipeTypes, InputT
|
|
|
4
4
|
import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterface";
|
|
5
5
|
import { OptionSelectTypes } from "../../formInput/BasicFormInputInterface";
|
|
6
6
|
import { InputFileType } from "../../formInput/FileUploadInputInterface";
|
|
7
|
+
import { AccountingBasis } from "../../formInput/IMscoaAccount";
|
|
7
8
|
import { RichTextEditorType } from "../../formInput/RichTextEditorInput";
|
|
8
9
|
import { LabelPosition } from "../../formInput/ToggleInputInterface";
|
|
9
10
|
import { AllFormInputPrimaryKeys, SpecialElementKeys } from "../FormInputKeys";
|
|
@@ -171,6 +172,156 @@ export var ElementConfig = {
|
|
|
171
172
|
label: 'Handle label',
|
|
172
173
|
id: "3f056cc9-e639-4db7-aa41-3f96593356b2"
|
|
173
174
|
},
|
|
175
|
+
{
|
|
176
|
+
name: AllFormInputPrimaryKeys.MscoaConfig,
|
|
177
|
+
deepBind: ['mscoaConfig', 'accountingBasis'],
|
|
178
|
+
editType: ElementEditorTypes.ChipSelect,
|
|
179
|
+
label: 'Select Budget Accounting Basis',
|
|
180
|
+
options: [
|
|
181
|
+
{
|
|
182
|
+
label: 'Performance (Accrual)',
|
|
183
|
+
value: AccountingBasis.Accrual
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
label: 'Liquidity (Cash)',
|
|
187
|
+
value: AccountingBasis.Cash
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
label: 'Dual (Both)',
|
|
191
|
+
value: AccountingBasis.Dual
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
clearOnChange: [
|
|
195
|
+
[AllFormInputPrimaryKeys.MscoaConfig, 'segments'],
|
|
196
|
+
[AllFormInputPrimaryKeys.MscoaConfig, 'cashSegments'],
|
|
197
|
+
[AllFormInputPrimaryKeys.MscoaConfig, 'showAllSegments']
|
|
198
|
+
],
|
|
199
|
+
hint: "This choice dictates when funds are recognized: 'Accrual' impacts budgets based on commitments and invoices; 'Cash' restricts budget impact to actual bank movements; 'Dual' tracks both simultaneously for comprehensive reporting.",
|
|
200
|
+
id: "d9ea60b9-653f-4d9c-88bd-f603a589cce0"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: AllFormInputPrimaryKeys.MscoaConfig,
|
|
204
|
+
deepBind: ['mscoaConfig', 'accountValueLabel'],
|
|
205
|
+
editType: ElementEditorTypes.ChipSelect,
|
|
206
|
+
label: 'Account value label',
|
|
207
|
+
hint: "Defines the label used to represent account values within the SCOA input, enhancing clarity in financial selections.",
|
|
208
|
+
id: "1f29ce07-4f68-49d8-bb81-b1ab0fc08455",
|
|
209
|
+
options: [{
|
|
210
|
+
"label": "SCOA ID",
|
|
211
|
+
"value": "SCOAid"
|
|
212
|
+
}, {
|
|
213
|
+
"label": "Full Account Number",
|
|
214
|
+
"value": "AccountNumber"
|
|
215
|
+
}, {
|
|
216
|
+
"label": "Account Number",
|
|
217
|
+
"value": "AccountNumberShortened"
|
|
218
|
+
}, {
|
|
219
|
+
"label": "Short Description",
|
|
220
|
+
"value": "ShortDescription"
|
|
221
|
+
}, {
|
|
222
|
+
"label": "Definition Description",
|
|
223
|
+
"value": "DefinitionDescription"
|
|
224
|
+
}, {
|
|
225
|
+
"label": "SCOA Account",
|
|
226
|
+
"value": "SCOAAccount"
|
|
227
|
+
}, {
|
|
228
|
+
"label": "Account Prefix",
|
|
229
|
+
"value": "AccountNumberPrefix"
|
|
230
|
+
}, {
|
|
231
|
+
"label": "Applicable To",
|
|
232
|
+
"value": "ApplicableTo"
|
|
233
|
+
}, {
|
|
234
|
+
"label": "BreakDown Allowed",
|
|
235
|
+
"value": "BreakDownAllowed"
|
|
236
|
+
}, {
|
|
237
|
+
"label": "Parent SCOA ID",
|
|
238
|
+
"value": "ParentSCOAId"
|
|
239
|
+
}, {
|
|
240
|
+
"label": "Posting Level",
|
|
241
|
+
"value": "PostingLevel"
|
|
242
|
+
}, {
|
|
243
|
+
"label": "Principle",
|
|
244
|
+
"value": "Principle"
|
|
245
|
+
}, {
|
|
246
|
+
"label": "SCOA File",
|
|
247
|
+
"value": "SCOAFile"
|
|
248
|
+
}, {
|
|
249
|
+
"label": "SCOA Level",
|
|
250
|
+
"value": "SCOALevel"
|
|
251
|
+
}, {
|
|
252
|
+
"label": "VAT Status",
|
|
253
|
+
"value": "VATStatus"
|
|
254
|
+
}, {
|
|
255
|
+
"label": "A2A",
|
|
256
|
+
"value": "A2A"
|
|
257
|
+
}, {
|
|
258
|
+
"label": "A4",
|
|
259
|
+
"value": "A4"
|
|
260
|
+
}, {
|
|
261
|
+
"label": "A4F",
|
|
262
|
+
"value": "A4F"
|
|
263
|
+
}, {
|
|
264
|
+
"label": "A5",
|
|
265
|
+
"value": "A5"
|
|
266
|
+
}, {
|
|
267
|
+
"label": "A6",
|
|
268
|
+
"value": "A6"
|
|
269
|
+
}, {
|
|
270
|
+
"label": "A6F",
|
|
271
|
+
"value": "A6F"
|
|
272
|
+
}, {
|
|
273
|
+
"label": "A7",
|
|
274
|
+
"value": "A7"
|
|
275
|
+
}, {
|
|
276
|
+
"label": "A8",
|
|
277
|
+
"value": "A8"
|
|
278
|
+
}, {
|
|
279
|
+
"label": "A9",
|
|
280
|
+
"value": "A9"
|
|
281
|
+
}, {
|
|
282
|
+
"label": "IUDF",
|
|
283
|
+
"value": "IUDF"
|
|
284
|
+
}, {
|
|
285
|
+
"label": "MTSF",
|
|
286
|
+
"value": "MTSF"
|
|
287
|
+
}, {
|
|
288
|
+
"label": "NATGRANT",
|
|
289
|
+
"value": "NATGRANT"
|
|
290
|
+
}, {
|
|
291
|
+
"label": "SA1",
|
|
292
|
+
"value": "SA1"
|
|
293
|
+
}, {
|
|
294
|
+
"label": "SA3",
|
|
295
|
+
"value": "SA3"
|
|
296
|
+
}, {
|
|
297
|
+
"label": "SA30",
|
|
298
|
+
"value": "SA30"
|
|
299
|
+
}, {
|
|
300
|
+
"label": "SA34A",
|
|
301
|
+
"value": "SA34A"
|
|
302
|
+
}, {
|
|
303
|
+
"label": "SA34B",
|
|
304
|
+
"value": "SA34B"
|
|
305
|
+
}, {
|
|
306
|
+
"label": "SA34C",
|
|
307
|
+
"value": "SA34C"
|
|
308
|
+
}, {
|
|
309
|
+
"label": "SA34D",
|
|
310
|
+
"value": "SA34D"
|
|
311
|
+
}, {
|
|
312
|
+
"label": "SA34E",
|
|
313
|
+
"value": "SA34E"
|
|
314
|
+
}, {
|
|
315
|
+
"label": "Created At",
|
|
316
|
+
"value": "createdAt"
|
|
317
|
+
}, {
|
|
318
|
+
"label": "Updated At",
|
|
319
|
+
"value": "updatedAt"
|
|
320
|
+
}, {
|
|
321
|
+
"label": "Select",
|
|
322
|
+
"value": "selection"
|
|
323
|
+
}]
|
|
324
|
+
},
|
|
174
325
|
{
|
|
175
326
|
name: AllFormInputPrimaryKeys.MscoaConfig,
|
|
176
327
|
editType: ElementEditorTypes.Toggle,
|
|
@@ -178,6 +329,7 @@ export var ElementConfig = {
|
|
|
178
329
|
deepBind: ['mscoaConfig', 'showAllSegments'],
|
|
179
330
|
clearOnChange: [
|
|
180
331
|
[AllFormInputPrimaryKeys.MscoaConfig, 'segments'],
|
|
332
|
+
[AllFormInputPrimaryKeys.MscoaConfig, 'cashSegments'],
|
|
181
333
|
],
|
|
182
334
|
hint: 'When enabled, allows selection from all Standard Chart of Accounts (SCOA) segments. Disable to limit available segments.',
|
|
183
335
|
id: "0f78efcc-5477-4202-916a-8a7cf459c017"
|
|
@@ -186,11 +338,26 @@ export var ElementConfig = {
|
|
|
186
338
|
name: AllFormInputPrimaryKeys.MscoaConfig,
|
|
187
339
|
deepBind: ['mscoaConfig', 'segments'],
|
|
188
340
|
editType: ElementEditorTypes.ConfigMscoaSegments,
|
|
189
|
-
label: 'Configure MScoa segments',
|
|
341
|
+
label: 'Configure MScoa Accrual segments',
|
|
190
342
|
fetchOptions: ['mscoaConfig', 'showAllSegments'],
|
|
191
343
|
hint: "Configure SCOA segments to be used in the input",
|
|
192
344
|
id: "ba1a5b79-b071-44a6-b39a-bf1c2fafcda5"
|
|
193
345
|
},
|
|
346
|
+
{
|
|
347
|
+
name: AllFormInputPrimaryKeys.MscoaConfig,
|
|
348
|
+
deepBind: ['mscoaConfig', 'cashSegments'],
|
|
349
|
+
editType: ElementEditorTypes.ConfigMscoaSegments,
|
|
350
|
+
label: 'Configure MScoa Cash segments',
|
|
351
|
+
fetchOptions: ['mscoaConfig', 'showAllSegments'],
|
|
352
|
+
additionalTest: [
|
|
353
|
+
{
|
|
354
|
+
expression: `accountingBasis !== ${AccountingBasis.Accrual}`,
|
|
355
|
+
deepBind: ['mscoaConfig', 'accountingBasis'],
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
hint: "Configure SCOA segments to be When mapping the Cash accounts",
|
|
359
|
+
id: "d9ea60b9-653f-4d9c-88bd-f603a589cce0"
|
|
360
|
+
},
|
|
194
361
|
{
|
|
195
362
|
name: AllFormInputPrimaryKeys.MscoaConfig,
|
|
196
363
|
deepBind: ['mscoaConfig', 'extensionAccountsForSegments'],
|
|
@@ -200,15 +367,15 @@ export var ElementConfig = {
|
|
|
200
367
|
hint: "Config scoa segments counter account options for segments",
|
|
201
368
|
id: "634b3c1a-f250-4b1a-8771-999b34882515"
|
|
202
369
|
},
|
|
203
|
-
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
},
|
|
370
|
+
// {
|
|
371
|
+
// name: AllFormInputPrimaryKeys.MscoaConfig,
|
|
372
|
+
// deepBind: ['mscoaConfig', 'inputs'],
|
|
373
|
+
// editType: ElementEditorTypes.ConfigMscoaAdditionalInputs,
|
|
374
|
+
// label: 'Configure additional inputs',
|
|
375
|
+
// hint: 'Configure supplementary inputs that extend SCOA segments with additional dimensions. These inputs will be linked to the selected SCOA segments.',
|
|
376
|
+
// fetchOptions: [],
|
|
377
|
+
// id: "21cc22c6-efb6-4e7d-b772-56443c82bd11"
|
|
378
|
+
// },
|
|
212
379
|
{
|
|
213
380
|
name: AllFormInputPrimaryKeys.RichTextEditorLibrary,
|
|
214
381
|
editType: ElementEditorTypes.ChipSelect,
|
|
@@ -231,16 +398,39 @@ export var ElementConfig = {
|
|
|
231
398
|
hint: 'Select a workflow to manage document options for this input.',
|
|
232
399
|
id: "ed16ad54-3a6c-407d-8b67-779ff23786db",
|
|
233
400
|
},
|
|
401
|
+
{
|
|
402
|
+
name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
|
|
403
|
+
deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'primaryIdentifierKey'],
|
|
404
|
+
label: "Select primary identifier key",
|
|
405
|
+
hint: "Choose a key other than _id to serve as the primary identifier for workflow documents. Note: existing mappings will be cleared when reconfigured. After updating, reselect the workflow above.",
|
|
406
|
+
editType: ElementEditorTypes.MapMatOptionsKeys,
|
|
407
|
+
fetchOptions: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'sampleDocument'],
|
|
408
|
+
additionalTest: [
|
|
409
|
+
{
|
|
410
|
+
deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'workflowId'],
|
|
411
|
+
testType: 'exists',
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
clearOnChange: [
|
|
415
|
+
[AllFormInputPrimaryKeys.WorkflowPickerConfig, 'sampleDocument'],
|
|
416
|
+
],
|
|
417
|
+
id: "c9396a58-1d72-4ef9-8eff-5a28e8f738a1"
|
|
418
|
+
},
|
|
234
419
|
{
|
|
235
420
|
name: AllFormInputPrimaryKeys.WorkflowPickerConfig,
|
|
236
421
|
deepBind: [AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentSourceType'],
|
|
237
422
|
hint: `Choose the source type for document options: 'Postman API' fetches from an external API, 'Data Pipeline' pulls from MongoDB.`,
|
|
238
423
|
editType: ElementEditorTypes.ChipSelect,
|
|
239
424
|
label: 'Document options source type',
|
|
425
|
+
defaultValue: 'default',
|
|
240
426
|
clearOnChange: [
|
|
241
427
|
[AllFormInputPrimaryKeys.WorkflowPickerConfig, 'documentsSource'],
|
|
242
428
|
],
|
|
243
429
|
options: [
|
|
430
|
+
{
|
|
431
|
+
label: 'Default',
|
|
432
|
+
value: 'default'
|
|
433
|
+
},
|
|
244
434
|
{ label: 'Postman API', value: DataSources.Api },
|
|
245
435
|
{ label: 'Data Pipeline', value: DataSources.MongoDb },
|
|
246
436
|
],
|
|
@@ -314,6 +504,25 @@ export var ElementConfig = {
|
|
|
314
504
|
hint: `Create a MongoDB aggregation pipeline to fetch document options from your database.`,
|
|
315
505
|
id: "1b826f36-08ad-46b5-86ea-c1c48fd90f51"
|
|
316
506
|
},
|
|
507
|
+
//********************** */
|
|
508
|
+
{
|
|
509
|
+
name: AllFormInputPrimaryKeys.PaginationSelectionConfig,
|
|
510
|
+
editType: ElementEditorTypes.Toggle,
|
|
511
|
+
deepBind: [AllFormInputPrimaryKeys.PaginationSelectionConfig, 'useLocalPagination'],
|
|
512
|
+
id: "fea889f3-5da4-4a68-9593-8f3ada6d697b",
|
|
513
|
+
label: 'Use local pagination',
|
|
514
|
+
hint: `When enabled, pagination is handled on the client side, suitable for data sources that do not support pagination.`,
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
name: AllFormInputPrimaryKeys.PaginationSelectionConfig,
|
|
518
|
+
editType: ElementEditorTypes.MapMatOptionsKeys,
|
|
519
|
+
deepBind: [AllFormInputPrimaryKeys.PaginationSelectionConfig, 'primaryIdentifierKey'],
|
|
520
|
+
label: 'Map option primary identifier, this is what will be used as the value of the input',
|
|
521
|
+
fetchOptions: [AllFormInputPrimaryKeys.MatOptions, 'options', '0'],
|
|
522
|
+
hint: "This configuration maps the key to be used as the input's value when a user selects an option. When an option is selected, the value of this key will be assigned to the form control.",
|
|
523
|
+
id: "fb684ce4-28d0-4cc6-ac1a-1d3e82f2f287"
|
|
524
|
+
},
|
|
525
|
+
//********************** */
|
|
317
526
|
{
|
|
318
527
|
name: AllFormInputPrimaryKeys.AdjudicationStep,
|
|
319
528
|
label: 'Adjudication step type',
|
|
@@ -722,7 +931,7 @@ export var ElementConfig = {
|
|
|
722
931
|
id: "ca2cf43b-8614-4a5e-b664-3cf96b9d239f"
|
|
723
932
|
},
|
|
724
933
|
{
|
|
725
|
-
name: SpecialElementKeys.
|
|
934
|
+
name: SpecialElementKeys.Default,
|
|
726
935
|
editType: ElementEditorTypes.ChipSelect,
|
|
727
936
|
label: 'Format displayed value',
|
|
728
937
|
hint: "Apply formatting to the displayed value (e.g., currency symbols, date formatting, decimal places) without changing the stored value.",
|
|
@@ -731,13 +940,13 @@ export var ElementConfig = {
|
|
|
731
940
|
{
|
|
732
941
|
expression: `type === ${InputTypes.Number}`,
|
|
733
942
|
deepBind: ['type'],
|
|
734
|
-
}
|
|
943
|
+
}
|
|
735
944
|
],
|
|
736
945
|
id: "328e8d2b-86a9-4ccd-8adc-635393c1c3a9",
|
|
737
946
|
options: Object.values(InputPipeTypes).map((type) => ({ label: type, value: type })),
|
|
738
947
|
},
|
|
739
948
|
{
|
|
740
|
-
name: SpecialElementKeys.
|
|
949
|
+
name: SpecialElementKeys.Default,
|
|
741
950
|
editType: ElementEditorTypes.OptionSelect,
|
|
742
951
|
deepBind: ['pipe', 'param'],
|
|
743
952
|
label: 'Select currency to apply',
|
|
@@ -755,7 +964,7 @@ export var ElementConfig = {
|
|
|
755
964
|
],
|
|
756
965
|
},
|
|
757
966
|
{
|
|
758
|
-
name: SpecialElementKeys.
|
|
967
|
+
name: SpecialElementKeys.Default,
|
|
759
968
|
editType: ElementEditorTypes.OptionSelect,
|
|
760
969
|
deepBind: ['pipe', 'param'],
|
|
761
970
|
label: 'Select date format',
|
|
@@ -769,7 +978,7 @@ export var ElementConfig = {
|
|
|
769
978
|
id: "36b8e1e1-625b-422a-8aa8-b594f3524bcc"
|
|
770
979
|
},
|
|
771
980
|
{
|
|
772
|
-
name: SpecialElementKeys.
|
|
981
|
+
name: SpecialElementKeys.Default,
|
|
773
982
|
editType: ElementEditorTypes.Input,
|
|
774
983
|
label: 'Decimal numbers',
|
|
775
984
|
deepBind: ['pipe', 'param'],
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import { DatabaseFormInterface, FileUploadFn, FormColumnInputs, FormInterface } from "../Form";
|
|
3
3
|
import { IWorkflowOption } from "../FormBuilder";
|
|
4
|
-
import { AdjResponseReviewColumnMapping, IGetTreeResponse, WorkflowAdjudicationScoreSheetValue } from "../formInput";
|
|
4
|
+
import { AccountingBasis, AdjResponseReviewColumnMapping, IGetTreeResponse, ScoaSegmentValue, WorkflowAdjudicationScoreSheetValue } from "../formInput";
|
|
5
5
|
import { FormListSection } from "../Form/IFormsInitStateInterface";
|
|
6
6
|
import { IUserSignature } from "../formInput/userSignature";
|
|
7
7
|
import { PointGroup } from "signature_pad";
|
|
8
8
|
import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig";
|
|
9
|
+
import { IFinancialCycles } from "./environment";
|
|
9
10
|
export interface DialogConfig {
|
|
10
11
|
title: string;
|
|
11
12
|
message: string;
|
|
@@ -17,12 +18,21 @@ export interface ActionButton {
|
|
|
17
18
|
color: string;
|
|
18
19
|
onClick: () => void;
|
|
19
20
|
}
|
|
21
|
+
export type BasisValidationError = Record<string, {
|
|
22
|
+
canOveride: boolean;
|
|
23
|
+
accountDimension: string;
|
|
24
|
+
message: string;
|
|
25
|
+
}>;
|
|
26
|
+
export type MscoaValuetValidationErrors = {
|
|
27
|
+
[AccountingBasis.Accrual]?: BasisValidationError;
|
|
28
|
+
[AccountingBasis.Cash]?: BasisValidationError;
|
|
29
|
+
};
|
|
20
30
|
export interface IStoreFunctions {
|
|
21
31
|
[x: string]: any;
|
|
22
32
|
formsCloseButton: ActionButton;
|
|
23
33
|
formBuilderCloseButton: ActionButton;
|
|
24
34
|
createForm: (form: FormInterface) => Observable<DatabaseFormInterface>;
|
|
25
|
-
updateForm: (form: FormInterface) => Observable<DatabaseFormInterface>;
|
|
35
|
+
updateForm: (form: FormInterface, versionNumber: number) => Observable<DatabaseFormInterface>;
|
|
26
36
|
archiveForm: (formId: string) => Observable<{
|
|
27
37
|
message: string;
|
|
28
38
|
}>;
|
|
@@ -39,10 +49,15 @@ export interface IStoreFunctions {
|
|
|
39
49
|
toastError: (message: string) => void;
|
|
40
50
|
workflows: () => Observable<IWorkflowOption[]>;
|
|
41
51
|
getWorkflowCols: (workflowId: string) => Observable<IWorkflowDocListCols[]>;
|
|
52
|
+
getFinacialCycles: () => Observable<IFinancialCycles>;
|
|
42
53
|
getCurrentFormAvailableInputOptions: () => Observable<Array<FormColumnInputs>>;
|
|
43
54
|
getSelectedDocument: (documentId: string) => Observable<any>;
|
|
44
55
|
getScoaTree: () => Observable<IGetTreeResponse>;
|
|
45
56
|
getSCOAAccount(SCOAAccount: string): Observable<any>;
|
|
57
|
+
validateMscoaSelection(value: {
|
|
58
|
+
[AccountingBasis.Accrual]?: ScoaSegmentValue;
|
|
59
|
+
[AccountingBasis.Cash]?: ScoaSegmentValue;
|
|
60
|
+
}): Observable<MscoaValuetValidationErrors>;
|
|
46
61
|
editForm: (formId: string) => void;
|
|
47
62
|
addNewForm: () => void;
|
|
48
63
|
saveFormData: (formId: string, data: {
|
|
@@ -53,6 +68,14 @@ export interface IStoreFunctions {
|
|
|
53
68
|
results: any;
|
|
54
69
|
message: string;
|
|
55
70
|
}>;
|
|
71
|
+
getWorkflowDocuments: (workflowId: string, page: number, itemsPerPage: number, sort: Record<string, -1 | 1>, searchKey: string | undefined, filter?: Record<string, any>) => Observable<{
|
|
72
|
+
footerConfig: {
|
|
73
|
+
totalPages: number;
|
|
74
|
+
totalItems: number;
|
|
75
|
+
itemsPerPage: number;
|
|
76
|
+
};
|
|
77
|
+
formValues: Record<string, unknown>[];
|
|
78
|
+
}>;
|
|
56
79
|
fileUpload: FileUploadFn;
|
|
57
80
|
formSubmittedSuccessfully: (formId: string) => void;
|
|
58
81
|
getUserSignature: () => Observable<IUserSignature>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { AccountingBasis } from "../formInput";
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { IStoreFunctions } from "./IStoreFunctions";
|
|
2
|
+
import { Moment } from 'moment';
|
|
3
|
+
export interface IFinancialCycles {
|
|
4
|
+
CURRENT_FINANCIAL_CYCLE_END_DATE: Moment;
|
|
5
|
+
CURRENT_FINANCIAL_CYCLE_START_DATE: Moment;
|
|
6
|
+
CURRENT_SPRINT_END_DATE: Moment;
|
|
7
|
+
CURRENT_SPRINT_START_DATE: Moment;
|
|
8
|
+
}
|
|
2
9
|
export interface NgxTFormsConfig {
|
|
3
10
|
base_url?: string;
|
|
4
11
|
formBuilder: IStoreFunctions;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { ActionButton, DialogConfig, IStoreFunctions } from "./IStoreFunctions";
|
|
2
|
-
|
|
1
|
+
import { ActionButton, BasisValidationError, DialogConfig, IStoreFunctions, MscoaValuetValidationErrors } from "./IStoreFunctions";
|
|
2
|
+
import { IFinancialCycles } from "./environment";
|
|
3
|
+
export { IStoreFunctions, ActionButton, DialogConfig, IFinancialCycles, MscoaValuetValidationErrors, BasisValidationError, };
|
|
@@ -8,8 +8,8 @@ import { ITextareaProperties } from "./TextAreaInput";
|
|
|
8
8
|
import { CalculatedFieldRules } from "./calculatedFieldRules";
|
|
9
9
|
import { IRichTextEditor } from "./RichTextEditorInput";
|
|
10
10
|
import { IWorkflowDocumentPicker } from "./WorkflowDocumentPicker";
|
|
11
|
-
import { ISelectInputInterface } from "./ISelectInputInterface";
|
|
12
|
-
export type FormColumnInputs = IBasicFormInput & ISelectInputInterface & IWorkflowDocumentPicker & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple & IScoaInput & IRichTextEditor & IWorkflowAdjudicationInput;
|
|
11
|
+
import { IPaginatedSelectionTableInputInterface, ISelectInputInterface } from "./ISelectInputInterface";
|
|
12
|
+
export type FormColumnInputs = IBasicFormInput & ISelectInputInterface & IPaginatedSelectionTableInputInterface & IWorkflowDocumentPicker & IFileUploadInput & IDateRangePickerInput & ITextareaProperties & IToggleInput & IMatrixInput & IMultiple & IScoaInput & IRichTextEditor & IWorkflowAdjudicationInput;
|
|
13
13
|
export declare enum ElementTypes {
|
|
14
14
|
Input = "input",
|
|
15
15
|
Location = "location",
|
|
@@ -28,7 +28,8 @@ export declare enum ElementTypes {
|
|
|
28
28
|
Editor = "editor",
|
|
29
29
|
MscoaSelection = "mscoaSelection",
|
|
30
30
|
WorkflowDocumentPicker = "workflowDocumentPicker",
|
|
31
|
-
WorkflowAdjudication = "workflowAdjudication"
|
|
31
|
+
WorkflowAdjudication = "workflowAdjudication",
|
|
32
|
+
PaginatedSelectionTable = "paginatedSelectionTable"
|
|
32
33
|
}
|
|
33
34
|
export declare enum InputTypes {
|
|
34
35
|
Text = "text",
|
|
@@ -147,4 +148,5 @@ export interface IBasicFormInput extends IFormElementTemplate {
|
|
|
147
148
|
} | Array<{
|
|
148
149
|
[key: string]: any;
|
|
149
150
|
}>;
|
|
151
|
+
multiSelect?: boolean;
|
|
150
152
|
}
|
|
@@ -22,6 +22,7 @@ export var ElementTypes;
|
|
|
22
22
|
ElementTypes["MscoaSelection"] = "mscoaSelection";
|
|
23
23
|
ElementTypes["WorkflowDocumentPicker"] = "workflowDocumentPicker";
|
|
24
24
|
ElementTypes["WorkflowAdjudication"] = "workflowAdjudication";
|
|
25
|
+
ElementTypes["PaginatedSelectionTable"] = "paginatedSelectionTable";
|
|
25
26
|
// Add other types as needed
|
|
26
27
|
})(ElementTypes || (ElementTypes = {}));
|
|
27
28
|
export var InputTypes;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MscoaValuetValidationErrors } from "../environment/IStoreFunctions";
|
|
1
2
|
import { IBasicFormInput } from "./BasicFormInputInterface";
|
|
2
3
|
import { ScoaInnerInput } from "./MscoaInput";
|
|
3
4
|
export interface IVersion {
|
|
@@ -52,15 +53,21 @@ export interface ScoaInterface extends IScoaInputConfig {
|
|
|
52
53
|
inputId: string;
|
|
53
54
|
accountTree: ScoaAccountTree;
|
|
54
55
|
loadingTree: boolean;
|
|
56
|
+
validatingValue: boolean;
|
|
55
57
|
initiated: boolean;
|
|
56
58
|
accountTreeKeys: string[] | undefined;
|
|
57
|
-
segmentValues
|
|
59
|
+
segmentValues?: {
|
|
60
|
+
[AccountingBasis.Accrual]?: ScoaSegmentValue;
|
|
61
|
+
[AccountingBasis.Cash]?: ScoaSegmentValue;
|
|
62
|
+
};
|
|
63
|
+
validationErrors: MscoaValuetValidationErrors;
|
|
58
64
|
getTreeResponse: IGetTreeResponse | null;
|
|
59
65
|
}
|
|
60
66
|
export interface ScoaSegmentValue {
|
|
61
67
|
[key: string]: {
|
|
62
68
|
debit: IScoaAccount | undefined;
|
|
63
69
|
credit: IScoaAccount | undefined;
|
|
70
|
+
vatApplicableTo?: string;
|
|
64
71
|
};
|
|
65
72
|
}
|
|
66
73
|
export type ScoaAccountTree = {
|
|
@@ -72,20 +79,32 @@ export interface ITableScoaSelectionRow extends IIncludedSegmentConfig {
|
|
|
72
79
|
debit: string;
|
|
73
80
|
credit: string;
|
|
74
81
|
}
|
|
82
|
+
export declare enum AccountingBasis {
|
|
83
|
+
Accrual = "accrual",
|
|
84
|
+
Cash = "cash",
|
|
85
|
+
Dual = "dual"
|
|
86
|
+
}
|
|
75
87
|
export interface IIncludedSegmentConfig {
|
|
76
88
|
segment: string | undefined;
|
|
77
89
|
customSegment?: string | undefined;
|
|
78
90
|
label: string;
|
|
79
91
|
readOnly: boolean;
|
|
80
92
|
singleSelect: boolean;
|
|
93
|
+
inheritValueFromAccrual?: boolean;
|
|
94
|
+
vatSelectonActive?: boolean;
|
|
81
95
|
additionalAccounts: string[];
|
|
82
96
|
segmentExtension: boolean;
|
|
83
97
|
id: string;
|
|
84
98
|
}
|
|
85
99
|
export interface IScoaInputConfig {
|
|
86
100
|
inputs: ScoaInnerInput[];
|
|
101
|
+
label: string;
|
|
102
|
+
hint?: string;
|
|
87
103
|
extensionAccountsForSegments?: string[];
|
|
104
|
+
accountingBasis?: AccountingBasis;
|
|
88
105
|
segments: IIncludedSegmentConfig[] | undefined;
|
|
106
|
+
cashSegments: IIncludedSegmentConfig[] | undefined;
|
|
107
|
+
accountValueLabel: string;
|
|
89
108
|
showAllSegments: boolean;
|
|
90
109
|
}
|
|
91
110
|
export interface IGetTreeResponse {
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys";
|
|
2
|
+
import { TreeNode } from "../FormSlide/accessTree";
|
|
2
3
|
import { IBasicFormInput, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
3
4
|
export interface ISelectInputInterface extends IBasicFormInput {
|
|
4
5
|
[AllFormInputPrimaryKeys.OptionSelectType]: OptionSelectTypes;
|
|
5
6
|
[AllFormInputPrimaryKeys.AllowMultipleSelection]: boolean;
|
|
6
7
|
}
|
|
8
|
+
export interface IPaginatedSelectionTableInputInterface extends IBasicFormInput {
|
|
9
|
+
[AllFormInputPrimaryKeys.AllowMultipleSelection]: boolean;
|
|
10
|
+
[AllFormInputPrimaryKeys.PaginationSelectionConfig]: {
|
|
11
|
+
useLocalPagination: boolean;
|
|
12
|
+
primaryIdentifierKey?: TreeNode[];
|
|
13
|
+
columns: Array<{
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
id: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys";
|
|
2
|
+
import { TreeNode } from "../FormSlide/accessTree";
|
|
1
3
|
import { APIDataFetchingConfigurationInterface, DataSources, MongoDbPipeLineConfigInterface } from "./APIDataFetchingConfigurationInterface";
|
|
2
4
|
import { IBasicFormInput } from "./BasicFormInputInterface";
|
|
3
5
|
export interface IWorkflowDocumentPicker extends IBasicFormInput {
|
|
4
6
|
workflowPickerConfig: IWorkflowDocumentPickerConfig;
|
|
7
|
+
[AllFormInputPrimaryKeys.AllowMultipleSelection]: boolean;
|
|
5
8
|
}
|
|
6
9
|
export interface IWorkflowDocumentPickerConfig {
|
|
7
10
|
workflowId: string;
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
primaryIdentifierKey?: TreeNode[];
|
|
12
|
+
sampleDocument?: Record<string, unknown>;
|
|
13
|
+
documentSourceType: DataSources | 'default';
|
|
14
|
+
documentsSource?: APIDataFetchingConfigurationInterface | MongoDbPipeLineConfigInterface;
|
|
10
15
|
}
|
|
11
16
|
export declare enum workflowStepStatus {
|
|
12
17
|
PENDING = "pending",
|
|
@@ -2,6 +2,8 @@ import { calculationVariableInterface } from "./calculationVariableInterface";
|
|
|
2
2
|
export interface CalculatedFieldRules {
|
|
3
3
|
formula: string;
|
|
4
4
|
variables: calculationVariableInterface[];
|
|
5
|
+
decimalPlaces?: number;
|
|
6
|
+
roundingMode?: 'FLOOR' | 'CEIL' | 'ROUND';
|
|
5
7
|
getFormulaFromAFormInput?: boolean;
|
|
6
8
|
formControlWithFormula?: string;
|
|
7
9
|
}
|
|
@@ -2,16 +2,16 @@ import { IFolderItem, IPostmanCollection } from "../FormBuilder/postmanCollectio
|
|
|
2
2
|
import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig";
|
|
3
3
|
import { TreeNode } from "../FormSlide/accessTree";
|
|
4
4
|
import { APIDataFetchingConfigurationInterface, InputAPIDataId, MongoDbPipeLineConfigInterface } from "./APIDataFetchingConfigurationInterface";
|
|
5
|
-
import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, IBasicFormInput, InputDataTypes, InputPipeTypes, InputTypes, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
5
|
+
import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, IBasicFormInput, IFormElementTemplate, InputDataTypes, InputPipeTypes, InputTypes, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
6
6
|
import { IDateRangePickerInput } from "./DateRangePickerInput";
|
|
7
7
|
import { AllDocumentFileExtensions, AllImageFileExtensions, FileUploadInputValueInterface, IFileUploadInput, InputFileType, UploadTypes } from "./FileUploadInputInterface";
|
|
8
8
|
import { FormControlCustomValidatorsInterface } from "./FormControlCustomValidatorsInterface";
|
|
9
9
|
import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface";
|
|
10
|
-
import { IAccountSegmentTreeKeys, IGetTreeResponse, IIncludedSegmentConfig, IScoaAccount, IScoaInput, IScoaInputConfig, ITableScoaSelectionRow, ScoaAccountTree, ScoaInterface, ScoaSegmentValue } from "./IMscoaAccount";
|
|
10
|
+
import { AccountingBasis, IAccountSegmentTreeKeys, IGetTreeResponse, IIncludedSegmentConfig, IScoaAccount, IScoaInput, IScoaInputConfig, ITableScoaSelectionRow, ScoaAccountTree, ScoaInterface, ScoaSegmentValue } from "./IMscoaAccount";
|
|
11
11
|
import { ISelectInputInterface } from "./ISelectInputInterface";
|
|
12
12
|
import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
|
|
13
13
|
import { IMatrixInput } from "./MatrixInputInterface";
|
|
14
|
-
import { MinInputMapInput, MinInputTypes, MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface";
|
|
14
|
+
import { JsDataTypes, MinInputMapInput, MinInputTypes, MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface";
|
|
15
15
|
import { ScoaInnerInput, ScoreSheetItem } from "./MscoaInput";
|
|
16
16
|
import { IMultiple, IMultipleInputCal } from "./MultipleInterface";
|
|
17
17
|
import { TableColumnConfigInterface, TableConfigurationsInterface } from "./TableConfigurationsInterface";
|
|
@@ -23,4 +23,4 @@ import { CalculatedFieldRules } from "./calculatedFieldRules";
|
|
|
23
23
|
import { CalculationFunctions, calculationVariableInterface } from "./calculationVariableInterface";
|
|
24
24
|
import { ValidationError, ValidationOptions } from "./schema";
|
|
25
25
|
import { IUserSignature } from "./userSignature";
|
|
26
|
-
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, AdjResponseReviewColumnMapping, OptionSelectTypes, ISelectInputInterface };
|
|
26
|
+
export { ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, IFormElementTemplate, 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, AccountingBasis, ScoaAccountTree, IUserSignature, ValidationOptions, ValidationError, MatDataOptionsInterface, MongoDbPipeLineConfigInterface, InputAPIDataId, FormInputBasicOptionInterface, ScoaInterface, ScoaInnerInput, IAccountSegmentTreeKeys, IWorkflowDocumentPicker, IWorkflowDocumentPickerConfig, workflowStepStatus, IWorkflowDocListCols, JsDataTypes, AdjudicationSteps, IWorkflowAdjudicationInput, WorkflowAdjudicationScoreSheetValue, WorkflowAdjudicationMicroFlowReviewValue, WorkflowAdjudicationResponseElectedSupplierSelectionValue, ScoreSheetItem, AdjResponseReviewColumnMapping, OptionSelectTypes, ISelectInputInterface };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AutocapitalizeOptions, AutocompleteOptions, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
2
2
|
import { AllDocumentFileExtensions, AllImageFileExtensions, InputFileType, UploadTypes } from "./FileUploadInputInterface";
|
|
3
|
-
import {
|
|
3
|
+
import { AccountingBasis } from "./IMscoaAccount";
|
|
4
|
+
import { JsDataTypes, MinInputTypes } from "./MinimumInputRequiredInterface";
|
|
4
5
|
import { AdjudicationSteps } from "./WorkflowAdjudication";
|
|
5
6
|
import { workflowStepStatus } from "./WorkflowDocumentPicker";
|
|
6
7
|
import { CalculationFunctions } from "./calculationVariableInterface";
|
|
7
8
|
export {
|
|
8
9
|
///ENUMS
|
|
9
|
-
ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, workflowStepStatus, AdjudicationSteps, OptionSelectTypes };
|
|
10
|
+
ElementTypes, InputTypes, InputPipeTypes, AutocapitalizeOptions, AutocompleteOptions, InputDataTypes, MinInputTypes, CalculationFunctions, AllDocumentFileExtensions, AllImageFileExtensions, UploadTypes, InputFileType, AccountingBasis, workflowStepStatus, JsDataTypes, AdjudicationSteps, OptionSelectTypes };
|
|
@@ -31,7 +31,15 @@ export declare enum DocumentLitsLabelConfigInterfaceValueType {
|
|
|
31
31
|
string = "string",
|
|
32
32
|
date = "date",
|
|
33
33
|
daysAgo = "daysAgo",
|
|
34
|
-
systemReference = "systemReference"
|
|
34
|
+
systemReference = "systemReference",
|
|
35
|
+
boolean = "boolean"
|
|
36
|
+
}
|
|
37
|
+
export declare enum ReportTypes {
|
|
38
|
+
Avg = "avg",
|
|
39
|
+
Sum = "sum",
|
|
40
|
+
Lowest = "lowest",
|
|
41
|
+
Highest = "highest",
|
|
42
|
+
Category = "category"
|
|
35
43
|
}
|
|
36
44
|
export interface DocumentLitsLabelConfigInterface {
|
|
37
45
|
label: string;
|
|
@@ -39,6 +47,7 @@ export interface DocumentLitsLabelConfigInterface {
|
|
|
39
47
|
isHidden?: boolean;
|
|
40
48
|
stepName: string | null;
|
|
41
49
|
valueType: DocumentLitsLabelConfigInterfaceValueType;
|
|
50
|
+
reportType?: ReportTypes[];
|
|
42
51
|
}
|
|
43
52
|
export interface GridListLabelConfigInterface {
|
|
44
53
|
labelConfiguration: DocumentLitsLabelConfigInterface[];
|
|
@@ -16,4 +16,13 @@ export var DocumentLitsLabelConfigInterfaceValueType;
|
|
|
16
16
|
DocumentLitsLabelConfigInterfaceValueType["date"] = "date";
|
|
17
17
|
DocumentLitsLabelConfigInterfaceValueType["daysAgo"] = "daysAgo";
|
|
18
18
|
DocumentLitsLabelConfigInterfaceValueType["systemReference"] = "systemReference";
|
|
19
|
+
DocumentLitsLabelConfigInterfaceValueType["boolean"] = "boolean";
|
|
19
20
|
})(DocumentLitsLabelConfigInterfaceValueType || (DocumentLitsLabelConfigInterfaceValueType = {}));
|
|
21
|
+
export var ReportTypes;
|
|
22
|
+
(function (ReportTypes) {
|
|
23
|
+
ReportTypes["Avg"] = "avg";
|
|
24
|
+
ReportTypes["Sum"] = "sum";
|
|
25
|
+
ReportTypes["Lowest"] = "lowest";
|
|
26
|
+
ReportTypes["Highest"] = "highest";
|
|
27
|
+
ReportTypes["Category"] = "category";
|
|
28
|
+
})(ReportTypes || (ReportTypes = {}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DocumentLitsLabelConfigInterface, DocumentLitsLabelConfigInterfaceValueType } from "./DocumentSectionConfigurationsInterface";
|
|
2
|
-
export { DocumentLitsLabelConfigInterface, DocumentLitsLabelConfigInterfaceValueType };
|
|
1
|
+
import { DocumentLitsLabelConfigInterface, DocumentLitsLabelConfigInterfaceValueType, ReportTypes } from "./DocumentSectionConfigurationsInterface";
|
|
2
|
+
export { DocumentLitsLabelConfigInterface, DocumentLitsLabelConfigInterfaceValueType, ReportTypes };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DocumentLitsLabelConfigInterfaceValueType } from "./DocumentSectionConfigurationsInterface";
|
|
2
|
-
export { DocumentLitsLabelConfigInterfaceValueType };
|
|
1
|
+
import { DocumentLitsLabelConfigInterfaceValueType, ReportTypes } from "./DocumentSectionConfigurationsInterface";
|
|
2
|
+
export { DocumentLitsLabelConfigInterfaceValueType, ReportTypes };
|
|
@@ -18,6 +18,8 @@ export const calculatedFieldRulesSchema = Joi.object({
|
|
|
18
18
|
formula: Joi.string().required(),
|
|
19
19
|
variables: Joi.array().items(calculationVariableSchema).required(),
|
|
20
20
|
getFormulaFromAFormInput: Joi.boolean().optional(),
|
|
21
|
+
decimalPlaces: Joi.number().optional(),
|
|
22
|
+
roundingMode: Joi.string().valid('FLOOR', 'CEIL', 'ROUND').optional(),
|
|
21
23
|
formControlWithFormula: Joi.string().optional()
|
|
22
24
|
});
|
|
23
25
|
export function validateCalculatedFieldRules(value) {
|
|
@@ -4,7 +4,9 @@ import { DataSources } from '../interfaces/FormBuilder';
|
|
|
4
4
|
// Schema for IWorkflowDocumentPickerConfig
|
|
5
5
|
const workflowDocumentPickerConfigSchema = Joi.object({
|
|
6
6
|
workflowId: Joi.string().required(),
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
primaryIdentifierKey: Joi.array().items(Joi.object()).optional(),
|
|
8
|
+
sampleDocument: Joi.object().optional(), // Optional field for sample document structure
|
|
9
|
+
documentSourceType: Joi.string().valid(...Object.values(DataSources), 'default').required(),
|
|
10
|
+
documentsSource: Joi.alternatives().try(APIDataFetchingConfigurationSchema, MongoDbPipeLineConfigSchema, Joi.object()).optional(),
|
|
9
11
|
});
|
|
10
12
|
export { workflowDocumentPickerConfigSchema };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { FormColumnInputs } from '../interfaces/Form';
|
|
3
3
|
import { ValidationError, ValidationOptions } from '../interfaces/formInput/schema';
|
|
4
|
+
export declare const paginationSelectionConfigSchema: Joi.ObjectSchema<any>;
|
|
4
5
|
export declare const baseFormColumnInputsSchema: Joi.ObjectSchema<any>;
|
|
5
6
|
declare const formColumnInputsSchema: Joi.ObjectSchema<any>;
|
|
6
7
|
declare function validateFormColumnInputs(data: FormColumnInputs): {
|
|
@@ -16,6 +16,15 @@ import { CalculationFunctions } from '../interfaces/formInput/calculationVariabl
|
|
|
16
16
|
import { RichTextEditorType } from '../interfaces/formInput/RichTextEditorInput';
|
|
17
17
|
import { InputViewTypes, OptionSelectTypes } from '../interfaces/formInput/BasicFormInputInterface';
|
|
18
18
|
import { workflowDocumentPickerConfigSchema } from './DocmentPickerInputSchema';
|
|
19
|
+
export const paginationSelectionConfigSchema = Joi.object({
|
|
20
|
+
useLocalPagination: Joi.boolean().optional(),
|
|
21
|
+
primaryIdentifierKey: Joi.array().items(Joi.object()).optional(),
|
|
22
|
+
columns: Joi.array().items(Joi.object({
|
|
23
|
+
key: Joi.string().required(),
|
|
24
|
+
label: Joi.string().required(),
|
|
25
|
+
id: Joi.string().required()
|
|
26
|
+
})).optional()
|
|
27
|
+
});
|
|
19
28
|
export const baseFormColumnInputsSchema = Joi.object({
|
|
20
29
|
[AllFormInputPrimaryKeys.Id]: Joi.string().optional(),
|
|
21
30
|
[AllFormInputPrimaryKeys.SectionId]: Joi.string().optional(),
|
|
@@ -52,6 +61,7 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
52
61
|
[AllFormInputPrimaryKeys.TourContent]: Joi.string().optional(),
|
|
53
62
|
[AllFormInputPrimaryKeys.Spellcheck]: Joi.boolean().optional(),
|
|
54
63
|
[AllFormInputPrimaryKeys.Pipe]: Joi.object({
|
|
64
|
+
_id: Joi.string().optional(),
|
|
55
65
|
pipeType: Joi.string().valid(...Object.values(InputPipeTypes)).required(),
|
|
56
66
|
param: Joi.string().required()
|
|
57
67
|
}).optional(),
|
|
@@ -60,6 +70,7 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
60
70
|
[AllFormInputPrimaryKeys.Accept]: Joi.string().optional(),
|
|
61
71
|
[AllFormInputPrimaryKeys.CalculateListFunctions]: Joi.array().items(Joi.object({
|
|
62
72
|
id: Joi.string().required(),
|
|
73
|
+
inputId: Joi.string().required(),
|
|
63
74
|
func: Joi.string().valid(...Object.values(CalculationFunctions)).required(),
|
|
64
75
|
})).optional(),
|
|
65
76
|
[AllFormInputPrimaryKeys.HandleLabel]: Joi.string().optional(),
|
|
@@ -85,6 +96,9 @@ export const baseFormColumnInputsSchema = Joi.object({
|
|
|
85
96
|
emit: Joi.function().required(),
|
|
86
97
|
canReload: Joi.boolean().required()
|
|
87
98
|
}).optional(),
|
|
99
|
+
[AllFormInputPrimaryKeys.GroupBy]: Joi.array().items(Joi.string()),
|
|
100
|
+
[AllFormInputPrimaryKeys.ConditionalInputConfig]: Joi.any().optional(),
|
|
101
|
+
[AllFormInputPrimaryKeys.PaginationSelectionConfig]: paginationSelectionConfigSchema.optional()
|
|
88
102
|
}).id('formColumnInputs');
|
|
89
103
|
const formColumnInputsSchema = baseFormColumnInputsSchema.append({
|
|
90
104
|
[AllFormInputPrimaryKeys.FormInputs]: Joi.array().items(Joi.link('#formColumnInputs')).optional()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
|
+
import { AccountingBasis } from '../interfaces/formInput/IMscoaAccount';
|
|
2
3
|
export const IncludedSegmentConfigSchema = Joi.object({
|
|
3
4
|
segment: Joi.string(),
|
|
4
5
|
customSegment: Joi.string().optional(),
|
|
@@ -6,12 +7,17 @@ export const IncludedSegmentConfigSchema = Joi.object({
|
|
|
6
7
|
readOnly: Joi.boolean().required(),
|
|
7
8
|
additionalAccounts: Joi.array().items(Joi.string()).optional(),
|
|
8
9
|
singleSelect: Joi.boolean().required(),
|
|
10
|
+
inheritValueFromAccrual: Joi.boolean().optional(),
|
|
11
|
+
vatSelectonActive: Joi.boolean().optional(),
|
|
9
12
|
segmentExtension: Joi.boolean().required(),
|
|
10
13
|
id: Joi.string().required()
|
|
11
14
|
});
|
|
12
15
|
export const MscoaInputConfigSchema = Joi.object({
|
|
13
16
|
inputs: Joi.array().items(Joi.object().pattern(/./, Joi.any())).required(),
|
|
14
17
|
segments: Joi.array().items(IncludedSegmentConfigSchema).min(1).required(),
|
|
18
|
+
cashSegments: Joi.array().items(IncludedSegmentConfigSchema).optional(),
|
|
19
|
+
accountValueLabel: Joi.string().required(),
|
|
20
|
+
accountingBasis: Joi.string().valid(...Object.values(AccountingBasis)).optional(),
|
|
15
21
|
extensionAccountsForSegments: Joi.array().items(Joi.string()).optional(),
|
|
16
22
|
showAllSegments: Joi.boolean().required()
|
|
17
23
|
});
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as Joi from 'joi';
|
|
2
|
+
export const inputsObservedForChangesSchema = Joi.object({
|
|
3
|
+
inputId: Joi.string(),
|
|
4
|
+
variable: Joi.string()
|
|
5
|
+
});
|
|
2
6
|
export const formControlCustomValidatorSchema = Joi.object({
|
|
3
7
|
id: Joi.string().required(),
|
|
4
8
|
message: Joi.string().required(),
|
|
5
9
|
expression: Joi.string().required(),
|
|
6
10
|
canOverride: Joi.boolean().required(),
|
|
7
|
-
inputsObservedForChanges: Joi.array().items(
|
|
11
|
+
inputsObservedForChanges: Joi.array().items(inputsObservedForChangesSchema).required()
|
|
8
12
|
});
|
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.17",
|
|
4
4
|
"description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typings",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"test": "karma start",
|
|
30
30
|
"clean": "rimraf dist",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
31
32
|
"build": "npm run clean && tsc",
|
|
32
33
|
"build:prod": "npm run build --mode production",
|
|
33
34
|
"prepublishOnly": "npm run build",
|
|
@@ -56,5 +57,7 @@
|
|
|
56
57
|
"webpack": "^5.98.0",
|
|
57
58
|
"webpack-dev-server": "^5.2.0"
|
|
58
59
|
},
|
|
59
|
-
"dependencies": {
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"moment": "^2.30.1"
|
|
62
|
+
}
|
|
60
63
|
}
|