@iamproperty/components 2.7.8 → 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/dist/components.common.js +26 -14
- package/dist/components.common.js.map +1 -1
- package/dist/components.umd.js +26 -14
- 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/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
|
|
@@ -978,6 +978,19 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
978
978
|
//
|
|
979
979
|
|
|
980
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
|
+
|
|
981
994
|
/* harmony default export */ var Tablevue_type_script_lang_js_ = ({
|
|
982
995
|
name: 'Table',
|
|
983
996
|
props: {
|
|
@@ -1023,14 +1036,8 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
1023
1036
|
|
|
1024
1037
|
numericValue() {
|
|
1025
1038
|
return value => {
|
|
1026
|
-
value = value
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
if (Number.isNaN(Number.parseFloat(value))) {
|
|
1030
|
-
return 0;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
return Number.parseFloat(value);
|
|
1039
|
+
value = numericValue(value);
|
|
1040
|
+
return value;
|
|
1034
1041
|
};
|
|
1035
1042
|
}
|
|
1036
1043
|
|
|
@@ -1055,7 +1062,12 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
1055
1062
|
var tbody = this.$refs.wrapper.querySelector('tbody');
|
|
1056
1063
|
var tbodyHTML = '';
|
|
1057
1064
|
this.items.forEach((row, index) => {
|
|
1058
|
-
|
|
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>");
|
|
1059
1071
|
});
|
|
1060
1072
|
tbody.innerHTML = tbodyHTML; // Tell the framework that the table has been filtered so that it can re-sort it etc
|
|
1061
1073
|
|
|
@@ -1077,8 +1089,8 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
1077
1089
|
;
|
|
1078
1090
|
var Table_component = normalizeComponent(
|
|
1079
1091
|
Table_Tablevue_type_script_lang_js_,
|
|
1080
|
-
|
|
1081
|
-
|
|
1092
|
+
Tablevue_type_template_id_d7356792_render,
|
|
1093
|
+
Tablevue_type_template_id_d7356792_staticRenderFns,
|
|
1082
1094
|
false,
|
|
1083
1095
|
null,
|
|
1084
1096
|
null,
|