@jjlmoya/utils-finance 1.45.0 → 1.46.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/package.json +1 -1
- package/src/entries.ts +2 -1
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/mfe_assets_contract.test.ts +48 -0
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/renterInsuranceCoverageGapCalculator/bibliography.astro +11 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/bibliography.ts +6 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/component.astro +80 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/controller.ts +102 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/currency.test.ts +17 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/currency.ts +69 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/dom-views.ts +68 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/entry.ts +28 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/evaluator.ts +17 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/de.ts +40 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/en.ts +98 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/es.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/fr.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/id.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/it.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/ja.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/ko.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/nl.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/pl.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/pt.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/ru.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/sv.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/tr.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/i18n/zh.ts +38 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/index.ts +11 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/logic.test.ts +52 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/logic.ts +108 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/renter-insurance-coverage-gap-calculator.css +462 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/seo.astro +11 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/storage.ts +23 -0
- package/src/tool/renterInsuranceCoverageGapCalculator/ui.ts +48 -0
- package/src/tools.ts +2 -1
package/src/tool/renterInsuranceCoverageGapCalculator/renter-insurance-coverage-gap-calculator.css
ADDED
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--n-ink: #1f2933;
|
|
3
|
+
--n-muted: #5f6c76;
|
|
4
|
+
--n-paper: #fffdf8;
|
|
5
|
+
--n-surface: #f4efe5;
|
|
6
|
+
--n-line: #d8cdbb;
|
|
7
|
+
--n-accent: #b35c35;
|
|
8
|
+
--n-accent-strong: #7d351e;
|
|
9
|
+
--n-accent-soft: #f1d8c6;
|
|
10
|
+
--n-safe: #2f6f5e;
|
|
11
|
+
--n-review: #9b6b1f;
|
|
12
|
+
--n-exposed: #9b3e34;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.theme-dark {
|
|
16
|
+
--n-ink: #f7f1e7;
|
|
17
|
+
--n-muted: #c5b9a8;
|
|
18
|
+
--n-paper: #242321;
|
|
19
|
+
--n-surface: #302e2a;
|
|
20
|
+
--n-line: #5d5346;
|
|
21
|
+
--n-accent: #e08a5c;
|
|
22
|
+
--n-accent-strong: #ffb38b;
|
|
23
|
+
--n-accent-soft: #5d392c;
|
|
24
|
+
--n-safe: #79c3a8;
|
|
25
|
+
--n-review: #e3b76c;
|
|
26
|
+
--n-exposed: #f08c80;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ric-tool {
|
|
30
|
+
--n-ink: #1f2933;
|
|
31
|
+
--n-muted: #5f6c76;
|
|
32
|
+
--n-paper: #fffdf8;
|
|
33
|
+
--n-surface: #f4efe5;
|
|
34
|
+
--n-line: #d8cdbb;
|
|
35
|
+
--n-accent: #b35c35;
|
|
36
|
+
--n-accent-strong: #7d351e;
|
|
37
|
+
--n-accent-soft: #f1d8c6;
|
|
38
|
+
--n-safe: #2f6f5e;
|
|
39
|
+
--n-review: #9b6b1f;
|
|
40
|
+
--n-exposed: #9b3e34;
|
|
41
|
+
|
|
42
|
+
color: var(--n-ink);
|
|
43
|
+
}
|
|
44
|
+
.theme-dark .ric-tool {
|
|
45
|
+
--n-ink: #f7f1e7;
|
|
46
|
+
--n-muted: #c5b9a8;
|
|
47
|
+
--n-paper: #242321;
|
|
48
|
+
--n-surface: #302e2a;
|
|
49
|
+
--n-line: #5d5346;
|
|
50
|
+
--n-accent: #e08a5c;
|
|
51
|
+
--n-accent-strong: #ffb38b;
|
|
52
|
+
--n-accent-soft: #5d392c;
|
|
53
|
+
--n-safe: #79c3a8;
|
|
54
|
+
--n-review: #e3b76c;
|
|
55
|
+
--n-exposed: #f08c80;
|
|
56
|
+
}
|
|
57
|
+
.ric-card {
|
|
58
|
+
background: var(--n-paper);
|
|
59
|
+
border: 1px solid var(--n-line);
|
|
60
|
+
border-radius: 1.25rem;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
}
|
|
63
|
+
.ric-workspace {
|
|
64
|
+
display: grid;
|
|
65
|
+
grid-template-columns: 1.15fr 0.85fr;
|
|
66
|
+
}
|
|
67
|
+
.ric-inventory-panel,
|
|
68
|
+
.ric-policy-panel {
|
|
69
|
+
padding: clamp(1.2rem, 3vw, 2.4rem);
|
|
70
|
+
}
|
|
71
|
+
.ric-inventory-panel {
|
|
72
|
+
background: var(--n-surface);
|
|
73
|
+
border-right: 1px solid var(--n-line);
|
|
74
|
+
}
|
|
75
|
+
.ric-panel-heading {
|
|
76
|
+
max-width: 34rem;
|
|
77
|
+
}
|
|
78
|
+
.ric-eyebrow {
|
|
79
|
+
color: var(--n-accent-strong);
|
|
80
|
+
font-size: 0.7rem;
|
|
81
|
+
font-weight: 800;
|
|
82
|
+
letter-spacing: 0.12em;
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
}
|
|
85
|
+
.ric-panel-heading h2 {
|
|
86
|
+
margin: 0.45rem 0 0.35rem;
|
|
87
|
+
font-size: clamp(1.35rem, 2vw, 2rem);
|
|
88
|
+
letter-spacing: -0.04em;
|
|
89
|
+
}
|
|
90
|
+
.ric-panel-heading p {
|
|
91
|
+
color: var(--n-muted);
|
|
92
|
+
font-size: 0.9rem;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
margin: 0;
|
|
95
|
+
}
|
|
96
|
+
.ric-shelf-scene {
|
|
97
|
+
margin: 1.7rem 0 1.3rem;
|
|
98
|
+
padding: 1rem 0 0.85rem;
|
|
99
|
+
border-top: 3px solid var(--n-ink);
|
|
100
|
+
border-bottom: 3px solid var(--n-ink);
|
|
101
|
+
}
|
|
102
|
+
.ric-shelf-top,
|
|
103
|
+
.ric-shelf-legend {
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: space-between;
|
|
106
|
+
gap: 0.8rem;
|
|
107
|
+
color: var(--n-muted);
|
|
108
|
+
font-size: 0.72rem;
|
|
109
|
+
font-weight: 700;
|
|
110
|
+
}
|
|
111
|
+
.ric-shelf-track {
|
|
112
|
+
height: 4.7rem;
|
|
113
|
+
margin: 1rem 0 0.7rem;
|
|
114
|
+
position: relative;
|
|
115
|
+
background: var(--n-paper);
|
|
116
|
+
border: 1px solid var(--n-line);
|
|
117
|
+
}
|
|
118
|
+
.ric-contents-fill {
|
|
119
|
+
background: var(--n-accent-soft);
|
|
120
|
+
display: block;
|
|
121
|
+
height: 100%;
|
|
122
|
+
width: 0;
|
|
123
|
+
transition: width 0.25s ease;
|
|
124
|
+
}
|
|
125
|
+
.ric-limit-line {
|
|
126
|
+
background: var(--n-accent-strong);
|
|
127
|
+
bottom: -0.55rem;
|
|
128
|
+
display: block;
|
|
129
|
+
height: 5.8rem;
|
|
130
|
+
left: 0;
|
|
131
|
+
position: absolute;
|
|
132
|
+
width: 2px;
|
|
133
|
+
transition: left 0.25s ease;
|
|
134
|
+
}
|
|
135
|
+
.ric-loss-mark {
|
|
136
|
+
background: var(--n-review);
|
|
137
|
+
border-radius: 50%;
|
|
138
|
+
display: block;
|
|
139
|
+
height: 0.75rem;
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: 50%;
|
|
142
|
+
transform: translate(-50%, -50%);
|
|
143
|
+
width: 0.75rem;
|
|
144
|
+
transition: left 0.25s ease;
|
|
145
|
+
}
|
|
146
|
+
.ric-dot {
|
|
147
|
+
border-radius: 50%;
|
|
148
|
+
display: inline-block;
|
|
149
|
+
height: 0.55rem;
|
|
150
|
+
margin-right: 0.3rem;
|
|
151
|
+
width: 0.55rem;
|
|
152
|
+
}
|
|
153
|
+
.ric-dot-contents {
|
|
154
|
+
background: var(--n-accent);
|
|
155
|
+
}
|
|
156
|
+
.ric-dot-limit {
|
|
157
|
+
background: var(--n-accent-strong);
|
|
158
|
+
}
|
|
159
|
+
.ric-inventory-list {
|
|
160
|
+
border-top: 1px solid var(--n-line);
|
|
161
|
+
}
|
|
162
|
+
.ric-inventory-row {
|
|
163
|
+
align-items: center;
|
|
164
|
+
border-bottom: 1px solid var(--n-line);
|
|
165
|
+
display: flex;
|
|
166
|
+
gap: 1rem;
|
|
167
|
+
justify-content: space-between;
|
|
168
|
+
min-height: 3.2rem;
|
|
169
|
+
}
|
|
170
|
+
.ric-inventory-row > span:first-child {
|
|
171
|
+
font-size: 0.9rem;
|
|
172
|
+
font-weight: 650;
|
|
173
|
+
}
|
|
174
|
+
.ric-money-input {
|
|
175
|
+
align-items: center;
|
|
176
|
+
background: var(--n-paper);
|
|
177
|
+
border: 1px solid var(--n-line);
|
|
178
|
+
display: flex;
|
|
179
|
+
min-width: 9.8rem;
|
|
180
|
+
}
|
|
181
|
+
.ric-money-input:focus-within {
|
|
182
|
+
border-color: var(--n-accent);
|
|
183
|
+
box-shadow: 0 0 0 3px var(--n-accent-soft);
|
|
184
|
+
}
|
|
185
|
+
.ric-money-input input {
|
|
186
|
+
background: transparent;
|
|
187
|
+
border: 0;
|
|
188
|
+
color: var(--n-ink);
|
|
189
|
+
font: inherit;
|
|
190
|
+
min-width: 0;
|
|
191
|
+
outline: 0;
|
|
192
|
+
padding: 0.7rem 0.55rem;
|
|
193
|
+
text-align: right;
|
|
194
|
+
width: 100%;
|
|
195
|
+
}
|
|
196
|
+
.ric-money-input b {
|
|
197
|
+
color: var(--n-muted);
|
|
198
|
+
font-size: 0.68rem;
|
|
199
|
+
padding-right: 0.6rem;
|
|
200
|
+
}
|
|
201
|
+
.ric-largest-list {
|
|
202
|
+
color: var(--n-muted);
|
|
203
|
+
font-size: 0.75rem;
|
|
204
|
+
line-height: 1.65;
|
|
205
|
+
margin: 1rem 0 0;
|
|
206
|
+
padding-left: 1.2rem;
|
|
207
|
+
}
|
|
208
|
+
.ric-policy-panel {
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
}
|
|
212
|
+
.ric-field-stack {
|
|
213
|
+
display: grid;
|
|
214
|
+
gap: 1rem;
|
|
215
|
+
margin-top: 1.6rem;
|
|
216
|
+
}
|
|
217
|
+
.ric-field {
|
|
218
|
+
display: grid;
|
|
219
|
+
gap: 0.42rem;
|
|
220
|
+
}
|
|
221
|
+
.ric-field label,
|
|
222
|
+
.ric-label {
|
|
223
|
+
font-size: 0.82rem;
|
|
224
|
+
font-weight: 750;
|
|
225
|
+
}
|
|
226
|
+
.ric-field small {
|
|
227
|
+
color: var(--n-muted);
|
|
228
|
+
font-size: 0.7rem;
|
|
229
|
+
line-height: 1.4;
|
|
230
|
+
}
|
|
231
|
+
.ric-select {
|
|
232
|
+
position: relative;
|
|
233
|
+
}
|
|
234
|
+
.ric-select-trigger {
|
|
235
|
+
align-items: center;
|
|
236
|
+
background: var(--n-surface);
|
|
237
|
+
border: 1px solid var(--n-line);
|
|
238
|
+
color: var(--n-ink);
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
display: flex;
|
|
241
|
+
font: inherit;
|
|
242
|
+
justify-content: space-between;
|
|
243
|
+
padding: 0.75rem 0.85rem;
|
|
244
|
+
text-align: left;
|
|
245
|
+
width: 100%;
|
|
246
|
+
}
|
|
247
|
+
.ric-currency-trigger-main {
|
|
248
|
+
align-items: baseline;
|
|
249
|
+
display: inline-flex;
|
|
250
|
+
gap: 0.45rem;
|
|
251
|
+
}
|
|
252
|
+
.ric-currency-trigger-main strong {
|
|
253
|
+
color: var(--n-accent-strong);
|
|
254
|
+
font-size: 1.05rem;
|
|
255
|
+
}
|
|
256
|
+
.ric-currency-trigger-main span {
|
|
257
|
+
font-weight: 800;
|
|
258
|
+
letter-spacing: 0.04em;
|
|
259
|
+
}
|
|
260
|
+
.ric-currency-arrow {
|
|
261
|
+
border-bottom: 1px solid currentcolor;
|
|
262
|
+
border-right: 1px solid currentcolor;
|
|
263
|
+
height: 0.45rem;
|
|
264
|
+
transform: rotate(45deg) translateY(-2px);
|
|
265
|
+
width: 0.45rem;
|
|
266
|
+
}
|
|
267
|
+
.ric-select-menu {
|
|
268
|
+
background: var(--n-paper);
|
|
269
|
+
border: 1px solid var(--n-line);
|
|
270
|
+
left: 0;
|
|
271
|
+
position: absolute;
|
|
272
|
+
right: 0;
|
|
273
|
+
top: calc(100% + 0.25rem);
|
|
274
|
+
z-index: 5;
|
|
275
|
+
}
|
|
276
|
+
.ric-select-menu[hidden] {
|
|
277
|
+
display: none;
|
|
278
|
+
}
|
|
279
|
+
.ric-select-menu button {
|
|
280
|
+
background: transparent;
|
|
281
|
+
border: 0;
|
|
282
|
+
color: var(--n-ink);
|
|
283
|
+
cursor: pointer;
|
|
284
|
+
display: flex;
|
|
285
|
+
font: inherit;
|
|
286
|
+
justify-content: space-between;
|
|
287
|
+
padding: 0.7rem 0.85rem;
|
|
288
|
+
text-align: left;
|
|
289
|
+
width: 100%;
|
|
290
|
+
}
|
|
291
|
+
.ric-currency-option {
|
|
292
|
+
align-items: center;
|
|
293
|
+
gap: 0.7rem;
|
|
294
|
+
}
|
|
295
|
+
.ric-currency-option strong {
|
|
296
|
+
color: var(--n-accent-strong);
|
|
297
|
+
min-width: 2rem;
|
|
298
|
+
}
|
|
299
|
+
.ric-currency-option span {
|
|
300
|
+
font-weight: 800;
|
|
301
|
+
letter-spacing: 0.04em;
|
|
302
|
+
}
|
|
303
|
+
.ric-currency-option small {
|
|
304
|
+
margin-left: auto;
|
|
305
|
+
}
|
|
306
|
+
.ric-currency-field > small {
|
|
307
|
+
color: var(--n-muted);
|
|
308
|
+
font-size: 0.7rem;
|
|
309
|
+
line-height: 1.4;
|
|
310
|
+
}
|
|
311
|
+
.ric-select-menu button:hover,
|
|
312
|
+
.ric-select-menu button[aria-selected="true"] {
|
|
313
|
+
background: var(--n-accent-soft);
|
|
314
|
+
}
|
|
315
|
+
.ric-select-menu small {
|
|
316
|
+
color: var(--n-muted);
|
|
317
|
+
}
|
|
318
|
+
.ric-result-block {
|
|
319
|
+
border-top: 1px solid var(--n-line);
|
|
320
|
+
margin-top: 1.7rem;
|
|
321
|
+
padding-top: 1.4rem;
|
|
322
|
+
}
|
|
323
|
+
.ric-status {
|
|
324
|
+
color: var(--n-review);
|
|
325
|
+
display: block;
|
|
326
|
+
font-size: clamp(1.4rem, 2vw, 2rem);
|
|
327
|
+
letter-spacing: -0.04em;
|
|
328
|
+
margin: 0.5rem 0 0.35rem;
|
|
329
|
+
}
|
|
330
|
+
.ric-status::before {
|
|
331
|
+
background: currentcolor;
|
|
332
|
+
border-radius: 50%;
|
|
333
|
+
content: "";
|
|
334
|
+
display: inline-block;
|
|
335
|
+
height: 0.65rem;
|
|
336
|
+
margin: 0 0.5rem 0.12rem 0;
|
|
337
|
+
width: 0.65rem;
|
|
338
|
+
}
|
|
339
|
+
.ric-tool[data-status="safe"] .ric-status {
|
|
340
|
+
color: var(--n-safe);
|
|
341
|
+
}
|
|
342
|
+
.ric-tool[data-status="exposed"] .ric-status,
|
|
343
|
+
.ric-tool[data-status="invalid"] .ric-status {
|
|
344
|
+
color: var(--n-exposed);
|
|
345
|
+
}
|
|
346
|
+
.ric-result-block > p {
|
|
347
|
+
color: var(--n-muted);
|
|
348
|
+
font-size: 0.78rem;
|
|
349
|
+
line-height: 1.45;
|
|
350
|
+
margin: 0;
|
|
351
|
+
}
|
|
352
|
+
.ric-metric-main {
|
|
353
|
+
border-bottom: 1px solid var(--n-line);
|
|
354
|
+
display: flex;
|
|
355
|
+
justify-content: space-between;
|
|
356
|
+
margin-top: 1.15rem;
|
|
357
|
+
padding: 0.8rem 0;
|
|
358
|
+
}
|
|
359
|
+
.ric-metric-main span {
|
|
360
|
+
color: var(--n-muted);
|
|
361
|
+
font-size: 0.78rem;
|
|
362
|
+
}
|
|
363
|
+
.ric-metric-main strong {
|
|
364
|
+
color: var(--n-accent-strong);
|
|
365
|
+
font-size: clamp(1.6rem, 3vw, 2.5rem);
|
|
366
|
+
letter-spacing: -0.05em;
|
|
367
|
+
}
|
|
368
|
+
.ric-metric-line {
|
|
369
|
+
border-bottom: 1px solid var(--n-line);
|
|
370
|
+
display: flex;
|
|
371
|
+
font-size: 0.78rem;
|
|
372
|
+
justify-content: space-between;
|
|
373
|
+
padding: 0.58rem 0;
|
|
374
|
+
}
|
|
375
|
+
.ric-metric-line span {
|
|
376
|
+
color: var(--n-muted);
|
|
377
|
+
}
|
|
378
|
+
.ric-metric-line b {
|
|
379
|
+
font-size: 0.86rem;
|
|
380
|
+
}
|
|
381
|
+
.ric-tool .ric-result-note {
|
|
382
|
+
border-left: 2px solid var(--n-accent);
|
|
383
|
+
margin-top: 1rem;
|
|
384
|
+
padding-left: 0.65rem;
|
|
385
|
+
}
|
|
386
|
+
.ric-tool .ric-error {
|
|
387
|
+
color: var(--n-exposed);
|
|
388
|
+
font-weight: 700;
|
|
389
|
+
margin-top: 0.55rem;
|
|
390
|
+
}
|
|
391
|
+
.ric-actions {
|
|
392
|
+
align-items: center;
|
|
393
|
+
display: flex;
|
|
394
|
+
gap: 0.65rem;
|
|
395
|
+
margin-top: auto;
|
|
396
|
+
padding-top: 1.6rem;
|
|
397
|
+
}
|
|
398
|
+
.ric-button {
|
|
399
|
+
border: 1px solid var(--n-line);
|
|
400
|
+
cursor: pointer;
|
|
401
|
+
font: inherit;
|
|
402
|
+
font-size: 0.78rem;
|
|
403
|
+
font-weight: 800;
|
|
404
|
+
padding: 0.75rem 0.9rem;
|
|
405
|
+
}
|
|
406
|
+
.ric-button-primary {
|
|
407
|
+
background: var(--n-accent-strong);
|
|
408
|
+
border-color: var(--n-accent-strong);
|
|
409
|
+
color: var(--n-paper);
|
|
410
|
+
}
|
|
411
|
+
.ric-button-secondary {
|
|
412
|
+
background: var(--n-surface);
|
|
413
|
+
color: var(--n-ink);
|
|
414
|
+
}
|
|
415
|
+
.ric-actions [role="status"] {
|
|
416
|
+
color: var(--n-safe);
|
|
417
|
+
font-size: 0.72rem;
|
|
418
|
+
}
|
|
419
|
+
.ric-privacy {
|
|
420
|
+
border-top: 1px solid var(--n-line);
|
|
421
|
+
color: var(--n-muted);
|
|
422
|
+
font-size: 0.72rem;
|
|
423
|
+
margin: 0 1.3rem;
|
|
424
|
+
padding: 1rem 0;
|
|
425
|
+
}
|
|
426
|
+
.ric-method {
|
|
427
|
+
border-top: 1px solid var(--n-line);
|
|
428
|
+
margin: 0 1.3rem;
|
|
429
|
+
padding: 0.9rem 0 1.2rem;
|
|
430
|
+
}
|
|
431
|
+
.ric-method summary {
|
|
432
|
+
cursor: pointer;
|
|
433
|
+
font-size: 0.78rem;
|
|
434
|
+
font-weight: 800;
|
|
435
|
+
}
|
|
436
|
+
.ric-method p {
|
|
437
|
+
color: var(--n-muted);
|
|
438
|
+
font-size: 0.78rem;
|
|
439
|
+
line-height: 1.6;
|
|
440
|
+
margin: 0.8rem 0 0;
|
|
441
|
+
max-width: 72rem;
|
|
442
|
+
}
|
|
443
|
+
.ric-money-input input[aria-invalid="true"] {
|
|
444
|
+
outline: 2px solid var(--n-exposed);
|
|
445
|
+
outline-offset: -2px;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
@media (max-width: 760px) {
|
|
449
|
+
.ric-workspace {
|
|
450
|
+
grid-template-columns: 1fr;
|
|
451
|
+
}
|
|
452
|
+
.ric-inventory-panel {
|
|
453
|
+
border-bottom: 1px solid var(--n-line);
|
|
454
|
+
border-right: 0;
|
|
455
|
+
}
|
|
456
|
+
.ric-inventory-row {
|
|
457
|
+
gap: 0.6rem;
|
|
458
|
+
}
|
|
459
|
+
.ric-money-input {
|
|
460
|
+
min-width: 8.8rem;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
+
import { renterInsuranceCoverageGapCalculator } from './entry';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props { locale?: KnownLocale; }
|
|
7
|
+
const { locale = 'en' } = Astro.props;
|
|
8
|
+
const content = await renterInsuranceCoverageGapCalculator.i18n[locale]?.() ?? await renterInsuranceCoverageGapCalculator.i18n.en?.();
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
{content?.seo && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { RenterInsuranceInput } from './logic';
|
|
2
|
+
|
|
3
|
+
const STORAGE_KEY = 'jjlmoya:renter-insurance-coverage-gap:v1';
|
|
4
|
+
|
|
5
|
+
const isRecord = (value: unknown): value is Record<string, unknown> => Boolean(value) && typeof value === 'object';
|
|
6
|
+
|
|
7
|
+
export function readSavedRenterInsuranceInput(fallback: RenterInsuranceInput): RenterInsuranceInput {
|
|
8
|
+
try {
|
|
9
|
+
const raw = window.localStorage.getItem(STORAGE_KEY);
|
|
10
|
+
if (!raw) return fallback;
|
|
11
|
+
const parsed: unknown = JSON.parse(raw);
|
|
12
|
+
if (!isRecord(parsed) || !isRecord(parsed.input)) return fallback;
|
|
13
|
+
return parsed.input as unknown as RenterInsuranceInput;
|
|
14
|
+
} catch {
|
|
15
|
+
return fallback;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function saveRenterInsuranceInput(input: RenterInsuranceInput): void {
|
|
20
|
+
try {
|
|
21
|
+
window.localStorage.setItem(STORAGE_KEY, JSON.stringify({ input }));
|
|
22
|
+
} catch {}
|
|
23
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface RenterInsuranceCoverageGapCalculatorUI extends Record<string, string> {
|
|
2
|
+
labelPolicyLimit: string;
|
|
3
|
+
labelDeductible: string;
|
|
4
|
+
labelSampleLoss: string;
|
|
5
|
+
labelCurrency: string;
|
|
6
|
+
labelApproximateRates: string;
|
|
7
|
+
labelPolicyBoundary: string;
|
|
8
|
+
labelSetLimit: string;
|
|
9
|
+
labelPolicyBoundaryHint: string;
|
|
10
|
+
labelInventory: string;
|
|
11
|
+
labelInventoryHint: string;
|
|
12
|
+
labelPolicyLimitHelp: string;
|
|
13
|
+
labelDeductibleHelp: string;
|
|
14
|
+
labelSampleLossHelp: string;
|
|
15
|
+
labelTotalContents: string;
|
|
16
|
+
labelCoverageGap: string;
|
|
17
|
+
labelCoverageRatio: string;
|
|
18
|
+
labelEstimatedPayout: string;
|
|
19
|
+
labelOutOfPocket: string;
|
|
20
|
+
labelStatus: string;
|
|
21
|
+
labelStatusSafe: string;
|
|
22
|
+
labelStatusReview: string;
|
|
23
|
+
labelStatusExposed: string;
|
|
24
|
+
labelStatusSafeText: string;
|
|
25
|
+
labelStatusReviewText: string;
|
|
26
|
+
labelStatusExposedText: string;
|
|
27
|
+
labelLargestCategories: string;
|
|
28
|
+
labelCoverageLine: string;
|
|
29
|
+
labelReplacementValue: string;
|
|
30
|
+
labelLimitMarker: string;
|
|
31
|
+
labelLossScenario: string;
|
|
32
|
+
labelIllustrativePayout: string;
|
|
33
|
+
labelReset: string;
|
|
34
|
+
labelCopy: string;
|
|
35
|
+
labelCopied: string;
|
|
36
|
+
labelCopyFailed: string;
|
|
37
|
+
labelInvalidInput: string;
|
|
38
|
+
labelMethodTitle: string;
|
|
39
|
+
labelMethodText: string;
|
|
40
|
+
labelPrivacyNote: string;
|
|
41
|
+
labelAmountPlaceholder: string;
|
|
42
|
+
labelCategoryFurniture: string;
|
|
43
|
+
labelCategoryElectronics: string;
|
|
44
|
+
labelCategoryClothing: string;
|
|
45
|
+
labelCategoryKitchen: string;
|
|
46
|
+
labelCategoryPersonal: string;
|
|
47
|
+
labelCategoryOther: string;
|
|
48
|
+
}
|
package/src/tools.ts
CHANGED
|
@@ -26,5 +26,6 @@ import { LOAN_TO_INCOME_RATIO_TOOL } from './tool/loanToIncomeRatio';
|
|
|
26
26
|
import { RENTAL_DEPOSIT_RETURN_TOOL } from './tool/rentalDepositReturn';
|
|
27
27
|
import { CAPITAL_GAINS_TAX_SCENARIO_CALCULATOR_TOOL } from './tool/capitalGainsTaxScenarioCalculator';
|
|
28
28
|
import { INSURANCE_DEDUCTIBLE_BREAK_EVEN_CALCULATOR_TOOL } from './tool/insuranceDeductibleBreakEvenCalculator';
|
|
29
|
+
import { RENTER_INSURANCE_COVERAGE_GAP_CALCULATOR_TOOL } from './tool/renterInsuranceCoverageGapCalculator';
|
|
29
30
|
|
|
30
|
-
export const ALL_TOOLS: ToolDefinition[] = [COMPOUND_INTEREST_TOOL, FINANCIAL_FREEDOM_TOOL, SAVINGS_RATE_TOOL, PROFITABILITY_TOOL, MORTGAGE_TOOL, INFLATION_TOOL, PERCENTAGE_CALCULATOR_TOOL, LATE_INTEREST_TOOL, IBAN_BIC_SWIFT_TOOL, RENT_INCREASE_TOOL, LOTTERY_OPTIMIZER_TOOL, COURT_FEE_CALCULATOR_TOOL, LEGAL_INTEREST_RATE_TOOL, FIRE_CALCULATOR_TOOL, DEBT_SNOWBALL_TOOL, REVOLVING_CARD_CALCULATOR_TOOL, PESETA_VALUE_TOOL, SALARY_EMPLOYER_COST_TOOL, DIVIDEND_YIELD_TOOL, MORTGAGE_EXTRA_PAYMENT_PLANNER_TOOL, INFLATION_PURCHASING_POWER_TOOL, SUBSCRIPTION_COST_ANNUALIZER_TOOL, LOAN_TO_INCOME_RATIO_TOOL, RENTAL_DEPOSIT_RETURN_TOOL, CAPITAL_GAINS_TAX_SCENARIO_CALCULATOR_TOOL, INSURANCE_DEDUCTIBLE_BREAK_EVEN_CALCULATOR_TOOL];
|
|
31
|
+
export const ALL_TOOLS: ToolDefinition[] = [COMPOUND_INTEREST_TOOL, FINANCIAL_FREEDOM_TOOL, SAVINGS_RATE_TOOL, PROFITABILITY_TOOL, MORTGAGE_TOOL, INFLATION_TOOL, PERCENTAGE_CALCULATOR_TOOL, LATE_INTEREST_TOOL, IBAN_BIC_SWIFT_TOOL, RENT_INCREASE_TOOL, LOTTERY_OPTIMIZER_TOOL, COURT_FEE_CALCULATOR_TOOL, LEGAL_INTEREST_RATE_TOOL, FIRE_CALCULATOR_TOOL, DEBT_SNOWBALL_TOOL, REVOLVING_CARD_CALCULATOR_TOOL, PESETA_VALUE_TOOL, SALARY_EMPLOYER_COST_TOOL, DIVIDEND_YIELD_TOOL, MORTGAGE_EXTRA_PAYMENT_PLANNER_TOOL, INFLATION_PURCHASING_POWER_TOOL, SUBSCRIPTION_COST_ANNUALIZER_TOOL, LOAN_TO_INCOME_RATIO_TOOL, RENTAL_DEPOSIT_RETURN_TOOL, CAPITAL_GAINS_TAX_SCENARIO_CALCULATOR_TOOL, INSURANCE_DEDUCTIBLE_BREAK_EVEN_CALCULATOR_TOOL, RENTER_INSURANCE_COVERAGE_GAP_CALCULATOR_TOOL];
|