From 0dbf5b991a63cb707e2ba7f467ebc9b1fa5d671b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Alejandro=20L=C3=B3pez=20Lor=C3=ADa?= Date: Wed, 3 Jul 2024 00:04:45 -0600 Subject: [PATCH] refactor: rename "widget-stencil" to "widget" #86dty6jh3 --- README.md | 4 ++-- package.json | 2 +- packages/widget-angular/ng-package.json | 2 +- packages/widget-angular/package.json | 2 +- .../src/lib/stencil-generated/components.ts | 2 +- packages/widget-angular/src/lib/widget-mifiel.ts | 2 +- .../src/lib/widget.angular.module.ts | 2 +- .../lib/components/stencil-generated/index.ts | 2 +- packages/widget-react/lib/index.tsx | 2 +- packages/widget-react/package.json | 2 +- packages/widget-stencil/CHANGELOG.md | 16 ---------------- packages/widget-stencil/README.md | 8 ++++---- packages/widget-stencil/package.json | 8 ++++---- packages/widget-stencil/src/index.html | 4 ++-- packages/widget-stencil/stencil.config.ts | 6 +++--- packages/widget-vue/lib/components.ts | 2 +- packages/widget-vue/lib/mifiel-widget.ts | 2 +- packages/widget-vue/lib/plugin.ts | 2 +- packages/widget-vue/package.json | 2 +- 19 files changed, 28 insertions(+), 44 deletions(-) delete mode 100644 packages/widget-stencil/CHANGELOG.md diff --git a/README.md b/README.md index b573b38..0f11f92 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ Library to authenticate Mifiel API calls. Mifiel API Client for NodeJS. -## [`@mifiel/widget-stencil`](https://github.com/Mifiel/mifiel-js/tree/main/packages/widget-stencil) +## [`@mifiel/widget`](https://github.com/Mifiel/mifiel-js/tree/main/packages/widget-stencil) -[![npm](https://img.shields.io/npm/v/@mifiel/widget-stencil.svg?style=flat-square)](https://www.npmjs.com/package/@mifiel/widget-stencil) +[![npm](https://img.shields.io/npm/v/@mifiel/widget.svg?style=flat-square)](https://www.npmjs.com/package/@mifiel/widget) Web component for Mifiel Widget implemented with StencilJS. diff --git a/package.json b/package.json index f02246e..6aed001 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ ], "scripts": { "build": "lerna run build --scope=@mifiel/{api-client,api-client-auth} && yarn build:widget", - "build:widget": "lerna run build --scope=@mifiel/widget-stencil && lerna run build --scope=@mifiel/{widget-react,widget-vue,widget-angular}", + "build:widget": "lerna run build --scope=@mifiel/widget && lerna run build --scope=@mifiel/{widget-react,widget-vue,widget-angular}", "husky": "husky", "lint": "lerna run lint", "postpublish": "pinst --enable", diff --git a/packages/widget-angular/ng-package.json b/packages/widget-angular/ng-package.json index 9219d3e..3eb4d9a 100644 --- a/packages/widget-angular/ng-package.json +++ b/packages/widget-angular/ng-package.json @@ -14,6 +14,6 @@ "@angular/router", "rxjs", "zone.js", - "@mifiel/widget-stencil" + "@mifiel/widget" ] } diff --git a/packages/widget-angular/package.json b/packages/widget-angular/package.json index 6df3d08..f174037 100644 --- a/packages/widget-angular/package.json +++ b/packages/widget-angular/package.json @@ -43,7 +43,7 @@ "@angular/platform-browser": "^16.2.0", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", - "@mifiel/widget-stencil": "^0.0.1", + "@mifiel/widget": "^0.0.1", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" diff --git a/packages/widget-angular/src/lib/stencil-generated/components.ts b/packages/widget-angular/src/lib/stencil-generated/components.ts index ec566c7..202f8ba 100644 --- a/packages/widget-angular/src/lib/stencil-generated/components.ts +++ b/packages/widget-angular/src/lib/stencil-generated/components.ts @@ -4,7 +4,7 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Even import { ProxyCmp, proxyOutputs } from './angular-component-lib/utils'; -import { Components } from '@mifiel/widget-stencil'; +import { Components } from '@mifiel/widget'; @ProxyCmp({ diff --git a/packages/widget-angular/src/lib/widget-mifiel.ts b/packages/widget-angular/src/lib/widget-mifiel.ts index dad4853..047759b 100644 --- a/packages/widget-angular/src/lib/widget-mifiel.ts +++ b/packages/widget-angular/src/lib/widget-mifiel.ts @@ -9,7 +9,7 @@ import { NgZone, OnInit, } from '@angular/core'; -import { Components } from '@mifiel/widget-stencil'; +import { Components } from '@mifiel/widget'; import { ProxyCmp, proxyOutputs, diff --git a/packages/widget-angular/src/lib/widget.angular.module.ts b/packages/widget-angular/src/lib/widget.angular.module.ts index 4636aec..bf22c58 100644 --- a/packages/widget-angular/src/lib/widget.angular.module.ts +++ b/packages/widget-angular/src/lib/widget.angular.module.ts @@ -1,5 +1,5 @@ import { APP_INITIALIZER, NgModule } from '@angular/core'; -import { defineCustomElements } from '@mifiel/widget-stencil/dist/loader'; +import { defineCustomElements } from '@mifiel/widget/dist/loader'; import { MifielWidget } from './widget-mifiel'; const DIRECTIVES = [MifielWidget]; diff --git a/packages/widget-react/lib/components/stencil-generated/index.ts b/packages/widget-react/lib/components/stencil-generated/index.ts index e3a43da..170c911 100644 --- a/packages/widget-react/lib/components/stencil-generated/index.ts +++ b/packages/widget-react/lib/components/stencil-generated/index.ts @@ -3,7 +3,7 @@ /* auto-generated react proxies */ import { createReactComponent } from './react-component-lib'; -import type { JSX } from '@mifiel/widget-stencil'; +import type { JSX } from '@mifiel/widget'; diff --git a/packages/widget-react/lib/index.tsx b/packages/widget-react/lib/index.tsx index 9ef61a7..9f688d7 100644 --- a/packages/widget-react/lib/index.tsx +++ b/packages/widget-react/lib/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { MifielWidget as Widget } from './components/stencil-generated'; import dataWidget from './config.json'; -export { defineCustomElements } from '@mifiel/widget-stencil/dist/loader'; +export { defineCustomElements } from '@mifiel/widget/dist/loader'; export const MifielWidget = (props) => { const widgetVersion = `${dataWidget.appName}@${dataWidget.appVersion}`; diff --git a/packages/widget-react/package.json b/packages/widget-react/package.json index 8e0ab91..c188fa2 100644 --- a/packages/widget-react/package.json +++ b/packages/widget-react/package.json @@ -25,7 +25,7 @@ }, "types": "dist/types/lib/index.d.ts", "dependencies": { - "@mifiel/widget-stencil": "^0.0.1" + "@mifiel/widget": "^0.0.1" }, "devDependencies": { "@types/react": "^18.3.3", diff --git a/packages/widget-stencil/CHANGELOG.md b/packages/widget-stencil/CHANGELOG.md deleted file mode 100644 index e55881b..0000000 --- a/packages/widget-stencil/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [0.0.1](https://github.com/Mifiel/mifiel-js/compare/@mifiel/widget-stencil@1.0.1...@mifiel/widget-stencil@0.0.1) (2024-06-27) - -**Note:** Version bump only for package @mifiel/widget-stencil - - - - - -## 1.0.1 (2024-06-26) - -**Note:** Version bump only for package @mifiel/widget-stencil diff --git a/packages/widget-stencil/README.md b/packages/widget-stencil/README.md index 7e7f1c7..b934e28 100644 --- a/packages/widget-stencil/README.md +++ b/packages/widget-stencil/README.md @@ -7,7 +7,7 @@ Web component for Mifiel Widget implemented with StencilJS. Install the package using npm: ```bash -npm install @mifiel/widget-stencil +npm install @mifiel/widget ``` ## Usage @@ -19,7 +19,7 @@ To integrate the `mifiel-widget` component into your web application, follow the 1. **Using Node Modules:** Compile the code and import our library using: ```javascript - import { defineCustomElements } from '@mifiel/widget-stencil/loader'; + import { defineCustomElements } from '@mifiel/widget/loader'; ``` 2. **Using CDN:** @@ -39,7 +39,7 @@ To integrate the `mifiel-widget` component into your web application, follow the Mifiel Widget Example @@ -82,7 +82,7 @@ To integrate the `mifiel-widget` component into your web application, follow the ```javascript // Only use this if you are using node_modules. // Start -import { defineCustomElements } from '@mifiel/widget-stencil/loader'; +import { defineCustomElements } from '@mifiel/widget/loader'; defineCustomElements(window); // End diff --git a/packages/widget-stencil/package.json b/packages/widget-stencil/package.json index baf87a2..3996d31 100644 --- a/packages/widget-stencil/package.json +++ b/packages/widget-stencil/package.json @@ -1,5 +1,5 @@ { - "name": "@mifiel/widget-stencil", + "name": "@mifiel/widget", "version": "0.0.1", "description": "Mifiel Widget component built with StencilJS for easy integration into web applications.", "license": "MIT", @@ -27,8 +27,8 @@ "collection:main": "dist/collection/index.js", "exports": { ".": { - "import": "./dist/esm/widget-stencil.js", - "require": "./dist/cjs/widget-stencil.cjs.js", + "import": "./dist/esm/widget.js", + "require": "./dist/cjs/widget.cjs.js", "types": "./dist/types/index.d.ts" }, "./dist/loader": { @@ -38,7 +38,7 @@ } }, "types": "dist/types/index.d.ts", - "unpkg": "dist/widget-stencil/widget-stencil.esm.js", + "unpkg": "dist/widget/widget.esm.js", "devDependencies": { "@stencil/angular-output-target": "^0.8.4", "@stencil/core": "^4.7.0", diff --git a/packages/widget-stencil/src/index.html b/packages/widget-stencil/src/index.html index 50d66ae..e7ae7d5 100644 --- a/packages/widget-stencil/src/index.html +++ b/packages/widget-stencil/src/index.html @@ -5,8 +5,8 @@ Stencil Component Starter - - + + diff --git a/packages/widget-stencil/stencil.config.ts b/packages/widget-stencil/stencil.config.ts index b70fd0c..98a96c2 100644 --- a/packages/widget-stencil/stencil.config.ts +++ b/packages/widget-stencil/stencil.config.ts @@ -15,17 +15,17 @@ export const config: Config = { serviceWorker: null, // disable service workers }, reactOutputTarget({ - componentCorePackage: '@mifiel/widget-stencil', + componentCorePackage: '@mifiel/widget', proxiesFile: '../widget-react/lib/components/stencil-generated/index.ts', }), angularOutputTarget({ - componentCorePackage: '@mifiel/widget-stencil', + componentCorePackage: '@mifiel/widget', outputType: 'component', directivesProxyFile: '../widget-angular/src/lib/stencil-generated/components.ts', directivesArrayFile: '../widget-angular/src/lib/stencil-generated/index.ts', }), vueOutputTarget({ - componentCorePackage: '@mifiel/widget-stencil', + componentCorePackage: '@mifiel/widget', proxiesFile: '../widget-vue/lib/components.ts', }), ], diff --git a/packages/widget-vue/lib/components.ts b/packages/widget-vue/lib/components.ts index 9d48312..85cf139 100644 --- a/packages/widget-vue/lib/components.ts +++ b/packages/widget-vue/lib/components.ts @@ -3,7 +3,7 @@ /* auto-generated vue proxies */ import { defineContainer } from './vue-component-lib/utils'; -import type { JSX } from '@mifiel/widget-stencil'; +import type { JSX } from '@mifiel/widget'; diff --git a/packages/widget-vue/lib/mifiel-widget.ts b/packages/widget-vue/lib/mifiel-widget.ts index 5f657d2..fbfd9b9 100644 --- a/packages/widget-vue/lib/mifiel-widget.ts +++ b/packages/widget-vue/lib/mifiel-widget.ts @@ -2,7 +2,7 @@ /* tslint:disable */ import { defineComponent, h } from 'vue'; import { defineContainer } from './vue-component-lib/utils'; -import type { JSX } from '@mifiel/widget-stencil'; +import type { JSX } from '@mifiel/widget'; import dataWidget from './config.json'; const widgetVersion = `${dataWidget.appName}@${dataWidget.appVersion}` diff --git a/packages/widget-vue/lib/plugin.ts b/packages/widget-vue/lib/plugin.ts index 7215d2c..cd255d9 100644 --- a/packages/widget-vue/lib/plugin.ts +++ b/packages/widget-vue/lib/plugin.ts @@ -1,5 +1,5 @@ import { Plugin } from 'vue'; -import { defineCustomElements } from '@mifiel/widget-stencil/dist/loader'; +import { defineCustomElements } from '@mifiel/widget/dist/loader'; export const MifielWidgetPlugin: Plugin = { install() { diff --git a/packages/widget-vue/package.json b/packages/widget-vue/package.json index ded6613..078ceed 100644 --- a/packages/widget-vue/package.json +++ b/packages/widget-vue/package.json @@ -24,7 +24,7 @@ }, "types": "dist/index.d.ts", "dependencies": { - "@mifiel/widget-stencil": "^0.0.1" + "@mifiel/widget": "^0.0.1" }, "devDependencies": { "vue": "^3.4.29"