@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
package/src/model/JSXBlock.ts
CHANGED
|
@@ -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
|
|
|
@@ -11,6 +11,7 @@ export interface UniBlockProps {
|
|
|
11
11
|
ancestors?: BlockAncestors;
|
|
12
12
|
labels?: string[];
|
|
13
13
|
anchor?: string;
|
|
14
|
+
slots?: Record<string, VNode>;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export type JSXBlock<BlockProps = Record<string, any>> = UNIComponent<
|
|
@@ -19,5 +20,6 @@ export type JSXBlock<BlockProps = Record<string, any>> = UNIComponent<
|
|
|
19
20
|
VNode | VNode[]
|
|
20
21
|
> & {
|
|
21
22
|
childrenTypes?: string[];
|
|
23
|
+
slots?: (props: BlockProps) => SlotName[];
|
|
22
24
|
renderChild?: (child: VNode, i: number) => VNode;
|
|
23
25
|
};
|
|
@@ -2,7 +2,11 @@ import type { BlockAncestors } from './BlockDecorator';
|
|
|
2
2
|
import type { BlockDef } from './ContentPageDef';
|
|
3
3
|
|
|
4
4
|
export function getParentBlockDef(ancestors: BlockAncestors | undefined, type?: string): BlockDef {
|
|
5
|
-
const [
|
|
5
|
+
const [block] =
|
|
6
|
+
(ancestors || [])
|
|
7
|
+
.map((item) => item)
|
|
8
|
+
.reverse()
|
|
9
|
+
.find(([_]) => _ && 'type' in _ && (!type || type === (_ as BlockDef).type)) || [];
|
|
6
10
|
|
|
7
|
-
return
|
|
11
|
+
return block || {};
|
|
8
12
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const filterBlocks: (blocks: BlockDef[], blocksRegistry: BlocksRegistry) => {
|
|
4
|
-
type?: string | undefined;
|
|
5
|
-
content?: Record<string, any> | undefined;
|
|
6
|
-
version?: import("../../model/BlockVersion").BlockVersion | undefined;
|
|
7
|
-
hidden?: boolean | undefined;
|
|
8
|
-
anchor?: string | undefined;
|
|
9
|
-
labels?: string[] | undefined;
|
|
10
|
-
style?: string[] | undefined;
|
|
11
|
-
blocks?: BlockDef[] | undefined;
|
|
12
|
-
}[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const filterBlocks: (blocks: BlockDef[], blocksRegistry: BlocksRegistry) => {
|
|
4
|
-
type?: string | undefined;
|
|
5
|
-
content?: Record<string, any> | undefined;
|
|
6
|
-
version?: import("../../model/BlockVersion").BlockVersion | undefined;
|
|
7
|
-
hidden?: boolean | undefined;
|
|
8
|
-
anchor?: string | undefined;
|
|
9
|
-
labels?: string[] | undefined;
|
|
10
|
-
style?: string[] | undefined;
|
|
11
|
-
blocks?: BlockDef[] | undefined;
|
|
12
|
-
}[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const filterBlocks: (blocks: BlockDef[], blocksRegistry: BlocksRegistry) => {
|
|
4
|
-
type?: string | undefined;
|
|
5
|
-
content?: Record<string, any> | undefined;
|
|
6
|
-
version?: import("../../model/BlockVersion").BlockVersion | undefined;
|
|
7
|
-
hidden?: boolean | undefined;
|
|
8
|
-
anchor?: string | undefined;
|
|
9
|
-
labels?: string[] | undefined;
|
|
10
|
-
style?: string[] | undefined;
|
|
11
|
-
blocks?: BlockDef[] | undefined;
|
|
12
|
-
}[];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.filterBlocks = void 0;
|
|
3
|
-
const normalizeBlock_1 = require("./normalizeBlock");
|
|
4
|
-
const filterBlocks = (blocks, blocksRegistry) => blocks?.filter((block) => (block?.type || '') in blocksRegistry).map(normalizeBlock_1.normalizeBlock);
|
|
5
|
-
exports.filterBlocks = filterBlocks;
|
|
6
|
-
//# sourceMappingURL=filterBlocks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterBlocks.js","sourceRoot":"","sources":["../../../src/components/ContentPage/filterBlocks.ts"],"names":[],"mappings":";;AAEA,qDAAkD;AAE3C,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,cAA8B,EAAE,EAAE,CACjF,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,CAAC,CAAC,GAAG,CAAC,+BAAc,CAAC,CAAC;AAD1E,QAAA,YAAY,gBAC8D"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const filterBlocks: (blocks: BlockDef[], blocksRegistry: BlocksRegistry) => {
|
|
4
|
-
type?: string | undefined;
|
|
5
|
-
content?: Record<string, any> | undefined;
|
|
6
|
-
version?: import("../../model/BlockVersion").BlockVersion | undefined;
|
|
7
|
-
hidden?: boolean | undefined;
|
|
8
|
-
anchor?: string | undefined;
|
|
9
|
-
labels?: string[] | undefined;
|
|
10
|
-
style?: string[] | undefined;
|
|
11
|
-
blocks?: BlockDef[] | undefined;
|
|
12
|
-
}[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.filterBlocks = void 0;
|
|
3
|
-
const normalizeBlock_1 = require("./normalizeBlock");
|
|
4
|
-
const filterBlocks = (blocks, blocksRegistry) => blocks
|
|
5
|
-
?.filter((block) => (block?.type || block?.mobile?.type || '') in blocksRegistry && !block.mobile?.hidden)
|
|
6
|
-
.map(normalizeBlock_1.normalizeBlock);
|
|
7
|
-
exports.filterBlocks = filterBlocks;
|
|
8
|
-
//# sourceMappingURL=filterBlocks.mobile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterBlocks.mobile.js","sourceRoot":"","sources":["../../../src/components/ContentPage/filterBlocks.mobile.ts"],"names":[],"mappings":";;AAEA,qDAAkD;AAE3C,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,cAA8B,EAAE,EAAE,CACjF,MAAM;IACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CACxF;KACA,GAAG,CAAC,+BAAc,CAAC,CAAC;AANZ,QAAA,YAAY,gBAMA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const filterBlocks: (blocks: BlockDef[], blocksRegistry: BlocksRegistry) => {
|
|
4
|
-
type?: string | undefined;
|
|
5
|
-
content?: Record<string, any> | undefined;
|
|
6
|
-
version?: import("../../model/BlockVersion").BlockVersion | undefined;
|
|
7
|
-
hidden?: boolean | undefined;
|
|
8
|
-
anchor?: string | undefined;
|
|
9
|
-
labels?: string[] | undefined;
|
|
10
|
-
style?: string[] | undefined;
|
|
11
|
-
blocks?: BlockDef[] | undefined;
|
|
12
|
-
}[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterBlocks.js","sourceRoot":"","sources":["../../../src/components/ContentPage/filterBlocks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,cAA8B,EAAE,EAAE,CACjF,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const filterBlocks: (blocks: BlockDef[], blocksRegistry: BlocksRegistry) => {
|
|
4
|
-
type?: string | undefined;
|
|
5
|
-
content?: Record<string, any> | undefined;
|
|
6
|
-
version?: import("../../model/BlockVersion").BlockVersion | undefined;
|
|
7
|
-
hidden?: boolean | undefined;
|
|
8
|
-
anchor?: string | undefined;
|
|
9
|
-
labels?: string[] | undefined;
|
|
10
|
-
style?: string[] | undefined;
|
|
11
|
-
blocks?: BlockDef[] | undefined;
|
|
12
|
-
}[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { normalizeBlock } from './normalizeBlock.js';
|
|
2
|
-
export const filterBlocks = (blocks, blocksRegistry) => blocks
|
|
3
|
-
?.filter((block) => (block?.type || block?.mobile?.type || '') in blocksRegistry && !block.mobile?.hidden)
|
|
4
|
-
.map(normalizeBlock);
|
|
5
|
-
//# sourceMappingURL=filterBlocks.mobile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterBlocks.mobile.js","sourceRoot":"","sources":["../../../src/components/ContentPage/filterBlocks.mobile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,cAA8B,EAAE,EAAE,CACjF,MAAM;IACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CACxF;KACA,GAAG,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.filterBlocks = void 0;
|
|
3
|
-
const normalizeBlock_1 = require("./normalizeBlock");
|
|
4
|
-
const filterBlocks = (blocks, blocksRegistry) => blocks
|
|
5
|
-
?.filter((block) => (block?.type || block?.mobile?.type || '') in blocksRegistry && !block.mobile?.hidden)
|
|
6
|
-
.map(normalizeBlock_1.normalizeBlock);
|
|
7
|
-
exports.filterBlocks = filterBlocks;
|
|
8
|
-
//# sourceMappingURL=filterBlocks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterBlocks.js","sourceRoot":"","sources":["../../../src/components/ContentPage/filterBlocks.ts"],"names":[],"mappings":";;AAEA,qDAAkD;AAE3C,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,cAA8B,EAAE,EAAE,CACjF,MAAM;IACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CACxF;KACA,GAAG,CAAC,+BAAc,CAAC,CAAC;AANZ,QAAA,YAAY,gBAMA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { normalizeBlock } from './normalizeBlock.js';
|
|
2
|
-
export const filterBlocks = (blocks, blocksRegistry) => blocks
|
|
3
|
-
?.filter((block) => (block?.type || block?.mobile?.type || '') in blocksRegistry && !block.mobile?.hidden)
|
|
4
|
-
.map(normalizeBlock);
|
|
5
|
-
//# sourceMappingURL=filterBlocks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterBlocks.js","sourceRoot":"","sources":["../../../src/components/ContentPage/filterBlocks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAkB,EAAE,cAA8B,EAAE,EAAE,CACjF,MAAM;IACJ,EAAE,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CACxF;KACA,GAAG,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
import { normalizeBlock } from './normalizeBlock';
|
|
4
|
-
|
|
5
|
-
export const filterBlocks = (blocks: BlockDef[], blocksRegistry: BlocksRegistry) =>
|
|
6
|
-
blocks
|
|
7
|
-
?.filter(
|
|
8
|
-
(block) =>
|
|
9
|
-
(block?.type || block?.mobile?.type || '') in blocksRegistry && !block.mobile?.hidden,
|
|
10
|
-
)
|
|
11
|
-
.map(normalizeBlock);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
import { normalizeBlock } from './normalizeBlock';
|
|
4
|
-
|
|
5
|
-
export const filterBlocks = (blocks: BlockDef[], blocksRegistry: BlocksRegistry) =>
|
|
6
|
-
blocks
|
|
7
|
-
?.filter(
|
|
8
|
-
(block) =>
|
|
9
|
-
(block?.type || block?.mobile?.type || '') in blocksRegistry && !block.mobile?.hidden,
|
|
10
|
-
)
|
|
11
|
-
.map(normalizeBlock);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
|
-
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
import { normalizeBlock } from './normalizeBlock';
|
|
4
|
-
|
|
5
|
-
export const filterBlocks = (blocks: BlockDef[], blocksRegistry: BlocksRegistry) =>
|
|
6
|
-
blocks?.filter((block) => (block?.type || '') in blocksRegistry).map(normalizeBlock);
|