@plitzi/sdk-elements 0.37.1 → 0.37.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 (164) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/dist/Component/ComponentProvider.d.ts +1 -1
  3. package/dist/Element/JsxManager.d.ts +1 -1
  4. package/dist/Element/LayoutBody.d.ts +1 -1
  5. package/dist/Element/PluginManager.d.ts +1 -1
  6. package/dist/Element/PluginRemote.d.ts +1 -1
  7. package/dist/Element/ReplicaProvider.d.ts +1 -1
  8. package/dist/Element/helpers/pluginSelector.d.ts +1 -1
  9. package/dist/Element/hocs/withElement.d.ts +1 -1
  10. package/dist/Element/hooks/useRootElementInteractions.mjs +7 -1
  11. package/dist/components/ElementAdvancedEditor.d.ts +1 -1
  12. package/dist/dataSource/GlobalSources.mjs +24 -22
  13. package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +2 -2
  14. package/dist/elements/advanced/BlockHtml/Settings.d.ts +1 -1
  15. package/dist/elements/advanced/BlockHtml/index.d.ts +1 -1
  16. package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +2 -2
  17. package/dist/elements/advanced/BlockJsx/Settings.d.ts +1 -1
  18. package/dist/elements/advanced/BlockJsx/index.d.ts +1 -1
  19. package/dist/elements/advanced/Custom/Custom.d.ts +2 -2
  20. package/dist/elements/advanced/Custom/Settings.d.ts +1 -1
  21. package/dist/elements/advanced/Custom/index.d.ts +1 -1
  22. package/dist/elements/advanced/NodeHtml/index.d.ts +1 -1
  23. package/dist/elements/advanced/PlitziSdk/Settings.d.ts +1 -1
  24. package/dist/elements/advanced/Reference/Reference.d.ts +2 -2
  25. package/dist/elements/advanced/Reference/Settings.d.ts +1 -1
  26. package/dist/elements/advanced/Reference/index.d.ts +1 -1
  27. package/dist/elements/basic/Button/Button.d.ts +2 -2
  28. package/dist/elements/basic/Button/Settings.d.ts +1 -1
  29. package/dist/elements/basic/Button/index.d.ts +1 -1
  30. package/dist/elements/basic/Dropdown/Dropdown.d.ts +2 -2
  31. package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +2 -2
  32. package/dist/elements/basic/Dropdown/DropdownPopup/Settings.d.ts +1 -1
  33. package/dist/elements/basic/Dropdown/DropdownPopup/declaration.d.ts +2 -1
  34. package/dist/elements/basic/Dropdown/DropdownPopup/declaration.mjs +2 -1
  35. package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +3 -2
  36. package/dist/elements/basic/Dropdown/Settings.d.ts +1 -1
  37. package/dist/elements/basic/Dropdown/index.d.ts +4 -3
  38. package/dist/elements/basic/Heading/Heading.d.ts +2 -2
  39. package/dist/elements/basic/Heading/Settings.d.ts +1 -1
  40. package/dist/elements/basic/Heading/index.d.ts +1 -1
  41. package/dist/elements/basic/Link/Link.d.ts +2 -2
  42. package/dist/elements/basic/Link/Link.mjs +1 -1
  43. package/dist/elements/basic/Link/Settings.d.ts +1 -1
  44. package/dist/elements/basic/Link/index.d.ts +1 -1
  45. package/dist/elements/basic/Markdown/Markdown.d.ts +2 -2
  46. package/dist/elements/basic/Markdown/Settings.d.ts +1 -1
  47. package/dist/elements/basic/Markdown/index.d.ts +1 -1
  48. package/dist/elements/basic/Paragraph/Paragraph.d.ts +2 -2
  49. package/dist/elements/basic/Paragraph/Settings.d.ts +1 -1
  50. package/dist/elements/basic/Paragraph/index.d.ts +1 -1
  51. package/dist/elements/basic/RichText/RichText.d.ts +2 -2
  52. package/dist/elements/basic/RichText/Settings.d.ts +1 -1
  53. package/dist/elements/basic/RichText/index.d.ts +1 -1
  54. package/dist/elements/basic/Text/Settings.d.ts +1 -1
  55. package/dist/elements/basic/Text/Text.d.ts +2 -2
  56. package/dist/elements/basic/Text/index.d.ts +1 -1
  57. package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +2 -2
  58. package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +55 -62
  59. package/dist/elements/basic/ThemeToggle/declaration.d.ts +12 -1
  60. package/dist/elements/basic/ThemeToggle/declaration.mjs +8 -1
  61. package/dist/elements/basic/ThemeToggle/index.d.ts +13 -2
  62. package/dist/elements/declarations/index.d.ts +314 -5
  63. package/dist/elements/form/Form/Form.d.ts +2 -2
  64. package/dist/elements/form/Form/Form.mjs +37 -57
  65. package/dist/elements/form/Form/Settings.d.ts +1 -1
  66. package/dist/elements/form/Form/declaration.d.ts +57 -0
  67. package/dist/elements/form/Form/declaration.mjs +55 -0
  68. package/dist/elements/form/Form/index.d.ts +59 -2
  69. package/dist/elements/form/FormControl/FormControl.d.ts +2 -2
  70. package/dist/elements/form/FormControl/FormControl.mjs +33 -41
  71. package/dist/elements/form/FormControl/Settings.d.ts +1 -1
  72. package/dist/elements/form/FormControl/components/Label.d.ts +1 -1
  73. package/dist/elements/form/FormControl/declaration.d.ts +12 -0
  74. package/dist/elements/form/FormControl/declaration.mjs +10 -0
  75. package/dist/elements/form/FormControl/hocs/withFieldValue.d.ts +1 -1
  76. package/dist/elements/form/FormControl/index.d.ts +14 -2
  77. package/dist/elements/form/FormControl/inputs/Checkbox.d.ts +1 -1
  78. package/dist/elements/form/FormControl/inputs/Hidden.d.ts +1 -1
  79. package/dist/elements/form/FormControl/inputs/Input.d.ts +1 -1
  80. package/dist/elements/form/FormControl/inputs/Select.d.ts +1 -1
  81. package/dist/elements/form/FormControl/inputs/Textarea.d.ts +1 -1
  82. package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +2 -2
  83. package/dist/elements/internal/LayoutContainer/Settings.d.ts +1 -1
  84. package/dist/elements/internal/LayoutContainer/index.d.ts +1 -1
  85. package/dist/elements/internal/LayoutPicker/LayoutPicker.d.ts +1 -1
  86. package/dist/elements/internal/Loading/Loading.d.ts +2 -2
  87. package/dist/elements/internal/Loading/index.d.ts +1 -1
  88. package/dist/elements/internal/NotFound/NotFound.d.ts +2 -2
  89. package/dist/elements/internal/NotFound/index.d.ts +1 -1
  90. package/dist/elements/internal/Page/Page.d.ts +2 -2
  91. package/dist/elements/internal/Page/Page.mjs +34 -43
  92. package/dist/elements/internal/Page/Settings.d.ts +1 -1
  93. package/dist/elements/internal/Page/declaration.d.ts +13 -0
  94. package/dist/elements/internal/Page/declaration.mjs +11 -0
  95. package/dist/elements/internal/Page/index.d.ts +14 -1
  96. package/dist/elements/media/FontAwesome/FontAwesome.d.ts +2 -2
  97. package/dist/elements/media/FontAwesome/Settings.d.ts +1 -1
  98. package/dist/elements/media/FontAwesome/index.d.ts +1 -1
  99. package/dist/elements/media/Image/Image.d.ts +2 -2
  100. package/dist/elements/media/Image/Settings.d.ts +1 -1
  101. package/dist/elements/media/Image/index.d.ts +1 -1
  102. package/dist/elements/media/Video/Settings.d.ts +1 -1
  103. package/dist/elements/media/Video/Video.d.ts +2 -2
  104. package/dist/elements/media/Video/index.d.ts +1 -1
  105. package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +11 -2
  106. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +119 -161
  107. package/dist/elements/provider/ApiContainer/Settings.d.ts +2 -1
  108. package/dist/elements/provider/ApiContainer/Settings.mjs +129 -122
  109. package/dist/elements/provider/ApiContainer/components/FiltersInput/FiltersInput.d.ts +1 -1
  110. package/dist/elements/provider/ApiContainer/declaration.d.ts +75 -0
  111. package/dist/elements/provider/ApiContainer/declaration.mjs +72 -1
  112. package/dist/elements/provider/ApiContainer/helpers/providerOutcome.d.ts +25 -0
  113. package/dist/elements/provider/ApiContainer/helpers/providerOutcome.mjs +7 -0
  114. package/dist/elements/provider/ApiContainer/hooks/useAutoRefresh.d.ts +21 -0
  115. package/dist/elements/provider/ApiContainer/hooks/useAutoRefresh.mjs +18 -0
  116. package/dist/elements/provider/ApiContainer/index.d.ts +76 -1
  117. package/dist/elements/structure/Container/Container.d.ts +2 -2
  118. package/dist/elements/structure/Container/Settings.d.ts +1 -1
  119. package/dist/elements/structure/Container/index.d.ts +1 -1
  120. package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +2 -2
  121. package/dist/elements/structure/DialogContainer/DialogContainer.mjs +10 -60
  122. package/dist/elements/structure/DialogContainer/Settings.d.ts +1 -1
  123. package/dist/elements/structure/DialogContainer/declaration.d.ts +82 -1
  124. package/dist/elements/structure/DialogContainer/declaration.mjs +62 -1
  125. package/dist/elements/structure/DialogContainer/index.d.ts +83 -2
  126. package/dist/elements/structure/List/List.d.ts +2 -2
  127. package/dist/elements/structure/List/ListItem/ListItem.d.ts +2 -2
  128. package/dist/elements/structure/List/ListItem/Settings.d.ts +1 -1
  129. package/dist/elements/structure/List/ListItem/index.d.ts +1 -1
  130. package/dist/elements/structure/List/Settings.d.ts +1 -1
  131. package/dist/elements/structure/List/index.d.ts +2 -2
  132. package/dist/elements/structure/List/modes/ListBasic.d.ts +1 -1
  133. package/dist/elements/structure/List/modes/ListControlled/ListControlled.d.ts +1 -1
  134. package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.d.ts +1 -1
  135. package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +2 -2
  136. package/dist/elements/structure/ModalContainer/ModalContainer.mjs +10 -37
  137. package/dist/elements/structure/ModalContainer/Settings.d.ts +1 -1
  138. package/dist/elements/structure/ModalContainer/declaration.d.ts +48 -2
  139. package/dist/elements/structure/ModalContainer/declaration.mjs +40 -2
  140. package/dist/elements/structure/ModalContainer/index.d.ts +49 -3
  141. package/dist/elements/structure/Pagination/Pagination.d.ts +2 -2
  142. package/dist/elements/structure/Pagination/Pagination.mjs +45 -50
  143. package/dist/elements/structure/Pagination/Settings.d.ts +1 -1
  144. package/dist/elements/structure/Pagination/declaration.d.ts +11 -0
  145. package/dist/elements/structure/Pagination/declaration.mjs +7 -0
  146. package/dist/elements/structure/Pagination/index.d.ts +12 -1
  147. package/dist/elements/structure/TabContainer/Settings.d.ts +1 -1
  148. package/dist/elements/structure/TabContainer/TabContainer.d.ts +2 -2
  149. package/dist/elements/structure/TabContainer/TabContainerBody/Settings.d.ts +1 -1
  150. package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +2 -2
  151. package/dist/elements/structure/TabContainer/TabContainerBody/declaration.d.ts +1 -0
  152. package/dist/elements/structure/TabContainer/TabContainerBody/declaration.mjs +1 -0
  153. package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +2 -1
  154. package/dist/elements/structure/TabContainer/TabContainerHeader/Settings.d.ts +1 -1
  155. package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +2 -2
  156. package/dist/elements/structure/TabContainer/TabContainerHeader/declaration.d.ts +1 -0
  157. package/dist/elements/structure/TabContainer/TabContainerHeader/declaration.mjs +1 -0
  158. package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +2 -1
  159. package/dist/elements/structure/TabContainer/TabContainerItem/Settings.d.ts +1 -1
  160. package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +2 -2
  161. package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +1 -1
  162. package/dist/elements/structure/TabContainer/index.d.ts +6 -4
  163. package/dist/index.d.ts +351 -42
  164. package/package.json +17 -9
@@ -1,10 +1,10 @@
1
1
  declare const Form: {
2
- (props: import('../../../Element/hocs/withElement').WithElementProps<import('./Form').FormProps>): import("react").JSX.Element;
2
+ (props: import('../../../Element/hocs/withElement').WithElementProps<import('./Form').FormProps>): import('react').JSX.Element;
3
3
  displayName: string;
4
4
  } & {
5
5
  content: {
6
6
  market: {
7
- icon: import("react").JSX.Element;
7
+ icon: import('react').JSX.Element;
8
8
  category: "form";
9
9
  owner: "Plitzi";
10
10
  verified: true;
@@ -55,6 +55,63 @@ declare const Form: {
55
55
  };
56
56
  type: "form";
57
57
  sourceType: "apiContainer";
58
+ triggers: {
59
+ readonly onSubmit: {
60
+ readonly action: "onSubmit";
61
+ readonly title: "On Form Submit";
62
+ readonly type: "trigger";
63
+ readonly params: {};
64
+ readonly preview: {
65
+ readonly values: {};
66
+ readonly actionUrl: "";
67
+ readonly method: "";
68
+ };
69
+ };
70
+ };
71
+ callbacks: {
72
+ readonly performReset: {
73
+ readonly action: "performReset";
74
+ readonly title: "Reset Form";
75
+ readonly type: "callback";
76
+ readonly params: {};
77
+ };
78
+ readonly setFieldValue: {
79
+ readonly action: "setFieldValue";
80
+ readonly title: "Set Field Value";
81
+ readonly type: "callback";
82
+ readonly preview: {};
83
+ readonly params: {
84
+ readonly name: {
85
+ readonly label: "Field Name";
86
+ readonly defaultValue: undefined;
87
+ readonly type: "select";
88
+ readonly options: [];
89
+ };
90
+ readonly value: {
91
+ readonly type: "text";
92
+ readonly defaultValue: "";
93
+ };
94
+ };
95
+ };
96
+ readonly setFieldError: {
97
+ readonly action: "setFieldError";
98
+ readonly title: "Set Field Error";
99
+ readonly type: "callback";
100
+ readonly preview: {};
101
+ readonly params: {
102
+ readonly name: {
103
+ readonly label: "Field Name";
104
+ readonly defaultValue: undefined;
105
+ readonly type: "select";
106
+ readonly options: [];
107
+ };
108
+ readonly error: {
109
+ readonly type: "text";
110
+ readonly defaultValue: "";
111
+ };
112
+ };
113
+ };
114
+ };
58
115
  __attributes: Partial<{
59
116
  values: Record<string, unknown>;
60
117
  method: "get" | "post";
@@ -45,9 +45,9 @@ export type FormControlProps = {
45
45
  handleChange?: (e: ChangeEvent<HTMLInputElement> | ChangeEvent<HTMLSelectElement> | ChangeEvent<HTMLTextAreaElement>) => void;
46
46
  handleValidate?: () => void;
47
47
  };
48
- declare const FormControl: ({ ref, className, subType, name, label, placeholder, autoComplete, disabled, options, required, maxLength, readOnly, value, error, handleChange, handleValidate }: FormControlProps) => import("react").JSX.Element | null;
48
+ declare const FormControl: ({ ref, className, subType, name, label, placeholder, autoComplete, disabled, options, required, maxLength, readOnly, value, error, handleChange, handleValidate }: FormControlProps) => import('react').JSX.Element | null;
49
49
  declare const _default: {
50
- (props: import('../../../Element/hocs/withElement').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<FormControlProps>>): import("react").JSX.Element;
50
+ (props: import('../../../Element/hocs/withElement').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<FormControlProps>>): import('react').JSX.Element;
51
51
  displayName: string;
52
52
  };
53
53
  export default _default;
@@ -1,30 +1,22 @@
1
1
  import e from "../../../Element/hocs/withElement.mjs";
2
2
  import t from "../../../Element/hooks/useElement.mjs";
3
3
  import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "./components/Label.mjs";
5
- import i from "./hocs/withFieldValue.mjs";
6
- import a from "./inputs/Checkbox.mjs";
7
- import o from "./inputs/Hidden.mjs";
8
- import s from "./inputs/Input.mjs";
9
- import c from "./inputs/Select.mjs";
10
- import l from "./inputs/Textarea.mjs";
11
- import { use as u, useCallback as d, useEffect as f, useMemo as p } from "react";
4
+ import r from "./declaration.mjs";
5
+ import i from "./components/Label.mjs";
6
+ import a from "./hocs/withFieldValue.mjs";
7
+ import o from "./inputs/Checkbox.mjs";
8
+ import s from "./inputs/Hidden.mjs";
9
+ import c from "./inputs/Input.mjs";
10
+ import l from "./inputs/Select.mjs";
11
+ import u from "./inputs/Textarea.mjs";
12
+ import { use as d, useCallback as f, useEffect as p } from "react";
12
13
  import m from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
13
14
  import { createStoreHook as h } from "@plitzi/nexus/react";
14
15
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
15
16
  import v from "clsx";
16
17
  //#region src/elements/form/FormControl/FormControl.tsx
17
- var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label: x = "Label", placeholder: S = "", autoComplete: C = !0, disabled: w = !1, options: T = [], required: E = !0, maxLength: D = 0, readOnly: O = !1, value: k = "", error: A = "", handleChange: j, handleValidate: M }) => {
18
- let { id: N, rootId: P, definition: { styleSelectors: F } } = t(), { settings: { previewMode: I }, contexts: { InteractionsContext: L } } = m(), { interactionsManager: R } = u(L), { useStore: z } = h(), [B] = z("runtime.sources.form"), V = p(() => ({ onChange: {
19
- action: "onChange",
20
- title: "On Change",
21
- type: "trigger",
22
- params: {},
23
- preview: {
24
- value: "",
25
- name: ""
26
- }
27
- } }), []), H = d((e) => {
18
+ var y = ({ ref: e, className: a = "", subType: y = "text", name: b = "", label: x = "Label", placeholder: S = "", autoComplete: C = !0, disabled: w = !1, options: T = [], required: E = !0, maxLength: D = 0, readOnly: O = !1, value: k = "", error: A = "", handleChange: j, handleValidate: M }) => {
19
+ let { id: N, rootId: P, definition: { styleSelectors: F } } = t(), { settings: { previewMode: I }, contexts: { InteractionsContext: L } } = m(), { interactionsManager: R } = d(L), { useStore: z } = h(), [B] = z("runtime.sources.form"), V = f((e) => {
28
20
  if (j?.(e), !I) return;
29
21
  let t = e.target, n = t.type === "checkbox" || y === "switch" ? t.checked : t.value;
30
22
  R.interactionTrigger(N, "onChange", {
@@ -41,29 +33,29 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
41
33
  ]);
42
34
  if (!B && !I) return /* @__PURE__ */ g(n, {
43
35
  ref: e,
44
- className: v("plitzi-component__form-input", { "form-input--out-of-context": !I }, i),
36
+ className: v("plitzi-component__form-input", { "form-input--out-of-context": !I }, a),
45
37
  children: /* @__PURE__ */ g("div", { children: "Form Input Only Works inside Form element" })
46
38
  });
47
39
  if (!B && I) return null;
48
- let { registerField: U, unregisterField: W } = B, G = ["checkbox", "switch"].includes(y), K = y === "hidden";
49
- return f(() => (U && U({
40
+ let { registerField: H, unregisterField: U } = B, W = ["checkbox", "switch"].includes(y), G = y === "hidden";
41
+ return p(() => (H && H({
50
42
  name: b,
51
43
  path: b
52
44
  }), () => {
53
- W && W(b);
45
+ U && U(b);
54
46
  }), [
55
47
  b,
56
- U,
57
- W
48
+ H,
49
+ U
58
50
  ]), /* @__PURE__ */ _(n, {
59
51
  ref: e,
60
- interactionTriggers: V,
52
+ interactionTriggers: r.triggers,
61
53
  className: v("plitzi-component__form-control", {
62
54
  "form-control--invalid": A && I,
63
55
  [`plitzi-component__form-control-${y}`]: y
64
- }, i),
56
+ }, a),
65
57
  children: [
66
- !G && !K && x && /* @__PURE__ */ g(r, {
58
+ !W && !G && x && /* @__PURE__ */ g(i, {
67
59
  targetInput: `${P}_${N}`,
68
60
  previewMode: I,
69
61
  className: F.label,
@@ -71,13 +63,13 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
71
63
  required: E,
72
64
  children: x
73
65
  }),
74
- G && x && /* @__PURE__ */ _(r, {
66
+ W && x && /* @__PURE__ */ _(i, {
75
67
  targetInput: `${P}_${N}`,
76
68
  previewMode: I,
77
69
  className: F.label,
78
70
  type: y,
79
71
  required: E,
80
- children: [y === "checkbox" && /* @__PURE__ */ g(a, {
72
+ children: [y === "checkbox" && /* @__PURE__ */ g(o, {
81
73
  id: `${P}_${N}`,
82
74
  name: b,
83
75
  value: k,
@@ -85,11 +77,11 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
85
77
  placeholder: S,
86
78
  required: E,
87
79
  disabled: w,
88
- onChange: H,
80
+ onChange: V,
89
81
  onValidate: M
90
82
  }), x]
91
83
  }),
92
- y === "checkbox" && !x && /* @__PURE__ */ g(a, {
84
+ y === "checkbox" && !x && /* @__PURE__ */ g(o, {
93
85
  id: `${P}_${N}`,
94
86
  name: b,
95
87
  value: k,
@@ -97,7 +89,7 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
97
89
  placeholder: S,
98
90
  required: E,
99
91
  disabled: w,
100
- onChange: H,
92
+ onChange: V,
101
93
  onValidate: M
102
94
  }),
103
95
  [
@@ -107,7 +99,7 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
107
99
  "password",
108
100
  "date",
109
101
  "time"
110
- ].includes(y) && /* @__PURE__ */ g(s, {
102
+ ].includes(y) && /* @__PURE__ */ g(c, {
111
103
  id: `${P}_${N}`,
112
104
  name: b,
113
105
  value: k,
@@ -119,10 +111,10 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
119
111
  maxLength: D,
120
112
  disabled: w,
121
113
  readOnly: O || !I,
122
- onChange: H,
114
+ onChange: V,
123
115
  onValidate: M
124
116
  }),
125
- y === "hidden" && /* @__PURE__ */ g(o, {
117
+ y === "hidden" && /* @__PURE__ */ g(s, {
126
118
  id: `${P}_${N}`,
127
119
  name: b,
128
120
  value: k,
@@ -130,10 +122,10 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
130
122
  disabled: w,
131
123
  previewMode: I
132
124
  }),
133
- y === "select" && /* @__PURE__ */ g(c, {
125
+ y === "select" && /* @__PURE__ */ g(l, {
134
126
  id: `${P}_${N}`,
135
127
  name: b,
136
- onChange: H,
128
+ onChange: V,
137
129
  onValidate: M,
138
130
  value: k,
139
131
  className: F.input,
@@ -141,7 +133,7 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
141
133
  disabled: w,
142
134
  options: T
143
135
  }),
144
- y === "textarea" && /* @__PURE__ */ g(l, {
136
+ y === "textarea" && /* @__PURE__ */ g(u, {
145
137
  id: `${P}_${N}`,
146
138
  name: b,
147
139
  value: k,
@@ -151,7 +143,7 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
151
143
  maxLength: D,
152
144
  disabled: w,
153
145
  readOnly: O,
154
- onChange: H,
146
+ onChange: V,
155
147
  onValidate: M
156
148
  }),
157
149
  A && /* @__PURE__ */ g("div", {
@@ -160,6 +152,6 @@ var y = ({ ref: e, className: i = "", subType: y = "text", name: b = "", label:
160
152
  })
161
153
  ]
162
154
  });
163
- }, b = e(i(y));
155
+ }, b = e(a(y));
164
156
  //#endregion
165
157
  export { y as FormControl, b as default };
@@ -22,5 +22,5 @@ type SettingsProps = {
22
22
  previewError?: boolean;
23
23
  onUpdate?: (key: string, value: string | boolean | number | string[]) => void;
24
24
  };
25
- declare const Settings: ({ subType, name, label, defaultValue, placeholder, autoComplete, options, required, requiredMessage, minLength, minLengthMessage, maxLength, maxLengthMessage, formatMessage, pattern, patternMessage, matches, matchesMessage, readOnly, disabled, previewError, onUpdate }: SettingsProps) => import("react").JSX.Element;
25
+ declare const Settings: ({ subType, name, label, defaultValue, placeholder, autoComplete, options, required, requiredMessage, minLength, minLengthMessage, maxLength, maxLengthMessage, formatMessage, pattern, patternMessage, matches, matchesMessage, readOnly, disabled, previewError, onUpdate }: SettingsProps) => import('react').JSX.Element;
26
26
  export default Settings;
@@ -8,5 +8,5 @@ export type LabelProps = {
8
8
  previewMode?: boolean;
9
9
  required: boolean;
10
10
  };
11
- declare const Label: ({ ref, children, targetInput, type, previewMode, required, className }: LabelProps) => import("react").JSX.Element;
11
+ declare const Label: ({ ref, children, targetInput, type, previewMode, required, className }: LabelProps) => import('react').JSX.Element;
12
12
  export default Label;
@@ -8,6 +8,18 @@ export type FormControlAttributes = AuthorableAttributes<FormControlProps, 'valu
8
8
  };
9
9
  declare const declaration: {
10
10
  readonly type: "formControl";
11
+ readonly triggers: {
12
+ readonly onChange: {
13
+ readonly action: "onChange";
14
+ readonly title: "On Change";
15
+ readonly type: "trigger";
16
+ readonly params: {};
17
+ readonly preview: {
18
+ readonly value: "";
19
+ readonly name: "";
20
+ };
21
+ };
22
+ };
11
23
  readonly content: {
12
24
  readonly attributes: {
13
25
  readonly subType: "text";
@@ -46,6 +46,16 @@ var t = {
46
46
  "margin-top": "4px"
47
47
  }, a = e()({
48
48
  type: "formControl",
49
+ triggers: { onChange: {
50
+ action: "onChange",
51
+ title: "On Change",
52
+ type: "trigger",
53
+ params: {},
54
+ preview: {
55
+ value: "",
56
+ name: ""
57
+ }
58
+ } },
49
59
  content: {
50
60
  attributes: {
51
61
  subType: "text",
@@ -18,7 +18,7 @@ export type WithFieldValueProps<T> = {
18
18
  previewError?: boolean;
19
19
  } & T;
20
20
  declare const withFieldValue: <T extends object>(WrappedComponent: FC<T>) => {
21
- (props: WithFieldValueProps<T>): import("react").JSX.Element;
21
+ (props: WithFieldValueProps<T>): import('react').JSX.Element;
22
22
  displayName: string;
23
23
  };
24
24
  export default withFieldValue;
@@ -1,10 +1,10 @@
1
1
  declare const FormControl: {
2
- (props: import('../../../Element/hocs/withElement').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<import('./FormControl').FormControlProps>>): import("react").JSX.Element;
2
+ (props: import('../../../Element/hocs/withElement').WithElementProps<import('./hocs/withFieldValue').WithFieldValueProps<import('./FormControl').FormControlProps>>): import('react').JSX.Element;
3
3
  displayName: string;
4
4
  } & {
5
5
  content: {
6
6
  market: {
7
- icon: import("react").JSX.Element;
7
+ icon: import('react').JSX.Element;
8
8
  category: "form";
9
9
  owner: "Plitzi";
10
10
  verified: true;
@@ -495,6 +495,18 @@ declare const FormControl: {
495
495
  settings: {};
496
496
  };
497
497
  type: "formControl";
498
+ triggers: {
499
+ readonly onChange: {
500
+ readonly action: "onChange";
501
+ readonly title: "On Change";
502
+ readonly type: "trigger";
503
+ readonly params: {};
504
+ readonly preview: {
505
+ readonly value: "";
506
+ readonly name: "";
507
+ };
508
+ };
509
+ };
498
510
  __attributes: import('./declaration').FormControlAttributes;
499
511
  };
500
512
  export default FormControl;
@@ -10,5 +10,5 @@ export type CheckboxProps = {
10
10
  onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
11
11
  onValidate?: () => void;
12
12
  };
13
- declare const Checkbox: ({ className, id, name, placeholder, value, required, disabled, onChange, onValidate }: CheckboxProps) => import("react").JSX.Element;
13
+ declare const Checkbox: ({ className, id, name, placeholder, value, required, disabled, onChange, onValidate }: CheckboxProps) => import('react').JSX.Element;
14
14
  export default Checkbox;
@@ -7,5 +7,5 @@ export type HiddenProps = {
7
7
  disabled?: boolean;
8
8
  previewMode?: boolean;
9
9
  };
10
- declare const Hidden: ({ className, id, name, value, required, disabled, previewMode }: HiddenProps) => import("react").JSX.Element;
10
+ declare const Hidden: ({ className, id, name, value, required, disabled, previewMode }: HiddenProps) => import('react').JSX.Element;
11
11
  export default Hidden;
@@ -14,5 +14,5 @@ export type InputProps = {
14
14
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
15
  onValidate?: () => void;
16
16
  };
17
- declare const Input: ({ className, id, name, placeholder, value, type, autoComplete, required, maxLength, disabled, readOnly, onChange, onValidate }: InputProps) => import("react").JSX.Element;
17
+ declare const Input: ({ className, id, name, placeholder, value, type, autoComplete, required, maxLength, disabled, readOnly, onChange, onValidate }: InputProps) => import('react').JSX.Element;
18
18
  export default Input;
@@ -13,5 +13,5 @@ export type SelectProps = {
13
13
  onChange?: (e: ChangeEvent<HTMLSelectElement>) => void;
14
14
  onValidate?: () => void;
15
15
  };
16
- declare const Select: ({ id, name, options, placeholder, value, className, disabled, onChange, onValidate }: SelectProps) => import("react").JSX.Element;
16
+ declare const Select: ({ id, name, options, placeholder, value, className, disabled, onChange, onValidate }: SelectProps) => import('react').JSX.Element;
17
17
  export default Select;
@@ -13,5 +13,5 @@ export type TextareaProps = {
13
13
  onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
14
14
  onValidate?: () => void;
15
15
  };
16
- declare const Textarea: ({ className, id, name, placeholder, value, required, maxLength, disabled, readOnly, onChange, onValidate }: TextareaProps) => import("react").JSX.Element;
16
+ declare const Textarea: ({ className, id, name, placeholder, value, required, maxLength, disabled, readOnly, onChange, onValidate }: TextareaProps) => import('react').JSX.Element;
17
17
  export default Textarea;
@@ -11,9 +11,9 @@ export type LayoutContainerProps = {
11
11
  children?: ReactNode;
12
12
  subType?: 'div' | 'header' | 'footer' | 'nav' | 'main' | 'section' | 'article' | 'aside' | 'address' | 'figure';
13
13
  };
14
- declare const LayoutContainer: ({ ref, className, children, subType }: LayoutContainerProps) => import("react").JSX.Element;
14
+ declare const LayoutContainer: ({ ref, className, children, subType }: LayoutContainerProps) => import('react').JSX.Element;
15
15
  declare const _default: {
16
- (props: import('../../../Element/hocs/withElement').WithElementProps<LayoutContainerProps>): import("react").JSX.Element;
16
+ (props: import('../../../Element/hocs/withElement').WithElementProps<LayoutContainerProps>): import('react').JSX.Element;
17
17
  displayName: string;
18
18
  };
19
19
  export default _default;
@@ -6,5 +6,5 @@ type SettingsProps = {
6
6
  folder?: string;
7
7
  onUpdate?: (key: string, value: string | boolean | number) => void;
8
8
  };
9
- declare const Settings: ({ id, layout, layoutContainer, subType, folder, onUpdate }: SettingsProps) => import("react").JSX.Element;
9
+ declare const Settings: ({ id, layout, layoutContainer, subType, folder, onUpdate }: SettingsProps) => import('react').JSX.Element;
10
10
  export default Settings;
@@ -1,5 +1,5 @@
1
1
  declare const LayoutContainer: {
2
- (props: import('../../../Element/hocs/withElement').WithElementProps<import('./LayoutContainer').LayoutContainerProps>): import("react").JSX.Element;
2
+ (props: import('../../../Element/hocs/withElement').WithElementProps<import('./LayoutContainer').LayoutContainerProps>): import('react').JSX.Element;
3
3
  displayName: string;
4
4
  } & {
5
5
  readonly type: "layoutContainer";
@@ -6,5 +6,5 @@ export type LayoutPickerProps = {
6
6
  onUpdate?: (key: string, value: string) => void;
7
7
  };
8
8
  /** Which shell something is rendered inside, and the container in that shell its content goes into. */
9
- declare const LayoutPicker: ({ layout, layoutContainer, ownLayoutId, onUpdate }: LayoutPickerProps) => import("react").JSX.Element;
9
+ declare const LayoutPicker: ({ layout, layoutContainer, ownLayoutId, onUpdate }: LayoutPickerProps) => import('react').JSX.Element;
10
10
  export default LayoutPicker;
@@ -3,9 +3,9 @@ export type LoadingProps = {
3
3
  ref?: RefObject<HTMLElement>;
4
4
  className?: string;
5
5
  };
6
- declare const Loading: ({ ref, className }: LoadingProps) => import("react").JSX.Element;
6
+ declare const Loading: ({ ref, className }: LoadingProps) => import('react').JSX.Element;
7
7
  declare const _default: {
8
- (props: import('../../../Element/hocs/withElement').WithElementProps<LoadingProps>): import("react").JSX.Element;
8
+ (props: import('../../../Element/hocs/withElement').WithElementProps<LoadingProps>): import('react').JSX.Element;
9
9
  displayName: string;
10
10
  };
11
11
  export default _default;
@@ -1,5 +1,5 @@
1
1
  declare const Loading: {
2
- (props: import('../../../Element/hocs/withElement').WithElementProps<import('./Loading').LoadingProps>): import("react").JSX.Element;
2
+ (props: import('../../../Element/hocs/withElement').WithElementProps<import('./Loading').LoadingProps>): import('react').JSX.Element;
3
3
  displayName: string;
4
4
  } & {
5
5
  readonly type: "loading";
@@ -3,9 +3,9 @@ export type NotFoundProps = {
3
3
  ref?: RefObject<HTMLElement | null>;
4
4
  className?: string;
5
5
  };
6
- declare const NotFound: ({ ref, className }: NotFoundProps) => import("react").JSX.Element | undefined;
6
+ declare const NotFound: ({ ref, className }: NotFoundProps) => import('react').JSX.Element | undefined;
7
7
  declare const _default: {
8
- (props: import('../../../Element/hocs/withElement').WithElementProps<NotFoundProps>): import("react").JSX.Element;
8
+ (props: import('../../../Element/hocs/withElement').WithElementProps<NotFoundProps>): import('react').JSX.Element;
9
9
  displayName: string;
10
10
  };
11
11
  export default _default;
@@ -1,5 +1,5 @@
1
1
  declare const NotFound: {
2
- (props: import('../../../Element/hocs/withElement').WithElementProps<import('./NotFound').NotFoundProps>): import("react").JSX.Element;
2
+ (props: import('../../../Element/hocs/withElement').WithElementProps<import('./NotFound').NotFoundProps>): import('react').JSX.Element;
3
3
  displayName: string;
4
4
  } & {
5
5
  readonly type: "notFound";
@@ -9,9 +9,9 @@ export type PageProps = {
9
9
  layoutContainer?: string;
10
10
  children?: ReactNode;
11
11
  };
12
- declare const Page: ({ ref, seoEnabled, seoPageTitle, seoPageDescription, className, layout, layoutContainer, children }: PageProps) => import("react").JSX.Element;
12
+ declare const Page: ({ ref, seoEnabled, seoPageTitle, seoPageDescription, className, layout, layoutContainer, children }: PageProps) => import('react').JSX.Element;
13
13
  declare const _default: {
14
- (props: import('../../../Element/hocs/withElement').WithElementProps<PageProps>): import("react").JSX.Element;
14
+ (props: import('../../../Element/hocs/withElement').WithElementProps<PageProps>): import('react').JSX.Element;
15
15
  displayName: string;
16
16
  };
17
17
  export default _default;
@@ -3,69 +3,60 @@ import t from "../../../Element/hocs/withElement.mjs";
3
3
  import n from "../../../Element/hooks/useElement.mjs";
4
4
  import { RootElement as r } from "../../../Element/RootElement.mjs";
5
5
  import i from "../LayoutContainer/index.mjs";
6
- import a from "../../../Element/hooks/useLayoutChain.mjs";
7
- import { use as o, useEffect as s, useMemo as c } from "react";
8
- import l from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
9
- import { useSdkStore as u } from "@plitzi/sdk-shared/store";
10
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
11
- import p from "clsx";
12
- import { Helmet as m } from "@dr.pogodin/react-helmet";
6
+ import a from "./declaration.mjs";
7
+ import o from "../../../Element/hooks/useLayoutChain.mjs";
8
+ import { use as s, useEffect as c, useMemo as l } from "react";
9
+ import u from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
10
+ import { useSdkStore as d } from "@plitzi/sdk-shared/store";
11
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
12
+ import m from "clsx";
13
+ import { Helmet as h } from "@dr.pogodin/react-helmet";
13
14
  //#region src/elements/internal/Page/Page.tsx
14
- var h = (e) => e.map((e) => ({
15
+ var g = (e) => e.map((e) => ({
15
16
  ...e,
16
17
  plitziElementLayout: {
17
18
  containerId: e.slot,
18
19
  rootId: e.slot,
19
20
  type: "layout"
20
21
  }
21
- })), g = (t, n, r) => t.reduce((t, { layout: r, slot: a, plitziElementLayout: o }) => /* @__PURE__ */ d(e, {
22
+ })), _ = (t, n, r) => t.reduce((t, { layout: r, slot: a, plitziElementLayout: o }) => /* @__PURE__ */ f(e, {
22
23
  body: t,
23
- children: /* @__PURE__ */ d(i, { internalProps: {
24
+ children: /* @__PURE__ */ f(i, { internalProps: {
24
25
  id: r,
25
26
  rootId: n,
26
27
  plitziElementLayout: o
27
28
  } })
28
- }, a), r), _ = ({ ref: e, seoEnabled: t = !1, seoPageTitle: i = "Title", seoPageDescription: _ = "Description", className: v = "", layout: y = "", layoutContainer: b = "", children: x }) => {
29
- let { id: S } = n(), { settings: { previewMode: C }, contexts: { InteractionsContext: w } } = l(), { interactionsManager: T } = o(w), [[E, D]] = u(["navigation.routeParams", "navigation.queryParams"]), O = a(y, b), k = c(() => h(O), [O]), A = c(() => g(k, S, x), [
30
- k,
31
- S,
32
- x
33
- ]), j = c(() => ({ onPageLoad: {
34
- action: "onPageLoad",
35
- title: "On Page Load",
36
- type: "trigger",
37
- params: {},
38
- preview: {
39
- pageId: "",
40
- routeParams: "",
41
- queryParams: ""
42
- }
43
- } }), []);
44
- return s(() => {
29
+ }, a), r), v = ({ ref: e, seoEnabled: t = !1, seoPageTitle: i = "Title", seoPageDescription: v = "Description", className: y = "", layout: b = "", layoutContainer: x = "", children: S }) => {
30
+ let { id: C } = n(), { settings: { previewMode: w }, contexts: { InteractionsContext: T } } = u(), { interactionsManager: E } = s(T), [[D, O]] = d(["navigation.routeParams", "navigation.queryParams"]), k = o(b, x), A = l(() => g(k), [k]), j = l(() => _(A, C, S), [
31
+ A,
32
+ C,
33
+ S
34
+ ]);
35
+ return c(() => {
45
36
  let e = !1;
46
37
  return queueMicrotask(() => {
47
- e || T.interactionTrigger(S, "onPageLoad", {
48
- pageId: S,
49
- routeParams: E,
50
- queryParams: D
38
+ e || E.interactionTrigger(C, "onPageLoad", {
39
+ pageId: C,
40
+ routeParams: D,
41
+ queryParams: O
51
42
  });
52
43
  }), () => {
53
44
  e = !0;
54
45
  };
55
46
  }, [
56
- S,
57
- T,
58
- D,
59
- E
60
- ]), /* @__PURE__ */ f(r, {
47
+ C,
48
+ E,
49
+ O,
50
+ D
51
+ ]), /* @__PURE__ */ p(r, {
61
52
  ref: e,
62
- className: p("plitzi-component__page", v),
63
- interactionTriggers: j,
64
- children: [t && C && /* @__PURE__ */ f(m, { children: [!!i && /* @__PURE__ */ d("title", { children: i }), !!_ && /* @__PURE__ */ d("meta", {
53
+ className: m("plitzi-component__page", y),
54
+ interactionTriggers: a.triggers,
55
+ children: [t && w && /* @__PURE__ */ p(h, { children: [!!i && /* @__PURE__ */ f("title", { children: i }), !!v && /* @__PURE__ */ f("meta", {
65
56
  name: "description",
66
- content: _
67
- })] }), A]
57
+ content: v
58
+ })] }), j]
68
59
  });
69
- }, v = t(_);
60
+ }, y = t(v);
70
61
  //#endregion
71
- export { _ as Page, v as default };
62
+ export { v as Page, y as default };
@@ -14,5 +14,5 @@ type SettingsProps = {
14
14
  unauthorizedPageRedirect?: string;
15
15
  onUpdate?: (key: string, value: string | boolean | number) => void;
16
16
  };
17
- declare const Settings: ({ id, seoEnabled, enabled, name, folder, seoPageTitle, seoPageDescription, slug, layout, layoutContainer, accessLevel, unauthorizedBehaviour, unauthorizedPageRedirect, onUpdate }: SettingsProps) => import("react").JSX.Element;
17
+ declare const Settings: ({ id, seoEnabled, enabled, name, folder, seoPageTitle, seoPageDescription, slug, layout, layoutContainer, accessLevel, unauthorizedBehaviour, unauthorizedPageRedirect, onUpdate }: SettingsProps) => import('react').JSX.Element;
18
18
  export default Settings;
@@ -4,6 +4,19 @@ import { AuthorableAttributes } from '@plitzi/sdk-shared/authoring/declare';
4
4
  export type PageAttributes = AuthorableAttributes<PageProps>;
5
5
  declare const declaration: {
6
6
  readonly type: "page";
7
+ readonly triggers: {
8
+ readonly onPageLoad: {
9
+ readonly action: "onPageLoad";
10
+ readonly title: "On Page Load";
11
+ readonly type: "trigger";
12
+ readonly params: {};
13
+ readonly preview: {
14
+ readonly pageId: "";
15
+ readonly routeParams: "";
16
+ readonly queryParams: "";
17
+ };
18
+ };
19
+ };
7
20
  readonly content: {
8
21
  readonly attributes: {
9
22
  readonly enabled: true;