@jjlmoya/utils-finance 1.3.0 → 1.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-finance",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -10,7 +10,15 @@ interface Props {
10
10
  const { ui } = Astro.props;
11
11
  ---
12
12
 
13
- <div class="fire-container" id="fire-calculator-main" data-currency-symbol={ui.currencySymbol} data-currency-code={ui.currencyCode} data-currency-locale={ui.currencyLocale} data-time-format={ui.labelTimeRemainingFormat} data-already-fi={ui.labelAlreadyFI} data-unachievable={ui.labelUnachievable}>
13
+ <div class="fire-container" id="fire-calculator-main"
14
+ data-currency-symbol={ui.currencySymbol}
15
+ data-currency-code={ui.currencyCode}
16
+ data-currency-locale={ui.currencyLocale}
17
+ data-time-format={ui.labelTimeRemainingFormat}
18
+ data-already-fi={ui.labelAlreadyFI}
19
+ data-unachievable={ui.labelUnachievable}
20
+ data-label-added={ui.labelAdded}
21
+ >
14
22
  <div class="fire-grid">
15
23
  <div class="fire-panel">
16
24
  <div class="fire-input-group">
@@ -547,6 +555,7 @@ const { ui } = Astro.props;
547
555
  const timeFormatTemplate = container?.getAttribute('data-time-format') || 'You have {years} years and {months} months left';
548
556
  const labelAlreadyFI = container?.getAttribute('data-already-fi') || 'You have already achieved financial freedom!';
549
557
  const labelUnachievable = container?.getAttribute('data-unachievable') || 'Goal unachievable with this savings rate';
558
+ const labelAdded = container?.getAttribute('data-label-added') || 'Added:';
550
559
 
551
560
  function formatCurrency(val: number): string {
552
561
  return new Intl.NumberFormat(currencyLocale, {
@@ -641,7 +650,7 @@ const { ui } = Astro.props;
641
650
  const target = e.target as HTMLInputElement;
642
651
  if (target && checklistFeedback) {
643
652
  if (target.checked) {
644
- checklistFeedback.textContent = `Añadido: ${target.parentElement?.textContent?.trim()}`;
653
+ checklistFeedback.textContent = `${labelAdded} ${target.parentElement?.textContent?.trim()}`;
645
654
  checklistFeedback.classList.add('visible');
646
655
  setTimeout(() => checklistFeedback.classList.remove('visible'), 2000);
647
656
  }
@@ -677,7 +686,7 @@ const { ui } = Astro.props;
677
686
  const imgData = canvas.toDataURL('image/png');
678
687
  const pdf = new jsPDF('p', 'pt', 'a4');
679
688
  pdf.addImage(imgData, 'PNG', 0, 0, 595.28, (canvas.height * 595.28) / canvas.width);
680
- pdf.save('mi-plan-fire.pdf');
689
+ pdf.save('fire-plan.pdf');
681
690
  }
682
691
 
683
692
  const btnExport = document.getElementById('btn-export');
@@ -2,9 +2,9 @@ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dt
2
2
  import type { ToolLocaleContent } from '../../../types';
3
3
  import type { FIRECalculatorUI } from '../ui';
4
4
 
5
- const slug = 'four-percent-rule-fire-calculator-spain';
6
- const title = 'FIRE Calculator Spain: 4% Rule';
7
- const description = 'Calculate your financial independence number in Spain using the 4% rule. Plan your early retirement and visualize your path to financial freedom.';
5
+ const slug = 'four-percent-rule-fire-calculator';
6
+ const title = 'FIRE Calculator: 4% Rule';
7
+ const description = 'Calculate your financial independence number using the 4% rule. Plan your early retirement and visualize your path to financial freedom.';
8
8
 
9
9
  const faqData = [
10
10
  {
@@ -62,8 +62,8 @@ const bibliographyData = [
62
62
  url: 'https://www.multpl.com/shiller-pe',
63
63
  },
64
64
  {
65
- name: 'Bank of Spain - Financial Guidance',
66
- url: 'https://www.bde.es/bde/en/',
65
+ name: 'Investopedia - FIRE Guide',
66
+ url: 'https://www.investopedia.com/terms/f/financial-independence-retire-early-fire.asp',
67
67
  },
68
68
  ];
69
69
 
@@ -62,8 +62,8 @@ const bibliographyData = [
62
62
  url: 'https://www.multpl.com/shiller-pe',
63
63
  },
64
64
  {
65
- name: 'Spanish Financial Regulator - CNMV',
66
- url: 'https://www.cnmv.es/',
65
+ name: 'Bogleheads - Guía de Inversión',
66
+ url: 'https://bogleheads.es/',
67
67
  },
68
68
  ];
69
69
 
@@ -3,8 +3,8 @@ import type { ToolLocaleContent } from '../../../types';
3
3
  import type { FIRECalculatorUI } from '../ui';
4
4
 
5
5
  const slug = 'calculatrice-regle-4-pour-cent-fire';
6
- const title = 'Calculatrice FIRE Espagne: Règle des 4%';
7
- const description = 'Calculez votre chiffre magique pour l\'indépendance financière en Espagne. Planifiez votre retraite anticipée et visualisez votre chemin vers la liberté économique.';
6
+ const title = 'Calculatrice FIRE: Règle des 4%';
7
+ const description = 'Calculez votre chiffre magique pour l\'indépendance financière. Planifiez votre retraite anticipée et visualisez votre chemin vers la liberté économique.';
8
8
 
9
9
  const faqData = [
10
10
  {
@@ -36,7 +36,7 @@ const howToData = [
36
36
  },
37
37
  {
38
38
  name: 'Choisissez votre taux de retrait sûr',
39
- text: 'La Règle des 4% est standard, mais ajustez entre 2,5% (conservateur) et 6% (agressif) selon votre tolérance au risque.',
39
+ text: 'La Règle des 4% est standard, mas ajustez entre 2,5% (conservateur) et 6% (agressif) selon votre tolérance au risque.',
40
40
  },
41
41
  {
42
42
  name: 'Entrez votre patrimoine actuel',
@@ -62,8 +62,8 @@ const bibliographyData = [
62
62
  url: 'https://www.multpl.com/shiller-pe',
63
63
  },
64
64
  {
65
- name: 'Banque de France - Orientations Financières',
66
- url: 'https://www.banque-france.fr/',
65
+ name: 'Investopedia - FIRE Guide',
66
+ url: 'https://www.investopedia.com/terms/f/financial-independence-retire-early-fire.asp',
67
67
  },
68
68
  ];
69
69