pb-sxp-ui 1.20.25 → 1.20.26

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.
@@ -2,30 +2,14 @@ import { __rest } from "tslib";
2
2
  import React, { useEffect, useState, useRef, useMemo, useCallback } from 'react';
3
3
  import { useEditor } from '../../hooks';
4
4
  import FormatImage from '../SxpPageRender/FormatImage';
5
+ import * as _materials_ from '../../../materials/sxp';
5
6
  const RESOLVER = {};
6
- try {
7
- const materialsModule = require('../../materials/sxp');
8
- if (materialsModule && typeof materialsModule === 'object') {
9
- Object.values(materialsModule).forEach((v) => {
10
- var _a;
11
- if ((_a = v === null || v === void 0 ? void 0 : v.extend) === null || _a === void 0 ? void 0 : _a.type) {
12
- RESOLVER[v.extend.type] = v;
13
- }
14
- });
15
- if (Object.keys(RESOLVER).length > 0) {
16
- console.log('[StructurePage] Successfully loaded materials:', Object.keys(RESOLVER));
17
- }
18
- else {
19
- console.warn('[StructurePage] Materials module loaded but no valid components found');
20
- }
21
- }
22
- else {
23
- console.warn('[StructurePage] Materials module is not a valid object:', materialsModule);
7
+ Object.values(_materials_).forEach((v) => {
8
+ var _a;
9
+ if ((_a = v === null || v === void 0 ? void 0 : v.extend) === null || _a === void 0 ? void 0 : _a.type) {
10
+ RESOLVER[v.extend.type] = v;
24
11
  }
25
- }
26
- catch (error) {
27
- console.error('[StructurePage] Failed to load materials for StructurePage:', error);
28
- }
12
+ });
29
13
  const baseStyles = {
30
14
  container: {
31
15
  backgroundColor: '#000',
@@ -4,30 +4,14 @@ const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importStar(require("react"));
5
5
  const hooks_1 = require("../../hooks");
6
6
  const FormatImage_1 = tslib_1.__importDefault(require("../SxpPageRender/FormatImage"));
7
+ const _materials_ = tslib_1.__importStar(require("../../../materials/sxp"));
7
8
  const RESOLVER = {};
8
- try {
9
- const materialsModule = require('../../materials/sxp');
10
- if (materialsModule && typeof materialsModule === 'object') {
11
- Object.values(materialsModule).forEach((v) => {
12
- var _a;
13
- if ((_a = v === null || v === void 0 ? void 0 : v.extend) === null || _a === void 0 ? void 0 : _a.type) {
14
- RESOLVER[v.extend.type] = v;
15
- }
16
- });
17
- if (Object.keys(RESOLVER).length > 0) {
18
- console.log('[StructurePage] Successfully loaded materials:', Object.keys(RESOLVER));
19
- }
20
- else {
21
- console.warn('[StructurePage] Materials module loaded but no valid components found');
22
- }
23
- }
24
- else {
25
- console.warn('[StructurePage] Materials module is not a valid object:', materialsModule);
9
+ Object.values(_materials_).forEach((v) => {
10
+ var _a;
11
+ if ((_a = v === null || v === void 0 ? void 0 : v.extend) === null || _a === void 0 ? void 0 : _a.type) {
12
+ RESOLVER[v.extend.type] = v;
26
13
  }
27
- }
28
- catch (error) {
29
- console.error('[StructurePage] Failed to load materials for StructurePage:', error);
30
- }
14
+ });
31
15
  const baseStyles = {
32
16
  container: {
33
17
  backgroundColor: '#000',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.20.25",
3
+ "version": "1.20.26",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",