@bagelink/vue 0.0.188 → 0.0.192
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/components/Btn.vue.d.ts +11 -7
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/ListView.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DatePicker.vue.d.ts +20 -0
- package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -0
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts +31 -0
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -0
- package/dist/components/form/inputs/TextInput.vue.d.ts +5 -0
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/index.d.ts +2 -0
- package/dist/components/form/inputs/index.d.ts.map +1 -1
- package/dist/components/formkit/AddressArray.vue.d.ts.map +1 -1
- package/dist/components/formkit/BankDetailsArray.vue.d.ts.map +1 -1
- package/dist/components/formkit/ContactArrayFormKit.vue.d.ts.map +1 -1
- package/dist/index.cjs +13151 -3614
- package/dist/index.mjs +13152 -3615
- package/dist/style.css +597 -366
- package/package.json +6 -2
- package/src/components/Btn.vue +165 -146
- package/src/components/ListView.vue +0 -1
- package/src/components/PersonPreview.vue +1 -1
- package/src/components/TableSchema.vue +79 -70
- package/src/components/form/inputs/DatePicker.vue +169 -0
- package/src/components/form/inputs/RadioPillsInput.vue +89 -0
- package/src/components/form/inputs/TextInput.vue +53 -11
- package/src/components/form/inputs/index.ts +2 -0
- package/src/components/formkit/AddressArray.vue +173 -150
- package/src/components/formkit/BankDetailsArray.vue +197 -174
- package/src/components/formkit/ContactArrayFormKit.vue +140 -123
- package/src/components/formkit/FileUploader.vue +4 -4
- package/src/styles/layout.css +83 -0
- package/src/styles/theme.css +45 -16
|
@@ -1,124 +1,148 @@
|
|
|
1
1
|
<template>
|
|
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
|
-
|
|
2
|
+
<div class="bagel-input">
|
|
3
|
+
<div class="mt-1">
|
|
4
|
+
<div
|
|
5
|
+
class="bglform-contact mb-3"
|
|
6
|
+
v-for="(bank_account, i) in val"
|
|
7
|
+
:key="i"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="bglform-contact-confirm"
|
|
11
|
+
v-if="deleteCandidate === i"
|
|
12
|
+
>
|
|
13
|
+
<p class="txt14">
|
|
14
|
+
{{ formPlaceholders?.sure }}
|
|
15
|
+
</p>
|
|
16
|
+
<Btn
|
|
17
|
+
thin
|
|
18
|
+
color="red"
|
|
19
|
+
@click="deleteContact(bank_account.id)"
|
|
20
|
+
>
|
|
21
|
+
{{ formPlaceholders?.delete }}
|
|
22
|
+
</Btn>
|
|
23
|
+
<Btn
|
|
24
|
+
thin
|
|
25
|
+
@click="deleteCandidate = -1"
|
|
26
|
+
>
|
|
27
|
+
{{ formPlaceholders?.cancel }}
|
|
28
|
+
</Btn>
|
|
29
|
+
</div>
|
|
30
|
+
<Checkbox
|
|
31
|
+
v-model="bank_account.primary"
|
|
32
|
+
@update:model-value="($event) => primaryHandler(i, $event)"
|
|
33
|
+
/>
|
|
34
|
+
<input
|
|
35
|
+
class="bglform-contact-label"
|
|
36
|
+
v-model="bank_account.label"
|
|
37
|
+
type="text"
|
|
38
|
+
:placeholder="formPlaceholders?.label"
|
|
39
|
+
>
|
|
40
|
+
<div class="bglform-contact-address">
|
|
41
|
+
<input
|
|
42
|
+
v-model="bank_account.bank_name"
|
|
43
|
+
:placeholder="formPlaceholders?.bankName"
|
|
44
|
+
type="text"
|
|
45
|
+
required
|
|
46
|
+
>
|
|
47
|
+
<div class="bglform-contact-address-flex">
|
|
48
|
+
<input
|
|
49
|
+
v-model="bank_account.branch"
|
|
50
|
+
:placeholder="formPlaceholders?.bankBranch"
|
|
51
|
+
type="text"
|
|
52
|
+
required
|
|
53
|
+
>
|
|
54
|
+
<input
|
|
55
|
+
v-model="bank_account.account_number"
|
|
56
|
+
:placeholder="formPlaceholders?.bankAccount"
|
|
57
|
+
type="text"
|
|
58
|
+
required
|
|
59
|
+
>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="grid gap-2">
|
|
62
|
+
<input
|
|
63
|
+
v-model="bank_account.bank_account_holder"
|
|
64
|
+
:placeholder="formPlaceholders?.bankAccountHolder"
|
|
65
|
+
type="text"
|
|
66
|
+
required
|
|
67
|
+
>
|
|
68
|
+
<input
|
|
69
|
+
v-model="bank_account.bank_account_holder_id"
|
|
70
|
+
:placeholder="formPlaceholders?.bankAccountHolderID"
|
|
71
|
+
type="text"
|
|
72
|
+
>
|
|
73
|
+
<input
|
|
74
|
+
v-model="bank_account.iban"
|
|
75
|
+
placeholder="IBAN"
|
|
76
|
+
type="text"
|
|
77
|
+
>
|
|
78
|
+
<input
|
|
79
|
+
v-model="bank_account.swift"
|
|
80
|
+
placeholder="SWIFT"
|
|
81
|
+
type="text"
|
|
82
|
+
>
|
|
83
|
+
<input
|
|
84
|
+
v-model="bank_account.bank_address"
|
|
85
|
+
:placeholder="formPlaceholders?.bankAddress"
|
|
86
|
+
type="text"
|
|
87
|
+
>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="bglform-address-del">
|
|
91
|
+
<Btn
|
|
92
|
+
thin
|
|
93
|
+
@click="deleteCandidate = i"
|
|
94
|
+
icon="delete"
|
|
95
|
+
color="gray"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<Btn
|
|
100
|
+
class="add-btn"
|
|
101
|
+
flat
|
|
102
|
+
thin
|
|
103
|
+
@click="val.push({})"
|
|
104
|
+
>
|
|
105
|
+
{{ formPlaceholders?.add }} {{ context?.label }}
|
|
106
|
+
</Btn>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
85
109
|
</template>
|
|
86
110
|
|
|
87
111
|
<script setup lang="ts">
|
|
88
|
-
import { watch } from
|
|
112
|
+
import { watch } from 'vue';
|
|
89
113
|
// import type { BagelField } from '@bagelink/vue';
|
|
90
114
|
|
|
91
|
-
import { Btn, useBagel } from
|
|
92
|
-
import Checkbox from
|
|
115
|
+
import { Btn, useBagel } from '@bagelink/vue';
|
|
116
|
+
import Checkbox from '../form/inputs/Checkbox.vue';
|
|
93
117
|
|
|
94
118
|
export interface BankDetailsContext {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
label?: string;
|
|
120
|
+
id?: string;
|
|
121
|
+
value: any[];
|
|
122
|
+
node: Record<string, any>;
|
|
123
|
+
attrs: {
|
|
124
|
+
formPlaceholders?: {
|
|
125
|
+
sure?: string;
|
|
126
|
+
delete?: string;
|
|
127
|
+
cancel?: string;
|
|
128
|
+
label?: string;
|
|
129
|
+
bankName?: string;
|
|
130
|
+
bankBranch?: string;
|
|
131
|
+
bankAccount?: string;
|
|
132
|
+
bankAccountHolder?: string;
|
|
133
|
+
bankAccountHolderID?: string;
|
|
134
|
+
bankAddress?: string;
|
|
135
|
+
add?: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
114
138
|
}
|
|
115
139
|
const bagel = useBagel();
|
|
116
140
|
|
|
117
141
|
const props = defineProps<{
|
|
118
|
-
|
|
142
|
+
context: BankDetailsContext;
|
|
119
143
|
}>();
|
|
120
144
|
const formPlaceholders = $computed(
|
|
121
|
-
|
|
145
|
+
() => props.context?.attrs?.formPlaceholders,
|
|
122
146
|
);
|
|
123
147
|
|
|
124
148
|
let val = $ref<any[]>([]);
|
|
@@ -126,125 +150,124 @@ let val = $ref<any[]>([]);
|
|
|
126
150
|
let deleteCandidate = $ref<number>(-1);
|
|
127
151
|
|
|
128
152
|
const del = (i: number) => {
|
|
129
|
-
|
|
153
|
+
val.splice(i, 1);
|
|
130
154
|
};
|
|
131
155
|
|
|
132
156
|
const deleteContact = async (id: string) => {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
157
|
+
await bagel.delete(`/person/contact/${id}`);
|
|
158
|
+
const index = val.findIndex((v) => v.id === id);
|
|
159
|
+
deleteCandidate = -1;
|
|
160
|
+
del(index);
|
|
137
161
|
};
|
|
138
162
|
|
|
139
163
|
const primaryHandler = (i: number, isPrimary: boolean) => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
164
|
+
if (!isPrimary) return;
|
|
165
|
+
val?.forEach((contact, index) => {
|
|
166
|
+
if (index !== i) contact.primary = false;
|
|
167
|
+
});
|
|
144
168
|
};
|
|
145
169
|
|
|
146
170
|
watch(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
171
|
+
() => props.context?.value,
|
|
172
|
+
() => {
|
|
173
|
+
val = props.context?.value;
|
|
174
|
+
},
|
|
175
|
+
{ immediate: true },
|
|
152
176
|
);
|
|
153
177
|
|
|
154
178
|
watch(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
179
|
+
() => val,
|
|
180
|
+
() => {
|
|
181
|
+
props.context?.node.input(val);
|
|
182
|
+
},
|
|
159
183
|
);
|
|
160
184
|
</script>
|
|
161
185
|
|
|
162
186
|
<style>
|
|
163
187
|
.bglform-contact-confirm {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
188
|
+
position: absolute;
|
|
189
|
+
background: rgba(255, 255, 255, 0.5);
|
|
190
|
+
height: 100%;
|
|
191
|
+
width: 100%;
|
|
192
|
+
display: flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
justify-content: center;
|
|
195
|
+
gap: 0.5rem;
|
|
196
|
+
backdrop-filter: blur(1px);
|
|
173
197
|
}
|
|
174
198
|
</style>
|
|
175
199
|
<style scoped>
|
|
176
200
|
.bglform-contact {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
201
|
+
display: flex;
|
|
202
|
+
gap: 0.5rem;
|
|
203
|
+
max-width: 700px;
|
|
204
|
+
position: relative;
|
|
181
205
|
}
|
|
182
206
|
|
|
183
207
|
.bglform-contact-label {
|
|
184
|
-
|
|
208
|
+
flex-basis: 140px;
|
|
185
209
|
}
|
|
186
210
|
|
|
187
211
|
.bglform-contact-address {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
212
|
+
display: flex;
|
|
213
|
+
flex-direction: column;
|
|
214
|
+
gap: 0.5rem;
|
|
191
215
|
}
|
|
192
216
|
|
|
193
217
|
.bglform-contact input[type="checkbox"] {
|
|
194
|
-
|
|
195
|
-
|
|
218
|
+
width: 30px;
|
|
219
|
+
min-width: 0;
|
|
196
220
|
}
|
|
197
221
|
|
|
198
222
|
.light.thin.btn-txt.btn {
|
|
199
|
-
|
|
200
|
-
|
|
223
|
+
padding-left: calc(var(--btn-padding) / 4);
|
|
224
|
+
padding-right: calc(var(--btn-padding) / 4);
|
|
201
225
|
}
|
|
202
226
|
|
|
203
227
|
.bglform-address-del {
|
|
204
|
-
|
|
228
|
+
margin-top: 6px;
|
|
205
229
|
}
|
|
206
230
|
|
|
207
231
|
.bglform-contact-address-flex {
|
|
208
|
-
|
|
209
|
-
|
|
232
|
+
display: flex;
|
|
233
|
+
gap: 0.5rem;
|
|
210
234
|
}
|
|
211
235
|
|
|
212
236
|
.add-btn {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
237
|
+
display: flex;
|
|
238
|
+
gap: 0.5rem;
|
|
239
|
+
align-items: center;
|
|
240
|
+
margin-inline-start: 1rem;
|
|
217
241
|
}
|
|
218
242
|
|
|
219
243
|
.add-btn:active {
|
|
220
|
-
|
|
244
|
+
background: none !important;
|
|
221
245
|
}
|
|
222
246
|
|
|
223
247
|
.add-btn::before {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
248
|
+
content: "+";
|
|
249
|
+
font-size: 10px;
|
|
250
|
+
background: var(--bgl-blue-light);
|
|
251
|
+
border-radius: 100%;
|
|
252
|
+
height: 14px;
|
|
253
|
+
width: 14px;
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
justify-content: center;
|
|
257
|
+
color: var(--bgl-primary);
|
|
234
258
|
}
|
|
235
259
|
|
|
236
260
|
.add-btn:hover::before {
|
|
237
|
-
|
|
238
|
-
|
|
261
|
+
background: var(--bgl-primary);
|
|
262
|
+
color: var(--bgl-white);
|
|
239
263
|
}
|
|
240
264
|
|
|
241
265
|
@media screen and (max-width: 910px) {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
266
|
+
.bglform-contact-address-flex {
|
|
267
|
+
flex-wrap: wrap;
|
|
268
|
+
}
|
|
245
269
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
250
|
-
</style>
|
|
270
|
+
.bglform-contact-label {
|
|
271
|
+
min-width: 0;
|
|
272
|
+
}
|
|
273
|
+
}</style>
|