@lanaco/lnc-react-ui 3.11.29 → 3.11.30

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/lib/index.esm.js CHANGED
@@ -81482,21 +81482,22 @@ var PageLayout = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
81482
81482
  var rest = _objectWithoutProperties$1(props, _excluded$f);
81483
81483
  var theme = useTheme$1();
81484
81484
  var hasSidebar = React__default.Children.toArray(children).some(function (component) {
81485
- return component.props.__TYPE__ == "Sidebar";
81485
+ var _component$type;
81486
+ return component.props.__TYPE__ || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) == "Sidebar";
81486
81487
  });
81487
81488
  var getSidebarPlacement = function getSidebarPlacement(children) {
81488
81489
  var layoutIndex, sidebarIndex, contentIndex;
81489
81490
 
81490
81491
  // We shift indexes by 1 just to avoid having 0 index, so its easier when making comparison for return statement.
81491
81492
  React__default.Children.forEach(children, function (component, index) {
81492
- var _component$type, _component$type2, _component$type3;
81493
- if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) === "Sidebar") {
81493
+ var _component$type2, _component$type3, _component$type4;
81494
+ if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "Sidebar") {
81494
81495
  if (sidebarIndex) throw "Found multiple ocurrences of Sidebar component on the same level in the component tree.";
81495
81496
  sidebarIndex = index + 1;
81496
- } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "PageLayout") {
81497
+ } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "PageLayout") {
81497
81498
  if (layoutIndex) throw "Found multiple ocurrences of PageLayout component on the same level in the component tree.";
81498
81499
  layoutIndex = index + 1;
81499
- } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "Content") {
81500
+ } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type4 = component.type) === null || _component$type4 === void 0 ? void 0 : _component$type4.displayName) === "Content") {
81500
81501
  if (contentIndex) throw "Found multiple ocurrences of Content component on the same level in the component tree.";
81501
81502
  contentIndex = index + 1;
81502
81503
  }
package/lib/index.js CHANGED
@@ -81531,21 +81531,22 @@ var PageLayout = /*#__PURE__*/React__default["default"].forwardRef(function (pro
81531
81531
  var rest = _objectWithoutProperties__default["default"](props, _excluded$f);
81532
81532
  var theme = useTheme$1();
81533
81533
  var hasSidebar = React__default["default"].Children.toArray(children).some(function (component) {
81534
- return component.props.__TYPE__ == "Sidebar";
81534
+ var _component$type;
81535
+ return component.props.__TYPE__ || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) == "Sidebar";
81535
81536
  });
81536
81537
  var getSidebarPlacement = function getSidebarPlacement(children) {
81537
81538
  var layoutIndex, sidebarIndex, contentIndex;
81538
81539
 
81539
81540
  // We shift indexes by 1 just to avoid having 0 index, so its easier when making comparison for return statement.
81540
81541
  React__default["default"].Children.forEach(children, function (component, index) {
81541
- var _component$type, _component$type2, _component$type3;
81542
- if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) === "Sidebar") {
81542
+ var _component$type2, _component$type3, _component$type4;
81543
+ if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "Sidebar") {
81543
81544
  if (sidebarIndex) throw "Found multiple ocurrences of Sidebar component on the same level in the component tree.";
81544
81545
  sidebarIndex = index + 1;
81545
- } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "PageLayout") {
81546
+ } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "PageLayout") {
81546
81547
  if (layoutIndex) throw "Found multiple ocurrences of PageLayout component on the same level in the component tree.";
81547
81548
  layoutIndex = index + 1;
81548
- } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "Content") {
81549
+ } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type4 = component.type) === null || _component$type4 === void 0 ? void 0 : _component$type4.displayName) === "Content") {
81549
81550
  if (contentIndex) throw "Found multiple ocurrences of Content component on the same level in the component tree.";
81550
81551
  contentIndex = index + 1;
81551
81552
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
3
  "type": "module",
4
- "version": "3.11.29",
4
+ "version": "3.11.30",
5
5
  "description": "component library",
6
6
  "main": "lib/index.js",
7
7
  "module": "lib/index.esm.js",