-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: set widgetVersion in react component #86dty6jh3 * feat: set widgetVersion in vue component #86dty6jh3 * feat: set widgetVersion in angular component #86dty6jh3 * feat: set widgetVersion in stencil component #86dty6jh3 * refactor: code improvements #86dty6jh3 * docs: update readme's #86dty6jh3 * feat: add npmignore in stencil package #86dty6jh3 * feat: remove source map in all packages #86dty6jh3 * docs: update main readme #86dtw66gd * refactor: rename "widget-stencil" to "widget" #86dty6jh3 * refactor: rename props of widget #86dty6jh3 * fix: fix some details in wrappers of widget #86dty6jh3
- Loading branch information
1 parent
55f6e6c
commit b8fb81b
Showing
45 changed files
with
471 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,5 @@ testem.log | |
# System files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,6 @@ | |
"@angular/router", | ||
"rxjs", | ||
"zone.js", | ||
"@mifiel/widget-stencil" | ||
"@mifiel/widget" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { | ||
ChangeDetectionStrategy, | ||
ChangeDetectorRef, | ||
Component, | ||
ElementRef, | ||
EventEmitter, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
Input, | ||
NgZone, | ||
OnInit, | ||
} from '@angular/core'; | ||
import { Components } from '@mifiel/widget'; | ||
import dataWidget from './config.json'; | ||
|
||
import { MifielWidget as Mifiel } from './stencil-generated/components'; | ||
|
||
@Component({ | ||
selector: 'mifiel-widget', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
template: '<ng-content widget-version="1"></ng-content>', | ||
}) | ||
export class MifielWidget extends Mifiel implements OnInit { | ||
protected override el!: HTMLElement; | ||
|
||
@Input() override widgetVersion?: string; | ||
|
||
constructor( | ||
c: ChangeDetectorRef, | ||
r: ElementRef, | ||
protected override z: NgZone | ||
) { | ||
super(c, r, z); | ||
} | ||
|
||
ngOnInit() { | ||
this.widgetVersion = `${dataWidget.appName}@${dataWidget.appVersion}`; | ||
} | ||
} | ||
|
||
export declare interface MifielWidget extends Components.MifielWidget { | ||
error: EventEmitter<CustomEvent<any>>; | ||
|
||
success: EventEmitter<CustomEvent<any>>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const packageJsonPath = path.resolve(__dirname, '../../package.json'); | ||
const packageJsonContent = fs.readFileSync(packageJsonPath, 'utf8'); | ||
const packageJson = JSON.parse(packageJsonContent); | ||
|
||
const { name, version } = packageJson; | ||
|
||
const configObject = { | ||
appName: name, | ||
appVersion: version, | ||
}; | ||
|
||
const configFilePath = path.resolve(__dirname, '../lib/config.json'); | ||
|
||
fs.writeFileSync(configFilePath, JSON.stringify(configObject, null, 2), 'utf8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config.json |
Oops, something went wrong.