ngx-t-forms-types 0.0.19 → 0.0.21
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 +13 -9
- package/dist/index.js +13 -9
- package/dist/interfaces/DeepProperty/DeepProperty.d.ts +25 -0
- package/dist/interfaces/DeepProperty/DeepProperty.js +1 -0
- package/dist/interfaces/DeepProperty/index.d.ts +1 -0
- package/dist/interfaces/DeepProperty/index.js +1 -0
- package/dist/interfaces/Encryption/EncryptedData.d.ts +19 -0
- package/dist/interfaces/Encryption/EncryptedData.js +1 -0
- package/dist/interfaces/Encryption/index.d.ts +1 -0
- package/dist/interfaces/Encryption/index.js +1 -0
- package/dist/interfaces/Form/ArrayFunctions.d.ts +43 -1
- package/dist/interfaces/Form/ArrayFunctions.js +28 -0
- package/dist/interfaces/Form/FormInClassUtils.d.ts +9 -7
- package/dist/interfaces/Form/IFormsInitStateInterface.d.ts +1 -1
- package/dist/interfaces/Form/formInterface.d.ts +8 -3
- package/dist/interfaces/Form/formSubmissionHandleInterface.d.ts +2 -2
- package/dist/interfaces/Form/index.d.ts +13 -12
- package/dist/interfaces/Form/index.js +5 -1
- package/dist/interfaces/FormBuilder/DefaultEelement.d.ts +1 -1
- package/dist/interfaces/FormBuilder/DefaultEelement.js +9 -9
- package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.d.ts +36 -25
- package/dist/interfaces/FormBuilder/DefaultInputConfigInterface.js +1 -1
- package/dist/interfaces/FormBuilder/FormBuilderCallBackFunctions.d.ts +11 -3
- package/dist/interfaces/FormBuilder/elementEditor.d.ts +8 -7
- package/dist/interfaces/FormBuilder/elementEditor.js +1 -0
- package/dist/interfaces/FormBuilder/index.d.ts +11 -10
- package/dist/interfaces/FormBuilder/index.js +6 -6
- package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.d.ts +1 -1
- package/dist/interfaces/FormBuilder/inputConfig/ElementEditConfig.js +14 -13
- package/dist/interfaces/FormBuilder/inputConfig/getInputValueFromElement.js +3 -3
- package/dist/interfaces/FormBuilder/workflowSelectionConfig.d.ts +2 -2
- package/dist/interfaces/FormSlide/accessTree.d.ts +1 -1
- package/dist/interfaces/FormSlide/formSlideInterface.d.ts +1 -1
- package/dist/interfaces/FormSlide/index.d.ts +3 -3
- package/dist/interfaces/FormSlide/index.js +1 -1
- package/dist/interfaces/Import/ImportProgress.d.ts +29 -0
- package/dist/interfaces/Import/ImportProgress.js +1 -0
- package/dist/interfaces/Import/ImportRowState.d.ts +66 -0
- package/dist/interfaces/Import/ImportRowState.js +1 -0
- package/dist/interfaces/Import/index.d.ts +2 -0
- package/dist/interfaces/Import/index.js +1 -0
- package/dist/interfaces/Tour/IFormTour.d.ts +14 -0
- package/dist/interfaces/Tour/IFormTour.js +1 -0
- package/dist/interfaces/Tour/index.d.ts +1 -0
- package/dist/interfaces/Tour/index.js +1 -0
- package/dist/interfaces/Tower/ITowerFormSteps.d.ts +3 -3
- package/dist/interfaces/Tower/ITowerFormSteps.js +1 -1
- package/dist/interfaces/Tower/index.d.ts +1 -1
- package/dist/interfaces/environment/IStoreFunctions.d.ts +8 -7
- package/dist/interfaces/environment/IStoreFunctions.js +1 -1
- package/dist/interfaces/environment/environment.d.ts +1 -1
- package/dist/interfaces/environment/index.d.ts +2 -2
- package/dist/interfaces/formInput/APIDataFetchingConfigurationInterface.d.ts +3 -3
- package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +9 -9
- package/dist/interfaces/formInput/DateRangePickerInput.d.ts +1 -1
- package/dist/interfaces/formInput/FileUploadInputInterface.d.ts +7 -2
- package/dist/interfaces/formInput/FormControlCustomValidatorsInterface.d.ts +38 -4
- package/dist/interfaces/formInput/FormValidationOverride.d.ts +48 -0
- package/dist/interfaces/formInput/FormValidationOverride.js +1 -0
- package/dist/interfaces/formInput/IMscoaAccount.d.ts +25 -9
- package/dist/interfaces/formInput/ISelectInputInterface.d.ts +3 -3
- package/dist/interfaces/formInput/ISelectInputInterface.js +1 -1
- package/dist/interfaces/formInput/MatDataOptionsInterface.d.ts +2 -2
- package/dist/interfaces/formInput/MatrixInputInterface.d.ts +2 -2
- package/dist/interfaces/formInput/MinimumInputRequiredInterface.d.ts +1 -1
- package/dist/interfaces/formInput/MscoaInput.d.ts +2 -2
- package/dist/interfaces/formInput/MscoaInput.js +1 -1
- package/dist/interfaces/formInput/MultipleInterface.d.ts +2 -2
- package/dist/interfaces/formInput/RichTextEditorInput.d.ts +16 -2
- package/dist/interfaces/formInput/RichTextEditorInput.js +11 -1
- package/dist/interfaces/formInput/TableConfigurationsInterface.d.ts +1 -1
- package/dist/interfaces/formInput/TextAreaInput.d.ts +1 -1
- package/dist/interfaces/formInput/ToggleInputInterface.d.ts +1 -1
- package/dist/interfaces/formInput/WorkflowAdjudication.d.ts +16 -4
- package/dist/interfaces/formInput/WorkflowDocumentPicker.d.ts +4 -4
- package/dist/interfaces/formInput/WorkflowDocumentPicker.js +1 -1
- package/dist/interfaces/formInput/calculatedFieldRules.d.ts +1 -1
- package/dist/interfaces/formInput/calculationVariableInterface.d.ts +3 -1
- package/dist/interfaces/formInput/calculationVariableInterface.js +2 -0
- package/dist/interfaces/formInput/index.d.ts +28 -26
- package/dist/interfaces/formInput/index.js +15 -9
- package/dist/interfaces/formInput/schema.d.ts +11 -2
- package/dist/interfaces/pipeline-builder/index.d.ts +1 -1
- package/dist/interfaces/pipeline-builder/index.js +1 -1
- package/dist/interfaces/upgradeFunctions/interfaces/init-form.d.ts +14 -1
- package/dist/interfaces/workflow/WorkflowFunctionTypes.d.ts +26 -0
- package/dist/interfaces/workflow/WorkflowFunctionTypes.js +27 -0
- package/dist/interfaces/workflow/index.d.ts +3 -2
- package/dist/interfaces/workflow/index.js +3 -2
- package/dist/schemas/CalculatedFieldRulesSchema.d.ts +1 -1
- package/dist/schemas/CalculatedFieldRulesSchema.js +1 -1
- package/dist/schemas/DocmentPickerInputSchema.js +2 -2
- package/dist/schemas/FormInputSchema.d.ts +2 -2
- package/dist/schemas/FormInputSchema.js +18 -18
- package/dist/schemas/FormSchema.d.ts +2 -2
- package/dist/schemas/FormSchema.js +3 -3
- package/dist/schemas/MatOptionsSchema.js +2 -2
- package/dist/schemas/MscoaConfigSchema.js +1 -1
- package/dist/schemas/customValidationSchema.d.ts +1 -1
- package/dist/schemas/customValidationSchema.js +6 -2
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.js +3 -3
- package/dist/schemas/tests/CustomValidationSchema.spec.d.ts +1 -0
- package/dist/schemas/tests/CustomValidationSchema.spec.js +92 -0
- package/dist/schemas/tests/FormInputValidator.spec.js +3 -8
- package/package.json +83 -63
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DefaultInputConfig, defaultInputs } from "./DefaultEelement";
|
|
2
|
-
import { getElementEditorConfig } from "./inputConfig/ElementEditConfig";
|
|
3
|
-
import { AllFormInputPrimaryKeys, FormInputKeys, SpecialElementKeys } from "./FormInputKeys";
|
|
4
|
-
import { BlurHandleTypes, ElementEditorTypes } from "./elementEditor";
|
|
5
|
-
import { DataSources } from "../formInput/APIDataFetchingConfigurationInterface";
|
|
6
|
-
export { BlurHandleTypes, FormInputKeys, ElementEditorTypes, SpecialElementKeys, AllFormInputPrimaryKeys, DefaultInputConfig, defaultInputs, getElementEditorConfig, DataSources };
|
|
1
|
+
import { DefaultInputConfig, defaultInputs } from "./DefaultEelement.js";
|
|
2
|
+
import { getElementEditorConfig } from "./inputConfig/ElementEditConfig.js";
|
|
3
|
+
import { AllFormInputPrimaryKeys, FormInputKeys, SpecialElementKeys } from "./FormInputKeys.js";
|
|
4
|
+
import { BlurHandleTypes, ElementEditorTypes } from "./elementEditor.js";
|
|
5
|
+
import { DataSources } from "../formInput/APIDataFetchingConfigurationInterface.js";
|
|
6
|
+
export { BlurHandleTypes, FormInputKeys, ElementEditorTypes, SpecialElementKeys, AllFormInputPrimaryKeys, DefaultInputConfig, defaultInputs, getElementEditorConfig, DataSources, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ElementEditorConfigInterface } from "../elementEditor";
|
|
1
|
+
import { ElementEditorConfigInterface } from "../elementEditor.js";
|
|
2
2
|
export declare var ElementConfig: ElementEditorConfigInterface;
|
|
3
3
|
export declare const getElementEditorConfig: ElementEditorConfigInterface;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { CurrenciesList } from "../../../Configs/currencies";
|
|
2
|
-
import { DatePipeOptions } from "../../../Configs/datePipes";
|
|
3
|
-
import { AdjudicationSteps, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from "../../formInput";
|
|
4
|
-
import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterface";
|
|
5
|
-
import { OptionSelectTypes } from "../../formInput/BasicFormInputInterface";
|
|
6
|
-
import { InputFileType } from "../../formInput/FileUploadInputInterface";
|
|
7
|
-
import { AccountingBasis } from "../../formInput/IMscoaAccount";
|
|
8
|
-
import { MultipleInputAvailableOperations } from "../../formInput/MultipleInterface";
|
|
9
|
-
import { RichTextEditorType } from "../../formInput/RichTextEditorInput";
|
|
10
|
-
import { LabelPosition } from "../../formInput/ToggleInputInterface";
|
|
11
|
-
import { AllFormInputPrimaryKeys, SpecialElementKeys } from "../FormInputKeys";
|
|
12
|
-
import { BlurHandleTypes, ElementEditorTypes } from "../elementEditor";
|
|
1
|
+
import { CurrenciesList } from "../../../Configs/currencies.js";
|
|
2
|
+
import { DatePipeOptions } from "../../../Configs/datePipes.js";
|
|
3
|
+
import { AdjudicationSteps, ElementTypes, InputDataTypes, InputPipeTypes, InputTypes } from "../../formInput/index.js";
|
|
4
|
+
import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterface.js";
|
|
5
|
+
import { OptionSelectTypes } from "../../formInput/BasicFormInputInterface.js";
|
|
6
|
+
import { InputFileType } from "../../formInput/FileUploadInputInterface.js";
|
|
7
|
+
import { AccountingBasis } from "../../formInput/IMscoaAccount.js";
|
|
8
|
+
import { MultipleInputAvailableOperations } from "../../formInput/MultipleInterface.js";
|
|
9
|
+
import { RichTextEditorType } from "../../formInput/RichTextEditorInput.js";
|
|
10
|
+
import { LabelPosition } from "../../formInput/ToggleInputInterface.js";
|
|
11
|
+
import { AllFormInputPrimaryKeys, SpecialElementKeys } from "../FormInputKeys.js";
|
|
12
|
+
import { BlurHandleTypes, ElementEditorTypes } from "../elementEditor.js";
|
|
13
13
|
export var ElementConfig = {
|
|
14
14
|
editorSections: [
|
|
15
15
|
{
|
|
@@ -356,6 +356,7 @@ export var ElementConfig = {
|
|
|
356
356
|
deepBind: ['mscoaConfig', 'segments'],
|
|
357
357
|
editType: ElementEditorTypes.ConfigMscoaSegments,
|
|
358
358
|
label: 'Configure MScoa Accrual segments',
|
|
359
|
+
defaultValue: false,
|
|
359
360
|
fetchOptions: ['mscoaConfig', 'showAllSegments'],
|
|
360
361
|
hint: "Configure SCOA segments to be used in the input",
|
|
361
362
|
id: "ba1a5b79-b071-44a6-b39a-bf1c2fafcda5"
|
|
@@ -449,7 +450,7 @@ export var ElementConfig = {
|
|
|
449
450
|
value: 'default'
|
|
450
451
|
},
|
|
451
452
|
{ label: 'Postman API', value: DataSources.Api },
|
|
452
|
-
{ label: 'Data Pipeline', value: DataSources.MongoDb },
|
|
453
|
+
// { label: 'Data Pipeline', value: DataSources.MongoDb },
|
|
453
454
|
],
|
|
454
455
|
id: "f04cc297-9b22-403a-afe4-4fb2e84fa503"
|
|
455
456
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElementTypes, InputDataTypes, MinInputTypes } from "../../formInput";
|
|
2
|
-
import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterface";
|
|
3
|
-
import { ElementEditorTypes } from "../elementEditor";
|
|
1
|
+
import { ElementTypes, InputDataTypes, MinInputTypes } from "../../formInput/index.js";
|
|
2
|
+
import { DataSources } from "../../formInput/APIDataFetchingConfigurationInterface.js";
|
|
3
|
+
import { ElementEditorTypes } from "../elementEditor.js";
|
|
4
4
|
function elementValue(element) {
|
|
5
5
|
const editType = element.editType;
|
|
6
6
|
switch (editType) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InputDataTypes, InputPipeTypes } from "../formInput";
|
|
2
|
-
import { DocumentLitsLabelConfigInterfaceValueType } from "../workflow";
|
|
1
|
+
import { InputDataTypes, InputPipeTypes } from "../formInput/index.js";
|
|
2
|
+
import { DocumentLitsLabelConfigInterfaceValueType } from "../workflow/index.js";
|
|
3
3
|
export interface IWorkflowOption {
|
|
4
4
|
name: string;
|
|
5
5
|
createdAt: Date;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FlatNode } from "./accessTree";
|
|
2
|
-
import { ControlValidation, FormValidationReasons } from "./controlValidation";
|
|
3
|
-
import { FormSlideExtended, FormSlideInterface, FormSubmissionStatus } from "./formSlideInterface";
|
|
1
|
+
import { FlatNode } from "./accessTree.js";
|
|
2
|
+
import { ControlValidation, FormValidationReasons } from "./controlValidation.js";
|
|
3
|
+
import { FormSlideExtended, FormSlideInterface, FormSubmissionStatus } from "./formSlideInterface.js";
|
|
4
4
|
export { ControlValidation, FormValidationReasons, FormSlideInterface, FormSlideExtended, FormSubmissionStatus, FlatNode };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormSubmissionStatus } from "./formSlideInterface";
|
|
1
|
+
import { FormSubmissionStatus } from "./formSlideInterface.js";
|
|
2
2
|
export { FormSubmissionStatus };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ImportRowState } from './ImportRowState.js';
|
|
2
|
+
/**
|
|
3
|
+
* Aggregate counters plus the underlying row array. Returned by the import
|
|
4
|
+
* controller's `progress$` stream and `currentProgress` snapshot.
|
|
5
|
+
*
|
|
6
|
+
* Upstreamed from `ngx-t-forms` per DECISIONS.md D-016.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export interface ImportProgress {
|
|
11
|
+
/** Total row count handed to `runImport`. */
|
|
12
|
+
total: number;
|
|
13
|
+
/** Rows still queued (status `pending`). */
|
|
14
|
+
pending: number;
|
|
15
|
+
/** Rows currently processing. */
|
|
16
|
+
processing: number;
|
|
17
|
+
/** `valid` + `overridable` + `invalid` — i.e. rows that fully settled (regardless of validity). */
|
|
18
|
+
complete: number;
|
|
19
|
+
/** Rows that settled with no errors. */
|
|
20
|
+
valid: number;
|
|
21
|
+
/** Rows that settled with only overridable (motivatable) errors — no blocking errors. */
|
|
22
|
+
overridable: number;
|
|
23
|
+
/** Rows that settled with at least one blocking error. */
|
|
24
|
+
invalid: number;
|
|
25
|
+
/** Rows that threw before settling. */
|
|
26
|
+
error: number;
|
|
27
|
+
/** Underlying array — useful for rendering per-row UI. */
|
|
28
|
+
rows: ImportRowState[];
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle states for a single import row driven by the import controller in
|
|
3
|
+
* `ngx-t-forms`.
|
|
4
|
+
*
|
|
5
|
+
* - `pending` — queued, tower not yet created.
|
|
6
|
+
* - `processing` — tower is initialising / preprocessing / awaiting settle.
|
|
7
|
+
* - `valid` — settled with no validator errors.
|
|
8
|
+
* - `overridable` — settled with NO blocking errors, but at least one
|
|
9
|
+
* overridable (`canOverride === true`) custom-validator error remains. The
|
|
10
|
+
* row is not strictly valid, yet it could be submitted once each overridable
|
|
11
|
+
* validation is motivated (see {@link ImportRowState.overridableErrors}).
|
|
12
|
+
* - `invalid` — settled with at least one blocking validator error or
|
|
13
|
+
* pre-process error (a row carrying both blocking and overridable errors is
|
|
14
|
+
* `invalid`, not `overridable`).
|
|
15
|
+
* - `error` — `_processRow` threw before settle (tower init failure, etc.).
|
|
16
|
+
*
|
|
17
|
+
* Upstreamed from `ngx-t-forms` per DECISIONS.md D-016.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export type ImportRowStatus = 'pending' | 'processing' | 'valid' | 'overridable' | 'invalid' | 'error';
|
|
22
|
+
/**
|
|
23
|
+
* Per-row state recorded throughout an import session.
|
|
24
|
+
*
|
|
25
|
+
* Upstreamed from `ngx-t-forms` per DECISIONS.md D-016.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export interface ImportRowState {
|
|
30
|
+
/** Position in the original `rows` array passed to `runImport`. */
|
|
31
|
+
rowIndex: number;
|
|
32
|
+
/** The user-supplied row exactly as it arrived (no preprocessing). */
|
|
33
|
+
originalData: Record<string, unknown>;
|
|
34
|
+
/** Current lifecycle state — see {@link ImportRowStatus}. */
|
|
35
|
+
status: ImportRowStatus;
|
|
36
|
+
/**
|
|
37
|
+
* Flat formControlName-keyed values after the tower has settled
|
|
38
|
+
* (output of `tower.getFormValueNames()`). Available once `status` is
|
|
39
|
+
* `valid` or `invalid`.
|
|
40
|
+
*/
|
|
41
|
+
settledValue?: Record<string, unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* `true` when no validation/column errors were collected at all (status
|
|
44
|
+
* `valid`). An `overridable` row reports `false` here — it is bypassable,
|
|
45
|
+
* not strictly valid.
|
|
46
|
+
*/
|
|
47
|
+
isValid?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* inputId → array of overridable (`canOverride === true`) custom-validator
|
|
50
|
+
* messages that remain on the settled row. Present (non-empty) when
|
|
51
|
+
* `status === 'overridable'`; consumers use it to render a motivation
|
|
52
|
+
* prompt per failing input. Blocking errors are NOT included here — see
|
|
53
|
+
* {@link ImportRowState.validationErrors}.
|
|
54
|
+
*/
|
|
55
|
+
overridableErrors?: Record<string, string[]>;
|
|
56
|
+
/** inputId → array of Angular validator error keys (e.g. `['required', 'minlength']`). */
|
|
57
|
+
validationErrors?: Record<string, string[]>;
|
|
58
|
+
/**
|
|
59
|
+
* formControlName → error keys concatenated with '.' (e.g. `"required.minlength"`).
|
|
60
|
+
* Includes pre-processing errors (e.g. SCOA lookup failures, MultipleInput
|
|
61
|
+
* sub-row failures) so consumers do not have to merge two sources.
|
|
62
|
+
*/
|
|
63
|
+
colErrors?: Record<string, string>;
|
|
64
|
+
/** Free-form message attached when `status === 'error'`. */
|
|
65
|
+
errorMessage?: string;
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IStepOption } from 'ngx-ui-tour-md-menu';
|
|
2
|
+
/**
|
|
3
|
+
* Tour step descriptor used by `ngx-t-forms` when binding form-section guided
|
|
4
|
+
* tours through `ngx-ui-tour-md-menu`. Extends the upstream `IStepOption`
|
|
5
|
+
* contract with the originating `sectionId` so the tower can correlate tour
|
|
6
|
+
* steps back to their owning section.
|
|
7
|
+
*
|
|
8
|
+
* Upstreamed from `ngx-t-forms` per DECISIONS.md D-016.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface IFormTour extends IStepOption {
|
|
13
|
+
sectionId: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IFormTour } from './IFormTour.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FormGroup } from '@angular/forms';
|
|
2
|
-
import { FormColumnInputs } from '../formInput/BasicFormInputInterface';
|
|
2
|
+
import { FormColumnInputs } from '../formInput/BasicFormInputInterface.js';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { FormListSection, FormStateErrors, IFormsInitStateInterface, LocalFormStateSelectorInterface } from '../Form/IFormsInitStateInterface';
|
|
5
|
-
import { DatabaseFormInterface } from '../Form/formInterface';
|
|
4
|
+
import { FormListSection, FormStateErrors, IFormsInitStateInterface, LocalFormStateSelectorInterface } from '../Form/IFormsInitStateInterface.js';
|
|
5
|
+
import { DatabaseFormInterface } from '../Form/formInterface.js';
|
|
6
6
|
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
7
7
|
export interface ITowerStepColumn extends FormColumnInputs {
|
|
8
8
|
canReload: IInputCanReload;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { FormStateErrors } from '../Form/IFormsInitStateInterface';
|
|
1
|
+
import { FormStateErrors } from '../Form/IFormsInitStateInterface.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormsStoreSelectorsInterface, ITowerFormSteps, ITowerStepColumn } from "./ITowerFormSteps";
|
|
1
|
+
import { FormsStoreSelectorsInterface, ITowerFormSteps, ITowerStepColumn } from "./ITowerFormSteps.js";
|
|
2
2
|
export { ITowerFormSteps, FormsStoreSelectorsInterface, ITowerStepColumn };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { DatabaseFormInterface, FileUploadFn, FormColumnInputs, FormInterface } from "../Form";
|
|
3
|
-
import { IWorkflowOption } from "../FormBuilder";
|
|
4
|
-
import { AccountingBasis, AdjResponseReviewColumnMapping, IGetTreeResponse, ScoaSegmentValue, WorkflowAdjudicationScoreSheetValue } from "../formInput";
|
|
5
|
-
import { FormListSection } from "../Form/IFormsInitStateInterface";
|
|
6
|
-
import { IUserSignature } from "../formInput/userSignature";
|
|
2
|
+
import { DatabaseFormInterface, FileUploadFn, FormColumnInputs, FormInterface } from "../Form/index.js";
|
|
3
|
+
import { IWorkflowOption } from "../FormBuilder/index.js";
|
|
4
|
+
import { AccountingBasis, AdjResponseReviewColumnMapping, IGetTreeResponse, ScoaSegmentValue, WorkflowAdjudicationScoreSheetValue } from "../formInput/index.js";
|
|
5
|
+
import { FormListSection } from "../Form/IFormsInitStateInterface.js";
|
|
6
|
+
import { IUserSignature } from "../formInput/userSignature.js";
|
|
7
7
|
import { PointGroup } from "signature_pad";
|
|
8
|
-
import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig";
|
|
9
|
-
import { IFinancialCycles } from "./environment";
|
|
8
|
+
import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig.js";
|
|
9
|
+
import { IFinancialCycles } from "./environment.js";
|
|
10
10
|
export interface DialogConfig {
|
|
11
11
|
title: string;
|
|
12
12
|
message: string;
|
|
@@ -54,6 +54,7 @@ export interface IStoreFunctions {
|
|
|
54
54
|
getSelectedDocument: (documentId: string) => Observable<any>;
|
|
55
55
|
getScoaTree: () => Observable<IGetTreeResponse>;
|
|
56
56
|
getSCOAAccount(SCOAAccount: string): Observable<any>;
|
|
57
|
+
getSCOAAccountByKey(SCOAAccountKey: string, keyValue: string | number): Observable<any>;
|
|
57
58
|
validateMscoaSelection(value: {
|
|
58
59
|
[AccountingBasis.Accrual]?: ScoaSegmentValue;
|
|
59
60
|
[AccountingBasis.Cash]?: ScoaSegmentValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { AccountingBasis } from "../formInput";
|
|
1
|
+
import { AccountingBasis } from "../formInput/index.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionButton, BasisValidationError, DialogConfig, IStoreFunctions, MscoaValuetValidationErrors } from "./IStoreFunctions";
|
|
2
|
-
import { IFinancialCycles } from "./environment";
|
|
1
|
+
import { ActionButton, BasisValidationError, DialogConfig, IStoreFunctions, MscoaValuetValidationErrors } from "./IStoreFunctions.js";
|
|
2
|
+
import { IFinancialCycles } from "./environment.js";
|
|
3
3
|
export { IStoreFunctions, ActionButton, DialogConfig, IFinancialCycles, MscoaValuetValidationErrors, BasisValidationError, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpContext, HttpHeaders, HttpParams } from "@angular/common/http";
|
|
2
|
-
import { TreeNode } from "../FormSlide/accessTree";
|
|
3
|
-
import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface";
|
|
4
|
-
import { MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface";
|
|
2
|
+
import { TreeNode } from "../FormSlide/accessTree.js";
|
|
3
|
+
import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface.js";
|
|
4
|
+
import { MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface.js";
|
|
5
5
|
export declare enum DataSources {
|
|
6
6
|
Local = "local",
|
|
7
7
|
Api = "api",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { MatFormFieldAppearance } from "@angular/material/form-field";
|
|
2
2
|
import { IFileUploadInput, IMatrixInput, IScoaInput, IMultiple, IToggleInput, IWorkflowAdjudicationInput } from ".";
|
|
3
|
-
import { ConditionalInputRule } from "./ConditionalInputRule";
|
|
4
|
-
import { IDateRangePickerInput } from "./DateRangePickerInput";
|
|
5
|
-
import { FormControlCustomValidatorsInterface } from "./FormControlCustomValidatorsInterface";
|
|
6
|
-
import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
|
|
7
|
-
import { ITextareaProperties } from "./TextAreaInput";
|
|
8
|
-
import { CalculatedFieldRules } from "./calculatedFieldRules";
|
|
9
|
-
import { IRichTextEditor } from "./RichTextEditorInput";
|
|
10
|
-
import { IWorkflowDocumentPicker } from "./WorkflowDocumentPicker";
|
|
11
|
-
import { IPaginatedSelectionTableInputInterface, ISelectInputInterface } from "./ISelectInputInterface";
|
|
3
|
+
import { ConditionalInputRule } from "./ConditionalInputRule.js";
|
|
4
|
+
import { IDateRangePickerInput } from "./DateRangePickerInput.js";
|
|
5
|
+
import { FormControlCustomValidatorsInterface } from "./FormControlCustomValidatorsInterface.js";
|
|
6
|
+
import { MatDataOptionsInterface } from "./MatDataOptionsInterface.js";
|
|
7
|
+
import { ITextareaProperties } from "./TextAreaInput.js";
|
|
8
|
+
import { CalculatedFieldRules } from "./calculatedFieldRules.js";
|
|
9
|
+
import { IRichTextEditor } from "./RichTextEditorInput.js";
|
|
10
|
+
import { IWorkflowDocumentPicker } from "./WorkflowDocumentPicker.js";
|
|
11
|
+
import { IPaginatedSelectionTableInputInterface, ISelectInputInterface } from "./ISelectInputInterface.js";
|
|
12
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",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBasicFormInput } from "./BasicFormInputInterface";
|
|
1
|
+
import { IBasicFormInput } from "./BasicFormInputInterface.js";
|
|
2
2
|
export declare enum UploadTypes {
|
|
3
3
|
file = ".pdf,.doc,.docx,.xml,.txt,.rtf,.csv,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
4
4
|
image = "image/png,image/jpeg,image/gif,image/bmp,image/tiff,image/svg+xml,image/webp"
|
|
@@ -37,7 +37,12 @@ export declare enum InputFileType {
|
|
|
37
37
|
}
|
|
38
38
|
export interface FileUploadInputValueInterface {
|
|
39
39
|
fileName: string;
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Either an `InputFileType` enum member or a raw MIME type string
|
|
42
|
+
* (e.g. `'image/png'`). The enum was never enforced on the value side; some
|
|
43
|
+
* factories (e.g. base64-derived uploads) carry the MIME directly.
|
|
44
|
+
*/
|
|
45
|
+
type: InputFileType | string | undefined;
|
|
41
46
|
base64: string | ArrayBuffer | null;
|
|
42
47
|
blob: Blob;
|
|
43
48
|
fileExtension: string;
|
|
@@ -1,10 +1,44 @@
|
|
|
1
|
+
import { CalculationFunctions } from "./calculationVariableInterface.js";
|
|
2
|
+
/**
|
|
3
|
+
* A single dependency the validator expression observes.
|
|
4
|
+
*
|
|
5
|
+
* `inputId` is the input whose value is read; `variable` is the name the
|
|
6
|
+
* expression references it by.
|
|
7
|
+
*
|
|
8
|
+
* ### Multiple-input (list) bindings
|
|
9
|
+
* When the bound input lives inside a repeatable "multiple input" group, the
|
|
10
|
+
* value is an array of rows rather than a scalar:
|
|
11
|
+
* - `parentInputId` — the id of the multiple-input container whose value is the
|
|
12
|
+
* row array. Present for any binding to a list sub-item.
|
|
13
|
+
* - `function` — the aggregate applied to reduce the list column to a single
|
|
14
|
+
* value (sum/avg/min/max/count). Required when the validator lives on a
|
|
15
|
+
* primary-form input and references a list sub-item (the array must be
|
|
16
|
+
* reduced to a scalar). Omitted when the validator lives on a sub-item of the
|
|
17
|
+
* *same* group, where peers resolve to the current row's value directly.
|
|
18
|
+
*/
|
|
19
|
+
export interface InputObservedForChange {
|
|
20
|
+
inputId: string;
|
|
21
|
+
variable: string;
|
|
22
|
+
/** Multiple-input container id whose value is the row array (list bindings only). */
|
|
23
|
+
parentInputId?: string;
|
|
24
|
+
/** Aggregate applied to reduce a list column to a single value. */
|
|
25
|
+
function?: CalculationFunctions;
|
|
26
|
+
}
|
|
1
27
|
export interface FormControlCustomValidatorsInterface {
|
|
2
28
|
id: string;
|
|
3
29
|
message: string;
|
|
4
30
|
expression: string;
|
|
5
31
|
canOverride: boolean;
|
|
6
|
-
inputsObservedForChanges:
|
|
7
|
-
inputId: string;
|
|
8
|
-
variable: string;
|
|
9
|
-
}[];
|
|
32
|
+
inputsObservedForChanges: InputObservedForChange[];
|
|
10
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Draft variant of {@link FormControlCustomValidatorsInterface} used while a
|
|
36
|
+
* new validator is being authored in the UI. The `id` is assigned on save
|
|
37
|
+
* (e.g. via `uuidv4()`), so the in-flight draft is intentionally id-less.
|
|
38
|
+
*
|
|
39
|
+
* Use the union `DraftFormControlCustomValidator | FormControlCustomValidatorsInterface`
|
|
40
|
+
* in builder/editor APIs that accept either an unsaved draft or a persisted record.
|
|
41
|
+
*/
|
|
42
|
+
export type DraftFormControlCustomValidator = Omit<FormControlCustomValidatorsInterface, 'id'> & {
|
|
43
|
+
id?: string;
|
|
44
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FileData } from "../Form/FileUploadFn.js";
|
|
2
|
+
/**
|
|
3
|
+
* A single bypassed (overridden) validation captured at submission time.
|
|
4
|
+
*
|
|
5
|
+
* A custom validator declared with {@link FormControlCustomValidatorsInterface.canOverride}
|
|
6
|
+
* `=== true` does NOT block submission outright: when every blocking
|
|
7
|
+
* (`canOverride === false`) validation on the form is resolved, the user may
|
|
8
|
+
* submit by motivating each still-failing overridable validation. Each such
|
|
9
|
+
* motivation is recorded as one entry of this shape and carried on the
|
|
10
|
+
* submission payload (under the `_validationOverrides` key) so the bypass is
|
|
11
|
+
* durable and auditable.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* {
|
|
15
|
+
* formControlName: 'invoiceTotal',
|
|
16
|
+
* validationMessage: 'Total exceeds the approved budget',
|
|
17
|
+
* comment: 'Approved verbally by the finance lead — see attached email.',
|
|
18
|
+
* attachment: { base64: '…', fileName: 'approval.pdf', type: 'application/pdf', id: '…', fileExtension: 'pdf' },
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface IFormValidationOverride {
|
|
24
|
+
/**
|
|
25
|
+
* `formControlName` of the input whose overridable validation was bypassed.
|
|
26
|
+
* Mirrors {@link FormColumnInputs.formControlName} so consumers can map the
|
|
27
|
+
* override back to a field.
|
|
28
|
+
*/
|
|
29
|
+
formControlName: string;
|
|
30
|
+
/**
|
|
31
|
+
* The overridden validator's human-readable message, taken verbatim from
|
|
32
|
+
* {@link FormControlCustomValidatorsInterface.message}. The captured
|
|
33
|
+
* motivation must correspond to this specific validation.
|
|
34
|
+
*/
|
|
35
|
+
validationMessage: string;
|
|
36
|
+
/**
|
|
37
|
+
* User-supplied motivation for bypassing the validation. A non-empty,
|
|
38
|
+
* non-whitespace value is REQUIRED for the override to count — the form
|
|
39
|
+
* cannot be submitted while any overridable validation lacks a comment.
|
|
40
|
+
*/
|
|
41
|
+
comment: string;
|
|
42
|
+
/**
|
|
43
|
+
* Optional supporting file backing the motivation. Carried as
|
|
44
|
+
* {@link FileData} (base64) so the submission upload pass resolves it to a
|
|
45
|
+
* `{ url }` exactly like a file-upload input value.
|
|
46
|
+
*/
|
|
47
|
+
attachment?: FileData;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MscoaValuetValidationErrors } from "../environment/IStoreFunctions";
|
|
2
|
-
import { IBasicFormInput } from "./BasicFormInputInterface";
|
|
3
|
-
import { ScoaInnerInput } from "./MscoaInput";
|
|
1
|
+
import { MscoaValuetValidationErrors } from "../environment/IStoreFunctions.js";
|
|
2
|
+
import { IBasicFormInput } from "./BasicFormInputInterface.js";
|
|
3
|
+
import { ScoaInnerInput } from "./MscoaInput.js";
|
|
4
4
|
export interface IVersion {
|
|
5
5
|
versionNumber: number;
|
|
6
6
|
description: string;
|
|
@@ -63,19 +63,35 @@ export interface ScoaInterface extends IScoaInputConfig {
|
|
|
63
63
|
validationErrors: MscoaValuetValidationErrors;
|
|
64
64
|
getTreeResponse: IGetTreeResponse | null;
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Per-segment value bag stored under `ScoaSegmentValue[segmentKey]` and
|
|
68
|
+
* surfaced on row models (e.g. `ITableScoaSelectionRow.segmentValue`).
|
|
69
|
+
*
|
|
70
|
+
* Holds the debit/credit account pair plus optional metadata flags such as
|
|
71
|
+
* `vatApplicableTo`. UI consumers read the bag by column key
|
|
72
|
+
* (`'debit' | 'credit'`); selectors also stamp dynamic counter-account keys
|
|
73
|
+
* (e.g. `${name}Credit` / `${name}Debit`) onto the row at runtime.
|
|
74
|
+
*/
|
|
75
|
+
export interface ScoaSegmentValueBag {
|
|
76
|
+
debit?: IScoaAccount | undefined;
|
|
77
|
+
credit?: IScoaAccount | undefined;
|
|
78
|
+
vatApplicableTo?: string;
|
|
79
|
+
}
|
|
66
80
|
export interface ScoaSegmentValue {
|
|
67
|
-
[key: string]:
|
|
68
|
-
debit: IScoaAccount | undefined;
|
|
69
|
-
credit: IScoaAccount | undefined;
|
|
70
|
-
vatApplicableTo?: string;
|
|
71
|
-
};
|
|
81
|
+
[key: string]: ScoaSegmentValueBag;
|
|
72
82
|
}
|
|
73
83
|
export type ScoaAccountTree = {
|
|
74
84
|
[key: string]: ScoaAccountTree;
|
|
75
85
|
};
|
|
76
86
|
export interface ITableScoaSelectionRow extends IIncludedSegmentConfig {
|
|
77
87
|
segmentTree: ScoaAccountTree;
|
|
78
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Runtime shape: a per-column bag of debit/credit accounts with optional
|
|
90
|
+
* VAT metadata. Historically declared as `IScoaAccount | undefined`, which
|
|
91
|
+
* never matched the value the selector pipeline writes; widened to a union
|
|
92
|
+
* so legacy readers keep narrowing while new callers can read the bag.
|
|
93
|
+
*/
|
|
94
|
+
segmentValue: ScoaSegmentValueBag | undefined;
|
|
79
95
|
debit: string;
|
|
80
96
|
credit: string;
|
|
81
97
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys";
|
|
2
|
-
import { TreeNode } from "../FormSlide/accessTree";
|
|
3
|
-
import { IBasicFormInput, OptionSelectTypes } from "./BasicFormInputInterface";
|
|
1
|
+
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys.js";
|
|
2
|
+
import { TreeNode } from "../FormSlide/accessTree.js";
|
|
3
|
+
import { IBasicFormInput, OptionSelectTypes } from "./BasicFormInputInterface.js";
|
|
4
4
|
export interface ISelectInputInterface extends IBasicFormInput {
|
|
5
5
|
[AllFormInputPrimaryKeys.OptionSelectType]: OptionSelectTypes;
|
|
6
6
|
[AllFormInputPrimaryKeys.AllowMultipleSelection]: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys";
|
|
1
|
+
import { AllFormInputPrimaryKeys } from "../FormBuilder/FormInputKeys.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { APIDataFetchingConfigurationInterface, MongoDbPipeLineConfigInterface } from "./APIDataFetchingConfigurationInterface";
|
|
2
|
-
import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface";
|
|
1
|
+
import { APIDataFetchingConfigurationInterface, MongoDbPipeLineConfigInterface } from "./APIDataFetchingConfigurationInterface.js";
|
|
2
|
+
import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface.js";
|
|
3
3
|
export interface MatDataOptionsInterface {
|
|
4
4
|
optionType?: 'user';
|
|
5
5
|
options?: Array<FormInputBasicOptionInterface | DynamicObjectInterface>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IBasicFormInput } from './BasicFormInputInterface';
|
|
2
|
-
import { TableConfigurationsInterface } from './TableConfigurationsInterface';
|
|
1
|
+
import { IBasicFormInput } from './BasicFormInputInterface.js';
|
|
2
|
+
import { TableConfigurationsInterface } from './TableConfigurationsInterface.js';
|
|
3
3
|
export interface IMatrixInput extends IBasicFormInput {
|
|
4
4
|
matrixTableConfig?: {
|
|
5
5
|
dataSource: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormColumnInputs, IBasicFormInput } from "./BasicFormInputInterface";
|
|
2
|
-
import { MatDataOptionsInterface } from "./MatDataOptionsInterface";
|
|
1
|
+
import { FormColumnInputs, IBasicFormInput } from "./BasicFormInputInterface.js";
|
|
2
|
+
import { MatDataOptionsInterface } from "./MatDataOptionsInterface.js";
|
|
3
3
|
export interface IMscoaFormInput extends IBasicFormInput {
|
|
4
4
|
mscoaConfig: {
|
|
5
5
|
showAllSegments: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormColumnInputs, IBasicFormInput } from "./BasicFormInputInterface";
|
|
2
|
-
import { CalculationFunctions } from "./calculationVariableInterface";
|
|
1
|
+
import { FormColumnInputs, IBasicFormInput } from "./BasicFormInputInterface.js";
|
|
2
|
+
import { CalculationFunctions } from "./calculationVariableInterface.js";
|
|
3
3
|
export declare enum MultipleInputAvailableOperations {
|
|
4
4
|
Add = "add",
|
|
5
5
|
Remove = "remove",
|