@opensumi/ide-debug 2.24.6-next-1686045771.0 → 2.24.6

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 (238) hide show
  1. package/lib/browser/breakpoint/breakpoint-manager.d.ts +3 -4
  2. package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +1 -1
  3. package/lib/browser/breakpoint/breakpoint-manager.js +0 -7
  4. package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -1
  5. package/lib/browser/components/floating-click-widget/index.d.ts.map +1 -1
  6. package/lib/browser/components/floating-click-widget/index.js +2 -3
  7. package/lib/browser/components/floating-click-widget/index.js.map +1 -1
  8. package/lib/browser/components/floating-click-widget/index.module.less +0 -4
  9. package/lib/browser/contextkeys/debug-contextkey.service.d.ts +0 -1
  10. package/lib/browser/contextkeys/debug-contextkey.service.d.ts.map +1 -1
  11. package/lib/browser/contextkeys/debug-contextkey.service.js +1 -2
  12. package/lib/browser/contextkeys/debug-contextkey.service.js.map +1 -1
  13. package/lib/browser/debug-configuration-manager.d.ts +0 -6
  14. package/lib/browser/debug-configuration-manager.d.ts.map +1 -1
  15. package/lib/browser/debug-configuration-manager.js +17 -64
  16. package/lib/browser/debug-configuration-manager.js.map +1 -1
  17. package/lib/browser/debug-contribution.d.ts.map +1 -1
  18. package/lib/browser/debug-contribution.js +7 -53
  19. package/lib/browser/debug-contribution.js.map +1 -1
  20. package/lib/browser/{debug-schema-manager.d.ts → debug-schema-updater.d.ts} +2 -2
  21. package/lib/browser/debug-schema-updater.d.ts.map +1 -0
  22. package/lib/browser/{debug-schema-manager.js → debug-schema-updater.js} +10 -10
  23. package/lib/browser/debug-schema-updater.js.map +1 -0
  24. package/lib/browser/debug-style.less +5 -34
  25. package/lib/browser/debugUtils.d.ts +0 -1
  26. package/lib/browser/debugUtils.d.ts.map +1 -1
  27. package/lib/browser/debugUtils.js +1 -22
  28. package/lib/browser/debugUtils.js.map +1 -1
  29. package/lib/browser/editor/debug-hover-model.d.ts +3 -0
  30. package/lib/browser/editor/debug-hover-model.d.ts.map +1 -1
  31. package/lib/browser/editor/debug-hover-model.js +5 -0
  32. package/lib/browser/editor/debug-hover-model.js.map +1 -1
  33. package/lib/browser/editor/debug-hover-tree.model.service.d.ts.map +1 -1
  34. package/lib/browser/editor/debug-hover-tree.model.service.js +9 -0
  35. package/lib/browser/editor/debug-hover-tree.model.service.js.map +1 -1
  36. package/lib/browser/editor/debug-model.d.ts +0 -2
  37. package/lib/browser/editor/debug-model.d.ts.map +1 -1
  38. package/lib/browser/editor/debug-model.js +2 -31
  39. package/lib/browser/editor/debug-model.js.map +1 -1
  40. package/lib/browser/editor/debug-styles.d.ts +0 -1
  41. package/lib/browser/editor/debug-styles.d.ts.map +1 -1
  42. package/lib/browser/editor/debug-styles.js +1 -7
  43. package/lib/browser/editor/debug-styles.js.map +1 -1
  44. package/lib/browser/index.d.ts.map +1 -1
  45. package/lib/browser/index.js +0 -5
  46. package/lib/browser/index.js.map +1 -1
  47. package/lib/browser/preferences/launch-preferences-contribution.d.ts +2 -14
  48. package/lib/browser/preferences/launch-preferences-contribution.d.ts.map +1 -1
  49. package/lib/browser/preferences/launch-preferences-contribution.js +2 -61
  50. package/lib/browser/preferences/launch-preferences-contribution.js.map +1 -1
  51. package/lib/browser/view/breakpoints/debug-breakpoints.module.less +8 -64
  52. package/lib/browser/view/breakpoints/debug-breakpoints.service.d.ts +1 -10
  53. package/lib/browser/view/breakpoints/debug-breakpoints.service.d.ts.map +1 -1
  54. package/lib/browser/view/breakpoints/debug-breakpoints.service.js +0 -5
  55. package/lib/browser/view/breakpoints/debug-breakpoints.service.js.map +1 -1
  56. package/lib/browser/view/breakpoints/debug-breakpoints.view.d.ts +0 -7
  57. package/lib/browser/view/breakpoints/debug-breakpoints.view.d.ts.map +1 -1
  58. package/lib/browser/view/breakpoints/debug-breakpoints.view.js +26 -80
  59. package/lib/browser/view/breakpoints/debug-breakpoints.view.js.map +1 -1
  60. package/lib/browser/view/configuration/debug-configuration.service.d.ts +0 -1
  61. package/lib/browser/view/configuration/debug-configuration.service.d.ts.map +1 -1
  62. package/lib/browser/view/configuration/debug-configuration.service.js +0 -3
  63. package/lib/browser/view/configuration/debug-configuration.service.js.map +1 -1
  64. package/lib/browser/view/console/debug-console-model.d.ts +3 -0
  65. package/lib/browser/view/console/debug-console-model.d.ts.map +1 -1
  66. package/lib/browser/view/console/debug-console-model.js +5 -0
  67. package/lib/browser/view/console/debug-console-model.js.map +1 -1
  68. package/lib/browser/view/console/debug-console-tree.model.service.d.ts.map +1 -1
  69. package/lib/browser/view/console/debug-console-tree.model.service.js +9 -0
  70. package/lib/browser/view/console/debug-console-tree.model.service.js.map +1 -1
  71. package/lib/browser/view/variables/debug-variables-model.d.ts +3 -0
  72. package/lib/browser/view/variables/debug-variables-model.d.ts.map +1 -1
  73. package/lib/browser/view/variables/debug-variables-model.js +5 -0
  74. package/lib/browser/view/variables/debug-variables-model.js.map +1 -1
  75. package/lib/browser/view/variables/debug-variables-tree.model.service.d.ts.map +1 -1
  76. package/lib/browser/view/variables/debug-variables-tree.model.service.js +9 -0
  77. package/lib/browser/view/variables/debug-variables-tree.model.service.js.map +1 -1
  78. package/lib/browser/view/watch/debug-watch-model.d.ts +3 -0
  79. package/lib/browser/view/watch/debug-watch-model.d.ts.map +1 -1
  80. package/lib/browser/view/watch/debug-watch-model.js +5 -0
  81. package/lib/browser/view/watch/debug-watch-model.js.map +1 -1
  82. package/lib/browser/view/watch/debug-watch-tree.model.service.d.ts.map +1 -1
  83. package/lib/browser/view/watch/debug-watch-tree.model.service.js +9 -0
  84. package/lib/browser/view/watch/debug-watch-tree.model.service.js.map +1 -1
  85. package/lib/common/commands.d.ts +0 -2
  86. package/lib/common/commands.d.ts.map +1 -1
  87. package/lib/common/commands.js +0 -6
  88. package/lib/common/commands.js.map +1 -1
  89. package/lib/common/constants.d.ts +0 -3
  90. package/lib/common/constants.d.ts.map +1 -1
  91. package/lib/common/constants.js +2 -5
  92. package/lib/common/constants.js.map +1 -1
  93. package/lib/common/debug-schema-updater.d.ts +3 -0
  94. package/lib/common/debug-schema-updater.d.ts.map +1 -0
  95. package/lib/common/debug-schema-updater.js +5 -0
  96. package/lib/common/debug-schema-updater.js.map +1 -0
  97. package/lib/common/debug-service.d.ts +0 -10
  98. package/lib/common/debug-service.d.ts.map +1 -1
  99. package/lib/common/debug-service.js +1 -8
  100. package/lib/common/debug-service.js.map +1 -1
  101. package/lib/common/index.d.ts +1 -1
  102. package/lib/common/index.d.ts.map +1 -1
  103. package/lib/common/index.js +1 -1
  104. package/lib/common/index.js.map +1 -1
  105. package/package.json +23 -26
  106. package/src/browser/breakpoint/breakpoint-manager.ts +3 -8
  107. package/src/browser/components/floating-click-widget/index.module.less +0 -4
  108. package/src/browser/components/floating-click-widget/index.tsx +1 -4
  109. package/src/browser/contextkeys/debug-contextkey.service.ts +1 -4
  110. package/src/browser/debug-configuration-manager.ts +18 -82
  111. package/src/browser/debug-contribution.ts +8 -59
  112. package/src/browser/{debug-schema-manager.ts → debug-schema-updater.ts} +4 -5
  113. package/src/browser/debug-style.less +5 -34
  114. package/src/browser/debugUtils.ts +0 -23
  115. package/src/browser/editor/debug-hover-model.ts +6 -0
  116. package/src/browser/editor/debug-hover-tree.model.service.ts +10 -0
  117. package/src/browser/editor/debug-model.ts +3 -35
  118. package/src/browser/editor/debug-styles.ts +0 -7
  119. package/src/browser/index.ts +0 -6
  120. package/src/browser/preferences/launch-preferences-contribution.ts +3 -84
  121. package/src/browser/view/breakpoints/debug-breakpoints.module.less +8 -64
  122. package/src/browser/view/breakpoints/debug-breakpoints.service.ts +0 -8
  123. package/src/browser/view/breakpoints/debug-breakpoints.view.tsx +32 -139
  124. package/src/browser/view/configuration/debug-configuration.service.ts +0 -4
  125. package/src/browser/view/console/debug-console-model.ts +6 -0
  126. package/src/browser/view/console/debug-console-tree.model.service.ts +10 -0
  127. package/src/browser/view/variables/debug-variables-model.ts +6 -0
  128. package/src/browser/view/variables/debug-variables-tree.model.service.ts +10 -0
  129. package/src/browser/view/watch/debug-watch-model.ts +6 -0
  130. package/src/browser/view/watch/debug-watch-tree.model.service.ts +10 -0
  131. package/src/common/commands.ts +0 -6
  132. package/src/common/constants.ts +0 -5
  133. package/src/common/debug-schema-updater.ts +3 -0
  134. package/src/common/debug-service.ts +0 -13
  135. package/src/common/index.ts +1 -1
  136. package/lib/browser/debug-schema-manager.d.ts.map +0 -1
  137. package/lib/browser/debug-schema-manager.js.map +0 -1
  138. package/lib/browser/preferences/components/checkbox-widget.d.ts +0 -4
  139. package/lib/browser/preferences/components/checkbox-widget.d.ts.map +0 -1
  140. package/lib/browser/preferences/components/checkbox-widget.js +0 -27
  141. package/lib/browser/preferences/components/checkbox-widget.js.map +0 -1
  142. package/lib/browser/preferences/components/fields/any-of-field.d.ts +0 -4
  143. package/lib/browser/preferences/components/fields/any-of-field.d.ts.map +0 -1
  144. package/lib/browser/preferences/components/fields/any-of-field.js +0 -28
  145. package/lib/browser/preferences/components/fields/any-of-field.js.map +0 -1
  146. package/lib/browser/preferences/components/fields/array-field.d.ts +0 -5
  147. package/lib/browser/preferences/components/fields/array-field.d.ts.map +0 -1
  148. package/lib/browser/preferences/components/fields/array-field.js +0 -19
  149. package/lib/browser/preferences/components/fields/array-field.js.map +0 -1
  150. package/lib/browser/preferences/components/fields/object-filed.d.ts +0 -5
  151. package/lib/browser/preferences/components/fields/object-filed.d.ts.map +0 -1
  152. package/lib/browser/preferences/components/fields/object-filed.js +0 -26
  153. package/lib/browser/preferences/components/fields/object-filed.js.map +0 -1
  154. package/lib/browser/preferences/components/fields/title-field.d.ts +0 -4
  155. package/lib/browser/preferences/components/fields/title-field.d.ts.map +0 -1
  156. package/lib/browser/preferences/components/fields/title-field.js +0 -12
  157. package/lib/browser/preferences/components/fields/title-field.js.map +0 -1
  158. package/lib/browser/preferences/components/json-widget.module.less +0 -36
  159. package/lib/browser/preferences/components/select-widget.d.ts +0 -4
  160. package/lib/browser/preferences/components/select-widget.d.ts.map +0 -1
  161. package/lib/browser/preferences/components/select-widget.js +0 -28
  162. package/lib/browser/preferences/components/select-widget.js.map +0 -1
  163. package/lib/browser/preferences/components/text-widget.d.ts +0 -4
  164. package/lib/browser/preferences/components/text-widget.d.ts.map +0 -1
  165. package/lib/browser/preferences/components/text-widget.js +0 -41
  166. package/lib/browser/preferences/components/text-widget.js.map +0 -1
  167. package/lib/browser/preferences/launch.module.less +0 -102
  168. package/lib/browser/preferences/launch.service.d.ts +0 -31
  169. package/lib/browser/preferences/launch.service.d.ts.map +0 -1
  170. package/lib/browser/preferences/launch.service.js +0 -109
  171. package/lib/browser/preferences/launch.service.js.map +0 -1
  172. package/lib/browser/preferences/launch.view.d.ts +0 -3
  173. package/lib/browser/preferences/launch.view.d.ts.map +0 -1
  174. package/lib/browser/preferences/launch.view.js +0 -287
  175. package/lib/browser/preferences/launch.view.js.map +0 -1
  176. package/lib/browser/preferences/model/configuration-items.d.ts +0 -12
  177. package/lib/browser/preferences/model/configuration-items.d.ts.map +0 -1
  178. package/lib/browser/preferences/model/configuration-items.js +0 -22
  179. package/lib/browser/preferences/model/configuration-items.js.map +0 -1
  180. package/lib/browser/preferences/templates/additional-template.d.ts +0 -4
  181. package/lib/browser/preferences/templates/additional-template.d.ts.map +0 -1
  182. package/lib/browser/preferences/templates/additional-template.js +0 -30
  183. package/lib/browser/preferences/templates/additional-template.js.map +0 -1
  184. package/lib/browser/preferences/templates/array-field-item-template.d.ts +0 -4
  185. package/lib/browser/preferences/templates/array-field-item-template.d.ts.map +0 -1
  186. package/lib/browser/preferences/templates/array-field-item-template.js +0 -31
  187. package/lib/browser/preferences/templates/array-field-item-template.js.map +0 -1
  188. package/lib/browser/preferences/templates/array-field-template.d.ts +0 -4
  189. package/lib/browser/preferences/templates/array-field-template.d.ts.map +0 -1
  190. package/lib/browser/preferences/templates/array-field-template.js +0 -31
  191. package/lib/browser/preferences/templates/array-field-template.js.map +0 -1
  192. package/lib/browser/preferences/templates/base-input-template.d.ts +0 -4
  193. package/lib/browser/preferences/templates/base-input-template.d.ts.map +0 -1
  194. package/lib/browser/preferences/templates/base-input-template.js +0 -29
  195. package/lib/browser/preferences/templates/base-input-template.js.map +0 -1
  196. package/lib/browser/preferences/templates/button-template.d.ts +0 -12
  197. package/lib/browser/preferences/templates/button-template.d.ts.map +0 -1
  198. package/lib/browser/preferences/templates/button-template.js +0 -71
  199. package/lib/browser/preferences/templates/button-template.js.map +0 -1
  200. package/lib/browser/preferences/templates/description-field-template.d.ts +0 -4
  201. package/lib/browser/preferences/templates/description-field-template.d.ts.map +0 -1
  202. package/lib/browser/preferences/templates/description-field-template.js +0 -16
  203. package/lib/browser/preferences/templates/description-field-template.js.map +0 -1
  204. package/lib/browser/preferences/templates/field-template.d.ts +0 -4
  205. package/lib/browser/preferences/templates/field-template.d.ts.map +0 -1
  206. package/lib/browser/preferences/templates/field-template.js +0 -19
  207. package/lib/browser/preferences/templates/field-template.js.map +0 -1
  208. package/lib/browser/preferences/templates/json-templates.module.less +0 -133
  209. package/lib/browser/preferences/templates/object-field-template.d.ts +0 -4
  210. package/lib/browser/preferences/templates/object-field-template.d.ts.map +0 -1
  211. package/lib/browser/preferences/templates/object-field-template.js +0 -74
  212. package/lib/browser/preferences/templates/object-field-template.js.map +0 -1
  213. package/lib/common/debug-schema.d.ts +0 -5
  214. package/lib/common/debug-schema.d.ts.map +0 -1
  215. package/lib/common/debug-schema.js +0 -7
  216. package/lib/common/debug-schema.js.map +0 -1
  217. package/src/browser/preferences/components/checkbox-widget.tsx +0 -78
  218. package/src/browser/preferences/components/fields/any-of-field.tsx +0 -90
  219. package/src/browser/preferences/components/fields/array-field.tsx +0 -25
  220. package/src/browser/preferences/components/fields/object-filed.tsx +0 -33
  221. package/src/browser/preferences/components/fields/title-field.tsx +0 -16
  222. package/src/browser/preferences/components/json-widget.module.less +0 -36
  223. package/src/browser/preferences/components/select-widget.tsx +0 -68
  224. package/src/browser/preferences/components/text-widget.tsx +0 -114
  225. package/src/browser/preferences/launch.module.less +0 -102
  226. package/src/browser/preferences/launch.service.ts +0 -133
  227. package/src/browser/preferences/launch.view.tsx +0 -494
  228. package/src/browser/preferences/model/configuration-items.ts +0 -24
  229. package/src/browser/preferences/templates/additional-template.tsx +0 -77
  230. package/src/browser/preferences/templates/array-field-item-template.tsx +0 -90
  231. package/src/browser/preferences/templates/array-field-template.tsx +0 -92
  232. package/src/browser/preferences/templates/base-input-template.tsx +0 -79
  233. package/src/browser/preferences/templates/button-template.tsx +0 -107
  234. package/src/browser/preferences/templates/description-field-template.tsx +0 -29
  235. package/src/browser/preferences/templates/field-template.tsx +0 -71
  236. package/src/browser/preferences/templates/json-templates.module.less +0 -133
  237. package/src/browser/preferences/templates/object-field-template.tsx +0 -156
  238. package/src/common/debug-schema.ts +0 -5
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddItemButton = exports.CopyButton = exports.AddButton = exports.RemoveButton = exports.MoveDownButton = exports.MoveUpButton = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
6
- const ide_components_1 = require("@opensumi/ide-components");
7
- const iconMap_1 = require("@opensumi/ide-components/lib/icon/iconfont/iconMap");
8
- const ide_core_browser_1 = require("@opensumi/ide-core-browser");
9
- const index_1 = require("@opensumi/ide-core-browser/lib/components/actions/index");
10
- const menu_interface_1 = require("@opensumi/ide-core-browser/lib/menu/next/menu.interface");
11
- const ide_core_common_1 = require("@opensumi/ide-core-common");
12
- const common_1 = require("../../../common");
13
- const json_templates_module_less_1 = tslib_1.__importDefault(require("./json-templates.module.less"));
14
- const MoveUpButton = (props) => (react_1.default.createElement(ide_components_1.Button, Object.assign({}, props, { type: 'primary', icon: iconMap_1.defaultIconfont.arrowup }),
15
- react_1.default.createElement("span", { className: (0, ide_components_1.getIcon)(iconMap_1.defaultIconfont.arrowup) })));
16
- exports.MoveUpButton = MoveUpButton;
17
- const MoveDownButton = (props) => (react_1.default.createElement(ide_components_1.Button, Object.assign({}, props, { type: 'primary', icon: iconMap_1.defaultIconfont.arrowdown }),
18
- react_1.default.createElement("span", { className: (0, ide_components_1.getIcon)(iconMap_1.defaultIconfont.arrowdown) })));
19
- exports.MoveDownButton = MoveDownButton;
20
- const RemoveButton = (props) => (react_1.default.createElement(ide_components_1.Button, Object.assign({}, props, { type: 'danger', icon: iconMap_1.defaultIconfont.delete }),
21
- react_1.default.createElement("span", { className: (0, ide_components_1.getIcon)(iconMap_1.defaultIconfont.delete) })));
22
- exports.RemoveButton = RemoveButton;
23
- const AddButton = (props) => (react_1.default.createElement(ide_components_1.Button, Object.assign({}, props, { type: 'primary', icon: iconMap_1.defaultIconfont.plus }),
24
- react_1.default.createElement("span", { className: (0, ide_components_1.getIcon)(iconMap_1.defaultIconfont.plus) }),
25
- " ",
26
- (0, ide_core_common_1.localize)('debug.launch.view.template.button.addItem')));
27
- exports.AddButton = AddButton;
28
- const CopyButton = (props) => (react_1.default.createElement(ide_components_1.Button, Object.assign({}, props, { type: 'primary', icon: iconMap_1.defaultIconfont['file-copy'] }),
29
- react_1.default.createElement("span", { className: (0, ide_components_1.getIcon)(iconMap_1.defaultIconfont['file-copy']) })));
30
- exports.CopyButton = CopyButton;
31
- const AddItemButton = (props) => {
32
- const { registry: { rootSchema }, onAddClick, } = props;
33
- const launchService = (0, ide_core_browser_1.useInjectable)(common_1.ILaunchService);
34
- const [menuOpen, setMenuOpen] = react_1.default.useState(false);
35
- const [snippetMenu, setSnippetMenu] = react_1.default.useState([]);
36
- const { rawSchemaProperties: schemaProperties } = launchService;
37
- const handleVisibleChange = (0, react_1.useCallback)((visible) => setMenuOpen(visible), []);
38
- const handleMenuItemClick = (0, react_1.useCallback)((item) => {
39
- setMenuOpen(false);
40
- onAddClick(item);
41
- }, []);
42
- const handleSnippetMenu = (0, react_1.useCallback)(() => {
43
- const { properties } = schemaProperties;
44
- const { properties: existedProperties } = rootSchema;
45
- if (!properties || !existedProperties) {
46
- return;
47
- }
48
- // schema
49
- const menuItemNode = Object.keys(properties)
50
- // 过滤已存在于视图中的 properties
51
- .filter((key) => !Object.hasOwn(existedProperties, key))
52
- .map((item) => new menu_interface_1.LabelMenuItemNode(item));
53
- setSnippetMenu(menuItemNode);
54
- }, [rootSchema, schemaProperties]);
55
- (0, react_1.useEffect)(() => {
56
- const disposable = new ide_core_common_1.Disposable();
57
- disposable.addDispose(launchService.onChangeSchema(() => {
58
- requestAnimationFrame(() => {
59
- handleSnippetMenu();
60
- });
61
- }));
62
- handleSnippetMenu();
63
- return () => disposable.dispose();
64
- }, [schemaProperties, rootSchema]);
65
- return (react_1.default.createElement(ide_components_1.Button, { type: 'secondary', icon: iconMap_1.defaultIconfont.plus, className: json_templates_module_less_1.default.add_new_field, menu: react_1.default.createElement(index_1.MenuActionList, { afterClick: handleMenuItemClick, data: snippetMenu, style: { maxHeight: 600 } }), moreVisible: menuOpen, onVisibleChange: handleVisibleChange },
66
- react_1.default.createElement("span", { className: (0, ide_components_1.getIcon)(iconMap_1.defaultIconfont.plus) }),
67
- " ",
68
- (0, ide_core_common_1.localize)('debug.launch.view.template.button.submit')));
69
- };
70
- exports.AddItemButton = AddItemButton;
71
- //# sourceMappingURL=button-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-template.js","sourceRoot":"","sources":["../../../../src/browser/preferences/templates/button-template.tsx"],"names":[],"mappings":";;;;AACA,uDAA+D;AAE/D,6DAAwE;AACxE,gFAAqF;AACrF,iEAA2D;AAC3D,mFAAyF;AAEzF,4FAA4F;AAC5F,+DAAiE;AAEjE,4CAAiD;AAGjD,sGAAkD;AAE3C,MAAM,YAAY,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CACtD,8BAAC,uBAAM,oBAAK,KAAK,IAAE,IAAI,EAAC,SAAS,EAAC,IAAI,EAAE,yBAAe,CAAC,OAAO;IAC7D,wCAAM,SAAS,EAAE,IAAA,wBAAO,EAAC,yBAAe,CAAC,OAAO,CAAC,GA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E9C,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/B,CAAC,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEnC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,IAAI,4BAAU,EAAE,CAAC;QAEpC,UAAU,CAAC,UAAU,CACnB,aAAa,CAAC,cAAc,CAAC,GAAG,EAAE;YAChC,qBAAqB,CAAC,GAAG,EAAE;gBACzB,iBAAiB,EAAE,CAAC;YACtB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CACH,CAAC;QACF,iBAAiB,EAAE,CAAC;QAEpB,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC,EAAE,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC,CAAC;IAEnC,OAAO,CACL,8BAAC,uBAAM,IACL,IAAI,EAAC,WAAW,EAChB,IAAI,EAAE,yBAAe,CAAC,IAAI,EAC1B,SAAS,EAAE,oCAAM,CAAC,aAAa,EAC/B,IAAI,EAAE,8BAAC,sBAAc,IAAC,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,GAAI,EACvG,WAAW,EAAE,QAAQ,EACrB,eAAe,EAAE,mBAAmB;QAEpC,wCAAM,SAAS,EAAE,IAAA,wBAAO,EAAC,yBAAe,CAAC,IAAI,CAAC,GAAS;;QAAE,IAAA,0BAAQ,EAAC,0CAA0C,CAAC,CACtG,CACV,CAAC;AACJ,CAAC,CAAC;AA5DW,QAAA,aAAa,iBA4DxB"}
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { DescriptionFieldProps, RJSFSchema } from '@rjsf/utils';
3
- export declare const DescriptionFieldTemplate: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends import("@rjsf/utils").GenericObjectType = any>(props: DescriptionFieldProps<T, S, F>) => JSX.Element | null;
4
- //# sourceMappingURL=description-field-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"description-field-template.d.ts","sourceRoot":"","sources":["../../../../src/browser/preferences/templates/description-field-template.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAmB,UAAU,EAAoB,MAAM,aAAa,CAAC;AAOnG,eAAO,MAAM,wBAAwB,2LAqBpC,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DescriptionFieldTemplate = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importStar(require("react"));
6
- const json_templates_module_less_1 = tslib_1.__importDefault(require("./json-templates.module.less"));
7
- const DescriptionFieldTemplate = (props) => {
8
- const { id, schema } = props;
9
- const description = (0, react_1.useMemo)(() => { var _a; return (_a = schema.description) !== null && _a !== void 0 ? _a : schema.markdownDescription; }, [schema, schema.description, schema.markdownDescription]);
10
- if (!description) {
11
- return null;
12
- }
13
- return (react_1.default.createElement("span", { id: id, className: json_templates_module_less_1.default.description_field_template }, description));
14
- };
15
- exports.DescriptionFieldTemplate = DescriptionFieldTemplate;
16
- //# sourceMappingURL=description-field-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"description-field-template.js","sourceRoot":"","sources":["../../../../src/browser/preferences/templates/description-field-template.tsx"],"names":[],"mappings":";;;;AACA,uDAAuC;AAIvC,sGAAkD;AAE3C,MAAM,wBAAwB,GAAG,CAKtC,KAAqC,EACrC,EAAE;IACF,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC7B,MAAM,WAAW,GAAG,IAAA,eAAO,EACzB,GAAG,EAAE,WAAC,OAAA,MAAA,MAAM,CAAC,WAAW,mCAAK,MAAsB,CAAC,mBAAmB,CAAA,EAAA,EACvE,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,EAAG,MAAsB,CAAC,mBAAmB,CAAC,CAC1E,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CACL,wCAAM,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,oCAAM,CAAC,0BAA0B,IACvD,WAAW,CACP,CACR,CAAC;AACJ,CAAC,CAAC;AArBW,QAAA,wBAAwB,4BAqBnC"}
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { FieldTemplateProps, GenericObjectType, RJSFSchema } from '@rjsf/utils';
3
- export declare const FieldTemplate: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends GenericObjectType = any>(props: FieldTemplateProps<T, S, F>) => JSX.Element | null;
4
- //# sourceMappingURL=field-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-template.d.ts","sourceRoot":"","sources":["../../../../src/browser/preferences/templates/field-template.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kBAAkB,EAElB,iBAAiB,EAGjB,UAAU,EAEX,MAAM,aAAa,CAAC;AAIrB,eAAO,MAAM,aAAa,kKA0DzB,CAAC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldTemplate = void 0;
4
- const tslib_1 = require("tslib");
5
- const utils_1 = require("@rjsf/utils");
6
- const classnames_1 = tslib_1.__importDefault(require("classnames"));
7
- const react_1 = tslib_1.__importDefault(require("react"));
8
- const FieldTemplate = (props) => {
9
- const { classNames, style, children, id, schema, label, hidden, formContext, uiSchema, registry, disabled, onDropPropertyClick, onKeyChange, required, readonly, } = props;
10
- const { wrapperStyle } = formContext;
11
- const uiOptions = (0, utils_1.getUiOptions)(uiSchema);
12
- const WrapIfAdditionalTemplate = (0, utils_1.getTemplate)('WrapIfAdditionalTemplate', registry, uiOptions);
13
- if (hidden) {
14
- return null;
15
- }
16
- return (react_1.default.createElement(WrapIfAdditionalTemplate, { classNames: classNames, style: style, disabled: disabled, id: id, label: label, onDropPropertyClick: onDropPropertyClick, onKeyChange: onKeyChange, readonly: readonly, required: required, schema: schema, uiSchema: uiSchema, registry: registry }, id === 'root' ? (children) : (react_1.default.createElement("div", { className: (0, classnames_1.default)(classNames), style: wrapperStyle }, children))));
17
- };
18
- exports.FieldTemplate = FieldTemplate;
19
- //# sourceMappingURL=field-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-template.js","sourceRoot":"","sources":["../../../../src/browser/preferences/templates/field-template.tsx"],"names":[],"mappings":";;;;AAAA,uCAQqB;AACrB,oEAA6B;AAC7B,0DAA0B;AAEnB,MAAM,aAAa,GAAG,CAC3B,KAAkC,EAClC,EAAE;IACF,MAAM,EACJ,UAAU,EACV,KAAK,EACL,QAAQ,EACR,EAAE,EACF,MAAM,EACN,KAAK,EACL,MAAM,EACN,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,QAAQ,GACT,GAAG,KAAK,CAAC;IAEV,MAAM,EAAE,YAAY,EAAE,GAAG,WAAgC,CAAC;IAE1D,MAAM,SAAS,GAAG,IAAA,oBAAY,EAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,wBAAwB,GAAG,IAAA,mBAAW,EAC1C,0BAA0B,EAC1B,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,IAAI,MAAM,EAAE;QACV,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,8BAAC,wBAAwB,IACvB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,IAEjB,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,CACf,QAAQ,CACT,CAAC,CAAC,CAAC,CACF,uCAAK,SAAS,EAAE,IAAA,oBAAG,EAAC,UAAU,CAAC,EAAE,KAAK,EAAE,YAAY,IACjD,QAAQ,CACL,CACP,CACwB,CAC5B,CAAC;AACJ,CAAC,CAAC;AA1DW,QAAA,aAAa,iBA0DxB"}
@@ -1,133 +0,0 @@
1
- .array_field_item_template {
2
- display: flex;
3
- align-items: center;
4
- margin-bottom: 8px;
5
-
6
- .control_field {
7
- margin-right: 8px;
8
- min-width: 180px;
9
- }
10
-
11
- .toolbar {
12
- button {
13
- border-radius: 0;
14
- }
15
- }
16
- }
17
-
18
- .field_template {
19
- display: flex;
20
- flex-direction: column;
21
- }
22
-
23
- .array_field_template {
24
- display: flex;
25
- flex-direction: column;
26
-
27
- .array_item_description {
28
- margin-bottom: 8px;
29
- }
30
- }
31
-
32
- .object_field_template {
33
- .object_field_container {
34
- .root_property_wrapper {
35
- margin-bottom: 0;
36
- }
37
-
38
- &.root_object_field_container {
39
- margin-bottom: 16px;
40
-
41
- > .object_title {
42
- padding-left: 16px;
43
- }
44
-
45
- .root_property_wrapper {
46
- padding: 16px;
47
- position: relative;
48
-
49
- .wrapper_delete {
50
- display: none;
51
- position: absolute;
52
- cursor: pointer;
53
- right: 16px;
54
- top: 16px;
55
-
56
- .close_icon {
57
- font-size: 21px;
58
- color: var(--kt-dangerButton-background);
59
- }
60
- }
61
-
62
- &:hover {
63
- background-color: var(--kt-tree-hoverBackground);
64
-
65
- .wrapper_delete {
66
- display: block;
67
- }
68
- }
69
- }
70
- }
71
- }
72
- }
73
-
74
- .description_field_template {
75
- display: inline-block;
76
- margin-bottom: 10px;
77
- font-size: 14px;
78
- opacity: 0.75;
79
- white-space: pre-wrap;
80
- color: var(--descriptionForeground);
81
- }
82
-
83
- .add_new_field {
84
- min-width: 300px;
85
- max-width: 500px;
86
- width: 100%;
87
- border-style: dashed;
88
- margin-left: 16px;
89
- }
90
-
91
- .additional_field_template {
92
- display: flex;
93
- flex-direction: column;
94
-
95
- .form_additional_container {
96
- display: flex;
97
- min-width: 300px;
98
- max-width: 500px;
99
- width: 100%;
100
- margin-bottom: 8px;
101
-
102
- .form_additional_children {
103
- label[class*='field_label'] {
104
- display: none;
105
- }
106
- }
107
-
108
- .form_additional,
109
- .form_additional_children {
110
- margin-right: 16px;
111
- }
112
- }
113
-
114
- .children_field {
115
- position: relative;
116
-
117
- .object_title,
118
- .object_description {
119
- display: none;
120
- }
121
-
122
- .dividing {
123
- width: 2px;
124
- background-color: var(--editorGroup-border);
125
- height: 100%;
126
- position: absolute;
127
- }
128
-
129
- .children_container {
130
- margin-left: 16px;
131
- }
132
- }
133
- }
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { ObjectFieldTemplateProps, RJSFSchema } from '@rjsf/utils';
3
- export declare const ObjectFieldTemplate: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends import("@rjsf/utils").GenericObjectType = any>(props: ObjectFieldTemplateProps<T, S, F>) => JSX.Element;
4
- //# sourceMappingURL=object-field-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object-field-template.d.ts","sourceRoot":"","sources":["../../../../src/browser/preferences/templates/object-field-template.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,wBAAwB,EAExB,UAAU,EASX,MAAM,aAAa,CAAC;AAsCrB,eAAO,MAAM,mBAAmB,uLAyG/B,CAAC"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ObjectFieldTemplate = void 0;
4
- const tslib_1 = require("tslib");
5
- const utils_1 = require("@rjsf/utils");
6
- const classnames_1 = tslib_1.__importDefault(require("classnames"));
7
- const react_1 = tslib_1.__importStar(require("react"));
8
- const ide_components_1 = require("@opensumi/ide-components");
9
- const ide_core_browser_1 = require("@opensumi/ide-core-browser");
10
- const ide_core_browser_2 = require("@opensumi/ide-core-browser");
11
- const debug_service_1 = require("../../../common/debug-service");
12
- const json_templates_module_less_1 = tslib_1.__importDefault(require("./json-templates.module.less"));
13
- /**
14
- * 情况一: properties 为空则表明该属性的值是任意的 key:value 对象组合,所以需要显示添加按钮
15
- * 情况二: 如果 properties 当中存在 ADDITIONAL_PROPERTY_FLAG 字段,则允许继续添加
16
- */
17
- const extendCanExpand = (props) => {
18
- const { schema, uiSchema, formData } = props;
19
- const { properties } = schema;
20
- if (!properties) {
21
- return false;
22
- }
23
- if (Object.keys(properties).length === 0) {
24
- return true;
25
- }
26
- if (!Object.values(properties).some((item) => item[utils_1.ADDITIONAL_PROPERTY_FLAG])) {
27
- return false;
28
- }
29
- return (0, utils_1.canExpand)(schema, uiSchema, formData);
30
- };
31
- const ObjectFieldTemplate = (props) => {
32
- const { schema, uiSchema, required, registry, idSchema, title, disabled, readonly, properties, onAddClick } = props;
33
- const launchService = (0, ide_core_browser_1.useInjectable)(debug_service_1.ILaunchService);
34
- const uiOptions = (0, utils_1.getUiOptions)(uiSchema);
35
- const TitleFieldTemplate = (0, utils_1.getTemplate)('TitleFieldTemplate', registry, uiOptions);
36
- const DescriptionFieldTemplate = (0, utils_1.getTemplate)('DescriptionFieldTemplate', registry, uiOptions);
37
- const { ButtonTemplates: { AddButton }, } = registry.templates;
38
- const description = (0, react_1.useMemo)(() => { var _a; return (_a = props.description) !== null && _a !== void 0 ? _a : schema.markdownDescription; }, [props.description, schema]);
39
- const fieldContainerClass = (0, react_1.useMemo)(() => idSchema.$id === 'root'
40
- ? (0, classnames_1.default)(json_templates_module_less_1.default.object_field_container, json_templates_module_less_1.default.root_object_field_container)
41
- : json_templates_module_less_1.default.object_field_container, [idSchema]);
42
- const propertyWrapperClass = (0, react_1.useMemo)(() => idSchema.$id === 'root' ? (0, classnames_1.default)(json_templates_module_less_1.default.property_wrapper, json_templates_module_less_1.default.root_property_wrapper) : json_templates_module_less_1.default.property_wrapper, [idSchema]);
43
- const handleDelProperties = (0, react_1.useCallback)((node) => {
44
- const { name } = node;
45
- launchService.delItem(name);
46
- }, []);
47
- const renderProperties = (0, react_1.useCallback)((node) => {
48
- const { rawSchemaProperties: schemaProperties } = launchService;
49
- if (!schemaProperties) {
50
- return null;
51
- }
52
- const required = schemaProperties.required || [];
53
- return (react_1.default.createElement("div", { key: node.name, className: propertyWrapperClass, onKeyDown: (event) => {
54
- if (event.key === ide_core_browser_2.Key.ENTER.code) {
55
- event.preventDefault();
56
- event.stopPropagation();
57
- }
58
- } },
59
- node.content,
60
- required.includes(node.name) || idSchema.$id !== 'root' ? null : (react_1.default.createElement("div", { className: json_templates_module_less_1.default.wrapper_delete, onClick: () => handleDelProperties(node) },
61
- react_1.default.createElement("span", { className: (0, classnames_1.default)((0, ide_components_1.getIcon)('close-circle'), json_templates_module_less_1.default.close_icon) })))));
62
- }, [properties, launchService.rawSchemaProperties, idSchema]);
63
- return (react_1.default.createElement("div", { className: json_templates_module_less_1.default.object_field_template },
64
- react_1.default.createElement("fieldset", null,
65
- react_1.default.createElement("div", { className: fieldContainerClass },
66
- title && (react_1.default.createElement("div", { className: json_templates_module_less_1.default.object_title },
67
- react_1.default.createElement(TitleFieldTemplate, { id: (0, utils_1.titleId)(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry }))),
68
- description && (react_1.default.createElement("div", { className: json_templates_module_less_1.default.object_description },
69
- react_1.default.createElement(DescriptionFieldTemplate, { id: (0, utils_1.descriptionId)(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry }))),
70
- properties.filter((e) => !e.hidden).map((element) => renderProperties(element))),
71
- extendCanExpand(props) && (react_1.default.createElement(AddButton, { onClick: onAddClick(schema), disabled: disabled || readonly, registry: registry })))));
72
- };
73
- exports.ObjectFieldTemplate = ObjectFieldTemplate;
74
- //# sourceMappingURL=object-field-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object-field-template.js","sourceRoot":"","sources":["../../../../src/browser/preferences/templates/object-field-template.tsx"],"names":[],"mappings":";;;;AAAA,uCAYqB;AACrB,oEAA6B;AAC7B,uDAAoD;AAEpD,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kB;oBACvC,8BAAC,wBAAwB,IACvB,EAAE,EAAE,IAAA,qBAAa,EAAI,QAAQ,CAAC,EAC9B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACE,CACP;gBACA,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAC5E;YACL,eAAe,CAAU,KAAK,CAAC,IAAI,CAClC,8BAAC,SAAS,IAAC,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAC/F,CACQ,CACP,CACP,CAAC;AACJ,CAAC,CAAC;AAzGW,QAAA,mBAAmB,uBAyG9B"}
@@ -1,5 +0,0 @@
1
- import { CodeSchemaId } from '@opensumi/ide-core-common';
2
- export declare const launchSchemaUri = CodeSchemaId.launch;
3
- export declare const launchExtensionSchemaUri: string;
4
- export declare const launchDefaultSchemaUri: string;
5
- //# sourceMappingURL=debug-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-schema.d.ts","sourceRoot":"","sources":["../../src/common/debug-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,wBAAwB,QAAqC,CAAC;AAC3E,eAAO,MAAM,sBAAsB,QAAmC,CAAC"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.launchDefaultSchemaUri = exports.launchExtensionSchemaUri = exports.launchSchemaUri = void 0;
4
- exports.launchSchemaUri = "vscode://schemas/launch" /* CodeSchemaId.launch */;
5
- exports.launchExtensionSchemaUri = `${"vscode://schemas/launch" /* CodeSchemaId.launch */}/extension`;
6
- exports.launchDefaultSchemaUri = `${"vscode://schemas/launch" /* CodeSchemaId.launch */}/default`;
7
- //# sourceMappingURL=debug-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-schema.js","sourceRoot":"","sources":["../../src/common/debug-schema.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,uDAAuB;AACtC,QAAA,wBAAwB,GAAG,GAAG,mDAAmB,YAAY,CAAC;AAC9D,QAAA,sBAAsB,GAAG,GAAG,mDAAmB,UAAU,CAAC"}
@@ -1,78 +0,0 @@
1
- import {
2
- ariaDescribedByIds,
3
- descriptionId,
4
- getTemplate,
5
- labelValue,
6
- FormContextType,
7
- RJSFSchema,
8
- StrictRJSFSchema,
9
- WidgetProps,
10
- GenericObjectType,
11
- } from '@rjsf/utils';
12
- import React, { FocusEvent } from 'react';
13
-
14
- import { CheckBox } from '@opensumi/ide-components';
15
- import { IJSONSchema } from '@opensumi/ide-core-common';
16
-
17
- import styles from './json-widget.module.less';
18
-
19
- export const CheckboxWidget = <T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(
20
- props: WidgetProps<T, S, F>,
21
- ) => {
22
- const {
23
- disabled,
24
- formContext,
25
- id,
26
- label,
27
- hideLabel,
28
- onBlur,
29
- onChange,
30
- onFocus,
31
- readonly,
32
- value,
33
- registry,
34
- options,
35
- schema,
36
- uiSchema,
37
- } = props;
38
- const { readonlyAsDisabled = true } = formContext as GenericObjectType;
39
- const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(
40
- 'DescriptionFieldTemplate',
41
- registry,
42
- options,
43
- );
44
-
45
- const handleChange = ({ target }: any) => onChange(target.checked);
46
-
47
- const handleBlur = ({ target }: FocusEvent<HTMLInputElement>) => onBlur(id, target.checked);
48
-
49
- const handleFocus = ({ target }: FocusEvent<HTMLInputElement>) => onFocus(id, target.checked);
50
-
51
- const extraProps = {
52
- onBlur: !readonly ? handleBlur : undefined,
53
- onFocus: !readonly ? handleFocus : undefined,
54
- };
55
-
56
- const description = options.description ?? schema.description ?? (schema as IJSONSchema).markdownDescription;
57
-
58
- return (
59
- <div className={styles.checkbox_widget_control}>
60
- {!hideLabel && (
61
- <label title={label} className={styles.field_label}>
62
- {label}
63
- </label>
64
- )}
65
- <CheckBox
66
- checked={typeof value === 'undefined' ? false : value}
67
- disabled={disabled || (readonlyAsDisabled && readonly)}
68
- id={id}
69
- name={id}
70
- onChange={!readonly ? handleChange : undefined}
71
- {...extraProps}
72
- aria-describedby={ariaDescribedByIds<T>(id)}
73
- label={description}
74
- className={styles.checkbox}
75
- />
76
- </div>
77
- );
78
- };
@@ -1,90 +0,0 @@
1
- import {
2
- descriptionId,
3
- FieldProps,
4
- FormContextType,
5
- GenericObjectType,
6
- getTemplate,
7
- RJSFSchema,
8
- StrictRJSFSchema,
9
- titleId,
10
- } from '@rjsf/utils';
11
- import React from 'react';
12
-
13
- import { Input } from '@opensumi/ide-components';
14
- import { IJSONSchema } from '@opensumi/ide-core-common';
15
-
16
- import styles from '../json-widget.module.less';
17
-
18
- // 对于 anyof/oneof 的处理统一使用 input
19
- export const AnyOfField = <T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(
20
- props: FieldProps<T, S, F>,
21
- ) => {
22
- const {
23
- disabled,
24
- formContext,
25
- idSchema,
26
- onBlur,
27
- id,
28
- onChange,
29
- onFocus,
30
- options,
31
- placeholder,
32
- readonly,
33
- registry,
34
- name,
35
- required,
36
- schema,
37
- uiOptions,
38
- } = props;
39
- const { readonlyAsDisabled = true } = formContext as GenericObjectType;
40
-
41
- const handleTextChange = ({ target }: React.ChangeEvent<HTMLInputElement>) =>
42
- onChange(target.value === '' ? options.emptyValue : target.value);
43
-
44
- const handleBlur = ({ target }: React.FocusEvent<HTMLInputElement>) => onBlur(id!, target.value);
45
-
46
- const handleFocus = ({ target }: React.FocusEvent<HTMLInputElement>) => onFocus(id!, target.value);
47
-
48
- const description = options.description ?? schema.description ?? (schema as IJSONSchema).markdownDescription;
49
-
50
- const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, uiOptions);
51
- const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(
52
- 'DescriptionFieldTemplate',
53
- registry,
54
- uiOptions,
55
- );
56
-
57
- return (
58
- <div className={styles.any_of_widget_control}>
59
- {name && (
60
- <div className={styles.object_title}>
61
- <TitleFieldTemplate
62
- id={titleId<T>(idSchema)}
63
- title={name}
64
- required={required}
65
- schema={schema}
66
- registry={registry}
67
- />
68
- </div>
69
- )}
70
- {description && (
71
- <div className={styles.object_description}>
72
- <DescriptionFieldTemplate
73
- id={descriptionId<T>(idSchema)}
74
- description={description}
75
- schema={schema}
76
- registry={registry}
77
- />
78
- </div>
79
- )}
80
- <Input
81
- disabled={disabled || (readonlyAsDisabled && readonly)}
82
- onBlur={!readonly ? handleBlur : undefined}
83
- onChange={!readonly ? handleTextChange : undefined}
84
- onFocus={!readonly ? handleFocus : undefined}
85
- placeholder={placeholder}
86
- autoComplete='off'
87
- />
88
- </div>
89
- );
90
- };
@@ -1,25 +0,0 @@
1
- import { getDefaultRegistry } from '@rjsf/core';
2
- import { FieldProps } from '@rjsf/utils';
3
- import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
4
- import React, { useCallback } from 'react';
5
-
6
- import { isUndefined } from '@opensumi/ide-core-common';
7
-
8
- const DefaultArrayField: any = getDefaultRegistry().fields.ArrayField;
9
-
10
- export const ArrayField = <T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(
11
- props: FieldProps<T, S, F>,
12
- ) => {
13
- const { onChange } = props;
14
-
15
- const handleOnChange = useCallback(
16
- (newFormData: T) => {
17
- if (Array.isArray(newFormData)) {
18
- onChange(newFormData.map((data) => (isUndefined(data) ? '' : data)) as unknown as T);
19
- }
20
- },
21
- [onChange],
22
- );
23
-
24
- return <DefaultArrayField {...props} onChange={handleOnChange} />;
25
- };
@@ -1,33 +0,0 @@
1
- import { getDefaultRegistry } from '@rjsf/core';
2
- import { FieldProps } from '@rjsf/utils';
3
- import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
4
- import React, { useEffect } from 'react';
5
-
6
- import { useInjectable } from '@opensumi/ide-core-browser';
7
- import { Disposable } from '@opensumi/ide-core-common';
8
-
9
- import { ILaunchService } from '../../../../common';
10
- import { LaunchService } from '../../launch.service';
11
-
12
- const DefaultObjectField: any = getDefaultRegistry().fields.ObjectField;
13
-
14
- export const ObjectField = <T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(
15
- props: FieldProps<T, S, F>,
16
- ) => {
17
- const launchService = useInjectable<LaunchService>(ILaunchService);
18
- const { idSchema, onChange } = props;
19
-
20
- useEffect(() => {
21
- const { $id } = idSchema;
22
- const disabled = new Disposable();
23
-
24
- // 仅处理 root 节点
25
- if ($id === 'root') {
26
- disabled.addDispose(launchService.onChangeFormData((newFormData) => onChange(newFormData as T)));
27
- }
28
-
29
- return () => disabled.dispose();
30
- }, [idSchema]);
31
-
32
- return <DefaultObjectField {...props} />;
33
- };
@@ -1,16 +0,0 @@
1
- import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
- import React from 'react';
3
-
4
- import styles from '../json-widget.module.less';
5
-
6
- export const TitleField = <T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(
7
- props: TitleFieldProps<T, S, F>,
8
- ) => {
9
- const { title } = props;
10
-
11
- return title ? (
12
- <label title={title} className={styles.field_label}>
13
- {title}
14
- </label>
15
- ) : null;
16
- };