cmspageblocks 1.0.61 → 1.0.63
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/build/index.js +108 -8
- package/package.json +1 -1
- package/src/components/Block.js +19 -3
- package/src/components/BlockTypes/Portal.js +1 -2
package/build/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var styled = require('styled-components');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
|
+
require('bukazu-portal-react/src/styles/main.css');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
9
|
|
|
@@ -51039,19 +51040,19 @@ function Rz({
|
|
|
51039
51040
|
return window.__localeId__ = n, /* @__PURE__ */ d.jsx(A_, { client: c, children: /* @__PURE__ */ d.jsx(vT, { locale: n, messages: f[n], children: /* @__PURE__ */ d.jsx(aa.Provider, { value: { portalCode: e, objectCode: t, locale: n }, children: /* @__PURE__ */ d.jsx("div", { ref: u, className: s < 875 ? "bu-smaller" : "bu-large", children: /* @__PURE__ */ d.jsx(Oz, { pageType: a, locale: n, filters: r }) }) }) }) });
|
|
51040
51041
|
}
|
|
51041
51042
|
|
|
51042
|
-
// import 'bukazu-portal-react/build/index.css';
|
|
51043
|
-
|
|
51044
51043
|
function Portal(_ref) {
|
|
51045
51044
|
var options = _ref.options;
|
|
51046
51045
|
if ((typeof window === "undefined" ? "undefined" : _typeof$2(window)) !== "undefined") {
|
|
51047
51046
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, options.portal_type === 'calendar' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
51048
|
-
id: "bukazu-app"
|
|
51047
|
+
id: "bukazu-app",
|
|
51048
|
+
className: "bukazu-app"
|
|
51049
51049
|
}, /*#__PURE__*/React__default["default"].createElement(Rz, {
|
|
51050
51050
|
portalCode: options.portal_code,
|
|
51051
51051
|
objectCode: options.object_code,
|
|
51052
51052
|
locale: options.language
|
|
51053
51053
|
})), options.portal_type === 'search' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
51054
|
-
id: "bukazu-app"
|
|
51054
|
+
id: "bukazu-app",
|
|
51055
|
+
className: "bukazu-app"
|
|
51055
51056
|
}, /*#__PURE__*/React__default["default"].createElement(Rz, {
|
|
51056
51057
|
portalCode: options.portal_code,
|
|
51057
51058
|
locale: options.language
|
|
@@ -51091,6 +51092,104 @@ function Block(_ref) {
|
|
|
51091
51092
|
if (!options || options == null) {
|
|
51092
51093
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
51093
51094
|
}
|
|
51095
|
+
switch (pageBlock.type) {
|
|
51096
|
+
case 'Pages::BukazuPortalBlock':
|
|
51097
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51098
|
+
options: options,
|
|
51099
|
+
type: "bukazu_portal",
|
|
51100
|
+
key: pageBlock.id
|
|
51101
|
+
}, /*#__PURE__*/React__default["default"].createElement(Portal, {
|
|
51102
|
+
options: options
|
|
51103
|
+
}));
|
|
51104
|
+
case 'Pages::ButtonBlock':
|
|
51105
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51106
|
+
options: options,
|
|
51107
|
+
type: "button",
|
|
51108
|
+
key: pageBlock.id
|
|
51109
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
51110
|
+
options: options
|
|
51111
|
+
}));
|
|
51112
|
+
case 'Pages::CustomSliderBlock':
|
|
51113
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51114
|
+
options: options,
|
|
51115
|
+
type: "custom_slider",
|
|
51116
|
+
key: pageBlock.id
|
|
51117
|
+
}, /*#__PURE__*/React__default["default"].createElement(CustomSlider, {
|
|
51118
|
+
options: options
|
|
51119
|
+
}));
|
|
51120
|
+
case 'Pages::EmbedBlock':
|
|
51121
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51122
|
+
options: options,
|
|
51123
|
+
type: "embed",
|
|
51124
|
+
key: pageBlock.id
|
|
51125
|
+
}, /*#__PURE__*/React__default["default"].createElement(Embed, {
|
|
51126
|
+
options: options
|
|
51127
|
+
}));
|
|
51128
|
+
case 'Pages::FormBlock':
|
|
51129
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51130
|
+
options: options,
|
|
51131
|
+
type: "form",
|
|
51132
|
+
key: pageBlock.id
|
|
51133
|
+
}, /*#__PURE__*/React__default["default"].createElement(Form, {
|
|
51134
|
+
options: options
|
|
51135
|
+
}));
|
|
51136
|
+
case 'Pages::ImageBlock':
|
|
51137
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51138
|
+
options: options,
|
|
51139
|
+
type: "image",
|
|
51140
|
+
key: pageBlock.id
|
|
51141
|
+
}, /*#__PURE__*/React__default["default"].createElement(Image, {
|
|
51142
|
+
options: options
|
|
51143
|
+
}));
|
|
51144
|
+
case 'Pages::ImageSliderBlock':
|
|
51145
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51146
|
+
options: options,
|
|
51147
|
+
type: "image_slider",
|
|
51148
|
+
key: pageBlock.id
|
|
51149
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageSlider, {
|
|
51150
|
+
options: options
|
|
51151
|
+
}));
|
|
51152
|
+
case 'Pages::ImageGalleryBlock':
|
|
51153
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51154
|
+
options: options,
|
|
51155
|
+
type: "imageGallery",
|
|
51156
|
+
key: pageBlock.id
|
|
51157
|
+
}, /*#__PURE__*/React__default["default"].createElement(ImageGallery, {
|
|
51158
|
+
options: options
|
|
51159
|
+
}));
|
|
51160
|
+
case 'Pages::MapBlock':
|
|
51161
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51162
|
+
options: options,
|
|
51163
|
+
type: "map",
|
|
51164
|
+
key: pageBlock.id
|
|
51165
|
+
}, /*#__PURE__*/React__default["default"].createElement(Map$1, {
|
|
51166
|
+
options: options
|
|
51167
|
+
}));
|
|
51168
|
+
case 'Pages::ModalBlock':
|
|
51169
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51170
|
+
options: options,
|
|
51171
|
+
type: "modal",
|
|
51172
|
+
key: pageBlock.id
|
|
51173
|
+
}, /*#__PURE__*/React__default["default"].createElement(Modal, {
|
|
51174
|
+
options: options
|
|
51175
|
+
}));
|
|
51176
|
+
case 'Pages::SearchBarBlock':
|
|
51177
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51178
|
+
options: options,
|
|
51179
|
+
type: "searchbar",
|
|
51180
|
+
key: pageBlock.id
|
|
51181
|
+
}, /*#__PURE__*/React__default["default"].createElement(SearchBar, {
|
|
51182
|
+
options: options
|
|
51183
|
+
}));
|
|
51184
|
+
case 'Pages::TextBlock':
|
|
51185
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
51186
|
+
options: options,
|
|
51187
|
+
type: "text",
|
|
51188
|
+
key: pageBlock.id
|
|
51189
|
+
}, /*#__PURE__*/React__default["default"].createElement(Text, {
|
|
51190
|
+
options: options
|
|
51191
|
+
}));
|
|
51192
|
+
}
|
|
51094
51193
|
switch (options.type) {
|
|
51095
51194
|
case 'assorted_houses':
|
|
51096
51195
|
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
@@ -51196,13 +51295,14 @@ Block.propTypes = {
|
|
|
51196
51295
|
};
|
|
51197
51296
|
function Wrapper(_ref2) {
|
|
51198
51297
|
var children = _ref2.children,
|
|
51199
|
-
options = _ref2.options
|
|
51200
|
-
|
|
51201
|
-
|
|
51298
|
+
options = _ref2.options,
|
|
51299
|
+
_ref2$type = _ref2.type,
|
|
51300
|
+
type = _ref2$type === void 0 ? null : _ref2$type;
|
|
51301
|
+
var classes = options.classes,
|
|
51202
51302
|
id = options.id,
|
|
51203
51303
|
style = options.style,
|
|
51204
51304
|
className = options.className;
|
|
51205
|
-
var newClasses = "bu_cpb_".concat(type);
|
|
51305
|
+
var newClasses = "bu_cpb_".concat(type || options.type);
|
|
51206
51306
|
if (classes) {
|
|
51207
51307
|
Object.entries(classes).forEach(function (element) {
|
|
51208
51308
|
newClasses += ' '; // Add a space between the classes
|
package/package.json
CHANGED
package/src/components/Block.js
CHANGED
|
@@ -25,6 +25,21 @@ function Block({pageBlock, houses, locale }) {
|
|
|
25
25
|
return <></>;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
switch(pageBlock.type) {
|
|
29
|
+
case 'Pages::BukazuPortalBlock': return <Wrapper options={options} type="bukazu_portal" key={pageBlock.id}><Portal options={options} /></Wrapper>
|
|
30
|
+
case 'Pages::ButtonBlock': return <Wrapper options={options} type="button" key={pageBlock.id}><Button options={options} /></Wrapper>
|
|
31
|
+
case 'Pages::CustomSliderBlock': return <Wrapper options={options} type="custom_slider" key={pageBlock.id}><CustomSlider options={options} /></Wrapper>
|
|
32
|
+
case 'Pages::EmbedBlock': return <Wrapper options={options} type="embed" key={pageBlock.id}><Embed options={options} /></Wrapper>
|
|
33
|
+
case 'Pages::FormBlock': return <Wrapper options={options} type="form" key={pageBlock.id}><Form options={options} /></Wrapper>
|
|
34
|
+
case 'Pages::ImageBlock': return <Wrapper options={options} type="image" key={pageBlock.id}><Image options={options} /></Wrapper>
|
|
35
|
+
case 'Pages::ImageSliderBlock': return <Wrapper options={options} type="image_slider" key={pageBlock.id}><ImageSlider options={options} /></Wrapper>
|
|
36
|
+
case 'Pages::ImageGalleryBlock': return <Wrapper options={options} type="imageGallery" key={pageBlock.id}><ImageGallery options={options} /></Wrapper>
|
|
37
|
+
case 'Pages::MapBlock': return <Wrapper options={options} type="map" key={pageBlock.id}><Map options={options} /></Wrapper>
|
|
38
|
+
case 'Pages::ModalBlock': return <Wrapper options={options} type="modal" key={pageBlock.id}><Modal options={options} /></Wrapper>
|
|
39
|
+
case 'Pages::SearchBarBlock': return <Wrapper options={options} type="searchbar" key={pageBlock.id}><SearchBar options={options} /></Wrapper>
|
|
40
|
+
case 'Pages::TextBlock': return <Wrapper options={options} type="text" key={pageBlock.id}><Text options={options} /></Wrapper>
|
|
41
|
+
}
|
|
42
|
+
|
|
28
43
|
switch(options.type) {
|
|
29
44
|
case 'assorted_houses': return <Wrapper options={options} key={pageBlock.id}><AssortedHouses options={options} houses={houses} locale={locale} /></Wrapper>
|
|
30
45
|
case 'bukazu_portal': return <Wrapper options={options} key={pageBlock.id}><Portal options={options} /></Wrapper>
|
|
@@ -48,9 +63,10 @@ Block.propTypes = {
|
|
|
48
63
|
pageBlock: PropTypes.object.isRequired
|
|
49
64
|
}
|
|
50
65
|
|
|
51
|
-
function Wrapper({ children, options }) {
|
|
52
|
-
const {
|
|
53
|
-
|
|
66
|
+
function Wrapper({ children, options, type = null }) {
|
|
67
|
+
const { classes, id, style, className } = options;
|
|
68
|
+
|
|
69
|
+
let newClasses = `bu_cpb_${type || options.type}`;
|
|
54
70
|
if (classes) {
|
|
55
71
|
Object.entries(classes).forEach(element => {
|
|
56
72
|
newClasses += ' '; // Add a space between the classes
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import BukazuPortal from 'bukazu-portal-react';
|
|
3
|
-
|
|
4
|
-
// import 'bukazu-portal-react/build/index.css';
|
|
3
|
+
import 'bukazu-portal-react/src/styles/main.css';
|
|
5
4
|
|
|
6
5
|
export default function Portal({ options }) {
|
|
7
6
|
if (typeof window !== `undefined`) {
|