@blaze-cms/react-page-builder 0.146.0-node18-tooltips.34 → 0.146.0-node18-tooltips.35

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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.146.0-node18-tooltips.35](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.34...v0.146.0-node18-tooltips.35) (2025-12-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * search filter handles url hashes correctly ([#5053](https://github.com/thebyte9/blaze/issues/5053)) ([d7e1393](https://github.com/thebyte9/blaze/commit/d7e1393a0167a98da7cca8a41aa7e9fcd72a2ebe))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.146.0-node18-tooltips.34](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.33...v0.146.0-node18-tooltips.34) (2025-12-17)
7
18
 
8
19
 
@@ -1,14 +1,20 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.object.define-property.js");
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports["default"] = void 0;
8
9
  require("core-js/modules/es.array.concat.js");
9
- var buildNewUrl = function buildNewUrl(url, currentUrl, queryParams, hashBit) {
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var buildNewUrl = function buildNewUrl(url, currentUrl, queryParams, newHashBit) {
10
12
  var encodedQuery = encodeURI(queryParams);
11
- var baseUrl = url || currentUrl;
13
+ var _split = (url || currentUrl).split('#'),
14
+ _split2 = (0, _slicedToArray2["default"])(_split, 2),
15
+ baseUrl = _split2[0],
16
+ urlHash = _split2[1];
17
+ var hashBit = newHashBit || urlHash || '';
12
18
  var newUrl = encodedQuery ? "".concat(baseUrl, "?").concat(encodedQuery) : "".concat(baseUrl);
13
19
  return hashBit ? "".concat(newUrl, "#").concat(hashBit) : newUrl;
14
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"build-new-url.js","names":["buildNewUrl","url","currentUrl","queryParams","hashBit","encodedQuery","encodeURI","baseUrl","newUrl","concat","_default","exports"],"sources":["../../../../src/components/SearchFilter/helpers/build-new-url.js"],"sourcesContent":["const buildNewUrl = (url, currentUrl, queryParams, hashBit) => {\n const encodedQuery = encodeURI(queryParams);\n const baseUrl = url || currentUrl;\n const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;\n return hashBit ? `${newUrl}#${hashBit}` : newUrl;\n};\n\nexport default buildNewUrl;\n"],"mappings":";;;;;;;;AAAA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAG,EAAEC,UAAU,EAAEC,WAAW,EAAEC,OAAO,EAAK;EAC7D,IAAMC,YAAY,GAAGC,SAAS,CAACH,WAAW,CAAC;EAC3C,IAAMI,OAAO,GAAGN,GAAG,IAAIC,UAAU;EACjC,IAAMM,MAAM,GAAGH,YAAY,MAAAI,MAAA,CAAMF,OAAO,OAAAE,MAAA,CAAIJ,YAAY,OAAAI,MAAA,CAAQF,OAAO,CAAE;EACzE,OAAOH,OAAO,MAAAK,MAAA,CAAMD,MAAM,OAAAC,MAAA,CAAIL,OAAO,IAAKI,MAAM;AAClD,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEaX,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"build-new-url.js","names":["buildNewUrl","url","currentUrl","queryParams","newHashBit","encodedQuery","encodeURI","_split","split","_split2","_slicedToArray2","baseUrl","urlHash","hashBit","newUrl","concat","_default","exports"],"sources":["../../../../src/components/SearchFilter/helpers/build-new-url.js"],"sourcesContent":["const buildNewUrl = (url, currentUrl, queryParams, newHashBit) => {\n const encodedQuery = encodeURI(queryParams);\n const [baseUrl, urlHash] = (url || currentUrl).split('#');\n const hashBit = newHashBit || urlHash || '';\n const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;\n return hashBit ? `${newUrl}#${hashBit}` : newUrl;\n};\n\nexport default buildNewUrl;\n"],"mappings":";;;;;;;;;;AAAA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,GAAG,EAAEC,UAAU,EAAEC,WAAW,EAAEC,UAAU,EAAK;EAChE,IAAMC,YAAY,GAAGC,SAAS,CAACH,WAAW,CAAC;EAC3C,IAAAI,MAAA,GAA2B,CAACN,GAAG,IAAIC,UAAU,EAAEM,KAAK,CAAC,GAAG,CAAC;IAAAC,OAAA,OAAAC,eAAA,aAAAH,MAAA;IAAlDI,OAAO,GAAAF,OAAA;IAAEG,OAAO,GAAAH,OAAA;EACvB,IAAMI,OAAO,GAAGT,UAAU,IAAIQ,OAAO,IAAI,EAAE;EAC3C,IAAME,MAAM,GAAGT,YAAY,MAAAU,MAAA,CAAMJ,OAAO,OAAAI,MAAA,CAAIV,YAAY,OAAAU,MAAA,CAAQJ,OAAO,CAAE;EACzE,OAAOE,OAAO,MAAAE,MAAA,CAAMD,MAAM,OAAAC,MAAA,CAAIF,OAAO,IAAKC,MAAM;AAClD,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,cAEajB,WAAW","ignoreList":[]}
@@ -1,6 +1,7 @@
1
- const buildNewUrl = (url, currentUrl, queryParams, hashBit) => {
1
+ const buildNewUrl = (url, currentUrl, queryParams, newHashBit) => {
2
2
  const encodedQuery = encodeURI(queryParams);
3
- const baseUrl = url || currentUrl;
3
+ const [baseUrl, urlHash] = (url || currentUrl).split('#');
4
+ const hashBit = newHashBit || urlHash || '';
4
5
  const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;
5
6
  return hashBit ? `${newUrl}#${hashBit}` : newUrl;
6
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"build-new-url.js","names":["buildNewUrl","url","currentUrl","queryParams","hashBit","encodedQuery","encodeURI","baseUrl","newUrl"],"sources":["../../../../src/components/SearchFilter/helpers/build-new-url.js"],"sourcesContent":["const buildNewUrl = (url, currentUrl, queryParams, hashBit) => {\n const encodedQuery = encodeURI(queryParams);\n const baseUrl = url || currentUrl;\n const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;\n return hashBit ? `${newUrl}#${hashBit}` : newUrl;\n};\n\nexport default buildNewUrl;\n"],"mappings":"AAAA,MAAMA,WAAW,GAAGA,CAACC,GAAG,EAAEC,UAAU,EAAEC,WAAW,EAAEC,OAAO,KAAK;EAC7D,MAAMC,YAAY,GAAGC,SAAS,CAACH,WAAW,CAAC;EAC3C,MAAMI,OAAO,GAAGN,GAAG,IAAIC,UAAU;EACjC,MAAMM,MAAM,GAAGH,YAAY,GAAG,GAAGE,OAAO,IAAIF,YAAY,EAAE,GAAG,GAAGE,OAAO,EAAE;EACzE,OAAOH,OAAO,GAAG,GAAGI,MAAM,IAAIJ,OAAO,EAAE,GAAGI,MAAM;AAClD,CAAC;AAED,eAAeR,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"build-new-url.js","names":["buildNewUrl","url","currentUrl","queryParams","newHashBit","encodedQuery","encodeURI","baseUrl","urlHash","split","hashBit","newUrl"],"sources":["../../../../src/components/SearchFilter/helpers/build-new-url.js"],"sourcesContent":["const buildNewUrl = (url, currentUrl, queryParams, newHashBit) => {\n const encodedQuery = encodeURI(queryParams);\n const [baseUrl, urlHash] = (url || currentUrl).split('#');\n const hashBit = newHashBit || urlHash || '';\n const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;\n return hashBit ? `${newUrl}#${hashBit}` : newUrl;\n};\n\nexport default buildNewUrl;\n"],"mappings":"AAAA,MAAMA,WAAW,GAAGA,CAACC,GAAG,EAAEC,UAAU,EAAEC,WAAW,EAAEC,UAAU,KAAK;EAChE,MAAMC,YAAY,GAAGC,SAAS,CAACH,WAAW,CAAC;EAC3C,MAAM,CAACI,OAAO,EAAEC,OAAO,CAAC,GAAG,CAACP,GAAG,IAAIC,UAAU,EAAEO,KAAK,CAAC,GAAG,CAAC;EACzD,MAAMC,OAAO,GAAGN,UAAU,IAAII,OAAO,IAAI,EAAE;EAC3C,MAAMG,MAAM,GAAGN,YAAY,GAAG,GAAGE,OAAO,IAAIF,YAAY,EAAE,GAAG,GAAGE,OAAO,EAAE;EACzE,OAAOG,OAAO,GAAG,GAAGC,MAAM,IAAID,OAAO,EAAE,GAAGC,MAAM;AAClD,CAAC;AAED,eAAeX,WAAW","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blaze-cms/react-page-builder",
3
- "version": "0.146.0-node18-tooltips.34",
3
+ "version": "0.146.0-node18-tooltips.35",
4
4
  "description": "Blaze react page builder",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -92,5 +92,5 @@
92
92
  "lib/*",
93
93
  "lib-es/*"
94
94
  ],
95
- "gitHead": "df92551425c4ca0c3e68ae30e83c97c94572280c"
95
+ "gitHead": "b3ca22d237c3a9703abd532b43f5093fbe91ce34"
96
96
  }
@@ -1,6 +1,7 @@
1
- const buildNewUrl = (url, currentUrl, queryParams, hashBit) => {
1
+ const buildNewUrl = (url, currentUrl, queryParams, newHashBit) => {
2
2
  const encodedQuery = encodeURI(queryParams);
3
- const baseUrl = url || currentUrl;
3
+ const [baseUrl, urlHash] = (url || currentUrl).split('#');
4
+ const hashBit = newHashBit || urlHash || '';
4
5
  const newUrl = encodedQuery ? `${baseUrl}?${encodedQuery}` : `${baseUrl}`;
5
6
  return hashBit ? `${newUrl}#${hashBit}` : newUrl;
6
7
  };
@@ -11,6 +11,10 @@ describe('buildNewUrl helper function', () => {
11
11
  const simpleExample = buildNewUrl(...mockedProps[0]);
12
12
  const withPropsUrl = buildNewUrl(...mockedProps[1]);
13
13
  const withHash = buildNewUrl(...mockedProps[3]);
14
+ const currentWithHash = buildNewUrl('urlFromProps#old-hash', '', 'q=1');
15
+ const preferNewHash = buildNewUrl('urlFromProps#old-hash', '', 'q=1', 'new-hash');
16
+ const noQuery = buildNewUrl('baseUrl', '', '');
17
+ const encodedQuery = buildNewUrl('baseUrl', '', 'q=hello world&name=John/Doe');
14
18
 
15
19
  it('should always return a string', () => {
16
20
  expect(typeof simpleExample).toBe('string');
@@ -28,4 +32,20 @@ describe('buildNewUrl helper function', () => {
28
32
  it('should return new url with hash if passed', () => {
29
33
  expect(withHash).toEqual('urlFromProps?another=query&withthis=value#this-is-content');
30
34
  });
35
+
36
+ it('should preserve existing hash when no new hash provided', () => {
37
+ expect(currentWithHash).toEqual('urlFromProps?q=1#old-hash');
38
+ });
39
+
40
+ it('should prefer new hash over existing url hash', () => {
41
+ expect(preferNewHash).toEqual('urlFromProps?q=1#new-hash');
42
+ });
43
+
44
+ it('should omit question mark when queryParams is empty', () => {
45
+ expect(noQuery).toEqual('baseUrl');
46
+ });
47
+
48
+ it('should URI-encode query params', () => {
49
+ expect(encodedQuery).toEqual('baseUrl?q=hello%20world&name=John/Doe');
50
+ });
31
51
  });