hoodcms 5.0.4 → 5.0.8
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/css/admin.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/button.css +1 -1
- package/dist/css/editor.css +1 -1
- package/dist/css/install.css +1 -0
- package/dist/css/login.css +1 -1
- package/dist/js/admin.js +8 -6
- package/dist/js/app.js +13 -6
- package/dist/js/core/Alerts.d.ts +22 -0
- package/dist/js/core/Alerts.js +151 -0
- package/dist/js/core/BaseSite.d.ts +6 -0
- package/dist/js/core/BaseSite.js +14 -0
- package/dist/js/core/ColorPicker.d.ts +5 -0
- package/dist/js/core/ColorPicker.js +71 -0
- package/dist/js/core/DataList.d.ts +35 -0
- package/dist/js/core/DataList.js +56 -0
- package/dist/js/core/Editors.d.ts +16 -0
- package/dist/js/core/Editors.js +137 -0
- package/dist/js/core/Handlers.d.ts +47 -0
- package/dist/js/core/Handlers.js +160 -0
- package/dist/js/core/HoodApi.d.ts +25 -0
- package/dist/js/core/HoodApi.js +22 -0
- package/dist/js/core/Inline.d.ts +27 -0
- package/dist/js/core/Inline.js +63 -0
- package/dist/js/core/Loader.d.ts +5 -0
- package/dist/js/core/Loader.js +13 -0
- package/dist/js/core/Media.d.ts +113 -0
- package/dist/js/core/Media.js +363 -0
- package/dist/js/core/Modal.d.ts +35 -0
- package/dist/js/core/Modal.js +69 -0
- package/dist/js/core/RandomStringGenerator.d.ts +11 -0
- package/dist/js/core/RandomStringGenerator.js +23 -0
- package/dist/js/core/Response.d.ts +20 -0
- package/dist/js/core/Response.js +13 -0
- package/dist/js/core/Uploader.d.ts +7 -0
- package/dist/js/core/Uploader.js +134 -0
- package/dist/js/core/Validator.d.ts +27 -0
- package/dist/js/core/Validator.js +80 -0
- package/dist/js/extensions/jqueryExtensions.d.ts +11 -0
- package/dist/js/extensions/jqueryExtensions.js +99 -0
- package/dist/js/extensions/numberExtensions.d.ts +8 -0
- package/dist/js/extensions/numberExtensions.js +19 -0
- package/dist/js/extensions/stringExtensions.d.ts +12 -0
- package/dist/js/extensions/stringExtensions.js +49 -0
- package/dist/js/index.d.ts +22 -0
- package/dist/js/index.js +22 -0
- package/dist/js/interfaces/KeyValue.d.ts +4 -0
- package/dist/js/interfaces/KeyValue.js +1 -0
- package/dist/js/login.js +4 -3
- package/dist/js/models/Content.d.ts +50 -0
- package/dist/js/models/Content.js +1 -0
- package/dist/js/models/Property.d.ts +9 -0
- package/dist/js/models/Property.js +2 -0
- package/dist/js/models/Users.d.ts +7 -0
- package/dist/js/models/Users.js +2 -0
- package/package.json +8 -3
- package/src/css/admin.css +647 -1269
- package/src/css/admin.css.map +1 -1
- package/src/css/app.css +643 -1265
- package/src/css/app.css.map +1 -1
- package/src/css/button.css +0 -3
- package/src/css/button.css.map +1 -1
- package/src/css/editor.css +576 -183
- package/src/css/editor.css.map +1 -1
- package/src/css/install.css +11471 -0
- package/src/css/install.css.map +1 -0
- package/src/css/login.css +640 -1263
- package/src/css/login.css.map +1 -1
- package/src/js/admin.js +717 -699
- package/src/js/admin.js.map +1 -1
- package/src/js/app.js +30463 -348
- package/src/js/app.js.map +1 -1
- package/src/js/login.js +8 -7
- package/src/js/login.js.map +1 -1
- package/src/scss/admin/layout/content/footer.scss +3 -4
- package/src/scss/admin/layout/content/title.scss +3 -6
- package/src/scss/admin/layout/content.scss +3 -5
- package/src/scss/admin/media.scss +13 -22
- package/src/scss/admin.scss +2 -6
- package/src/scss/button.scss +1 -14
- package/src/scss/editor.scss +2 -3
- package/src/scss/login.scss +2 -16
- package/src/ts/admin.ts +7 -8
- package/src/ts/app.ts +0 -2
- package/src/ts/core/BaseSite.ts +21 -0
- package/src/ts/core/ColorPicker.ts +5 -1
- package/src/ts/core/Editors.ts +6 -7
- package/src/ts/core/HoodApi.ts +5 -0
- package/src/ts/core/Media.ts +4 -0
- package/src/ts/core/alerts.ts +1 -1
- package/src/ts/index.ts +25 -0
- package/src/ts/hood.ts +0 -5
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Response } from "./Response";
|
|
2
|
+
export interface ValidatorOptions {
|
|
3
|
+
errorAlert?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Called before the submit of the form data, you can return the data to be serialised.
|
|
6
|
+
*/
|
|
7
|
+
onSubmit?: (sender: Validator) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Called when submit is complete.
|
|
10
|
+
*/
|
|
11
|
+
onComplete?: (data: Response, sender?: Validator) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Called when an error occurs.
|
|
14
|
+
*/
|
|
15
|
+
onError?: (jqXHR: any, textStatus: any, errorThrown: any) => void;
|
|
16
|
+
serializationFunction?: () => string;
|
|
17
|
+
useAjax?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class Validator {
|
|
20
|
+
element: HTMLFormElement;
|
|
21
|
+
options: ValidatorOptions;
|
|
22
|
+
/**
|
|
23
|
+
* @param element The datalist element. The element must have a data-url attribute to connect to a feed.
|
|
24
|
+
*/
|
|
25
|
+
constructor(element: HTMLFormElement, options: ValidatorOptions);
|
|
26
|
+
submitForm(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Alerts } from "./Alerts";
|
|
2
|
+
import { Inline } from "./Inline";
|
|
3
|
+
export class Validator {
|
|
4
|
+
/**
|
|
5
|
+
* @param element The datalist element. The element must have a data-url attribute to connect to a feed.
|
|
6
|
+
*/
|
|
7
|
+
constructor(element, options) {
|
|
8
|
+
this.options = {
|
|
9
|
+
errorAlert: 'There are errors, please check the form.',
|
|
10
|
+
useAjax: true
|
|
11
|
+
};
|
|
12
|
+
this.element = element;
|
|
13
|
+
if (!this.element) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
this.options.serializationFunction = function () {
|
|
17
|
+
let rtn = $(this.element).serialize();
|
|
18
|
+
return rtn;
|
|
19
|
+
}.bind(this);
|
|
20
|
+
this.options = Object.assign(Object.assign({}, this.options), options);
|
|
21
|
+
this.element.addEventListener('submit', function (e) {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
e.stopImmediatePropagation();
|
|
24
|
+
this.submitForm();
|
|
25
|
+
}.bind(this));
|
|
26
|
+
var tag = '[data-submit="#' + this.element.id + '"]';
|
|
27
|
+
let submitButtons = $(tag);
|
|
28
|
+
if (submitButtons) {
|
|
29
|
+
submitButtons.on('click', function (e) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
e.stopImmediatePropagation();
|
|
32
|
+
let exit = $(e.currentTarget).data('exit');
|
|
33
|
+
if (exit) {
|
|
34
|
+
$(this.element).find("input#exit").remove();
|
|
35
|
+
$("<input id='exit' />").attr("type", "hidden")
|
|
36
|
+
.attr("name", "exit")
|
|
37
|
+
.attr("value", "true")
|
|
38
|
+
.appendTo(this.element);
|
|
39
|
+
}
|
|
40
|
+
this.submitForm();
|
|
41
|
+
}.bind(this));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
submitForm() {
|
|
45
|
+
var _a;
|
|
46
|
+
this.element.classList.add('was-validated');
|
|
47
|
+
if (this.element.checkValidity()) {
|
|
48
|
+
this.element.classList.add('loading');
|
|
49
|
+
let checkboxes = this.element.querySelector('input[type=checkbox]');
|
|
50
|
+
if (checkboxes) {
|
|
51
|
+
Array.prototype.slice.call(checkboxes)
|
|
52
|
+
.forEach(function (checkbox) {
|
|
53
|
+
if ($(this).is(':checked')) {
|
|
54
|
+
$(this).val('true');
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
if (this.options.onSubmit) {
|
|
59
|
+
this.options.onSubmit(this);
|
|
60
|
+
}
|
|
61
|
+
if (this.options.useAjax) {
|
|
62
|
+
let formData = this.options.serializationFunction();
|
|
63
|
+
$.post(this.element.action, formData, function (data) {
|
|
64
|
+
if (this.options.onComplete) {
|
|
65
|
+
this.options.onComplete(data, this);
|
|
66
|
+
}
|
|
67
|
+
}.bind(this))
|
|
68
|
+
.fail((_a = this.options.onError) !== null && _a !== void 0 ? _a : Inline.handleError);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.element.submit();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
if (this.options.errorAlert) {
|
|
76
|
+
Alerts.error(this.options.errorAlert, null, 5000);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Alerts } from '../core/Alerts';
|
|
2
|
+
$.fn.exists = function () {
|
|
3
|
+
return $(this).length;
|
|
4
|
+
};
|
|
5
|
+
$.fn.restrictToSlug = function (restrictPattern = /[^0-9a-zA-Z]*/g) {
|
|
6
|
+
let targets = $(this);
|
|
7
|
+
// The characters inside this pattern are accepted
|
|
8
|
+
// and everything else will be 'cleaned'
|
|
9
|
+
// For example 'ABCdEfGhI5' become 'ABCEGI5'
|
|
10
|
+
var restrictHandler = function () {
|
|
11
|
+
var val = $(this).val();
|
|
12
|
+
var newVal = val.replace(restrictPattern, '');
|
|
13
|
+
// This condition is to prevent selection and keyboard navigation issues
|
|
14
|
+
if (val !== newVal) {
|
|
15
|
+
$(this).val(newVal);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
targets.on('keyup', restrictHandler);
|
|
19
|
+
targets.on('paste', restrictHandler);
|
|
20
|
+
targets.on('change', restrictHandler);
|
|
21
|
+
};
|
|
22
|
+
$.fn.restrictToPageSlug = function (restrictPattern = /[^0-9a-zA-Z-//]*/g) {
|
|
23
|
+
let targets = $(this);
|
|
24
|
+
// The characters inside this pattern are accepted
|
|
25
|
+
// and everything else will be 'cleaned'
|
|
26
|
+
let restrictHandler = function () {
|
|
27
|
+
var val = $(this).val();
|
|
28
|
+
var newVal = val.replace(restrictPattern, '');
|
|
29
|
+
if ((newVal.match(new RegExp("/", "g")) || []).length > 4) {
|
|
30
|
+
var pos = newVal.lastIndexOf('/');
|
|
31
|
+
newVal = newVal.substring(0, pos) + newVal.substring(pos + 1);
|
|
32
|
+
Alerts.warning("You can only have up to 4 '/' characters in a url slug.");
|
|
33
|
+
}
|
|
34
|
+
// This condition is to prevent selection and keyboard navigation issues
|
|
35
|
+
if (val !== newVal) {
|
|
36
|
+
$(this).val(newVal);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
targets.on('keyup', restrictHandler);
|
|
40
|
+
targets.on('paste', restrictHandler);
|
|
41
|
+
targets.on('change', restrictHandler);
|
|
42
|
+
};
|
|
43
|
+
$.fn.restrictToMetaSlug = function (restrictPattern = /[^0-9a-zA-Z.]*/g) {
|
|
44
|
+
let targets = $(this);
|
|
45
|
+
// The characters inside this pattern are accepted
|
|
46
|
+
// and everything else will be 'cleaned'
|
|
47
|
+
let restrictHandler = function () {
|
|
48
|
+
let val = $(this).val();
|
|
49
|
+
let newVal = val.replace(restrictPattern, '');
|
|
50
|
+
if ((newVal.match(new RegExp(".", "g")) || []).length > 1) {
|
|
51
|
+
let pos = newVal.lastIndexOf('.');
|
|
52
|
+
newVal = newVal.substring(0, pos) + newVal.substring(pos + 1);
|
|
53
|
+
Alerts.warning("You can only have up to 1 '.' characters in a meta slug.");
|
|
54
|
+
}
|
|
55
|
+
// This condition is to prevent selection and keyboard navigation issues
|
|
56
|
+
if (val !== newVal) {
|
|
57
|
+
$(this).val(newVal);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
targets.on('keyup', restrictHandler);
|
|
61
|
+
targets.on('paste', restrictHandler);
|
|
62
|
+
targets.on('change', restrictHandler);
|
|
63
|
+
};
|
|
64
|
+
$.fn.characterCounter = function () {
|
|
65
|
+
let targets = $(this);
|
|
66
|
+
let characterCounterHandler = function () {
|
|
67
|
+
let counter = $(this).data('counter');
|
|
68
|
+
let max = Number($(this).attr('maxlength'));
|
|
69
|
+
let len = $(this).val().length;
|
|
70
|
+
$(counter).text(max - len);
|
|
71
|
+
let cls = "text-success";
|
|
72
|
+
if (max - len < max / 10)
|
|
73
|
+
cls = "text-danger";
|
|
74
|
+
$(counter).parent().removeClass('text-success').removeClass('text-danger').addClass(cls);
|
|
75
|
+
};
|
|
76
|
+
targets.on('keyup', characterCounterHandler);
|
|
77
|
+
targets.on('paste', characterCounterHandler);
|
|
78
|
+
targets.on('change', characterCounterHandler);
|
|
79
|
+
};
|
|
80
|
+
$.fn.warningAlert = function () {
|
|
81
|
+
let targets = $(this);
|
|
82
|
+
let warningAlertHandler = function (e) {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
let warningAlertCallback = function (result) {
|
|
85
|
+
if (result.isConfirmed) {
|
|
86
|
+
let url = $(e.currentTarget).attr('href');
|
|
87
|
+
window.location.href = url;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
Alerts.confirm({
|
|
91
|
+
title: $(e.currentTarget).data('title'),
|
|
92
|
+
html: $(e.currentTarget).data('warning'),
|
|
93
|
+
footer: $(e.currentTarget).data('footer'),
|
|
94
|
+
icon: 'warning'
|
|
95
|
+
}, warningAlertCallback);
|
|
96
|
+
return false;
|
|
97
|
+
};
|
|
98
|
+
targets.on('click', warningAlertHandler);
|
|
99
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Number.prototype.formatCurrency = function (currency) {
|
|
2
|
+
return currency + " " + this.toFixed(2).replace(/./g, function (c, i, a) {
|
|
3
|
+
return i > 0 && c !== "." && (a.length - i) % 3 === 0 ? "," + c : c;
|
|
4
|
+
});
|
|
5
|
+
};
|
|
6
|
+
Number.prototype.formatKilobytes = function () {
|
|
7
|
+
let n = this / 1024;
|
|
8
|
+
return n.toFixed(0).replace(/./g, function (c, i, a) {
|
|
9
|
+
return i > 0 && c !== "." && (a.length - i) % 3 === 0 ? "," + c : c;
|
|
10
|
+
}) + "Kb";
|
|
11
|
+
};
|
|
12
|
+
Number.prototype.formatMegabytes = function () {
|
|
13
|
+
let n = this / 1024;
|
|
14
|
+
n = n / 1024;
|
|
15
|
+
return n.toFixed(0).replace(/./g, function (c, i, a) {
|
|
16
|
+
return i > 0 && c !== "." && (a.length - i) % 3 === 0 ? "," + c : c;
|
|
17
|
+
}) + "Mb";
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
String.prototype.htmlEncode = function () {
|
|
2
|
+
//create a in-memory div, set it's inner text(which jQuery automatically encodes)
|
|
3
|
+
//then grab the encoded contents back out. The div never exists on the page.
|
|
4
|
+
return $('<div/>').text(this).html();
|
|
5
|
+
};
|
|
6
|
+
String.prototype.htmlDecode = function () {
|
|
7
|
+
return $('<div/>').html(this).text();
|
|
8
|
+
};
|
|
9
|
+
String.prototype.contains = function (it) {
|
|
10
|
+
return this.indexOf(it) !== -1;
|
|
11
|
+
};
|
|
12
|
+
String.prototype.pick = function (min, max) {
|
|
13
|
+
var n, chars = '';
|
|
14
|
+
if (typeof max === 'undefined') {
|
|
15
|
+
n = min;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
n = min + Math.floor(Math.random() * (max - min));
|
|
19
|
+
}
|
|
20
|
+
for (var i = 0; i < n; i++) {
|
|
21
|
+
chars += this.charAt(Math.floor(Math.random() * this.length));
|
|
22
|
+
}
|
|
23
|
+
return chars;
|
|
24
|
+
};
|
|
25
|
+
// Credit to @Christoph: http://stackoverflow.com/a/962890/464744
|
|
26
|
+
String.prototype.shuffle = function () {
|
|
27
|
+
var array = this.split('');
|
|
28
|
+
var tmp, current, top = array.length;
|
|
29
|
+
if (top)
|
|
30
|
+
while (--top) {
|
|
31
|
+
current = Math.floor(Math.random() * (top + 1));
|
|
32
|
+
tmp = array[current];
|
|
33
|
+
array[current] = array[top];
|
|
34
|
+
array[top] = tmp;
|
|
35
|
+
}
|
|
36
|
+
return array.join('');
|
|
37
|
+
};
|
|
38
|
+
String.prototype.toSeoUrl = function () {
|
|
39
|
+
var output = this.replace(/[^a-zA-Z0-9]/g, ' ').replace(/\s+/g, "-").toLowerCase();
|
|
40
|
+
/* remove first dash */
|
|
41
|
+
if (output.charAt(0) === '-')
|
|
42
|
+
output = output.substring(1);
|
|
43
|
+
/* remove last dash */
|
|
44
|
+
var last = output.length - 1;
|
|
45
|
+
if (output.charAt(last) === '-')
|
|
46
|
+
output = output.substring(0, last);
|
|
47
|
+
return output;
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './interfaces/KeyValue';
|
|
2
|
+
export * from './models/Content';
|
|
3
|
+
export * from './models/Property';
|
|
4
|
+
export * from './models/Users';
|
|
5
|
+
export * from './core/Alerts';
|
|
6
|
+
export * from './core/BaseSite';
|
|
7
|
+
export * from './core/ColorPicker';
|
|
8
|
+
export * from './core/DataList';
|
|
9
|
+
export * from './core/Editors';
|
|
10
|
+
export * from './core/Handlers';
|
|
11
|
+
export * from './core/HoodApi';
|
|
12
|
+
export * from './core/Inline';
|
|
13
|
+
export * from './core/Loader';
|
|
14
|
+
export * from './core/Media';
|
|
15
|
+
export * from './core/Modal';
|
|
16
|
+
export * from './core/RandomStringGenerator';
|
|
17
|
+
export * from './core/Response';
|
|
18
|
+
export * from './core/Uploader';
|
|
19
|
+
export * from './core/Validator';
|
|
20
|
+
export * from './extensions/jqueryExtensions';
|
|
21
|
+
export * from './extensions/numberExtensions';
|
|
22
|
+
export * from './extensions/stringExtensions';
|
package/dist/js/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from './interfaces/KeyValue';
|
|
2
|
+
export * from './models/Content';
|
|
3
|
+
export * from './models/Property';
|
|
4
|
+
export * from './models/Users';
|
|
5
|
+
export * from './core/Alerts';
|
|
6
|
+
export * from './core/BaseSite';
|
|
7
|
+
export * from './core/ColorPicker';
|
|
8
|
+
export * from './core/DataList';
|
|
9
|
+
export * from './core/Editors';
|
|
10
|
+
export * from './core/Handlers';
|
|
11
|
+
export * from './core/HoodApi';
|
|
12
|
+
export * from './core/Inline';
|
|
13
|
+
export * from './core/Loader';
|
|
14
|
+
export * from './core/Media';
|
|
15
|
+
export * from './core/Modal';
|
|
16
|
+
export * from './core/RandomStringGenerator';
|
|
17
|
+
export * from './core/Response';
|
|
18
|
+
export * from './core/Uploader';
|
|
19
|
+
export * from './core/Validator';
|
|
20
|
+
export * from './extensions/jqueryExtensions';
|
|
21
|
+
export * from './extensions/numberExtensions';
|
|
22
|
+
export * from './extensions/stringExtensions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/js/login.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* hoodcms v5.0.
|
|
2
|
+
* hoodcms v5.0.8
|
|
3
|
+
* A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
|
|
4
|
+
* Written by George Whysall, 2021
|
|
3
5
|
* Released under the GPL-3.0 License.
|
|
4
6
|
*/
|
|
5
|
-
(function(f){typeof define==='function'&&define.amd?define(f):f();}((function(){'use strict';var Login=function(){function e(){this.loadBackground();}return e.prototype.loginPage=function(){},e.prototype.loadBackground=function(){$("#image-container").length>0&&$.get($("#image-container").data("imageUrl"),this.renderImage.bind(this));},e.prototype.renderImage=function(e){"string"==typeof e?($("#image-container").css({"background-image":"url("
|
|
6
|
-
if (typeof this !== 'undefined' && this.hood){ this.hoodCMS = this.Hood = this.hoodCMS = this.HoodCMS = this.hood}
|
|
7
|
+
(function(f){typeof define==='function'&&define.amd?define(f):f();})((function(){'use strict';var Login=function(){function e(){this.loadBackground();}return e.prototype.loginPage=function(){},e.prototype.loadBackground=function(){$("#image-container").length>0&&$.get($("#image-container").data("imageUrl"),this.renderImage.bind(this));},e.prototype.renderImage=function(e){"string"==typeof e?($("#image-container").css({"background-image":"url(".concat(e,")")}),$("#image-credit").hide()):e.length>0?($("#image-container").attr("title",e[0].description),$("#image-container").css({"background-image":"url(".concat(e[0].urls.regular,")")}),$("#image-credit").html("Image by <a href='".concat(e[0].user.links.html,"?utm_source=Hood%20CMS&utm_medium=referral'>").concat(e[0].user.name,"</a> on <a href='https://unsplash.com/?utm_source=Hood%20CMS&utm_medium=referral'>Unsplash</a>"))):$("#image-credit").hide();},e}();new Login;}));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { KeyValue } from "../interfaces/KeyValue";
|
|
2
|
+
export declare interface ContentStatistics {
|
|
3
|
+
totalPosts: number;
|
|
4
|
+
totalPublished: number;
|
|
5
|
+
days: KeyValue<string, number>[];
|
|
6
|
+
months: KeyValue<string, number>[];
|
|
7
|
+
publishDays: KeyValue<string, number>[];
|
|
8
|
+
publishMonths: KeyValue<string, number>[];
|
|
9
|
+
byType: ContentTypeStatistic[];
|
|
10
|
+
}
|
|
11
|
+
export declare interface ContentTypeStatistic {
|
|
12
|
+
type: ContentType;
|
|
13
|
+
total: number;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
export declare interface ContentType {
|
|
17
|
+
baseName: string;
|
|
18
|
+
cachedByType: boolean;
|
|
19
|
+
customFields: any;
|
|
20
|
+
customFieldsJson: string;
|
|
21
|
+
description: string;
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
excerptName: string;
|
|
24
|
+
gallery: boolean;
|
|
25
|
+
hasPage: boolean;
|
|
26
|
+
hideAuthor: boolean;
|
|
27
|
+
icon: string;
|
|
28
|
+
isPublic: boolean;
|
|
29
|
+
isUnknown: boolean;
|
|
30
|
+
metaTitle: string;
|
|
31
|
+
multiLineExcerpt: boolean;
|
|
32
|
+
noImage: string;
|
|
33
|
+
richTextExcerpt: boolean;
|
|
34
|
+
search: string;
|
|
35
|
+
showBanner: boolean;
|
|
36
|
+
showCategories: boolean;
|
|
37
|
+
showDesigner: boolean;
|
|
38
|
+
showEditor: boolean;
|
|
39
|
+
showImage: boolean;
|
|
40
|
+
showPreview: boolean;
|
|
41
|
+
slug: string;
|
|
42
|
+
templateFolder: string;
|
|
43
|
+
templates: boolean;
|
|
44
|
+
title: string;
|
|
45
|
+
titleName: string;
|
|
46
|
+
type: string;
|
|
47
|
+
typeName: string;
|
|
48
|
+
typeNamePlural: string;
|
|
49
|
+
urlFormatting: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { KeyValue } from "../interfaces/KeyValue";
|
|
2
|
+
export declare class PropertyStatistics {
|
|
3
|
+
totalProperties: number;
|
|
4
|
+
totalPublished: number;
|
|
5
|
+
days: KeyValue<string, number>[];
|
|
6
|
+
months: KeyValue<string, number>[];
|
|
7
|
+
publishDays: KeyValue<string, number>[];
|
|
8
|
+
publishMonths: KeyValue<string, number>[];
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hoodcms",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.8",
|
|
4
4
|
"description": "A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@popperjs/core": "^2.9.2",
|
|
@@ -19,14 +19,16 @@
|
|
|
19
19
|
"jquery-slimscroll": "^1.3.8",
|
|
20
20
|
"jquery-toast-plugin": "^1.3.2",
|
|
21
21
|
"jquery-validation": "^1.19.3",
|
|
22
|
+
"node-sass-tilde-importer": "^1.0.2",
|
|
22
23
|
"sweetalert2": "^11.0.18",
|
|
23
24
|
"tinymce": "^5.8.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@lopatnov/rollup-plugin-uglify": "^2.1.1",
|
|
28
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
27
29
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
28
30
|
"@rollup/plugin-typescript": "^8.2.1",
|
|
29
|
-
"cssnano": "
|
|
31
|
+
"cssnano": "5.0.11",
|
|
30
32
|
"eslint": "^7.29.0",
|
|
31
33
|
"gulp": "^4.0.2",
|
|
32
34
|
"gulp-autoprefixer": "^8.0.0",
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
"clean": "gulp clean",
|
|
55
57
|
"copy": "gulp copy",
|
|
56
58
|
"cssnano": "gulp cssnano",
|
|
57
|
-
"package": "npm-run-all clean build-production copy",
|
|
59
|
+
"package": "npm-run-all clean build-production copy views",
|
|
58
60
|
"scss": "gulp scss",
|
|
59
61
|
"scss-lint": "stylelint src/scss/ --fix",
|
|
60
62
|
"tsc": "tsc && npm-run-all tsc-rollup",
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
"tsc-production": "tsc --project tsconfig.production.json && npm-run-all tsc-rollup-production",
|
|
63
65
|
"tsc-rollup": "rollup --config --debug",
|
|
64
66
|
"tsc-rollup-production": "rollup --config",
|
|
67
|
+
"views": "gulp views",
|
|
65
68
|
"watch-scss": "npm-watch scss",
|
|
66
69
|
"watch-tsc": "npm-watch tsc"
|
|
67
70
|
},
|
|
@@ -81,6 +84,8 @@
|
|
|
81
84
|
"quiet": false
|
|
82
85
|
}
|
|
83
86
|
},
|
|
87
|
+
"types": "./dist/js/index.d.ts",
|
|
88
|
+
"main": "./dist/js/index.js",
|
|
84
89
|
"repository": {
|
|
85
90
|
"type": "git",
|
|
86
91
|
"url": "git+https://github.com/HoodDigital/hoodcms.git"
|