3318 lines
191 KiB
JavaScript
3318 lines
191 KiB
JavaScript
/******/ (() => { // webpackBootstrap
|
|
/******/ "use strict";
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
|
|
// UNUSED EXPORTS: default
|
|
|
|
;// ./static/js/lib/validation.js
|
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
var Validation = /*#__PURE__*/function () {
|
|
function Validation() {
|
|
_classCallCheck(this, Validation);
|
|
}
|
|
return _createClass(Validation, null, [{
|
|
key: "isEmpty",
|
|
value:
|
|
/*
|
|
isNullOrWhitespace(v) {
|
|
let txt = JSON.stringify(v).replace('/\s\g', '');
|
|
return (txt == '' || 'null');
|
|
}
|
|
*/
|
|
|
|
function isEmpty(object) {
|
|
var isEmpty = true;
|
|
if (object !== null && object !== "null" && object !== undefined && object !== "undefined") {
|
|
if (object.length == undefined) {
|
|
isEmpty = false; // object exists but isn't a collection
|
|
} else if (typeof object === "function") {
|
|
isEmpty = false; // object is reference
|
|
} else {
|
|
// string or collection
|
|
|
|
var isString = typeof object == "string";
|
|
if (isString) object = object.trim();
|
|
if (object.length > 0) {
|
|
if (isString) {
|
|
isEmpty = false; // String greater than length 0
|
|
} else {
|
|
if (typeof object[0] != "string") {
|
|
isEmpty = false;
|
|
} else {
|
|
for (var i = 0; i < object.length; i++) {
|
|
if (object[i] != "") {
|
|
isEmpty = false;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return isEmpty;
|
|
}
|
|
}, {
|
|
key: "isValidNumber",
|
|
value: function isValidNumber(value, positiveOnly) {
|
|
return !Validation.isEmpty(value) && !isNaN(value) && (!positiveOnly || parseFloat(value) > 0);
|
|
}
|
|
}, {
|
|
key: "getDataContentType",
|
|
value: function getDataContentType(params) {
|
|
var data = null;
|
|
var contentType = '';
|
|
if (!Validation.isEmpty(params)) {
|
|
if (typeof params === "string") {
|
|
data = params;
|
|
contentType = "application/x-www-form-urlencoded; charset=UTF-8";
|
|
} else {
|
|
data = JSON.stringify(params);
|
|
contentType = "application/json; charset=UTF-8";
|
|
}
|
|
}
|
|
return {
|
|
Data: data,
|
|
ContentType: contentType
|
|
};
|
|
}
|
|
}, {
|
|
key: "arrayContainsItem",
|
|
value: function arrayContainsItem(array, itemValue) {
|
|
var hasItem = false;
|
|
if (!Validation.isEmpty(array) && !Validation.isEmpty(itemValue)) {
|
|
var isJQueryElementArray = array[0] instanceof jQuery;
|
|
if (isJQueryElementArray) {
|
|
for (var i = 0; i < array.length; i++) {
|
|
if (document.querySelectorAll(array[i]).is(itemValue)) {
|
|
hasItem = true;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
var isDate = array[0] instanceof Date;
|
|
if (isDate) {
|
|
for (var _i = 0; _i < array.length; _i++) {
|
|
if (array[_i].getTime() === itemValue.getTime()) {
|
|
hasItem = true;
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
for (var _i2 = 0; _i2 < array.length; _i2++) {
|
|
if (array[_i2] == itemValue) {
|
|
hasItem = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return hasItem;
|
|
}
|
|
}, {
|
|
key: "dictHasKey",
|
|
value: function dictHasKey(d, k) {
|
|
return k in d;
|
|
}
|
|
}, {
|
|
key: "areEqualDicts",
|
|
value: function areEqualDicts(dict1, dict2) {
|
|
var keys1 = Object.keys(dict1);
|
|
var keys2 = Object.keys(dict2);
|
|
if (keys1.length !== keys2.length) {
|
|
return false;
|
|
}
|
|
for (var _i3 = 0, _keys = keys1; _i3 < _keys.length; _i3++) {
|
|
var key = _keys[_i3];
|
|
if (dict1[key] !== dict2[key]) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}, {
|
|
key: "imageExists",
|
|
value: function imageExists(url, callback) {
|
|
var img = new Image();
|
|
img.onload = function () {
|
|
callback(true);
|
|
};
|
|
img.onerror = function () {
|
|
callback(false);
|
|
};
|
|
img.src = url;
|
|
}
|
|
}, {
|
|
key: "toFixedOrDefault",
|
|
value: function toFixedOrDefault(value, decimalPlaces) {
|
|
var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
return Validation.isValidNumber(value) ? parseFloat(value).toFixed(decimalPlaces) : defaultValue;
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/dom.js
|
|
function dom_typeof(o) { "@babel/helpers - typeof"; return dom_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, dom_typeof(o); }
|
|
function _defineProperty(e, r, t) { return (r = dom_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function dom_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function dom_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, dom_toPropertyKey(o.key), o); } }
|
|
function dom_createClass(e, r, t) { return r && dom_defineProperties(e.prototype, r), t && dom_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function dom_toPropertyKey(t) { var i = dom_toPrimitive(t, "string"); return "symbol" == dom_typeof(i) ? i : i + ""; }
|
|
function dom_toPrimitive(t, r) { if ("object" != dom_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != dom_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
|
|
var DOM = /*#__PURE__*/function () {
|
|
function DOM() {
|
|
dom_classCallCheck(this, DOM);
|
|
}
|
|
return dom_createClass(DOM, null, [{
|
|
key: "setElementAttributesValuesCurrentAndPrevious",
|
|
value: function setElementAttributesValuesCurrentAndPrevious(element, data) {
|
|
DOM.setElementAttributeValueCurrent(element, data);
|
|
DOM.setElementAttributeValuePrevious(element, data);
|
|
}
|
|
}, {
|
|
key: "setElementAttributeValueCurrent",
|
|
value: function setElementAttributeValueCurrent(element, data) {
|
|
element.setAttribute(attrValueCurrent, data);
|
|
}
|
|
}, {
|
|
key: "setElementAttributeValuePrevious",
|
|
value: function setElementAttributeValuePrevious(element, data) {
|
|
element.setAttribute(attrValuePrevious, data);
|
|
}
|
|
}, {
|
|
key: "setElementValuesCurrentAndPrevious",
|
|
value: function setElementValuesCurrentAndPrevious(element, data) {
|
|
DOM.setElementValueCurrent(element, data);
|
|
DOM.setElementAttributeValuePrevious(element, data);
|
|
}
|
|
}, {
|
|
key: "setElementValueCurrent",
|
|
value: function setElementValueCurrent(element, data) {
|
|
DOM.setElementAttributeValueCurrent(element, data);
|
|
var tagName = element.tagName.toUpperCase();
|
|
if (element.type === "checkbox") {
|
|
element.checked = data;
|
|
} else if (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {
|
|
element.value = data;
|
|
} else {
|
|
element.textContent = data;
|
|
}
|
|
}
|
|
}, {
|
|
key: "setElementValueCurrentIfEmpty",
|
|
value: function setElementValueCurrentIfEmpty(element, data) {
|
|
if (Validation.isEmpty(DOM.getElementValueCurrent(element))) {
|
|
DOM.setElementValueCurrent(element, data);
|
|
}
|
|
}
|
|
}, {
|
|
key: "getCellFromElement",
|
|
value: function getCellFromElement(element) {
|
|
return element.closest('td');
|
|
}
|
|
}, {
|
|
key: "getRowFromElement",
|
|
value: function getRowFromElement(element, flagRow) {
|
|
var selector = Validation.isEmpty(flagRow) ? 'tr' : 'tr.' + flagRow;
|
|
return element.closest(selector);
|
|
}
|
|
}, {
|
|
key: "getClosestParent",
|
|
value: function getClosestParent(element, parentSelector) {
|
|
var parent = element.parentElement;
|
|
while (parent) {
|
|
if (parent.matches(parentSelector)) {
|
|
return parent;
|
|
}
|
|
parent = parent.parentElement;
|
|
}
|
|
return null;
|
|
}
|
|
}, {
|
|
key: "convertForm2JSON",
|
|
value: function convertForm2JSON(elementForm) {
|
|
var dataForm = {};
|
|
if (Validation.isEmpty(elementForm)) {
|
|
return dataForm;
|
|
}
|
|
var containersFilter = elementForm.querySelectorAll('.' + flagContainerInput + '.' + flagFilter);
|
|
var containerFilter, labelFilter, keyFilter, filter;
|
|
for (var indexFilter = 0; indexFilter < containersFilter.length; indexFilter++) {
|
|
containerFilter = containersFilter[indexFilter];
|
|
labelFilter = containerFilter.querySelector('label');
|
|
keyFilter = labelFilter.getAttribute('for');
|
|
filter = containerFilter.querySelector("#".concat(keyFilter));
|
|
dataForm[keyFilter] = DOM.getElementValueCurrent(filter);
|
|
}
|
|
return dataForm;
|
|
}
|
|
}, {
|
|
key: "loadPageBody",
|
|
value: function loadPageBody(contentNew) {
|
|
var pageBody = document.querySelector(idPageBody);
|
|
pageBody.innerHTML = contentNew;
|
|
}
|
|
}, {
|
|
key: "getHashPageCurrent",
|
|
value: function getHashPageCurrent() {
|
|
var hashPageCurrent = document.body.dataset.page;
|
|
return hashPageCurrent;
|
|
}
|
|
}, {
|
|
key: "updateAndCheckIsElementDirty",
|
|
value: function updateAndCheckIsElementDirty(element) {
|
|
element.setAttribute(attrValueCurrent, DOM.getElementValueCurrent(element));
|
|
return DOM.isElementDirty(element);
|
|
}
|
|
}, {
|
|
key: "isElementDirty",
|
|
value: function isElementDirty(element) {
|
|
var isDirty = element.getAttribute(attrValuePrevious) != element.getAttribute(attrValueCurrent);
|
|
DOM.handleDirtyElement(element, isDirty);
|
|
return isDirty;
|
|
}
|
|
}, {
|
|
key: "handleDirtyElement",
|
|
value: function handleDirtyElement(element, isDirty) {
|
|
DOM.toggleElementHasClassnameFlag(element, isDirty, flagDirty);
|
|
}
|
|
}, {
|
|
key: "toggleElementHasClassnameFlag",
|
|
value: function toggleElementHasClassnameFlag(element, elementHasFlag, flag) {
|
|
var elementAlreadyHasFlag = element.classList.contains(flag);
|
|
if (elementHasFlag == elementAlreadyHasFlag) return;
|
|
if (elementHasFlag) {
|
|
element.classList.add(flag);
|
|
} else {
|
|
element.classList.remove(flag);
|
|
}
|
|
}
|
|
}, {
|
|
key: "hasDirtyChildrenContainer",
|
|
value: function hasDirtyChildrenContainer(container) {
|
|
if (container == null) return false;
|
|
return container.querySelector('.' + flagDirty) != null;
|
|
}
|
|
}, {
|
|
key: "hasDirtyChildrenNotDeletedContainer",
|
|
value: function hasDirtyChildrenNotDeletedContainer(container) {
|
|
if (container == null || container.classList.contains(flagDelete)) return false;
|
|
return container.querySelector('.' + flagDirty + ':not(.' + flagDelete + ', .' + flagDelete + ' *)') != null;
|
|
}
|
|
}, {
|
|
key: "getElementValueCurrent",
|
|
value: function getElementValueCurrent(element) {
|
|
var returnVal = '';
|
|
if (!Validation.isEmpty(element)) {
|
|
var tagName = element.tagName.toUpperCase();
|
|
if (element.type === "checkbox") {
|
|
returnVal = element.checked;
|
|
}
|
|
/*
|
|
else if (element.classList.contains(flagIsDatePicker)) {
|
|
returnVal = getDatePickerDate(element, adjust4DayLightSavings);
|
|
}
|
|
*/else if (tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {
|
|
returnVal = element.value;
|
|
} else if (element.classList.contains(flagButton) && element.classList.contains(flagActive)) {
|
|
// tagName === 'BUTTON'
|
|
returnVal = element.classList.contains(flagDelete);
|
|
} else if (tagName === 'TD') {
|
|
returnVal = DOM.getElementAttributeValueCurrent(element);
|
|
} else if (tagName == 'SVG' && element.classList.contains(flagCheckbox)) {
|
|
returnVal = element.classList.contains(flagIsChecked);
|
|
} else {
|
|
returnVal = element.textContent;
|
|
}
|
|
}
|
|
if (Validation.isEmpty(returnVal)) returnVal = '';
|
|
return returnVal;
|
|
}
|
|
}, {
|
|
key: "getElementAttributeValueCurrent",
|
|
value: function getElementAttributeValueCurrent(element) {
|
|
// debugger;
|
|
if (Validation.isEmpty(element)) return null;
|
|
return element.getAttribute(attrValueCurrent);
|
|
}
|
|
}, {
|
|
key: "getElementAttributeValuePrevious",
|
|
value: function getElementAttributeValuePrevious(element) {
|
|
if (Validation.isEmpty(element)) return null;
|
|
return element.getAttribute(attrValuePrevious);
|
|
}
|
|
/* base_table.handleChangeElementCellTable
|
|
static updateAndCheckIsTableElementDirty(element) {
|
|
let wasDirty = DOM.isElementDirty(element);
|
|
let row = DOM.getRowFromElement(element);
|
|
let wasDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
|
|
let isDirty = DOM.updateAndCheckIsElementDirty(element);
|
|
let cell = DOM.getCellFromElement(element);
|
|
Utils.consoleLogIfNotProductionEnvironment({element, row, cell, isDirty, wasDirty});
|
|
if (isDirty != wasDirty) {
|
|
DOM.handleDirtyElement(cell, isDirty);
|
|
let isDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
|
|
Utils.consoleLogIfNotProductionEnvironment({isDirtyRow, wasDirtyRow});
|
|
if (isDirtyRow != wasDirtyRow) {
|
|
DOM.handleDirtyElement(row, isDirtyRow);
|
|
}
|
|
}
|
|
}
|
|
*/
|
|
}, {
|
|
key: "scrollToElement",
|
|
value: function scrollToElement(parent, element) {
|
|
// REQUIRED: parent has scroll-bar
|
|
parent.scrollTop(parent.scrollTop() + (element.offset().top - parent.offset().top));
|
|
}
|
|
}, {
|
|
key: "isElementInContainer",
|
|
value: function isElementInContainer(container, element) {
|
|
if (typeof jQuery === 'function') {
|
|
if (container instanceof jQuery) container = container[0];
|
|
if (element instanceof jQuery) element = element[0];
|
|
}
|
|
var containerBounds = container.getBoundingClientRect();
|
|
var elementBounds = element.getBoundingClientRect();
|
|
return containerBounds.top <= elementBounds.top && containerBounds.left <= elementBounds.left && elementBounds.top + elementBounds.height <= containerBounds.top + containerBounds.height && elementBounds.left + elementBounds.width <= containerBounds.left + containerBounds.width;
|
|
}
|
|
}, {
|
|
key: "alertError",
|
|
value: function alertError(errorType, errorText) {
|
|
alert(errorType + '\n' + errorText);
|
|
}
|
|
}, {
|
|
key: "createOptionUnselectedProductVariation",
|
|
value: function createOptionUnselectedProductVariation() {
|
|
return _defineProperty(_defineProperty({}, flagProductVariationType, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, flagNameAttrOptionText, [flagName]), flagNameAttrOptionValue, [attrIdProductVariationType]), flagName, 'Select Variation Type'), attrIdProductVariationType, 0)), flagProductVariation, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, flagNameAttrOptionText, [flagName]), flagNameAttrOptionValue, [attrIdProductVariation]), flagName, 'Select Variation'), attrIdProductVariation, 0));
|
|
}
|
|
}, {
|
|
key: "createOption",
|
|
value: function createOption(optionJson) {
|
|
if (Validation.isEmpty(optionJson)) optionJson = {
|
|
text: 'Select',
|
|
value: 0
|
|
};
|
|
var option = document.createElement('option');
|
|
option.value = optionJson.value;
|
|
option.textContent = optionJson.text;
|
|
option.selected = optionJson.selected;
|
|
return option;
|
|
}
|
|
}, {
|
|
key: "escapeHtml",
|
|
value: function escapeHtml(text) {
|
|
var div = document.createElement('div');
|
|
div.textContent = text;
|
|
return div.innerHTML;
|
|
}
|
|
}, {
|
|
key: "unescapeHtml",
|
|
value: function unescapeHtml(html) {
|
|
var div = document.createElement('div');
|
|
div.innerHTML = html;
|
|
return div.textContent || div.innerText || '';
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/lib/events.js
|
|
function events_typeof(o) { "@babel/helpers - typeof"; return events_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, events_typeof(o); }
|
|
function events_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function events_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, events_toPropertyKey(o.key), o); } }
|
|
function events_createClass(e, r, t) { return r && events_defineProperties(e.prototype, r), t && events_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function events_toPropertyKey(t) { var i = events_toPrimitive(t, "string"); return "symbol" == events_typeof(i) ? i : i + ""; }
|
|
function events_toPrimitive(t, r) { if ("object" != events_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != events_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
var Events = /*#__PURE__*/function () {
|
|
function Events() {
|
|
events_classCallCheck(this, Events);
|
|
}
|
|
return events_createClass(Events, null, [{
|
|
key: "initialiseEventHandler",
|
|
value: function initialiseEventHandler(selectorElement, classInitialised, eventHandler) {
|
|
document.querySelectorAll(selectorElement).forEach(function (element) {
|
|
if (element.classList.contains(classInitialised)) return;
|
|
eventHandler(element);
|
|
element.classList.add(classInitialised);
|
|
});
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/lib/local_storage.js
|
|
function local_storage_typeof(o) { "@babel/helpers - typeof"; return local_storage_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, local_storage_typeof(o); }
|
|
function local_storage_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function local_storage_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, local_storage_toPropertyKey(o.key), o); } }
|
|
function local_storage_createClass(e, r, t) { return r && local_storage_defineProperties(e.prototype, r), t && local_storage_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function local_storage_toPropertyKey(t) { var i = local_storage_toPrimitive(t, "string"); return "symbol" == local_storage_typeof(i) ? i : i + ""; }
|
|
function local_storage_toPrimitive(t, r) { if ("object" != local_storage_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != local_storage_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var LocalStorage = /*#__PURE__*/function () {
|
|
function LocalStorage() {
|
|
local_storage_classCallCheck(this, LocalStorage);
|
|
}
|
|
return local_storage_createClass(LocalStorage, null, [{
|
|
key: "getLocalStorage",
|
|
value:
|
|
/*
|
|
function getPageLocalStorage(pageHash) {
|
|
|
|
let ls;
|
|
try {
|
|
ls = JSON.parse(localStorage.getItem(pageHash));
|
|
} catch {
|
|
|
|
}
|
|
|
|
if (Validation.isEmpty(ls)) return {}
|
|
|
|
return ls;
|
|
}
|
|
function getPageLocalStorageCurrent() {
|
|
|
|
return JSON.parse(localStorage.getItem(hashPageCurrent));
|
|
}
|
|
|
|
function setPageLocalStorage(pageHash, newLS) {
|
|
|
|
localStorage.setItem(pageHash, JSON.stringify(newLS));
|
|
}
|
|
|
|
function clearPageLocalStorage(pageHash) {
|
|
localStorage.removeItem(pageHash);
|
|
}
|
|
|
|
function setupPageLocalStorage(pageHash) {
|
|
|
|
let ls = getPageLocalStorage(pageHash);
|
|
|
|
if (Validation.isEmpty(ls)) ls = {};
|
|
|
|
setPageLocalStorage(pageHash, ls);
|
|
}
|
|
*/
|
|
|
|
function getLocalStorage(key) {
|
|
return JSON.parse(localStorage.getItem(key));
|
|
}
|
|
}, {
|
|
key: "setLocalStorage",
|
|
value: function setLocalStorage(key, newLS) {
|
|
localStorage.setItem(key, JSON.stringify(newLS));
|
|
}
|
|
|
|
/*
|
|
function setupPageLocalStorageNext(pageHashNext) {
|
|
let lsOld = getPageLocalStorage(hashPageCurrent);
|
|
hashPageCurrent = pageHashNext;
|
|
clearPageLocalStorage(hashPageCurrent);
|
|
setupPageLocalStorage(hashPageCurrent);
|
|
let lsNew = getPageLocalStorage(hashPageCurrent);
|
|
lsNew[keyBasket] = (keyBasket in lsOld) ? lsOld[keyBasket] : {'items': []};
|
|
setPageLocalStorage(hashPageCurrent, lsNew);
|
|
}
|
|
*/
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/api.js
|
|
function api_typeof(o) { "@babel/helpers - typeof"; return api_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, api_typeof(o); }
|
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == api_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(api_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { api_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
function api_defineProperty(e, r, t) { return (r = api_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
function api_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function api_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, api_toPropertyKey(o.key), o); } }
|
|
function api_createClass(e, r, t) { return r && api_defineProperties(e.prototype, r), t && api_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function api_toPropertyKey(t) { var i = api_toPrimitive(t, "string"); return "symbol" == api_typeof(i) ? i : i + ""; }
|
|
function api_toPrimitive(t, r) { if ("object" != api_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != api_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var API = /*#__PURE__*/function () {
|
|
function API() {
|
|
api_classCallCheck(this, API);
|
|
}
|
|
return api_createClass(API, null, [{
|
|
key: "getCsrfToken",
|
|
value: function getCsrfToken() {
|
|
return document.querySelector(idCSRFToken).getAttribute('content');
|
|
}
|
|
}, {
|
|
key: "request",
|
|
value: function () {
|
|
var _request = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(hashEndpoint) {
|
|
var method,
|
|
data,
|
|
params,
|
|
url,
|
|
csrfToken,
|
|
options,
|
|
response,
|
|
_args = arguments;
|
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
method = _args.length > 1 && _args[1] !== undefined ? _args[1] : 'GET';
|
|
data = _args.length > 2 && _args[2] !== undefined ? _args[2] : null;
|
|
params = _args.length > 3 && _args[3] !== undefined ? _args[3] : null;
|
|
url = API.getUrlFromHash(hashEndpoint, params);
|
|
csrfToken = API.getCsrfToken();
|
|
options = {
|
|
method: method,
|
|
headers: api_defineProperty({
|
|
'Content-Type': 'application/json'
|
|
}, flagCsrfToken, csrfToken)
|
|
};
|
|
if (data && (method === 'POST' || method === 'PUT' || method === 'PATCH')) {
|
|
data = _objectSpread(_objectSpread({}, data), {}, api_defineProperty({}, flagCsrfToken, csrfToken));
|
|
options.body = JSON.stringify(data);
|
|
}
|
|
_context.prev = 7;
|
|
_context.next = 10;
|
|
return fetch(url, options);
|
|
case 10:
|
|
response = _context.sent;
|
|
if (response.ok) {
|
|
_context.next = 13;
|
|
break;
|
|
}
|
|
throw new Error("HTTP error! status: ".concat(response.status));
|
|
case 13:
|
|
_context.next = 15;
|
|
return response.json();
|
|
case 15:
|
|
return _context.abrupt("return", _context.sent);
|
|
case 18:
|
|
_context.prev = 18;
|
|
_context.t0 = _context["catch"](7);
|
|
console.error('API request failed:', _context.t0);
|
|
throw _context.t0;
|
|
case 22:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee, null, [[7, 18]]);
|
|
}));
|
|
function request(_x) {
|
|
return _request.apply(this, arguments);
|
|
}
|
|
return request;
|
|
}()
|
|
}, {
|
|
key: "getUrlFromHash",
|
|
value: function getUrlFromHash(hash) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
if (hash == null) hash = hashPageHome;
|
|
var url = API.parameteriseUrl(_pathHost + hash, params);
|
|
return url;
|
|
}
|
|
}, {
|
|
key: "parameteriseUrl",
|
|
value: function parameteriseUrl(url, params) {
|
|
if (params) {
|
|
url += '?' + new URLSearchParams(params).toString();
|
|
}
|
|
return url;
|
|
}
|
|
}, {
|
|
key: "goToUrl",
|
|
value: function goToUrl(url) {
|
|
window.location.href = url;
|
|
}
|
|
}, {
|
|
key: "goToHash",
|
|
value: function goToHash(hash) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
var url = API.getUrlFromHash(hash, params);
|
|
API.goToUrl(url);
|
|
}
|
|
|
|
// specific api calls
|
|
/* Example:
|
|
getUsers: () => request('/users'),
|
|
getUserById: (id) => request(`/users/${id}`),
|
|
createUser: (userData) => request('/users', 'POST', userData),
|
|
updateUser: (id, userData) => request(`/users/${id}`, 'PUT', userData),
|
|
deleteUser: (id) => request(`/users/${id}`, 'DELETE'),
|
|
*/
|
|
}, {
|
|
key: "loginUser",
|
|
value: function () {
|
|
var _loginUser = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
var callback;
|
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
callback = {};
|
|
callback[flagCallback] = DOM.getHashPageCurrent();
|
|
_context2.next = 4;
|
|
return API.request(hashPageUserLogin, 'POST', callback);
|
|
case 4:
|
|
return _context2.abrupt("return", _context2.sent);
|
|
case 5:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
function loginUser() {
|
|
return _loginUser.apply(this, arguments);
|
|
}
|
|
return loginUser;
|
|
}() // dog
|
|
// Command categories
|
|
}, {
|
|
key: "saveCommandCategories",
|
|
value: function () {
|
|
var _saveCommandCategories = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(commandCategories, formFilters, comment) {
|
|
var dataRequest;
|
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
dataRequest = {};
|
|
dataRequest[flagFormFilters] = DOM.convertForm2JSON(formFilters);
|
|
dataRequest[flagCommandCategory] = commandCategories;
|
|
dataRequest[flagComment] = comment;
|
|
_context3.next = 6;
|
|
return API.request(hashSaveDogCommandCategory, 'POST', dataRequest);
|
|
case 6:
|
|
return _context3.abrupt("return", _context3.sent);
|
|
case 7:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
function saveCommandCategories(_x2, _x3, _x4) {
|
|
return _saveCommandCategories.apply(this, arguments);
|
|
}
|
|
return saveCommandCategories;
|
|
}() // Commands
|
|
}, {
|
|
key: "saveCommands",
|
|
value: function () {
|
|
var _saveCommands = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(commands, formFilters, comment) {
|
|
var dataRequest;
|
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
dataRequest = {};
|
|
dataRequest[flagFormFilters] = DOM.convertForm2JSON(formFilters);
|
|
dataRequest[flagCommand] = commands;
|
|
dataRequest[flagComment] = comment;
|
|
_context4.next = 6;
|
|
return API.request(hashSaveDogCommand, 'POST', dataRequest);
|
|
case 6:
|
|
return _context4.abrupt("return", _context4.sent);
|
|
case 7:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
function saveCommands(_x5, _x6, _x7) {
|
|
return _saveCommands.apply(this, arguments);
|
|
}
|
|
return saveCommands;
|
|
}() // Dog Command Links
|
|
}, {
|
|
key: "saveDogCommandLinks",
|
|
value: function () {
|
|
var _saveDogCommandLinks = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(dogCommandLinks, formFilters, comment) {
|
|
var dataRequest;
|
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
dataRequest = {};
|
|
dataRequest[flagFormFilters] = DOM.convertForm2JSON(formFilters);
|
|
dataRequest[flagDogCommandLink] = dogCommandLinks;
|
|
dataRequest[flagComment] = comment;
|
|
_context5.next = 6;
|
|
return API.request(hashSaveDogDogCommandLink, 'POST', dataRequest);
|
|
case 6:
|
|
return _context5.abrupt("return", _context5.sent);
|
|
case 7:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
function saveDogCommandLinks(_x8, _x9, _x10) {
|
|
return _saveDogCommandLinks.apply(this, arguments);
|
|
}
|
|
return saveDogCommandLinks;
|
|
}()
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/lib/utils.js
|
|
function utils_typeof(o) { "@babel/helpers - typeof"; return utils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, utils_typeof(o); }
|
|
function utils_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function utils_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, utils_toPropertyKey(o.key), o); } }
|
|
function utils_createClass(e, r, t) { return r && utils_defineProperties(e.prototype, r), t && utils_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function utils_toPropertyKey(t) { var i = utils_toPrimitive(t, "string"); return "symbol" == utils_typeof(i) ? i : i + ""; }
|
|
function utils_toPrimitive(t, r) { if ("object" != utils_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != utils_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
// Utility functions
|
|
/*
|
|
function $(selector) {
|
|
return document.querySelector(selector);
|
|
}
|
|
|
|
function $$(selector) {
|
|
return document.querySelectorAll(selector);
|
|
}
|
|
*/
|
|
var utils_Utils = /*#__PURE__*/function () {
|
|
function Utils() {
|
|
utils_classCallCheck(this, Utils);
|
|
}
|
|
return utils_createClass(Utils, null, [{
|
|
key: "getListFromDict",
|
|
value: function getListFromDict(dict) {
|
|
var list = [];
|
|
for (var key in dict) {
|
|
list.push(dict[key]);
|
|
}
|
|
return list;
|
|
}
|
|
}, {
|
|
key: "consoleLogIfNotProductionEnvironment",
|
|
value: function consoleLogIfNotProductionEnvironment(message) {
|
|
if (environment.is_production != "true") {
|
|
console.log(message);
|
|
}
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/components/common/temporary/overlay_confirm.js
|
|
function overlay_confirm_typeof(o) { "@babel/helpers - typeof"; return overlay_confirm_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, overlay_confirm_typeof(o); }
|
|
function overlay_confirm_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function overlay_confirm_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, overlay_confirm_toPropertyKey(o.key), o); } }
|
|
function overlay_confirm_createClass(e, r, t) { return r && overlay_confirm_defineProperties(e.prototype, r), t && overlay_confirm_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function overlay_confirm_toPropertyKey(t) { var i = overlay_confirm_toPrimitive(t, "string"); return "symbol" == overlay_confirm_typeof(i) ? i : i + ""; }
|
|
function overlay_confirm_toPrimitive(t, r) { if ("object" != overlay_confirm_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != overlay_confirm_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var OverlayConfirm = /*#__PURE__*/function () {
|
|
function OverlayConfirm() {
|
|
overlay_confirm_classCallCheck(this, OverlayConfirm);
|
|
}
|
|
return overlay_confirm_createClass(OverlayConfirm, null, [{
|
|
key: "hookup",
|
|
value: function hookup(callbackSuccess) {
|
|
Events.initialiseEventHandler(idOverlayConfirm + ' button.' + flagCancel, flagInitialised, function (buttonCancel) {
|
|
buttonCancel.addEventListener('click', function () {
|
|
var overlay = document.querySelector(idOverlayConfirm);
|
|
overlay.style.visibility = 'hidden';
|
|
});
|
|
});
|
|
Events.initialiseEventHandler(idOverlayConfirm + ' button.' + flagSubmit, flagInitialised, function (buttonConfirm) {
|
|
buttonConfirm.addEventListener('click', function () {
|
|
var overlay = document.querySelector(idOverlayConfirm);
|
|
var textarea = overlay.querySelector('textarea');
|
|
overlay.style.visibility = 'hidden';
|
|
callbackSuccess(textarea.value);
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "show",
|
|
value: function show() {
|
|
var overlay = document.querySelector(idOverlayConfirm);
|
|
overlay.classList.remove(flagIsCollapsed);
|
|
overlay.style.visibility = 'visible';
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/pages/base.js
|
|
function base_typeof(o) { "@babel/helpers - typeof"; return base_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, base_typeof(o); }
|
|
function base_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function base_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, base_toPropertyKey(o.key), o); } }
|
|
function base_createClass(e, r, t) { return r && base_defineProperties(e.prototype, r), t && base_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function base_toPropertyKey(t) { var i = base_toPrimitive(t, "string"); return "symbol" == base_typeof(i) ? i : i + ""; }
|
|
function base_toPrimitive(t, r) { if ("object" != base_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != base_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var BasePage = /*#__PURE__*/function () {
|
|
function BasePage(router) {
|
|
base_classCallCheck(this, BasePage);
|
|
if (!router) {
|
|
throw new Error("Router is required");
|
|
} else {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("initialising with router: ", router);
|
|
}
|
|
this.router = router;
|
|
this.title = titlePageCurrent;
|
|
if (this.constructor === BasePage) {
|
|
throw new Error("Cannot instantiate abstract class");
|
|
}
|
|
if (!this.constructor.hash) {
|
|
throw new Error("Class ".concat(this.constructor.name, " must have a static hash attribute."));
|
|
}
|
|
}
|
|
return base_createClass(BasePage, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
throw new Error("Method 'initialize()' must be implemented.");
|
|
}
|
|
}, {
|
|
key: "sharedInitialize",
|
|
value: function sharedInitialize() {
|
|
this.logInitialisation();
|
|
this.hookupCommonElements();
|
|
}
|
|
}, {
|
|
key: "logInitialisation",
|
|
value: function logInitialisation() {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('Initializing ' + this.title + ' page');
|
|
}
|
|
}, {
|
|
key: "hookupCommonElements",
|
|
value: function hookupCommonElements() {
|
|
// hookupVideos();
|
|
this.hookupLogos();
|
|
this.hookupNavigation();
|
|
this.hookupOverlays();
|
|
}
|
|
}, {
|
|
key: "hookupEventHandler",
|
|
value: function hookupEventHandler(eventType, selector, callback) {
|
|
Events.initialiseEventHandler(selector, flagInitialised, function (element) {
|
|
element.addEventListener(eventType, function (event) {
|
|
event.stopPropagation();
|
|
callback(event, element);
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupNavigation",
|
|
value: function hookupNavigation() {
|
|
this.hookupEventHandler("click", idButtonHamburger, function (event, element) {
|
|
var overlayHamburger = document.querySelector(idOverlayHamburger);
|
|
if (overlayHamburger.classList.contains(flagIsCollapsed)) {
|
|
overlayHamburger.classList.remove(flagIsCollapsed);
|
|
overlayHamburger.classList.add(flagExpanded);
|
|
} else {
|
|
overlayHamburger.classList.remove(flagExpanded);
|
|
overlayHamburger.classList.add(flagIsCollapsed);
|
|
}
|
|
});
|
|
this.hookupButtonsNavHome();
|
|
// this.hookupButtonsNavAdminHome();
|
|
this.hookupButtonsNavUserAccount();
|
|
this.hookupButtonsNavUserLogout();
|
|
this.hookupButtonsNavUserLogin();
|
|
|
|
// this.hookupButtonsNavStoreHome();
|
|
// this.hookupButtonsNavStoreManufacturingPurchaseOrders();
|
|
this.hookupButtonsNavDogHome();
|
|
this.hookupButtonsNavDogCommandCategories();
|
|
this.hookupButtonsNavDogCommands();
|
|
this.hookupButtonsNavDogDogCommandLinks();
|
|
this.hookupButtonsNavDogDogs();
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavHome",
|
|
value: function hookupButtonsNavHome() {
|
|
this.hookupButtonsNav('.' + flagNavHome, hashPageHome);
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNav",
|
|
value: function hookupButtonsNav(buttonSelector, hashPageNav) {
|
|
var _this = this;
|
|
this.hookupEventHandler("click", buttonSelector, function (event, button) {
|
|
_this.router.navigateToHash(hashPageNav);
|
|
});
|
|
}
|
|
/*
|
|
hookupButtonsNavAdminHome() {
|
|
this.hookupButtonsNav('.' + flagNavAdminHome, hashPageAdminHome);
|
|
}
|
|
hookupButtonsNavServices() {
|
|
this.hookupButtonsNav('.' + flagNavServices, hashPageServices);
|
|
}
|
|
*/
|
|
}, {
|
|
key: "hookupButtonsNavUserAccount",
|
|
value: function hookupButtonsNavUserAccount() {
|
|
this.hookupButtonsNav('.' + flagNavUserAccount, hashPageUserAccount);
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavUserLogout",
|
|
value: function hookupButtonsNavUserLogout() {
|
|
this.hookupButtonsNav('.' + flagNavUserLogout, hashPageUserLogout);
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavUserLogin",
|
|
value: function hookupButtonsNavUserLogin() {
|
|
var _this2 = this;
|
|
this.hookupEventHandler("click", '.' + flagNavUserLogin, function (event, navigator) {
|
|
event.stopPropagation();
|
|
_this2.leave();
|
|
API.loginUser().then(function (response) {
|
|
if (response.Success) {
|
|
window.location.href = response[flagCallback];
|
|
} else {
|
|
DOM.alertError("Error", response.Message);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavDogHome",
|
|
value: function hookupButtonsNavDogHome() {
|
|
this.hookupButtonsNav('.' + flagNavDogHome, hashPageDogHome);
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavDogCommandCategories",
|
|
value: function hookupButtonsNavDogCommandCategories() {
|
|
this.hookupButtonsNav('.' + flagNavDogCommandCategories, hashPageDogCommandCategories);
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavDogCommands",
|
|
value: function hookupButtonsNavDogCommands() {
|
|
this.hookupButtonsNav('.' + flagNavDogCommands, hashPageDogCommands);
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavDogDogCommandLinks",
|
|
value: function hookupButtonsNavDogDogCommandLinks() {
|
|
this.hookupButtonsNav('.' + flagNavDogDogCommandLinks, hashPageDogDogCommandLinks);
|
|
}
|
|
}, {
|
|
key: "hookupButtonsNavDogDogs",
|
|
value: function hookupButtonsNavDogDogs() {
|
|
this.hookupButtonsNav('.' + flagNavDogDogs, hashPageDogDogs);
|
|
}
|
|
}, {
|
|
key: "hookupLogos",
|
|
value: function hookupLogos() {
|
|
var _this3 = this;
|
|
this.hookupEventHandler("click", "." + flagImageLogo + "," + "." + flagLogo, function (event, element) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('clicking logo');
|
|
_this3.router.navigateToHash(hashPageHome);
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupOverlays",
|
|
value: function hookupOverlays() {
|
|
this.hookupOverlayFromId(idOverlayConfirm);
|
|
this.hookupOverlayFromId(idOverlayError);
|
|
}
|
|
}, {
|
|
key: "hookupOverlayFromId",
|
|
value: function hookupOverlayFromId(idOverlay) {
|
|
Events.initialiseEventHandler(idOverlay, flagInitialised, function (overlay) {
|
|
overlay.querySelector('button.' + flagCancel).addEventListener("click", function (event) {
|
|
event.stopPropagation();
|
|
overlay.style.display = 'none';
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupButtonSave",
|
|
value: function hookupButtonSave() {
|
|
var _this4 = this;
|
|
Events.initialiseEventHandler('form.' + flagFilter + ' button.' + flagSave, flagInitialised, function (button) {
|
|
button.addEventListener("click", function (event) {
|
|
event.stopPropagation();
|
|
button = event.target;
|
|
if (button.classList.contains(flagIsCollapsed)) return;
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('saving page: ', _this4.title);
|
|
OverlayConfirm.show();
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('Leaving ' + this.title + ' page');
|
|
if (this.constructor === BasePage) {
|
|
throw new Error("Must implement leave() method.");
|
|
}
|
|
}
|
|
}, {
|
|
key: "setLocalStoragePage",
|
|
value: function setLocalStoragePage(dataPage) {
|
|
LocalStorage.setLocalStorage(this.hash, dataPage);
|
|
}
|
|
}, {
|
|
key: "getLocalStoragePage",
|
|
value: function getLocalStoragePage() {
|
|
return LocalStorage.getLocalStorage(this.hash);
|
|
}
|
|
}, {
|
|
key: "toggleShowButtonsSaveCancel",
|
|
value: function toggleShowButtonsSaveCancel(show) {
|
|
// , buttonSave = null, buttonCancel = null
|
|
var buttonSave = document.querySelector('form.' + flagFilter + ' button.' + flagSave);
|
|
var buttonCancel = document.querySelector('form.' + flagFilter + ' button.' + flagCancel);
|
|
if (show) {
|
|
buttonCancel.classList.remove(flagIsCollapsed);
|
|
buttonSave.classList.remove(flagIsCollapsed);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('showing buttons');
|
|
} else {
|
|
buttonCancel.classList.add(flagIsCollapsed);
|
|
buttonSave.classList.add(flagIsCollapsed);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('hiding buttons');
|
|
}
|
|
}
|
|
}], [{
|
|
key: "isDirtyFilter",
|
|
value: function isDirtyFilter(filter) {
|
|
var isDirty = DOM.updateAndCheckIsElementDirty(filter);
|
|
if (isDirty) document.querySelectorAll(idTableMain + ' tbody tr').remove();
|
|
return isDirty;
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/pages/core/home.js
|
|
function home_typeof(o) { "@babel/helpers - typeof"; return home_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, home_typeof(o); }
|
|
function home_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function home_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, home_toPropertyKey(o.key), o); } }
|
|
function home_createClass(e, r, t) { return r && home_defineProperties(e.prototype, r), t && home_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function _possibleConstructorReturn(t, e) { if (e && ("object" == home_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
function home_defineProperty(e, r, t) { return (r = home_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function home_toPropertyKey(t) { var i = home_toPrimitive(t, "string"); return "symbol" == home_typeof(i) ? i : i + ""; }
|
|
function home_toPrimitive(t, r) { if ("object" != home_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != home_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
// internal
|
|
|
|
// external
|
|
var PageHome = /*#__PURE__*/function (_BasePage) {
|
|
function PageHome(router) {
|
|
home_classCallCheck(this, PageHome);
|
|
return _callSuper(this, PageHome, [router]);
|
|
}
|
|
_inherits(PageHome, _BasePage);
|
|
return home_createClass(PageHome, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
// this.hookupButtonsNav();
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
_superPropGet(PageHome, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
home_defineProperty(PageHome, "hash", hashPageHome);
|
|
|
|
;// ./static/js/pages/dog/home.js
|
|
function dog_home_typeof(o) { "@babel/helpers - typeof"; return dog_home_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, dog_home_typeof(o); }
|
|
function dog_home_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function dog_home_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, dog_home_toPropertyKey(o.key), o); } }
|
|
function dog_home_createClass(e, r, t) { return r && dog_home_defineProperties(e.prototype, r), t && dog_home_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function home_callSuper(t, o, e) { return o = home_getPrototypeOf(o), home_possibleConstructorReturn(t, home_isNativeReflectConstruct() ? Reflect.construct(o, e || [], home_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function home_possibleConstructorReturn(t, e) { if (e && ("object" == dog_home_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return home_assertThisInitialized(t); }
|
|
function home_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function home_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (home_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function home_superPropGet(t, o, e, r) { var p = home_get(home_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function home_get() { return home_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = home_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, home_get.apply(null, arguments); }
|
|
function home_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = home_getPrototypeOf(t));); return t; }
|
|
function home_getPrototypeOf(t) { return home_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, home_getPrototypeOf(t); }
|
|
function home_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && home_setPrototypeOf(t, e); }
|
|
function home_setPrototypeOf(t, e) { return home_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, home_setPrototypeOf(t, e); }
|
|
function dog_home_defineProperty(e, r, t) { return (r = dog_home_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function dog_home_toPropertyKey(t) { var i = dog_home_toPrimitive(t, "string"); return "symbol" == dog_home_typeof(i) ? i : i + ""; }
|
|
function dog_home_toPrimitive(t, r) { if ("object" != dog_home_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != dog_home_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var PageDogHome = /*#__PURE__*/function (_BasePage) {
|
|
function PageDogHome(router) {
|
|
dog_home_classCallCheck(this, PageDogHome);
|
|
return home_callSuper(this, PageDogHome, [router]);
|
|
}
|
|
home_inherits(PageDogHome, _BasePage);
|
|
return dog_home_createClass(PageDogHome, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
this.hookupDogHome();
|
|
}
|
|
}, {
|
|
key: "hookupDogHome",
|
|
value: function hookupDogHome() {}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
home_superPropGet(PageDogHome, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
dog_home_defineProperty(PageDogHome, "hash", hashPageDogHome);
|
|
|
|
;// ./static/js/lib/business_objects/business_objects.js
|
|
function business_objects_typeof(o) { "@babel/helpers - typeof"; return business_objects_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, business_objects_typeof(o); }
|
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
function business_objects_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function business_objects_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, business_objects_toPropertyKey(o.key), o); } }
|
|
function business_objects_createClass(e, r, t) { return r && business_objects_defineProperties(e.prototype, r), t && business_objects_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function business_objects_toPropertyKey(t) { var i = business_objects_toPrimitive(t, "string"); return "symbol" == business_objects_typeof(i) ? i : i + ""; }
|
|
function business_objects_toPrimitive(t, r) { if ("object" != business_objects_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != business_objects_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var BusinessObjects = /*#__PURE__*/function () {
|
|
function BusinessObjects() {
|
|
business_objects_classCallCheck(this, BusinessObjects);
|
|
}
|
|
return business_objects_createClass(BusinessObjects, null, [{
|
|
key: "getOptionJsonFromObjectJsonAndKeys",
|
|
value: function getOptionJsonFromObjectJsonAndKeys(objectJson, keyText, keyValue) {
|
|
var valueSelected = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
return {
|
|
text: objectJson[keyText],
|
|
value: objectJson[keyValue],
|
|
selected: objectJson[keyValue] == valueSelected
|
|
};
|
|
}
|
|
}, {
|
|
key: "getOptionJsonFromObjectJson",
|
|
value: function getOptionJsonFromObjectJson(objectJson) {
|
|
var valueSelected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
var keyText = objectJson[flagNameAttrOptionText];
|
|
var keyValue = objectJson[flagNameAttrOptionValue];
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
objectJson: objectJson,
|
|
keyText: keyText,
|
|
keyValue: keyValue
|
|
});
|
|
return BusinessObjects.getOptionJsonFromObjectJsonAndKeys(objectJson, keyText, keyValue, valueSelected);
|
|
}
|
|
}, {
|
|
key: "getObjectText",
|
|
value: function getObjectText(objectJson) {
|
|
return objectJson == null ? '' : objectJson[objectJson[flagNameAttrOptionText]];
|
|
}
|
|
}, {
|
|
key: "getListObjectsFromIdDictAndCsv",
|
|
value: function getListObjectsFromIdDictAndCsv(idDict, idCsv) {
|
|
var listObjects = [];
|
|
var ids = idCsv.split(',');
|
|
var _iterator = _createForOfIteratorHelper(ids),
|
|
_step;
|
|
try {
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
var id = _step.value;
|
|
listObjects.push(idDict[id]);
|
|
}
|
|
} catch (err) {
|
|
_iterator.e(err);
|
|
} finally {
|
|
_iterator.f();
|
|
}
|
|
return listObjects;
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/components/common/temporary/overlay_error.js
|
|
function overlay_error_typeof(o) { "@babel/helpers - typeof"; return overlay_error_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, overlay_error_typeof(o); }
|
|
function overlay_error_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function overlay_error_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, overlay_error_toPropertyKey(o.key), o); } }
|
|
function overlay_error_createClass(e, r, t) { return r && overlay_error_defineProperties(e.prototype, r), t && overlay_error_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function overlay_error_toPropertyKey(t) { var i = overlay_error_toPrimitive(t, "string"); return "symbol" == overlay_error_typeof(i) ? i : i + ""; }
|
|
function overlay_error_toPrimitive(t, r) { if ("object" != overlay_error_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != overlay_error_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var OverlayError = /*#__PURE__*/function () {
|
|
function OverlayError() {
|
|
overlay_error_classCallCheck(this, OverlayError);
|
|
}
|
|
return overlay_error_createClass(OverlayError, null, [{
|
|
key: "hookup",
|
|
value: function hookup() {
|
|
Events.initialiseEventHandler(idOverlayError + ' button.' + flagCancel, flagInitialised, function (buttonCancel) {
|
|
buttonCancel.addEventListener('click', function () {
|
|
var overlay = document.querySelector(idOverlayError);
|
|
overlay.style.visibility = 'hidden';
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "show",
|
|
value: function show(msgError) {
|
|
var overlay = document.querySelector(idOverlayError);
|
|
var labelError = overlay.querySelector(idLabelError);
|
|
labelError.innerText = msgError;
|
|
overlay.style.visibility = 'visible';
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/pages/base_table.js
|
|
function base_table_typeof(o) { "@babel/helpers - typeof"; return base_table_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, base_table_typeof(o); }
|
|
function base_table_defineProperty(e, r, t) { return (r = base_table_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function base_table_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function base_table_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, base_table_toPropertyKey(o.key), o); } }
|
|
function base_table_createClass(e, r, t) { return r && base_table_defineProperties(e.prototype, r), t && base_table_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function base_table_toPropertyKey(t) { var i = base_table_toPrimitive(t, "string"); return "symbol" == base_table_typeof(i) ? i : i + ""; }
|
|
function base_table_toPrimitive(t, r) { if ("object" != base_table_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != base_table_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
function base_table_callSuper(t, o, e) { return o = base_table_getPrototypeOf(o), base_table_possibleConstructorReturn(t, base_table_isNativeReflectConstruct() ? Reflect.construct(o, e || [], base_table_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function base_table_possibleConstructorReturn(t, e) { if (e && ("object" == base_table_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return base_table_assertThisInitialized(t); }
|
|
function base_table_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function base_table_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (base_table_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function base_table_superPropGet(t, o, e, r) { var p = base_table_get(base_table_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function base_table_get() { return base_table_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = base_table_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, base_table_get.apply(null, arguments); }
|
|
function base_table_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = base_table_getPrototypeOf(t));); return t; }
|
|
function base_table_getPrototypeOf(t) { return base_table_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, base_table_getPrototypeOf(t); }
|
|
function base_table_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && base_table_setPrototypeOf(t, e); }
|
|
function base_table_setPrototypeOf(t, e) { return base_table_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, base_table_setPrototypeOf(t, e); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TableBasePage = /*#__PURE__*/function (_BasePage) {
|
|
// static hash
|
|
// static attrIdRowObject
|
|
// callSaveTableContent
|
|
|
|
function TableBasePage(router) {
|
|
var _this;
|
|
base_table_classCallCheck(this, TableBasePage);
|
|
_this = base_table_callSuper(this, TableBasePage, [router]);
|
|
_this.cursorYInitial = null;
|
|
_this.rowInitial = null;
|
|
_this.placeholder = null;
|
|
_this.dragSrcEl = null;
|
|
_this.dragSrcRow = null;
|
|
_this.hookupTableCellDdls = _this.hookupTableCellDdls.bind(_this);
|
|
return _this;
|
|
}
|
|
base_table_inherits(TableBasePage, _BasePage);
|
|
return base_table_createClass(TableBasePage, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
throw new Error("Must implement initialize() method.");
|
|
}
|
|
}, {
|
|
key: "sharedInitialize",
|
|
value: function sharedInitialize() {
|
|
var _this2 = this;
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
var isSinglePageApp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
if (!isPopState) {
|
|
base_table_superPropGet(TableBasePage, "sharedInitialize", this, 3)([]);
|
|
this.hookupFilters();
|
|
this.hookupButtonsSaveCancel();
|
|
this.hookupTableMain();
|
|
OverlayConfirm.hookup(function () {
|
|
if (isSinglePageApp) {
|
|
_this2.saveRecordsTableDirtySinglePageApp();
|
|
} else {
|
|
_this2.saveRecordsTableDirty();
|
|
}
|
|
});
|
|
} else {
|
|
var dataPage = this.getLocalStoragePage();
|
|
var filters = dataPage[flagFormFilters];
|
|
var formFilters = this.getFormFilters();
|
|
var filtersDefault = DOM.convertForm2JSON(formFilters);
|
|
if (!Validation.areEqualDicts(filters, filtersDefault)) {
|
|
this.callFilterTableContent();
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
key: "hookupFilters",
|
|
value: function hookupFilters() {
|
|
if (this.constructor === TableBasePage) {
|
|
throw new Error("Subclass of TableBasePage must implement method hookupFilters().");
|
|
}
|
|
}
|
|
}, {
|
|
key: "sharedHookupFilters",
|
|
value: function sharedHookupFilters() {
|
|
this.hookupButtonApplyFilters();
|
|
this.hookupSearchTextFilter();
|
|
}
|
|
}, {
|
|
key: "hookupFilterActive",
|
|
value: function hookupFilterActive() {
|
|
var filterSelector = idFormFilters + ' #' + flagActiveOnly;
|
|
var filterActiveOld = document.querySelector(filterSelector);
|
|
filterActiveOld.removeAttribute('id');
|
|
var parentDiv = filterActiveOld.parentElement;
|
|
var isChecked = DOM.getElementAttributeValuePrevious(parentDiv) == "True";
|
|
var filterActiveNew = document.querySelector(idFormFilters + ' div.' + flagActiveOnly + '.' + flagContainerInput + ' svg.' + flagActiveOnly);
|
|
filterActiveNew.setAttribute('id', flagActiveOnly);
|
|
if (isChecked) filterActiveNew.classList.add(flagIsChecked);
|
|
this.hookupEventHandler("click", filterSelector, function (event, filterActive) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
filterActive: filterActive
|
|
});
|
|
utils_Utils.consoleLogIfNotProductionEnvironment(base_table_defineProperty({}, filterActive.tagName, filterActive.tagName));
|
|
var svgElement = filterActive.tagName.toUpperCase() == 'SVG' ? filterActive : filterActive.parentElement;
|
|
var wasChecked = svgElement.classList.contains(flagIsChecked);
|
|
if (wasChecked) {
|
|
svgElement.classList.remove(flagIsChecked);
|
|
} else {
|
|
svgElement.classList.add(flagIsChecked);
|
|
}
|
|
return TableBasePage.isDirtyFilter(svgElement);
|
|
});
|
|
var filter = document.querySelector(filterSelector);
|
|
var filterValuePrevious = DOM.getElementValueCurrent(filter);
|
|
filter.setAttribute(attrValueCurrent, filterValuePrevious);
|
|
filter.setAttribute(attrValuePrevious, filterValuePrevious);
|
|
}
|
|
}, {
|
|
key: "hookupFilter",
|
|
value: function hookupFilter(filterFlag) {
|
|
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (event, filter) {
|
|
return TableBasePage.isDirtyFilter(filter);
|
|
};
|
|
var filterSelector = idFormFilters + ' #' + filterFlag;
|
|
this.hookupEventHandler("change", filterSelector, handler);
|
|
var filter = document.querySelector(filterSelector);
|
|
var filterValuePrevious = DOM.getElementValueCurrent(filter);
|
|
filter.setAttribute(attrValueCurrent, filterValuePrevious);
|
|
filter.setAttribute(attrValuePrevious, filterValuePrevious);
|
|
}
|
|
}, {
|
|
key: "hookupFilterIsNotEmpty",
|
|
value: function hookupFilterIsNotEmpty() {
|
|
this.hookupFilter(flagIsNotEmpty);
|
|
}
|
|
}, {
|
|
key: "hookupButtonApplyFilters",
|
|
value: function hookupButtonApplyFilters() {
|
|
var _this3 = this;
|
|
this.hookupEventHandler("click", idButtonApplyFilters, function (event, button) {
|
|
event.stopPropagation();
|
|
_this3.callFilterTableContent();
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupSearchTextFilter",
|
|
value: function hookupSearchTextFilter() {
|
|
this.hookupFilter(flagSearch);
|
|
}
|
|
}, {
|
|
key: "hookupFilterDog",
|
|
value: function hookupFilterDog() {
|
|
this.hookupFilter(attrIdDog);
|
|
}
|
|
}, {
|
|
key: "hookupFilterCommandCategory",
|
|
value: function hookupFilterCommandCategory() {
|
|
this.hookupFilter(attrIdCommandCategory, function (event, filterCommandCategory) {
|
|
TableBasePage.isDirtyFilter(filterCommandCategory);
|
|
var isDirtyFilter = filterCommandCategory.classList.contains(flagDirty);
|
|
var idCommandCategory = DOM.getElementValueCurrent(filterCommandCategory);
|
|
console.log("filter commands unsorted");
|
|
console.log(utils_Utils.getListFromDict(filterCommands));
|
|
var commandsInCategory = utils_Utils.getListFromDict(filterCommands).filter(function (command) {
|
|
return command[attrIdCommandCategory] == idCommandCategory;
|
|
});
|
|
var sortedCommands = commandsInCategory.sort(function (a, b) {
|
|
return a[flagName].localeCompare(b[flagName]);
|
|
});
|
|
var filterCommand = document.querySelector(idFormFilters + ' .' + flagCommand);
|
|
var idCommandPrevious = DOM.getElementAttributeValuePrevious(filterCommand);
|
|
filterCommand.innerHTML = '';
|
|
var optionJson, option;
|
|
option = DOM.createOption(null);
|
|
filterCommand.appendChild(option);
|
|
sortedCommands.forEach(function (command) {
|
|
optionJson = BusinessObjects.getOptionJsonFromObjectJson(command, idCommandPrevious);
|
|
option = DOM.createOption(optionJson);
|
|
filterCommand.appendChild(option);
|
|
});
|
|
filterCommand.dispatchEvent(new Event('change'));
|
|
return isDirtyFilter;
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupFilterCommand",
|
|
value: function hookupFilterCommand() {
|
|
this.hookupFilter(attrIdCommand);
|
|
}
|
|
/*
|
|
getAndLoadFilteredTableContent = () => {
|
|
this.callFilterTableContent()
|
|
.catch(error => console.error('Error:', error));
|
|
}
|
|
*/
|
|
}, {
|
|
key: "getFormFilters",
|
|
value: function getFormFilters() {
|
|
return document.querySelector(idFormFilters);
|
|
}
|
|
}, {
|
|
key: "callFilterTableContent",
|
|
value: function callFilterTableContent() {
|
|
var formFilters = this.getFormFilters();
|
|
var filtersJson = DOM.convertForm2JSON(formFilters);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("callFilterTableContent");
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("formFilters");
|
|
utils_Utils.consoleLogIfNotProductionEnvironment(formFilters);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("filtersJson");
|
|
utils_Utils.consoleLogIfNotProductionEnvironment(filtersJson);
|
|
this.leave();
|
|
API.goToHash(this.constructor.hash, filtersJson);
|
|
}
|
|
}, {
|
|
key: "callbackLoadTableContent",
|
|
value: function callbackLoadTableContent(response) {
|
|
var table = TableBasePage.getTableMain();
|
|
var bodyTable = table.querySelector('tbody');
|
|
bodyTable.querySelectorAll('tr').forEach(function (row) {
|
|
row.remove();
|
|
});
|
|
var rowsJson = response.data[flagRows];
|
|
if (!Validation.isEmpty(rowsJson) && rowsJson.every(function (row) {
|
|
return row.hasOwnProperty('display_order');
|
|
})) {
|
|
rowsJson = rowsJson.sort(function (a, b) {
|
|
return a.display_order - b.display_order;
|
|
});
|
|
}
|
|
rowsJson.forEach(this.loadRowTable.bind(this));
|
|
this.hookupTableMain();
|
|
}
|
|
}, {
|
|
key: "loadRowTable",
|
|
value: function loadRowTable(rowJson) {
|
|
throw new Error("Subclass of TableBasePage must implement method loadRowTable().");
|
|
}
|
|
}, {
|
|
key: "getAndLoadFilteredTableContentSinglePageApp",
|
|
value: function getAndLoadFilteredTableContentSinglePageApp() {
|
|
var _this4 = this;
|
|
this.callFilterTableContent().then(function (data) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('Table data received:', data);
|
|
_this4.callbackLoadTableContent(data);
|
|
})["catch"](function (error) {
|
|
return console.error('Error:', error);
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupButtonsSaveCancel",
|
|
value: function hookupButtonsSaveCancel() {
|
|
this.hookupButtonSave();
|
|
this.hookupButtonCancel();
|
|
this.toggleShowButtonsSaveCancel(false);
|
|
}
|
|
}, {
|
|
key: "saveRecordsTableDirty",
|
|
value: function saveRecordsTableDirty() {
|
|
var _this5 = this;
|
|
var records = this.getTableRecords(true);
|
|
if (records.length == 0) {
|
|
OverlayError.show('No records to save');
|
|
return;
|
|
}
|
|
var formElement = this.getFormFilters();
|
|
var comment = DOM.getElementValueCurrent(document.querySelector(idTextareaConfirm));
|
|
/*
|
|
Utils.consoleLogIfNotProductionEnvironment({ formElement, comment, records });
|
|
Utils.consoleLogIfNotProductionEnvironment('records');
|
|
Utils.consoleLogIfNotProductionEnvironment(records);
|
|
debugger;
|
|
*/
|
|
this.callSaveTableContent(records, formElement, comment).then(function (data) {
|
|
if (data[flagStatus] == flagSuccess) {
|
|
if (_verbose) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('Records saved!');
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('Data received:', data);
|
|
}
|
|
_this5.callFilterTableContent();
|
|
} else {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("error: ", data[flagMessage]);
|
|
OverlayError.show(data[flagMessage]);
|
|
}
|
|
})["catch"](function (error) {
|
|
return console.error('Error:', error);
|
|
});
|
|
}
|
|
}, {
|
|
key: "getTableRecords",
|
|
value: function getTableRecords() {
|
|
var _this6 = this;
|
|
var dirtyOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
var records = [];
|
|
var record;
|
|
document.querySelectorAll(idTableMain + ' > tbody > tr').forEach(function (row) {
|
|
if (dirtyOnly && !DOM.hasDirtyChildrenContainer(row)) return;
|
|
record = _this6.getJsonRow(row);
|
|
records.push(record);
|
|
});
|
|
return records;
|
|
}
|
|
}, {
|
|
key: "getJsonRow",
|
|
value: function getJsonRow(row) {
|
|
throw new Error("Subclass of TableBasePage must implement method getJsonRow().");
|
|
}
|
|
}, {
|
|
key: "saveRecordsTableDirtySinglePageApp",
|
|
value: function saveRecordsTableDirtySinglePageApp() {
|
|
var _this7 = this;
|
|
var records = this.getTableRecords(true);
|
|
if (records.length == 0) {
|
|
OverlayError.show('No records to save');
|
|
return;
|
|
}
|
|
var formElement = this.getFormFilters();
|
|
var comment = DOM.getElementValueCurrent(document.querySelector(idTextareaConfirm));
|
|
this.callSaveTableContent(records, formElement, comment).then(function (data) {
|
|
if (data[flagStatus] == flagSuccess) {
|
|
if (_verbose) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('Records saved!');
|
|
utils_Utils.consoleLogIfNotProductionEnvironment('Data received:', data);
|
|
}
|
|
_this7.callbackLoadTableContent(data);
|
|
} else {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("error: ", data[flagMessage]);
|
|
OverlayError.show(data[flagMessage]);
|
|
}
|
|
})["catch"](function (error) {
|
|
return console.error('Error:', error);
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupButtonCancel",
|
|
value: function hookupButtonCancel() {
|
|
var _this8 = this;
|
|
Events.initialiseEventHandler(idFormFilters + ' button.' + flagCancel, flagInitialised, function (button) {
|
|
button.addEventListener("click", function (event) {
|
|
event.stopPropagation();
|
|
button = event.target;
|
|
if (button.classList.contains(flagIsCollapsed)) return;
|
|
_this8.callFilterTableContent();
|
|
});
|
|
button.classList.add(flagIsCollapsed);
|
|
});
|
|
}
|
|
}, {
|
|
key: "handleClickAddRowTable",
|
|
value: function handleClickAddRowTable(event, button) {
|
|
event.stopPropagation();
|
|
_rowBlank.setAttribute(this.constructor.attrIdRowObject, -1 - _rowBlank.getAttribute(this.constructor.attrIdRowObject));
|
|
var tbody = document.querySelector(idTableMain + ' tbody');
|
|
if (tbody.classList.contains(flagIsCollapsed)) return;
|
|
var row = _rowBlank.cloneNode(true);
|
|
row.classList.remove(flagInitialised);
|
|
row.querySelectorAll('.' + flagInitialised).forEach(function (element) {
|
|
element.classList.remove(flagInitialised);
|
|
});
|
|
var countRows = document.querySelectorAll(idTableMain + ' > tbody > tr').length;
|
|
row.setAttribute(this.constructor.attrIdRowObject, -1 - countRows);
|
|
this.initialiseRowNew(tbody, row);
|
|
tbody.prepend(row);
|
|
tbody.scrollTop = 0;
|
|
this.hookupTableMain();
|
|
this.postInitialiseRowNewCallback(tbody);
|
|
}
|
|
}, {
|
|
key: "initialiseRowNew",
|
|
value: function initialiseRowNew(tbody, row) {
|
|
if (this.constructor === TableBasePage) {
|
|
throw new Error("Subclass of TableBasePage must implement method initialiseRowNew().");
|
|
}
|
|
// row.classList.remove(flagRowNew);
|
|
}
|
|
}, {
|
|
key: "hookupTableMain",
|
|
value: function hookupTableMain() {
|
|
var _this9 = this;
|
|
if (this.constructor === TableBasePage) {
|
|
throw new Error("Must implement hookupTableMain() method.");
|
|
}
|
|
if (true) {
|
|
// _rowBlank == null) {
|
|
Events.initialiseEventHandler(idTableMain, flagInitialised, function (table) {
|
|
_this9.cacheRowBlank();
|
|
});
|
|
}
|
|
}
|
|
}, {
|
|
key: "cacheRowBlank",
|
|
value: function cacheRowBlank() {
|
|
var selectorRowNew = idTableMain + ' tbody tr.' + flagRowNew;
|
|
var rowBlankTemp = document.querySelector(selectorRowNew);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("row blank temp: ", rowBlankTemp);
|
|
var countRows = document.querySelectorAll(idTableMain + ' > tbody > tr').length;
|
|
_rowBlank = rowBlankTemp.cloneNode(true);
|
|
document.querySelectorAll(selectorRowNew).forEach(function (row) {
|
|
row.remove();
|
|
});
|
|
_rowBlank.setAttribute(this.constructor.attrIdRowObject, -1 - countRows);
|
|
}
|
|
}, {
|
|
key: "postInitialiseRowNewCallback",
|
|
value: function postInitialiseRowNewCallback(tbody) {
|
|
if (this.constructor === TableBasePage) {
|
|
throw new Error("Subclass of TableBasePage must implement method postInitialiseRowNewCallback(tbody).");
|
|
}
|
|
}
|
|
}, {
|
|
key: "initialiseSliderDisplayOrderRowNew",
|
|
value: function initialiseSliderDisplayOrderRowNew(tbody, row) {
|
|
// let tdSelector = ':scope > tr > td.' + flagDisplayOrder;
|
|
// let tbody = document.querySelector('table' + (Validation.isEmpty(flagTable) ? '' : '.' + flagTable) + ' > tbody');
|
|
var slidersDisplayOrder = tbody.querySelectorAll(':scope > tr > td.' + flagDisplayOrder + ' input.' + flagSlider);
|
|
var maxDisplayOrder = 0;
|
|
slidersDisplayOrder.forEach(function (slider) {
|
|
maxDisplayOrder = Math.max(maxDisplayOrder, parseFloat(DOM.getElementValueCurrent(slider)));
|
|
});
|
|
var sliderDisplayOrder = row.querySelector('td.' + flagDisplayOrder + ' .' + flagSlider);
|
|
DOM.setElementValuesCurrentAndPrevious(sliderDisplayOrder, maxDisplayOrder + 1);
|
|
}
|
|
}, {
|
|
key: "hookupSlidersDisplayOrderTable",
|
|
value: function hookupSlidersDisplayOrderTable() {
|
|
var selectorDisplayOrder = idTableMain + ' tbody tr td.' + flagDisplayOrder + ' input.' + flagSlider + '.' + flagDisplayOrder;
|
|
this.hookupChangeHandlerTableCells(selectorDisplayOrder);
|
|
}
|
|
}, {
|
|
key: "hookupChangeHandlerTableCells",
|
|
value: function hookupChangeHandlerTableCells(inputSelector) {
|
|
var _this10 = this;
|
|
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (event, element) {
|
|
_this10.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
Events.initialiseEventHandler(inputSelector, flagInitialised, function (input) {
|
|
input.addEventListener("change", function (event) {
|
|
handler(event, input);
|
|
});
|
|
handler(null, input);
|
|
});
|
|
}
|
|
/*
|
|
handleChangeElementCellTable(event, element) {
|
|
let row = DOM.getRowFromElement(element);
|
|
let td = DOM.getCellFromElement(element);
|
|
let wasDirtyRow = DOM.hasDirtyChildrenContainer(row);
|
|
let wasDirtyElement = element.classList.contains(flagDirty);
|
|
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
|
|
if (isDirtyElement != wasDirtyElement) {
|
|
DOM.handleDirtyElement(td, isDirtyElement);
|
|
let isNowDirtyRow = DOM.hasDirtyChildrenContainer(row);
|
|
if (isNowDirtyRow != wasDirtyRow) {
|
|
DOM.handleDirtyElement(row, isNowDirtyRow);
|
|
let rows = this.getTableRecords(true);
|
|
let existsDirtyRecord = rows.length > 0;
|
|
this.toggleShowButtonsSaveCancel(existsDirtyRecord);
|
|
}
|
|
}
|
|
}
|
|
handleChangeElementNestedCellTable(event, element, flagColumnList = [], orderNesting = 1) {
|
|
let orderNestingTemp = orderNesting;
|
|
let row, td, nestedRowSelector;
|
|
while (orderNestingTemp > 0) {
|
|
nestedRowSelector = idTableMain;
|
|
for (let indexOrderNesting = 0; indexOrderNesting < orderNestingTemp; indexOrderNesting++) {
|
|
nestedRowSelector += ' tbody tr';
|
|
}
|
|
row = DOM.getClosestParent(element, nestedRowSelector);
|
|
td = row.querySelector('td.' + flag);
|
|
}
|
|
let row = DOM.getRowFromElement(element);
|
|
let td = DOM.getCellFromElement(element);
|
|
let wasDirtyRow = DOM.hasDirtyChildrenContainer(row);
|
|
let wasDirtyElement = element.classList.contains(flagDirty);
|
|
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
|
|
if (isDirtyElement != wasDirtyElement) {
|
|
DOM.handleDirtyElement(td, isDirtyElement);
|
|
let isNowDirtyRow = DOM.hasDirtyChildrenContainer(row);
|
|
if (isNowDirtyRow != wasDirtyRow) {
|
|
DOM.handleDirtyElement(row, isNowDirtyRow);
|
|
let rows = this.getTableRecords(true);
|
|
let existsDirtyRecord = rows.length > 0;
|
|
this.toggleShowButtonsSaveCancel(existsDirtyRecord);
|
|
}
|
|
}
|
|
}
|
|
handleChangeElementSubtableCell(event, element, flagFieldSubtable) {
|
|
let rowSubtable = element.closest(idTableMain + ' td.' + flagFieldSubtable + ' tbody tr');
|
|
let rowTable = rowSubtable.closest(idTableMain + ' > tbody > tr');
|
|
let td = DOM.getCellFromElement(element);
|
|
// let tdSubtable = td.closest('td.' + flagFieldSubtable);
|
|
let wasDirtyRowSubtable = DOM.hasDirtyChildrenContainer(rowSubtable);
|
|
let wasDirtyRowTable = DOM.hasDirtyChildrenContainer(rowTable);
|
|
let wasDirtyElement = element.classList.contains(flagDirty);
|
|
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
|
|
Utils.consoleLogIfNotProductionEnvironment({isDirtyElement, wasDirtyElement});
|
|
if (isDirtyElement != wasDirtyElement) {
|
|
DOM.handleDirtyElement(td, isDirtyElement);
|
|
let isNowDirtyRowSubtable = DOM.hasDirtyChildrenContainer(rowSubtable);
|
|
Utils.consoleLogIfNotProductionEnvironment({isNowDirtyRowSubtable, wasDirtyRowSubtable});
|
|
if (isNowDirtyRowSubtable != wasDirtyRowSubtable) {
|
|
DOM.handleDirtyElement(rowSubtable, isNowDirtyRowSubtable);
|
|
let isNowDirtyRowTable = DOM.hasDirtyChildrenContainer(rowTable);
|
|
Utils.consoleLogIfNotProductionEnvironment({isNowDirtyRowTable, wasDirtyRowTable});
|
|
if (isNowDirtyRowTable != wasDirtyRowTable) {
|
|
DOM.handleDirtyElement(rowTable, isNowDirtyRowTable);
|
|
let rows = this.getTableRecords(true);
|
|
let existsDirtyRecord = rows.length > 0;
|
|
this.toggleShowButtonsSaveCancel(existsDirtyRecord);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
*/
|
|
}, {
|
|
key: "handleChangeNestedElementCellTable",
|
|
value: function handleChangeNestedElementCellTable(event, element) {
|
|
var wasDirtyParentRows = this.getAllIsDirtyRowsInParentTree(element);
|
|
var wasDirtyElement = element.classList.contains(flagDirty);
|
|
var isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
|
|
// Utils.consoleLogIfNotProductionEnvironment({isDirtyElement, wasDirtyElement, wasDirtyParentRows});
|
|
// let td = DOM.getCellFromElement(element);
|
|
// DOM.setElementAttributeValueCurrent(td, DOM.getElementAttributeValueCurrent(element));
|
|
if (isDirtyElement != wasDirtyElement) {
|
|
// DOM.handleDirtyElement(td, isDirtyElement);
|
|
this.updateAndToggleShowButtonsSaveCancel();
|
|
this.cascadeChangedIsDirtyNestedElementCellTable(element, isDirtyElement, wasDirtyParentRows);
|
|
}
|
|
}
|
|
}, {
|
|
key: "getAllIsDirtyRowsInParentTree",
|
|
value: function getAllIsDirtyRowsInParentTree(element) {
|
|
var rows = [];
|
|
var parent = element;
|
|
var isDirty;
|
|
while (parent) {
|
|
if (parent.tagName.toUpperCase() == 'TR') {
|
|
isDirty = parent.classList.contains(flagDirty);
|
|
rows.push(isDirty);
|
|
}
|
|
parent = parent.parentElement;
|
|
}
|
|
return rows;
|
|
}
|
|
}, {
|
|
key: "cascadeChangedIsDirtyNestedElementCellTable",
|
|
value: function cascadeChangedIsDirtyNestedElementCellTable(element, isDirtyElement, wasDirtyParentRows) {
|
|
if (Validation.isEmpty(wasDirtyParentRows)) return;
|
|
var tr = DOM.getRowFromElement(element);
|
|
var isDirtyRow = isDirtyElement || DOM.hasDirtyChildrenContainer(tr);
|
|
var wasDirtyRow = wasDirtyParentRows.shift();
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
isDirtyRow: isDirtyRow,
|
|
wasDirtyRow: wasDirtyRow
|
|
});
|
|
if (isDirtyRow != wasDirtyRow) {
|
|
DOM.handleDirtyElement(tr, isDirtyRow);
|
|
this.updateAndToggleShowButtonsSaveCancel();
|
|
this.cascadeChangedIsDirtyNestedElementCellTable(tr.parentElement, isDirtyRow, wasDirtyParentRows);
|
|
}
|
|
}
|
|
}, {
|
|
key: "hookupChangeHandlerTableCellsWhenNotCollapsed",
|
|
value: function hookupChangeHandlerTableCellsWhenNotCollapsed(inputSelector) {
|
|
var _this11 = this;
|
|
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (event, element) {
|
|
if (!element.classList.contains(flagIsCollapsed)) _this11.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
this.hookupEventHandler("change", inputSelector, handler);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsCodeTable",
|
|
value: function hookupFieldsCodeTable() {
|
|
this.hookupChangeHandlerTableCells(idTableMain + ' > tbody > tr > td.' + flagCode + ' > .' + flagCode);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsNameTable",
|
|
value: function hookupFieldsNameTable() {
|
|
this.hookupChangeHandlerTableCells(idTableMain + ' > tbody > tr > td.' + flagName + ' > .' + flagName);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsDescriptionTable",
|
|
value: function hookupFieldsDescriptionTable() {
|
|
this.hookupChangeHandlerTableCells(idTableMain + ' > tbody > tr > td.' + flagDescription + ' > .' + flagDescription);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsNotesTable",
|
|
value: function hookupFieldsNotesTable() {
|
|
this.hookupChangeHandlerTableCells(idTableMain + ' > tbody > tr > td.' + flagNotes + ' > .' + flagNotes);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsActive",
|
|
value: function hookupFieldsActive() {
|
|
var _this12 = this;
|
|
var flagTable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
var handleClickRowNew = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (event, element) {
|
|
_this12.handleClickAddRowTable(event, element);
|
|
};
|
|
var selectorButton = 'table' + (Validation.isEmpty(flagTable) ? '' : '.' + flagTable) + ' > tbody > tr > td.' + flagActive + ' .' + flagButton + '.' + flagActive;
|
|
var selectorButtonDelete = selectorButton + '.' + flagDelete;
|
|
var selectorButtonUndelete = selectorButton + ':not(.' + flagDelete + ')';
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("hookupFieldsActive: ", selectorButtonDelete, selectorButtonUndelete);
|
|
this.hookupButtonsRowDelete(selectorButtonDelete, selectorButtonUndelete);
|
|
this.hookupButtonsRowUndelete(selectorButtonDelete, selectorButtonUndelete);
|
|
this.hookupEventHandler("click", 'table' + (Validation.isEmpty(flagTable) ? '' : '.' + flagTable) + ' > thead > tr > th.' + flagActive + ' .' + flagButton + '.' + flagActive, function (event, button) {
|
|
handleClickRowNew(event, button);
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupButtonsRowDelete",
|
|
value: function hookupButtonsRowDelete(selectorButtonDelete, selectorButtonUndelete) {
|
|
var _this13 = this;
|
|
var changeHandler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (event, element) {
|
|
_this13.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
this.hookupEventHandler("click", selectorButtonDelete, function (event, element) {
|
|
_this13.handleClickButtonRowDelete(event, element, selectorButtonDelete, selectorButtonUndelete, function (changeEvent, changeElement) {
|
|
changeHandler(changeEvent, changeElement);
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "handleClickButtonRowDelete",
|
|
value: function handleClickButtonRowDelete(event, element, selectorButtonDelete, selectorButtonUndelete) {
|
|
var _this14 = this;
|
|
var changeHandler = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (event, element) {
|
|
_this14.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
if (element.tagName.toUpperCase() != 'SVG') element = element.parentElement;
|
|
var valuePrevious = DOM.getElementAttributeValuePrevious(element);
|
|
var wasDirty = element.classList.contains(flagDirty);
|
|
var row = DOM.getRowFromElement(element);
|
|
if (row.classList.contains(flagRowNew) && !DOM.hasDirtyChildrenContainer(row)) {
|
|
row.parentNode.removeChild(row);
|
|
} else {
|
|
var buttonAddTemplate = document.querySelector(idContainerTemplateElements + ' .' + flagButton + '.' + flagActive + '.' + flagAdd);
|
|
var buttonAdd = buttonAddTemplate.cloneNode(true);
|
|
DOM.setElementAttributeValuePrevious(buttonAdd, valuePrevious);
|
|
DOM.setElementAttributeValueCurrent(buttonAdd, false);
|
|
if (wasDirty) buttonAdd.classList.add(flagDirty);
|
|
element.replaceWith(buttonAdd);
|
|
changeHandler(null, buttonAdd);
|
|
this.hookupButtonsRowUndelete(selectorButtonDelete, selectorButtonUndelete, function (changeEvent, changeElement) {
|
|
changeHandler(changeEvent, changeElement);
|
|
});
|
|
}
|
|
this.updateAndToggleShowButtonsSaveCancel();
|
|
}
|
|
}, {
|
|
key: "hookupButtonsRowUndelete",
|
|
value: function hookupButtonsRowUndelete(selectorButtonDelete, selectorButtonUndelete) {
|
|
var _this15 = this;
|
|
var changeHandler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (event, element) {
|
|
_this15.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
this.hookupEventHandler("click", selectorButtonUndelete, function (event, element) {
|
|
_this15.handleClickButtonRowUndelete(event, element, selectorButtonDelete, selectorButtonUndelete, function (changeEvent, changeElement) {
|
|
changeHandler(changeEvent, changeElement);
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "handleClickButtonRowUndelete",
|
|
value: function handleClickButtonRowUndelete(event, element, selectorButtonDelete, selectorButtonUndelete) {
|
|
var _this16 = this;
|
|
var changeHandler = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (event, element) {
|
|
_this16.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
if (element.tagName.toUpperCase() != 'SVG') element = element.parentElement;
|
|
var valuePrevious = DOM.getElementAttributeValuePrevious(element);
|
|
var wasDirty = DOM.isElementDirty(element);
|
|
var buttonDeleteTemplate = document.querySelector(idContainerTemplateElements + ' .' + flagButton + '.' + flagActive + '.' + flagDelete);
|
|
var buttonDelete = buttonDeleteTemplate.cloneNode(true);
|
|
DOM.setElementAttributeValuePrevious(buttonDelete, valuePrevious);
|
|
DOM.setElementAttributeValueCurrent(buttonDelete, true);
|
|
if (wasDirty) buttonDelete.classList.add(flagDirty);
|
|
element.replaceWith(buttonDelete);
|
|
changeHandler(null, buttonDelete);
|
|
this.hookupButtonsRowDelete(selectorButtonDelete, selectorButtonUndelete, function (changeEvent, changeElement) {
|
|
changeHandler(changeEvent, changeElement);
|
|
});
|
|
this.updateAndToggleShowButtonsSaveCancel();
|
|
}
|
|
}, {
|
|
key: "hookupTdsAccessLevel",
|
|
value: function hookupTdsAccessLevel() {
|
|
this.hookupTableCellDdlPreviews(flagAccessLevel, utils_Utils.getListFromDict(accessLevels));
|
|
}
|
|
}, {
|
|
key: "hookupTableCellDdlPreviews",
|
|
value: function hookupTableCellDdlPreviews(fieldFlag, optionList) {
|
|
var _this17 = this;
|
|
var cellSelector = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
var ddlHookup = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function (ddlSelector) {
|
|
_this17.hookupTableCellDdls(ddlSelector);
|
|
};
|
|
var changeHandler = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (event, element) {
|
|
_this17.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
if (cellSelector == null) cellSelector = idTableMain + ' > tbody > tr > td.' + fieldFlag;
|
|
this.hookupEventHandler("click", cellSelector + ' div.' + fieldFlag, function (event, div) {
|
|
_this17.handleClickTableCellDdlPreview(event, div, fieldFlag, optionList, cellSelector, function (ddlSelector) {
|
|
ddlHookup(ddlSelector, function (event, element) {
|
|
changeHandler(event, element);
|
|
});
|
|
});
|
|
});
|
|
ddlHookup(cellSelector + ' select.' + fieldFlag);
|
|
}
|
|
}, {
|
|
key: "hookupTableCellDdls",
|
|
value: function hookupTableCellDdls(ddlSelector) {
|
|
var _this18 = this;
|
|
var changeHandler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (event, element) {
|
|
_this18.handleChangeNestedElementCellTable(event, element);
|
|
};
|
|
this.hookupEventHandler("change", ddlSelector, function (event, element) {
|
|
changeHandler(event, element);
|
|
});
|
|
}
|
|
}, {
|
|
key: "handleClickTableCellDdlPreview",
|
|
value: function handleClickTableCellDdlPreview(event, div, fieldFlag, optionObjectList) {
|
|
var _this19 = this;
|
|
var cellSelector = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
var ddlHookup = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : function (cellSelector) {
|
|
_this19.hookupTableCellDdls(cellSelector);
|
|
};
|
|
if (Validation.isEmpty(cellSelector)) cellSelector = idTableMain + ' > tbody > tr > td.' + fieldFlag;
|
|
var idSelected = DOM.getElementAttributeValueCurrent(div);
|
|
var td = DOM.getCellFromElement(div);
|
|
td.innerHTML = '';
|
|
var ddl = document.createElement('select');
|
|
ddl.classList.add(fieldFlag);
|
|
DOM.setElementValuesCurrentAndPrevious(ddl, idSelected);
|
|
var optionJson, option;
|
|
if (_verbose) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("click table cell ddl preview");
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
optionObjectList: optionObjectList,
|
|
cellSelector: cellSelector
|
|
});
|
|
}
|
|
option = DOM.createOption(null);
|
|
ddl.appendChild(option);
|
|
optionObjectList.forEach(function (optionObjectJson) {
|
|
optionJson = BusinessObjects.getOptionJsonFromObjectJson(optionObjectJson, idSelected);
|
|
option = DOM.createOption(optionJson);
|
|
ddl.appendChild(option);
|
|
});
|
|
td.appendChild(ddl);
|
|
var ddlSelector = cellSelector + ' select.' + fieldFlag;
|
|
ddlHookup(ddlSelector);
|
|
}
|
|
/*
|
|
hookupTableCellDDlPreviewsWhenNotCollapsed(cellSelector, optionList, ddlHookup = (event, element) => { this.hookupTableCellDdls(event, element); }) {
|
|
this.hookupEventHandler("click", cellSelector + ' div', (event, div) => {
|
|
this.handleClickTableCellDdlPreview(event, div, optionList, cellSelector, (event, element) => { ddlHookup(event, element); });
|
|
});
|
|
}
|
|
*/
|
|
}, {
|
|
key: "toggleColumnCollapsed",
|
|
value: function toggleColumnCollapsed(flagColumn, isCollapsed) {
|
|
this.toggleColumnHasClassnameFlag(flagColumn, isCollapsed, flagIsCollapsed);
|
|
}
|
|
}, {
|
|
key: "toggleColumnHeaderCollapsed",
|
|
value: function toggleColumnHeaderCollapsed(flagColumn, isCollapsed) {
|
|
this.toggleColumnHasClassnameFlag(flagColumn, isCollapsed, flagIsCollapsed);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsCommandCategory",
|
|
value: function hookupFieldsCommandCategory() {
|
|
var _this20 = this;
|
|
this.hookupTableCellDdlPreviews(flagCommandCategory, utils_Utils.getListFromDict(filterCommandCategories).sort(function (a, b) {
|
|
return a[flagName].localeCompare(b[flagName]);
|
|
}), null, function (cellSelector) {
|
|
_this20.hookupCommandCategoryDdls(cellSelector);
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupCommandCategoryDdls",
|
|
value: function hookupCommandCategoryDdls(ddlSelector) {
|
|
var _this21 = this;
|
|
this.hookupChangeHandlerTableCells(ddlSelector, function (event, element) {
|
|
_this21.handleChangeCommandCategoryDdl(event, element);
|
|
});
|
|
}
|
|
}, {
|
|
key: "handleChangeCommandCategoryDdl",
|
|
value: function handleChangeCommandCategoryDdl(event, ddlCategory) {
|
|
var row = DOM.getRowFromElement(ddlCategory);
|
|
var idCommandCategoryRowOld = this.getIdCommandCategoryRow(row); // DOM.getElementAttributeValueCurrent(ddlCategory);
|
|
this.handleChangeNestedElementCellTable(event, ddlCategory);
|
|
var idCommandCategoryRowNew = this.getIdCommandCategoryRow(row); // DOM.getElementAttributeValueCurrent(ddlCategory);
|
|
if (idCommandCategoryRowOld == idCommandCategoryRowNew) return;
|
|
var idCommandCategoryFilter = this.getIdCommandCategoryFilter();
|
|
var tdCommand = row.querySelector('td.' + flagCommand);
|
|
tdCommand.dispatchEvent(new Event('click'));
|
|
var ddlCommand = row.querySelector('td.' + flagCommand + ' select.' + flagCommand);
|
|
ddlCommand.innerHTML = '';
|
|
ddlCommand.appendChild(DOM.createOption(null));
|
|
var optionJson, option;
|
|
var commandsInCategory = utils_Utils.getListFromDict(filterCommands).filter(function (command) {
|
|
return (command[attrIdCommandCategory] == idCommandCategoryRowNew || idCommandCategoryRowNew == 0) && (command[attrIdCommandCategory] == idCommandCategoryFilter || idCommandCategoryFilter == 0);
|
|
});
|
|
var sortedCommands = commandsInCategory.sort(function (a, b) {
|
|
return a[flagName].localeCompare(b[flagName]);
|
|
});
|
|
sortedCommands.forEach(function (command) {
|
|
optionJson = BusinessObjects.getOptionJsonFromObjectJson(command);
|
|
option = DOM.createOption(optionJson);
|
|
ddlCommand.appendChild(option);
|
|
});
|
|
this.handleChangeNestedElementCellTable(event, ddlCommand);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsCommand",
|
|
value: function hookupFieldsCommand() {
|
|
var _this22 = this;
|
|
this.hookupEventHandler("click", idTableMain + ' td.' + flagCommand + ' .' + flagCommand, function (event, div) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment(div);
|
|
var parentTr = DOM.getRowFromElement(div);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
div: div,
|
|
parentTr: parentTr
|
|
});
|
|
var tdCommandCategory = parentTr.querySelector('td.' + flagCommandCategory);
|
|
var idCommandCategoryRow = _this22.getIdCommandCategoryRow(parentTr); // DOM.getElementAttributeValueCurrent(tdCommandCategory);
|
|
var idCommandCategoryFilter = _this22.getIdCommandCategoryFilter();
|
|
var filterCommandList = utils_Utils.getListFromDict(filterCommands);
|
|
var commandsInCategory = filterCommandList.filter(function (command) {
|
|
return (command[attrIdCommandCategory] == idCommandCategoryRow || idCommandCategoryRow == 0) && (command[attrIdCommandCategory] == idCommandCategoryFilter || idCommandCategoryFilter == 0);
|
|
});
|
|
var sortedCommands = commandsInCategory.sort(function (a, b) {
|
|
return a[flagName].localeCompare(b[flagName]);
|
|
});
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
tdCommandCategory: tdCommandCategory,
|
|
idCommandCategoryRow: idCommandCategoryRow,
|
|
idCommandCategoryFilter: idCommandCategoryFilter,
|
|
filterCommandList: filterCommandList,
|
|
commandsInCategory: commandsInCategory
|
|
});
|
|
utils_Utils.consoleLogIfNotProductionEnvironment(filterCommandList);
|
|
_this22.handleClickTableCellDdlPreview(event, div, flagCommand, sortedCommands, null, function (cellSelector) {
|
|
_this22.hookupTableCellDdls(cellSelector, function (event, element) {
|
|
_this22.handleChangeNestedElementCellTable(event, element);
|
|
});
|
|
});
|
|
});
|
|
this.hookupTableCellDdls(idTableMain + ' td.' + flagCommand + ' select.' + flagCommand);
|
|
}
|
|
}, {
|
|
key: "getIdCommandCategoryRow",
|
|
value: function getIdCommandCategoryRow(tr) {
|
|
var elementCommandCategory = tr.querySelector('td.' + flagCommandCategory + ' .' + flagCommandCategory);
|
|
return DOM.getElementAttributeValueCurrent(elementCommandCategory);
|
|
}
|
|
}, {
|
|
key: "getIdCommandCategoryFilter",
|
|
value: function getIdCommandCategoryFilter() {
|
|
var formFilters = this.getFormFilters();
|
|
var commandCategoryFilter = formFilters.querySelector('#' + attrIdCommandCategory);
|
|
var commandFilter = formFilters.querySelector('#' + attrIdCommand);
|
|
var idCommandCategory = 0;
|
|
var valueCurrentCommandCategoryFilter = DOM.getElementAttributeValueCurrent(commandCategoryFilter);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
valueCurrentCommandCategoryFilter: valueCurrentCommandCategoryFilter
|
|
});
|
|
if (valueCurrentCommandCategoryFilter == "") {
|
|
var valueCurrentCommandFilter = DOM.getElementAttributeValueCurrent(commandFilter);
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
valueCurrentCommandFilter: valueCurrentCommandFilter
|
|
});
|
|
if (valueCurrentCommandFilter != "") {
|
|
var command = filterCommands[valueCurrentCommandFilter];
|
|
idCommandCategory = command[attrIdCommandCategory];
|
|
}
|
|
} else {
|
|
idCommandCategory = Number(valueCurrentCommandCategoryFilter);
|
|
}
|
|
return idCommandCategory;
|
|
}
|
|
}, {
|
|
key: "getHasCommandCategoryFilter",
|
|
value: function getHasCommandCategoryFilter() {
|
|
var idCommandCategoryFilter = this.getIdCommandCategoryFilter();
|
|
return !(Validation.isEmpty(idCommandCategoryFilter) || idCommandCategoryFilter == 0);
|
|
}
|
|
}, {
|
|
key: "getIdCommandRow",
|
|
value: function getIdCommandRow(tr) {
|
|
var elementCommand = tr.querySelector('td.' + flagCommand + ' .' + flagCommand);
|
|
return DOM.getElementAttributeValueCurrent(elementCommand);
|
|
}
|
|
}, {
|
|
key: "getIdCommandFilter",
|
|
value: function getIdCommandFilter() {
|
|
var formFilters = this.getFormFilters();
|
|
var commandFilter = formFilters.querySelector('#' + attrIdCommand);
|
|
var valueCurrentCommandFilter = DOM.getElementAttributeValueCurrent(commandFilter);
|
|
var idCommand = Number(valueCurrentCommandFilter);
|
|
return idCommand;
|
|
}
|
|
}, {
|
|
key: "getHasCommandFilter",
|
|
value: function getHasCommandFilter() {
|
|
var idCommandFilter = this.getIdCommandFilter();
|
|
return !(Validation.isEmpty(idCommandFilter) || idCommandFilter == 0);
|
|
}
|
|
}, {
|
|
key: "hookupFieldsDog",
|
|
value: function hookupFieldsDog() {
|
|
this.hookupTableCellDdlPreviews(flagDog, utils_Utils.getListFromDict(filterDogs));
|
|
}
|
|
}, {
|
|
key: "getIdDogRow",
|
|
value: function getIdDogRow(tr) {
|
|
var elementDog = tr.querySelector('td.' + flagDog + ' .' + flagDog);
|
|
return DOM.getElementAttributeValueCurrent(elementDog);
|
|
}
|
|
}, {
|
|
key: "createTdActive",
|
|
value: function createTdActive(isActive) {
|
|
var tdActive = document.createElement("td");
|
|
tdActive.classList.add(flagActive);
|
|
var buttonActive = document.createElement("button");
|
|
buttonActive.classList.add(flagActive);
|
|
buttonActive.classList.add(isActive ? flagDelete : flagAdd);
|
|
buttonActive.textContent = isActive ? 'x' : '+';
|
|
DOM.setElementAttributesValuesCurrentAndPrevious(buttonActive, isActive);
|
|
tdActive.appendChild(buttonActive);
|
|
return tdActive;
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
if (this.constructor === TableBasePage) {
|
|
throw new Error("Must implement leave() method.");
|
|
}
|
|
base_table_superPropGet(TableBasePage, "leave", this, 3)([]);
|
|
var formFilters = this.getFormFilters();
|
|
var dataPage = {};
|
|
dataPage[flagFormFilters] = DOM.convertForm2JSON(formFilters);
|
|
this.setLocalStoragePage(dataPage);
|
|
}
|
|
}, {
|
|
key: "toggleColumnHasClassnameFlag",
|
|
value: function toggleColumnHasClassnameFlag(columnFlag, isRequiredFlag, classnameFlag) {
|
|
var table = TableBasePage.getTableMain();
|
|
var columnTh = table.querySelector('th.' + columnFlag);
|
|
var columnThHasFlag = columnTh.classList.contains(classnameFlag);
|
|
if (isRequiredFlag == columnThHasFlag) return;
|
|
DOM.toggleElementHasClassnameFlag(columnTh, isRequiredFlag, classnameFlag);
|
|
}
|
|
}, {
|
|
key: "toggleColumnHeaderHasClassnameFlag",
|
|
value: function toggleColumnHeaderHasClassnameFlag(columnFlag, isRequiredFlag, classnameFlag) {
|
|
var table = TableBasePage.getTableMain();
|
|
var columnTh = table.querySelector('th.' + columnFlag);
|
|
DOM.toggleElementHasClassnameFlag(columnTh, isRequiredFlag, classnameFlag);
|
|
}
|
|
}, {
|
|
key: "updateAndToggleShowButtonsSaveCancel",
|
|
value: function updateAndToggleShowButtonsSaveCancel() {
|
|
var records = this.getTableRecords(true);
|
|
var existsDirtyRecord = records.length > 0;
|
|
this.toggleShowButtonsSaveCancel(existsDirtyRecord);
|
|
}
|
|
}], [{
|
|
key: "isDirtyFilter",
|
|
value: function isDirtyFilter(filter) {
|
|
var isDirty = DOM.updateAndCheckIsElementDirty(filter);
|
|
var tbody = document.querySelector(idTableMain + ' tbody');
|
|
var rows = tbody.querySelectorAll(':scope > tr');
|
|
var cancelButton = document.querySelector(idFormFilters + ' ' + idButtonCancel);
|
|
var saveButton = document.querySelector(idFormFilters + ' ' + idButtonSave);
|
|
rows.forEach(function (row) {
|
|
if (isDirty && !row.classList.contains(flagIsCollapsed)) row.classList.add(flagIsCollapsed);
|
|
if (!isDirty && row.classList.contains(flagIsCollapsed)) row.classList.remove(flagIsCollapsed);
|
|
});
|
|
if (isDirty) {
|
|
// tbody.querySelectorAll('tr').forEach((tr) => { tr.remove(); });
|
|
tbody.innerHTML = '<div>Press "Apply Filters" to refresh the table.</div>' + tbody.innerHTML;
|
|
if (!tbody.classList.contains(flagIsCollapsed)) tbody.classList.add(flagIsCollapsed);
|
|
if (!cancelButton.classList.contains(flagIsCollapsed)) cancelButton.classList.add(flagIsCollapsed);
|
|
if (!saveButton.classList.contains(flagIsCollapsed)) saveButton.classList.add(flagIsCollapsed);
|
|
} else {
|
|
if (tbody.classList.contains(flagIsCollapsed)) tbody.classList.remove(flagIsCollapsed);
|
|
if (cancelButton.classList.contains(flagIsCollapsed)) cancelButton.classList.remove(flagIsCollapsed);
|
|
if (saveButton.classList.contains(flagIsCollapsed)) saveButton.classList.remove(flagIsCollapsed);
|
|
var isDirtyLabel = tbody.querySelector(":scope > div");
|
|
if (isDirtyLabel != null) isDirtyLabel.remove();
|
|
}
|
|
return isDirty;
|
|
}
|
|
}, {
|
|
key: "getTableMain",
|
|
value: function getTableMain() {
|
|
return document.querySelector(idTableMain);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
|
|
;// ./static/js/pages/dog/mixin.js
|
|
function mixin_typeof(o) { "@babel/helpers - typeof"; return mixin_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, mixin_typeof(o); }
|
|
function mixin_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function mixin_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, mixin_toPropertyKey(o.key), o); } }
|
|
function mixin_createClass(e, r, t) { return r && mixin_defineProperties(e.prototype, r), t && mixin_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function mixin_toPropertyKey(t) { var i = mixin_toPrimitive(t, "string"); return "symbol" == mixin_typeof(i) ? i : i + ""; }
|
|
function mixin_toPrimitive(t, r) { if ("object" != mixin_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != mixin_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
|
|
|
|
// import BasePage from "../base.js";
|
|
|
|
|
|
|
|
var DogMixinPage = /*#__PURE__*/function () {
|
|
function DogMixinPage(pageCurrent) {
|
|
mixin_classCallCheck(this, DogMixinPage);
|
|
this.page = pageCurrent;
|
|
}
|
|
return mixin_createClass(DogMixinPage, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
Utils.consoleLogIfNotProductionEnvironment('hookup dog start for ', this.page.hash);
|
|
this.hookupFilters();
|
|
this.hookupLocalStorageDog();
|
|
}
|
|
}, {
|
|
key: "hookupFilters",
|
|
value: function hookupFilters() {}
|
|
}, {
|
|
key: "hookupLocalStorageDog",
|
|
value: function hookupLocalStorageDog() {}
|
|
|
|
/*
|
|
hookupDogCardsProduct() {
|
|
|
|
let d; // , lsShared;
|
|
let selectorCardProduct = '.card.subcard';
|
|
Events.initialiseEventHandler(selectorCardProduct, flagInitialised, function(cardProduct) {
|
|
if (_verbose) { Utils.consoleLogIfNotProductionEnvironment("initialising product card: ", cardProduct); }
|
|
cardProduct.addEventListener("click", function(event) {
|
|
// d = { keyIdProduct: product.getAttribute(attrIdProduct) }
|
|
var elemClicked = event.target;
|
|
if (elemClicked.id != 'submit') { // disable for submit buttons
|
|
if (_verbose) {
|
|
Utils.consoleLogIfNotProductionEnvironment("product click: " + cardProduct.getAttribute(attrIdProduct));
|
|
Utils.consoleLogIfNotProductionEnvironment("permutation click: " + cardProduct.getAttribute(attrIdPermutation));
|
|
}
|
|
var d = {}
|
|
d[keyIdProduct] = cardProduct.getAttribute(attrIdProduct)
|
|
d[keyIdPermutation] = cardProduct.getAttribute(attrIdPermutation)
|
|
// send quantity requested
|
|
goToPage(hashPageDogProduct, d);
|
|
}
|
|
});
|
|
if (_verbose) { Utils.consoleLogIfNotProductionEnvironment("click method added for product ID: " + cardProduct.getAttribute(attrIdProduct) + ', permutation ID: ', cardProduct.getAttribute(attrIdPermutation)); }
|
|
});
|
|
}
|
|
*/
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {}
|
|
}]);
|
|
}();
|
|
|
|
;// ./static/js/pages/dog/mixin_table.js
|
|
function mixin_table_typeof(o) { "@babel/helpers - typeof"; return mixin_table_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, mixin_table_typeof(o); }
|
|
function mixin_table_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function mixin_table_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, mixin_table_toPropertyKey(o.key), o); } }
|
|
function mixin_table_createClass(e, r, t) { return r && mixin_table_defineProperties(e.prototype, r), t && mixin_table_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function mixin_table_toPropertyKey(t) { var i = mixin_table_toPrimitive(t, "string"); return "symbol" == mixin_table_typeof(i) ? i : i + ""; }
|
|
function mixin_table_toPrimitive(t, r) { if ("object" != mixin_table_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != mixin_table_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
function mixin_table_callSuper(t, o, e) { return o = mixin_table_getPrototypeOf(o), mixin_table_possibleConstructorReturn(t, mixin_table_isNativeReflectConstruct() ? Reflect.construct(o, e || [], mixin_table_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function mixin_table_possibleConstructorReturn(t, e) { if (e && ("object" == mixin_table_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return mixin_table_assertThisInitialized(t); }
|
|
function mixin_table_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function mixin_table_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (mixin_table_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function mixin_table_superPropGet(t, o, e, r) { var p = mixin_table_get(mixin_table_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function mixin_table_get() { return mixin_table_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = mixin_table_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, mixin_table_get.apply(null, arguments); }
|
|
function mixin_table_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = mixin_table_getPrototypeOf(t));); return t; }
|
|
function mixin_table_getPrototypeOf(t) { return mixin_table_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, mixin_table_getPrototypeOf(t); }
|
|
function mixin_table_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && mixin_table_setPrototypeOf(t, e); }
|
|
function mixin_table_setPrototypeOf(t, e) { return mixin_table_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, mixin_table_setPrototypeOf(t, e); }
|
|
|
|
|
|
|
|
// import BasePage from "../base.js";
|
|
|
|
|
|
|
|
var DogTableMixinPage = /*#__PURE__*/function (_DogMixinPage) {
|
|
function DogTableMixinPage(pageCurrent) {
|
|
mixin_table_classCallCheck(this, DogTableMixinPage);
|
|
return mixin_table_callSuper(this, DogTableMixinPage, [pageCurrent]);
|
|
}
|
|
mixin_table_inherits(DogTableMixinPage, _DogMixinPage);
|
|
return mixin_table_createClass(DogTableMixinPage, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
mixin_table_superPropGet(DogTableMixinPage, "initialize", this, 3)([]);
|
|
this.hookupFilters();
|
|
this.hookupTable();
|
|
}
|
|
}, {
|
|
key: "hookupFilters",
|
|
value: function hookupFilters() {
|
|
// Implement filter-specific functionality here
|
|
}
|
|
}, {
|
|
key: "hookupTable",
|
|
value: function hookupTable() {
|
|
// Implement table-specific functionality here
|
|
}
|
|
}]);
|
|
}(DogMixinPage);
|
|
|
|
;// ./static/js/pages/dog/command_categories.js
|
|
function command_categories_typeof(o) { "@babel/helpers - typeof"; return command_categories_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, command_categories_typeof(o); }
|
|
function command_categories_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function command_categories_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, command_categories_toPropertyKey(o.key), o); } }
|
|
function command_categories_createClass(e, r, t) { return r && command_categories_defineProperties(e.prototype, r), t && command_categories_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function command_categories_callSuper(t, o, e) { return o = command_categories_getPrototypeOf(o), command_categories_possibleConstructorReturn(t, command_categories_isNativeReflectConstruct() ? Reflect.construct(o, e || [], command_categories_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function command_categories_possibleConstructorReturn(t, e) { if (e && ("object" == command_categories_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return command_categories_assertThisInitialized(t); }
|
|
function command_categories_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function command_categories_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (command_categories_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function command_categories_superPropGet(t, o, e, r) { var p = command_categories_get(command_categories_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function command_categories_get() { return command_categories_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = command_categories_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, command_categories_get.apply(null, arguments); }
|
|
function command_categories_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = command_categories_getPrototypeOf(t));); return t; }
|
|
function command_categories_getPrototypeOf(t) { return command_categories_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, command_categories_getPrototypeOf(t); }
|
|
function command_categories_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && command_categories_setPrototypeOf(t, e); }
|
|
function command_categories_setPrototypeOf(t, e) { return command_categories_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, command_categories_setPrototypeOf(t, e); }
|
|
function command_categories_defineProperty(e, r, t) { return (r = command_categories_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function command_categories_toPropertyKey(t) { var i = command_categories_toPrimitive(t, "string"); return "symbol" == command_categories_typeof(i) ? i : i + ""; }
|
|
function command_categories_toPrimitive(t, r) { if ("object" != command_categories_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != command_categories_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PageDogCommandCategories = /*#__PURE__*/function (_TableBasePage) {
|
|
function PageDogCommandCategories(router) {
|
|
var _this;
|
|
command_categories_classCallCheck(this, PageDogCommandCategories);
|
|
_this = command_categories_callSuper(this, PageDogCommandCategories, [router]);
|
|
command_categories_defineProperty(_this, "callSaveTableContent", API.saveCommandCategories);
|
|
_this.dogMixin = new DogTableMixinPage(_this);
|
|
return _this;
|
|
}
|
|
command_categories_inherits(PageDogCommandCategories, _TableBasePage);
|
|
return command_categories_createClass(PageDogCommandCategories, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "hookupFilters",
|
|
value: function hookupFilters() {
|
|
this.sharedHookupFilters();
|
|
this.hookupFilterActive();
|
|
}
|
|
}, {
|
|
key: "loadRowTable",
|
|
value: function loadRowTable(rowJson) {
|
|
if (rowJson == null) return;
|
|
if (_verbose) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson);
|
|
}
|
|
}
|
|
}, {
|
|
key: "getJsonRow",
|
|
value: function getJsonRow(row) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment({
|
|
row: row
|
|
});
|
|
if (row == null) return;
|
|
var inputCode = row.querySelector('td.' + flagCode + ' .' + flagCode);
|
|
var inputName = row.querySelector('td.' + flagName + ' .' + flagName);
|
|
var buttonActive = row.querySelector('td.' + flagActive + ' .' + flagActive);
|
|
|
|
/*
|
|
console.log("inputName");
|
|
console.log(inputName);
|
|
*/
|
|
|
|
var jsonRow = {};
|
|
jsonRow[attrIdCommandCategory] = row.getAttribute(attrIdCommandCategory);
|
|
jsonRow[flagCode] = DOM.getElementAttributeValueCurrent(inputCode);
|
|
jsonRow[flagName] = DOM.getElementAttributeValueCurrent(inputName);
|
|
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
|
return jsonRow;
|
|
}
|
|
}, {
|
|
key: "initialiseRowNew",
|
|
value: function initialiseRowNew(tbody, row) {}
|
|
}, {
|
|
key: "postInitialiseRowNewCallback",
|
|
value: function postInitialiseRowNewCallback(tbody) {
|
|
// let newRows = tbody.querySelectorAll('tr.' + flagRowNew);
|
|
}
|
|
}, {
|
|
key: "hookupTableMain",
|
|
value: function hookupTableMain() {
|
|
command_categories_superPropGet(PageDogCommandCategories, "hookupTableMain", this, 3)([]);
|
|
this.hookupFieldsCodeTable();
|
|
this.hookupFieldsNameTable();
|
|
this.hookupFieldsActive();
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
command_categories_superPropGet(PageDogCommandCategories, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(TableBasePage);
|
|
command_categories_defineProperty(PageDogCommandCategories, "hash", hashPageDogCommandCategories);
|
|
command_categories_defineProperty(PageDogCommandCategories, "attrIdRowObject", attrIdCommandCategory);
|
|
|
|
;// ./static/js/pages/dog/commands.js
|
|
function commands_typeof(o) { "@babel/helpers - typeof"; return commands_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, commands_typeof(o); }
|
|
function commands_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function commands_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, commands_toPropertyKey(o.key), o); } }
|
|
function commands_createClass(e, r, t) { return r && commands_defineProperties(e.prototype, r), t && commands_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function commands_callSuper(t, o, e) { return o = commands_getPrototypeOf(o), commands_possibleConstructorReturn(t, commands_isNativeReflectConstruct() ? Reflect.construct(o, e || [], commands_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function commands_possibleConstructorReturn(t, e) { if (e && ("object" == commands_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return commands_assertThisInitialized(t); }
|
|
function commands_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function commands_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (commands_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function commands_superPropGet(t, o, e, r) { var p = commands_get(commands_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function commands_get() { return commands_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = commands_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, commands_get.apply(null, arguments); }
|
|
function commands_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = commands_getPrototypeOf(t));); return t; }
|
|
function commands_getPrototypeOf(t) { return commands_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, commands_getPrototypeOf(t); }
|
|
function commands_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && commands_setPrototypeOf(t, e); }
|
|
function commands_setPrototypeOf(t, e) { return commands_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, commands_setPrototypeOf(t, e); }
|
|
function commands_defineProperty(e, r, t) { return (r = commands_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function commands_toPropertyKey(t) { var i = commands_toPrimitive(t, "string"); return "symbol" == commands_typeof(i) ? i : i + ""; }
|
|
function commands_toPrimitive(t, r) { if ("object" != commands_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != commands_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PageDogCommands = /*#__PURE__*/function (_TableBasePage) {
|
|
function PageDogCommands(router) {
|
|
var _this;
|
|
commands_classCallCheck(this, PageDogCommands);
|
|
_this = commands_callSuper(this, PageDogCommands, [router]);
|
|
commands_defineProperty(_this, "callSaveTableContent", API.saveCommands);
|
|
_this.dogMixin = new DogTableMixinPage(_this);
|
|
return _this;
|
|
}
|
|
commands_inherits(PageDogCommands, _TableBasePage);
|
|
return commands_createClass(PageDogCommands, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "hookupFilters",
|
|
value: function hookupFilters() {
|
|
this.sharedHookupFilters();
|
|
this.hookupFilterCommandCategory();
|
|
this.hookupFilterActive();
|
|
}
|
|
}, {
|
|
key: "hookupFilterCommandCategory",
|
|
value: function hookupFilterCommandCategory() {
|
|
this.hookupFilter(attrIdCommandCategory);
|
|
}
|
|
}, {
|
|
key: "loadRowTable",
|
|
value: function loadRowTable(rowJson) {
|
|
if (rowJson == null) return;
|
|
if (_verbose) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson);
|
|
}
|
|
}
|
|
}, {
|
|
key: "getJsonRow",
|
|
value: function getJsonRow(row) {
|
|
if (row == null) return;
|
|
var inputName = row.querySelector('td.' + flagName + ' .' + flagName);
|
|
var inputHandSignalDefaultDescription = row.querySelector('td.' + flagHandSignalDefaultDescription + ' .' + flagHandSignalDefaultDescription);
|
|
var inputCanHaveButton = row.querySelector('td.' + flagCanHaveButton + ' .' + flagCanHaveButton);
|
|
var inputNotes = row.querySelector('td.' + flagNotes + ' .' + flagNotes);
|
|
var buttonActive = row.querySelector('td.' + flagActive + ' .' + flagActive);
|
|
|
|
/*
|
|
Utils.consoleLogIfNotProductionEnvironment({ inputName, inputHandSignalDefaultDescription, inputCanHaveButton, inputNotes, buttonActive });
|
|
debugger;
|
|
*/
|
|
|
|
var jsonRow = {};
|
|
jsonRow[attrIdCommand] = row.getAttribute(attrIdCommand);
|
|
jsonRow[attrIdCommandCategory] = this.getIdCommandCategoryRow(row);
|
|
jsonRow[flagName] = DOM.getElementAttributeValueCurrent(inputName);
|
|
jsonRow[flagHandSignalDefaultDescription] = DOM.getElementAttributeValueCurrent(inputHandSignalDefaultDescription);
|
|
jsonRow[flagCanHaveButton] = DOM.getElementAttributeValueCurrent(inputCanHaveButton) == "true";
|
|
jsonRow[flagNotes] = DOM.getElementAttributeValueCurrent(inputNotes);
|
|
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
|
return jsonRow;
|
|
}
|
|
}, {
|
|
key: "initialiseRowNew",
|
|
value: function initialiseRowNew(tbody, row) {}
|
|
}, {
|
|
key: "postInitialiseRowNewCallback",
|
|
value: function postInitialiseRowNewCallback(tbody) {
|
|
var newRows = tbody.querySelectorAll('tr.' + flagRowNew);
|
|
var newestRow = newRows[newRows.length - 1];
|
|
var clickableElementsSelector = ['td.' + flagDog + ' div.' + flagDog, ',td.' + flagCommandCategory + ' div.' + flagCommandCategory, ',td.' + flagCommand + ' div.' + flagCommand].join('');
|
|
newestRow.querySelectorAll(clickableElementsSelector).forEach(function (clickableElement) {
|
|
clickableElement.click();
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupTableMain",
|
|
value: function hookupTableMain() {
|
|
commands_superPropGet(PageDogCommands, "hookupTableMain", this, 3)([]);
|
|
this.hookupFieldsCommandCategory();
|
|
this.hookupFieldsNameTable();
|
|
this.hookupTextareasHandSignalDefaultDescription();
|
|
this.hookupFieldsCanHaveButton();
|
|
this.hookupFieldsNotesTable();
|
|
this.hookupFieldsActive();
|
|
}
|
|
}, {
|
|
key: "hookupFieldsCommandCategory",
|
|
value: function hookupFieldsCommandCategory() {
|
|
this.hookupTableCellDdlPreviews(flagCommandCategory, utils_Utils.getListFromDict(filterCommandCategories));
|
|
}
|
|
}, {
|
|
key: "hookupTextareasHandSignalDefaultDescription",
|
|
value: function hookupTextareasHandSignalDefaultDescription() {
|
|
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagHandSignalDefaultDescription + ' textarea');
|
|
}
|
|
}, {
|
|
key: "hookupFieldsCanHaveButton",
|
|
value: function hookupFieldsCanHaveButton() {
|
|
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagCanHaveButton + ' input');
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
commands_superPropGet(PageDogCommands, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(TableBasePage);
|
|
commands_defineProperty(PageDogCommands, "hash", hashPageDogCommands);
|
|
commands_defineProperty(PageDogCommands, "attrIdRowObject", attrIdCommand);
|
|
|
|
;// ./static/js/pages/dog/dog_command_links.js
|
|
function dog_command_links_typeof(o) { "@babel/helpers - typeof"; return dog_command_links_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, dog_command_links_typeof(o); }
|
|
function dog_command_links_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function dog_command_links_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, dog_command_links_toPropertyKey(o.key), o); } }
|
|
function dog_command_links_createClass(e, r, t) { return r && dog_command_links_defineProperties(e.prototype, r), t && dog_command_links_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function dog_command_links_callSuper(t, o, e) { return o = dog_command_links_getPrototypeOf(o), dog_command_links_possibleConstructorReturn(t, dog_command_links_isNativeReflectConstruct() ? Reflect.construct(o, e || [], dog_command_links_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function dog_command_links_possibleConstructorReturn(t, e) { if (e && ("object" == dog_command_links_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return dog_command_links_assertThisInitialized(t); }
|
|
function dog_command_links_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function dog_command_links_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (dog_command_links_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function dog_command_links_superPropGet(t, o, e, r) { var p = dog_command_links_get(dog_command_links_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function dog_command_links_get() { return dog_command_links_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = dog_command_links_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, dog_command_links_get.apply(null, arguments); }
|
|
function dog_command_links_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = dog_command_links_getPrototypeOf(t));); return t; }
|
|
function dog_command_links_getPrototypeOf(t) { return dog_command_links_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, dog_command_links_getPrototypeOf(t); }
|
|
function dog_command_links_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && dog_command_links_setPrototypeOf(t, e); }
|
|
function dog_command_links_setPrototypeOf(t, e) { return dog_command_links_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, dog_command_links_setPrototypeOf(t, e); }
|
|
function dog_command_links_defineProperty(e, r, t) { return (r = dog_command_links_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function dog_command_links_toPropertyKey(t) { var i = dog_command_links_toPrimitive(t, "string"); return "symbol" == dog_command_links_typeof(i) ? i : i + ""; }
|
|
function dog_command_links_toPrimitive(t, r) { if ("object" != dog_command_links_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != dog_command_links_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PageDogDogCommandLinks = /*#__PURE__*/function (_TableBasePage) {
|
|
function PageDogDogCommandLinks(router) {
|
|
var _this;
|
|
dog_command_links_classCallCheck(this, PageDogDogCommandLinks);
|
|
_this = dog_command_links_callSuper(this, PageDogDogCommandLinks, [router]);
|
|
dog_command_links_defineProperty(_this, "callSaveTableContent", API.saveDogCommandLinks);
|
|
_this.dogMixin = new DogTableMixinPage(_this);
|
|
return _this;
|
|
}
|
|
dog_command_links_inherits(PageDogDogCommandLinks, _TableBasePage);
|
|
return dog_command_links_createClass(PageDogDogCommandLinks, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "hookupFilters",
|
|
value: function hookupFilters() {
|
|
this.sharedHookupFilters();
|
|
this.hookupFilterDog();
|
|
this.hookupFilterCommandCategory();
|
|
this.hookupFilterCommand();
|
|
this.hookupFilterActive();
|
|
}
|
|
}, {
|
|
key: "loadRowTable",
|
|
value: function loadRowTable(rowJson) {
|
|
if (rowJson == null) return;
|
|
if (_verbose) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("applying data row: ", rowJson);
|
|
}
|
|
}
|
|
}, {
|
|
key: "getJsonRow",
|
|
value: function getJsonRow(row) {
|
|
if (row == null) return;
|
|
var inputHandSignalDescription = row.querySelector('td.' + flagHandSignalDescription + ' textarea');
|
|
var inputNotes = row.querySelector('td.' + flagNotes + ' textarea');
|
|
var buttonActive = row.querySelector('td.' + flagActive + ' .' + flagActive);
|
|
var jsonRow = {};
|
|
jsonRow[attrIdDogCommandLink] = row.getAttribute(attrIdDogCommandLink);
|
|
jsonRow[attrIdDog] = this.getIdDogRow(row);
|
|
jsonRow[attrIdCommand] = this.getIdCommandRow(row);
|
|
jsonRow[flagHandSignalDescription] = DOM.getElementAttributeValueCurrent(inputHandSignalDescription);
|
|
jsonRow[flagNotes] = DOM.getElementAttributeValueCurrent(inputNotes);
|
|
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
|
return jsonRow;
|
|
}
|
|
}, {
|
|
key: "initialiseRowNew",
|
|
value: function initialiseRowNew(tbody, row) {}
|
|
}, {
|
|
key: "postInitialiseRowNewCallback",
|
|
value: function postInitialiseRowNewCallback(tbody) {
|
|
var newRows = tbody.querySelectorAll('tr.' + flagRowNew);
|
|
var newestRow = newRows[newRows.length - 1];
|
|
var clickableElementsSelector = ['td.' + flagDog + ' div.' + flagDog, ',td.' + flagCommandCategory + ' div.' + flagCommandCategory, ',td.' + flagCommand + ' div.' + flagCommand].join('');
|
|
newestRow.querySelectorAll(clickableElementsSelector).forEach(function (clickableElement) {
|
|
clickableElement.click();
|
|
});
|
|
}
|
|
}, {
|
|
key: "hookupTableMain",
|
|
value: function hookupTableMain() {
|
|
dog_command_links_superPropGet(PageDogDogCommandLinks, "hookupTableMain", this, 3)([]);
|
|
this.hookupFieldsDog();
|
|
this.hookupFieldsCommandCategory();
|
|
this.hookupFieldsCommand();
|
|
this.hookupTextareasHandSignalDescription();
|
|
this.hookupFieldsNotesTable();
|
|
this.hookupFieldsActive();
|
|
}
|
|
}, {
|
|
key: "hookupTextareasHandSignalDescription",
|
|
value: function hookupTextareasHandSignalDescription() {
|
|
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagHandSignalDescription + ' textarea');
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
dog_command_links_superPropGet(PageDogDogCommandLinks, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(TableBasePage);
|
|
dog_command_links_defineProperty(PageDogDogCommandLinks, "hash", hashPageDogDogCommandLinks);
|
|
dog_command_links_defineProperty(PageDogDogCommandLinks, "attrIdRowObject", attrIdDogCommandLink);
|
|
|
|
;// ./static/js/pages/legal/accessibility_report.js
|
|
function accessibility_report_typeof(o) { "@babel/helpers - typeof"; return accessibility_report_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, accessibility_report_typeof(o); }
|
|
function accessibility_report_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function accessibility_report_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, accessibility_report_toPropertyKey(o.key), o); } }
|
|
function accessibility_report_createClass(e, r, t) { return r && accessibility_report_defineProperties(e.prototype, r), t && accessibility_report_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function accessibility_report_callSuper(t, o, e) { return o = accessibility_report_getPrototypeOf(o), accessibility_report_possibleConstructorReturn(t, accessibility_report_isNativeReflectConstruct() ? Reflect.construct(o, e || [], accessibility_report_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function accessibility_report_possibleConstructorReturn(t, e) { if (e && ("object" == accessibility_report_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return accessibility_report_assertThisInitialized(t); }
|
|
function accessibility_report_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function accessibility_report_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (accessibility_report_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function accessibility_report_superPropGet(t, o, e, r) { var p = accessibility_report_get(accessibility_report_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function accessibility_report_get() { return accessibility_report_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = accessibility_report_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, accessibility_report_get.apply(null, arguments); }
|
|
function accessibility_report_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = accessibility_report_getPrototypeOf(t));); return t; }
|
|
function accessibility_report_getPrototypeOf(t) { return accessibility_report_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, accessibility_report_getPrototypeOf(t); }
|
|
function accessibility_report_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && accessibility_report_setPrototypeOf(t, e); }
|
|
function accessibility_report_setPrototypeOf(t, e) { return accessibility_report_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, accessibility_report_setPrototypeOf(t, e); }
|
|
function accessibility_report_defineProperty(e, r, t) { return (r = accessibility_report_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function accessibility_report_toPropertyKey(t) { var i = accessibility_report_toPrimitive(t, "string"); return "symbol" == accessibility_report_typeof(i) ? i : i + ""; }
|
|
function accessibility_report_toPrimitive(t, r) { if ("object" != accessibility_report_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != accessibility_report_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var PageAccessibilityReport = /*#__PURE__*/function (_BasePage) {
|
|
function PageAccessibilityReport(router) {
|
|
accessibility_report_classCallCheck(this, PageAccessibilityReport);
|
|
return accessibility_report_callSuper(this, PageAccessibilityReport, [router]);
|
|
}
|
|
accessibility_report_inherits(PageAccessibilityReport, _BasePage);
|
|
return accessibility_report_createClass(PageAccessibilityReport, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
accessibility_report_superPropGet(PageAccessibilityReport, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
accessibility_report_defineProperty(PageAccessibilityReport, "hash", hashPageAccessibilityReport);
|
|
|
|
;// ./static/js/pages/legal/accessibility_statement.js
|
|
function accessibility_statement_typeof(o) { "@babel/helpers - typeof"; return accessibility_statement_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, accessibility_statement_typeof(o); }
|
|
function accessibility_statement_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function accessibility_statement_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, accessibility_statement_toPropertyKey(o.key), o); } }
|
|
function accessibility_statement_createClass(e, r, t) { return r && accessibility_statement_defineProperties(e.prototype, r), t && accessibility_statement_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function accessibility_statement_callSuper(t, o, e) { return o = accessibility_statement_getPrototypeOf(o), accessibility_statement_possibleConstructorReturn(t, accessibility_statement_isNativeReflectConstruct() ? Reflect.construct(o, e || [], accessibility_statement_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function accessibility_statement_possibleConstructorReturn(t, e) { if (e && ("object" == accessibility_statement_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return accessibility_statement_assertThisInitialized(t); }
|
|
function accessibility_statement_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function accessibility_statement_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (accessibility_statement_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function accessibility_statement_superPropGet(t, o, e, r) { var p = accessibility_statement_get(accessibility_statement_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function accessibility_statement_get() { return accessibility_statement_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = accessibility_statement_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, accessibility_statement_get.apply(null, arguments); }
|
|
function accessibility_statement_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = accessibility_statement_getPrototypeOf(t));); return t; }
|
|
function accessibility_statement_getPrototypeOf(t) { return accessibility_statement_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, accessibility_statement_getPrototypeOf(t); }
|
|
function accessibility_statement_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && accessibility_statement_setPrototypeOf(t, e); }
|
|
function accessibility_statement_setPrototypeOf(t, e) { return accessibility_statement_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, accessibility_statement_setPrototypeOf(t, e); }
|
|
function accessibility_statement_defineProperty(e, r, t) { return (r = accessibility_statement_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function accessibility_statement_toPropertyKey(t) { var i = accessibility_statement_toPrimitive(t, "string"); return "symbol" == accessibility_statement_typeof(i) ? i : i + ""; }
|
|
function accessibility_statement_toPrimitive(t, r) { if ("object" != accessibility_statement_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != accessibility_statement_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var PageAccessibilityStatement = /*#__PURE__*/function (_BasePage) {
|
|
function PageAccessibilityStatement(router) {
|
|
accessibility_statement_classCallCheck(this, PageAccessibilityStatement);
|
|
return accessibility_statement_callSuper(this, PageAccessibilityStatement, [router]);
|
|
}
|
|
accessibility_statement_inherits(PageAccessibilityStatement, _BasePage);
|
|
return accessibility_statement_createClass(PageAccessibilityStatement, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
accessibility_statement_superPropGet(PageAccessibilityStatement, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
accessibility_statement_defineProperty(PageAccessibilityStatement, "hash", hashPageAccessibilityStatement);
|
|
|
|
;// ./static/js/pages/legal/license.js
|
|
function license_typeof(o) { "@babel/helpers - typeof"; return license_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, license_typeof(o); }
|
|
function license_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function license_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, license_toPropertyKey(o.key), o); } }
|
|
function license_createClass(e, r, t) { return r && license_defineProperties(e.prototype, r), t && license_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function license_callSuper(t, o, e) { return o = license_getPrototypeOf(o), license_possibleConstructorReturn(t, license_isNativeReflectConstruct() ? Reflect.construct(o, e || [], license_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function license_possibleConstructorReturn(t, e) { if (e && ("object" == license_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return license_assertThisInitialized(t); }
|
|
function license_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function license_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (license_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function license_superPropGet(t, o, e, r) { var p = license_get(license_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function license_get() { return license_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = license_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, license_get.apply(null, arguments); }
|
|
function license_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = license_getPrototypeOf(t));); return t; }
|
|
function license_getPrototypeOf(t) { return license_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, license_getPrototypeOf(t); }
|
|
function license_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && license_setPrototypeOf(t, e); }
|
|
function license_setPrototypeOf(t, e) { return license_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, license_setPrototypeOf(t, e); }
|
|
function license_defineProperty(e, r, t) { return (r = license_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function license_toPropertyKey(t) { var i = license_toPrimitive(t, "string"); return "symbol" == license_typeof(i) ? i : i + ""; }
|
|
function license_toPrimitive(t, r) { if ("object" != license_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != license_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var PageLicense = /*#__PURE__*/function (_BasePage) {
|
|
function PageLicense(router) {
|
|
license_classCallCheck(this, PageLicense);
|
|
return license_callSuper(this, PageLicense, [router]);
|
|
}
|
|
license_inherits(PageLicense, _BasePage);
|
|
return license_createClass(PageLicense, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
license_superPropGet(PageLicense, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
license_defineProperty(PageLicense, "hash", hashPageLicense);
|
|
|
|
;// ./static/js/pages/legal/privacy_policy.js
|
|
function privacy_policy_typeof(o) { "@babel/helpers - typeof"; return privacy_policy_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, privacy_policy_typeof(o); }
|
|
function privacy_policy_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function privacy_policy_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, privacy_policy_toPropertyKey(o.key), o); } }
|
|
function privacy_policy_createClass(e, r, t) { return r && privacy_policy_defineProperties(e.prototype, r), t && privacy_policy_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function privacy_policy_callSuper(t, o, e) { return o = privacy_policy_getPrototypeOf(o), privacy_policy_possibleConstructorReturn(t, privacy_policy_isNativeReflectConstruct() ? Reflect.construct(o, e || [], privacy_policy_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function privacy_policy_possibleConstructorReturn(t, e) { if (e && ("object" == privacy_policy_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return privacy_policy_assertThisInitialized(t); }
|
|
function privacy_policy_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function privacy_policy_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (privacy_policy_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function privacy_policy_superPropGet(t, o, e, r) { var p = privacy_policy_get(privacy_policy_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function privacy_policy_get() { return privacy_policy_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = privacy_policy_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, privacy_policy_get.apply(null, arguments); }
|
|
function privacy_policy_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = privacy_policy_getPrototypeOf(t));); return t; }
|
|
function privacy_policy_getPrototypeOf(t) { return privacy_policy_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, privacy_policy_getPrototypeOf(t); }
|
|
function privacy_policy_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && privacy_policy_setPrototypeOf(t, e); }
|
|
function privacy_policy_setPrototypeOf(t, e) { return privacy_policy_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, privacy_policy_setPrototypeOf(t, e); }
|
|
function privacy_policy_defineProperty(e, r, t) { return (r = privacy_policy_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function privacy_policy_toPropertyKey(t) { var i = privacy_policy_toPrimitive(t, "string"); return "symbol" == privacy_policy_typeof(i) ? i : i + ""; }
|
|
function privacy_policy_toPrimitive(t, r) { if ("object" != privacy_policy_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != privacy_policy_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var PagePrivacyPolicy = /*#__PURE__*/function (_BasePage) {
|
|
function PagePrivacyPolicy(router) {
|
|
privacy_policy_classCallCheck(this, PagePrivacyPolicy);
|
|
return privacy_policy_callSuper(this, PagePrivacyPolicy, [router]);
|
|
}
|
|
privacy_policy_inherits(PagePrivacyPolicy, _BasePage);
|
|
return privacy_policy_createClass(PagePrivacyPolicy, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
privacy_policy_superPropGet(PagePrivacyPolicy, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
privacy_policy_defineProperty(PagePrivacyPolicy, "hash", hashPagePrivacyPolicy);
|
|
|
|
;// ./static/js/pages/legal/retention_schedule.js
|
|
function retention_schedule_typeof(o) { "@babel/helpers - typeof"; return retention_schedule_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, retention_schedule_typeof(o); }
|
|
function retention_schedule_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function retention_schedule_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, retention_schedule_toPropertyKey(o.key), o); } }
|
|
function retention_schedule_createClass(e, r, t) { return r && retention_schedule_defineProperties(e.prototype, r), t && retention_schedule_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function retention_schedule_callSuper(t, o, e) { return o = retention_schedule_getPrototypeOf(o), retention_schedule_possibleConstructorReturn(t, retention_schedule_isNativeReflectConstruct() ? Reflect.construct(o, e || [], retention_schedule_getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
function retention_schedule_possibleConstructorReturn(t, e) { if (e && ("object" == retention_schedule_typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return retention_schedule_assertThisInitialized(t); }
|
|
function retention_schedule_assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
function retention_schedule_isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (retention_schedule_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
function retention_schedule_superPropGet(t, o, e, r) { var p = retention_schedule_get(retention_schedule_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
function retention_schedule_get() { return retention_schedule_get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = retention_schedule_superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, retention_schedule_get.apply(null, arguments); }
|
|
function retention_schedule_superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = retention_schedule_getPrototypeOf(t));); return t; }
|
|
function retention_schedule_getPrototypeOf(t) { return retention_schedule_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, retention_schedule_getPrototypeOf(t); }
|
|
function retention_schedule_inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && retention_schedule_setPrototypeOf(t, e); }
|
|
function retention_schedule_setPrototypeOf(t, e) { return retention_schedule_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, retention_schedule_setPrototypeOf(t, e); }
|
|
function retention_schedule_defineProperty(e, r, t) { return (r = retention_schedule_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
function retention_schedule_toPropertyKey(t) { var i = retention_schedule_toPrimitive(t, "string"); return "symbol" == retention_schedule_typeof(i) ? i : i + ""; }
|
|
function retention_schedule_toPrimitive(t, r) { if ("object" != retention_schedule_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != retention_schedule_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
var PageRetentionSchedule = /*#__PURE__*/function (_BasePage) {
|
|
function PageRetentionSchedule(router) {
|
|
retention_schedule_classCallCheck(this, PageRetentionSchedule);
|
|
return retention_schedule_callSuper(this, PageRetentionSchedule, [router]);
|
|
}
|
|
retention_schedule_inherits(PageRetentionSchedule, _BasePage);
|
|
return retention_schedule_createClass(PageRetentionSchedule, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.sharedInitialize();
|
|
}
|
|
}, {
|
|
key: "leave",
|
|
value: function leave() {
|
|
retention_schedule_superPropGet(PageRetentionSchedule, "leave", this, 3)([]);
|
|
}
|
|
}]);
|
|
}(BasePage);
|
|
retention_schedule_defineProperty(PageRetentionSchedule, "hash", hashPageDataRetentionSchedule);
|
|
|
|
;// ./static/js/router.js
|
|
function router_typeof(o) { "@babel/helpers - typeof"; return router_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, router_typeof(o); }
|
|
function router_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function router_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, router_toPropertyKey(o.key), o); } }
|
|
function router_createClass(e, r, t) { return r && router_defineProperties(e.prototype, r), t && router_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function router_toPropertyKey(t) { var i = router_toPrimitive(t, "string"); return "symbol" == router_typeof(i) ? i : i + ""; }
|
|
function router_toPrimitive(t, r) { if ("object" != router_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != router_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
// Pages
|
|
// Core
|
|
|
|
// Dog
|
|
|
|
|
|
|
|
|
|
// import PageDogDogs from './pages/dog/dogs.js';
|
|
// Legal
|
|
|
|
|
|
|
|
|
|
|
|
// User
|
|
// import PageUserLogin from './pages/user/login.js';
|
|
// import PageUserLogout from './pages/user/logout.js';
|
|
// import PageUserAccount from './pages/user/account.js';
|
|
|
|
|
|
|
|
|
|
var Router = /*#__PURE__*/function () {
|
|
function Router() {
|
|
var _this = this;
|
|
router_classCallCheck(this, Router);
|
|
// Pages
|
|
this.pages = {};
|
|
// Core
|
|
this.pages[hashPageHome] = {
|
|
name: 'PageHome',
|
|
module: PageHome
|
|
};
|
|
// Dog
|
|
this.pages[hashPageDogHome] = {
|
|
name: 'PageDogHome',
|
|
module: PageDogHome
|
|
};
|
|
this.pages[hashPageDogCommandCategories] = {
|
|
name: 'PageDogCommands',
|
|
module: PageDogCommandCategories
|
|
};
|
|
this.pages[hashPageDogCommands] = {
|
|
name: 'PageDogCommands',
|
|
module: PageDogCommands
|
|
};
|
|
this.pages[hashPageDogDogCommandLinks] = {
|
|
name: 'PageDogDogCommandLinks',
|
|
module: PageDogDogCommandLinks
|
|
};
|
|
// this.pages[hashPageDogDogs] = { name: 'PageDogDogs', module: PageDogDogs };
|
|
// Legal
|
|
this.pages[hashPageAccessibilityStatement] = {
|
|
name: 'PageAccessibilityStatement',
|
|
module: PageAccessibilityStatement
|
|
};
|
|
this.pages[hashPageDataRetentionSchedule] = {
|
|
name: 'PageDataRetentionSchedule',
|
|
module: PageRetentionSchedule
|
|
};
|
|
this.pages[hashPageLicense] = {
|
|
name: 'PageLicense',
|
|
module: PageLicense
|
|
};
|
|
this.pages[hashPagePrivacyPolicy] = {
|
|
name: 'PagePrivacyPolicy',
|
|
module: PagePrivacyPolicy
|
|
};
|
|
// User
|
|
// this.pages[hashPageUserLogin] = { name: 'PageUserLogin', module: PageUserLogin }; // pathModule: './pages/user/login.js' };
|
|
// this.pages[hashPageUserLogout] = { name: 'PageUserLogout', module: PageUserLogout }; // pathModule: './pages/user/logout.js' };
|
|
// this.pages[hashPageUserAccount] = { name: 'PageUserAccount', module: PageUserAccount }; // pathModule: './pages/user/account.js' };
|
|
// Routes
|
|
this.routes = {};
|
|
// Core
|
|
this.routes[hashPageHome] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageHome, isPopState);
|
|
};
|
|
// Dog
|
|
this.routes[hashPageDogHome] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageDogHome, isPopState);
|
|
};
|
|
this.routes[hashPageDogCommandCategories] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageDogCommandCategories, isPopState);
|
|
};
|
|
this.routes[hashPageDogCommands] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageDogCommands, isPopState);
|
|
};
|
|
this.routes[hashPageDogDogCommandLinks] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageDogDogCommandLinks, isPopState);
|
|
};
|
|
// this.routes[hashPageDogDogs] = (isPopState = false) => this.navigateToHash(hashPageDogDogs, isPopState);
|
|
// Legal
|
|
this.routes[hashPageAccessibilityStatement] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageAccessibilityStatement, isPopState);
|
|
};
|
|
this.routes[hashPageDataRetentionSchedule] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageDataRetentionSchedule, isPopState);
|
|
};
|
|
this.routes[hashPageLicense] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPageLicense, isPopState);
|
|
};
|
|
this.routes[hashPagePrivacyPolicy] = function () {
|
|
var isPopState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
return _this.navigateToHash(hashPagePrivacyPolicy, isPopState);
|
|
};
|
|
// User
|
|
// this.routes[hashPageUserLogin] = (isPopState = false) => this.navigateToHash(hashPageUserLogin, isPopState);
|
|
// this.routes[hashPageUserLogout] = (isPopState = false) => this.navigateToHash(hashPageUserLogout, isPopState);
|
|
// this.routes[hashPageUserAccount] = (isPopState = false) => this.navigateToHash(hashPageUserAccount, isPopState);
|
|
this.initialize();
|
|
}
|
|
return router_createClass(Router, [{
|
|
key: "loadPage",
|
|
value: function loadPage(hashPage) {
|
|
var _this2 = this;
|
|
var isPopState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
var PageClass = this.getClassPageFromHash(hashPage);
|
|
this.currentPage = new PageClass(this);
|
|
this.currentPage.initialize(isPopState);
|
|
window.addEventListener('beforeunload', function () {
|
|
return _this2.currentPage.leave();
|
|
});
|
|
}
|
|
}, {
|
|
key: "getClassPageFromHash",
|
|
value: function getClassPageFromHash(hashPage) {
|
|
var pageJson = this.pages[hashPage];
|
|
try {
|
|
var module = pageJson.module;
|
|
return module;
|
|
} catch (error) {
|
|
utils_Utils.consoleLogIfNotProductionEnvironment("this.pages: ", this.pages);
|
|
console.error('Page not found:', hashPage);
|
|
throw error;
|
|
}
|
|
}
|
|
}, {
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
window.addEventListener('popstate', this.handlePopState.bind(this));
|
|
}
|
|
}, {
|
|
key: "handlePopState",
|
|
value: function handlePopState(event) {
|
|
this.loadPageCurrent();
|
|
}
|
|
}, {
|
|
key: "loadPageCurrent",
|
|
value: function loadPageCurrent() {
|
|
var hashPageCurrent = DOM.getHashPageCurrent();
|
|
this.loadPage(hashPageCurrent);
|
|
}
|
|
}, {
|
|
key: "navigateToHash",
|
|
value: function navigateToHash(hash) {
|
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
var isPopState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
var url = API.getUrlFromHash(hash, params);
|
|
history.pushState({
|
|
data: data,
|
|
params: params
|
|
}, '', hash);
|
|
API.goToUrl(url, data);
|
|
}
|
|
}, {
|
|
key: "navigateToUrl",
|
|
value: function navigateToUrl(url) {
|
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
var appendHistory = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
// this.beforeLeave();
|
|
if (appendHistory) history.pushState(data, '', url);
|
|
url = API.parameteriseUrl(url, data);
|
|
API.goToUrl(url);
|
|
}
|
|
}], [{
|
|
key: "loadPageBodyFromResponse",
|
|
value: function loadPageBodyFromResponse(response) {
|
|
DOM.loadPageBody(response.data);
|
|
}
|
|
}]);
|
|
}();
|
|
|
|
var router = new Router();
|
|
;// ./static/js/app.js
|
|
|
|
|
|
function app_typeof(o) { "@babel/helpers - typeof"; return app_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, app_typeof(o); }
|
|
function app_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
function app_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, app_toPropertyKey(o.key), o); } }
|
|
function app_createClass(e, r, t) { return r && app_defineProperties(e.prototype, r), t && app_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
function app_toPropertyKey(t) { var i = app_toPrimitive(t, "string"); return "symbol" == app_typeof(i) ? i : i + ""; }
|
|
function app_toPrimitive(t, r) { if ("object" != app_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != app_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
|
|
|
|
var App = /*#__PURE__*/function () {
|
|
function App() {
|
|
app_classCallCheck(this, App);
|
|
this.dom = new DOM();
|
|
this.router = new Router();
|
|
}
|
|
return app_createClass(App, [{
|
|
key: "initialize",
|
|
value: function initialize() {
|
|
this.setupEventListeners();
|
|
this.start();
|
|
}
|
|
}, {
|
|
key: "setupEventListeners",
|
|
value: function setupEventListeners() {
|
|
// document.addEventListener('click', this.handleGlobalClick.bind(this));
|
|
}
|
|
}, {
|
|
key: "handleGlobalClick",
|
|
value: function handleGlobalClick(event) {}
|
|
}, {
|
|
key: "start",
|
|
value: function start() {
|
|
this.initPageCurrent();
|
|
}
|
|
}, {
|
|
key: "initPageCurrent",
|
|
value: function initPageCurrent() {
|
|
this.router.loadPageCurrent();
|
|
}
|
|
}]);
|
|
}();
|
|
var app = new App();
|
|
function domReady(fn) {
|
|
if (document.readyState !== 'loading') {
|
|
fn();
|
|
} else {
|
|
document.addEventListener('DOMContentLoaded', fn);
|
|
}
|
|
}
|
|
domReady(function () {
|
|
app.initialize();
|
|
});
|
|
window.app = app;
|
|
/* harmony default export */ const js_app = ((/* unused pure expression or super */ null && (app)));
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
(() => {
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
})();
|
|
|
|
/******/ })()
|
|
;
|
|
//# sourceMappingURL=main.bundle.js.map
|