@plitzi/sdk-elements 0.32.25 → 0.33.0
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 +17 -0
- package/dist/Element/ElementContext.d.ts +7 -0
- package/dist/Element/helpers/isVisible.d.ts +1 -0
- package/dist/Element/helpers/isVisible.mjs +4 -0
- package/dist/Element/hocs/withElement.mjs +86 -78
- package/dist/Element/hooks/useInternalClassName.mjs +21 -20
- package/dist/Element/hooks/useInternalItems.mjs +1 -1
- package/dist/Element/hooks/useRscData.d.ts +4 -3
- package/dist/Element/hooks/useRscData.mjs +15 -10
- package/dist/dataSource/GlobalSources.d.ts +1 -2
- package/dist/dataSource/GlobalSources.mjs +46 -62
- package/dist/elements/advanced/BlockJsx/BlockJsx.mjs +1 -1
- package/dist/elements/basic/Link/Link.mjs +47 -41
- package/dist/elements/basic/RichText/RichText.d.ts +20 -0
- package/dist/elements/basic/RichText/RichText.mjs +30 -0
- package/dist/elements/basic/RichText/Settings.d.ts +7 -0
- package/dist/elements/basic/RichText/Settings.mjs +51 -0
- package/dist/elements/{provider/CollectionContainer → basic/RichText}/index.d.ts +6 -7
- package/dist/elements/{provider/CollectionContainer → basic/RichText}/index.mjs +12 -13
- package/dist/elements/basic/RichText/sanitizeHtml.d.ts +21 -0
- package/dist/elements/basic/RichText/sanitizeHtml.mjs +8 -0
- package/dist/elements/form/FormControl/index.mjs +1 -1
- package/dist/elements/index.d.ts +5 -3
- package/dist/elements/index.mjs +30 -28
- package/dist/elements/internal/Page/Page.mjs +28 -26
- package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +28 -1
- package/dist/elements/provider/ApiContainer/ApiContainer.mjs +201 -86
- package/dist/elements/provider/ApiContainer/Settings.d.ts +15 -3
- package/dist/elements/provider/ApiContainer/Settings.mjs +209 -92
- package/dist/elements/provider/ApiContainer/components/FiltersInput/FiltersInput.d.ts +22 -0
- package/dist/elements/provider/ApiContainer/components/FiltersInput/FiltersInput.mjs +75 -0
- package/dist/elements/provider/ApiContainer/components/FiltersInput/index.d.ts +3 -0
- package/dist/elements/provider/ApiContainer/components/FiltersInput/index.mjs +5 -0
- package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.d.ts +31 -0
- package/dist/elements/provider/ApiContainer/hooks/useProviderPagination.mjs +51 -0
- package/dist/elements/provider/ApiContainer/hooks/useProviderWrite.d.ts +26 -0
- package/dist/elements/provider/ApiContainer/hooks/useProviderWrite.mjs +27 -0
- package/dist/elements/provider/ApiContainer/index.d.ts +8 -0
- package/dist/elements/provider/ApiContainer/index.mjs +9 -1
- package/dist/elements/settings.mjs +32 -30
- package/dist/elements/structure/Pagination/Pagination.d.ts +41 -0
- package/dist/elements/structure/Pagination/Pagination.mjs +83 -0
- package/dist/elements/structure/Pagination/Settings.d.ts +12 -0
- package/dist/elements/structure/Pagination/Settings.mjs +85 -0
- package/dist/elements/structure/Pagination/buildPageWindow.d.ts +9 -0
- package/dist/elements/structure/Pagination/buildPageWindow.mjs +8 -0
- package/dist/elements/structure/Pagination/index.d.ts +67 -0
- package/dist/elements/structure/Pagination/index.mjs +59 -0
- package/dist/index.d.ts +130 -57
- package/dist/index.mjs +32 -30
- package/package.json +76 -32
- package/dist/elements/internal/Page/helpers/UserHelper.d.ts +0 -4
- package/dist/elements/provider/CollectionContainer/CollectionContainer.d.ts +0 -18
- package/dist/elements/provider/CollectionContainer/CollectionContainer.mjs +0 -69
- package/dist/elements/provider/CollectionContainer/CollectionContainer.stories-pending.d.ts +0 -1
- package/dist/elements/provider/CollectionContainer/Settings.d.ts +0 -10
- package/dist/elements/provider/CollectionContainer/Settings.mjs +0 -74
- package/dist/elements/provider/CollectionContainer/hooks/useCollectionContext.d.ts +0 -19
- package/dist/elements/provider/CollectionContainer/hooks/useCollectionContext.mjs +0 -71
|
@@ -11,58 +11,60 @@ import l from "./basic/Heading/Settings.mjs";
|
|
|
11
11
|
import u from "./basic/Link/Settings.mjs";
|
|
12
12
|
import d from "./basic/Markdown/Settings.mjs";
|
|
13
13
|
import f from "./basic/Paragraph/Settings.mjs";
|
|
14
|
-
import p from "./basic/
|
|
15
|
-
import m from "./
|
|
16
|
-
import h from "./form/
|
|
17
|
-
import g from "./
|
|
18
|
-
import _ from "./internal/
|
|
19
|
-
import v from "./
|
|
20
|
-
import y from "./media/
|
|
21
|
-
import b from "./media/
|
|
22
|
-
import x from "./
|
|
23
|
-
import S from "./provider/
|
|
14
|
+
import p from "./basic/RichText/Settings.mjs";
|
|
15
|
+
import m from "./basic/Text/Settings.mjs";
|
|
16
|
+
import h from "./form/Form/Settings.mjs";
|
|
17
|
+
import g from "./form/FormControl/Settings.mjs";
|
|
18
|
+
import _ from "./internal/LayoutContainer/Settings.mjs";
|
|
19
|
+
import v from "./internal/Page/Settings.mjs";
|
|
20
|
+
import y from "./media/FontAwesome/Settings.mjs";
|
|
21
|
+
import b from "./media/Image/Settings.mjs";
|
|
22
|
+
import x from "./media/Video/Settings.mjs";
|
|
23
|
+
import S from "./provider/ApiContainer/Settings.mjs";
|
|
24
24
|
import C from "./structure/Container/Settings.mjs";
|
|
25
25
|
import w from "./structure/DialogContainer/Settings.mjs";
|
|
26
26
|
import T from "./structure/List/ListItem/Settings.mjs";
|
|
27
27
|
import E from "./structure/List/Settings.mjs";
|
|
28
28
|
import D from "./structure/ModalContainer/Settings.mjs";
|
|
29
|
-
import O from "./structure/
|
|
30
|
-
import k from "./structure/TabContainer/
|
|
31
|
-
import A from "./structure/TabContainer/
|
|
32
|
-
import j from "./structure/TabContainer/
|
|
29
|
+
import O from "./structure/Pagination/Settings.mjs";
|
|
30
|
+
import k from "./structure/TabContainer/Settings.mjs";
|
|
31
|
+
import A from "./structure/TabContainer/TabContainerBody/Settings.mjs";
|
|
32
|
+
import j from "./structure/TabContainer/TabContainerHeader/Settings.mjs";
|
|
33
|
+
import M from "./structure/TabContainer/TabContainerItem/Settings.mjs";
|
|
33
34
|
//#region src/elements/settings.ts
|
|
34
|
-
var
|
|
35
|
+
var N = /* @__PURE__ */ e({ defaultElementsSettings: () => P }), P = {
|
|
35
36
|
dropdown: c,
|
|
36
37
|
plitziSdk: a,
|
|
37
38
|
custom: r,
|
|
38
39
|
reference: o,
|
|
39
40
|
blockHtml: t,
|
|
40
41
|
blockJsx: n,
|
|
41
|
-
page:
|
|
42
|
+
page: v,
|
|
42
43
|
container: C,
|
|
43
|
-
layoutContainer:
|
|
44
|
+
layoutContainer: _,
|
|
44
45
|
dialogContainer: w,
|
|
45
46
|
modalContainer: D,
|
|
46
|
-
tabContainer:
|
|
47
|
-
tabContainerBody:
|
|
48
|
-
tabContainerheader:
|
|
49
|
-
tabContainerItem:
|
|
47
|
+
tabContainer: k,
|
|
48
|
+
tabContainerBody: A,
|
|
49
|
+
tabContainerheader: j,
|
|
50
|
+
tabContainerItem: M,
|
|
50
51
|
heading: l,
|
|
51
|
-
image:
|
|
52
|
-
video:
|
|
53
|
-
fontAwesome:
|
|
52
|
+
image: b,
|
|
53
|
+
video: x,
|
|
54
|
+
fontAwesome: y,
|
|
54
55
|
button: s,
|
|
55
56
|
paragraph: f,
|
|
56
|
-
text:
|
|
57
|
+
text: m,
|
|
57
58
|
markdown: d,
|
|
59
|
+
richText: p,
|
|
60
|
+
pagination: O,
|
|
58
61
|
nodeHtml: i,
|
|
59
62
|
list: E,
|
|
60
63
|
listItem: T,
|
|
61
64
|
link: u,
|
|
62
|
-
form:
|
|
63
|
-
formControl:
|
|
64
|
-
apiContainer:
|
|
65
|
-
collectionContainer: S
|
|
65
|
+
form: h,
|
|
66
|
+
formControl: g,
|
|
67
|
+
apiContainer: S
|
|
66
68
|
};
|
|
67
69
|
//#endregion
|
|
68
|
-
export {
|
|
70
|
+
export { P as defaultElementsSettings, N as settings_exports };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
export type PaginationPageInfo = {
|
|
3
|
+
hasPrevPage?: boolean;
|
|
4
|
+
hasNextPage?: boolean;
|
|
5
|
+
page?: number;
|
|
6
|
+
pageCount?: number;
|
|
7
|
+
total?: number;
|
|
8
|
+
};
|
|
9
|
+
export type PaginationProps = {
|
|
10
|
+
ref?: RefObject<HTMLElement>;
|
|
11
|
+
className?: string;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/** Bound from a provider: `{{apiContainer_posts.pageInfo}}`. Everything rendered here comes out of it. */
|
|
14
|
+
pageInfo?: PaginationPageInfo;
|
|
15
|
+
/** `pages` renders a numbered pager; `loadMore` renders a single button for an accumulating list. */
|
|
16
|
+
mode?: 'pages' | 'loadMore';
|
|
17
|
+
/** Query-string key to write in URL mode. Must match the provider's own page parameter. */
|
|
18
|
+
pageParam?: string;
|
|
19
|
+
/** With `url`, the pager navigates on its own. With `interaction`, it only fires `onPageChange` and the author
|
|
20
|
+
* wires it to the provider's `loadMore` / `goToPage` callback. */
|
|
21
|
+
target?: 'url' | 'interaction';
|
|
22
|
+
/** How many numbered pages to show around the current one. */
|
|
23
|
+
windowSize?: number;
|
|
24
|
+
previousLabel?: string;
|
|
25
|
+
nextLabel?: string;
|
|
26
|
+
loadMoreLabel?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Renders a pager over any `pageInfo`-shaped source.
|
|
30
|
+
*
|
|
31
|
+
* It never talks to a provider directly, which is what keeps it reusable: in URL mode it only navigates, and in
|
|
32
|
+
* interaction mode it only announces the page the visitor asked for. A plugin that publishes the same shape gets a
|
|
33
|
+
* working pager for free.
|
|
34
|
+
*/
|
|
35
|
+
declare const Pagination: ({ ref, className, children, pageInfo, mode, pageParam, target, windowSize, previousLabel, nextLabel, loadMoreLabel }: PaginationProps) => import("react").JSX.Element;
|
|
36
|
+
declare const _default: {
|
|
37
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<PaginationProps>): import("react").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
export default _default;
|
|
41
|
+
export { Pagination };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import e from "../../../Element/hooks/useElement.mjs";
|
|
2
|
+
import { RootElement as t } from "../../../Element/RootElement.mjs";
|
|
3
|
+
import n from "./buildPageWindow.mjs";
|
|
4
|
+
import r from "../../../Element/hocs/withElement.mjs";
|
|
5
|
+
import { use as i, useCallback as a, useMemo as o } from "react";
|
|
6
|
+
import s from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
|
|
7
|
+
import { useSdkStore as c } from "@plitzi/sdk-shared/store";
|
|
8
|
+
import { emptyObject as l } from "@plitzi/sdk-shared/helpers/utils";
|
|
9
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import p from "clsx";
|
|
11
|
+
//#region src/elements/structure/Pagination/Pagination.tsx
|
|
12
|
+
var m = (e, t) => {
|
|
13
|
+
if (typeof window > "u") return "";
|
|
14
|
+
let n = new URL(window.location.href);
|
|
15
|
+
return t <= 1 ? n.searchParams.delete(e) : n.searchParams.set(e, String(t)), `${n.pathname}${n.search}`;
|
|
16
|
+
}, h = ({ ref: r, className: h = "", children: g, pageInfo: _ = l, mode: v = "pages", pageParam: y = "page", target: b = "url", windowSize: x = 5, previousLabel: S = "Previous", nextLabel: C = "Next", loadMoreLabel: w = "Load more" }) => {
|
|
17
|
+
let { idRef: T } = e(), { settings: { previewMode: E }, contexts: { InteractionsContext: D } } = s(), { interactionsManager: O } = i(D), [k] = c("navigation.navigate"), A = _.page ?? 1, j = _.pageCount ?? 0, M = _.hasPrevPage ?? A > 1, N = _.hasNextPage ?? !1, P = o(() => n(A, j, x), [
|
|
18
|
+
A,
|
|
19
|
+
j,
|
|
20
|
+
x
|
|
21
|
+
]), F = a((e) => {
|
|
22
|
+
let t = Math.max(e, 1);
|
|
23
|
+
T && O.interactionTrigger(T, "onPageChange", { page: t }), b === "url" && k(m(y, t));
|
|
24
|
+
}, [
|
|
25
|
+
T,
|
|
26
|
+
O,
|
|
27
|
+
b,
|
|
28
|
+
k,
|
|
29
|
+
y
|
|
30
|
+
]), I = a((e) => (t) => {
|
|
31
|
+
t.preventDefault(), F(e);
|
|
32
|
+
}, [F]), L = o(() => ({ onPageChange: {
|
|
33
|
+
action: "onPageChange",
|
|
34
|
+
title: "On Page Change",
|
|
35
|
+
type: "trigger",
|
|
36
|
+
params: {},
|
|
37
|
+
preview: { page: "1" }
|
|
38
|
+
} }), []), R = j === 0 && !N && !M;
|
|
39
|
+
return /* @__PURE__ */ f(t, {
|
|
40
|
+
ref: r,
|
|
41
|
+
tag: "nav",
|
|
42
|
+
className: p("plitzi-component__pagination", h),
|
|
43
|
+
interactionTriggers: L,
|
|
44
|
+
children: [
|
|
45
|
+
v === "loadMore" && /* @__PURE__ */ d("button", {
|
|
46
|
+
type: "button",
|
|
47
|
+
className: "plitzi-component__pagination-more",
|
|
48
|
+
disabled: !N && E,
|
|
49
|
+
onClick: I(A + 1),
|
|
50
|
+
children: w
|
|
51
|
+
}),
|
|
52
|
+
v === "pages" && /* @__PURE__ */ f(u, { children: [
|
|
53
|
+
/* @__PURE__ */ d("button", {
|
|
54
|
+
type: "button",
|
|
55
|
+
className: "plitzi-component__pagination-prev",
|
|
56
|
+
disabled: !M && E,
|
|
57
|
+
onClick: I(A - 1),
|
|
58
|
+
children: S
|
|
59
|
+
}),
|
|
60
|
+
P.map((e) => /* @__PURE__ */ d("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
className: p("plitzi-component__pagination-page", { "plitzi-component__pagination-page--current": e === A }),
|
|
63
|
+
onClick: I(e),
|
|
64
|
+
children: e
|
|
65
|
+
}, e)),
|
|
66
|
+
/* @__PURE__ */ d("button", {
|
|
67
|
+
type: "button",
|
|
68
|
+
className: "plitzi-component__pagination-next",
|
|
69
|
+
disabled: !N && E,
|
|
70
|
+
onClick: I(A + 1),
|
|
71
|
+
children: C
|
|
72
|
+
})
|
|
73
|
+
] }),
|
|
74
|
+
!E && R && /* @__PURE__ */ d("span", {
|
|
75
|
+
className: "plitzi-component__pagination-hint",
|
|
76
|
+
children: "Bind pageInfo"
|
|
77
|
+
}),
|
|
78
|
+
g
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
}, g = r(h);
|
|
82
|
+
//#endregion
|
|
83
|
+
export { h as Pagination, g as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type SettingsProps = {
|
|
2
|
+
mode?: 'pages' | 'loadMore';
|
|
3
|
+
target?: 'url' | 'interaction';
|
|
4
|
+
pageParam?: string;
|
|
5
|
+
windowSize?: string;
|
|
6
|
+
previousLabel?: string;
|
|
7
|
+
nextLabel?: string;
|
|
8
|
+
loadMoreLabel?: string;
|
|
9
|
+
onUpdate?: (key: string, value: string | boolean | number | object) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const Settings: ({ mode, target, pageParam, windowSize, previousLabel, nextLabel, loadMoreLabel, onUpdate }: SettingsProps) => import("react").JSX.Element;
|
|
12
|
+
export default Settings;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import i from "@plitzi/plitzi-ui/Input";
|
|
4
|
+
import a from "@plitzi/plitzi-ui/Select";
|
|
5
|
+
//#region src/elements/structure/Pagination/Settings.tsx
|
|
6
|
+
var o = ({ mode: o = "pages", target: s = "url", pageParam: c = "page", windowSize: l = "5", previousLabel: u = "Previous", nextLabel: d = "Next", loadMoreLabel: f = "Load more", onUpdate: p }) => {
|
|
7
|
+
let m = e((e) => (t) => p?.(e, t), [p]);
|
|
8
|
+
return /* @__PURE__ */ r("div", {
|
|
9
|
+
className: "flex grow flex-col gap-4 py-2",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ r(a, {
|
|
12
|
+
value: o,
|
|
13
|
+
label: "Mode",
|
|
14
|
+
onChange: m("mode"),
|
|
15
|
+
size: "xs",
|
|
16
|
+
children: [/* @__PURE__ */ n("option", {
|
|
17
|
+
value: "pages",
|
|
18
|
+
children: "Numbered pages"
|
|
19
|
+
}), /* @__PURE__ */ n("option", {
|
|
20
|
+
value: "loadMore",
|
|
21
|
+
children: "Load more"
|
|
22
|
+
})]
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ r(a, {
|
|
25
|
+
value: s,
|
|
26
|
+
label: "On Page Change",
|
|
27
|
+
onChange: m("target"),
|
|
28
|
+
size: "xs",
|
|
29
|
+
children: [/* @__PURE__ */ n("option", {
|
|
30
|
+
value: "url",
|
|
31
|
+
children: "Update the URL"
|
|
32
|
+
}), /* @__PURE__ */ n("option", {
|
|
33
|
+
value: "interaction",
|
|
34
|
+
children: "Only fire the trigger"
|
|
35
|
+
})]
|
|
36
|
+
}),
|
|
37
|
+
s === "url" && /* @__PURE__ */ n(i, {
|
|
38
|
+
value: c,
|
|
39
|
+
label: "Page parameter",
|
|
40
|
+
title: "Must match the page parameter of the provider this pager belongs to.",
|
|
41
|
+
onChange: m("pageParam"),
|
|
42
|
+
size: "xs"
|
|
43
|
+
}),
|
|
44
|
+
o === "pages" && /* @__PURE__ */ r(t, { children: [
|
|
45
|
+
/* @__PURE__ */ n(i, {
|
|
46
|
+
value: l,
|
|
47
|
+
label: "Pages shown",
|
|
48
|
+
onChange: m("windowSize"),
|
|
49
|
+
size: "xs"
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ n(i, {
|
|
52
|
+
value: u,
|
|
53
|
+
label: "Previous label",
|
|
54
|
+
onChange: m("previousLabel"),
|
|
55
|
+
size: "xs"
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ n(i, {
|
|
58
|
+
value: d,
|
|
59
|
+
label: "Next label",
|
|
60
|
+
onChange: m("nextLabel"),
|
|
61
|
+
size: "xs"
|
|
62
|
+
})
|
|
63
|
+
] }),
|
|
64
|
+
o === "loadMore" && /* @__PURE__ */ n(i, {
|
|
65
|
+
value: f,
|
|
66
|
+
label: "Button label",
|
|
67
|
+
onChange: m("loadMoreLabel"),
|
|
68
|
+
size: "xs"
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ r("span", {
|
|
71
|
+
className: "text-xs text-gray-500",
|
|
72
|
+
children: [
|
|
73
|
+
"Bind ",
|
|
74
|
+
/* @__PURE__ */ n("strong", { children: "pageInfo" }),
|
|
75
|
+
" to your provider's page info, for example",
|
|
76
|
+
" ",
|
|
77
|
+
/* @__PURE__ */ n("code", { children: "apiContainer_posts.pageInfo" }),
|
|
78
|
+
"."
|
|
79
|
+
]
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
//#endregion
|
|
85
|
+
export { o as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The run of page numbers to show around the current page.
|
|
3
|
+
*
|
|
4
|
+
* A provider that reports no total has no page count, and a numbered pager cannot be invented from that — the
|
|
5
|
+
* window is empty and prev/next carry the whole interaction. That is the honest rendering of "we know there is
|
|
6
|
+
* more, we do not know how much".
|
|
7
|
+
*/
|
|
8
|
+
declare const buildPageWindow: (page: number, pageCount: number, windowSize: number) => number[];
|
|
9
|
+
export default buildPageWindow;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/elements/structure/Pagination/buildPageWindow.ts
|
|
2
|
+
var e = (e, t, n) => {
|
|
3
|
+
if (t <= 0 || n <= 0) return [];
|
|
4
|
+
let r = Math.min(n, t), i = Math.min(Math.max(e - Math.floor(r / 2), 1), t - r + 1);
|
|
5
|
+
return Array.from({ length: r }, (e, t) => i + t);
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { e as default };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
declare const Pagination: {
|
|
2
|
+
(props: import('../../../Element/hocs/withElement').WithElementProps<import('./Pagination').PaginationProps>): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
} & {
|
|
5
|
+
type: string;
|
|
6
|
+
content: {
|
|
7
|
+
attributes: {
|
|
8
|
+
pageInfo: {};
|
|
9
|
+
mode: string;
|
|
10
|
+
target: string;
|
|
11
|
+
pageParam: string;
|
|
12
|
+
windowSize: number;
|
|
13
|
+
previousLabel: string;
|
|
14
|
+
nextLabel: string;
|
|
15
|
+
loadMoreLabel: string;
|
|
16
|
+
};
|
|
17
|
+
definition: {
|
|
18
|
+
label: string;
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
items: never[];
|
|
22
|
+
bindings: {};
|
|
23
|
+
styleSelectors: {
|
|
24
|
+
base: string;
|
|
25
|
+
};
|
|
26
|
+
initialState: {
|
|
27
|
+
visibility: boolean;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
builder: {
|
|
31
|
+
canDelete: boolean;
|
|
32
|
+
canSelect: boolean;
|
|
33
|
+
canDragDrop: boolean;
|
|
34
|
+
canMove: boolean;
|
|
35
|
+
canTemplate: boolean;
|
|
36
|
+
itemsAllowed: never[];
|
|
37
|
+
itemsNotAllowed: never[];
|
|
38
|
+
};
|
|
39
|
+
market: {
|
|
40
|
+
category: string;
|
|
41
|
+
owner: string;
|
|
42
|
+
verified: boolean;
|
|
43
|
+
license: string;
|
|
44
|
+
website: string;
|
|
45
|
+
backgroundColor: string;
|
|
46
|
+
icon: string;
|
|
47
|
+
};
|
|
48
|
+
defaultStyle: {
|
|
49
|
+
name: string;
|
|
50
|
+
displayMode: string;
|
|
51
|
+
style: {
|
|
52
|
+
base: {
|
|
53
|
+
default: {
|
|
54
|
+
display: string;
|
|
55
|
+
'align-items': string;
|
|
56
|
+
gap: string;
|
|
57
|
+
'min-width': string;
|
|
58
|
+
'min-height': string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
subTypes: {};
|
|
63
|
+
};
|
|
64
|
+
settings: {};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export default Pagination;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import e from "./Pagination.mjs";
|
|
2
|
+
//#region src/elements/structure/Pagination/index.ts
|
|
3
|
+
var t = Object.assign(e, {
|
|
4
|
+
type: "pagination",
|
|
5
|
+
content: {
|
|
6
|
+
attributes: {
|
|
7
|
+
pageInfo: {},
|
|
8
|
+
mode: "pages",
|
|
9
|
+
target: "url",
|
|
10
|
+
pageParam: "page",
|
|
11
|
+
windowSize: 5,
|
|
12
|
+
previousLabel: "Previous",
|
|
13
|
+
nextLabel: "Next",
|
|
14
|
+
loadMoreLabel: "Load more"
|
|
15
|
+
},
|
|
16
|
+
definition: {
|
|
17
|
+
label: "Pagination",
|
|
18
|
+
type: "pagination",
|
|
19
|
+
description: "Pages through a list. Bind it to a provider page info: in URL mode it writes the page into the address bar so the result stays shareable and indexable, and in load-more mode it announces the next page for the provider to append.",
|
|
20
|
+
items: [],
|
|
21
|
+
bindings: {},
|
|
22
|
+
styleSelectors: { base: "" },
|
|
23
|
+
initialState: { visibility: !0 }
|
|
24
|
+
},
|
|
25
|
+
builder: {
|
|
26
|
+
canDelete: !0,
|
|
27
|
+
canSelect: !0,
|
|
28
|
+
canDragDrop: !0,
|
|
29
|
+
canMove: !0,
|
|
30
|
+
canTemplate: !0,
|
|
31
|
+
itemsAllowed: [],
|
|
32
|
+
itemsNotAllowed: []
|
|
33
|
+
},
|
|
34
|
+
market: {
|
|
35
|
+
category: "structure",
|
|
36
|
+
owner: "Plitzi",
|
|
37
|
+
verified: !0,
|
|
38
|
+
license: "MIT",
|
|
39
|
+
website: "https://plitzi.com",
|
|
40
|
+
backgroundColor: "#4422ee",
|
|
41
|
+
icon: "fa-solid fa-ellipsis"
|
|
42
|
+
},
|
|
43
|
+
defaultStyle: {
|
|
44
|
+
name: "Pagination",
|
|
45
|
+
displayMode: "desktop",
|
|
46
|
+
style: { base: { default: {
|
|
47
|
+
display: "flex",
|
|
48
|
+
"align-items": "center",
|
|
49
|
+
gap: "8px",
|
|
50
|
+
"min-width": "50px",
|
|
51
|
+
"min-height": "50px"
|
|
52
|
+
} } },
|
|
53
|
+
subTypes: {}
|
|
54
|
+
},
|
|
55
|
+
settings: {}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//#endregion
|
|
59
|
+
export { t as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -2023,6 +2023,130 @@ export declare const defaultElements: {
|
|
|
2023
2023
|
settings: {};
|
|
2024
2024
|
};
|
|
2025
2025
|
};
|
|
2026
|
+
richText: {
|
|
2027
|
+
(props: import('./Element/hocs/withElement').WithElementProps<import('./elements/basic/RichText/RichText').RichTextProps>): import("react").JSX.Element;
|
|
2028
|
+
displayName: string;
|
|
2029
|
+
} & {
|
|
2030
|
+
type: string;
|
|
2031
|
+
content: {
|
|
2032
|
+
attributes: {
|
|
2033
|
+
content: string;
|
|
2034
|
+
format: string;
|
|
2035
|
+
mediaBaseUrl: string;
|
|
2036
|
+
};
|
|
2037
|
+
definition: {
|
|
2038
|
+
label: string;
|
|
2039
|
+
type: string;
|
|
2040
|
+
description: string;
|
|
2041
|
+
items: never[];
|
|
2042
|
+
bindings: {};
|
|
2043
|
+
styleSelectors: {
|
|
2044
|
+
base: string;
|
|
2045
|
+
};
|
|
2046
|
+
initialState: {
|
|
2047
|
+
visibility: boolean;
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
builder: {
|
|
2051
|
+
canDelete: boolean;
|
|
2052
|
+
canSelect: boolean;
|
|
2053
|
+
canDragDrop: boolean;
|
|
2054
|
+
canMove: boolean;
|
|
2055
|
+
canTemplate: boolean;
|
|
2056
|
+
itemsAllowed: never[];
|
|
2057
|
+
itemsNotAllowed: never[];
|
|
2058
|
+
};
|
|
2059
|
+
market: {
|
|
2060
|
+
category: string;
|
|
2061
|
+
owner: string;
|
|
2062
|
+
verified: boolean;
|
|
2063
|
+
license: string;
|
|
2064
|
+
website: string;
|
|
2065
|
+
backgroundColor: string;
|
|
2066
|
+
icon: string;
|
|
2067
|
+
};
|
|
2068
|
+
defaultStyle: {
|
|
2069
|
+
name: string;
|
|
2070
|
+
displayMode: string;
|
|
2071
|
+
style: {
|
|
2072
|
+
base: {
|
|
2073
|
+
default: {
|
|
2074
|
+
'min-width': string;
|
|
2075
|
+
'min-height': string;
|
|
2076
|
+
};
|
|
2077
|
+
};
|
|
2078
|
+
};
|
|
2079
|
+
subTypes: {};
|
|
2080
|
+
};
|
|
2081
|
+
settings: {};
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
pagination: {
|
|
2085
|
+
(props: import('./Element/hocs/withElement').WithElementProps<import('./elements/structure/Pagination/Pagination').PaginationProps>): import("react").JSX.Element;
|
|
2086
|
+
displayName: string;
|
|
2087
|
+
} & {
|
|
2088
|
+
type: string;
|
|
2089
|
+
content: {
|
|
2090
|
+
attributes: {
|
|
2091
|
+
pageInfo: {};
|
|
2092
|
+
mode: string;
|
|
2093
|
+
target: string;
|
|
2094
|
+
pageParam: string;
|
|
2095
|
+
windowSize: number;
|
|
2096
|
+
previousLabel: string;
|
|
2097
|
+
nextLabel: string;
|
|
2098
|
+
loadMoreLabel: string;
|
|
2099
|
+
};
|
|
2100
|
+
definition: {
|
|
2101
|
+
label: string;
|
|
2102
|
+
type: string;
|
|
2103
|
+
description: string;
|
|
2104
|
+
items: never[];
|
|
2105
|
+
bindings: {};
|
|
2106
|
+
styleSelectors: {
|
|
2107
|
+
base: string;
|
|
2108
|
+
};
|
|
2109
|
+
initialState: {
|
|
2110
|
+
visibility: boolean;
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
builder: {
|
|
2114
|
+
canDelete: boolean;
|
|
2115
|
+
canSelect: boolean;
|
|
2116
|
+
canDragDrop: boolean;
|
|
2117
|
+
canMove: boolean;
|
|
2118
|
+
canTemplate: boolean;
|
|
2119
|
+
itemsAllowed: never[];
|
|
2120
|
+
itemsNotAllowed: never[];
|
|
2121
|
+
};
|
|
2122
|
+
market: {
|
|
2123
|
+
category: string;
|
|
2124
|
+
owner: string;
|
|
2125
|
+
verified: boolean;
|
|
2126
|
+
license: string;
|
|
2127
|
+
website: string;
|
|
2128
|
+
backgroundColor: string;
|
|
2129
|
+
icon: string;
|
|
2130
|
+
};
|
|
2131
|
+
defaultStyle: {
|
|
2132
|
+
name: string;
|
|
2133
|
+
displayMode: string;
|
|
2134
|
+
style: {
|
|
2135
|
+
base: {
|
|
2136
|
+
default: {
|
|
2137
|
+
display: string;
|
|
2138
|
+
'align-items': string;
|
|
2139
|
+
gap: string;
|
|
2140
|
+
'min-width': string;
|
|
2141
|
+
'min-height': string;
|
|
2142
|
+
};
|
|
2143
|
+
};
|
|
2144
|
+
};
|
|
2145
|
+
subTypes: {};
|
|
2146
|
+
};
|
|
2147
|
+
settings: {};
|
|
2148
|
+
};
|
|
2149
|
+
};
|
|
2026
2150
|
form: {
|
|
2027
2151
|
(props: import('./Element/hocs/withElement').WithElementProps<elements.FormProps>): import("react").JSX.Element;
|
|
2028
2152
|
displayName: string;
|
|
@@ -2584,65 +2708,14 @@ export declare const defaultElements: {
|
|
|
2584
2708
|
mockData: string;
|
|
2585
2709
|
subType: string;
|
|
2586
2710
|
credentials: string;
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
label: string;
|
|
2590
|
-
type: string;
|
|
2591
|
-
description: string;
|
|
2592
|
-
items: never[];
|
|
2593
|
-
bindings: {};
|
|
2594
|
-
styleSelectors: {
|
|
2595
|
-
base: string;
|
|
2596
|
-
};
|
|
2597
|
-
initialState: {
|
|
2598
|
-
visibility: boolean;
|
|
2599
|
-
};
|
|
2600
|
-
};
|
|
2601
|
-
builder: {
|
|
2602
|
-
canDelete: boolean;
|
|
2603
|
-
canSelect: boolean;
|
|
2604
|
-
canDragDrop: boolean;
|
|
2605
|
-
canMove: boolean;
|
|
2606
|
-
canTemplate: boolean;
|
|
2607
|
-
itemsAllowed: never[];
|
|
2608
|
-
itemsNotAllowed: never[];
|
|
2609
|
-
};
|
|
2610
|
-
market: {
|
|
2611
|
-
category: string;
|
|
2612
|
-
owner: string;
|
|
2613
|
-
verified: boolean;
|
|
2614
|
-
license: string;
|
|
2615
|
-
website: string;
|
|
2616
|
-
backgroundColor: string;
|
|
2617
|
-
icon: string;
|
|
2618
|
-
};
|
|
2619
|
-
defaultStyle: {
|
|
2620
|
-
name: string;
|
|
2621
|
-
displayMode: string;
|
|
2622
|
-
style: {
|
|
2623
|
-
base: {
|
|
2624
|
-
default: {
|
|
2625
|
-
'min-width': string;
|
|
2626
|
-
'min-height': string;
|
|
2627
|
-
};
|
|
2628
|
-
};
|
|
2629
|
-
};
|
|
2630
|
-
subTypes: {};
|
|
2631
|
-
};
|
|
2632
|
-
settings: {};
|
|
2633
|
-
};
|
|
2634
|
-
};
|
|
2635
|
-
collectionContainer: {
|
|
2636
|
-
(props: import('./Element/hocs/withElement').WithElementProps<import('./elements/provider/CollectionContainer/CollectionContainer').CollectionContainerProps>): import("react").JSX.Element;
|
|
2637
|
-
displayName: string;
|
|
2638
|
-
} & {
|
|
2639
|
-
type: string;
|
|
2640
|
-
content: {
|
|
2641
|
-
attributes: {
|
|
2711
|
+
connector: string;
|
|
2712
|
+
resource: string;
|
|
2642
2713
|
limit: string;
|
|
2643
|
-
query: string;
|
|
2644
|
-
source: undefined;
|
|
2645
2714
|
singleRecord: boolean;
|
|
2715
|
+
filters: never[];
|
|
2716
|
+
pagination: string;
|
|
2717
|
+
pageParam: string;
|
|
2718
|
+
renderWhileLoading: boolean;
|
|
2646
2719
|
};
|
|
2647
2720
|
definition: {
|
|
2648
2721
|
label: string;
|