@golemio/fypr 1.4.1-dev.2487745816 → 1.4.1-dev.2488394786
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/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.d.ts +3 -1
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js +23 -5
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js.map +1 -1
- package/dist/output-gateway/fypr/service/transformation/InformationPanelsTransformations.d.ts +109 -0
- package/dist/output-gateway/fypr/service/transformation/InformationPanelsTransformations.js +27 -0
- package/dist/output-gateway/fypr/service/transformation/InformationPanelsTransformations.js.map +1 -0
- package/dist/output-gateway/interfaces/IOGInformationPanel.d.ts +4 -0
- package/dist/output-gateway/interfaces/IOGInformationPanel.js +3 -0
- package/dist/output-gateway/interfaces/IOGInformationPanel.js.map +1 -0
- package/dist/output-gateway/ioc/Di.js +5 -0
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/FYPROGContainerTokens.d.ts +1 -0
- package/dist/output-gateway/ioc/FYPROGContainerTokens.js +3 -0
- package/dist/output-gateway/ioc/FYPROGContainerTokens.js.map +1 -1
- package/dist/schema-definitions/translation/index.js +5 -6
- package/dist/schema-definitions/translation/index.js.map +1 -1
- package/dist/schema-definitions/translation/information-panels.json +13 -4
- package/docs/asyncapi.yaml +5 -3
- package/docs/openapi-output.yaml +8 -4
- package/docs/translations.md +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { FyprElementRepository } from "../../data-access/FyprElementRepository";
|
|
2
|
+
import { InformationPanelsTransformation } from "../../service/transformation/InformationPanelsTransformations";
|
|
2
3
|
import { FyprElementKind } from "../../../shared/constants";
|
|
3
4
|
import { AnyFyprElement } from "../../../../schema-definitions";
|
|
4
5
|
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
5
6
|
import { NextFunction, Request, RequestHandler, Response } from "@golemio/core/dist/shared/express";
|
|
6
7
|
export declare class V1FyprElementKindsController {
|
|
7
8
|
private repositories;
|
|
9
|
+
private informationPanelsTransformation;
|
|
8
10
|
private readonly defaultLimit;
|
|
9
|
-
constructor(repositories: Map<FyprElementKind, FyprElementRepository<AnyFyprElement>>, config: ISimpleConfig);
|
|
11
|
+
constructor(repositories: Map<FyprElementKind, FyprElementRepository<AnyFyprElement>>, informationPanelsTransformation: InformationPanelsTransformation, config: ISimpleConfig);
|
|
10
12
|
private getRepositoryByKind;
|
|
11
13
|
getIndex(basePath: string): RequestHandler;
|
|
12
14
|
getAll: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
@@ -13,6 +13,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.V1FyprElementKindsController = void 0;
|
|
16
|
+
const InformationPanelsTransformations_1 = require("../../service/transformation/InformationPanelsTransformations");
|
|
16
17
|
const FYPROGContainerTokens_1 = require("../../../ioc/FYPROGContainerTokens");
|
|
17
18
|
const _sch_1 = require("../../../../schema-definitions");
|
|
18
19
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
@@ -20,8 +21,9 @@ const express_validator_1 = require("@golemio/core/dist/shared/express-validator
|
|
|
20
21
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
21
22
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
22
23
|
let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
23
|
-
constructor(repositories, config) {
|
|
24
|
+
constructor(repositories, informationPanelsTransformation, config) {
|
|
24
25
|
this.repositories = repositories;
|
|
26
|
+
this.informationPanelsTransformation = informationPanelsTransformation;
|
|
25
27
|
this.getAll = async (req, res, next) => {
|
|
26
28
|
try {
|
|
27
29
|
const { kind, limit, offset } = (0, express_validator_1.matchedData)(req);
|
|
@@ -30,7 +32,14 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
|
30
32
|
limit: effectiveLimit,
|
|
31
33
|
offset: offset != null ? Number(offset) : undefined,
|
|
32
34
|
});
|
|
33
|
-
|
|
35
|
+
// if more kinds need transformation, consider extracting to a transformation dispatcher
|
|
36
|
+
switch (kind) {
|
|
37
|
+
case "information-panels":
|
|
38
|
+
res.status(200).json(this.informationPanelsTransformation.transformArray(data));
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
res.status(200).json(data);
|
|
42
|
+
}
|
|
34
43
|
}
|
|
35
44
|
catch (err) {
|
|
36
45
|
next(err);
|
|
@@ -43,7 +52,14 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
|
|
|
43
52
|
if (!data) {
|
|
44
53
|
throw new golemio_errors_1.GeneralError("FYPR element not found.", this.constructor.name, undefined, 404);
|
|
45
54
|
}
|
|
46
|
-
|
|
55
|
+
// if more kinds need transformation, consider extracting to a transformation dispatcher
|
|
56
|
+
switch (kind) {
|
|
57
|
+
case "information-panels":
|
|
58
|
+
res.status(200).json(this.informationPanelsTransformation.transformElement(data));
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
res.status(200).json(data);
|
|
62
|
+
}
|
|
47
63
|
}
|
|
48
64
|
catch (err) {
|
|
49
65
|
next(err);
|
|
@@ -72,7 +88,9 @@ exports.V1FyprElementKindsController = V1FyprElementKindsController;
|
|
|
72
88
|
exports.V1FyprElementKindsController = V1FyprElementKindsController = __decorate([
|
|
73
89
|
(0, tsyringe_1.injectable)(),
|
|
74
90
|
__param(0, (0, tsyringe_1.inject)(FYPROGContainerTokens_1.fyprOGContainerTokens.FyprElementRepositoriesMap)),
|
|
75
|
-
__param(1, (0, tsyringe_1.inject)(
|
|
76
|
-
|
|
91
|
+
__param(1, (0, tsyringe_1.inject)(FYPROGContainerTokens_1.fyprOGContainerTokens.InformationPanelsTransformation)),
|
|
92
|
+
__param(2, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
|
|
93
|
+
__metadata("design:paramtypes", [Map,
|
|
94
|
+
InformationPanelsTransformations_1.InformationPanelsTransformation, Object])
|
|
77
95
|
], V1FyprElementKindsController);
|
|
78
96
|
//# sourceMappingURL=V1FyprElementKindsController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1FyprElementKindsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,8EAAsE;AAEtE,yDAAwD;
|
|
1
|
+
{"version":3,"file":"V1FyprElementKindsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,oHAAmH;AACnH,8EAAsE;AAEtE,yDAAwD;AAGxD,wEAAqE;AAErE,mFAA0E;AAC1E,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGrC,YAEI,YAAiF,EAEjF,+BAAwE,EAExE,MAAqB;QAJb,iBAAY,GAAZ,YAAY,CAA6D;QAEzE,oCAA+B,GAA/B,+BAA+B,CAAiC;QAwBrE,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAiB,EAAE;YACrF,IAAI,CAAC;gBACD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAA,+BAAW,EAAC,GAAG,CAAC,CAAC;gBACjD,MAAM,cAAc,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;gBACzF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;oBACrD,KAAK,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T,GAAG;QAEgB,kEAA+B;GAPnE,4BAA4B,CAuExC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { IOGInformationPanel } from "../../../interfaces/IOGInformationPanel";
|
|
2
|
+
import { IInformationPanel } from "../../../../schema-definitions/models/interfaces/IInformationPanel";
|
|
3
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
|
+
export declare class InformationPanelsTransformation extends AbstractTransformation<IInformationPanel, IOGInformationPanel> {
|
|
5
|
+
name: string;
|
|
6
|
+
protected transformInternal: (element: IInformationPanel) => {
|
|
7
|
+
presets: string[] | null;
|
|
8
|
+
stop_name: string | null;
|
|
9
|
+
stop_direction: string | null;
|
|
10
|
+
platform_code: string | null;
|
|
11
|
+
stop_type: string[] | null;
|
|
12
|
+
thmp_stop_id: string | null;
|
|
13
|
+
land_parcel_number: string | null;
|
|
14
|
+
land_owner: string | null;
|
|
15
|
+
workday_boarding_count: number | null;
|
|
16
|
+
lines: string | null;
|
|
17
|
+
location_description: string | null;
|
|
18
|
+
location_verification_on_street_light: string | null;
|
|
19
|
+
shelter_type: string | null;
|
|
20
|
+
shelter_id: string | null;
|
|
21
|
+
street_light_number: string | null;
|
|
22
|
+
surface_type: string | null;
|
|
23
|
+
connection_state: string | null;
|
|
24
|
+
connection_type: string | null;
|
|
25
|
+
connection_mode: string | null;
|
|
26
|
+
priority: string | null;
|
|
27
|
+
investor_action: string | null;
|
|
28
|
+
design_request: string | null;
|
|
29
|
+
design_state: string | null;
|
|
30
|
+
design_order_number: string | null;
|
|
31
|
+
design_registry_publication: string | null;
|
|
32
|
+
design_invoice_paid: string | null;
|
|
33
|
+
production_order_number: string | null;
|
|
34
|
+
production_state: string | null;
|
|
35
|
+
production_registry_publication: string | null;
|
|
36
|
+
production_invoice_paid: string | null;
|
|
37
|
+
realization_request: boolean | null;
|
|
38
|
+
realization_state: string | null;
|
|
39
|
+
realization_order_number: string | null;
|
|
40
|
+
realization_registry_publication: string | null;
|
|
41
|
+
realization_invoice_paid: string | null;
|
|
42
|
+
name_for_visually_impaired: string | null;
|
|
43
|
+
voice_day: string | null;
|
|
44
|
+
voice_night: string | null;
|
|
45
|
+
templates: string | null;
|
|
46
|
+
data_source: string | null;
|
|
47
|
+
imsi: string | null;
|
|
48
|
+
connection_point: string | null;
|
|
49
|
+
connection_point_number: string | null;
|
|
50
|
+
foundation_type: string | null;
|
|
51
|
+
warranty_end: string | null;
|
|
52
|
+
initial_revision: string | null;
|
|
53
|
+
next_revision: string | null;
|
|
54
|
+
electronics_service: boolean | null;
|
|
55
|
+
electronics_service_end: string | null;
|
|
56
|
+
asset_registered: boolean | null;
|
|
57
|
+
asset_number: string | null;
|
|
58
|
+
insurance: boolean | null;
|
|
59
|
+
handed_over_to_ozp: boolean | null;
|
|
60
|
+
dpp_documentation_request: boolean | null;
|
|
61
|
+
dpp_documentation_handover_date: string | null;
|
|
62
|
+
design_deadline: string | null;
|
|
63
|
+
production_deadline: string | null;
|
|
64
|
+
ropid_documentation_submitted: string[] | null;
|
|
65
|
+
ropid_documentation_handover_date: string | null;
|
|
66
|
+
dpp_documentation_submitted: string[] | null;
|
|
67
|
+
realization_deadline: string | null;
|
|
68
|
+
device_id: string | null;
|
|
69
|
+
asw_node_id: string | null;
|
|
70
|
+
asw_stop_id: string | null;
|
|
71
|
+
power_consumption_watt: number | null;
|
|
72
|
+
thmp_element_number: string | null;
|
|
73
|
+
electricity_supply_contract: string | null;
|
|
74
|
+
cleaning_frequency: string | null;
|
|
75
|
+
electricity_consumption_price: number | null;
|
|
76
|
+
construction_type: string | null;
|
|
77
|
+
panel_size: string | null;
|
|
78
|
+
design_price_without_vat: number | null;
|
|
79
|
+
production_price_without_vat: number | null;
|
|
80
|
+
realization_price_without_vat: number | null;
|
|
81
|
+
serial_number: string | null;
|
|
82
|
+
producer: string | null;
|
|
83
|
+
producer_contact_person: string | null;
|
|
84
|
+
panel_technology: string | null;
|
|
85
|
+
panel_model: string | null;
|
|
86
|
+
owner_contact: string | null;
|
|
87
|
+
connectivity_internet: string | null;
|
|
88
|
+
phone_number: string | null;
|
|
89
|
+
document_id: string;
|
|
90
|
+
uid: string | null;
|
|
91
|
+
kind: string | null;
|
|
92
|
+
name: string | null;
|
|
93
|
+
state: string | null;
|
|
94
|
+
owner: string | null;
|
|
95
|
+
manager: string | null;
|
|
96
|
+
city_district: string | null;
|
|
97
|
+
lat: number | null;
|
|
98
|
+
lon: number | null;
|
|
99
|
+
map_link: string | null;
|
|
100
|
+
planned_year_of_realization: string | null;
|
|
101
|
+
note: string | null;
|
|
102
|
+
handover: boolean | null;
|
|
103
|
+
handover_date: string | null;
|
|
104
|
+
source_created_at: Date;
|
|
105
|
+
source_updated_at: Date;
|
|
106
|
+
source_published_at: Date;
|
|
107
|
+
};
|
|
108
|
+
private convertDelimitedStringToArray;
|
|
109
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InformationPanelsTransformation = void 0;
|
|
4
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
5
|
+
class InformationPanelsTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = "InformationPanelsTransformation";
|
|
9
|
+
this.transformInternal = (element) => {
|
|
10
|
+
const { preset, ...rest } = element;
|
|
11
|
+
return {
|
|
12
|
+
...rest,
|
|
13
|
+
presets: this.convertDelimitedStringToArray(preset),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
convertDelimitedStringToArray(value) {
|
|
18
|
+
if (!value)
|
|
19
|
+
return null;
|
|
20
|
+
return value
|
|
21
|
+
.split(/[\s,]+/)
|
|
22
|
+
.map((t) => t.trim())
|
|
23
|
+
.filter((t) => t.length > 0);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.InformationPanelsTransformation = InformationPanelsTransformation;
|
|
27
|
+
//# sourceMappingURL=InformationPanelsTransformations.js.map
|
package/dist/output-gateway/fypr/service/transformation/InformationPanelsTransformations.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InformationPanelsTransformations.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/service/transformation/InformationPanelsTransformations.ts"],"names":[],"mappings":";;;AAEA,6GAA0G;AAE1G,MAAa,+BAAgC,SAAQ,+CAA8D;IAAnH;;QACW,SAAI,GAAG,iCAAiC,CAAC;QAEtC,sBAAiB,GAAG,CAAC,OAA0B,EAAE,EAAE;YACzD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;YACpC,OAAO;gBACH,GAAG,IAAI;gBACP,OAAO,EAAE,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;aACtD,CAAC;QACN,CAAC,CAAC;IASN,CAAC;IAPW,6BAA6B,CAAC,KAAoB;QACtD,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QACxB,OAAO,KAAK;aACP,KAAK,CAAC,QAAQ,CAAC;aACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,CAAC;CACJ;AAlBD,0EAkBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOGInformationPanel.js","sourceRoot":"","sources":["../../../src/output-gateway/interfaces/IOGInformationPanel.ts"],"names":[],"mappings":""}
|
|
@@ -8,6 +8,7 @@ const _sch_1 = require("../../schema-definitions");
|
|
|
8
8
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
9
9
|
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
10
10
|
const FYPROGContainerTokens_1 = require("./FYPROGContainerTokens");
|
|
11
|
+
const InformationPanelsTransformations_1 = require("../fypr/service/transformation/InformationPanelsTransformations");
|
|
11
12
|
//#region Initialization
|
|
12
13
|
exports.fyprOGContainer = ioc_1.OutputGatewayContainer.createChildContainer();
|
|
13
14
|
//#endregion
|
|
@@ -17,10 +18,14 @@ const logger = exports.fyprOGContainer.resolve(CoreToken_1.CoreToken.Logger);
|
|
|
17
18
|
const fyprElementRepositoriesMap = new Map();
|
|
18
19
|
for (const kind of _sch_1.fyprElementKinds) {
|
|
19
20
|
const { modelName, tableName, attributeModel } = _sch_1.FyprElementsConfig[kind];
|
|
21
|
+
// Register repository
|
|
20
22
|
fyprElementRepositoriesMap.set(kind, new FyprElementRepository_1.FyprElementRepository(connector, logger, modelName, tableName, attributeModel));
|
|
21
23
|
}
|
|
22
24
|
exports.fyprOGContainer.registerInstance(FYPROGContainerTokens_1.fyprOGContainerTokens.FyprElementRepositoriesMap, fyprElementRepositoriesMap);
|
|
23
25
|
//#endregion
|
|
26
|
+
//#region Transformations
|
|
27
|
+
exports.fyprOGContainer.registerInstance(FYPROGContainerTokens_1.fyprOGContainerTokens.InformationPanelsTransformation, InformationPanelsTransformations_1.InformationPanelsTransformation);
|
|
28
|
+
//#endregion
|
|
24
29
|
//#region Controllers
|
|
25
30
|
exports.fyprOGContainer.registerSingleton(FYPROGContainerTokens_1.fyprOGContainerTokens.V1FyprElementKindsController, V1FyprElementKindsController_1.V1FyprElementKindsController);
|
|
26
31
|
exports.fyprOGContainer.registerSingleton(FYPROGContainerTokens_1.fyprOGContainerTokens.V1FyprMetadataController, V1FyprMetadataController_1.V1FyprMetadataController);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,sGAAoG;AACpG,8FAA4F;AAC5F,qFAAmF;AACnF,mDAA6F;AAG7F,wEAAqE;AACrE,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AwB,CAAC,CAAC;AAC5G,YAAY"}
|
|
@@ -5,6 +5,9 @@ exports.fyprOGContainerTokens = {
|
|
|
5
5
|
//#region Repositories
|
|
6
6
|
FyprElementRepositoriesMap: Symbol("FyprElementRepositoriesMap"),
|
|
7
7
|
//#endregion
|
|
8
|
+
//#region Transformations
|
|
9
|
+
InformationPanelsTransformation: Symbol("InformationPanelsTransformation"),
|
|
10
|
+
//#endregion
|
|
8
11
|
//#region Controllers
|
|
9
12
|
V1FyprElementKindsController: Symbol("V1FyprElementKindsController"),
|
|
10
13
|
V1FyprMetadataController: Symbol("V1FyprMetadataController"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FYPROGContainerTokens.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/FYPROGContainerTokens.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACjC,sBAAsB;IACtB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,YAAY;IAEZ,qBAAqB;IACrB,4BAA4B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IACpE,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,YAAY;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"FYPROGContainerTokens.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/FYPROGContainerTokens.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACjC,sBAAsB;IACtB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,YAAY;IAEZ,yBAAyB;IACzB,+BAA+B,EAAE,MAAM,CAAC,iCAAiC,CAAC;IAC1E,YAAY;IAEZ,qBAAqB;IACrB,4BAA4B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IACpE,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,YAAY;CACf,CAAC"}
|
|
@@ -11,12 +11,11 @@ const obelisks_json_1 = __importDefault(require("./obelisks.json"));
|
|
|
11
11
|
const signposts_json_1 = __importDefault(require("./signposts.json"));
|
|
12
12
|
const totems_json_1 = __importDefault(require("./totems.json"));
|
|
13
13
|
exports.fyprTranslationMigrationExceptions = {
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// },
|
|
14
|
+
"information-panels": {
|
|
15
|
+
// `preset` (DB string) is excluded from OG output and replaced by the transformed `presets` array
|
|
16
|
+
untranslatedModelFields: ["preset"],
|
|
17
|
+
unmodelledTranslationFields: ["presets"],
|
|
18
|
+
},
|
|
20
19
|
};
|
|
21
20
|
exports.fyprElementTranslations = {
|
|
22
21
|
"display-cases": { ...common_json_1.default, ...display_cases_json_1.default },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-definitions/translation/index.ts"],"names":[],"mappings":";;;;;;AACA,gEAAmC;AACnC,8EAAgD;AAChD,wFAA0D;AAC1D,oEAAuC;AACvC,sEAAyC;AACzC,gEAAmC;AAkBtB,QAAA,kCAAkC,GAAyE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-definitions/translation/index.ts"],"names":[],"mappings":";;;;;;AACA,gEAAmC;AACnC,8EAAgD;AAChD,wFAA0D;AAC1D,oEAAuC;AACvC,sEAAyC;AACzC,gEAAmC;AAkBtB,QAAA,kCAAkC,GAAyE;IACpH,oBAAoB,EAAE;QAClB,kGAAkG;QAClG,uBAAuB,EAAE,CAAC,QAAQ,CAAC;QACnC,2BAA2B,EAAE,CAAC,SAAS,CAAC;KAC3C;CACJ,CAAC;AAEW,QAAA,uBAAuB,GAAkE;IAClG,eAAe,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,4BAAY,EAAE;IAC/C,oBAAoB,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,iCAAiB,EAAE;IACzD,QAAQ,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,uBAAQ,EAAE;IACpC,SAAS,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,wBAAS,EAAE;IACtC,MAAM,EAAE,EAAE,GAAG,qBAAM,EAAE,GAAG,qBAAM,EAAE;CACnC,CAAC"}
|
|
@@ -31,13 +31,16 @@
|
|
|
31
31
|
"realization_request": { "cs": "realizace_pozadavek", "title_cs": "požadavek na realizaci" },
|
|
32
32
|
"realization_state": { "cs": "realizace_stav", "title_cs": "stav realizace" },
|
|
33
33
|
"realization_order_number": { "cs": "realizace_objednavka_cislo", "title_cs": "číslo objednávky realizace" },
|
|
34
|
-
"realization_registry_publication": {
|
|
34
|
+
"realization_registry_publication": {
|
|
35
|
+
"cs": "realizace_zverejneni_v_registru",
|
|
36
|
+
"title_cs": "zveřejnění realizace v registru"
|
|
37
|
+
},
|
|
35
38
|
"realization_invoice_paid": { "cs": "realizace_faktura_proplacena", "title_cs": "faktura za realizaci proplacena" },
|
|
36
39
|
"name_for_visually_impaired": { "cs": "nazev_pro_nevidome", "title_cs": "název pro nevidomé" },
|
|
37
40
|
"voice_day": { "cs": "hlas_den", "title_cs": "hlas den" },
|
|
38
41
|
"voice_night": { "cs": "hlas_noc", "title_cs": "hlas noc" },
|
|
39
42
|
"templates": { "cs": "sablony", "title_cs": "šablony" },
|
|
40
|
-
"
|
|
43
|
+
"presets": { "cs": "preset", "title_cs": "preset" },
|
|
41
44
|
"data_source": { "cs": "datovy_zdroj", "title_cs": "datový zdroj" },
|
|
42
45
|
"imsi": { "cs": "imsi", "title_cs": "IMSI" },
|
|
43
46
|
"connection_point": { "cs": "misto_napojeni", "title_cs": "místo napojení" },
|
|
@@ -53,11 +56,17 @@
|
|
|
53
56
|
"insurance": { "cs": "pojisteni", "title_cs": "pojištění" },
|
|
54
57
|
"handed_over_to_ozp": { "cs": "predano_ozp_do_spravy", "title_cs": "předáno OZP do správy" },
|
|
55
58
|
"dpp_documentation_request": { "cs": "dokumentace_pro_dpp_pozadavek", "title_cs": "požadavek na dokumentaci pro DPP" },
|
|
56
|
-
"dpp_documentation_handover_date": {
|
|
59
|
+
"dpp_documentation_handover_date": {
|
|
60
|
+
"cs": "dokumentace_pro_dpp_datum_predani",
|
|
61
|
+
"title_cs": "datum předání dokumentace pro DPP"
|
|
62
|
+
},
|
|
57
63
|
"design_deadline": { "cs": "termin_projekce", "title_cs": "termín projekce" },
|
|
58
64
|
"production_deadline": { "cs": "termin_vyroby", "title_cs": "termín výroby" },
|
|
59
65
|
"ropid_documentation_submitted": { "cs": "dokumentace_pro_ropid_predana", "title_cs": "dokumentace pro ROPID předána" },
|
|
60
|
-
"ropid_documentation_handover_date": {
|
|
66
|
+
"ropid_documentation_handover_date": {
|
|
67
|
+
"cs": "dokumentace_pro_ropid_datum_predani",
|
|
68
|
+
"title_cs": "datum předání dokumentace pro ROPID"
|
|
69
|
+
},
|
|
61
70
|
"dpp_documentation_submitted": { "cs": "dokumentace_pro_dpp_predana", "title_cs": "dokumentace pro DPP předána" },
|
|
62
71
|
"realization_deadline": { "cs": "termin_realizace", "title_cs": "termín realizace" },
|
|
63
72
|
"device_id": { "cs": "id_zarizeni", "title_cs": "id zařízení" },
|
package/docs/asyncapi.yaml
CHANGED
package/docs/openapi-output.yaml
CHANGED
|
@@ -1097,12 +1097,16 @@ components:
|
|
|
1097
1097
|
description: >-
|
|
1098
1098
|
Display template identifier or name used to render content on
|
|
1099
1099
|
this panel. May be null.
|
|
1100
|
-
|
|
1101
|
-
type:
|
|
1100
|
+
presets:
|
|
1101
|
+
type: array
|
|
1102
1102
|
nullable: true
|
|
1103
|
-
|
|
1103
|
+
items:
|
|
1104
|
+
type: string
|
|
1105
|
+
example:
|
|
1106
|
+
- "gema-masarykovo_nadrazi-a"
|
|
1107
|
+
- "gema-masarykovo_nadrazi-b"
|
|
1104
1108
|
description: >-
|
|
1105
|
-
|
|
1109
|
+
Presets assigned to this panel.
|
|
1106
1110
|
data_source:
|
|
1107
1111
|
type: string
|
|
1108
1112
|
nullable: true
|
package/docs/translations.md
CHANGED
|
@@ -92,7 +92,7 @@ The tables below are kept as a human-readable reference:
|
|
|
92
92
|
| | hlas_den | voice_day
|
|
93
93
|
| | hlas_noc | voice_night
|
|
94
94
|
| | sablony | templates
|
|
95
|
-
| | preset |
|
|
95
|
+
| | preset | presets
|
|
96
96
|
| | datovy_zdroj | data_source
|
|
97
97
|
| | imsi | imsi
|
|
98
98
|
| | misto_napojeni | connection_point
|