expressa 2.0.22 → 2.0.24
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/index.js +8 -1
- package/modules/admin/.babelrc +0 -11
- package/modules/admin/dist/css/451.c6646d20.css +1 -0
- package/modules/admin/dist/css/451.c6646d20.css.gz +0 -0
- package/modules/admin/dist/css/{136.1055b646.css → 569.db9a10c2.css} +144 -0
- package/modules/admin/dist/css/569.db9a10c2.css.gz +0 -0
- package/modules/admin/dist/css/{76.46fe6799.css → 572.513a323e.css} +144 -0
- package/modules/admin/dist/css/572.513a323e.css.gz +0 -0
- package/modules/admin/dist/index.html +1 -1
- package/modules/admin/dist/static/js/197.36982650.js +1 -0
- package/modules/admin/dist/static/js/197.36982650.js.gz +0 -0
- package/modules/admin/dist/static/js/311.25e842dc.js +1 -0
- package/modules/admin/dist/static/js/311.25e842dc.js.gz +0 -0
- package/modules/admin/dist/static/js/430.53aea612.js +1 -0
- package/modules/admin/dist/static/js/430.53aea612.js.gz +0 -0
- package/modules/admin/dist/static/js/{807.8b7455a7.js → 451.9f6dcdb1.js} +1 -1
- package/modules/admin/dist/static/js/451.9f6dcdb1.js.gz +0 -0
- package/modules/admin/dist/static/js/460.351dad91.js +1 -0
- package/modules/admin/dist/static/js/460.351dad91.js.gz +0 -0
- package/modules/admin/dist/static/js/550.87e54b29.js +1 -0
- package/modules/admin/dist/static/js/550.87e54b29.js.gz +0 -0
- package/modules/admin/dist/static/js/569.52dba3a7.js +1 -0
- package/modules/admin/dist/static/js/569.52dba3a7.js.gz +0 -0
- package/modules/admin/dist/static/js/572.296cfd3b.js +1 -0
- package/modules/admin/dist/static/js/572.296cfd3b.js.gz +0 -0
- package/modules/admin/dist/static/js/603.98d5f5d9.js +1 -0
- package/modules/admin/dist/static/js/603.98d5f5d9.js.gz +0 -0
- package/modules/admin/dist/static/js/651.6dca6fbe.js +1 -0
- package/modules/admin/dist/static/js/651.6dca6fbe.js.gz +0 -0
- package/modules/admin/dist/static/js/653.0dff78dc.js +1 -0
- package/modules/admin/dist/static/js/653.0dff78dc.js.gz +0 -0
- package/modules/admin/dist/static/js/750.6877a6b8.js +1 -0
- package/modules/admin/dist/static/js/750.6877a6b8.js.gz +0 -0
- package/modules/admin/dist/static/js/950.4f40455a.js +1 -0
- package/modules/admin/dist/static/js/950.4f40455a.js.gz +0 -0
- package/modules/admin/dist/static/js/app.2dd732d9.js +2 -0
- package/modules/admin/dist/static/js/{app.834abee4.js.LICENSE.txt → app.2dd732d9.js.LICENSE.txt} +2 -4
- package/modules/admin/dist/static/js/app.2dd732d9.js.LICENSE.txt.gz +0 -0
- package/modules/admin/dist/static/js/app.2dd732d9.js.gz +0 -0
- package/modules/admin/package.json +2 -3
- package/package.json +1 -1
- package/test/0-install.js +1 -1
- package/modules/admin/dist/css/136.1055b646.css.gz +0 -0
- package/modules/admin/dist/css/76.46fe6799.css.gz +0 -0
- package/modules/admin/dist/css/807.f450521e.css +0 -1
- package/modules/admin/dist/css/807.f450521e.css.gz +0 -0
- package/modules/admin/dist/static/js/115.108d0dd5.js +0 -1
- package/modules/admin/dist/static/js/115.108d0dd5.js.gz +0 -0
- package/modules/admin/dist/static/js/136.1f9f4cb0.js +0 -1
- package/modules/admin/dist/static/js/136.1f9f4cb0.js.gz +0 -0
- package/modules/admin/dist/static/js/165.b3d51941.js +0 -1
- package/modules/admin/dist/static/js/165.b3d51941.js.gz +0 -0
- package/modules/admin/dist/static/js/220.02b2cd49.js +0 -1
- package/modules/admin/dist/static/js/220.02b2cd49.js.gz +0 -0
- package/modules/admin/dist/static/js/236.98c79868.js +0 -1
- package/modules/admin/dist/static/js/236.98c79868.js.gz +0 -0
- package/modules/admin/dist/static/js/338.4ba49501.js +0 -1
- package/modules/admin/dist/static/js/338.4ba49501.js.gz +0 -0
- package/modules/admin/dist/static/js/381.a05421de.js +0 -1
- package/modules/admin/dist/static/js/381.a05421de.js.gz +0 -0
- package/modules/admin/dist/static/js/412.0914ff23.js +0 -1
- package/modules/admin/dist/static/js/412.0914ff23.js.gz +0 -0
- package/modules/admin/dist/static/js/533.507df4cb.js +0 -1
- package/modules/admin/dist/static/js/533.507df4cb.js.gz +0 -0
- package/modules/admin/dist/static/js/556.d7586b89.js +0 -1
- package/modules/admin/dist/static/js/556.d7586b89.js.gz +0 -0
- package/modules/admin/dist/static/js/76.811d0e96.js +0 -1
- package/modules/admin/dist/static/js/76.811d0e96.js.gz +0 -0
- package/modules/admin/dist/static/js/807.8b7455a7.js.gz +0 -0
- package/modules/admin/dist/static/js/913.8b376386.js +0 -1
- package/modules/admin/dist/static/js/913.8b376386.js.gz +0 -0
- package/modules/admin/dist/static/js/app.834abee4.js +0 -2
- package/modules/admin/dist/static/js/app.834abee4.js.LICENSE.txt.gz +0 -0
- package/modules/admin/dist/static/js/app.834abee4.js.gz +0 -0
- /package/modules/admin/dist/css/{236.e66ce8d8.css → 197.e66ce8d8.css} +0 -0
- /package/modules/admin/dist/css/{236.e66ce8d8.css.gz → 197.e66ce8d8.css.gz} +0 -0
- /package/modules/admin/dist/css/{165.e83d8cfe.css → 430.e83d8cfe.css} +0 -0
- /package/modules/admin/dist/css/{165.e83d8cfe.css.gz → 430.e83d8cfe.css.gz} +0 -0
- /package/modules/admin/dist/css/{220.e946bda7.css → 651.e946bda7.css} +0 -0
- /package/modules/admin/dist/css/{220.e946bda7.css.gz → 651.e946bda7.css.gz} +0 -0
- /package/modules/admin/dist/css/{913.4086915d.css → 750.4086915d.css} +0 -0
- /package/modules/admin/dist/css/{913.4086915d.css.gz → 750.4086915d.css.gz} +0 -0
- /package/modules/admin/dist/css/{338.1fd9d57c.css → 950.1fd9d57c.css} +0 -0
- /package/modules/admin/dist/css/{338.1fd9d57c.css.gz → 950.1fd9d57c.css.gz} +0 -0
package/index.js
CHANGED
|
@@ -215,7 +215,14 @@ module.exports.api = function (settings) {
|
|
|
215
215
|
})
|
|
216
216
|
|
|
217
217
|
router.use(bodyParser.json({
|
|
218
|
-
type:
|
|
218
|
+
type: (req) => {
|
|
219
|
+
const contentType = req.headers['content-type'] || ''
|
|
220
|
+
// Don't parse any multipart/* content - body-parser can't handle these
|
|
221
|
+
if (contentType.startsWith('multipart/')) {
|
|
222
|
+
return false
|
|
223
|
+
}
|
|
224
|
+
return true
|
|
225
|
+
},
|
|
219
226
|
limit: router.settings.body_limit || '1mb',
|
|
220
227
|
}))
|
|
221
228
|
|
package/modules/admin/.babelrc
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sourceType": "module",
|
|
3
3
|
"presets": [
|
|
4
|
-
[
|
|
5
|
-
"@babel/preset-env",
|
|
6
|
-
{
|
|
7
|
-
"targets": {
|
|
8
|
-
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
4
|
],
|
|
13
5
|
"plugins": [
|
|
14
6
|
["@babel/plugin-proposal-decorators", { "legacy": true }],
|
|
15
|
-
"@babel/plugin-proposal-class-properties",
|
|
16
|
-
"@babel/plugin-proposal-object-rest-spread",
|
|
17
|
-
"@babel/plugin-transform-runtime",
|
|
18
7
|
"@vue/babel-plugin-transform-vue-jsx"
|
|
19
8
|
]
|
|
20
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.wscn-http404-container[data-v-8a6c390c]{-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);position:absolute;top:40%;left:50%}.wscn-http404[data-v-8a6c390c]{position:relative;width:1200px;padding:0 50px;overflow:hidden}.wscn-http404 .pic-404[data-v-8a6c390c]{position:relative;float:left;width:600px;overflow:hidden}.wscn-http404 .pic-404__parent[data-v-8a6c390c]{width:100%}.wscn-http404 .pic-404__child[data-v-8a6c390c]{position:absolute}.wscn-http404 .pic-404__child.left[data-v-8a6c390c]{width:80px;top:17px;left:220px;opacity:0;-webkit-animation-name:cloudLeft-data-v-8a6c390c;animation-name:cloudLeft-data-v-8a6c390c;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1s;animation-delay:1s}.wscn-http404 .pic-404__child.mid[data-v-8a6c390c]{width:46px;top:10px;left:420px;opacity:0;-webkit-animation-name:cloudMid-data-v-8a6c390c;animation-name:cloudMid-data-v-8a6c390c;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1.2s;animation-delay:1.2s}.wscn-http404 .pic-404__child.right[data-v-8a6c390c]{width:62px;top:100px;left:500px;opacity:0;-webkit-animation-name:cloudRight-data-v-8a6c390c;animation-name:cloudRight-data-v-8a6c390c;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1s;animation-delay:1s}@-webkit-keyframes cloudLeft-data-v-8a6c390c{0%{top:17px;left:220px;opacity:0}20%{top:33px;left:188px;opacity:1}80%{top:81px;left:92px;opacity:1}100%{top:97px;left:60px;opacity:0}}@keyframes cloudLeft-data-v-8a6c390c{0%{top:17px;left:220px;opacity:0}20%{top:33px;left:188px;opacity:1}80%{top:81px;left:92px;opacity:1}100%{top:97px;left:60px;opacity:0}}@-webkit-keyframes cloudMid-data-v-8a6c390c{0%{top:10px;left:420px;opacity:0}20%{top:40px;left:360px;opacity:1}70%{top:130px;left:180px;opacity:1}100%{top:160px;left:120px;opacity:0}}@keyframes cloudMid-data-v-8a6c390c{0%{top:10px;left:420px;opacity:0}20%{top:40px;left:360px;opacity:1}70%{top:130px;left:180px;opacity:1}100%{top:160px;left:120px;opacity:0}}@-webkit-keyframes cloudRight-data-v-8a6c390c{0%{top:100px;left:500px;opacity:0}20%{top:120px;left:460px;opacity:1}80%{top:180px;left:340px;opacity:1}100%{top:200px;left:300px;opacity:0}}@keyframes cloudRight-data-v-8a6c390c{0%{top:100px;left:500px;opacity:0}20%{top:120px;left:460px;opacity:1}80%{top:180px;left:340px;opacity:1}100%{top:200px;left:300px;opacity:0}}.wscn-http404 .bullshit[data-v-8a6c390c]{position:relative;float:left;width:300px;padding:30px 0;overflow:hidden}.wscn-http404 .bullshit__oops[data-v-8a6c390c]{font-size:32px;font-weight:bold;line-height:40px;color:#1482f0;opacity:0;margin-bottom:20px;-webkit-animation-name:slideUp-data-v-8a6c390c;animation-name:slideUp-data-v-8a6c390c;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__headline[data-v-8a6c390c]{font-size:20px;line-height:24px;color:#222;font-weight:bold;opacity:0;margin-bottom:10px;-webkit-animation-name:slideUp-data-v-8a6c390c;animation-name:slideUp-data-v-8a6c390c;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:.1s;animation-delay:.1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__info[data-v-8a6c390c]{font-size:13px;line-height:21px;color:gray;opacity:0;margin-bottom:30px;-webkit-animation-name:slideUp-data-v-8a6c390c;animation-name:slideUp-data-v-8a6c390c;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:.2s;animation-delay:.2s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__return-home[data-v-8a6c390c]{display:block;float:left;width:110px;height:36px;background:#1482f0;border-radius:100px;text-align:center;color:#fff;opacity:0;font-size:14px;line-height:36px;cursor:pointer;-webkit-animation-name:slideUp-data-v-8a6c390c;animation-name:slideUp-data-v-8a6c390c;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:.3s;animation-delay:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes slideUp-data-v-8a6c390c{0%{-webkit-transform:translateY(60px);transform:translateY(60px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes slideUp-data-v-8a6c390c{0%{-webkit-transform:translateY(60px);transform:translateY(60px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}
|
|
Binary file
|
|
@@ -1,4 +1,148 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
2
146
|
/* Override JSONEditor's textarea styles to make it expandable */
|
|
3
147
|
/* Use high specificity to override inline styles */
|
|
4
148
|
.jsoneditor-vue .je-modal textarea.form-control.je-edit-json--textarea[id] {
|
|
Binary file
|
|
@@ -1,4 +1,148 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
2
146
|
/* Override JSONEditor's textarea styles to make it expandable */
|
|
3
147
|
/* Use high specificity to override inline styles */
|
|
4
148
|
.jsoneditor-vue .je-modal textarea.form-control.je-edit-json--textarea[id] {
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><script crossorigin src=https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.min.js></script><script crossorigin src=https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.min.js></script><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel=stylesheet><script src=settings.js></script><title>Expressa Admin</title><link rel=icon href=/admin/favicon.ico><link href=/admin/css/app.1c3232a3.css rel=stylesheet></head><body><div id=app></div><script src=/admin/static/js/app.
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><script crossorigin src=https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.min.js></script><script crossorigin src=https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.min.js></script><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel=stylesheet><script src=settings.js></script><title>Expressa Admin</title><link rel=icon href=/admin/favicon.ico><link href=/admin/css/app.1c3232a3.css rel=stylesheet></head><body><div id=app></div><script src=/admin/static/js/app.2dd732d9.js></script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkexpressa_admin=self.webpackChunkexpressa_admin||[]).push([[197,566],{1780:function(t){function e(t,e){var r,i;if("function"==typeof e)void 0!==(i=e(t))&&(t=i);else if(Array.isArray(e))for(r=0;r<e.length;r++)void 0!==(i=e[r](t))&&(t=i);return t}function r(t,e){return"-"===t[0]&&Array.isArray(e)&&/^-\d+$/.test(t)?e.length+parseInt(t,10):t}function i(t){return"[object Object]"===Object.prototype.toString.call(t)}function n(t){return Object(t)===t}function a(t){return 0===Object.keys(t).length}var s=["__proto__","prototype","constructor"],o=function(t){return-1===s.indexOf(t)};function l(t,e){t.indexOf("[")>=0&&(t=t.replace(/\[/g,e).replace(/]/g,""));var r=t.split(e);if(r.filter(o).length!==r.length)throw Error("Refusing to update blacklisted property "+t);return r}var c=Object.prototype.hasOwnProperty;function u(t,e,r,i){if(!(this instanceof u))return new u(t,e,r,i);void 0===e&&(e=!1),void 0===r&&(r=!0),void 0===i&&(i=!0),this.separator=t||".",this.override=e,this.useArray=r,this.useBrackets=i,this.keepArray=!1,this.cleanup=[]}var p=new u(".",!1,!0,!0);function f(t){return function(){return p[t].apply(p,arguments)}}u.prototype._fill=function(t,r,i,s){var o=t.shift();if(t.length>0){if(r[o]=r[o]||(this.useArray&&function(t){return/^\d+$/.test(t)}(t[0])?[]:{}),!n(r[o])){if(!this.override){if(!n(i)||!a(i))throw new Error("Trying to redefine `"+o+"` which is a "+typeof r[o]);return}r[o]={}}this._fill(t,r[o],i,s)}else{if(!this.override&&n(r[o])&&!a(r[o])){if(!n(i)||!a(i))throw new Error("Trying to redefine non-empty obj['"+o+"']");return}r[o]=e(i,s)}},u.prototype.object=function(t,r){var i=this;return Object.keys(t).forEach(function(n){var a=void 0===r?null:r[n],s=l(n,i.separator).join(i.separator);-1!==s.indexOf(i.separator)?(i._fill(s.split(i.separator),t,t[n],a),delete t[n]):t[n]=e(t[n],a)}),t},u.prototype.str=function(t,r,i,n){var a=l(t,this.separator).join(this.separator);return-1!==t.indexOf(this.separator)?this._fill(a.split(this.separator),i,r,n):i[t]=e(r,n),i},u.prototype.pick=function(t,e,i,n){var a,s,o,c,u;for(s=l(t,this.separator),a=0;a<s.length;a++){if(c=r(s[a],e),!e||"object"!=typeof e||!(c in e))return;if(a===s.length-1)return i?(o=e[c],n&&Array.isArray(e)?e.splice(c,1):delete e[c],Array.isArray(e)&&(u=s.slice(0,-1).join("."),-1===this.cleanup.indexOf(u)&&this.cleanup.push(u)),o):e[c];e=e[c]}return i&&Array.isArray(e)&&(e=e.filter(function(t){return void 0!==t})),e},u.prototype.delete=function(t,e){return this.remove(t,e,!0)},u.prototype.remove=function(t,e,r){var i;if(this.cleanup=[],Array.isArray(t)){for(i=0;i<t.length;i++)this.pick(t[i],e,!0,r);return r||this._cleanup(e),e}return this.pick(t,e,!0,r)},u.prototype._cleanup=function(t){var e,r,i,n;if(this.cleanup.length){for(r=0;r<this.cleanup.length;r++)e=(e=(n=(i=this.cleanup[r].split(".")).splice(0,-1).join("."))?this.pick(n,t):t)[i[0]].filter(function(t){return void 0!==t}),this.set(this.cleanup[r],e,t);this.cleanup=[]}},u.prototype.del=u.prototype.remove,u.prototype.move=function(t,r,i,n,a){return"function"==typeof n||Array.isArray(n)?this.set(r,e(this.pick(t,i,!0),n),i,a):(a=n,this.set(r,this.pick(t,i,!0),i,a)),i},u.prototype.transfer=function(t,r,i,n,a,s){return"function"==typeof a||Array.isArray(a)?this.set(r,e(this.pick(t,i,!0),a),n,s):(s=a,this.set(r,this.pick(t,i,!0),n,s)),n},u.prototype.copy=function(t,r,i,n,a,s){return"function"==typeof a||Array.isArray(a)?this.set(r,e(JSON.parse(JSON.stringify(this.pick(t,i,!1))),a),n,s):(s=a,this.set(r,this.pick(t,i,!1),n,s)),n},u.prototype.set=function(t,e,r,n){var a,s,o,u;if(void 0===e)return r;for(o=l(t,this.separator),a=0;a<o.length;a++){if(u=o[a],a===o.length-1)if(n&&i(e)&&i(r[u]))for(s in e)c.call(e,s)&&(r[u][s]=e[s]);else if(n&&Array.isArray(r[u])&&Array.isArray(e))for(var p=0;p<e.length;p++)r[o[a]].push(e[p]);else r[u]=e;else c.call(r,u)&&(i(r[u])||Array.isArray(r[u]))||(/^\d+$/.test(o[a+1])?r[u]=[]:r[u]={});r=r[u]}return r},u.prototype.transform=function(t,e,r){return e=e||{},r=r||{},Object.keys(t).forEach(function(i){this.set(t[i],this.pick(i,e),r)}.bind(this)),r},u.prototype.dot=function(t,e,r){e=e||{},r=r||[];var s=Array.isArray(t);return Object.keys(t).forEach(function(o){var l=s&&this.useBrackets?"["+o+"]":o;if(n(t[o])&&(i(t[o])&&!a(t[o])||Array.isArray(t[o])&&!this.keepArray&&0!==t[o].length)){if(s&&this.useBrackets){var c=r[r.length-1]||"";return this.dot(t[o],e,r.slice(0,-1).concat(c+l))}return this.dot(t[o],e,r.concat(l))}s&&this.useBrackets?e[r.join(this.separator).concat("["+o+"]")]=t[o]:e[r.concat(l).join(this.separator)]=t[o]}.bind(this)),e},u.pick=f("pick"),u.move=f("move"),u.transfer=f("transfer"),u.transform=f("transform"),u.copy=f("copy"),u.object=f("object"),u.str=f("str"),u.set=f("set"),u.delete=f("delete"),u.del=u.remove=f("remove"),u.dot=f("dot"),["override","overwrite"].forEach(function(t){Object.defineProperty(u,t,{get:function(){return p.override},set:function(t){p.override=!!t}})}),["useArray","keepArray","useBrackets"].forEach(function(t){Object.defineProperty(u,t,{get:function(){return p[t]},set:function(e){p[t]=e}})}),u._process=e,t.exports=u},5962:function(t,e,r){r.r(e),r.d(e,{default:function(){return o}});var i=r(4550),n=r(9906),a=r(1780);a.keepArray=!0;var s={name:"Endpoints",mixins:[i.default],data(){return{lastEndpoint:"",apiBaseUrl:n.A.defaults.baseURL,apiSuffix:""}},methods:{async update(){for(;"/"===this.apiSuffix.charAt(0);)this.apiSuffix=this.apiSuffix.substring(1);if(!this.apiSuffix)return;const t=`${this.apiBaseUrl}/${this.apiSuffix}`;t!==this.lastEndpoint&&(this.lastEndpoint=t,this.resetTable());const e={page:this.page,limit:this.pageSize,...this.allFilters,query:void 0},r=this.customParams?`/${this.apiSuffix}?${this.customParams}`:`/${this.apiSuffix}`;let i=(await(0,n.A)({url:r,params:e,baseURL:this.apiBaseUrl})).data;if(!i.page&&!i.itemsTotal&&(Array.isArray(i)||(i="object"!=typeof i?[{result:i}]:[i]),i={data:i,itemsTotal:1}),this.count=i.itemsTotal,this.data=this.applyCustomColumnFilter(i.data),!this.selectedColumns.length){const t=Array.from(this.data.reduce((t,e)=>{const r=a.dot(e);return new Set([...Object.keys(r),...t])},[]));this.selectedColumns=t.slice(0,5),this.allPossibleColumns=t}},applyCustomColumnFilter(t){const e=Object.keys(this.searchFilters);return t.filter(t=>e.every(e=>{const r=this.searchFilters[e];if(!r)return!0;const i=a.dot(t)[e].toString();return this.exactSearches[e]?i.trim()===r.trim():i.toLowerCase().includes(r.toLowerCase())}))},async downloadAllCSV(){let t=[],e=1;for(;this.count>t.length;){const r={...this.allFilters,page:e,limit:500,query:void 0},i=`/${this.apiSuffix}?${this.customParams}`;t=[...(await(0,n.A)({url:i,params:r})).data.data,...t],e+=1}this.downloadCSV(this.applyCustomColumnFilter(t))}}},o=(0,r(4486).A)(s,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"px-3"},[r("div",{staticClass:"d-flex align-items-start py-2"},[r("div",[t._v("\n Endpoint\n\n "),r("div",{staticClass:"d-flex align-items-center mb-2"},[r("el-input",{attrs:{placeholder:"key"},model:{value:t.apiBaseUrl,callback:function(e){t.apiBaseUrl=e},expression:"apiBaseUrl"}}),r("el-input",{model:{value:t.apiSuffix,callback:function(e){t.apiSuffix=e},expression:"apiSuffix"}})],1),t._v("\n\n Params\n "),t._l(t.params,function(e,i){return r("div",{key:i,staticClass:"d-flex align-items-center mb-1"},[r("el-checkbox",{staticClass:"mr-2",model:{value:e.isEnabled,callback:function(r){t.$set(e,"isEnabled",r)},expression:"parameter.isEnabled"}}),r("el-input",{attrs:{placeholder:"key"},on:{input:function(e){t.handleParamKeyChange(i)}},model:{value:e.key,callback:function(r){t.$set(e,"key",r)},expression:"parameter.key"}}),r("el-input",{staticClass:"ml-1",attrs:{placeholder:"value"},model:{value:e.value,callback:function(r){t.$set(e,"value",r)},expression:"parameter.value"}}),t.params.length>1?r("el-button",{attrs:{icon:"el-icon-close",circle:"",type:"text"},on:{click:function(e){t.removeParam(i)}}}):t._e()],1)})],2),r("span",{staticClass:"mx-auto"}),r("div",{staticClass:"d-flex align-items-center"},[r("el-dropdown",{staticClass:"mr-4",attrs:{multiple:"","hide-on-click":!1}},[r("span",{staticClass:"el-dropdown-link"},[t._v("\n Select columns\n "),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),r("el-dropdown-menu",{staticStyle:{"max-height":"300px",overflow:"auto"},attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-checkbox-group",{on:{input:t.update},model:{value:t.selectedColumns,callback:function(e){t.selectedColumns=e},expression:"selectedColumns"}},t._l(t.allPossibleColumns,function(e){return r("el-dropdown-item",{key:e,attrs:{label:e,value:e}},[r("el-checkbox",{staticClass:"mb-0 mr-4",attrs:{label:e,disabled:1===t.selectedColumns.length&&t.selectedColumns[0]===e}})],1)}))],1)],1),r("el-checkbox",{staticClass:"mb-0 mr-4",model:{value:t.isFiltersVisible,callback:function(e){t.isFiltersVisible=e},expression:"isFiltersVisible"}},[t._v("\n Show Filters\n ")]),r("el-pagination",{attrs:{"page-size":t.pageSize,total:t.count,"page-sizes":t.pageSizes,"current-page":t.page,layout:"sizes, prev, pager, next"},on:{"update:currentPage":function(e){t.page=e},"current-change":function(e){t.update()},"size-change":function(e){t.pageSize=e,t.update()}}})],1)]),r("el-button",{staticClass:"btn btn-primary mb-3",on:{click:t.update}},[t._v("\n Search\n ")]),r("el-table",{attrs:{data:t.tableRows,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""},on:{"sort-change":t.handleSortChange}},t._l(t.selectedColumns,function(e){return r("el-table-column",{key:e,attrs:{label:e,prop:e,align:"center",sortable:!0},scopedSlots:t._u([{key:"default",fn:function(i){return[r("div",{staticClass:"text-left"},[0===i.$index&&t.isFiltersVisible?r("div",[r("el-input",{attrs:{placeholder:"Search by "+e,type:"number"===t.getFieldType(e)?"number":"text"},on:{change:function(e){t.update()}},model:{value:t.searchFilters[e],callback:function(r){t.$set(t.searchFilters,e,r)},expression:"searchFilters[name]"}}),r("el-checkbox",{staticClass:"mt-3",attrs:{disabled:"number"===t.getFieldType(e)},on:{change:function(e){t.update()}},model:{value:t.exactSearches[e],callback:function(r){t.$set(t.exactSearches,e,r)},expression:"exactSearches[name]"}},[t._v("\n Exact match\n ")])],1):t._e(),r("span",[t._v(t._s(t.getPath(i.row,e)))])])]}}])})})),t.data.length?r("div",{staticClass:"d-flex align-items-center my-3"},[r("button",{staticClass:"btn btn-secondary download-button mr-2",on:{click:function(e){t.downloadCSV()}}},[t._v("\n Download\n ")]),r("button",{staticClass:"btn btn-secondary download-button",on:{click:function(e){t.downloadAllCSV()}}},[t._v("\n Download All\n ")]),r("span",{staticClass:"mx-auto"}),r("el-pagination",{attrs:{"page-size":t.pageSize,total:t.count,"page-sizes":t.pageSizes,"current-page":t.page,layout:"sizes, prev, pager, next"},on:{"update:currentPage":function(e){t.page=e},"current-change":function(e){t.update()},"size-change":function(e){t.pageSize=e,t.update()}}})],1):t._e()],1)},[],!1,null,null,null).exports}}]);
|
|
Binary file
|