Skip to content

Commit dcb230a

Browse files
committed
simplify structure; migrate to vite;
1 parent 1722b17 commit dcb230a

28 files changed

+2542
-18233
lines changed

.github/workflows/blank.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: UI-Schema BTS DEMO
2+
3+
env:
4+
DOCKER_BUILDKIT: 1
5+
6+
on:
7+
push:
8+
branches: [master, develop]
9+
pull_request:
10+
branches: [master, develop]
11+
workflow_dispatch:
12+
13+
jobs:
14+
build_node:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [24.x]
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set Branch
22+
id: vars
23+
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Cache CI node_modules
31+
uses: actions/cache@v4
32+
env:
33+
cache-name: cache-node-modules
34+
with:
35+
# npm cache files are stored in `~/.npm` on Linux/macOS
36+
path: ~/.npm
37+
key: ${{ runner.os }}-build-${{ env.cache-name }}
38+
39+
- name: Setup packages
40+
run: |
41+
npm ci
42+
43+
- name: Run tests
44+
run: |
45+
npx playwright install chromium --with-deps
46+
npm test
47+
48+
- name: Build
49+
run: |
50+
npm run build

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/coverage
1212

1313
# production
14-
/build
14+
/dist
1515

1616
# misc
1717
.DS_Store

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 UI Schema
3+
Copyright (c) 2025 Contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 32 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,52 @@
1-
# UI-Schema Create-React Example w/ Bootstrap
1+
# UI-Schema Demo w/ Bootstrap
22

3-
[![Travis (.org) branch](https://img.shields.io/travis/ui-schema/demo-cra/master?style=flat-square)](https://travis-ci.org/ui-schema/demo-bts)
3+
[![Github actions Build](https://github.com/ui-schema/demo-bts/actions/workflows/blank.yml/badge.svg)](https://github.com/ui-schema/demo-bts/actions)
44

5-
Example project for [@ui-schema/ui-schema](https://github.com/ui-schema/ui-schema) with bootstrap.
5+
Simple demo project for [@ui-schema/react](https://github.com/ui-schema/ui-schema) with [Bootstrap 5](https://getbootstrap.com).
66

7-
Look in [src/Schema/DemoEditor.js](./src/Schema/DemoEditor.js) for the example code.
7+
Files:
88

9-
[![Schema Examples + Live Editor](https://img.shields.io/badge/Schema%20Examples%20+%20Live%20Editor-green?labelColor=fff&color=1e970c&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAE3ElEQVR4nO2bX0xbVRzHz9TExKc9mBjjn+gLgcEA2wL33ra3pV0pf/uX3t6yMAQKEkahlQkBNavbMG6BYMzG4nxYYZBoycIMfxJ9cL4oI5CYGR7FLAtkeyA+oEHDgJ8PBnLPhULLbXt0nm/yfeltcn7fzzn3nHvOzUWIiooqHQqHw88lYkJlJk++en/kJMNvZ6gYUOK3dMWbvvqmj0jnSUi9fX0vnSjUKgoudS5r2CKdKSH1Dg6+nEwAeZzpvwUAIYTO+N/5Mpc1KL4F8rXG7ZrGpk9I5zmSotHos9lFOizQj7OzMD8/H9P52mLs/4Guy6+SzqFIcgCz9+7BwsJCTMsBhEKXXiGdQZEoAAqAAqAAKAAKgAKgACgACoACoAAoAAqAAqAAKID/HQDZ6bCJNYCZ5WM6U80+PQCi3d2vZ8kCJeqPAwE96RxH1qWa0z8rCZ+hYqDL7fmVdI4jaSIcPs4X6RWFz1AxoC7QwhdtbW+SzpOw+n21P0iDnFSzsOhwwgOX+0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M+/1GK54fY+tLA/ZahZy1AwRZ6tZMDB6uOisXh3v7CxLS3gqKqqnSn8D0EwMpE6f7XEAAAAASUVORK5CYII=)](https://ui-schema.bemit.codes/examples)
9+
- [src/components/DemoEditor.jsx](./src/components/DemoEditor.jsx) setup `binding` and demo UI-Schema form
10+
- [src/t.js](./src/t.js) dictionary setup
1011

11-
[![Fullscreen Demo](https://img.shields.io/badge/Fullscreen%20Demo-green?labelColor=fff&color=1e970c&style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACRUlEQVR4nO3aTYiNUQDG8Z/xWRSFBRZYYSGSZCdFiZ0sFSuTjbJUdqMslGIhlmI3shGRJnZYkQVWZjNZmPIRNfIxr8Xt1JivO/ed95zzXvf917N/nn/3drvnHBoaGhoaGjphIU7iJq7jYNY2iVmCIRST8hDbMvZKxllTx4f8whWsytYuAY/NLCBkFKe1vir/Hc+1FxDyGvvz1IxHJwJC7mJzjrIxKCOgwA9cxIr0laulrICQDziBBamLV8V8BYS8wN7E3SuhKgEFxnEL65MumCdVCgj5jvNYlnBHaWIICBnGsXRTyhFTQMgT7Eg1qFNSCCjwBzewJs2suZNKQMhnrf8fi1OMmwupBYS8xaEE+9qSS0DIfWyJvnIWcgso8BOXsTLy1mmpg4CQjziFvqiLJ1EnASEvsS/m6InUUUDIIDbGm96izgIKjGEAy3tVQMgIDvSygPBp2NrLAgpc7XUB93pdwKVeFvBVhJ/FbhHwBrurHt8NAj7hDBbFGF9nAb9xDatjDQ/UUcAQtsccPZE6CXiPo3HnTqUOAr7hHJZG3jotOQWMa71KWRd95SzkEvAMexLsa0tqASM4rkaXqakEjOGCiP/ry5JCwCA2JdrTMTEFvJLwbK8sMQSMol/i092yVCkgnO931bO6qgQ8kPmGpyzzFfAOh5O3rpCyAr6o2S1vWToVEO751+YoG4NOBDzFziwtI/JI++HDuuCtT1n6zTy8q157laUPd/w7fBy3sSFjr+Qc0TpzH8CuzF0aGhoaGhoayvEXCYka61umCF0AAAAASUVORK5CYII=)](https://demo-bts--carolinholat.repl.co)
12+
Run on [CodeSandbox](https://codesandbox.io/s/github/ui-schema/demo-bts/tree/master/?autoresize=1&fontsize=12&hidenavigation=1&module=%2Fsrc%2Fcomponents%2FDemoEditor.jsx) or [StackBlitz](https://stackblitz.com/github/ui-schema/demo-bts?file=src%2Fcomponents%2FDemoEditor.jsx).
1213

13-
[![Run on CodeSandbox](https://img.shields.io/badge/run%20on%20CodeSandbox-blue?labelColor=fff&logoColor=505050&style=for-the-badge&logo=codesandbox)](https://codesandbox.io/s/github/ui-schema/demo-bts/tree/master/?autoresize=1&fontsize=12&hidenavigation=1&module=%2Fsrc%2FSchema%2FDemoEditor.js)
14+
Explore more:
1415

15-
[![Run on Repl.it](https://img.shields.io/badge/repl.it-grey?labelColor=fff&style=for-the-badge&logo=repl.it)](https://repl.it/@carolinholat/demo-bts) [![Clone on Repl.it](https://img.shields.io/badge/repl.it%20clone-grey?labelColor=fff&style=for-the-badge)](https://repl.it/github/ui-schema/demo-bts)
16+
- [Quick Start](https://ui-schema.bemit.codes/quick-start?ds=mui)
17+
- [Core Project](https://github.com/ui-schema/ui-schema)
18+
- [Advanced Examples in TypeScript, with MUI](https://github.com/ui-schema/demo-ts)
1619

17-
---
18-
---
19-
---
20+
## Setup
2021

21-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
22+
Install dependencies:
2223

23-
## Available Scripts
24+
```shell
25+
npm i
26+
```
2427

25-
In the project directory, you can run:
28+
Start dev server:
2629

27-
### `npm start`
30+
```shell
31+
npm start
32+
```
2833

29-
Runs the app in the development mode.<br />
30-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
34+
Create bundle:
3135

32-
The page will reload if you make edits.<br />
33-
You will also see any lint errors in the console.
36+
```shell
37+
npm run build
38+
```
3439

35-
### `npm test`
40+
For tests first install a playwright browser:
3641

37-
Launches the test runner in the interactive watch mode.<br />
38-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
42+
```shell
43+
npx playwright install chromium --with-deps
44+
```
3945

40-
### `npm run build`
46+
Then run tests:
4147

42-
Builds the app for production to the `build` folder.<br />
43-
It correctly bundles React in production mode and optimizes the build for the best performance.
48+
```shell
49+
npm test
50+
```
4451

45-
The build is minified and the filenames include the hashes.<br />
46-
Your app is ready to be deployed!
4752

48-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
49-
50-
### `npm run eject`
51-
52-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
53-
54-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
55-
56-
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
57-
58-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
59-
60-
## Learn More
61-
62-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
63-
64-
To learn React, check out the [React documentation](https://reactjs.org/).
65-
66-
### Code Splitting
67-
68-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
69-
70-
### Analyzing the Bundle Size
71-
72-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
73-
74-
### Making a Progressive Web App
75-
76-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
77-
78-
### Advanced Configuration
79-
80-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
81-
82-
### Deployment
83-
84-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
85-
86-
### `npm run build` fails to minify
87-
88-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
89-
90-
### License Icons
91-
92-
The icons in the badges of the readme's are either from [simpleicons](https://simpleicons.org) or are licensed otherwise:
93-
94-
- [Play Icon © Chanut is Industries, CC BY 3.0](https://www.iconfinder.com/icons/928430/go_media_music_play_playing_start_icon)
95-
- [Experiment Icon © Ardiansyah Ardi, CC BY 3.0](https://www.iconfinder.com/icons/4951169/chemical_experiment_glass_lab_medical_icon)

index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8"/>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6+
<title>UI-Schema Demo</title>
7+
</head>
8+
<body>
9+
<div id="root"><p style="text-align: center; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;">Loading App...</p></div>
10+
<script type="module" src="/src/index.jsx"></script>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)