@mixd-id/web-scaffold 0.1.230406030 → 0.1.230406032
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 +1 -1
- package/src/components/Alert.vue +17 -2
- package/src/components/Button.vue +20 -7
- package/src/components/ErrorText.vue +21 -5
- package/src/components/ListPage1.vue +1 -1
- package/src/components/OTPField.vue +0 -5
- package/src/components/Textbox.vue +2 -1
- package/src/utils/importer.js +4 -2
package/package.json
CHANGED
package/src/components/Alert.vue
CHANGED
|
@@ -74,6 +74,9 @@ export default{
|
|
|
74
74
|
else if(this.state.title.status){
|
|
75
75
|
title = 'Error ' + this.state.title.status
|
|
76
76
|
}
|
|
77
|
+
else if(this.state.title.reason && this.state.title.reason.status){
|
|
78
|
+
title = 'Error ' + this.state.title.reason.status
|
|
79
|
+
}
|
|
77
80
|
}
|
|
78
81
|
else{
|
|
79
82
|
title = this.state.title
|
|
@@ -101,6 +104,10 @@ export default{
|
|
|
101
104
|
else if(this.state.title.message){
|
|
102
105
|
description = this.state.title.message
|
|
103
106
|
}
|
|
107
|
+
else if(this.state.title.reason && this.state.title.reason.message &&
|
|
108
|
+
this.state.title.reason.message.message){
|
|
109
|
+
description = this.state.title.reason.message.message
|
|
110
|
+
}
|
|
104
111
|
}
|
|
105
112
|
else{
|
|
106
113
|
description = this.state.description
|
|
@@ -137,7 +144,7 @@ export default{
|
|
|
137
144
|
.alert>*{
|
|
138
145
|
@apply max-h-[60vh] overflow-y-auto bg-base-500 rounded-xl;
|
|
139
146
|
@apply border-[1px] border-text-50;
|
|
140
|
-
@apply min-w-[280px] max-w-[80vw] md:max-w-[
|
|
147
|
+
@apply min-w-[280px] max-w-[80vw] md:max-w-[480px];
|
|
141
148
|
}
|
|
142
149
|
|
|
143
150
|
.cont1{
|
|
@@ -153,7 +160,15 @@ export default{
|
|
|
153
160
|
}
|
|
154
161
|
|
|
155
162
|
.description{
|
|
156
|
-
@apply
|
|
163
|
+
@apply overflow-y-auto whitespace-pre-line text-center;
|
|
164
|
+
overflow-wrap: break-word;
|
|
165
|
+
word-wrap: break-word;
|
|
166
|
+
-ms-word-break: break-all;
|
|
167
|
+
word-break: break-word;
|
|
168
|
+
-ms-hyphens: auto;
|
|
169
|
+
-moz-hyphens: auto;
|
|
170
|
+
-webkit-hyphens: auto;
|
|
171
|
+
hyphens: auto;
|
|
157
172
|
}
|
|
158
173
|
|
|
159
174
|
</style>
|
|
@@ -33,7 +33,10 @@ export default{
|
|
|
33
33
|
default: '' // 0|1|2|3, default: 2
|
|
34
34
|
},
|
|
35
35
|
|
|
36
|
-
state:
|
|
36
|
+
state: {
|
|
37
|
+
type: [ String, Number ], // -1:disabled, 1:normal, 2:loading, default: normal,
|
|
38
|
+
default: 1
|
|
39
|
+
}
|
|
37
40
|
|
|
38
41
|
},
|
|
39
42
|
|
|
@@ -60,14 +63,14 @@ export default{
|
|
|
60
63
|
},
|
|
61
64
|
|
|
62
65
|
computedState(){
|
|
63
|
-
return this.
|
|
66
|
+
return this._state ?? this.state
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
},
|
|
67
70
|
|
|
68
71
|
data(){
|
|
69
72
|
return {
|
|
70
|
-
_state:
|
|
73
|
+
_state: null
|
|
71
74
|
}
|
|
72
75
|
},
|
|
73
76
|
|
|
@@ -79,6 +82,10 @@ export default{
|
|
|
79
82
|
|
|
80
83
|
setState(state){
|
|
81
84
|
this._state = state
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
resetState(){
|
|
88
|
+
this._state = null
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
}
|
|
@@ -143,19 +150,22 @@ export default{
|
|
|
143
150
|
fill: #fff;
|
|
144
151
|
fill-opacity: 75%;
|
|
145
152
|
}
|
|
153
|
+
.variant-primary:disabled{
|
|
154
|
+
@apply bg-primary-500 border-primary-500 opacity-50 top-0 left-0 cursor-not-allowed;
|
|
155
|
+
}
|
|
146
156
|
|
|
147
157
|
.variant-outline{
|
|
148
158
|
@apply bg-transparent text-primary-500 border-[2px] border-primary-500;
|
|
149
159
|
}
|
|
150
160
|
.variant-outline:hover{
|
|
151
|
-
@apply border-primary-
|
|
161
|
+
@apply border-primary-500 text-text;
|
|
152
162
|
}
|
|
153
163
|
.variant-outline:active{
|
|
154
164
|
@apply top-[1px] left-[1px] active:relative;
|
|
155
165
|
}
|
|
156
166
|
.variant-outline:disabled{
|
|
157
167
|
@apply opacity-50 top-0 left-0 cursor-not-allowed;
|
|
158
|
-
@apply text-
|
|
168
|
+
@apply text-text border-primary-500;
|
|
159
169
|
}
|
|
160
170
|
.variant-outline *{
|
|
161
171
|
@apply text-primary-500 fill-primary-500;
|
|
@@ -173,7 +183,7 @@ export default{
|
|
|
173
183
|
}
|
|
174
184
|
|
|
175
185
|
.variant-secondary{
|
|
176
|
-
@apply bg-secondary text-
|
|
186
|
+
@apply bg-secondary text-white rounded-md border-[2px] border-secondary;
|
|
177
187
|
}
|
|
178
188
|
.variant-secondary:hover{
|
|
179
189
|
@apply bg-secondary-600 border-secondary-600;
|
|
@@ -185,7 +195,7 @@ export default{
|
|
|
185
195
|
@apply bg-secondary-500 border-secondary-500 opacity-50 top-0 left-0 cursor-not-allowed;
|
|
186
196
|
}
|
|
187
197
|
.variant-secondary *{
|
|
188
|
-
@apply text-
|
|
198
|
+
@apply text-white fill-white;
|
|
189
199
|
}
|
|
190
200
|
.variant-secondary.loading *{
|
|
191
201
|
@apply fill-transparent
|
|
@@ -204,6 +214,9 @@ export default{
|
|
|
204
214
|
}
|
|
205
215
|
.variant-minimal:hover{
|
|
206
216
|
}
|
|
217
|
+
.variant-minimal:active{
|
|
218
|
+
@apply top-[1px] left-[1px] relative;
|
|
219
|
+
}
|
|
207
220
|
.variant-minimal .svgBg{
|
|
208
221
|
stroke: var(--base-500);
|
|
209
222
|
stroke-opacity: 25%;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp" v-if="error" @click="$emit('dismissError')">
|
|
3
3
|
<div v-if="error.response && error.response.data && error.response.data.errors">
|
|
4
|
-
<div v-
|
|
4
|
+
<div v-if="typeof error.response.data.errors === 'string'">{{ error.response.data.errors }}</div>
|
|
5
|
+
<div v-else v-for="(text, key) in error.response.data.errors">
|
|
5
6
|
<div v-if="!errorKey || key === errorKey">
|
|
6
7
|
<div v-for="txt in text">{{ txt }}</div>
|
|
7
8
|
</div>
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
</div>
|
|
10
11
|
<div v-else-if="error.message" class="p-2 bg-base-500">{{ error.message }}</div>
|
|
11
12
|
<div v-else>
|
|
12
|
-
|
|
13
|
+
|
|
13
14
|
</div>
|
|
14
15
|
</div>
|
|
15
16
|
</template>
|
|
@@ -18,9 +19,24 @@
|
|
|
18
19
|
|
|
19
20
|
export default{
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
data(){
|
|
23
|
+
return {
|
|
24
|
+
error: null,
|
|
25
|
+
errorKey: null
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
methods: {
|
|
30
|
+
|
|
31
|
+
show(err, key){
|
|
32
|
+
this.error = err
|
|
33
|
+
this.errorKey = key
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
hide(){
|
|
37
|
+
this.error = this.errorKey = null
|
|
38
|
+
}
|
|
39
|
+
|
|
24
40
|
}
|
|
25
41
|
|
|
26
42
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="overflow-hidden hidden md:block">
|
|
15
15
|
<slot v-if="$slots['lp-search']" name="lp-search" :preset="preset"/>
|
|
16
16
|
<Textbox v-else :clearable="true" :placeholder="$t('Search...')" class="w-[200px]" v-model="preset.search"
|
|
17
|
-
@clear="clearSearch" @
|
|
17
|
+
@clear="clearSearch" @keyup.enter="load">
|
|
18
18
|
<template #start>
|
|
19
19
|
<div class="px-2">
|
|
20
20
|
<svg width="16" height="16" class="fill-text-300" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
:value="typeof modelValue === 'string' ? modelValue.split('')[i - 1] : ''"
|
|
7
7
|
@paste="verifyPaste" @keyup="verifyKeyUp($event, i - 1)" />
|
|
8
8
|
</div>
|
|
9
|
-
<ErrorText :error="error" :errorKey="errorKey" @dismissError="$emit('dismissError')"
|
|
10
|
-
:class="$style.errorText + (errorClass ? ' ' + errorClass : '')"/>
|
|
11
9
|
</div>
|
|
12
10
|
</template>
|
|
13
11
|
|
|
@@ -16,9 +14,6 @@
|
|
|
16
14
|
export default{
|
|
17
15
|
|
|
18
16
|
props: {
|
|
19
|
-
error: Object,
|
|
20
|
-
errorKey: String,
|
|
21
|
-
errorClass: String,
|
|
22
17
|
|
|
23
18
|
modelValue: String,
|
|
24
19
|
|
|
@@ -149,7 +149,8 @@ export default{
|
|
|
149
149
|
|
|
150
150
|
.textbox{
|
|
151
151
|
@apply min-h-[var(--h-cp)];
|
|
152
|
-
@apply flex items-center border-[1px] border-text-200 bg-base-50
|
|
152
|
+
@apply flex items-center border-[1px] border-text-200 bg-base-50;
|
|
153
|
+
@apply rounded-lg overflow-hidden;
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
.textbox input:read-only{
|
package/src/utils/importer.js
CHANGED
|
@@ -133,8 +133,10 @@ const importRequest = async(req) => {
|
|
|
133
133
|
|
|
134
134
|
for(let idx in keys){
|
|
135
135
|
const key = keys[idx]
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
if(key.value && columnAddress[key.value]){
|
|
137
|
+
const cell = row.getCell(columnAddress[key.value])
|
|
138
|
+
obj[key.key] = cell.formulaType === 1 ? cell.result : cell.value
|
|
139
|
+
}
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
rows.push(unflatten(obj))
|