@iamproperty/components 2.7.6 → 2.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/js/main.js +11 -0
- package/assets/js/modules/chart.js +217 -0
- package/assets/js/modules/helpers.js +40 -14
- package/assets/js/modules/table.js +89 -89
- package/assets/js/scripts.bundle.js +69 -55
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +2 -2
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/sass/components/tabs.scss +18 -5
- package/assets/sass/elements/panel.scss +1 -1
- package/assets/sass/foundations/icons.scss +3 -2
- package/assets/sass/foundations/reboot.scss +1 -0
- package/assets/svg/icons.svg +483 -0
- package/dist/components.common.js +102 -75
- package/dist/components.common.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/components.umd.js +102 -75
- package/dist/components.umd.js.map +1 -1
- package/dist/components.umd.min.js +1 -1
- package/dist/components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Chart/Chart.vue +8 -165
- package/src/components/Tabs/Tabs.vue +1 -1
- package/src/elements/Table/Table.vue +22 -9
package/dist/components.umd.js
CHANGED
|
@@ -431,13 +431,13 @@ var Logo_component = normalizeComponent(
|
|
|
431
431
|
)
|
|
432
432
|
|
|
433
433
|
/* harmony default export */ var Logo = (Logo_component.exports);
|
|
434
|
-
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"250299fd-vue-loader-template"}!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/elements/Table/Table.vue?vue&type=template&id=
|
|
435
|
-
var
|
|
434
|
+
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"250299fd-vue-loader-template"}!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/elements/Table/Table.vue?vue&type=template&id=d7356792&
|
|
435
|
+
var Tablevue_type_template_id_d7356792_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"wrapper",staticClass:"table__wrapper",attrs:{"data-sortby":_vm.sortby,"data-sort":_vm.sort,"data-show":_vm.show,"data-page":_vm.page,"data-reorder":_vm.reorder}},[_c('table',[(_vm.fields)?_c('thead',[_c('tr',{class:_vm.headingclass},_vm._l((_vm.fields),function(field){return _c('th',{key:field.key,attrs:{"data-sortable":field.sortable,"data-filterable":field.filterable}},[_vm._v(_vm._s(_vm.cellHeading(field.key)))])}),0)]):_vm._e(),(_vm.items)?_c('tbody',_vm._l((_vm.items),function(value,index){return _c('tr',{key:index,attrs:{"data-row-id":value['rowid']}},_vm._l((Object.fromEntries(Object.entries(value).filter(function (ref) {
|
|
436
436
|
var key = ref[0];
|
|
437
437
|
|
|
438
438
|
return key !== 'rowid';
|
|
439
439
|
}))),function(cellValue,cellIndex){return _c('td',{key:cellIndex,attrs:{"data-label":_vm.cellHeading(cellIndex),"data-numeric":_vm.numericValue(cellValue)},domProps:{"innerHTML":_vm._s(cellValue)}})}),0)}),0):_vm._e()]),_vm._t("default")],2)}
|
|
440
|
-
var
|
|
440
|
+
var Tablevue_type_template_id_d7356792_staticRenderFns = []
|
|
441
441
|
|
|
442
442
|
|
|
443
443
|
;// CONCATENATED MODULE: ./src/helpers/strings.js
|
|
@@ -470,12 +470,25 @@ var addBodyClasses = body => {
|
|
|
470
470
|
|
|
471
471
|
return null;
|
|
472
472
|
};
|
|
473
|
+
/**
|
|
474
|
+
* Add global events.
|
|
475
|
+
* @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.
|
|
476
|
+
*/
|
|
477
|
+
|
|
478
|
+
var addGlobalEvents = body => {
|
|
479
|
+
window.addEventListener('hashchange', function () {
|
|
480
|
+
var hash = location.hash.replace('#', '');
|
|
481
|
+
var label = document.querySelector("label[for=\"".concat(hash, "\"]"));
|
|
482
|
+
var detail = document.querySelector("details[id=\"".concat(hash, "\"]:not([open])"));
|
|
483
|
+
if (label) label.click();else if (detail) detail.setAttribute('open', 'open');
|
|
484
|
+
}, false);
|
|
485
|
+
return null;
|
|
486
|
+
};
|
|
473
487
|
/**
|
|
474
488
|
* Check if an element contains certain elements that needs enhancing with the JavaScript helpers, it is recommended to do this on the page body after the dom is loaded. Elements that are loaded via ajax should also run this function.
|
|
475
489
|
* @param {HTMLElement} element Dom element, this doesn't have to be the body but it is recommended.
|
|
476
490
|
*/
|
|
477
491
|
|
|
478
|
-
|
|
479
492
|
var checkElements = element => {
|
|
480
493
|
// Tables
|
|
481
494
|
Array.from(element.querySelectorAll('table')).forEach((table, index) => {
|
|
@@ -488,7 +501,6 @@ var checkElements = element => {
|
|
|
488
501
|
* @param {HTMLElement} table Dom table element
|
|
489
502
|
*/
|
|
490
503
|
|
|
491
|
-
|
|
492
504
|
var tableWrap = table => {
|
|
493
505
|
if (!table.parentNode.classList.contains('table__wrapper')) {
|
|
494
506
|
var tableHTML = table.outerHTML;
|
|
@@ -500,7 +512,6 @@ var tableWrap = table => {
|
|
|
500
512
|
* @param {HTMLElement} table Dom table element
|
|
501
513
|
*/
|
|
502
514
|
|
|
503
|
-
|
|
504
515
|
var tableStacked = table => {
|
|
505
516
|
var colHeadings = Array.from(table.querySelectorAll('thead th'));
|
|
506
517
|
var colRows = Array.from(table.querySelectorAll('tbody tr'));
|
|
@@ -518,17 +529,23 @@ var tableStacked = table => {
|
|
|
518
529
|
});
|
|
519
530
|
});
|
|
520
531
|
};
|
|
521
|
-
|
|
522
532
|
var isNumeric = function isNumeric(str) {
|
|
523
533
|
if (typeof str != "string") return false; // we only process strings!
|
|
524
534
|
|
|
525
535
|
return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
|
|
526
536
|
!isNaN(parseFloat(str)); // ...and ensure strings of whitespace fail
|
|
527
537
|
};
|
|
528
|
-
|
|
529
538
|
var zeroPad = (num, places) => String(num).padStart(places, '0');
|
|
530
|
-
|
|
531
|
-
|
|
539
|
+
var helpers_ucfirst = str => str.charAt(0).toUpperCase() + str.slice(1);
|
|
540
|
+
var helpers_ucwords = str => str.split(' ').map(s => helpers_ucfirst(s)).join(' ');
|
|
541
|
+
var helpers_unsnake = str => str.replace(/_/g, ' ');
|
|
542
|
+
var helpers_snake = str => str.replace(/ /g, '_');
|
|
543
|
+
var helpers_safeID = function safeID(str) {
|
|
544
|
+
str = str.toLowerCase();
|
|
545
|
+
str = helpers_snake(str);
|
|
546
|
+
str = str.replace(/\W/g, '');
|
|
547
|
+
return str;
|
|
548
|
+
};
|
|
532
549
|
;// CONCATENATED MODULE: ./assets/js/modules/table.js
|
|
533
550
|
|
|
534
551
|
|
|
@@ -540,7 +557,7 @@ function table(tableElement) {
|
|
|
540
557
|
var sortedEvent = new Event('sorted');
|
|
541
558
|
var filteredEvent = new Event('filtered');
|
|
542
559
|
var reorderedEvent = new Event('reordered');
|
|
543
|
-
var randID = '
|
|
560
|
+
var randID = 'table_' + Math.random().toString(36).substr(2, 9); // Random to make sure IDs created are unique
|
|
544
561
|
|
|
545
562
|
var draggedRow;
|
|
546
563
|
tableElement.setAttribute('id', randID); // #region Sortable
|
|
@@ -726,47 +743,6 @@ function table(tableElement) {
|
|
|
726
743
|
var stopShowing = show * page;
|
|
727
744
|
style.innerHTML = "\n #".concat(randID, " tbody tr {\n display: none;\n }\n #").concat(randID, " tbody tr:nth-child(").concat(startShowing, "),\n #").concat(randID, " tbody tr:nth-child(").concat(startShowing, ") ~ tr{\n display: block;\n }\n @media screen and (min-width: 36em) {\n #").concat(randID, " tbody tr:nth-child(").concat(startShowing, "),\n #").concat(randID, " tbody tr:nth-child(").concat(startShowing, ") ~ tr{\n display: table-row;\n }\n }\n #").concat(randID, " tbody tr:nth-child(").concat(stopShowing, ") ~ tr{\n display: none;\n }\n ");
|
|
728
745
|
tableElement.append(style);
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
var createPaginationForm = function createPaginationForm(show, page, totalRows) {
|
|
732
|
-
var form = document.createElement("div");
|
|
733
|
-
form.classList.add('table__pagination');
|
|
734
|
-
form.classList.add('row');
|
|
735
|
-
form.classList.add('pt-3');
|
|
736
|
-
form.classList.add('pb-3'); // Create the form and create a container div to hold the pagination buttons
|
|
737
|
-
|
|
738
|
-
form.innerHTML = "<div class=\"col mw-fit-content mb-3\">\n <div class=\"form-control__wrapper form-control-inline mb-0\">\n <label for=\"".concat(randID, "_showing\" class=\"form-label\">Showing:</label>\n <input type=\"number\" name=\"").concat(randID, "_showing\" id=\"").concat(randID, "_showing\" class=\"form-control form-control-sm showing-input-field\" placeholder=\"\" list=\"").concat(randID, "_pagination\" value=\"").concat(show, "\" min=\"1\" max=\"").concat(totalRows, "\" />\n </div>\n <datalist id=\"").concat(randID, "_pagination\">\n <option value=\"5\">5</option>\n ").concat(totalRows > 10 ? "<option value=\"10\">10</option>" : '', "\n ").concat(totalRows > 20 ? "<option value=\"20\">20</option>" : '', "\n <option value=\"").concat(totalRows, "\">").concat(totalRows, "</option>\n </datalist>\n</div>\n<div class=\"col mw-fit-content me-auto d-flex align-items-center mb-3\"><span class=\"label\">per page</span></div>\n<div class=\"col mw-fit-content d-sm-flex justify-content-end align-items-center\" id=\"").concat(randID, "_paginationBtns\"></div>"); // Add after the actual table
|
|
739
|
-
|
|
740
|
-
tableElement.append(form);
|
|
741
|
-
};
|
|
742
|
-
|
|
743
|
-
var createPaginationButttons = function createPaginationButttons(show, page, totalRows) {
|
|
744
|
-
var paginationButtonsWrapper = document.getElementById(randID + '_paginationBtns');
|
|
745
|
-
if (paginationButtonsWrapper == null) return false;
|
|
746
|
-
var numberPages = Math.ceil(totalRows / show);
|
|
747
|
-
|
|
748
|
-
if (numberPages == 1) {
|
|
749
|
-
// Remore the buttons or dont display any if we dont need them
|
|
750
|
-
paginationButtonsWrapper.innerHTML = '';
|
|
751
|
-
} else if (numberPages < 5) {
|
|
752
|
-
// If less than 5 pages (which fits comfortably on mobile) we display buttons
|
|
753
|
-
var strButtons = '';
|
|
754
|
-
|
|
755
|
-
for (var i = 1; i <= numberPages; i++) {
|
|
756
|
-
if (i == page) strButtons += "<li class=\"page-item active\" aria-current=\"page\"><span class=\"page-link\">".concat(i, "</span></li>");else strButtons += "<li class=\"page-item\"><button class=\"page-link\" data-page=\"".concat(i, "\">").concat(i, "</button></li>");
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
paginationButtonsWrapper.innerHTML = "<span class=\"pe-2 mb-3\">Page: </span><ul class=\"pagination mb-3\">\n ".concat(page == 1 ? "<li class=\"page-item disabled\"><span class=\"page-link\">Previous</span></li>" : "<li class=\"page-item\"><button class=\"page-link\" data-page=\"".concat(parseInt(page) - 1, "\">Previous</button></li>"), "\n ").concat(strButtons, "\n ").concat(page == numberPages ? "<li class=\"page-item disabled\"><span class=\"page-link\">Next</span></li>" : "<li class=\"page-item\"><button class=\"page-link\" data-page=\"".concat(parseInt(page) + 1, "\">Next</button></li>"), "\n </ul>");
|
|
760
|
-
} else {
|
|
761
|
-
// If more than 5 lets show a select field instead so that we dont have loads and loads of buttons
|
|
762
|
-
var strOptions = '';
|
|
763
|
-
|
|
764
|
-
for (var _i = 1; _i <= numberPages; _i++) {
|
|
765
|
-
if (_i == page) strOptions += "<option value=\"".concat(_i, "\" selected>Page ").concat(_i, "</option>");else strOptions += "<option value=\"".concat(_i, "\">Page ").concat(_i, "</option>");
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
paginationButtonsWrapper.innerHTML = "\n<div class=\"form-control__wrapper page-number mb-2\">\n<select class=\"form-select\">\n ".concat(strOptions, "\n</select>\n</div>\n ");
|
|
769
|
-
}
|
|
770
746
|
}; // On page load check if the table should be paginated
|
|
771
747
|
|
|
772
748
|
|
|
@@ -777,13 +753,13 @@ function table(tableElement) {
|
|
|
777
753
|
|
|
778
754
|
if (show < totalRows) {
|
|
779
755
|
paginateRows(show, page);
|
|
780
|
-
createPaginationForm(show, page, totalRows);
|
|
781
|
-
createPaginationButttons(show, page, totalRows);
|
|
756
|
+
createPaginationForm(randID, tableElement, show, page, totalRows);
|
|
757
|
+
createPaginationButttons(randID, tableElement, show, page, totalRows);
|
|
782
758
|
tableElement.addEventListener('change', function (e) {
|
|
783
759
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
784
760
|
if (target.matches('.table__pagination input[type="number"]')) {
|
|
785
761
|
paginateRows(target.value, page);
|
|
786
|
-
createPaginationButttons(target.value, page, totalRows);
|
|
762
|
+
createPaginationButttons(randID, tableElement, target.value, page, totalRows);
|
|
787
763
|
tableElement.setAttribute('data-show', target.value);
|
|
788
764
|
}
|
|
789
765
|
}
|
|
@@ -792,7 +768,7 @@ function table(tableElement) {
|
|
|
792
768
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
793
769
|
if (target.matches('.page-item:not(.active):not(.disabled) .page-link')) {
|
|
794
770
|
paginateRows(tableElement.getAttribute('data-show'), target.getAttribute('data-page'));
|
|
795
|
-
createPaginationButttons(tableElement.getAttribute('data-show'), target.getAttribute('data-page'), totalRows);
|
|
771
|
+
createPaginationButttons(randID, tableElement, tableElement.getAttribute('data-show'), target.getAttribute('data-page'), totalRows);
|
|
796
772
|
}
|
|
797
773
|
}
|
|
798
774
|
}, false);
|
|
@@ -800,7 +776,7 @@ function table(tableElement) {
|
|
|
800
776
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
801
777
|
if (target.matches('.table__pagination select')) {
|
|
802
778
|
paginateRows(tableElement.getAttribute('data-show'), target.value);
|
|
803
|
-
createPaginationButttons(tableElement.getAttribute('data-show'), target.value, totalRows);
|
|
779
|
+
createPaginationButttons(randID, tableElement, tableElement.getAttribute('data-show'), target.value, totalRows);
|
|
804
780
|
}
|
|
805
781
|
}
|
|
806
782
|
});
|
|
@@ -926,8 +902,8 @@ function table(tableElement) {
|
|
|
926
902
|
|
|
927
903
|
if (_show < _totalRows) {
|
|
928
904
|
paginateRows(_show, 1);
|
|
929
|
-
createPaginationForm(_show, 1, _totalRows);
|
|
930
|
-
createPaginationButttons(_show, 1, _totalRows);
|
|
905
|
+
createPaginationForm(randID, tableElement, _show, 1, _totalRows);
|
|
906
|
+
createPaginationButttons(randID, tableElement, _show, 1, _totalRows);
|
|
931
907
|
}
|
|
932
908
|
}
|
|
933
909
|
|
|
@@ -951,6 +927,45 @@ function table(tableElement) {
|
|
|
951
927
|
}, false);
|
|
952
928
|
}
|
|
953
929
|
|
|
930
|
+
var createPaginationForm = function createPaginationForm(randID, tableElement, show, page, totalRows) {
|
|
931
|
+
var form = document.createElement("div");
|
|
932
|
+
form.classList.add('table__pagination');
|
|
933
|
+
form.classList.add('row');
|
|
934
|
+
form.classList.add('pt-3');
|
|
935
|
+
form.classList.add('pb-3'); // Create the form and create a container div to hold the pagination buttons
|
|
936
|
+
|
|
937
|
+
form.innerHTML = "<div class=\"col mw-fit-content mb-3\">\n<div class=\"form-control__wrapper form-control-inline mb-0\">\n <label for=\"".concat(randID, "_showing\" class=\"form-label\">Showing:</label>\n <input type=\"number\" name=\"").concat(randID, "_showing\" id=\"").concat(randID, "_showing\" class=\"form-control form-control-sm showing-input-field\" placeholder=\"\" list=\"").concat(randID, "_pagination\" value=\"").concat(show, "\" min=\"1\" max=\"").concat(totalRows, "\" />\n</div>\n<datalist id=\"").concat(randID, "_pagination\">\n<option value=\"5\">5</option>\n").concat(totalRows > 10 ? "<option value=\"10\">10</option>" : '', "\n").concat(totalRows > 20 ? "<option value=\"20\">20</option>" : '', "\n<option value=\"").concat(totalRows, "\">").concat(totalRows, "</option>\n</datalist>\n</div>\n<div class=\"col mw-fit-content me-auto d-flex align-items-center mb-3\"><span class=\"label\">per page</span></div>\n<div class=\"col mw-fit-content d-sm-flex justify-content-end align-items-center\" id=\"").concat(randID, "_paginationBtns\"></div>"); // Add after the actual table
|
|
938
|
+
|
|
939
|
+
tableElement.append(form);
|
|
940
|
+
};
|
|
941
|
+
var createPaginationButttons = function createPaginationButttons(randID, tableElement, show, page, totalRows) {
|
|
942
|
+
var paginationButtonsWrapper = document.getElementById(randID + '_paginationBtns');
|
|
943
|
+
if (paginationButtonsWrapper == null) return false;
|
|
944
|
+
var numberPages = Math.ceil(totalRows / show);
|
|
945
|
+
|
|
946
|
+
if (numberPages == 1) {
|
|
947
|
+
// Remore the buttons or dont display any if we dont need them
|
|
948
|
+
paginationButtonsWrapper.innerHTML = '';
|
|
949
|
+
} else if (numberPages < 5) {
|
|
950
|
+
// If less than 5 pages (which fits comfortably on mobile) we display buttons
|
|
951
|
+
var strButtons = '';
|
|
952
|
+
|
|
953
|
+
for (var i = 1; i <= numberPages; i++) {
|
|
954
|
+
if (i == page) strButtons += "<li class=\"page-item active\" aria-current=\"page\"><span class=\"page-link\">".concat(i, "</span></li>");else strButtons += "<li class=\"page-item\"><button class=\"page-link\" data-page=\"".concat(i, "\">").concat(i, "</button></li>");
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
paginationButtonsWrapper.innerHTML = "<span class=\"pe-2 mb-3\">Page: </span><ul class=\"pagination mb-3\">\n ".concat(page == 1 ? "<li class=\"page-item disabled\"><span class=\"page-link\">Previous</span></li>" : "<li class=\"page-item\"><button class=\"page-link\" data-page=\"".concat(parseInt(page) - 1, "\">Previous</button></li>"), "\n ").concat(strButtons, "\n ").concat(page == numberPages ? "<li class=\"page-item disabled\"><span class=\"page-link\">Next</span></li>" : "<li class=\"page-item\"><button class=\"page-link\" data-page=\"".concat(parseInt(page) + 1, "\">Next</button></li>"), "\n </ul>");
|
|
958
|
+
} else {
|
|
959
|
+
// If more than 5 lets show a select field instead so that we dont have loads and loads of buttons
|
|
960
|
+
var strOptions = '';
|
|
961
|
+
|
|
962
|
+
for (var _i = 1; _i <= numberPages; _i++) {
|
|
963
|
+
if (_i == page) strOptions += "<option value=\"".concat(_i, "\" selected>Page ").concat(_i, "</option>");else strOptions += "<option value=\"".concat(_i, "\">Page ").concat(_i, "</option>");
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
paginationButtonsWrapper.innerHTML = "\n<div class=\"form-control__wrapper page-number mb-2\">\n<select class=\"form-select\">\n".concat(strOptions, "\n</select>\n</div>\n ");
|
|
967
|
+
}
|
|
968
|
+
};
|
|
954
969
|
/* harmony default export */ var modules_table = (table);
|
|
955
970
|
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-82[0].rules[0].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/elements/Table/Table.vue?vue&type=script&lang=js&
|
|
956
971
|
//
|
|
@@ -973,6 +988,19 @@ function table(tableElement) {
|
|
|
973
988
|
//
|
|
974
989
|
|
|
975
990
|
|
|
991
|
+
|
|
992
|
+
var numericValue = function numericValue(value) {
|
|
993
|
+
console.log(value);
|
|
994
|
+
value = value.replace('£', '');
|
|
995
|
+
value = value.replace('%', '');
|
|
996
|
+
|
|
997
|
+
if (Number.isNaN(Number.parseFloat(value))) {
|
|
998
|
+
return 0;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
return Number.parseFloat(value);
|
|
1002
|
+
};
|
|
1003
|
+
|
|
976
1004
|
/* harmony default export */ var Tablevue_type_script_lang_js_ = ({
|
|
977
1005
|
name: 'Table',
|
|
978
1006
|
props: {
|
|
@@ -1018,14 +1046,8 @@ function table(tableElement) {
|
|
|
1018
1046
|
|
|
1019
1047
|
numericValue() {
|
|
1020
1048
|
return value => {
|
|
1021
|
-
value = value
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
if (Number.isNaN(Number.parseFloat(value))) {
|
|
1025
|
-
return 0;
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
return Number.parseFloat(value);
|
|
1049
|
+
value = numericValue(value);
|
|
1050
|
+
return value;
|
|
1029
1051
|
};
|
|
1030
1052
|
}
|
|
1031
1053
|
|
|
@@ -1050,7 +1072,12 @@ function table(tableElement) {
|
|
|
1050
1072
|
var tbody = this.$refs.wrapper.querySelector('tbody');
|
|
1051
1073
|
var tbodyHTML = '';
|
|
1052
1074
|
this.items.forEach((row, index) => {
|
|
1053
|
-
|
|
1075
|
+
var rowID = row['rowid'] ? row['rowid'] : '';
|
|
1076
|
+
row = Object.fromEntries(Object.entries(row).filter(_ref => {
|
|
1077
|
+
var [key] = _ref;
|
|
1078
|
+
return key !== 'rowid';
|
|
1079
|
+
}));
|
|
1080
|
+
tbodyHTML += "<tr data-row-id=\"".concat(rowID, "\">").concat(Object.keys(row).map(col => "<td data-label=\"".concat(ucfirst(unsnake(col)), "\" data-numeric=\"").concat(numericValue(row[col]), "\">").concat(row[col], "</td>")).join(""), "</tr>");
|
|
1054
1081
|
});
|
|
1055
1082
|
tbody.innerHTML = tbodyHTML; // Tell the framework that the table has been filtered so that it can re-sort it etc
|
|
1056
1083
|
|
|
@@ -1072,8 +1099,8 @@ function table(tableElement) {
|
|
|
1072
1099
|
;
|
|
1073
1100
|
var Table_component = normalizeComponent(
|
|
1074
1101
|
Table_Tablevue_type_script_lang_js_,
|
|
1075
|
-
|
|
1076
|
-
|
|
1102
|
+
Tablevue_type_template_id_d7356792_render,
|
|
1103
|
+
Tablevue_type_template_id_d7356792_staticRenderFns,
|
|
1077
1104
|
false,
|
|
1078
1105
|
null,
|
|
1079
1106
|
null,
|
|
@@ -3316,9 +3343,9 @@ var Step_component = normalizeComponent(
|
|
|
3316
3343
|
)
|
|
3317
3344
|
|
|
3318
3345
|
/* harmony default export */ var Step = (Step_component.exports);
|
|
3319
|
-
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"250299fd-vue-loader-template"}!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Tabs/Tabs.vue?vue&type=template&id=
|
|
3320
|
-
var
|
|
3321
|
-
var
|
|
3346
|
+
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"250299fd-vue-loader-template"}!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Tabs/Tabs.vue?vue&type=template&id=8b015576&
|
|
3347
|
+
var Tabsvue_type_template_id_8b015576_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"wrapper",staticClass:"container tabs__container"},[_vm._l((_vm.tabLinks()),function(value,index){return _c('input',{key:index,staticClass:"tab__input",attrs:{"type":"radio","name":value.name,"id":value.id},domProps:{"checked":index == 0? 'checked':''}})}),_c('div',{staticClass:"tabs__links"},_vm._l((_vm.tabLinks()),function(value,index){return _c('label',{key:index,staticClass:"link",attrs:{"for":value.id},on:{"click":function($event){return _vm.openTab(index)}}},[_vm._v(" "+_vm._s(value.tabTitle)+" ")])}),0),_c('div',{staticClass:"tabs"},[_vm._t("default")],2)],2)}
|
|
3348
|
+
var Tabsvue_type_template_id_8b015576_staticRenderFns = []
|
|
3322
3349
|
|
|
3323
3350
|
|
|
3324
3351
|
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-82[0].rules[0].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Tabs/Tabs.vue?vue&type=script&lang=js&
|
|
@@ -3409,8 +3436,8 @@ var Tabsvue_type_template_id_a94687de_staticRenderFns = []
|
|
|
3409
3436
|
|
|
3410
3437
|
var Tabs_component = normalizeComponent(
|
|
3411
3438
|
Tabs_Tabsvue_type_script_lang_js_,
|
|
3412
|
-
|
|
3413
|
-
|
|
3439
|
+
Tabsvue_type_template_id_8b015576_render,
|
|
3440
|
+
Tabsvue_type_template_id_8b015576_staticRenderFns,
|
|
3414
3441
|
false,
|
|
3415
3442
|
null,
|
|
3416
3443
|
null,
|