686 Commits

Author SHA1 Message Date
xzdry
d89def83c8 feat(LocalStorage): add versions to global state 2022-12-26 09:48:28 +08:00
Bowen Tan
55fecfa99a test(runtime): add slot trait test 2022-12-23 18:10:44 +08:00
Bowen Tan
bac129037b feat(runtime): support Component DataSource 2022-12-23 18:10:42 +08:00
xzdry
985f46706b feat(localStorageTrait): add versions to localstorage trait 2022-12-21 15:47:36 +08:00
Bowen Tan
ace4cb1da1 chore(*): publish
- @sunmao-ui/arco-lib@0.5.0-alpha.3
 - @sunmao-ui/chakra-ui-lib@0.7.0-alpha.3
 - @sunmao-ui/core@0.9.0-alpha.1
 - @sunmao-ui/editor-sdk@0.5.0-alpha.3
 - @sunmao-ui/editor@0.9.0-alpha.4
 - @sunmao-ui/runtime@0.9.0-alpha.2
 - @sunmao-ui/shared@0.3.2-alpha.0
2022-12-14 14:05:47 +08:00
Bowen Tan
112d7014ae Merge branch 'feat/relationship' into publish
* feat/relationship:
  feat(editor): add Component Relationship View Modal
  test(runtime): add slot trait test
  feat(runtime): support Component DataSource
  fix(editor): hide deprecated component is component list
  feat(core): add deprecated metadata field
  style: change the style of the expression hint
  feat(EventForm): show event name of event handler
  feat(ExpressionEditor): allow pressing tab to switch field input
  feat(Descriptions): add title, label, value slots
  feat(PopoverWidget): add appendToParent option
  fix(PopoverWidget): add padding to popover bottom
  feat(PopoverWidget): add appentToBody option

# Conflicts:
#	packages/core/src/metadata.ts
#	packages/editor/src/components/ComponentsList/ComponentList.tsx
#	packages/runtime/src/index.ts
2022-12-14 14:01:21 +08:00
Bowen Tan
0fbbc1ebfb test(runtime): add slot trait test 2022-12-14 13:47:48 +08:00
Bowen Tan
15c49fb07c feat(runtime): support Component DataSource 2022-12-14 13:47:46 +08:00
Bowen Tan
f85421e4e7 feat(core): add deprecated metadata field 2022-12-13 18:32:16 +08:00
Bowen Tan
4f09ba742d chore(*): publish
- @sunmao-ui/arco-lib@0.5.0-alpha.2
 - @sunmao-ui/chakra-ui-lib@0.7.0-alpha.2
 - @sunmao-ui/editor-sdk@0.5.0-alpha.2
 - @sunmao-ui/editor@0.9.0-alpha.2
 - @sunmao-ui/runtime@0.9.0-alpha.1
2022-12-09 13:57:34 +08:00
Bowen Tan
91d370893b Merge branch 'refactor/datasource2' into publish
* refactor/datasource2:
  feat(slot): add slot trait v2
  feat(fetch): remove fetch trait config property
  fix(DataSource): hide value type tag for normal DataSources
  fix(ComponentList): hide isDataSource components in ComponentList
  feat(DataSource): hide empty properties form
2022-12-09 13:52:25 +08:00
Bowen Tan
e6992514f0 feat(slot): add slot trait v2 2022-12-09 13:34:40 +08:00
Bowen Tan
b72cd76c54 feat(fetch): remove fetch trait config property 2022-12-09 13:30:54 +08:00
Bowen Tan
23e4252d2d chore(*): publish
- @sunmao-ui/arco-lib@0.5.0-alpha.0
 - @sunmao-ui/chakra-ui-lib@0.7.0-alpha.0
 - @sunmao-ui/core@0.9.0-alpha.0
 - @sunmao-ui/editor-sdk@0.5.0-alpha.0
 - @sunmao-ui/editor@0.9.0-alpha.0
 - @sunmao-ui/runtime@0.9.0-alpha.0
2022-12-07 11:46:03 +08:00
Bowen Tan
fc8e1d309a Merge branch 'refactor/datasource2' into publish
* refactor/datasource2:
  feat(DataSource): support create component datasource
  feat(DataSource): add fetch widget
  feat(DataSource): add isDataSource
  feat(DataSource): use ComponentNode to replace DataSourceItem
  feat(PopoverWidget): add appendToParent option
  fix(PopoverWidget): add padding to popover bottom
  feat(PopoverWidget): add appentToBody option
  refactor(editor): flatten ComponentTree

# Conflicts:
#	packages/editor/src/components/StructureTree/ComponentItemView.tsx
#	packages/editor/src/components/StructureTree/ComponentTree.tsx
#	packages/editor/src/components/StructureTree/StructureTree.tsx
#	packages/editor/src/components/StructureTree/type.ts
#	packages/editor/src/components/StructureTree/useStructureTreeState.ts
2022-12-07 11:43:15 +08:00
Bowen Tan
84b11f115a feat(DataSource): support create component datasource 2022-12-07 11:30:50 +08:00
Bowen Tan
9418334d9e feat(DataSource): add fetch widget 2022-12-07 11:28:08 +08:00
Bowen Tan
e751b0e31a feat(DataSource): add isDataSource 2022-12-07 11:28:08 +08:00
Bowen Tan
d5ea4f1b4f chore(*): publish
- @sunmao-ui/arco-lib@0.4.1
 - @sunmao-ui/chakra-ui-lib@0.6.1
 - @sunmao-ui/core@0.8.1
 - @sunmao-ui/editor-sdk@0.4.1
 - @sunmao-ui/editor@0.8.1
 - @sunmao-ui/runtime@0.8.1
 - @sunmao-ui/shared@0.3.1
 - @sunmao-ui/vite-plugin-fs@0.1.1
 - @sunmao-ui/vite-plugins@1.1.1
2022-11-16 10:18:24 +08:00
yz-yu
f6c271854e
Merge pull request #637 from smartxworks/main
Main
2022-11-11 18:18:51 +08:00
Bowen Tan
b9bc122bce feat(editor): auto detect no ref component dom element 2022-11-10 09:52:20 +08:00
Bowen Tan
0b1e2f0931 fix(runtime): tigger didDomUpdate when Implwrapper update 2022-11-09 17:50:12 +08:00
Bowen Tan
4d34f6b46c chore(*): publish
- @sunmao-ui/arco-lib@0.4.0
 - @sunmao-ui/chakra-ui-lib@0.6.0
 - @sunmao-ui/core@0.8.0
 - @sunmao-ui/editor-sdk@0.4.0
 - @sunmao-ui/editor@0.8.0
 - @sunmao-ui/runtime@0.8.0
 - @sunmao-ui/shared@0.3.0
 - @sunmao-ui/vite-plugin-fs@0.1.0
 - @sunmao-ui/vite-plugins@1.1.0
2022-11-04 18:19:47 +08:00
tanbowensg
a4d6004d71
Merge pull request #627 from smartxworks/feat/remove-listItem
remove evalListItem of parseExpression
2022-10-18 16:35:49 +08:00
tanbowensg
09c5c184f3
Merge pull request #610 from smartxworks/fix/hidden-trait
fix(hidden): hidden trait 'visually' breaks style trait
2022-10-18 15:28:15 +08:00
xzdry
099b94e063 fix(StateManager): remove console 2022-10-17 22:05:33 +08:00
Bowen Tan
2c1c2dba78 fix(runtime): remove $listItem 2022-10-14 16:36:44 +08:00
Bowen Tan
8e882c9c11 feat(runtime): add component life cycle events to Event Trait 2022-09-29 17:12:25 +08:00
Bowen Tan
57812fd3cc refactor(runtime): export generateCallback and rename to runEventHandler 2022-09-22 10:14:26 +08:00
Bowen Tan
307b10b0d0 fix(hidden): hidden trait 'visually' breaks style trait 2022-09-21 10:20:44 +08:00
Bowen Tan
a881fce9e3 build(all): build bundle with React.createElement 2022-09-20 13:46:17 +08:00
Yanzhen Yu
b5c4fb487a test(runtime): add unit tests for the new state LCM 2022-09-12 16:56:55 +08:00
Yanzhen Yu
0644dbf01e fix(runtime): only update stateManager init set when store update 2022-09-12 16:49:30 +08:00
Yanzhen Yu
c84d94a89a fix(runtime): fix #590, use an init set to check first time render
This patch use a more solid way to check init state setup, instead of render count.
2022-09-12 16:42:08 +08:00
yz-yu
0b65f85663
Merge pull request #592 from smartxworks/fix/windlike-dev
fix(slot): fix fallback disappearing when remounted
2022-09-05 09:59:40 +08:00
MrWindlike
0a79437e75 fix(slot): fix fallback disappearing when remounted 2022-09-05 09:48:03 +08:00
Bowen Tan
8e2a7d580f Merge branch 'develop' into build/dyanmic-import
* develop:
  fix(ValidationTrait): don't clear existing errors
  fix(StateManager): fix the can't deep eval the nest array issues
  feat(runtime): add style for ErrorBoundary
  feat(runtime): add ErrorBoundary to ImplWrapper
  refactor(runtime): refactor utilMethodFactory type
  refactor(runtime): add slot receiver to app services
  refactor(runtime): temporary hack the list component with the new slot system
  refactor(runtime): remove slot props from event trait
  perf(runtime): implement slot receiver to avoid of re-render when passing fallback elements
  perf(runtime): refactor the slot's props and fallback implementation
  fix(SpaceWidget): fix padding display misalignment
  fix: fix selecting component would change the properties' values issue
  refactor: remove the shared package from core
  fix: fix the `exampleProperties` type errors

# Conflicts:
#	packages/chakra-ui-lib/src/index.ts
2022-08-31 14:09:21 +08:00
tanbowensg
83173e85bd
Merge pull request #579 from smartxworks/fix/windlike-dev
fix(ValidationTrait): don't clear existing errors
2022-08-31 14:05:55 +08:00
tanbowensg
064d8d7031
Merge pull request #576 from smartxworks/refactor/util-method
refactor(runtime): refactor utilMethodFactory type
2022-08-30 16:24:08 +08:00
MrWindlike
d9cc0aaf6b fix(ValidationTrait): don't clear existing errors 2022-08-30 11:43:54 +08:00
yz-yu
e05407f653
Merge pull request #577 from smartxworks/feat/runtime-error-boundary
feat(runtime): add ErrorBoundary to ImplWrapper
2022-08-26 13:01:22 +08:00
yz-yu
a17f92aaa3
Merge pull request #578 from smartxworks/fix/windlike-dev
fix(StateManager): fix the can't deep eval the nest array issues
2022-08-26 13:01:04 +08:00
MrWindlike
c72e29b467 fix(StateManager): fix the can't deep eval the nest array issues 2022-08-26 11:38:19 +08:00
Bowen Tan
7ea0acea20 feat(runtime): add style for ErrorBoundary 2022-08-25 11:02:49 +08:00
Bowen Tan
5d2a64f575 feat(runtime): add ErrorBoundary to ImplWrapper 2022-08-25 10:48:04 +08:00
Bowen Tan
81c6d03b54 refactor(runtime): refactor utilMethodFactory type 2022-08-24 14:42:15 +08:00
Yanzhen Yu
5b01477c62 refactor(runtime): add slot receiver to app services 2022-08-23 10:41:04 +08:00
Yanzhen Yu
1c505334c7 refactor(runtime): temporary hack the list component with the new slot system 2022-08-23 10:28:08 +08:00
Yanzhen Yu
b1012217ee refactor(runtime): remove slot props from event trait 2022-08-23 10:28:08 +08:00
Yanzhen Yu
ef2669992f perf(runtime): implement slot receiver to avoid of re-render when passing fallback elements
The slot receiver is a magic hole of sunmao's runtime.
In sunmao, we support pass props and fallback elements to a slot.
But if we pass them as React component's props,
it will cause re-render since most of them could not use a shallow equal checker.

Also, in sunmao's runtime, we are not using a traditional React render mechanism.
Instead, we keep most of the components not be rendered and only subscribe to related state updates.

To continue with our design,
we need a way to render slot's fallback elements without passing the elements as props.
This is where the slot receiver comes.
It contains a map and an event emitter, when a slot need render,
it will attach the fallback elements to the map and send a signal via the emitter.
When the Receiver component receive a signal, it will force render the fallback elements.

related: #388
2022-08-23 10:28:06 +08:00