@carbonbox/domain 0.39.0 → 0.40.0
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/build/carbonbox/reporting/shared/domain/value-objects/ReportSection.js +4 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportBlockClientInputPrimitives.d.ts +8 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportBlockClientInputPrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/reporting/shared/domain/value-objects/ReportSection.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -92,6 +92,10 @@ class ReportSection extends ValueObject_1.ValueObject {
|
|
|
92
92
|
if (!isChoice && Array.isArray(block.clientInput.options) && block.clientInput.options.length > 0) {
|
|
93
93
|
throw InvalidReportBlockClientInputError_1.InvalidReportBlockClientInputError.create(sectionId, block.id, `fieldType '${block.clientInput.fieldType}' must not define options`);
|
|
94
94
|
}
|
|
95
|
+
if (block.clientInput.providesDataBindingSource !== null
|
|
96
|
+
&& !Object.values(DataBindingSource_1.DataBindingSource).includes(block.clientInput.providesDataBindingSource)) {
|
|
97
|
+
throw InvalidReportBlockClientInputError_1.InvalidReportBlockClientInputError.create(sectionId, block.id, `providesDataBindingSource '${block.clientInput.providesDataBindingSource}' is not part of the DataBindingSource catalogue`);
|
|
98
|
+
}
|
|
95
99
|
}
|
|
96
100
|
getId() {
|
|
97
101
|
return this.value.id;
|
package/build/types/carbonbox/reporting/shared/domain/types/ReportBlockClientInputPrimitives.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ClientInputFieldType } from '../enums/ClientInputFieldType';
|
|
2
|
+
import { DataBindingSource } from '../enums/DataBindingSource';
|
|
2
3
|
/**
|
|
3
4
|
* Client input descriptor of a CLIENT_INPUT block.
|
|
4
5
|
* Defines the questionnaire question the client must answer to fill the block.
|
|
@@ -10,5 +11,12 @@ export interface ReportBlockClientInputPrimitives {
|
|
|
10
11
|
readonly options: string[];
|
|
11
12
|
readonly isRequired: boolean;
|
|
12
13
|
readonly aiInstruction: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Entry of the DataBindingSource catalogue this answer provides (e.g. `organizational.approach`
|
|
16
|
+
* for the consolidation approach question), so DATA_BOUND blocks bound to that entry are
|
|
17
|
+
* filled from the client's frozen answer instead of the data snapshot. Null when the answer
|
|
18
|
+
* only feeds its own block.
|
|
19
|
+
*/
|
|
20
|
+
readonly providesDataBindingSource: DataBindingSource | null;
|
|
13
21
|
}
|
|
14
22
|
//# sourceMappingURL=ReportBlockClientInputPrimitives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportBlockClientInputPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/types/ReportBlockClientInputPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"ReportBlockClientInputPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/types/ReportBlockClientInputPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,yBAAyB,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportSection.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/value-objects/ReportSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAWvE,qBAAa,aAAc,SAAQ,WAAW,CAAC,uBAAuB,CAAC;IACrE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAExD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAA6B;IAElE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAGxC;IAEF,OAAO;WAaO,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,aAAa;WAIrD,cAAc,CAAC,UAAU,EAAE,uBAAuB,GAAG,aAAa;IAIhF,OAAO,CAAC,qBAAqB;IAuB7B;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAwBhC;;;OAGG;IACH,OAAO,CAAC,wBAAwB;
|
|
1
|
+
{"version":3,"file":"ReportSection.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/value-objects/ReportSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAWvE,qBAAa,aAAc,SAAQ,WAAW,CAAC,uBAAuB,CAAC;IACrE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAExD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAA6B;IAElE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAGxC;IAEF,OAAO;WAaO,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,aAAa;WAIrD,cAAc,CAAC,UAAU,EAAE,uBAAuB,GAAG,aAAa;IAIhF,OAAO,CAAC,qBAAqB;IAuB7B;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAwBhC;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAyCzB,KAAK,IAAI,MAAM;IAIf,QAAQ,IAAI,MAAM;IAIlB,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,SAAS,uBAAuB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE;IAIxE;;OAEG;IACI,oBAAoB,IAAI,SAAS,qBAAqB,EAAE;IAI/D;;OAEG;IACI,kBAAkB,IAAI,SAAS,qBAAqB,EAAE;IAItD,UAAU,IAAI,OAAO;IAIrB,SAAS,IAAI,OAAO;IAIpB,YAAY,IAAI,uBAAuB;CAU/C"}
|