@mrfylke/contact-form 0.1.22 → 0.1.24
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/lib/ContactFormRoot.d.ts +3 -32
- package/lib/ContactFormRoot.d.ts.map +1 -1
- package/lib/ContactFormRoot.js +2 -19
- package/lib/components/external-link-page.d.ts +1 -1
- package/lib/components/external-link-page.js +1 -1
- package/lib/components/icon/color-icon.js +1 -1
- package/lib/components/icon/illustration.js +1 -1
- package/lib/components/icon/image.js +1 -1
- package/lib/components/icon/mono-icon-new.js +1 -1
- package/lib/components/icon/mono-icon.js +1 -1
- package/lib/index.d.ts +6 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -5
- package/lib/layouts/contact-page-layout.d.ts +6 -21
- package/lib/layouts/contact-page-layout.d.ts.map +1 -1
- package/lib/layouts/contact-page-layout.js +91 -57
- package/lib/layouts/index.d.ts +1 -1
- package/lib/layouts/index.d.ts.map +1 -1
- package/lib/layouts/index.js +2 -2
- package/lib/lost-property-external/index.d.ts +2 -0
- package/lib/lost-property-external/index.d.ts.map +1 -0
- package/lib/lost-property-external/index.js +17 -0
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts +22 -22
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -1
- package/lib/modules/config/types.d.ts +72 -13
- package/lib/modules/config/types.d.ts.map +1 -1
- package/lib/modules/config/types.js +9 -0
- package/lib/modules/theme/index.d.ts +1 -1
- package/lib/modules/theme/index.d.ts.map +1 -1
- package/lib/modules/theme/index.js +1 -2
- package/lib/modules/theme/theme-context.d.ts +4 -17
- package/lib/modules/theme/theme-context.d.ts.map +1 -1
- package/lib/modules/theme/theme-context.js +5 -39
- package/lib/refund/refundFormMachine.d.ts +14 -14
- package/lib/ticket-control/ticket-control-form-machine.d.ts +22 -22
- package/lib/ticketing/ticketingStateMachine.d.ts +8 -8
- package/lib/translations/index.d.ts +1 -1
- package/lib/translations/index.d.ts.map +1 -1
- package/lib/translations/index.js +3 -1
- package/lib/translations/language-context.d.ts +5 -8
- package/lib/translations/language-context.d.ts.map +1 -1
- package/lib/translations/language-context.js +8 -36
- package/lib/translations/pages/contact.d.ts +0 -16
- package/lib/translations/pages/contact.d.ts.map +1 -1
- package/lib/translations/pages/contact.js +0 -16
- package/lib/utils/typing.d.ts +32 -0
- package/lib/utils/typing.d.ts.map +1 -0
- package/lib/utils/typing.js +6 -0
- package/lib/utils.d.ts +0 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -5
- package/package.json +6 -1
package/lib/ContactFormRoot.d.ts
CHANGED
|
@@ -4,37 +4,8 @@ import { type ContactFormTranslationsOverride, Language } from './translations';
|
|
|
4
4
|
export type ContactFormRootProps = {
|
|
5
5
|
/** Main configuration object (theme, icons, api, org, features) */
|
|
6
6
|
config: ContactFormConfig;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* If provided, this takes precedence over initialLanguage.
|
|
10
|
-
*/
|
|
11
|
-
acceptLanguageHeader?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Optional initial language for purely client-side usage.
|
|
14
|
-
* Will be converted to a basic Accept-Language style string internally.
|
|
15
|
-
*/
|
|
16
|
-
initialLanguage?: Language;
|
|
17
|
-
/**
|
|
18
|
-
* Optional explicit default language, e.g. restored from localStorage/cookie.
|
|
19
|
-
* Takes precedence over browser/server detection when provided.
|
|
20
|
-
*/
|
|
21
|
-
defaultLanguage?: Language;
|
|
22
|
-
/**
|
|
23
|
-
* Called whenever the user manually selects a language.
|
|
24
|
-
* Use this to persist the selection (e.g. localStorage, cookie).
|
|
25
|
-
*/
|
|
26
|
-
onLanguageChange?: (lang: Language) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Optional: force a specific theme mode (light or dark).
|
|
29
|
-
* When set, dark mode toggle is effectively disabled and the chosen
|
|
30
|
-
* variant is always used.
|
|
31
|
-
*/
|
|
32
|
-
forceTheme?: 'light' | 'dark';
|
|
33
|
-
/**
|
|
34
|
-
* Optional explicit initial dark-mode state, e.g. restored from a cookie.
|
|
35
|
-
* Ignored when forceTheme is set.
|
|
36
|
-
*/
|
|
37
|
-
defaultDarkMode?: boolean;
|
|
7
|
+
language: Language;
|
|
8
|
+
theme: 'light' | 'dark';
|
|
38
9
|
/**
|
|
39
10
|
* Optional additional translation overrides that will be merged on top of config.translations.
|
|
40
11
|
* Config translations are required; this allows additional overrides at the root level if needed.
|
|
@@ -48,5 +19,5 @@ export type ContactFormRootProps = {
|
|
|
48
19
|
* providers together. Renders children inside the provider stack so
|
|
49
20
|
* consumers can pass their routes/layout as children.
|
|
50
21
|
*/
|
|
51
|
-
export declare function ContactFormRoot({ config,
|
|
22
|
+
export declare function ContactFormRoot({ config, language, theme, translationsOverride, children, }: ContactFormRootProps): import("react/jsx-runtime").JSX.Element;
|
|
52
23
|
//# sourceMappingURL=ContactFormRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactFormRoot.d.ts","sourceRoot":"","sources":["../src/ContactFormRoot.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,+BAA+B,EACpC,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAQxB,MAAM,MAAM,oBAAoB,GAAG;IACjC,mEAAmE;IACnE,MAAM,EAAE,iBAAiB,CAAC;IAC1B
|
|
1
|
+
{"version":3,"file":"ContactFormRoot.d.ts","sourceRoot":"","sources":["../src/ContactFormRoot.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,+BAA+B,EACpC,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAQxB,MAAM,MAAM,oBAAoB,GAAG;IACjC,mEAAmE;IACnE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,+BAA+B,CAAC;IACvD,sDAAsD;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,QAAQ,EACR,KAAK,EACL,oBAAoB,EACpB,QAAQ,GACT,EAAE,oBAAoB,2CAoBtB"}
|
package/lib/ContactFormRoot.js
CHANGED
|
@@ -15,29 +15,12 @@ function ThemeSync({ children }) {
|
|
|
15
15
|
* providers together. Renders children inside the provider stack so
|
|
16
16
|
* consumers can pass their routes/layout as children.
|
|
17
17
|
*/
|
|
18
|
-
function ContactFormRoot({ config,
|
|
19
|
-
const header = acceptLanguageHeader ?? deriveHeaderFromInitialLanguage(initialLanguage);
|
|
18
|
+
function ContactFormRoot({ config, language, theme, translationsOverride, children, }) {
|
|
20
19
|
// Merge config translations (required) with optional root-level override (override takes precedence)
|
|
21
20
|
const mergedTranslations = translationsOverride
|
|
22
21
|
? deepMerge(config.translations, translationsOverride)
|
|
23
22
|
: config.translations;
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(config_1.ContactFormConfigProvider, { config: config, children: (0, jsx_runtime_1.jsx)(theme_1.ThemeProvider, {
|
|
25
|
-
}
|
|
26
|
-
function deriveHeaderFromInitialLanguage(language) {
|
|
27
|
-
if (!language) {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
// Very small helper to build a reasonable Accept-Language style string
|
|
31
|
-
// based on the enum values we already expose.
|
|
32
|
-
switch (language) {
|
|
33
|
-
case translations_1.Language.English:
|
|
34
|
-
return 'en-US,no;q=0.9';
|
|
35
|
-
case translations_1.Language.Nynorsk:
|
|
36
|
-
return 'nn,no;q=0.9';
|
|
37
|
-
case translations_1.Language.Norwegian:
|
|
38
|
-
default:
|
|
39
|
-
return 'no,en;q=0.9';
|
|
40
|
-
}
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(config_1.ContactFormConfigProvider, { config: config, children: (0, jsx_runtime_1.jsx)(theme_1.ThemeProvider, { theme: theme, children: (0, jsx_runtime_1.jsx)(ThemeSync, { children: (0, jsx_runtime_1.jsx)(translations_1.AppLanguageProvider, { overrides: mergedTranslations, language: language, children: children }) }) }) }));
|
|
41
24
|
}
|
|
42
25
|
function deepMerge(target, source) {
|
|
43
26
|
const result = { ...target };
|
|
@@ -8,7 +8,7 @@ export type ExternalLinkPageProps = {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Component for rendering a page that links to an external website.
|
|
11
|
-
* Used when a contact page is configured with an externalUrl in
|
|
11
|
+
* Used when a contact page is configured with an externalUrl in pages.externalUrlByPageId.
|
|
12
12
|
*/
|
|
13
13
|
export declare function ExternalLinkPage({ url, title, description, }: ExternalLinkPageProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=external-link-page.d.ts.map
|
|
@@ -12,7 +12,7 @@ const icon_1 = require("./icon");
|
|
|
12
12
|
const external_link_page_module_css_1 = __importDefault(require("./external-link-page.module.css"));
|
|
13
13
|
/**
|
|
14
14
|
* Component for rendering a page that links to an external website.
|
|
15
|
-
* Used when a contact page is configured with an externalUrl in
|
|
15
|
+
* Used when a contact page is configured with an externalUrl in pages.externalUrlByPageId.
|
|
16
16
|
*/
|
|
17
17
|
function ExternalLinkPage({ url, title, description, }) {
|
|
18
18
|
const { t } = (0, translations_1.useTranslation)();
|
|
@@ -6,7 +6,7 @@ const generated_icons_1 = require("./generated-icons");
|
|
|
6
6
|
const utils_1 = require("./utils");
|
|
7
7
|
const theme_1 = require("../../modules/theme");
|
|
8
8
|
function ColorIcon({ icon, size = 'normal', ...props }) {
|
|
9
|
-
const
|
|
9
|
+
const { isDarkMode } = (0, theme_1.useTheme)();
|
|
10
10
|
const wh = (0, utils_1.useSize)(size);
|
|
11
11
|
const currentIcon = generated_icons_1.icons['colorIcons'][icon];
|
|
12
12
|
if (!currentIcon.darkable) {
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const generated_icons_1 = require("./generated-icons");
|
|
6
6
|
const theme_1 = require("../../modules/theme");
|
|
7
7
|
function Illustration({ image, ...props }) {
|
|
8
|
-
const
|
|
8
|
+
const { isDarkMode } = (0, theme_1.useTheme)();
|
|
9
9
|
const currentIcon = generated_icons_1.icons['illustration'][image];
|
|
10
10
|
if (!currentIcon.darkable) {
|
|
11
11
|
const totalPath = `/assets/${currentIcon.relative}`;
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const generated_icons_1 = require("./generated-icons");
|
|
6
6
|
const theme_1 = require("../../modules/theme");
|
|
7
7
|
function Image({ image, ...props }) {
|
|
8
|
-
const
|
|
8
|
+
const { isDarkMode } = (0, theme_1.useTheme)();
|
|
9
9
|
const extras = { role: 'none', alt: '' };
|
|
10
10
|
const currentIcon = generated_icons_1.icons['images'][image];
|
|
11
11
|
if (!currentIcon.darkable) {
|
|
@@ -10,7 +10,7 @@ const color_1 = require("../../utils/color");
|
|
|
10
10
|
* This is a wrapper around the Icon component that adds theme-aware styling.
|
|
11
11
|
*/
|
|
12
12
|
function MonoIcon({ icon, size = 'normal', overrideMode = 'none', interactiveColor, interactiveState, className, style, ...props }) {
|
|
13
|
-
const
|
|
13
|
+
const { isDarkMode } = (0, theme_1.useTheme)();
|
|
14
14
|
// Determine the color mode to use
|
|
15
15
|
const interactiveOverrideColor = useInteractiveThemeColor(interactiveColor, interactiveState);
|
|
16
16
|
// Apply dark/light mode styling if needed
|
|
@@ -7,7 +7,7 @@ const utils_1 = require("./utils");
|
|
|
7
7
|
const theme_1 = require("../../modules/theme");
|
|
8
8
|
const color_1 = require("../../utils/color");
|
|
9
9
|
function MonoIcon({ icon, size = 'normal', overrideMode = 'none', interactiveColor, interactiveState, ...props }) {
|
|
10
|
-
const
|
|
10
|
+
const { isDarkMode } = (0, theme_1.useTheme)();
|
|
11
11
|
const currentIcon = generated_icons_1.icons['mono'][icon];
|
|
12
12
|
const interactiveOverrideColor = useInteractiveThemeColor(interactiveColor, interactiveState);
|
|
13
13
|
const darkModeString = colorToMode(overrideMode) ??
|
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { ContactFormConfigProvider, useContactFormConfig, useThemeConfig, useIconConfig, useOrgConfig, useApiConfig, } from './modules/config';
|
|
1
|
+
export { ContactFormConfigProvider, useContactFormConfig, useThemeConfig, useIconConfig, useOrgConfig, useApiConfig, buildEnabledPageIds, } from './modules/config';
|
|
2
2
|
export type { TicketControlSubmitPayload, RefundSubmitPayload, MeansOfTransportSubmitPayload, TicketingSubmitPayload, JourneyInfoSubmitPayload, LostPropertySubmitPayload, } from './types/submit-payloads';
|
|
3
3
|
export type { TransportModeType, ReasonForTransportFailure, TicketType, PurchasePlatformType, } from './types';
|
|
4
4
|
export { TicketTypeId } from './types';
|
|
5
|
-
export type { ContactFormConfig, IconComponent, IconName, IconSet, Theme, ThemeColors, ContrastColor, TransportColors, InteractiveColor, StatusColors, TypographyConfig, ApiConfig, OrgConfig, LayoutConfig, LayoutLinkLabel,
|
|
6
|
-
export { ThemeProvider, useTheme,
|
|
5
|
+
export type { ContactFormConfig, IconComponent, IconName, IconSet, Theme, ThemeColors, ContrastColor, TransportColors, InteractiveColor, StatusColors, TypographyConfig, ApiConfig, OrgConfig, LayoutConfig, LayoutLinkLabel, PagesConfig, FormSchemaOverrides, FormSchemaName, ContactPage, PageId, ExtraPageId, ExtraContactPage, EnabledPageIdsList, } from './modules/config';
|
|
6
|
+
export { ThemeProvider, useTheme, useHtmlDarkMode } from './modules/theme';
|
|
7
7
|
export { Icon } from './components/icon/icon-wrapper';
|
|
8
8
|
export { MonoIcon } from './components/icon/mono-icon-new';
|
|
9
|
+
export type { MonoIcons } from './components/icon';
|
|
9
10
|
export { ButtonLink, Button } from './components/button';
|
|
10
11
|
export type { ButtonLinkProps, ButtonProps } from './components/button';
|
|
11
12
|
export { Typo } from './components/typography';
|
|
@@ -16,10 +17,10 @@ export { FieldWrapperWithError, FileInput, Fieldset, Input, Radio, Select, Texta
|
|
|
16
17
|
export { Checkbox } from './components/checkbox';
|
|
17
18
|
export { type Line } from './server/journey-planner/validators';
|
|
18
19
|
export { useLines, useTransportModeOptions } from './lines/use-lines';
|
|
19
|
-
export {
|
|
20
|
+
export { scrollToFirstErrorMessage, findFirstErrorMessage, getLineName, findOrderFormFields, } from './utils';
|
|
20
21
|
export { commonInputValidator } from './validation';
|
|
21
22
|
export type { InputErrorMessages } from './validation';
|
|
22
|
-
export { ContactPageLayout,
|
|
23
|
+
export { ContactPageLayout, getContactPages, ContactFormContainer, type ContactFormContainerProps, } from './layouts';
|
|
23
24
|
export { ExternalLinkPage, type ExternalLinkPageProps, } from './components/external-link-page';
|
|
24
25
|
export { ErrorContent } from './error-content/error-content';
|
|
25
26
|
export { SuccessContent } from './success-content/success-content';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,6BAA6B,EAC7B,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,iBAAiB,EACjB,yBAAyB,EACzB,UAAU,EACV,oBAAoB,GACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,QAAQ,EACR,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGxE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACnF,YAAY,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -17,8 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.RefundFormEvents = exports.RefundTicketForm = exports.FormType = exports.RefundContent = exports.SuccessContent = exports.ErrorContent = exports.ExternalLinkPage = exports.ContactFormContainer = exports.
|
|
21
|
-
exports.ContactFormRoot = exports.JourneyInfoContent = exports.TicketingContent = exports.TicketControlPageContent = exports.MeansOfTransportContent =
|
|
20
|
+
exports.AppTicketRefundContent = exports.RefundFormEvents = exports.RefundTicketForm = exports.FormType = exports.RefundContent = exports.SuccessContent = exports.ErrorContent = exports.ExternalLinkPage = exports.ContactFormContainer = exports.getContactPages = exports.ContactPageLayout = exports.commonInputValidator = exports.findOrderFormFields = exports.getLineName = exports.findFirstErrorMessage = exports.scrollToFirstErrorMessage = exports.useTransportModeOptions = exports.useLines = exports.Checkbox = exports.DepartureTimeField = exports.TimeSelector = exports.DateSelector = exports.getStopOptions = exports.getLineOptions = exports.SearchableSelect = exports.Textarea = exports.Select = exports.Radio = exports.Input = exports.Fieldset = exports.FileInput = exports.FieldWrapperWithError = exports.SectionCard = exports.ErrorMessage = exports.Typo = exports.Button = exports.ButtonLink = exports.MonoIcon = exports.Icon = exports.useHtmlDarkMode = exports.useTheme = exports.ThemeProvider = exports.TicketTypeId = exports.buildEnabledPageIds = exports.useApiConfig = exports.useOrgConfig = exports.useIconConfig = exports.useThemeConfig = exports.useContactFormConfig = exports.ContactFormConfigProvider = void 0;
|
|
21
|
+
exports.ContactFormRoot = exports.JourneyInfoContent = exports.TicketingContent = exports.TicketControlPageContent = exports.MeansOfTransportContent = void 0;
|
|
22
22
|
// Configuration system (NEW - required for setup)
|
|
23
23
|
var config_1 = require("./modules/config");
|
|
24
24
|
Object.defineProperty(exports, "ContactFormConfigProvider", { enumerable: true, get: function () { return config_1.ContactFormConfigProvider; } });
|
|
@@ -27,13 +27,13 @@ Object.defineProperty(exports, "useThemeConfig", { enumerable: true, get: functi
|
|
|
27
27
|
Object.defineProperty(exports, "useIconConfig", { enumerable: true, get: function () { return config_1.useIconConfig; } });
|
|
28
28
|
Object.defineProperty(exports, "useOrgConfig", { enumerable: true, get: function () { return config_1.useOrgConfig; } });
|
|
29
29
|
Object.defineProperty(exports, "useApiConfig", { enumerable: true, get: function () { return config_1.useApiConfig; } });
|
|
30
|
+
Object.defineProperty(exports, "buildEnabledPageIds", { enumerable: true, get: function () { return config_1.buildEnabledPageIds; } });
|
|
30
31
|
var types_1 = require("./types");
|
|
31
32
|
Object.defineProperty(exports, "TicketTypeId", { enumerable: true, get: function () { return types_1.TicketTypeId; } });
|
|
32
33
|
// Theme system (NEW)
|
|
33
34
|
var theme_1 = require("./modules/theme");
|
|
34
35
|
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return theme_1.ThemeProvider; } });
|
|
35
36
|
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theme_1.useTheme; } });
|
|
36
|
-
Object.defineProperty(exports, "useDarkMode", { enumerable: true, get: function () { return theme_1.useDarkMode; } });
|
|
37
37
|
Object.defineProperty(exports, "useHtmlDarkMode", { enumerable: true, get: function () { return theme_1.useHtmlDarkMode; } });
|
|
38
38
|
// Icon system (NEW)
|
|
39
39
|
var icon_wrapper_1 = require("./components/icon/icon-wrapper");
|
|
@@ -73,7 +73,6 @@ var use_lines_1 = require("./lines/use-lines");
|
|
|
73
73
|
Object.defineProperty(exports, "useLines", { enumerable: true, get: function () { return use_lines_1.useLines; } });
|
|
74
74
|
Object.defineProperty(exports, "useTransportModeOptions", { enumerable: true, get: function () { return use_lines_1.useTransportModeOptions; } });
|
|
75
75
|
var utils_1 = require("./utils");
|
|
76
|
-
Object.defineProperty(exports, "shouldShowContactPage", { enumerable: true, get: function () { return utils_1.shouldShowContactPage; } });
|
|
77
76
|
Object.defineProperty(exports, "scrollToFirstErrorMessage", { enumerable: true, get: function () { return utils_1.scrollToFirstErrorMessage; } });
|
|
78
77
|
Object.defineProperty(exports, "findFirstErrorMessage", { enumerable: true, get: function () { return utils_1.findFirstErrorMessage; } });
|
|
79
78
|
Object.defineProperty(exports, "getLineName", { enumerable: true, get: function () { return utils_1.getLineName; } });
|
|
@@ -82,7 +81,7 @@ var validation_1 = require("./validation");
|
|
|
82
81
|
Object.defineProperty(exports, "commonInputValidator", { enumerable: true, get: function () { return validation_1.commonInputValidator; } });
|
|
83
82
|
var layouts_1 = require("./layouts");
|
|
84
83
|
Object.defineProperty(exports, "ContactPageLayout", { enumerable: true, get: function () { return layouts_1.ContactPageLayout; } });
|
|
85
|
-
Object.defineProperty(exports, "
|
|
84
|
+
Object.defineProperty(exports, "getContactPages", { enumerable: true, get: function () { return layouts_1.getContactPages; } });
|
|
86
85
|
Object.defineProperty(exports, "ContactFormContainer", { enumerable: true, get: function () { return layouts_1.ContactFormContainer; } });
|
|
87
86
|
var external_link_page_1 = require("./components/external-link-page");
|
|
88
87
|
Object.defineProperty(exports, "ExternalLinkPage", { enumerable: true, get: function () { return external_link_page_1.ExternalLinkPage; } });
|
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { MonoIcons } from '../components/icon';
|
|
4
|
-
export type ContactPage = {
|
|
5
|
-
title: TranslatedString;
|
|
6
|
-
href: string;
|
|
7
|
-
icon: MonoIcons;
|
|
8
|
-
};
|
|
1
|
+
import { PageText as StaticPageText } from '../translations';
|
|
2
|
+
import type { ContactPage } from '../modules/config';
|
|
9
3
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
4
|
+
* All contact pages (tabs) the package can render, each paired with the form
|
|
5
|
+
* component it renders. Hosts opt into the ones they want via `pages.enabledPageIds`.
|
|
12
6
|
*/
|
|
13
|
-
export declare const
|
|
14
|
-
export
|
|
15
|
-
export type ContactPageLayoutProps = PropsWithChildren<{
|
|
16
|
-
title: string;
|
|
17
|
-
backLink?: {
|
|
18
|
-
href: string;
|
|
19
|
-
label: TranslatedString | Record<string, string>;
|
|
20
|
-
};
|
|
21
|
-
}>;
|
|
22
|
-
declare function ContactPageLayout({ children, backLink }: ContactPageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export default ContactPageLayout;
|
|
7
|
+
export declare const getContactPages: (PageText?: typeof StaticPageText) => ContactPage[];
|
|
8
|
+
export default function ContactPageLayout(): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element;
|
|
24
9
|
//# sourceMappingURL=contact-page-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-page-layout.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-page-layout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contact-page-layout.d.ts","sourceRoot":"","sources":["../../src/layouts/contact-page-layout.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,IAAI,cAAc,EAI3B,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUrD;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAU,OAAO,cAA+B,KAC/C,WAAW,EAyDb,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,yVA+ExC"}
|
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.getContactPages = void 0;
|
|
7
|
+
exports.default = ContactPageLayout;
|
|
7
8
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
9
|
const layout_module_css_1 = __importDefault(require("./layout.module.css"));
|
|
10
10
|
const navigation_1 = require("next/navigation");
|
|
11
11
|
const link_1 = __importDefault(require("next/link"));
|
|
@@ -13,97 +13,131 @@ const translations_1 = require("../translations");
|
|
|
13
13
|
const icon_1 = require("../components/icon");
|
|
14
14
|
const button_1 = require("../components/button");
|
|
15
15
|
const typography_1 = require("../components/typography");
|
|
16
|
+
const external_link_page_1 = require("../components/external-link-page");
|
|
17
|
+
const error_content_1 = require("../error-content/error-content");
|
|
18
|
+
const success_content_1 = require("../success-content/success-content");
|
|
16
19
|
const css_1 = require("../utils/css");
|
|
17
20
|
const config_1 = require("../modules/config");
|
|
21
|
+
const ticket_control_1 = __importDefault(require("../ticket-control"));
|
|
22
|
+
const refund_1 = __importDefault(require("../refund"));
|
|
23
|
+
const means_of_transport_1 = __importDefault(require("../means-of-transport"));
|
|
24
|
+
const ticketing_1 = __importDefault(require("../ticketing"));
|
|
25
|
+
const lost_property_1 = __importDefault(require("../lost-property"));
|
|
26
|
+
const lost_property_external_1 = __importDefault(require("../lost-property-external"));
|
|
27
|
+
const group_travel_1 = __importDefault(require("../group-travel"));
|
|
28
|
+
const journey_info_1 = __importDefault(require("../journey-info"));
|
|
18
29
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
30
|
+
* All contact pages (tabs) the package can render, each paired with the form
|
|
31
|
+
* component it renders. Hosts opt into the ones they want via `pages.enabledPageIds`.
|
|
21
32
|
*/
|
|
22
|
-
const
|
|
33
|
+
const getContactPages = (PageText = translations_1.PageText) => [
|
|
23
34
|
{
|
|
35
|
+
id: 'ticket-control',
|
|
24
36
|
title: PageText.Contact.ticketControl.title,
|
|
25
|
-
|
|
37
|
+
slug: 'ticket-control',
|
|
26
38
|
icon: 'ticketing/TicketInvalid',
|
|
39
|
+
Component: ticket_control_1.default,
|
|
27
40
|
},
|
|
28
41
|
{
|
|
42
|
+
id: 'refund',
|
|
29
43
|
title: PageText.Contact.refund.title,
|
|
30
|
-
|
|
44
|
+
slug: 'refund',
|
|
31
45
|
icon: 'transportation-entur/Taxi',
|
|
46
|
+
Component: refund_1.default,
|
|
32
47
|
},
|
|
33
48
|
{
|
|
49
|
+
id: 'means-of-transport',
|
|
34
50
|
title: PageText.Contact.modeOfTransport.title,
|
|
35
|
-
|
|
51
|
+
slug: 'means-of-transport',
|
|
36
52
|
icon: 'transportation/BusFill',
|
|
53
|
+
Component: means_of_transport_1.default,
|
|
37
54
|
},
|
|
38
55
|
{
|
|
56
|
+
id: 'ticketing',
|
|
39
57
|
title: PageText.Contact.ticketing.title,
|
|
40
|
-
|
|
58
|
+
slug: 'ticketing',
|
|
41
59
|
icon: 'devices/Phone',
|
|
60
|
+
Component: ticketing_1.default,
|
|
42
61
|
},
|
|
43
62
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
id: 'lost-property',
|
|
64
|
+
title: PageText.Contact.lostProperty.title,
|
|
65
|
+
slug: 'lost-property',
|
|
66
|
+
icon: 'actions/Support',
|
|
67
|
+
Component: lost_property_1.default,
|
|
47
68
|
},
|
|
48
69
|
{
|
|
70
|
+
id: 'lost-property-external',
|
|
49
71
|
title: PageText.Contact.lostProperty.title,
|
|
50
|
-
|
|
72
|
+
slug: 'lost-property',
|
|
51
73
|
icon: 'actions/Support',
|
|
74
|
+
Component: lost_property_external_1.default,
|
|
52
75
|
},
|
|
53
76
|
{
|
|
77
|
+
id: 'group-travel',
|
|
54
78
|
title: PageText.Contact.groupTravel.title,
|
|
55
|
-
|
|
79
|
+
slug: 'group-travel',
|
|
56
80
|
icon: 'ticketing/TicketMultiple',
|
|
81
|
+
Component: group_travel_1.default,
|
|
57
82
|
},
|
|
58
83
|
{
|
|
84
|
+
id: 'journey-info',
|
|
59
85
|
title: PageText.Contact.journeyInfo.title,
|
|
60
|
-
|
|
86
|
+
slug: 'journey-info',
|
|
61
87
|
icon: 'actions/Feedback',
|
|
88
|
+
Component: journey_info_1.default,
|
|
62
89
|
},
|
|
63
90
|
];
|
|
64
|
-
exports.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const pagesWithoutPrivacyAndTerms = ['/contact/group-travel'];
|
|
68
|
-
/**
|
|
69
|
-
* Extract page ID from href (e.g., '/contact/lost-property' -> 'lost-property')
|
|
70
|
-
*/
|
|
71
|
-
function getPageIdFromHref(href) {
|
|
72
|
-
const parts = href.split('/');
|
|
73
|
-
return parts[parts.length - 1] || '';
|
|
74
|
-
}
|
|
75
|
-
function ContactPageLayout({ children, backLink }) {
|
|
76
|
-
const PageText = (0, translations_1.usePageText)();
|
|
91
|
+
exports.getContactPages = getContactPages;
|
|
92
|
+
function ContactPageLayout() {
|
|
93
|
+
const pageText = (0, translations_1.usePageText)();
|
|
77
94
|
const { t } = (0, translations_1.useTranslation)();
|
|
78
95
|
const pathname = (0, navigation_1.usePathname)();
|
|
79
|
-
const {
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
const { pages, layout } = (0, config_1.useContactFormConfig)();
|
|
97
|
+
const visiblePages = useVisiblePages();
|
|
98
|
+
const basePath = layout?.basePath ?? '/contact';
|
|
99
|
+
const successPath = layout?.successPath ?? `${basePath}/success`;
|
|
100
|
+
const errorPath = layout?.errorPath ?? `${basePath}/error`;
|
|
101
|
+
if (pathname === successPath) {
|
|
102
|
+
return layout?.successContent ?? (0, jsx_runtime_1.jsx)(success_content_1.SuccessContent, {});
|
|
103
|
+
}
|
|
104
|
+
if (pathname === errorPath) {
|
|
105
|
+
return layout?.errorContent ?? (0, jsx_runtime_1.jsx)(error_content_1.ErrorContent, {});
|
|
106
|
+
}
|
|
107
|
+
const matchedPage = visiblePages.find((page) => pathname.includes(`${basePath}/${page.slug}`));
|
|
108
|
+
const externalUrl = matchedPage
|
|
109
|
+
? pages.externalUrlByPageId?.[matchedPage.id]
|
|
110
|
+
: undefined;
|
|
111
|
+
const MatchedComponent = matchedPage?.Component;
|
|
112
|
+
const body = externalUrl ? ((0, jsx_runtime_1.jsx)(external_link_page_1.ExternalLinkPage, { url: externalUrl })) : MatchedComponent ? ((0, jsx_runtime_1.jsx)(MatchedComponent, {})) : null;
|
|
113
|
+
const backLink = layout?.backLinkDefault ?? {
|
|
114
|
+
href: '/',
|
|
115
|
+
label: pageText.Contact.contactPageLayout.homeLink,
|
|
94
116
|
};
|
|
95
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout, children: [(0, jsx_runtime_1.jsxs)("div", { children: [backLink && ((0, jsx_runtime_1.jsx)("div", { className: layout_module_css_1.default.homeLink__container, children: (0, jsx_runtime_1.jsx)(button_1.ButtonLink, { mode: "transparent", href: backLink.href, title: t(backLink.label), icon: { left: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowLeft" }) } }) })), (0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout__container, children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.h2, { textType: "heading__2xl", children: t(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
117
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout, children: [(0, jsx_runtime_1.jsxs)("div", { children: [backLink && ((0, jsx_runtime_1.jsx)("div", { className: layout_module_css_1.default.homeLink__container, children: (0, jsx_runtime_1.jsx)(button_1.ButtonLink, { mode: "transparent", href: backLink.href, title: t(backLink.label), icon: { left: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowLeft" }) } }) })), (0, jsx_runtime_1.jsxs)("div", { className: layout_module_css_1.default.layout__container, children: [(0, jsx_runtime_1.jsx)(typography_1.Typo.h2, { textType: "heading__2xl", children: t(pageText.Contact.contactPageLayout.title) }), (0, jsx_runtime_1.jsx)("nav", { className: layout_module_css_1.default.contact_page_navigator__container, children: visiblePages.map((contactPage) => ((0, jsx_runtime_1.jsx)(ContactPageNavLink, { icon: contactPage.icon, title: contactPage.title, href: `${basePath}/${contactPage.slug}`, isActive: pathname.includes(`${basePath}/${contactPage.slug}`), externalUrl: pages.externalUrlByPageId?.[contactPage.id] }, contactPage.id))) })] })] }), body, displayPrivacyAndTerms(matchedPage) && ((0, jsx_runtime_1.jsx)("div", { className: layout_module_css_1.default.privacyAndTerms, children: (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__s__strong", children: t(pageText.Contact.contactPageLayout.privacyAndTerms) }) }))] }));
|
|
118
|
+
}
|
|
119
|
+
const pagesWithoutPrivacyAndTerms = ['group-travel'];
|
|
120
|
+
const displayPrivacyAndTerms = (contactPage) => {
|
|
121
|
+
if (!contactPage)
|
|
122
|
+
return false;
|
|
123
|
+
return !pagesWithoutPrivacyAndTerms.includes(contactPage.slug);
|
|
124
|
+
};
|
|
125
|
+
function useVisiblePages() {
|
|
126
|
+
const pageText = (0, translations_1.usePageText)();
|
|
127
|
+
const { pages } = (0, config_1.useContactFormConfig)();
|
|
128
|
+
const allPages = [...(0, exports.getContactPages)(pageText), ...(pages.extraPages ?? [])];
|
|
129
|
+
return pages.enabledPageIds
|
|
130
|
+
.map((id) => allPages.find((page) => page.id === id))
|
|
131
|
+
.filter((page) => page !== undefined);
|
|
132
|
+
}
|
|
133
|
+
function ContactPageNavLink({ icon, title, href, isActive, externalUrl, }) {
|
|
134
|
+
const { t } = (0, translations_1.useTranslation)();
|
|
135
|
+
const linkClassName = (0, css_1.andIf)({
|
|
136
|
+
[layout_module_css_1.default.contact_page_navigator__link]: true,
|
|
137
|
+
[layout_module_css_1.default.contact_page_navigator__activePage]: isActive,
|
|
138
|
+
});
|
|
139
|
+
if (externalUrl) {
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)("a", { href: externalUrl, target: "_blank", rel: "noreferrer", className: linkClassName, children: [(0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { size: "large", icon: icon }), (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(title) })] }));
|
|
141
|
+
}
|
|
142
|
+
return ((0, jsx_runtime_1.jsxs)(link_1.default, { shallow: true, href: href, className: linkClassName, children: [(0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { size: "large", icon: icon }), (0, jsx_runtime_1.jsx)(typography_1.Typo.p, { textType: "body__m", children: t(title) })] }));
|
|
108
143
|
}
|
|
109
|
-
exports.default = ContactPageLayout;
|
package/lib/layouts/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as ContactPageLayout,
|
|
1
|
+
export { default as ContactPageLayout, getContactPages, } from './contact-page-layout';
|
|
2
2
|
export { ContactFormContainer, type ContactFormContainerProps, } from './contact-form-container';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC"}
|
package/lib/layouts/index.js
CHANGED
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ContactFormContainer = exports.
|
|
6
|
+
exports.ContactFormContainer = exports.getContactPages = exports.ContactPageLayout = void 0;
|
|
7
7
|
var contact_page_layout_1 = require("./contact-page-layout");
|
|
8
8
|
Object.defineProperty(exports, "ContactPageLayout", { enumerable: true, get: function () { return __importDefault(contact_page_layout_1).default; } });
|
|
9
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "getContactPages", { enumerable: true, get: function () { return contact_page_layout_1.getContactPages; } });
|
|
10
10
|
var contact_form_container_1 = require("./contact-form-container");
|
|
11
11
|
Object.defineProperty(exports, "ContactFormContainer", { enumerable: true, get: function () { return contact_form_container_1.ContactFormContainer; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lost-property-external/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,+BAA+B,4CAmBtD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = LostPropertyExternalFormContent;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const contact_module_css_1 = __importDefault(require("../contact.module.css"));
|
|
9
|
+
const components_1 = require("../components");
|
|
10
|
+
const link_1 = __importDefault(require("next/link"));
|
|
11
|
+
const translations_1 = require("../translations");
|
|
12
|
+
const typography_1 = require("../components/typography");
|
|
13
|
+
function LostPropertyExternalFormContent() {
|
|
14
|
+
const PageText = (0, translations_1.usePageText)();
|
|
15
|
+
const { t } = (0, translations_1.useTranslation)();
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(components_1.SectionCard, { title: t(PageText.Contact.lostProperty.title), children: (0, jsx_runtime_1.jsxs)(typography_1.Typo.p, { textType: "body__m", children: [t(PageText.Contact.lostProperty.description.info), ' ', (0, jsx_runtime_1.jsx)(link_1.default, { className: contact_module_css_1.default.link, href: t(PageText.Contact.lostProperty.description.url), target: "_blank", rel: "noopener noreferrer", children: t(PageText.Contact.lostProperty.description.externalLink) })] }) }));
|
|
17
|
+
}
|