keski_lib_catalog 1.3.13 → 1.3.15

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/index.js CHANGED
@@ -583,7 +583,7 @@ function Layout1$3(content) {
583
583
  lg: 350,
584
584
  md: 350,
585
585
  sm: 700,
586
- xs: 250
586
+ xs: 350
587
587
  }
588
588
  }
589
589
  }, /*#__PURE__*/React__default.createElement(material.CardMedia, {
@@ -1067,6 +1067,273 @@ var List = /*#__PURE__*/function (_AtomicElements) {
1067
1067
  return List;
1068
1068
  }(AtomicElements);
1069
1069
 
1070
+ function Layout1$6(content) {
1071
+ return /*#__PURE__*/React__default.createElement(material.Grid, {
1072
+ container: true,
1073
+ sx: {
1074
+ minHeight: '250px',
1075
+ width: '100%',
1076
+ margin: 'auto',
1077
+ padding: '0px'
1078
+ }
1079
+ }, /*#__PURE__*/React__default.createElement(Item$3, {
1080
+ title: content.component.title,
1081
+ content: content.component.subcomponent,
1082
+ side: content.component.justify_content
1083
+ }));
1084
+ }
1085
+ function Item$3(props) {
1086
+ var content = props.content,
1087
+ title = props.title;
1088
+ var _useState = React.useState([]),
1089
+ arrayFourElements = _useState[0],
1090
+ setArrayFourElements = _useState[1];
1091
+ var visible = true;
1092
+ var theme = material.useTheme();
1093
+ var isXsScreen = material.useMediaQuery(theme.breakpoints.down('sm'));
1094
+ var isSmScreen = material.useMediaQuery(theme.breakpoints.between('sm', 'md'));
1095
+ var isMdScreen = material.useMediaQuery(theme.breakpoints.between('md', 'lg'));
1096
+ var isLgScreen = material.useMediaQuery(theme.breakpoints.up('lg'));
1097
+ function divideArreglo(arreglo, tamanoMaximo) {
1098
+ var subarreglos = [];
1099
+ var subarregloActual = [];
1100
+ for (var i = 0; i < arreglo.length; i++) {
1101
+ subarregloActual.push(arreglo[i]);
1102
+ if (subarregloActual.length === tamanoMaximo || i === arreglo.length - 1) {
1103
+ subarreglos.push(subarregloActual);
1104
+ subarregloActual = [];
1105
+ }
1106
+ }
1107
+ return subarreglos;
1108
+ }
1109
+ React.useEffect(function () {
1110
+ var tamanoMaximo;
1111
+ if (isSmScreen) {
1112
+ tamanoMaximo = 2;
1113
+ } else if (isMdScreen) {
1114
+ tamanoMaximo = 3;
1115
+ } else if (isLgScreen) {
1116
+ tamanoMaximo = 4;
1117
+ } else if (isXsScreen) {
1118
+ tamanoMaximo = 1;
1119
+ }
1120
+ setArrayFourElements(divideArreglo(content, tamanoMaximo));
1121
+ }, [isXsScreen, isSmScreen, isMdScreen, isLgScreen, content]);
1122
+ if (!arrayFourElements) {
1123
+ return null;
1124
+ } else {
1125
+ return content.length >= 1 ? /*#__PURE__*/React__default.createElement(Carousel, {
1126
+ autoPlay: true,
1127
+ indicators: false,
1128
+ swipe: true,
1129
+ cycleNavigation: true,
1130
+ sx: {
1131
+ width: '100%',
1132
+ height: '250px',
1133
+ paddingTop: '60px',
1134
+ position: 'relative'
1135
+ }
1136
+ }, arrayFourElements.map(function (items, i) {
1137
+ return /*#__PURE__*/React__default.createElement(material.Container, {
1138
+ maxWidth: "lg"
1139
+ }, /*#__PURE__*/React__default.createElement(material.Grid, {
1140
+ container: true,
1141
+ key: i,
1142
+ spacing: 0,
1143
+ sx: {
1144
+ margin: 'auto',
1145
+ padding: 'auto'
1146
+ }
1147
+ }, /*#__PURE__*/React__default.createElement(material.Box, {
1148
+ sx: {
1149
+ position: 'absolute',
1150
+ top: {
1151
+ xs: '-40px',
1152
+ sm: '-80px'
1153
+ },
1154
+ zIndex: 1
1155
+ }
1156
+ }, " ", /*#__PURE__*/React__default.createElement(material.Typography, {
1157
+ component: 'h2',
1158
+ dangerouslySetInnerHTML: {
1159
+ __html: title ? title : ''
1160
+ },
1161
+ sx: {
1162
+ height: '100%',
1163
+ fontSize: {
1164
+ xl: '3em',
1165
+ lg: '3em',
1166
+ md: '2.25em',
1167
+ sm: '1.875em',
1168
+ xs: '1.875em'
1169
+ }
1170
+ }
1171
+ })), items.map(function (item, j) {
1172
+ return /*#__PURE__*/React__default.createElement(material.Grid, {
1173
+ item: true,
1174
+ key: j,
1175
+ xs: 12,
1176
+ sm: 6,
1177
+ md: 4,
1178
+ lg: 3,
1179
+ xl: 3,
1180
+ sx: {
1181
+ margin: {
1182
+ xs: '0px',
1183
+ sm: '0px'
1184
+ },
1185
+ width: 'object-fit',
1186
+ display: 'flex',
1187
+ justifyContent: 'center',
1188
+ alignItems: 'center',
1189
+ '&.MuiGrid-item': {
1190
+ paddingLeft: '17px',
1191
+ paddingTop: '10px'
1192
+ }
1193
+ }
1194
+ }, /*#__PURE__*/React__default.createElement(material.Slide, {
1195
+ direction: "left",
1196
+ "in": visible
1197
+ }, /*#__PURE__*/React__default.createElement(material.Card, {
1198
+ elevation: 0,
1199
+ sx: {
1200
+ width: '100%',
1201
+ height: '100%',
1202
+ borderRadius: '10px',
1203
+ background: 'none'
1204
+ }
1205
+ }, /*#__PURE__*/React__default.createElement(material.CardMedia, {
1206
+ component: "img",
1207
+ image: item.image.url ? item.image.url : 'none',
1208
+ alt: item.description ? item.description : 'none',
1209
+ sx: {
1210
+ width: '100%',
1211
+ height: '140px',
1212
+ transform: "translate(" + item.image_transform_x + "%, " + item.image_transform_y + "%) scale(" + (item.image_scale ? item.image_scale : '1') + ")"
1213
+ }
1214
+ }))));
1215
+ })));
1216
+ })) : null;
1217
+ }
1218
+ }
1219
+
1220
+ var Brands = /*#__PURE__*/function (_AtomicElements) {
1221
+ _inheritsLoose(Brands, _AtomicElements);
1222
+ function Brands() {
1223
+ var _this;
1224
+ _this = _AtomicElements.call(this) || this;
1225
+ _this.layout = [Layout1$6];
1226
+ _this.layoutFootprint = ['brands_layout_1.png'];
1227
+ _this.layoutFootprintReq = [{
1228
+ 'type': 0,
1229
+ 'title': 'Tittle',
1230
+ 'description': 'Description',
1231
+ 'image_scale': 'image scale',
1232
+ 'image_transform_x': 'image transform x',
1233
+ 'image_transform_y': 'image transform y',
1234
+ 'image': 'Image'
1235
+ }];
1236
+ return _this;
1237
+ }
1238
+ return Brands;
1239
+ }(AtomicElements);
1240
+
1241
+ function Layout1$7(content) {
1242
+ var _content$component$su, _content$component$su2;
1243
+ var visible = true;
1244
+ return /*#__PURE__*/React__default.createElement(material.Slide, {
1245
+ direction: "left",
1246
+ "in": visible
1247
+ }, /*#__PURE__*/React__default.createElement(material.Box, {
1248
+ sx: {
1249
+ width: {
1250
+ xs: '100%',
1251
+ md: '100%'
1252
+ },
1253
+ color: (_content$component$su = content.component.subcomponent[0]) === null || _content$component$su === void 0 ? void 0 : _content$component$su.text_color,
1254
+ textAlign: content.component.justify_content
1255
+ }
1256
+ }, /*#__PURE__*/React__default.createElement(material.Typography, {
1257
+ component: 'h2',
1258
+ dangerouslySetInnerHTML: {
1259
+ __html: content.component.title ? content.component.title : 'Agregue titulo'
1260
+ },
1261
+ sx: {
1262
+ marginBottom: '16px',
1263
+ whiteSpace: 'pre-wrap',
1264
+ fontSize: {
1265
+ xs: "1.875em",
1266
+ sm: "2.25em",
1267
+ md: "3em",
1268
+ lg: "3em",
1269
+ xl: "3em"
1270
+ },
1271
+ fontWeight: "bold"
1272
+ }
1273
+ }), /*#__PURE__*/React__default.createElement(material.Box, {
1274
+ sx: {
1275
+ width: content.component.justify_content == "center" ? "100%" : {
1276
+ xl: "70%",
1277
+ lg: "72%",
1278
+ md: "84%",
1279
+ sm: "100%",
1280
+ xs: "100%"
1281
+ }
1282
+ }
1283
+ }, (_content$component$su2 = content.component.subcomponent) === null || _content$component$su2 === void 0 ? void 0 : _content$component$su2.map(function (item, index) {
1284
+ return /*#__PURE__*/React__default.createElement(material.Accordion, {
1285
+ key: index,
1286
+ elevation: 2
1287
+ }, /*#__PURE__*/React__default.createElement(material.AccordionSummary, {
1288
+ "aria-controls": "panel1a-content",
1289
+ id: "panel1a-header",
1290
+ expandIcon: '+',
1291
+ sx: {
1292
+ marginBottom: '16px'
1293
+ }
1294
+ }, /*#__PURE__*/React__default.createElement(material.Typography, {
1295
+ component: 'h3',
1296
+ dangerouslySetInnerHTML: {
1297
+ __html: item.subtitle ? item.subtitle : 'Agregue pregunta'
1298
+ },
1299
+ sx: {
1300
+ fontSize: '1.25em',
1301
+ fontWeight: 'bold'
1302
+ }
1303
+ })), /*#__PURE__*/React__default.createElement(material.AccordionDetails, {
1304
+ sx: {
1305
+ padding: '16px'
1306
+ }
1307
+ }, /*#__PURE__*/React__default.createElement(material.Typography, {
1308
+ component: 'p',
1309
+ dangerouslySetInnerHTML: {
1310
+ __html: item.description ? item.description : 'Agregue respuesta'
1311
+ },
1312
+ sx: {
1313
+ fontSize: '1.125em'
1314
+ }
1315
+ })));
1316
+ }))));
1317
+ }
1318
+
1319
+ var FAQ = /*#__PURE__*/function (_AtomicElements) {
1320
+ _inheritsLoose(FAQ, _AtomicElements);
1321
+ function FAQ() {
1322
+ var _this;
1323
+ _this = _AtomicElements.call(this) || this;
1324
+ _this.layout = [Layout1$7];
1325
+ _this.layoutFootprint = ['faq_layout_1.png'];
1326
+ _this.layoutFootprintReq = [{
1327
+ 'type': 0,
1328
+ 'title': 'Tittle',
1329
+ 'subtitle': 'Subtitle',
1330
+ 'description': 'Description'
1331
+ }];
1332
+ return _this;
1333
+ }
1334
+ return FAQ;
1335
+ }(AtomicElements);
1336
+
1070
1337
  function CanvasContainer(props) {
1071
1338
  var _json$component$bg_im;
1072
1339
  var json = props.json,
@@ -1098,9 +1365,9 @@ function CanvasContainer(props) {
1098
1365
  xs: '64px 0px'
1099
1366
  },
1100
1367
  width: '100%',
1101
- height: '100%'
1368
+ height: json.type === 6 ? '250px' : '100%'
1102
1369
  }
1103
- }, /*#__PURE__*/React__default.createElement(material.Container, {
1370
+ }, json.type === 6 || json.component.layout === 1 ? children : /*#__PURE__*/React__default.createElement(material.Container, {
1104
1371
  maxWidth: "lg",
1105
1372
  sx: {
1106
1373
  padding: '0px',
@@ -1204,7 +1471,9 @@ var Sections = /*#__PURE__*/function () {
1204
1471
  this.gallery = new Section(new Gallery());
1205
1472
  this.text = new Section(new Text());
1206
1473
  this.list = new Section(new List());
1207
- this.sections = [this.banner, this.textPlusImg, this.quotes, this.gallery, this.text, this.list];
1474
+ this.brands = new Section(new Brands());
1475
+ this.faq = new Section(new FAQ());
1476
+ this.sections = [this.banner, this.textPlusImg, this.quotes, this.gallery, this.text, this.list, this.brands, this.faq];
1208
1477
  }
1209
1478
  var _proto2 = Sections.prototype;
1210
1479
  _proto2.getSectionList = function getSectionList() {
@@ -1214,7 +1483,9 @@ var Sections = /*#__PURE__*/function () {
1214
1483
  '2': 'Citas/Testimonios',
1215
1484
  '3': 'Galeria',
1216
1485
  '4': 'Texto',
1217
- '5': 'Lista'
1486
+ '5': 'Lista',
1487
+ '6': 'Marcas',
1488
+ '7': 'FAQ'
1218
1489
  };
1219
1490
  };
1220
1491
  _proto2.getLayoutsFromSection = function getLayoutsFromSection(index) {