hoodcms 6.0.5 → 6.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/src/js/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * hoodcms v6.0.5
2
+ * hoodcms v6.0.8
3
3
  * A fully customisable content management system built in ASP.NET Core 5 & Bootstrap 5.
4
4
  * Written by George Whysall, 2022
5
5
  * Released under the GPL-3.0 License.
@@ -321,7 +321,7 @@
321
321
  * For LGPL see License.txt in the project root for license information.
322
322
  * For commercial licenses see https://www.tiny.cloud/
323
323
  *
324
- * Version: 5.10.2 (2021-11-17)
324
+ * Version: 5.10.3 (2022-02-09)
325
325
  */
326
326
 
327
327
  (function (module) {
@@ -16610,8 +16610,11 @@
16610
16610
  var children = from(node.childNodes);
16611
16611
  if (contentEditable && !hasContentEditableState) {
16612
16612
  var removed = removeNodeFormat(node);
16613
+ var currentNodeMatches = removed || exists(formatList, function (f) {
16614
+ return matchName$1(dom, node, f);
16615
+ });
16613
16616
  var parentNode = node.parentNode;
16614
- if (!removed && isNonNullable(parentNode) && shouldExpandToSelector(format)) {
16617
+ if (!currentNodeMatches && isNonNullable(parentNode) && shouldExpandToSelector(format)) {
16615
16618
  removeNodeFormat(parentNode);
16616
16619
  }
16617
16620
  }
@@ -29319,8 +29322,8 @@
29319
29322
  suffix: null,
29320
29323
  $: DomQuery,
29321
29324
  majorVersion: '5',
29322
- minorVersion: '10.2',
29323
- releaseDate: '2021-11-17',
29325
+ minorVersion: '10.3',
29326
+ releaseDate: '2022-02-09',
29324
29327
  editors: legacyEditors,
29325
29328
  i18n: I18n,
29326
29329
  activeEditor: null,
@@ -30369,12 +30372,12 @@
30369
30372
 
30370
30373
  var Validator = /** @class */ (function () {
30371
30374
  /**
30372
- * @param element The datalist element. The element must have a data-url attribute to connect to a feed.
30373
- */
30375
+ * @param element The datalist element. The element must have a data-url attribute to connect to a feed.
30376
+ */
30374
30377
  function Validator(element, options) {
30375
30378
  this.options = {
30376
- errorAlert: 'There are errors on the form, please check your answers and try again.',
30377
- useAjax: true
30379
+ errorAlert: "There are errors on the form, please check your answers and try again.",
30380
+ useAjax: true,
30378
30381
  };
30379
30382
  this.element = element;
30380
30383
  if (!this.element) {
@@ -30385,7 +30388,7 @@
30385
30388
  return rtn;
30386
30389
  }.bind(this);
30387
30390
  this.options = __assign(__assign({}, this.options), options);
30388
- this.element.addEventListener('submit', function (e) {
30391
+ this.element.addEventListener("submit", function (e) {
30389
30392
  e.preventDefault();
30390
30393
  e.stopImmediatePropagation();
30391
30394
  this.submitForm();
@@ -30393,16 +30396,13 @@
30393
30396
  var tag = '[data-submit="#' + this.element.id + '"]';
30394
30397
  var submitButtons = $(tag);
30395
30398
  if (submitButtons) {
30396
- submitButtons.on('click', function (e) {
30399
+ submitButtons.on("click", function (e) {
30397
30400
  e.preventDefault();
30398
30401
  e.stopImmediatePropagation();
30399
- var exit = $(e.currentTarget).data('exit');
30402
+ var exit = $(e.currentTarget).data("exit");
30400
30403
  if (exit) {
30401
30404
  $(this.element).find("input#exit").remove();
30402
- $("<input id='exit' />").attr("type", "hidden")
30403
- .attr("name", "exit")
30404
- .attr("value", "true")
30405
- .appendTo(this.element);
30405
+ $("<input id='exit' />").attr("type", "hidden").attr("name", "exit").attr("value", "true").appendTo(this.element);
30406
30406
  }
30407
30407
  this.submitForm();
30408
30408
  }.bind(this));
@@ -30410,15 +30410,14 @@
30410
30410
  }
30411
30411
  Validator.prototype.submitForm = function () {
30412
30412
  var _a;
30413
- this.element.classList.add('was-validated');
30413
+ this.element.classList.add("was-validated");
30414
30414
  if (this.element.checkValidity()) {
30415
- this.element.classList.add('loading');
30416
- var checkboxes = this.element.querySelector('input[type=checkbox]');
30415
+ this.element.classList.add("loading");
30416
+ var checkboxes = this.element.querySelector("input[type=checkbox]");
30417
30417
  if (checkboxes) {
30418
- Array.prototype.slice.call(checkboxes)
30419
- .forEach(function (checkbox) {
30420
- if ($(this).is(':checked')) {
30421
- $(this).val('true');
30418
+ Array.prototype.slice.call(checkboxes).forEach(function (checkbox) {
30419
+ if ($(this).is(":checked")) {
30420
+ $(this).val("true");
30422
30421
  }
30423
30422
  });
30424
30423
  }
@@ -30432,7 +30431,10 @@
30432
30431
  this.options.onComplete(data, this);
30433
30432
  }
30434
30433
  }.bind(this))
30435
- .fail((_a = this.options.onError) !== null && _a !== void 0 ? _a : Inline.handleError);
30434
+ .fail((_a = this.options.onError) !== null && _a !== void 0 ? _a : Inline.handleError)
30435
+ .always(function () {
30436
+ this.element.classList.remove("loading");
30437
+ }.bind(this));
30436
30438
  }
30437
30439
  else {
30438
30440
  this.element.submit();
@@ -31020,9 +31022,9 @@
31020
31022
  };
31021
31023
 
31022
31024
  /*!
31023
- * Chart.js v3.7.0
31025
+ * Chart.js v3.7.1
31024
31026
  * https://www.chartjs.org
31025
- * (c) 2021 Chart.js Contributors
31027
+ * (c) 2022 Chart.js Contributors
31026
31028
  * Released under the MIT License
31027
31029
  */
31028
31030
  const requestAnimFrame = (function() {
@@ -33507,9 +33509,9 @@
33507
33509
  }
33508
33510
 
33509
33511
  /*!
33510
- * Chart.js v3.7.0
33512
+ * Chart.js v3.7.1
33511
33513
  * https://www.chartjs.org
33512
- * (c) 2021 Chart.js Contributors
33514
+ * (c) 2022 Chart.js Contributors
33513
33515
  * Released under the MIT License
33514
33516
  */
33515
33517
 
@@ -38777,7 +38779,7 @@
38777
38779
  return false;
38778
38780
  }
38779
38781
 
38780
- var version = "3.7.0";
38782
+ var version = "3.7.1";
38781
38783
 
38782
38784
  const KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
38783
38785
  function positionIsHorizontal(position, axis) {