Skip to content

Commit

Permalink
refactor: rename "widget-stencil" to "widget" #86dty6jh3
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro25262 committed Jul 3, 2024
1 parent 2f66d91 commit 0dbf5b9
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 44 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-angular/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@angular/router",
"rxjs",
"zone.js",
"@mifiel/widget-stencil"
"@mifiel/widget"
]
}
2 changes: 1 addition & 1 deletion packages/widget-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-angular/src/lib/widget-mifiel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
NgZone,
OnInit,
} from '@angular/core';
import { Components } from '@mifiel/widget-stencil';
import { Components } from '@mifiel/widget';
import {
ProxyCmp,
proxyOutputs,
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-angular/src/lib/widget.angular.module.ts
Original file line number Diff line number Diff line change
@@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';



Expand Down
2 changes: 1 addition & 1 deletion packages/widget-react/lib/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 0 additions & 16 deletions packages/widget-stencil/CHANGELOG.md

This file was deleted.

8 changes: 4 additions & 4 deletions packages/widget-stencil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:**
Expand All @@ -39,7 +39,7 @@ To integrate the `mifiel-widget` component into your web application, follow the
<title>Mifiel Widget Example</title>
<!-- with node modules -->
<!-- <script type="module">
import { defineCustomElements } from '@mifiel/widget-stencil/loader';
import { defineCustomElements } from '@mifiel/widget/loader';
defineCustomElements();
</script> -->
<!-- with CDN -->
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions packages/widget-stencil/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/widget-stencil/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>Stencil Component Starter</title>

<script type="module" src="/build/widget-stencil.esm.js"></script>
<script nomodule src="/build/widget-stencil.js"></script>
<script type="module" src="/build/widget.esm.js"></script>
<script nomodule src="/build/widget.js"></script>
</head>
<body>
<mifiel-widget id='123' />
Expand Down
6 changes: 3 additions & 3 deletions packages/widget-stencil/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}),
],
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-vue/lib/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';



Expand Down
2 changes: 1 addition & 1 deletion packages/widget-vue/lib/mifiel-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-vue/lib/plugin.ts
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0dbf5b9

Please sign in to comment.