@functionalcms/svelte-components 2.18.0 → 2.18.2

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.
Files changed (30) hide show
  1. package/dist/auth/authenticationHandle.js +37 -34
  2. package/dist/auth/authenticationProvider.js +4 -4
  3. package/dist/components/Banner.svelte +12 -14
  4. package/dist/components/Banner.svelte.d.ts +8 -6
  5. package/dist/components/Link.svelte +23 -26
  6. package/dist/components/Link.svelte.d.ts +19 -17
  7. package/dist/components/Logo.svelte.d.ts +3 -1
  8. package/dist/components/SimpleFooter.svelte.d.ts +4 -2
  9. package/dist/components/Spacer.svelte.d.ts +4 -2
  10. package/dist/components/Well.svelte +7 -8
  11. package/dist/components/Well.svelte.d.ts +6 -4
  12. package/dist/components/blog/BlogDescription.svelte.d.ts +2 -0
  13. package/dist/components/blog/BlogTitle.svelte.d.ts +4 -2
  14. package/dist/components/layouts/DefaultLayout.svelte +1 -2
  15. package/dist/components/layouts/DefaultLayout.svelte.d.ts +6 -4
  16. package/dist/components/layouts/TwoColumnsLayout.svelte.d.ts +4 -2
  17. package/dist/components/menu/ColumnMenu.svelte.d.ts +5 -3
  18. package/dist/components/menu/DynamicMenu.svelte +3 -6
  19. package/dist/components/menu/DynamicMenu.svelte.d.ts +5 -3
  20. package/dist/components/menu/FlatMenu.svelte.d.ts +5 -3
  21. package/dist/components/menu/HamburgerMenu.svelte.d.ts +7 -5
  22. package/dist/components/menu/authentication.js +1 -2
  23. package/dist/components/presentation/Carusel.svelte.d.ts +4 -2
  24. package/dist/components/presentation/Gallery.svelte +7 -8
  25. package/dist/components/presentation/Gallery.svelte.d.ts +7 -5
  26. package/dist/stores/meta.d.ts +0 -1
  27. package/dist/stores/pages.d.ts +0 -1
  28. package/dist/stores/title.d.ts +0 -1
  29. package/package.json +1 -1
  30. /package/dist/auth/{sessionstorage.d.ts → sessionStorage.d.ts} +0 -0
@@ -1,15 +1,36 @@
1
1
  import {} from '@sveltejs/kit';
2
- import { createSession, getSession } from './sessionstorage.js';
2
+ import { createSession, getSession, deleteSession } from './sessionStorage.js';
3
3
  import { keycloak } from './authenticationProvider.js';
4
- const cookieName = `auth_state`;
5
- const logout = (cookies) => {
4
+ const authStateCookieName = `auth_state`;
5
+ const authSessionCookieName = `auth_session`;
6
+ const logout = (cookies, afterLogoutPath = '/') => {
6
7
  const headers = new Headers();
7
- const sid = cookies.get(cookieName);
8
- if (sid) {
9
- const deleteSessionCookieHeader = `${cookieName}=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT;`;
10
- const deleteAuthCookieHeader = `auth_session=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT;`;
11
- headers.append('Set-Cookie', deleteSessionCookieHeader);
12
- headers.append('Set-Cookie', deleteAuthCookieHeader);
8
+ const state = cookies.get(authSessionCookieName);
9
+ if (state) {
10
+ cookies.delete('auth_session', { path: '/' });
11
+ const sid = cookies.get('auth_session');
12
+ deleteSession(sid);
13
+ headers.append('Set-Cookie', 'auth_session=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT;');
14
+ headers.append('Location', afterLogoutPath);
15
+ }
16
+ else {
17
+ headers.append('Location', '/');
18
+ }
19
+ return headers;
20
+ };
21
+ const createUserSession = async (provider, event) => {
22
+ const token = await provider.getValidation(event);
23
+ const session = await provider.getUser(token);
24
+ const headers = new Headers();
25
+ headers.append('Location', '/');
26
+ headers.append('Set-Cookie', 'auth_state=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT;');
27
+ if (session !== undefined) {
28
+ session.userId = session.sub;
29
+ event.locals.session = session;
30
+ event.locals.accessToken = token.access_token;
31
+ const sessionId = createSession({ session, token }, token.expires_in);
32
+ headers.append('Set-Cookie', `auth_session=${sessionId}; HttpOnly; Secure; SameSite=strict; Max-Age=${token.expires_in}; Path=/`);
33
+ headers.append('Location', provider.redirectPath);
13
34
  }
14
35
  return headers;
15
36
  };
@@ -24,45 +45,27 @@ const loadUserFromSession = (cookies, locals) => {
24
45
  locals.username = "";
25
46
  }
26
47
  };
27
- const getHeadersWithCookie = (sessionId, expiresIn) => {
28
- const cookieHeader = `auth_session=${sessionId}; HttpOnly; Secure; SameSite=strict; Max-Age=${expiresIn}; Path=/`;
29
- const headers = new Headers();
30
- headers.append('Set-Cookie', cookieHeader);
31
- return headers;
32
- };
33
48
  export const authenticationHandle = (issuer, clientId, scope = '', redirectPath = '/') => {
34
49
  const provider = keycloak(issuer, clientId, scope, redirectPath);
35
50
  return async ({ event, resolve }) => {
36
- //login user check
51
+ //login user check
37
52
  if (event.url.pathname.startsWith('/')) {
38
53
  loadUserFromSession(event.cookies, event.locals);
39
54
  }
40
- //logout
41
- if (event.url.pathname === '/auth/logout' && event.cookies.get(cookieName) === undefined) {
42
- const headers = logout(event.cookie);
55
+ //logout
56
+ if (event.url.pathname === '/auth/logout') {
57
+ const headers = logout(event.cookies);
43
58
  return new Response('Logging Out...', { status: 303, headers });
44
59
  }
45
- // login
60
+ // login
46
61
  else if (event.url.pathname === '/auth/login') {
47
62
  const authProvider = await provider.getAuthIdentity(event.url.origin);
48
63
  return new Response('Redirect', { status: 302, headers: authProvider });
49
64
  }
50
65
  //validate
51
66
  else if (event.url.pathname === "/auth/validate") {
52
- const token = await provider.getValidation(event);
53
- const session = await provider.getUser(token);
54
- if (session !== undefined) {
55
- session.userId = session.sub;
56
- event.locals.session = session;
57
- event.locals.accessToken = token.access_token;
58
- const sessionId = createSession({ session, token }, token.expires_in);
59
- const headers = getHeadersWithCookie(sessionId, token.expires_in);
60
- headers.append('Location', provider.redirectPath);
61
- return new Response('Redirect', { status: 303, headers });
62
- }
63
- else {
64
- return new Response(`Error in authorizing user`);
65
- }
67
+ const validationResponse = await createUserSession(provider, event);
68
+ return new Response('Redirect', { status: 302, headers: validationResponse });
66
69
  }
67
70
  return await resolve(event);
68
71
  };
@@ -1,9 +1,9 @@
1
1
  import * as o from "oauth4webapi";
2
- const cookieName = 'auth_state';
2
+ const aurthStateCookieName = 'auth_state';
3
3
  const stateIdGenerator = () => crypto.randomUUID();
4
4
  const getKeycloakIdentity = async (issuer, client_id, scope, redirectUrl) => {
5
5
  const state = stateIdGenerator();
6
- const cookieHeader = `${cookieName}=${state}; HttpOnly; Secure; SameSite=strict; Max-Age=3600; Path=/`;
6
+ const cookieHeader = `${aurthStateCookieName}=${state}; HttpOnly; Secure; SameSite=strict; Max-Age=3600; Path=/`;
7
7
  const code_challenge = await o.calculatePKCECodeChallenge(state);
8
8
  const authorizationUrlSearchParams = new URLSearchParams({
9
9
  client_id: client_id,
@@ -20,7 +20,7 @@ const getKeycloakIdentity = async (issuer, client_id, scope, redirectUrl) => {
20
20
  return headers;
21
21
  };
22
22
  const getKeycloakValidation = async (issuer, client_id, scope, event, redirectUrl) => {
23
- const storedState = event.cookies.get(cookieName);
23
+ const storedState = event.cookies.get(aurthStateCookieName);
24
24
  const state = event.url.searchParams.get("state");
25
25
  if (!storedState || !state || storedState !== state) {
26
26
  throw new Error('State not valid');
@@ -50,7 +50,7 @@ const getKeycloakValidation = async (issuer, client_id, scope, event, redirectUr
50
50
  throw new Error('Token not validated.');
51
51
  }
52
52
  const token = await response.json();
53
- event.cookies.delete(cookieName, { path: '/' });
53
+ event.cookies.delete(aurthStateCookieName, { path: '/' });
54
54
  return token;
55
55
  };
56
56
  const getUser = async (issuer, token) => {
@@ -23,20 +23,18 @@ export let bannerCss = "";
23
23
  export let justify = Justify.Start;
24
24
  export let alignItems = AlignItmes.Start;
25
25
  export let orientation = Orientation.Column;
26
- $:
27
- klasses = [
28
- "flex",
29
- "well",
30
- css ? css : "",
31
- `${orientation}`,
32
- `${justify}`,
33
- `${alignItems}`
34
- ].filter((c) => c).join(" ");
35
- $:
36
- bannerKlasses = [
37
- "banner",
38
- bannerCss
39
- ].filter((c) => c).join(" ");
26
+ $: klasses = [
27
+ "flex",
28
+ "well",
29
+ css ? css : "",
30
+ `${orientation}`,
31
+ `${justify}`,
32
+ `${alignItems}`
33
+ ].filter((c) => c).join(" ");
34
+ $: bannerKlasses = [
35
+ "banner",
36
+ bannerCss
37
+ ].filter((c) => c).join(" ");
40
38
  </script>
41
39
  <div class={bannerKlasses} style="--functional-banner-background: {background};" >
42
40
  <div class={klasses}>
@@ -2,12 +2,12 @@ import { SvelteComponent } from "svelte";
2
2
  import { Justify, AlignItmes, Orientation } from "./Styling.js";
3
3
  declare const __propDef: {
4
4
  props: {
5
- background?: string | undefined;
6
- css?: string | undefined;
7
- bannerCss?: string | undefined;
8
- justify?: Justify | undefined;
9
- alignItems?: AlignItmes | undefined;
10
- orientation?: Orientation | undefined;
5
+ background?: string;
6
+ css?: string;
7
+ bannerCss?: string;
8
+ justify?: Justify;
9
+ alignItems?: AlignItmes;
10
+ orientation?: Orientation;
11
11
  };
12
12
  events: {
13
13
  [evt: string]: CustomEvent<any>;
@@ -15,6 +15,8 @@ declare const __propDef: {
15
15
  slots: {
16
16
  default: {};
17
17
  };
18
+ exports?: {} | undefined;
19
+ bindings?: string | undefined;
18
20
  };
19
21
  export type BannerProps = typeof __propDef.props;
20
22
  export type BannerEvents = typeof __propDef.events;
@@ -307,32 +307,29 @@ export let size = ComponentSize.Normal;
307
307
  export let justify = Justify.Center;
308
308
  export let alignItems = AlignItmes.Center;
309
309
  export let orientation = Orientation.Row;
310
- $:
311
- isSmall = size === ComponentSize.Small;
312
- $:
313
- isLarge = size === ComponentSize.Large;
314
- $:
315
- klasses = [
316
- "btn",
317
- isPrimary ? "btn-primary" : "",
318
- isDisabled ? "disabled" : "",
319
- isBordered ? "btn-bordered" : "",
320
- isSecondary ? "btn-secondary" : "",
321
- idRounded ? "btn-rounded" : "",
322
- idPill ? "btn-pill" : "",
323
- idBlock ? "btn-block" : "",
324
- idCapsule ? "btn-capsule" : "",
325
- idCircle ? "btn-circle" : "",
326
- idGrouped ? "btn-grouped" : "",
327
- isLarge ? "btn-large" : "",
328
- isSmall ? "btn-small" : "",
329
- isLarge && isCircle ? "btn-large btn-circle-large" : "",
330
- isSmall && idCircle ? "btn-small btn-circle-small" : "",
331
- `${orientation}`,
332
- `${justify}`,
333
- `${alignItems}`,
334
- css ? css : ""
335
- ].filter((c) => c).join(" ");
310
+ $: isSmall = size === ComponentSize.Small;
311
+ $: isLarge = size === ComponentSize.Large;
312
+ $: klasses = [
313
+ "btn",
314
+ isPrimary ? "btn-primary" : "",
315
+ isDisabled ? "disabled" : "",
316
+ isBordered ? "btn-bordered" : "",
317
+ isSecondary ? "btn-secondary" : "",
318
+ idRounded ? "btn-rounded" : "",
319
+ idPill ? "btn-pill" : "",
320
+ idBlock ? "btn-block" : "",
321
+ idCapsule ? "btn-capsule" : "",
322
+ idCircle ? "btn-circle" : "",
323
+ idGrouped ? "btn-grouped" : "",
324
+ isLarge ? "btn-large" : "",
325
+ isSmall ? "btn-small" : "",
326
+ isLarge && isCircle ? "btn-large btn-circle-large" : "",
327
+ isSmall && idCircle ? "btn-small btn-circle-small" : "",
328
+ `${orientation}`,
329
+ `${justify}`,
330
+ `${alignItems}`,
331
+ css ? css : ""
332
+ ].filter((c) => c).join(" ");
336
333
  </script>
337
334
  <a class={klasses} href={href}>
338
335
  <slot />
@@ -2,23 +2,23 @@ import { SvelteComponent } from "svelte";
2
2
  import { AlignItmes, ComponentSize, Justify, Orientation } from './Styling.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
- css?: string | undefined;
6
- href?: string | undefined;
7
- isPrimary?: boolean | undefined;
8
- isDisabled?: boolean | undefined;
9
- isBordered?: boolean | undefined;
10
- isSecondary?: boolean | undefined;
11
- idRounded?: boolean | undefined;
12
- idPill?: boolean | undefined;
13
- idBlock?: boolean | undefined;
14
- idCapsule?: boolean | undefined;
15
- idCircle?: boolean | undefined;
16
- idGrouped?: boolean | undefined;
17
- isCircle?: boolean | undefined;
18
- size?: ComponentSize | undefined;
19
- justify?: Justify | undefined;
20
- alignItems?: AlignItmes | undefined;
21
- orientation?: Orientation | undefined;
5
+ css?: string;
6
+ href?: string;
7
+ isPrimary?: boolean;
8
+ isDisabled?: boolean;
9
+ isBordered?: boolean;
10
+ isSecondary?: boolean;
11
+ idRounded?: boolean;
12
+ idPill?: boolean;
13
+ idBlock?: boolean;
14
+ idCapsule?: boolean;
15
+ idCircle?: boolean;
16
+ idGrouped?: boolean;
17
+ isCircle?: boolean;
18
+ size?: ComponentSize;
19
+ justify?: Justify;
20
+ alignItems?: AlignItmes;
21
+ orientation?: Orientation;
22
22
  };
23
23
  events: {
24
24
  [evt: string]: CustomEvent<any>;
@@ -26,6 +26,8 @@ declare const __propDef: {
26
26
  slots: {
27
27
  default: {};
28
28
  };
29
+ exports?: {} | undefined;
30
+ bindings?: string | undefined;
29
31
  };
30
32
  export type LinkProps = typeof __propDef.props;
31
33
  export type LinkEvents = typeof __propDef.events;
@@ -9,12 +9,14 @@ declare const __propDef: {
9
9
  */ logoUrl: string;
10
10
  /**
11
11
  * @type {string}
12
- */ css?: string | undefined;
12
+ */ css?: string;
13
13
  };
14
14
  events: {
15
15
  [evt: string]: CustomEvent<any>;
16
16
  };
17
17
  slots: {};
18
+ exports?: {} | undefined;
19
+ bindings?: string | undefined;
18
20
  };
19
21
  export type LogoProps = typeof __propDef.props;
20
22
  export type LogoEvents = typeof __propDef.events;
@@ -3,10 +3,10 @@ declare const __propDef: {
3
3
  props: {
4
4
  /**
5
5
  * @type {string}
6
- */ companyName?: string | undefined;
6
+ */ companyName?: string;
7
7
  /**
8
8
  * @type {string}
9
- */ motto?: string | undefined;
9
+ */ motto?: string;
10
10
  /**
11
11
  * @type {string}
12
12
  */ logoUrl: string;
@@ -15,6 +15,8 @@ declare const __propDef: {
15
15
  [evt: string]: CustomEvent<any>;
16
16
  };
17
17
  slots: {};
18
+ exports?: {} | undefined;
19
+ bindings?: string | undefined;
18
20
  };
19
21
  export type SimpleFooterProps = typeof __propDef.props;
20
22
  export type SimpleFooterEvents = typeof __propDef.events;
@@ -2,13 +2,15 @@ import { SvelteComponent } from "svelte";
2
2
  import { Sizes } from "./Styling";
3
3
  declare const __propDef: {
4
4
  props: {
5
- width?: Sizes | undefined;
6
- height?: Sizes | undefined;
5
+ width?: Sizes;
6
+ height?: Sizes;
7
7
  };
8
8
  events: {
9
9
  [evt: string]: CustomEvent<any>;
10
10
  };
11
11
  slots: {};
12
+ exports?: {} | undefined;
13
+ bindings?: string | undefined;
12
14
  };
13
15
  export type SpacerProps = typeof __propDef.props;
14
16
  export type SpacerEvents = typeof __propDef.events;
@@ -17,14 +17,13 @@ export let css = "";
17
17
  export let orientation = Orientation.Column;
18
18
  export let justify = Justify.Start;
19
19
  export let alignItems = AlignItmes.Start;
20
- $:
21
- klasses = [
22
- "flex",
23
- css ? css : "",
24
- `${orientation}`,
25
- `${justify}`,
26
- `${alignItems}`
27
- ].filter((c) => c).join(" ");
20
+ $: klasses = [
21
+ "flex",
22
+ css ? css : "",
23
+ `${orientation}`,
24
+ `${justify}`,
25
+ `${alignItems}`
26
+ ].filter((c) => c).join(" ");
28
27
  </script>
29
28
 
30
29
  <div class={klasses}>
@@ -2,10 +2,10 @@ import { SvelteComponent } from "svelte";
2
2
  import { AlignItmes, Justify, Orientation } from "./Styling.js";
3
3
  declare const __propDef: {
4
4
  props: {
5
- css?: string | undefined;
6
- orientation?: Orientation | undefined;
7
- justify?: Justify | undefined;
8
- alignItems?: AlignItmes | undefined;
5
+ css?: string;
6
+ orientation?: Orientation;
7
+ justify?: Justify;
8
+ alignItems?: AlignItmes;
9
9
  };
10
10
  events: {
11
11
  [evt: string]: CustomEvent<any>;
@@ -13,6 +13,8 @@ declare const __propDef: {
13
13
  slots: {
14
14
  default: {};
15
15
  };
16
+ exports?: {} | undefined;
17
+ bindings?: string | undefined;
16
18
  };
17
19
  export type WellProps = typeof __propDef.props;
18
20
  export type WellEvents = typeof __propDef.events;
@@ -9,6 +9,8 @@ declare const __propDef: {
9
9
  slots: {
10
10
  readMore: {};
11
11
  };
12
+ exports?: {} | undefined;
13
+ bindings?: string | undefined;
12
14
  };
13
15
  export type BlogDescriptionProps = typeof __propDef.props;
14
16
  export type BlogDescriptionEvents = typeof __propDef.events;
@@ -1,14 +1,16 @@
1
1
  import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- slug?: string | undefined;
5
- path?: string | undefined;
4
+ slug?: string;
5
+ path?: string;
6
6
  title: string;
7
7
  };
8
8
  events: {
9
9
  [evt: string]: CustomEvent<any>;
10
10
  };
11
11
  slots: {};
12
+ exports?: {} | undefined;
13
+ bindings?: string | undefined;
12
14
  };
13
15
  export type BlogTitleProps = typeof __propDef.props;
14
16
  export type BlogTitleEvents = typeof __propDef.events;
@@ -17,8 +17,7 @@ export let robots = "index, follow";
17
17
  export let headerIsSticky = false;
18
18
  export let tracker = "";
19
19
  export let canonicalUrl = "";
20
- $:
21
- headerCss = headerIsSticky ? "sticky" : "";
20
+ $: headerCss = headerIsSticky ? "sticky" : "";
22
21
  </script>
23
22
 
24
23
  <svelte:head>
@@ -1,10 +1,10 @@
1
1
  import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- robots?: string | undefined;
5
- headerIsSticky?: boolean | undefined;
6
- tracker?: string | undefined;
7
- canonicalUrl?: string | undefined;
4
+ robots?: string;
5
+ headerIsSticky?: boolean;
6
+ tracker?: string;
7
+ canonicalUrl?: string;
8
8
  };
9
9
  events: {
10
10
  [evt: string]: CustomEvent<any>;
@@ -15,6 +15,8 @@ declare const __propDef: {
15
15
  footer: {};
16
16
  sticky_footer: {};
17
17
  };
18
+ exports?: {} | undefined;
19
+ bindings?: string | undefined;
18
20
  };
19
21
  export type DefaultLayoutProps = typeof __propDef.props;
20
22
  export type DefaultLayoutEvents = typeof __propDef.events;
@@ -1,8 +1,8 @@
1
1
  import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- leftCss?: string | undefined;
5
- rightCss?: string | undefined;
4
+ leftCss?: string;
5
+ rightCss?: string;
6
6
  };
7
7
  events: {
8
8
  [evt: string]: CustomEvent<any>;
@@ -11,6 +11,8 @@ declare const __propDef: {
11
11
  left: {};
12
12
  right: {};
13
13
  };
14
+ exports?: {} | undefined;
15
+ bindings?: string | undefined;
14
16
  };
15
17
  export type TwoColumnsLayoutProps = typeof __propDef.props;
16
18
  export type TwoColumnsLayoutEvents = typeof __propDef.events;
@@ -2,14 +2,16 @@ import { SvelteComponent } from "svelte";
2
2
  import { HeaderNavigationItem } from './Menu.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
- css?: string | undefined;
6
- localPages?: HeaderNavigationItem[] | undefined;
7
- includeSubpagesForSelect?: boolean | undefined;
5
+ css?: string;
6
+ localPages?: Array<HeaderNavigationItem>;
7
+ includeSubpagesForSelect?: boolean;
8
8
  };
9
9
  events: {
10
10
  [evt: string]: CustomEvent<any>;
11
11
  };
12
12
  slots: {};
13
+ exports?: {} | undefined;
14
+ bindings?: string | undefined;
13
15
  };
14
16
  export type ColumnMenuProps = typeof __propDef.props;
15
17
  export type ColumnMenuEvents = typeof __propDef.events;
@@ -6,12 +6,9 @@ import { page } from "$app/stores";
6
6
  export let css = "";
7
7
  export let navCss = "";
8
8
  export let localPages = [];
9
- $:
10
- activePages = !localPages || localPages.length == 0 ? $pagesStore : localPages;
11
- $:
12
- pagesVisiblity = isAuthenticated(page);
13
- $:
14
- visibleNavItems = selectVisible(activePages, pagesVisiblity);
9
+ $: activePages = !localPages || localPages.length == 0 ? $pagesStore : localPages;
10
+ $: pagesVisiblity = isAuthenticated($page);
11
+ $: visibleNavItems = selectVisible(activePages, pagesVisiblity);
15
12
  const klasses = ["flex", "flex-dynamic-row", css ? css : ""].filter((c) => c).join(" ");
16
13
  </script>
17
14
 
@@ -2,9 +2,9 @@ import { SvelteComponent } from "svelte";
2
2
  import { HeaderNavigationItem } from './Menu.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
- css?: string | undefined;
6
- navCss?: string | undefined;
7
- localPages?: HeaderNavigationItem[] | undefined;
5
+ css?: string;
6
+ navCss?: string;
7
+ localPages?: Array<HeaderNavigationItem>;
8
8
  };
9
9
  events: {
10
10
  [evt: string]: CustomEvent<any>;
@@ -17,6 +17,8 @@ declare const __propDef: {
17
17
  pages: any[];
18
18
  };
19
19
  };
20
+ exports?: {} | undefined;
21
+ bindings?: string | undefined;
20
22
  };
21
23
  export type DynamicMenuProps = typeof __propDef.props;
22
24
  export type DynamicMenuEvents = typeof __propDef.events;
@@ -2,14 +2,16 @@ import { SvelteComponent } from "svelte";
2
2
  import { HeaderNavigationItem } from './Menu.js';
3
3
  declare const __propDef: {
4
4
  props: {
5
- css?: string | undefined;
6
- localPages?: HeaderNavigationItem[] | undefined;
7
- includeSubpagesForSelect?: boolean | undefined;
5
+ css?: string;
6
+ localPages?: Array<HeaderNavigationItem>;
7
+ includeSubpagesForSelect?: boolean;
8
8
  };
9
9
  events: {
10
10
  [evt: string]: CustomEvent<any>;
11
11
  };
12
12
  slots: {};
13
+ exports?: {} | undefined;
14
+ bindings?: string | undefined;
13
15
  };
14
16
  export type FlatMenuProps = typeof __propDef.props;
15
17
  export type FlatMenuEvents = typeof __propDef.events;
@@ -3,16 +3,18 @@ import { HeaderNavigationItem } from './Menu.js';
3
3
  import { Placement } from '../Styling.js';
4
4
  declare const __propDef: {
5
5
  props: {
6
- css?: string | undefined;
7
- noBorder?: boolean | undefined;
8
- placement?: Placement | undefined;
9
- localPages?: HeaderNavigationItem[] | undefined;
10
- includeSubpagesForSelect?: boolean | undefined;
6
+ css?: string;
7
+ noBorder?: boolean;
8
+ placement?: Placement;
9
+ localPages?: Array<HeaderNavigationItem>;
10
+ includeSubpagesForSelect?: boolean;
11
11
  };
12
12
  events: {
13
13
  [evt: string]: CustomEvent<any>;
14
14
  };
15
15
  slots: {};
16
+ exports?: {} | undefined;
17
+ bindings?: string | undefined;
16
18
  };
17
19
  export type HamburgerMenuProps = typeof __propDef.props;
18
20
  export type HamburgerMenuEvents = typeof __propDef.events;
@@ -1,8 +1,7 @@
1
1
  import { Visiblity } from '@functionalcms/svelte-components';
2
2
  import { get } from 'svelte/store';
3
3
  export function isAuthenticated(page) {
4
- const pageStore = get(page);
5
- const isAuthenticated = pageStore?.data?.session != null;
4
+ const isAuthenticated = page?.data?.session != null;
6
5
  const visibility = isAuthenticated ? Visiblity.Authenticated : Visiblity.NotAuthenticated;
7
6
  return visibility;
8
7
  }
@@ -2,13 +2,15 @@ import { SvelteComponent } from "svelte";
2
2
  import type { CaruseleItem } from "./Carusele";
3
3
  declare const __propDef: {
4
4
  props: {
5
- items?: CaruseleItem[] | undefined;
6
- perPage?: number | undefined;
5
+ items?: Array<CaruseleItem>;
6
+ perPage?: number;
7
7
  };
8
8
  events: {
9
9
  [evt: string]: CustomEvent<any>;
10
10
  };
11
11
  slots: {};
12
+ exports?: {} | undefined;
13
+ bindings?: string | undefined;
12
14
  };
13
15
  export type CaruselProps = typeof __propDef.props;
14
16
  export type CaruselEvents = typeof __propDef.events;
@@ -5,14 +5,13 @@ export let css = "";
5
5
  export let justify = Justify.Between;
6
6
  export let alignItems = AlignItmes.Center;
7
7
  export let orientation = Orientation.DynamicRow;
8
- $:
9
- galleryKlasses = [
10
- "flex",
11
- css,
12
- `${orientation}`,
13
- `${justify}`,
14
- `${alignItems}`
15
- ].filter((c) => c).join(" ");
8
+ $: galleryKlasses = [
9
+ "flex",
10
+ css,
11
+ `${orientation}`,
12
+ `${justify}`,
13
+ `${alignItems}`
14
+ ].filter((c) => c).join(" ");
16
15
  </script>
17
16
  <Card css={galleryKlasses}>
18
17
  {#each items as item}
@@ -3,11 +3,11 @@ import type { ShowItem } from './ShowItem.js';
3
3
  import { AlignItmes, Justify, Orientation } from '../Styling.js';
4
4
  declare const __propDef: {
5
5
  props: {
6
- items?: ShowItem[] | undefined;
7
- css?: string | undefined;
8
- justify?: Justify | undefined;
9
- alignItems?: AlignItmes | undefined;
10
- orientation?: Orientation | undefined;
6
+ items?: Array<ShowItem>;
7
+ css?: string;
8
+ justify?: Justify;
9
+ alignItems?: AlignItmes;
10
+ orientation?: Orientation;
11
11
  };
12
12
  events: {
13
13
  [evt: string]: CustomEvent<any>;
@@ -17,6 +17,8 @@ declare const __propDef: {
17
17
  item: ShowItem;
18
18
  };
19
19
  };
20
+ exports?: {} | undefined;
21
+ bindings?: string | undefined;
20
22
  };
21
23
  export type GalleryProps = typeof __propDef.props;
22
24
  export type GalleryEvents = typeof __propDef.events;
@@ -1,4 +1,3 @@
1
- /// <reference types="svelte" />
2
1
  import { type Writable } from 'svelte/store';
3
2
  export declare const metaDescription: Writable<string>;
4
3
  export declare const metaKeywords: Writable<string>;
@@ -1,3 +1,2 @@
1
- /// <reference types="svelte" />
2
1
  import { HeaderNavigationItem } from "../components/menu/Menu.js";
3
2
  export declare const pages: import("svelte/store").Writable<HeaderNavigationItem[]>;
@@ -1,3 +1,2 @@
1
- /// <reference types="svelte" />
2
1
  export declare const title: import("svelte/store").Writable<string>;
3
2
  export declare const suffix: import("svelte/store").Writable<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "2.18.0",
3
+ "version": "2.18.2",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [