@ssg-coop/luic-calculator-core 1.3.0 → 1.4.1

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.
Files changed (93) hide show
  1. package/README.md +12 -2
  2. package/dist/api/domain.d.ts +5 -0
  3. package/dist/api/domain.js +5 -0
  4. package/dist/config/i18n/en.d.ts +19 -0
  5. package/dist/config/i18n/en.js +19 -0
  6. package/dist/config/i18n/fr.d.ts +19 -0
  7. package/dist/config/i18n/fr.js +19 -0
  8. package/dist/config/types.d.ts +2 -0
  9. package/dist/config/types.js +5 -0
  10. package/dist/generator/WorkbookGenerator.d.ts +4 -0
  11. package/dist/generator/WorkbookGenerator.js +69 -9
  12. package/dist/generator/builders/ChartDataSheetBuilder.d.ts +10 -0
  13. package/dist/generator/builders/ChartDataSheetBuilder.js +160 -7
  14. package/dist/generator/builders/ChartsSheetBuilder.js +103 -2
  15. package/dist/generator/builders/InputDataSheetBuilder.js +4 -3
  16. package/dist/generator/builders/ScenarioDetailsBuilder.d.ts +2 -0
  17. package/dist/generator/builders/ScenarioDetailsBuilder.js +4 -4
  18. package/dist/generator/builders/ScenarioSheetBuilder.d.ts +2 -0
  19. package/dist/generator/builders/ScenarioSheetBuilder.js +205 -25
  20. package/dist/generator/builders/SummarySheetBuilder.d.ts +3 -2
  21. package/dist/generator/builders/SummarySheetBuilder.js +109 -9
  22. package/dist/types/config.types.d.ts +9 -0
  23. package/dist/types/workbook.types.d.ts +52 -1
  24. package/package.json +1 -1
  25. package/dist/package.json +0 -31
  26. package/dist/src/config/appConfig.d.ts +0 -11
  27. package/dist/src/config/appConfig.js +0 -38
  28. package/dist/src/config/core/calculatorUtils.d.ts +0 -17
  29. package/dist/src/config/core/calculatorUtils.js +0 -212
  30. package/dist/src/config/core/genericUtils.d.ts +0 -10
  31. package/dist/src/config/core/genericUtils.js +0 -79
  32. package/dist/src/config/domain/buildings.d.ts +0 -14
  33. package/dist/src/config/domain/buildings.js +0 -282
  34. package/dist/src/config/domain/emissionFactors.d.ts +0 -2
  35. package/dist/src/config/domain/emissionFactors.js +0 -42
  36. package/dist/src/config/domain/energySources.d.ts +0 -18
  37. package/dist/src/config/domain/energySources.js +0 -370
  38. package/dist/src/config/domain/infrastructure.d.ts +0 -8
  39. package/dist/src/config/domain/infrastructure.js +0 -56
  40. package/dist/src/config/domain/neighbourhoodTypes.d.ts +0 -10
  41. package/dist/src/config/domain/neighbourhoodTypes.js +0 -366
  42. package/dist/src/config/domain/regions.d.ts +0 -8
  43. package/dist/src/config/domain/regions.js +0 -423
  44. package/dist/src/config/domain/services.d.ts +0 -8
  45. package/dist/src/config/domain/services.js +0 -48
  46. package/dist/src/config/domain/transportation.d.ts +0 -12
  47. package/dist/src/config/domain/transportation.js +0 -81
  48. package/dist/src/config/i18n/en.d.ts +0 -445
  49. package/dist/src/config/i18n/en.js +0 -488
  50. package/dist/src/config/i18n/fr.d.ts +0 -445
  51. package/dist/src/config/i18n/fr.js +0 -491
  52. package/dist/src/config/types.d.ts +0 -80
  53. package/dist/src/config/types.js +0 -5
  54. package/dist/src/generator/FormulaBuilder.d.ts +0 -58
  55. package/dist/src/generator/FormulaBuilder.js +0 -101
  56. package/dist/src/generator/WorkbookGenerator.d.ts +0 -7
  57. package/dist/src/generator/WorkbookGenerator.js +0 -77
  58. package/dist/src/generator/builders/AssumptionsBuilder.d.ts +0 -20
  59. package/dist/src/generator/builders/AssumptionsBuilder.js +0 -311
  60. package/dist/src/generator/builders/CalculationSheetBuilder.d.ts +0 -20
  61. package/dist/src/generator/builders/CalculationSheetBuilder.js +0 -149
  62. package/dist/src/generator/builders/EmissionFactorsSheetBuilder.d.ts +0 -7
  63. package/dist/src/generator/builders/EmissionFactorsSheetBuilder.js +0 -86
  64. package/dist/src/generator/builders/InputDataSheetBuilder.d.ts +0 -13
  65. package/dist/src/generator/builders/InputDataSheetBuilder.js +0 -114
  66. package/dist/src/generator/builders/ScenarioSheetBuilder.d.ts +0 -19
  67. package/dist/src/generator/builders/ScenarioSheetBuilder.js +0 -1067
  68. package/dist/src/generator/builders/SummarySheetBuilder.d.ts +0 -8
  69. package/dist/src/generator/builders/SummarySheetBuilder.js +0 -304
  70. package/dist/src/index.d.ts +0 -57
  71. package/dist/src/index.js +0 -103
  72. package/dist/src/theme/defaultTheme.d.ts +0 -2
  73. package/dist/src/theme/defaultTheme.js +0 -254
  74. package/dist/src/theme/index.d.ts +0 -2
  75. package/dist/src/theme/index.js +0 -2
  76. package/dist/src/theme/sunsetTheme.d.ts +0 -2
  77. package/dist/src/theme/sunsetTheme.js +0 -310
  78. package/dist/src/types/config.types.d.ts +0 -69
  79. package/dist/src/types/config.types.js +0 -1
  80. package/dist/src/types/scenario.types.d.ts +0 -63
  81. package/dist/src/types/scenario.types.js +0 -1
  82. package/dist/src/types/workbook.types.d.ts +0 -181
  83. package/dist/src/types/workbook.types.js +0 -1
  84. package/dist/src/utils/ReactivityUtils.d.ts +0 -7
  85. package/dist/src/utils/ReactivityUtils.js +0 -26
  86. package/dist/src/utils/cellAddressing.d.ts +0 -16
  87. package/dist/src/utils/cellAddressing.js +0 -35
  88. package/dist/src/utils/formatting.d.ts +0 -9
  89. package/dist/src/utils/formatting.js +0 -32
  90. package/dist/src/writers/JsonExporter.d.ts +0 -11
  91. package/dist/src/writers/JsonExporter.js +0 -14
  92. package/dist/types/blinktagtypes.d.ts +0 -167
  93. package/dist/types/blinktagtypes.js +0 -21
@@ -1,254 +0,0 @@
1
- export const defaultTheme = {
2
- "summary": {
3
- "colors": {
4
- "orange": {
5
- "fill": {
6
- "color": "#F9CB9C"
7
- }
8
- }
9
- },
10
- "headers": {
11
- "general": {
12
- "fill": {
13
- "color": "#CFE2F3"
14
- }
15
- },
16
- "buildings": {
17
- "fill": {
18
- "color": "#A2C4C9"
19
- }
20
- },
21
- "services": {
22
- "fill": {
23
- "color": "#FFE599"
24
- }
25
- },
26
- "infrastructure": {
27
- "fill": {
28
- "color": "#B6D7A8"
29
- }
30
- },
31
- "transportation": {
32
- "fill": {
33
- "color": "#9FC5E8"
34
- }
35
- },
36
- "revenue": {
37
- "fill": {
38
- "color": "#EA9999"
39
- }
40
- },
41
- "energy": {
42
- "fill": {
43
- "color": "#434343"
44
- },
45
- "font": {
46
- "color": "#FFFFFF",
47
- "bold": true
48
- }
49
- },
50
- "emissions": {
51
- "fill": {
52
- "color": "#000000"
53
- },
54
- "font": {
55
- "color": "#FFFFFF",
56
- "bold": true
57
- }
58
- }
59
- },
60
- "data": {
61
- "buildings": {
62
- "fill": {
63
- "color": "#D0E0E3"
64
- }
65
- },
66
- "services": {
67
- "fill": {
68
- "color": "#FFF2CC"
69
- }
70
- },
71
- "infrastructure": {
72
- "fill": {
73
- "color": "#D9EAD3"
74
- }
75
- },
76
- "transportation": {
77
- "fill": {
78
- "color": "#D0E0E3"
79
- }
80
- },
81
- "revenue": {
82
- "fill": {
83
- "color": "#F4CCCC"
84
- }
85
- },
86
- "energy": {
87
- "fill": {
88
- "color": "#EFEFEF"
89
- }
90
- },
91
- "emissions": {
92
- "fill": {
93
- "color": "#EFEFEF"
94
- }
95
- }
96
- },
97
- "fonts": {
98
- "title": {
99
- "font": {
100
- "bold": true,
101
- "size": 14
102
- }
103
- },
104
- "hyperlink": {
105
- "font": {
106
- "color": "#CC0000"
107
- }
108
- },
109
- "modified": {
110
- "font": {
111
- "bold": false,
112
- "size": 10
113
- }
114
- },
115
- "bold": {
116
- "font": {
117
- "bold": true
118
- }
119
- }
120
- },
121
- "columns": {
122
- "A": {
123
- "width": 200
124
- },
125
- "B": {
126
- "width": 280
127
- },
128
- "C": {
129
- "width": 150
130
- },
131
- "D": {
132
- "width": 150
133
- }
134
- }
135
- },
136
- "scenario": {
137
- "colors": {
138
- "topRow": "#F9CB9C",
139
- "buildingsHeader": "#A2C4C9",
140
- "servicesHeader": "#ffe599",
141
- "servicesSub": "#fff2cc",
142
- "infraHeader": "#b6d7a8",
143
- "infraSub": "#d9ead3",
144
- "transHeader": "#9fc5e8"
145
- },
146
- "headers": {
147
- "buildingsSub": {
148
- "fill": {
149
- "color": "#D0E0E3"
150
- }
151
- },
152
- "transSub": {
153
- "fill": {
154
- "color": "#d0e0e3"
155
- }
156
- }
157
- },
158
- "data": {
159
- "grayFill": {
160
- "fill": {
161
- "color": "#F3F3F3"
162
- }
163
- },
164
- "labelFormat": {
165
- "font": {
166
- "bold": true
167
- },
168
- "fill": {
169
- "color": "#F3F3F3"
170
- },
171
- "verticalAlignment": "Center"
172
- }
173
- },
174
- "fonts": {
175
- "modified": {
176
- "font": {
177
- "bold": true,
178
- "size": 10
179
- }
180
- },
181
- "hyperlink": {
182
- "font": {
183
- "color": "#CC0000"
184
- },
185
- "fill": {
186
- "color": "#CFE2F3"
187
- }
188
- }
189
- },
190
- "columns": {
191
- "A": { "width": 180 },
192
- "B": { "width": 180 },
193
- "C": { "width": 200 },
194
- "D": { "width": 180 },
195
- "E": { "width": 150 }
196
- }
197
- },
198
- "calc": {
199
- "columns": {
200
- "A": {
201
- "width": 250
202
- },
203
- "B": {
204
- "width": 150
205
- }
206
- }
207
- },
208
- "emissionFactors": {
209
- "columns": {
210
- "A": {
211
- "width": 70
212
- },
213
- "B": {
214
- "width": 130
215
- },
216
- "C": {
217
- "width": 40
218
- },
219
- "DPlus": {
220
- "width": 70
221
- }
222
- },
223
- "tabColor": "#D9EAD3"
224
- },
225
- "inputData": {
226
- "columns": {
227
- "A": {
228
- "width": 110
229
- },
230
- "B": {
231
- "width": 220
232
- },
233
- "CDE": {
234
- "width": 110
235
- }
236
- }
237
- },
238
- "assumptions": {
239
- "columns": {
240
- "buildings": { "A": { "width": 250 }, "BPlus": { "width": 180 } },
241
- "services": { "A": { "width": 250 }, "BPlus": { "width": 180 } },
242
- "infrastructure": { "A": { "width": 250 }, "BPlus": { "width": 180 } },
243
- "transportation": { "A": { "width": 250 }, "BPlus": { "width": 200 } },
244
- "energy": { "A": { "width": 250 }, "BPlus": { "width": 100 } },
245
- "neighbourhoods": { "A": { "width": 250 }, "BPlus": { "width": 250 } },
246
- "gwp": { "A": { "width": 150 } }
247
- },
248
- "tabColor": "#D9EAD3"
249
- },
250
- "typography": {
251
- "fontName": "Aptos Narrow",
252
- "fontSize": 12
253
- }
254
- };
@@ -1,2 +0,0 @@
1
- export { defaultTheme } from './defaultTheme';
2
- export { sunsetTheme } from './sunsetTheme';
@@ -1,2 +0,0 @@
1
- export { defaultTheme } from './defaultTheme';
2
- export { sunsetTheme } from './sunsetTheme';
@@ -1,2 +0,0 @@
1
- import { WorkbookTheme } from '../types/config.types';
2
- export declare const sunsetTheme: WorkbookTheme;
@@ -1,310 +0,0 @@
1
- export const sunsetTheme = {
2
- "summary": {
3
- "colors": {
4
- "orange": {
5
- "fill": {
6
- "color": "#D35400" // Sophisticated burnt orange instead of neon
7
- }
8
- }
9
- },
10
- "headers": {
11
- "general": {
12
- "fill": {
13
- "color": "#1E293B" // Sleek dark slate
14
- },
15
- "font": {
16
- "color": "#FFFFFF",
17
- "bold": true
18
- }
19
- },
20
- "buildings": {
21
- "fill": {
22
- "color": "#C06C84" // Muted sunset rose
23
- },
24
- "font": {
25
- "color": "#FFFFFF"
26
- }
27
- },
28
- "services": {
29
- "fill": {
30
- "color": "#D97706" // Deep golden hour amber
31
- },
32
- "font": {
33
- "color": "#FFFFFF"
34
- }
35
- },
36
- "infrastructure": {
37
- "fill": {
38
- "color": "#6C5B7B" // Muted dusk purple
39
- },
40
- "font": {
41
- "color": "#FFFFFF"
42
- }
43
- },
44
- "transportation": {
45
- "fill": {
46
- "color": "#355C7D" // Deep twilight blue
47
- },
48
- "font": {
49
- "color": "#FFFFFF"
50
- }
51
- },
52
- "revenue": {
53
- "fill": {
54
- "color": "#9E2A2B" // Rich, muted brick red
55
- },
56
- "font": {
57
- "color": "#FFFFFF"
58
- }
59
- },
60
- "energy": {
61
- "fill": {
62
- "color": "#2980B9" // Clean steel blue
63
- },
64
- "font": {
65
- "color": "#FFFFFF",
66
- "bold": true
67
- }
68
- },
69
- "emissions": {
70
- "fill": {
71
- "color": "#0F172A" // Almost black/night sky
72
- },
73
- "font": {
74
- "color": "#FFFFFF",
75
- "bold": true
76
- }
77
- }
78
- },
79
- "data": {
80
- // Ultra-light tints for data readability
81
- "buildings": {
82
- "fill": {
83
- "color": "#FAF4F6"
84
- }
85
- },
86
- "services": {
87
- "fill": {
88
- "color": "#FCF8F2"
89
- }
90
- },
91
- "infrastructure": {
92
- "fill": {
93
- "color": "#F4F2F5"
94
- }
95
- },
96
- "transportation": {
97
- "fill": {
98
- "color": "#F0F3F6"
99
- }
100
- },
101
- "revenue": {
102
- "fill": {
103
- "color": "#F9EBEA"
104
- }
105
- },
106
- "energy": {
107
- "fill": {
108
- "color": "#EAF2F8"
109
- }
110
- },
111
- "emissions": {
112
- "fill": {
113
- "color": "#F1F5F9"
114
- }
115
- }
116
- },
117
- "fonts": {
118
- "title": {
119
- "font": {
120
- "bold": true,
121
- "size": 14,
122
- "color": "#FFFFFF"
123
- }
124
- },
125
- "hyperlink": {
126
- "font": {
127
- "color": "#2563EB" // Accessible, standard sleek link blue
128
- }
129
- },
130
- "modified": {
131
- "font": {
132
- "bold": false,
133
- "size": 10
134
- }
135
- },
136
- "bold": {
137
- "font": {
138
- "bold": true
139
- }
140
- }
141
- },
142
- "columns": {
143
- "A": { "width": 200 },
144
- "B": { "width": 280 },
145
- "C": { "width": 150 },
146
- "D": { "width": 150 }
147
- }
148
- },
149
- "scenario": {
150
- "colors": {
151
- "topRow": "#D35400",
152
- "buildingsHeader": "#C06C84",
153
- "servicesHeader": "#D97706",
154
- "servicesSub": "#FCF8F2",
155
- "infraHeader": "#6C5B7B",
156
- "infraSub": "#F4F2F5",
157
- "transHeader": "#355C7D"
158
- },
159
- "headers": {
160
- "buildingsSub": {
161
- "fill": {
162
- "color": "#FAF4F6"
163
- }
164
- },
165
- "transSub": {
166
- "fill": {
167
- "color": "#F0F3F6"
168
- }
169
- }
170
- },
171
- "data": {
172
- "grayFill": {
173
- "fill": {
174
- "color": "#F8FAFC" // Clean, modern off-white/gray
175
- }
176
- },
177
- "labelFormat": {
178
- "font": {
179
- "bold": true
180
- },
181
- "fill": {
182
- "color": "#F8FAFC"
183
- },
184
- "verticalAlignment": "Center"
185
- }
186
- },
187
- "fonts": {
188
- "modified": {
189
- "font": {
190
- "bold": true,
191
- "size": 10
192
- }
193
- },
194
- "hyperlink": {
195
- "font": {
196
- "color": "#2563EB"
197
- },
198
- "fill": {
199
- "color": "#F8FAFC" // Removed the aggressive purple fill
200
- }
201
- }
202
- },
203
- "columns": {
204
- "A": { "width": 180 },
205
- "B": { "width": 180 },
206
- "C": { "width": 200 },
207
- "D": { "width": 180 },
208
- "E": { "width": 150 }
209
- }
210
- },
211
- "calc": {
212
- "colors": {
213
- "header": "#1E293B",
214
- "gasCalc": "#D35400",
215
- "totalCell": "#F1F5F9",
216
- "grandTotal": "#E2E8F0",
217
- "studentCalc": "#6C5B7B"
218
- },
219
- "headers": {},
220
- "data": {
221
- "fillTarget": {
222
- "fill": {
223
- "color": "#F1F5F9"
224
- }
225
- },
226
- "totalEmissionsVal": {
227
- "numberFormat": "#,##0.00",
228
- "fill": {
229
- "color": "#F1F5F9"
230
- }
231
- },
232
- "grandTotalVal": {
233
- "numberFormat": "#,##0.00",
234
- "font": {
235
- "bold": true
236
- },
237
- "fill": {
238
- "color": "#E2E8F0"
239
- }
240
- }
241
- },
242
- "fonts": {
243
- "bold": {
244
- "font": {
245
- "bold": true
246
- }
247
- }
248
- },
249
- "columns": {
250
- "A": { "width": 250 },
251
- "B": { "width": 150 }
252
- }
253
- },
254
- "emissionFactors": {
255
- "colors": {},
256
- "headers": {
257
- "main": {
258
- "font": {
259
- "bold": true,
260
- "color": "#FFFFFF"
261
- },
262
- "fill": {
263
- "color": "#1E293B" // Unified general header color
264
- }
265
- }
266
- },
267
- "data": {},
268
- "fonts": {},
269
- "columns": {
270
- "A": { "width": 70 },
271
- "B": { "width": 130 },
272
- "C": { "width": 40 },
273
- "DPlus": { "width": 70 }
274
- },
275
- "tabColor": "#D9EAD3"
276
- },
277
- "inputData": {
278
- "colors": {},
279
- "headers": {
280
- "main": {
281
- "font": {
282
- "bold": true,
283
- "color": "#FFFFFF"
284
- },
285
- "fill": {
286
- "color": "#1E293B"
287
- }
288
- }
289
- },
290
- "data": {},
291
- "fonts": {},
292
- "columns": {
293
- "A": { "width": 110 },
294
- "B": { "width": 220 },
295
- "CDE": { "width": 110 }
296
- }
297
- },
298
- "assumptions": {
299
- "columns": {
300
- "buildings": { "A": { "width": 250 }, "BPlus": { "width": 180 } },
301
- "services": { "A": { "width": 250 }, "BPlus": { "width": 150 } },
302
- "infrastructure": { "A": { "width": 250 }, "BPlus": { "width": 150 } },
303
- "transportation": { "A": { "width": 250 }, "BPlus": { "width": 200 } },
304
- "energy": { "A": { "width": 250 }, "BPlus": { "width": 100 } },
305
- "neighbourhoods": { "A": { "width": 250 }, "BPlus": { "width": 250 } },
306
- "gwp": { "A": { "width": 150 } }
307
- },
308
- "tabColor": "#D9EAD3"
309
- }
310
- };
@@ -1,69 +0,0 @@
1
- import { CellFormatSpec } from './workbook.types';
2
- export interface SummaryTheme {
3
- colors: Record<string, CellFormatSpec>;
4
- headers: Record<string, CellFormatSpec>;
5
- data: Record<string, CellFormatSpec>;
6
- fonts: Record<string, CellFormatSpec>;
7
- columns: Record<string, {
8
- width: number;
9
- }>;
10
- }
11
- export interface ScenarioTheme {
12
- colors: Record<string, string>;
13
- headers: Record<string, CellFormatSpec>;
14
- data: Record<string, CellFormatSpec>;
15
- fonts: Record<string, CellFormatSpec>;
16
- columns: Record<string, {
17
- width: number;
18
- }>;
19
- }
20
- export interface CalculationTheme {
21
- colors?: Record<string, string>;
22
- headers?: Record<string, CellFormatSpec>;
23
- data?: Record<string, CellFormatSpec>;
24
- fonts?: Record<string, CellFormatSpec>;
25
- columns: Record<string, {
26
- width: number;
27
- }>;
28
- }
29
- export interface EmissionFactorsTheme {
30
- colors?: Record<string, string>;
31
- headers?: Record<string, CellFormatSpec>;
32
- data?: Record<string, CellFormatSpec>;
33
- fonts?: Record<string, CellFormatSpec>;
34
- columns: Record<string, {
35
- width: number;
36
- }>;
37
- tabColor?: string;
38
- }
39
- export interface InputDataTheme {
40
- colors?: Record<string, string>;
41
- headers?: Record<string, CellFormatSpec>;
42
- data?: Record<string, CellFormatSpec>;
43
- fonts?: Record<string, CellFormatSpec>;
44
- columns: Record<string, {
45
- width: number;
46
- }>;
47
- }
48
- export interface AssumptionsTheme {
49
- columns: Record<string, Record<string, {
50
- width: number;
51
- }>>;
52
- tabColor?: string;
53
- }
54
- export interface WorkbookTheme {
55
- summary: SummaryTheme;
56
- scenario: ScenarioTheme;
57
- calc: CalculationTheme;
58
- emissionFactors: EmissionFactorsTheme;
59
- inputData: InputDataTheme;
60
- assumptions: AssumptionsTheme;
61
- typography?: {
62
- fontName: string;
63
- fontSize: number;
64
- };
65
- }
66
- export interface GeneratorConfig {
67
- locale?: string;
68
- theme?: WorkbookTheme;
69
- }
@@ -1 +0,0 @@
1
- export {};