@defra/forms-model 3.0.247 → 3.0.248
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/module/components/component-types.js +0 -7
- package/dist/module/components/component-types.js.map +1 -1
- package/dist/module/components/enums.js +0 -1
- package/dist/module/components/enums.js.map +1 -1
- package/dist/module/components/helpers.js +2 -2
- package/dist/module/components/helpers.js.map +1 -1
- package/dist/module/components/types.js.map +1 -1
- package/dist/module/conditions/condition-abstract.js.map +1 -1
- package/dist/module/conditions/condition-field.js.map +1 -1
- package/dist/module/conditions/condition-group-def.js.map +1 -1
- package/dist/module/conditions/condition-group.js.map +1 -1
- package/dist/module/conditions/condition-model.js +4 -4
- package/dist/module/conditions/condition-model.js.map +1 -1
- package/dist/module/conditions/condition-operators.js +21 -25
- package/dist/module/conditions/condition-operators.js.map +1 -1
- package/dist/module/conditions/condition-ref.js.map +1 -1
- package/dist/module/conditions/condition-values.js +17 -54
- package/dist/module/conditions/condition-values.js.map +1 -1
- package/dist/module/conditions/condition.js.map +1 -1
- package/dist/module/conditions/enums.js +7 -1
- package/dist/module/conditions/enums.js.map +1 -1
- package/dist/module/conditions/helpers.js.map +1 -1
- package/dist/module/conditions/index.js +3 -3
- package/dist/module/conditions/index.js.map +1 -1
- package/dist/module/conditions/types.js.map +1 -1
- package/dist/module/form/form-definition/index.js +22 -29
- package/dist/module/form/form-definition/index.js.map +1 -1
- package/dist/module/form/form-definition/types.js.map +1 -1
- package/dist/module/form/form-metadata/types.js.map +1 -1
- package/dist/types/components/component-types.d.ts.map +1 -1
- package/dist/types/components/enums.d.ts +0 -1
- package/dist/types/components/enums.d.ts.map +1 -1
- package/dist/types/components/helpers.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +7 -12
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/conditions/condition-abstract.d.ts +3 -3
- package/dist/types/conditions/condition-abstract.d.ts.map +1 -1
- package/dist/types/conditions/condition-field.d.ts +6 -8
- package/dist/types/conditions/condition-field.d.ts.map +1 -1
- package/dist/types/conditions/condition-group-def.d.ts +5 -3
- package/dist/types/conditions/condition-group-def.d.ts.map +1 -1
- package/dist/types/conditions/condition-group.d.ts +11 -10
- package/dist/types/conditions/condition-group.d.ts.map +1 -1
- package/dist/types/conditions/condition-model.d.ts +9 -17
- package/dist/types/conditions/condition-model.d.ts.map +1 -1
- package/dist/types/conditions/condition-operators.d.ts +8 -14
- package/dist/types/conditions/condition-operators.d.ts.map +1 -1
- package/dist/types/conditions/condition-ref.d.ts +4 -4
- package/dist/types/conditions/condition-ref.d.ts.map +1 -1
- package/dist/types/conditions/condition-values.d.ts +13 -30
- package/dist/types/conditions/condition-values.d.ts.map +1 -1
- package/dist/types/conditions/condition.d.ts +5 -5
- package/dist/types/conditions/condition.d.ts.map +1 -1
- package/dist/types/conditions/enums.d.ts +6 -1
- package/dist/types/conditions/enums.d.ts.map +1 -1
- package/dist/types/conditions/helpers.d.ts +5 -2
- package/dist/types/conditions/helpers.d.ts.map +1 -1
- package/dist/types/conditions/index.d.ts +3 -3
- package/dist/types/conditions/index.d.ts.map +1 -1
- package/dist/types/conditions/types.d.ts +36 -37
- package/dist/types/conditions/types.d.ts.map +1 -1
- package/dist/types/form/form-definition/index.d.ts +0 -5
- package/dist/types/form/form-definition/index.d.ts.map +1 -1
- package/dist/types/form/form-definition/types.d.ts +6 -10
- package/dist/types/form/form-definition/types.d.ts.map +1 -1
- package/dist/types/form/form-metadata/types.d.ts +5 -0
- package/dist/types/form/form-metadata/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/component-types.ts +0 -8
- package/src/components/enums.ts +0 -1
- package/src/components/helpers.ts +1 -2
- package/src/components/types.ts +7 -17
- package/src/conditions/condition-abstract.ts +5 -5
- package/src/conditions/condition-field.ts +6 -4
- package/src/conditions/condition-group-def.ts +7 -3
- package/src/conditions/condition-group.ts +11 -10
- package/src/conditions/condition-model.ts +27 -25
- package/src/conditions/condition-operators.ts +29 -49
- package/src/conditions/condition-ref.ts +3 -3
- package/src/conditions/condition-values.ts +31 -89
- package/src/conditions/condition.ts +5 -5
- package/src/conditions/enums.ts +7 -1
- package/src/conditions/helpers.ts +10 -2
- package/src/conditions/index.ts +4 -6
- package/src/conditions/types.ts +47 -24
- package/src/form/form-definition/index.ts +47 -51
- package/src/form/form-definition/types.ts +6 -13
- package/src/form/form-metadata/types.ts +6 -0
@@ -1,10 +1,10 @@
|
|
1
1
|
import { Coordinator } from '../conditions/enums.js';
|
2
2
|
export declare class ConditionAbstract {
|
3
|
-
coordinator
|
4
|
-
constructor(coordinator
|
3
|
+
coordinator?: Coordinator;
|
4
|
+
constructor(coordinator?: Coordinator);
|
5
5
|
coordinatorString(): string;
|
6
6
|
getCoordinator(): Coordinator | undefined;
|
7
|
-
setCoordinator(coordinator
|
7
|
+
setCoordinator(coordinator?: Coordinator): void;
|
8
8
|
isGroup(): boolean;
|
9
9
|
getGroupedConditions(): this[];
|
10
10
|
_asFirstCondition(): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-abstract.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-abstract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEvD,qBAAa,iBAAiB;IAC5B,WAAW,EAAE,WAAW,
|
1
|
+
{"version":3,"file":"condition-abstract.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-abstract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEvD,qBAAa,iBAAiB;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;gBAEb,WAAW,CAAC,EAAE,WAAW;IAQrC,iBAAiB,IAAI,MAAM;IAI3B,cAAc,IAAI,WAAW,GAAG,SAAS;IAIzC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW;IAIxC,OAAO;IAIP,oBAAoB;IAIpB,iBAAiB;IAIjB,gBAAgB;IAMhB,KAAK;IAIL,eAAe;IAMf,mBAAmB;CAKpB"}
|
@@ -1,13 +1,11 @@
|
|
1
1
|
import { type ComponentType } from '../components/enums.js';
|
2
|
+
import { type ConditionalComponentType } from '../components/types.js';
|
3
|
+
import { type ConditionFieldData } from '../conditions/types.js';
|
2
4
|
export declare class ConditionField {
|
3
|
-
name:
|
4
|
-
type:
|
5
|
-
display:
|
5
|
+
name: string;
|
6
|
+
type: ConditionalComponentType;
|
7
|
+
display: string;
|
6
8
|
constructor(name?: string, type?: ComponentType, display?: string);
|
7
|
-
static from(obj:
|
8
|
-
name: string;
|
9
|
-
type: ComponentType;
|
10
|
-
display: string;
|
11
|
-
}): ConditionField;
|
9
|
+
static from(obj: ConditionField | ConditionFieldData): ConditionField;
|
12
10
|
}
|
13
11
|
//# sourceMappingURL=condition-field.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-field.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;
|
1
|
+
{"version":3,"file":"condition-field.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,qBAAa,cAAc;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,wBAAwB,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;gBAEH,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,MAAM;IAkBjE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,GAAG,kBAAkB;CAGrD"}
|
@@ -1,10 +1,12 @@
|
|
1
|
-
import { type
|
1
|
+
import { type ConditionGroup } from '../conditions/condition-group.js';
|
2
|
+
import { type ConditionRef } from '../conditions/condition-ref.js';
|
3
|
+
import { type Condition } from '../conditions/condition.js';
|
2
4
|
export declare class ConditionGroupDef {
|
3
5
|
first: number;
|
4
6
|
last: number;
|
5
|
-
constructor(first
|
7
|
+
constructor(first?: number, last?: number);
|
6
8
|
contains(index: number): boolean;
|
7
9
|
startsWith(index: number): boolean;
|
8
|
-
applyTo(conditions:
|
10
|
+
applyTo(conditions: (Condition | ConditionRef | ConditionGroup)[]): (Condition | ConditionRef | ConditionGroup)[];
|
9
11
|
}
|
10
12
|
//# sourceMappingURL=condition-group-def.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-group-def.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-group-def.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"condition-group-def.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-group-def.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAE9D,qBAAa,iBAAiB;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;gBAEA,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAWzC,QAAQ,CAAC,KAAK,EAAE,MAAM;IAItB,UAAU,CAAC,KAAK,EAAE,MAAM;IAIxB,OAAO,CACL,UAAU,EAAE,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE,GACxD,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE;CAGjD"}
|
@@ -1,16 +1,17 @@
|
|
1
|
+
import { type ConditionRef } from '../conditions/condition-ref.js';
|
2
|
+
import { type Condition } from '../conditions/condition.js';
|
1
3
|
import { type Coordinator } from '../conditions/enums.js';
|
2
|
-
import { type ConditionsArray } from '../conditions/types.js';
|
3
4
|
export declare class ConditionGroup {
|
4
|
-
conditions:
|
5
|
-
constructor(conditions?:
|
6
|
-
coordinatorString():
|
7
|
-
conditionString():
|
8
|
-
conditionExpression():
|
5
|
+
conditions: (Condition | ConditionRef | ConditionGroup)[];
|
6
|
+
constructor(conditions?: (Condition | ConditionRef | ConditionGroup)[]);
|
7
|
+
coordinatorString(): string;
|
8
|
+
conditionString(): string;
|
9
|
+
conditionExpression(): string;
|
9
10
|
asFirstCondition(): this;
|
10
|
-
getCoordinator():
|
11
|
-
setCoordinator(coordinator
|
11
|
+
getCoordinator(): Coordinator | undefined;
|
12
|
+
setCoordinator(coordinator?: Coordinator): void;
|
12
13
|
isGroup(): boolean;
|
13
|
-
getGroupedConditions():
|
14
|
-
clone():
|
14
|
+
getGroupedConditions(): (Condition | ConditionRef | ConditionGroup)[];
|
15
|
+
clone(): ConditionGroup;
|
15
16
|
}
|
16
17
|
//# sourceMappingURL=condition-group.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-group.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"condition-group.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAG5D,qBAAa,cAAc;IACzB,UAAU,EAAE,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE,CAAA;gBAE7C,UAAU,GAAE,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAO;IAQ1E,iBAAiB,IAAI,MAAM;IAI3B,eAAe,IAAI,MAAM;IAQzB,mBAAmB,IAAI,MAAM;IAQ7B,gBAAgB;IAKhB,cAAc,IAAI,WAAW,GAAG,SAAS;IAIzC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW;IAIxC,OAAO;IAIP,oBAAoB,IAAI,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE;IAIrE,KAAK,IAAI,cAAc;CAKxB"}
|
@@ -2,18 +2,14 @@ import { ConditionGroupDef } from '../conditions/condition-group-def.js';
|
|
2
2
|
import { ConditionGroup } from '../conditions/condition-group.js';
|
3
3
|
import { ConditionRef } from '../conditions/condition-ref.js';
|
4
4
|
import { Condition } from '../conditions/condition.js';
|
5
|
-
import { type
|
6
|
-
type ConditionRawObject = ConditionsModel | {
|
7
|
-
name: string;
|
8
|
-
conditions: Condition[];
|
9
|
-
};
|
5
|
+
import { type ConditionsModelData } from '../conditions/types.js';
|
10
6
|
export declare class ConditionsModel {
|
11
7
|
#private;
|
12
8
|
clone(): ConditionsModel;
|
13
9
|
clear(): this;
|
14
10
|
set name(name: string | undefined);
|
15
11
|
get name(): string | undefined;
|
16
|
-
add(condition: Condition): this;
|
12
|
+
add(condition: Condition | ConditionRef): this;
|
17
13
|
replace(index: number, condition: Condition): this;
|
18
14
|
remove(indexes: number[]): this;
|
19
15
|
addGroups(groupDefs: ConditionGroupDef[]): this;
|
@@ -21,20 +17,16 @@ export declare class ConditionsModel {
|
|
21
17
|
moveEarlier(index: number): this;
|
22
18
|
moveLater(index: number): this;
|
23
19
|
switchCoordinators(): void;
|
24
|
-
get asPerUserGroupings(): (
|
20
|
+
get asPerUserGroupings(): (Condition | ConditionRef | ConditionGroup)[];
|
25
21
|
get hasConditions(): boolean;
|
26
22
|
get lastIndex(): number;
|
27
23
|
toPresentationString(): string;
|
28
24
|
toExpression(): string;
|
29
|
-
_applyGroups(userGroupedConditions: (Condition |
|
30
|
-
_group(conditions:
|
31
|
-
_ungroup(conditions:
|
32
|
-
_autoGroupDefs(conditions:
|
33
|
-
toJSON():
|
34
|
-
|
35
|
-
conditions: any[];
|
36
|
-
};
|
37
|
-
static from(obj: ConditionRawObject | ConditionsModel): ConditionsModel;
|
25
|
+
_applyGroups(userGroupedConditions: (Condition | ConditionRef | ConditionGroup)[]): (Condition | ConditionRef | ConditionGroup)[];
|
26
|
+
_group(conditions: (Condition | ConditionRef | ConditionGroup)[], groupDefs: ConditionGroupDef[]): (Condition | ConditionRef | ConditionGroup)[];
|
27
|
+
_ungroup(conditions: (Condition | ConditionRef | ConditionGroup)[], splitIndex: number): (Condition | ConditionRef | ConditionGroup)[];
|
28
|
+
_autoGroupDefs(conditions: (Condition | ConditionRef | ConditionGroup)[]): ConditionGroupDef[];
|
29
|
+
toJSON(): ConditionsModelData;
|
30
|
+
static from(obj: ConditionsModel | ConditionsModelData): ConditionsModel;
|
38
31
|
}
|
39
|
-
export {};
|
40
32
|
//# sourceMappingURL=condition-model.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-model.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAGzD,OAAO,
|
1
|
+
{"version":3,"file":"condition-model.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAGzD,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAA;AAElC,qBAAa,eAAe;;IAK1B,KAAK;IAYL,KAAK;IAOL,IAAI,IAAI,CAAC,IAAI,oBAAA,EAEZ;IAED,IAAI,IAAI,uBAEP;IAED,GAAG,CAAC,SAAS,EAAE,SAAS,GAAG,YAAY;IAevC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS;IAmB3C,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE;IAWxB,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE;IASxC,UAAU,CAAC,KAAK,EAAE,MAAM;IASxB,WAAW,CAAC,KAAK,EAAE,MAAM;IAezB,SAAS,CAAC,KAAK,EAAE,MAAM;IAevB,kBAAkB;IAOlB,IAAI,kBAAkB,kDAErB;IAED,IAAI,aAAa,YAEhB;IAED,IAAI,SAAS,WAEZ;IAED,oBAAoB;IAMpB,YAAY;IAMZ,YAAY,CACV,qBAAqB,EAAE,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE;IAmBtE,MAAM,CACJ,UAAU,EAAE,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE,EACzD,SAAS,EAAE,iBAAiB,EAAE;IAqBhC,QAAQ,CACN,UAAU,EAAE,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE,EACzD,UAAU,EAAE,MAAM;IAcpB,cAAc,CAAC,UAAU,EAAE,CAAC,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,EAAE;IAkCxE,MAAM,IAAI,mBAAmB;IAU7B,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,GAAG,mBAAmB;CAcvD"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ComponentType } from '../components/enums.js';
|
2
|
-
import { ConditionValue,
|
2
|
+
import { ConditionValue, RelativeDateValue } from '../conditions/condition-values.js';
|
3
3
|
import { OperatorName } from '../conditions/enums.js';
|
4
4
|
import { type OperatorDefinition } from '../conditions/types.js';
|
5
5
|
export declare const customOperators: {
|
@@ -20,16 +20,6 @@ export declare const customOperators: {
|
|
20
20
|
is: OperatorDefinition;
|
21
21
|
"is not": OperatorDefinition;
|
22
22
|
};
|
23
|
-
TimeField: {
|
24
|
-
"is at least": OperatorDefinition;
|
25
|
-
"is at most": OperatorDefinition;
|
26
|
-
"is less than": OperatorDefinition;
|
27
|
-
"is more than": OperatorDefinition;
|
28
|
-
is: OperatorDefinition;
|
29
|
-
"is not": OperatorDefinition;
|
30
|
-
"is before": OperatorDefinition;
|
31
|
-
"is after": OperatorDefinition;
|
32
|
-
};
|
33
23
|
DatePartsField: {
|
34
24
|
"is at least": OperatorDefinition;
|
35
25
|
"is at most": OperatorDefinition;
|
@@ -64,14 +54,18 @@ export declare const customOperators: {
|
|
64
54
|
is: OperatorDefinition;
|
65
55
|
"is not": OperatorDefinition;
|
66
56
|
};
|
57
|
+
SelectField: {
|
58
|
+
is: OperatorDefinition;
|
59
|
+
"is not": OperatorDefinition;
|
60
|
+
};
|
67
61
|
YesNoField: {
|
68
62
|
is: OperatorDefinition;
|
69
63
|
"is not": OperatorDefinition;
|
70
64
|
};
|
71
65
|
};
|
72
66
|
export declare function getOperatorNames(fieldType?: ComponentType): string[];
|
73
|
-
export declare function getExpression(fieldType: ComponentType, fieldName: string, operator: OperatorName, value: ConditionValue |
|
67
|
+
export declare function getExpression(fieldType: ComponentType, fieldName: string, operator: OperatorName, value: ConditionValue | RelativeDateValue): string | undefined;
|
74
68
|
export declare function getOperatorConfig(fieldType: ComponentType, operator: OperatorName): OperatorDefinition | undefined;
|
75
|
-
export declare const
|
76
|
-
export declare const
|
69
|
+
export declare const absoluteDateOperatorNames: OperatorName[];
|
70
|
+
export declare const relativeDateOperatorNames: OperatorName[];
|
77
71
|
//# sourceMappingURL=condition-operators.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-operators.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-operators.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,
|
1
|
+
{"version":3,"file":"condition-operators.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-operators.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,EACL,cAAc,EACd,iBAAiB,EAClB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAGL,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAA;AAqClC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAA;AAED,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,aAAa,YAOzD;AAED,wBAAgB,aAAa,CAC3B,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,cAAc,GAAG,iBAAiB,sBAW1C;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,YAAY,kCAGvB;AA6DD,eAAO,MAAM,yBAAyB,EAEjC,YAAY,EAAE,CAAA;AAEnB,eAAO,MAAM,yBAAyB,EAEjC,YAAY,EAAE,CAAA"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ConditionAbstract } from '../conditions/condition-abstract.js';
|
2
2
|
import { type Coordinator } from '../conditions/enums.js';
|
3
3
|
export declare class ConditionRef extends ConditionAbstract {
|
4
|
-
conditionName:
|
5
|
-
conditionDisplayName:
|
6
|
-
constructor(conditionName: string, conditionDisplayName: string, coordinator
|
4
|
+
conditionName: string;
|
5
|
+
conditionDisplayName: string;
|
6
|
+
constructor(conditionName: string, conditionDisplayName: string, coordinator?: Coordinator);
|
7
7
|
asFirstCondition(): this;
|
8
8
|
conditionString(): string;
|
9
|
-
conditionExpression():
|
9
|
+
conditionExpression(): string;
|
10
10
|
clone(): ConditionRef;
|
11
11
|
}
|
12
12
|
//# sourceMappingURL=condition-ref.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-ref.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,qBAAa,YAAa,SAAQ,iBAAiB;IACjD,aAAa,
|
1
|
+
{"version":3,"file":"condition-ref.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,qBAAa,YAAa,SAAQ,iBAAiB;IACjD,aAAa,EAAE,MAAM,CAAA;IACrB,oBAAoB,EAAE,MAAM,CAAA;gBAG1B,aAAa,EAAE,MAAM,EACrB,oBAAoB,EAAE,MAAM,EAC5B,WAAW,CAAC,EAAE,WAAW;IAkB3B,gBAAgB;IAKhB,eAAe;IAIf,mBAAmB;IAInB,KAAK;CAON"}
|
@@ -1,44 +1,27 @@
|
|
1
1
|
import { ConditionValueAbstract } from '../conditions/condition-value-abstract.js';
|
2
2
|
import { ConditionType, DateDirections } from '../conditions/enums.js';
|
3
|
-
import { type
|
4
|
-
|
3
|
+
import { type DateUnits } from '../conditions/enums.js';
|
4
|
+
import { type ConditionValueData, type RelativeDateValueData } from '../conditions/types.js';
|
5
|
+
export declare class ConditionValue extends ConditionValueAbstract {
|
5
6
|
type: ConditionType.Value;
|
6
7
|
value: string;
|
7
8
|
display: string;
|
8
9
|
constructor(value: string, display?: string);
|
9
10
|
toPresentationString(): string;
|
10
11
|
toExpression(): string;
|
11
|
-
static from(obj: ConditionValue |
|
12
|
+
static from(obj: ConditionValue | ConditionValueData): ConditionValue;
|
12
13
|
clone(): ConditionValue;
|
13
14
|
}
|
14
|
-
export
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
export declare const dateTimeUnits: DateUnits & TimeUnits;
|
21
|
-
export declare class RelativeTimeValue extends ConditionValueAbstract implements RelativeTimeValueFrom {
|
22
|
-
type: ConditionType.RelativeTime;
|
23
|
-
timePeriod: string;
|
24
|
-
timeUnit: DateTimeUnitValues;
|
25
|
-
direction: DateDirections;
|
26
|
-
timeOnly: boolean;
|
27
|
-
constructor(timePeriod: string, timeUnit: DateTimeUnitValues, direction: DateDirections, timeOnly?: boolean);
|
15
|
+
export declare class RelativeDateValue extends ConditionValueAbstract {
|
16
|
+
type: ConditionType.RelativeDate;
|
17
|
+
period: any;
|
18
|
+
unit: any;
|
19
|
+
direction: any;
|
20
|
+
constructor(period: string, unit: DateUnits, direction: DateDirections);
|
28
21
|
toPresentationString(): string;
|
29
22
|
toExpression(): string;
|
30
|
-
static from(obj:
|
31
|
-
clone():
|
23
|
+
static from(obj: RelativeDateValue | RelativeDateValueData): RelativeDateValue;
|
24
|
+
clone(): RelativeDateValue;
|
32
25
|
}
|
33
|
-
export
|
34
|
-
timePeriod: string;
|
35
|
-
timeUnit: DateTimeUnitValues;
|
36
|
-
direction: DateDirections;
|
37
|
-
timeOnly: boolean;
|
38
|
-
}
|
39
|
-
export declare function conditionValueFrom(obj: ConditionValue | RelativeTimeValue | ({
|
40
|
-
type: ConditionType.Value;
|
41
|
-
} & ConditionValueFrom) | ({
|
42
|
-
type: ConditionType.RelativeTime;
|
43
|
-
} & RelativeTimeValueFrom)): ConditionValue | RelativeTimeValue;
|
26
|
+
export declare function conditionValueFrom(obj: ConditionValue | ConditionValueData | RelativeDateValue | RelativeDateValueData): ConditionValue | RelativeDateValue;
|
44
27
|
//# sourceMappingURL=condition-values.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-values.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAA;AACrF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,
|
1
|
+
{"version":3,"file":"condition-values.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAA;AACrF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAA;AAElC,qBAAa,cAAe,SAAQ,sBAAsB;IACxD,IAAI,EAAE,aAAa,CAAC,KAAK,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;gBAEH,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;IAgB3C,oBAAoB;IAIpB,YAAY;IAIZ,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,GAAG,kBAAkB;IAIpD,KAAK;CAGN;AAED,qBAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,IAAI,EAAE,aAAa,CAAC,YAAY,CAAA;IAChC,MAAM,MAAA;IACN,IAAI,MAAA;IACJ,SAAS,MAAA;gBAEG,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc;IAmBtE,oBAAoB;IAIpB,YAAY,IAAI,MAAM;IAStB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,GAAG,qBAAqB;IAI1D,KAAK;CAGN;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EACC,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,sCAS1B"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ConditionAbstract } from '../conditions/condition-abstract.js';
|
2
2
|
import { ConditionField } from '../conditions/condition-field.js';
|
3
|
-
import { type ConditionValue, type
|
3
|
+
import { type ConditionValue, type RelativeDateValue } from '../conditions/condition-values.js';
|
4
4
|
import { type Coordinator, type OperatorName } from '../conditions/enums.js';
|
5
5
|
export declare class Condition extends ConditionAbstract {
|
6
|
-
field:
|
7
|
-
operator:
|
8
|
-
value:
|
9
|
-
constructor(field?: ConditionField, operator?: OperatorName, value?: ConditionValue |
|
6
|
+
field: ConditionField;
|
7
|
+
operator: OperatorName;
|
8
|
+
value: ConditionValue | RelativeDateValue;
|
9
|
+
constructor(field?: ConditionField, operator?: OperatorName, value?: ConditionValue | RelativeDateValue, coordinator?: Coordinator);
|
10
10
|
asFirstCondition(): this;
|
11
11
|
conditionString(): string;
|
12
12
|
conditionExpression(): string | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAGpE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE/E,qBAAa,SAAU,SAAQ,iBAAiB;IAC9C,KAAK,
|
1
|
+
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAGpE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE/E,qBAAa,SAAU,SAAQ,iBAAiB;IAC9C,KAAK,EAAE,cAAc,CAAA;IACrB,QAAQ,EAAE,YAAY,CAAA;IACtB,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAAA;gBAGvC,KAAK,CAAC,EAAE,cAAc,EACtB,QAAQ,CAAC,EAAE,YAAY,EACvB,KAAK,CAAC,EAAE,cAAc,GAAG,iBAAiB,EAC1C,WAAW,CAAC,EAAE,WAAW;IAqB3B,gBAAgB;IAKhB,eAAe;IAMf,mBAAmB;IASnB,KAAK;CAQN"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export declare enum ConditionType {
|
2
2
|
Value = "Value",
|
3
|
-
|
3
|
+
RelativeDate = "RelativeDate"
|
4
4
|
}
|
5
5
|
export declare enum Coordinator {
|
6
6
|
AND = "and",
|
@@ -34,4 +34,9 @@ export declare enum DateDirections {
|
|
34
34
|
FUTURE = "in the future",
|
35
35
|
PAST = "in the past"
|
36
36
|
}
|
37
|
+
export declare enum DateUnits {
|
38
|
+
YEARS = "years",
|
39
|
+
MONTHS = "months",
|
40
|
+
DAYS = "days"
|
41
|
+
}
|
37
42
|
//# sourceMappingURL=enums.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/conditions/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,YAAY,iBAAiB;CAC9B;AAED,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,EAAE,OAAO;CACV;AAED,oBAAY,QAAQ;IAClB,EAAE,OAAO;IACT,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,SAAS,OAAO;IAChB,QAAQ,OAAO;IACf,UAAU,MAAM;IAChB,UAAU,MAAM;CACjB;AAED,oBAAY,YAAY;IACtB,EAAE,OAAO;IACT,KAAK,WAAW;IAChB,YAAY,mBAAmB;IAC/B,aAAa,oBAAoB;IACjC,SAAS,eAAe;IACxB,QAAQ,aAAa;IACrB,cAAc,qBAAqB;IACnC,SAAS,gBAAgB;IACzB,QAAQ,eAAe;IACvB,UAAU,iBAAiB;IAC3B,UAAU,iBAAiB;IAC3B,QAAQ,cAAc;IACtB,OAAO,aAAa;CACrB;AAED,oBAAY,cAAc;IACxB,MAAM,kBAAkB;IACxB,IAAI,gBAAgB;CACrB"}
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/conditions/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,YAAY,iBAAiB;CAC9B;AAED,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,EAAE,OAAO;CACV;AAED,oBAAY,QAAQ;IAClB,EAAE,OAAO;IACT,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,SAAS,OAAO;IAChB,QAAQ,OAAO;IACf,UAAU,MAAM;IAChB,UAAU,MAAM;CACjB;AAED,oBAAY,YAAY;IACtB,EAAE,OAAO;IACT,KAAK,WAAW;IAChB,YAAY,mBAAmB;IAC/B,aAAa,oBAAoB;IACjC,SAAS,eAAe;IACxB,QAAQ,aAAa;IACrB,cAAc,qBAAqB;IACnC,SAAS,gBAAgB;IACzB,QAAQ,eAAe;IACvB,UAAU,iBAAiB;IAC3B,UAAU,iBAAiB;IAC3B,QAAQ,cAAc;IACtB,OAAO,aAAa;CACrB;AAED,oBAAY,cAAc;IACxB,MAAM,kBAAkB;IACxB,IAAI,gBAAgB;CACrB;AAED,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACd"}
|
@@ -1,3 +1,6 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { type ConditionGroup } from '../conditions/condition-group.js';
|
2
|
+
import { type ConditionRef } from '../conditions/condition-ref.js';
|
3
|
+
import { type Condition } from '../conditions/condition.js';
|
4
|
+
export declare function toPresentationString(condition: Condition | ConditionRef | ConditionGroup): string;
|
5
|
+
export declare function toExpression(condition: Condition | ConditionRef | ConditionGroup): string;
|
3
6
|
//# sourceMappingURL=helpers.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/conditions/helpers.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/conditions/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAA;AACrE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAE9D,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,SAAS,GAAG,YAAY,GAAG,cAAc,UAGrD;AAED,wBAAgB,YAAY,CAC1B,SAAS,EAAE,SAAS,GAAG,YAAY,GAAG,cAAc,UAGrD"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { getExpression, getOperatorConfig, getOperatorNames,
|
2
|
-
export {
|
1
|
+
export { getExpression, getOperatorConfig, getOperatorNames, absoluteDateOperatorNames, relativeDateOperatorNames } from '../conditions/condition-operators.js';
|
2
|
+
export { ConditionValue, RelativeDateValue, conditionValueFrom } from '../conditions/condition-values.js';
|
3
3
|
export { ConditionField } from '../conditions/condition-field.js';
|
4
4
|
export { Condition } from '../conditions/condition.js';
|
5
5
|
export { ConditionRef } from '../conditions/condition-ref.js';
|
@@ -7,5 +7,5 @@ export { ConditionGroup } from '../conditions/condition-group.js';
|
|
7
7
|
export { ConditionsModel } from '../conditions/condition-model.js';
|
8
8
|
export { ConditionGroupDef } from '../conditions/condition-group-def.js';
|
9
9
|
export { toExpression, toPresentationString } from '../conditions/helpers.js';
|
10
|
-
export { ConditionType, Coordinator, DateDirections, Operator, OperatorName } from '../conditions/enums.js';
|
10
|
+
export { ConditionType, Coordinator, DateDirections, DateUnits, Operator, OperatorName } from '../conditions/enums.js';
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conditions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conditions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,yCAAyC,CAAA;AAEhD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,sCAAsC,CAAA;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAEhF,OAAO,EACL,aAAa,EACb,WAAW,EACX,cAAc,EACd,SAAS,EACT,QAAQ,EACR,YAAY,EACb,MAAM,2BAA2B,CAAA"}
|
@@ -1,42 +1,41 @@
|
|
1
|
-
import { type ComponentDef } from '../components/types.js';
|
2
|
-
import { type
|
3
|
-
import { type
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
export interface
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
1
|
+
import { type ComponentDef, type ConditionalComponentType } from '../components/types.js';
|
2
|
+
import { type ConditionValue, type RelativeDateValue } from '../conditions/condition-values.js';
|
3
|
+
import { type ConditionType, type Coordinator, type DateDirections, type DateUnits, type OperatorName } from '../conditions/enums.js';
|
4
|
+
export interface ConditionValueData {
|
5
|
+
type: ConditionType.Value;
|
6
|
+
value: string;
|
7
|
+
display: string;
|
8
|
+
}
|
9
|
+
export interface RelativeDateValueData {
|
10
|
+
type: ConditionType.RelativeDate;
|
11
|
+
period: string;
|
12
|
+
unit: DateUnits;
|
13
|
+
direction: DateDirections;
|
14
|
+
}
|
15
|
+
export interface ConditionFieldData {
|
16
|
+
name: string;
|
17
|
+
type: ConditionalComponentType;
|
18
|
+
display: string;
|
19
|
+
}
|
20
|
+
export interface ConditionData {
|
21
|
+
field: ConditionFieldData;
|
22
|
+
operator: OperatorName;
|
23
|
+
value: ConditionValueData | RelativeDateValueData;
|
24
|
+
coordinator?: Coordinator;
|
25
|
+
}
|
26
|
+
export interface ConditionRefData {
|
27
|
+
conditionName: string;
|
28
|
+
conditionDisplayName: string;
|
29
|
+
coordinator?: Coordinator;
|
30
|
+
}
|
31
|
+
export interface ConditionGroupData {
|
32
|
+
conditions: (ConditionData | ConditionRefData | ConditionGroupData)[];
|
33
|
+
}
|
34
|
+
export interface ConditionsModelData extends ConditionGroupData {
|
35
|
+
name: string;
|
36
36
|
}
|
37
37
|
export interface OperatorDefinition {
|
38
|
-
|
39
|
-
expression: (component: Pick<ComponentDef, 'type' | 'name'>, conditionValue: ConditionValue | RelativeTimeValue) => string;
|
38
|
+
expression: (component: Pick<ComponentDef, 'type' | 'name'>, conditionValue: ConditionValue | RelativeDateValue) => string;
|
40
39
|
}
|
41
40
|
export type Conditionals = Record<OperatorName, OperatorDefinition>;
|
42
41
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conditions/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conditions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,2BAA2B,CAAA;AAElC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC,KAAK,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,aAAa,CAAC,YAAY,CAAA;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;IACf,SAAS,EAAE,cAAc,CAAA;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,wBAAwB,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,kBAAkB,CAAA;IACzB,QAAQ,EAAE,YAAY,CAAA;IACtB,KAAK,EAAE,kBAAkB,GAAG,qBAAqB,CAAA;IACjD,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,CAAC,aAAa,GAAG,gBAAgB,GAAG,kBAAkB,CAAC,EAAE,CAAA;CACtE;AAED,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,CACV,SAAS,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,EAC9C,cAAc,EAAE,cAAc,GAAG,iBAAiB,KAC/C,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAA"}
|
@@ -1,11 +1,6 @@
|
|
1
1
|
import Joi from 'joi';
|
2
2
|
import { type ComponentDef } from '../../components/types.js';
|
3
3
|
import { type FormDefinition } from '../../form/form-definition/types.js';
|
4
|
-
/**
|
5
|
-
* If an optional key is added, CURRENT_VERSION does not need to be incremented.
|
6
|
-
* Only breaking changes will require an increment, as well as a migration script.
|
7
|
-
*/
|
8
|
-
export declare const CURRENT_VERSION = 2;
|
9
4
|
export declare const componentSchema: Joi.ObjectSchema<ComponentDef>;
|
10
5
|
/**
|
11
6
|
* Joi schema for `FormDefinition` interface
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAGrB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAGrB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAU7D,OAAO,EAEL,KAAK,cAAc,EAOpB,MAAM,qCAAqC,CAAA;AAqE5C,eAAO,MAAM,eAAe,gCAwBZ,CAAA;AA+EhB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,kCAuB7B,CAAA;AAIJ,eAAO,MAAM,MAAM,kCAAuB,CAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type ComponentDef } from '../../components/types.js';
|
2
|
-
import { type
|
2
|
+
import { type ConditionsModelData } from '../../conditions/types.js';
|
3
3
|
export interface Link {
|
4
4
|
path: string;
|
5
5
|
condition?: string;
|
@@ -24,8 +24,8 @@ export interface Item {
|
|
24
24
|
description?: string;
|
25
25
|
conditional?: {
|
26
26
|
components: ComponentDef[];
|
27
|
-
}
|
28
|
-
condition?: string
|
27
|
+
};
|
28
|
+
condition?: string;
|
29
29
|
}
|
30
30
|
export interface List {
|
31
31
|
name: string;
|
@@ -42,14 +42,10 @@ export interface PhaseBanner {
|
|
42
42
|
phase?: 'alpha' | 'beta';
|
43
43
|
feedbackUrl?: string;
|
44
44
|
}
|
45
|
-
export
|
46
|
-
name: string;
|
47
|
-
conditions: Condition[];
|
48
|
-
};
|
49
|
-
export interface ConditionRawData {
|
45
|
+
export interface ConditionWrapper {
|
50
46
|
name: string;
|
51
47
|
displayName: string;
|
52
|
-
value:
|
48
|
+
value: ConditionsModelData;
|
53
49
|
}
|
54
50
|
/**
|
55
51
|
* Interface for `formDefinitionSchema` Joi schema
|
@@ -57,7 +53,7 @@ export interface ConditionRawData {
|
|
57
53
|
*/
|
58
54
|
export interface FormDefinition {
|
59
55
|
pages: Page[];
|
60
|
-
conditions:
|
56
|
+
conditions: ConditionWrapper[];
|
61
57
|
lists: List[];
|
62
58
|
sections: Section[];
|
63
59
|
startPage?: Page['path'];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAGpE,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,YAAY,EAAE,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,IAAI,EAAE,CAAA;CACd;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IAChC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE;QAAE,UAAU,EAAE,YAAY,EAAE,CAAA;KAAE,CAAA;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;IACrC,KAAK,EAAE,IAAI,EAAE,CAAA;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,mBAAmB,CAAA;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAC9B,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
|
@@ -90,4 +90,9 @@ export type FormByIdInput = Pick<FormMetadata, 'id'>;
|
|
90
90
|
export type FormBySlugInput = Pick<FormMetadata, 'slug'>;
|
91
91
|
export type FormMetadataDocument = Omit<FormMetadata, 'id'>;
|
92
92
|
export type FormMetadataInput = Pick<FormMetadata, 'title' | 'organisation' | 'teamName' | 'teamEmail'>;
|
93
|
+
export interface FormResponse {
|
94
|
+
id: FormMetadata['id'];
|
95
|
+
slug: FormMetadata['slug'];
|
96
|
+
status: string;
|
97
|
+
}
|
93
98
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metadata/types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;IAE7B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;CAC1C;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AACpD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AACxD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAC3D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACZ,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW,CACpD,CAAA"}
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metadata/types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;IAE7B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAA;IAExB;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA;CAC1C;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AACpD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AACxD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAC3D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACZ,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW,CACpD,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf"}
|
package/package.json
CHANGED