@redneckz/wildless-cms-uni-blocks 0.8.13 → 0.8.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.
Files changed (33) hide show
  1. package/bin/migration-scripts/0.8.10.js +1 -1
  2. package/bin/migration-scripts/0.8.15.js +29 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +7 -4
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  7. package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  8. package/dist/components/ProductBlock/ProductBlockInner.js +3 -2
  9. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  10. package/dist/ui-kit/BlockWrapper.js +4 -1
  11. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  12. package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  13. package/lib/components/ProductBlock/ProductBlockInner.js +3 -2
  14. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  15. package/lib/ui-kit/BlockWrapper.js +4 -1
  16. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  17. package/mobile/bundle/bundle.umd.js +5 -2
  18. package/mobile/bundle/bundle.umd.min.js +1 -1
  19. package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  20. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  21. package/mobile/dist/ui-kit/BlockWrapper.js +4 -1
  22. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  23. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  24. package/mobile/lib/ui-kit/BlockWrapper.js +4 -1
  25. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  26. package/mobile/src/components/ProductBlock/ProductBlock.ui.json +3 -0
  27. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +2 -0
  28. package/mobile/src/ui-kit/BlockWrapper.tsx +6 -1
  29. package/package.json +1 -1
  30. package/src/components/ProductBlock/ProductBlock.ui.json +3 -0
  31. package/src/components/ProductBlock/ProductBlockContent.ts +2 -0
  32. package/src/components/ProductBlock/ProductBlockInner.tsx +7 -0
  33. package/src/ui-kit/BlockWrapper.tsx +6 -1
@@ -30,7 +30,12 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
30
30
  () =>
31
31
  defaultEventBus.subscribe('tab', (event) => {
32
32
  setHidden(
33
- Boolean(event.type === 'group' && event.label && block?.labels?.includes(event.label)),
33
+ Boolean(
34
+ event.type === 'group' &&
35
+ event.label &&
36
+ block?.labels?.length &&
37
+ !block.labels.includes(event.label),
38
+ ),
34
39
  );
35
40
  }),
36
41
  [block],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.8.13",
3
+ "version": "0.8.15",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -7,6 +7,9 @@
7
7
  "iconRight": {
8
8
  "ui:field": "icon"
9
9
  }
10
+ },
11
+ "__html": {
12
+ "ui:widget": "html"
10
13
  }
11
14
  }
12
15
  }
@@ -7,8 +7,10 @@ import type { Picture } from '../../model/Picture';
7
7
  import type { BenefitItemProps } from '../../ui-kit/BenefitItem/BenefitItemProps';
8
8
  import type { BackwardButtonProps, ButtonContent } from '../../ui-kit/Button/ButtonProps';
9
9
  import type { ListContent } from '../../ui-kit/List/ListContent';
10
+ import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
10
11
 
11
12
  export type ProductBlockInnerContent = HeadlineProps &
13
+ RichTextProps &
12
14
  ListContent &
13
15
  ButtonContent &
14
16
  Footnote & {
@@ -3,6 +3,7 @@ import type { UniBlockProps } from '../../model/JSXBlock';
3
3
  import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
4
4
  import { Img } from '../../ui-kit/Img/Img';
5
5
  import { List } from '../../ui-kit/List/List';
6
+ import { RichText } from '../../ui-kit/RichText/RichText';
6
7
  import { style } from '../../utils/style';
7
8
  import { BaseTile } from '../BaseTile/BaseTile';
8
9
  import { Headline } from '../Headline/Headline';
@@ -23,6 +24,7 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
23
24
  buttons,
24
25
  footnote,
25
26
  image,
27
+ __html,
26
28
  items,
27
29
  version = 'primary',
28
30
  isDotted = true,
@@ -48,6 +50,11 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
48
50
  {benefits.map(renderBenefit(version, benefitsVersion))}
49
51
  </div>
50
52
  ) : null}
53
+ {__html ? (
54
+ <div className="mt-5">
55
+ <RichText __html={__html} />
56
+ </div>
57
+ ) : null}
51
58
  {items?.length ? (
52
59
  <List
53
60
  className="mt-5 text-h6"
@@ -30,7 +30,12 @@ export const BlockWrapper = JSX<BlockWrapperProps>(
30
30
  () =>
31
31
  defaultEventBus.subscribe('tab', (event) => {
32
32
  setHidden(
33
- Boolean(event.type === 'group' && event.label && block?.labels?.includes(event.label)),
33
+ Boolean(
34
+ event.type === 'group' &&
35
+ event.label &&
36
+ block?.labels?.length &&
37
+ !block.labels.includes(event.label),
38
+ ),
34
39
  );
35
40
  }),
36
41
  [block],