@nanoporetech-digital/components-vue 3.7.1 → 3.8.0
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/CHANGELOG.md +11 -0
- package/dist/demo/main.js +4 -3
- package/dist/demo/main.js.map +1 -1
- package/dist/nano-vue.js +17 -23
- package/dist/nano-vue.js.map +1 -1
- package/dist/proxies.js +473 -51
- package/dist/proxies.js.map +1 -1
- package/dist/types/nano-vue.d.ts +2 -2
- package/dist/types/proxies.d.ts +51 -51
- package/dist/types/vue-component-lib/utils.d.ts +17 -17
- package/dist/vetur/attributes.json +14 -4
- package/dist/vetur/tags.json +3 -1
- package/dist/vue-component-lib/utils.js +41 -31
- package/dist/vue-component-lib/utils.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +14 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.8.0](https://git.oxfordnanolabs.local/Digital/nano-components/compare/v3.7.1...v3.8.0) (2023-02-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **nuxt:** new nuxt framework integration ([230f150](https://git.oxfordnanolabs.local/Digital/nano-components/commits/230f1503e3e7bb26d3478358a7aaeacdf7c82a50))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.7.1](https://git.oxfordnanolabs.local/Digital/nano-components/compare/v3.7.0...v3.7.1) (2023-01-25)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @nanoporetech-digital/components-vue
|
package/dist/demo/main.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
2
|
import App from './App.vue';
|
|
3
|
-
import { NanoVue } from '../index';
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { NanoVue } from '../index.js';
|
|
4
|
+
// NanoVue().then(() => app.mount('#app'))
|
|
5
|
+
const app = createApp(App).use(NanoVue);
|
|
6
|
+
app.mount('#app');
|
|
6
7
|
//# sourceMappingURL=main.js.map
|
package/dist/demo/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/demo/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,GAAG,MAAM,WAAW,CAAA;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/demo/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,GAAG,MAAM,WAAW,CAAA;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,0CAA0C;AAE1C,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACxC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/nano-vue.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineCustomElements } from '@nanoporetech-digital/components/loader';
|
|
2
|
-
const needsKebabCase = (version) => !['3.0.0', '3.0.1', '3.0.2', '3.0.3', '3.0.4', '3.0.5'].includes(version);
|
|
3
2
|
const eventIgnoreList = ['nanoTplUpdated', 'openWormhole', 'nanoComponentsReady'];
|
|
4
3
|
/**
|
|
5
4
|
* We need to make sure that the web component fires an event
|
|
@@ -7,14 +6,6 @@ const eventIgnoreList = ['nanoTplUpdated', 'openWormhole', 'nanoComponentsReady'
|
|
|
7
6
|
* otherwise the binding's callback will fire before any
|
|
8
7
|
* v-model values have been updated.
|
|
9
8
|
*/
|
|
10
|
-
const toLowerCase = (eventName) => {
|
|
11
|
-
if (eventName === 'nanoChange')
|
|
12
|
-
return 'v-nanochange';
|
|
13
|
-
else if (eventIgnoreList.includes(eventName))
|
|
14
|
-
return eventName;
|
|
15
|
-
else
|
|
16
|
-
return eventName.toLowerCase();
|
|
17
|
-
};
|
|
18
9
|
const toKebabCase = (eventName) => {
|
|
19
10
|
if (eventName === 'nanoChange')
|
|
20
11
|
return 'v-nano-change';
|
|
@@ -24,29 +15,32 @@ const toKebabCase = (eventName) => {
|
|
|
24
15
|
return eventName.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
|
|
25
16
|
};
|
|
26
17
|
/**
|
|
27
|
-
*
|
|
28
|
-
* were always converted to lower case, so "ionRefresh"
|
|
29
|
-
* became "ionRefresh". We need to account for the old
|
|
30
|
-
* issue as well as the new behavior where "ionRefresh"
|
|
31
|
-
* is converted to "ion-refresh".
|
|
18
|
+
* "ionRefresh" is converted to "ion-refresh".
|
|
32
19
|
* See https://github.com/vuejs/vue-next/pull/2847
|
|
33
20
|
*/
|
|
34
|
-
const getHelperFunctions = (
|
|
35
|
-
const conversionFn = (needsKebabCase) ? toKebabCase : toLowerCase;
|
|
21
|
+
const getHelperFunctions = () => {
|
|
36
22
|
return {
|
|
37
|
-
ael: (el, eventName, cb, opts) => el.addEventListener(
|
|
38
|
-
rel: (el, eventName, cb, opts) => el.removeEventListener(
|
|
39
|
-
ce: (eventName, opts) => new CustomEvent(
|
|
23
|
+
ael: (el, eventName, cb, opts) => el.addEventListener(toKebabCase(eventName), cb, opts),
|
|
24
|
+
rel: (el, eventName, cb, opts) => el.removeEventListener(toKebabCase(eventName), cb, opts),
|
|
25
|
+
ce: (eventName, opts) => new CustomEvent(toKebabCase(eventName), opts)
|
|
40
26
|
};
|
|
41
27
|
};
|
|
42
|
-
export const NanoVue =
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
export const NanoVue = {
|
|
29
|
+
async install(_, _config = {}) {
|
|
30
|
+
if (typeof window === 'undefined')
|
|
31
|
+
return;
|
|
32
|
+
const { ael, rel, ce } = getHelperFunctions();
|
|
45
33
|
await defineCustomElements(window, {
|
|
46
34
|
ce,
|
|
47
35
|
ael,
|
|
48
36
|
rel
|
|
49
37
|
});
|
|
50
|
-
|
|
38
|
+
// To use custom-elements bundle instead
|
|
39
|
+
// initialize({
|
|
40
|
+
// _ael: ael,
|
|
41
|
+
// _rel: rel,
|
|
42
|
+
// _ce: ce,
|
|
43
|
+
// });
|
|
44
|
+
},
|
|
51
45
|
};
|
|
52
46
|
//# sourceMappingURL=nano-vue.js.map
|
package/dist/nano-vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nano-vue.js","sourceRoot":"","sources":["../src/nano-vue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nano-vue.js","sourceRoot":"","sources":["../src/nano-vue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAI/E,MAAM,eAAe,GAAG,CAAC,gBAAgB,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAA;AAEjF;;;;;EAKE;AACF,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAE,EAAE;IACxC,IAAI,SAAS,KAAK,YAAY;QAAE,OAAO,eAAe,CAAC;SAClD,IAAI,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;;QAC1D,OAAO,SAAS,CAAC,OAAO,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AACvF,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,OAAO;QACH,GAAG,EAAE,CAAC,EAAO,EAAE,SAAiB,EAAE,EAAO,EAAE,IAAS,EAAE,EAAE,CAAC,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,EAA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