sprintify-ui 0.2.3 → 0.2.4
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 +2907 -2996
- package/dist/types/src/components/index.d.ts +1 -2
- package/dist/types/src/index.d.ts +0 -10
- package/package.json +1 -1
- package/src/components/index.ts +0 -2
- package/src/lang/en.json +1 -6
- package/src/lang/fr.json +1 -6
- package/dist/types/src/components/BasePWAPrompt.vue.d.ts +0 -46
- package/src/components/BasePWAPrompt.stories.js +0 -51
- package/src/components/BasePWAPrompt.vue +0 -107
|
@@ -65,7 +65,6 @@ import BasePagination from './BasePagination.vue';
|
|
|
65
65
|
import BasePanel from './BasePanel.vue';
|
|
66
66
|
import BasePassword from './BasePassword.vue';
|
|
67
67
|
import BaseProgressCircle from './BaseProgressCircle.vue';
|
|
68
|
-
import BasePWAPrompt from './BasePWAPrompt.vue';
|
|
69
68
|
import BaseRadioGroup from './BaseRadioGroup.vue';
|
|
70
69
|
import BaseReadMore from './BaseReadMore.vue';
|
|
71
70
|
import BaseRichText from './BaseRichText.vue';
|
|
@@ -93,4 +92,4 @@ import BaseLayoutStacked from './BaseLayoutStacked.vue';
|
|
|
93
92
|
import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
|
|
94
93
|
import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
|
|
95
94
|
import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
|
|
96
|
-
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, BaseHeader, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNavbarSideItem, BaseNumber, BasePagination, BasePanel, BasePassword, BaseProgressCircle,
|
|
95
|
+
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, BaseHeader, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNavbarSideItem, BaseNumber, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseStepper, BaseStepperItem, BaseSwitch, BaseSystemAlert, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTable, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
|
|
@@ -42,7 +42,6 @@ declare const messages: {
|
|
|
42
42
|
file_must_be_of_type: string;
|
|
43
43
|
filters: string;
|
|
44
44
|
go_to_page: string;
|
|
45
|
-
install: string;
|
|
46
45
|
invalid_value: string;
|
|
47
46
|
just_now: string;
|
|
48
47
|
maximum_x_decimal_places: string;
|
|
@@ -62,10 +61,6 @@ declare const messages: {
|
|
|
62
61
|
postal_code_zip_code: string;
|
|
63
62
|
previous: string;
|
|
64
63
|
previous_month: string;
|
|
65
|
-
pwa_add_to_home_screen: string;
|
|
66
|
-
pwa_description: string;
|
|
67
|
-
pwa_share_button: string;
|
|
68
|
-
pwa_tap: string;
|
|
69
64
|
read_more: string;
|
|
70
65
|
region: string;
|
|
71
66
|
remove: string;
|
|
@@ -134,7 +129,6 @@ declare const messages: {
|
|
|
134
129
|
file_must_be_of_type: string;
|
|
135
130
|
filters: string;
|
|
136
131
|
go_to_page: string;
|
|
137
|
-
install: string;
|
|
138
132
|
invalid_value: string;
|
|
139
133
|
just_now: string;
|
|
140
134
|
maximum_x_decimal_places: string;
|
|
@@ -154,10 +148,6 @@ declare const messages: {
|
|
|
154
148
|
postal_code_zip_code: string;
|
|
155
149
|
previous: string;
|
|
156
150
|
previous_month: string;
|
|
157
|
-
pwa_add_to_home_screen: string;
|
|
158
|
-
pwa_description: string;
|
|
159
|
-
pwa_share_button: string;
|
|
160
|
-
pwa_tap: string;
|
|
161
151
|
read_more: string;
|
|
162
152
|
region: string;
|
|
163
153
|
remove: string;
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -65,7 +65,6 @@ import BasePagination from './BasePagination.vue';
|
|
|
65
65
|
import BasePanel from './BasePanel.vue';
|
|
66
66
|
import BasePassword from './BasePassword.vue';
|
|
67
67
|
import BaseProgressCircle from './BaseProgressCircle.vue';
|
|
68
|
-
import BasePWAPrompt from './BasePWAPrompt.vue';
|
|
69
68
|
import BaseRadioGroup from './BaseRadioGroup.vue';
|
|
70
69
|
import BaseReadMore from './BaseReadMore.vue';
|
|
71
70
|
import BaseRichText from './BaseRichText.vue';
|
|
@@ -163,7 +162,6 @@ export {
|
|
|
163
162
|
BasePanel,
|
|
164
163
|
BasePassword,
|
|
165
164
|
BaseProgressCircle,
|
|
166
|
-
BasePWAPrompt,
|
|
167
165
|
BaseRadioGroup,
|
|
168
166
|
BaseReadMore,
|
|
169
167
|
BaseRichText,
|
package/src/lang/en.json
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"file_must_be_of_type": "The file must be of type",
|
|
35
35
|
"filters": "Filters",
|
|
36
36
|
"go_to_page": "Go to ",
|
|
37
|
-
"install": "Install",
|
|
38
37
|
"invalid_value": "Invalid value",
|
|
39
38
|
"just_now": "Just now",
|
|
40
39
|
"maximum_x_decimal_places": "Maximum 1 decimal place|Maximum {count} decimal places",
|
|
@@ -54,10 +53,6 @@
|
|
|
54
53
|
"postal_code_zip_code": "Postal Code / Zip Code",
|
|
55
54
|
"previous": "Previous",
|
|
56
55
|
"previous_month": "Previous month",
|
|
57
|
-
"pwa_add_to_home_screen": "then 'Add to Home Screen'",
|
|
58
|
-
"pwa_description": "Install this application on your home screen for faster access",
|
|
59
|
-
"pwa_share_button": "Share button",
|
|
60
|
-
"pwa_tap": "Just tap",
|
|
61
56
|
"read_more": "Read more",
|
|
62
57
|
"region": "State / Province",
|
|
63
58
|
"remove": "Remove",
|
|
@@ -89,4 +84,4 @@
|
|
|
89
84
|
"you_can_upload_up_to_n_files": "You can upload one file at most|You can upload up to {count} files",
|
|
90
85
|
"you_cannot_select_more_than_x_items": "You can't select more than one item|You can't select more than {count} items"
|
|
91
86
|
}
|
|
92
|
-
}
|
|
87
|
+
}
|
package/src/lang/fr.json
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"file_must_be_of_type": "Le fichier doit être de type",
|
|
35
35
|
"filters": "Filtres",
|
|
36
36
|
"go_to_page": "Page",
|
|
37
|
-
"install": "Installer",
|
|
38
37
|
"invalid_value": "Valeur invalide",
|
|
39
38
|
"just_now": "à l’instant",
|
|
40
39
|
"maximum_x_decimal_places": "Maximum 1 décimale|Maximum {count} décimales",
|
|
@@ -54,10 +53,6 @@
|
|
|
54
53
|
"postal_code_zip_code": "Code postal",
|
|
55
54
|
"previous": "Précédent",
|
|
56
55
|
"previous_month": "Mois précédent",
|
|
57
|
-
"pwa_add_to_home_screen": "puis 'Sur l'écran d'accueil'",
|
|
58
|
-
"pwa_description": "Installer cette application sur votre écran d'accueil pour un accès ",
|
|
59
|
-
"pwa_share_button": "Bouton de partage",
|
|
60
|
-
"pwa_tap": "Appuyez sur",
|
|
61
56
|
"read_more": "Lire la suite",
|
|
62
57
|
"region": "État / Province",
|
|
63
58
|
"remove": "Retirer",
|
|
@@ -89,4 +84,4 @@
|
|
|
89
84
|
"you_can_upload_up_to_n_files": "Vous pouvez télécharger un fichier au maximum|Vous pouvez télécharger jusqu'à {count} fichiers",
|
|
90
85
|
"you_cannot_select_more_than_x_items": "Vous ne pouvez pas sélectionner plus de un élément|Vous ne pouvez pas sélectionner plus de {count} éléments"
|
|
91
86
|
}
|
|
92
|
-
}
|
|
87
|
+
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
appName: {
|
|
3
|
-
required: true;
|
|
4
|
-
type: StringConstructor;
|
|
5
|
-
};
|
|
6
|
-
srcLogo: {
|
|
7
|
-
required: true;
|
|
8
|
-
type: StringConstructor;
|
|
9
|
-
};
|
|
10
|
-
title: {
|
|
11
|
-
default: string;
|
|
12
|
-
type: StringConstructor;
|
|
13
|
-
};
|
|
14
|
-
description: {
|
|
15
|
-
default: string;
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
};
|
|
18
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
-
appName: {
|
|
20
|
-
required: true;
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
};
|
|
23
|
-
srcLogo: {
|
|
24
|
-
required: true;
|
|
25
|
-
type: StringConstructor;
|
|
26
|
-
};
|
|
27
|
-
title: {
|
|
28
|
-
default: string;
|
|
29
|
-
type: StringConstructor;
|
|
30
|
-
};
|
|
31
|
-
description: {
|
|
32
|
-
default: string;
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
};
|
|
35
|
-
}>>, {
|
|
36
|
-
title: string;
|
|
37
|
-
description: string;
|
|
38
|
-
}, {}>, {
|
|
39
|
-
footer?(_: {}): any;
|
|
40
|
-
}>;
|
|
41
|
-
export default _default;
|
|
42
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
-
new (): {
|
|
44
|
-
$slots: S;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import BasePWAPrompt from './BasePWAPrompt.vue';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/BasePWAPrompt',
|
|
5
|
-
component: BasePWAPrompt,
|
|
6
|
-
argTypes: {
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const Template = (args) => ({
|
|
11
|
-
components: { BasePWAPrompt },
|
|
12
|
-
setup() {
|
|
13
|
-
return { args };
|
|
14
|
-
},
|
|
15
|
-
template: `
|
|
16
|
-
<BasePWAPrompt v-bind="args">
|
|
17
|
-
|
|
18
|
-
</BasePWAPrompt>
|
|
19
|
-
`,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const TemplateWithFooter = (args) => ({
|
|
23
|
-
components: { BasePWAPrompt },
|
|
24
|
-
setup() {
|
|
25
|
-
return { args };
|
|
26
|
-
},
|
|
27
|
-
template: `
|
|
28
|
-
<BasePWAPrompt v-bind="args">
|
|
29
|
-
<template #footer>
|
|
30
|
-
<div class="bg-red-500 p-4 text-center text-white">
|
|
31
|
-
Custom footer
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
</BasePWAPrompt>
|
|
35
|
-
`,
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export const Demo = Template.bind({});
|
|
39
|
-
Demo.args = {
|
|
40
|
-
appName: 'Witify',
|
|
41
|
-
srcLogo: 'https://media.licdn.com/dms/image/D4E0BAQGYgsAV7tho4Q/company-logo_100_100/0/1685653464675?e=1694044800&v=beta&t=0cnsfS5qXUVgnDPQhB9WUgYa5UkKqWKcxzDYBbe9kb0',
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export const WithSlotFooter = TemplateWithFooter.bind({});
|
|
47
|
-
WithSlotFooter.args = {
|
|
48
|
-
appName: 'Witify',
|
|
49
|
-
srcLogo: 'https://media.licdn.com/dms/image/D4E0BAQGYgsAV7tho4Q/company-logo_100_100/0/1685653464675?e=1694044800&v=beta&t=0cnsfS5qXUVgnDPQhB9WUgYa5UkKqWKcxzDYBbe9kb0',
|
|
50
|
-
};
|
|
51
|
-
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<BaseModalCenter
|
|
3
|
-
v-model="active"
|
|
4
|
-
clipped
|
|
5
|
-
>
|
|
6
|
-
<div class="">
|
|
7
|
-
<div class="text-center py-4 px-8">
|
|
8
|
-
<div class="flex justify-center p-2">
|
|
9
|
-
<img :src="srcLogo" :alt="appName" class="h-16 w-16 rounded-lg shadow-md my-4" />
|
|
10
|
-
</div>
|
|
11
|
-
<h2 class="mb-4 text-lg">
|
|
12
|
-
<div v-if="title">
|
|
13
|
-
{{ title }}
|
|
14
|
-
</div>
|
|
15
|
-
<div v-else>
|
|
16
|
-
{{ t('sui.install') + ' ' + appName }}
|
|
17
|
-
</div>
|
|
18
|
-
</h2>
|
|
19
|
-
<p class="text-gray-600">
|
|
20
|
-
{{ description }}
|
|
21
|
-
</p>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<slot name="footer">
|
|
25
|
-
<div class="flex items-center justify-center bg-slate-100 p-4 text-sm text-slate-600">
|
|
26
|
-
{{ $t('sui.pwa_tap') }}
|
|
27
|
-
<BaseIcon icon="heroicons:arrow-up-on-square" class="h-6 w-6 mx-1"/>
|
|
28
|
-
|
|
29
|
-
{{ $t('sui.pwa_add_to_home_screen') }}
|
|
30
|
-
</div>
|
|
31
|
-
</slot>
|
|
32
|
-
</div>
|
|
33
|
-
</BaseModalCenter>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script lang="ts" setup>
|
|
37
|
-
import { DateTime } from 'luxon';
|
|
38
|
-
import { t } from '@/i18n';
|
|
39
|
-
import BaseModalCenter from './BaseModalCenter.vue';
|
|
40
|
-
import { Icon as BaseIcon } from '@iconify/vue';
|
|
41
|
-
|
|
42
|
-
const props = defineProps({
|
|
43
|
-
appName: {
|
|
44
|
-
required: true,
|
|
45
|
-
type: String,
|
|
46
|
-
},
|
|
47
|
-
srcLogo: {
|
|
48
|
-
required: true,
|
|
49
|
-
type: String,
|
|
50
|
-
},
|
|
51
|
-
title: {
|
|
52
|
-
default: '',
|
|
53
|
-
type: String,
|
|
54
|
-
},
|
|
55
|
-
description: {
|
|
56
|
-
default: t('sui.pwa_description'),
|
|
57
|
-
type: String,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const active = ref(false)
|
|
62
|
-
|
|
63
|
-
function close() {
|
|
64
|
-
hide();
|
|
65
|
-
active.value = false;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
watch(
|
|
69
|
-
() => active.value,
|
|
70
|
-
() => {
|
|
71
|
-
if (!active.value) {
|
|
72
|
-
hide()
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
const KEY = 'lastPwaPrompt';
|
|
78
|
-
|
|
79
|
-
function hide() {
|
|
80
|
-
const now = DateTime.now().toISO() as string;
|
|
81
|
-
localStorage.setItem(KEY, now);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function canShow() {
|
|
85
|
-
if ((navigator as any).standalone) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const today = DateTime.now();
|
|
90
|
-
let days = Number.MAX_SAFE_INTEGER;
|
|
91
|
-
|
|
92
|
-
const lastPrompt = localStorage.getItem(KEY);
|
|
93
|
-
if (lastPrompt) {
|
|
94
|
-
const lastPromptDateTime = DateTime.fromISO(lastPrompt);
|
|
95
|
-
days = lastPromptDateTime.diff(today, 'days').days;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const isApple = ['iPhone', 'iPad', 'iPod'].includes(navigator.platform);
|
|
99
|
-
return (isNaN(days) || days > 14) //&& isApple;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
onMounted(() => {
|
|
103
|
-
if (canShow()) {
|
|
104
|
-
active.value = true;
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
</script>
|