@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
|
@@ -421,13 +421,13 @@ var Logo_component = normalizeComponent(
|
|
|
421
421
|
)
|
|
422
422
|
|
|
423
423
|
/* harmony default export */ var Logo = (Logo_component.exports);
|
|
424
|
-
;// 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=
|
|
425
|
-
var
|
|
424
|
+
;// 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&
|
|
425
|
+
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) {
|
|
426
426
|
var key = ref[0];
|
|
427
427
|
|
|
428
428
|
return key !== 'rowid';
|
|
429
429
|
}))),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)}
|
|
430
|
-
var
|
|
430
|
+
var Tablevue_type_template_id_d7356792_staticRenderFns = []
|
|
431
431
|
|
|
432
432
|
|
|
433
433
|
;// CONCATENATED MODULE: ./src/helpers/strings.js
|
|
@@ -460,12 +460,25 @@ var addBodyClasses = body => {
|
|
|
460
460
|
|
|
461
461
|
return null;
|
|
462
462
|
};
|
|
463
|
+
/**
|
|
464
|
+
* Add global events.
|
|
465
|
+
* @param {HTMLElement} body Dom element, this doesn't have to be the body but it is recommended.
|
|
466
|
+
*/
|
|
467
|
+
|
|
468
|
+
var addGlobalEvents = body => {
|
|
469
|
+
window.addEventListener('hashchange', function () {
|
|
470
|
+
var hash = location.hash.replace('#', '');
|
|
471
|
+
var label = document.querySelector("label[for=\"".concat(hash, "\"]"));
|
|
472
|
+
var detail = document.querySelector("details[id=\"".concat(hash, "\"]:not([open])"));
|
|
473
|
+
if (label) label.click();else if (detail) detail.setAttribute('open', 'open');
|
|
474
|
+
}, false);
|
|
475
|
+
return null;
|
|
476
|
+
};
|
|
463
477
|
/**
|
|
464
478
|
* 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.
|
|
465
479
|
* @param {HTMLElement} element Dom element, this doesn't have to be the body but it is recommended.
|
|
466
480
|
*/
|
|
467
481
|
|
|
468
|
-
|
|
469
482
|
var checkElements = element => {
|
|
470
483
|
// Tables
|
|
471
484
|
Array.from(element.querySelectorAll('table')).forEach((table, index) => {
|
|
@@ -478,7 +491,6 @@ var checkElements = element => {
|
|
|
478
491
|
* @param {HTMLElement} table Dom table element
|
|
479
492
|
*/
|
|
480
493
|
|
|
481
|
-
|
|
482
494
|
var tableWrap = table => {
|
|
483
495
|
if (!table.parentNode.classList.contains('table__wrapper')) {
|
|
484
496
|
var tableHTML = table.outerHTML;
|
|
@@ -490,7 +502,6 @@ var tableWrap = table => {
|
|
|
490
502
|
* @param {HTMLElement} table Dom table element
|
|
491
503
|
*/
|
|
492
504
|
|
|
493
|
-
|
|
494
505
|
var tableStacked = table => {
|
|
495
506
|
var colHeadings = Array.from(table.querySelectorAll('thead th'));
|
|
496
507
|
var colRows = Array.from(table.querySelectorAll('tbody tr'));
|
|
@@ -508,17 +519,23 @@ var tableStacked = table => {
|
|
|
508
519
|
});
|
|
509
520
|
});
|
|
510
521
|
};
|
|
511
|
-
|
|
512
522
|
var isNumeric = function isNumeric(str) {
|
|
513
523
|
if (typeof str != "string") return false; // we only process strings!
|
|
514
524
|
|
|
515
525
|
return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
|
|
516
526
|
!isNaN(parseFloat(str)); // ...and ensure strings of whitespace fail
|
|
517
527
|
};
|
|
518
|
-
|
|
519
528
|
var zeroPad = (num, places) => String(num).padStart(places, '0');
|
|
520
|
-
|
|
521
|
-
|
|
529
|
+
var helpers_ucfirst = str => str.charAt(0).toUpperCase() + str.slice(1);
|
|
530
|
+
var helpers_ucwords = str => str.split(' ').map(s => helpers_ucfirst(s)).join(' ');
|
|
531
|
+
var helpers_unsnake = str => str.replace(/_/g, ' ');
|
|
532
|
+
var helpers_snake = str => str.replace(/ /g, '_');
|
|
533
|
+
var helpers_safeID = function safeID(str) {
|
|
534
|
+
str = str.toLowerCase();
|
|
535
|
+
str = helpers_snake(str);
|
|
536
|
+
str = str.replace(/\W/g, '');
|
|
537
|
+
return str;
|
|
538
|
+
};
|
|
522
539
|
;// CONCATENATED MODULE: ./assets/js/modules/table.js
|
|
523
540
|
|
|
524
541
|
|
|
@@ -530,7 +547,7 @@ function table(tableElement) {
|
|
|
530
547
|
var sortedEvent = new Event('sorted');
|
|
531
548
|
var filteredEvent = new Event('filtered');
|
|
532
549
|
var reorderedEvent = new Event('reordered');
|
|
533
|
-
var randID = '
|
|
550
|
+
var randID = 'table_' + Math.random().toString(36).substr(2, 9); // Random to make sure IDs created are unique
|
|
534
551
|
|
|
535
552
|
var draggedRow;
|
|
536
553
|
tableElement.setAttribute('id', randID); // #region Sortable
|
|
@@ -716,47 +733,6 @@ function table(tableElement) {
|
|
|
716
733
|
var stopShowing = show * page;
|
|
717
734
|
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 ");
|
|
718
735
|
tableElement.append(style);
|
|
719
|
-
};
|
|
720
|
-
|
|
721
|
-
var createPaginationForm = function createPaginationForm(show, page, totalRows) {
|
|
722
|
-
var form = document.createElement("div");
|
|
723
|
-
form.classList.add('table__pagination');
|
|
724
|
-
form.classList.add('row');
|
|
725
|
-
form.classList.add('pt-3');
|
|
726
|
-
form.classList.add('pb-3'); // Create the form and create a container div to hold the pagination buttons
|
|
727
|
-
|
|
728
|
-
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
|
|
729
|
-
|
|
730
|
-
tableElement.append(form);
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
var createPaginationButttons = function createPaginationButttons(show, page, totalRows) {
|
|
734
|
-
var paginationButtonsWrapper = document.getElementById(randID + '_paginationBtns');
|
|
735
|
-
if (paginationButtonsWrapper == null) return false;
|
|
736
|
-
var numberPages = Math.ceil(totalRows / show);
|
|
737
|
-
|
|
738
|
-
if (numberPages == 1) {
|
|
739
|
-
// Remore the buttons or dont display any if we dont need them
|
|
740
|
-
paginationButtonsWrapper.innerHTML = '';
|
|
741
|
-
} else if (numberPages < 5) {
|
|
742
|
-
// If less than 5 pages (which fits comfortably on mobile) we display buttons
|
|
743
|
-
var strButtons = '';
|
|
744
|
-
|
|
745
|
-
for (var i = 1; i <= numberPages; i++) {
|
|
746
|
-
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>");
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
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>");
|
|
750
|
-
} else {
|
|
751
|
-
// If more than 5 lets show a select field instead so that we dont have loads and loads of buttons
|
|
752
|
-
var strOptions = '';
|
|
753
|
-
|
|
754
|
-
for (var _i = 1; _i <= numberPages; _i++) {
|
|
755
|
-
if (_i == page) strOptions += "<option value=\"".concat(_i, "\" selected>Page ").concat(_i, "</option>");else strOptions += "<option value=\"".concat(_i, "\">Page ").concat(_i, "</option>");
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
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 ");
|
|
759
|
-
}
|
|
760
736
|
}; // On page load check if the table should be paginated
|
|
761
737
|
|
|
762
738
|
|
|
@@ -767,13 +743,13 @@ function table(tableElement) {
|
|
|
767
743
|
|
|
768
744
|
if (show < totalRows) {
|
|
769
745
|
paginateRows(show, page);
|
|
770
|
-
createPaginationForm(show, page, totalRows);
|
|
771
|
-
createPaginationButttons(show, page, totalRows);
|
|
746
|
+
createPaginationForm(randID, tableElement, show, page, totalRows);
|
|
747
|
+
createPaginationButttons(randID, tableElement, show, page, totalRows);
|
|
772
748
|
tableElement.addEventListener('change', function (e) {
|
|
773
749
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
774
750
|
if (target.matches('.table__pagination input[type="number"]')) {
|
|
775
751
|
paginateRows(target.value, page);
|
|
776
|
-
createPaginationButttons(target.value, page, totalRows);
|
|
752
|
+
createPaginationButttons(randID, tableElement, target.value, page, totalRows);
|
|
777
753
|
tableElement.setAttribute('data-show', target.value);
|
|
778
754
|
}
|
|
779
755
|
}
|
|
@@ -782,7 +758,7 @@ function table(tableElement) {
|
|
|
782
758
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
783
759
|
if (target.matches('.page-item:not(.active):not(.disabled) .page-link')) {
|
|
784
760
|
paginateRows(tableElement.getAttribute('data-show'), target.getAttribute('data-page'));
|
|
785
|
-
createPaginationButttons(tableElement.getAttribute('data-show'), target.getAttribute('data-page'), totalRows);
|
|
761
|
+
createPaginationButttons(randID, tableElement, tableElement.getAttribute('data-show'), target.getAttribute('data-page'), totalRows);
|
|
786
762
|
}
|
|
787
763
|
}
|
|
788
764
|
}, false);
|
|
@@ -790,7 +766,7 @@ function table(tableElement) {
|
|
|
790
766
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
791
767
|
if (target.matches('.table__pagination select')) {
|
|
792
768
|
paginateRows(tableElement.getAttribute('data-show'), target.value);
|
|
793
|
-
createPaginationButttons(tableElement.getAttribute('data-show'), target.value, totalRows);
|
|
769
|
+
createPaginationButttons(randID, tableElement, tableElement.getAttribute('data-show'), target.value, totalRows);
|
|
794
770
|
}
|
|
795
771
|
}
|
|
796
772
|
});
|
|
@@ -916,8 +892,8 @@ function table(tableElement) {
|
|
|
916
892
|
|
|
917
893
|
if (_show < _totalRows) {
|
|
918
894
|
paginateRows(_show, 1);
|
|
919
|
-
createPaginationForm(_show, 1, _totalRows);
|
|
920
|
-
createPaginationButttons(_show, 1, _totalRows);
|
|
895
|
+
createPaginationForm(randID, tableElement, _show, 1, _totalRows);
|
|
896
|
+
createPaginationButttons(randID, tableElement, _show, 1, _totalRows);
|
|
921
897
|
}
|
|
922
898
|
}
|
|
923
899
|
|
|
@@ -941,6 +917,45 @@ function table(tableElement) {
|
|
|
941
917
|
}, false);
|
|
942
918
|
}
|
|
943
919
|
|
|
920
|
+
var createPaginationForm = function createPaginationForm(randID, tableElement, show, page, totalRows) {
|
|
921
|
+
var form = document.createElement("div");
|
|
922
|
+
form.classList.add('table__pagination');
|
|
923
|
+
form.classList.add('row');
|
|
924
|
+
form.classList.add('pt-3');
|
|
925
|
+
form.classList.add('pb-3'); // Create the form and create a container div to hold the pagination buttons
|
|
926
|
+
|
|
927
|
+
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
|
|
928
|
+
|
|
929
|
+
tableElement.append(form);
|
|
930
|
+
};
|
|
931
|
+
var createPaginationButttons = function createPaginationButttons(randID, tableElement, show, page, totalRows) {
|
|
932
|
+
var paginationButtonsWrapper = document.getElementById(randID + '_paginationBtns');
|
|
933
|
+
if (paginationButtonsWrapper == null) return false;
|
|
934
|
+
var numberPages = Math.ceil(totalRows / show);
|
|
935
|
+
|
|
936
|
+
if (numberPages == 1) {
|
|
937
|
+
// Remore the buttons or dont display any if we dont need them
|
|
938
|
+
paginationButtonsWrapper.innerHTML = '';
|
|
939
|
+
} else if (numberPages < 5) {
|
|
940
|
+
// If less than 5 pages (which fits comfortably on mobile) we display buttons
|
|
941
|
+
var strButtons = '';
|
|
942
|
+
|
|
943
|
+
for (var i = 1; i <= numberPages; i++) {
|
|
944
|
+
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>");
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
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>");
|
|
948
|
+
} else {
|
|
949
|
+
// If more than 5 lets show a select field instead so that we dont have loads and loads of buttons
|
|
950
|
+
var strOptions = '';
|
|
951
|
+
|
|
952
|
+
for (var _i = 1; _i <= numberPages; _i++) {
|
|
953
|
+
if (_i == page) strOptions += "<option value=\"".concat(_i, "\" selected>Page ").concat(_i, "</option>");else strOptions += "<option value=\"".concat(_i, "\">Page ").concat(_i, "</option>");
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
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 ");
|
|
957
|
+
}
|
|
958
|
+
};
|
|
944
959
|
/* harmony default export */ var modules_table = (table);
|
|
945
960
|
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-40[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&
|
|
946
961
|
//
|
|
@@ -963,6 +978,19 @@ function table(tableElement) {
|
|
|
963
978
|
//
|
|
964
979
|
|
|
965
980
|
|
|
981
|
+
|
|
982
|
+
var numericValue = function numericValue(value) {
|
|
983
|
+
console.log(value);
|
|
984
|
+
value = value.replace('£', '');
|
|
985
|
+
value = value.replace('%', '');
|
|
986
|
+
|
|
987
|
+
if (Number.isNaN(Number.parseFloat(value))) {
|
|
988
|
+
return 0;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
return Number.parseFloat(value);
|
|
992
|
+
};
|
|
993
|
+
|
|
966
994
|
/* harmony default export */ var Tablevue_type_script_lang_js_ = ({
|
|
967
995
|
name: 'Table',
|
|
968
996
|
props: {
|
|
@@ -1008,14 +1036,8 @@ function table(tableElement) {
|
|
|
1008
1036
|
|
|
1009
1037
|
numericValue() {
|
|
1010
1038
|
return value => {
|
|
1011
|
-
value = value
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
if (Number.isNaN(Number.parseFloat(value))) {
|
|
1015
|
-
return 0;
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
return Number.parseFloat(value);
|
|
1039
|
+
value = numericValue(value);
|
|
1040
|
+
return value;
|
|
1019
1041
|
};
|
|
1020
1042
|
}
|
|
1021
1043
|
|
|
@@ -1040,7 +1062,12 @@ function table(tableElement) {
|
|
|
1040
1062
|
var tbody = this.$refs.wrapper.querySelector('tbody');
|
|
1041
1063
|
var tbodyHTML = '';
|
|
1042
1064
|
this.items.forEach((row, index) => {
|
|
1043
|
-
|
|
1065
|
+
var rowID = row['rowid'] ? row['rowid'] : '';
|
|
1066
|
+
row = Object.fromEntries(Object.entries(row).filter(_ref => {
|
|
1067
|
+
var [key] = _ref;
|
|
1068
|
+
return key !== 'rowid';
|
|
1069
|
+
}));
|
|
1070
|
+
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>");
|
|
1044
1071
|
});
|
|
1045
1072
|
tbody.innerHTML = tbodyHTML; // Tell the framework that the table has been filtered so that it can re-sort it etc
|
|
1046
1073
|
|
|
@@ -1062,8 +1089,8 @@ function table(tableElement) {
|
|
|
1062
1089
|
;
|
|
1063
1090
|
var Table_component = normalizeComponent(
|
|
1064
1091
|
Table_Tablevue_type_script_lang_js_,
|
|
1065
|
-
|
|
1066
|
-
|
|
1092
|
+
Tablevue_type_template_id_d7356792_render,
|
|
1093
|
+
Tablevue_type_template_id_d7356792_staticRenderFns,
|
|
1067
1094
|
false,
|
|
1068
1095
|
null,
|
|
1069
1096
|
null,
|
|
@@ -3306,9 +3333,9 @@ var Step_component = normalizeComponent(
|
|
|
3306
3333
|
)
|
|
3307
3334
|
|
|
3308
3335
|
/* harmony default export */ var Step = (Step_component.exports);
|
|
3309
|
-
;// 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=
|
|
3310
|
-
var
|
|
3311
|
-
var
|
|
3336
|
+
;// 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&
|
|
3337
|
+
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)}
|
|
3338
|
+
var Tabsvue_type_template_id_8b015576_staticRenderFns = []
|
|
3312
3339
|
|
|
3313
3340
|
|
|
3314
3341
|
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-40[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&
|
|
@@ -3399,8 +3426,8 @@ var Tabsvue_type_template_id_a94687de_staticRenderFns = []
|
|
|
3399
3426
|
|
|
3400
3427
|
var Tabs_component = normalizeComponent(
|
|
3401
3428
|
Tabs_Tabsvue_type_script_lang_js_,
|
|
3402
|
-
|
|
3403
|
-
|
|
3429
|
+
Tabsvue_type_template_id_8b015576_render,
|
|
3430
|
+
Tabsvue_type_template_id_8b015576_staticRenderFns,
|
|
3404
3431
|
false,
|
|
3405
3432
|
null,
|
|
3406
3433
|
null,
|