@redneckz/wildless-cms-uni-blocks 0.6.19 → 0.6.21
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/bin/migration-scripts/0.6.19.js +21 -0
- package/bin/migration-scripts/0.6.21.js +15 -0
- package/bundle/bundle.umd.js +49 -22
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Blocks.d.ts +2 -41
- package/bundle/components/Blocks.mobile.d.ts +2 -18
- package/bundle/components/ContentPage/ContentPage.d.ts +2 -2
- package/bundle/components/ContentPage/mapSlot.d.ts +2 -0
- package/bundle/components/ContentPage/normalizeBlock.d.ts +3 -11
- package/bundle/components/ContentPage/normalizeBlock.mobile.d.ts +3 -2
- package/bundle/components/ContentPage/renderBlock.d.ts +7 -3
- package/bundle/components/ContentPage/renderBlockList.d.ts +14 -0
- package/bundle/components/ContentPage/renderSlots.d.ts +12 -0
- package/bundle/model/BlockDecorator.d.ts +4 -3
- package/bundle/model/BlocksRegistry.d.ts +1 -1
- package/bundle/model/ContentPageDef.d.ts +1 -4
- package/bundle/model/JSXBlock.d.ts +3 -1
- package/dist/components/Blocks.d.ts +2 -41
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.d.ts +2 -18
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.d.ts +2 -2
- package/dist/components/ContentPage/ContentPage.js +12 -11
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/mapSlot.d.ts +2 -0
- package/dist/components/ContentPage/mapSlot.js +14 -0
- package/dist/components/ContentPage/mapSlot.js.map +1 -0
- package/dist/components/ContentPage/normalizeBlock.d.ts +3 -11
- package/dist/components/ContentPage/normalizeBlock.js +13 -3
- package/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.mobile.d.ts +3 -2
- package/dist/components/ContentPage/normalizeBlock.mobile.js +18 -3
- package/dist/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.js +2 -14
- package/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/dist/components/ContentPage/renderBlock.d.ts +7 -3
- package/dist/components/ContentPage/renderBlock.js +9 -9
- package/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/dist/components/ContentPage/renderBlockList.d.ts +14 -0
- package/dist/components/ContentPage/renderBlockList.js +18 -0
- package/dist/components/ContentPage/renderBlockList.js.map +1 -0
- package/dist/components/ContentPage/renderSlots.d.ts +12 -0
- package/dist/components/ContentPage/renderSlots.js +17 -0
- package/dist/components/ContentPage/renderSlots.js.map +1 -0
- package/dist/model/BlockDecorator.d.ts +4 -3
- package/dist/model/BlockDecorator.js +1 -2
- package/dist/model/BlockDecorator.js.map +1 -1
- package/dist/model/BlocksRegistry.d.ts +1 -1
- package/dist/model/ContentPageDef.d.ts +1 -4
- package/dist/model/JSXBlock.d.ts +3 -1
- package/dist/model/getParentBlockDef.js +5 -2
- package/dist/model/getParentBlockDef.js.map +1 -1
- package/lib/components/Blocks.d.ts +2 -41
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.d.ts +2 -18
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.d.ts +2 -2
- package/lib/components/ContentPage/ContentPage.js +12 -11
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/mapSlot.d.ts +2 -0
- package/lib/components/ContentPage/mapSlot.js +11 -0
- package/lib/components/ContentPage/mapSlot.js.map +1 -0
- package/lib/components/ContentPage/normalizeBlock.d.ts +3 -11
- package/lib/components/ContentPage/normalizeBlock.js +13 -3
- package/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.mobile.d.ts +3 -2
- package/lib/components/ContentPage/normalizeBlock.mobile.js +18 -3
- package/lib/components/ContentPage/normalizeBlock.mobile.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.js +2 -14
- package/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/lib/components/ContentPage/renderBlock.d.ts +7 -3
- package/lib/components/ContentPage/renderBlock.js +9 -9
- package/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/lib/components/ContentPage/renderBlockList.d.ts +14 -0
- package/lib/components/ContentPage/renderBlockList.js +15 -0
- package/lib/components/ContentPage/renderBlockList.js.map +1 -0
- package/lib/components/ContentPage/renderSlots.d.ts +12 -0
- package/lib/components/ContentPage/renderSlots.js +14 -0
- package/lib/components/ContentPage/renderSlots.js.map +1 -0
- package/lib/model/BlockDecorator.d.ts +4 -3
- package/lib/model/BlockDecorator.js +0 -1
- package/lib/model/BlockDecorator.js.map +1 -1
- package/lib/model/BlocksRegistry.d.ts +1 -1
- package/lib/model/ContentPageDef.d.ts +1 -4
- package/lib/model/JSXBlock.d.ts +3 -1
- package/lib/model/getParentBlockDef.js +5 -2
- package/lib/model/getParentBlockDef.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +49 -22
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Blocks.d.ts +2 -18
- package/mobile/bundle/components/ContentPage/ContentPage.d.ts +2 -2
- package/mobile/bundle/components/ContentPage/mapSlot.d.ts +2 -0
- package/mobile/bundle/components/ContentPage/normalizeBlock.d.ts +3 -2
- package/mobile/bundle/components/ContentPage/renderBlock.d.ts +7 -3
- package/mobile/bundle/components/ContentPage/renderBlockList.d.ts +14 -0
- package/mobile/bundle/components/ContentPage/renderSlots.d.ts +12 -0
- package/mobile/bundle/model/BlockDecorator.d.ts +4 -3
- package/mobile/bundle/model/BlocksRegistry.d.ts +1 -1
- package/mobile/bundle/model/ContentPageDef.d.ts +1 -4
- package/mobile/bundle/model/JSXBlock.d.ts +3 -1
- package/mobile/dist/components/Blocks.d.ts +2 -18
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.d.ts +2 -2
- package/mobile/dist/components/ContentPage/ContentPage.js +12 -11
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/mapSlot.d.ts +2 -0
- package/mobile/dist/components/ContentPage/mapSlot.js +14 -0
- package/mobile/dist/components/ContentPage/mapSlot.js.map +1 -0
- package/mobile/dist/components/ContentPage/normalizeBlock.d.ts +3 -2
- package/mobile/dist/components/ContentPage/normalizeBlock.js +18 -3
- package/mobile/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.js +2 -14
- package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/dist/components/ContentPage/renderBlock.d.ts +7 -3
- package/mobile/dist/components/ContentPage/renderBlock.js +9 -9
- package/mobile/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/renderBlockList.d.ts +14 -0
- package/mobile/dist/components/ContentPage/renderBlockList.js +18 -0
- package/mobile/dist/components/ContentPage/renderBlockList.js.map +1 -0
- package/mobile/dist/components/ContentPage/renderSlots.d.ts +12 -0
- package/mobile/dist/components/ContentPage/renderSlots.js +17 -0
- package/mobile/dist/components/ContentPage/renderSlots.js.map +1 -0
- package/mobile/dist/model/BlockDecorator.d.ts +4 -3
- package/mobile/dist/model/BlockDecorator.js +1 -2
- package/mobile/dist/model/BlockDecorator.js.map +1 -1
- package/mobile/dist/model/BlocksRegistry.d.ts +1 -1
- package/mobile/dist/model/ContentPageDef.d.ts +1 -4
- package/mobile/dist/model/JSXBlock.d.ts +3 -1
- package/mobile/dist/model/getParentBlockDef.js +5 -2
- package/mobile/dist/model/getParentBlockDef.js.map +1 -1
- package/mobile/lib/components/Blocks.d.ts +2 -18
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.d.ts +2 -2
- package/mobile/lib/components/ContentPage/ContentPage.js +12 -11
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/mapSlot.d.ts +2 -0
- package/mobile/lib/components/ContentPage/mapSlot.js +11 -0
- package/mobile/lib/components/ContentPage/mapSlot.js.map +1 -0
- package/mobile/lib/components/ContentPage/normalizeBlock.d.ts +3 -2
- package/mobile/lib/components/ContentPage/normalizeBlock.js +18 -3
- package/mobile/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.js +2 -14
- package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/lib/components/ContentPage/renderBlock.d.ts +7 -3
- package/mobile/lib/components/ContentPage/renderBlock.js +9 -9
- package/mobile/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/renderBlockList.d.ts +14 -0
- package/mobile/lib/components/ContentPage/renderBlockList.js +15 -0
- package/mobile/lib/components/ContentPage/renderBlockList.js.map +1 -0
- package/mobile/lib/components/ContentPage/renderSlots.d.ts +12 -0
- package/mobile/lib/components/ContentPage/renderSlots.js +14 -0
- package/mobile/lib/components/ContentPage/renderSlots.js.map +1 -0
- package/mobile/lib/model/BlockDecorator.d.ts +4 -3
- package/mobile/lib/model/BlockDecorator.js +0 -1
- package/mobile/lib/model/BlockDecorator.js.map +1 -1
- package/mobile/lib/model/BlocksRegistry.d.ts +1 -1
- package/mobile/lib/model/ContentPageDef.d.ts +1 -4
- package/mobile/lib/model/JSXBlock.d.ts +3 -1
- package/mobile/lib/model/getParentBlockDef.js +5 -2
- package/mobile/lib/model/getParentBlockDef.js.map +1 -1
- package/mobile/src/components/Blocks.ts +2 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +131 -133
- package/mobile/src/components/ContentPage/ContentPage.tsx +25 -28
- package/mobile/src/components/ContentPage/mapSlot.ts +17 -0
- package/mobile/src/components/ContentPage/normalizeBlock.ts +26 -4
- package/mobile/src/components/ContentPage/normalizePage.ts +3 -20
- package/mobile/src/components/ContentPage/renderBlock.tsx +16 -18
- package/mobile/src/components/ContentPage/renderBlockList.tsx +39 -0
- package/mobile/src/components/ContentPage/renderSlots.tsx +33 -0
- package/mobile/src/model/BlockDecorator.ts +4 -4
- package/mobile/src/model/BlocksRegistry.ts +1 -1
- package/mobile/src/model/ContentPageDef.ts +1 -5
- package/mobile/src/model/JSXBlock.ts +3 -1
- package/mobile/src/model/getParentBlockDef.ts +6 -2
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +16 -4
- package/src/components/Blocks.mobile.ts +2 -1
- package/src/components/Blocks.ts +2 -1
- package/src/components/ContentPage/ContentPage.page.json +131 -133
- package/src/components/ContentPage/ContentPage.tsx +25 -28
- package/src/components/ContentPage/mapSlot.ts +17 -0
- package/src/components/ContentPage/normalizeBlock.mobile.ts +26 -4
- package/src/components/ContentPage/normalizeBlock.ts +17 -4
- package/src/components/ContentPage/normalizePage.ts +3 -20
- package/src/components/ContentPage/renderBlock.tsx +16 -18
- package/src/components/ContentPage/renderBlockList.tsx +39 -0
- package/src/components/ContentPage/renderSlots.tsx +33 -0
- package/src/model/BlockDecorator.ts +4 -4
- package/src/model/BlocksRegistry.ts +1 -1
- package/src/model/ContentPageDef.ts +1 -5
- package/src/model/JSXBlock.ts +3 -1
- package/src/model/getParentBlockDef.ts +6 -2
- package/bin/migration-scripts/0.4.0.js +0 -3
- package/bin/migration-scripts/0.4.1.js +0 -3
- package/bundle/components/ContentPage/filterBlocks.d.ts +0 -12
- package/bundle/components/ContentPage/filterBlocks.mobile.d.ts +0 -12
- package/dist/components/ContentPage/filterBlocks.d.ts +0 -12
- package/dist/components/ContentPage/filterBlocks.js +0 -6
- package/dist/components/ContentPage/filterBlocks.js.map +0 -1
- package/dist/components/ContentPage/filterBlocks.mobile.d.ts +0 -12
- package/dist/components/ContentPage/filterBlocks.mobile.js +0 -8
- package/dist/components/ContentPage/filterBlocks.mobile.js.map +0 -1
- package/lib/components/ContentPage/filterBlocks.d.ts +0 -12
- package/lib/components/ContentPage/filterBlocks.js +0 -3
- package/lib/components/ContentPage/filterBlocks.js.map +0 -1
- package/lib/components/ContentPage/filterBlocks.mobile.d.ts +0 -12
- package/lib/components/ContentPage/filterBlocks.mobile.js +0 -5
- package/lib/components/ContentPage/filterBlocks.mobile.js.map +0 -1
- package/mobile/bundle/components/ContentPage/filterBlocks.d.ts +0 -3
- package/mobile/dist/components/ContentPage/filterBlocks.d.ts +0 -3
- package/mobile/dist/components/ContentPage/filterBlocks.js +0 -8
- package/mobile/dist/components/ContentPage/filterBlocks.js.map +0 -1
- package/mobile/lib/components/ContentPage/filterBlocks.d.ts +0 -3
- package/mobile/lib/components/ContentPage/filterBlocks.js +0 -5
- package/mobile/lib/components/ContentPage/filterBlocks.js.map +0 -1
- package/mobile/src/components/ContentPage/filterBlocks.ts +0 -11
- package/src/components/ContentPage/filterBlocks.mobile.ts +0 -11
- package/src/components/ContentPage/filterBlocks.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/ContentPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAKxC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentPage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/ContentPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAKxC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ5C,MAAM,qBAAqB,GAAmB,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAClF,MAAM,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAA+B,GAAG,CAAmB,CAAC,KAAK,EAAE,EAAE;IACrF,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAErF,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAEnF,MAAM,OAAO,GAAuB;QAClC,GAAG,EAAE,EAAE;QACP,cAAc;QACd,IAAI,EAAE,IAAI;QACV,cAAc,EAAE,cAAc,IAAI,qBAAqB;QACvD,OAAO;KACR,CAAC;IAEF,MAAM,SAAS,GAAG,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAEhE,OAAO,CACL,mBACE,SAAS,EAAE,YAAY,eAAe,CAAC,SAAS,CAAC,IAAI,SAAS,EAAE,gBACpD,YAAY,aAEvB,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CACnB,cAAK,SAAS,EAAC,wCAAwC,YAAE,SAAS,CAAC,MAAM,GAAO,CACjF,CAAC,CAAC,CAAC,IAAI,EAEP,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,eAAK,SAAS,EAAC,mCAAmC,aAC/C,gBAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EACnD,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IACxC,CACP,CAAC,CAAC,CAAC,IAAI,EAEP,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IACxC,CACX,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,WAAW,CAAC,aAAa,GAAG,EAAE,CAAC;AAC/B,WAAW,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE/C,SAAS,iBAAiB,CAAC,OAA2B;IACpD,OAAO,CACL,cAAK,SAAS,EAAC,qEAAqE,YAClF,KAAC,WAAW,IAEV,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,OAAO,IAFZ,aAAa,CAGjB,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const mapSlot = (mapper) => (slot) => ({
|
|
2
|
+
...slot,
|
|
3
|
+
blocks: mapper(slot.blocks),
|
|
4
|
+
slots: slot.slots
|
|
5
|
+
? Object.entries(slot.slots).reduce((res, [slotKey, slotBlocks]) => ({
|
|
6
|
+
...res,
|
|
7
|
+
[slotKey]: mapper(slotBlocks),
|
|
8
|
+
}), {})
|
|
9
|
+
: {},
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=mapSlot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapSlot.js","sourceRoot":"","sources":["../../../src/components/ContentPage/mapSlot.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAClB,CAAC,MAA2C,EAAE,EAAE,CAChD,CAAiB,IAAO,EAAK,EAAE,CAAC,CAAC;IAC/B,GAAG,IAAI;IACP,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;QACf,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAC/B,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;YAC/B,GAAG,GAAG;YACN,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;SAC9B,CAAC,EACF,EAAE,CACH;QACH,CAAC,CAAC,EAAE;CACP,CAAC,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
+
import type { Slot } from '../../model/ContentPageDef';
|
|
3
|
+
export declare function normalizeBlock<S extends Slot>(block?: S, blocksRegistry?: BlocksRegistry): S;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { mapSlot } from './mapSlot.js';
|
|
2
|
+
export function normalizeBlock(block, blocksRegistry) {
|
|
3
|
+
const { mobile, ...rest } = (block || {});
|
|
4
|
+
const normalizedBlock = mobile
|
|
5
|
+
? { ...rest, ...mobile, content: { ...rest.content, ...mobile.content } }
|
|
6
|
+
: block;
|
|
7
|
+
return {
|
|
8
|
+
...mapSlot((blocks) => filterBlocks(blocks, blocksRegistry))(normalizedBlock || {}),
|
|
9
|
+
};
|
|
4
10
|
}
|
|
11
|
+
const filterBlocks = (blocks, blocksRegistry) => blocks
|
|
12
|
+
? blocks
|
|
13
|
+
?.filter((block) => blocksRegistry &&
|
|
14
|
+
(block?.type || block?.mobile?.type || '') in blocksRegistry &&
|
|
15
|
+
!block.mobile?.hidden)
|
|
16
|
+
.map((block) => ({
|
|
17
|
+
...normalizeBlock(block, blocksRegistry),
|
|
18
|
+
}))
|
|
19
|
+
: [];
|
|
5
20
|
//# sourceMappingURL=normalizeBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,cAAc,
|
|
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;IAEtD,MAAM,eAAe,GAAG,MAAM;QAC5B,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;QACL,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,eAAe,IAAI,EAAE,CAAC;KAC/E,CAAC;AACT,CAAC;AAED,MAAM,YAAY,GAAG,CAAC,MAAmB,EAAE,cAA+B,EAAE,EAAE,CAC5E,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;QACf,GAAG,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC;KACzC,CAAC,CAAC;IACP,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { normalizeBlock } from './normalizeBlock.js';
|
|
2
2
|
export const normalizePage = (blocksRegistry) => (contentPage) => {
|
|
3
3
|
if (!contentPage) {
|
|
4
4
|
return undefined;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
return {
|
|
8
|
-
...contentPage,
|
|
9
|
-
blocks: filterBlocks(blocks, blocksRegistry),
|
|
10
|
-
slots: slots &&
|
|
11
|
-
Object.keys(slots).reduce((res, key) => ({
|
|
12
|
-
...res,
|
|
13
|
-
[key]: {
|
|
14
|
-
...slots[key],
|
|
15
|
-
blocks: filterBlocks(slots[key].blocks || [], blocksRegistry),
|
|
16
|
-
},
|
|
17
|
-
}), {}),
|
|
18
|
-
};
|
|
6
|
+
return normalizeBlock(contentPage, blocksRegistry);
|
|
19
7
|
};
|
|
20
8
|
//# sourceMappingURL=normalizePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GACxB,CAAC,cAA8B,EAAE,EAAE,CACnC,CAAC,WAA8C,EAA8B,EAAE;IAC7E,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;AACrD,CAAC,CAAC"}
|
|
@@ -2,12 +2,16 @@ import { BlockAncestors, BlockDecorator } from '../../model/BlockDecorator';
|
|
|
2
2
|
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
3
3
|
import type { BlockDef, ContentPageDef } from '../../model/ContentPageDef';
|
|
4
4
|
import type { ContentPageContext } from './ContentPageContext';
|
|
5
|
-
interface RenderBlockOptions {
|
|
5
|
+
export interface RenderBlockOptions {
|
|
6
6
|
key: string;
|
|
7
7
|
page: ContentPageDef;
|
|
8
8
|
blockDecorator: BlockDecorator;
|
|
9
9
|
blocksRegistry: BlocksRegistry;
|
|
10
10
|
context: ContentPageContext;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
12
|
+
export interface RenderBlockProps {
|
|
13
|
+
block?: BlockDef;
|
|
14
|
+
options: RenderBlockOptions;
|
|
15
|
+
ancestors?: BlockAncestors;
|
|
16
|
+
}
|
|
17
|
+
export declare function renderBlock({ block, options, ancestors }: RenderBlockProps): any;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { DEFAULT_ANCESTORS } from '../../model/BlockDecorator.js';
|
|
3
2
|
import { style2className } from '../../utils/style2className.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
3
|
+
import { renderBlocksList } from './renderBlockList.js';
|
|
4
|
+
import { renderSlots } from './renderSlots.js';
|
|
5
|
+
export function renderBlock({ block = {}, options, ancestors = [] }) {
|
|
6
|
+
const { key, page, blockDecorator, blocksRegistry = {}, context } = options;
|
|
7
|
+
const { type, slots, blocks: childBlocks } = block;
|
|
8
8
|
if (!(type && type in blocksRegistry)) {
|
|
9
9
|
console.warn(`No block with "${type}" is registered`);
|
|
10
10
|
}
|
|
11
11
|
const BlockComponent = type && blocksRegistry[type];
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const subBlockRenderProps = { parent: block, options, ancestors };
|
|
13
|
+
const children = renderBlocksList({ ...subBlockRenderProps, blocks: childBlocks });
|
|
14
|
+
const blockSlots = slots ? renderSlots({ ...subBlockRenderProps, slots }) : {};
|
|
15
15
|
return blockDecorator({
|
|
16
16
|
blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
|
|
17
17
|
block,
|
|
@@ -19,7 +19,7 @@ export function renderBlock(block, options, ancestors = DEFAULT_ANCESTORS) {
|
|
|
19
19
|
// Adjusted by decorator block and blockClassName
|
|
20
20
|
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
21
21
|
const { version, anchor, labels, content } = adjustedBlock;
|
|
22
|
-
return BlockComponent ? (_jsx(BlockComponent, { className: adjustedBlockClassName, context: context, page: page, ancestors: ancestors, version: version, anchor: anchor, labels: labels, ...content, children: children }, key)) : null;
|
|
22
|
+
return BlockComponent ? (_jsx(BlockComponent, { className: adjustedBlockClassName, context: context, page: page, ancestors: ancestors, version: version, anchor: anchor, labels: labels, slots: blockSlots, ...content, children: children }, key)) : null;
|
|
23
23
|
},
|
|
24
24
|
}, key);
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderBlock.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderBlock.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAgB5C,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAoB;IACnF,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5E,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAEnD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,cAAc,CAAC,EAAE;QACrC,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,iBAAiB,CAAC,CAAC;KACvD;IAED,MAAM,cAAc,GAAG,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAEpD,MAAM,mBAAmB,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAClE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,EAAE,GAAG,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IACnF,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,GAAG,mBAAmB,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/E,OAAO,cAAc,CACnB;QACE,cAAc,EAAE,gBAAgB,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QAC9D,KAAK;QACL,SAAS;QACT,iDAAiD;QACjD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,EAAE,EAAE;YAC3E,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC;YAE3D,OAAO,cAAc,CAAC,CAAC,CAAC,CACtB,KAAC,cAAc,IAEb,SAAS,EAAE,sBAAsB,EACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,KACb,OAAO,YAEV,QAAQ,IAXJ,GAAG,CAYO,CAClB,CAAC,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;KACF,EACD,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SlotName } from '../../model/BlockDecorator';
|
|
2
|
+
import { BlockAncestors } from '../../model/BlockDecorator';
|
|
3
|
+
import type { BlockDef, Slot } from '../../model/ContentPageDef';
|
|
4
|
+
import type { VNode } from '../../model/VNode';
|
|
5
|
+
import { RenderBlockOptions } from './renderBlock';
|
|
6
|
+
interface RenderBlockListProps {
|
|
7
|
+
blocks?: BlockDef[];
|
|
8
|
+
parent: Slot;
|
|
9
|
+
slotName?: SlotName;
|
|
10
|
+
options: RenderBlockOptions;
|
|
11
|
+
ancestors?: BlockAncestors;
|
|
12
|
+
}
|
|
13
|
+
export declare function renderBlocksList({ blocks, parent, slotName, options, ancestors, }: RenderBlockListProps): Record<string, VNode>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DEFAULT_SLOT_NAME } from '../../model/BlockDecorator.js';
|
|
2
|
+
import { renderBlock } from './renderBlock.js';
|
|
3
|
+
const defaultChildRenderer = (_) => _;
|
|
4
|
+
export function renderBlocksList({ blocks = [], parent, slotName = DEFAULT_SLOT_NAME, options, ancestors = [], }) {
|
|
5
|
+
const { blocksRegistry = {} } = options;
|
|
6
|
+
const { type } = parent;
|
|
7
|
+
const BlockComponent = type && blocksRegistry[type];
|
|
8
|
+
const { renderChild = defaultChildRenderer } = BlockComponent || {};
|
|
9
|
+
return blocks.map((_, j) => renderChild(renderBlock({
|
|
10
|
+
block: _,
|
|
11
|
+
options: { ...options, key: `${options.key ? options.key : _.type}-${j}` },
|
|
12
|
+
ancestors: [...ancestors, [parent, slotName]],
|
|
13
|
+
}), j));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=renderBlockList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderBlockList.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderBlockList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/E,OAAO,EAAE,WAAW,EAAsB,MAAM,eAAe,CAAC;AAUhE,MAAM,oBAAoB,GAAG,CAAC,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AAE7C,MAAM,UAAU,gBAAgB,CAAC,EAC/B,MAAM,GAAG,EAAE,EACX,MAAM,EACN,QAAQ,GAAG,iBAAiB,EAC5B,OAAO,EACP,SAAS,GAAG,EAAE,GACO;IACrB,MAAM,EAAE,cAAc,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IACxC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAkB,CAAC;IACpC,MAAM,cAAc,GAAG,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,EAAE,WAAW,GAAG,oBAAoB,EAAE,GAAG,cAAc,IAAI,EAAE,CAAC;IAEpE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAW,EAAE,CAAS,EAAE,EAAE,CAC3C,WAAW,CACT,WAAW,CAAC;QACV,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE;QAC1E,SAAS,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC9C,CAAC,EACF,CAAC,CACF,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BlockAncestors } from '../../model/BlockDecorator';
|
|
2
|
+
import type { BlockDef, Slot } from '../../model/ContentPageDef';
|
|
3
|
+
import type { VNode } from '../../model/VNode';
|
|
4
|
+
import type { RenderBlockOptions } from './renderBlock';
|
|
5
|
+
interface RenderSlotsProps {
|
|
6
|
+
slots?: Record<string, BlockDef[]>;
|
|
7
|
+
parent: Slot;
|
|
8
|
+
options: RenderBlockOptions;
|
|
9
|
+
ancestors?: BlockAncestors;
|
|
10
|
+
}
|
|
11
|
+
export declare function renderSlots({ slots, parent, options, ancestors, }: RenderSlotsProps): Record<string, VNode>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { renderBlocksList } from './renderBlockList.js';
|
|
2
|
+
export function renderSlots({ slots = {}, parent, options, ancestors = [], }) {
|
|
3
|
+
return Object.entries(slots).reduce((res, [slotName, slotBlocks]) => ({
|
|
4
|
+
...res,
|
|
5
|
+
[slotName]: renderBlocksList({
|
|
6
|
+
blocks: slotBlocks,
|
|
7
|
+
parent,
|
|
8
|
+
slotName,
|
|
9
|
+
options,
|
|
10
|
+
ancestors,
|
|
11
|
+
}),
|
|
12
|
+
}), {});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=renderSlots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderSlots.js","sourceRoot":"","sources":["../../../src/components/ContentPage/renderSlots.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AASrD,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,GAAG,EAAE,EACV,MAAM,EACN,OAAO,EACP,SAAS,GAAG,EAAE,GACG;IACjB,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CACjC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC;QAChC,GAAG,GAAG;QACN,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;YAC3B,MAAM,EAAE,UAAU;YAClB,MAAM;YACN,QAAQ;YACR,OAAO;YACP,SAAS;SACV,CAAC;KACH,CAAC,EACF,EAAE,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { BlockDef, Slot
|
|
1
|
+
import type { BlockDef, Slot } from './ContentPageDef';
|
|
2
2
|
export declare const DEFAULT_SLOT_NAME: null;
|
|
3
|
-
export declare type
|
|
4
|
-
export declare
|
|
3
|
+
export declare type SlotName = string | typeof DEFAULT_SLOT_NAME;
|
|
4
|
+
export declare type BlockAncestorItem = [Slot, SlotName];
|
|
5
|
+
export declare type BlockAncestors = BlockAncestorItem[];
|
|
5
6
|
interface BlockDecoratorProps<VNode> {
|
|
6
7
|
blockClassName: string;
|
|
7
8
|
block: BlockDef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockDecorator.js","sourceRoot":"","sources":["../../src/model/BlockDecorator.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"BlockDecorator.js","sourceRoot":"","sources":["../../src/model/BlockDecorator.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { JSXBlock } from './JSXBlock';
|
|
2
|
-
export declare type BlocksRegistry
|
|
2
|
+
export declare type BlocksRegistry = Record<string, JSXBlock<any>>;
|
|
@@ -18,9 +18,7 @@ export interface BlockDef extends BaseBlockDef {
|
|
|
18
18
|
export interface Slot {
|
|
19
19
|
style?: string[];
|
|
20
20
|
blocks?: BlockDef[];
|
|
21
|
-
|
|
22
|
-
export interface SlotsMap {
|
|
23
|
-
header?: Slot;
|
|
21
|
+
slots?: Record<string, BlockDef[]>;
|
|
24
22
|
}
|
|
25
23
|
export interface ContentPageMeta {
|
|
26
24
|
title?: string;
|
|
@@ -37,7 +35,6 @@ export interface ContentPageMeta {
|
|
|
37
35
|
}
|
|
38
36
|
export interface ContentPageDef extends ContentPageMeta, Slot {
|
|
39
37
|
_customPageType?: string;
|
|
40
|
-
slots?: SlotsMap;
|
|
41
38
|
fallback?: Record<string, unknown>;
|
|
42
39
|
likeControl?: boolean;
|
|
43
40
|
colorPalette?: ColorPalette;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UNIComponent } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { ContentPageContext } from '../components/ContentPage/ContentPageContext';
|
|
3
|
-
import type { BlockAncestors } from './BlockDecorator';
|
|
3
|
+
import type { BlockAncestors, SlotName } from './BlockDecorator';
|
|
4
4
|
import type { ContentPageDef } from './ContentPageDef';
|
|
5
5
|
import type { VNode } from './VNode';
|
|
6
6
|
export interface UniBlockProps {
|
|
@@ -10,8 +10,10 @@ export interface UniBlockProps {
|
|
|
10
10
|
ancestors?: BlockAncestors;
|
|
11
11
|
labels?: string[];
|
|
12
12
|
anchor?: string;
|
|
13
|
+
slots?: Record<string, VNode>;
|
|
13
14
|
}
|
|
14
15
|
export declare type JSXBlock<BlockProps = Record<string, any>> = UNIComponent<BlockProps & UniBlockProps, any, VNode | VNode[]> & {
|
|
15
16
|
childrenTypes?: string[];
|
|
17
|
+
slots?: (props: BlockProps) => SlotName[];
|
|
16
18
|
renderChild?: (child: VNode, i: number) => VNode;
|
|
17
19
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export function getParentBlockDef(ancestors, type) {
|
|
2
|
-
const [
|
|
3
|
-
|
|
2
|
+
const [block] = (ancestors || [])
|
|
3
|
+
.map((item) => item)
|
|
4
|
+
.reverse()
|
|
5
|
+
.find(([_]) => _ && 'type' in _ && (!type || type === _.type)) || [];
|
|
6
|
+
return block || {};
|
|
4
7
|
}
|
|
5
8
|
//# sourceMappingURL=getParentBlockDef.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getParentBlockDef.js","sourceRoot":"","sources":["../../src/model/getParentBlockDef.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,iBAAiB,CAAC,SAAqC,EAAE,IAAa;IACpF,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"getParentBlockDef.js","sourceRoot":"","sources":["../../src/model/getParentBlockDef.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,iBAAiB,CAAC,SAAqC,EAAE,IAAa;IACpF,MAAM,CAAC,KAAK,CAAC,GACX,CAAC,SAAS,IAAI,EAAE,CAAC;SACd,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;SACnB,OAAO,EAAE;SACT,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,KAAM,CAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;IAEvF,OAAO,KAAK,IAAI,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BlocksRegistry } from '../model/BlocksRegistry';
|
|
1
2
|
import { Accordion } from './Accordion/Accordion';
|
|
2
3
|
import { AccordionItem } from './AccordionItem/AccordionItem';
|
|
3
4
|
import { ComparisonTable } from './ComparisonTable/ComparisonTable';
|
|
@@ -15,7 +16,7 @@ import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
|
15
16
|
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
16
17
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
17
18
|
|
|
18
|
-
export const Blocks = {
|
|
19
|
+
export const Blocks: BlocksRegistry = {
|
|
19
20
|
Accordion,
|
|
20
21
|
AccordionItem,
|
|
21
22
|
ComparisonTable,
|
|
@@ -19,17 +19,138 @@
|
|
|
19
19
|
"style": ["bg-main-divider"],
|
|
20
20
|
"likeControl": true,
|
|
21
21
|
"slots": {
|
|
22
|
-
"header":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
"
|
|
27
|
-
"content": {
|
|
28
|
-
"defaultLocation": "Москва"
|
|
29
|
-
}
|
|
22
|
+
"header": [
|
|
23
|
+
{
|
|
24
|
+
"type": "Header",
|
|
25
|
+
"content": {
|
|
26
|
+
"defaultLocation": "Москва"
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"footer": [
|
|
31
|
+
{
|
|
32
|
+
"type": "Footer",
|
|
33
|
+
"style": ["col-span-12"],
|
|
34
|
+
"content": {
|
|
35
|
+
"topItems": [
|
|
36
|
+
{
|
|
37
|
+
"href": "https://rshb.ru/",
|
|
38
|
+
"text": "О банке",
|
|
39
|
+
"target": "_blank",
|
|
40
|
+
"items": [
|
|
41
|
+
{
|
|
42
|
+
"href": "https://rshb.ru/",
|
|
43
|
+
"text": "О банке"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"href": "https://rshb.ru/",
|
|
47
|
+
"text": "Новости"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"href": "https://rshb.ru/",
|
|
51
|
+
"text": "Офисы и отделения"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"href": "https://rshb.ru/",
|
|
55
|
+
"text": "Карьера в банке"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"href": "https://rshb.ru/",
|
|
59
|
+
"text": "Пресс-центр"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"href": "https://rshb.ru/",
|
|
63
|
+
"text": "Кредитным организациям"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"href": "https://rshb.ru/",
|
|
67
|
+
"text": "Закупки"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"href": "https://rshb.ru/",
|
|
71
|
+
"text": "Премиальным клиентам"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"href": "https://rshb.ru/",
|
|
75
|
+
"text": "Непрофильные/Профильные нецелевые активы"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"href": "https://rshb.ru/",
|
|
79
|
+
"text": "Инсайдерам"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"href": "https://rshb.ru/",
|
|
83
|
+
"text": "Противодействие коррупции"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"href": "https://rshb.ru/",
|
|
87
|
+
"text": "Меры безопасности"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"href": "https://rshb.ru/",
|
|
91
|
+
"text": "Залоговое имущество"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"contacts": [
|
|
97
|
+
{
|
|
98
|
+
"text": "+7 (495) 787-7-787",
|
|
99
|
+
"description": "Для звонков из-за границы",
|
|
100
|
+
"type": "tel"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"text": "8 (800) 100-01-00",
|
|
104
|
+
"description": "По России",
|
|
105
|
+
"type": "tel"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"text": "7787",
|
|
109
|
+
"description": "Абонентам МТС, Мегафон, Билайн и Tele21",
|
|
110
|
+
"type": "tel"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"documents": [
|
|
114
|
+
{
|
|
115
|
+
"text": "Информация о процентных ставках по договорам банковского вклада с физическими лицами",
|
|
116
|
+
"href": "https://rshb.ru/",
|
|
117
|
+
"target": "_blank"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"text": "Раскрытие информации профессиональным участником рынка ценных бумаг",
|
|
121
|
+
"href": "https://rshb.ru/",
|
|
122
|
+
"target": "_blank"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"text": "Раскрытие информации",
|
|
126
|
+
"href": "https://rshb.ru/",
|
|
127
|
+
"target": "_blank"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"text": "Удостоверяющий центр",
|
|
131
|
+
"href": "https://rshb.ru/",
|
|
132
|
+
"target": "_blank"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"text": "Финансовая культура",
|
|
136
|
+
"href": "https://rshb.ru/",
|
|
137
|
+
"target": "_blank"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"socialMedia": [
|
|
141
|
+
{
|
|
142
|
+
"href": "https://vk.com"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"href": "https://ok.ru"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"href": "https://t.me"
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
33
154
|
},
|
|
34
155
|
"blocks": [
|
|
35
156
|
{
|
|
@@ -2224,129 +2345,6 @@
|
|
|
2224
2345
|
{
|
|
2225
2346
|
"type": "SafeDepositRental",
|
|
2226
2347
|
"style": ["col-span-12"]
|
|
2227
|
-
},
|
|
2228
|
-
|
|
2229
|
-
{
|
|
2230
|
-
"type": "Footer",
|
|
2231
|
-
"style": ["col-span-12"],
|
|
2232
|
-
"content": {
|
|
2233
|
-
"topItems": [
|
|
2234
|
-
{
|
|
2235
|
-
"href": "https://rshb.ru/",
|
|
2236
|
-
"text": "О банке",
|
|
2237
|
-
"target": "_blank",
|
|
2238
|
-
"items": [
|
|
2239
|
-
{
|
|
2240
|
-
"href": "https://rshb.ru/",
|
|
2241
|
-
"text": "О банке"
|
|
2242
|
-
},
|
|
2243
|
-
{
|
|
2244
|
-
"href": "https://rshb.ru/",
|
|
2245
|
-
"text": "Новости"
|
|
2246
|
-
},
|
|
2247
|
-
{
|
|
2248
|
-
"href": "https://rshb.ru/",
|
|
2249
|
-
"text": "Офисы и отделения"
|
|
2250
|
-
},
|
|
2251
|
-
{
|
|
2252
|
-
"href": "https://rshb.ru/",
|
|
2253
|
-
"text": "Карьера в банке"
|
|
2254
|
-
},
|
|
2255
|
-
{
|
|
2256
|
-
"href": "https://rshb.ru/",
|
|
2257
|
-
"text": "Пресс-центр"
|
|
2258
|
-
},
|
|
2259
|
-
{
|
|
2260
|
-
"href": "https://rshb.ru/",
|
|
2261
|
-
"text": "Кредитным организациям"
|
|
2262
|
-
},
|
|
2263
|
-
{
|
|
2264
|
-
"href": "https://rshb.ru/",
|
|
2265
|
-
"text": "Закупки"
|
|
2266
|
-
},
|
|
2267
|
-
{
|
|
2268
|
-
"href": "https://rshb.ru/",
|
|
2269
|
-
"text": "Премиальным клиентам"
|
|
2270
|
-
},
|
|
2271
|
-
{
|
|
2272
|
-
"href": "https://rshb.ru/",
|
|
2273
|
-
"text": "Непрофильные/Профильные нецелевые активы"
|
|
2274
|
-
},
|
|
2275
|
-
{
|
|
2276
|
-
"href": "https://rshb.ru/",
|
|
2277
|
-
"text": "Инсайдерам"
|
|
2278
|
-
},
|
|
2279
|
-
{
|
|
2280
|
-
"href": "https://rshb.ru/",
|
|
2281
|
-
"text": "Противодействие коррупции"
|
|
2282
|
-
},
|
|
2283
|
-
{
|
|
2284
|
-
"href": "https://rshb.ru/",
|
|
2285
|
-
"text": "Меры безопасности"
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
"href": "https://rshb.ru/",
|
|
2289
|
-
"text": "Залоговое имущество"
|
|
2290
|
-
}
|
|
2291
|
-
]
|
|
2292
|
-
}
|
|
2293
|
-
],
|
|
2294
|
-
"contacts": [
|
|
2295
|
-
{
|
|
2296
|
-
"text": "+7 (495) 787-7-787",
|
|
2297
|
-
"description": "Для звонков из-за границы",
|
|
2298
|
-
"type": "tel"
|
|
2299
|
-
},
|
|
2300
|
-
{
|
|
2301
|
-
"text": "8 (800) 100-01-00",
|
|
2302
|
-
"description": "По России",
|
|
2303
|
-
"type": "tel"
|
|
2304
|
-
},
|
|
2305
|
-
{
|
|
2306
|
-
"text": "7787",
|
|
2307
|
-
"description": "Абонентам МТС, Мегафон, Билайн и Tele21",
|
|
2308
|
-
"type": "tel"
|
|
2309
|
-
}
|
|
2310
|
-
],
|
|
2311
|
-
"documents": [
|
|
2312
|
-
{
|
|
2313
|
-
"text": "Информация о процентных ставках по договорам банковского вклада с физическими лицами",
|
|
2314
|
-
"href": "https://rshb.ru/",
|
|
2315
|
-
"target": "_blank"
|
|
2316
|
-
},
|
|
2317
|
-
{
|
|
2318
|
-
"text": "Раскрытие информации профессиональным участником рынка ценных бумаг",
|
|
2319
|
-
"href": "https://rshb.ru/",
|
|
2320
|
-
"target": "_blank"
|
|
2321
|
-
},
|
|
2322
|
-
{
|
|
2323
|
-
"text": "Раскрытие информации",
|
|
2324
|
-
"href": "https://rshb.ru/",
|
|
2325
|
-
"target": "_blank"
|
|
2326
|
-
},
|
|
2327
|
-
{
|
|
2328
|
-
"text": "Удостоверяющий центр",
|
|
2329
|
-
"href": "https://rshb.ru/",
|
|
2330
|
-
"target": "_blank"
|
|
2331
|
-
},
|
|
2332
|
-
{
|
|
2333
|
-
"text": "Финансовая культура",
|
|
2334
|
-
"href": "https://rshb.ru/",
|
|
2335
|
-
"target": "_blank"
|
|
2336
|
-
}
|
|
2337
|
-
],
|
|
2338
|
-
"socialMedia": [
|
|
2339
|
-
{
|
|
2340
|
-
"href": "https://vk.com"
|
|
2341
|
-
},
|
|
2342
|
-
{
|
|
2343
|
-
"href": "https://ok.ru"
|
|
2344
|
-
},
|
|
2345
|
-
{
|
|
2346
|
-
"href": "https://t.me"
|
|
2347
|
-
}
|
|
2348
|
-
]
|
|
2349
|
-
}
|
|
2350
2348
|
}
|
|
2351
2349
|
]
|
|
2352
2350
|
}
|