aloha-vue 1.2.26 → 1.2.28

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
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.26",
17
+ "version": "1.2.28",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -27,6 +27,7 @@ export default function LinkAPI(props) {
27
27
  if (isPlainObject(column.value.to)) {
28
28
  const TO = cloneDeep(column.value.to);
29
29
  const PARAMS = TO.params || {};
30
+ const QUERY = TO.query || {};
30
31
  if (column.value.to.paramsDynamic) {
31
32
  let hasParamsDynamicError = false;
32
33
  forEach(column.value.to.paramsDynamic, (value, key) => {
@@ -41,7 +42,22 @@ export default function LinkAPI(props) {
41
42
  return undefined;
42
43
  }
43
44
  }
45
+ if (column.value.to.queryDynamic) {
46
+ let hasParamsDynamicError = false;
47
+ forEach(column.value.to.queryDynamic, (value, key) => {
48
+ const QUERY_VALUE = get(row.value, value);
49
+ if (isUndefined(QUERY_VALUE)) {
50
+ hasParamsDynamicError = true;
51
+ return false;
52
+ }
53
+ QUERY[key] = QUERY_VALUE;
54
+ });
55
+ if (hasParamsDynamicError) {
56
+ return undefined;
57
+ }
58
+ }
44
59
  TO.params = PARAMS;
60
+ TO.query = QUERY;
45
61
  return TO;
46
62
  }
47
63
  return undefined;
@@ -131,6 +131,7 @@ export default function RowActionsAPI(props) {
131
131
  if (isPlainObject(rowAction.to)) {
132
132
  const TO = cloneDeep(rowAction.to);
133
133
  const PARAMS = TO.params || {};
134
+ const QUERY = TO.query || {};
134
135
  if (rowAction.to.paramsDynamic) {
135
136
  let hasParamsDynamicError = false;
136
137
  forEach(rowAction.to.paramsDynamic, (value, key) => {
@@ -145,7 +146,22 @@ export default function RowActionsAPI(props) {
145
146
  return undefined;
146
147
  }
147
148
  }
149
+ if (rowAction.to.queryDynamic) {
150
+ let hasParamsDynamicError = false;
151
+ forEach(rowAction.to.queryDynamic, (value, key) => {
152
+ const QUERY_VALUE = get(row.value, value);
153
+ if (isUndefined(QUERY_VALUE)) {
154
+ hasParamsDynamicError = true;
155
+ return false;
156
+ }
157
+ QUERY[key] = QUERY_VALUE;
158
+ });
159
+ if (hasParamsDynamicError) {
160
+ return undefined;
161
+ }
162
+ }
148
163
  TO.params = PARAMS;
164
+ TO.query = QUERY;
149
165
  return TO;
150
166
  }
151
167
  return undefined;