@tripup-company/element-ui-extended 0.0.68 → 0.0.71
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/element-ui-extended.common.js +25 -13
- package/dist/element-ui-extended.common.js.map +1 -1
- package/dist/element-ui-extended.umd.js +25 -13
- package/dist/element-ui-extended.umd.js.map +1 -1
- package/dist/element-ui-extended.umd.min.js +1 -1
- package/dist/element-ui-extended.umd.min.js.map +1 -1
- package/dist/examples/models/contact-model.d.ts +21 -0
- package/dist/examples/models/contact-model.d.ts.map +1 -0
- package/dist/examples/repositories/contacts-repository.d.ts +9 -0
- package/dist/examples/repositories/contacts-repository.d.ts.map +1 -0
- package/dist/examples/repositories/data/contact.d.ts +43 -0
- package/dist/examples/repositories/data/contact.d.ts.map +1 -0
- package/dist/examples/types/icontact.d.ts +17 -0
- package/dist/examples/types/icontact.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/GenericFilters/FilterRow.vue +34 -16
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Icontact } from "../types/icontact";
|
|
2
|
+
import BaseModel from "../../src/models/base-model";
|
|
3
|
+
export declare class ContactModel extends BaseModel implements Icontact {
|
|
4
|
+
id?: number;
|
|
5
|
+
title?: string;
|
|
6
|
+
first_name?: string;
|
|
7
|
+
last_name?: string;
|
|
8
|
+
email: string;
|
|
9
|
+
phone?: string;
|
|
10
|
+
mobile?: string;
|
|
11
|
+
position?: string;
|
|
12
|
+
comments_guid?: string;
|
|
13
|
+
city: string;
|
|
14
|
+
state?: string;
|
|
15
|
+
zip_code: string;
|
|
16
|
+
street?: string;
|
|
17
|
+
country?: string;
|
|
18
|
+
destination?: any;
|
|
19
|
+
constructor(data?: any[]);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=contact-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-model.d.ts","sourceRoot":"","sources":["../../../examples/models/contact-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,qBAAa,YAAa,SAAQ,SAAU,YAAW,QAAQ;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC;gBAEN,IAAI,QAAK;CAGtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import BaseRepository from "../../src/repositories/base-repository";
|
|
2
|
+
import { Icontact } from "../types/icontact";
|
|
3
|
+
import { Collection } from "../../src/types/collection";
|
|
4
|
+
export default class ContactsRepository extends BaseRepository<Icontact> {
|
|
5
|
+
convert(data: any): Icontact;
|
|
6
|
+
collectionConvert(data: any): Collection<Icontact>;
|
|
7
|
+
all(query: string, include?: string): Promise<any>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=contacts-repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts-repository.d.ts","sourceRoot":"","sources":["../../../examples/repositories/contacts-repository.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAIxD,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IACtE,OAAO,CAAC,IAAI,EAAE,GAAG,GAAG,QAAQ;IAM5B,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC;IASlD,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,SAAO,GAAG,OAAO,CAAC,GAAG,CAAC;CAKjD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
const data: {
|
|
3
|
+
object: string;
|
|
4
|
+
id: number;
|
|
5
|
+
title: string;
|
|
6
|
+
first_name: string;
|
|
7
|
+
last_name: string;
|
|
8
|
+
email: string;
|
|
9
|
+
second_email: any;
|
|
10
|
+
phone: string;
|
|
11
|
+
phone_alternative: any;
|
|
12
|
+
mobile: string;
|
|
13
|
+
position: string;
|
|
14
|
+
department: any;
|
|
15
|
+
created_at: string;
|
|
16
|
+
updated_at: string;
|
|
17
|
+
readable_created_at: string;
|
|
18
|
+
readable_updated_at: string;
|
|
19
|
+
owner: string;
|
|
20
|
+
comments_guid: string;
|
|
21
|
+
street: string;
|
|
22
|
+
state: string;
|
|
23
|
+
city: string;
|
|
24
|
+
zip_code: string;
|
|
25
|
+
country: string;
|
|
26
|
+
}[];
|
|
27
|
+
namespace meta {
|
|
28
|
+
const include: any[];
|
|
29
|
+
const custom: any[];
|
|
30
|
+
namespace pagination {
|
|
31
|
+
const total: number;
|
|
32
|
+
const count: number;
|
|
33
|
+
const per_page: number;
|
|
34
|
+
const current_page: number;
|
|
35
|
+
const total_pages: number;
|
|
36
|
+
namespace links {
|
|
37
|
+
const next: string;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export default _default;
|
|
43
|
+
//# sourceMappingURL=contact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../../examples/repositories/data/contact.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Icontact {
|
|
2
|
+
id?: number;
|
|
3
|
+
title?: string;
|
|
4
|
+
first_name?: string;
|
|
5
|
+
last_name?: string;
|
|
6
|
+
email: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
mobile?: string;
|
|
9
|
+
position?: string;
|
|
10
|
+
comments_guid?: string;
|
|
11
|
+
city: string;
|
|
12
|
+
state?: string;
|
|
13
|
+
zip_code: string;
|
|
14
|
+
street?: string;
|
|
15
|
+
country?: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=icontact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icontact.d.ts","sourceRoot":"","sources":["../../../examples/types/icontact.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAEpB"}
|
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
v-for="item in selectListLocal"
|
|
60
60
|
:key="item[selectKey]"
|
|
61
61
|
:label="item[selectLabel]"
|
|
62
|
-
:value="
|
|
62
|
+
:value="item[selectValue]"
|
|
63
63
|
/>
|
|
64
64
|
</el-select>
|
|
65
65
|
</el-col>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</el-row>
|
|
68
68
|
</template>
|
|
69
69
|
<script>
|
|
70
|
-
import { upperFirst } from
|
|
70
|
+
import { upperFirst } from "lodash";
|
|
71
71
|
import Vue from "vue";
|
|
72
72
|
export default {
|
|
73
73
|
props: {
|
|
@@ -85,7 +85,7 @@ export default {
|
|
|
85
85
|
},
|
|
86
86
|
name: {
|
|
87
87
|
type: String,
|
|
88
|
-
default:
|
|
88
|
+
default: "",
|
|
89
89
|
},
|
|
90
90
|
},
|
|
91
91
|
data() {
|
|
@@ -94,6 +94,16 @@ export default {
|
|
|
94
94
|
{ value: true, name: "true" },
|
|
95
95
|
{ value: false, name: "false" },
|
|
96
96
|
];
|
|
97
|
+
let selectValues = [];
|
|
98
|
+
if (this.column.selectList && this.column.selectList.length) {
|
|
99
|
+
selectValues = this.column.selectList;
|
|
100
|
+
} else if (this.search.selectList && this.search.selectList.length) {
|
|
101
|
+
selectValues = this.search.selectList;
|
|
102
|
+
} else if (this.column.type === "enum") {
|
|
103
|
+
selectValues = this.column.values;
|
|
104
|
+
} else {
|
|
105
|
+
selectValues = boolValues;
|
|
106
|
+
}
|
|
97
107
|
return {
|
|
98
108
|
searchLocal: this.search,
|
|
99
109
|
loading: false,
|
|
@@ -105,11 +115,6 @@ export default {
|
|
|
105
115
|
selectJson: this.column.selectJson ?? false,
|
|
106
116
|
remote: this.column.remote ?? false,
|
|
107
117
|
remoteMethod: this.column.remoteMethod ?? null,
|
|
108
|
-
selectListLocal: this.column.selectList
|
|
109
|
-
? this.column.selectList
|
|
110
|
-
: this.column.type === "enum"
|
|
111
|
-
? this.column.values
|
|
112
|
-
: boolValues,
|
|
113
118
|
showFilter: this.search.operator !== "",
|
|
114
119
|
stringOperators: [
|
|
115
120
|
{ value: "equal", label: "is equal" },
|
|
@@ -127,6 +132,8 @@ export default {
|
|
|
127
132
|
enumOperatorsInObject: [{ value: "in_object", label: "in_object" }],
|
|
128
133
|
dateOperators: [{ value: "between", label: "between" }],
|
|
129
134
|
boolOperators: [{ value: "equal", label: "is" }],
|
|
135
|
+
selectListLocal: selectValues,
|
|
136
|
+
|
|
130
137
|
};
|
|
131
138
|
},
|
|
132
139
|
computed: {
|
|
@@ -138,7 +145,12 @@ export default {
|
|
|
138
145
|
break;
|
|
139
146
|
case ("enum", "select"):
|
|
140
147
|
if (this.column.operator) {
|
|
141
|
-
operators = [
|
|
148
|
+
operators = [
|
|
149
|
+
{
|
|
150
|
+
value: this.column.operator,
|
|
151
|
+
label: upperFirst(this.column.operator.replace("_", " ")),
|
|
152
|
+
},
|
|
153
|
+
];
|
|
142
154
|
} else if (this.column.selectMultiple) {
|
|
143
155
|
operators = this.enumOperatorsMultiple;
|
|
144
156
|
} else {
|
|
@@ -171,12 +183,15 @@ export default {
|
|
|
171
183
|
if (this.showFilter === false) {
|
|
172
184
|
this.searchLocal.operator = "";
|
|
173
185
|
this.searchLocal.value = "";
|
|
174
|
-
} else if (
|
|
186
|
+
} else if (
|
|
187
|
+
this.searchLocal.operator === "" &&
|
|
188
|
+
this.operators.length === 1
|
|
189
|
+
) {
|
|
175
190
|
this.searchLocal.operator = this.operators[0].value;
|
|
176
191
|
}
|
|
177
192
|
},
|
|
178
|
-
search
|
|
179
|
-
console.log(
|
|
193
|
+
search(newValue) {
|
|
194
|
+
console.log("seach updated");
|
|
180
195
|
if (newValue !== this.search) {
|
|
181
196
|
this.searchLocal = Object.assign({}, this.search);
|
|
182
197
|
}
|
|
@@ -186,13 +201,16 @@ export default {
|
|
|
186
201
|
searchLocal: {
|
|
187
202
|
deep: true,
|
|
188
203
|
handler() {
|
|
189
|
-
console.log(
|
|
190
|
-
this.$emit("update:search", {
|
|
204
|
+
console.log("searchLocal updated");
|
|
205
|
+
this.$emit("update:search", {
|
|
206
|
+
name: this.name,
|
|
207
|
+
value: this.searchLocal,
|
|
208
|
+
});
|
|
191
209
|
console.log(this.searchLocal);
|
|
192
|
-
if (this.searchLocal.operator ==
|
|
210
|
+
if (this.searchLocal.operator == "") {
|
|
193
211
|
this.showFilter = false;
|
|
194
212
|
}
|
|
195
|
-
}
|
|
213
|
+
},
|
|
196
214
|
},
|
|
197
215
|
},
|
|
198
216
|
methods: {
|