@pushwoosh/smart-components-kit 1.0.10 → 1.0.11

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.
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable react/no-array-index-key */
2
2
  import React, { Fragment } from 'react';
3
- import { Color } from '@pushwoosh/kit-constants';
4
3
  import { isElement } from './helpers';
4
+ import { DynamicContentBracket, DynamicContentRoot } from './RichMessageViewerContent.styled';
5
5
  export const RichMessageViewerContent = ({
6
6
  content,
7
7
  lineBreaks
@@ -9,14 +9,9 @@ export const RichMessageViewerContent = ({
9
9
  return content.map((node, index) => {
10
10
  let children = node.children.map((child, idx) => {
11
11
  if (isElement(child) && child.type === 'dc') {
12
- return React.createElement("span", {
13
- key: idx,
14
- style: {
15
- backgroundColor: Color.WARNING_LIGHT_HOVER,
16
- outline: `2px solid ${Color.WARNING_LIGHT_HOVER}`,
17
- borderRadius: 4
18
- }
19
- }, child.dc.tagName);
12
+ return React.createElement(DynamicContentRoot, {
13
+ key: idx
14
+ }, React.createElement(DynamicContentBracket, null, '{'), "\u00A0", child.dc.tagName, "\u00A0", React.createElement(DynamicContentBracket, null, '}'));
20
15
  }
21
16
  return child.text;
22
17
  });
@@ -0,0 +1,2 @@
1
+ export declare const DynamicContentRoot: import("styled-components").StyledComponent<"span", any, {}, never>;
2
+ export declare const DynamicContentBracket: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -0,0 +1,10 @@
1
+ import styled from 'styled-components';
2
+ import { Color, FontWeight } from '@pushwoosh/kit-constants';
3
+ export const DynamicContentRoot = styled.span.withConfig({
4
+ displayName: "DynamicContentRoot",
5
+ componentId: "sc-vbadt7-0"
6
+ })(["background-color:", ";border-radius:4px;white-space:nowrap;font-weight:", ";padding-left:2px;padding-right:2px;"], Color.EXCEPTIONAL_LIGHT, FontWeight.MEDIUM);
7
+ export const DynamicContentBracket = styled.span.withConfig({
8
+ displayName: "DynamicContentBracket",
9
+ componentId: "sc-vbadt7-1"
10
+ })(["color:", ";"], Color.EXCEPTIONAL);
package/_devel/index.d.ts CHANGED
@@ -4,6 +4,6 @@ export type ParcelResult<P> = {
4
4
  unmount: () => void;
5
5
  };
6
6
  export type ParcelProps = {
7
- context: SPAContextType;
7
+ spaContext: SPAContextType;
8
8
  };
9
9
  export declare function parcel(container: HTMLElement): ParcelResult<ParcelProps>;
package/_devel/index.js CHANGED
@@ -9,9 +9,9 @@ export function parcel(container) {
9
9
  return {
10
10
  render(props) {
11
11
  root.render(React.createElement(Router, {
12
- history: props.context.history
12
+ history: props.spaContext.history
13
13
  }, React.createElement(SPAContextProvider, {
14
- value: props.context
14
+ value: props.spaContext
15
15
  }, React.createElement(Switch, null, React.createElement(Route, {
16
16
  path: "/:url",
17
17
  exact: true,
package/package.json CHANGED
@@ -6,6 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "scripts": {
8
8
  "start": "npm run playground",
9
+ "dev": "`pushwoosh-engine app:command:dev`",
9
10
  "build": "pushwoosh-engine lib:build",
10
11
  "playground": "`pushwoosh-engine lib:command:playground`",
11
12
  "check": "npm run check:lint && npm run check:types",
@@ -51,5 +52,5 @@
51
52
  "engines": {
52
53
  "node": ">= 18"
53
54
  },
54
- "version": "1.0.10"
55
+ "version": "1.0.11"
55
56
  }