@plitzi/sdk-elements 0.38.9 → 0.38.10

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 (44) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/Element/hooks/useElementInternal.mjs +67 -59
  3. package/dist/elements/advanced/BlockHtml/index.mjs +3 -3
  4. package/dist/elements/advanced/BlockJsx/index.mjs +3 -3
  5. package/dist/elements/advanced/Custom/index.mjs +3 -3
  6. package/dist/elements/basic/Button/index.mjs +3 -3
  7. package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +13 -13
  8. package/dist/elements/declarations/index.d.ts +22 -16
  9. package/dist/elements/declarations/index.mjs +6 -6
  10. package/dist/elements/form/Form/Form.mjs +19 -19
  11. package/dist/elements/form/FormControl/FormControl.mjs +10 -10
  12. package/dist/elements/form/FormControl/declaration.mjs +1 -1
  13. package/dist/elements/internal/NotFound/index.mjs +3 -3
  14. package/dist/elements/internal/Page/Page.d.ts +5 -0
  15. package/dist/elements/internal/Page/Page.mjs +26 -25
  16. package/dist/elements/internal/Page/PageHead.d.ts +12 -0
  17. package/dist/elements/internal/Page/PageHead.mjs +29 -0
  18. package/dist/elements/internal/Page/declaration.d.ts +2 -0
  19. package/dist/elements/internal/Page/declaration.mjs +5 -0
  20. package/dist/elements/internal/Page/index.d.ts +2 -0
  21. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +187 -187
  22. package/dist/elements/provider/ApiContainer/declaration.d.ts +10 -9
  23. package/dist/elements/provider/ApiContainer/declaration.mjs +1 -0
  24. package/dist/elements/provider/ApiContainer/index.d.ts +10 -9
  25. package/dist/elements/provider/Channel/Channel.mjs +15 -15
  26. package/dist/elements/provider/Channel/declaration.d.ts +1 -1
  27. package/dist/elements/provider/Channel/index.d.ts +1 -1
  28. package/dist/elements/structure/Carousel/Carousel.mjs +72 -72
  29. package/dist/elements/structure/Carousel/CarouselTrack/index.mjs +3 -3
  30. package/dist/elements/structure/Carousel/declaration.d.ts +1 -1
  31. package/dist/elements/structure/Carousel/index.d.ts +1 -1
  32. package/dist/elements/structure/Container/Container.mjs +8 -8
  33. package/dist/elements/structure/DialogContainer/DialogContainer.mjs +14 -14
  34. package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -2
  35. package/dist/elements/structure/DialogContainer/declaration.mjs +1 -2
  36. package/dist/elements/structure/DialogContainer/index.d.ts +1 -2
  37. package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +8 -8
  38. package/dist/elements/structure/ModalContainer/ModalContainer.mjs +16 -16
  39. package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -3
  40. package/dist/elements/structure/ModalContainer/declaration.mjs +2 -3
  41. package/dist/elements/structure/ModalContainer/index.d.ts +2 -3
  42. package/dist/elements/structure/Pagination/Pagination.mjs +10 -10
  43. package/dist/index.d.ts +17 -16
  44. package/package.json +11 -7
@@ -1,7 +1,7 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import t from "../../../Element/hooks/useElement.mjs";
3
- import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "./declaration.mjs";
1
+ import e from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import n from "../../../Element/hooks/useElement.mjs";
4
+ import { RootElement as r } from "../../../Element/RootElement.mjs";
5
5
  import i from "./buildPageWindow.mjs";
6
6
  import { use as a, useCallback as o, useMemo as s } from "react";
7
7
  import c from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
@@ -14,8 +14,8 @@ var h = (e, t) => {
14
14
  if (typeof window > "u") return "";
15
15
  let n = new URL(window.location.href);
16
16
  return t <= 1 ? n.searchParams.delete(e) : n.searchParams.set(e, String(t)), `${n.pathname}${n.search}`;
17
- }, g = ({ ref: e, className: g = "", children: _, pageInfo: v = u, mode: y = "pages", pageParam: b = "page", target: x = "url", windowSize: S = 5, previousLabel: C = "Previous", nextLabel: w = "Next", loadMoreLabel: T = "Load more", label: E = "Pagination" }) => {
18
- let { id: D, definition: { styleSelectors: O } } = t(), { settings: { previewMode: k }, contexts: { InteractionsContext: A } } = c(), { interactionsManager: j } = a(A), [M] = l("navigation.navigate"), N = v.page ?? 1, P = v.pageCount ?? 0, F = v.hasPrevPage ?? N > 1, I = v.hasNextPage ?? !1, L = s(() => i(N, P, S), [
17
+ }, g = ({ ref: t, className: g = "", children: _, pageInfo: v = u, mode: y = "pages", pageParam: b = "page", target: x = "url", windowSize: S = 5, previousLabel: C = "Previous", nextLabel: w = "Next", loadMoreLabel: T = "Load more", label: E = "Pagination" }) => {
18
+ let { id: D, definition: { styleSelectors: O } } = n(), { settings: { previewMode: k }, contexts: { InteractionsContext: A } } = c(), { interactionsManager: j } = a(A), [M] = l("navigation.navigate"), N = v.page ?? 1, P = v.pageCount ?? 0, F = v.hasPrevPage ?? N > 1, I = v.hasNextPage ?? !1, L = s(() => i(N, P, S), [
19
19
  N,
20
20
  P,
21
21
  S
@@ -31,12 +31,12 @@ var h = (e, t) => {
31
31
  ]), z = o((e) => (t) => {
32
32
  t.preventDefault(), R(e);
33
33
  }, [R]), B = P === 0 && !I && !F;
34
- return /* @__PURE__ */ p(n, {
35
- ref: e,
34
+ return /* @__PURE__ */ p(r, {
35
+ ref: t,
36
36
  tag: "nav",
37
37
  "aria-label": E || void 0,
38
38
  className: m("plitzi-component__pagination", g),
39
- interactionTriggers: r.triggers,
39
+ interactionTriggers: e.triggers,
40
40
  children: [
41
41
  y === "loadMore" && /* @__PURE__ */ f("button", {
42
42
  type: "button",
@@ -75,6 +75,6 @@ var h = (e, t) => {
75
75
  _
76
76
  ]
77
77
  });
78
- }, _ = e(g);
78
+ }, _ = t(g);
79
79
  //#endregion
80
80
  export { g as Pagination, _ as default };
package/dist/index.d.ts CHANGED
@@ -836,6 +836,7 @@ export declare const defaultElements: {
836
836
  displayName: string;
837
837
  } & {
838
838
  readonly type: "page";
839
+ readonly serverTemplates: readonly ["seoPageTitle", "seoPageDescription", "notFound"];
839
840
  readonly triggers: {
840
841
  readonly onPageLoad: {
841
842
  readonly action: "onPageLoad";
@@ -916,6 +917,7 @@ export declare const defaultElements: {
916
917
  };
917
918
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
918
919
  layout?: string | undefined;
920
+ notFound?: string | undefined;
919
921
  layoutContainer?: string | undefined;
920
922
  seoEnabled?: boolean | undefined;
921
923
  seoPageTitle?: string | undefined;
@@ -1201,8 +1203,7 @@ export declare const defaultElements: {
1201
1203
  readonly top: "0";
1202
1204
  readonly position: "absolute";
1203
1205
  readonly 'z-index': "210";
1204
- readonly 'background-color': "black";
1205
- readonly opacity: "0.5";
1206
+ readonly 'background-color': "rgb(0 0 0 / 50%)";
1206
1207
  };
1207
1208
  };
1208
1209
  readonly rootContainer: {
@@ -1398,7 +1399,7 @@ export declare const defaultElements: {
1398
1399
  readonly definition: {
1399
1400
  readonly label: "Modal Container";
1400
1401
  readonly type: "modalContainer";
1401
- readonly description: "A modal overlay container opened and closed through interactions; use for dialogs over the page.";
1402
+ readonly description: string;
1402
1403
  readonly items: readonly [];
1403
1404
  readonly bindings: {};
1404
1405
  readonly loadStrategy: "lazy";
@@ -1455,8 +1456,7 @@ export declare const defaultElements: {
1455
1456
  readonly top: "0";
1456
1457
  readonly position: "absolute";
1457
1458
  readonly 'z-index': "210";
1458
- readonly 'background-color': "black";
1459
- readonly opacity: "0.5";
1459
+ readonly 'background-color': "rgb(0 0 0 / 50%)";
1460
1460
  };
1461
1461
  };
1462
1462
  readonly rootContainer: {
@@ -1940,8 +1940,8 @@ export declare const defaultElements: {
1940
1940
  items?: unknown[] | undefined;
1941
1941
  speed?: number | undefined;
1942
1942
  loop?: boolean | undefined;
1943
- autoplay?: number | undefined;
1944
1943
  pauseOnHover?: boolean | undefined;
1944
+ autoplay?: number | undefined;
1945
1945
  transition?: import('./elements/structure/Carousel/CarouselContext').CarouselTransition | undefined;
1946
1946
  itemKey?: string | undefined;
1947
1947
  }>;
@@ -4221,6 +4221,7 @@ export declare const defaultElements: {
4221
4221
  readonly pagination: readonly string[];
4222
4222
  };
4223
4223
  readonly sourceType: "apiContainer";
4224
+ readonly serverTemplates: readonly ["notFound"];
4224
4225
  readonly triggers: {
4225
4226
  readonly onApiError: {
4226
4227
  readonly action: "onApiError";
@@ -4384,25 +4385,25 @@ export declare const defaultElements: {
4384
4385
  headers?: Record<string, string> | undefined;
4385
4386
  notFound?: string | undefined;
4386
4387
  subType?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure" | "" | undefined;
4388
+ credentials?: RequestCredentials | undefined;
4389
+ staleTime?: number | string | undefined;
4390
+ gcTime?: number | string | undefined;
4391
+ pageParam?: string | undefined;
4387
4392
  query?: string | undefined;
4388
4393
  accessToken?: string | undefined;
4389
4394
  mockData?: (Record<string, unknown> | string) | undefined;
4390
- credentials?: RequestCredentials | undefined;
4395
+ singleRecord?: boolean | undefined;
4396
+ pagination?: import('./elements/provider/ApiContainer/hooks/useProviderPagination').ProviderPagination | undefined;
4397
+ renderWhileLoading?: boolean | undefined;
4398
+ loadingSlot?: string | undefined;
4399
+ refreshSeconds?: number | string | undefined;
4391
4400
  connector?: string | undefined;
4392
4401
  limit?: string | undefined;
4393
- singleRecord?: boolean | undefined;
4394
4402
  filters?: {
4395
4403
  field: string;
4396
4404
  operator: string;
4397
4405
  value: string;
4398
4406
  }[] | undefined;
4399
- pagination?: import('./elements/provider/ApiContainer/hooks/useProviderPagination').ProviderPagination | undefined;
4400
- pageParam?: string | undefined;
4401
- renderWhileLoading?: boolean | undefined;
4402
- loadingSlot?: string | undefined;
4403
- staleTime?: number | string | undefined;
4404
- gcTime?: number | string | undefined;
4405
- refreshSeconds?: number | string | undefined;
4406
4407
  }>>;
4407
4408
  channel: {
4408
4409
  (props: import('./Element/hocs/withElement').WithElementProps<import('./elements/provider/Channel/Channel').ChannelProps>): import('react').JSX.Element;
@@ -4535,9 +4536,9 @@ export declare const defaultElements: {
4535
4536
  };
4536
4537
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
4537
4538
  subType?: "" | "div" | "section" | "aside" | "main" | undefined;
4538
- topic?: string | undefined;
4539
4539
  grant?: string | undefined;
4540
4540
  presence?: unknown;
4541
+ topic?: string | undefined;
4541
4542
  keep?: number | string | undefined;
4542
4543
  }>>;
4543
4544
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-elements",
3
- "version": "0.38.9",
3
+ "version": "0.38.10",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist"
@@ -798,6 +798,10 @@
798
798
  "types": "./dist/elements/internal/Page/Page.d.ts",
799
799
  "import": "./dist/elements/internal/Page/Page.mjs"
800
800
  },
801
+ "./elements/internal/Page/PageHead": {
802
+ "types": "./dist/elements/internal/Page/PageHead.d.ts",
803
+ "import": "./dist/elements/internal/Page/PageHead.mjs"
804
+ },
801
805
  "./elements/internal/Page/Settings": {
802
806
  "types": "./dist/elements/internal/Page/Settings.d.ts",
803
807
  "import": "./dist/elements/internal/Page/Settings.mjs"
@@ -1371,12 +1375,12 @@
1371
1375
  "@dr.pogodin/react-helmet": "^3.3.2",
1372
1376
  "@plitzi/nexus": "^1.4.0",
1373
1377
  "@plitzi/plitzi-ui": "^1.6.32",
1374
- "@plitzi/sdk-auth": "0.38.9",
1375
- "@plitzi/sdk-event-bridge": "0.38.9",
1376
- "@plitzi/sdk-interactions": "0.38.9",
1377
- "@plitzi/sdk-navigation": "0.38.9",
1378
- "@plitzi/sdk-schema": "0.38.9",
1379
- "@plitzi/sdk-shared": "0.38.9",
1378
+ "@plitzi/sdk-auth": "0.38.10",
1379
+ "@plitzi/sdk-event-bridge": "0.38.10",
1380
+ "@plitzi/sdk-interactions": "0.38.10",
1381
+ "@plitzi/sdk-navigation": "0.38.10",
1382
+ "@plitzi/sdk-schema": "0.38.10",
1383
+ "@plitzi/sdk-shared": "0.38.10",
1380
1384
  "clsx": "^2.1.1",
1381
1385
  "immer": "^11.1.21",
1382
1386
  "react-markdown": "^10.1.0",