@nuxtify/pages 0.2.0 → 0.3.1
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/LICENSE +21 -0
- package/README.md +222 -203
- package/dist/module.d.mts +0 -83
- package/dist/module.json +2 -2
- package/dist/module.mjs +9 -66
- package/dist/runtime/components/EmailSubscribeForm.vue +75 -75
- package/dist/runtime/components/FooterCallToAction.vue +29 -29
- package/dist/runtime/components/app/AppBar.vue +109 -109
- package/dist/runtime/components/app/AppFooter.vue +132 -132
- package/dist/runtime/components/app/AppNavigationDrawer.vue +86 -86
- package/dist/runtime/layouts/DefaultLayout.vue +25 -23
- package/dist/runtime/pages/DynamicSlug.vue +15 -15
- package/dist/runtime/pages/IndexPage.vue +16 -12
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/utils/icons.d.ts +1 -1
- package/dist/runtime/utils/icons.js +1 -1
- package/package.json +64 -65
- package/dist/runtime/components/app/AppAnnouncementBar.vue +0 -36
- package/dist/runtime/components/app/AppAnnouncementBar.vue.d.ts +0 -2
- package/dist/runtime/components/app/AppDialog.vue +0 -38
- package/dist/runtime/components/app/AppDialog.vue.d.ts +0 -2
- package/dist/runtime/components/app/AppLoading.vue +0 -16
- package/dist/runtime/components/app/AppLoading.vue.d.ts +0 -2
- package/dist/runtime/components/app/AppLogo.vue +0 -41
- package/dist/runtime/components/app/AppLogo.vue.d.ts +0 -23
- package/dist/runtime/components/app/AppToast.vue +0 -16
- package/dist/runtime/components/app/AppToast.vue.d.ts +0 -2
- package/dist/runtime/composables/dialog.d.ts +0 -13
- package/dist/runtime/composables/dialog.js +0 -15
- package/dist/runtime/composables/nuxtify.d.ts +0 -2
- package/dist/runtime/composables/nuxtify.js +0 -2
- package/dist/runtime/composables/state.d.ts +0 -15
- package/dist/runtime/composables/state.js +0 -10
- package/dist/runtime/server/composables/client.d.ts +0 -1
- package/dist/runtime/server/composables/client.js +0 -1
- package/dist/runtime/server/utils/client.d.ts +0 -1
- package/dist/runtime/server/utils/client.js +0 -1
- package/dist/runtime/utils/formRules.d.ts +0 -19
- package/dist/runtime/utils/formRules.js +0 -23
- package/dist/runtime/utils/io.d.ts +0 -2
- package/dist/runtime/utils/io.js +0 -19
- package/dist/runtime/utils/math.d.ts +0 -2
- package/dist/runtime/utils/math.js +0 -13
- package/dist/runtime/utils/text.d.ts +0 -23
- package/dist/runtime/utils/text.js +0 -159
- package/dist/runtime/utils/time.d.ts +0 -2
- package/dist/runtime/utils/time.js +0 -7
- package/dist/runtime/utils/url.d.ts +0 -9
- package/dist/runtime/utils/url.js +0 -27
- package/dist/runtime/utils/util.d.ts +0 -7
- package/dist/runtime/utils/util.js +0 -5
- package/dist/runtime/utils/youtube.d.ts +0 -1
- package/dist/runtime/utils/youtube.js +0 -13
package/package.json
CHANGED
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nuxtify/pages",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Nuxtify pages module powered by Nuxt and Vuetify.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"homepage": "https://nuxtify.dev
|
|
7
|
-
"author": "Nuxtify.dev <hello@nuxtify.dev>",
|
|
8
|
-
"funding": "https://github.com/sponsors/davidstackio",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/nuxtify-dev/pages"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/nuxtify-dev/pages/issues"
|
|
15
|
-
},
|
|
16
|
-
"type": "module",
|
|
17
|
-
"exports": {
|
|
18
|
-
".": {
|
|
19
|
-
"types": "./dist/types.d.mts",
|
|
20
|
-
"import": "./dist/module.mjs"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"main": "./dist/module.mjs",
|
|
24
|
-
"typesVersions": {
|
|
25
|
-
"*": {
|
|
26
|
-
".": [
|
|
27
|
-
"./dist/types.d.mts"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
"dist"
|
|
33
|
-
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"prepack": "nuxt-module-build build",
|
|
36
|
-
"dev": "nuxi dev playground",
|
|
37
|
-
"dev:build": "nuxi build playground",
|
|
38
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
39
|
-
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
40
|
-
"lint": "eslint .",
|
|
41
|
-
"test": "vitest run",
|
|
42
|
-
"test:watch": "vitest watch",
|
|
43
|
-
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
44
|
-
},
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"defu": "^6.1.4"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"@nuxt/
|
|
52
|
-
"@nuxt/
|
|
53
|
-
"@nuxt/
|
|
54
|
-
"@nuxt/
|
|
55
|
-
"@nuxt/
|
|
56
|
-
"@
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@nuxtify/pages",
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Nuxtify pages module powered by Nuxt and Vuetify.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://nuxtify.dev",
|
|
7
|
+
"author": "Nuxtify.dev <hello@nuxtify.dev>",
|
|
8
|
+
"funding": "https://github.com/sponsors/davidstackio",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/nuxtify-dev/pages"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/nuxtify-dev/pages/issues"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/types.d.mts",
|
|
20
|
+
"import": "./dist/module.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"main": "./dist/module.mjs",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
"*": {
|
|
26
|
+
".": [
|
|
27
|
+
"./dist/types.d.mts"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"prepack": "nuxt-module-build build",
|
|
36
|
+
"dev": "nuxi dev playground",
|
|
37
|
+
"dev:build": "nuxi build playground",
|
|
38
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
39
|
+
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
40
|
+
"lint": "eslint .",
|
|
41
|
+
"test": "vitest run",
|
|
42
|
+
"test:watch": "vitest watch",
|
|
43
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@nuxtify/core": "^0.1.0",
|
|
47
|
+
"defu": "^6.1.4"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@nuxt/devtools": "^2.4.1",
|
|
51
|
+
"@nuxt/eslint-config": "^1.3.1",
|
|
52
|
+
"@nuxt/kit": "^3.17.3",
|
|
53
|
+
"@nuxt/module-builder": "^1.0.1",
|
|
54
|
+
"@nuxt/schema": "^3.17.3",
|
|
55
|
+
"@nuxt/test-utils": "^3.19.0",
|
|
56
|
+
"@types/node": "^22.15.18",
|
|
57
|
+
"changelogen": "^0.6.1",
|
|
58
|
+
"eslint": "^9.26.0",
|
|
59
|
+
"nuxt": "^3.17.3",
|
|
60
|
+
"typescript": "~5.8.2",
|
|
61
|
+
"vitest": "^3.1.3",
|
|
62
|
+
"vue-tsc": "^2.2.10"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useDisplay, computed, useNuxtifyConfig, isExternalUrl } from "#imports";
|
|
3
|
-
const nuxtifyConfig = useNuxtifyConfig();
|
|
4
|
-
const { xs } = useDisplay();
|
|
5
|
-
const isExternalLink = computed(
|
|
6
|
-
() => isExternalUrl(nuxtifyConfig.announcement?.buttonUrl ?? "", nuxtifyConfig.brand?.domain ?? "")
|
|
7
|
-
);
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<template>
|
|
11
|
-
<v-system-bar
|
|
12
|
-
:height="xs ? 60 : 40"
|
|
13
|
-
:order="-100"
|
|
14
|
-
color="primary"
|
|
15
|
-
class="justify-center text-start"
|
|
16
|
-
>
|
|
17
|
-
<div
|
|
18
|
-
v-if="nuxtifyConfig.announcement?.message"
|
|
19
|
-
:class="`${xs ? 'text-subtitle-2' : 'text-subtitle-1'} mr-4`"
|
|
20
|
-
>
|
|
21
|
-
{{ nuxtifyConfig.announcement.message }}
|
|
22
|
-
</div>
|
|
23
|
-
<v-btn
|
|
24
|
-
v-if="
|
|
25
|
-
nuxtifyConfig.announcement?.buttonText && nuxtifyConfig.announcement.buttonUrl
|
|
26
|
-
"
|
|
27
|
-
:to="!isExternalLink ? nuxtifyConfig.announcement.buttonUrl : void 0"
|
|
28
|
-
:href="isExternalLink ? nuxtifyConfig.announcement.buttonUrl : void 0"
|
|
29
|
-
size="small"
|
|
30
|
-
variant="flat"
|
|
31
|
-
color="secondary"
|
|
32
|
-
>
|
|
33
|
-
{{ nuxtifyConfig.announcement.buttonText }}
|
|
34
|
-
</v-btn>
|
|
35
|
-
</v-system-bar>
|
|
36
|
-
</template>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useDialog } from "#imports";
|
|
3
|
-
const dialog = useDialog();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<v-dialog
|
|
8
|
-
v-model="dialog.show"
|
|
9
|
-
width="500"
|
|
10
|
-
>
|
|
11
|
-
<v-card class="pa-2">
|
|
12
|
-
<v-card-title>{{ dialog.title }}</v-card-title>
|
|
13
|
-
|
|
14
|
-
<v-card-text class="ml-n2">
|
|
15
|
-
{{ dialog.message }}
|
|
16
|
-
</v-card-text>
|
|
17
|
-
|
|
18
|
-
<v-card-actions>
|
|
19
|
-
<v-spacer />
|
|
20
|
-
|
|
21
|
-
<v-btn
|
|
22
|
-
color="grey-darken-1"
|
|
23
|
-
@click="dialog.show = false"
|
|
24
|
-
>
|
|
25
|
-
{{ dialog.closeButtonText }}
|
|
26
|
-
</v-btn>
|
|
27
|
-
|
|
28
|
-
<v-btn
|
|
29
|
-
:color="dialog.action.buttonColor"
|
|
30
|
-
variant="flat"
|
|
31
|
-
@click="dialog.action.function"
|
|
32
|
-
>
|
|
33
|
-
{{ dialog.action.buttonText }}
|
|
34
|
-
</v-btn>
|
|
35
|
-
</v-card-actions>
|
|
36
|
-
</v-card>
|
|
37
|
-
</v-dialog>
|
|
38
|
-
</template>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="center">
|
|
3
|
-
<div class="sk-chase">
|
|
4
|
-
<div class="sk-chase-dot" />
|
|
5
|
-
<div class="sk-chase-dot" />
|
|
6
|
-
<div class="sk-chase-dot" />
|
|
7
|
-
<div class="sk-chase-dot" />
|
|
8
|
-
<div class="sk-chase-dot" />
|
|
9
|
-
<div class="sk-chase-dot" />
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<style scoped>
|
|
15
|
-
.center{align-items:center;display:flex;height:100vh;justify-content:center}.sk-chase{animation:sk-chase 2.5s linear infinite both;height:40px;position:relative;width:40px}.sk-chase-dot{animation:sk-chase-dot 2s ease-in-out infinite both;height:100%;left:0;position:absolute;top:0;width:100%}.sk-chase-dot:before{animation:sk-chase-dot-before 2s ease-in-out infinite both;background-color:rgb(var(--v-theme-primary));border-radius:100%;content:"";display:block;height:25%;width:25%}.sk-chase-dot:first-child{animation-delay:-1.1s}.sk-chase-dot:nth-child(2){animation-delay:-1s}.sk-chase-dot:nth-child(3){animation-delay:-.9s}.sk-chase-dot:nth-child(4){animation-delay:-.8s}.sk-chase-dot:nth-child(5){animation-delay:-.7s}.sk-chase-dot:nth-child(6){animation-delay:-.6s}.sk-chase-dot:first-child:before{animation-delay:-1.1s}.sk-chase-dot:nth-child(2):before{animation-delay:-1s}.sk-chase-dot:nth-child(3):before{animation-delay:-.9s}.sk-chase-dot:nth-child(4):before{animation-delay:-.8s}.sk-chase-dot:nth-child(5):before{animation-delay:-.7s}.sk-chase-dot:nth-child(6):before{animation-delay:-.6s}@keyframes sk-chase{to{transform:rotate(1turn)}}@keyframes sk-chase-dot{80%,to{transform:rotate(1turn)}}@keyframes sk-chase-dot-before{50%{transform:scale(.4)}0%,to{transform:scale(1)}}
|
|
16
|
-
</style>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useAppConfig, useDisplay, computed } from "#imports";
|
|
3
|
-
const props = defineProps({
|
|
4
|
-
dark: {
|
|
5
|
-
type: Boolean,
|
|
6
|
-
default: false
|
|
7
|
-
},
|
|
8
|
-
width: {
|
|
9
|
-
type: Number,
|
|
10
|
-
default: void 0
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const nuxtifyConfig = useAppConfig().nuxtify;
|
|
14
|
-
const { smAndDown } = useDisplay();
|
|
15
|
-
let imageUrl = nuxtifyConfig.brand.logo.lightUrl;
|
|
16
|
-
if (props.dark && nuxtifyConfig.brand.logo.darkUrl) {
|
|
17
|
-
imageUrl = nuxtifyConfig.brand.logo.darkUrl;
|
|
18
|
-
}
|
|
19
|
-
const width = computed(() => {
|
|
20
|
-
if (props.width) {
|
|
21
|
-
return props.width;
|
|
22
|
-
} else {
|
|
23
|
-
return smAndDown.value ? nuxtifyConfig.brand.logo.mobileWidth : nuxtifyConfig.brand.logo.width;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<template>
|
|
29
|
-
<v-img
|
|
30
|
-
v-if="imageUrl"
|
|
31
|
-
:width
|
|
32
|
-
:src="imageUrl"
|
|
33
|
-
:alt="`${nuxtifyConfig.brand.name} logo`"
|
|
34
|
-
/>
|
|
35
|
-
<span
|
|
36
|
-
v-else
|
|
37
|
-
:class="`text-subtitle-1 text-sm-h6 ${dark ? '' : 'text-primary'}`"
|
|
38
|
-
>
|
|
39
|
-
{{ nuxtifyConfig.brand.name }}
|
|
40
|
-
</span>
|
|
41
|
-
</template>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
dark: {
|
|
3
|
-
type: BooleanConstructor;
|
|
4
|
-
default: boolean;
|
|
5
|
-
};
|
|
6
|
-
width: {
|
|
7
|
-
type: NumberConstructor;
|
|
8
|
-
default: undefined;
|
|
9
|
-
};
|
|
10
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
-
dark: {
|
|
12
|
-
type: BooleanConstructor;
|
|
13
|
-
default: boolean;
|
|
14
|
-
};
|
|
15
|
-
width: {
|
|
16
|
-
type: NumberConstructor;
|
|
17
|
-
default: undefined;
|
|
18
|
-
};
|
|
19
|
-
}>> & Readonly<{}>, {
|
|
20
|
-
dark: boolean;
|
|
21
|
-
width: number;
|
|
22
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
23
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useToast } from "#imports";
|
|
3
|
-
const toast = useToast();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<v-snackbar
|
|
8
|
-
v-model="toast.show"
|
|
9
|
-
:timeout="5e3"
|
|
10
|
-
color="info"
|
|
11
|
-
:min-width="0"
|
|
12
|
-
close-on-content-click
|
|
13
|
-
>
|
|
14
|
-
{{ toast.message }}
|
|
15
|
-
</v-snackbar>
|
|
16
|
-
</template>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface Dialog {
|
|
2
|
-
show: boolean;
|
|
3
|
-
title: string;
|
|
4
|
-
message: string;
|
|
5
|
-
action: {
|
|
6
|
-
function: () => Promise<void>;
|
|
7
|
-
buttonText: string;
|
|
8
|
-
buttonColor: string;
|
|
9
|
-
};
|
|
10
|
-
closeButtonText: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const dialogInitialState: Dialog;
|
|
13
|
-
export declare const useDialog: () => import("vue").Ref<Dialog, Dialog>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useState } from "#imports";
|
|
2
|
-
export const dialogInitialState = {
|
|
3
|
-
show: false,
|
|
4
|
-
title: "",
|
|
5
|
-
message: "",
|
|
6
|
-
action: {
|
|
7
|
-
function: () => new Promise((resolve) => resolve()),
|
|
8
|
-
buttonText: "",
|
|
9
|
-
buttonColor: ""
|
|
10
|
-
},
|
|
11
|
-
closeButtonText: "Cancel"
|
|
12
|
-
};
|
|
13
|
-
export const useDialog = () => useState("dialog", () => {
|
|
14
|
-
return dialogInitialState;
|
|
15
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const useDrawer: () => import("vue").Ref<boolean | null, boolean | null>;
|
|
2
|
-
export declare const useToast: () => import("vue").Ref<{
|
|
3
|
-
show: boolean;
|
|
4
|
-
message: string;
|
|
5
|
-
} | {
|
|
6
|
-
show: boolean;
|
|
7
|
-
message: string;
|
|
8
|
-
}, {
|
|
9
|
-
show: boolean;
|
|
10
|
-
message: string;
|
|
11
|
-
} | {
|
|
12
|
-
show: boolean;
|
|
13
|
-
message: string;
|
|
14
|
-
}>;
|
|
15
|
-
export declare const useErrorMessage: () => import("vue").Ref<string, string>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ref, useState } from "#imports";
|
|
2
|
-
export const useDrawer = () => useState("drawer", () => null);
|
|
3
|
-
export const useToast = () => useState(
|
|
4
|
-
"toast",
|
|
5
|
-
() => ref({
|
|
6
|
-
show: false,
|
|
7
|
-
message: ""
|
|
8
|
-
})
|
|
9
|
-
);
|
|
10
|
-
export const useErrorMessage = () => useState("errorMessage", () => "");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useNuxtifyConfig } from '../../composables/nuxtify.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useNuxtifyConfig } from "../../composables/nuxtify.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { slugify, unslugify } from '../../utils/text.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { slugify, unslugify } from "../../utils/text.js";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const formRules: {
|
|
2
|
-
required: (v: string) => true | "Required";
|
|
3
|
-
requiredArray: <T>(v: Array<T>) => true | "Required";
|
|
4
|
-
validEmail: (v: string) => true | "Must be a valid email address";
|
|
5
|
-
minLength8: (v: string) => true | "Must be at least 8 characters";
|
|
6
|
-
minLength12: (v: string) => true | "Must be at least 12 characters";
|
|
7
|
-
maxLength30: (v: string) => true | "Must not be longer than 30 characters";
|
|
8
|
-
maxLength60: (v: string) => true | "Must not be longer than 60 characters";
|
|
9
|
-
maxLength120: (v: string) => true | "Must not be longer than 120 characters";
|
|
10
|
-
maxLength200: (v: string) => true | "Must not be longer than 200 characters";
|
|
11
|
-
maxLength300: (v: string) => true | "Must not be longer than 300 characters";
|
|
12
|
-
maxLength600: (v: string) => true | "Must not be longer than 600 characters";
|
|
13
|
-
maxLength1200: (v: string) => true | "Must not be longer than 1200 characters";
|
|
14
|
-
isInteger: (v: string) => true | "Must be an integer";
|
|
15
|
-
gt0: (v: string) => true | "Must be greater than 0";
|
|
16
|
-
gte6: (v: string) => true | "Must be greater than or equal to 6";
|
|
17
|
-
lte12: (v: string) => true | "Must be less than or equal to 12";
|
|
18
|
-
lte365: (v: string) => true | "Must be less than or equal to 365";
|
|
19
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export const formRules = {
|
|
2
|
-
// Required
|
|
3
|
-
required: (v) => !!v || "Required",
|
|
4
|
-
requiredArray: (v) => !!v.length || "Required",
|
|
5
|
-
// Text
|
|
6
|
-
validEmail: (v) => /.+@.+/.test(v) || "Must be a valid email address",
|
|
7
|
-
// Length
|
|
8
|
-
minLength8: (v) => v ? v.length >= 8 || "Must be at least 8 characters" : true,
|
|
9
|
-
minLength12: (v) => v ? v.length >= 12 || "Must be at least 12 characters" : true,
|
|
10
|
-
maxLength30: (v) => v ? v.length <= 30 || "Must not be longer than 30 characters" : true,
|
|
11
|
-
maxLength60: (v) => v ? v.length <= 60 || "Must not be longer than 60 characters" : true,
|
|
12
|
-
maxLength120: (v) => v ? v.length <= 120 || "Must not be longer than 120 characters" : true,
|
|
13
|
-
maxLength200: (v) => v ? v.length <= 200 || "Must not be longer than 200 characters" : true,
|
|
14
|
-
maxLength300: (v) => v ? v.length <= 300 || "Must not be longer than 300 characters" : true,
|
|
15
|
-
maxLength600: (v) => v ? v.length <= 600 || "Must not be longer than 600 characters" : true,
|
|
16
|
-
maxLength1200: (v) => v ? v.length <= 1200 || "Must not be longer than 1200 characters" : true,
|
|
17
|
-
// Number
|
|
18
|
-
isInteger: (v) => Number.isInteger(+v) || "Must be an integer",
|
|
19
|
-
gt0: (v) => Number.parseFloat(v) > 0 || "Must be greater than 0",
|
|
20
|
-
gte6: (v) => Number.parseFloat(v) >= 6 || "Must be greater than or equal to 6",
|
|
21
|
-
lte12: (v) => Number.parseFloat(v) <= 12 || "Must be less than or equal to 12",
|
|
22
|
-
lte365: (v) => Number.parseFloat(v) <= 365 || "Must be less than or equal to 365"
|
|
23
|
-
};
|
package/dist/runtime/utils/io.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export function blobToDataURL(blob) {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
const reader = new FileReader();
|
|
4
|
-
reader.onload = (_e) => resolve(reader.result);
|
|
5
|
-
reader.onerror = (_e) => reject(reader.error);
|
|
6
|
-
reader.onabort = (_e) => reject(new Error("Read aborted"));
|
|
7
|
-
reader.readAsDataURL(blob);
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
export function filenameToUrl(filename, timestamped = false) {
|
|
11
|
-
const filenameClean = encodeURIComponent(
|
|
12
|
-
filename.trim().replace(/[^a-z0-9.-]/gi, "-").replace(/-{2,}/g, "-").replace(/\.{2,}/g, ".").replace(/-\./g, ".").replace(/-$/g, "").replace(/^-/g, "").slice(0, 500)
|
|
13
|
-
// limit to the first 500 characters
|
|
14
|
-
);
|
|
15
|
-
if (timestamped) {
|
|
16
|
-
return `${Date.now()}-${filenameClean}`;
|
|
17
|
-
}
|
|
18
|
-
return filenameClean;
|
|
19
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export function toPercentage(val, decimals = 0) {
|
|
2
|
-
const percentage = (val * 100).toFixed(decimals);
|
|
3
|
-
return `${percentage}%`;
|
|
4
|
-
}
|
|
5
|
-
export function roundToFixed(val, positions = 2) {
|
|
6
|
-
let text = 0;
|
|
7
|
-
if (typeof val === "string") {
|
|
8
|
-
text = +Number.parseFloat(val).toFixed(positions);
|
|
9
|
-
} else if (typeof val === "number") {
|
|
10
|
-
text = +val.toFixed(positions);
|
|
11
|
-
}
|
|
12
|
-
return text;
|
|
13
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare const titleCase: (text: string, skipShortWords?: boolean) => string;
|
|
2
|
-
export declare function capitalizeFirstLetter(text: string): string;
|
|
3
|
-
export declare function fullName(firstName: string, lastName: string): string;
|
|
4
|
-
export declare function parseFullName(fullName: string | undefined | null): {
|
|
5
|
-
firstName: string;
|
|
6
|
-
lastName: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const honoraryName: (name: string, honorificSuffix?: string) => string;
|
|
9
|
-
export declare function getPronouns(gender: string): {
|
|
10
|
-
single: string;
|
|
11
|
-
plural: string;
|
|
12
|
-
possessive: string;
|
|
13
|
-
possessivePlural: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const formatPhone: (input: string, separator?: string) => string;
|
|
16
|
-
export declare function formatDate(date: string, locale?: string): string;
|
|
17
|
-
export declare function formatDateTime(date: string, locale?: string): string;
|
|
18
|
-
export declare function booleanToText(bool: boolean): "Yes" | "No";
|
|
19
|
-
export declare const truncate: (text: string, maxLength?: number, ellipses?: boolean) => string;
|
|
20
|
-
export declare const slugify: (text: string) => string;
|
|
21
|
-
export declare const unslugify: (text: string) => string;
|
|
22
|
-
export declare function pluralize(value: number, units: string, showValue?: boolean): string;
|
|
23
|
-
export declare const getLanguageName: (languageCode: string, displayLanguage?: string) => string | undefined;
|