From 30ec193f5742dd8587b04c4b9e0b9198ff7c1fad Mon Sep 17 00:00:00 2001 From: k2maan Date: Tue, 4 Jul 2023 16:32:00 +0530 Subject: [PATCH 01/10] Implemented: shopify image compatible img component (#102) --- babel.config.js | 3 +- package.json | 4 ++ src/components/ShopifyCDNImage.ts | 72 +++++++++++++++++++++++++++++++ src/index.ts | 13 +++++- 4 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 src/components/ShopifyCDNImage.ts diff --git a/babel.config.js b/babel.config.js index 3eb7968..ba6c479 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,5 +2,6 @@ module.exports = { presets: [ '@babel/preset-typescript', '@babel/preset-env' - ] + ], + plugins: ['@babel/plugin-syntax-jsx', "@vue/babel-plugin-jsx", "transform-vue-jsx"] } \ No newline at end of file diff --git a/package.json b/package.json index 634209d..399caff 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,13 @@ "devDependencies": { "@babel/cli": "^7.21.5", "@babel/core": "^7.22.1", + "@babel/plugin-syntax-jsx": "^7.22.5", "@babel/preset-env": "^7.22.4", "@babel/preset-typescript": "^7.21.5", + "@vue/babel-plugin-jsx": "^1.1.1", + "@vue/babel-plugin-transform-vue-jsx": "^1.4.0", "babel-plugin-module-resolver": "^4.1.0", + "babel-preset-vue": "^2.0.2", "eslint": "^8.16.0", "typescript": "^5.0.4" }, diff --git a/src/components/ShopifyCDNImage.ts b/src/components/ShopifyCDNImage.ts new file mode 100644 index 0000000..4af01e8 --- /dev/null +++ b/src/components/ShopifyCDNImage.ts @@ -0,0 +1,72 @@ +import { defineComponent } from "vue" +import { resourceUrl, defaultImgUrl } from "../index"; + +export default defineComponent({ + template: ` + + `, + data() { + return { + imageUrl: '' + } + }, + props: ['src', 'size'], + async mounted() { + this.setImageUrl(); + }, + updated() { + this.setImageUrl(); + }, + methods: { + addSizeInImgUrl(src: string, size: string) { + if (src) { + // return original size if no size is given + if (!size) return src + return src + // remove any current image size then add the new image size + .replace(/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g, '.') + .replace(/\.jpg|\.png|\.gif|\.jpeg/g, function (match) { + return '_' + size + match; + }) + } + }, + checkIfImageExists(src: string) { + return new Promise((resolve, reject) => { + const img = new Image(); + img.onload = function () { + resolve(true); + } + img.onerror = function () { + reject(false); + } + img.src = src; + }) + }, + setImageUrl() { + const src = this.addSizeInImgUrl(this.src, this.size) + if (src) { + if (src.indexOf('assets/') != -1) { + // Assign directly in case of assets + this.imageUrl = src; + } else if (src.startsWith('http')) { + // If starts with http, it is web url check for existence and assign + this.checkIfImageExists(src).then(() => { + this.imageUrl = src; + }).catch(() => { + this.imageUrl = defaultImgUrl + }) + } else { + // Image is from resource server, hence append to base resource url, check for existence and assign + const imageUrl = resourceUrl.concat(src) + this.checkIfImageExists(imageUrl).then(() => { + this.imageUrl = imageUrl; + }).catch(() => { + this.imageUrl = defaultImgUrl + }) + } + } else { + this.imageUrl = defaultImgUrl + } + } + } +}) \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 6e91e18..2965deb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,18 +1,27 @@ import { createPinia } from "pinia"; import { useProductIdentificationStore } from "./store/productIdentification"; +import ShopifyCDNImage from "./components/ShopifyCDNImage"; // TODO: handle cases when the store from app or pinia store are not available // creating a pinia store for the plugin const pinia = createPinia(); +let resourceUrl: string +let defaultImgUrl: string // executed on app initialization export let dxpComponents = { - install(app: any) { + install(app: any, options: any) { // registering pinia in the app app.use(pinia); + app.component('ShopifyCDNImage', ShopifyCDNImage) + resourceUrl = options.resourceUrl + defaultImgUrl = options.defaultImgUrl } } export { - useProductIdentificationStore + useProductIdentificationStore, + resourceUrl, + defaultImgUrl, + ShopifyCDNImage } From 7bc72adac65b3da51a7108dfdab9ba45c2756398 Mon Sep 17 00:00:00 2001 From: k2maan Date: Wed, 5 Jul 2023 12:49:17 +0530 Subject: [PATCH 02/10] Implemented: function to access OMS instance with authenticated link (#99) --- src/index.ts | 4 +++- src/utils/index.ts | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/utils/index.ts diff --git a/src/index.ts b/src/index.ts index 6e91e18..9418762 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import { createPinia } from "pinia"; import { useProductIdentificationStore } from "./store/productIdentification"; +import { goToOms } from "./utils"; // TODO: handle cases when the store from app or pinia store are not available // creating a pinia store for the plugin @@ -14,5 +15,6 @@ export let dxpComponents = { } export { - useProductIdentificationStore + useProductIdentificationStore, + goToOms } diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..ddbc5b2 --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,8 @@ +const goToOms = (token: string, oms: string) => { + const link = (oms.startsWith('http') ? oms.replace('api/', "") : `https://${oms}.hotwax.io/`) + `?token=${token}` + window.open(link) +} + +export { + goToOms +} \ No newline at end of file From 569aa83e203d4eda0682e3e36cbedc868ba4a188 Mon Sep 17 00:00:00 2001 From: k2maan Date: Wed, 5 Jul 2023 14:35:18 +0530 Subject: [PATCH 03/10] Added: additional parameters in window.open function (#99) --- src/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index ddbc5b2..4382bf0 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,6 +1,6 @@ const goToOms = (token: string, oms: string) => { const link = (oms.startsWith('http') ? oms.replace('api/', "") : `https://${oms}.hotwax.io/`) + `?token=${token}` - window.open(link) + window.open(link, '_blank', 'noopener, noreferrer') } export { From fe93680196b3e955eb6523593d983f435e3e236e Mon Sep 17 00:00:00 2001 From: k2maan Date: Fri, 7 Jul 2023 12:42:28 +0530 Subject: [PATCH 04/10] Improved: function naming and functional parameters (#102) --- src/components/ShopifyCDNImage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ShopifyCDNImage.ts b/src/components/ShopifyCDNImage.ts index 4af01e8..a724c4c 100644 --- a/src/components/ShopifyCDNImage.ts +++ b/src/components/ShopifyCDNImage.ts @@ -11,14 +11,14 @@ export default defineComponent({ } }, props: ['src', 'size'], - async mounted() { + mounted() { this.setImageUrl(); }, updated() { this.setImageUrl(); }, methods: { - addSizeInImgUrl(src: string, size: string) { + prepareImgUrl(src: string, size?: string) { if (src) { // return original size if no size is given if (!size) return src @@ -43,7 +43,7 @@ export default defineComponent({ }) }, setImageUrl() { - const src = this.addSizeInImgUrl(this.src, this.size) + const src = this.prepareImgUrl(this.src, this.size) if (src) { if (src.indexOf('assets/') != -1) { // Assign directly in case of assets From c329f93213d1599be37d3586cf36a37aebcbad3b Mon Sep 17 00:00:00 2001 From: k2maan Date: Fri, 7 Jul 2023 18:00:52 +0530 Subject: [PATCH 05/10] Refactored: removed usage for resourceUrl (#102) --- src/components/ShopifyCDNImage.ts | 18 +++--------------- src/index.ts | 3 --- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/components/ShopifyCDNImage.ts b/src/components/ShopifyCDNImage.ts index a724c4c..167be96 100644 --- a/src/components/ShopifyCDNImage.ts +++ b/src/components/ShopifyCDNImage.ts @@ -1,5 +1,5 @@ import { defineComponent } from "vue" -import { resourceUrl, defaultImgUrl } from "../index"; +import { defaultImgUrl } from "../index"; export default defineComponent({ template: ` @@ -7,7 +7,7 @@ export default defineComponent({ `, data() { return { - imageUrl: '' + imageUrl: defaultImgUrl } }, props: ['src', 'size'], @@ -52,20 +52,8 @@ export default defineComponent({ // If starts with http, it is web url check for existence and assign this.checkIfImageExists(src).then(() => { this.imageUrl = src; - }).catch(() => { - this.imageUrl = defaultImgUrl }) - } else { - // Image is from resource server, hence append to base resource url, check for existence and assign - const imageUrl = resourceUrl.concat(src) - this.checkIfImageExists(imageUrl).then(() => { - this.imageUrl = imageUrl; - }).catch(() => { - this.imageUrl = defaultImgUrl - }) - } - } else { - this.imageUrl = defaultImgUrl + } } } } diff --git a/src/index.ts b/src/index.ts index e030f49..30e5f35 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,6 @@ import { goToOms } from "./utils"; // creating a pinia store for the plugin const pinia = createPinia(); -let resourceUrl: string let defaultImgUrl: string // executed on app initialization export let dxpComponents = { @@ -15,14 +14,12 @@ export let dxpComponents = { // registering pinia in the app app.use(pinia); app.component('ShopifyCDNImage', ShopifyCDNImage) - resourceUrl = options.resourceUrl defaultImgUrl = options.defaultImgUrl } } export { useProductIdentificationStore, - resourceUrl, defaultImgUrl, ShopifyCDNImage, goToOms From f98ac9c170ee71a4ff224983005332dbe3c1eca6 Mon Sep 17 00:00:00 2001 From: k2maan Date: Fri, 7 Jul 2023 18:06:49 +0530 Subject: [PATCH 06/10] Updated: component name (#102) --- src/components/{ShopifyCDNImage.ts => ShopifyImg.ts} | 0 src/index.ts | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/components/{ShopifyCDNImage.ts => ShopifyImg.ts} (100%) diff --git a/src/components/ShopifyCDNImage.ts b/src/components/ShopifyImg.ts similarity index 100% rename from src/components/ShopifyCDNImage.ts rename to src/components/ShopifyImg.ts diff --git a/src/index.ts b/src/index.ts index 30e5f35..25f2a46 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import { createPinia } from "pinia"; import { useProductIdentificationStore } from "./store/productIdentification"; -import ShopifyCDNImage from "./components/ShopifyCDNImage"; +import ShopifyImg from "./components/ShopifyImg"; import { goToOms } from "./utils"; // TODO: handle cases when the store from app or pinia store are not available @@ -13,7 +13,7 @@ export let dxpComponents = { install(app: any, options: any) { // registering pinia in the app app.use(pinia); - app.component('ShopifyCDNImage', ShopifyCDNImage) + app.component('ShopifyImg', ShopifyImg) defaultImgUrl = options.defaultImgUrl } } @@ -21,6 +21,6 @@ export let dxpComponents = { export { useProductIdentificationStore, defaultImgUrl, - ShopifyCDNImage, + ShopifyImg, goToOms } From e53b80f6b3665df08832e0887978bec78e7da3b4 Mon Sep 17 00:00:00 2001 From: k2maan Date: Tue, 11 Jul 2023 10:49:06 +0530 Subject: [PATCH 07/10] Improved: handling in function if src is empty (#102) --- src/components/ShopifyImg.ts | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/components/ShopifyImg.ts b/src/components/ShopifyImg.ts index 167be96..1a26844 100644 --- a/src/components/ShopifyImg.ts +++ b/src/components/ShopifyImg.ts @@ -19,16 +19,14 @@ export default defineComponent({ }, methods: { prepareImgUrl(src: string, size?: string) { - if (src) { - // return original size if no size is given - if (!size) return src - return src - // remove any current image size then add the new image size - .replace(/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g, '.') - .replace(/\.jpg|\.png|\.gif|\.jpeg/g, function (match) { - return '_' + size + match; - }) - } + // return original size if no size is given + if (!size) return src + // remove any current image size then add the new image size + return src + .replace(/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g, '.') + .replace(/\.jpg|\.png|\.gif|\.jpeg/g, function (match) { + return '_' + size + match; + }) }, checkIfImageExists(src: string) { return new Promise((resolve, reject) => { @@ -43,8 +41,8 @@ export default defineComponent({ }) }, setImageUrl() { - const src = this.prepareImgUrl(this.src, this.size) - if (src) { + if (this.src) { + const src: string = this.prepareImgUrl(this.src, this.size) if (src.indexOf('assets/') != -1) { // Assign directly in case of assets this.imageUrl = src; From cbf646dc08c728589de9cd172a8e80e22fccc249 Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Wed, 12 Jul 2023 10:47:41 +0530 Subject: [PATCH 08/10] Fixed: removed code for handling assets (#102) --- src/components/ShopifyImg.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/ShopifyImg.ts b/src/components/ShopifyImg.ts index 1a26844..199502c 100644 --- a/src/components/ShopifyImg.ts +++ b/src/components/ShopifyImg.ts @@ -43,15 +43,9 @@ export default defineComponent({ setImageUrl() { if (this.src) { const src: string = this.prepareImgUrl(this.src, this.size) - if (src.indexOf('assets/') != -1) { - // Assign directly in case of assets + this.checkIfImageExists(src).then(() => { this.imageUrl = src; - } else if (src.startsWith('http')) { - // If starts with http, it is web url check for existence and assign - this.checkIfImageExists(src).then(() => { - this.imageUrl = src; - }) - } + }) } } } From a6d821e7353b9379c3bbf0a9df6d4fe6bcb00779 Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Wed, 12 Jul 2023 10:49:00 +0530 Subject: [PATCH 09/10] Ignored the history folder generated with vscode --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index de9ff71..982ec13 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,5 @@ npm-debug.log* .env .env.* -!.env.example \ No newline at end of file +!.env.example +.history \ No newline at end of file From 30dbe032c77d8fa36ab1520511976c5dc65a35d1 Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Wed, 12 Jul 2023 11:13:32 +0530 Subject: [PATCH 10/10] Preparing for the release --- package-lock.json | 302 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 301 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a11145d..8d78612 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dxp-components", - "version": "0.0.1", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dxp-components", - "version": "0.0.1", + "version": "1.1.0", "license": "Apache-2.0", "dependencies": { "@hotwax/oms-api": "^1.8.1", @@ -16,9 +16,13 @@ "devDependencies": { "@babel/cli": "^7.21.5", "@babel/core": "^7.22.1", + "@babel/plugin-syntax-jsx": "^7.22.5", "@babel/preset-env": "^7.22.4", "@babel/preset-typescript": "^7.21.5", + "@vue/babel-plugin-jsx": "^1.1.1", + "@vue/babel-plugin-transform-vue-jsx": "^1.4.0", "babel-plugin-module-resolver": "^4.1.0", + "babel-preset-vue": "^2.0.2", "eslint": "^8.16.0", "typescript": "^5.0.4" } @@ -2010,6 +2014,64 @@ "resolved": "https://registry.npmjs.org/@types/node-json-transform/-/node-json-transform-1.0.0.tgz", "integrity": "sha512-M238h06PCWOjfR7gFP+/r2lQwviJgcLx8vwD/ontGAHeSz0Zwc6dXgD8871/TtfXZgQ05m7rEhnpQP56Bqgpyg==" }, + "node_modules/@vue/babel-helper-vue-jsx-merge-props": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz", + "integrity": "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA==", + "dev": true + }, + "node_modules/@vue/babel-helper-vue-transform-on": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.1.5.tgz", + "integrity": "sha512-SgUymFpMoAyWeYWLAY+MkCK3QEROsiUnfaw5zxOVD/M64KQs8D/4oK6Q5omVA2hnvEOE0SCkH2TZxs/jnnUj7w==", + "dev": true + }, + "node_modules/@vue/babel-plugin-jsx": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.1.5.tgz", + "integrity": "sha512-nKs1/Bg9U1n3qSWnsHhCVQtAzI6aQXqua8j/bZrau8ywT1ilXQbK4FwEJGmU8fV7tcpuFvWmmN7TMmV1OBma1g==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", + "@vue/babel-helper-vue-transform-on": "^1.1.5", + "camelcase": "^6.3.0", + "html-tags": "^3.3.1", + "svg-tags": "^1.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@vue/babel-plugin-transform-vue-jsx": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.4.0.tgz", + "integrity": "sha512-Fmastxw4MMx0vlgLS4XBX0XiBbUFzoMGeVXuMV08wyOfXdikAFqBTuYPR0tlk+XskL19EzHc39SgjrPGY23JnA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/plugin-syntax-jsx": "^7.2.0", + "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0", + "html-tags": "^2.0.0", + "lodash.kebabcase": "^4.1.1", + "svg-tags": "^1.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@vue/babel-plugin-transform-vue-jsx/node_modules/html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@vue/compiler-core": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz", @@ -2215,6 +2277,38 @@ "axios": "~0.21.1" } }, + "node_modules/babel-helper-vue-jsx-merge-props": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", + "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==", + "dev": true + }, + "node_modules/babel-plugin-jsx-event-modifiers": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/babel-plugin-jsx-event-modifiers/-/babel-plugin-jsx-event-modifiers-2.0.5.tgz", + "integrity": "sha512-tWGnCk0whZ+nZcj9tYLw4+y08tPJXqaEjIxRJZS6DkUUae72Kz4BsoGpxt/Kow7mmgQJpvFCw8IPLSNh5rkZCg==", + "dev": true + }, + "node_modules/babel-plugin-jsx-v-model": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jsx-v-model/-/babel-plugin-jsx-v-model-2.0.3.tgz", + "integrity": "sha512-SIx3Y3XxwGEz56Q1atwr5GaZsxJ2IRYmn5dl38LFkaTAvjnbNQxsZHO+ylJPsd+Hmv+ixJBYYFEekPBTHwiGfQ==", + "dev": true, + "dependencies": { + "babel-plugin-syntax-jsx": "^6.18.0", + "html-tags": "^2.0.0", + "svg-tags": "^1.0.0" + } + }, + "node_modules/babel-plugin-jsx-v-model/node_modules/html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/babel-plugin-module-resolver": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz", @@ -2270,6 +2364,40 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==", + "dev": true + }, + "node_modules/babel-plugin-transform-vue-jsx": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-3.7.0.tgz", + "integrity": "sha512-W39X07/n3oJMQd8tALBO+440NraGSF//Lo1ydd/9Nme3+QiRGFBb1Q39T9iixh0jZPPbfv3so18tNoIgLatymw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "peerDependencies": { + "babel-helper-vue-jsx-merge-props": "^2.0.0" + } + }, + "node_modules/babel-preset-vue": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-vue/-/babel-preset-vue-2.0.2.tgz", + "integrity": "sha512-ubo67P9PWIJJtL73/V0qeKvXoqoZK5Dnx+hSwW/ZVE7WvG6j5Jrx8CMeL6ZVcCQrdkQ195/MnGUnxHGyWX25OQ==", + "dev": true, + "dependencies": { + "babel-helper-vue-jsx-merge-props": "^2.0.2", + "babel-plugin-jsx-event-modifiers": "^2.0.2", + "babel-plugin-jsx-v-model": "^2.0.1", + "babel-plugin-syntax-jsx": "^6.18.0", + "babel-plugin-transform-vue-jsx": "^3.5.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2367,6 +2495,18 @@ "node": ">=6" } }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001504", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001504.tgz", @@ -3118,6 +3258,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/http-status-codes": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.2.0.tgz", @@ -3342,6 +3494,12 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, + "node_modules/lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -4075,6 +4233,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", + "dev": true + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5668,6 +5832,57 @@ "resolved": "https://registry.npmjs.org/@types/node-json-transform/-/node-json-transform-1.0.0.tgz", "integrity": "sha512-M238h06PCWOjfR7gFP+/r2lQwviJgcLx8vwD/ontGAHeSz0Zwc6dXgD8871/TtfXZgQ05m7rEhnpQP56Bqgpyg==" }, + "@vue/babel-helper-vue-jsx-merge-props": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz", + "integrity": "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA==", + "dev": true + }, + "@vue/babel-helper-vue-transform-on": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.1.5.tgz", + "integrity": "sha512-SgUymFpMoAyWeYWLAY+MkCK3QEROsiUnfaw5zxOVD/M64KQs8D/4oK6Q5omVA2hnvEOE0SCkH2TZxs/jnnUj7w==", + "dev": true + }, + "@vue/babel-plugin-jsx": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.1.5.tgz", + "integrity": "sha512-nKs1/Bg9U1n3qSWnsHhCVQtAzI6aQXqua8j/bZrau8ywT1ilXQbK4FwEJGmU8fV7tcpuFvWmmN7TMmV1OBma1g==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", + "@vue/babel-helper-vue-transform-on": "^1.1.5", + "camelcase": "^6.3.0", + "html-tags": "^3.3.1", + "svg-tags": "^1.0.0" + } + }, + "@vue/babel-plugin-transform-vue-jsx": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.4.0.tgz", + "integrity": "sha512-Fmastxw4MMx0vlgLS4XBX0XiBbUFzoMGeVXuMV08wyOfXdikAFqBTuYPR0tlk+XskL19EzHc39SgjrPGY23JnA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/plugin-syntax-jsx": "^7.2.0", + "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0", + "html-tags": "^2.0.0", + "lodash.kebabcase": "^4.1.1", + "svg-tags": "^1.0.0" + }, + "dependencies": { + "html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g==", + "dev": true + } + } + }, "@vue/compiler-core": { "version": "3.3.4", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.4.tgz", @@ -5846,6 +6061,37 @@ "md5": "^2.2.1" } }, + "babel-helper-vue-jsx-merge-props": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", + "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==", + "dev": true + }, + "babel-plugin-jsx-event-modifiers": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/babel-plugin-jsx-event-modifiers/-/babel-plugin-jsx-event-modifiers-2.0.5.tgz", + "integrity": "sha512-tWGnCk0whZ+nZcj9tYLw4+y08tPJXqaEjIxRJZS6DkUUae72Kz4BsoGpxt/Kow7mmgQJpvFCw8IPLSNh5rkZCg==", + "dev": true + }, + "babel-plugin-jsx-v-model": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jsx-v-model/-/babel-plugin-jsx-v-model-2.0.3.tgz", + "integrity": "sha512-SIx3Y3XxwGEz56Q1atwr5GaZsxJ2IRYmn5dl38LFkaTAvjnbNQxsZHO+ylJPsd+Hmv+ixJBYYFEekPBTHwiGfQ==", + "dev": true, + "requires": { + "babel-plugin-syntax-jsx": "^6.18.0", + "html-tags": "^2.0.0", + "svg-tags": "^1.0.0" + }, + "dependencies": { + "html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha512-+Il6N8cCo2wB/Vd3gqy/8TZhTD3QvcVeQLCnZiGkGCH3JP28IgGAY41giccp2W4R3jfyJPAP318FQTa1yU7K7g==", + "dev": true + } + } + }, "babel-plugin-module-resolver": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz", @@ -5889,6 +6135,34 @@ "@babel/helper-define-polyfill-provider": "^0.4.0" } }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==", + "dev": true + }, + "babel-plugin-transform-vue-jsx": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-3.7.0.tgz", + "integrity": "sha512-W39X07/n3oJMQd8tALBO+440NraGSF//Lo1ydd/9Nme3+QiRGFBb1Q39T9iixh0jZPPbfv3so18tNoIgLatymw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "babel-preset-vue": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/babel-preset-vue/-/babel-preset-vue-2.0.2.tgz", + "integrity": "sha512-ubo67P9PWIJJtL73/V0qeKvXoqoZK5Dnx+hSwW/ZVE7WvG6j5Jrx8CMeL6ZVcCQrdkQ195/MnGUnxHGyWX25OQ==", + "dev": true, + "requires": { + "babel-helper-vue-jsx-merge-props": "^2.0.2", + "babel-plugin-jsx-event-modifiers": "^2.0.2", + "babel-plugin-jsx-v-model": "^2.0.1", + "babel-plugin-syntax-jsx": "^6.18.0", + "babel-plugin-transform-vue-jsx": "^3.5.0" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -5954,6 +6228,12 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + }, "caniuse-lite": { "version": "1.0.30001504", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001504.tgz", @@ -6491,6 +6771,12 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, + "html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true + }, "http-status-codes": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.2.0.tgz", @@ -6661,6 +6947,12 @@ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", "dev": true }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -7153,6 +7445,12 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", + "dev": true + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", diff --git a/package.json b/package.json index 399caff..f3d7247 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dxp-components", - "version": "0.0.1", + "version": "1.1.0", "description": "", "main": "lib/index.js", "types": "lib/index.d.ts",