MrWindlike
8fbb6a7f9c
chore(editor): fix type error
2022-01-28 09:28:53 +08:00
MrWindlike
d83ff4169b
chore(editor): change code style
2022-01-28 09:14:03 +08:00
MrWindlike
3eabd7ae4a
Merge branch 'main' of https://github.com/webzard-io/sunmao-ui into fix/windlike-patch
2022-01-27 18:32:44 +08:00
MrWindlike
26ebd7b24c
fix(editor): forbid drop to component which has no slots
2022-01-27 18:22:21 +08:00
MrWindlike
4b99a4bc24
Merge branch 'main' of https://github.com/webzard-io/sunmao-ui into fix/warning-area
2022-01-27 17:44:56 +08:00
MrWindlike
e0f2083df5
fix(editor): fix display errors when set event's target to $utils
2022-01-27 17:20:31 +08:00
MrWindlike
95186a8b64
fix(editor): make the warning area update immediately
2022-01-27 17:20:22 +08:00
MrWindlike
dbd16d311b
fix(editor): fix display errors when set event's target to $utils
2022-01-27 17:18:54 +08:00
Bowen Tan
dd1d1ec8a1
change default value of Type.Any to undefined
2022-01-27 17:09:43 +08:00
Bowen Tan
b874ca203d
check modules when validating expression
2022-01-27 17:09:36 +08:00
Bowen Tan
cc21a427e0
fix some style bugs
2022-01-27 17:09:26 +08:00
xzdry
e815e83e12
fix: will not delete input component which in editing state
2022-01-27 16:46:09 +08:00
MrWindlike
446a15777c
fix(editor): make the warning area update immediately
2022-01-27 16:16:42 +08:00
MrWindlike
40b9b5f32f
Merge branch 'main' of https://github.com/webzard-io/sunmao-ui into fix/windlike-patch
2022-01-27 16:01:25 +08:00
tanbowensg
84f311982d
Merge pull request #232 from webzard-io/fix/recover-editor
...
fix(editor): recover app when the runtime errors are fixed
2022-01-27 15:57:03 +08:00
MrWindlike
9f11d4c298
Merge branch 'main' of https://github.com/webzard-io/sunmao-ui into fix/windlike-patch
2022-01-27 15:40:38 +08:00
MrWindlike
159dc7aeeb
fix(editor): recover app when the runtime errors are fixed
2022-01-27 15:33:49 +08:00
MrWindlike
60c28d7f1d
chore: change code style
2022-01-27 11:15:05 +08:00
MrWindlike
663ba650e0
feat(Editor): add $utils
to event targets
2022-01-27 10:05:54 +08:00
Bowen Tan
e60cfe6138
Publish
...
- @sunmao-ui/editor@0.3.11
2022-01-26 18:01:04 +08:00
Bowen Tan
cfe8c60af0
change editor package entry
2022-01-26 17:59:18 +08:00
MrWindlike
5ab4c6988b
types(IFieldModel): fix type error
2022-01-26 17:31:24 +08:00
MrWindlike
4cc0aca7bb
Merge branch 'main' of https://github.com/webzard-io/sunmao-ui into fix/windlike-patch
2022-01-26 17:30:34 +08:00
Bowen Tan
7c7dca7834
Publish
...
- @sunmao-ui/chakra-ui-lib@0.1.4
- @sunmao-ui/core@0.3.6
- @sunmao-ui/editor@0.3.10
- @sunmao-ui/runtime@0.3.10
2022-01-26 17:24:58 +08:00
MrWindlike
f96dc66881
fix(editor): make the form update correctly
2022-01-26 17:24:22 +08:00
yz-yu
7437dc7560
Merge pull request #223 from webzard-io/refactor/appModelManager
...
refactor operationManager with appModel
2022-01-26 16:57:07 +08:00
Bowen Tan
dcc3d7f04d
fetch trait defualt method is get
2022-01-26 15:15:53 +08:00
Bowen Tan
f382a83599
event trait form can choose methods from trait
2022-01-26 14:24:36 +08:00
Bowen Tan
14cd570911
properties validator detect window variables
2022-01-26 14:24:36 +08:00
Bowen Tan
16a26aa651
fix style trait width bug
2022-01-26 14:24:36 +08:00
tanbowensg
e60f2e905c
Merge pull request #226 from webzard-io/auto-complete
...
Auto complete, part 1
2022-01-26 14:22:12 +08:00
yz-yu
b17f662f7a
Merge pull request #227 from webzard-io/zbs-demo
...
fix some editor bugs
2022-01-26 13:00:17 +08:00
Bowen Tan
ff7506c26b
fix cannot add fetch trait bug
2022-01-26 10:00:33 +08:00
Yanzhen Yu
4f393563f2
fix lockfile and type errors
2022-01-26 09:55:58 +08:00
Yanzhen Yu
495afd4f61
impl expression editor with tern
2022-01-25 23:17:32 +08:00
Yanzhen Yu
910f0ec186
support code mode in schema fields
2022-01-25 18:53:54 +08:00
Bowen Tan
c72c34bfa0
fix addModuleId multiple times bug
2022-01-25 17:29:33 +08:00
Bowen Tan
d618d8bd6d
add utilMethods to sunmaoLib & implement chakra toast as utilMethod of lib
2022-01-24 11:41:25 +08:00
Bowen Tan
5ad0d6fea5
refactor operationManager with appModel
2022-01-21 16:14:36 +08:00
Bowen Tan
5a89419c5c
replace manager
2022-01-21 16:14:09 +08:00
Bowen Tan
e7fb968e06
fix eslint
2022-01-21 16:11:51 +08:00
Bowen Tan
439ff5155b
fix playground
2022-01-21 10:27:37 +08:00
Bowen Tan
61665cdca0
move eventBus, appStorage, EditorStore to services directory
2022-01-21 10:17:35 +08:00
Bowen Tan
15bd209be8
decouple localstorage with sunmaoEditor
2022-01-21 10:17:35 +08:00
Bowen Tan
859327f57e
add initSunmaoUIEditorProps
2022-01-21 10:17:35 +08:00
Bowen Tan
1c6cca1450
remove editor global instances
2022-01-21 10:17:35 +08:00
Bowen Tan
a5ca6e6898
add removeModuleId test
2022-01-20 17:52:49 +08:00
Bowen Tan
504cdc69e7
update examples
2022-01-20 17:52:49 +08:00
Bowen Tan
dff5ba60c9
move addModuleId to editor
2022-01-20 17:52:49 +08:00
MrWindlike
be17136666
fix(editor): fix can't create multiple events
...
Refs: #218
2022-01-20 15:49:14 +08:00
tanbowensg
951f8c8dd7
Merge pull request #216 from webzard-io/fix/windlike-patch
...
fix: set slot to different types depend on slot children's num
2022-01-20 10:35:25 +08:00
MrWindlike
9a898c0fa6
fix(ui-lib): fix tabs error
2022-01-19 18:03:36 +08:00
MrWindlike
9c22e7c85f
types: change ComponentImplProps type
2022-01-19 16:56:04 +08:00
MrWindlike
823fac1766
fix: set slot to different types depend on slot children's num
...
when only one child in slot, set slot to ReactElement instead of array
2022-01-19 16:00:10 +08:00
Bowen Tan
4c5bc2734a
validate component state in expression
2022-01-12 18:20:35 +08:00
Bowen Tan
8d295f2ef8
validate nested property expression
2022-01-12 17:41:50 +08:00
Bowen Tan
ffc4f5377d
update array properties
2022-01-12 17:41:50 +08:00
Bowen Tan
b5cbcd1666
validate expression refs
2022-01-12 17:41:50 +08:00
Bowen Tan
68242a595e
compute refs of expression in fieldModel
2022-01-12 17:41:50 +08:00
Bowen Tan
2964dea1e2
fix component slot will not update after property change bug
2022-01-12 10:43:24 +08:00
Bowen Tan
9182bb61f4
Publish
...
- @sunmao-ui/chakra-ui-lib@0.1.3
- @sunmao-ui/core@0.3.5
- @sunmao-ui/editor@0.3.9
- @sunmao-ui/runtime@0.3.9
2022-01-11 16:38:26 +08:00
Bowen Tan
3c78ac2116
Publish
...
- @sunmao-ui/chakra-ui-lib@0.1.2
- @sunmao-ui/core@0.3.4
- @sunmao-ui/editor@0.3.8
- @sunmao-ui/runtime@0.3.8
2022-01-11 16:38:01 +08:00
tanbowensg
ac583a8f2e
Merge pull request #207 from webzard-io/bugfix
...
fix: updating a non-existing property will add a new property to the …
2022-01-11 15:49:32 +08:00
xzdry
f63c105786
fix: updating a non-existing property will add a new property to the component
2022-01-11 14:24:58 +08:00
tanbowensg
cb644de134
Merge pull request #206 from webzard-io/hoverSlot
...
multiple slot drag handling
2022-01-11 10:43:19 +08:00
yz-yu
862c9d71ea
Merge pull request #204 from webzard-io/refactor/type
...
rename types in core and runtime
2022-01-11 09:36:40 +08:00
Sczlog
ba9a769a32
store update
...
1. make store property as getter to avoid get out-of-date data.
2. add comment.
2022-01-10 18:34:42 +08:00
Sczlog
02678aa534
add slot wrapper for component with slot trait, optimize drag event
2022-01-10 18:25:58 +08:00
Sczlog
83c9a5717d
prevent element's dragover
2022-01-10 18:25:53 +08:00
Sczlog
52402be5aa
refactor drag over id
2022-01-10 18:25:31 +08:00
Bowen Tan
5eca033635
fix dialogInList example
2022-01-07 15:54:02 +08:00
Bowen Tan
c5be99ffcf
rename types in core and runtime
2022-01-07 14:05:57 +08:00
yz-yu
432314c61e
Merge pull request #203 from webzard-io/refactor/slot
...
refactor slot and ImplWrapper to cache render result
2022-01-07 08:49:26 +08:00
yz-yu
a3af4b8252
Merge pull request #202 from webzard-io/revert/es5
...
revert build to es5
2022-01-07 08:47:11 +08:00
Bowen Tan
ca0a780d96
modify components to new slot
2022-01-06 17:07:02 +08:00
Bowen Tan
1f6090868e
revert build to es5
2022-01-06 16:31:57 +08:00
Bowen Tan
dd974ea085
cache render result
2022-01-06 14:41:26 +08:00
Bowen Tan
edf4b2b9d9
remove slotsMap & resolveAppComponents
2022-01-05 15:35:33 +08:00
Yanzhen Yu
8ab13e3c66
Publish
...
- @sunmao-ui/chakra-ui-lib@0.1.1
- @sunmao-ui/core@0.3.3
- @sunmao-ui/editor@0.3.7
- @sunmao-ui/runtime@0.3.7
2022-01-05 15:09:01 +08:00
Bowen Tan
7192c5cd7c
refactor Slot
2022-01-05 15:01:32 +08:00
Bowen Tan
f86a9c4781
add resolveTreeMap
2022-01-05 13:55:27 +08:00
Bowen Tan
fdff89c1d5
remove parseType in runtime
2022-01-05 11:22:36 +08:00
Bowen Tan
fae2591088
add RuntimeAppSchemaManager
2022-01-05 11:05:28 +08:00
Bowen Tan
3f9803f908
move ImplWrapper directory
2022-01-04 17:15:29 +08:00
tanbowensg
4a1b2bc5f4
Merge pull request #196 from webzard-io/bundle
...
manage editor styles in a single CSS
2022-01-04 17:04:27 +08:00
Yanzhen Yu
262c212015
extract styles in runtime package
2022-01-04 15:37:28 +08:00
xzdry
3f60e5ba12
add key to SchemaField component to keep input state independent
2022-01-04 14:25:10 +08:00
Yanzhen Yu
be72b98f24
manage editor styles in a single CSS
...
Some frameworks like Next.js does not like global CSS from node
modules, so we are going to bundle CSS into a single file with
postcss.
ref: https://github.com/vercel/next.js/discussions/27953
2022-01-04 13:44:30 +08:00
Bowen Tan
02dc6e979e
remove version 2
2021-12-31 14:53:55 +08:00
Bowen Tan
b698e1e5d2
update chakra-ui-lib slot
2021-12-31 10:54:19 +08:00
Bowen Tan
cca2930a2c
fix chakra-ui-lib hooks lint
2021-12-30 17:56:24 +08:00
Bowen Tan
93fa2244d4
refactor chakra-ui-lib
2021-12-30 17:44:22 +08:00
Bowen Tan
70dad17dee
refactor core components
2021-12-30 17:44:22 +08:00
Yanzhen Yu
c3834ae3ef
type safe component: types and migrate one component
2021-12-30 17:44:21 +08:00
Bowen Tan
959d3049b5
add react hooks lint
2021-12-30 13:54:19 +08:00
tanbowensg
9752aa03c2
Merge pull request #178 from webzard-io/module-parse-bug
...
fix module parsing bug
2021-12-29 10:45:45 +08:00
Bowen Tan
5b805b715a
fix code
2021-12-28 15:19:16 +08:00
Bowen Tan
70d4a1587f
fix code style
2021-12-28 11:18:18 +08:00
Bowen Tan
27b5a3eb60
add validator tests
2021-12-27 17:32:55 +08:00
Bowen Tan
6bcee65a54
move appModel to root dir
2021-12-27 15:26:46 +08:00
Bowen Tan
26300bff0c
refactor validator
2021-12-27 15:13:44 +08:00
Bowen Tan
3cbf92b720
add unit tests
2021-12-24 17:14:33 +08:00
Bowen Tan
97caa02d9e
reactor model name
2021-12-24 17:06:16 +08:00
Bowen Tan
22ef4d12b9
refactor oprationmanager
2021-12-24 17:06:16 +08:00
Bowen Tan
c7cec729c0
add model operations
2021-12-24 17:06:16 +08:00
Bowen Tan
5c59f7d88c
add some operations
2021-12-24 17:06:16 +08:00
Bowen Tan
3a505db5e2
add AppModel
2021-12-24 17:06:16 +08:00
yz-yu
3d51429240
Merge pull request #171 from webzard-io/validate
...
Schema Validator
2021-12-24 15:21:35 +08:00
Bowen Tan
38803c634a
fix test
2021-12-23 10:25:44 +08:00
Yanzhen Yu
d4957b0096
upgrade tsup and compile to es5
2021-12-22 14:38:34 +08:00
Yanzhen Yu
3e7dab1bf9
add test case
2021-12-22 13:55:24 +08:00
Bowen Tan
b65cf04880
format code
2021-12-22 11:00:39 +08:00
Bowen Tan
b3497a8faf
add "Save anyway" button
2021-12-22 11:00:39 +08:00
Bowen Tan
50614ab04a
add module validator
2021-12-22 11:00:39 +08:00
Bowen Tan
c56de04500
split validator rules file
2021-12-22 11:00:38 +08:00
Bowen Tan
04dcdd9f8c
fix cannot change event type bug
2021-12-22 11:00:38 +08:00
Bowen Tan
45e5d478fb
add eventHandler validator rule
2021-12-22 11:00:38 +08:00
Bowen Tan
29c5054b6e
refactor validator
2021-12-22 11:00:38 +08:00
Bowen Tan
15f0d704aa
add error list ui
2021-12-22 11:00:38 +08:00
Bowen Tan
71e0d79095
make some components property option
2021-12-22 11:00:38 +08:00
Bowen Tan
2364e7aee6
make trait spec optional
2021-12-22 11:00:38 +08:00
Bowen Tan
2362940bb5
make spec of create functions optional
2021-12-22 11:00:38 +08:00
Bowen Tan
451590b581
change some components' property to optional
2021-12-22 11:00:38 +08:00
Bowen Tan
30d1932d2e
add schema validator
2021-12-22 11:00:36 +08:00
Yanzhen Yu
52d2534948
remove chakra-ui dependencies from runtime package
2021-12-21 21:04:39 +08:00
Yanzhen Yu
4faa578f0d
move chakra-ui lib to a single package
2021-12-21 20:42:44 +08:00
Yanzhen Yu
9e6ddccbef
add lib interface
2021-12-21 19:44:23 +08:00
Yanzhen Yu
8ea979f234
Publish
...
- @sunmao-ui/core@0.3.2
- @sunmao-ui/editor@0.3.6
- @sunmao-ui/runtime@0.3.6
2021-12-21 19:37:16 +08:00
yz-yu
968be3744f
Merge pull request #174 from webzard-io/refactor/style-trait
...
refactor style trait
2021-12-20 23:07:57 +08:00
yz-yu
498d3dab29
Merge pull request #172 from webzard-io/preview-modal
...
decouple the sunmao runtime instance in preview modal and editor view
2021-12-20 14:57:16 +08:00
Bowen Tan
af7e2c74a4
refactor style trait form
2021-12-20 14:18:58 +08:00
Bowen Tan
9ae0623a7a
change style trait params to array
2021-12-20 11:36:33 +08:00
Bowen Tan
668fd07c99
remove runtime emotion/react
2021-12-20 11:35:43 +08:00
Bowen Tan
4ac96e3d66
remove editor @emotion/react
2021-12-20 11:33:54 +08:00
Bowen Tan
7b8d7da796
decouple preview modal
2021-12-20 11:33:32 +08:00
Bowen Tan
7f9e2d0e7c
Merge branch 'main' into feat/drag-to-reorder
...
* main:
update module examples
rename module components -> impl
# Conflicts:
# packages/editor/src/AppStorage.ts
2021-12-20 10:05:07 +08:00
Bowen Tan
1343a8d246
Merge branch 'main' into feat/drag-to-reorder
...
* main:
improve the Slot component 1. bypass props to children 2. render null when slot not set
# Conflicts:
# packages/runtime/src/components/_internal/Slot.tsx
# packages/runtime/src/components/chakra-ui/Tabs.tsx
2021-12-16 16:21:33 +08:00
Bowen Tan
99e80768a6
rename module components -> impl
2021-12-16 15:57:43 +08:00
Bowen Tan
15d48fd8c8
remove console
2021-12-16 11:25:56 +08:00
Yanzhen Yu
9c5bc4a0ac
improve the Slot component
...
1. bypass props to children
2. render null when slot not set
2021-12-15 16:51:28 +08:00
Bowen Tan
a87f746c24
Merge branch 'main' into feat/drag-to-reorder
...
* main:
introduce widgets and impl module widget
# Conflicts:
# packages/editor/src/components/ComponentForm/ComponentForm.tsx
2021-12-15 16:25:44 +08:00
Yanzhen Yu
abbddda5e4
introduce widgets and impl module widget
2021-12-14 15:54:00 +08:00
Bowen Tan
dae1197ce2
Merge branch 'main' into feat/drag-to-reorder
...
* main:
improve json schema fields UX
impl style trait form
# Conflicts:
# packages/editor/src/components/ComponentForm/ComponentForm.tsx
2021-12-14 10:49:42 +08:00
tanbowensg
d6360422fc
Merge pull request #164 from webzard-io/editor-ex
...
improve component form
2021-12-14 10:41:14 +08:00
Bowen Tan
65dec7e5e3
Merge branch 'main' into feat/drag-to-reorder
...
* main:
remove CutOperation
complete copy cut paste
add cut paste
can paste
customize editor theme to a more compact style
change path to relative
Revert "add vite-tsconfig-path plugin"
Revert "replace runtime relative path to absolute"
Revert "replace editor relative path to absolute"
improve editor style
export Editor as component
# Conflicts:
# packages/editor/src/components/ComponentForm/ComponentForm.tsx
# packages/editor/src/components/Editor.tsx
# packages/editor/src/components/KeyboardEventWrapper.tsx
# packages/editor/src/components/StructureTree/StructureTree.tsx
# packages/editor/src/operations/index.ts
# packages/editor/src/operations/leaf/component/pasteComponentLeafOperation.ts
2021-12-14 10:36:36 +08:00
Bowen Tan
d4a348619a
remove CutOperation
2021-12-13 18:26:15 +08:00
Bowen Tan
cb5c6173c6
complete copy cut paste
2021-12-13 18:26:14 +08:00
Bowen Tan
e24d97b0aa
add cut paste
2021-12-13 18:25:21 +08:00
Bowen Tan
42e955b40d
can paste
2021-12-13 18:25:21 +08:00
Yanzhen Yu
e6c8cf1026
improve json schema fields UX
2021-12-12 20:25:48 +08:00