@blaze-cms/react-page-builder 0.146.0-node18-core-styles-tooltips.29 → 0.146.0-node18-core-styles-tooltips.31

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,26 @@
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-core-styles-tooltips.31](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.30...v0.146.0-node18-core-styles-tooltips.31) (2025-11-26)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * added handlebar prop validation ([#5014](https://github.com/thebyte9/blaze/issues/5014)) ([f949bc5](https://github.com/thebyte9/blaze/commit/f949bc5d949d9a33c7aef8485e1fe13f48e79d28))
12
+ * fixed lint on handlebar inject test ([#5018](https://github.com/thebyte9/blaze/issues/5018)) ([c57f06c](https://github.com/thebyte9/blaze/commit/c57f06c03b095dd4e5f0683d9fcf94a22d80c592))
13
+
14
+
15
+
16
+
17
+
18
+ # [0.146.0-node18-core-styles-tooltips.30](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.29...v0.146.0-node18-core-styles-tooltips.30) (2025-11-25)
19
+
20
+ **Note:** Version bump only for package @blaze-cms/react-page-builder
21
+
22
+
23
+
24
+
25
+
6
26
  # [0.146.0-node18-core-styles-tooltips.29](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.28...v0.146.0-node18-core-styles-tooltips.29) (2025-11-17)
7
27
 
8
28
  **Note:** Version bump only for package @blaze-cms/react-page-builder
@@ -5,12 +5,27 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports["default"] = void 0;
8
+ require("core-js/modules/es.array.concat.js");
8
9
  require("core-js/modules/es.regexp.exec.js");
9
10
  require("core-js/modules/es.string.replace.js");
11
+ require("core-js/modules/es.string.starts-with.js");
12
+ require("core-js/modules/es.string.trim.js");
10
13
  var injectHelperIntoTemplate = function injectHelperIntoTemplate(template, helper) {
11
14
  if (!helper || !template) return template;
12
- var result = template.replace(/{{{([^{}]+)}}}/g, "{{{".concat(helper, " $1}}}"));
13
- result = result.replace(/{{([^{}]+)}}(?!})/g, "{{".concat(helper, " $1}}"));
15
+
16
+ // Inject helper into triple-stash expressions unless they are block/closing tags
17
+ var result = template.replace(/{{{([^{}]+)}}}/g, function (match, inner) {
18
+ var trimmed = inner.trim();
19
+ if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else
20
+ return "{{{".concat(helper, " ").concat(inner, "}}}");
21
+ });
22
+
23
+ // Inject helper into double-stash expressions (excluding triple) unless block/closing tags
24
+ result = result.replace(/{{([^{}]+)}}(?!})/g, function (match, inner) {
25
+ var trimmed = inner.trim();
26
+ if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else
27
+ return "{{".concat(helper, " ").concat(inner, "}}");
28
+ });
14
29
  return result;
15
30
  };
16
31
  var _default = exports["default"] = injectHelperIntoTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"inject-helper-into-template.js","names":["injectHelperIntoTemplate","template","helper","result","replace","concat","_default","exports"],"sources":["../../../../src/components/MenuItem/helpers/inject-helper-into-template.js"],"sourcesContent":["const injectHelperIntoTemplate = (template, helper) => {\n if (!helper || !template) return template;\n\n let result = template.replace(/{{{([^{}]+)}}}/g, `{{{${helper} $1}}}`);\n\n result = result.replace(/{{([^{}]+)}}(?!})/g, `{{${helper} $1}}`);\n\n return result;\n};\n\nexport default injectHelperIntoTemplate;\n"],"mappings":";;;;;;;;;AAAA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,QAAQ,EAAEC,MAAM,EAAK;EACrD,IAAI,CAACA,MAAM,IAAI,CAACD,QAAQ,EAAE,OAAOA,QAAQ;EAEzC,IAAIE,MAAM,GAAGF,QAAQ,CAACG,OAAO,CAAC,iBAAiB,QAAAC,MAAA,CAAQH,MAAM,WAAQ,CAAC;EAEtEC,MAAM,GAAGA,MAAM,CAACC,OAAO,CAAC,oBAAoB,OAAAC,MAAA,CAAOH,MAAM,UAAO,CAAC;EAEjE,OAAOC,MAAM;AACf,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,cAEaP,wBAAwB","ignoreList":[]}
1
+ {"version":3,"file":"inject-helper-into-template.js","names":["injectHelperIntoTemplate","template","helper","result","replace","match","inner","trimmed","trim","startsWith","concat","_default","exports"],"sources":["../../../../src/components/MenuItem/helpers/inject-helper-into-template.js"],"sourcesContent":["const injectHelperIntoTemplate = (template, helper) => {\n if (!helper || !template) return template;\n\n // Inject helper into triple-stash expressions unless they are block/closing tags\n let result = template.replace(/{{{([^{}]+)}}}/g, (match, inner) => {\n const trimmed = inner.trim();\n if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else\n return `{{{${helper} ${inner}}}}`;\n });\n\n // Inject helper into double-stash expressions (excluding triple) unless block/closing tags\n result = result.replace(/{{([^{}]+)}}(?!})/g, (match, inner) => {\n const trimmed = inner.trim();\n if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else\n return `{{${helper} ${inner}}}`;\n });\n\n return result;\n};\n\nexport default injectHelperIntoTemplate;\n"],"mappings":";;;;;;;;;;;;AAAA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,QAAQ,EAAEC,MAAM,EAAK;EACrD,IAAI,CAACA,MAAM,IAAI,CAACD,QAAQ,EAAE,OAAOA,QAAQ;;EAEzC;EACA,IAAIE,MAAM,GAAGF,QAAQ,CAACG,OAAO,CAAC,iBAAiB,EAAE,UAACC,KAAK,EAAEC,KAAK,EAAK;IACjE,IAAMC,OAAO,GAAGD,KAAK,CAACE,IAAI,CAAC,CAAC;IAC5B,IAAID,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,KAAK,MAAM,EAAE,OAAOF,KAAK,CAAC,CAAC;IAC5F,aAAAK,MAAA,CAAaR,MAAM,OAAAQ,MAAA,CAAIJ,KAAK;EAC9B,CAAC,CAAC;;EAEF;EACAH,MAAM,GAAGA,MAAM,CAACC,OAAO,CAAC,oBAAoB,EAAE,UAACC,KAAK,EAAEC,KAAK,EAAK;IAC9D,IAAMC,OAAO,GAAGD,KAAK,CAACE,IAAI,CAAC,CAAC;IAC5B,IAAID,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,KAAK,MAAM,EAAE,OAAOF,KAAK,CAAC,CAAC;IAC5F,YAAAK,MAAA,CAAYR,MAAM,OAAAQ,MAAA,CAAIJ,KAAK;EAC7B,CAAC,CAAC;EAEF,OAAOH,MAAM;AACf,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,cAEaZ,wBAAwB","ignoreList":[]}
@@ -1,7 +1,19 @@
1
1
  const injectHelperIntoTemplate = (template, helper) => {
2
2
  if (!helper || !template) return template;
3
- let result = template.replace(/{{{([^{}]+)}}}/g, `{{{${helper} $1}}}`);
4
- result = result.replace(/{{([^{}]+)}}(?!})/g, `{{${helper} $1}}`);
3
+
4
+ // Inject helper into triple-stash expressions unless they are block/closing tags
5
+ let result = template.replace(/{{{([^{}]+)}}}/g, (match, inner) => {
6
+ const trimmed = inner.trim();
7
+ if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else
8
+ return `{{{${helper} ${inner}}}}`;
9
+ });
10
+
11
+ // Inject helper into double-stash expressions (excluding triple) unless block/closing tags
12
+ result = result.replace(/{{([^{}]+)}}(?!})/g, (match, inner) => {
13
+ const trimmed = inner.trim();
14
+ if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else
15
+ return `{{${helper} ${inner}}}`;
16
+ });
5
17
  return result;
6
18
  };
7
19
  export default injectHelperIntoTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"inject-helper-into-template.js","names":["injectHelperIntoTemplate","template","helper","result","replace"],"sources":["../../../../src/components/MenuItem/helpers/inject-helper-into-template.js"],"sourcesContent":["const injectHelperIntoTemplate = (template, helper) => {\n if (!helper || !template) return template;\n\n let result = template.replace(/{{{([^{}]+)}}}/g, `{{{${helper} $1}}}`);\n\n result = result.replace(/{{([^{}]+)}}(?!})/g, `{{${helper} $1}}`);\n\n return result;\n};\n\nexport default injectHelperIntoTemplate;\n"],"mappings":"AAAA,MAAMA,wBAAwB,GAAGA,CAACC,QAAQ,EAAEC,MAAM,KAAK;EACrD,IAAI,CAACA,MAAM,IAAI,CAACD,QAAQ,EAAE,OAAOA,QAAQ;EAEzC,IAAIE,MAAM,GAAGF,QAAQ,CAACG,OAAO,CAAC,iBAAiB,EAAE,MAAMF,MAAM,QAAQ,CAAC;EAEtEC,MAAM,GAAGA,MAAM,CAACC,OAAO,CAAC,oBAAoB,EAAE,KAAKF,MAAM,OAAO,CAAC;EAEjE,OAAOC,MAAM;AACf,CAAC;AAED,eAAeH,wBAAwB","ignoreList":[]}
1
+ {"version":3,"file":"inject-helper-into-template.js","names":["injectHelperIntoTemplate","template","helper","result","replace","match","inner","trimmed","trim","startsWith"],"sources":["../../../../src/components/MenuItem/helpers/inject-helper-into-template.js"],"sourcesContent":["const injectHelperIntoTemplate = (template, helper) => {\n if (!helper || !template) return template;\n\n // Inject helper into triple-stash expressions unless they are block/closing tags\n let result = template.replace(/{{{([^{}]+)}}}/g, (match, inner) => {\n const trimmed = inner.trim();\n if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else\n return `{{{${helper} ${inner}}}}`;\n });\n\n // Inject helper into double-stash expressions (excluding triple) unless block/closing tags\n result = result.replace(/{{([^{}]+)}}(?!})/g, (match, inner) => {\n const trimmed = inner.trim();\n if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else\n return `{{${helper} ${inner}}}`;\n });\n\n return result;\n};\n\nexport default injectHelperIntoTemplate;\n"],"mappings":"AAAA,MAAMA,wBAAwB,GAAGA,CAACC,QAAQ,EAAEC,MAAM,KAAK;EACrD,IAAI,CAACA,MAAM,IAAI,CAACD,QAAQ,EAAE,OAAOA,QAAQ;;EAEzC;EACA,IAAIE,MAAM,GAAGF,QAAQ,CAACG,OAAO,CAAC,iBAAiB,EAAE,CAACC,KAAK,EAAEC,KAAK,KAAK;IACjE,MAAMC,OAAO,GAAGD,KAAK,CAACE,IAAI,CAAC,CAAC;IAC5B,IAAID,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,KAAK,MAAM,EAAE,OAAOF,KAAK,CAAC,CAAC;IAC5F,OAAO,MAAMH,MAAM,IAAII,KAAK,KAAK;EACnC,CAAC,CAAC;;EAEF;EACAH,MAAM,GAAGA,MAAM,CAACC,OAAO,CAAC,oBAAoB,EAAE,CAACC,KAAK,EAAEC,KAAK,KAAK;IAC9D,MAAMC,OAAO,GAAGD,KAAK,CAACE,IAAI,CAAC,CAAC;IAC5B,IAAID,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,CAACE,UAAU,CAAC,GAAG,CAAC,IAAIF,OAAO,KAAK,MAAM,EAAE,OAAOF,KAAK,CAAC,CAAC;IAC5F,OAAO,KAAKH,MAAM,IAAII,KAAK,IAAI;EACjC,CAAC,CAAC;EAEF,OAAOH,MAAM;AACf,CAAC;AAED,eAAeH,wBAAwB","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-core-styles-tooltips.29",
3
+ "version": "0.146.0-node18-core-styles-tooltips.31",
4
4
  "description": "Blaze react page builder",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -27,15 +27,15 @@
27
27
  },
28
28
  "license": "GPL-3.0",
29
29
  "dependencies": {
30
- "@blaze-cms/core-auth-ui": "0.146.0-node18-core-styles-tooltips.26",
30
+ "@blaze-cms/core-auth-ui": "0.146.0-node18-core-styles-tooltips.30",
31
31
  "@blaze-cms/core-errors": "0.146.0-node18-core-styles-tooltips.3",
32
32
  "@blaze-cms/core-errors-ui": "0.146.0-node18-core-styles-tooltips.3",
33
33
  "@blaze-cms/image-cdn-react": "0.3.0-alpha.7",
34
34
  "@blaze-cms/nextjs-components": "0.146.0-node18-core-styles-tooltips.29",
35
- "@blaze-cms/plugin-search-ui": "0.146.0-node18-core-styles-tooltips.27",
35
+ "@blaze-cms/plugin-search-ui": "0.146.0-node18-core-styles-tooltips.30",
36
36
  "@blaze-cms/setup-ui": "0.146.0-node18-core-styles-tooltips.3",
37
- "@blaze-cms/utils": "0.146.0-node18-core-styles-tooltips.15",
38
- "@blaze-cms/utils-handlebars": "0.146.0-node18-core-styles-tooltips.29",
37
+ "@blaze-cms/utils": "0.146.0-node18-core-styles-tooltips.30",
38
+ "@blaze-cms/utils-handlebars": "0.146.0-node18-core-styles-tooltips.31",
39
39
  "@blaze-react/badge": "^0.7.0",
40
40
  "@blaze-react/breadcrumb": "0.8.0-alpha.60",
41
41
  "@blaze-react/button": "0.8.0-alpha.82",
@@ -92,5 +92,5 @@
92
92
  "lib/*",
93
93
  "lib-es/*"
94
94
  ],
95
- "gitHead": "61803c4520e809dc3a611c6e3a729ea67d0eb4fa"
95
+ "gitHead": "4fa95f119f8f2aff878929f1840ed64f614f277b"
96
96
  }
@@ -1,9 +1,19 @@
1
1
  const injectHelperIntoTemplate = (template, helper) => {
2
2
  if (!helper || !template) return template;
3
3
 
4
- let result = template.replace(/{{{([^{}]+)}}}/g, `{{{${helper} $1}}}`);
4
+ // Inject helper into triple-stash expressions unless they are block/closing tags
5
+ let result = template.replace(/{{{([^{}]+)}}}/g, (match, inner) => {
6
+ const trimmed = inner.trim();
7
+ if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else
8
+ return `{{{${helper} ${inner}}}}`;
9
+ });
5
10
 
6
- result = result.replace(/{{([^{}]+)}}(?!})/g, `{{${helper} $1}}`);
11
+ // Inject helper into double-stash expressions (excluding triple) unless block/closing tags
12
+ result = result.replace(/{{([^{}]+)}}(?!})/g, (match, inner) => {
13
+ const trimmed = inner.trim();
14
+ if (trimmed.startsWith('#') || trimmed.startsWith('/') || trimmed === 'else') return match; // skip block helpers and else
15
+ return `{{${helper} ${inner}}}`;
16
+ });
7
17
 
8
18
  return result;
9
19
  };
@@ -41,4 +41,48 @@ describe('injectHelperIntoTemplate', () => {
41
41
  const result = injectHelperIntoTemplate(null, 'url_encode');
42
42
  expect(result).toBeNull();
43
43
  });
44
+
45
+ it('should ignore {{else}} pattern and not inject helper', () => {
46
+ const template = '{{#if condition}}true{{else}}false{{/if}}';
47
+ const expected = '{{#if condition}}true{{else}}false{{/if}}';
48
+ const result = injectHelperIntoTemplate(template, 'url_encode');
49
+ expect(result).toBe(expected);
50
+ });
51
+
52
+ it('should ignore block helpers starting with # and not inject helper', () => {
53
+ const template = '{{#if currentParent.active}}Active{{/if}}';
54
+ const expected = '{{#if currentParent.active}}Active{{/if}}';
55
+ const result = injectHelperIntoTemplate(template, 'url_encode');
56
+ expect(result).toBe(expected);
57
+ });
58
+
59
+ it('should ignore closing helpers starting with / and not inject helper', () => {
60
+ const template = '{{/each}}{{/if}}{{/unless}}';
61
+ const expected = '{{/each}}{{/if}}{{/unless}}';
62
+ const result = injectHelperIntoTemplate(template, 'url_encode');
63
+ expect(result).toBe(expected);
64
+ });
65
+
66
+ it('should inject helper into regular placeholders but ignore control flow statements', () => {
67
+ const template = '{{#if active}}{{currentParent.name}}{{else}}{{defaultName}}{{/if}}';
68
+ const expected =
69
+ '{{#if active}}{{url_encode currentParent.name}}{{else}}{{url_encode defaultName}}{{/if}}';
70
+ const result = injectHelperIntoTemplate(template, 'url_encode');
71
+ expect(result).toBe(expected);
72
+ });
73
+
74
+ it('should handle complex template with mixed block helpers and regular placeholders', () => {
75
+ const template = '{{#each items}}{{name}} - {{price}}{{else}}No items{{/each}}';
76
+ const expected =
77
+ '{{#each items}}{{url_encode name}} - {{url_encode price}}{{else}}No items{{/each}}';
78
+ const result = injectHelperIntoTemplate(template, 'url_encode');
79
+ expect(result).toBe(expected);
80
+ });
81
+
82
+ it('should ignore {{{else}}} in triple-stash expressions', () => {
83
+ const template = '{{{#if condition}}}{{{value}}}{{{else}}}default{{{/if}}}';
84
+ const expected = '{{{#if condition}}}{{{url_encode value}}}{{{else}}}default{{{/if}}}';
85
+ const result = injectHelperIntoTemplate(template, 'url_encode');
86
+ expect(result).toBe(expected);
87
+ });
44
88
  });