sprintify-ui 0.0.182 → 0.0.184
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/sprintify-ui.es.js +16888 -14992
- package/dist/style.css +1 -1
- package/dist/types/src/components/BaseCropper.vue.d.ts +57 -0
- package/dist/types/src/components/BaseCropperModal.vue.d.ts +27 -0
- package/dist/types/src/components/BaseDisplayRelativeTime.vue.d.ts +3 -3
- package/dist/types/src/components/BaseFilePicker.vue.d.ts +52 -37
- package/dist/types/src/components/BaseFilePickerCrop.vue.d.ts +57 -0
- package/dist/types/src/components/BaseFileUploader.vue.d.ts +65 -81
- package/dist/types/src/components/BaseMediaLibrary.vue.d.ts +20 -10
- package/dist/types/src/components/BaseTableColumn.vue.d.ts +1 -1
- package/dist/types/src/components/index.d.ts +4 -1
- package/dist/types/src/index.d.ts +24 -4
- package/dist/types/src/svg/BaseEmptyState.vue.d.ts +1 -1
- package/dist/types/src/types/ImagePickerResult.d.ts +5 -0
- package/dist/types/src/types/index.d.ts +28 -0
- package/dist/types/src/utils/blob.d.ts +3 -0
- package/dist/types/src/utils/cropper/avatar.d.ts +5 -0
- package/dist/types/src/utils/cropper/cover.d.ts +5 -0
- package/dist/types/src/utils/cropper/presetInterface.d.ts +7 -0
- package/dist/types/src/utils/cropper/presets.d.ts +6 -0
- package/dist/types/src/utils/fileValidations.d.ts +2 -0
- package/dist/types/src/utils/index.d.ts +3 -1
- package/dist/types/src/utils/resizeImageFromURI.d.ts +1 -0
- package/package.json +35 -32
- package/src/components/BaseCropper.stories.js +113 -0
- package/src/components/BaseCropper.vue +451 -0
- package/src/components/BaseCropperModal.stories.js +54 -0
- package/src/components/BaseCropperModal.vue +139 -0
- package/src/components/BaseFilePicker.stories.js +30 -3
- package/src/components/BaseFilePicker.vue +107 -75
- package/src/components/BaseFilePickerCrop.stories.js +134 -0
- package/src/components/BaseFilePickerCrop.vue +116 -0
- package/src/components/BaseFileUploader.stories.js +11 -7
- package/src/components/BaseFileUploader.vue +57 -86
- package/src/components/BaseMediaLibrary.stories.js +24 -5
- package/src/components/BaseMediaLibrary.vue +17 -2
- package/src/components/BaseTable.vue +1 -2
- package/src/components/index.ts +6 -0
- package/src/lang/en.json +6 -1
- package/src/lang/fr.json +6 -1
- package/src/types/ImagePickerResult.ts +5 -0
- package/src/types/index.ts +31 -0
- package/src/utils/blob.ts +30 -0
- package/src/utils/cropper/avatar.ts +33 -0
- package/src/utils/cropper/cover.ts +41 -0
- package/src/utils/cropper/presetInterface.ts +16 -0
- package/src/utils/cropper/presets.ts +7 -0
- package/src/utils/fileValidations.ts +26 -0
- package/src/utils/index.ts +12 -1
- package/src/utils/resizeImageFromURI.ts +118 -0
|
@@ -1,99 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
buttonClass:
|
|
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
|
-
beforeUpload: {
|
|
49
|
-
default: () => boolean;
|
|
50
|
-
type: PropType<() => boolean>;
|
|
51
|
-
};
|
|
52
|
-
buttonClass: {
|
|
53
|
-
default: string;
|
|
54
|
-
type: StringConstructor;
|
|
55
|
-
};
|
|
56
|
-
maxSize: {
|
|
57
|
-
default: number;
|
|
58
|
-
type: NumberConstructor;
|
|
59
|
-
};
|
|
60
|
-
accept: {
|
|
61
|
-
default: undefined;
|
|
62
|
-
type: StringConstructor;
|
|
63
|
-
};
|
|
64
|
-
acceptedExtensions: {
|
|
65
|
-
default: undefined;
|
|
66
|
-
type: PropType<string[]>;
|
|
67
|
-
};
|
|
68
|
-
}>> & {
|
|
1
|
+
import { BaseCropperConfig } from '@/types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
component?: "BaseFilePicker" | "BaseFilePickerCrop" | undefined;
|
|
4
|
+
url?: string | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
loading?: boolean | undefined;
|
|
7
|
+
beforeUpload?: (() => boolean) | undefined;
|
|
8
|
+
buttonClass?: string | undefined;
|
|
9
|
+
maxSize?: number | undefined;
|
|
10
|
+
accept?: string | undefined;
|
|
11
|
+
acceptedExtensions?: string[] | undefined;
|
|
12
|
+
cropper?: boolean | BaseCropperConfig | null | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
component: string;
|
|
15
|
+
url: undefined;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
beforeUpload: () => boolean;
|
|
19
|
+
buttonClass: string;
|
|
20
|
+
maxSize: undefined;
|
|
21
|
+
accept: undefined;
|
|
22
|
+
acceptedExtensions: undefined;
|
|
23
|
+
cropper: boolean;
|
|
24
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("upload:start" | "upload:success" | "upload:fail" | "upload:end")[], "upload:start" | "upload:success" | "upload:fail" | "upload:end", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
25
|
+
component?: "BaseFilePicker" | "BaseFilePickerCrop" | undefined;
|
|
26
|
+
url?: string | undefined;
|
|
27
|
+
disabled?: boolean | undefined;
|
|
28
|
+
loading?: boolean | undefined;
|
|
29
|
+
beforeUpload?: (() => boolean) | undefined;
|
|
30
|
+
buttonClass?: string | undefined;
|
|
31
|
+
maxSize?: number | undefined;
|
|
32
|
+
accept?: string | undefined;
|
|
33
|
+
acceptedExtensions?: string[] | undefined;
|
|
34
|
+
cropper?: boolean | BaseCropperConfig | null | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
component: string;
|
|
37
|
+
url: undefined;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
loading: boolean;
|
|
40
|
+
beforeUpload: () => boolean;
|
|
41
|
+
buttonClass: string;
|
|
42
|
+
maxSize: undefined;
|
|
43
|
+
accept: undefined;
|
|
44
|
+
acceptedExtensions: undefined;
|
|
45
|
+
cropper: boolean;
|
|
46
|
+
}>>> & {
|
|
69
47
|
"onUpload:start"?: ((...args: any[]) => any) | undefined;
|
|
70
48
|
"onUpload:success"?: ((...args: any[]) => any) | undefined;
|
|
71
49
|
"onUpload:fail"?: ((...args: any[]) => any) | undefined;
|
|
72
50
|
"onUpload:end"?: ((...args: any[]) => any) | undefined;
|
|
73
51
|
}, {
|
|
74
52
|
disabled: boolean;
|
|
53
|
+
cropper: BaseCropperConfig | boolean | null;
|
|
75
54
|
loading: boolean;
|
|
76
55
|
accept: string;
|
|
77
56
|
url: string;
|
|
57
|
+
component: 'BaseFilePicker' | 'BaseFilePickerCrop';
|
|
78
58
|
buttonClass: string;
|
|
79
|
-
beforeUpload: () => boolean;
|
|
80
59
|
maxSize: number;
|
|
81
60
|
acceptedExtensions: string[];
|
|
61
|
+
beforeUpload: () => boolean;
|
|
82
62
|
}>, {
|
|
83
|
-
default: (_:
|
|
84
|
-
|
|
85
|
-
selecting: any;
|
|
86
|
-
dragging: any;
|
|
87
|
-
disabled: any;
|
|
88
|
-
}) => any;
|
|
89
|
-
loading: (_: {
|
|
90
|
-
uploading: boolean;
|
|
91
|
-
selecting: any;
|
|
92
|
-
dragging: any;
|
|
93
|
-
disabled: any;
|
|
94
|
-
}) => any;
|
|
63
|
+
default: (_: any) => any;
|
|
64
|
+
loading: (_: any) => any;
|
|
95
65
|
}>;
|
|
96
66
|
export default _default;
|
|
67
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
68
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
69
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
70
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
71
|
+
} : {
|
|
72
|
+
type: import('vue').PropType<T[K]>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
type __VLS_WithDefaults<P, D> = {
|
|
77
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
78
|
+
default: D[K];
|
|
79
|
+
} : P[K];
|
|
80
|
+
};
|
|
97
81
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
98
82
|
new (): {
|
|
99
83
|
$slots: S;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { Media } from '@/types/Media';
|
|
3
|
-
import { MediaLibraryPayload } from '@/types';
|
|
3
|
+
import { BaseCropperConfig, MediaLibraryPayload } from '@/types';
|
|
4
4
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
5
5
|
modelValue: {
|
|
6
6
|
default: undefined;
|
|
@@ -46,6 +46,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
46
46
|
default: boolean;
|
|
47
47
|
type: BooleanConstructor;
|
|
48
48
|
};
|
|
49
|
+
pickerComponent: {
|
|
50
|
+
default: string;
|
|
51
|
+
type: PropType<"BaseFilePicker" | "BaseFilePickerCrop">;
|
|
52
|
+
};
|
|
53
|
+
cropper: {
|
|
54
|
+
default: undefined;
|
|
55
|
+
type: PropType<boolean | BaseCropperConfig | null>;
|
|
56
|
+
};
|
|
49
57
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "upload:start" | "upload:success" | "upload:fail" | "upload:end")[], "update:modelValue" | "upload:start" | "upload:success" | "upload:fail" | "upload:end", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
58
|
modelValue: {
|
|
51
59
|
default: undefined;
|
|
@@ -91,6 +99,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
91
99
|
default: boolean;
|
|
92
100
|
type: BooleanConstructor;
|
|
93
101
|
};
|
|
102
|
+
pickerComponent: {
|
|
103
|
+
default: string;
|
|
104
|
+
type: PropType<"BaseFilePicker" | "BaseFilePickerCrop">;
|
|
105
|
+
};
|
|
106
|
+
cropper: {
|
|
107
|
+
default: undefined;
|
|
108
|
+
type: PropType<boolean | BaseCropperConfig | null>;
|
|
109
|
+
};
|
|
94
110
|
}>> & {
|
|
95
111
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
96
112
|
"onUpload:start"?: ((...args: any[]) => any) | undefined;
|
|
@@ -104,21 +120,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
104
120
|
min: number;
|
|
105
121
|
max: number;
|
|
106
122
|
hasError: boolean;
|
|
123
|
+
cropper: boolean | BaseCropperConfig | null;
|
|
107
124
|
accept: string;
|
|
108
125
|
maxSize: number;
|
|
109
126
|
acceptedExtensions: string[];
|
|
110
127
|
currentMedia: Media[];
|
|
111
128
|
uploadUrl: string;
|
|
129
|
+
pickerComponent: "BaseFilePicker" | "BaseFilePickerCrop";
|
|
112
130
|
}>, {
|
|
113
|
-
default: (_:
|
|
114
|
-
uploading: boolean;
|
|
115
|
-
selecting: any;
|
|
116
|
-
dragging: any;
|
|
117
|
-
disabled: any;
|
|
118
|
-
} & {
|
|
119
|
-
maxSize: number;
|
|
120
|
-
max: number;
|
|
121
|
-
}) => any;
|
|
131
|
+
default: (_: any) => any;
|
|
122
132
|
}>;
|
|
123
133
|
export default _default;
|
|
124
134
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -167,11 +167,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
167
167
|
width: number;
|
|
168
168
|
field: string;
|
|
169
169
|
padding: string;
|
|
170
|
+
visible: boolean;
|
|
170
171
|
position: "left" | "right" | "center";
|
|
171
172
|
searchable: boolean;
|
|
172
173
|
numeric: boolean;
|
|
173
174
|
sortable: boolean;
|
|
174
|
-
visible: boolean;
|
|
175
175
|
clickable: boolean;
|
|
176
176
|
optional: boolean;
|
|
177
177
|
thAttrs: Function;
|
|
@@ -22,6 +22,8 @@ import BaseClipboard from './BaseClipboard.vue';
|
|
|
22
22
|
import BaseColor from './BaseColor.vue';
|
|
23
23
|
import BaseContainer from './BaseContainer.vue';
|
|
24
24
|
import BaseCounter from './BaseCounter.vue';
|
|
25
|
+
import BaseCropper from './BaseCropper.vue';
|
|
26
|
+
import BaseCropperModal from './BaseCropperModal.vue';
|
|
25
27
|
import BaseDataIterator from './BaseDataIterator.vue';
|
|
26
28
|
import BaseDataTable from './BaseDataTable.vue';
|
|
27
29
|
import BaseDatePicker from './BaseDatePicker.vue';
|
|
@@ -36,6 +38,7 @@ import BaseEmptyState from '@/svg/BaseEmptyState.vue';
|
|
|
36
38
|
import BaseField from './BaseField.vue';
|
|
37
39
|
import BaseFieldI18n from './BaseFieldI18n.vue';
|
|
38
40
|
import BaseFilePicker from './BaseFilePicker.vue';
|
|
41
|
+
import BaseFilePickerCrop from './BaseFilePickerCrop.vue';
|
|
39
42
|
import BaseFileUploader from './BaseFileUploader.vue';
|
|
40
43
|
import BaseForm from './BaseForm.vue';
|
|
41
44
|
import BaseHasMany from './BaseHasMany.vue';
|
|
@@ -85,4 +88,4 @@ import BaseLayoutStacked from './BaseLayoutStacked.vue';
|
|
|
85
88
|
import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
|
|
86
89
|
import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
|
|
87
90
|
import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
|
|
88
|
-
export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClickOutside, BaseClipboard, BaseColor, BaseContainer, BaseCounter, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseDisplayRelativeTime, BaseDropdown, BaseDropdownAutocomplete, BaseEmptyState, BaseField, BaseFieldI18n, BaseFilePicker, BaseFileUploader, BaseForm, BaseHasMany, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNumber, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseSwitch, BaseSystemAlert, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTable, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
|
|
91
|
+
export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClickOutside, BaseClipboard, BaseColor, BaseContainer, BaseCounter, BaseCropper, BaseCropperModal, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseDisplayRelativeTime, BaseDropdown, BaseDropdownAutocomplete, BaseEmptyState, BaseField, BaseFieldI18n, BaseFilePicker, BaseFilePickerCrop, BaseFileUploader, BaseForm, BaseHasMany, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNumber, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseSwitch, BaseSystemAlert, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTable, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
|
|
@@ -8,6 +8,10 @@ import { useClickOutside } from './composables/clickOutside';
|
|
|
8
8
|
import { useField } from './composables/field';
|
|
9
9
|
declare const messages: {
|
|
10
10
|
en: {
|
|
11
|
+
cancel: string;
|
|
12
|
+
cropper: string;
|
|
13
|
+
drag_to_reposition: string;
|
|
14
|
+
save: string;
|
|
11
15
|
sui: {
|
|
12
16
|
address: string;
|
|
13
17
|
address_1_placeholder: string;
|
|
@@ -31,14 +35,15 @@ declare const messages: {
|
|
|
31
35
|
delete_record: string;
|
|
32
36
|
delete_record_description: string;
|
|
33
37
|
deselect_all: string;
|
|
38
|
+
drag_to_reposition: string;
|
|
34
39
|
drop_or_click_to_upload: string;
|
|
35
40
|
edit: string;
|
|
36
41
|
error: string;
|
|
37
42
|
file_must_be_of_type: string;
|
|
38
43
|
filters: string;
|
|
39
44
|
go_to_page: string;
|
|
40
|
-
invalid_value: string;
|
|
41
45
|
just_now: string;
|
|
46
|
+
invalid_value: string;
|
|
42
47
|
maximum_x_decimal_places: string;
|
|
43
48
|
min_x_characters: string;
|
|
44
49
|
month: string;
|
|
@@ -86,6 +91,10 @@ declare const messages: {
|
|
|
86
91
|
};
|
|
87
92
|
};
|
|
88
93
|
fr: {
|
|
94
|
+
cancel: string;
|
|
95
|
+
cropper: string;
|
|
96
|
+
drag_to_reposition: string;
|
|
97
|
+
save: string;
|
|
89
98
|
sui: {
|
|
90
99
|
address: string;
|
|
91
100
|
address_1_placeholder: string;
|
|
@@ -109,14 +118,15 @@ declare const messages: {
|
|
|
109
118
|
delete_record: string;
|
|
110
119
|
delete_record_description: string;
|
|
111
120
|
deselect_all: string;
|
|
121
|
+
drag_to_reposition: string;
|
|
112
122
|
drop_or_click_to_upload: string;
|
|
113
123
|
edit: string;
|
|
114
124
|
error: string;
|
|
115
125
|
file_must_be_of_type: string;
|
|
116
126
|
filters: string;
|
|
117
127
|
go_to_page: string;
|
|
118
|
-
invalid_value: string;
|
|
119
128
|
just_now: string;
|
|
129
|
+
invalid_value: string;
|
|
120
130
|
maximum_x_decimal_places: string;
|
|
121
131
|
min_x_characters: string;
|
|
122
132
|
month: string;
|
|
@@ -181,6 +191,10 @@ export interface Options {
|
|
|
181
191
|
declare const config: {
|
|
182
192
|
i18n: I18n<{
|
|
183
193
|
en: {
|
|
194
|
+
cancel: string;
|
|
195
|
+
cropper: string;
|
|
196
|
+
drag_to_reposition: string;
|
|
197
|
+
save: string;
|
|
184
198
|
sui: {
|
|
185
199
|
address: string;
|
|
186
200
|
address_1_placeholder: string;
|
|
@@ -204,14 +218,15 @@ declare const config: {
|
|
|
204
218
|
delete_record: string;
|
|
205
219
|
delete_record_description: string;
|
|
206
220
|
deselect_all: string;
|
|
221
|
+
drag_to_reposition: string;
|
|
207
222
|
drop_or_click_to_upload: string;
|
|
208
223
|
edit: string;
|
|
209
224
|
error: string;
|
|
210
225
|
file_must_be_of_type: string;
|
|
211
226
|
filters: string;
|
|
212
227
|
go_to_page: string;
|
|
213
|
-
invalid_value: string;
|
|
214
228
|
just_now: string;
|
|
229
|
+
invalid_value: string;
|
|
215
230
|
maximum_x_decimal_places: string;
|
|
216
231
|
min_x_characters: string;
|
|
217
232
|
month: string;
|
|
@@ -259,6 +274,10 @@ declare const config: {
|
|
|
259
274
|
};
|
|
260
275
|
};
|
|
261
276
|
fr: {
|
|
277
|
+
cancel: string;
|
|
278
|
+
cropper: string;
|
|
279
|
+
drag_to_reposition: string;
|
|
280
|
+
save: string;
|
|
262
281
|
sui: {
|
|
263
282
|
address: string;
|
|
264
283
|
address_1_placeholder: string;
|
|
@@ -282,14 +301,15 @@ declare const config: {
|
|
|
282
301
|
delete_record: string;
|
|
283
302
|
delete_record_description: string;
|
|
284
303
|
deselect_all: string;
|
|
304
|
+
drag_to_reposition: string;
|
|
285
305
|
drop_or_click_to_upload: string;
|
|
286
306
|
edit: string;
|
|
287
307
|
error: string;
|
|
288
308
|
file_must_be_of_type: string;
|
|
289
309
|
filters: string;
|
|
290
310
|
go_to_page: string;
|
|
291
|
-
invalid_value: string;
|
|
292
311
|
just_now: string;
|
|
312
|
+
invalid_value: string;
|
|
293
313
|
maximum_x_decimal_places: string;
|
|
294
314
|
min_x_characters: string;
|
|
295
315
|
month: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RouteLocationRaw } from 'vue-router';
|
|
2
2
|
import { UploadedFile } from './UploadedFile';
|
|
3
3
|
import { Notification as AppNotification } from './Notification';
|
|
4
|
+
import { CropType, ResultOptions } from 'croppie';
|
|
4
5
|
export type Locales = {
|
|
5
6
|
[locale: string]: string;
|
|
6
7
|
};
|
|
@@ -188,3 +189,30 @@ export interface RowAction {
|
|
|
188
189
|
to?: (row: CollectionItem) => RouteLocationRaw;
|
|
189
190
|
disabled?: (row: CollectionItem) => boolean;
|
|
190
191
|
}
|
|
192
|
+
export interface CropperConfig {
|
|
193
|
+
height?: number;
|
|
194
|
+
width?: number;
|
|
195
|
+
viewport?: {
|
|
196
|
+
type?: CropType;
|
|
197
|
+
width: number;
|
|
198
|
+
height: number;
|
|
199
|
+
};
|
|
200
|
+
boundary?: {
|
|
201
|
+
width: number;
|
|
202
|
+
height: number;
|
|
203
|
+
};
|
|
204
|
+
enableResize?: boolean;
|
|
205
|
+
enableZoom?: boolean;
|
|
206
|
+
enableOrientation?: boolean;
|
|
207
|
+
showZoomer?: boolean;
|
|
208
|
+
initialResize?: number;
|
|
209
|
+
maxWidth?: number;
|
|
210
|
+
}
|
|
211
|
+
export type CropperPreset = 'avatar' | 'cover';
|
|
212
|
+
export interface BaseCropperConfig {
|
|
213
|
+
source: string;
|
|
214
|
+
config?: CropperConfig;
|
|
215
|
+
preset?: CropperPreset;
|
|
216
|
+
presetOptions?: Record<string, any>;
|
|
217
|
+
saveOptions?: ResultOptions;
|
|
218
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CropperConfig } from '@/types';
|
|
2
|
+
export declare abstract class PresetInterface {
|
|
3
|
+
protected config: CropperConfig | null;
|
|
4
|
+
protected presetOptions: Record<string, any> | null;
|
|
5
|
+
constructor(config?: CropperConfig | null, presetOptions?: Record<string, any> | null);
|
|
6
|
+
abstract handle(): CropperConfig;
|
|
7
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import toHumanList from './toHumanList';
|
|
2
2
|
import fileSizeFormat from './fileSizeFormat';
|
|
3
|
+
import resizeImageFromURI from './resizeImageFromURI';
|
|
3
4
|
import { disableScroll, enableScroll } from './scrollPreventer';
|
|
4
|
-
|
|
5
|
+
import { blobToBase64, validateBase64, base64ToBlob } from './blob';
|
|
6
|
+
export { toHumanList, fileSizeFormat, disableScroll, enableScroll, resizeImageFromURI, blobToBase64, validateBase64, base64ToBlob, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function resizeImageFromURI(source: string, height: number, width: number): Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sprintify-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.184",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
6
6
|
"build-fast": "rimraf dist && vite build",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@vueup/vue-quill": "^1.0.0",
|
|
20
20
|
"@vueuse/core": "^9.0.0",
|
|
21
21
|
"axios": "^0.26.1",
|
|
22
|
+
"croppie": "^2.6.5",
|
|
22
23
|
"flatpickr": "^4.6.13",
|
|
23
24
|
"humanize-duration": "^3.0.0",
|
|
24
25
|
"lodash": "^4.17.21",
|
|
@@ -34,13 +35,12 @@
|
|
|
34
35
|
"vue-router": "^4.0.0"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@headlessui/vue": "^1.7.
|
|
38
|
-
"color2k": "^2.0.
|
|
38
|
+
"@headlessui/vue": "^1.7.9",
|
|
39
|
+
"color2k": "^2.0.2"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "^7.20.
|
|
42
|
-
"@iconify/vue": "^4.
|
|
43
|
-
"storybook": "^6.5.16",
|
|
42
|
+
"@babel/core": "^7.20.12",
|
|
43
|
+
"@iconify/vue": "^4.1.0",
|
|
44
44
|
"@storybook/addon-actions": "^6.5.16",
|
|
45
45
|
"@storybook/addon-essentials": "^6.5.16",
|
|
46
46
|
"@storybook/addon-interactions": "^6.5.16",
|
|
@@ -51,56 +51,59 @@
|
|
|
51
51
|
"@tailwindcss/aspect-ratio": "^0.4.2",
|
|
52
52
|
"@tailwindcss/forms": "^0.5.3",
|
|
53
53
|
"@tailwindcss/line-clamp": "^0.4.2",
|
|
54
|
-
"@tailwindcss/typography": "^0.5.
|
|
55
|
-
"@types/
|
|
54
|
+
"@tailwindcss/typography": "^0.5.9",
|
|
55
|
+
"@types/croppie": "^2.6.1",
|
|
56
|
+
"@types/google.maps": "^3.51.1",
|
|
56
57
|
"@types/humanize-duration": "^3.27.1",
|
|
57
|
-
"@types/luxon": "^3.
|
|
58
|
+
"@types/luxon": "^3.2.0",
|
|
58
59
|
"@types/object-hash": "^2.2.1",
|
|
59
60
|
"@types/qs": "^6.9.7",
|
|
60
61
|
"@types/scroll-lock": "^2.1.0",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
62
|
-
"@typescript-eslint/parser": "^5.
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
63
|
+
"@typescript-eslint/parser": "^5.51.0",
|
|
63
64
|
"@vitejs/plugin-vue": "^4.0.0",
|
|
64
65
|
"@vue/eslint-config-typescript": "^11.0.2",
|
|
65
|
-
"@vueup/vue-quill": "^1.
|
|
66
|
-
"@vueuse/core": "^9.
|
|
66
|
+
"@vueup/vue-quill": "^1.1.0",
|
|
67
|
+
"@vueuse/core": "^9.12.0",
|
|
67
68
|
"autoprefixer": "^10.4.13",
|
|
68
69
|
"axios": "^0.26.1",
|
|
69
70
|
"babel-loader": "^8.3.0",
|
|
70
|
-
"
|
|
71
|
-
"eslint
|
|
72
|
-
"eslint-
|
|
73
|
-
"eslint-plugin-
|
|
74
|
-
"eslint-plugin-
|
|
75
|
-
"eslint-plugin-vue
|
|
71
|
+
"croppie": "^2.6.5",
|
|
72
|
+
"eslint": "^8.33.0",
|
|
73
|
+
"eslint-config-prettier": "^8.6.0",
|
|
74
|
+
"eslint-plugin-import": "^2.27.5",
|
|
75
|
+
"eslint-plugin-storybook": "^0.6.10",
|
|
76
|
+
"eslint-plugin-vue": "^9.9.0",
|
|
77
|
+
"eslint-plugin-vue-scoped-css": "^2.4.0",
|
|
76
78
|
"flatpickr": "^4.6.13",
|
|
77
|
-
"humanize-duration": "^3.
|
|
79
|
+
"humanize-duration": "^3.28.0",
|
|
78
80
|
"lodash": "^4.17.21",
|
|
79
|
-
"luxon": "^3.1
|
|
80
|
-
"maska": "^2.1.
|
|
81
|
+
"luxon": "^3.2.1",
|
|
82
|
+
"maska": "^2.1.6",
|
|
81
83
|
"microtip": "^0.2.2",
|
|
82
84
|
"object-hash": "^3.0.0",
|
|
83
85
|
"object-to-formdata": "^4.4.2",
|
|
84
|
-
"pinia": "^2.0.
|
|
85
|
-
"postcss": "^8.4.
|
|
86
|
+
"pinia": "^2.0.30",
|
|
87
|
+
"postcss": "^8.4.21",
|
|
86
88
|
"postcss-import": "^15.1.0",
|
|
87
|
-
"prettier": "^2.
|
|
88
|
-
"prettier-plugin-tailwindcss": "^0.2.
|
|
89
|
+
"prettier": "^2.8.4",
|
|
90
|
+
"prettier-plugin-tailwindcss": "^0.2.2",
|
|
89
91
|
"qs": "^6.11.0",
|
|
90
92
|
"rimraf": "^3.0.2",
|
|
91
93
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
92
94
|
"scroll-lock": "^2.1.5",
|
|
95
|
+
"storybook": "^6.5.16",
|
|
93
96
|
"storybook-addon-mock": "^3.2.0",
|
|
94
|
-
"tailwindcss": "^3.2.
|
|
95
|
-
"typescript": "^4.
|
|
96
|
-
"unplugin-auto-import": "^0.12.
|
|
97
|
-
"vite": "^4.
|
|
97
|
+
"tailwindcss": "^3.2.6",
|
|
98
|
+
"typescript": "^4.9.5",
|
|
99
|
+
"unplugin-auto-import": "^0.12.2",
|
|
100
|
+
"vite": "^4.1.1",
|
|
98
101
|
"vitepress": "^0.21.6",
|
|
99
|
-
"vue": "^3.2.
|
|
102
|
+
"vue": "^3.2.47",
|
|
100
103
|
"vue-i18n": "^9.2.2",
|
|
101
104
|
"vue-loader": "^17.0.1",
|
|
102
105
|
"vue-router": "^4.1.6",
|
|
103
|
-
"vue-tsc": "^1.0.
|
|
106
|
+
"vue-tsc": "^1.0.24"
|
|
104
107
|
},
|
|
105
108
|
"files": [
|
|
106
109
|
"src",
|