@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.
Files changed (42) hide show
  1. package/bundle/bundle.umd.js +2 -2
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ContentPage/normalizeBlock.d.ts +1 -2
  4. package/bundle/components/ContentPage/normalizePage.d.ts +1 -2
  5. package/dist/components/ContentPage/normalizeBlock.d.ts +1 -2
  6. package/dist/components/ContentPage/normalizeBlock.js +2 -7
  7. package/dist/components/ContentPage/normalizeBlock.js.map +1 -1
  8. package/dist/components/ContentPage/normalizePage.d.ts +1 -2
  9. package/dist/components/ContentPage/normalizePage.js +1 -1
  10. package/dist/components/ContentPage/normalizePage.js.map +1 -1
  11. package/dist/components/Header/isHrefActive.js +1 -1
  12. package/dist/components/Header/isHrefActive.js.map +1 -1
  13. package/lib/components/ContentPage/normalizeBlock.d.ts +1 -2
  14. package/lib/components/ContentPage/normalizeBlock.js +2 -7
  15. package/lib/components/ContentPage/normalizeBlock.js.map +1 -1
  16. package/lib/components/ContentPage/normalizePage.d.ts +1 -2
  17. package/lib/components/ContentPage/normalizePage.js +1 -1
  18. package/lib/components/ContentPage/normalizePage.js.map +1 -1
  19. package/lib/components/Header/isHrefActive.js +1 -1
  20. package/lib/components/Header/isHrefActive.js.map +1 -1
  21. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  22. package/mobile/bundle/bundle.umd.js +1 -1
  23. package/mobile/bundle/bundle.umd.min.js +1 -1
  24. package/mobile/bundle/components/ContentPage/normalizePage.d.ts +1 -2
  25. package/mobile/dist/components/ContentPage/normalizePage.d.ts +1 -2
  26. package/mobile/dist/components/ContentPage/normalizePage.js +1 -1
  27. package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
  28. package/mobile/dist/components/Header/isHrefActive.js +1 -1
  29. package/mobile/dist/components/Header/isHrefActive.js.map +1 -1
  30. package/mobile/lib/components/ContentPage/normalizePage.d.ts +1 -2
  31. package/mobile/lib/components/ContentPage/normalizePage.js +1 -1
  32. package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
  33. package/mobile/lib/components/Header/isHrefActive.js +1 -1
  34. package/mobile/lib/components/Header/isHrefActive.js.map +1 -1
  35. package/mobile/src/components/ContentPage/normalizePage.ts +2 -5
  36. package/mobile/src/components/Header/isHrefActive.ts +1 -1
  37. package/package.json +1 -1
  38. package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -3
  39. package/src/components/ContentPage/ContentPage.fixture.tsx +2 -2
  40. package/src/components/ContentPage/normalizeBlock.ts +4 -12
  41. package/src/components/ContentPage/normalizePage.ts +2 -5
  42. 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, blocksRegistry?: BlocksRegistry): 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: (blocksRegistry: BlocksRegistry) => (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
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, blocksRegistry?: BlocksRegistry): 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, blocksRegistry) {
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)(filterBlocks(blocksRegistry))({ ...result });
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":";;AAEA,uCAAoC;AAEpC,SAAgB,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IAExD,OAAO,IAAA,iBAAO,EAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAM,CAAC;AACnE,CAAC;AALD,wCAKC;AAED,MAAM,YAAY,GAChB,CAAC,cAA+B,EAAE,EAAE,CACpC,CAAC,MAAmB,EAAc,EAAE,CAClC,MAAM;IACJ,CAAC,CAAC,MAAM;SACH,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,CAAC;SAC1E,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAC1D,CAAC,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":";;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: (blocksRegistry: BlocksRegistry) => (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
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 = (blocksRegistry) => (contentPage) => contentPage ? (0, normalizeBlock_1.normalizeBlock)(contentPage, blocksRegistry) : {};
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":";;AAEA,qDAAkD;AAE3C,MAAM,aAAa,GACxB,CAAC,cAA8B,EAAE,EAAE,CACnC,CAAC,WAA8C,EAAkB,EAAE,CACjE,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAHtD,QAAA,aAAa,iBAGyC"}
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.href : pathname).startsWith((0, url_1.withoutQuery)(href)));
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,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CACzE,IAAA,kBAAY,EAAC,IAAI,CAAC,CACnB,CACJ,CAAC;AARO,QAAA,YAAY,gBAQnB"}
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, blocksRegistry?: BlocksRegistry): 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, blocksRegistry) {
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(filterBlocks(blocksRegistry))({ ...result });
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":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,UAAU,cAAc,CAAiB,KAAS,EAAE,cAA+B;IACvF,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAa,CAAC;IAExD,OAAO,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAM,CAAC;AACnE,CAAC;AAED,MAAM,YAAY,GAChB,CAAC,cAA+B,EAAE,EAAE,CACpC,CAAC,MAAmB,EAAc,EAAE,CAClC,MAAM;IACJ,CAAC,CAAC,MAAM;SACH,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,IAAI,cAAc,CAAC;SAC1E,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAC1D,CAAC,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"normalizeBlock.js","sourceRoot":"","sources":["../../../src/components/ContentPage/normalizeBlock.ts"],"names":[],"mappings":"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: (blocksRegistry: BlocksRegistry) => (contentPage: ContentPageDef | undefined | null) => ContentPageDef;
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 = (blocksRegistry) => (contentPage) => contentPage ? normalizeBlock(contentPage, blocksRegistry) : {};
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":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GACxB,CAAC,cAA8B,EAAE,EAAE,CACnC,CAAC,WAA8C,EAAkB,EAAE,CACjE,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC"}
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.href : pathname).startsWith(withoutQuery(href)));
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,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,UAAU,CACzE,YAAY,CAAC,IAAI,CAAC,CACnB,CACJ,CAAC"}
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<Branch | Atm>, any, any>;
16
+ export declare const OfficesAtmsMapLayout: import("@redneckz/uni-jsx").UNIComponent<OfficesAtmsMapLayoutProps<Atm | Branch>, any, any>;
@@ -5729,7 +5729,7 @@
5729
5729
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
5730
5730
  });
5731
5731
 
5732
- const packageVersion = "0.15.335";
5732
+ const packageVersion = "0.15.337";
5733
5733
 
5734
5734
  exports.Blocks = Blocks;
5735
5735
  exports.ContentPage = ContentPage;