@nanoporetech-digital/components-vue 3.9.1 → 3.10.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 CHANGED
@@ -3,6 +3,28 @@
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.10.0](https://git.oxfordnanolabs.local/Digital/nano-components/compare/v3.9.2...v3.10.0) (2023-02-15)
7
+
8
+
9
+ ### Features
10
+
11
+ * **vue:** add cjs and esm outputs (to work with nuxt) ([7cc5d27](https://git.oxfordnanolabs.local/Digital/nano-components/commits/7cc5d27921215f2fc46ecc6dd087988d7445ae87))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.9.2](https://git.oxfordnanolabs.local/Digital/nano-components/compare/v3.9.1...v3.9.2) (2023-02-15)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **nuxt:** make compatible with node module ([d347a12](https://git.oxfordnanolabs.local/Digital/nano-components/commits/d347a12546fcad7f38963ba3b5a1be8a845adbe6))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [3.9.1](https://git.oxfordnanolabs.local/Digital/nano-components/compare/v3.9.0...v3.9.1) (2023-02-15)
7
29
 
8
30
  **Note:** Version bump only for package @nanoporetech-digital/components-vue
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const vue_1 = require("vue");
7
+ const App_vue_1 = __importDefault(require("./App.vue"));
8
+ const index_js_1 = require("../index.js");
9
+ // NanoVue().then(() => app.mount('#app'))
10
+ const app = (0, vue_1.createApp)(App_vue_1.default).use(index_js_1.NanoVue);
11
+ app.mount('#app');
12
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/demo/main.ts"],"names":[],"mappings":";;;;;AAAA,6BAA+B;AAC/B,wDAA2B;AAE3B,0CAAsC;AAEtC,0CAA0C;AAE1C,MAAM,GAAG,GAAG,IAAA,eAAS,EAAC,iBAAG,CAAC,CAAC,GAAG,CAAC,kBAAO,CAAC,CAAC;AACxC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.NanoVue = void 0;
18
+ __exportStar(require("./proxies"), exports);
19
+ var nano_vue_1 = require("./nano-vue");
20
+ Object.defineProperty(exports, "NanoVue", { enumerable: true, get: function () { return nano_vue_1.NanoVue; } });
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,uCAAqC;AAA5B,mGAAA,OAAO,OAAA"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NanoVue = void 0;
4
+ const loader_1 = require("@nanoporetech-digital/components/loader");
5
+ const eventIgnoreList = ['nanoTplUpdated', 'openWormhole', 'nanoComponentsReady'];
6
+ /**
7
+ * We need to make sure that the web component fires an event
8
+ * that will not conflict with the user's @ionChange binding,
9
+ * otherwise the binding's callback will fire before any
10
+ * v-model values have been updated.
11
+ */
12
+ const toKebabCase = (eventName) => {
13
+ if (eventName === 'nanoChange')
14
+ return 'v-nano-change';
15
+ else if (eventIgnoreList.includes(eventName))
16
+ return eventName;
17
+ else
18
+ return eventName.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();
19
+ };
20
+ /**
21
+ * "ionRefresh" is converted to "ion-refresh".
22
+ * See https://github.com/vuejs/vue-next/pull/2847
23
+ */
24
+ const getHelperFunctions = () => {
25
+ return {
26
+ ael: (el, eventName, cb, opts) => el.addEventListener(toKebabCase(eventName), cb, opts),
27
+ rel: (el, eventName, cb, opts) => el.removeEventListener(toKebabCase(eventName), cb, opts),
28
+ ce: (eventName, opts) => new CustomEvent(toKebabCase(eventName), opts)
29
+ };
30
+ };
31
+ exports.NanoVue = {
32
+ async install(_, _config = {}) {
33
+ if (typeof window === 'undefined')
34
+ return;
35
+ const { ael, rel, ce } = getHelperFunctions();
36
+ await (0, loader_1.defineCustomElements)(window, {
37
+ ce,
38
+ ael,
39
+ rel
40
+ });
41
+ // To use custom-elements bundle instead
42
+ // initialize({
43
+ // _ael: ael,
44
+ // _rel: rel,
45
+ // _ce: ce,
46
+ // });
47
+ },
48
+ };
49
+ //# sourceMappingURL=nano-vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nano-vue.js","sourceRoot":"","sources":["../../src/nano-vue.ts"],"names":[],"mappings":";;;AAAA,oEAA+E;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,C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