@jjlmoya/utils-home 1.10.0 → 1.13.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/index.ts +1 -1
- package/src/pages/[locale]/[slug].astro +3 -4
- package/src/tool/dewPointCalculator/index.ts +3 -7
- package/src/tool/heatingComparator/index.ts +3 -7
- package/src/tool/ledSavingCalculator/index.ts +3 -7
- package/src/tool/projectorCalculator/index.ts +3 -7
- package/src/tool/qrGenerator/index.ts +3 -7
- package/src/tool/solarCalculator/index.ts +3 -7
- package/src/tool/tariffComparator/index.ts +3 -7
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -14,7 +14,8 @@ import type { UtilitySEOContent } from "@jjlmoya/utils-shared";
|
|
|
14
14
|
export async function getStaticPaths() {
|
|
15
15
|
const paths = [];
|
|
16
16
|
|
|
17
|
-
for (const { entry, Component } of ALL_TOOLS) {
|
|
17
|
+
for (const { entry, Component: lazyComp } of ALL_TOOLS) {
|
|
18
|
+
const { default: Component } = await lazyComp();
|
|
18
19
|
const localeEntries = Object.entries(entry.i18n) as [
|
|
19
20
|
KnownLocale,
|
|
20
21
|
() => Promise<ToolLocaleContent>,
|
|
@@ -52,8 +53,6 @@ export async function getStaticPaths() {
|
|
|
52
53
|
return paths;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
type ToolComponent = (props: { ui: Record<string, string> }) => unknown;
|
|
56
|
-
|
|
57
56
|
interface NavItem {
|
|
58
57
|
id: string;
|
|
59
58
|
title: string;
|
|
@@ -62,7 +61,7 @@ interface NavItem {
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
interface Props {
|
|
65
|
-
Component:
|
|
64
|
+
Component: unknown;
|
|
66
65
|
locale: KnownLocale;
|
|
67
66
|
content: ToolLocaleContent;
|
|
68
67
|
localeUrls: Partial<Record<KnownLocale, string>>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import DewPointCalculatorComponent from './component.astro';
|
|
3
|
-
import DewPointCalculatorSEO from './seo.astro';
|
|
4
|
-
import DewPointCalculatorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
import type { DewPointCalculatorUI } from './ui';
|
|
7
4
|
|
|
@@ -34,11 +31,10 @@ export const dewPointCalculator: HomeToolEntry<DewPointCalculatorUI> = {
|
|
|
34
31
|
},
|
|
35
32
|
};
|
|
36
33
|
|
|
37
|
-
export { DewPointCalculatorComponent, DewPointCalculatorSEO, DewPointCalculatorBibliography };
|
|
38
34
|
|
|
39
35
|
export const DEW_POINT_CALCULATOR_TOOL: ToolDefinition = {
|
|
40
36
|
entry: dewPointCalculator,
|
|
41
|
-
Component:
|
|
42
|
-
SEOComponent:
|
|
43
|
-
BibliographyComponent:
|
|
37
|
+
Component: () => import('./component.astro'),
|
|
38
|
+
SEOComponent: () => import('./seo.astro'),
|
|
39
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
44
40
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import HeatingComparatorComponent from './component.astro';
|
|
3
|
-
import HeatingComparatorSEO from './seo.astro';
|
|
4
|
-
import HeatingComparatorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
import type { HeatingComparatorUI } from './ui';
|
|
7
4
|
|
|
@@ -32,11 +29,10 @@ export const heatingComparator: HomeToolEntry<HeatingComparatorUI> = {
|
|
|
32
29
|
},
|
|
33
30
|
};
|
|
34
31
|
|
|
35
|
-
export { HeatingComparatorComponent, HeatingComparatorSEO, HeatingComparatorBibliography };
|
|
36
32
|
|
|
37
33
|
export const HEATING_COMPARATOR_TOOL: ToolDefinition = {
|
|
38
34
|
entry: heatingComparator,
|
|
39
|
-
Component:
|
|
40
|
-
SEOComponent:
|
|
41
|
-
BibliographyComponent:
|
|
35
|
+
Component: () => import('./component.astro'),
|
|
36
|
+
SEOComponent: () => import('./seo.astro'),
|
|
37
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
42
38
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import LedSavingCalculatorComponent from './component.astro';
|
|
3
|
-
import LedSavingCalculatorSEO from './seo.astro';
|
|
4
|
-
import LedSavingCalculatorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
import type { LedSavingCalculatorUI } from './ui';
|
|
7
4
|
|
|
@@ -33,11 +30,10 @@ export const ledSavingCalculator: HomeToolEntry<LedSavingCalculatorUI> = {
|
|
|
33
30
|
},
|
|
34
31
|
};
|
|
35
32
|
|
|
36
|
-
export { LedSavingCalculatorComponent, LedSavingCalculatorSEO, LedSavingCalculatorBibliography };
|
|
37
33
|
|
|
38
34
|
export const LED_SAVING_CALCULATOR_TOOL: ToolDefinition = {
|
|
39
35
|
entry: ledSavingCalculator,
|
|
40
|
-
Component:
|
|
41
|
-
SEOComponent:
|
|
42
|
-
BibliographyComponent:
|
|
36
|
+
Component: () => import('./component.astro'),
|
|
37
|
+
SEOComponent: () => import('./seo.astro'),
|
|
38
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
43
39
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import ProjectorCalculatorComponent from './component.astro';
|
|
3
|
-
import ProjectorCalculatorSEO from './seo.astro';
|
|
4
|
-
import ProjectorCalculatorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
import type { ProjectorCalculatorUI } from './ui';
|
|
7
4
|
|
|
@@ -33,11 +30,10 @@ export const projectorCalculator: HomeToolEntry<ProjectorCalculatorUI> = {
|
|
|
33
30
|
},
|
|
34
31
|
};
|
|
35
32
|
|
|
36
|
-
export { ProjectorCalculatorComponent, ProjectorCalculatorSEO, ProjectorCalculatorBibliography };
|
|
37
33
|
|
|
38
34
|
export const PROJECTOR_CALCULATOR_TOOL: ToolDefinition = {
|
|
39
35
|
entry: projectorCalculator,
|
|
40
|
-
Component:
|
|
41
|
-
SEOComponent:
|
|
42
|
-
BibliographyComponent:
|
|
36
|
+
Component: () => import('./component.astro'),
|
|
37
|
+
SEOComponent: () => import('./seo.astro'),
|
|
38
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
43
39
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import QRGeneratorComponent from './component.astro';
|
|
3
|
-
import QRGeneratorSEO from './seo.astro';
|
|
4
|
-
import QRGeneratorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
import type { QRGeneratorUI } from './ui';
|
|
7
4
|
|
|
@@ -32,11 +29,10 @@ export const qrGenerator: HomeToolEntry<QRGeneratorUI> = {
|
|
|
32
29
|
},
|
|
33
30
|
};
|
|
34
31
|
|
|
35
|
-
export { QRGeneratorComponent, QRGeneratorSEO, QRGeneratorBibliography };
|
|
36
32
|
|
|
37
33
|
export const QR_GENERATOR_TOOL: ToolDefinition = {
|
|
38
34
|
entry: qrGenerator,
|
|
39
|
-
Component:
|
|
40
|
-
SEOComponent:
|
|
41
|
-
BibliographyComponent:
|
|
35
|
+
Component: () => import('./component.astro'),
|
|
36
|
+
SEOComponent: () => import('./seo.astro'),
|
|
37
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
42
38
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import SolarCalculatorComponent from './component.astro';
|
|
3
|
-
import SolarCalculatorSEO from './seo.astro';
|
|
4
|
-
import SolarCalculatorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
import type { SolarCalculatorUI } from './ui';
|
|
7
4
|
|
|
@@ -32,11 +29,10 @@ export const solarCalculator: HomeToolEntry<SolarCalculatorUI> = {
|
|
|
32
29
|
},
|
|
33
30
|
};
|
|
34
31
|
|
|
35
|
-
export { SolarCalculatorComponent, SolarCalculatorSEO, SolarCalculatorBibliography };
|
|
36
32
|
|
|
37
33
|
export const SOLAR_CALCULATOR_TOOL: ToolDefinition = {
|
|
38
34
|
entry: solarCalculator,
|
|
39
|
-
Component:
|
|
40
|
-
SEOComponent:
|
|
41
|
-
BibliographyComponent:
|
|
35
|
+
Component: () => import('./component.astro'),
|
|
36
|
+
SEOComponent: () => import('./seo.astro'),
|
|
37
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
42
38
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { HomeToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
|
|
2
|
-
import TariffComparatorComponent from './component.astro';
|
|
3
|
-
import TariffComparatorSEO from './seo.astro';
|
|
4
|
-
import TariffComparatorBibliography from './bibliography.astro';
|
|
5
2
|
|
|
6
3
|
import type { TariffComparatorUI } from './ui';
|
|
7
4
|
|
|
@@ -33,11 +30,10 @@ export const tariffComparator: HomeToolEntry<TariffComparatorUI> = {
|
|
|
33
30
|
},
|
|
34
31
|
};
|
|
35
32
|
|
|
36
|
-
export { TariffComparatorComponent, TariffComparatorSEO, TariffComparatorBibliography };
|
|
37
33
|
|
|
38
34
|
export const TARIFF_COMPARATOR_TOOL: ToolDefinition = {
|
|
39
35
|
entry: tariffComparator,
|
|
40
|
-
Component:
|
|
41
|
-
SEOComponent:
|
|
42
|
-
BibliographyComponent:
|
|
36
|
+
Component: () => import('./component.astro'),
|
|
37
|
+
SEOComponent: () => import('./seo.astro'),
|
|
38
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
43
39
|
};
|