@raketa-builder/support 0.9.0 → 0.11.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/.turbo/turbo-build.log +3 -3
- package/dist/index.js +15 -3
- package/package.json +1 -1
- package/src/AdminPageRender/index.js +14 -11
- package/src/extractImageValue.js +9 -0
- package/src/index.js +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @raketa-builder/support@0.
|
|
2
|
+
> @raketa-builder/support@0.11.0 build
|
|
3
3
|
> tsup src/index.js --format cjs --loader ".js=jsx"
|
|
4
4
|
|
|
5
5
|
CLI Building entry: src/index.js
|
|
@@ -7,5 +7,5 @@ CLI Using tsconfig: tsconfig.json
|
|
|
7
7
|
CLI tsup v6.5.0
|
|
8
8
|
CLI Target: es6
|
|
9
9
|
CJS Build start
|
|
10
|
-
CJS dist/index.js
|
|
11
|
-
CJS ⚡️ Build success in
|
|
10
|
+
CJS dist/index.js 21.07 KB
|
|
11
|
+
CJS ⚡️ Build success in 39ms
|
package/dist/index.js
CHANGED
|
@@ -56,6 +56,7 @@ __export(src_exports, {
|
|
|
56
56
|
Container: () => Container_default,
|
|
57
57
|
EmbeddedVideo: () => EmbeddedVideo_default,
|
|
58
58
|
Image: () => Image_default,
|
|
59
|
+
extractImageValue: () => extractImageValue_default,
|
|
59
60
|
imagePlaceholder: () => imagePlaceholder_default,
|
|
60
61
|
imageSrc: () => imageSrc_default,
|
|
61
62
|
isImagePresent: () => isImagePresent_default,
|
|
@@ -538,7 +539,8 @@ var AdminPageRender = ({
|
|
|
538
539
|
library,
|
|
539
540
|
adminLibrary,
|
|
540
541
|
identifier,
|
|
541
|
-
detailPath
|
|
542
|
+
detailPath,
|
|
543
|
+
canvasClassName = ""
|
|
542
544
|
}) => {
|
|
543
545
|
const [selectedWidgets, setSelectedWidgets] = import_react6.default.useState([]);
|
|
544
546
|
const areAllSelected = selectedWidgets.length === page.widgets.length;
|
|
@@ -586,7 +588,7 @@ var AdminPageRender = ({
|
|
|
586
588
|
}
|
|
587
589
|
),
|
|
588
590
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("a", { href: detailPath, className: "r-reset r-details-link", title: "Details" }),
|
|
589
|
-
page.widgets.map(({ widgetId, component, settings }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
591
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: canvasClassName, children: page.widgets.map(({ widgetId, component, settings }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
590
592
|
AdminWidgetMinimal_default,
|
|
591
593
|
{
|
|
592
594
|
library,
|
|
@@ -597,16 +599,26 @@ var AdminPageRender = ({
|
|
|
597
599
|
selectedWidgets
|
|
598
600
|
},
|
|
599
601
|
widgetId
|
|
600
|
-
))
|
|
602
|
+
)) })
|
|
601
603
|
] });
|
|
602
604
|
};
|
|
603
605
|
var AdminPageRender_default = AdminPageRender;
|
|
606
|
+
|
|
607
|
+
// src/extractImageValue.js
|
|
608
|
+
function extractImageValue(value) {
|
|
609
|
+
if (!value) {
|
|
610
|
+
return null;
|
|
611
|
+
}
|
|
612
|
+
return value.hasOwnProperty("image") ? value.image : value;
|
|
613
|
+
}
|
|
614
|
+
var extractImageValue_default = extractImageValue;
|
|
604
615
|
// Annotate the CommonJS export names for ESM import in node:
|
|
605
616
|
0 && (module.exports = {
|
|
606
617
|
AdminPageRender,
|
|
607
618
|
Container,
|
|
608
619
|
EmbeddedVideo,
|
|
609
620
|
Image,
|
|
621
|
+
extractImageValue,
|
|
610
622
|
imagePlaceholder,
|
|
611
623
|
imageSrc,
|
|
612
624
|
isImagePresent,
|
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ const AdminPageRender = ({
|
|
|
14
14
|
adminLibrary,
|
|
15
15
|
identifier,
|
|
16
16
|
detailPath,
|
|
17
|
+
canvasClassName = "",
|
|
17
18
|
}) => {
|
|
18
19
|
const [selectedWidgets, setSelectedWidgets] = React.useState([]);
|
|
19
20
|
const areAllSelected = selectedWidgets.length === page.widgets.length;
|
|
@@ -71,17 +72,19 @@ const AdminPageRender = ({
|
|
|
71
72
|
|
|
72
73
|
<a href={detailPath} className="r-reset r-details-link" title="Details" />
|
|
73
74
|
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
75
|
+
<div className={canvasClassName}>
|
|
76
|
+
{page.widgets.map(({ widgetId, component, settings }) => (
|
|
77
|
+
<AdminWidgetMinimal
|
|
78
|
+
key={widgetId}
|
|
79
|
+
library={library}
|
|
80
|
+
adminLibrary={adminLibrary}
|
|
81
|
+
widget={{ widgetId, component, settings }}
|
|
82
|
+
onCopy={handleCopyWidgets}
|
|
83
|
+
onSelectWidget={handleSelectWidget}
|
|
84
|
+
selectedWidgets={selectedWidgets}
|
|
85
|
+
/>
|
|
86
|
+
))}
|
|
87
|
+
</div>
|
|
85
88
|
</React.Fragment>
|
|
86
89
|
);
|
|
87
90
|
};
|
package/src/index.js
CHANGED
|
@@ -6,12 +6,14 @@ import EmbeddedVideo from "./EmbeddedVideo";
|
|
|
6
6
|
import toHTML from "./toHTML";
|
|
7
7
|
import isImagePresent from "./isImagePresent";
|
|
8
8
|
import AdminPageRender from "./AdminPageRender";
|
|
9
|
+
import extractImageValue from "./extractImageValue";
|
|
9
10
|
|
|
10
11
|
export {
|
|
11
12
|
Image,
|
|
12
13
|
imageSrc,
|
|
13
14
|
imagePlaceholder,
|
|
14
15
|
isImagePresent,
|
|
16
|
+
extractImageValue,
|
|
15
17
|
Container,
|
|
16
18
|
EmbeddedVideo,
|
|
17
19
|
toHTML,
|