From 9c85951ca5bcd601f571237eda29c9c4fcd67033 Mon Sep 17 00:00:00 2001 From: verena-ifx Date: Wed, 19 Jul 2023 11:59:39 +0200 Subject: [PATCH] vue example fixed --- .../vue-javascript/package-lock.json | 18 +- .../vue-javascript/package.json | 2 +- .../vue-javascript/src/main.js | 2 +- .../vue-javascript/vite.config.js | 2 +- packages/components-vue/lib/components.js | 273 ++++++++++++++++++ packages/components-vue/lib/components.js.map | 1 + packages/components-vue/lib/index.d.ts | 2 + packages/components-vue/lib/index.js | 19 ++ packages/components-vue/lib/index.js.map | 1 + packages/components-vue/lib/plugin.d.ts | 2 + packages/components-vue/lib/plugin.js | 23 ++ packages/components-vue/lib/plugin.js.map | 1 + .../lib/vue-component-lib/utils.d.ts | 4 + .../lib/vue-component-lib/utils.js | 117 ++++++++ .../lib/vue-component-lib/utils.js.map | 1 + packages/components-vue/package.json | 6 +- packages/components-vue/tsconfig.json | 22 +- packages/components/stencil.config.ts | 1 + 18 files changed, 473 insertions(+), 24 deletions(-) create mode 100644 packages/components-vue/lib/components.js create mode 100644 packages/components-vue/lib/components.js.map create mode 100644 packages/components-vue/lib/index.d.ts create mode 100644 packages/components-vue/lib/index.js create mode 100644 packages/components-vue/lib/index.js.map create mode 100644 packages/components-vue/lib/plugin.d.ts create mode 100644 packages/components-vue/lib/plugin.js create mode 100644 packages/components-vue/lib/plugin.js.map create mode 100644 packages/components-vue/lib/vue-component-lib/utils.d.ts create mode 100644 packages/components-vue/lib/vue-component-lib/utils.js create mode 100644 packages/components-vue/lib/vue-component-lib/utils.js.map diff --git a/examples/wrapper-components/vue-javascript/package-lock.json b/examples/wrapper-components/vue-javascript/package-lock.json index a524b9e339..01383d0667 100644 --- a/examples/wrapper-components/vue-javascript/package-lock.json +++ b/examples/wrapper-components/vue-javascript/package-lock.json @@ -8,7 +8,7 @@ "name": "vue-wrapper", "version": "0.1.0", "dependencies": { - "@infineon/infineon-design-system-vue": "^18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0", + "@infineon/infineon-design-system-vue": "^18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0", "@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue-jsx": "^3.0.1", "vite": "^4.3.9", @@ -2349,11 +2349,11 @@ } }, "node_modules/@infineon/infineon-design-system-vue": { - "version": "18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0", - "resolved": "https://registry.npmjs.org/@infineon/infineon-design-system-vue/-/infineon-design-system-vue-18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0.tgz", - "integrity": "sha512-4FQLpfLW+AxUmH5hXqcYMgLSDVAxEKNA60F8WlW1bR/2sNdRyarWjzMLze/tm2JrGi3r5KliFn0sjiQbDG60Zw==", + "version": "18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0", + "resolved": "https://registry.npmjs.org/@infineon/infineon-design-system-vue/-/infineon-design-system-vue-18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0.tgz", + "integrity": "sha512-Y6v7V3ouN+XZXSLmadbbEem7Svc/g0/G2SPSp1dw8AnEZeyv3zGiKXOkRUWuHVN10VsktPd8MyFN27JIjCnzcQ==", "dependencies": { - "@infineon/infineon-design-system-stencil": "^18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0" + "@infineon/infineon-design-system-stencil": "^18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0" } }, "node_modules/@infineon/infineon-icons": { @@ -11019,11 +11019,11 @@ } }, "@infineon/infineon-design-system-vue": { - "version": "18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0", - "resolved": "https://registry.npmjs.org/@infineon/infineon-design-system-vue/-/infineon-design-system-vue-18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0.tgz", - "integrity": "sha512-4FQLpfLW+AxUmH5hXqcYMgLSDVAxEKNA60F8WlW1bR/2sNdRyarWjzMLze/tm2JrGi3r5KliFn0sjiQbDG60Zw==", + "version": "18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0", + "resolved": "https://registry.npmjs.org/@infineon/infineon-design-system-vue/-/infineon-design-system-vue-18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0.tgz", + "integrity": "sha512-Y6v7V3ouN+XZXSLmadbbEem7Svc/g0/G2SPSp1dw8AnEZeyv3zGiKXOkRUWuHVN10VsktPd8MyFN27JIjCnzcQ==", "requires": { - "@infineon/infineon-design-system-stencil": "^18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0" + "@infineon/infineon-design-system-stencil": "^18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0" } }, "@infineon/infineon-icons": { diff --git a/examples/wrapper-components/vue-javascript/package.json b/examples/wrapper-components/vue-javascript/package.json index c66edc1329..8c84d79c7d 100644 --- a/examples/wrapper-components/vue-javascript/package.json +++ b/examples/wrapper-components/vue-javascript/package.json @@ -12,7 +12,7 @@ "test:local": "run-s build:wrapper preview:link" }, "dependencies": { - "@infineon/infineon-design-system-vue": "^18.3.1--canary.272.fe3baec6f44c821596721d716a7b555ba4c1d793.0", + "@infineon/infineon-design-system-vue": "^18.3.1--canary.272.9f0a3a6f91c9d2fb4b971f6a0dd35bbf9bb93157.0", "@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue-jsx": "^3.0.1", "vite": "^4.3.9", diff --git a/examples/wrapper-components/vue-javascript/src/main.js b/examples/wrapper-components/vue-javascript/src/main.js index 1dccfcfac2..edec287dc4 100644 --- a/examples/wrapper-components/vue-javascript/src/main.js +++ b/examples/wrapper-components/vue-javascript/src/main.js @@ -3,5 +3,5 @@ import App from './App.vue' import './assets/main.css' import { ComponentLibrary } from '@infineon/infineon-design-system-vue'; - +console.log("component library", ComponentLibrary) createApp(App).use(ComponentLibrary).mount('#app'); \ No newline at end of file diff --git a/examples/wrapper-components/vue-javascript/vite.config.js b/examples/wrapper-components/vue-javascript/vite.config.js index 1a9c67abff..b4e1a74942 100644 --- a/examples/wrapper-components/vue-javascript/vite.config.js +++ b/examples/wrapper-components/vue-javascript/vite.config.js @@ -5,7 +5,7 @@ import vue from '@vitejs/plugin-vue'; // https://vitejs.dev/config/ export default defineConfig({ - base: "", + base: "/", plugins: [ vue({ template: { diff --git a/packages/components-vue/lib/components.js b/packages/components-vue/lib/components.js new file mode 100644 index 0000000000..3ef4bd8200 --- /dev/null +++ b/packages/components-vue/lib/components.js @@ -0,0 +1,273 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IfxTag = exports.IfxTabs = exports.IfxTab = exports.IfxSwitch = exports.IfxStatus = exports.IfxSpinner = exports.IfxSidebarItem = exports.IfxSidebar = exports.IfxSelectInput = exports.IfxSearchInput = exports.IfxSearchBar = exports.IfxRange = exports.IfxRadioButton = exports.IfxProgressBar = exports.IfxNumberIndicator = exports.IfxNavbarMenuItem = exports.IfxNavbar = exports.IfxMultiSelectInputItem = exports.IfxMultiSelectInput = exports.IfxModal = exports.IfxListNotification = exports.IfxListItem = exports.IfxListGroup = exports.IfxLink = exports.IfxIconsPreview = exports.IfxIconButton = exports.IfxIcon = exports.IfxFooterColumn = exports.IfxFooter = exports.IfxFilterInput = exports.IfxFaq = exports.IfxExample = exports.IfxDropdownMenu = exports.IfxDropdownItem = exports.IfxDropdownDivider = exports.IfxDropdown = exports.IfxChip = exports.IfxCheckbox = exports.IfxCardText = exports.IfxCardOverline = exports.IfxCardHeadline = exports.IfxCard = exports.IfxButton = exports.IfxBreadcrumbItemLabel = exports.IfxBreadcrumbItem = exports.IfxBreadcrumb = exports.IfxBadge = exports.IfxAlert = exports.IfxAccordionItem = exports.IfxAccordion = void 0; +exports.IfxTextInput = void 0; +const utils_1 = require("./vue-component-lib/utils"); +exports.IfxAccordion = (0, utils_1.defineContainer)('ifx-accordion', undefined, [ + 'autoCollapse' +]); +exports.IfxAccordionItem = (0, utils_1.defineContainer)('ifx-accordion-item', undefined, [ + 'caption', + 'ifxItemOpen', + 'ifxItemClose' +]); +exports.IfxAlert = (0, utils_1.defineContainer)('ifx-alert', undefined, [ + 'color', + 'icon', + 'ifxClose' +]); +exports.IfxBadge = (0, utils_1.defineContainer)('ifx-badge', undefined); +exports.IfxBreadcrumb = (0, utils_1.defineContainer)('ifx-breadcrumb', undefined); +exports.IfxBreadcrumbItem = (0, utils_1.defineContainer)('ifx-breadcrumb-item', undefined); +exports.IfxBreadcrumbItemLabel = (0, utils_1.defineContainer)('ifx-breadcrumb-item-label', undefined, [ + 'icon', + 'url', + 'target', + 'breadcrumbMenuIconWrapper' +]); +exports.IfxButton = (0, utils_1.defineContainer)('ifx-button', undefined, [ + 'variant', + 'color', + 'size', + 'disabled', + 'icon', + 'position', + 'href', + 'target', + 'type' +]); +exports.IfxCard = (0, utils_1.defineContainer)('ifx-card', undefined, [ + 'direction', + 'alignment', + 'hasAll', + 'largeSize', + 'smallSize' +]); +exports.IfxCardHeadline = (0, utils_1.defineContainer)('ifx-card-headline', undefined, [ + 'direction', + 'hasDesc' +]); +exports.IfxCardOverline = (0, utils_1.defineContainer)('ifx-card-overline', undefined); +exports.IfxCardText = (0, utils_1.defineContainer)('ifx-card-text', undefined, [ + 'hasBtn' +]); +exports.IfxCheckbox = (0, utils_1.defineContainer)('ifx-checkbox', undefined, [ + 'disabled', + 'value', + 'error', + 'name', + 'ifxChange' +]); +exports.IfxChip = (0, utils_1.defineContainer)('ifx-chip', undefined, [ + 'placeholder' +]); +exports.IfxDropdown = (0, utils_1.defineContainer)('ifx-dropdown', undefined, [ + 'label', + 'size', + 'disabled', + 'icon', + 'search', + 'filter' +]); +exports.IfxDropdownDivider = (0, utils_1.defineContainer)('ifx-dropdown-divider', undefined); +exports.IfxDropdownItem = (0, utils_1.defineContainer)('ifx-dropdown-item', undefined, [ + 'label', + 'size', + 'disabled', + 'icon', + 'checkable', + 'value', + 'url', + 'target', + 'itemValues' +]); +exports.IfxDropdownMenu = (0, utils_1.defineContainer)('ifx-dropdown-menu', undefined, [ + 'label', + 'size', + 'disabled', + 'icon', + 'search', + 'filter', + 'selectValues' +]); +exports.IfxExample = (0, utils_1.defineContainer)('ifx-example', undefined, [ + 'variant', + 'color', + 'size', + 'disabled', + 'icon', + 'position', + 'href', + 'target', + 'type' +]); +exports.IfxFaq = (0, utils_1.defineContainer)('ifx-faq', undefined); +exports.IfxFilterInput = (0, utils_1.defineContainer)('ifx-filter-input', undefined, [ + 'label', + 'size', + 'disabled', + 'icon', + 'search', + 'filter', + 'selectValue' +]); +exports.IfxFooter = (0, utils_1.defineContainer)('ifx-footer', undefined, [ + 'variant' +]); +exports.IfxFooterColumn = (0, utils_1.defineContainer)('ifx-footer-column', undefined); +exports.IfxIcon = (0, utils_1.defineContainer)('ifx-icon', undefined, [ + 'icon', + 'ifxIcon', + 'consoleError' +]); +exports.IfxIconButton = (0, utils_1.defineContainer)('ifx-icon-button', undefined, [ + 'variant', + 'color', + 'size', + 'disabled', + 'icon', + 'href', + 'target', + 'shape' +]); +exports.IfxIconsPreview = (0, utils_1.defineContainer)('ifx-icons-preview', undefined); +exports.IfxLink = (0, utils_1.defineContainer)('ifx-link', undefined, [ + 'href', + 'target', + 'color', + 'bold', + 'underline' +]); +exports.IfxListGroup = (0, utils_1.defineContainer)('ifx-list-group', undefined, [ + 'flush', + 'bulletpoint', + 'notification' +]); +exports.IfxListItem = (0, utils_1.defineContainer)('ifx-list-item', undefined, [ + 'isFlush', + 'badge', + 'badgeValue' +]); +exports.IfxListNotification = (0, utils_1.defineContainer)('ifx-list-notification', undefined, [ + 'titleText', + 'isFlush', + 'creationTime' +]); +exports.IfxModal = (0, utils_1.defineContainer)('ifx-modal', undefined, [ + 'caption', + 'closeOnOverlayClick', + 'alertColor', + 'alertIcon', + 'modalOpen', + 'modalClose', + 'okButtonClick', + 'cancelButtonClick' +]); +exports.IfxMultiSelectInput = (0, utils_1.defineContainer)('ifx-multi-select-input', undefined, [ + 'Placeholder' +]); +exports.IfxMultiSelectInputItem = (0, utils_1.defineContainer)('ifx-multi-select-input-item', undefined, [ + 'content', + 'closed' +]); +exports.IfxNavbar = (0, utils_1.defineContainer)('ifx-navbar', undefined, [ + 'applicationName' +]); +exports.IfxNavbarMenuItem = (0, utils_1.defineContainer)('ifx-navbar-menu-item', undefined, [ + 'isProfile', + 'hideLabel', + 'icon' +]); +exports.IfxNumberIndicator = (0, utils_1.defineContainer)('ifx-number-indicator', undefined, [ + 'inverted' +]); +exports.IfxProgressBar = (0, utils_1.defineContainer)('ifx-progress-bar', undefined, [ + 'value', + 'label', + 'size', + 'showLabel' +]); +exports.IfxRadioButton = (0, utils_1.defineContainer)('ifx-radio-button', undefined, [ + 'disabled', + 'value', + 'error', + 'size', + 'ifxChange' +]); +exports.IfxRange = (0, utils_1.defineContainer)('ifx-range', undefined, [ + 'min', + 'max', + 'value', + 'disabled', + 'showPercentage', + 'leftIcon', + 'rightIcon', + 'leftText', + 'rightText', + 'ifxChanged' +]); +exports.IfxSearchBar = (0, utils_1.defineContainer)('ifx-search-bar', undefined, [ + 'icon', + 'showCloseButton', + 'isOpen', + 'hideLabel', + 'size', + 'value', + 'ifxInput' +], 'value', 'ifxInput'); +exports.IfxSearchInput = (0, utils_1.defineContainer)('ifx-search-input', undefined, [ + 'value', + 'width', + 'showDeleteIcon', + 'disabled', + 'borderColor', + 'size', + 'ifxInput' +], 'value', 'ifxInput'); +exports.IfxSelectInput = (0, utils_1.defineContainer)('ifx-select-input', undefined); +exports.IfxSidebar = (0, utils_1.defineContainer)('ifx-sidebar', undefined, [ + 'applicationName' +]); +exports.IfxSidebarItem = (0, utils_1.defineContainer)('ifx-sidebar-item', undefined, [ + 'icon', + 'href', + 'target' +]); +exports.IfxSpinner = (0, utils_1.defineContainer)('ifx-spinner', undefined, [ + 'size', + 'variant' +]); +exports.IfxStatus = (0, utils_1.defineContainer)('ifx-status', undefined, [ + 'label', + 'border', + 'color' +]); +exports.IfxSwitch = (0, utils_1.defineContainer)('ifx-switch', undefined, [ + 'value', + 'name', + 'ifxChange' +]); +exports.IfxTab = (0, utils_1.defineContainer)('ifx-tab', undefined, [ + 'header', + 'tabBecameActive', + 'tabBecameInactive' +]); +exports.IfxTabs = (0, utils_1.defineContainer)('ifx-tabs', undefined, [ + 'tabs', + 'orientation', + 'small', + 'ifxTabIndex' +]); +exports.IfxTag = (0, utils_1.defineContainer)('ifx-tag', undefined); +exports.IfxTextInput = (0, utils_1.defineContainer)('ifx-text-input', undefined, [ + 'placeholder', + 'value', + 'error', + 'errorMessage', + 'success', + 'disabled', + 'readonly', + 'icon', + 'ifxInput' +], 'value', 'ifxInput'); +//# sourceMappingURL=components.js.map \ No newline at end of file diff --git a/packages/components-vue/lib/components.js.map b/packages/components-vue/lib/components.js.map new file mode 100644 index 0000000000..5ed86c65cc --- /dev/null +++ b/packages/components-vue/lib/components.js.map @@ -0,0 +1 @@ +{"version":3,"file":"components.js","sourceRoot":"","sources":["components.ts"],"names":[],"mappings":";;;;AAGA,qDAA4D;AAO/C,QAAA,YAAY,GAAiB,IAAA,uBAAe,EAAmB,eAAe,EAAE,SAAS,EAAE;IACtG,cAAc;CACf,CAAC,CAAC;AAGU,QAAA,gBAAgB,GAAiB,IAAA,uBAAe,EAAuB,oBAAoB,EAAE,SAAS,EAAE;IACnH,SAAS;IACT,aAAa;IACb,cAAc;CACf,CAAC,CAAC;AAGU,QAAA,QAAQ,GAAiB,IAAA,uBAAe,EAAe,WAAW,EAAE,SAAS,EAAE;IAC1F,OAAO;IACP,MAAM;IACN,UAAU;CACX,CAAC,CAAC;AAGU,QAAA,QAAQ,GAAiB,IAAA,uBAAe,EAAe,WAAW,EAAE,SAAS,CAAC,CAAC;AAG/E,QAAA,aAAa,GAAiB,IAAA,uBAAe,EAAoB,gBAAgB,EAAE,SAAS,CAAC,CAAC;AAG9F,QAAA,iBAAiB,GAAiB,IAAA,uB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AC,CAAC;AAGU,QAAA,cAAc,GAAiB,IAAA,uBAAe,EAAqB,kBAAkB,EAAE,SAAS,EAAE;IAC7G,MAAM;IACN,MAAM;IACN,QAAQ;CACT,CAAC,CAAC;AAGU,QAAA,UAAU,GAAiB,IAAA,uBAAe,EAAiB,aAAa,EAAE,SAAS,EAAE;IAChG,MAAM;IACN,SAAS;CACV,CAAC,CAAC;AAGU,QAAA,SAAS,GAAiB,IAAA,uBAAe,EAAgB,YAAY,EAAE,SAAS,EAAE;IAC7F,OAAO;IACP,QAAQ;IACR,OAAO;CACR,CAAC,CAAC;AAGU,QAAA,SAAS,GAAiB,IAAA,uBAAe,EAAgB,YAAY,EAAE,SAAS,EAAE;IAC7F,OAAO;IACP,MAAM;IACN,WAAW;CACZ,CAAC,CAAC;AAGU,QAAA,MAAM,GAAiB,IAAA,uBAAe,EAAa,SAAS,EAAE,SAAS,EAAE;IACpF,QAAQ;IACR,iBAAiB;IACjB,mBAAmB;CACpB,CAAC,CAAC;AAGU,QAAA,OAAO,GAAiB,IAAA,uBAAe,EAAc,UAAU,EAAE,SAAS,EAAE;IACvF,MAAM;IACN,aAAa;IACb,OAAO;IACP,aAAa;CACd,CAAC,CAAC;AAGU,QAAA,MAAM,GAAiB,IAAA,uBAAe,EAAa,SAAS,EAAE,SAAS,CAAC,CAAC;AAGzE,QAAA,YAAY,GAAiB,IAAA,uBAAe,EAA8C,gBAAgB,EAAE,SAAS,EAAE;IAClI,aAAa;IACb,OAAO;IACP,OAAO;IACP,cAAc;IACd,SAAS;IACT,UAAU;IACV,UAAU;IACV,MAAM;IACN,UAAU;CACX,EACD,OAAO,EAAE,UAAU,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/components-vue/lib/index.d.ts b/packages/components-vue/lib/index.d.ts new file mode 100644 index 0000000000..263e28e744 --- /dev/null +++ b/packages/components-vue/lib/index.d.ts @@ -0,0 +1,2 @@ +export * from './components'; +export * from './plugin'; diff --git a/packages/components-vue/lib/index.js b/packages/components-vue/lib/index.js new file mode 100644 index 0000000000..5353cf1b4a --- /dev/null +++ b/packages/components-vue/lib/index.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./components"), exports); +__exportStar(require("./plugin"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/components-vue/lib/index.js.map b/packages/components-vue/lib/index.js.map new file mode 100644 index 0000000000..d5ee57e470 --- /dev/null +++ b/packages/components-vue/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,+CAA6B;AAC7B,2CAAyB"} \ No newline at end of file diff --git a/packages/components-vue/lib/plugin.d.ts b/packages/components-vue/lib/plugin.d.ts new file mode 100644 index 0000000000..48df637a98 --- /dev/null +++ b/packages/components-vue/lib/plugin.d.ts @@ -0,0 +1,2 @@ +import { Plugin } from 'vue'; +export declare const ComponentLibrary: Plugin; diff --git a/packages/components-vue/lib/plugin.js b/packages/components-vue/lib/plugin.js new file mode 100644 index 0000000000..f1be745831 --- /dev/null +++ b/packages/components-vue/lib/plugin.js @@ -0,0 +1,23 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ComponentLibrary = void 0; +const loader_1 = require("@infineon/infineon-design-system-stencil/loader"); +exports.ComponentLibrary = { + install() { + return __awaiter(this, void 0, void 0, function* () { + (0, loader_1.applyPolyfills)().then(() => { + (0, loader_1.defineCustomElements)(); + }); + }); + }, +}; +//# sourceMappingURL=plugin.js.map \ No newline at end of file diff --git a/packages/components-vue/lib/plugin.js.map b/packages/components-vue/lib/plugin.js.map new file mode 100644 index 0000000000..667dda347d --- /dev/null +++ b/packages/components-vue/lib/plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"plugin.js","sourceRoot":"","sources":["plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,4EAAuG;AAE1F,QAAA,gBAAgB,GAAW;IAChC,OAAO;;YACX,IAAA,uBAAc,GAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBACzB,IAAA,6BAAoB,GAAE,CAAC;YACzB,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC"} \ No newline at end of file diff --git a/packages/components-vue/lib/vue-component-lib/utils.d.ts b/packages/components-vue/lib/vue-component-lib/utils.d.ts new file mode 100644 index 0000000000..49da3ded96 --- /dev/null +++ b/packages/components-vue/lib/vue-component-lib/utils.d.ts @@ -0,0 +1,4 @@ +export interface InputProps { + modelValue?: T; +} +export declare const defineContainer: (name: string, defineCustomElement: any, componentProps?: string[], modelProp?: string, modelUpdateEvent?: string, externalModelUpdateEvent?: string) => (props: Props & InputProps & {}) => any; diff --git a/packages/components-vue/lib/vue-component-lib/utils.js b/packages/components-vue/lib/vue-component-lib/utils.js new file mode 100644 index 0000000000..ad43588bab --- /dev/null +++ b/packages/components-vue/lib/vue-component-lib/utils.js @@ -0,0 +1,117 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defineContainer = void 0; +const vue_1 = require("vue"); +const UPDATE_VALUE_EVENT = 'update:modelValue'; +const MODEL_VALUE = 'modelValue'; +const ROUTER_LINK_VALUE = 'routerLink'; +const NAV_MANAGER = 'navManager'; +const ROUTER_PROP_PREFIX = 'router'; +const ARIA_PROP_PREFIX = 'aria'; +const EMPTY_PROP = Symbol(); +const DEFAULT_EMPTY_PROP = { default: EMPTY_PROP }; +const getComponentClasses = (classes) => { + return (classes === null || classes === void 0 ? void 0 : classes.split(' ')) || []; +}; +const getElementClasses = (ref, componentClasses, defaultClasses = []) => { + var _a; + return [...Array.from(((_a = ref.value) === null || _a === void 0 ? void 0 : _a.classList) || []), ...defaultClasses].filter((c, i, self) => !componentClasses.has(c) && self.indexOf(c) === i); +}; +const defineContainer = (name, defineCustomElement, componentProps = [], modelProp, modelUpdateEvent, externalModelUpdateEvent) => { + if (defineCustomElement !== undefined) { + defineCustomElement(); + } + const Container = (0, vue_1.defineComponent)((props, { attrs, slots, emit }) => { + var _a; + let modelPropValue = props[modelProp]; + const containerRef = (0, vue_1.ref)(); + const classes = new Set(getComponentClasses(attrs.class)); + const onVnodeBeforeMount = (vnode) => { + if (vnode.el) { + const eventsNames = Array.isArray(modelUpdateEvent) ? modelUpdateEvent : [modelUpdateEvent]; + eventsNames.forEach((eventName) => { + vnode.el.addEventListener(eventName.toLowerCase(), (e) => { + modelPropValue = (e === null || e === void 0 ? void 0 : e.target)[modelProp]; + emit(UPDATE_VALUE_EVENT, modelPropValue); + if (externalModelUpdateEvent) { + emit(externalModelUpdateEvent, e); + } + }); + }); + } + }; + const currentInstance = (0, vue_1.getCurrentInstance)(); + const hasRouter = (_a = currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.appContext) === null || _a === void 0 ? void 0 : _a.provides[NAV_MANAGER]; + const navManager = hasRouter ? (0, vue_1.inject)(NAV_MANAGER) : undefined; + const handleRouterLink = (ev) => { + const { routerLink } = props; + if (routerLink === EMPTY_PROP) + return; + if (navManager !== undefined) { + let navigationPayload = { event: ev }; + for (const key in props) { + const value = props[key]; + if (props.hasOwnProperty(key) && key.startsWith(ROUTER_PROP_PREFIX) && value !== EMPTY_PROP) { + navigationPayload[key] = value; + } + } + navManager.navigate(navigationPayload); + } + else { + console.warn('Tried to navigate, but no router was found. Make sure you have mounted Vue Router.'); + } + }; + return () => { + modelPropValue = props[modelProp]; + getComponentClasses(attrs.class).forEach((value) => { + classes.add(value); + }); + const oldClick = props.onClick; + const handleClick = (ev) => { + if (oldClick !== undefined) { + oldClick(ev); + } + if (!ev.defaultPrevented) { + handleRouterLink(ev); + } + }; + let propsToAdd = { + ref: containerRef, + class: getElementClasses(containerRef, classes), + onClick: handleClick, + onVnodeBeforeMount: modelUpdateEvent ? onVnodeBeforeMount : undefined, + }; + for (const key in props) { + const value = props[key]; + if ((props.hasOwnProperty(key) && value !== EMPTY_PROP) || key.startsWith(ARIA_PROP_PREFIX)) { + propsToAdd[key] = value; + } + } + if (modelProp) { + if (props[MODEL_VALUE] !== EMPTY_PROP) { + propsToAdd = Object.assign(Object.assign({}, propsToAdd), { [modelProp]: props[MODEL_VALUE] }); + } + else if (modelPropValue !== EMPTY_PROP) { + propsToAdd = Object.assign(Object.assign({}, propsToAdd), { [modelProp]: modelPropValue }); + } + } + return (0, vue_1.h)(name, propsToAdd, slots.default && slots.default()); + }; + }); + if (typeof Container !== 'function') { + Container.name = name; + Container.props = { + [ROUTER_LINK_VALUE]: DEFAULT_EMPTY_PROP, + }; + componentProps.forEach((componentProp) => { + Container.props[componentProp] = DEFAULT_EMPTY_PROP; + }); + if (modelProp) { + Container.props[MODEL_VALUE] = DEFAULT_EMPTY_PROP; + Container.emits = [UPDATE_VALUE_EVENT, externalModelUpdateEvent]; + } + } + return Container; +}; +exports.defineContainer = defineContainer; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/packages/components-vue/lib/vue-component-lib/utils.js.map b/packages/components-vue/lib/vue-component-lib/utils.js.map new file mode 100644 index 0000000000..92bf523bc5 --- /dev/null +++ b/packages/components-vue/lib/vue-component-lib/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":";;;AAEA,6BAAsF;AAMtF,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAC/C,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AACvC,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AACpC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAUhC,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC;AAC5B,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAMnD,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC/C,OAAO,CAAC,OAAkB,aAAlB,OAAO,uBAAP,OAAO,CAAa,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CACxB,GAAiC,EACjC,gBAA6B,EAC7B,iBAA2B,EAAE,EAC7B,EAAE;;IACF,OAAO,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA,MAAA,GAAG,CAAC,KAAK,0CAAE,SAAS,KAAI,EAAE,CAAC,EAAE,GAAG,cAAc,CAAC,CAAC,MAAM,CAC1E,CAAC,CAAS,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAC1E,CAAC;AACJ,CAAC,CAAC;AAgBK,MAAM,eAAe,GAAG,CAC7B,IAAY,EACZ,mBAAwB,EACxB,iBAA2B,EAAE,E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ChB,CAAC,iBAAiB,CAAC,EAAE,kBAAkB;SACxC,CAAC;QAEF,cAAc,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;YACvC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,IAAI,SAAS,EAAE;YACb,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC;YAClD,SAAS,CAAC,KAAK,GAAG,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,CAAC;SAClE;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AApJW,QAAA,eAAe,mBAoJ1B"} \ No newline at end of file diff --git a/packages/components-vue/package.json b/packages/components-vue/package.json index eb35de6d2f..970e255bf2 100644 --- a/packages/components-vue/package.json +++ b/packages/components-vue/package.json @@ -2,9 +2,9 @@ "name": "@infineon/infineon-design-system-vue", "version": "1.0.0", "description": "Infineon design system Stencil web components for Vue", - "main": "dist/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "npm run tsc", diff --git a/packages/components-vue/tsconfig.json b/packages/components-vue/tsconfig.json index bcf7c73899..2b568d1080 100644 --- a/packages/components-vue/tsconfig.json +++ b/packages/components-vue/tsconfig.json @@ -1,21 +1,25 @@ { "extends": "../../tsconfig.vue.json", "compilerOptions": { - "outDir": "./dist", + "allowUnreachableCode": false, + "skipLibCheck": true, + "jsx": "react", + "allowSyntheticDefaultImports": true, + "declaration": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "esModuleInterop": true, "lib": [ "dom", - "es2020" + "es2015" ], "module": "es2015", "moduleResolution": "node", - "target": "es2017", - "skipLibCheck": true, + "outDir": "./dist", + "removeComments": false, "sourceMap": true, - "declaration": true, - "allowSyntheticDefaultImports": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "esModuleInterop": true, + "target": "es2015", + "declarationDir": "./dist/types" }, "include": [ "lib" diff --git a/packages/components/stencil.config.ts b/packages/components/stencil.config.ts index 7a2d4e3b89..9a80cf678b 100644 --- a/packages/components/stencil.config.ts +++ b/packages/components/stencil.config.ts @@ -15,6 +15,7 @@ export const config: Config = { }, { type: 'dist-custom-elements', + generateTypeDeclarations: true, }, { type: 'docs-readme',