cec-nuxt-lib 0.10.2 → 0.10.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.
@@ -1,123 +1,116 @@
1
1
  <script setup>
2
- import { useState, useHead, useSeoMeta } from '#app';
3
- const baseUrl = useState('baseUrl');
4
- const ogImage = useState('ogImage');
5
- const path = useState('path');
6
- const page = useState('page');
7
-
8
- let reviewDate = page.value.dateReviewed
9
- ? new Date(page.value.dateReviewed)
10
- : new Date();
2
+ import { useState, useHead, useSeoMeta } from "#app";
3
+ const baseUrl = useState("baseUrl");
4
+ const ogImage = useState("ogImage");
5
+ const path = useState("path");
6
+ const page = useState("page");
7
+ let reviewDate = page.value.dateReviewed ? new Date(page.value.dateReviewed) : /* @__PURE__ */ new Date();
11
8
  let reviewISO = reviewDate.toISOString().slice(0, 10);
12
-
13
9
  let meta = [
14
10
  {
15
- name: 'description',
16
- content: page.value.description,
17
- },
11
+ name: "description",
12
+ content: page.value.description
13
+ }
18
14
  ];
19
-
20
15
  if (page.value.noindex) {
21
- meta.push({ name: 'robots', content: 'noindex, nofollow' });
16
+ meta.push({ name: "robots", content: "noindex, nofollow" });
22
17
  }
23
-
24
18
  useHead({
25
19
  title: page.value.title,
26
- meta: meta,
20
+ meta,
27
21
  script: [
28
22
  {
29
- type: 'application/ld+json',
23
+ type: "application/ld+json",
30
24
  children: {
31
- '@context': 'https://schema.org',
32
- '@type': 'WebPage',
33
- lastReviewed: reviewISO,
34
- },
25
+ "@context": "https://schema.org",
26
+ "@type": "WebPage",
27
+ lastReviewed: reviewISO
28
+ }
35
29
  },
36
30
  {
37
- type: 'application/ld+json',
31
+ type: "application/ld+json",
38
32
  children: {
39
- '@context': 'https://schema.org',
40
- '@type': 'Organization',
41
- name: 'Cheshire East Council',
33
+ "@context": "https://schema.org",
34
+ "@type": "Organization",
35
+ name: "Cheshire East Council",
42
36
  address: {
43
- '@type': 'PostalAddress',
44
- addressRegion: 'Cheshire',
45
- addressLocality: 'Crewe',
46
- postalCode: 'CW1 2LL',
47
- streetAddress: 'Delamere House, Delamere Street',
37
+ "@type": "PostalAddress",
38
+ addressRegion: "Cheshire",
39
+ addressLocality: "Crewe",
40
+ postalCode: "CW1 2LL",
41
+ streetAddress: "Delamere House, Delamere Street"
48
42
  },
49
43
  contactPoint: [
50
44
  {
51
- '@type': 'ContactPoint',
52
- telephone: '0300 123 5500',
53
- contactType: 'Cheshire East Information Line',
54
- areaServed: 'Cheshire East',
45
+ "@type": "ContactPoint",
46
+ telephone: "0300 123 5500",
47
+ contactType: "Cheshire East Information Line",
48
+ areaServed: "Cheshire East"
55
49
  },
56
50
  {
57
- '@type': 'ContactPoint',
58
- telephone: '+44 1270 306482',
59
- contactType: 'Cheshire East Information Line (international)',
60
- areaServed: 'Cheshire East',
51
+ "@type": "ContactPoint",
52
+ telephone: "+44 1270 306482",
53
+ contactType: "Cheshire East Information Line (international)",
54
+ areaServed: "Cheshire East"
61
55
  },
62
56
  {
63
- '@type': 'ContactPoint',
64
- telephone: '0808 808 0123',
65
- contactType:
66
- 'Cheshire East Information Line (hearing or speech impaired) RELAY UK 18001',
67
- areaServed: 'Cheshire East',
57
+ "@type": "ContactPoint",
58
+ telephone: "0808 808 0123",
59
+ contactType: "Cheshire East Information Line (hearing or speech impaired) RELAY UK 18001",
60
+ areaServed: "Cheshire East"
68
61
  },
69
-
70
62
  {
71
- '@type': 'ContactPoint',
72
- telephone: '0300 123 5025',
73
- contactType: 'Out of hours Emergency Control Centre',
74
- areaServed: 'Cheshire East',
63
+ "@type": "ContactPoint",
64
+ telephone: "0300 123 5025",
65
+ contactType: "Out of hours Emergency Control Centre",
66
+ areaServed: "Cheshire East"
75
67
  },
76
-
77
68
  {
78
- '@type': 'ContactPoint',
79
- telephone: '0300 123 5022',
80
- contactType: 'Out of hours social care',
81
- areaServed: 'Cheshire East',
69
+ "@type": "ContactPoint",
70
+ telephone: "0300 123 5022",
71
+ contactType: "Out of hours social care",
72
+ areaServed: "Cheshire East"
82
73
  },
83
74
  {
84
- '@type': 'ContactPoint',
75
+ "@type": "ContactPoint",
85
76
  url: `https://digital-core.cheshireeast.gov.uk/w/webpage/request?form=contact_us&pageTitle=${encodeURIComponent(page.value.title)}&pagePath=${baseUrl.value}${path.value}`,
86
- contactType: 'Online contact form',
87
- areaServed: 'Cheshire East',
88
- },
89
- ],
90
- },
77
+ contactType: "Online contact form",
78
+ areaServed: "Cheshire East"
79
+ }
80
+ ]
81
+ }
91
82
  },
92
83
  {
93
- type: 'application/ld+json',
84
+ type: "application/ld+json",
94
85
  children: {
95
- '@context': 'https://schema.org',
96
- '@type': 'GovernmentService',
86
+ "@context": "https://schema.org",
87
+ "@type": "GovernmentService",
97
88
  areaServed: {
98
- '@type': 'AdministrativeArea',
99
- name: 'Cheshire East',
89
+ "@type": "AdministrativeArea",
90
+ name: "Cheshire East"
100
91
  },
101
- description:
102
- 'We provide local government services to around 406,527 residents in Cheshire East and are the 3rd largest Unitary Authority in the North West.',
103
- logo: 'https://www.cheshireeast.gov.uk/images/non_user/cec-logo-colour-155x70px.png',
104
- name: 'Cheshire East Council',
105
- sameAs: 'https://www.cheshireeast.gov.uk',
92
+ description: "We provide local government services to around 406,527 residents in Cheshire East and are the 3rd largest Unitary Authority in the North West.",
93
+ logo: "https://www.cheshireeast.gov.uk/images/non_user/cec-logo-colour-155x70px.png",
94
+ name: "Cheshire East Council",
95
+ sameAs: "https://www.cheshireeast.gov.uk",
106
96
  serviceOperator: {
107
- '@type': 'GovernmentOrganization',
108
- name: 'Cheshire East Council',
97
+ "@type": "GovernmentOrganization",
98
+ name: "Cheshire East Council"
109
99
  },
110
- serviceType: 'Unitary authority area',
111
- slogan: 'Open, fair, green',
112
- url: 'https://www.cheshireeast.gov.uk',
113
- },
114
- },
115
- ],
100
+ serviceType: "Unitary authority area",
101
+ slogan: "Open, fair, green",
102
+ url: "https://www.cheshireeast.gov.uk"
103
+ }
104
+ }
105
+ ]
116
106
  });
117
107
  useSeoMeta({
118
108
  ogTitle: page.value.title,
119
109
  ogImage: ogImage.value,
120
- ogDescription: page.value.title,
110
+ ogDescription: page.value.title
121
111
  });
122
112
  </script>
123
- <template><span class="d-none">meta</span></template>
113
+
114
+ <template>
115
+ <span class="d-none">meta</span>
116
+ </template>
@@ -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;
@@ -1,93 +1,78 @@
1
1
  <script setup>
2
- import { useHead } from '#app';
3
- import { onMounted } from 'vue';
4
- import { useState } from '#app';
5
-
6
- const showChat = useState('showChat', () => false);
7
-
2
+ import { useHead } from "#app";
3
+ import { onMounted } from "vue";
4
+ import { useState } from "#app";
5
+ const showChat = useState("showChat", () => false);
8
6
  const openChat = () => {
9
7
  showChat.value = !showChat.value;
10
8
  };
11
-
12
9
  const styleOptions = {
13
10
  hideUploadButton: true,
14
- avatarBorderRadius: '50%',
15
- botAvatarInitials: 'CEC',
11
+ avatarBorderRadius: "50%",
12
+ botAvatarInitials: "CEC",
16
13
  avatarSize: 40,
17
- botAvatarImage:
18
- 'https://bot-framework.azureedge.net/bot-icons-v1/a248a9a7-5a00-4923-a58a-31ce3199d509_G6n7eqCFC7JI8NWE7T8ro8rMD6CuwB2x9A65wLF1UyU8uC.png',
19
- userAvatarImage:
20
- 'https://content.powerapps.com/resource/makerx/static/media/user.0d06c38a.svg',
21
- userAvatarInitials: 'You',
22
- backgroundColor: 'rgba(249,249,249,1)',
23
- sendBoxButtonColor: '#206c49',
24
- timestampColor: '#212529',
14
+ botAvatarImage: "https://bot-framework.azureedge.net/bot-icons-v1/a248a9a7-5a00-4923-a58a-31ce3199d509_G6n7eqCFC7JI8NWE7T8ro8rMD6CuwB2x9A65wLF1UyU8uC.png",
15
+ userAvatarImage: "https://content.powerapps.com/resource/makerx/static/media/user.0d06c38a.svg",
16
+ userAvatarInitials: "You",
17
+ backgroundColor: "rgba(249,249,249,1)",
18
+ sendBoxButtonColor: "#206c49",
19
+ timestampColor: "#212529"
25
20
  };
26
-
27
- const BOT_ID = 'da657b31-7cec-40a8-afea-fe17480f1550';
28
- const theURL =
29
- 'https://powerva.microsoft.com/api/botmanagement/v1/directline/directlinetoken?botId=' +
30
- BOT_ID;
31
-
21
+ const BOT_ID = "da657b31-7cec-40a8-afea-fe17480f1550";
22
+ const theURL = "https://powerva.microsoft.com/api/botmanagement/v1/directline/directlinetoken?botId=" + BOT_ID;
32
23
  useHead({
33
24
  script: [
34
25
  {
35
- src: 'https://cdn.botframework.com/botframework-webchat/latest/webchat.js',
36
- },
37
- ],
26
+ src: "https://cdn.botframework.com/botframework-webchat/latest/webchat.js"
27
+ }
28
+ ]
38
29
  });
39
30
  onMounted(() => {
40
31
  const removeTabind = () => {
41
- const divs = Array.from(document.querySelectorAll('div')).filter(
42
- (e) => !e.innerHTML && e.hasAttribute('tabindex')
32
+ const divs = Array.from(document.querySelectorAll("div")).filter(
33
+ (e) => !e.innerHTML && e.hasAttribute("tabindex")
43
34
  );
44
35
  if (!divs.length) {
45
36
  setTimeout(removeTabind, 10);
46
37
  } else {
47
- divs.forEach((e) => e.removeAttribute('tabindex'));
38
+ divs.forEach((e) => e.removeAttribute("tabindex"));
48
39
  }
49
40
  };
50
41
  const store = WebChat.createStore(
51
42
  {},
52
- ({ dispatch }) =>
53
- (next) =>
54
- (action) => {
55
- if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {
56
- dispatch({
57
- meta: {
58
- method: 'keyboard',
59
- },
60
- payload: {
61
- activity: {
62
- channelData: {
63
- postBack: true,
64
- },
65
- name: 'startConversation',
66
- type: 'event',
43
+ ({ dispatch }) => (next) => (action) => {
44
+ if (action.type === "DIRECT_LINE/CONNECT_FULFILLED") {
45
+ dispatch({
46
+ meta: {
47
+ method: "keyboard"
48
+ },
49
+ payload: {
50
+ activity: {
51
+ channelData: {
52
+ postBack: true
67
53
  },
68
- },
69
- type: 'DIRECT_LINE/POST_ACTIVITY',
70
- });
71
- }
72
- return next(action);
54
+ name: "startConversation",
55
+ type: "event"
56
+ }
57
+ },
58
+ type: "DIRECT_LINE/POST_ACTIVITY"
59
+ });
73
60
  }
61
+ return next(action);
62
+ }
74
63
  );
75
-
76
- fetch(theURL)
77
- .then((response) => response.json())
78
- .then((conversationInfo) => {
79
- WebChat.renderWebChat(
80
- {
81
- directLine: WebChat.createDirectLine({
82
- token: conversationInfo.token,
83
- }),
84
- store: store,
85
- styleOptions,
86
- },
87
- document.getElementById('webchat')
88
- );
89
- })
90
- .catch((err) => console.error('An error occurred: ' + err));
64
+ fetch(theURL).then((response) => response.json()).then((conversationInfo) => {
65
+ WebChat.renderWebChat(
66
+ {
67
+ directLine: WebChat.createDirectLine({
68
+ token: conversationInfo.token
69
+ }),
70
+ store,
71
+ styleOptions
72
+ },
73
+ document.getElementById("webchat")
74
+ );
75
+ }).catch((err) => console.error("An error occurred: " + err));
91
76
  removeTabind();
92
77
  });
93
78
  </script>
@@ -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;
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
- import { useState } from '#app';
3
- const siblings = useState('siblings');
2
+ import { useState } from "#app";
3
+ const siblings = useState("siblings");
4
4
  </script>
5
5
 
6
6
  <template>
@@ -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;
@@ -1,10 +1,9 @@
1
1
  <script setup>
2
- import { useState } from '#app';
3
- const pages = useState('pages');
4
- const pageIndex = useState('pageIndex');
5
- const scrollTo = useState('scrollTo');
6
- const page = useState('page');
7
-
2
+ import { useState } from "#app";
3
+ const pages = useState("pages");
4
+ const pageIndex = useState("pageIndex");
5
+ const scrollTo = useState("scrollTo");
6
+ const page = useState("page");
8
7
  const goToPage = (n) => {
9
8
  pageIndex.value = n;
10
9
  scrollTo.value.scrollIntoView();
@@ -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;
package/dist/types.d.mts CHANGED
@@ -1,16 +1,3 @@
1
+ export { default } from './module.mjs'
1
2
 
2
- import type { ModuleOptions } from './module.js'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['cec-nuxt-lib']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['cec-nuxt-lib']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['cec-nuxt-lib']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['cec-nuxt-lib']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module.js'
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,18 +1,23 @@
1
1
  {
2
- "version": "0.10.2",
2
+ "version": "0.10.4",
3
3
  "name": "cec-nuxt-lib",
4
4
  "description": "Nuxt components and assets",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {
9
- "types": "./dist/types.d.ts",
10
- "import": "./dist/module.mjs",
11
- "require": "./dist/module.cjs"
9
+ "types": "./dist/types.d.mts",
10
+ "import": "./dist/module.mjs"
11
+ }
12
+ },
13
+ "main": "./dist/module.mjs",
14
+ "typesVersions": {
15
+ "*": {
16
+ ".": [
17
+ "./dist/types.d.mts"
18
+ ]
12
19
  }
13
20
  },
14
- "main": "./dist/module.cjs",
15
- "types": "./dist/types.d.ts",
16
21
  "files": [
17
22
  "dist"
18
23
  ],
@@ -28,18 +33,20 @@
28
33
  "link": "npm link"
29
34
  },
30
35
  "dependencies": {
31
- "@nuxt/kit": "^3.11.2"
36
+ "@nuxt/kit": "^3.16.2"
32
37
  },
33
38
  "devDependencies": {
34
- "@nuxt/devtools": "latest",
35
- "@nuxt/eslint-config": "^0.2.0",
36
- "@nuxt/module-builder": "^0.5.5",
37
- "@nuxt/schema": "^3.11.2",
38
- "@nuxt/test-utils": "^3.12.0",
39
- "@types/node": "^20.12.4",
40
- "changelogen": "^0.5.5",
41
- "eslint": "^8.57.0",
42
- "nuxt": "^3.13.2",
43
- "vitest": "^2.1.4"
39
+ "@nuxt/devtools": "^2.4.0",
40
+ "@nuxt/eslint-config": "^1.3.0",
41
+ "@nuxt/module-builder": "^1.0.1",
42
+ "@nuxt/schema": "^3.16.2",
43
+ "@nuxt/test-utils": "^3.17.2",
44
+ "@types/node": "latest",
45
+ "changelogen": "^0.6.1",
46
+ "eslint": "^9.25.1",
47
+ "nuxt": "^3.16.2",
48
+ "typescript": "~5.8.3",
49
+ "vitest": "^3.1.2",
50
+ "vue-tsc": "^2.2.8"
44
51
  }
45
52
  }
package/dist/module.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
-
3
- interface ModuleOptions {
4
- }
5
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
-
7
- export { type ModuleOptions, _default as default };
package/dist/types.d.ts DELETED
@@ -1,16 +0,0 @@
1
-
2
- import type { ModuleOptions } from './module'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['cec-nuxt-lib']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['cec-nuxt-lib']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['cec-nuxt-lib']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['cec-nuxt-lib']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module'