All Projects → web-atoms → core

web-atoms / core

Licence: other
Light weight feature rich UI Framework for JavaScript for Browser with Dependency Injection, Mocking and Unit Testing

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to core

harshhhdev.github.io
Harsh Singh's personal blog and portfolio ⚡ built with Next.js
Stars: ✭ 23 (+27.78%)
Mutual labels:  jsx, tsx
Esbuild
An extremely fast JavaScript and CSS bundler and minifier
Stars: ✭ 29,374 (+163088.89%)
Mutual labels:  jsx, tsx
vue-typescript-tsx
🤓vue typeScript jsx 工程示例
Stars: ✭ 32 (+77.78%)
Mutual labels:  jsx, tsx
typesafe-templates
Template engine that leverages JSX to generate JavaScript code from TypeScript code files rather than text templates.
Stars: ✭ 27 (+50%)
Mutual labels:  jsx, tsx
vue3-jd-h5
🔥 Based on vue3.0.0, vant3.0.0, vue-router v4.0.0-0, vuex^4.0.0-0, vue-cli3, mockjs, imitating Jingdong Taobao, mobile H5 e-commerce platform! 基于vue3.0.0 ,vant3.0.0,vue-router v4.0.0-0, vuex^4.0.0-0,vue-cli3,mockjs,仿京东淘宝的,移动端H5电商平台!
Stars: ✭ 660 (+3566.67%)
Mutual labels:  jsx, tsx
njsx
A customizable and declarative interface for creating React and React Native components without JSX syntax.
Stars: ✭ 29 (+61.11%)
Mutual labels:  jsx, tsx
lowcode
React Lowcode - prototype, develop and maintain internal apps easier
Stars: ✭ 32 (+77.78%)
Mutual labels:  jsx, tsx
indent.js
Pure code indentation for jsx, tsx, ts, js, html, css, less, scss.
Stars: ✭ 55 (+205.56%)
Mutual labels:  jsx, tsx
vuetify-tsx
Vuetify TSX is just a wrapper lib around vuetify components.
Stars: ✭ 20 (+11.11%)
Mutual labels:  jsx, tsx
ios-scriptable-tsx
在 vscode 上使用 typescript 和 jsx 开发 ios 小组件的小框架.基于 Scriptable app.
Stars: ✭ 113 (+527.78%)
Mutual labels:  jsx, tsx
vscode-ecsstractor
Extracting selectors from HTML / JSX / TSX and generate CSS file.
Stars: ✭ 45 (+150%)
Mutual labels:  jsx, tsx
md-editor-v3
Markdown editor for vue3, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...
Stars: ✭ 326 (+1711.11%)
Mutual labels:  jsx, tsx
Dependency Cruiser
Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
Stars: ✭ 2,326 (+12822.22%)
Mutual labels:  jsx, tsx
element
Fast and simple custom elements.
Stars: ✭ 65 (+261.11%)
Mutual labels:  jsx, tsx
vite-vue-admin
🎉🎉使用Vite + Vue3 + TypeScript + Element-plus + Mock开发的后台管理系统🎉🎉
Stars: ✭ 97 (+438.89%)
Mutual labels:  jsx, tsx
React-Native-Tutorials
Repo for React Native tutorials from the Cheetah Coding YouTube Channel
Stars: ✭ 158 (+777.78%)
Mutual labels:  jsx
IndieNoMo
A full-stack web-app inspired by crowdfunding platform IndieGoGo.
Stars: ✭ 36 (+100%)
Mutual labels:  jsx
react-lite
A simple implementation of react
Stars: ✭ 51 (+183.33%)
Mutual labels:  jsx
Aris
Aris - A fast and powerful tool to write HTML in JS easily. Includes syntax highlighting, templates, SVG, CSS autofixing, debugger support and more...
Stars: ✭ 61 (+238.89%)
Mutual labels:  jsx
liyad
Liyad (Lisp yet another DSL interpreter) is very small Lisp interpreter written in JavaScript.
Stars: ✭ 27 (+50%)
Mutual labels:  jsx

Action Status npm version codecov

Web-Atoms Core

Web Atoms Core is a UI abstraction framework along with powerful MVVM pattern to design modern webpplications.

Note, Xamarin Forms support is now deprecated, as we are migrating to new mobile framework.

Web Features

  1. Functional Components
  2. Abstract Atom Component
  3. Abstract Device API (Browser Service, Message Broadcast)
  4. Theme and styles support without CSS
  5. One time, One way and Two way binding support
  6. Simple dependency Injection
  7. In built simple unit testing framework
  8. UMD module support
  9. Full featured MVVM Framework with powerful validation

Folder structure

  1. All views for web must be placed under "web" folder inside "src" folder.
  2. All views for Xamarin Forms must be placed under "xf" folder inside "src" folder.

Example folder structure

src
+--images
|  +--AddButton.svg
|
+--view-Models
|  +--TaskListViewModel.ts
|  +--TaskEditorViewModel.ts
|
+--web
   +--tasks
      +--TaskListView.tsx
      +--TaskEditorView.tsx

Example View Model

export class UserListViewModel extends AtomViewModel {

    public user: any;

    public list: IUser[];

    public search: string = null;

    /// Dependency Injection
    @Inject
    private listService: ListService;

    /// @validate decorator will process this accessor
    /// in a way that it will always return null till
    /// you call this.isValid. After this.isValid is 
    /// called, it will display an error if data is invalid
    @Validate
    public get errorName(): string {
        return this.user.name ? "" : "Name cannot be empty";
    }

    /// You can bind UI element to this field, @watch decorator
    /// will process this accessor in a way that UI element bound
    /// to this field will automatically update whenever any of
    /// fields referenced in this method is updated anywhere else
    @Watch
    public get name(): string {
        return `${this.user.firstName} ${this.user.lastName}`;
    }

    /// this will be called immediately after the view model 
    /// has been initialized
    /// this will refresh automatically when `this.search` is updated
    /// refresh will work for all (this.*.*.*) properties at any level
    @Load({ init: true, watch: true })
    public async loadItems(ct: CancelToken): Promise<void> {
        this.list = await this.listService.loadItems(this.search, ct);
    }

    /// this will validate all accessors before executing the action
    /// and display success message if action was successful
    @Action({ validate: true, success: "Added successfully" })
    public async addNew(): Promise<any> {
        ... 
    }

}

Web Controls

  1. AtomComboBox (wrapper for SELECT element)
  2. AtomControl (base class for all other controls)
  3. AtomItemsControl
  4. AtomListBox
  5. AtomPageView (control browser that hosts other control referenced by url)
  6. AtomWindow

Services

  1. WindowService - to host AtomWindow and retrieve result
  2. RestService - RetroFit kind of service for simple ajax
  3. BrowserService - An abstract navigation service for Web and Xamarin

Development guidelines

  1. Use TypeScript module pattern
  2. Do not use namespace
  3. Organize single module in single TypeScript file
  4. Import only required module and retain naming convention
  5. Do not define any default export
  6. No Atom.get and Atom.set
  7. Do not use underscore _ anywhere, not in field name not in get/set
  8. Do not use set_name method name, instead use get name() and set name(v: T) syntax for properties.

How to run unit tests?

  1. Import test class src\test.ts
  2. Run node .\dist\test.js

How to get code coverage?

  1. Install istanbul, npm install istanbul --save-dev
  2. Install remap-istanbul, npm install remap-istanbul
  3. Cover Run, .\node_modules\.bin\istanbul.cmd cover .\dist\test.js
  4. Report Run, .\node_modules\.bin\remap-istanbul -i .\coverage\coverage.json -t html -o html-report
  5. Open generated html-report on browser
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].