@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
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
|
|
@@ -988,6 +988,19 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
988
988
|
//
|
|
989
989
|
|
|
990
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
|
+
|
|
991
1004
|
/* harmony default export */ var Tablevue_type_script_lang_js_ = ({
|
|
992
1005
|
name: 'Table',
|
|
993
1006
|
props: {
|
|
@@ -1033,14 +1046,8 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
1033
1046
|
|
|
1034
1047
|
numericValue() {
|
|
1035
1048
|
return value => {
|
|
1036
|
-
value = value
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
if (Number.isNaN(Number.parseFloat(value))) {
|
|
1040
|
-
return 0;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
return Number.parseFloat(value);
|
|
1049
|
+
value = numericValue(value);
|
|
1050
|
+
return value;
|
|
1044
1051
|
};
|
|
1045
1052
|
}
|
|
1046
1053
|
|
|
@@ -1065,7 +1072,12 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
1065
1072
|
var tbody = this.$refs.wrapper.querySelector('tbody');
|
|
1066
1073
|
var tbodyHTML = '';
|
|
1067
1074
|
this.items.forEach((row, index) => {
|
|
1068
|
-
|
|
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>");
|
|
1069
1081
|
});
|
|
1070
1082
|
tbody.innerHTML = tbodyHTML; // Tell the framework that the table has been filtered so that it can re-sort it etc
|
|
1071
1083
|
|
|
@@ -1087,8 +1099,8 @@ var createPaginationButttons = function createPaginationButttons(randID, tableEl
|
|
|
1087
1099
|
;
|
|
1088
1100
|
var Table_component = normalizeComponent(
|
|
1089
1101
|
Table_Tablevue_type_script_lang_js_,
|
|
1090
|
-
|
|
1091
|
-
|
|
1102
|
+
Tablevue_type_template_id_d7356792_render,
|
|
1103
|
+
Tablevue_type_template_id_d7356792_staticRenderFns,
|
|
1092
1104
|
false,
|
|
1093
1105
|
null,
|
|
1094
1106
|
null,
|