@defra/forms-model 3.0.2 → 3.0.4
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/browser/components/enums.d.ts +27 -0
- package/dist/browser/components/enums.d.ts.map +1 -0
- package/dist/browser/components/enums.js +46 -0
- package/dist/browser/components/enums.js.map +1 -0
- package/dist/browser/components/index.d.ts +2 -1
- package/dist/browser/components/index.d.ts.map +1 -1
- package/dist/browser/components/index.js +10 -19
- package/dist/browser/components/index.js.map +1 -1
- package/dist/browser/components/types.d.ts +0 -29
- package/dist/browser/components/types.d.ts.map +1 -1
- package/dist/browser/components/types.js +4 -44
- package/dist/browser/components/types.js.map +1 -1
- package/dist/browser/conditions/condition-abstract.d.ts +1 -1
- package/dist/browser/conditions/condition-abstract.js +5 -5
- package/dist/browser/conditions/condition-abstract.js.map +1 -1
- package/dist/browser/conditions/condition-group.d.ts +2 -1
- package/dist/browser/conditions/condition-group.d.ts.map +1 -1
- package/dist/browser/conditions/condition-group.js.map +1 -1
- package/dist/browser/conditions/condition-model.d.ts.map +1 -1
- package/dist/browser/conditions/condition-model.js +6 -6
- package/dist/browser/conditions/condition-model.js.map +1 -1
- package/dist/browser/conditions/condition-ref.d.ts +1 -1
- package/dist/browser/conditions/condition-ref.js.map +1 -1
- package/dist/browser/conditions/condition.d.ts +1 -1
- package/dist/browser/conditions/condition.js.map +1 -1
- package/dist/browser/conditions/enums.d.ts +5 -0
- package/dist/browser/conditions/enums.d.ts.map +1 -0
- package/dist/browser/conditions/enums.js +24 -0
- package/dist/browser/conditions/enums.js.map +1 -0
- package/dist/browser/conditions/index.d.ts +1 -1
- package/dist/browser/conditions/index.js +5 -5
- package/dist/browser/conditions/index.js.map +1 -1
- package/dist/browser/conditions/types.d.ts +0 -4
- package/dist/browser/conditions/types.d.ts.map +1 -1
- package/dist/browser/conditions/types.js +4 -12
- package/dist/browser/conditions/types.js.map +1 -1
- package/dist/browser/data-model/enums.d.ts +6 -0
- package/dist/browser/data-model/enums.d.ts.map +1 -0
- package/dist/browser/data-model/enums.js +25 -0
- package/dist/browser/data-model/enums.js.map +1 -0
- package/dist/browser/data-model/index.d.ts +1 -0
- package/dist/browser/data-model/index.d.ts.map +1 -1
- package/dist/browser/data-model/index.js +10 -4
- package/dist/browser/data-model/index.js.map +1 -1
- package/dist/browser/data-model/types.d.ts +1 -5
- package/dist/browser/data-model/types.d.ts.map +1 -1
- package/dist/browser/data-model/types.js +0 -7
- package/dist/browser/data-model/types.js.map +1 -1
- package/dist/browser/index.d.ts +4 -5
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +19 -34
- package/dist/browser/index.js.map +1 -1
- package/dist/module/components/enums.d.ts +27 -0
- package/dist/module/components/enums.d.ts.map +1 -0
- package/dist/module/components/enums.js +32 -0
- package/dist/module/components/enums.js.map +1 -0
- package/dist/module/components/index.d.ts +2 -1
- package/dist/module/components/index.d.ts.map +1 -1
- package/dist/module/components/index.js +7 -16
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/types.d.ts +0 -29
- package/dist/module/components/types.d.ts.map +1 -1
- package/dist/module/components/types.js +1 -42
- package/dist/module/components/types.js.map +1 -1
- package/dist/module/conditions/condition-abstract.d.ts +1 -1
- package/dist/module/conditions/condition-abstract.js +2 -2
- package/dist/module/conditions/condition-abstract.js.map +1 -1
- package/dist/module/conditions/condition-group.d.ts +2 -1
- package/dist/module/conditions/condition-group.d.ts.map +1 -1
- package/dist/module/conditions/condition-group.js.map +1 -1
- package/dist/module/conditions/condition-model.d.ts.map +1 -1
- package/dist/module/conditions/condition-model.js +3 -3
- package/dist/module/conditions/condition-model.js.map +1 -1
- package/dist/module/conditions/condition-ref.d.ts +1 -1
- package/dist/module/conditions/condition-ref.js.map +1 -1
- package/dist/module/conditions/condition.d.ts +1 -1
- package/dist/module/conditions/condition.js.map +1 -1
- package/dist/module/conditions/enums.d.ts +5 -0
- package/dist/module/conditions/enums.d.ts.map +1 -0
- package/dist/module/conditions/enums.js +10 -0
- package/dist/module/conditions/enums.js.map +1 -0
- package/dist/module/conditions/index.d.ts +1 -1
- package/dist/module/conditions/index.js +2 -2
- package/dist/module/conditions/index.js.map +1 -1
- package/dist/module/conditions/types.d.ts +0 -4
- package/dist/module/conditions/types.d.ts.map +1 -1
- package/dist/module/conditions/types.js +1 -10
- package/dist/module/conditions/types.js.map +1 -1
- package/dist/module/data-model/enums.d.ts +6 -0
- package/dist/module/data-model/enums.d.ts.map +1 -0
- package/dist/module/data-model/enums.js +11 -0
- package/dist/module/data-model/enums.js.map +1 -0
- package/dist/module/data-model/index.d.ts +1 -0
- package/dist/module/data-model/index.d.ts.map +1 -1
- package/dist/module/data-model/index.js +7 -0
- package/dist/module/data-model/index.js.map +1 -1
- package/dist/module/data-model/types.d.ts +1 -5
- package/dist/module/data-model/types.d.ts.map +1 -1
- package/dist/module/data-model/types.js +0 -7
- package/dist/module/data-model/types.js.map +1 -1
- package/dist/module/index.d.ts +4 -5
- package/dist/module/index.d.ts.map +1 -1
- package/dist/module/index.js +15 -33
- package/dist/module/index.js.map +1 -1
- package/package.json +5 -7
- package/src/components/enums.ts +26 -0
- package/src/components/index.ts +2 -1
- package/src/components/types.ts +0 -31
- package/src/conditions/condition-abstract.ts +1 -1
- package/src/conditions/condition-group.ts +2 -1
- package/src/conditions/condition-model.ts +2 -1
- package/src/conditions/condition-ref.ts +1 -1
- package/src/conditions/condition.ts +1 -1
- package/src/conditions/enums.ts +4 -0
- package/src/conditions/index.ts +1 -1
- package/src/conditions/types.ts +0 -5
- package/src/data-model/enums.ts +5 -0
- package/src/data-model/index.ts +1 -0
- package/src/data-model/types.ts +1 -6
- package/src/index.ts +8 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"condition.js","names":["Condition","ConditionAbstract","constructor","field","operator","value","coordinator","_defineProperty","ConditionField","Error","ConditionValueAbstract","asFirstCondition","_asFirstCondition","conditionString","display","toPresentationString","conditionExpression","getExpression","type","name","clone","from","_exports"],"sources":["../../../src/conditions/condition.ts"],"sourcesContent":["import { ConditionField } from './condition-field'\nimport { ConditionAbstract } from './condition-abstract'\nimport { getExpression } from './condition-operators'\nimport { ConditionValue, RelativeTimeValue } from './condition-values'\nimport { ConditionValueAbstract } from './condition-value-abstract'\nimport { Coordinator } from './
|
1
|
+
{"version":3,"file":"condition.js","names":["Condition","ConditionAbstract","constructor","field","operator","value","coordinator","_defineProperty","ConditionField","Error","ConditionValueAbstract","asFirstCondition","_asFirstCondition","conditionString","display","toPresentationString","conditionExpression","getExpression","type","name","clone","from","_exports"],"sources":["../../../src/conditions/condition.ts"],"sourcesContent":["import { ConditionField } from './condition-field'\nimport { ConditionAbstract } from './condition-abstract'\nimport { getExpression } from './condition-operators'\nimport { ConditionValue, RelativeTimeValue } from './condition-values'\nimport { ConditionValueAbstract } from './condition-value-abstract'\nimport { Coordinator } from './enums'\n\nexport class Condition extends ConditionAbstract {\n field: ConditionField\n operator: string\n value: ConditionValue | RelativeTimeValue\n\n constructor(\n field: ConditionField,\n operator: string,\n value: ConditionValue | RelativeTimeValue,\n coordinator?: Coordinator\n ) {\n super(coordinator)\n\n if (!(field instanceof ConditionField)) {\n throw Error(`field ${field} is not a valid ConditionField object`)\n }\n if (typeof operator !== 'string') {\n throw Error(`operator ${operator} is not a valid operator`)\n }\n if (!(value instanceof ConditionValueAbstract)) {\n throw Error(`value ${value} is not a valid value type`)\n }\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":";;;;;;;;;;;;;;;;;;;;EAOO,MAAMA,SAAS,SAASC,oCAAiB,CAAC;IAK/CC,W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,CAAC;IACH;EACF;EAACgB,QAAA,CAAAtB,SAAA,GAAAA,SAAA;AAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/conditions/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,EAAE,OAAO;CACV"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
if (typeof define === "function" && define.amd) {
|
3
|
+
define(["exports"], factory);
|
4
|
+
} else if (typeof exports !== "undefined") {
|
5
|
+
factory(exports);
|
6
|
+
} else {
|
7
|
+
var mod = {
|
8
|
+
exports: {}
|
9
|
+
};
|
10
|
+
factory(mod.exports);
|
11
|
+
global.enums = mod.exports;
|
12
|
+
}
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
_exports.__esModule = true;
|
17
|
+
_exports.Coordinator = void 0;
|
18
|
+
let Coordinator = _exports.Coordinator = /*#__PURE__*/function (Coordinator) {
|
19
|
+
Coordinator["AND"] = "and";
|
20
|
+
Coordinator["OR"] = "or";
|
21
|
+
return Coordinator;
|
22
|
+
}({});
|
23
|
+
});
|
24
|
+
//# sourceMappingURL=enums.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.js","names":["Coordinator","_exports"],"sources":["../../../src/conditions/enums.ts"],"sourcesContent":["export enum Coordinator {\n AND = 'and',\n OR = 'or'\n}\n"],"mappings":";;;;;;;;;;;;;;;;;MAAYA,WAAW,GAAAC,QAAA,CAAAD,WAAA,0BAAXA,WAAW;IAAXA,WAAW;IAAXA,WAAW;IAAA,OAAXA,WAAW;EAAA;AAAA"}
|
@@ -7,5 +7,5 @@ export { ConditionGroup } from './condition-group';
|
|
7
7
|
export { ConditionsModel } from './condition-model';
|
8
8
|
export { ConditionGroupDef } from './condition-group-def';
|
9
9
|
export { toExpression, toPresentationString } from './helpers';
|
10
|
-
export { Coordinator } from './
|
10
|
+
export { Coordinator } from './enums';
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "./condition-operators", "./condition-values", "./condition-field", "./condition", "./condition-ref", "./condition-group", "./condition-model", "./condition-group-def", "./helpers", "./
|
3
|
+
define(["exports", "./condition-operators", "./condition-values", "./condition-field", "./condition", "./condition-ref", "./condition-group", "./condition-model", "./condition-group-def", "./helpers", "./enums"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("./condition-operators"), require("./condition-values"), require("./condition-field"), require("./condition"), require("./condition-ref"), require("./condition-group"), require("./condition-model"), require("./condition-group-def"), require("./helpers"), require("./
|
5
|
+
factory(exports, require("./condition-operators"), require("./condition-values"), require("./condition-field"), require("./condition"), require("./condition-ref"), require("./condition-group"), require("./condition-model"), require("./condition-group-def"), require("./helpers"), require("./enums"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.conditionOperators, global.conditionValues, global.conditionField, global.condition, global.conditionRef, global.conditionGroup, global.conditionModel, global.conditionGroupDef, global.helpers, global.
|
10
|
+
factory(mod.exports, global.conditionOperators, global.conditionValues, global.conditionField, global.condition, global.conditionRef, global.conditionGroup, global.conditionModel, global.conditionGroupDef, global.helpers, global.enums);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _conditionOperators, _conditionValues, _conditionField, _condition, _conditionRef, _conditionGroup, _conditionModel, _conditionGroupDef, _helpers,
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _conditionOperators, _conditionValues, _conditionField, _condition, _conditionRef, _conditionGroup, _conditionModel, _conditionGroupDef, _helpers, _enums) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
@@ -59,7 +59,7 @@
|
|
59
59
|
Object.defineProperty(_exports, "Coordinator", {
|
60
60
|
enumerable: true,
|
61
61
|
get: function () {
|
62
|
-
return
|
62
|
+
return _enums.Coordinator;
|
63
63
|
}
|
64
64
|
});
|
65
65
|
Object.defineProperty(_exports, "DateDirections", {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/conditions/index.ts"],"sourcesContent":["export {\n getExpression,\n getOperatorConfig,\n getOperatorNames,\n absoluteDateOrTimeOperatorNames,\n relativeDateOrTimeOperatorNames\n} from './condition-operators'\n\nexport {\n timeUnits,\n dateUnits,\n dateTimeUnits,\n ConditionValue,\n DateDirections,\n RelativeTimeValue,\n conditionValueFrom\n} from './condition-values'\n\nexport { ConditionField } from './condition-field'\nexport { Condition } from './condition'\nexport { ConditionRef } from './condition-ref'\nexport { ConditionGroup } from './condition-group'\nexport { ConditionsModel } from './condition-model'\nexport { ConditionGroupDef } from './condition-group-def'\nexport { toExpression, toPresentationString } from './helpers'\n\nexport { Coordinator } from './
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/conditions/index.ts"],"sourcesContent":["export {\n getExpression,\n getOperatorConfig,\n getOperatorNames,\n absoluteDateOrTimeOperatorNames,\n relativeDateOrTimeOperatorNames\n} from './condition-operators'\n\nexport {\n timeUnits,\n dateUnits,\n dateTimeUnits,\n ConditionValue,\n DateDirections,\n RelativeTimeValue,\n conditionValueFrom\n} from './condition-values'\n\nexport { ConditionField } from './condition-field'\nexport { Condition } from './condition'\nexport { ConditionRef } from './condition-ref'\nexport { ConditionGroup } from './condition-group'\nexport { ConditionsModel } from './condition-model'\nexport { ConditionGroupDef } from './condition-group-def'\nexport { toExpression, toPresentationString } from './helpers'\n\nexport { Coordinator } from './enums'\n"],"mappings":""}
|
@@ -2,10 +2,6 @@ import { Condition } from './condition';
|
|
2
2
|
import { ConditionRef } from './condition-ref';
|
3
3
|
import { ConditionGroup } from './condition-group';
|
4
4
|
export type ConditionsArray = (Condition | ConditionGroup | ConditionRef)[];
|
5
|
-
export declare enum Coordinator {
|
6
|
-
AND = "and",
|
7
|
-
OR = "or"
|
8
|
-
}
|
9
5
|
export type DateTimeUnitValues = 'years' | 'months' | 'days' | 'hours' | 'minutes' | 'seconds';
|
10
6
|
export type DateUnits = {
|
11
7
|
YEARS: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conditions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,MAAM,eAAe,GAAG,CAAC,SAAS,GAAG,cAAc,GAAG,YAAY,CAAC,EAAE,CAAA;AAE3E,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/conditions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,MAAM,eAAe,GAAG,CAAC,SAAS,GAAG,cAAc,GAAG,YAAY,CAAC,EAAE,CAAA;AAE3E,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,QAAQ,GACR,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,CAAA;AAEb,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE;QAAE,OAAO,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAA;IAC7C,MAAM,EAAE;QAAE,OAAO,EAAE,UAAU,CAAC;QAAC,KAAK,EAAE,QAAQ,CAAA;KAAE,CAAA;IAChD,IAAI,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE;QAAE,OAAO,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAA;IAC7C,OAAO,EAAE;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,CAAA;IACnD,OAAO,EAAE;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,CAAA;CACpD,CAAA"}
|
@@ -1,24 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define([
|
3
|
+
define([], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(
|
5
|
+
factory();
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(
|
10
|
+
factory();
|
11
11
|
global.types = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function () {
|
14
14
|
"use strict";
|
15
|
-
|
16
|
-
_exports.__esModule = true;
|
17
|
-
_exports.Coordinator = void 0;
|
18
|
-
let Coordinator = _exports.Coordinator = /*#__PURE__*/function (Coordinator) {
|
19
|
-
Coordinator["AND"] = "and";
|
20
|
-
Coordinator["OR"] = "or";
|
21
|
-
return Coordinator;
|
22
|
-
}({});
|
23
15
|
});
|
24
16
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","names":[
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/conditions/types.ts"],"sourcesContent":["import { Condition } from './condition'\nimport { ConditionRef } from './condition-ref'\nimport { ConditionGroup } from './condition-group'\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 type 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 type 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":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/data-model/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
if (typeof define === "function" && define.amd) {
|
3
|
+
define(["exports"], factory);
|
4
|
+
} else if (typeof exports !== "undefined") {
|
5
|
+
factory(exports);
|
6
|
+
} else {
|
7
|
+
var mod = {
|
8
|
+
exports: {}
|
9
|
+
};
|
10
|
+
factory(mod.exports);
|
11
|
+
global.enums = mod.exports;
|
12
|
+
}
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
_exports.__esModule = true;
|
17
|
+
_exports.OutputType = void 0;
|
18
|
+
let OutputType = _exports.OutputType = /*#__PURE__*/function (OutputType) {
|
19
|
+
OutputType["Email"] = "email";
|
20
|
+
OutputType["Notify"] = "notify";
|
21
|
+
OutputType["Webhook"] = "webhook";
|
22
|
+
return OutputType;
|
23
|
+
}({});
|
24
|
+
});
|
25
|
+
//# sourceMappingURL=enums.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.js","names":["OutputType","_exports"],"sources":["../../../src/data-model/enums.ts"],"sourcesContent":["export enum OutputType {\n Email = 'email',\n Notify = 'notify',\n Webhook = 'webhook'\n}\n"],"mappings":";;;;;;;;;;;;;;;;;MAAYA,UAAU,GAAAC,QAAA,CAAAD,UAAA,0BAAVA,UAAU;IAAVA,UAAU;IAAVA,UAAU;IAAVA,UAAU;IAAA,OAAVA,UAAU;EAAA;AAAA"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { InputWrapper } from './input-wrapper';
|
2
2
|
export { ConditionsWrapper, ConditionRawData } from './conditions-wrapper';
|
3
3
|
export { Page, Item, Section, List, ConfirmationPage } from './types';
|
4
|
+
export { OutputType } from './enums';
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data-model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data-model/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "./input-wrapper", "./conditions-wrapper", "./types"], factory);
|
3
|
+
define(["exports", "./input-wrapper", "./conditions-wrapper", "./types", "./enums"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("./input-wrapper"), require("./conditions-wrapper"), require("./types"));
|
5
|
+
factory(exports, require("./input-wrapper"), require("./conditions-wrapper"), require("./types"), require("./enums"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.inputWrapper, global.conditionsWrapper, global.types);
|
10
|
+
factory(mod.exports, global.inputWrapper, global.conditionsWrapper, global.types, global.enums);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _inputWrapper, _conditionsWrapper, _types) {
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _inputWrapper, _conditionsWrapper, _types, _enums) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
@@ -50,6 +50,12 @@
|
|
50
50
|
return _types.List;
|
51
51
|
}
|
52
52
|
});
|
53
|
+
Object.defineProperty(_exports, "OutputType", {
|
54
|
+
enumerable: true,
|
55
|
+
get: function () {
|
56
|
+
return _enums.OutputType;
|
57
|
+
}
|
58
|
+
});
|
53
59
|
Object.defineProperty(_exports, "Page", {
|
54
60
|
enumerable: true,
|
55
61
|
get: function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/data-model/index.ts"],"sourcesContent":["export { InputWrapper } from './input-wrapper'\nexport { ConditionsWrapper, ConditionRawData } from './conditions-wrapper'\nexport { Page, Item, Section, List, ConfirmationPage } from './types'\n"],"mappings":""}
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/data-model/index.ts"],"sourcesContent":["export { InputWrapper } from './input-wrapper'\nexport { ConditionsWrapper, ConditionRawData } from './conditions-wrapper'\nexport { Page, Item, Section, List, ConfirmationPage } from './types'\nexport { OutputType } from './enums'\n"],"mappings":""}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ConditionRawData } from '.';
|
2
2
|
import { ComponentDef } from '../components/types';
|
3
|
+
import { OutputType } from './enums';
|
3
4
|
type Toggleable<T> = boolean | T;
|
4
5
|
export interface Next {
|
5
6
|
path: string;
|
@@ -60,11 +61,6 @@ export type MultipleApiKeys = {
|
|
60
61
|
test?: string;
|
61
62
|
production?: string;
|
62
63
|
};
|
63
|
-
export declare enum OutputType {
|
64
|
-
Email = "email",
|
65
|
-
Notify = "notify",
|
66
|
-
Webhook = "webhook"
|
67
|
-
}
|
68
64
|
export type EmailOutputConfiguration = {
|
69
65
|
emailAddress: string;
|
70
66
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/data-model/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/data-model/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC,KAAK,UAAU,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,CAAA;AAEhC,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AACD,MAAM,MAAM,IAAI,GAAG,IAAI,CAAA;AAEvB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SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACjC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAA;IAChD,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA"}
|
@@ -14,14 +14,7 @@
|
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
17
|
-
_exports.OutputType = void 0;
|
18
17
|
_exports.isMultipleApiKey = isMultipleApiKey;
|
19
|
-
let OutputType = _exports.OutputType = /*#__PURE__*/function (OutputType) {
|
20
|
-
OutputType["Email"] = "email";
|
21
|
-
OutputType["Notify"] = "notify";
|
22
|
-
OutputType["Webhook"] = "webhook";
|
23
|
-
return OutputType;
|
24
|
-
}({});
|
25
18
|
function isMultipleApiKey(payApiKey) {
|
26
19
|
const obj = payApiKey;
|
27
20
|
return obj.test !== undefined || obj.production !== undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","names":["
|
1
|
+
{"version":3,"file":"types.js","names":["isMultipleApiKey","payApiKey","obj","test","undefined","production"],"sources":["../../../src/data-model/types.ts"],"sourcesContent":["import { ConditionRawData } from '.'\nimport { ComponentDef } from '../components/types'\nimport { OutputType } from './enums'\n\ntype Toggleable<T> = boolean | T\n\nexport interface Next {\n path: string\n condition?: string\n}\nexport type Link = Next\n\nexport interface Page {\n title: string\n path: string\n controller: string\n components?: ComponentDef[]\n section: string // the section ID\n next?: { path: string; condition?: string }[]\n}\n\nexport interface RepeatingFieldPage extends Page {\n controller: 'RepeatingFieldPageController'\n options: {\n summaryDisplayMode?: {\n samePage?: boolean\n separatePage?: boolean\n hideRowTitles?: boolean\n }\n customText?: {\n separatePageTitle?: string\n }\n }\n}\n\nexport interface Section {\n name: string\n title: string\n hideTitle: boolean\n}\n\nexport interface Item {\n text: string\n value: string | number | boolean\n description?: string\n condition?: string\n}\n\nexport interface List {\n name: string\n title: string\n type: 'string' | 'number' | 'boolean'\n items: Item[]\n}\n\nexport interface Feedback {\n feedbackForm?: boolean\n url?: string\n emailAddress?: string\n}\n\nexport type PhaseBanner = {\n phase?: 'alpha' | 'beta'\n feedbackUrl?: string\n}\n\nexport type MultipleApiKeys = {\n test?: string\n production?: string\n}\n\nexport type EmailOutputConfiguration = {\n emailAddress: string\n}\n\nexport type NotifyOutputConfiguration = {\n apiKey: string\n templateId: string\n emailField: string\n personalisation: string[]\n personalisationFieldCustomisation?: {\n [personalisationName: string]: string[]\n }\n addReferencesToPersonalisation?: boolean\n emailReplyToIdConfiguration?: {\n emailReplyToId: string\n condition?: string | undefined\n }[]\n}\n\nexport type WebhookOutputConfiguration = {\n url: string\n}\n\nexport type OutputConfiguration =\n | EmailOutputConfiguration\n | NotifyOutputConfiguration\n | WebhookOutputConfiguration\n\nexport type Output = {\n name: string\n title: string\n type: OutputType\n outputConfiguration: OutputConfiguration\n}\n\nexport type ConfirmationPage = {\n customText: {\n title: string\n paymentSkipped: Toggleable<string>\n nextSteps: Toggleable<string>\n }\n components: ComponentDef[]\n}\n\nexport type PaymentSkippedWarningPage = {\n customText: {\n title: string\n caption: string\n body: string\n }\n}\n\nexport type SpecialPages = {\n confirmationPage?: ConfirmationPage\n paymentSkippedWarningPage?: PaymentSkippedWarningPage\n}\n\nexport function isMultipleApiKey(\n payApiKey: string | MultipleApiKeys | undefined\n): payApiKey is MultipleApiKeys {\n const obj = payApiKey as MultipleApiKeys\n return obj.test !== undefined || obj.production !== undefined\n}\n\nexport type Fee = {\n description: string\n amount: number\n multiplier?: string\n condition?: string\n prefix?: string\n}\n\nexport type FeeOptions = {\n paymentReferenceFormat?: string\n payReturnUrl?: string\n allowSubmissionWithoutPayment: boolean\n maxAttempts: number\n customPayErrorMessage?: string\n showPaymentSkippedWarningPage: boolean\n}\n\n/**\n * `FormDefinition` is a typescript representation of `Schema`\n */\nexport type FormDefinition = {\n pages: Array<Page | RepeatingFieldPage>\n conditions: ConditionRawData[]\n lists: List[]\n sections: Section[]\n startPage?: Page['path'] | undefined\n name?: string | undefined\n feedback?: Feedback\n phaseBanner?: PhaseBanner\n fees: Fee[]\n skipSummary?: boolean | undefined\n outputs: Output[]\n declaration?: string | undefined\n metadata?: Record<string, any>\n payApiKey?: string | MultipleApiKeys | undefined\n specialPages?: SpecialPages\n paymentReferenceFormat?: string\n feeOptions: FeeOptions\n}\n"],"mappings":";;;;;;;;;;;;;;;;;EAgIO,SAASA,gBAAgBA,CAC9BC,SAA+C,EACjB;IAC9B,MAAMC,GAAG,GAAGD,SAA4B;IACxC,OAAOC,GAAG,CAACC,IAAI,KAAKC,SAAS,IAAIF,GAAG,CAACG,UAAU,KAAKD,SAAS;EAC/D;;EAmBA;AACA;AACA;AAFA"}
|
package/dist/browser/index.d.ts
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
export { Schema, componentSchema } from './schema';
|
2
|
-
export { ConditionRawData, ConditionsWrapper } from './data-model';
|
2
|
+
export { ConditionRawData, ConditionsWrapper, OutputType } from './data-model';
|
3
3
|
export { Logger } from './utils/logger';
|
4
4
|
export { FormConfiguration } from './form';
|
5
|
-
export { ComponentTypes, ConditionalComponentTypes } from './components';
|
6
|
-
export * from './components/types';
|
5
|
+
export { ComponentTypeEnum, ComponentTypes, ConditionalComponentTypes } from './components';
|
7
6
|
export * from './conditions';
|
8
7
|
export * from './utils/helpers';
|
9
8
|
export * from './migration';
|
10
|
-
export * from './
|
11
|
-
export
|
9
|
+
export type * from './components/types';
|
10
|
+
export type * from './data-model/types';
|
12
11
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAC1C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,yBAAyB,EAC1B,MAAM,cAAc,CAAA;AACrB,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,oBAAoB,CAAA"}
|
package/dist/browser/index.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
(function (global, factory) {
|
2
2
|
if (typeof define === "function" && define.amd) {
|
3
|
-
define(["exports", "./schema", "./data-model", "./utils/logger", "./form", "./components", "./
|
3
|
+
define(["exports", "./schema", "./data-model", "./utils/logger", "./form", "./components", "./conditions", "./utils/helpers", "./migration"], factory);
|
4
4
|
} else if (typeof exports !== "undefined") {
|
5
|
-
factory(exports, require("./schema"), require("./data-model"), require("./utils/logger"), require("./form"), require("./components"), require("./
|
5
|
+
factory(exports, require("./schema"), require("./data-model"), require("./utils/logger"), require("./form"), require("./components"), require("./conditions"), require("./utils/helpers"), require("./migration"));
|
6
6
|
} else {
|
7
7
|
var mod = {
|
8
8
|
exports: {}
|
9
9
|
};
|
10
|
-
factory(mod.exports, global.schema, global.dataModel, global.logger, global.form, global.components, global.
|
10
|
+
factory(mod.exports, global.schema, global.dataModel, global.logger, global.form, global.components, global.conditions, global.helpers, global.migration);
|
11
11
|
global.index = mod.exports;
|
12
12
|
}
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _schema, _dataModel, _logger, _form, _components,
|
13
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _schema, _dataModel, _logger, _form, _components, _conditions, _helpers, _migration) {
|
14
14
|
"use strict";
|
15
15
|
|
16
16
|
_exports.__esModule = true;
|
@@ -19,12 +19,19 @@
|
|
19
19
|
componentSchema: true,
|
20
20
|
ConditionRawData: true,
|
21
21
|
ConditionsWrapper: true,
|
22
|
+
OutputType: true,
|
22
23
|
Logger: true,
|
23
24
|
FormConfiguration: true,
|
25
|
+
ComponentTypeEnum: true,
|
24
26
|
ComponentTypes: true,
|
25
|
-
ConditionalComponentTypes: true
|
26
|
-
whichMigrations: true
|
27
|
+
ConditionalComponentTypes: true
|
27
28
|
};
|
29
|
+
Object.defineProperty(_exports, "ComponentTypeEnum", {
|
30
|
+
enumerable: true,
|
31
|
+
get: function () {
|
32
|
+
return _components.ComponentTypeEnum;
|
33
|
+
}
|
34
|
+
});
|
28
35
|
Object.defineProperty(_exports, "ComponentTypes", {
|
29
36
|
enumerable: true,
|
30
37
|
get: function () {
|
@@ -61,35 +68,24 @@
|
|
61
68
|
return _logger.Logger;
|
62
69
|
}
|
63
70
|
});
|
64
|
-
Object.defineProperty(_exports, "
|
71
|
+
Object.defineProperty(_exports, "OutputType", {
|
65
72
|
enumerable: true,
|
66
73
|
get: function () {
|
67
|
-
return
|
74
|
+
return _dataModel.OutputType;
|
68
75
|
}
|
69
76
|
});
|
70
|
-
Object.defineProperty(_exports, "
|
77
|
+
Object.defineProperty(_exports, "Schema", {
|
71
78
|
enumerable: true,
|
72
79
|
get: function () {
|
73
|
-
return _schema.
|
80
|
+
return _schema.Schema;
|
74
81
|
}
|
75
82
|
});
|
76
|
-
Object.defineProperty(_exports, "
|
83
|
+
Object.defineProperty(_exports, "componentSchema", {
|
77
84
|
enumerable: true,
|
78
85
|
get: function () {
|
79
|
-
return
|
86
|
+
return _schema.componentSchema;
|
80
87
|
}
|
81
88
|
});
|
82
|
-
Object.keys(_types).forEach(function (key) {
|
83
|
-
if (key === "default" || key === "__esModule") return;
|
84
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
85
|
-
if (key in _exports && _exports[key] === _types[key]) return;
|
86
|
-
Object.defineProperty(_exports, key, {
|
87
|
-
enumerable: true,
|
88
|
-
get: function () {
|
89
|
-
return _types[key];
|
90
|
-
}
|
91
|
-
});
|
92
|
-
});
|
93
89
|
Object.keys(_conditions).forEach(function (key) {
|
94
90
|
if (key === "default" || key === "__esModule") return;
|
95
91
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -123,16 +119,5 @@
|
|
123
119
|
}
|
124
120
|
});
|
125
121
|
});
|
126
|
-
Object.keys(_types2).forEach(function (key) {
|
127
|
-
if (key === "default" || key === "__esModule") return;
|
128
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
129
|
-
if (key in _exports && _exports[key] === _types2[key]) return;
|
130
|
-
Object.defineProperty(_exports, key, {
|
131
|
-
enumerable: true,
|
132
|
-
get: function () {
|
133
|
-
return _types2[key];
|
134
|
-
}
|
135
|
-
});
|
136
|
-
});
|
137
122
|
});
|
138
123
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["Object","keys","
|
1
|
+
{"version":3,"file":"index.js","names":["Object","keys","_conditions","forEach","key","prototype","hasOwnProperty","call","_exportNames","_exports","defineProperty","enumerable","get","_helpers","_migration"],"sources":["../../src/index.ts"],"sourcesContent":["export { Schema, componentSchema } from './schema'\nexport { ConditionRawData, ConditionsWrapper, OutputType } from './data-model'\nexport { Logger } from './utils/logger'\nexport { FormConfiguration } from './form'\nexport {\n ComponentTypeEnum,\n ComponentTypes,\n ConditionalComponentTypes\n} from './components'\nexport * from './conditions'\nexport * from './utils/helpers'\nexport * from './migration'\nexport type * from './components/types'\nexport type * from './data-model/types'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASAA,MAAA,CAAAC,IAAA,CAAAC,WAAA,EAAAC,OAAA,WAAAC,GAAA;IAAA,IAAAA,GAAA,kBAAAA,GAAA;IAAA,IAAAJ,MAAA,CAAAK,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;IAAA,IAAAA,GAAA,IAAAK,QAAA,IAAAA,QAAA,CAAAL,GAAA,MAAAF,WAAA,CAAAE,GAAA;IAAAJ,MAAA,CAAAU,cAAA,CAAAD,QAAA,EAAAL,GAAA;MAAAO,UAAA;MAAAC,GAAA,WAAAA,CAAA;QAAA,OAAAV,WAAA,CAAAE,GAAA;MAAA;IAAA;EAAA;EACAJ,MAAA,CAAAC,IAAA,CAAAY,QAAA,EAAAV,OAAA,WAAAC,GAAA;IAAA,IAAAA,GAAA,kBAAAA,GAAA;IAAA,IAAAJ,MAAA,CAAAK,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;IAAA,IAAAA,GAAA,IAAAK,QAAA,IAAAA,QAAA,CAAAL,GAAA,MAAAS,QAAA,CAAAT,GAAA;IAAAJ,MAAA,CAAAU,cAAA,CAAAD,QAAA,EAAAL,GAAA;MAAAO,UAAA;MAAAC,GAAA,WAAAA,CAAA;QAAA,OAAAC,QAAA,CAAAT,GAAA;MAAA;IAAA;EAAA;EACAJ,MAAA,CAAAC,IAAA,CAAAa,UAAA,EAAAX,OAAA,WAAAC,GAAA;IAAA,IAAAA,GAAA,kBAAAA,GAAA;IAAA,IAAAJ,MAAA,CAAAK,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;IAAA,IAAAA,GAAA,IAAAK,QAAA,IAAAA,QAAA,CAAAL,GAAA,MAAAU,UAAA,CAAAV,GAAA;IAAAJ,MAAA,CAAAU,cAAA,CAAAD,QAAA,EAAAL,GAAA;MAAAO,UAAA;MAAAC,GAAA,WAAAA,CAAA;QAAA,OAAAE,UAAA,CAAAV,GAAA;MAAA;IAAA;EAAA;AAA2B"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
export declare enum ComponentTypeEnum {
|
2
|
+
TextField = "TextField",
|
3
|
+
MultilineTextField = "MultilineTextField",
|
4
|
+
YesNoField = "YesNoField",
|
5
|
+
DateField = "DateField",
|
6
|
+
TimeField = "TimeField",
|
7
|
+
DateTimeField = "DateTimeField",
|
8
|
+
DatePartsField = "DatePartsField",
|
9
|
+
MonthYearField = "MonthYearField",
|
10
|
+
DateTimePartsField = "DateTimePartsField",
|
11
|
+
SelectField = "SelectField",
|
12
|
+
AutocompleteField = "AutocompleteField",
|
13
|
+
RadiosField = "RadiosField",
|
14
|
+
CheckboxesField = "CheckboxesField",
|
15
|
+
NumberField = "NumberField",
|
16
|
+
UkAddressField = "UkAddressField",
|
17
|
+
TelephoneNumberField = "TelephoneNumberField",
|
18
|
+
EmailAddressField = "EmailAddressField",
|
19
|
+
FileUploadField = "FileUploadField",
|
20
|
+
Para = "Para",
|
21
|
+
Html = "Html",
|
22
|
+
InsetText = "InsetText",
|
23
|
+
Details = "Details",
|
24
|
+
FlashCard = "FlashCard",
|
25
|
+
List = "List"
|
26
|
+
}
|
27
|
+
//# sourceMappingURL=enums.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,IAAI,SAAS;CACd"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
exports.__esModule = true;
|
4
|
+
exports.ComponentTypeEnum = void 0;
|
5
|
+
let ComponentTypeEnum = exports.ComponentTypeEnum = /*#__PURE__*/function (ComponentTypeEnum) {
|
6
|
+
ComponentTypeEnum["TextField"] = "TextField";
|
7
|
+
ComponentTypeEnum["MultilineTextField"] = "MultilineTextField";
|
8
|
+
ComponentTypeEnum["YesNoField"] = "YesNoField";
|
9
|
+
ComponentTypeEnum["DateField"] = "DateField";
|
10
|
+
ComponentTypeEnum["TimeField"] = "TimeField";
|
11
|
+
ComponentTypeEnum["DateTimeField"] = "DateTimeField";
|
12
|
+
ComponentTypeEnum["DatePartsField"] = "DatePartsField";
|
13
|
+
ComponentTypeEnum["MonthYearField"] = "MonthYearField";
|
14
|
+
ComponentTypeEnum["DateTimePartsField"] = "DateTimePartsField";
|
15
|
+
ComponentTypeEnum["SelectField"] = "SelectField";
|
16
|
+
ComponentTypeEnum["AutocompleteField"] = "AutocompleteField";
|
17
|
+
ComponentTypeEnum["RadiosField"] = "RadiosField";
|
18
|
+
ComponentTypeEnum["CheckboxesField"] = "CheckboxesField";
|
19
|
+
ComponentTypeEnum["NumberField"] = "NumberField";
|
20
|
+
ComponentTypeEnum["UkAddressField"] = "UkAddressField";
|
21
|
+
ComponentTypeEnum["TelephoneNumberField"] = "TelephoneNumberField";
|
22
|
+
ComponentTypeEnum["EmailAddressField"] = "EmailAddressField";
|
23
|
+
ComponentTypeEnum["FileUploadField"] = "FileUploadField";
|
24
|
+
ComponentTypeEnum["Para"] = "Para";
|
25
|
+
ComponentTypeEnum["Html"] = "Html";
|
26
|
+
ComponentTypeEnum["InsetText"] = "InsetText";
|
27
|
+
ComponentTypeEnum["Details"] = "Details";
|
28
|
+
ComponentTypeEnum["FlashCard"] = "FlashCard";
|
29
|
+
ComponentTypeEnum["List"] = "List";
|
30
|
+
return ComponentTypeEnum;
|
31
|
+
}({});
|
32
|
+
//# sourceMappingURL=enums.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"enums.js","names":["ComponentTypeEnum","exports"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentTypeEnum {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DateField = 'DateField',\n TimeField = 'TimeField',\n DateTimeField = 'DateTimeField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n DateTimePartsField = 'DateTimePartsField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n FileUploadField = 'FileUploadField',\n Para = 'Para',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n FlashCard = 'FlashCard',\n List = 'List'\n}\n"],"mappings":";;;;IAAYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { ComponentTypes } from './component-types';
|
2
2
|
export { ConditionalComponentTypes } from './conditional-component-types';
|
3
|
-
export
|
3
|
+
export { ComponentTypeEnum } from './enums';
|
4
|
+
export type * from './types';
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AACzE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,mBAAmB,SAAS,CAAA"}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
exports.__esModule = true;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
Object.defineProperty(exports, "ComponentTypeEnum", {
|
5
|
+
enumerable: true,
|
6
|
+
get: function () {
|
7
|
+
return _enums.ComponentTypeEnum;
|
8
|
+
}
|
9
|
+
});
|
8
10
|
Object.defineProperty(exports, "ComponentTypes", {
|
9
11
|
enumerable: true,
|
10
12
|
get: function () {
|
@@ -19,16 +21,5 @@ Object.defineProperty(exports, "ConditionalComponentTypes", {
|
|
19
21
|
});
|
20
22
|
var _componentTypes = require("./component-types");
|
21
23
|
var _conditionalComponentTypes = require("./conditional-component-types");
|
22
|
-
var
|
23
|
-
Object.keys(_types).forEach(function (key) {
|
24
|
-
if (key === "default" || key === "__esModule") return;
|
25
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
26
|
-
if (key in exports && exports[key] === _types[key]) return;
|
27
|
-
Object.defineProperty(exports, key, {
|
28
|
-
enumerable: true,
|
29
|
-
get: function () {
|
30
|
-
return _types[key];
|
31
|
-
}
|
32
|
-
});
|
33
|
-
});
|
24
|
+
var _enums = require("./enums");
|
34
25
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["_componentTypes","require","_conditionalComponentTypes","
|
1
|
+
{"version":3,"file":"index.js","names":["_componentTypes","require","_conditionalComponentTypes","_enums"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from './component-types'\nexport { ConditionalComponentTypes } from './conditional-component-types'\nexport { ComponentTypeEnum } from './enums'\nexport type * from './types'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA"}
|