@saltcorn/builder 0.5.6-rc.0 → 0.6.0-beta.1
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/dist/builder_bundle.js +12 -12
- package/package.json +1 -1
- package/src/components/Builder.js +57 -10
- package/src/components/elements/BoxModelEditor.js +374 -0
- package/src/components/elements/Column.js +4 -1
- package/src/components/elements/Container.js +164 -196
- package/src/components/elements/Image.js +92 -33
- package/src/components/elements/boxmodel.html +253 -0
- package/src/components/elements/utils.js +126 -42
- package/src/components/storage.js +11 -14
|
@@ -136,12 +136,6 @@ export const layoutToNodes = (layout, query, actions, parent = "ROOT") => {
|
|
|
136
136
|
<Element
|
|
137
137
|
key={ix}
|
|
138
138
|
canvas
|
|
139
|
-
borderWidth={segment.borderWidth}
|
|
140
|
-
borderStyle={segment.borderStyle}
|
|
141
|
-
borderRadius={segment.borderRadius}
|
|
142
|
-
borderDirection={segment.borderDirection}
|
|
143
|
-
borderColor={segment.borderColor}
|
|
144
|
-
borderRadiusUnit={segment.borderRadiusUnit}
|
|
145
139
|
gradStartColor={segment.gradStartColor}
|
|
146
140
|
gradEndColor={segment.gradEndColor}
|
|
147
141
|
gradDirection={segment.gradDirection}
|
|
@@ -161,7 +155,14 @@ export const layoutToNodes = (layout, query, actions, parent = "ROOT") => {
|
|
|
161
155
|
widthUnit={segment.widthUnit || "px"}
|
|
162
156
|
vAlign={segment.vAlign}
|
|
163
157
|
hAlign={segment.hAlign}
|
|
164
|
-
|
|
158
|
+
display={
|
|
159
|
+
segment.display ||
|
|
160
|
+
(segment.block === true
|
|
161
|
+
? "block"
|
|
162
|
+
: segment.block === false
|
|
163
|
+
? "inline-block"
|
|
164
|
+
: "block")
|
|
165
|
+
}
|
|
165
166
|
fullPageWidth={
|
|
166
167
|
typeof segment.fullPageWidth === "undefined"
|
|
167
168
|
? false
|
|
@@ -170,6 +171,7 @@ export const layoutToNodes = (layout, query, actions, parent = "ROOT") => {
|
|
|
170
171
|
bgFileId={segment.bgFileId}
|
|
171
172
|
imageSize={segment.imageSize || "contain"}
|
|
172
173
|
bgType={segment.bgType || "None"}
|
|
174
|
+
style={segment.style || {}}
|
|
173
175
|
bgColor={segment.bgColor || "#ffffff"}
|
|
174
176
|
setTextColor={!!segment.setTextColor}
|
|
175
177
|
textColor={segment.textColor || "#000000"}
|
|
@@ -282,12 +284,6 @@ export const craftToSaltcorn = (nodes, startFrom = "ROOT") => {
|
|
|
282
284
|
return {
|
|
283
285
|
contents: get_nodes(node),
|
|
284
286
|
type: "container",
|
|
285
|
-
borderWidth: node.props.borderWidth,
|
|
286
|
-
borderStyle: node.props.borderStyle,
|
|
287
|
-
borderColor: node.props.borderColor,
|
|
288
|
-
borderRadius: node.props.borderRadius,
|
|
289
|
-
borderDirection: node.props.borderDirection,
|
|
290
|
-
borderRadiusUnit: node.props.borderRadiusUnit,
|
|
291
287
|
customCSS: node.props.customCSS,
|
|
292
288
|
customClass: node.props.customClass,
|
|
293
289
|
minHeight: node.props.minHeight,
|
|
@@ -303,7 +299,7 @@ export const craftToSaltcorn = (nodes, startFrom = "ROOT") => {
|
|
|
303
299
|
margin: node.props.margin,
|
|
304
300
|
padding: node.props.padding,
|
|
305
301
|
overflow: node.props.overflow,
|
|
306
|
-
|
|
302
|
+
display: node.props.display,
|
|
307
303
|
fullPageWidth: node.props.fullPageWidth || false,
|
|
308
304
|
bgFileId: node.props.bgFileId,
|
|
309
305
|
bgType: node.props.bgType,
|
|
@@ -321,6 +317,7 @@ export const craftToSaltcorn = (nodes, startFrom = "ROOT") => {
|
|
|
321
317
|
gradEndColor: node.props.gradEndColor,
|
|
322
318
|
gradDirection: node.props.gradDirection,
|
|
323
319
|
rotate: node.props.rotate,
|
|
320
|
+
style: node.props.style,
|
|
324
321
|
};
|
|
325
322
|
else return get_nodes(node);
|
|
326
323
|
}
|