@sitecore-jss/sitecore-jss-react 22.1.0-canary.63 → 22.1.0-canary.65

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.
@@ -3,13 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.HIDDEN_RENDERING_NAME = exports.HiddenRendering = void 0;
6
+ exports.HiddenRendering = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const styles = {
9
- height: '100px',
10
9
  backgroundImage: 'linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%)',
11
10
  backgroundSize: '3px 3px',
11
+ display: 'flex',
12
+ justifyContent: 'center',
13
+ alignItems: 'center',
14
+ padding: '30px',
15
+ color: '#aaa',
12
16
  };
13
- const HiddenRendering = () => react_1.default.createElement("div", { style: styles });
17
+ const HiddenRendering = () => react_1.default.createElement("div", { style: styles }, "The component is hidden");
14
18
  exports.HiddenRendering = HiddenRendering;
15
- exports.HIDDEN_RENDERING_NAME = 'Hidden Rendering';
@@ -19,6 +19,7 @@ const react_1 = __importDefault(require("react"));
19
19
  const prop_types_1 = __importDefault(require("prop-types"));
20
20
  const MissingComponent_1 = require("./MissingComponent");
21
21
  const layout_1 = require("@sitecore-jss/sitecore-jss/layout");
22
+ const sitecore_jss_1 = require("@sitecore-jss/sitecore-jss");
22
23
  const utils_1 = require("../utils");
23
24
  const HiddenRendering_1 = require("./HiddenRendering");
24
25
  const FEaaSComponent_1 = require("./FEaaSComponent");
@@ -122,7 +123,7 @@ class PlaceholderCommon extends react_1.default.Component {
122
123
  }
123
124
  const componentRendering = rendering;
124
125
  let component;
125
- if (componentRendering.componentName === HiddenRendering_1.HIDDEN_RENDERING_NAME) {
126
+ if (componentRendering.componentName === sitecore_jss_1.constants.HIDDEN_RENDERING_NAME) {
126
127
  component = hiddenRenderingComponent !== null && hiddenRenderingComponent !== void 0 ? hiddenRenderingComponent : HiddenRendering_1.HiddenRendering;
127
128
  isEmpty = true;
128
129
  }
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
2
  const styles = {
3
- height: '100px',
4
3
  backgroundImage: 'linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%)',
5
4
  backgroundSize: '3px 3px',
5
+ display: 'flex',
6
+ justifyContent: 'center',
7
+ alignItems: 'center',
8
+ padding: '30px',
9
+ color: '#aaa',
6
10
  };
7
- export const HiddenRendering = () => React.createElement("div", { style: styles });
8
- export const HIDDEN_RENDERING_NAME = 'Hidden Rendering';
11
+ export const HiddenRendering = () => React.createElement("div", { style: styles }, "The component is hidden");
@@ -13,8 +13,9 @@ import React from 'react';
13
13
  import PropTypes from 'prop-types';
14
14
  import { MissingComponent } from './MissingComponent';
15
15
  import { EditMode, } from '@sitecore-jss/sitecore-jss/layout';
16
+ import { constants } from '@sitecore-jss/sitecore-jss';
16
17
  import { convertAttributesToReactProps } from '../utils';
17
- import { HiddenRendering, HIDDEN_RENDERING_NAME } from './HiddenRendering';
18
+ import { HiddenRendering } from './HiddenRendering';
18
19
  import { FEaaSComponent, FEAAS_COMPONENT_RENDERING_NAME } from './FEaaSComponent';
19
20
  import { FEaaSWrapper, FEAAS_WRAPPER_RENDERING_NAME } from './FEaaSWrapper';
20
21
  import { BYOCComponent, BYOC_COMPONENT_RENDERING_NAME } from './BYOCComponent';
@@ -114,7 +115,7 @@ export class PlaceholderCommon extends React.Component {
114
115
  }
115
116
  const componentRendering = rendering;
116
117
  let component;
117
- if (componentRendering.componentName === HIDDEN_RENDERING_NAME) {
118
+ if (componentRendering.componentName === constants.HIDDEN_RENDERING_NAME) {
118
119
  component = hiddenRenderingComponent !== null && hiddenRenderingComponent !== void 0 ? hiddenRenderingComponent : HiddenRendering;
119
120
  isEmpty = true;
120
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-react",
3
- "version": "22.1.0-canary.63",
3
+ "version": "22.1.0-canary.65",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -61,14 +61,14 @@
61
61
  "react-dom": "^18.2.0"
62
62
  },
63
63
  "dependencies": {
64
- "@sitecore-jss/sitecore-jss": "^22.1.0-canary.63",
64
+ "@sitecore-jss/sitecore-jss": "^22.1.0-canary.65",
65
65
  "fast-deep-equal": "^3.1.3",
66
66
  "prop-types": "^15.8.1",
67
67
  "style-attr": "^1.3.0"
68
68
  },
69
69
  "description": "",
70
70
  "types": "types/index.d.ts",
71
- "gitHead": "5df02f84f26d9a5eb4ef1e4d153298309dbed232",
71
+ "gitHead": "eb3429b36264b6920efa4d9ebdbc16a175bce231",
72
72
  "files": [
73
73
  "dist",
74
74
  "types"
@@ -1,4 +1,3 @@
1
1
  /// <reference types="@types/react" />
2
2
  import React from 'react';
3
3
  export declare const HiddenRendering: () => React.JSX.Element;
4
- export declare const HIDDEN_RENDERING_NAME = "Hidden Rendering";