aloha-vue 1.0.79 → 1.0.81

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aloha-vue",
3
3
  "description": "Project aloha",
4
- "version": "1.0.79",
4
+ "version": "1.0.81",
5
5
  "author": "Ilia Brykin",
6
6
  "scripts": {
7
7
  "build-icons": "node scriptsNode/iconsSvgToJs.js bootstrap3 && node scriptsNode/iconsSvgToJs.js bootstrap-1-9-1"
@@ -606,6 +606,7 @@ export default {
606
606
  filter: vm.column.filter,
607
607
  filterParameters: vm.column.filterParameters,
608
608
  defaultValue: vm.column.defaultValue,
609
+ tag: vm.column.filterTag || "div",
609
610
  }),
610
611
  ],
611
612
  ...this.$slots,
@@ -58,8 +58,8 @@ export default function AFiltersAPI() {
58
58
  return Link(value, { param, target });
59
59
  };
60
60
 
61
- const filterList = (value, { isHtml = true, listClass = "list-unstyled" } = {}) => {
62
- return list(value, { isHtml, listClass });
61
+ const filterList = (value, { isHtml = true, listClass = "a_list_without_styles", keyLabel = "" } = {}) => {
62
+ return list(value, { isHtml, listClass, keyLabel });
63
63
  };
64
64
 
65
65
  const filterPropertyByValue = (value, { mapping = {}, defaultValue = "" } = {}) => {
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  isArray,
3
3
  forEach,
4
+ get,
4
5
  } from "lodash-es";
5
6
 
6
- export default function(value, { isHtml = true, listClass = "list-unstyled" } = {}) {
7
+ export default function(value, { isHtml = true, listClass = "a_list_without_styles", keyLabel = "" } = {}) {
7
8
  if (!isArray(value)) {
8
9
  return value;
9
10
  }
@@ -13,12 +14,14 @@ export default function(value, { isHtml = true, listClass = "list-unstyled" } =
13
14
  let result = "";
14
15
  if (isHtml === false || isHtml === "false") {
15
16
  forEach(value, (item, index) => {
16
- result += `${ index !== 0 ? ", " : "" }${ item }`;
17
+ const ITEM_TEXT = keyLabel ? get(item, keyLabel) : item;
18
+ result += `${ index !== 0 ? ", " : "" }${ ITEM_TEXT }`;
17
19
  });
18
20
  return result;
19
21
  }
20
22
  forEach(value, item => {
21
- result += `<li>${ item }</li>`;
23
+ const ITEM_TEXT = keyLabel ? get(item, keyLabel) : item;
24
+ result += `<li>${ ITEM_TEXT }</li>`;
22
25
  });
23
26
  return `<ul${ listClass ? ` class="${ listClass }"` : "" }>${ result }</ul>`;
24
27
  }