项目作者: SeniorSA

项目描述 :
Web components library made for BPM Suite.
高级语言: JavaScript
项目地址: git://github.com/SeniorSA/tecnologia-webcomponents.git
创建时间: 2020-12-11T21:11:25Z
项目社区:https://github.com/SeniorSA/tecnologia-webcomponents

开源协议:MIT License

下载


Tecnologia web components

Built With Stencil

@seniorsistemas/tecnologia-webcomponents?style=flat-square" alt="npm (scoped)"> GitHub Workflow Status (branch)
All Contributors

This is a Work in Progress Web components library made by BPM Suite team.

Browser Support

Chrome New Edge (Chromium) Safari Firefox Older Edge IE
60+ 79+ 10.1+ 63+ 16-18 (polyfills) >= 11 (polyfills)

See complete docs

How to install

NPM

Install dependency:

  1. npm i @seniorsistemas/tecnologia-webcomponents

And import tecnologia-webcomponents.esm.js:

  1. <script src="@seniorsistemas/tecnologia-webcomponents/dist/tecnologia-webcomponents/tecnologia-webcomponents.esm.js" type="module"></script>

For legacy projects import tecnologia-webcomponents.js:

  1. <script src="@seniorsistemas/tecnologia-webcomponents/dist/tecnologia-webcomponents/tecnologia-webcomponents.js" type="text/javascript"></script>

For use in frameworks, see the Stencil page.

Via CDN (release candidate)

Now you can test components in a HTML page importing via script from CDN.

Stable

  1. <script src="https://cdn.tecnologia.senior.com.br/platform/tecnologia-webcomponents/master/tecnologia-webcomponents/tecnologia-webcomponents.esm.js" type="module"></script>

For legacy projects use:

  1. <script src="https://cdn.tecnologia.senior.com.br/platform/tecnologia-webcomponents/master/tecnologia-webcomponents/tecnologia-webcomponents.js" type="text/javascript"></script>

Release candidate (develop branch)

(ATTENTION!! Not use for production!)

  1. <script src="https://cdn.tecnologia.senior.com.br/platform/tecnologia-webcomponents/develop/tecnologia-webcomponents/tecnologia-webcomponents.js"></script>

Other alternative is use UNPKG, for this, overwrite with the following URL: https://unpkg.com/@seniorsistemas/tecnologia-webcomponents@latest/dist/tecnologia-webcomponents/tecnologia-webcomponents.js

Angular applications

  1. npm i @seniorsistemas/tecnologia-webcomponents

In your app.module.ts declare CUSTOM_ELEMENTS_SCHEMA:

  1. import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; // <-- import from here
  2. @NgModule({
  3. declarations: [
  4. AppComponent
  5. ],
  6. imports: [
  7. BrowserModule,
  8. AppRoutingModule
  9. ],
  10. providers: [],
  11. bootstrap: [AppComponent],
  12. schemas: [CUSTOM_ELEMENTS_SCHEMA] // <-- declare this
  13. })
  14. export class AppModule { }

And in main.ts end of file, add following imports:

  1. import { applyPolyfills, defineCustomElements } from '@seniorsistemas/tecnologia-webcomponents/loader';
  2. defineCustomElements();
  3. // for IE support (optional)
  4. applyPolyfills().then(() => {
  5. defineCustomElements()
  6. })

React applications

  1. yarn add @seniorsistemas/tecnologia-webcomponents

In your src/index.js or src/index.tsx (typescript project) file, add following imports preferably before of the React Render:

  1. import { applyPolyfills, defineCustomElements } from '@seniorsistemas/tecnologia-webcomponents/loader';
  2. defineCustomElements();
  3. // for IE support (optional)
  4. applyPolyfills().then(() => {
  5. defineCustomElements()
  6. })

I want to contribute

View contribution guide.

Contributors ✨

Thanks goes to these wonderful people (emoji key):







Lucas Reichert

💻 ⚠️ 🤔 📖 👀

Tiago Boeing

💻 ⚠️ 🎨 👀 📆 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!