@qld-gov-au/qgds-bootstrap5 1.0.2 → 1.0.7
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/dist/assets/js/handlebars.helpers.bundle.js +1 -22
- package/dist/assets/js/handlebars.helpers.bundle.js.map +4 -4
- package/dist/assets/js/handlebars.helpers.js +7 -0
- package/dist/components/bs5/tag/tag.hbs +2 -2
- package/dist/components/handlebars.helpers.js +7 -0
- package/dist/components/{handlebars.helpers.bundle.js → handlebars.init.bundle.js} +8 -8
- package/dist/components/{handlebars.helpers.bundle.js.map → handlebars.init.bundle.js.map} +2 -2
- package/esbuild.js +2 -2
- package/package.json +6 -2
- package/src/components/bs5/tag/tag.hbs +2 -2
- package/src/js/handlebars.helpers.js +7 -0
package/esbuild.js
CHANGED
|
@@ -41,12 +41,12 @@ const buildConfig = {
|
|
|
41
41
|
out: "./assets/css/qld.bootstrap",
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
in: "./src/js/handlebars.
|
|
44
|
+
in: "./src/js/handlebars.helpers.js",
|
|
45
45
|
out: "./assets/js/handlebars.helpers.bundle",
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
in: "./src/js/handlebars.init.js",
|
|
49
|
-
out: "./components/handlebars.
|
|
49
|
+
out: "./components/handlebars.init.bundle",
|
|
50
50
|
},
|
|
51
51
|
],
|
|
52
52
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qld-gov-au/qgds-bootstrap5",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/qld-gov-au/qgds-qol-mvp"
|
|
8
|
+
},
|
|
5
9
|
"main": "index.js",
|
|
6
10
|
"scripts": {
|
|
7
11
|
"start": "npm run build",
|
|
@@ -73,7 +77,7 @@
|
|
|
73
77
|
"postcss": "^8.4.29",
|
|
74
78
|
"prettier": "3.2.5",
|
|
75
79
|
"raw-loader": "^4.0.2",
|
|
76
|
-
"rimraf": "^5.0.
|
|
80
|
+
"rimraf": "^5.0.7",
|
|
77
81
|
"sass": "^1.76.0",
|
|
78
82
|
"storybook": "^8.1.0",
|
|
79
83
|
"vite": "^5.2.11",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* global Handlebars */
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Registers Handlebars Helper for 'contains', 'ifCond', 'isMultipleOfThree' and 'isEndOfRow'
|
|
3
5
|
* @param {module} Handlebars Templating engine
|
|
@@ -5,6 +7,7 @@
|
|
|
5
7
|
*/
|
|
6
8
|
|
|
7
9
|
export default function handlebarsHelpers(Handlebars) {
|
|
10
|
+
|
|
8
11
|
Handlebars.registerHelper("contains", function (needle, haystack, options) {
|
|
9
12
|
needle = Handlebars.escapeExpression(needle);
|
|
10
13
|
haystack = Handlebars.escapeExpression(haystack);
|
|
@@ -51,3 +54,7 @@ export default function handlebarsHelpers(Handlebars) {
|
|
|
51
54
|
return ((index + 1) % 3 === 0); // Since index is zero-based, add 1 to check if it's the end of a row.
|
|
52
55
|
});
|
|
53
56
|
}
|
|
57
|
+
|
|
58
|
+
if(typeof(Handlebars) !== 'undefined') {
|
|
59
|
+
handlebarsHelpers(Handlebars);
|
|
60
|
+
}
|