cec-nuxt-lib 0.10.3 → 0.10.5
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/module.d.mts +2 -1
- package/dist/module.json +5 -1
- package/dist/runtime/components/cecBreadcrumb.vue +27 -50
- package/dist/runtime/components/cecBreadcrumb.vue.d.ts +2 -0
- package/dist/runtime/components/cecCanvas.vue +148 -220
- package/dist/runtime/components/cecCanvas.vue.d.ts +12 -0
- package/dist/runtime/components/cecFeedback.vue +11 -11
- package/dist/runtime/components/cecFeedback.vue.d.ts +28 -0
- package/dist/runtime/components/cecFooter.vue.d.ts +2 -0
- package/dist/runtime/components/cecHeader.vue +104 -149
- package/dist/runtime/components/cecHeader.vue.d.ts +2 -0
- package/dist/runtime/components/cecMeta.vue +73 -80
- package/dist/runtime/components/cecMeta.vue.d.ts +2 -0
- package/dist/runtime/components/chatbot.vue +50 -65
- package/dist/runtime/components/chatbot.vue.d.ts +2 -0
- package/dist/runtime/components/inThisSection.vue +2 -2
- package/dist/runtime/components/inThisSection.vue.d.ts +2 -0
- package/dist/runtime/components/pagination.vue +5 -6
- package/dist/runtime/components/pagination.vue.d.ts +2 -0
- package/dist/types.d.mts +2 -15
- package/package.json +24 -17
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -7
- package/dist/types.d.ts +0 -16
- /package/dist/runtime/composables/{useMakePages.mjs → useMakePages.js} +0 -0
package/dist/module.d.mts
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,70 +1,47 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { useState, useRuntimeConfig } from
|
|
3
|
-
import { useRoute } from
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useState, useRuntimeConfig } from "#app";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
4
4
|
const config = useRuntimeConfig();
|
|
5
5
|
const baseUrl = config.app.baseURL;
|
|
6
|
-
const page = useState(
|
|
6
|
+
const page = useState("page");
|
|
7
7
|
const route = useRoute();
|
|
8
|
-
|
|
9
8
|
const trimPath = (str) => {
|
|
10
|
-
if (str ===
|
|
9
|
+
if (str === "/" || !str) {
|
|
11
10
|
return str;
|
|
12
11
|
}
|
|
13
|
-
return str.replace(/\/$/,
|
|
12
|
+
return str.replace(/\/$/, "");
|
|
14
13
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return i ? routes.slice(0, i + 1).join('/') : '/';
|
|
14
|
+
const makeLink = (i, routes2, length2) => {
|
|
15
|
+
if (baseUrl !== "/") {
|
|
16
|
+
return i ? routes2.slice(0, i + 1).join("/") : "/";
|
|
19
17
|
} else {
|
|
20
|
-
return
|
|
18
|
+
return routes2.slice(0, i + length2).join("/");
|
|
21
19
|
}
|
|
22
20
|
};
|
|
23
|
-
|
|
24
21
|
const toTitleCase = (str) => {
|
|
25
|
-
return str
|
|
26
|
-
.split(/\s/)
|
|
27
|
-
.map((e) => toSentenceCase(e))
|
|
28
|
-
.join(' ');
|
|
22
|
+
return str.split(/\s/).map((e) => toSentenceCase(e)).join(" ");
|
|
29
23
|
};
|
|
30
|
-
|
|
31
24
|
const toSentenceCase = (str, notLast) => {
|
|
32
|
-
return !str.length
|
|
33
|
-
? ''
|
|
34
|
-
: notLast
|
|
35
|
-
? `${str[0].toUpperCase()}${str.slice(1).replace(/[-_]/g, ' ')}`
|
|
36
|
-
: `${str[0].toUpperCase()}${str.slice(1).replace(/_/g, ' ')}`;
|
|
25
|
+
return !str.length ? "" : notLast ? `${str[0].toUpperCase()}${str.slice(1).replace(/[-_]/g, " ")}` : `${str[0].toUpperCase()}${str.slice(1).replace(/_/g, " ")}`;
|
|
37
26
|
};
|
|
38
|
-
|
|
39
|
-
// Make arrays of the items in the paths
|
|
40
27
|
let routeTrim = trimPath(route.path);
|
|
41
|
-
let routes = routeTrim.split(
|
|
42
|
-
let classic = trimPath(page.value.classicPath).split(
|
|
28
|
+
let routes = routeTrim.split("/");
|
|
29
|
+
let classic = trimPath(page.value.classicPath).split("/");
|
|
43
30
|
const length = classic.length;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return [...acc, e];
|
|
56
|
-
}
|
|
57
|
-
}, []);
|
|
58
|
-
|
|
59
|
-
// Sentence case for the breadcrumb display
|
|
60
|
-
const links = hrefs.map((e, i) =>
|
|
61
|
-
!i
|
|
62
|
-
? 'Home'
|
|
63
|
-
: routeTrim.includes('digital-contact-card')
|
|
64
|
-
? toSentenceCase(e, hrefs.length - 1 - i)
|
|
65
|
-
: toSentenceCase(e, 1)
|
|
31
|
+
let hrefs = baseUrl !== "/" ? `${page.value.classicPath}${routeTrim === "/" ? "" : routeTrim}`.split(
|
|
32
|
+
"/"
|
|
33
|
+
) : routes.reduce((acc, e, i) => {
|
|
34
|
+
if (classic[i]) {
|
|
35
|
+
return [...acc, classic[i]];
|
|
36
|
+
} else {
|
|
37
|
+
return [...acc, e];
|
|
38
|
+
}
|
|
39
|
+
}, []);
|
|
40
|
+
const links = hrefs.map(
|
|
41
|
+
(e, i) => !i ? "Home" : routeTrim.includes("digital-contact-card") ? toSentenceCase(e, hrefs.length - 1 - i) : toSentenceCase(e, 1)
|
|
66
42
|
);
|
|
67
43
|
</script>
|
|
44
|
+
|
|
68
45
|
<template>
|
|
69
46
|
<div class="cec-breadcrumb-bg">
|
|
70
47
|
<div class="container">
|
|
@@ -75,7 +52,7 @@ const links = hrefs.map((e, i) =>
|
|
|
75
52
|
<li class="breadcrumb-item" v-for="(l, i) in links" :key="i">
|
|
76
53
|
<!-- Node we are on -->
|
|
77
54
|
<span v-if="i === links.length - 1">{{
|
|
78
|
-
links.includes(
|
|
55
|
+
links.includes("Parties") ? toTitleCase(l) : l
|
|
79
56
|
}}</span>
|
|
80
57
|
<!-- Nuxt links -->
|
|
81
58
|
<template v-else-if="i + 1 >= length">
|
|
@@ -0,0 +1,2 @@
|
|
|
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;
|