@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.
- package/CHANGELOG.md +151 -0
- package/dist/Component/ComponentProvider.d.ts +1 -1
- package/dist/Element/JsxManager.d.ts +1 -1
- package/dist/Element/LayoutBody.d.ts +1 -1
- package/dist/Element/PluginManager.d.ts +1 -1
- package/dist/Element/PluginRemote.d.ts +1 -1
- package/dist/Element/ReplicaProvider.d.ts +1 -1
- package/dist/Element/helpers/pluginSelector.d.ts +1 -1
- package/dist/Element/hocs/withElement.d.ts +1 -1
- package/dist/Element/hooks/useRootElementInteractions.mjs +7 -1
- package/dist/components/ElementAdvancedEditor.d.ts +1 -1
- package/dist/dataSource/GlobalSources.mjs +24 -22
- package/dist/elements/advanced/BlockHtml/BlockHtml.d.ts +2 -2
- package/dist/elements/advanced/BlockHtml/Settings.d.ts +1 -1
- package/dist/elements/advanced/BlockHtml/index.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/BlockJsx.d.ts +2 -2
- package/dist/elements/advanced/BlockJsx/Settings.d.ts +1 -1
- package/dist/elements/advanced/BlockJsx/index.d.ts +1 -1
- package/dist/elements/advanced/Custom/Custom.d.ts +2 -2
- package/dist/elements/advanced/Custom/Settings.d.ts +1 -1
- package/dist/elements/advanced/Custom/index.d.ts +1 -1
- package/dist/elements/advanced/NodeHtml/index.d.ts +1 -1
- package/dist/elements/advanced/PlitziSdk/Settings.d.ts +1 -1
- package/dist/elements/advanced/Reference/Reference.d.ts +2 -2
- package/dist/elements/advanced/Reference/Settings.d.ts +1 -1
- package/dist/elements/advanced/Reference/index.d.ts +1 -1
- package/dist/elements/basic/Button/Button.d.ts +2 -2
- package/dist/elements/basic/Button/Settings.d.ts +1 -1
- package/dist/elements/basic/Button/index.d.ts +1 -1
- package/dist/elements/basic/Dropdown/Dropdown.d.ts +2 -2
- package/dist/elements/basic/Dropdown/DropdownPopup/DropdownPopup.d.ts +2 -2
- package/dist/elements/basic/Dropdown/DropdownPopup/Settings.d.ts +1 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/declaration.d.ts +2 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/declaration.mjs +2 -1
- package/dist/elements/basic/Dropdown/DropdownPopup/index.d.ts +3 -2
- package/dist/elements/basic/Dropdown/Settings.d.ts +1 -1
- package/dist/elements/basic/Dropdown/index.d.ts +4 -3
- package/dist/elements/basic/Heading/Heading.d.ts +2 -2
- package/dist/elements/basic/Heading/Settings.d.ts +1 -1
- package/dist/elements/basic/Heading/index.d.ts +1 -1
- package/dist/elements/basic/Link/Link.d.ts +2 -2
- package/dist/elements/basic/Link/Link.mjs +1 -1
- package/dist/elements/basic/Link/Settings.d.ts +1 -1
- package/dist/elements/basic/Link/index.d.ts +1 -1
- package/dist/elements/basic/Markdown/Markdown.d.ts +2 -2
- package/dist/elements/basic/Markdown/Settings.d.ts +1 -1
- package/dist/elements/basic/Markdown/index.d.ts +1 -1
- package/dist/elements/basic/Paragraph/Paragraph.d.ts +2 -2
- package/dist/elements/basic/Paragraph/Settings.d.ts +1 -1
- package/dist/elements/basic/Paragraph/index.d.ts +1 -1
- package/dist/elements/basic/RichText/RichText.d.ts +2 -2
- package/dist/elements/basic/RichText/Settings.d.ts +1 -1
- package/dist/elements/basic/RichText/index.d.ts +1 -1
- package/dist/elements/basic/Text/Settings.d.ts +1 -1
- package/dist/elements/basic/Text/Text.d.ts +2 -2
- package/dist/elements/basic/Text/index.d.ts +1 -1
- package/dist/elements/basic/ThemeToggle/ThemeToggle.d.ts +2 -2
- package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +55 -62
- package/dist/elements/basic/ThemeToggle/declaration.d.ts +12 -1
- package/dist/elements/basic/ThemeToggle/declaration.mjs +8 -1
- package/dist/elements/basic/ThemeToggle/index.d.ts +13 -2
- package/dist/elements/declarations/index.d.ts +314 -5
- package/dist/elements/form/Form/Form.d.ts +2 -2
- package/dist/elements/form/Form/Form.mjs +37 -57
- package/dist/elements/form/Form/Settings.d.ts +1 -1
- package/dist/elements/form/Form/declaration.d.ts +57 -0
- package/dist/elements/form/Form/declaration.mjs +55 -0
- package/dist/elements/form/Form/index.d.ts +59 -2
- package/dist/elements/form/FormControl/FormControl.d.ts +2 -2
- package/dist/elements/form/FormControl/FormControl.mjs +33 -41
- package/dist/elements/form/FormControl/Settings.d.ts +1 -1
- package/dist/elements/form/FormControl/components/Label.d.ts +1 -1
- package/dist/elements/form/FormControl/declaration.d.ts +12 -0
- package/dist/elements/form/FormControl/declaration.mjs +10 -0
- package/dist/elements/form/FormControl/hocs/withFieldValue.d.ts +1 -1
- package/dist/elements/form/FormControl/index.d.ts +14 -2
- package/dist/elements/form/FormControl/inputs/Checkbox.d.ts +1 -1
- package/dist/elements/form/FormControl/inputs/Hidden.d.ts +1 -1
- package/dist/elements/form/FormControl/inputs/Input.d.ts +1 -1
- package/dist/elements/form/FormControl/inputs/Select.d.ts +1 -1
- package/dist/elements/form/FormControl/inputs/Textarea.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/LayoutContainer.d.ts +2 -2
- package/dist/elements/internal/LayoutContainer/Settings.d.ts +1 -1
- package/dist/elements/internal/LayoutContainer/index.d.ts +1 -1
- package/dist/elements/internal/LayoutPicker/LayoutPicker.d.ts +1 -1
- package/dist/elements/internal/Loading/Loading.d.ts +2 -2
- package/dist/elements/internal/Loading/index.d.ts +1 -1
- package/dist/elements/internal/NotFound/NotFound.d.ts +2 -2
- package/dist/elements/internal/NotFound/index.d.ts +1 -1
- package/dist/elements/internal/Page/Page.d.ts +2 -2
- package/dist/elements/internal/Page/Page.mjs +34 -43
- package/dist/elements/internal/Page/Settings.d.ts +1 -1
- package/dist/elements/internal/Page/declaration.d.ts +13 -0
- package/dist/elements/internal/Page/declaration.mjs +11 -0
- package/dist/elements/internal/Page/index.d.ts +14 -1
- package/dist/elements/media/FontAwesome/FontAwesome.d.ts +2 -2
- package/dist/elements/media/FontAwesome/Settings.d.ts +1 -1
- package/dist/elements/media/FontAwesome/index.d.ts +1 -1
- package/dist/elements/media/Image/Image.d.ts +2 -2
- package/dist/elements/media/Image/Settings.d.ts +1 -1
- package/dist/elements/media/Image/index.d.ts +1 -1
- package/dist/elements/media/Video/Settings.d.ts +1 -1
- package/dist/elements/media/Video/Video.d.ts +2 -2
- package/dist/elements/media/Video/index.d.ts +1 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +11 -2
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +119 -161
- package/dist/elements/provider/ApiContainer/Settings.d.ts +2 -1
- package/dist/elements/provider/ApiContainer/Settings.mjs +129 -122
- package/dist/elements/provider/ApiContainer/components/FiltersInput/FiltersInput.d.ts +1 -1
- package/dist/elements/provider/ApiContainer/declaration.d.ts +75 -0
- package/dist/elements/provider/ApiContainer/declaration.mjs +72 -1
- package/dist/elements/provider/ApiContainer/helpers/providerOutcome.d.ts +25 -0
- package/dist/elements/provider/ApiContainer/helpers/providerOutcome.mjs +7 -0
- package/dist/elements/provider/ApiContainer/hooks/useAutoRefresh.d.ts +21 -0
- package/dist/elements/provider/ApiContainer/hooks/useAutoRefresh.mjs +18 -0
- package/dist/elements/provider/ApiContainer/index.d.ts +76 -1
- package/dist/elements/structure/Container/Container.d.ts +2 -2
- package/dist/elements/structure/Container/Settings.d.ts +1 -1
- package/dist/elements/structure/Container/index.d.ts +1 -1
- package/dist/elements/structure/DialogContainer/DialogContainer.d.ts +2 -2
- package/dist/elements/structure/DialogContainer/DialogContainer.mjs +10 -60
- package/dist/elements/structure/DialogContainer/Settings.d.ts +1 -1
- package/dist/elements/structure/DialogContainer/declaration.d.ts +82 -1
- package/dist/elements/structure/DialogContainer/declaration.mjs +62 -1
- package/dist/elements/structure/DialogContainer/index.d.ts +83 -2
- package/dist/elements/structure/List/List.d.ts +2 -2
- package/dist/elements/structure/List/ListItem/ListItem.d.ts +2 -2
- package/dist/elements/structure/List/ListItem/Settings.d.ts +1 -1
- package/dist/elements/structure/List/ListItem/index.d.ts +1 -1
- package/dist/elements/structure/List/Settings.d.ts +1 -1
- package/dist/elements/structure/List/index.d.ts +2 -2
- package/dist/elements/structure/List/modes/ListBasic.d.ts +1 -1
- package/dist/elements/structure/List/modes/ListControlled/ListControlled.d.ts +1 -1
- package/dist/elements/structure/List/modes/ListControlled/ListControlledItem.d.ts +1 -1
- package/dist/elements/structure/ModalContainer/ModalContainer.d.ts +2 -2
- package/dist/elements/structure/ModalContainer/ModalContainer.mjs +10 -37
- package/dist/elements/structure/ModalContainer/Settings.d.ts +1 -1
- package/dist/elements/structure/ModalContainer/declaration.d.ts +48 -2
- package/dist/elements/structure/ModalContainer/declaration.mjs +40 -2
- package/dist/elements/structure/ModalContainer/index.d.ts +49 -3
- package/dist/elements/structure/Pagination/Pagination.d.ts +2 -2
- package/dist/elements/structure/Pagination/Pagination.mjs +45 -50
- package/dist/elements/structure/Pagination/Settings.d.ts +1 -1
- package/dist/elements/structure/Pagination/declaration.d.ts +11 -0
- package/dist/elements/structure/Pagination/declaration.mjs +7 -0
- package/dist/elements/structure/Pagination/index.d.ts +12 -1
- package/dist/elements/structure/TabContainer/Settings.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainer.d.ts +2 -2
- package/dist/elements/structure/TabContainer/TabContainerBody/Settings.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerBody/TabContainerBody.d.ts +2 -2
- package/dist/elements/structure/TabContainer/TabContainerBody/declaration.d.ts +1 -0
- package/dist/elements/structure/TabContainer/TabContainerBody/declaration.mjs +1 -0
- package/dist/elements/structure/TabContainer/TabContainerBody/index.d.ts +2 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/Settings.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerHeader/TabContainerHeader.d.ts +2 -2
- package/dist/elements/structure/TabContainer/TabContainerHeader/declaration.d.ts +1 -0
- package/dist/elements/structure/TabContainer/TabContainerHeader/declaration.mjs +1 -0
- package/dist/elements/structure/TabContainer/TabContainerHeader/index.d.ts +2 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/Settings.d.ts +1 -1
- package/dist/elements/structure/TabContainer/TabContainerItem/TabContainerItem.d.ts +2 -2
- package/dist/elements/structure/TabContainer/TabContainerItem/index.d.ts +1 -1
- package/dist/elements/structure/TabContainer/index.d.ts +6 -4
- package/dist/index.d.ts +351 -42
- package/package.json +17 -9
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ProviderOutcome = 'success' | 'error' | undefined;
|
|
2
|
+
export type ProviderOutcomeParams = {
|
|
3
|
+
serverMode: boolean;
|
|
4
|
+
/** Browser provider: what its request answered. */
|
|
5
|
+
isSuccess: boolean;
|
|
6
|
+
isError: boolean;
|
|
7
|
+
/** Server provider: a payload has arrived, and it is for the page the visitor is on. */
|
|
8
|
+
rscResolved: boolean;
|
|
9
|
+
rscPending: boolean;
|
|
10
|
+
/** Server provider: this element's slice of that payload — `null` when the server could not resolve it. */
|
|
11
|
+
elementData: unknown;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Which of `onApiSuccess` / `onApiError` a provider has earned, or neither yet.
|
|
15
|
+
*
|
|
16
|
+
* The same question for both runtimes, answered from what each one has. A browser provider has its request's
|
|
17
|
+
* status. A server provider has no request of its own — its data arrives in the page's RSC payload — so success is
|
|
18
|
+
* its slice being there and error is the payload arriving WITHOUT it. Asked only of the browser request, a server
|
|
19
|
+
* provider never fired either trigger, and a flow its author wired to them never ran.
|
|
20
|
+
*
|
|
21
|
+
* A payload resolved for another page is neither: the visitor navigated and this provider's answer is still on its
|
|
22
|
+
* way.
|
|
23
|
+
*/
|
|
24
|
+
declare const providerOutcome: ({ serverMode, isSuccess, isError, rscResolved, rscPending, elementData }: ProviderOutcomeParams) => ProviderOutcome;
|
|
25
|
+
export default providerOutcome;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/elements/provider/ApiContainer/helpers/providerOutcome.ts
|
|
2
|
+
var e = ({ serverMode: e, isSuccess: t, isError: n, rscResolved: r, rscPending: i, elementData: a }) => {
|
|
3
|
+
if (!e) return t ? "success" : n ? "error" : void 0;
|
|
4
|
+
if (r && !i) return a == null ? "error" : "success";
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type UseAutoRefreshParams = {
|
|
2
|
+
/** Seconds between refreshes. Zero, a negative number or anything that is not a number turns it off. */
|
|
3
|
+
seconds: number | string;
|
|
4
|
+
/** Whether there is anything to refresh at all — a provider that cannot fetch must not be asked to. */
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
refresh: () => unknown;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Asks a provider for its data again every `seconds`, for a page that shows something still moving.
|
|
10
|
+
*
|
|
11
|
+
* Three things a bare `setInterval` gets wrong, each of them a load the page's server pays for:
|
|
12
|
+
*
|
|
13
|
+
* - **A hidden tab does not ask.** Nobody is looking, and a dashboard left open in a background tab overnight is
|
|
14
|
+
* otherwise thousands of requests answering no one.
|
|
15
|
+
* - **One at a time.** A refresh that outlives the interval is not joined by a second one — on a slow server that
|
|
16
|
+
* is how a poll turns into a pile-up.
|
|
17
|
+
* - **The newest `refresh`, without restarting the clock.** The callback is read through a ref, so a re-render that
|
|
18
|
+
* hands over a new function does not reset the countdown to the full interval each time.
|
|
19
|
+
*/
|
|
20
|
+
declare const useAutoRefresh: ({ seconds, enabled, refresh }: UseAutoRefreshParams) => void;
|
|
21
|
+
export default useAutoRefresh;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t } from "react";
|
|
2
|
+
//#region src/elements/provider/ApiContainer/hooks/useAutoRefresh.ts
|
|
3
|
+
var n = ({ seconds: n, enabled: r, refresh: i }) => {
|
|
4
|
+
let a = t(i);
|
|
5
|
+
a.current = i;
|
|
6
|
+
let o = Number(n), s = r && Number.isFinite(o) && o > 0;
|
|
7
|
+
e(() => {
|
|
8
|
+
if (!s) return;
|
|
9
|
+
let e = !1, t = setInterval(() => {
|
|
10
|
+
e || document.visibilityState === "hidden" || (e = !0, Promise.resolve().then(() => a.current()).catch(() => void 0).finally(() => {
|
|
11
|
+
e = !1;
|
|
12
|
+
}));
|
|
13
|
+
}, o * 1e3);
|
|
14
|
+
return () => clearInterval(t);
|
|
15
|
+
}, [s, o]);
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as default };
|
|
@@ -1,9 +1,84 @@
|
|
|
1
1
|
declare const ApiContainer: {
|
|
2
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./ApiContainer').ApiContainerProps>): import(
|
|
2
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./ApiContainer').ApiContainerProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "apiContainer";
|
|
6
6
|
readonly sourceType: "apiContainer";
|
|
7
|
+
readonly triggers: {
|
|
8
|
+
readonly onApiError: {
|
|
9
|
+
readonly action: "onApiError";
|
|
10
|
+
readonly title: "On Api Error";
|
|
11
|
+
readonly type: "trigger";
|
|
12
|
+
readonly params: {};
|
|
13
|
+
readonly preview: {
|
|
14
|
+
readonly url: "";
|
|
15
|
+
readonly method: "";
|
|
16
|
+
readonly status: "";
|
|
17
|
+
readonly data: "";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
readonly onApiSuccess: {
|
|
21
|
+
readonly action: "onApiSuccess";
|
|
22
|
+
readonly title: "On Api Success";
|
|
23
|
+
readonly type: "trigger";
|
|
24
|
+
readonly params: {};
|
|
25
|
+
readonly preview: {
|
|
26
|
+
readonly url: "";
|
|
27
|
+
readonly method: "";
|
|
28
|
+
readonly status: "";
|
|
29
|
+
readonly data: "";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly callbacks: {
|
|
34
|
+
readonly performQuery: {
|
|
35
|
+
readonly action: "performQuery";
|
|
36
|
+
readonly title: "Perform Query";
|
|
37
|
+
readonly type: "callback";
|
|
38
|
+
readonly preview: {};
|
|
39
|
+
readonly params: {};
|
|
40
|
+
};
|
|
41
|
+
readonly loadMore: {
|
|
42
|
+
readonly action: "loadMore";
|
|
43
|
+
readonly title: "Load More";
|
|
44
|
+
readonly type: "callback";
|
|
45
|
+
readonly preview: {};
|
|
46
|
+
readonly params: {};
|
|
47
|
+
};
|
|
48
|
+
readonly goToPage: {
|
|
49
|
+
readonly action: "goToPage";
|
|
50
|
+
readonly title: "Go To Page";
|
|
51
|
+
readonly type: "callback";
|
|
52
|
+
readonly preview: {};
|
|
53
|
+
readonly params: {
|
|
54
|
+
readonly page: {
|
|
55
|
+
readonly label: "Page";
|
|
56
|
+
readonly defaultValue: "1";
|
|
57
|
+
readonly type: "text";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly writeRecord: {
|
|
62
|
+
readonly action: "writeRecord";
|
|
63
|
+
readonly title: "Write Record";
|
|
64
|
+
readonly type: "callback";
|
|
65
|
+
readonly preview: {
|
|
66
|
+
readonly action: "create";
|
|
67
|
+
};
|
|
68
|
+
readonly params: {
|
|
69
|
+
readonly action: {
|
|
70
|
+
readonly label: "Endpoint";
|
|
71
|
+
readonly defaultValue: "create";
|
|
72
|
+
readonly type: "text";
|
|
73
|
+
};
|
|
74
|
+
readonly recordId: {
|
|
75
|
+
readonly label: "Record Id";
|
|
76
|
+
readonly defaultValue: "";
|
|
77
|
+
readonly type: "text";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
7
82
|
readonly content: {
|
|
8
83
|
readonly attributes: {
|
|
9
84
|
readonly query: "";
|
|
@@ -5,9 +5,9 @@ export type ContainerProps = {
|
|
|
5
5
|
subType?: 'div' | 'header' | 'footer' | 'nav' | 'main' | 'section' | 'article' | 'aside' | 'address' | 'figure' | 'dl' | 'dt' | 'dd' | 'li';
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
declare const Container: ({ ref, className, subType, children }: ContainerProps) => import(
|
|
8
|
+
declare const Container: ({ ref, className, subType, children }: ContainerProps) => import('react').JSX.Element;
|
|
9
9
|
declare const _default: {
|
|
10
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<ContainerProps>): import(
|
|
10
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<ContainerProps>): import('react').JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
@@ -2,5 +2,5 @@ type SettingsProps = {
|
|
|
2
2
|
subType?: 'div' | 'header' | 'footer' | 'nav' | 'main' | 'section' | 'article' | 'aside' | 'address' | 'figure' | 'dl' | 'dt' | 'dd' | 'li';
|
|
3
3
|
onUpdate?: (key: string, value: string | boolean | number) => void;
|
|
4
4
|
};
|
|
5
|
-
declare const Settings: ({ subType, onUpdate }: SettingsProps) => import(
|
|
5
|
+
declare const Settings: ({ subType, onUpdate }: SettingsProps) => import('react').JSX.Element;
|
|
6
6
|
export default Settings;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Container: {
|
|
2
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./Container').ContainerProps>): import(
|
|
2
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./Container').ContainerProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "container";
|
|
@@ -9,9 +9,9 @@ export type DialogContainerProps = {
|
|
|
9
9
|
rejectButtonLabel: string;
|
|
10
10
|
autoHideAfterClick: boolean;
|
|
11
11
|
};
|
|
12
|
-
declare const DialogContainer: ({ ref, className, children, headerLabel, acceptButtonLabel, acceptButtonLabelLoading, rejectButtonLabel, autoHideAfterClick }: DialogContainerProps) => import(
|
|
12
|
+
declare const DialogContainer: ({ ref, className, children, headerLabel, acceptButtonLabel, acceptButtonLabelLoading, rejectButtonLabel, autoHideAfterClick }: DialogContainerProps) => import('react').JSX.Element;
|
|
13
13
|
declare const _default: {
|
|
14
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<DialogContainerProps>): import(
|
|
14
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<DialogContainerProps>): import('react').JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
@@ -70,65 +70,15 @@ var v = ({ ref: e, className: v = "", children: y, headerLabel: b = "Dialog Head
|
|
|
70
70
|
N,
|
|
71
71
|
E
|
|
72
72
|
]), H = c(() => ({
|
|
73
|
-
onDialogAccept: {
|
|
74
|
-
action: "onDialogAccept",
|
|
75
|
-
title: "On Dialog Accept",
|
|
76
|
-
type: "trigger",
|
|
77
|
-
params: { metadata: {
|
|
78
|
-
type: "text",
|
|
79
|
-
defaultValue: ""
|
|
80
|
-
} },
|
|
81
|
-
preview: { metadata: "" }
|
|
82
|
-
},
|
|
83
|
-
onDialogReject: {
|
|
84
|
-
action: "onDialogReject",
|
|
85
|
-
title: "On Dialog Reject",
|
|
86
|
-
type: "trigger",
|
|
87
|
-
params: { metadata: {
|
|
88
|
-
type: "text",
|
|
89
|
-
defaultValue: ""
|
|
90
|
-
} },
|
|
91
|
-
preview: { metadata: "" }
|
|
92
|
-
},
|
|
93
|
-
onDialogOpen: {
|
|
94
|
-
action: "onDialogOpen",
|
|
95
|
-
title: "On Dialog Open",
|
|
96
|
-
type: "trigger",
|
|
97
|
-
params: { metadata: {
|
|
98
|
-
type: "text",
|
|
99
|
-
defaultValue: ""
|
|
100
|
-
} },
|
|
101
|
-
preview: { metadata: "" }
|
|
102
|
-
},
|
|
103
|
-
onDialogClose: {
|
|
104
|
-
action: "onDialogClose",
|
|
105
|
-
title: "On Dialog Close",
|
|
106
|
-
type: "trigger",
|
|
107
|
-
params: { metadata: {
|
|
108
|
-
type: "text",
|
|
109
|
-
defaultValue: ""
|
|
110
|
-
} },
|
|
111
|
-
preview: { metadata: "" }
|
|
112
|
-
}
|
|
113
|
-
}), []), U = c(() => ({
|
|
114
73
|
openDialog: {
|
|
115
|
-
|
|
74
|
+
...i.callbacks.openDialog,
|
|
116
75
|
title: `Open ${O}`,
|
|
117
|
-
|
|
118
|
-
callback: L,
|
|
119
|
-
params: { metadata: {
|
|
120
|
-
type: "text",
|
|
121
|
-
defaultValue: ""
|
|
122
|
-
} },
|
|
123
|
-
preview: { metadata: "" }
|
|
76
|
+
callback: L
|
|
124
77
|
},
|
|
125
78
|
closeDialog: {
|
|
126
|
-
|
|
79
|
+
...i.callbacks.closeDialog,
|
|
127
80
|
title: `Close ${O}`,
|
|
128
|
-
|
|
129
|
-
callback: R,
|
|
130
|
-
preview: {},
|
|
131
|
-
params: {}
|
|
81
|
+
callback: R
|
|
132
82
|
}
|
|
133
83
|
}), [
|
|
134
84
|
R,
|
|
@@ -143,19 +93,19 @@ var v = ({ ref: e, className: v = "", children: y, headerLabel: b = "Dialog Head
|
|
|
143
93
|
N,
|
|
144
94
|
k.visibility
|
|
145
95
|
]);
|
|
146
|
-
let
|
|
96
|
+
let U = o(() => r(N), [N]);
|
|
147
97
|
_({
|
|
148
98
|
id: T,
|
|
149
99
|
source: A,
|
|
150
100
|
name: O || `Dialog - ${T}`,
|
|
151
|
-
fields:
|
|
101
|
+
fields: U
|
|
152
102
|
});
|
|
153
|
-
let
|
|
103
|
+
let W = c(() => A ? { runtime: { sources: { [A]: N } } } : f, [A, N]);
|
|
154
104
|
return /* @__PURE__ */ m(n, {
|
|
155
105
|
ref: e,
|
|
156
106
|
className: h("plitzi-component__dialog-container", v),
|
|
157
|
-
interactionTriggers:
|
|
158
|
-
interactionCallbacks:
|
|
107
|
+
interactionTriggers: i.triggers,
|
|
108
|
+
interactionCallbacks: H,
|
|
159
109
|
children: [/* @__PURE__ */ p("div", {
|
|
160
110
|
className: h("dialog-container__background", D.backgroundContainer),
|
|
161
111
|
onClick: z
|
|
@@ -178,7 +128,7 @@ var v = ({ ref: e, className: v = "", children: y, headerLabel: b = "Dialog Head
|
|
|
178
128
|
children: /* @__PURE__ */ p(d, {
|
|
179
129
|
inherit: "live",
|
|
180
130
|
name: `Dialog:${T}`,
|
|
181
|
-
value:
|
|
131
|
+
value: W,
|
|
182
132
|
children: y
|
|
183
133
|
})
|
|
184
134
|
}),
|
|
@@ -6,5 +6,5 @@ type SettingsProps = {
|
|
|
6
6
|
autoHideAfterClick?: boolean;
|
|
7
7
|
onUpdate?: (key: string, value: string | boolean | number) => void;
|
|
8
8
|
};
|
|
9
|
-
declare const Settings: ({ acceptButtonLabel, acceptButtonLabelLoading, rejectButtonLabel, headerLabel, autoHideAfterClick, onUpdate }: SettingsProps) => import(
|
|
9
|
+
declare const Settings: ({ acceptButtonLabel, acceptButtonLabelLoading, rejectButtonLabel, headerLabel, autoHideAfterClick, onUpdate }: SettingsProps) => import('react').JSX.Element;
|
|
10
10
|
export default Settings;
|
|
@@ -5,6 +5,87 @@ export type DialogContainerAttributes = AuthorableAttributes<DialogContainerProp
|
|
|
5
5
|
declare const declaration: {
|
|
6
6
|
readonly type: "dialogContainer";
|
|
7
7
|
readonly sourceType: "dialogContainer";
|
|
8
|
+
readonly triggers: {
|
|
9
|
+
readonly onDialogAccept: {
|
|
10
|
+
readonly action: "onDialogAccept";
|
|
11
|
+
readonly title: "On Dialog Accept";
|
|
12
|
+
readonly type: "trigger";
|
|
13
|
+
readonly params: {
|
|
14
|
+
readonly metadata: {
|
|
15
|
+
readonly type: "text";
|
|
16
|
+
readonly defaultValue: "";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly preview: {
|
|
20
|
+
readonly metadata: "";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly onDialogReject: {
|
|
24
|
+
readonly action: "onDialogReject";
|
|
25
|
+
readonly title: "On Dialog Reject";
|
|
26
|
+
readonly type: "trigger";
|
|
27
|
+
readonly params: {
|
|
28
|
+
readonly metadata: {
|
|
29
|
+
readonly type: "text";
|
|
30
|
+
readonly defaultValue: "";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly preview: {
|
|
34
|
+
readonly metadata: "";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly onDialogOpen: {
|
|
38
|
+
readonly action: "onDialogOpen";
|
|
39
|
+
readonly title: "On Dialog Open";
|
|
40
|
+
readonly type: "trigger";
|
|
41
|
+
readonly params: {
|
|
42
|
+
readonly metadata: {
|
|
43
|
+
readonly type: "text";
|
|
44
|
+
readonly defaultValue: "";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly preview: {
|
|
48
|
+
readonly metadata: "";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly onDialogClose: {
|
|
52
|
+
readonly action: "onDialogClose";
|
|
53
|
+
readonly title: "On Dialog Close";
|
|
54
|
+
readonly type: "trigger";
|
|
55
|
+
readonly params: {
|
|
56
|
+
readonly metadata: {
|
|
57
|
+
readonly type: "text";
|
|
58
|
+
readonly defaultValue: "";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly preview: {
|
|
62
|
+
readonly metadata: "";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly callbacks: {
|
|
67
|
+
readonly openDialog: {
|
|
68
|
+
readonly action: "openDialog";
|
|
69
|
+
readonly title: "Open Dialog";
|
|
70
|
+
readonly type: "callback";
|
|
71
|
+
readonly params: {
|
|
72
|
+
readonly metadata: {
|
|
73
|
+
readonly type: "text";
|
|
74
|
+
readonly defaultValue: "";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
readonly preview: {
|
|
78
|
+
readonly metadata: "";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly closeDialog: {
|
|
82
|
+
readonly action: "closeDialog";
|
|
83
|
+
readonly title: "Close Dialog";
|
|
84
|
+
readonly type: "callback";
|
|
85
|
+
readonly preview: {};
|
|
86
|
+
readonly params: {};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
8
89
|
readonly content: {
|
|
9
90
|
readonly attributes: {
|
|
10
91
|
readonly headerLabel: "Dialog Header";
|
|
@@ -86,7 +167,7 @@ declare const declaration: {
|
|
|
86
167
|
readonly left: "50%";
|
|
87
168
|
readonly width: "500px";
|
|
88
169
|
readonly height: "300px";
|
|
89
|
-
readonly 'background-color': "white";
|
|
170
|
+
readonly 'background-color': "light-dark(white, oklch(0.21 0.006 285.885))";
|
|
90
171
|
readonly transform: "translate3d(-50%, -50%, 0px)";
|
|
91
172
|
readonly 'padding-top': "20px";
|
|
92
173
|
readonly 'padding-bottom': "20px";
|
|
@@ -3,6 +3,67 @@ import { elementDeclaration as e } from "@plitzi/sdk-shared/authoring/declare";
|
|
|
3
3
|
var t = e()({
|
|
4
4
|
type: "dialogContainer",
|
|
5
5
|
sourceType: "dialogContainer",
|
|
6
|
+
triggers: {
|
|
7
|
+
onDialogAccept: {
|
|
8
|
+
action: "onDialogAccept",
|
|
9
|
+
title: "On Dialog Accept",
|
|
10
|
+
type: "trigger",
|
|
11
|
+
params: { metadata: {
|
|
12
|
+
type: "text",
|
|
13
|
+
defaultValue: ""
|
|
14
|
+
} },
|
|
15
|
+
preview: { metadata: "" }
|
|
16
|
+
},
|
|
17
|
+
onDialogReject: {
|
|
18
|
+
action: "onDialogReject",
|
|
19
|
+
title: "On Dialog Reject",
|
|
20
|
+
type: "trigger",
|
|
21
|
+
params: { metadata: {
|
|
22
|
+
type: "text",
|
|
23
|
+
defaultValue: ""
|
|
24
|
+
} },
|
|
25
|
+
preview: { metadata: "" }
|
|
26
|
+
},
|
|
27
|
+
onDialogOpen: {
|
|
28
|
+
action: "onDialogOpen",
|
|
29
|
+
title: "On Dialog Open",
|
|
30
|
+
type: "trigger",
|
|
31
|
+
params: { metadata: {
|
|
32
|
+
type: "text",
|
|
33
|
+
defaultValue: ""
|
|
34
|
+
} },
|
|
35
|
+
preview: { metadata: "" }
|
|
36
|
+
},
|
|
37
|
+
onDialogClose: {
|
|
38
|
+
action: "onDialogClose",
|
|
39
|
+
title: "On Dialog Close",
|
|
40
|
+
type: "trigger",
|
|
41
|
+
params: { metadata: {
|
|
42
|
+
type: "text",
|
|
43
|
+
defaultValue: ""
|
|
44
|
+
} },
|
|
45
|
+
preview: { metadata: "" }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
callbacks: {
|
|
49
|
+
openDialog: {
|
|
50
|
+
action: "openDialog",
|
|
51
|
+
title: "Open Dialog",
|
|
52
|
+
type: "callback",
|
|
53
|
+
params: { metadata: {
|
|
54
|
+
type: "text",
|
|
55
|
+
defaultValue: ""
|
|
56
|
+
} },
|
|
57
|
+
preview: { metadata: "" }
|
|
58
|
+
},
|
|
59
|
+
closeDialog: {
|
|
60
|
+
action: "closeDialog",
|
|
61
|
+
title: "Close Dialog",
|
|
62
|
+
type: "callback",
|
|
63
|
+
preview: {},
|
|
64
|
+
params: {}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
6
67
|
content: {
|
|
7
68
|
attributes: {
|
|
8
69
|
headerLabel: "Dialog Header",
|
|
@@ -77,7 +138,7 @@ var t = e()({
|
|
|
77
138
|
left: "50%",
|
|
78
139
|
width: "500px",
|
|
79
140
|
height: "300px",
|
|
80
|
-
"background-color": "white",
|
|
141
|
+
"background-color": "light-dark(white, oklch(0.21 0.006 285.885))",
|
|
81
142
|
transform: "translate3d(-50%, -50%, 0px)",
|
|
82
143
|
"padding-top": "20px",
|
|
83
144
|
"padding-bottom": "20px",
|
|
@@ -1,9 +1,90 @@
|
|
|
1
1
|
declare const DialogContainer: {
|
|
2
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./DialogContainer').DialogContainerProps>): import(
|
|
2
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./DialogContainer').DialogContainerProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "dialogContainer";
|
|
6
6
|
readonly sourceType: "dialogContainer";
|
|
7
|
+
readonly triggers: {
|
|
8
|
+
readonly onDialogAccept: {
|
|
9
|
+
readonly action: "onDialogAccept";
|
|
10
|
+
readonly title: "On Dialog Accept";
|
|
11
|
+
readonly type: "trigger";
|
|
12
|
+
readonly params: {
|
|
13
|
+
readonly metadata: {
|
|
14
|
+
readonly type: "text";
|
|
15
|
+
readonly defaultValue: "";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly preview: {
|
|
19
|
+
readonly metadata: "";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
readonly onDialogReject: {
|
|
23
|
+
readonly action: "onDialogReject";
|
|
24
|
+
readonly title: "On Dialog Reject";
|
|
25
|
+
readonly type: "trigger";
|
|
26
|
+
readonly params: {
|
|
27
|
+
readonly metadata: {
|
|
28
|
+
readonly type: "text";
|
|
29
|
+
readonly defaultValue: "";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
readonly preview: {
|
|
33
|
+
readonly metadata: "";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly onDialogOpen: {
|
|
37
|
+
readonly action: "onDialogOpen";
|
|
38
|
+
readonly title: "On Dialog Open";
|
|
39
|
+
readonly type: "trigger";
|
|
40
|
+
readonly params: {
|
|
41
|
+
readonly metadata: {
|
|
42
|
+
readonly type: "text";
|
|
43
|
+
readonly defaultValue: "";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly preview: {
|
|
47
|
+
readonly metadata: "";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
readonly onDialogClose: {
|
|
51
|
+
readonly action: "onDialogClose";
|
|
52
|
+
readonly title: "On Dialog Close";
|
|
53
|
+
readonly type: "trigger";
|
|
54
|
+
readonly params: {
|
|
55
|
+
readonly metadata: {
|
|
56
|
+
readonly type: "text";
|
|
57
|
+
readonly defaultValue: "";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly preview: {
|
|
61
|
+
readonly metadata: "";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly callbacks: {
|
|
66
|
+
readonly openDialog: {
|
|
67
|
+
readonly action: "openDialog";
|
|
68
|
+
readonly title: "Open Dialog";
|
|
69
|
+
readonly type: "callback";
|
|
70
|
+
readonly params: {
|
|
71
|
+
readonly metadata: {
|
|
72
|
+
readonly type: "text";
|
|
73
|
+
readonly defaultValue: "";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly preview: {
|
|
77
|
+
readonly metadata: "";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
readonly closeDialog: {
|
|
81
|
+
readonly action: "closeDialog";
|
|
82
|
+
readonly title: "Close Dialog";
|
|
83
|
+
readonly type: "callback";
|
|
84
|
+
readonly preview: {};
|
|
85
|
+
readonly params: {};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
7
88
|
readonly content: {
|
|
8
89
|
readonly attributes: {
|
|
9
90
|
readonly headerLabel: "Dialog Header";
|
|
@@ -85,7 +166,7 @@ declare const DialogContainer: {
|
|
|
85
166
|
readonly left: "50%";
|
|
86
167
|
readonly width: "500px";
|
|
87
168
|
readonly height: "300px";
|
|
88
|
-
readonly 'background-color': "white";
|
|
169
|
+
readonly 'background-color': "light-dark(white, oklch(0.21 0.006 285.885))";
|
|
89
170
|
readonly transform: "translate3d(-50%, -50%, 0px)";
|
|
90
171
|
readonly 'padding-top': "20px";
|
|
91
172
|
readonly 'padding-bottom': "20px";
|
|
@@ -7,9 +7,9 @@ export type ListProps<T = unknown> = {
|
|
|
7
7
|
items?: T[];
|
|
8
8
|
source?: 'none' | 'controlled';
|
|
9
9
|
};
|
|
10
|
-
declare const List: ({ ref, className, subType, children, items, source }: ListProps) => import(
|
|
10
|
+
declare const List: ({ ref, className, subType, children, items, source }: ListProps) => import('react').JSX.Element;
|
|
11
11
|
declare const _default: {
|
|
12
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<ListProps<unknown>>): import(
|
|
12
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<ListProps<unknown>>): import('react').JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
|
@@ -4,9 +4,9 @@ export type ListItemProps = {
|
|
|
4
4
|
className: string;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
};
|
|
7
|
-
declare const ListItem: ({ ref, className, children }: ListItemProps) => import(
|
|
7
|
+
declare const ListItem: ({ ref, className, children }: ListItemProps) => import('react').JSX.Element;
|
|
8
8
|
declare const _default: {
|
|
9
|
-
(props: import('../../../../Element/hocs/withElement').WithElementProps<ListItemProps>): import(
|
|
9
|
+
(props: import('../../../../Element/hocs/withElement').WithElementProps<ListItemProps>): import('react').JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Settings: () => import(
|
|
1
|
+
declare const Settings: () => import('react').JSX.Element;
|
|
2
2
|
export default Settings;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const ListItem: {
|
|
2
|
-
(props: import('../../../../Element/hocs/withElement').WithElementProps<import('./ListItem').ListItemProps>): import(
|
|
2
|
+
(props: import('../../../../Element/hocs/withElement').WithElementProps<import('./ListItem').ListItemProps>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
readonly type: "listItem";
|
|
@@ -3,5 +3,5 @@ type SettingsProps = {
|
|
|
3
3
|
source?: 'none' | 'controlled';
|
|
4
4
|
onUpdate?: (key: string, value: string | boolean | number) => void;
|
|
5
5
|
};
|
|
6
|
-
declare const Settings: ({ subType, source, onUpdate }: SettingsProps) => import(
|
|
6
|
+
declare const Settings: ({ subType, source, onUpdate }: SettingsProps) => import('react').JSX.Element;
|
|
7
7
|
export default Settings;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare const List: {
|
|
2
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./List').ListProps<unknown>>): import(
|
|
2
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./List').ListProps<unknown>>): import('react').JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
5
|
plugins: {
|
|
6
6
|
listItem: {
|
|
7
|
-
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./ListItem/ListItem').ListItemProps>): import(
|
|
7
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./ListItem/ListItem').ListItemProps>): import('react').JSX.Element;
|
|
8
8
|
displayName: string;
|
|
9
9
|
} & {
|
|
10
10
|
readonly type: "listItem";
|
|
@@ -5,5 +5,5 @@ export type ListBasicProps = {
|
|
|
5
5
|
subType?: 'ul' | 'ol';
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
};
|
|
8
|
-
declare const ListBasic: ({ ref, className, subType, children }: ListBasicProps) => import(
|
|
8
|
+
declare const ListBasic: ({ ref, className, subType, children }: ListBasicProps) => import('react').JSX.Element;
|
|
9
9
|
export default ListBasic;
|