@defra/forms-model 3.0.178 → 3.0.179
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 +2 -0
- package/dist/module/components/component-types.js.map +1 -1
- package/dist/module/components/helpers.js +57 -0
- package/dist/module/components/helpers.js.map +1 -0
- package/dist/module/components/index.js +2 -1
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/types.js.map +1 -1
- package/dist/module/conditions/condition-field.js +5 -5
- package/dist/module/conditions/condition-field.js.map +1 -1
- package/dist/module/conditions/condition-operators.js +76 -48
- 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 +9 -10
- 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 +31 -0
- package/dist/module/conditions/enums.js.map +1 -1
- package/dist/module/conditions/index.js +2 -2
- package/dist/module/conditions/index.js.map +1 -1
- package/dist/module/conditions/types.js.map +1 -1
- package/dist/types/components/component-types.d.ts +1 -0
- package/dist/types/components/component-types.d.ts.map +1 -1
- package/dist/types/components/helpers.d.ts +30 -0
- package/dist/types/components/helpers.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +4 -5
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/conditions/condition-field.d.ts +6 -6
- package/dist/types/conditions/condition-field.d.ts.map +1 -1
- package/dist/types/conditions/condition-operators.d.ts +84 -230
- package/dist/types/conditions/condition-operators.d.ts.map +1 -1
- package/dist/types/conditions/condition-ref.d.ts +3 -3
- package/dist/types/conditions/condition-ref.d.ts.map +1 -1
- package/dist/types/conditions/condition-values.d.ts +5 -8
- package/dist/types/conditions/condition-values.d.ts.map +1 -1
- package/dist/types/conditions/condition.d.ts +6 -6
- package/dist/types/conditions/condition.d.ts.map +1 -1
- package/dist/types/conditions/enums.d.ts +28 -0
- package/dist/types/conditions/enums.d.ts.map +1 -1
- package/dist/types/conditions/index.d.ts +2 -2
- package/dist/types/conditions/index.d.ts.map +1 -1
- package/dist/types/conditions/types.d.ts +8 -0
- package/dist/types/conditions/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/component-types.ts +6 -47
- package/src/components/enums.ts +1 -6
- package/src/components/helpers.ts +138 -0
- package/src/components/index.ts +14 -1
- package/src/components/types.ts +49 -58
- package/src/conditions/condition-field.ts +25 -11
- package/src/conditions/condition-operators.ts +129 -96
- package/src/conditions/condition-ref.ts +2 -2
- package/src/conditions/condition-values.ts +15 -20
- package/src/conditions/condition.ts +5 -5
- package/src/conditions/enums.ts +31 -0
- package/src/conditions/index.ts +7 -2
- package/src/conditions/types.ts +16 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition.js","names":["ConditionAbstract","ConditionField","getExpression","ConditionValueAbstract","Condition","field","operator","value","constructor","coordinator","Error","asFirstCondition","_asFirstCondition","conditionString","display","toPresentationString","conditionExpression","type","name","clone","from"],"sources":["../../../src/conditions/condition.ts"],"sourcesContent":["import { ConditionAbstract } from '~/src/conditions/condition-abstract.js'\nimport { ConditionField } from '~/src/conditions/condition-field.js'\nimport { getExpression } from '~/src/conditions/condition-operators.js'\nimport { ConditionValueAbstract } from '~/src/conditions/condition-value-abstract.js'\nimport {\n type ConditionValue,\n type RelativeTimeValue\n} from '~/src/conditions/condition-values.js'\nimport { type Coordinator } from '~/src/conditions/enums.js'\n\nexport class Condition extends ConditionAbstract {\n field
|
1
|
+
{"version":3,"file":"condition.js","names":["ConditionAbstract","ConditionField","getExpression","ConditionValueAbstract","Condition","field","operator","value","constructor","coordinator","Error","asFirstCondition","_asFirstCondition","conditionString","display","toPresentationString","conditionExpression","type","name","clone","from"],"sources":["../../../src/conditions/condition.ts"],"sourcesContent":["import { ConditionAbstract } from '~/src/conditions/condition-abstract.js'\nimport { ConditionField } from '~/src/conditions/condition-field.js'\nimport { getExpression } from '~/src/conditions/condition-operators.js'\nimport { ConditionValueAbstract } from '~/src/conditions/condition-value-abstract.js'\nimport {\n type ConditionValue,\n type RelativeTimeValue\n} from '~/src/conditions/condition-values.js'\nimport { type Coordinator, type OperatorName } from '~/src/conditions/enums.js'\n\nexport class Condition extends ConditionAbstract {\n field\n operator\n value\n\n constructor(\n field?: ConditionField,\n operator?: OperatorName,\n value?: ConditionValue | RelativeTimeValue,\n coordinator?: Coordinator\n ) {\n if (!(field instanceof ConditionField)) {\n throw new Error(\"Condition param 'field' must be ConditionField instance\")\n }\n if (typeof operator !== 'string') {\n throw new Error(\"Condition param 'operator' must be a string\")\n }\n if (!(value instanceof ConditionValueAbstract)) {\n throw new Error(\n \"Condition param 'field' must be ConditionValueAbstract instance\"\n )\n }\n\n super(coordinator)\n\n this.field = field\n this.operator = operator\n this.value = value\n }\n\n asFirstCondition() {\n this._asFirstCondition()\n return this\n }\n\n conditionString() {\n return `'${this.field.display}' ${\n this.operator\n } '${this.value.toPresentationString()}'`\n }\n\n conditionExpression() {\n return getExpression(\n this.field.type,\n this.field.name,\n this.operator,\n this.value\n )\n }\n\n clone() {\n return new Condition(\n ConditionField.from(this.field),\n this.operator,\n this.value.clone(),\n this.coordinator\n )\n }\n}\n"],"mappings":"AAAA,SAASA,iBAAiB;AAC1B,SAASC,cAAc;AACvB,SAASC,aAAa;AACtB,SAASC,sBAAsB;AAO/B,OAAO,MAAMC,SAAS,SAASJ,iBAAiB,CAAC;EAC/CK,KAAK;EACLC,QAAQ;EACRC,KAAK;EAELC,WAAWA,CACTH,KAAsB,EACtBC,QAAuB,EACvBC,KAA0C,EAC1CE,WAAyB,EACzB;IACA,IAAI,EAAEJ,KAAK,YAAYJ,cAAc,CAAC,EAAE;MACtC,MAAM,IAAIS,KAAK,CAAC,yDAAyD,CAAC;IAC5E;IACA,IAAI,OAAOJ,QAAQ,KAAK,QAAQ,EAAE;MAChC,MAAM,IAAII,KAAK,CAAC,6CAA6C,CAAC;IAChE;IACA,IAAI,EAAEH,KAAK,YAAYJ,sBAAsB,CAAC,EAAE;MAC9C,MAAM,IAAIO,KAAK,CACb,iEACF,CAAC;IACH;IAEA,KAAK,CAACD,WAAW,CAAC;IAElB,IAAI,CAACJ,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,KAAK,GAAGA,KAAK;EACpB;EAEAI,gBAAgBA,CAAA,EAAG;IACjB,IAAI,CAACC,iBAAiB,CAAC,CAAC;IACxB,OAAO,IAAI;EACb;EAEAC,eAAeA,CAAA,EAAG;IAChB,OAAO,IAAI,IAAI,CAACR,KAAK,CAACS,OAAO,KAC3B,IAAI,CAACR,QAAQ,KACV,IAAI,CAACC,KAAK,CAACQ,oBAAoB,CAAC,CAAC,GAAG;EAC3C;EAEAC,mBAAmBA,CAAA,EAAG;IACpB,OAAOd,aAAa,CAClB,IAAI,CAACG,KAAK,CAACY,IAAI,EACf,IAAI,CAACZ,KAAK,CAACa,IAAI,EACf,IAAI,CAACZ,QAAQ,EACb,IAAI,CAACC,KACP,CAAC;EACH;EAEAY,KAAKA,CAAA,EAAG;IACN,OAAO,IAAIf,SAAS,CAClBH,cAAc,CAACmB,IAAI,CAAC,IAAI,CAACf,KAAK,CAAC,EAC/B,IAAI,CAACC,QAAQ,EACb,IAAI,CAACC,KAAK,CAACY,KAAK,CAAC,CAAC,EAClB,IAAI,CAACV,WACP,CAAC;EACH;AACF","ignoreList":[]}
|
@@ -8,4 +8,35 @@ export let Coordinator = /*#__PURE__*/function (Coordinator) {
|
|
8
8
|
Coordinator["OR"] = "or";
|
9
9
|
return Coordinator;
|
10
10
|
}({});
|
11
|
+
export let Operator = /*#__PURE__*/function (Operator) {
|
12
|
+
Operator["Is"] = "==";
|
13
|
+
Operator["IsNot"] = "!=";
|
14
|
+
Operator["Contains"] = "in";
|
15
|
+
Operator["IsAtLeast"] = ">=";
|
16
|
+
Operator["IsAtMost"] = "<=";
|
17
|
+
Operator["IsLessThan"] = "<";
|
18
|
+
Operator["IsMoreThan"] = ">";
|
19
|
+
return Operator;
|
20
|
+
}({});
|
21
|
+
export let OperatorName = /*#__PURE__*/function (OperatorName) {
|
22
|
+
OperatorName["Is"] = "is";
|
23
|
+
OperatorName["IsNot"] = "is not";
|
24
|
+
OperatorName["IsLongerThan"] = "is longer than";
|
25
|
+
OperatorName["IsShorterThan"] = "is shorter than";
|
26
|
+
OperatorName["HasLength"] = "has length";
|
27
|
+
OperatorName["Contains"] = "contains";
|
28
|
+
OperatorName["DoesNotContain"] = "does not contain";
|
29
|
+
OperatorName["IsAtLeast"] = "is at least";
|
30
|
+
OperatorName["IsAtMost"] = "is at most";
|
31
|
+
OperatorName["IsLessThan"] = "is less than";
|
32
|
+
OperatorName["IsMoreThan"] = "is more than";
|
33
|
+
OperatorName["IsBefore"] = "is before";
|
34
|
+
OperatorName["IsAfter"] = "is after";
|
35
|
+
return OperatorName;
|
36
|
+
}({});
|
37
|
+
export let DateDirections = /*#__PURE__*/function (DateDirections) {
|
38
|
+
DateDirections["FUTURE"] = "in the future";
|
39
|
+
DateDirections["PAST"] = "in the past";
|
40
|
+
return DateDirections;
|
41
|
+
}({});
|
11
42
|
//# sourceMappingURL=enums.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.js","names":["ConditionType","Coordinator"],"sources":["../../../src/conditions/enums.ts"],"sourcesContent":["export enum ConditionType {\n Value = 'Value',\n RelativeTime = 'RelativeTime'\n}\n\nexport enum Coordinator {\n AND = 'and',\n OR = 'or'\n}\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAKzB,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
|
1
|
+
{"version":3,"file":"enums.js","names":["ConditionType","Coordinator","Operator","OperatorName","DateDirections"],"sources":["../../../src/conditions/enums.ts"],"sourcesContent":["export enum ConditionType {\n Value = 'Value',\n RelativeTime = 'RelativeTime'\n}\n\nexport enum Coordinator {\n AND = 'and',\n OR = 'or'\n}\n\nexport enum Operator {\n Is = '==',\n IsNot = '!=',\n Contains = 'in',\n IsAtLeast = '>=',\n IsAtMost = '<=',\n IsLessThan = '<',\n IsMoreThan = '>'\n}\n\nexport enum OperatorName {\n Is = 'is',\n IsNot = 'is not',\n IsLongerThan = 'is longer than',\n IsShorterThan = 'is shorter than',\n HasLength = 'has length',\n Contains = 'contains',\n DoesNotContain = 'does not contain',\n IsAtLeast = 'is at least',\n IsAtMost = 'is at most',\n IsLessThan = 'is less than',\n IsMoreThan = 'is more than',\n IsBefore = 'is before',\n IsAfter = 'is after'\n}\n\nexport enum DateDirections {\n FUTURE = 'in the future',\n PAST = 'in the past'\n}\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAKzB,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAKvB,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAUpB,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAgBxB,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export { getExpression, getOperatorConfig, getOperatorNames, absoluteDateOrTimeOperatorNames, relativeDateOrTimeOperatorNames } from "./condition-operators.js";
|
2
|
-
export { timeUnits, dateUnits, dateTimeUnits, ConditionValue,
|
2
|
+
export { timeUnits, dateUnits, dateTimeUnits, ConditionValue, RelativeTimeValue, conditionValueFrom } from "./condition-values.js";
|
3
3
|
export { ConditionField } from "./condition-field.js";
|
4
4
|
export { Condition } from "./condition.js";
|
5
5
|
export { ConditionRef } from "./condition-ref.js";
|
@@ -7,5 +7,5 @@ export { ConditionGroup } from "./condition-group.js";
|
|
7
7
|
export { ConditionsModel } from "./condition-model.js";
|
8
8
|
export { ConditionGroupDef } from "./condition-group-def.js";
|
9
9
|
export { toExpression, toPresentationString } from "./helpers.js";
|
10
|
-
export { ConditionType, Coordinator } from "./enums.js";
|
10
|
+
export { ConditionType, Coordinator, DateDirections, Operator, OperatorName } from "./enums.js";
|
11
11
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["getExpression","getOperatorConfig","getOperatorNames","absoluteDateOrTimeOperatorNames","relativeDateOrTimeOperatorNames","timeUnits","dateUnits","dateTimeUnits","ConditionValue","
|
1
|
+
{"version":3,"file":"index.js","names":["getExpression","getOperatorConfig","getOperatorNames","absoluteDateOrTimeOperatorNames","relativeDateOrTimeOperatorNames","timeUnits","dateUnits","dateTimeUnits","ConditionValue","RelativeTimeValue","conditionValueFrom","ConditionField","Condition","ConditionRef","ConditionGroup","ConditionsModel","ConditionGroupDef","toExpression","toPresentationString","ConditionType","Coordinator","DateDirections","Operator","OperatorName"],"sources":["../../../src/conditions/index.ts"],"sourcesContent":["export {\n getExpression,\n getOperatorConfig,\n getOperatorNames,\n absoluteDateOrTimeOperatorNames,\n relativeDateOrTimeOperatorNames\n} from '~/src/conditions/condition-operators.js'\n\nexport {\n timeUnits,\n dateUnits,\n dateTimeUnits,\n ConditionValue,\n RelativeTimeValue,\n conditionValueFrom\n} from '~/src/conditions/condition-values.js'\n\nexport { ConditionField } from '~/src/conditions/condition-field.js'\nexport { Condition } from '~/src/conditions/condition.js'\nexport { ConditionRef } from '~/src/conditions/condition-ref.js'\nexport { ConditionGroup } from '~/src/conditions/condition-group.js'\nexport { ConditionsModel } from '~/src/conditions/condition-model.js'\nexport { ConditionGroupDef } from '~/src/conditions/condition-group-def.js'\nexport { toExpression, toPresentationString } from '~/src/conditions/helpers.js'\n\nexport {\n ConditionType,\n Coordinator,\n DateDirections,\n Operator,\n OperatorName\n} from '~/src/conditions/enums.js'\n"],"mappings":"AAAA,SACEA,aAAa,EACbC,iBAAiB,EACjBC,gBAAgB,EAChBC,+BAA+B,EAC/BC,+BAA+B;AAGjC,SACEC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB;AAGpB,SAASC,cAAc;AACvB,SAASC,SAAS;AAClB,SAASC,YAAY;AACrB,SAASC,cAAc;AACvB,SAASC,eAAe;AACxB,SAASC,iBAAiB;AAC1B,SAASC,YAAY,EAAEC,oBAAoB;AAE3C,SACEC,aAAa,EACbC,WAAW,EACXC,cAAc,EACdC,QAAQ,EACRC,YAAY","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/conditions/types.ts"],"sourcesContent":["import { type ConditionGroup } from '~/src/conditions/condition-group.js'\nimport { type ConditionRef } from '~/src/conditions/condition-ref.js'\nimport { type Condition } from '~/src/conditions/condition.js'\n\nexport type ConditionsArray = (Condition | ConditionGroup | ConditionRef)[]\n\nexport type DateTimeUnitValues =\n | 'years'\n | 'months'\n | 'days'\n | 'hours'\n | 'minutes'\n | 'seconds'\n\nexport interface DateUnits {\n YEARS: { display: 'year(s)'; value: 'years' }\n MONTHS: { display: 'month(s)'; value: 'months' }\n DAYS: { display: 'day(s)'; value: 'days' }\n}\n\nexport interface TimeUnits {\n HOURS: { display: 'hour(s)'; value: 'hours' }\n MINUTES: { display: 'minute(s)'; value: 'minutes' }\n SECONDS: { display: 'second(s)'; value: 'seconds' }\n}\n"],"mappings":"","ignoreList":[]}
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/conditions/types.ts"],"sourcesContent":["import { type ConditionalComponentsDef } from '~/src/components/types.js'\nimport { type ConditionGroup } from '~/src/conditions/condition-group.js'\nimport { type ConditionRef } from '~/src/conditions/condition-ref.js'\nimport {\n type ConditionValue,\n type RelativeTimeValue\n} from '~/src/conditions/condition-values.js'\nimport { type Condition } from '~/src/conditions/condition.js'\nimport { type OperatorName } from '~/src/conditions/enums.js'\n\nexport type ConditionsArray = (Condition | ConditionGroup | ConditionRef)[]\n\nexport type DateTimeUnitValues =\n | 'years'\n | 'months'\n | 'days'\n | 'hours'\n | 'minutes'\n | 'seconds'\n\nexport interface DateUnits {\n YEARS: { display: 'year(s)'; value: 'years' }\n MONTHS: { display: 'month(s)'; value: 'months' }\n DAYS: { display: 'day(s)'; value: 'days' }\n}\n\nexport interface TimeUnits {\n HOURS: { display: 'hour(s)'; value: 'hours' }\n MINUTES: { display: 'minute(s)'; value: 'minutes' }\n SECONDS: { display: 'second(s)'; value: 'seconds' }\n}\n\nexport interface OperatorDefinition {\n units?: DateUnits | TimeUnits\n expression: (\n component: Pick<ConditionalComponentsDef, 'type' | 'name'>,\n conditionValue: ConditionValue | RelativeTimeValue\n ) => string\n}\n\nexport type Conditionals = Record<OperatorName, OperatorDefinition>\n"],"mappings":"","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component-types.d.ts","sourceRoot":"","sources":["../../../src/components/component-types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"component-types.d.ts","sourceRoot":"","sources":["../../../src/components/component-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,eAAO,MAAM,cAAc,EAAE,YAAY,EAgNxC,CAAA;AAED,eAAO,MAAM,yBAAyB,gEACM,CAAA"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { type InputFieldsComponentsDef, type ComponentDef, type ConditionalComponentsDef, type ContentComponentsDef, type HtmlComponent, type InsetTextComponent, type ListComponentsDef, type SelectionComponentsDef, type EditorComponentsDef } from '../components/types.js';
|
2
|
+
/**
|
3
|
+
* Filter known components with support for conditions
|
4
|
+
*/
|
5
|
+
export declare function hasConditionSupport(component?: Partial<ComponentDef>): component is ConditionalComponentsDef;
|
6
|
+
/**
|
7
|
+
* Filter known components with content fields
|
8
|
+
*/
|
9
|
+
export declare function hasContentField(component?: Partial<ComponentDef>): component is ContentComponentsDef;
|
10
|
+
/**
|
11
|
+
* Filter known components with text editor
|
12
|
+
*/
|
13
|
+
export declare function hasEditor(component?: Partial<ComponentDef>): component is EditorComponentsDef;
|
14
|
+
/**
|
15
|
+
* Filter known components with input fields
|
16
|
+
*/
|
17
|
+
export declare function hasInputField(component?: Partial<ComponentDef>): component is InputFieldsComponentsDef;
|
18
|
+
/**
|
19
|
+
* Filter known components with lists
|
20
|
+
*/
|
21
|
+
export declare function hasListField(component?: Partial<ComponentDef>): component is ListComponentsDef;
|
22
|
+
/**
|
23
|
+
* Filter known components with selection fields
|
24
|
+
*/
|
25
|
+
export declare function hasSelectionFields(component?: Partial<ComponentDef>): component is SelectionComponentsDef;
|
26
|
+
/**
|
27
|
+
* Filter known components with titles
|
28
|
+
*/
|
29
|
+
export declare function hasTitle(component?: Partial<ComponentDef>): component is Exclude<ComponentDef, InsetTextComponent | HtmlComponent>;
|
30
|
+
//# sourceMappingURL=helpers.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAA;AAElC;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,wBAAwB,CAgBvC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,oBAAoB,CASnC;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,mBAAmB,CAuBlC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,wBAAwB,CAmBvC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,iBAAiB,CAUhC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,sBAAsB,CASrC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,OAAO,CAAC,YAAY,EAAE,kBAAkB,GAAG,aAAa,CAAC,CAGxE"}
|
@@ -1,3 +1,4 @@
|
|
1
|
-
export { ComponentTypes } from '../components/component-types.js';
|
1
|
+
export { ComponentTypes, ConditionalComponentTypes } from '../components/component-types.js';
|
2
|
+
export { hasConditionSupport, hasContentField, hasEditor, hasInputField, hasListField, hasSelectionFields, hasTitle } from '../components/helpers.js';
|
2
3
|
export { ComponentType, ComponentSubType } from '../components/enums.js';
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,yBAAyB,EAC1B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EACT,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACT,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA"}
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import { type ComponentSubType, type ComponentType } from '../components/enums.js';
|
2
|
-
export
|
3
|
-
name: string;
|
4
|
-
title: string;
|
5
|
-
subType: ComponentSubType.Field;
|
6
|
-
}
|
2
|
+
export type ConditionalComponentType = Extract<ComponentType, typeof ComponentType.CheckboxesField | typeof ComponentType.DateField | typeof ComponentType.DatePartsField | typeof ComponentType.DateTimeField | typeof ComponentType.DateTimePartsField | typeof ComponentType.EmailAddressField | typeof ComponentType.MultilineTextField | typeof ComponentType.NumberField | typeof ComponentType.TextField | typeof ComponentType.TimeField | typeof ComponentType.YesNoField>;
|
7
3
|
export interface ContentOptions {
|
8
4
|
condition?: string;
|
9
5
|
}
|
@@ -203,6 +199,9 @@ export interface SelectFieldComponent extends ListFieldBase {
|
|
203
199
|
export type ComponentDef = InsetTextComponent | AutocompleteFieldComponent | CheckboxesFieldComponent | DateFieldComponent | DatePartsFieldFieldComponent | MonthYearFieldComponent | DateTimeFieldComponent | DateTimePartsFieldComponent | DetailsComponent | EmailAddressFieldComponent | FileUploadFieldComponent | HtmlComponent | ListComponent | MultilineTextFieldComponent | NumberFieldComponent | RadiosFieldComponent | SelectFieldComponent | TelephoneNumberFieldComponent | TextFieldComponent | TimeFieldComponent | UkAddressFieldComponent | YesNoFieldComponent | WebsiteFieldComponent;
|
204
200
|
export type InputFieldsComponentsDef = TextFieldComponent | EmailAddressFieldComponent | NumberFieldComponent | MultilineTextFieldComponent | TelephoneNumberFieldComponent | YesNoFieldComponent | FileUploadFieldComponent | DateFieldComponent | DateTimeFieldComponent | DateTimePartsFieldComponent | MonthYearFieldComponent | TimeFieldComponent | UkAddressFieldComponent | WebsiteFieldComponent;
|
205
201
|
export type ContentComponentsDef = DetailsComponent | HtmlComponent | InsetTextComponent | ListComponent;
|
202
|
+
export type EditorComponentsDef = TextFieldComponent | EmailAddressFieldComponent | TelephoneNumberFieldComponent | MultilineTextFieldComponent | NumberFieldComponent | AutocompleteFieldComponent | SelectFieldComponent | RadiosFieldComponent | CheckboxesFieldComponent | ListComponent | DetailsComponent | HtmlComponent | InsetTextComponent | FileUploadFieldComponent | DatePartsFieldFieldComponent | DateTimeFieldComponent | DateTimePartsFieldComponent | DateFieldComponent;
|
206
203
|
export type ListComponentsDef = ListComponent | AutocompleteFieldComponent | CheckboxesFieldComponent | RadiosFieldComponent | SelectFieldComponent;
|
204
|
+
export type SelectionComponentsDef = CheckboxesFieldComponent | RadiosFieldComponent | SelectFieldComponent | YesNoFieldComponent;
|
205
|
+
export type ConditionalComponentsDef = CheckboxesFieldComponent | DateFieldComponent | DatePartsFieldFieldComponent | DateTimeFieldComponent | DateTimePartsFieldComponent | EmailAddressFieldComponent | MultilineTextFieldComponent | NumberFieldComponent | TextFieldComponent | TimeFieldComponent | YesNoFieldComponent;
|
207
206
|
export {};
|
208
207
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAA;AAElC,MAAM,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"m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vB,qBAAqB,CAAA;AAGzB,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,GAChB,aAAa,GACb,kBAAkB,GAClB,aAAa,CAAA;AAGjB,MAAM,MAAM,mBAAmB,GAC3B,kBAAkB,GAClB,0BAA0B,GAC1B,6BAA6B,GAC7B,2BAA2B,GAC3B,oBAAoB,GACpB,0BAA0B,GAC1B,oBAAoB,GACpB,oBAAoB,GACpB,wBAAwB,GACxB,aAAa,GACb,gBAAgB,GAChB,aAAa,GACb,kBAAkB,GAClB,wBAAwB,GACxB,4BAA4B,GAC5B,sBAAsB,GACtB,2BAA2B,GAC3B,kBAAkB,CAAA;AAGtB,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,0BAA0B,GAC1B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,CAAA;AAGxB,MAAM,MAAM,sBAAsB,GAC9B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,CAAA;AAGvB,MAAM,MAAM,wBAAwB,GAChC,wBAAwB,GACxB,kBAAkB,GAClB,4BAA4B,GAC5B,sBAAsB,GACtB,2BAA2B,GAC3B,0BAA0B,GAC1B,2BAA2B,GAC3B,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,CAAA"}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { type
|
1
|
+
import { type ConditionalComponentType } from '../components/types.js';
|
2
2
|
export declare class ConditionField {
|
3
|
-
name:
|
4
|
-
type:
|
5
|
-
display:
|
6
|
-
constructor(name
|
3
|
+
name: any;
|
4
|
+
type: any;
|
5
|
+
display: any;
|
6
|
+
constructor(name?: string, type?: ConditionalComponentType, display?: string);
|
7
7
|
static from(obj: {
|
8
8
|
name: string;
|
9
|
-
type:
|
9
|
+
type: ConditionalComponentType;
|
10
10
|
display: string;
|
11
11
|
}): ConditionField;
|
12
12
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition-field.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,
|
1
|
+
{"version":3,"file":"condition-field.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE,qBAAa,cAAc;IACzB,IAAI,MAAA;IACJ,IAAI,MAAA;IACJ,OAAO,MAAA;gBAGL,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,wBAAwB,EAC/B,OAAO,CAAC,EAAE,MAAM;IAyBlB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,wBAAwB,CAAA;QAC9B,OAAO,EAAE,MAAM,CAAA;KAChB;CAGF"}
|
@@ -1,249 +1,103 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
import { type ConditionalComponentType } from '../components/types.js';
|
2
|
+
import { ConditionValue, RelativeTimeValue } from '../conditions/condition-values.js';
|
3
|
+
import { OperatorName } from '../conditions/enums.js';
|
4
|
+
import { type OperatorDefinition } from '../conditions/types.js';
|
4
5
|
export declare const customOperators: {
|
5
|
-
CheckboxesField: {
|
6
|
-
contains:
|
7
|
-
|
8
|
-
};
|
9
|
-
'does not contain': {
|
10
|
-
expression: (field: ComponentDef, value: any) => string;
|
11
|
-
};
|
6
|
+
readonly CheckboxesField: {
|
7
|
+
readonly contains: OperatorDefinition;
|
8
|
+
readonly "does not contain": OperatorDefinition;
|
12
9
|
};
|
13
|
-
NumberField: {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
expression: (field: ComponentDef, value: any) => string;
|
19
|
-
};
|
20
|
-
'is less than': {
|
21
|
-
expression: (field: ComponentDef, value: any) => string;
|
22
|
-
};
|
23
|
-
'is more than': {
|
24
|
-
expression: (field: ComponentDef, value: any) => string;
|
25
|
-
};
|
10
|
+
readonly NumberField: {
|
11
|
+
"is at least": OperatorDefinition;
|
12
|
+
"is at most": OperatorDefinition;
|
13
|
+
"is less than": OperatorDefinition;
|
14
|
+
"is more than": OperatorDefinition;
|
26
15
|
} & {
|
27
|
-
is:
|
28
|
-
|
29
|
-
};
|
30
|
-
'is not': {
|
31
|
-
expression: (field: ComponentDef, value: any) => string;
|
32
|
-
};
|
16
|
+
is: OperatorDefinition;
|
17
|
+
"is not": OperatorDefinition;
|
33
18
|
};
|
34
|
-
DateField: {
|
35
|
-
is:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
};
|
44
|
-
'is after': {
|
45
|
-
expression: (field: ComponentDef, value: any) => string;
|
46
|
-
};
|
47
|
-
} & {
|
48
|
-
'is at least': {
|
49
|
-
units: any;
|
50
|
-
expression: (field: ComponentDef, value: any) => string;
|
51
|
-
};
|
52
|
-
'is at most': {
|
53
|
-
units: any;
|
54
|
-
expression: (field: ComponentDef, value: any) => string;
|
55
|
-
};
|
56
|
-
'is less than': {
|
57
|
-
units: any;
|
58
|
-
expression: (field: ComponentDef, value: any) => string;
|
59
|
-
};
|
60
|
-
'is more than': {
|
61
|
-
units: any;
|
62
|
-
expression: (field: ComponentDef, value: any) => string;
|
63
|
-
};
|
19
|
+
readonly DateField: {
|
20
|
+
readonly "is at least": OperatorDefinition;
|
21
|
+
readonly "is at most": OperatorDefinition;
|
22
|
+
readonly "is less than": OperatorDefinition;
|
23
|
+
readonly "is more than": OperatorDefinition;
|
24
|
+
readonly is: OperatorDefinition;
|
25
|
+
readonly "is not": OperatorDefinition;
|
26
|
+
readonly "is before": OperatorDefinition;
|
27
|
+
readonly "is after": OperatorDefinition;
|
64
28
|
};
|
65
|
-
TimeField: {
|
66
|
-
is:
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
};
|
75
|
-
'is after': {
|
76
|
-
expression: (field: ComponentDef, value: any) => string;
|
77
|
-
};
|
78
|
-
} & {
|
79
|
-
'is at least': {
|
80
|
-
units: any;
|
81
|
-
expression: (field: ComponentDef, value: any) => string;
|
82
|
-
};
|
83
|
-
'is at most': {
|
84
|
-
units: any;
|
85
|
-
expression: (field: ComponentDef, value: any) => string;
|
86
|
-
};
|
87
|
-
'is less than': {
|
88
|
-
units: any;
|
89
|
-
expression: (field: ComponentDef, value: any) => string;
|
90
|
-
};
|
91
|
-
'is more than': {
|
92
|
-
units: any;
|
93
|
-
expression: (field: ComponentDef, value: any) => string;
|
94
|
-
};
|
29
|
+
readonly TimeField: {
|
30
|
+
readonly "is at least": OperatorDefinition;
|
31
|
+
readonly "is at most": OperatorDefinition;
|
32
|
+
readonly "is less than": OperatorDefinition;
|
33
|
+
readonly "is more than": OperatorDefinition;
|
34
|
+
readonly is: OperatorDefinition;
|
35
|
+
readonly "is not": OperatorDefinition;
|
36
|
+
readonly "is before": OperatorDefinition;
|
37
|
+
readonly "is after": OperatorDefinition;
|
95
38
|
};
|
96
|
-
DatePartsField: {
|
97
|
-
is:
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
};
|
106
|
-
'is after': {
|
107
|
-
expression: (field: ComponentDef, value: any) => string;
|
108
|
-
};
|
109
|
-
} & {
|
110
|
-
'is at least': {
|
111
|
-
units: any;
|
112
|
-
expression: (field: ComponentDef, value: any) => string;
|
113
|
-
};
|
114
|
-
'is at most': {
|
115
|
-
units: any;
|
116
|
-
expression: (field: ComponentDef, value: any) => string;
|
117
|
-
};
|
118
|
-
'is less than': {
|
119
|
-
units: any;
|
120
|
-
expression: (field: ComponentDef, value: any) => string;
|
121
|
-
};
|
122
|
-
'is more than': {
|
123
|
-
units: any;
|
124
|
-
expression: (field: ComponentDef, value: any) => string;
|
125
|
-
};
|
39
|
+
readonly DatePartsField: {
|
40
|
+
readonly "is at least": OperatorDefinition;
|
41
|
+
readonly "is at most": OperatorDefinition;
|
42
|
+
readonly "is less than": OperatorDefinition;
|
43
|
+
readonly "is more than": OperatorDefinition;
|
44
|
+
readonly is: OperatorDefinition;
|
45
|
+
readonly "is not": OperatorDefinition;
|
46
|
+
readonly "is before": OperatorDefinition;
|
47
|
+
readonly "is after": OperatorDefinition;
|
126
48
|
};
|
127
|
-
DateTimeField: {
|
128
|
-
is:
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
};
|
137
|
-
'is after': {
|
138
|
-
expression: (field: ComponentDef, value: any) => string;
|
139
|
-
};
|
140
|
-
} & {
|
141
|
-
'is at least': {
|
142
|
-
units: any;
|
143
|
-
expression: (field: ComponentDef, value: any) => string;
|
144
|
-
};
|
145
|
-
'is at most': {
|
146
|
-
units: any;
|
147
|
-
expression: (field: ComponentDef, value: any) => string;
|
148
|
-
};
|
149
|
-
'is less than': {
|
150
|
-
units: any;
|
151
|
-
expression: (field: ComponentDef, value: any) => string;
|
152
|
-
};
|
153
|
-
'is more than': {
|
154
|
-
units: any;
|
155
|
-
expression: (field: ComponentDef, value: any) => string;
|
156
|
-
};
|
49
|
+
readonly DateTimeField: {
|
50
|
+
readonly "is at least": OperatorDefinition;
|
51
|
+
readonly "is at most": OperatorDefinition;
|
52
|
+
readonly "is less than": OperatorDefinition;
|
53
|
+
readonly "is more than": OperatorDefinition;
|
54
|
+
readonly is: OperatorDefinition;
|
55
|
+
readonly "is not": OperatorDefinition;
|
56
|
+
readonly "is before": OperatorDefinition;
|
57
|
+
readonly "is after": OperatorDefinition;
|
157
58
|
};
|
158
|
-
DateTimePartsField: {
|
159
|
-
is:
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
};
|
168
|
-
'is after': {
|
169
|
-
expression: (field: ComponentDef, value: any) => string;
|
170
|
-
};
|
171
|
-
} & {
|
172
|
-
'is at least': {
|
173
|
-
units: any;
|
174
|
-
expression: (field: ComponentDef, value: any) => string;
|
175
|
-
};
|
176
|
-
'is at most': {
|
177
|
-
units: any;
|
178
|
-
expression: (field: ComponentDef, value: any) => string;
|
179
|
-
};
|
180
|
-
'is less than': {
|
181
|
-
units: any;
|
182
|
-
expression: (field: ComponentDef, value: any) => string;
|
183
|
-
};
|
184
|
-
'is more than': {
|
185
|
-
units: any;
|
186
|
-
expression: (field: ComponentDef, value: any) => string;
|
187
|
-
};
|
59
|
+
readonly DateTimePartsField: {
|
60
|
+
readonly "is at least": OperatorDefinition;
|
61
|
+
readonly "is at most": OperatorDefinition;
|
62
|
+
readonly "is less than": OperatorDefinition;
|
63
|
+
readonly "is more than": OperatorDefinition;
|
64
|
+
readonly is: OperatorDefinition;
|
65
|
+
readonly "is not": OperatorDefinition;
|
66
|
+
readonly "is before": OperatorDefinition;
|
67
|
+
readonly "is after": OperatorDefinition;
|
188
68
|
};
|
189
|
-
TextField: {
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
'is shorter than': {
|
194
|
-
expression: (field: ComponentDef, value: any) => string;
|
195
|
-
};
|
196
|
-
'has length': {
|
197
|
-
expression: (field: ComponentDef, value: any) => string;
|
198
|
-
};
|
69
|
+
readonly TextField: {
|
70
|
+
"is longer than": OperatorDefinition;
|
71
|
+
"is shorter than": OperatorDefinition;
|
72
|
+
"has length": OperatorDefinition;
|
199
73
|
} & {
|
200
|
-
is:
|
201
|
-
|
202
|
-
};
|
203
|
-
'is not': {
|
204
|
-
expression: (field: ComponentDef, value: any) => string;
|
205
|
-
};
|
74
|
+
is: OperatorDefinition;
|
75
|
+
"is not": OperatorDefinition;
|
206
76
|
};
|
207
|
-
MultilineTextField: {
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
'is shorter than': {
|
212
|
-
expression: (field: ComponentDef, value: any) => string;
|
213
|
-
};
|
214
|
-
'has length': {
|
215
|
-
expression: (field: ComponentDef, value: any) => string;
|
216
|
-
};
|
77
|
+
readonly MultilineTextField: {
|
78
|
+
"is longer than": OperatorDefinition;
|
79
|
+
"is shorter than": OperatorDefinition;
|
80
|
+
"has length": OperatorDefinition;
|
217
81
|
} & {
|
218
|
-
is:
|
219
|
-
|
220
|
-
};
|
221
|
-
'is not': {
|
222
|
-
expression: (field: ComponentDef, value: any) => string;
|
223
|
-
};
|
82
|
+
is: OperatorDefinition;
|
83
|
+
"is not": OperatorDefinition;
|
224
84
|
};
|
225
|
-
EmailAddressField: {
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
'is shorter than': {
|
230
|
-
expression: (field: ComponentDef, value: any) => string;
|
231
|
-
};
|
232
|
-
'has length': {
|
233
|
-
expression: (field: ComponentDef, value: any) => string;
|
234
|
-
};
|
85
|
+
readonly EmailAddressField: {
|
86
|
+
"is longer than": OperatorDefinition;
|
87
|
+
"is shorter than": OperatorDefinition;
|
88
|
+
"has length": OperatorDefinition;
|
235
89
|
} & {
|
236
|
-
is:
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
90
|
+
is: OperatorDefinition;
|
91
|
+
"is not": OperatorDefinition;
|
92
|
+
};
|
93
|
+
readonly YesNoField: {
|
94
|
+
is: OperatorDefinition;
|
95
|
+
"is not": OperatorDefinition;
|
242
96
|
};
|
243
97
|
};
|
244
|
-
export declare function getOperatorNames(fieldType:
|
245
|
-
export declare function getExpression(fieldType:
|
246
|
-
export declare function getOperatorConfig(fieldType:
|
98
|
+
export declare function getOperatorNames(fieldType: ConditionalComponentType): string[];
|
99
|
+
export declare function getExpression(fieldType: ConditionalComponentType, fieldName: string, operator: OperatorName, value: ConditionValue | RelativeTimeValue): string | undefined;
|
100
|
+
export declare function getOperatorConfig(fieldType: ConditionalComponentType, operator: OperatorName): OperatorDefinition | undefined;
|
247
101
|
export declare const absoluteDateOrTimeOperatorNames: string[];
|
248
102
|
export declare const relativeDateOrTimeOperatorNames: string[];
|
249
103
|
//# 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":"
|
1
|
+
{"version":3,"file":"condition-operators.d.ts","sourceRoot":"","sources":["../../../src/conditions/condition-operators.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAIL,cAAc,EACd,iBAAiB,EAClB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAGL,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAGL,KAAK,kBAAkB,EAExB,MAAM,2BAA2B,CAAA;AA+ClC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCgD,CAAA;AAE5E,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,wBAAwB,YAEnE;AAED,wBAAgB,aAAa,CAC3B,SAAS,EAAE,wBAAwB,EACnC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,cAAc,GAAG,iBAAiB,sBAM1C;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,wBAAwB,EACnC,QAAQ,EAAE,YAAY,kCAGvB;AA2DD,eAAO,MAAM,+BAA+B,UAE3C,CAAA;AAED,eAAO,MAAM,+BAA+B,UAE3C,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:
|
4
|
+
conditionName: any;
|
5
|
+
conditionDisplayName: any;
|
6
6
|
constructor(conditionName: string, conditionDisplayName: string, coordinator: Coordinator | undefined);
|
7
7
|
asFirstCondition(): this;
|
8
8
|
conditionString(): string;
|
9
|
-
conditionExpression():
|
9
|
+
conditionExpression(): any;
|
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,MAAA;IACb,oBAAoB,MAAA;gBAGlB,aAAa,EAAE,MAAM,EACrB,oBAAoB,EAAE,MAAM,EAC5B,WAAW,EAAE,WAAW,GAAG,SAAS;IAkBtC,gBAAgB;IAKhB,eAAe;IAIf,mBAAmB;IAInB,KAAK;CAON"}
|