ngx-t-forms-types 0.0.23 → 0.0.24
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/FormInClassUtils.d.ts +3 -4
- package/dist/interfaces/Form/IFormsInitStateInterface.d.ts +2 -2
- package/dist/interfaces/FormBuilder/FormBuilderCallBackFunctions.d.ts +24 -1
- package/dist/interfaces/Tour/IFormTour.d.ts +15 -1
- package/dist/interfaces/Tour/index.d.ts +1 -1
- package/dist/interfaces/Tower/ITowerFormSteps.d.ts +3 -4
- package/dist/interfaces/environment/IStoreFunctions.d.ts +1 -2
- package/dist/interfaces/formInput/APIDataFetchingConfigurationInterface.d.ts +4 -4
- package/dist/interfaces/formInput/BasicFormInputInterface.d.ts +6 -1
- package/dist/interfaces/formInput/userSignature.d.ts +24 -1
- package/dist/interfaces/pipeline-builder/index.d.ts +2 -2
- package/dist/interfaces/pipeline-builder/pipelineStages.d.ts +7 -1
- package/dist/interfaces/upgradeFunctions/interfaces/init-form.d.ts +2 -1
- package/package.json +3 -26
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { IUserSignature } from "../formInput/userSignature.js";
|
|
3
|
-
import { PointGroup } from "signature_pad";
|
|
2
|
+
import { IUserSignature, PointGroup } from "../formInput/userSignature.js";
|
|
4
3
|
import { FileUploadFn, NgxTFormsConfig } from "../../interfaces/Form/index.js";
|
|
5
|
-
import { HttpClient } from "@angular/common/http";
|
|
6
4
|
import { FormSubmissionStatus } from "../FormSlide/index.js";
|
|
7
5
|
/**
|
|
8
6
|
* Interface for the utility functions used in the in-class form.
|
|
@@ -33,7 +31,8 @@ export interface InClassFormUtilsInterface {
|
|
|
33
31
|
getUserSignature: () => Observable<IUserSignature>;
|
|
34
32
|
saveUserSignature: (signature: PointGroup[]) => Observable<void>;
|
|
35
33
|
NGX_T_FORMS_CONFIG?: NgxTFormsConfig;
|
|
36
|
-
|
|
34
|
+
/** Angular `HttpClient` instance on the frontend; typed opaque here to avoid an `@angular/common` dependency. */
|
|
35
|
+
httpCall?: unknown;
|
|
37
36
|
setSubmissionStatusValue: (status: FormSubmissionStatus) => void;
|
|
38
37
|
}
|
|
39
38
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ActivatedRouteSnapshot } from "@angular/router";
|
|
2
1
|
import { DatabaseFormInterface, FormInterface } from "./formInterface.js";
|
|
3
2
|
export interface LocalFormStateSelectorInterface extends FormInterface {
|
|
4
3
|
_id: string;
|
|
@@ -32,7 +31,8 @@ export interface IFormsInitStateInterface {
|
|
|
32
31
|
loadingForms: boolean;
|
|
33
32
|
submittingForm: boolean;
|
|
34
33
|
formId: string | null;
|
|
35
|
-
|
|
34
|
+
/** Angular `ActivatedRouteSnapshot` on the frontend; opaque here to keep these typings Angular-free. */
|
|
35
|
+
routerState: unknown | null;
|
|
36
36
|
loadFormsError: string | null;
|
|
37
37
|
errors: {
|
|
38
38
|
[FormStateErrors.ArchiveForm]: string | undefined;
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import { IGetTreeResponse, IMultipleInputCal, IScoaAccount } from "../formInput/index.js";
|
|
3
3
|
import { FormColumnInputs } from "../formInput/BasicFormInputInterface.js";
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Structural, Angular-free mirror of `@angular/cdk/drag-drop`'s `CdkDragDrop` event,
|
|
6
|
+
* capturing only the fields a reorder handler reads. Angular's concrete `CdkDragDrop`
|
|
7
|
+
* is assignment-compatible with this shape, so frontend consumers pass it unchanged
|
|
8
|
+
* while this package carries no `@angular/cdk` dependency.
|
|
9
|
+
*/
|
|
10
|
+
export interface CdkDragDrop<T, O = T, I = any> {
|
|
11
|
+
previousIndex: number;
|
|
12
|
+
currentIndex: number;
|
|
13
|
+
item: {
|
|
14
|
+
data: I;
|
|
15
|
+
};
|
|
16
|
+
container: {
|
|
17
|
+
data: T;
|
|
18
|
+
};
|
|
19
|
+
previousContainer: {
|
|
20
|
+
data: O;
|
|
21
|
+
};
|
|
22
|
+
isPointerOverContainer: boolean;
|
|
23
|
+
distance: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
5
28
|
export interface FormBuilderFunctions {
|
|
6
29
|
multipleInputToggleLabel: (item: FormColumnInputs) => void;
|
|
7
30
|
multipleInputToggleForm: (inputId: string, open: boolean) => void;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Dependency-free structural mirror of `ngx-ui-tour-md-menu`'s `IStepOption`. Only
|
|
3
|
+
* the stable, framework-agnostic fields are named; the index signature keeps the
|
|
4
|
+
* upstream contract open (including Angular-typed members like a `TemplateRef`
|
|
5
|
+
* `content`), so a real `IStepOption` stays assignment-compatible while this package
|
|
6
|
+
* carries no `ngx-ui-tour-md-menu` dependency.
|
|
7
|
+
*/
|
|
8
|
+
export interface IStepOption {
|
|
9
|
+
anchorId?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
content?: unknown;
|
|
12
|
+
route?: unknown;
|
|
13
|
+
placement?: unknown;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
2
16
|
/**
|
|
3
17
|
* Tour step descriptor used by `ngx-t-forms` when binding form-section guided
|
|
4
18
|
* tours through `ngx-ui-tour-md-menu`. Extends the upstream `IStepOption`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IFormTour } from './IFormTour.js';
|
|
1
|
+
export { IFormTour, IStepOption } from './IFormTour.js';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { FormGroup } from '@angular/forms';
|
|
2
1
|
import { FormColumnInputs } from '../formInput/BasicFormInputInterface.js';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import { FormListSection, FormStateErrors, IFormsInitStateInterface, LocalFormStateSelectorInterface } from '../Form/IFormsInitStateInterface.js';
|
|
5
4
|
import { DatabaseFormInterface } from '../Form/formInterface.js';
|
|
6
|
-
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
7
5
|
export interface ITowerStepColumn extends FormColumnInputs {
|
|
8
6
|
canReload: IInputCanReload;
|
|
9
7
|
inputConfigErrors: {
|
|
@@ -18,7 +16,8 @@ export interface IInputCanReload {
|
|
|
18
16
|
export interface ITowerFormSteps {
|
|
19
17
|
label: string;
|
|
20
18
|
sectionId: string;
|
|
21
|
-
|
|
19
|
+
/** Angular reactive `FormGroup` on the frontend; opaque here to keep these typings Angular-free. */
|
|
20
|
+
sectionForm: unknown | null;
|
|
22
21
|
sectionIsInvalid: boolean | undefined;
|
|
23
22
|
sectionIsSeen: boolean | undefined;
|
|
24
23
|
sectionFormErrorMessage: string;
|
|
@@ -44,7 +43,7 @@ export interface FormsStoreSelectorsInterface {
|
|
|
44
43
|
} | null>;
|
|
45
44
|
selectFormListSection$: Observable<FormListSection>;
|
|
46
45
|
selectFormUpdated$: Observable<string | Date | null>;
|
|
47
|
-
selectRouterState$: Observable<
|
|
46
|
+
selectRouterState$: Observable<unknown | null>;
|
|
48
47
|
selectSubmittingForm$: Observable<boolean>;
|
|
49
48
|
selectFormInitialValues$: Observable<Record<string, any> | null>;
|
|
50
49
|
selectInputInEditId$: Observable<string | null>;
|
|
@@ -3,8 +3,7 @@ import { DatabaseFormInterface, FileUploadFn, FormColumnInputs, FormInterface }
|
|
|
3
3
|
import { IWorkflowOption } from "../FormBuilder/index.js";
|
|
4
4
|
import { AccountingBasis, AdjResponseReviewColumnMapping, IGetTreeResponse, ScoaSegmentValue, WorkflowAdjudicationScoreSheetValue } from "../formInput/index.js";
|
|
5
5
|
import { FormListSection } from "../Form/IFormsInitStateInterface.js";
|
|
6
|
-
import { IUserSignature } from "../formInput/userSignature.js";
|
|
7
|
-
import { PointGroup } from "signature_pad";
|
|
6
|
+
import { IUserSignature, PointGroup } from "../formInput/userSignature.js";
|
|
8
7
|
import { IWorkflowDocListCols } from "../FormBuilder/workflowSelectionConfig.js";
|
|
9
8
|
import { IFinancialCycles } from "./environment.js";
|
|
10
9
|
export interface DialogConfig {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { HttpContext, HttpHeaders, HttpParams } from "@angular/common/http";
|
|
2
1
|
import { TreeNode } from "../FormSlide/accessTree.js";
|
|
3
2
|
import { FormInputBasicOptionInterface } from "./FormInputBasicOptionInterface.js";
|
|
4
3
|
import { MinimumInputRequiredInterface } from "./MinimumInputRequiredInterface.js";
|
|
@@ -21,12 +20,13 @@ export interface APIDataFetchingConfigurationInterface extends DataFetchingBaseC
|
|
|
21
20
|
httpMethod: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
22
21
|
postFormData: boolean;
|
|
23
22
|
httpHeaderOptions?: {
|
|
24
|
-
headers?:
|
|
23
|
+
headers?: {
|
|
25
24
|
[header: string]: string | string[];
|
|
26
25
|
};
|
|
27
|
-
context
|
|
26
|
+
/** Opaque request-context bag (Angular's `HttpContext` on the frontend); consumers narrow. */
|
|
27
|
+
context?: unknown;
|
|
28
28
|
observe?: 'body';
|
|
29
|
-
params?:
|
|
29
|
+
params?: {
|
|
30
30
|
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
31
31
|
};
|
|
32
32
|
reportProgress?: boolean;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Mirrors Angular Material's `MatFormFieldAppearance` (`'fill' | 'outline'`) as a
|
|
3
|
+
* plain string union so these typings carry no `@angular/material` dependency and
|
|
4
|
+
* can be consumed from a backend. Frontend consumers remain assignment-compatible.
|
|
5
|
+
*/
|
|
6
|
+
export type MatFormFieldAppearance = 'fill' | 'outline';
|
|
2
7
|
import { IFileUploadInput, IMatrixInput, IScoaInput, IMultiple, IToggleInput, IWorkflowAdjudicationInput } from ".";
|
|
3
8
|
import { ConditionalInputRule } from "./ConditionalInputRule.js";
|
|
4
9
|
import { IDateRangePickerInput } from "./DateRangePickerInput.js";
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Structural, dependency-free mirror of signature_pad's `PointGroup` (the data
|
|
3
|
+
* captured per pen stroke). signature_pad's own `PointGroup` stays assignment-
|
|
4
|
+
* compatible, so frontend consumers pass captured strokes through unchanged while
|
|
5
|
+
* this package carries no `signature_pad` dependency.
|
|
6
|
+
*/
|
|
7
|
+
export interface PointGroup {
|
|
8
|
+
dotSize: number;
|
|
9
|
+
minWidth: number;
|
|
10
|
+
maxWidth: number;
|
|
11
|
+
penColor: string;
|
|
12
|
+
velocityFilterWeight: number;
|
|
13
|
+
/**
|
|
14
|
+
* The `globalCompositeOperation` for the stroke (mirrors signature_pad).
|
|
15
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
|
|
16
|
+
*/
|
|
17
|
+
compositeOperation: GlobalCompositeOperation;
|
|
18
|
+
points: Array<{
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
pressure: number;
|
|
22
|
+
time: number;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
2
25
|
export interface IUserSignature {
|
|
3
26
|
dataPoints: PointGroup[];
|
|
4
27
|
signatureDate: Date;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IPipelineGenerationError, IPipelineGenerationResponse, IRunPipelineResponse, PipelineStageEnum } from "./pipelineStages.js";
|
|
2
|
-
export { IPipelineGenerationError, IPipelineGenerationResponse, IRunPipelineResponse, PipelineStageEnum };
|
|
1
|
+
import { IPipelineGenerationError, IPipelineGenerationResponse, IRunPipelineResponse, PipelineStage, PipelineStageEnum } from "./pipelineStages.js";
|
|
2
|
+
export { IPipelineGenerationError, IPipelineGenerationResponse, IRunPipelineResponse, PipelineStage, PipelineStageEnum };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Dependency-free stand-in for mongoose's `PipelineStage` — a single MongoDB
|
|
3
|
+
* aggregation-pipeline stage is just an object keyed by its `$`-operator. mongoose's
|
|
4
|
+
* own `PipelineStage` stays assignment-compatible, so backend callers using mongoose
|
|
5
|
+
* pass real stages through unchanged while this package carries no `mongoose` dependency.
|
|
6
|
+
*/
|
|
7
|
+
export type PipelineStage = Record<string, unknown>;
|
|
2
8
|
export interface IPipelineGenerationError {
|
|
3
9
|
message: string;
|
|
4
10
|
error: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { MatFormFieldAppearance } from "@angular/material/form-field";
|
|
2
1
|
import { IIncludedSegmentConfig } from "../../formInput/index.js";
|
|
2
|
+
/** Plain-union mirror of Angular Material's `MatFormFieldAppearance` (no `@angular/material` dependency). */
|
|
3
|
+
type MatFormFieldAppearance = 'fill' | 'outline';
|
|
3
4
|
interface conditionalInputRule {
|
|
4
5
|
formControlName: string;
|
|
5
6
|
label: string;
|
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.24",
|
|
4
4
|
"description": "Typings and interfaces for the ngx-t-forms library for dynamic forms.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typings",
|
|
@@ -38,30 +38,10 @@
|
|
|
38
38
|
"joi": "^18.2.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"@angular/core": "^21.0.0",
|
|
44
|
-
"@angular/forms": "^21.0.0",
|
|
45
|
-
"@angular/material": "^21.0.0",
|
|
46
|
-
"@angular/router": "^21.0.0",
|
|
47
|
-
"mongoose": "^8.23.0",
|
|
48
|
-
"moment": "^2.30.1",
|
|
49
|
-
"ngx-ui-tour-md-menu": "^16.0.0",
|
|
50
|
-
"rxjs": "~7.8.0",
|
|
51
|
-
"signature_pad": "^5.1.3"
|
|
52
|
-
},
|
|
53
|
-
"peerDependenciesMeta": {
|
|
54
|
-
"mongoose": {
|
|
55
|
-
"optional": true
|
|
56
|
-
}
|
|
41
|
+
"moment": ">=2.30.1",
|
|
42
|
+
"rxjs": ">=7.8.0"
|
|
57
43
|
},
|
|
58
44
|
"devDependencies": {
|
|
59
|
-
"@angular/cdk": "^21.2.12",
|
|
60
|
-
"@angular/common": "^21.2.12",
|
|
61
|
-
"@angular/core": "^21.2.12",
|
|
62
|
-
"@angular/forms": "^21.2.12",
|
|
63
|
-
"@angular/material": "^21.2.12",
|
|
64
|
-
"@angular/router": "^21.2.12",
|
|
65
45
|
"@types/jasmine": "^5.1.7",
|
|
66
46
|
"@types/node": "^22.13.9",
|
|
67
47
|
"jasmine-core": "^5.6.0",
|
|
@@ -70,11 +50,8 @@
|
|
|
70
50
|
"karma-jasmine": "^5.1.0",
|
|
71
51
|
"karma-webpack": "^5.0.1",
|
|
72
52
|
"moment": "^2.30.1",
|
|
73
|
-
"mongoose": "^8.23.0",
|
|
74
|
-
"ngx-ui-tour-md-menu": "^16.0.0",
|
|
75
53
|
"rimraf": "^6.0.1",
|
|
76
54
|
"rxjs": "~7.8.0",
|
|
77
|
-
"signature_pad": "^5.1.3",
|
|
78
55
|
"ts-loader": "^9.5.2",
|
|
79
56
|
"typescript": "~5.9.2",
|
|
80
57
|
"webpack": "^5.98.0",
|