@redneckz/wildless-cms-uni-blocks 0.13.14 → 0.13.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 (25) hide show
  1. package/bundle/bundle.umd.js +1 -1
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
  4. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
  5. package/dist/components/ContentPage/normalizeBlock.mobile.js +2 -2
  6. package/dist/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
  7. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
  8. package/lib/components/ContentPage/normalizeBlock.mobile.js +2 -2
  9. package/lib/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
  10. package/mobile/bundle/bundle.umd.js +1 -1
  11. package/mobile/bundle/bundle.umd.min.js +1 -1
  12. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
  13. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
  14. package/mobile/dist/components/ContentPage/normalizeBlock.js +2 -2
  15. package/mobile/dist/components/ContentPage/normalizeBlock.js.map +1 -1
  16. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +1 -1
  17. package/mobile/lib/components/ContentPage/normalizeBlock.js +2 -2
  18. package/mobile/lib/components/ContentPage/normalizeBlock.js.map +1 -1
  19. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +3 -0
  20. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +1 -1
  21. package/mobile/src/components/ContentPage/normalizeBlock.ts +7 -2
  22. package/package.json +1 -1
  23. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +3 -0
  24. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +1 -1
  25. package/src/components/ContentPage/normalizeBlock.mobile.ts +7 -2
@@ -2,8 +2,8 @@ import type { AlignProps, HeadlineCommonProps } from '../../model/HeadlineType';
2
2
  import type { UniBlockContent } from '../../model/JSXBlock';
3
3
  import type { LinkCommonProps } from '../../model/LinkProps';
4
4
  import type { IconProps } from '../../model/Picture';
5
- import type { ListContent } from '../../ui-kit/List/ListContent';
6
5
  import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
6
+ import type { ListContent } from '../../ui-kit/List/ListContent';
7
7
  export declare type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonContent;
8
8
  /**
9
9
  * @title Карточка рекомендаций
@@ -2,8 +2,8 @@ import type { AlignProps, HeadlineCommonProps } from '../../model/HeadlineType';
2
2
  import type { UniBlockContent } from '../../model/JSXBlock';
3
3
  import type { LinkCommonProps } from '../../model/LinkProps';
4
4
  import type { IconProps } from '../../model/Picture';
5
- import type { ListContent } from '../../ui-kit/List/ListContent';
6
5
  import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
6
+ import type { ListContent } from '../../ui-kit/List/ListContent';
7
7
  export declare type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonContent;
8
8
  /**
9
9
  * @title Карточка рекомендаций
@@ -2,9 +2,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.normalizeBlock = void 0;
3
3
  const mapSlot_1 = require("./mapSlot");
4
4
  function normalizeBlock(block, blocksRegistry) {
5
- const { mobile, ...rest } = (block || {});
5
+ const { mobile, ...desktop } = (block || {});
6
6
  const result = mobile
7
- ? { ...rest, ...mobile, content: { ...rest.content, ...mobile.content } }
7
+ ? Object.assign({}, desktop, mobile.style ? { style: mobile.style } : {}, mobile.content ? { content: mobile.content } : {})
8
8
  : block;
9
9
  return (0, mapSlot_1.mapSlot)(filterBlocks(blocksRegistry))(result || {});
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":";;AAEA,uCAAoC;AAEpC,SAAgB,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM;QACnB,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE;QACzE,CAAC,CAAC,KAAK,CAAC;IAEV,OAAO,IAAA,iBAAO,EAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAM,CAAC;AAClE,CAAC;AAPD,wCAOC;AAED,MAAM,YAAY,GAChB,CAAC,cAA+B,EAAE,EAAE,CACpC,CAAC,MAAmB,EAAc,EAAE,CAClC,MAAM;IACJ,CAAC,CAAC,MAAM;QACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,cAAc;QACd,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc;QAC5D,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CACxB;SACA,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAC1D,CAAC,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":";;AAEA,uCAAoC;AAEpC,SAAgB,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IACzD,MAAM,MAAM,GAAG,MAAM;QACnB,CAAC,CAAC,MAAM,CAAC,MAAM,CACX,EAAE,EACF,OAAO,EACP,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAC3C,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAClD;QACH,CAAC,CAAC,KAAK,CAAC;IAEV,OAAO,IAAA,iBAAO,EAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAM,CAAC;AAClE,CAAC;AAZD,wCAYC;AAED,MAAM,YAAY,GAChB,CAAC,cAA+B,EAAE,EAAE,CACpC,CAAC,MAAmB,EAAc,EAAE,CAClC,MAAM;IACJ,CAAC,CAAC,MAAM;QACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,cAAc;QACd,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc;QAC5D,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CACxB;SACA,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAC1D,CAAC,CAAC,EAAE,CAAC"}
@@ -2,8 +2,8 @@ import type { AlignProps, HeadlineCommonProps } from '../../model/HeadlineType';
2
2
  import type { UniBlockContent } from '../../model/JSXBlock';
3
3
  import type { LinkCommonProps } from '../../model/LinkProps';
4
4
  import type { IconProps } from '../../model/Picture';
5
- import type { ListContent } from '../../ui-kit/List/ListContent';
6
5
  import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
6
+ import type { ListContent } from '../../ui-kit/List/ListContent';
7
7
  export declare type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonContent;
8
8
  /**
9
9
  * @title Карточка рекомендаций
@@ -1,8 +1,8 @@
1
1
  import { mapSlot } from './mapSlot.js';
2
2
  export function normalizeBlock(block, blocksRegistry) {
3
- const { mobile, ...rest } = (block || {});
3
+ const { mobile, ...desktop } = (block || {});
4
4
  const result = mobile
5
- ? { ...rest, ...mobile, content: { ...rest.content, ...mobile.content } }
5
+ ? Object.assign({}, desktop, mobile.style ? { style: mobile.style } : {}, mobile.content ? { content: mobile.content } : {})
6
6
  : block;
7
7
  return mapSlot(filterBlocks(blocksRegistry))(result || {});
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAU,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IACtD,MAAM,MAAM,GAAG,MAAM;QACnB,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE;QACzE,CAAC,CAAC,KAAK,CAAC;IAEV,OAAO,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAM,CAAC;AAClE,CAAC;AAED,MAAM,YAAY,GAChB,CAAC,cAA+B,EAAE,EAAE,CACpC,CAAC,MAAmB,EAAc,EAAE,CAClC,MAAM;IACJ,CAAC,CAAC,MAAM;QACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,cAAc;QACd,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc;QAC5D,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CACxB;SACA,GAAG,CAA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C;IAC1D,CAAC,CAAC,EAAE,CAAC"}
@@ -7,6 +7,9 @@
7
7
  "items": {
8
8
  "icon": {
9
9
  "ui:field": "icon"
10
+ },
11
+ "iconRight": {
12
+ "ui:field": "icon"
10
13
  }
11
14
  }
12
15
  }
@@ -2,8 +2,8 @@ import type { AlignProps, HeadlineCommonProps } from '../../model/HeadlineType';
2
2
  import type { UniBlockContent } from '../../model/JSXBlock';
3
3
  import type { LinkCommonProps } from '../../model/LinkProps';
4
4
  import type { IconProps } from '../../model/Picture';
5
- import type { ListContent } from '../../ui-kit/List/ListContent';
6
5
  import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
6
+ import type { ListContent } from '../../ui-kit/List/ListContent';
7
7
 
8
8
  export type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonContent;
9
9
 
@@ -3,9 +3,14 @@ import type { BlockDef, Slot } from '../../model/ContentPageDef';
3
3
  import { mapSlot } from './mapSlot';
4
4
 
5
5
  export function normalizeBlock<S extends Slot>(block?: S, blocksRegistry?: BlocksRegistry): S {
6
- const { mobile, ...rest } = (block || {}) as BlockDef;
6
+ const { mobile, ...desktop } = (block || {}) as BlockDef;
7
7
  const result = mobile
8
- ? { ...rest, ...mobile, content: { ...rest.content, ...mobile.content } }
8
+ ? Object.assign(
9
+ {},
10
+ desktop,
11
+ mobile.style ? { style: mobile.style } : {},
12
+ mobile.content ? { content: mobile.content } : {},
13
+ )
9
14
  : block;
10
15
 
11
16
  return mapSlot(filterBlocks(blocksRegistry))(result || {}) as S;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.13.14",
3
+ "version": "0.13.15",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -7,6 +7,9 @@
7
7
  "items": {
8
8
  "icon": {
9
9
  "ui:field": "icon"
10
+ },
11
+ "iconRight": {
12
+ "ui:field": "icon"
10
13
  }
11
14
  }
12
15
  }
@@ -2,8 +2,8 @@ import type { AlignProps, HeadlineCommonProps } from '../../model/HeadlineType';
2
2
  import type { UniBlockContent } from '../../model/JSXBlock';
3
3
  import type { LinkCommonProps } from '../../model/LinkProps';
4
4
  import type { IconProps } from '../../model/Picture';
5
- import type { ListContent } from '../../ui-kit/List/ListContent';
6
5
  import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
6
+ import type { ListContent } from '../../ui-kit/List/ListContent';
7
7
 
8
8
  export type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonContent;
9
9
 
@@ -3,9 +3,14 @@ import type { BlockDef, Slot } from '../../model/ContentPageDef';
3
3
  import { mapSlot } from './mapSlot';
4
4
 
5
5
  export function normalizeBlock<S extends Slot>(block?: S, blocksRegistry?: BlocksRegistry): S {
6
- const { mobile, ...rest } = (block || {}) as BlockDef;
6
+ const { mobile, ...desktop } = (block || {}) as BlockDef;
7
7
  const result = mobile
8
- ? { ...rest, ...mobile, content: { ...rest.content, ...mobile.content } }
8
+ ? Object.assign(
9
+ {},
10
+ desktop,
11
+ mobile.style ? { style: mobile.style } : {},
12
+ mobile.content ? { content: mobile.content } : {},
13
+ )
9
14
  : block;
10
15
 
11
16
  return mapSlot(filterBlocks(blocksRegistry))(result || {}) as S;