valtech-components 2.0.978 → 2.0.979
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/esm2022/lib/components/organisms/form/form.component.mjs +6 -1
- package/esm2022/lib/components/types.mjs +1 -1
- package/esm2022/lib/config/company-footer.config.mjs +69 -11
- package/esm2022/lib/services/requests/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +75 -12
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/article/article.component.d.ts +1 -4
- package/lib/components/types.d.ts +5 -2
- package/lib/config/company-footer.config.d.ts +42 -0
- package/lib/services/requests/types.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -89,10 +89,7 @@ export declare class ArticleComponent implements OnInit {
|
|
|
89
89
|
contentFallback?: string;
|
|
90
90
|
contentInterpolation?: Record<string, string | number>;
|
|
91
91
|
icon?: import("valtech-components").IconMetada;
|
|
92
|
-
shape?: "round";
|
|
93
|
-
* Configuración del artículo
|
|
94
|
-
* @type {ArticleMetadata}
|
|
95
|
-
*/
|
|
92
|
+
shape?: "round";
|
|
96
93
|
size?: "default" | "small" | "large";
|
|
97
94
|
fill?: "default" | "clear" | "outline" | "solid";
|
|
98
95
|
type: "reset" | "submit" | "button";
|
|
@@ -190,8 +190,11 @@ export type FormMetadata = {
|
|
|
190
190
|
name: string;
|
|
191
191
|
/** Form sections */
|
|
192
192
|
sections: FormSection[];
|
|
193
|
-
/**
|
|
194
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Configuración del botón de submit. Opcional: en modo `controlled` el form
|
|
195
|
+
* no renderiza submit propio (lo maneja el host) y `actions` se ignora.
|
|
196
|
+
*/
|
|
197
|
+
actions?: ButtonMetadata;
|
|
195
198
|
/** Global form state */
|
|
196
199
|
state: ComponentState;
|
|
197
200
|
/**
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* When links or social profiles change, update here and publish a new version.
|
|
10
10
|
*/
|
|
11
|
+
import type { CompanyFooterMetadata } from '../components/organisms/company-footer/types';
|
|
12
|
+
import type { LegalLinkService } from '../services/legal-link/legal-link.service';
|
|
11
13
|
/**
|
|
12
14
|
* Social media links for Valtech
|
|
13
15
|
*/
|
|
@@ -120,3 +122,43 @@ export declare function buildFooterLinks(links: CompanyLink[], t: (key: string)
|
|
|
120
122
|
hoverable: boolean;
|
|
121
123
|
target?: string;
|
|
122
124
|
}>;
|
|
125
|
+
/**
|
|
126
|
+
* Translation helper for the `Layout` namespace — `(key) => translatedString`.
|
|
127
|
+
* Typically `i18n.t.bind(i18n)` scoped to the footer namespace.
|
|
128
|
+
*/
|
|
129
|
+
export type LayoutTranslator = (key: string) => string;
|
|
130
|
+
/**
|
|
131
|
+
* Builds a `CompanyLinkResolver` that rewrites cross-app `legal`/`site` links to
|
|
132
|
+
* the main brand site via `LegalLinkService`, leaving `support` (and any other)
|
|
133
|
+
* links untouched.
|
|
134
|
+
*
|
|
135
|
+
* Satellite apps (showcase, sigify, …) wire `provideValtechSite(env)` so that
|
|
136
|
+
* `legal`/`site` links resolve to the canonical main-site URLs; `support` links
|
|
137
|
+
* stay per-app. This is the generic half of an app's footer resolver — apps that
|
|
138
|
+
* need extra per-link overrides (e.g. redirecting `/feedback` to an authed route)
|
|
139
|
+
* compose this with their own logic.
|
|
140
|
+
*
|
|
141
|
+
* @param legal Injected `LegalLinkService` (no-op when running as the main site).
|
|
142
|
+
* @param locale Getter for the active locale (e.g. `() => i18n.lang()`) — appended
|
|
143
|
+
* as `?lang=` when the resolved URL is cross-origin.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* const base = buildLegalLinkResolver(legal, () => i18n.lang());
|
|
147
|
+
* const resolver: CompanyLinkResolver = (link) =>
|
|
148
|
+
* link.url === '/feedback' ? { url: '/app/feedback', external: false } : base(link);
|
|
149
|
+
*/
|
|
150
|
+
export declare function buildLegalLinkResolver(legal: LegalLinkService, locale: () => string): CompanyLinkResolver;
|
|
151
|
+
/**
|
|
152
|
+
* Builds the shared `CompanyFooterMetadata` used across Valtech apps (login,
|
|
153
|
+
* legal, public landing, …) so the footer stays consistent. Assembles the
|
|
154
|
+
* standard left/right link sections, logo, social links and language selector
|
|
155
|
+
* from the shared config.
|
|
156
|
+
*
|
|
157
|
+
* Call from a `computed()` that reads the active language for reactivity.
|
|
158
|
+
*
|
|
159
|
+
* @param t Translation helper for the `Layout` namespace.
|
|
160
|
+
* @param linkResolver Optional resolver applied to every footer link — typically
|
|
161
|
+
* `buildLegalLinkResolver(...)` (or an app wrapper) to point `legal`/`site`
|
|
162
|
+
* links at the main site when running as a satellite app.
|
|
163
|
+
*/
|
|
164
|
+
export declare function buildCompanyFooterProps(t: LayoutTranslator, linkResolver?: CompanyLinkResolver): CompanyFooterMetadata;
|
package/lib/version.d.ts
CHANGED