sprintify-ui 0.1.15 → 0.1.16
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/README.md +1 -26
- package/dist/sprintify-ui.es.js +11935 -11825
- package/dist/style.css +1 -1
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +1 -1
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +2 -2
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +1 -1
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFileUploader.vue.d.ts +1 -1
- package/dist/types/src/components/BaseHeader.vue.d.ts +1 -1
- package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +1 -1
- package/dist/types/src/components/BaseMediaListItem.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNumber.vue.d.ts +3 -3
- package/dist/types/src/components/BaseTableColumn.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +1 -1
- package/dist/types/src/composables/mediaQuery.d.ts +2 -2
- package/dist/types/src/i18n/index.d.ts +1 -0
- package/dist/types/src/index.d.ts +0 -178
- package/dist/types/src/stores/i18n.d.ts +5 -0
- package/package.json +7 -6
- package/src/components/BaseAddressForm.vue +8 -7
- package/src/components/BaseAutocomplete.vue +3 -3
- package/src/components/BaseAutocompleteDrawer.vue +2 -1
- package/src/components/BaseAutocompleteFetch.vue +2 -1
- package/src/components/BaseCharacterCounter.vue +2 -1
- package/src/components/BaseClipboard.vue +4 -2
- package/src/components/BaseCropper.vue +2 -5
- package/src/components/BaseCropperModal.vue +3 -2
- package/src/components/BaseDataIterator.vue +6 -7
- package/src/components/BaseDataTable.vue +14 -14
- package/src/components/BaseDatePicker.vue +4 -4
- package/src/components/BaseDateSelect.vue +10 -10
- package/src/components/BaseDialog.vue +5 -6
- package/src/components/BaseDisplayRelativeTime.vue +6 -6
- package/src/components/BaseFilePicker.vue +7 -8
- package/src/components/BaseFileUploader.vue +3 -3
- package/src/components/BaseForm.vue +3 -3
- package/src/components/BaseIconPicker.vue +2 -1
- package/src/components/BaseLayoutNotificationDropdown.vue +3 -2
- package/src/components/BaseMediaLibrary.vue +8 -11
- package/src/components/BaseMediaListItem.vue +4 -3
- package/src/components/BaseNumber.vue +25 -5
- package/src/components/BasePagination.vue +4 -3
- package/src/components/BaseReadMore.vue +2 -1
- package/src/components/BaseSelect.vue +3 -2
- package/src/components/BaseTagAutocomplete.vue +4 -4
- package/src/components/BaseTagAutocompleteFetch.vue +3 -2
- package/src/composables/mediaQuery.ts +2 -2
- package/src/i18n/index.ts +60 -0
- package/src/index.ts +11 -11
- package/src/stores/dialogs.ts +3 -3
- package/src/stores/i18n.ts +14 -0
- package/src/utils/fileSizeFormat.ts +6 -6
- package/src/utils/toHumanList.ts +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { App } from 'vue';
|
|
3
|
-
import { I18n } from 'vue-i18n';
|
|
4
3
|
import { useDialogsStore } from './stores/dialogs';
|
|
5
4
|
import { useNotificationsStore } from './stores/notifications';
|
|
6
5
|
import { useSystemAlertStore } from './stores/systemAlerts';
|
|
@@ -187,7 +186,6 @@ import { Locales } from './types';
|
|
|
187
186
|
import { Country } from './types/Country';
|
|
188
187
|
import { Region } from './types/Region';
|
|
189
188
|
export interface Options {
|
|
190
|
-
i18n?: I18n<typeof messages, {}, {}, string, true>;
|
|
191
189
|
http?: AxiosInstance;
|
|
192
190
|
upload_url?: string;
|
|
193
191
|
locales?: Locales;
|
|
@@ -197,182 +195,6 @@ export interface Options {
|
|
|
197
195
|
regions?: Region[];
|
|
198
196
|
}
|
|
199
197
|
declare const config: {
|
|
200
|
-
i18n: I18n<{
|
|
201
|
-
en: {
|
|
202
|
-
cancel: string;
|
|
203
|
-
cropper: string;
|
|
204
|
-
drag_to_reposition: string;
|
|
205
|
-
save: string;
|
|
206
|
-
sui: {
|
|
207
|
-
address: string;
|
|
208
|
-
address_1_placeholder: string;
|
|
209
|
-
address_2_description: string;
|
|
210
|
-
and: string;
|
|
211
|
-
apply: string;
|
|
212
|
-
apply_filters: string;
|
|
213
|
-
autocomplete_placeholder: string;
|
|
214
|
-
cancel: string;
|
|
215
|
-
city: string;
|
|
216
|
-
clear: string;
|
|
217
|
-
click_or_select_date: string;
|
|
218
|
-
click_to_copy: string;
|
|
219
|
-
columns: string;
|
|
220
|
-
confirm: string;
|
|
221
|
-
copied: string;
|
|
222
|
-
country: string;
|
|
223
|
-
create_new: string;
|
|
224
|
-
day: string;
|
|
225
|
-
delete: string;
|
|
226
|
-
delete_record: string;
|
|
227
|
-
delete_record_description: string;
|
|
228
|
-
deselect_all: string;
|
|
229
|
-
download: string;
|
|
230
|
-
drag_to_reposition: string;
|
|
231
|
-
drop_or_click_to_upload: string;
|
|
232
|
-
edit: string;
|
|
233
|
-
error: string;
|
|
234
|
-
file_must_be_of_type: string;
|
|
235
|
-
filters: string;
|
|
236
|
-
go_to_page: string;
|
|
237
|
-
invalid_value: string;
|
|
238
|
-
just_now: string;
|
|
239
|
-
maximum_x_decimal_places: string;
|
|
240
|
-
min_x_characters: string;
|
|
241
|
-
month: string;
|
|
242
|
-
more: string;
|
|
243
|
-
next: string;
|
|
244
|
-
next_month: string;
|
|
245
|
-
none: string;
|
|
246
|
-
nothing_found: string;
|
|
247
|
-
notifications_empty: string;
|
|
248
|
-
of: string;
|
|
249
|
-
or: string;
|
|
250
|
-
page: string;
|
|
251
|
-
pagination_detail_1: string;
|
|
252
|
-
pagination_detail_2: string;
|
|
253
|
-
postal_code_zip_code: string;
|
|
254
|
-
previous: string;
|
|
255
|
-
previous_month: string;
|
|
256
|
-
read_more: string;
|
|
257
|
-
region: string;
|
|
258
|
-
remove: string;
|
|
259
|
-
remove_file: string;
|
|
260
|
-
remove_file_description: string;
|
|
261
|
-
save: string;
|
|
262
|
-
search: string;
|
|
263
|
-
see_all_notifications: string;
|
|
264
|
-
select_an_item: string;
|
|
265
|
-
select_an_option: string;
|
|
266
|
-
success: string;
|
|
267
|
-
the_file_size_must_not_exceed_x: string;
|
|
268
|
-
the_file_type_is_invalid: string;
|
|
269
|
-
type_to_start_your_search: string;
|
|
270
|
-
units: {
|
|
271
|
-
b: string;
|
|
272
|
-
gb: string;
|
|
273
|
-
kb: string;
|
|
274
|
-
mb: string;
|
|
275
|
-
tb: string;
|
|
276
|
-
};
|
|
277
|
-
up_to_x: string;
|
|
278
|
-
upload_failed: string;
|
|
279
|
-
whoops: string;
|
|
280
|
-
x_ago: string;
|
|
281
|
-
x_rows_selected: string;
|
|
282
|
-
year: string;
|
|
283
|
-
yes_delete: string;
|
|
284
|
-
you_can_upload_up_to_n_files: string;
|
|
285
|
-
you_cannot_select_more_than_x_items: string;
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
fr: {
|
|
289
|
-
cancel: string;
|
|
290
|
-
cropper: string;
|
|
291
|
-
drag_to_reposition: string;
|
|
292
|
-
save: string;
|
|
293
|
-
sui: {
|
|
294
|
-
address: string;
|
|
295
|
-
address_1_placeholder: string;
|
|
296
|
-
address_2_description: string;
|
|
297
|
-
and: string;
|
|
298
|
-
apply: string;
|
|
299
|
-
apply_filters: string;
|
|
300
|
-
autocomplete_placeholder: string;
|
|
301
|
-
cancel: string;
|
|
302
|
-
city: string;
|
|
303
|
-
clear: string;
|
|
304
|
-
click_or_select_date: string;
|
|
305
|
-
click_to_copy: string;
|
|
306
|
-
columns: string;
|
|
307
|
-
confirm: string;
|
|
308
|
-
copied: string;
|
|
309
|
-
country: string;
|
|
310
|
-
create_new: string;
|
|
311
|
-
day: string;
|
|
312
|
-
delete: string;
|
|
313
|
-
delete_record: string;
|
|
314
|
-
delete_record_description: string;
|
|
315
|
-
deselect_all: string;
|
|
316
|
-
download: string;
|
|
317
|
-
drag_to_reposition: string;
|
|
318
|
-
drop_or_click_to_upload: string;
|
|
319
|
-
edit: string;
|
|
320
|
-
error: string;
|
|
321
|
-
file_must_be_of_type: string;
|
|
322
|
-
filters: string;
|
|
323
|
-
go_to_page: string;
|
|
324
|
-
invalid_value: string;
|
|
325
|
-
just_now: string;
|
|
326
|
-
maximum_x_decimal_places: string;
|
|
327
|
-
min_x_characters: string;
|
|
328
|
-
month: string;
|
|
329
|
-
more: string;
|
|
330
|
-
next: string;
|
|
331
|
-
next_month: string;
|
|
332
|
-
none: string;
|
|
333
|
-
nothing_found: string;
|
|
334
|
-
notifications_empty: string;
|
|
335
|
-
of: string;
|
|
336
|
-
or: string;
|
|
337
|
-
page: string;
|
|
338
|
-
pagination_detail_1: string;
|
|
339
|
-
pagination_detail_2: string;
|
|
340
|
-
postal_code_zip_code: string;
|
|
341
|
-
previous: string;
|
|
342
|
-
previous_month: string;
|
|
343
|
-
read_more: string;
|
|
344
|
-
region: string;
|
|
345
|
-
remove: string;
|
|
346
|
-
remove_file: string;
|
|
347
|
-
remove_file_description: string;
|
|
348
|
-
save: string;
|
|
349
|
-
search: string;
|
|
350
|
-
see_all_notifications: string;
|
|
351
|
-
select_an_item: string;
|
|
352
|
-
select_an_option: string;
|
|
353
|
-
success: string;
|
|
354
|
-
the_file_size_must_not_exceed_x: string;
|
|
355
|
-
the_file_type_is_invalid: string;
|
|
356
|
-
type_to_start_your_search: string;
|
|
357
|
-
units: {
|
|
358
|
-
b: string;
|
|
359
|
-
gb: string;
|
|
360
|
-
kb: string;
|
|
361
|
-
mb: string;
|
|
362
|
-
tb: string;
|
|
363
|
-
};
|
|
364
|
-
up_to_x: string;
|
|
365
|
-
upload_failed: string;
|
|
366
|
-
whoops: string;
|
|
367
|
-
x_ago: string;
|
|
368
|
-
x_rows_selected: string;
|
|
369
|
-
year: string;
|
|
370
|
-
yes_delete: string;
|
|
371
|
-
you_can_upload_up_to_n_files: string;
|
|
372
|
-
you_cannot_select_more_than_x_items: string;
|
|
373
|
-
};
|
|
374
|
-
};
|
|
375
|
-
}, {}, {}, string, true>;
|
|
376
198
|
http: AxiosInstance;
|
|
377
199
|
locales: Locales;
|
|
378
200
|
upload_url: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sprintify-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
6
6
|
"build-fast": "rimraf dist && vite build",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"storybook": "start-storybook -p 6006",
|
|
11
11
|
"build-storybook": "build-storybook",
|
|
12
12
|
"prepack": "npm run build",
|
|
13
|
-
"prepare": "husky install",
|
|
13
|
+
"prepare": "husky install && relative-deps",
|
|
14
14
|
"release": "standard-version",
|
|
15
15
|
"commit": "cz"
|
|
16
16
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@tailwindcss/line-clamp": "^0.4.2",
|
|
21
21
|
"@tailwindcss/typography": "^0.5.8",
|
|
22
22
|
"@vueup/vue-quill": "^1.0.0",
|
|
23
|
-
"@vueuse/core": "^
|
|
23
|
+
"@vueuse/core": "^10.0.0",
|
|
24
24
|
"axios": "^0.26.1",
|
|
25
25
|
"croppie": "^2.6.5",
|
|
26
26
|
"flatpickr": "^4.6.13",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"sortablejs": "^1.15.0",
|
|
36
36
|
"tailwindcss": "^3.0.0",
|
|
37
37
|
"vue": "^3.0.0",
|
|
38
|
-
"vue-i18n": "^9.0.0",
|
|
39
38
|
"vue-router": "^4.0.0"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
@@ -71,7 +70,7 @@
|
|
|
71
70
|
"@vitejs/plugin-vue": "^4.0.0",
|
|
72
71
|
"@vue/eslint-config-typescript": "^11.0.2",
|
|
73
72
|
"@vueup/vue-quill": "^1.1.0",
|
|
74
|
-
"@vueuse/core": "^
|
|
73
|
+
"@vueuse/core": "^10.0.2",
|
|
75
74
|
"autoprefixer": "^10.4.13",
|
|
76
75
|
"axios": "^0.26.1",
|
|
77
76
|
"babel-loader": "^8.3.0",
|
|
@@ -98,6 +97,7 @@
|
|
|
98
97
|
"prettier": "^2.8.4",
|
|
99
98
|
"prettier-plugin-tailwindcss": "^0.2.2",
|
|
100
99
|
"qs": "^6.11.0",
|
|
100
|
+
"relative-deps": "^1.0.7",
|
|
101
101
|
"rimraf": "^3.0.2",
|
|
102
102
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
103
103
|
"scroll-lock": "^2.1.5",
|
|
@@ -134,5 +134,6 @@
|
|
|
134
134
|
"commitizen": {
|
|
135
135
|
"path": "cz-conventional-changelog"
|
|
136
136
|
}
|
|
137
|
-
}
|
|
137
|
+
},
|
|
138
|
+
"relativeDependencies": {}
|
|
138
139
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<BaseField
|
|
3
|
-
:label="
|
|
3
|
+
:label="t('sui.address')"
|
|
4
4
|
:name="`${namePrefix}address_1`"
|
|
5
5
|
class="mb-2"
|
|
6
6
|
required
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<BaseInput
|
|
9
9
|
ref="address1Ref"
|
|
10
10
|
:model-value="normalizedModelValue.address_1 ?? ''"
|
|
11
|
-
:placeholder="
|
|
11
|
+
:placeholder="t('sui.address_1_placeholder')"
|
|
12
12
|
class="w-full"
|
|
13
13
|
prevent-submit
|
|
14
14
|
name="address_search_field"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<BaseField :name="`${namePrefix}address_2`" class="mb-4">
|
|
22
22
|
<BaseInput
|
|
23
23
|
:model-value="normalizedModelValue.address_2 ?? ''"
|
|
24
|
-
:placeholder="
|
|
24
|
+
:placeholder="t('sui.address_2_description')"
|
|
25
25
|
class="w-full"
|
|
26
26
|
@update:model-value="update('address_2', $event)"
|
|
27
27
|
/>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="sm:flex sm:space-x-3">
|
|
31
31
|
<BaseField
|
|
32
|
-
:label="
|
|
32
|
+
:label="t('sui.city')"
|
|
33
33
|
required
|
|
34
34
|
:name="`${namePrefix}city`"
|
|
35
35
|
class="mb-4 flex-1"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
/>
|
|
42
42
|
</BaseField>
|
|
43
43
|
<BaseField
|
|
44
|
-
:label="
|
|
44
|
+
:label="t('sui.postal_code_zip_code')"
|
|
45
45
|
required
|
|
46
46
|
:name="`${namePrefix}postal_code`"
|
|
47
47
|
class="mb-4 flex-1"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<div class="sm:flex sm:space-x-3">
|
|
57
57
|
<BaseField
|
|
58
58
|
v-if="!props.hideCountry"
|
|
59
|
-
:label="
|
|
59
|
+
:label="t('sui.country')"
|
|
60
60
|
:name="`${namePrefix}country`"
|
|
61
61
|
required
|
|
62
62
|
class="mb-4 flex-1"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
</BaseField>
|
|
75
75
|
<BaseField
|
|
76
76
|
v-if="!props.hideRegion"
|
|
77
|
-
:label="
|
|
77
|
+
:label="t('sui.region')"
|
|
78
78
|
:name="`${namePrefix}region`"
|
|
79
79
|
required
|
|
80
80
|
class="mb-4 flex-1"
|
|
@@ -101,6 +101,7 @@ import { Region } from '@/types/Region';
|
|
|
101
101
|
import BaseField from './BaseField.vue';
|
|
102
102
|
import BaseInput from './BaseInput.vue';
|
|
103
103
|
import BaseSelect from './BaseSelect.vue';
|
|
104
|
+
import { t } from '@/i18n';
|
|
104
105
|
import { config } from '..';
|
|
105
106
|
|
|
106
107
|
const DEFAULT_COUNTRY = 'ca';
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:value="keywords"
|
|
28
28
|
type="text"
|
|
29
29
|
:placeholder="
|
|
30
|
-
placeholder ? placeholder :
|
|
30
|
+
placeholder ? placeholder : t('sui.autocomplete_placeholder')
|
|
31
31
|
"
|
|
32
32
|
class="relative w-full pr-9 disabled:cursor-not-allowed disabled:text-slate-300"
|
|
33
33
|
:class="[
|
|
@@ -127,6 +127,7 @@ import { Icon as BaseIcon } from '@iconify/vue';
|
|
|
127
127
|
import { useClickOutside } from '@/composables/clickOutside';
|
|
128
128
|
import BaseAutocompleteDrawer from './BaseAutocompleteDrawer.vue';
|
|
129
129
|
import { SelectConfiguration } from '@/types';
|
|
130
|
+
import { t } from '@/i18n';
|
|
130
131
|
|
|
131
132
|
const props = defineProps({
|
|
132
133
|
modelValue: {
|
|
@@ -204,8 +205,7 @@ const props = defineProps({
|
|
|
204
205
|
},
|
|
205
206
|
emptyOptionLabel: {
|
|
206
207
|
default() {
|
|
207
|
-
|
|
208
|
-
return i18n.t('sui.none');
|
|
208
|
+
return t('sui.none');
|
|
209
209
|
},
|
|
210
210
|
type: String,
|
|
211
211
|
},
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<div
|
|
11
11
|
class="flex items-center justify-center px-5 py-10 text-center text-slate-600"
|
|
12
12
|
>
|
|
13
|
-
{{
|
|
13
|
+
{{ t('sui.nothing_found') }}
|
|
14
14
|
</div>
|
|
15
15
|
</slot>
|
|
16
16
|
|
|
@@ -102,6 +102,7 @@ import { isArray, isObject, throttle } from 'lodash';
|
|
|
102
102
|
import BaseSkeleton from './BaseSkeleton.vue';
|
|
103
103
|
import { Icon as BaseIcon } from '@iconify/vue';
|
|
104
104
|
import BaseSpinnerSmall from '../svg/BaseSpinnerSmall.vue';
|
|
105
|
+
import { t } from '@/i18n';
|
|
105
106
|
|
|
106
107
|
const props = defineProps({
|
|
107
108
|
selected: {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
v-if="firstSearch"
|
|
42
42
|
class="flex h-[80px] items-center justify-center px-3 text-center text-base leading-tight text-slate-600"
|
|
43
43
|
>
|
|
44
|
-
{{
|
|
44
|
+
{{ t('sui.nothing_found') }}
|
|
45
45
|
</div>
|
|
46
46
|
</slot>
|
|
47
47
|
</template>
|
|
@@ -61,6 +61,7 @@ import {
|
|
|
61
61
|
} from '@/types';
|
|
62
62
|
import BaseAutocomplete from './BaseAutocomplete.vue';
|
|
63
63
|
import { useHasPaginatedData } from '@/composables/paginatedData';
|
|
64
|
+
import { t } from '@/i18n';
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
67
|
* Behavior notes
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
{{ length }}/{{ max }}
|
|
10
10
|
</div>
|
|
11
11
|
<div v-else-if="min && length < min" class="text-red-600">
|
|
12
|
-
{{
|
|
12
|
+
{{ t('sui.min_x_characters', { x: min }) }} ({{ length }}/{{ min }})
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts" setup>
|
|
18
18
|
import { trim } from 'lodash';
|
|
19
|
+
import { t } from '@/i18n';
|
|
19
20
|
|
|
20
21
|
const props = defineProps({
|
|
21
22
|
text: {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
class="mr-1 text-green-500"
|
|
28
28
|
icon="heroicons:check-circle-solid"
|
|
29
29
|
/>
|
|
30
|
-
{{
|
|
30
|
+
{{ t('sui.copied') }}
|
|
31
31
|
</div>
|
|
32
32
|
<div v-else>
|
|
33
|
-
{{
|
|
33
|
+
{{ t('sui.click_to_copy') }}
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script lang="ts" setup>
|
|
42
|
+
import { t } from '@/i18n';
|
|
43
|
+
|
|
42
44
|
const tooltipShown = ref(false);
|
|
43
45
|
const showCopied = ref(false);
|
|
44
46
|
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
>
|
|
70
70
|
<BaseIcon icon="ri:drag-move-2-fill" class="mr-1 h-5 w-5" />
|
|
71
71
|
<span>
|
|
72
|
-
{{
|
|
72
|
+
{{ t('drag_to_reposition') }}
|
|
73
73
|
</span>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
@@ -100,6 +100,7 @@ import { cloneDeep, debounce } from 'lodash';
|
|
|
100
100
|
import { CropperConfig } from '../types';
|
|
101
101
|
import { BaseIcon, BaseLoadingCover } from '.';
|
|
102
102
|
import { presets } from '@/utils/cropper/presets';
|
|
103
|
+
import { t } from '@/i18n';
|
|
103
104
|
|
|
104
105
|
const props = defineProps<{
|
|
105
106
|
source: string;
|
|
@@ -216,8 +217,6 @@ const cropperConfiguration = computed<CroppieOptions>(() => {
|
|
|
216
217
|
});
|
|
217
218
|
|
|
218
219
|
function init() {
|
|
219
|
-
console.log('init');
|
|
220
|
-
|
|
221
220
|
if (initializing.value) {
|
|
222
221
|
return;
|
|
223
222
|
}
|
|
@@ -275,8 +274,6 @@ async function initCropper() {
|
|
|
275
274
|
}
|
|
276
275
|
|
|
277
276
|
async function resizeImage(url: string): Promise<string> {
|
|
278
|
-
console.log('resizeImage');
|
|
279
|
-
|
|
280
277
|
await getOriginalDimensions();
|
|
281
278
|
|
|
282
279
|
try {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
:disabled="initializing"
|
|
22
22
|
@click="close()"
|
|
23
23
|
>
|
|
24
|
-
{{
|
|
24
|
+
{{ t('cancel') }}
|
|
25
25
|
</button>
|
|
26
26
|
<BaseButton
|
|
27
27
|
type="button"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
:disabled="initializing"
|
|
31
31
|
@click="save()"
|
|
32
32
|
>
|
|
33
|
-
{{
|
|
33
|
+
{{ t('save') }}
|
|
34
34
|
</BaseButton>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
@@ -46,6 +46,7 @@ import BaseCropper from './BaseCropper.vue';
|
|
|
46
46
|
import { BaseCropperConfig } from '@/types';
|
|
47
47
|
import { debounce } from 'lodash';
|
|
48
48
|
import { BaseButton } from '.';
|
|
49
|
+
import { t } from '@/i18n';
|
|
49
50
|
|
|
50
51
|
const props = defineProps<{
|
|
51
52
|
modelValue?: boolean;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
v-model="searchQuery"
|
|
29
29
|
type="text"
|
|
30
30
|
class="h-11 w-full overflow-hidden rounded-md border border-slate-300 bg-white pl-10 pr-9 shadow-sm"
|
|
31
|
-
:placeholder="
|
|
31
|
+
:placeholder="t('sui.autocomplete_placeholder')"
|
|
32
32
|
@input="onSearch"
|
|
33
33
|
/>
|
|
34
34
|
<div
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
<p
|
|
103
103
|
class="text-center text-sm text-slate-500 sm:text-right [&>b]:font-medium [&>b]:text-slate-600"
|
|
104
104
|
>
|
|
105
|
-
{{
|
|
105
|
+
{{ t('sui.pagination_detail_1') }}
|
|
106
106
|
|
|
107
107
|
<b>{{ paginationStart }}</b> - <b>{{ paginationEnd }}</b>
|
|
108
108
|
|
|
109
|
-
{{
|
|
109
|
+
{{ t('sui.pagination_detail_2') }}
|
|
110
110
|
|
|
111
111
|
<b>{{ paginationMetadata.total }}</b>
|
|
112
112
|
</p>
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
|
|
165
165
|
<script lang="ts">
|
|
166
166
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
167
|
-
|
|
167
|
+
import { t } from '@/i18n';
|
|
168
168
|
type Direction = 'asc' | 'desc';
|
|
169
169
|
|
|
170
170
|
const DEFAULT_QUERY = {
|
|
@@ -276,7 +276,6 @@ const props = defineProps({
|
|
|
276
276
|
},
|
|
277
277
|
});
|
|
278
278
|
|
|
279
|
-
const i18n = useI18n();
|
|
280
279
|
const http = config.http;
|
|
281
280
|
|
|
282
281
|
const emit = defineEmits([
|
|
@@ -730,8 +729,8 @@ const sectionsInternal = computed<DataIteratorSection[]>(() => {
|
|
|
730
729
|
return [
|
|
731
730
|
{
|
|
732
731
|
name: 'filters',
|
|
733
|
-
title:
|
|
734
|
-
closeText:
|
|
732
|
+
title: t('sui.filters'),
|
|
733
|
+
closeText: t('sui.apply_filters'),
|
|
735
734
|
icon: 'heroicons:adjustments-horizontal-solid',
|
|
736
735
|
opened: true,
|
|
737
736
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<div>
|
|
33
33
|
<span class="mr-3 text-slate-500"
|
|
34
34
|
>{{
|
|
35
|
-
|
|
35
|
+
t('sui.x_rows_selected', {
|
|
36
36
|
count: newCheckedRows.length,
|
|
37
37
|
})
|
|
38
38
|
}}.</span
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
class="mr-3 inline text-slate-700 underline"
|
|
43
43
|
@click="uncheckAll()"
|
|
44
44
|
>
|
|
45
|
-
{{
|
|
45
|
+
{{ t('sui.deselect_all') }}
|
|
46
46
|
</button>
|
|
47
47
|
</div>
|
|
48
48
|
<BaseMenu
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
class="h-10 w-10 text-red-600"
|
|
136
136
|
/>
|
|
137
137
|
<p class="mt-3 text-center text-sm text-slate-600">
|
|
138
|
-
{{
|
|
138
|
+
{{ t('sui.whoops') }}
|
|
139
139
|
</p>
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
<BaseEmptyState class="w-32"></BaseEmptyState>
|
|
148
148
|
|
|
149
149
|
<p class="mt-3 text-center text-sm text-slate-600">
|
|
150
|
-
{{
|
|
150
|
+
{{ t('sui.nothing_found') }}
|
|
151
151
|
</p>
|
|
152
152
|
</div>
|
|
153
153
|
</div>
|
|
@@ -192,6 +192,7 @@
|
|
|
192
192
|
|
|
193
193
|
<script lang="ts" setup>
|
|
194
194
|
import { PropType } from 'vue';
|
|
195
|
+
import { t } from '@/i18n';
|
|
195
196
|
import {
|
|
196
197
|
Collection,
|
|
197
198
|
CollectionItem,
|
|
@@ -217,7 +218,6 @@ import { RouteLocationRaw } from 'vue-router';
|
|
|
217
218
|
import BaseMenu from './BaseMenu.vue';
|
|
218
219
|
import BaseDataTableRowAction from './BaseDataTableRowAction.vue';
|
|
219
220
|
|
|
220
|
-
const i18n = useI18n();
|
|
221
221
|
const router = useRouter();
|
|
222
222
|
|
|
223
223
|
const http = config.http;
|
|
@@ -468,11 +468,11 @@ const canDelete = (row: CollectionItem): boolean => {
|
|
|
468
468
|
|
|
469
469
|
function onDeleteClick(row: CollectionItem) {
|
|
470
470
|
dialogs.push({
|
|
471
|
-
title:
|
|
472
|
-
message:
|
|
471
|
+
title: t('sui.delete_record') + '?',
|
|
472
|
+
message: t('sui.delete_record_description'),
|
|
473
473
|
color: 'danger',
|
|
474
474
|
closeOnOutsideClick: true,
|
|
475
|
-
confirmText:
|
|
475
|
+
confirmText: t('sui.yes_delete'),
|
|
476
476
|
onConfirm: () => onDelete(row),
|
|
477
477
|
});
|
|
478
478
|
}
|
|
@@ -487,7 +487,7 @@ const onDelete = (row: CollectionItem) => {
|
|
|
487
487
|
.then((response) => {
|
|
488
488
|
if (response.data && response.data.message) {
|
|
489
489
|
notifications.push({
|
|
490
|
-
title:
|
|
490
|
+
title: t('sui.success'),
|
|
491
491
|
text: response.data.message,
|
|
492
492
|
color: 'success',
|
|
493
493
|
});
|
|
@@ -499,7 +499,7 @@ const onDelete = (row: CollectionItem) => {
|
|
|
499
499
|
})
|
|
500
500
|
.catch((error) => {
|
|
501
501
|
notifications.push({
|
|
502
|
-
title:
|
|
502
|
+
title: t('sui.error'),
|
|
503
503
|
text: error.response.data?.message ?? 'Unknown error',
|
|
504
504
|
color: 'danger',
|
|
505
505
|
});
|
|
@@ -572,7 +572,7 @@ const rowActionsInternal = computed<RowAction[]>(() => {
|
|
|
572
572
|
|
|
573
573
|
if (props.editUrl && props.editButton) {
|
|
574
574
|
actions.push({
|
|
575
|
-
label:
|
|
575
|
+
label: t('sui.edit'),
|
|
576
576
|
icon: 'heroicons:cog-6-tooth-solid',
|
|
577
577
|
to: (row: CollectionItem) => (props.editUrl ? props.editUrl(row) : ''),
|
|
578
578
|
disabled: (row: CollectionItem) => !canUpdate(row),
|
|
@@ -581,7 +581,7 @@ const rowActionsInternal = computed<RowAction[]>(() => {
|
|
|
581
581
|
|
|
582
582
|
if (props.deleteUrl && props.deleteButton) {
|
|
583
583
|
actions.push({
|
|
584
|
-
label:
|
|
584
|
+
label: t('sui.delete'),
|
|
585
585
|
icon: 'heroicons:trash-20-solid',
|
|
586
586
|
action: onDeleteClick,
|
|
587
587
|
disabled: (row: CollectionItem) => !canDelete(row),
|
|
@@ -643,8 +643,8 @@ const sectionsInternal = computed<DataIteratorSection[]>(() => {
|
|
|
643
643
|
{
|
|
644
644
|
name: 'columns',
|
|
645
645
|
icon: 'heroicons:table-cells-20-solid',
|
|
646
|
-
title:
|
|
647
|
-
closeText:
|
|
646
|
+
title: t('sui.columns'),
|
|
647
|
+
closeText: t('sui.apply'),
|
|
648
648
|
opened: false,
|
|
649
649
|
},
|
|
650
650
|
];
|