@bagelink/vue 0.0.130 → 0.0.134
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/DataPreview.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/formkit/AddressArray.vue.d.ts +17 -24
- package/dist/components/formkit/AddressArray.vue.d.ts.map +1 -1
- package/dist/components/formkit/BankDetailsArray.vue.d.ts +19 -28
- package/dist/components/formkit/BankDetailsArray.vue.d.ts.map +1 -1
- package/dist/components/formkit/index.d.ts +2 -0
- package/dist/components/formkit/index.d.ts.map +1 -1
- package/dist/index.cjs +54 -48
- package/dist/index.mjs +54 -48
- package/dist/style.css +50 -50
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/DataPreview.vue +2 -2
- package/src/components/FileUploader.vue +5 -5
- package/src/components/FormKitTable.vue +1 -1
- package/src/components/TableSchema.vue +2 -3
- package/src/components/form/ItemRef.vue +1 -1
- package/src/components/form/inputs/ColorPicker.vue +1 -1
- package/src/components/formkit/AddressArray.vue +27 -21
- package/src/components/formkit/BankDetailsArray.vue +29 -25
- package/src/components/formkit/index.ts +3 -0
- package/src/utils/index.ts +0 -7
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</Transition>
|
|
17
17
|
<div class="img-label">
|
|
18
18
|
<p>
|
|
19
|
-
{{
|
|
19
|
+
{{ dragDropLabel }} <span>{{ browseLabel }}</span>
|
|
20
20
|
</p>
|
|
21
21
|
</div>
|
|
22
22
|
<div class="uploading-wrap">
|
|
@@ -75,16 +75,16 @@ const props = withDefaults(
|
|
|
75
75
|
private?: 1 | 0;
|
|
76
76
|
singleFile?: boolean;
|
|
77
77
|
beforeUpload?: () => Promise<any>;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
browse: string
|
|
81
|
-
}
|
|
78
|
+
dragDropLabel?: string;
|
|
79
|
+
browseLabel?: string;
|
|
82
80
|
}>(),
|
|
83
81
|
{
|
|
84
82
|
private: 0,
|
|
85
83
|
entity: '',
|
|
86
84
|
id: '',
|
|
87
85
|
beforeUpload: async () => { },
|
|
86
|
+
dragDropLabel: 'Drag and drop your files here',
|
|
87
|
+
browseLabel: 'Browse',
|
|
88
88
|
},
|
|
89
89
|
);
|
|
90
90
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="table-list-wrap h-100">
|
|
3
|
-
<!-- <div v-for="field in schema" :key="field.id">{{ parseLocale(field.label) }}</div> -->
|
|
4
3
|
<table class="infinite-wrapper">
|
|
5
4
|
<thead class="row first-row">
|
|
6
5
|
<th
|
|
@@ -10,7 +9,7 @@
|
|
|
10
9
|
@click="sort(field.id)"
|
|
11
10
|
>
|
|
12
11
|
<div class="flex">
|
|
13
|
-
{{
|
|
12
|
+
{{ field?.label || field?.id }}
|
|
14
13
|
<div
|
|
15
14
|
class="list-arrows"
|
|
16
15
|
:class="{ sorted: sortField === field.id }"
|
|
@@ -65,7 +64,7 @@
|
|
|
65
64
|
|
|
66
65
|
<script setup lang="ts">
|
|
67
66
|
import { useSlots } from 'vue';
|
|
68
|
-
import { MaterialIcon
|
|
67
|
+
import { MaterialIcon } from '@bagelink/vue';
|
|
69
68
|
|
|
70
69
|
const slots = useSlots();
|
|
71
70
|
const loading = $ref(true);
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
v-if="deleteCandidate === i"
|
|
12
12
|
>
|
|
13
13
|
<p class="txt14">
|
|
14
|
-
{{
|
|
14
|
+
{{ context?.formPlaceholders?.sure }}
|
|
15
15
|
</p>
|
|
16
16
|
<Btn
|
|
17
17
|
thin
|
|
18
18
|
color="red"
|
|
19
19
|
@click="deleteContact(address.id)"
|
|
20
20
|
>
|
|
21
|
-
{{
|
|
21
|
+
{{ context?.formPlaceholders?.delete }}
|
|
22
22
|
</Btn>
|
|
23
23
|
<Btn
|
|
24
24
|
thin
|
|
25
25
|
@click="deleteCandidate = -1"
|
|
26
26
|
>
|
|
27
|
-
{{
|
|
27
|
+
{{ context?.formPlaceholders?.cancel }}
|
|
28
28
|
</Btn>
|
|
29
29
|
</div>
|
|
30
30
|
<Checkbox
|
|
@@ -35,29 +35,29 @@
|
|
|
35
35
|
class="bglform-contact-label"
|
|
36
36
|
v-model="address.label"
|
|
37
37
|
type="text"
|
|
38
|
-
:placeholder="
|
|
38
|
+
:placeholder="context?.formPlaceholders?.label"
|
|
39
39
|
>
|
|
40
40
|
<div class="bglform-contact-address">
|
|
41
41
|
<input
|
|
42
42
|
v-model="address.street"
|
|
43
|
-
:placeholder="
|
|
43
|
+
:placeholder="context?.formPlaceholders?.street"
|
|
44
44
|
type="text"
|
|
45
45
|
>
|
|
46
46
|
<div class="bglform-contact-address-flex">
|
|
47
47
|
<input
|
|
48
48
|
v-model="address.city"
|
|
49
|
-
:placeholder="
|
|
49
|
+
:placeholder="context?.formPlaceholders?.city"
|
|
50
50
|
type="text"
|
|
51
51
|
>
|
|
52
52
|
<input
|
|
53
53
|
v-model="address.postal_code"
|
|
54
|
-
:placeholder="
|
|
54
|
+
:placeholder="context?.formPlaceholders?.zip"
|
|
55
55
|
type="text"
|
|
56
56
|
>
|
|
57
57
|
</div>
|
|
58
58
|
<input
|
|
59
59
|
v-model="address.country"
|
|
60
|
-
:placeholder="
|
|
60
|
+
:placeholder="context?.formPlaceholders?.country"
|
|
61
61
|
type="text"
|
|
62
62
|
>
|
|
63
63
|
</div>
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
thin
|
|
78
78
|
@click="addNew"
|
|
79
79
|
>
|
|
80
|
-
{{
|
|
80
|
+
{{ context?.formPlaceholders?.add }}
|
|
81
81
|
{{ context?.label }}
|
|
82
82
|
</Btn>
|
|
83
83
|
</div>
|
|
@@ -91,20 +91,26 @@ import { watch } from 'vue';
|
|
|
91
91
|
import { Btn, useBagel } from '@bagelink/vue';
|
|
92
92
|
import Checkbox from '../form/inputs/Checkbox.vue';
|
|
93
93
|
|
|
94
|
+
export interface AddressArrContext {
|
|
95
|
+
|
|
96
|
+
label?: string;
|
|
97
|
+
formPlaceholders?: {
|
|
98
|
+
add?: string;
|
|
99
|
+
cancel?: string;
|
|
100
|
+
city?: string;
|
|
101
|
+
country?: string;
|
|
102
|
+
delete?: string;
|
|
103
|
+
label?: string;
|
|
104
|
+
sure?: string;
|
|
105
|
+
zip?: string;
|
|
106
|
+
street?: string;
|
|
107
|
+
};
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
|
|
110
|
+
}
|
|
94
111
|
const bagel = useBagel();
|
|
95
112
|
const props = defineProps<{
|
|
96
|
-
context:
|
|
97
|
-
form: {
|
|
98
|
-
add: string;
|
|
99
|
-
cancel: string;
|
|
100
|
-
city: string;
|
|
101
|
-
country: string;
|
|
102
|
-
delete: string;
|
|
103
|
-
label: string;
|
|
104
|
-
sure: string;
|
|
105
|
-
zip: string;
|
|
106
|
-
street: string;
|
|
107
|
-
};
|
|
113
|
+
context: AddressArrContext
|
|
108
114
|
}>();
|
|
109
115
|
|
|
110
116
|
let val = $ref<any[]>([]);
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
v-if="deleteCandidate === i"
|
|
12
12
|
>
|
|
13
13
|
<p class="txt14">
|
|
14
|
-
{{
|
|
14
|
+
{{ context?.formPlaceholders?.sure }}
|
|
15
15
|
</p>
|
|
16
16
|
<Btn
|
|
17
17
|
thin
|
|
18
18
|
color="red"
|
|
19
19
|
@click="deleteContact(bank_account.id)"
|
|
20
20
|
>
|
|
21
|
-
{{
|
|
21
|
+
{{ context?.formPlaceholders?.delete }}
|
|
22
22
|
</Btn>
|
|
23
23
|
<Btn
|
|
24
24
|
thin
|
|
25
25
|
@click="deleteCandidate = -1"
|
|
26
26
|
>
|
|
27
|
-
{{
|
|
27
|
+
{{ context?.formPlaceholders?.cancel }}
|
|
28
28
|
</Btn>
|
|
29
29
|
</div>
|
|
30
30
|
<Checkbox
|
|
@@ -35,25 +35,25 @@
|
|
|
35
35
|
class="bglform-contact-label"
|
|
36
36
|
v-model="bank_account.label"
|
|
37
37
|
type="text"
|
|
38
|
-
:placeholder="
|
|
38
|
+
:placeholder="context?.formPlaceholders?.label"
|
|
39
39
|
>
|
|
40
40
|
<div class="bglform-contact-address">
|
|
41
41
|
<input
|
|
42
42
|
v-model="bank_account.bank_name"
|
|
43
|
-
:placeholder="
|
|
43
|
+
:placeholder="context?.formPlaceholders?.bankName"
|
|
44
44
|
type="text"
|
|
45
45
|
required
|
|
46
46
|
>
|
|
47
47
|
<div class="bglform-contact-address-flex">
|
|
48
48
|
<input
|
|
49
49
|
v-model="bank_account.branch"
|
|
50
|
-
:placeholder="
|
|
50
|
+
:placeholder="context?.formPlaceholders?.bankBranch"
|
|
51
51
|
type="text"
|
|
52
52
|
required
|
|
53
53
|
>
|
|
54
54
|
<input
|
|
55
55
|
v-model="bank_account.account_number"
|
|
56
|
-
:placeholder="
|
|
56
|
+
:placeholder="context?.formPlaceholders?.bankAccount"
|
|
57
57
|
type="text"
|
|
58
58
|
required
|
|
59
59
|
>
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
<div class="grid gap-2">
|
|
62
62
|
<input
|
|
63
63
|
v-model="bank_account.bank_account_holder"
|
|
64
|
-
:placeholder="
|
|
64
|
+
:placeholder="context?.formPlaceholders?.bankAccountHolder"
|
|
65
65
|
type="text"
|
|
66
66
|
required
|
|
67
67
|
>
|
|
68
68
|
<input
|
|
69
69
|
v-model="bank_account.bank_account_holder_id"
|
|
70
|
-
:placeholder="
|
|
70
|
+
:placeholder="context?.formPlaceholders?.bankAccountHolderID"
|
|
71
71
|
type="text"
|
|
72
72
|
>
|
|
73
73
|
<input
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
>
|
|
83
83
|
<input
|
|
84
84
|
v-model="bank_account.bank_address"
|
|
85
|
-
:placeholder="
|
|
85
|
+
:placeholder="context?.formPlaceholders?.bankAddress"
|
|
86
86
|
type="text"
|
|
87
87
|
>
|
|
88
88
|
</div>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
thin
|
|
104
104
|
@click="val.push({})"
|
|
105
105
|
>
|
|
106
|
-
{{
|
|
106
|
+
{{ context?.formPlaceholders?.add }} {{ context?.label }}
|
|
107
107
|
</Btn>
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
@@ -116,23 +116,27 @@ import { watch } from 'vue';
|
|
|
116
116
|
import { Btn, useBagel } from '@bagelink/vue';
|
|
117
117
|
import Checkbox from '../form/inputs/Checkbox.vue';
|
|
118
118
|
|
|
119
|
+
export interface BankDetailsContext {
|
|
120
|
+
label?: string;
|
|
121
|
+
formPlaceholders?: {
|
|
122
|
+
sure?: string;
|
|
123
|
+
delete?: string;
|
|
124
|
+
cancel?: string;
|
|
125
|
+
label?: string;
|
|
126
|
+
bankName?: string;
|
|
127
|
+
bankBranch?: string;
|
|
128
|
+
bankAccount?: string;
|
|
129
|
+
bankAccountHolder?: string;
|
|
130
|
+
bankAccountHolderID?: string;
|
|
131
|
+
bankAddress?: string;
|
|
132
|
+
add?: string;
|
|
133
|
+
};
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
}
|
|
119
136
|
const bagel = useBagel();
|
|
120
137
|
|
|
121
138
|
const props = defineProps<{
|
|
122
|
-
context:
|
|
123
|
-
form: {
|
|
124
|
-
sure: string
|
|
125
|
-
delete: string
|
|
126
|
-
cancel: string
|
|
127
|
-
label: string
|
|
128
|
-
bankName: string
|
|
129
|
-
bankBranch: string
|
|
130
|
-
bankAccount: string
|
|
131
|
-
bankAccountHolder: string
|
|
132
|
-
bankAccountHolderID: string
|
|
133
|
-
bankAddress: string
|
|
134
|
-
add: string
|
|
135
|
-
}
|
|
139
|
+
context: BankDetailsContext;
|
|
136
140
|
}>();
|
|
137
141
|
|
|
138
142
|
let val = $ref<any[]>([]);
|
package/src/utils/index.ts
CHANGED
|
@@ -50,11 +50,4 @@ export const useFormkit = () => {
|
|
|
50
50
|
|
|
51
51
|
export const initials = (...strArr: string[]) => strArr.map((str) => str?.charAt(0)).join('');
|
|
52
52
|
|
|
53
|
-
export const parseLocale = (str: string, i18nT = (_str: string) => _str) => {
|
|
54
|
-
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
55
|
-
const [_, w] = str.split(/\$t\('?"?|'?"?\)/);
|
|
56
|
-
if (!w) return str;
|
|
57
|
-
return i18nT(w);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
53
|
export { formatString } from './strings';
|