@redneckz/wildless-cms-uni-blocks 0.8.7 → 0.8.9
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.
- package/bundle/EventBus/EventBus.d.ts +1 -4
- package/bundle/EventBus/defaultEventBus.d.ts +7 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +34 -70
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/bundle/components/ProductTile/ProductTileContent.d.ts +4 -13
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +6 -4
- package/bundle/components/TextBlock/TextBlockContent.d.ts +3 -2
- package/bundle/hooks/useRouter.d.ts +6 -2
- package/bundle/model/DefaultListItemType.d.ts +4 -0
- package/bundle/model/RichTextItem.d.ts +8 -0
- package/bundle/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/bundle/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/bundle/ui-kit/BenefitItem/BenefitItemProps.d.ts +4 -13
- package/dist/EventBus/EventBus.d.ts +1 -4
- package/dist/EventBus/EventBus.js +0 -1
- package/dist/EventBus/EventBus.js.map +1 -1
- package/dist/EventBus/defaultEventBus.d.ts +7 -0
- package/dist/EventBus/defaultEventBus.js +5 -0
- package/dist/EventBus/defaultEventBus.js.map +1 -0
- package/dist/components/ButtonBlock/ButtonBlock.js +2 -1
- package/dist/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/dist/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/dist/components/ProductTile/ProductTile.js +1 -2
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +4 -13
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +6 -4
- package/dist/components/Tabs/Tabs.js +4 -4
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +3 -2
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +3 -2
- package/dist/hooks/useLink.js +2 -3
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/hooks/useRouter.d.ts +6 -2
- package/dist/hooks/useRouter.js.map +1 -1
- package/dist/model/DefaultListItemType.d.ts +4 -0
- package/dist/model/DefaultListItemType.js +2 -0
- package/dist/model/DefaultListItemType.js.map +1 -0
- package/dist/model/RichTextItem.d.ts +8 -0
- package/{mobile/dist/EventBus/EventMap.js → dist/model/RichTextItem.js} +1 -1
- package/dist/model/RichTextItem.js.map +1 -0
- package/dist/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/dist/services/BlockRouter/BlockRouter.js +11 -30
- package/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/dist/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/dist/services/BlockRouter/blockRouterEventBus.js +5 -0
- package/dist/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/dist/services/BlockRouter/useBlockIntersectionObserver.js +5 -16
- package/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/dist/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/dist/services/BlockRouter/useBlockRouterProvider.js +11 -12
- package/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +4 -13
- package/dist/ui-kit/BlockWrapper.js +2 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/EventBus/EventBus.d.ts +1 -4
- package/lib/EventBus/EventBus.js +0 -1
- package/lib/EventBus/EventBus.js.map +1 -1
- package/lib/EventBus/defaultEventBus.d.ts +7 -0
- package/lib/EventBus/defaultEventBus.js +3 -0
- package/lib/EventBus/defaultEventBus.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ButtonBlock/ButtonBlock.js +2 -1
- package/lib/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/lib/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/lib/components/ProductTile/ProductTile.js +1 -2
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +4 -13
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +6 -4
- package/lib/components/Tabs/Tabs.js +4 -4
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +3 -2
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +3 -2
- package/lib/hooks/useLink.js +2 -3
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/hooks/useRouter.d.ts +6 -2
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/model/DefaultListItemType.d.ts +4 -0
- package/lib/model/DefaultListItemType.js +2 -0
- package/lib/model/DefaultListItemType.js.map +1 -0
- package/lib/model/RichTextItem.d.ts +8 -0
- package/lib/model/RichTextItem.js +2 -0
- package/lib/model/RichTextItem.js.map +1 -0
- package/lib/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/lib/services/BlockRouter/BlockRouter.js +8 -28
- package/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/lib/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/lib/services/BlockRouter/blockRouterEventBus.js +3 -0
- package/lib/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/lib/services/BlockRouter/useBlockIntersectionObserver.js +6 -17
- package/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/lib/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/lib/services/BlockRouter/useBlockRouterProvider.js +12 -13
- package/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +4 -13
- package/lib/ui-kit/BlockWrapper.js +2 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/bundle/EventBus/EventBus.d.ts +1 -4
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +7 -0
- package/mobile/bundle/bundle.umd.js +27 -62
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +4 -13
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +6 -4
- package/mobile/bundle/components/TextBlock/TextBlockContent.d.ts +3 -2
- package/mobile/bundle/hooks/useRouter.d.ts +6 -2
- package/mobile/bundle/model/DefaultListItemType.d.ts +4 -0
- package/mobile/bundle/model/RichTextItem.d.ts +8 -0
- package/mobile/bundle/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/mobile/bundle/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/mobile/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/mobile/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/mobile/bundle/ui-kit/BenefitItem/BenefitItemProps.d.ts +4 -13
- package/mobile/dist/EventBus/EventBus.d.ts +1 -4
- package/mobile/dist/EventBus/EventBus.js +0 -1
- package/mobile/dist/EventBus/EventBus.js.map +1 -1
- package/mobile/dist/EventBus/defaultEventBus.d.ts +7 -0
- package/mobile/dist/EventBus/defaultEventBus.js +5 -0
- package/mobile/dist/EventBus/defaultEventBus.js.map +1 -0
- package/mobile/dist/components/ButtonBlock/ButtonBlock.js +2 -1
- package/mobile/dist/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/mobile/dist/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -2
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +4 -13
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +6 -4
- package/mobile/dist/components/Tabs/Tabs.js +4 -4
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +3 -2
- package/mobile/dist/hooks/useLink.js +2 -3
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/hooks/useRouter.d.ts +6 -2
- package/mobile/dist/hooks/useRouter.js.map +1 -1
- package/mobile/dist/model/DefaultListItemType.d.ts +4 -0
- package/mobile/dist/model/DefaultListItemType.js +2 -0
- package/mobile/dist/model/DefaultListItemType.js.map +1 -0
- package/mobile/dist/model/RichTextItem.d.ts +8 -0
- package/{dist/EventBus/EventMap.js → mobile/dist/model/RichTextItem.js} +1 -1
- package/mobile/dist/model/RichTextItem.js.map +1 -0
- package/mobile/dist/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/mobile/dist/services/BlockRouter/BlockRouter.js +11 -30
- package/mobile/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/dist/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/mobile/dist/services/BlockRouter/blockRouterEventBus.js +5 -0
- package/mobile/dist/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js +5 -16
- package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js +11 -12
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +4 -13
- package/mobile/dist/ui-kit/BlockWrapper.js +2 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/EventBus/EventBus.d.ts +1 -4
- package/mobile/lib/EventBus/EventBus.js +0 -1
- package/mobile/lib/EventBus/EventBus.js.map +1 -1
- package/mobile/lib/EventBus/defaultEventBus.d.ts +7 -0
- package/mobile/lib/EventBus/defaultEventBus.js +3 -0
- package/mobile/lib/EventBus/defaultEventBus.js.map +1 -0
- package/mobile/lib/components/ButtonBlock/ButtonBlock.js +2 -1
- package/mobile/lib/components/ButtonBlock/ButtonBlock.js.map +1 -1
- package/mobile/lib/components/ButtonBlock/ButtonBlockContent.d.ts +5 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -2
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +4 -13
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +6 -4
- package/mobile/lib/components/Tabs/Tabs.js +4 -4
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +3 -2
- package/mobile/lib/hooks/useLink.js +2 -3
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/hooks/useRouter.d.ts +6 -2
- package/mobile/lib/hooks/useRouter.js.map +1 -1
- package/mobile/lib/model/DefaultListItemType.d.ts +4 -0
- package/mobile/lib/model/DefaultListItemType.js +2 -0
- package/mobile/lib/model/DefaultListItemType.js.map +1 -0
- package/mobile/lib/model/RichTextItem.d.ts +8 -0
- package/mobile/lib/model/RichTextItem.js +2 -0
- package/mobile/lib/model/RichTextItem.js.map +1 -0
- package/mobile/lib/services/BlockRouter/BlockRouter.d.ts +3 -22
- package/mobile/lib/services/BlockRouter/BlockRouter.js +8 -28
- package/mobile/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/lib/services/BlockRouter/blockRouterEventBus.d.ts +11 -0
- package/mobile/lib/services/BlockRouter/blockRouterEventBus.js +3 -0
- package/mobile/lib/services/BlockRouter/blockRouterEventBus.js.map +1 -0
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +1 -2
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js +6 -17
- package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +1 -1
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.d.ts +1 -2
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js +12 -13
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +4 -13
- package/mobile/lib/ui-kit/BlockWrapper.js +2 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/src/EventBus/EventBus.ts +1 -7
- package/mobile/src/EventBus/defaultEventBus.ts +8 -0
- package/mobile/src/components/ButtonBlock/ButtonBlock.example.json +2 -2
- package/mobile/src/components/ButtonBlock/ButtonBlock.tsx +5 -2
- package/mobile/src/components/ButtonBlock/ButtonBlockContent.ts +5 -1
- package/mobile/src/components/ProductTile/ProductTile.tsx +1 -2
- package/mobile/src/components/ProductTile/ProductTileContent.ts +4 -15
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +13 -13
- package/mobile/src/components/Tabs/Tabs.tsx +4 -4
- package/mobile/src/components/TextBlock/TextBlock.ui.json +7 -1
- package/mobile/src/components/TextBlock/TextBlockContent.ts +12 -10
- package/mobile/src/hooks/useLink.ts +2 -3
- package/mobile/src/hooks/useRouter.ts +6 -2
- package/mobile/src/model/DefaultListItemType.ts +4 -0
- package/mobile/src/model/RichTextItem.ts +9 -0
- package/mobile/src/services/BlockRouter/BlockRouter.ts +8 -47
- package/mobile/src/services/BlockRouter/blockRouterEventBus.ts +13 -0
- package/mobile/src/services/BlockRouter/useBlockIntersectionObserver.ts +6 -23
- package/mobile/src/services/BlockRouter/useBlockRouterProvider.ts +13 -19
- package/mobile/src/ui-kit/BenefitItem/BenefitItemProps.ts +4 -14
- package/mobile/src/ui-kit/BlockWrapper.tsx +2 -2
- package/package.json +1 -1
- package/src/EventBus/EventBus.ts +1 -7
- package/src/EventBus/defaultEventBus.ts +8 -0
- package/src/components/ButtonBlock/ButtonBlock.example.json +2 -2
- package/src/components/ButtonBlock/ButtonBlock.tsx +5 -2
- package/src/components/ButtonBlock/ButtonBlockContent.ts +5 -1
- package/src/components/ProductTile/ProductTile.tsx +1 -2
- package/src/components/ProductTile/ProductTileContent.ts +4 -15
- package/src/components/StepsBlock/StepsBlockContent.ts +13 -13
- package/src/components/Tabs/Tabs.tsx +4 -4
- package/src/components/TextBlock/TextBlock.tsx +3 -0
- package/src/components/TextBlock/TextBlock.ui.json +7 -1
- package/src/components/TextBlock/TextBlockContent.ts +12 -10
- package/src/hooks/useLink.ts +2 -3
- package/src/hooks/useRouter.ts +6 -2
- package/src/model/DefaultListItemType.ts +4 -0
- package/src/model/RichTextItem.ts +9 -0
- package/src/services/BlockRouter/BlockRouter.ts +8 -47
- package/src/services/BlockRouter/blockRouterEventBus.ts +13 -0
- package/src/services/BlockRouter/useBlockIntersectionObserver.ts +6 -23
- package/src/services/BlockRouter/useBlockRouterProvider.ts +13 -19
- package/src/ui-kit/BenefitItem/BenefitItemProps.ts +4 -14
- package/src/ui-kit/BlockWrapper.tsx +2 -2
- package/bundle/EventBus/EventMap.d.ts +0 -4
- package/bundle/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/dist/EventBus/EventMap.d.ts +0 -4
- package/dist/EventBus/EventMap.js.map +0 -1
- package/dist/model/BlurVersion.d.ts +0 -0
- package/dist/model/BlurVersion.js +0 -1
- package/dist/model/BlurVersion.js.map +0 -1
- package/dist/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/dist/services/BlockRouter/useBlockRouter.js +0 -8
- package/dist/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/lib/EventBus/EventMap.d.ts +0 -4
- package/lib/EventBus/EventMap.js +0 -2
- package/lib/EventBus/EventMap.js.map +0 -1
- package/lib/model/BlurVersion.d.ts +0 -0
- package/lib/model/BlurVersion.js +0 -1
- package/lib/model/BlurVersion.js.map +0 -1
- package/lib/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/lib/services/BlockRouter/useBlockRouter.js +0 -5
- package/lib/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/mobile/bundle/EventBus/EventMap.d.ts +0 -4
- package/mobile/bundle/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/mobile/dist/EventBus/EventMap.d.ts +0 -4
- package/mobile/dist/EventBus/EventMap.js.map +0 -1
- package/mobile/dist/model/BlurVersion.d.ts +0 -0
- package/mobile/dist/model/BlurVersion.js +0 -1
- package/mobile/dist/model/BlurVersion.js.map +0 -1
- package/mobile/dist/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/mobile/dist/services/BlockRouter/useBlockRouter.js +0 -8
- package/mobile/dist/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/mobile/lib/EventBus/EventMap.d.ts +0 -4
- package/mobile/lib/EventBus/EventMap.js +0 -2
- package/mobile/lib/EventBus/EventMap.js.map +0 -1
- package/mobile/lib/model/BlurVersion.d.ts +0 -0
- package/mobile/lib/model/BlurVersion.js +0 -1
- package/mobile/lib/model/BlurVersion.js.map +0 -1
- package/mobile/lib/services/BlockRouter/useBlockRouter.d.ts +0 -2
- package/mobile/lib/services/BlockRouter/useBlockRouter.js +0 -5
- package/mobile/lib/services/BlockRouter/useBlockRouter.js.map +0 -1
- package/mobile/src/EventBus/EventMap.ts +0 -5
- package/mobile/src/model/BlurVersion.ts +0 -0
- package/mobile/src/services/BlockRouter/useBlockRouter.ts +0 -5
- package/src/EventBus/EventMap.ts +0 -5
- package/src/model/BlurVersion.ts +0 -0
- package/src/services/BlockRouter/useBlockRouter.ts +0 -5
|
@@ -3,6 +3,10 @@ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
|
3
3
|
* @title Блок Кнопка
|
|
4
4
|
*/
|
|
5
5
|
export interface ButtonBlockContent {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title Кнопка
|
|
8
|
+
* @default {"icon": {"format": "webp", "size": { "width": 24, "height": 24 }},
|
|
9
|
+
* "iconRight": {"format": "webp", "size": { "width": 24, "height": 24 }}}
|
|
10
|
+
*/
|
|
7
11
|
button?: ButtonWithIconProps;
|
|
8
12
|
}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { DefaultListItemType } from '../../model/DefaultListItemType';
|
|
2
3
|
import type { DescriptionProps, HeadlineProps, LabelProps } from '../../model/HeadlineType';
|
|
3
4
|
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import type { RichTextItem } from '../../model/RichTextItem';
|
|
4
6
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
6
7
|
/**
|
|
7
8
|
* @title Стандартный
|
|
8
9
|
*/
|
|
9
|
-
declare type TextBenefit = DescriptionProps & LabelProps &
|
|
10
|
-
/** @default default */
|
|
11
|
-
type: 'default';
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* @title Форматированный текст
|
|
15
|
-
*/
|
|
16
|
-
declare type RichText = RichTextProps & {
|
|
17
|
-
/** @default rte */
|
|
18
|
-
type: 'rte';
|
|
19
|
-
};
|
|
10
|
+
declare type TextBenefit = DescriptionProps & LabelProps & DefaultListItemType;
|
|
20
11
|
/**
|
|
21
12
|
* @title Преимущество
|
|
22
13
|
* @default{
|
|
23
14
|
* "type": "default"
|
|
24
15
|
* }
|
|
25
16
|
*/
|
|
26
|
-
export declare type Benefit = TextBenefit |
|
|
17
|
+
export declare type Benefit = TextBenefit | RichTextItem;
|
|
27
18
|
/**
|
|
28
19
|
* @title Продуктовая плитка
|
|
29
20
|
*/
|
|
@@ -3,10 +3,7 @@ import type { DescriptionProps, HeadlineCommonProps, LabelProps } from '../../mo
|
|
|
3
3
|
import type { IconProps } from '../../model/Picture';
|
|
4
4
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
5
5
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
-
|
|
7
|
-
* @title Шаг
|
|
8
|
-
*/
|
|
9
|
-
export declare type Step = DescriptionProps & LabelProps & IconProps & {
|
|
6
|
+
declare type StepCommonProps = IconProps & {
|
|
10
7
|
/** @title Кнопка */
|
|
11
8
|
button?: ButtonWithIconProps;
|
|
12
9
|
/**
|
|
@@ -17,6 +14,10 @@ export declare type Step = DescriptionProps & LabelProps & IconProps & {
|
|
|
17
14
|
/** @title Список */
|
|
18
15
|
items?: string[];
|
|
19
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* @title Шаг
|
|
19
|
+
*/
|
|
20
|
+
export declare type Step = DescriptionProps & LabelProps & StepCommonProps;
|
|
20
21
|
/**
|
|
21
22
|
* @title Блок шаги
|
|
22
23
|
*/
|
|
@@ -41,3 +42,4 @@ export declare type StepsBlockContent = HeadlineCommonProps & {
|
|
|
41
42
|
size?: SizeVersion;
|
|
42
43
|
version?: BlockVersion;
|
|
43
44
|
};
|
|
45
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Picture } from '../../model/Picture';
|
|
2
1
|
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { Picture } from '../../model/Picture';
|
|
3
|
+
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
3
4
|
/**
|
|
4
5
|
* @title Цвет блока
|
|
5
6
|
* @enumNames ["Основная", "Второстепенная", "Второстепенная прозрачная"]
|
|
@@ -13,7 +14,7 @@ export declare type TextBlockIconVersion = 'none' | 'small' | 'big';
|
|
|
13
14
|
/**
|
|
14
15
|
* @title Текстовый блок
|
|
15
16
|
*/
|
|
16
|
-
export declare type TextBlockContent = HeadlineCommonProps & {
|
|
17
|
+
export declare type TextBlockContent = HeadlineCommonProps & RichTextProps & {
|
|
17
18
|
iconVersion?: TextBlockIconVersion;
|
|
18
19
|
image?: Picture;
|
|
19
20
|
blockVersion?: TextBlockVersion;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
interface RouterOptions {
|
|
2
|
+
scroll?: boolean;
|
|
3
|
+
}
|
|
1
4
|
export interface Router {
|
|
2
5
|
pathname: string;
|
|
3
6
|
query: Record<string, string | string[] | undefined>;
|
|
4
7
|
href?: string;
|
|
5
8
|
basePath?: string;
|
|
6
|
-
push: (url: string) => void;
|
|
7
|
-
replace: (url: string) => void;
|
|
9
|
+
push: (url: string, as?: string, options?: RouterOptions) => void;
|
|
10
|
+
replace: (url: string, as?: string, options?: RouterOptions) => void;
|
|
8
11
|
}
|
|
9
12
|
export declare function useRouter(): Router;
|
|
10
13
|
export declare namespace useRouter {
|
|
11
14
|
var _impl: () => Router;
|
|
12
15
|
var setup: (impl: () => Router) => void;
|
|
13
16
|
}
|
|
17
|
+
export {};
|
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Router } from '../../hooks/useRouter';
|
|
2
2
|
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export interface BlockIntersectionEvent {
|
|
7
|
-
block: BlockDef;
|
|
8
|
-
intersection: IntersectionObserverEntry;
|
|
9
|
-
}
|
|
10
|
-
interface EventMap {
|
|
11
|
-
goto: GotoAnchorEvent;
|
|
12
|
-
intersection: BlockIntersectionEvent;
|
|
13
|
-
}
|
|
14
|
-
export declare class BlockRouter {
|
|
15
|
-
static readonly inst: BlockRouter;
|
|
16
|
-
readonly eventBus: EventBus<EventMap>;
|
|
17
|
-
constructor();
|
|
18
|
-
goto(rawAnchor?: string): void;
|
|
19
|
-
push(rawAnchor: string): void;
|
|
20
|
-
replace(rawAnchor: string): void;
|
|
21
|
-
reset(): void;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
3
|
+
export declare function gotoBlock(router: Router, anchor?: string): void;
|
|
4
|
+
export declare function trackBlock(router: Router, block?: BlockDef): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EventBus } from '../../EventBus/EventBus';
|
|
2
|
+
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
+
export interface BlockIntersectionEvent {
|
|
4
|
+
block: BlockDef;
|
|
5
|
+
intersection: IntersectionObserverEntry;
|
|
6
|
+
}
|
|
7
|
+
interface EventMap {
|
|
8
|
+
intersection: BlockIntersectionEvent;
|
|
9
|
+
}
|
|
10
|
+
export declare const blockRouterEventBus: EventBus<EventMap>;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { BlockDef } from '../../model/ContentPageDef';
|
|
2
|
-
|
|
3
|
-
export declare function useBlockIntersectionObserver(block?: BlockDef, router?: BlockRouter): {
|
|
2
|
+
export declare function useBlockIntersectionObserver(block?: BlockDef): {
|
|
4
3
|
current: Element | null;
|
|
5
4
|
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function useBlockRouterProvider(router?: BlockRouter, scrollTarget?: EventTarget): void;
|
|
1
|
+
export declare function useBlockRouterProvider(scrollTarget?: EventTarget): void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { DefaultListItemType } from '../../model/DefaultListItemType';
|
|
2
3
|
import type { DescriptionProps, LabelProps } from '../../model/HeadlineType';
|
|
3
4
|
import type { IconVersion } from '../../model/IconVersion';
|
|
4
5
|
import type { IconProps } from '../../model/Picture';
|
|
5
|
-
import {
|
|
6
|
+
import type { RichTextItem } from '../../model/RichTextItem';
|
|
6
7
|
export interface BenefitItemCommonProps {
|
|
7
8
|
/** @hidden */
|
|
8
9
|
benefitsVersion?: IconVersion;
|
|
@@ -15,24 +16,14 @@ export declare type BenefitItemProps = DescriptionProps & LabelProps & IconProps
|
|
|
15
16
|
/**
|
|
16
17
|
* @title Стандартный бенефит
|
|
17
18
|
*/
|
|
18
|
-
declare type DefaultBenefit = BenefitItemProps &
|
|
19
|
-
/** @default default */
|
|
20
|
-
type: 'default';
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @title Форматированный текст
|
|
24
|
-
*/
|
|
25
|
-
declare type RichText = RichTextProps & {
|
|
26
|
-
/** @default rte */
|
|
27
|
-
type: 'rte';
|
|
28
|
-
};
|
|
19
|
+
declare type DefaultBenefit = BenefitItemProps & DefaultListItemType;
|
|
29
20
|
/**
|
|
30
21
|
* @title Преимущество
|
|
31
22
|
* @default{
|
|
32
23
|
* "type": "default"
|
|
33
24
|
* }
|
|
34
25
|
*/
|
|
35
|
-
export declare type ComplexBenefitProps = DefaultBenefit |
|
|
26
|
+
export declare type ComplexBenefitProps = DefaultBenefit | RichTextItem;
|
|
36
27
|
/**
|
|
37
28
|
* @title Преимущество
|
|
38
29
|
*/
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare type BaseEventMap = Record<string, any>;
|
|
3
|
-
export declare class EventBus<EM extends BaseEventMap> {
|
|
4
|
-
static readonly inst: EventBus<EventMap>;
|
|
1
|
+
export declare class EventBus<EM extends Record<string, any>> {
|
|
5
2
|
private subscribers;
|
|
6
3
|
private subjectsStateMap;
|
|
7
4
|
subscribe<K extends keyof EM>(type: K, listener: (event: EM[K]) => void): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventBus.js","sourceRoot":"","sources":["../../src/EventBus/EventBus.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"EventBus.js","sourceRoot":"","sources":["../../src/EventBus/EventBus.ts"],"names":[],"mappings":";;AAAA,MAAa,QAAQ;IACX,WAAW,GAAiE,EAAE,CAAC;IAC/E,gBAAgB,GAAgB,EAAE,CAAC;IAE3C,SAAS,CAAqB,IAAO,EAAE,QAAgC;QACrE,IAAI,CAAC,WAAW,CAAC,IAAI,CA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@ -4,5 +4,6 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
6
|
const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
|
|
7
|
-
|
|
7
|
+
const style_1 = require("../../utils/style");
|
|
8
|
+
exports.ButtonBlock = (0, uni_jsx_1.JSX)(({ button, className, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('!bg-transparent', className), ...rest, children: (0, renderButtonsSection_1.renderButtonsSection)([button]) })));
|
|
8
9
|
//# sourceMappingURL=ButtonBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBlock.js","sourceRoot":"","sources":["../../../src/components/ButtonBlock/ButtonBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;
|
|
1
|
+
{"version":3,"file":"ButtonBlock.js","sourceRoot":"","sources":["../../../src/components/ButtonBlock/ButtonBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;AAChF,6CAA0C;AAK7B,QAAA,WAAW,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACnF,uBAAC,2BAAY,IAAC,SAAS,EAAE,IAAA,aAAK,EAAC,iBAAiB,EAAE,SAAS,CAAC,KAAM,IAAI,YACnE,IAAA,2CAAoB,EAAC,CAAC,MAAM,CAAC,CAAC,GAClB,CAChB,CAAC,CAAC"}
|
|
@@ -3,6 +3,10 @@ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
|
3
3
|
* @title Блок Кнопка
|
|
4
4
|
*/
|
|
5
5
|
export interface ButtonBlockContent {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @title Кнопка
|
|
8
|
+
* @default {"icon": {"format": "webp", "size": { "width": 24, "height": 24 }},
|
|
9
|
+
* "iconRight": {"format": "webp", "size": { "width": 24, "height": 24 }}}
|
|
10
|
+
*/
|
|
7
11
|
button?: ButtonWithIconProps;
|
|
8
12
|
}
|
|
@@ -17,7 +17,6 @@ function renderBenefits(benefits, image) {
|
|
|
17
17
|
}
|
|
18
18
|
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
19
19
|
const benefitsWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
21
|
-
${benefitsWidth}`, children: benefits.length ? benefits.map(renderBenefit_1.renderBenefit) : null }));
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline ${benefitsWidth}`, children: benefits.length ? benefits.map(renderBenefit_1.renderBenefit) : null }));
|
|
22
21
|
}
|
|
23
22
|
//# sourceMappingURL=ProductTile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,mFAAgF;AAChF,6CAA0C;AAC1C,yEAAsE;AACtE,mDAAgD;AAEhD,+EAA4E;AAC5E,mDAAgD;AAChD,+CAA4C;AAI/B,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,KAAK,EACL,eAAe,GAAG,GAAG,EACrB,WAAW,EACX,qBAAqB,EACrB,QAAQ,GAAG,EAAE,EACb,OAAO,EACP,KAAK,EACL,kBA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GAAwG;IACxG,MAAM,aAAa,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,CAAC;IAEvE,OAAO,CACL,gCACE,SAAS,EAAE,yFAAyF,aAAa,EAAE,YAElH,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,6BAAa,CAAC,CAAC,CAAC,CAAC,IAAI,GACjD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { DefaultListItemType } from '../../model/DefaultListItemType';
|
|
2
3
|
import type { DescriptionProps, HeadlineProps, LabelProps } from '../../model/HeadlineType';
|
|
3
4
|
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import type { RichTextItem } from '../../model/RichTextItem';
|
|
4
6
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
6
7
|
/**
|
|
7
8
|
* @title Стандартный
|
|
8
9
|
*/
|
|
9
|
-
declare type TextBenefit = DescriptionProps & LabelProps &
|
|
10
|
-
/** @default default */
|
|
11
|
-
type: 'default';
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* @title Форматированный текст
|
|
15
|
-
*/
|
|
16
|
-
declare type RichText = RichTextProps & {
|
|
17
|
-
/** @default rte */
|
|
18
|
-
type: 'rte';
|
|
19
|
-
};
|
|
10
|
+
declare type TextBenefit = DescriptionProps & LabelProps & DefaultListItemType;
|
|
20
11
|
/**
|
|
21
12
|
* @title Преимущество
|
|
22
13
|
* @default{
|
|
23
14
|
* "type": "default"
|
|
24
15
|
* }
|
|
25
16
|
*/
|
|
26
|
-
export declare type Benefit = TextBenefit |
|
|
17
|
+
export declare type Benefit = TextBenefit | RichTextItem;
|
|
27
18
|
/**
|
|
28
19
|
* @title Продуктовая плитка
|
|
29
20
|
*/
|
|
@@ -3,10 +3,7 @@ import type { DescriptionProps, HeadlineCommonProps, LabelProps } from '../../mo
|
|
|
3
3
|
import type { IconProps } from '../../model/Picture';
|
|
4
4
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
5
5
|
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
|
-
|
|
7
|
-
* @title Шаг
|
|
8
|
-
*/
|
|
9
|
-
export declare type Step = DescriptionProps & LabelProps & IconProps & {
|
|
6
|
+
declare type StepCommonProps = IconProps & {
|
|
10
7
|
/** @title Кнопка */
|
|
11
8
|
button?: ButtonWithIconProps;
|
|
12
9
|
/**
|
|
@@ -17,6 +14,10 @@ export declare type Step = DescriptionProps & LabelProps & IconProps & {
|
|
|
17
14
|
/** @title Список */
|
|
18
15
|
items?: string[];
|
|
19
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* @title Шаг
|
|
19
|
+
*/
|
|
20
|
+
export declare type Step = DescriptionProps & LabelProps & StepCommonProps;
|
|
20
21
|
/**
|
|
21
22
|
* @title Блок шаги
|
|
22
23
|
*/
|
|
@@ -41,3 +42,4 @@ export declare type StepsBlockContent = HeadlineCommonProps & {
|
|
|
41
42
|
size?: SizeVersion;
|
|
42
43
|
version?: BlockVersion;
|
|
43
44
|
};
|
|
45
|
+
export {};
|
|
@@ -3,14 +3,14 @@ exports.Tabs = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
-
const
|
|
6
|
+
const defaultEventBus_1 = require("../../EventBus/defaultEventBus");
|
|
7
7
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
8
8
|
const renderTab_1 = require("./renderTab");
|
|
9
9
|
const ScrollableTabs_1 = require("./ScrollableTabs");
|
|
10
10
|
exports.Tabs = (0, uni_jsx_1.JSX)((props) => {
|
|
11
11
|
const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
|
|
12
12
|
const [currentTab, setCurrentTab] = (0, hooks_1.useState)(tabs ? tabs[0] : undefined);
|
|
13
|
-
(0, hooks_1.useEffect)(() =>
|
|
13
|
+
(0, hooks_1.useEffect)(() => defaultEventBus_1.defaultEventBus.subscribe('tab', (event) => {
|
|
14
14
|
const tab = tabs?.find(checkTab(event));
|
|
15
15
|
if (event.type === 'link' && tab) {
|
|
16
16
|
setCurrentTab(tab);
|
|
@@ -18,11 +18,11 @@ exports.Tabs = (0, uni_jsx_1.JSX)((props) => {
|
|
|
18
18
|
return [];
|
|
19
19
|
}), [tabs]);
|
|
20
20
|
(0, hooks_1.useEffect)(() => currentTab?.type === 'group'
|
|
21
|
-
?
|
|
21
|
+
? defaultEventBus_1.defaultEventBus.subject('tab', { type: currentTab.type, label: currentTab.ref })
|
|
22
22
|
: undefined, [currentTab]);
|
|
23
23
|
const handleClick = (0, hooks_1.useCallback)((selectedTab) => {
|
|
24
24
|
if (selectedTab?.type === 'group') {
|
|
25
|
-
|
|
25
|
+
defaultEventBus_1.defaultEventBus.fire('tab', { type: selectedTab.type, label: selectedTab.ref });
|
|
26
26
|
}
|
|
27
27
|
setCurrentTab(selectedTab);
|
|
28
28
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA+E;AAC/E,oEAAiE;AAEjE,4DAAyD;AACzD,2CAAwC;AACxC,qDAAkD;AAUrC,QAAA,IAAI,GAAG,IAAA,aAAG,EAAiB,CAAC,KAAK,EAAE,EAAE;IAChD,MAAM,EAAE,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EP,OAAO,CACL,uBAAC,2BAAY,IACX,SAAS,EAAE,2CACT,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EACpC,IAAI,SAAS,EAAE,EACf,IAAI,EAAC,SAAS,KACV,IAAI,YAEP,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,CAC3B,uBAAC,+BAAc,IACb,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,KACpB,IAAI,GACR,CACH,CAAC,CAAC,CAAC,CACF,IAAI,EAAE,GAAG,CACP,IAAA,qBAAS,EAAC;YACR,OAAO,EAAE,WAAW;YACpB,UAAU;YACV,WAAW;YACX,GAAG,IAAI;SACR,CAAC,CACH,CACF,GACY,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,CAAC,CAAU,EAAE,EAAE,CAC7D,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -5,15 +5,16 @@ const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
6
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
7
7
|
const Paragraph_1 = require("../../ui-kit/Paragraph/Paragraph");
|
|
8
|
+
const RichText_1 = require("../../ui-kit/RichText/RichText");
|
|
8
9
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
9
10
|
const textBlockBack = {
|
|
10
11
|
primary: 'bg-white',
|
|
11
12
|
secondary: 'bg-primary-main',
|
|
12
13
|
'secondary-light': 'bg-primary-main/10',
|
|
13
14
|
};
|
|
14
|
-
exports.TextBlock = (0, uni_jsx_1.JSX)(({ className = '', title, description, blockVersion = 'primary', iconVersion, image, ...rest }) => {
|
|
15
|
+
exports.TextBlock = (0, uni_jsx_1.JSX)(({ className = '', title, description, blockVersion = 'primary', iconVersion, image, __html, ...rest }) => {
|
|
15
16
|
const isSecondaryBlock = blockVersion === 'secondary';
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `px-9 py-4 flex gap-3 ${textBlockBack[blockVersion]} ${className}`, ...rest, children: [iconVersion === 'small' ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-1", children: renderIcon(isSecondaryBlock) })) : null, iconVersion === 'big' ? renderImage(image) : null, (0, jsx_runtime_1.jsxs)("div", { children: [title ? renderTitle(title, isSecondaryBlock) : null, description ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-1", children: renderDescription(description, isSecondaryBlock) })) : null] })] }));
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `px-9 py-4 flex gap-3 ${textBlockBack[blockVersion]} ${className}`, ...rest, children: [iconVersion === 'small' ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-1", children: renderIcon(isSecondaryBlock) })) : null, iconVersion === 'big' ? renderImage(image) : null, (0, jsx_runtime_1.jsxs)("div", { children: [title ? renderTitle(title, isSecondaryBlock) : null, description ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-1", children: renderDescription(description, isSecondaryBlock) })) : null, __html ? (0, jsx_runtime_1.jsx)(RichText_1.RichText, { __html: __html }) : null] })] }));
|
|
17
18
|
});
|
|
18
19
|
const renderIcon = (isSecondaryBlock) => ((0, jsx_runtime_1.jsx)("div", { className: `rounded-full h-4 w-4 text-center text-xs-light ${isSecondaryBlock ? 'bg-white text-primary-main' : 'bg-primary-main text-white'}`, children: "i" }));
|
|
19
20
|
const renderImage = (image) => (image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: image }) : null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/components/TextBlock/TextBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,8CAA2C;AAC3C,gEAA6D;AAC7D,iDAA8C;AAK9C,MAAM,aAAa,GAAqC;IACtD,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,iBAAiB;IAC5B,iBAAiB,EAAE,oBAAoB;CACxC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,aAAG,EAC1B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,KAAK,EACL,WAAW,EACX,YAAY,GAAG,SAAS,EACxB,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,YAAY,KAAK,WAAW,CAAC;IAEtD,OAAO,CACL,wBAAC,2BAAY,IACX,SAAS,EAAE,wBAAwB,aAAa,CAAC,YAAY,CAAC,IAAI,SAAS,EAAE,KACzE,IAAI,aAEP,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CACzB,gCAAK,SAAS,EAAC,MAAM,YAAE,UAAU,CAAC,gBAAgB,CAAC,GAAO,CAC3D,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAClD,4CACG,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,EACnD,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAC,MAAM,YAAE,iBAAiB,CAAC,WAAW,EAAE,gBAAgB,CAAC,GAAO,CAC/E,CAAC,CAAC,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"TextBlock.js","sourceRoot":"","sources":["../../../src/components/TextBlock/TextBlock.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,4DAAyD;AACzD,8CAA2C;AAC3C,gEAA6D;AAC7D,6DAA0D;AAC1D,iDAA8C;AAK9C,MAAM,aAAa,GAAq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AEF,MAAM,WAAW,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,uBAAC,SAAG,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAErF,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,gBAAyB,EAAE,EAAE,CAAC,CAChE,uBAAC,WAAI,IACH,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,mBAAmB,YAE3D,KAAK,GACD,CACR,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAAE,gBAAyB,EAAE,EAAE,CAAC,CAC5E,uBAAC,qBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,qBAAqB,YACpF,WAAW,GACF,CACb,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Picture } from '../../model/Picture';
|
|
2
1
|
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { Picture } from '../../model/Picture';
|
|
3
|
+
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
3
4
|
/**
|
|
4
5
|
* @title Цвет блока
|
|
5
6
|
* @enumNames ["Основная", "Второстепенная", "Второстепенная прозрачная"]
|
|
@@ -13,7 +14,7 @@ export declare type TextBlockIconVersion = 'none' | 'small' | 'big';
|
|
|
13
14
|
/**
|
|
14
15
|
* @title Текстовый блок
|
|
15
16
|
*/
|
|
16
|
-
export declare type TextBlockContent = HeadlineCommonProps & {
|
|
17
|
+
export declare type TextBlockContent = HeadlineCommonProps & RichTextProps & {
|
|
17
18
|
iconVersion?: TextBlockIconVersion;
|
|
18
19
|
image?: Picture;
|
|
19
20
|
blockVersion?: TextBlockVersion;
|
package/dist/hooks/useLink.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.useLink = void 0;
|
|
3
3
|
const ProjectSettings_1 = require("../ProjectSettings");
|
|
4
|
-
const
|
|
4
|
+
const BlockRouter_1 = require("../services/BlockRouter/BlockRouter");
|
|
5
5
|
const url_1 = require("../utils/url");
|
|
6
6
|
const handlerDecorator_1 = require("./handlerDecorator");
|
|
7
7
|
const useRouter_1 = require("./useRouter");
|
|
8
8
|
function useLink(isRemote) {
|
|
9
9
|
const router = (0, useRouter_1.useRouter)();
|
|
10
|
-
const blockRouter = (0, useBlockRouter_1.useBlockRouter)();
|
|
11
10
|
return (props) => ({
|
|
12
11
|
...props,
|
|
13
12
|
href: adjustHref(props.href),
|
|
@@ -30,7 +29,7 @@ function useLink(isRemote) {
|
|
|
30
29
|
// Client routing
|
|
31
30
|
ev?.preventDefault();
|
|
32
31
|
if ((0, url_1.isHash)(href)) {
|
|
33
|
-
|
|
32
|
+
(0, BlockRouter_1.gotoBlock)(router, href);
|
|
34
33
|
}
|
|
35
34
|
else if (href) {
|
|
36
35
|
router.push(href);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":";;AACA,wDAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":";;AACA,wDAAqD;AACrD,qEAAgE;AAChE,sCAA4D;AAC5D,yDAAsD;AACtD,2CAAwC;AAUxC,SAAgB,OAAO,CAAC,QAAkB;IACxC,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAE3B,OAAO,CAA2C,KAAQ,EAAiB,EAAE,CAAC,CAAC;QAC7E,GAAG,KAAK;QACR,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;QAC5B,YAAY,EAAE,KAAK,CAAC,IAAI;QACxB,OAAO,EAAE,IAAA,mCAAgB,EAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;KACpD,CAAC,CAAC;IAEH,SAAS,UAAU,CAAC,IAAwB;QAC1C,MAAM,gBAAgB,GAAG,CAAC,QAAQ,IAAI,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;QAE5D,OAAO,iCAAe,CAAC,SAAS,IAAI,IAAI,IAAI,gBAAgB;YAC1D,CAAC,CAAC,IAAA,cAAQ,EAAC,iCAAe,CAAC,SAAS,EAAE,IAAI,CAAC;YAC3C,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;IAED,SAAS,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAkC;QAC3E,OAAO,CAAC,EAAqB,EAAE,EAAE;YAC/B,OAAO,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC;YAEvB,IAAI,QAAQ,IAAI,CAAC,IAAA,gBAAU,EAAC,IAAI,EAAE,MAAM,CAAC,EAAE;gBACzC,kBAAkB;gBAClB,OAAO;aACR;YAED,iBAAiB;YACjB,EAAE,EAAE,cAAc,EAAE,CAAC;YACrB,IAAI,IAAA,YAAM,EAAC,IAAI,CAAC,EAAE;gBAChB,IAAA,uBAAS,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;aACzB;iBAAM,IAAI,IAAI,EAAE;gBACf,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACnB;QACH,CAAC,CAAC;IACJ,CAAC;AACH,CAAC;AApCD,0BAoCC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
interface RouterOptions {
|
|
2
|
+
scroll?: boolean;
|
|
3
|
+
}
|
|
1
4
|
export interface Router {
|
|
2
5
|
pathname: string;
|
|
3
6
|
query: Record<string, string | string[] | undefined>;
|
|
4
7
|
href?: string;
|
|
5
8
|
basePath?: string;
|
|
6
|
-
push: (url: string) => void;
|
|
7
|
-
replace: (url: string) => void;
|
|
9
|
+
push: (url: string, as?: string, options?: RouterOptions) => void;
|
|
10
|
+
replace: (url: string, as?: string, options?: RouterOptions) => void;
|
|
8
11
|
}
|
|
9
12
|
export declare function useRouter(): Router;
|
|
10
13
|
export declare namespace useRouter {
|
|
11
14
|
var _impl: () => Router;
|
|
12
15
|
var setup: (impl: () => Router) => void;
|
|
13
16
|
}
|
|
17
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRouter.js","sourceRoot":"","sources":["../../src/hooks/useRouter.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useRouter.js","sourceRoot":"","sources":["../../src/hooks/useRouter.ts"],"names":[],"mappings":";;AAaA,SAAgB,SAAS;IACvB,OAAO,SAAS,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AAFD,8BAEC;AAED,SAAS,CAAC,KAAK,GAAG,GAAW,EAAE,CAAC,CAAC;IAC/B,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE,IAAI,IAAI,GAAG;IACtC,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,QAAQ,IAAI,GAAG;IAC9C,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,GAAG,EAAE;QACT,aAAa;IACf,CAAC;IACD,OAAO,EAAE,GAAG,EAAE;QACZ,aAAa;IACf,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,CAAC,KAAK,GAAG,CAAC,IAAkB,EAAE,EAAE;IACvC,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultListItemType.js","sourceRoot":"","sources":["../../src/model/DefaultListItemType.ts"],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=RichTextItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextItem.js","sourceRoot":"","sources":["../../src/model/RichTextItem.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Router } from '../../hooks/useRouter';
|
|
2
2
|
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export interface BlockIntersectionEvent {
|
|
7
|
-
block: BlockDef;
|
|
8
|
-
intersection: IntersectionObserverEntry;
|
|
9
|
-
}
|
|
10
|
-
interface EventMap {
|
|
11
|
-
goto: GotoAnchorEvent;
|
|
12
|
-
intersection: BlockIntersectionEvent;
|
|
13
|
-
}
|
|
14
|
-
export declare class BlockRouter {
|
|
15
|
-
static readonly inst: BlockRouter;
|
|
16
|
-
readonly eventBus: EventBus<EventMap>;
|
|
17
|
-
constructor();
|
|
18
|
-
goto(rawAnchor?: string): void;
|
|
19
|
-
push(rawAnchor: string): void;
|
|
20
|
-
replace(rawAnchor: string): void;
|
|
21
|
-
reset(): void;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
3
|
+
export declare function gotoBlock(router: Router, anchor?: string): void;
|
|
4
|
+
export declare function trackBlock(router: Router, block?: BlockDef): void;
|