hoodcms 5.0.10 → 5.0.11

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/js/admin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * hoodcms v5.0.9
2
+ * hoodcms v5.0.11
3
3
  * A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
4
4
  * Written by George Whysall, 2021
5
5
  * Released under the GPL-3.0 License.
package/dist/js/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * hoodcms v5.0.9
2
+ * hoodcms v5.0.11
3
3
  * A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
4
4
  * Written by George Whysall, 2021
5
5
  * Released under the GPL-3.0 License.
@@ -0,0 +1,8 @@
1
+ export declare class Helpers {
2
+ constructor();
3
+ test(): string;
4
+ static isNullOrUndefined(a: any): boolean;
5
+ static isSet(a: any): boolean;
6
+ static isFunction(a: string): boolean;
7
+ static insertQueryStringParamToUrl(url: URL, key: string, value: string): URL;
8
+ }
@@ -0,0 +1,50 @@
1
+ export class Helpers {
2
+ constructor() {
3
+ }
4
+ test() {
5
+ return 'test';
6
+ }
7
+ static isNullOrUndefined(a) {
8
+ let rc = false;
9
+ if (a === null || typeof a === "undefined" || a === "") {
10
+ rc = true;
11
+ }
12
+ return rc;
13
+ }
14
+ static isSet(a) {
15
+ let rc = false;
16
+ if (a === null || typeof a === "undefined" || a === "") {
17
+ rc = true;
18
+ }
19
+ return !rc;
20
+ }
21
+ static isFunction(a) {
22
+ return a && {}.toString.call(a) === '[object Function]';
23
+ }
24
+ static insertQueryStringParamToUrl(url, key, value) {
25
+ key = escape(key);
26
+ value = escape(value);
27
+ var kvp = url.search.substr(1).split('&');
28
+ if (kvp.length == 1) {
29
+ url.search = '?' + key + '=' + value;
30
+ }
31
+ else {
32
+ var i = kvp.length;
33
+ var x;
34
+ while (i--) {
35
+ x = kvp[i].split('=');
36
+ if (x[0] === key) {
37
+ x[1] = value;
38
+ kvp[i] = x.join('=');
39
+ break;
40
+ }
41
+ }
42
+ if (i < 0) {
43
+ kvp[kvp.length] = [key, value].join('=');
44
+ }
45
+ //this will reload the page, it's likely better to store this until finished
46
+ url.search = kvp.join('&');
47
+ }
48
+ return url;
49
+ }
50
+ }
@@ -8,6 +8,7 @@ export * from './core/ColorPicker';
8
8
  export * from './core/DataList';
9
9
  export * from './core/Editors';
10
10
  export * from './core/Handlers';
11
+ export * from './core/Helpers';
11
12
  export * from './core/HoodApi';
12
13
  export * from './core/Inline';
13
14
  export * from './core/Loader';
package/dist/js/index.js CHANGED
@@ -8,6 +8,7 @@ export * from './core/ColorPicker';
8
8
  export * from './core/DataList';
9
9
  export * from './core/Editors';
10
10
  export * from './core/Handlers';
11
+ export * from './core/Helpers';
11
12
  export * from './core/HoodApi';
12
13
  export * from './core/Inline';
13
14
  export * from './core/Loader';
package/dist/js/login.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * hoodcms v5.0.9
2
+ * hoodcms v5.0.11
3
3
  * A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
4
4
  * Written by George Whysall, 2021
5
5
  * Released under the GPL-3.0 License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hoodcms",
3
- "version": "5.0.10",
3
+ "version": "5.0.11",
4
4
  "description": "A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.",
5
5
  "keywords": [
6
6
  "hood",
package/src/js/admin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * hoodcms v5.0.9
2
+ * hoodcms v5.0.11
3
3
  * A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
4
4
  * Written by George Whysall, 2021
5
5
  * Released under the GPL-3.0 License.