@proprioo/salatim 30.7.0 → 31.0.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/CHANGELOG.md +6 -0
- package/lib/energy/index.d.ts +2 -2
- package/lib/energy/index.js +3 -1
- package/lib/energy/index.js.map +1 -1
- package/lib/energy/src/Energy.d.ts +14 -2
- package/lib/energy/src/Energy.js +4 -16
- package/lib/energy/src/Energy.js.map +1 -1
- package/lib/energy/src/Energy.stories.js +21 -7
- package/lib/energy/src/Energy.stories.js.map +1 -1
- package/lib/energy/src/Energy.styles.d.ts +7 -4
- package/lib/energy/src/Energy.styles.js +5 -4
- package/lib/energy/src/Energy.styles.js.map +1 -1
- package/lib/energy/src/Energy.test.js +16 -2
- package/lib/energy/src/Energy.test.js.map +1 -1
- package/lib/energy/src/Energy.utils.d.ts +1 -0
- package/lib/energy/src/Energy.utils.js +5 -4
- package/lib/energy/src/Energy.utils.js.map +1 -1
- package/lib/energy/src/interfaces.d.ts +0 -7
- package/lib/energy/src/interfaces.js +1 -2
- package/lib/energy/src/interfaces.js.map +1 -1
- package/lib/index.js +23 -22
- package/lib/index.js.map +1 -1
- package/lib/ui/src/card/Card.interfaces.d.ts +2 -0
- package/lib/ui/src/card/Card.js +6 -6
- package/lib/ui/src/card/Card.js.map +1 -1
- package/lib/ui/src/card/Card.styles.js +1 -0
- package/lib/ui/src/card/Card.styles.js.map +1 -1
- package/lib/ui/src/tag/Tag.js +2 -7
- package/lib/ui/src/tag/Tag.js.map +1 -1
- package/lib/ui/src/tag/interfaces.d.ts +1 -0
- package/lib/ui/src/tag/interfaces.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
**31.0.0**
|
|
4
|
+
|
|
5
|
+
* Feat(Tag): add closeAriaLabel props to handle different languages
|
|
6
|
+
* Feat(Card): add closeToggleAriaLabel and openToggleAriaLabel props to handle different languages
|
|
7
|
+
**BREAKING CHANGE** Rework Energy component to handle different languages
|
|
8
|
+
|
|
3
9
|
**30.7.0**
|
|
4
10
|
|
|
5
11
|
* Chore: bump packages
|
package/lib/energy/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as Energy, EnergyProps } from './src/Energy';
|
|
2
|
-
export { getCarbonFootprintLevel, getConsumptionLevel } from './src/Energy.utils';
|
|
1
|
+
export { default as Energy, EnergyProps, EnergyTextContent } from './src/Energy';
|
|
2
|
+
export { getCarbonFootprintLevel, getConsumptionLevel, getEPCLevel, getEPCLevels } from './src/Energy.utils';
|
|
3
3
|
export { EnergyLevels, EnergyLevel } from './src/interfaces';
|
package/lib/energy/index.js
CHANGED
|
@@ -3,12 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.EnergyLevel = exports.getConsumptionLevel = exports.getCarbonFootprintLevel = exports.Energy = void 0;
|
|
6
|
+
exports.EnergyLevel = exports.getEPCLevels = exports.getEPCLevel = exports.getConsumptionLevel = exports.getCarbonFootprintLevel = exports.Energy = void 0;
|
|
7
7
|
var Energy_1 = require("./src/Energy");
|
|
8
8
|
Object.defineProperty(exports, "Energy", { enumerable: true, get: function () { return __importDefault(Energy_1).default; } });
|
|
9
9
|
var Energy_utils_1 = require("./src/Energy.utils");
|
|
10
10
|
Object.defineProperty(exports, "getCarbonFootprintLevel", { enumerable: true, get: function () { return Energy_utils_1.getCarbonFootprintLevel; } });
|
|
11
11
|
Object.defineProperty(exports, "getConsumptionLevel", { enumerable: true, get: function () { return Energy_utils_1.getConsumptionLevel; } });
|
|
12
|
+
Object.defineProperty(exports, "getEPCLevel", { enumerable: true, get: function () { return Energy_utils_1.getEPCLevel; } });
|
|
13
|
+
Object.defineProperty(exports, "getEPCLevels", { enumerable: true, get: function () { return Energy_utils_1.getEPCLevels; } });
|
|
12
14
|
var interfaces_1 = require("./src/interfaces");
|
|
13
15
|
Object.defineProperty(exports, "EnergyLevel", { enumerable: true, get: function () { return interfaces_1.EnergyLevel; } });
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
package/lib/energy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../packages/energy/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../packages/energy/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAIsB;AAHpB,iHAAA,OAAO,OAAU;AAInB,mDAK4B;AAJ1B,uHAAA,uBAAuB,OAAA;AACvB,mHAAA,mBAAmB,OAAA;AACnB,2GAAA,WAAW,OAAA;AACX,4GAAA,YAAY,OAAA;AAEd,+CAA6D;AAAtC,yGAAA,WAAW,OAAA"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
2
|
+
import { EnergyLevels } from './interfaces';
|
|
3
|
+
export type EnergyTextContent = {
|
|
4
|
+
blankEPC: string;
|
|
5
|
+
carbonFootprintLegend: string;
|
|
6
|
+
carbonFootprintTitle: string;
|
|
7
|
+
carbonFootprintUnit: string;
|
|
8
|
+
consumptionLegend: string;
|
|
9
|
+
consumptionTitle: string;
|
|
10
|
+
consumptionUnit: string;
|
|
11
|
+
EPCLegend: string;
|
|
12
|
+
EPCTitle: string;
|
|
13
|
+
};
|
|
14
|
+
export type EnergyProps = EnergyLevels & {
|
|
3
15
|
carbonFootprint: number;
|
|
4
16
|
consumption: number;
|
|
5
|
-
|
|
17
|
+
textContent: EnergyTextContent;
|
|
6
18
|
};
|
|
7
19
|
declare const Energy: FC<EnergyProps>;
|
|
8
20
|
export default Energy;
|
package/lib/energy/src/Energy.js
CHANGED
|
@@ -4,23 +4,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const Energy_styles_1 = require("./Energy.styles");
|
|
5
5
|
const Energy_utils_1 = require("./Energy.utils");
|
|
6
6
|
const interfaces_1 = require("./interfaces");
|
|
7
|
-
const Energy = ({ carbonFootprint, consumption,
|
|
8
|
-
const { consumptionLevel, carbonFootprintLevel, EPCLevel: EPC } = (0, Energy_utils_1.getEPCLevels)(carbonFootprint, consumption, diagnosticDate);
|
|
9
|
-
const ARROW_SIZE = 25;
|
|
7
|
+
const Energy = ({ carbonFootprint, carbonFootprintLevel, consumption, consumptionLevel, EPCLevel, textContent }) => {
|
|
10
8
|
// position of the EPC letter on the background gradient :
|
|
11
|
-
const EPC_LETTER_POS =
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
EPCTitle: 'Diagnostic de performance énergétique',
|
|
15
|
-
EPCLegend: `Diagnostic de performance énergétique : niveau ${interfaces_1.EnergyLevel[EPC]}`,
|
|
16
|
-
consumptionTitle: 'Consommation',
|
|
17
|
-
consumptionUnit: 'kWhEP/m²/an',
|
|
18
|
-
consumptionLegend: `Consommation d'électricité : ${consumption} kWhEP/m²/an, niveau : ${interfaces_1.EnergyLevel[consumptionLevel]}`,
|
|
19
|
-
carbonFootprintTitle: 'Émission',
|
|
20
|
-
carbonFootprintUnit: 'kgeqCO2/m²/an',
|
|
21
|
-
carbonFootprintLegend: `Émission de gaz à effet de serre : ${carbonFootprint} kgeqCO2/m²/an, niveau: ${interfaces_1.EnergyLevel[carbonFootprintLevel]}`
|
|
22
|
-
};
|
|
23
|
-
return carbonFootprint && consumption ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.Title, { children: TEXT_CONTENT.EPCTitle }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.Layout, { role: "document", "aria-label": TEXT_CONTENT.EPCTitle, children: [(0, jsx_runtime_1.jsx)("div", { role: "group", tabIndex: 0, "aria-label": TEXT_CONTENT.EPCLegend, children: (0, jsx_runtime_1.jsx)(Energy_styles_1.EPCBackground, { arrowSize: ARROW_SIZE, children: (0, jsx_runtime_1.jsx)(Energy_styles_1.LetterWrapper, { background: (0, Energy_utils_1.translateEnergyLevelToColor)(EPC), pos: EPC_LETTER_POS, isMainScore: true, letterSize: ARROW_SIZE, children: interfaces_1.EnergyLevel[EPC] }) }) }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.DetailsWrapper, { children: [(0, jsx_runtime_1.jsxs)(Energy_styles_1.Detail, { role: "group", tabIndex: 0, "aria-label": TEXT_CONTENT.consumptionLegend, children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailTitle, { children: TEXT_CONTENT.consumptionTitle }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.ValueWrapper, { children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailsValue, { children: consumption }), (0, jsx_runtime_1.jsx)(Energy_styles_1.LetterWrapper, { background: (0, Energy_utils_1.translateEnergyLevelToColor)(consumptionLevel), children: interfaces_1.EnergyLevel[consumptionLevel] })] }), (0, jsx_runtime_1.jsx)(Energy_styles_1.Unit, { children: TEXT_CONTENT.consumptionUnit })] }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.Detail, { role: "group", tabIndex: 0, "aria-label": TEXT_CONTENT.carbonFootprintLegend, children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailTitle, { children: TEXT_CONTENT.carbonFootprintTitle }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.ValueWrapper, { children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailsValue, { children: carbonFootprint }), (0, jsx_runtime_1.jsx)(Energy_styles_1.LetterWrapper, { background: (0, Energy_utils_1.translateEnergyLevelToCarbonFootprintColor)(carbonFootprintLevel), children: interfaces_1.EnergyLevel[carbonFootprintLevel] })] }), (0, jsx_runtime_1.jsx)(Energy_styles_1.Unit, { children: TEXT_CONTENT.carbonFootprintUnit })] })] })] })] })) : ((0, jsx_runtime_1.jsx)(Energy_styles_1.BlankEPC, { children: TEXT_CONTENT.blankEPC }));
|
|
9
|
+
const EPC_LETTER_POS = EPCLevel === 1 ? 0 : (EPCLevel - 1) * Energy_styles_1.ARROW_SIZE + (EPCLevel - 2) * 10;
|
|
10
|
+
const { blankEPC, carbonFootprintLegend, carbonFootprintTitle, carbonFootprintUnit, consumptionLegend, consumptionTitle, consumptionUnit, EPCLegend, EPCTitle } = textContent;
|
|
11
|
+
return carbonFootprint && consumption ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.Title, { children: EPCTitle }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.Layout, { "aria-label": EPCTitle, role: "document", children: [(0, jsx_runtime_1.jsx)("div", { "aria-label": EPCLegend, role: "group", tabIndex: 0, children: (0, jsx_runtime_1.jsx)(Energy_styles_1.EPCBackground, { children: (0, jsx_runtime_1.jsx)(Energy_styles_1.LetterWrapper, { background: (0, Energy_utils_1.translateEnergyLevelToColor)(EPCLevel), isMainScore: true, letterSize: Energy_styles_1.ARROW_SIZE, pos: EPC_LETTER_POS, children: interfaces_1.EnergyLevel[EPCLevel] }) }) }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.DetailsWrapper, { children: [(0, jsx_runtime_1.jsxs)(Energy_styles_1.Detail, { "aria-label": consumptionLegend, role: "group", tabIndex: 0, children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailTitle, { children: consumptionTitle }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.ValueWrapper, { children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailsValue, { children: consumption }), (0, jsx_runtime_1.jsx)(Energy_styles_1.LetterWrapper, { background: (0, Energy_utils_1.translateEnergyLevelToColor)(consumptionLevel), children: interfaces_1.EnergyLevel[consumptionLevel] })] }), (0, jsx_runtime_1.jsx)(Energy_styles_1.Unit, { children: consumptionUnit })] }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.Detail, { "aria-label": carbonFootprintLegend, role: "group", tabIndex: 0, children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailTitle, { children: carbonFootprintTitle }), (0, jsx_runtime_1.jsxs)(Energy_styles_1.ValueWrapper, { children: [(0, jsx_runtime_1.jsx)(Energy_styles_1.DetailsValue, { children: carbonFootprint }), (0, jsx_runtime_1.jsx)(Energy_styles_1.LetterWrapper, { background: (0, Energy_utils_1.translateEnergyLevelToCarbonFootprintColor)(carbonFootprintLevel), children: interfaces_1.EnergyLevel[carbonFootprintLevel] })] }), (0, jsx_runtime_1.jsx)(Energy_styles_1.Unit, { children: carbonFootprintUnit })] })] })] })] })) : ((0, jsx_runtime_1.jsx)(Energy_styles_1.BlankEPC, { children: blankEPC }));
|
|
24
12
|
};
|
|
25
13
|
exports.default = Energy;
|
|
26
14
|
//# sourceMappingURL=Energy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Energy.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.tsx"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"Energy.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.tsx"],"names":[],"mappings":";;;AAEA,mDAayB;AACzB,iDAGwB;AACxB,6CAAyD;AAoBzD,MAAM,MAAM,GAAoB,CAAC,EAC/B,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACZ,EAAE,EAAE;IACH,0DAA0D;IAC1D,MAAM,cAAc,GAClB,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,0BAAU,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAEzE,MAAM,EACJ,QAAQ,EACR,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,QAAQ,EACT,GAA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cAAE,QAAQ,GAAY,CAChC,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
|
@@ -4,14 +4,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
const addon_knobs_1 = require("@storybook/addon-knobs");
|
|
8
7
|
const react_1 = require("@storybook/react");
|
|
9
8
|
const Energy_1 = __importDefault(require("./Energy"));
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const interfaces_1 = require("./interfaces");
|
|
10
|
+
const defaultProps = {
|
|
11
|
+
carbonFootprint: 6,
|
|
12
|
+
carbonFootprintLevel: interfaces_1.EnergyLevel.B,
|
|
13
|
+
consumption: 120,
|
|
14
|
+
consumptionLevel: interfaces_1.EnergyLevel.C,
|
|
15
|
+
EPCLevel: interfaces_1.EnergyLevel.C,
|
|
16
|
+
textContent: {
|
|
17
|
+
blankEPC: 'Diagnostic de performance énergétique vierge',
|
|
18
|
+
carbonFootprintLegend: 'Émission de gaz à effet de serre : 6 kgeqCO2/m²/an, niveau : B',
|
|
19
|
+
carbonFootprintTitle: 'Émission',
|
|
20
|
+
carbonFootprintUnit: 'kgeqCO2/m²/an',
|
|
21
|
+
consumptionLegend: "Consommation d'électricité : 120 kWhEP/m²/an, niveau : C",
|
|
22
|
+
consumptionTitle: 'Consommation',
|
|
23
|
+
consumptionUnit: 'kWhEP/m²/an',
|
|
24
|
+
EPCLegend: 'Diagnostic de performance énergétique : niveau C',
|
|
25
|
+
EPCTitle: 'Diagnostic de performance énergétique'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
14
28
|
(0, react_1.storiesOf)('Energy', module)
|
|
15
|
-
.add('
|
|
16
|
-
.add('
|
|
29
|
+
.add('EPC', () => (0, jsx_runtime_1.jsx)(Energy_1.default, Object.assign({}, defaultProps)))
|
|
30
|
+
.add('Blank EPC', () => ((0, jsx_runtime_1.jsx)(Energy_1.default, Object.assign({}, defaultProps, { carbonFootprint: 0, consumption: 0 }))));
|
|
17
31
|
//# sourceMappingURL=Energy.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Energy.stories.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.stories.tsx"],"names":[],"mappings":";;;;;;AAEA,
|
|
1
|
+
{"version":3,"file":"Energy.stories.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.stories.tsx"],"names":[],"mappings":";;;;;;AAEA,4CAA6C;AAE7C,sDAA+C;AAC/C,6CAA2C;AAE3C,MAAM,YAAY,GAAgB;IAChC,eAAe,EAAE,CAAC;IAClB,oBAAoB,EAAE,wBAAW,CAAC,CAAC;IACnC,WAAW,EAAE,GAAG;IAChB,gBAAgB,EAAE,wBAAW,CAAC,CAAC;IAC/B,QAAQ,EAAE,wBAAW,CAAC,CAAC;IACvB,WAAW,EAAE;QACX,QAAQ,EAAE,8CAA8C;QACxD,qBAAqB,EACnB,gEAAgE;QAClE,oBAAoB,EAAE,UAAU;QAChC,mBAAmB,EAAE,eAAe;QACpC,iBAAiB,EACf,0DAA0D;QAC5D,gBAAgB,EAAE,cAAc;QAChC,eAAe,EAAE,aAAa;QAC9B,SAAS,EAAE,kDAAkD;QAC7D,QAAQ,EAAE,uCAAuC;KAClD;CACF,CAAC;AAEF,IAAA,iBAAS,EAAC,QAAQ,EAAE,MAAM,CAAC;KACxB,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,uBAAC,gBAAM,oBAAK,YAAY,EAAI,CAAC;KAC9C,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CACtB,uBAAC,gBAAM,oBAAK,YAAY,IAAE,eAAe,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,IAAI,CACjE,CAAC,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
export declare const ARROW_SIZE = 25;
|
|
2
2
|
export declare const Layout: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const Title: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
4
|
export declare const BlankEPC: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
5
|
-
export declare const EPCBackground: import("styled-components").StyledComponent<"div", any, {
|
|
6
|
-
|
|
5
|
+
export declare const EPCBackground: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const LetterWrapper: import("styled-components").StyledComponent<"span", any, {
|
|
7
|
+
background: string;
|
|
8
|
+
isMainScore?: boolean | undefined;
|
|
9
|
+
letterSize?: number | undefined;
|
|
10
|
+
pos?: number | undefined;
|
|
7
11
|
}, never>;
|
|
8
|
-
export declare const LetterWrapper: import("styled-components").StyledComponent<"span", any, LetterWrapperProps, never>;
|
|
9
12
|
export declare const DetailTitle: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
10
13
|
export declare const ValueWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
11
14
|
export declare const Detail: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -23,13 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Unit = exports.DetailsValue = exports.DetailsWrapper = exports.Detail = exports.ValueWrapper = exports.DetailTitle = exports.LetterWrapper = exports.EPCBackground = exports.BlankEPC = exports.Title = exports.Layout = void 0;
|
|
26
|
+
exports.Unit = exports.DetailsValue = exports.DetailsWrapper = exports.Detail = exports.ValueWrapper = exports.DetailTitle = exports.LetterWrapper = exports.EPCBackground = exports.BlankEPC = exports.Title = exports.Layout = exports.ARROW_SIZE = void 0;
|
|
27
27
|
const styled_components_1 = __importStar(require("styled-components"));
|
|
28
28
|
const utils_1 = require("../../utils");
|
|
29
29
|
const Energy_utils_1 = require("./Energy.utils");
|
|
30
30
|
const interfaces_1 = require("./interfaces");
|
|
31
|
-
|
|
31
|
+
exports.ARROW_SIZE = 25;
|
|
32
32
|
const DETAILS_MARGIN = 24;
|
|
33
|
+
const EPC_BACKGROUND_WIDTH = 250;
|
|
33
34
|
const PDF_DETAILS_MARGIN = 86;
|
|
34
35
|
exports.Layout = styled_components_1.default.div `
|
|
35
36
|
display: flex;
|
|
@@ -55,7 +56,7 @@ exports.EPCBackground = styled_components_1.default.div `
|
|
|
55
56
|
margin: ${(0, utils_1.convertPxToRem)(24)} 0;
|
|
56
57
|
width: ${(0, utils_1.convertPxToRem)(EPC_BACKGROUND_WIDTH)};
|
|
57
58
|
height: ${(0, utils_1.convertPxToRem)(25)};
|
|
58
|
-
background: ${(
|
|
59
|
+
background: ${() => (0, Energy_utils_1.generateEPCBackground)(interfaces_1.EnergyLevelColor, exports.ARROW_SIZE)};
|
|
59
60
|
|
|
60
61
|
@media print, (min-width: ${utils_1.breakpoints.base}px) {
|
|
61
62
|
margin: ${(0, utils_1.convertPxToRem)(52)} 0 0 0;
|
|
@@ -69,7 +70,7 @@ exports.LetterWrapper = styled_components_1.default.span `
|
|
|
69
70
|
color: white;
|
|
70
71
|
font-size: ${utils_1.fonts.smaller};
|
|
71
72
|
|
|
72
|
-
${({ isMainScore,
|
|
73
|
+
${({ isMainScore, letterSize, pos }) => isMainScore &&
|
|
73
74
|
letterSize &&
|
|
74
75
|
(0, styled_components_1.css) `
|
|
75
76
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Energy.styles.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAgD;AAEhD,uCAOqB;AACrB,iDAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"Energy.styles.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;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OAAO;CAC3B,CAAC"}
|
|
@@ -7,10 +7,24 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_test_renderer_1 = __importDefault(require("react-test-renderer"));
|
|
8
8
|
const test_utils_1 = require("../../utils/src/test-utils");
|
|
9
9
|
const Energy_1 = __importDefault(require("./Energy"));
|
|
10
|
+
const interfaces_1 = require("./interfaces");
|
|
10
11
|
const defaultProps = {
|
|
11
12
|
carbonFootprint: 6,
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
carbonFootprintLevel: interfaces_1.EnergyLevel.B,
|
|
14
|
+
consumption: 120,
|
|
15
|
+
consumptionLevel: interfaces_1.EnergyLevel.C,
|
|
16
|
+
EPCLevel: interfaces_1.EnergyLevel.C,
|
|
17
|
+
textContent: {
|
|
18
|
+
blankEPC: 'Diagnostic de performance énergétique vierge',
|
|
19
|
+
carbonFootprintLegend: 'Émission de gaz à effet de serre : 6 kgeqCO2/m²/an, niveau : B',
|
|
20
|
+
carbonFootprintTitle: 'Émission',
|
|
21
|
+
carbonFootprintUnit: 'kgeqCO2/m²/an',
|
|
22
|
+
consumptionLegend: "Consommation d'électricité : 120 kWhEP/m²/an, niveau : C",
|
|
23
|
+
consumptionTitle: 'Consommation',
|
|
24
|
+
consumptionUnit: 'kWhEP/m²/an',
|
|
25
|
+
EPCLegend: 'Diagnostic de performance énergétique : niveau C',
|
|
26
|
+
EPCTitle: 'Diagnostic de performance énergétique'
|
|
27
|
+
}
|
|
14
28
|
};
|
|
15
29
|
describe('<Energy/>', () => {
|
|
16
30
|
it('should pass A11y test', () => (0, test_utils_1.testA11y)((0, jsx_runtime_1.jsx)(Energy_1.default, Object.assign({}, defaultProps))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Energy.test.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.test.tsx"],"names":[],"mappings":";;;;;;AACA,8EAA2C;AAE3C,2DAAsD;AACtD,sDAA+C;
|
|
1
|
+
{"version":3,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AAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,MAAM,IAAI,GAAG,6BAAQ;aAClB,MAAM,CAAC,uBAAC,gBAAM,oBAAK,YAAY,IAAE,eAAe,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,IAAI,CAAC;aACzE,MAAM,EAAE,CAAC;QAEZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dictionary } from '@proprioo/hokkaido';
|
|
2
2
|
import { EnergyLevel, EnergyLevels } from './interfaces';
|
|
3
|
+
export declare const RULES_UPDATE_DATE: Date;
|
|
3
4
|
export declare const translateEnergyLevelToColor: (level: EnergyLevel) => string;
|
|
4
5
|
export declare const translateEnergyLevelToCarbonFootprintColor: (level: EnergyLevel) => string;
|
|
5
6
|
export declare const getConsumptionLevel: (consumption: number, diagnosticDate: Date) => EnergyLevel;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateEPCBackground = exports.generateLinearGradient = exports.getEPCLevels = exports.getEPCLevel = exports.getCarbonFootprintLevel = exports.getConsumptionLevel = exports.translateEnergyLevelToCarbonFootprintColor = exports.translateEnergyLevelToColor = void 0;
|
|
3
|
+
exports.generateEPCBackground = exports.generateLinearGradient = exports.getEPCLevels = exports.getEPCLevel = exports.getCarbonFootprintLevel = exports.getConsumptionLevel = exports.translateEnergyLevelToCarbonFootprintColor = exports.translateEnergyLevelToColor = exports.RULES_UPDATE_DATE = void 0;
|
|
4
4
|
const date_fns_1 = require("date-fns");
|
|
5
5
|
const interfaces_1 = require("./interfaces");
|
|
6
|
+
exports.RULES_UPDATE_DATE = new Date('07/01/2021');
|
|
6
7
|
const translateEnergyLevelToColor = (level) => {
|
|
7
8
|
switch (level) {
|
|
8
9
|
case interfaces_1.EnergyLevel.A:
|
|
@@ -42,7 +43,7 @@ const translateEnergyLevelToCarbonFootprintColor = (level) => {
|
|
|
42
43
|
};
|
|
43
44
|
exports.translateEnergyLevelToCarbonFootprintColor = translateEnergyLevelToCarbonFootprintColor;
|
|
44
45
|
const getConsumptionLevel = (consumption, diagnosticDate) => {
|
|
45
|
-
if ((0, date_fns_1.isBefore)(diagnosticDate,
|
|
46
|
+
if ((0, date_fns_1.isBefore)(diagnosticDate, exports.RULES_UPDATE_DATE)) {
|
|
46
47
|
if (consumption <= 50) {
|
|
47
48
|
return interfaces_1.EnergyLevel.A;
|
|
48
49
|
}
|
|
@@ -87,7 +88,7 @@ const getConsumptionLevel = (consumption, diagnosticDate) => {
|
|
|
87
88
|
};
|
|
88
89
|
exports.getConsumptionLevel = getConsumptionLevel;
|
|
89
90
|
const getCarbonFootprintLevel = (carbonFootprint, diagnosticDate) => {
|
|
90
|
-
if ((0, date_fns_1.isBefore)(diagnosticDate,
|
|
91
|
+
if ((0, date_fns_1.isBefore)(diagnosticDate, exports.RULES_UPDATE_DATE)) {
|
|
91
92
|
if (carbonFootprint < 6) {
|
|
92
93
|
return interfaces_1.EnergyLevel.A;
|
|
93
94
|
}
|
|
@@ -132,7 +133,7 @@ const getCarbonFootprintLevel = (carbonFootprint, diagnosticDate) => {
|
|
|
132
133
|
};
|
|
133
134
|
exports.getCarbonFootprintLevel = getCarbonFootprintLevel;
|
|
134
135
|
const getEPCLevel = (consumptionLevel, carbonFootprintLevel, diagnosticDate) => {
|
|
135
|
-
if ((0, date_fns_1.isBefore)(diagnosticDate,
|
|
136
|
+
if ((0, date_fns_1.isBefore)(diagnosticDate, exports.RULES_UPDATE_DATE)) {
|
|
136
137
|
return consumptionLevel;
|
|
137
138
|
}
|
|
138
139
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Energy.utils.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.utils.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAIpC,
|
|
1
|
+
{"version":3,"file":"Energy.utils.js","sourceRoot":"","sources":["../../../packages/energy/src/Energy.utils.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAIpC,6CAKsB;AAET,QAAA,iBAAiB,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;AAEjD,MAAM,2BAA2B,GAAG,CAAC,KAAkB,EAAU,EAAE;IACxE,QAAQ,KAAK,EAAE;QACb,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,6BAAgB,CAAC,CAAC,CAAC;QAC5B,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,6BAAgB,CAAC,CAAC,CAAC;QAC5B,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,6BAAgB,CAAC,CAAC,CAAC;QAC5B,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,6BAAgB,CAAC,CAAC,CAAC;QAC5B,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,6BAAgB,CAAC,CAAC,CAAC;QAC5B,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,6BAAgB,CAAC,CAAC,CAAC;QAC5B;YACE,OAAO,6BAAgB,CAAC,CAAC,CAAC;KAC7B;AACH,CAAC,CAAC;AAjBW,QAAA,2BAA2B,+BAiBtC;AAEK,MAAM,0CAA0C,GAAG,CACxD,KAAkB,EACV,EAAE;IACV,QAAQ,KAAK,EAAE;QACb,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,sCAAyB,CAAC,CAAC,CAAC;QACrC,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,sCAAyB,CAAC,CAAC,CAAC;QACrC,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,sCAAyB,CAAC,CAAC,CAAC;QACrC,KAAK,wBAAW,CAAC,CAAC;YAChB,OAAO,sCAAyB,CAAC,CAAC,CAAC;QACrC,KAA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GAAG,IAAA,8BAAsB,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YAEvE,SAAS,CAAC,OAAO,CACf,SAAS,EACT,SAAS,EACT,aAAa,EACb,oBAAoB,CACrB,CAAC;SACH;aAAM;YACL,MAAM,aAAa,GAAG,IAAA,8BAAsB,EAC1C,KAAK,EACL,UAAU,EACV,QAAQ,EACR,IAAI,CACL,CAAC;YAEF,SAAS,CAAC,OAAO,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;SACxD;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC,CAAC;AApEW,QAAA,qBAAqB,yBAoEhC"}
|
|
@@ -25,15 +25,8 @@ export declare enum CarbonFootprintLevelColor {
|
|
|
25
25
|
F = "#6d13b1",
|
|
26
26
|
G = "#5f119a"
|
|
27
27
|
}
|
|
28
|
-
export declare const RULES_UPDATE_DATE: Date;
|
|
29
28
|
export type EnergyLevels = {
|
|
30
29
|
carbonFootprintLevel: EnergyLevel;
|
|
31
30
|
consumptionLevel: EnergyLevel;
|
|
32
31
|
EPCLevel: EnergyLevel;
|
|
33
32
|
};
|
|
34
|
-
export type LetterWrapperProps = {
|
|
35
|
-
background: string;
|
|
36
|
-
isMainScore?: boolean;
|
|
37
|
-
pos?: number;
|
|
38
|
-
letterSize?: number;
|
|
39
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CarbonFootprintLevelColor = exports.EnergyLevelColor = exports.EnergyLevel = void 0;
|
|
4
4
|
var EnergyLevel;
|
|
5
5
|
(function (EnergyLevel) {
|
|
6
6
|
EnergyLevel[EnergyLevel["A"] = 1] = "A";
|
|
@@ -31,5 +31,4 @@ var CarbonFootprintLevelColor;
|
|
|
31
31
|
CarbonFootprintLevelColor["F"] = "#6d13b1";
|
|
32
32
|
CarbonFootprintLevelColor["G"] = "#5f119a";
|
|
33
33
|
})(CarbonFootprintLevelColor || (exports.CarbonFootprintLevelColor = CarbonFootprintLevelColor = {}));
|
|
34
|
-
exports.RULES_UPDATE_DATE = new Date('07/01/2021');
|
|
35
34
|
//# sourceMappingURL=interfaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../packages/energy/src/interfaces.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,uCAAK,CAAA;IACL,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;AACH,CAAC,EARW,WAAW,2BAAX,WAAW,QAQtB;AAED,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;AACf,CAAC,EARW,gBAAgB,gCAAhB,gBAAgB,QAQ3B;AAED,IAAY,yBAQX;AARD,WAAY,yBAAyB;IACnC,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;AACf,CAAC,EARW,yBAAyB,yCAAzB,yBAAyB,QAQpC
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../packages/energy/src/interfaces.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,uCAAK,CAAA;IACL,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;IACD,uCAAC,CAAA;AACH,CAAC,EARW,WAAW,2BAAX,WAAW,QAQtB;AAED,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;IACb,iCAAa,CAAA;AACf,CAAC,EARW,gBAAgB,gCAAhB,gBAAgB,QAQ3B;AAED,IAAY,yBAQX;AARD,WAAY,yBAAyB;IACnC,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;IACb,0CAAa,CAAA;AACf,CAAC,EARW,yBAAyB,yCAAzB,yBAAyB,QAQpC"}
|