@redneckz/wildless-cms-uni-blocks 0.15.336 → 0.15.338
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/bundle.umd.js +2 -2
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ContentPage/normalizeBlock.d.ts +1 -2
- package/bundle/components/ContentPage/normalizePage.d.ts +1 -2
- package/dist/components/ContentPage/normalizeBlock.d.ts +1 -2
- package/dist/components/ContentPage/normalizeBlock.js +2 -7
- package/dist/components/ContentPage/normalizeBlock.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.d.ts +1 -2
- package/dist/components/ContentPage/normalizePage.js +1 -1
- package/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/dist/components/Header/isHrefActive.js +1 -1
- package/dist/components/Header/isHrefActive.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.d.ts +1 -2
- package/lib/components/ContentPage/normalizeBlock.js +2 -7
- package/lib/components/ContentPage/normalizeBlock.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.d.ts +1 -2
- package/lib/components/ContentPage/normalizePage.js +1 -1
- package/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/lib/components/Header/isHrefActive.js +1 -1
- package/lib/components/Header/isHrefActive.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ContentPage/normalizePage.d.ts +1 -2
- package/mobile/dist/components/ContentPage/normalizePage.d.ts +1 -2
- package/mobile/dist/components/ContentPage/normalizePage.js +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/dist/components/Header/isHrefActive.js +1 -1
- package/mobile/dist/components/Header/isHrefActive.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.d.ts +1 -2
- package/mobile/lib/components/ContentPage/normalizePage.js +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/lib/components/Header/isHrefActive.js +1 -1
- package/mobile/lib/components/Header/isHrefActive.js.map +1 -1
- package/mobile/src/components/ContentPage/normalizePage.ts +2 -5
- package/mobile/src/components/Header/isHrefActive.ts +1 -1
- package/package.json +1 -1
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -3
- package/src/components/ContentPage/ContentPage.fixture.tsx +2 -2
- package/src/components/ContentPage/normalizeBlock.ts +4 -12
- package/src/components/ContentPage/normalizePage.ts +2 -5
- package/src/components/Header/isHrefActive.ts +1 -1
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { type BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
1
|
import { type Slot } from '../../model/ContentPageDef';
|
|
3
|
-
export declare function normalizeBlock<S extends Slot>(block?: S
|
|
2
|
+
export declare function normalizeBlock<S extends Slot>(block?: S): S;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { type BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
1
|
import { type ContentPageDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const normalizePage: (
|
|
2
|
+
export declare const normalizePage: (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { type BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
1
|
import { type Slot } from '../../model/ContentPageDef';
|
|
3
|
-
export declare function normalizeBlock<S extends Slot>(block?: S
|
|
2
|
+
export declare function normalizeBlock<S extends Slot>(block?: S): S;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.normalizeBlock = void 0;
|
|
3
3
|
const mapSlot_1 = require("./mapSlot");
|
|
4
|
-
function normalizeBlock(block
|
|
4
|
+
function normalizeBlock(block) {
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
6
|
const { mobile, ...result } = (block || {});
|
|
7
|
-
return (0, mapSlot_1.mapSlot)(
|
|
7
|
+
return (0, mapSlot_1.mapSlot)((childBlocks) => (childBlocks ? childBlocks.map(normalizeBlock) : []))(result);
|
|
8
8
|
}
|
|
9
9
|
exports.normalizeBlock = normalizeBlock;
|
|
10
|
-
const filterBlocks = (blocksRegistry) => (blocks) => blocks
|
|
11
|
-
? blocks
|
|
12
|
-
.filter((block) => blocksRegistry && (block?.type || '') in blocksRegistry)
|
|
13
|
-
.map((block) => normalizeBlock(block, blocksRegistry))
|
|
14
|
-
: [];
|
|
15
10
|
//# sourceMappingURL=normalizeBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":";;AACA,uCAAoC;AAEpC,SAAgB,cAAc,CAAiB,KAAS;IACtD,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IAExD,OAAO,IAAA,iBAAO,EAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CACnF,MAAM,CACF,CAAC;AACT,CAAC;AAPD,wCAOC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { type BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
1
|
import { type ContentPageDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const normalizePage: (
|
|
2
|
+
export declare const normalizePage: (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.normalizePage = void 0;
|
|
3
3
|
const normalizeBlock_1 = require("./normalizeBlock");
|
|
4
|
-
const normalizePage = (
|
|
4
|
+
const normalizePage = (contentPage) => contentPage ? (0, normalizeBlock_1.normalizeBlock)(contentPage) : {};
|
|
5
5
|
exports.normalizePage = normalizePage;
|
|
6
6
|
//# sourceMappingURL=normalizePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":";;AACA,qDAAkD;AAE3C,MAAM,aAAa,GAAG,CAAC,WAA8C,EAAkB,EAAE,CAC9F,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AADpC,QAAA,aAAa,iBACuB"}
|
|
@@ -2,6 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.isHrefActive = void 0;
|
|
3
3
|
const url_1 = require("../../utils/url");
|
|
4
4
|
const isHrefActive = (pathname) => ({ href }) => Boolean(href &&
|
|
5
|
-
(0, url_1.withoutQuery)((0, url_1.isURL)(href) ? globalThis?.location
|
|
5
|
+
(0, url_1.withoutQuery)((0, url_1.isURL)(href) ? globalThis?.location?.href : pathname).startsWith((0, url_1.withoutQuery)(href)));
|
|
6
6
|
exports.isHrefActive = isHrefActive;
|
|
7
7
|
//# sourceMappingURL=isHrefActive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":";;AAAA,yCAAsD;AAE/C,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,IAAA,kBAAY,EAAC,IAAA,WAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":";;AAAA,yCAAsD;AAE/C,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,IAAA,kBAAY,EAAC,IAAA,WAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CAC1E,IAAA,kBAAY,EAAC,IAAI,CAAC,CACnB,CACJ,CAAC;AARO,QAAA,YAAY,gBAQnB"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { type BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
1
|
import { type Slot } from '../../model/ContentPageDef';
|
|
3
|
-
export declare function normalizeBlock<S extends Slot>(block?: S
|
|
2
|
+
export declare function normalizeBlock<S extends Slot>(block?: S): S;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { mapSlot } from './mapSlot.js';
|
|
2
|
-
export function normalizeBlock(block
|
|
2
|
+
export function normalizeBlock(block) {
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
4
|
const { mobile, ...result } = (block || {});
|
|
5
|
-
return mapSlot(
|
|
5
|
+
return mapSlot((childBlocks) => (childBlocks ? childBlocks.map(normalizeBlock) : []))(result);
|
|
6
6
|
}
|
|
7
|
-
const filterBlocks = (blocksRegistry) => (blocks) => blocks
|
|
8
|
-
? blocks
|
|
9
|
-
.filter((block) => blocksRegistry && (block?.type || '') in blocksRegistry)
|
|
10
|
-
.map((block) => normalizeBlock(block, blocksRegistry))
|
|
11
|
-
: [];
|
|
12
7
|
//# sourceMappingURL=normalizeBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAU,cAAc,CAAiB,KAAS;IACtD,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IAExD,OAAO,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CACnF,MAAM,CACF,CAAC;AACT,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { type BlocksRegistry } from '../../model/BlocksRegistry';
|
|
2
1
|
import { type ContentPageDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare const normalizePage: (
|
|
2
|
+
export declare const normalizePage: (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { normalizeBlock } from './normalizeBlock.js';
|
|
2
|
-
export const normalizePage = (
|
|
2
|
+
export const normalizePage = (contentPage) => contentPage ? normalizeBlock(contentPage) : {};
|
|
3
3
|
//# sourceMappingURL=normalizePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizePage.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizePage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAA8C,EAAkB,EAAE,CAC9F,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { isURL, withoutQuery } from '../../utils/url.js';
|
|
2
2
|
export const isHrefActive = (pathname) => ({ href }) => Boolean(href &&
|
|
3
|
-
withoutQuery(isURL(href) ? globalThis?.location
|
|
3
|
+
withoutQuery(isURL(href) ? globalThis?.location?.href : pathname).startsWith(withoutQuery(href)));
|
|
4
4
|
//# sourceMappingURL=isHrefActive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/components/Header/isHrefActive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GACvB,CAAC,QAAgB,EAAE,EAAE,CACrB,CAAC,EAAE,IAAI,EAAqB,EAAW,EAAE,CACvC,OAAO,CACL,IAAI;IACF,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CAC1E,YAAY,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC"}
|
|
@@ -13,4 +13,4 @@ export interface OfficesAtmsMapLayoutProps<T> {
|
|
|
13
13
|
descriptionData?: AtmsDef;
|
|
14
14
|
title?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare const OfficesAtmsMapLayout: import("@redneckz/uni-jsx").UNIComponent<OfficesAtmsMapLayoutProps<
|
|
16
|
+
export declare const OfficesAtmsMapLayout: import("@redneckz/uni-jsx").UNIComponent<OfficesAtmsMapLayoutProps<Atm | Branch>, any, any>;
|