@tmagic/editor 1.2.15 → 1.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/style.css +32 -0
  2. package/dist/tmagic-editor.js +949 -185
  3. package/dist/tmagic-editor.js.map +1 -1
  4. package/dist/tmagic-editor.umd.cjs +959 -194
  5. package/dist/tmagic-editor.umd.cjs.map +1 -1
  6. package/package.json +10 -9
  7. package/src/Editor.vue +2 -0
  8. package/src/components/CodeDraftEditor.vue +2 -2
  9. package/src/editorProps.ts +5 -0
  10. package/src/fields/CodeSelect.vue +1 -0
  11. package/src/fields/DataSourceFields.vue +178 -0
  12. package/src/fields/EventSelect.vue +1 -0
  13. package/src/fields/KeyValue.vue +93 -0
  14. package/src/index.ts +6 -0
  15. package/src/initService.ts +59 -3
  16. package/src/layouts/sidebar/LayerPanel.vue +2 -0
  17. package/src/layouts/sidebar/Sidebar.vue +14 -5
  18. package/src/layouts/sidebar/code-block/CodeBlockList.vue +7 -0
  19. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +84 -0
  20. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +130 -0
  21. package/src/services/codeBlock.ts +0 -2
  22. package/src/services/dataSource.ts +90 -0
  23. package/src/theme/data-source-fields.scss +13 -0
  24. package/src/theme/data-source.scss +17 -0
  25. package/src/theme/key-value.scss +13 -0
  26. package/src/theme/theme.scss +3 -0
  27. package/src/type.ts +3 -1
  28. package/src/utils/data-source/formConfigs/base.ts +32 -0
  29. package/src/utils/data-source/formConfigs/http.ts +50 -0
  30. package/src/utils/data-source/index.ts +31 -0
  31. package/src/utils/dep.ts +9 -1
  32. package/src/utils/props.ts +1 -0
  33. package/types/Editor.vue.d.ts +9 -0
  34. package/types/components/ContentMenu.vue.d.ts +2 -2
  35. package/types/components/ScrollViewer.vue.d.ts +1 -1
  36. package/types/editorProps.d.ts +4 -0
  37. package/types/fields/DataSourceFields.vue.d.ts +40 -0
  38. package/types/fields/KeyValue.vue.d.ts +50 -0
  39. package/types/index.d.ts +2 -0
  40. package/types/initService.d.ts +1 -1
  41. package/types/layouts/CodeEditor.vue.d.ts +1 -1
  42. package/types/layouts/sidebar/Sidebar.vue.d.ts +2 -2
  43. package/types/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts +22 -0
  44. package/types/layouts/sidebar/data-source/DataSourceListPanel.vue.d.ts +12 -0
  45. package/types/services/dataSource.d.ts +25 -0
  46. package/types/services/props.d.ts +2 -3
  47. package/types/type.d.ts +3 -1
  48. package/types/utils/data-source/formConfigs/base.d.ts +3 -0
  49. package/types/utils/data-source/formConfigs/http.d.ts +3 -0
  50. package/types/utils/data-source/index.d.ts +2 -0
  51. package/types/utils/dep.d.ts +2 -1
  52. package/types/utils/props.d.ts +2 -3
package/dist/style.css CHANGED
@@ -903,4 +903,36 @@
903
903
  }
904
904
  .m-editor-dep-list-panel .list-container .list-item .name.hook {
905
905
  color: #909399;
906
+ }
907
+ .data-source-list-panel .list-container .list-item .codeIcon {
908
+ width: 22px;
909
+ height: 22px;
910
+ margin-right: 5px;
911
+ }
912
+ .data-source-list-panel .list-container .list-item .compIcon {
913
+ width: 22px;
914
+ height: 22px;
915
+ margin-right: 5px;
916
+ }
917
+ .m-editor-data-source-fields {
918
+ width: 100%;
919
+ }
920
+ .m-editor-data-source-fields .tmagic-design-table {
921
+ width: 100%;
922
+ }
923
+ .m-editor-data-source-fields .m-editor-data-source-fields-footer {
924
+ display: flex;
925
+ justify-content: flex-end;
926
+ margin-top: 15px;
927
+ }
928
+ .m-fields-key-value-item {
929
+ display: flex;
930
+ margin-bottom: 10px;
931
+ align-items: center;
932
+ }
933
+ .m-fileds-key-value-delimiter {
934
+ margin: 0 10px;
935
+ }
936
+ .m-fileds-key-value-delete {
937
+ margin-left: 10px;
906
938
  }