@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.
- package/lib/browser/breakpoint/breakpoint-manager.d.ts +3 -4
- package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +1 -1
- package/lib/browser/breakpoint/breakpoint-manager.js +0 -7
- package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -1
- package/lib/browser/components/floating-click-widget/index.d.ts.map +1 -1
- package/lib/browser/components/floating-click-widget/index.js +2 -3
- package/lib/browser/components/floating-click-widget/index.js.map +1 -1
- package/lib/browser/components/floating-click-widget/index.module.less +0 -4
- package/lib/browser/contextkeys/debug-contextkey.service.d.ts +0 -1
- package/lib/browser/contextkeys/debug-contextkey.service.d.ts.map +1 -1
- package/lib/browser/contextkeys/debug-contextkey.service.js +1 -2
- package/lib/browser/contextkeys/debug-contextkey.service.js.map +1 -1
- package/lib/browser/debug-configuration-manager.d.ts +0 -6
- package/lib/browser/debug-configuration-manager.d.ts.map +1 -1
- package/lib/browser/debug-configuration-manager.js +17 -64
- package/lib/browser/debug-configuration-manager.js.map +1 -1
- package/lib/browser/debug-contribution.d.ts.map +1 -1
- package/lib/browser/debug-contribution.js +7 -53
- package/lib/browser/debug-contribution.js.map +1 -1
- package/lib/browser/{debug-schema-manager.d.ts → debug-schema-updater.d.ts} +2 -2
- package/lib/browser/debug-schema-updater.d.ts.map +1 -0
- package/lib/browser/{debug-schema-manager.js → debug-schema-updater.js} +10 -10
- package/lib/browser/debug-schema-updater.js.map +1 -0
- package/lib/browser/debug-style.less +5 -34
- package/lib/browser/debugUtils.d.ts +0 -1
- package/lib/browser/debugUtils.d.ts.map +1 -1
- package/lib/browser/debugUtils.js +1 -22
- package/lib/browser/debugUtils.js.map +1 -1
- package/lib/browser/editor/debug-hover-model.d.ts +3 -0
- package/lib/browser/editor/debug-hover-model.d.ts.map +1 -1
- package/lib/browser/editor/debug-hover-model.js +5 -0
- package/lib/browser/editor/debug-hover-model.js.map +1 -1
- package/lib/browser/editor/debug-hover-tree.model.service.d.ts.map +1 -1
- package/lib/browser/editor/debug-hover-tree.model.service.js +9 -0
- package/lib/browser/editor/debug-hover-tree.model.service.js.map +1 -1
- package/lib/browser/editor/debug-model.d.ts +0 -2
- package/lib/browser/editor/debug-model.d.ts.map +1 -1
- package/lib/browser/editor/debug-model.js +2 -31
- package/lib/browser/editor/debug-model.js.map +1 -1
- package/lib/browser/editor/debug-styles.d.ts +0 -1
- package/lib/browser/editor/debug-styles.d.ts.map +1 -1
- package/lib/browser/editor/debug-styles.js +1 -7
- package/lib/browser/editor/debug-styles.js.map +1 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +0 -5
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/preferences/launch-preferences-contribution.d.ts +2 -14
- package/lib/browser/preferences/launch-preferences-contribution.d.ts.map +1 -1
- package/lib/browser/preferences/launch-preferences-contribution.js +2 -61
- package/lib/browser/preferences/launch-preferences-contribution.js.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.module.less +8 -64
- package/lib/browser/view/breakpoints/debug-breakpoints.service.d.ts +1 -10
- package/lib/browser/view/breakpoints/debug-breakpoints.service.d.ts.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js +0 -5
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.view.d.ts +0 -7
- package/lib/browser/view/breakpoints/debug-breakpoints.view.d.ts.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.view.js +26 -80
- package/lib/browser/view/breakpoints/debug-breakpoints.view.js.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.service.d.ts +0 -1
- package/lib/browser/view/configuration/debug-configuration.service.d.ts.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.service.js +0 -3
- package/lib/browser/view/configuration/debug-configuration.service.js.map +1 -1
- package/lib/browser/view/console/debug-console-model.d.ts +3 -0
- package/lib/browser/view/console/debug-console-model.d.ts.map +1 -1
- package/lib/browser/view/console/debug-console-model.js +5 -0
- package/lib/browser/view/console/debug-console-model.js.map +1 -1
- package/lib/browser/view/console/debug-console-tree.model.service.d.ts.map +1 -1
- package/lib/browser/view/console/debug-console-tree.model.service.js +9 -0
- package/lib/browser/view/console/debug-console-tree.model.service.js.map +1 -1
- package/lib/browser/view/variables/debug-variables-model.d.ts +3 -0
- package/lib/browser/view/variables/debug-variables-model.d.ts.map +1 -1
- package/lib/browser/view/variables/debug-variables-model.js +5 -0
- package/lib/browser/view/variables/debug-variables-model.js.map +1 -1
- package/lib/browser/view/variables/debug-variables-tree.model.service.d.ts.map +1 -1
- package/lib/browser/view/variables/debug-variables-tree.model.service.js +9 -0
- package/lib/browser/view/variables/debug-variables-tree.model.service.js.map +1 -1
- package/lib/browser/view/watch/debug-watch-model.d.ts +3 -0
- package/lib/browser/view/watch/debug-watch-model.d.ts.map +1 -1
- package/lib/browser/view/watch/debug-watch-model.js +5 -0
- package/lib/browser/view/watch/debug-watch-model.js.map +1 -1
- package/lib/browser/view/watch/debug-watch-tree.model.service.d.ts.map +1 -1
- package/lib/browser/view/watch/debug-watch-tree.model.service.js +9 -0
- package/lib/browser/view/watch/debug-watch-tree.model.service.js.map +1 -1
- package/lib/common/commands.d.ts +0 -2
- package/lib/common/commands.d.ts.map +1 -1
- package/lib/common/commands.js +0 -6
- package/lib/common/commands.js.map +1 -1
- package/lib/common/constants.d.ts +0 -3
- package/lib/common/constants.d.ts.map +1 -1
- package/lib/common/constants.js +2 -5
- package/lib/common/constants.js.map +1 -1
- package/lib/common/debug-schema-updater.d.ts +3 -0
- package/lib/common/debug-schema-updater.d.ts.map +1 -0
- package/lib/common/debug-schema-updater.js +5 -0
- package/lib/common/debug-schema-updater.js.map +1 -0
- package/lib/common/debug-service.d.ts +0 -10
- package/lib/common/debug-service.d.ts.map +1 -1
- package/lib/common/debug-service.js +1 -8
- package/lib/common/debug-service.js.map +1 -1
- package/lib/common/index.d.ts +1 -1
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +1 -1
- package/lib/common/index.js.map +1 -1
- package/package.json +23 -26
- package/src/browser/breakpoint/breakpoint-manager.ts +3 -8
- package/src/browser/components/floating-click-widget/index.module.less +0 -4
- package/src/browser/components/floating-click-widget/index.tsx +1 -4
- package/src/browser/contextkeys/debug-contextkey.service.ts +1 -4
- package/src/browser/debug-configuration-manager.ts +18 -82
- package/src/browser/debug-contribution.ts +8 -59
- package/src/browser/{debug-schema-manager.ts → debug-schema-updater.ts} +4 -5
- package/src/browser/debug-style.less +5 -34
- package/src/browser/debugUtils.ts +0 -23
- package/src/browser/editor/debug-hover-model.ts +6 -0
- package/src/browser/editor/debug-hover-tree.model.service.ts +10 -0
- package/src/browser/editor/debug-model.ts +3 -35
- package/src/browser/editor/debug-styles.ts +0 -7
- package/src/browser/index.ts +0 -6
- package/src/browser/preferences/launch-preferences-contribution.ts +3 -84
- package/src/browser/view/breakpoints/debug-breakpoints.module.less +8 -64
- package/src/browser/view/breakpoints/debug-breakpoints.service.ts +0 -8
- package/src/browser/view/breakpoints/debug-breakpoints.view.tsx +32 -139
- package/src/browser/view/configuration/debug-configuration.service.ts +0 -4
- package/src/browser/view/console/debug-console-model.ts +6 -0
- package/src/browser/view/console/debug-console-tree.model.service.ts +10 -0
- package/src/browser/view/variables/debug-variables-model.ts +6 -0
- package/src/browser/view/variables/debug-variables-tree.model.service.ts +10 -0
- package/src/browser/view/watch/debug-watch-model.ts +6 -0
- package/src/browser/view/watch/debug-watch-tree.model.service.ts +10 -0
- package/src/common/commands.ts +0 -6
- package/src/common/constants.ts +0 -5
- package/src/common/debug-schema-updater.ts +3 -0
- package/src/common/debug-service.ts +0 -13
- package/src/common/index.ts +1 -1
- package/lib/browser/debug-schema-manager.d.ts.map +0 -1
- package/lib/browser/debug-schema-manager.js.map +0 -1
- package/lib/browser/preferences/components/checkbox-widget.d.ts +0 -4
- package/lib/browser/preferences/components/checkbox-widget.d.ts.map +0 -1
- package/lib/browser/preferences/components/checkbox-widget.js +0 -27
- package/lib/browser/preferences/components/checkbox-widget.js.map +0 -1
- package/lib/browser/preferences/components/fields/any-of-field.d.ts +0 -4
- package/lib/browser/preferences/components/fields/any-of-field.d.ts.map +0 -1
- package/lib/browser/preferences/components/fields/any-of-field.js +0 -28
- package/lib/browser/preferences/components/fields/any-of-field.js.map +0 -1
- package/lib/browser/preferences/components/fields/array-field.d.ts +0 -5
- package/lib/browser/preferences/components/fields/array-field.d.ts.map +0 -1
- package/lib/browser/preferences/components/fields/array-field.js +0 -19
- package/lib/browser/preferences/components/fields/array-field.js.map +0 -1
- package/lib/browser/preferences/components/fields/object-filed.d.ts +0 -5
- package/lib/browser/preferences/components/fields/object-filed.d.ts.map +0 -1
- package/lib/browser/preferences/components/fields/object-filed.js +0 -26
- package/lib/browser/preferences/components/fields/object-filed.js.map +0 -1
- package/lib/browser/preferences/components/fields/title-field.d.ts +0 -4
- package/lib/browser/preferences/components/fields/title-field.d.ts.map +0 -1
- package/lib/browser/preferences/components/fields/title-field.js +0 -12
- package/lib/browser/preferences/components/fields/title-field.js.map +0 -1
- package/lib/browser/preferences/components/json-widget.module.less +0 -36
- package/lib/browser/preferences/components/select-widget.d.ts +0 -4
- package/lib/browser/preferences/components/select-widget.d.ts.map +0 -1
- package/lib/browser/preferences/components/select-widget.js +0 -28
- package/lib/browser/preferences/components/select-widget.js.map +0 -1
- package/lib/browser/preferences/components/text-widget.d.ts +0 -4
- package/lib/browser/preferences/components/text-widget.d.ts.map +0 -1
- package/lib/browser/preferences/components/text-widget.js +0 -41
- package/lib/browser/preferences/components/text-widget.js.map +0 -1
- package/lib/browser/preferences/launch.module.less +0 -102
- package/lib/browser/preferences/launch.service.d.ts +0 -31
- package/lib/browser/preferences/launch.service.d.ts.map +0 -1
- package/lib/browser/preferences/launch.service.js +0 -109
- package/lib/browser/preferences/launch.service.js.map +0 -1
- package/lib/browser/preferences/launch.view.d.ts +0 -3
- package/lib/browser/preferences/launch.view.d.ts.map +0 -1
- package/lib/browser/preferences/launch.view.js +0 -287
- package/lib/browser/preferences/launch.view.js.map +0 -1
- package/lib/browser/preferences/model/configuration-items.d.ts +0 -12
- package/lib/browser/preferences/model/configuration-items.d.ts.map +0 -1
- package/lib/browser/preferences/model/configuration-items.js +0 -22
- package/lib/browser/preferences/model/configuration-items.js.map +0 -1
- package/lib/browser/preferences/templates/additional-template.d.ts +0 -4
- package/lib/browser/preferences/templates/additional-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/additional-template.js +0 -30
- package/lib/browser/preferences/templates/additional-template.js.map +0 -1
- package/lib/browser/preferences/templates/array-field-item-template.d.ts +0 -4
- package/lib/browser/preferences/templates/array-field-item-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/array-field-item-template.js +0 -31
- package/lib/browser/preferences/templates/array-field-item-template.js.map +0 -1
- package/lib/browser/preferences/templates/array-field-template.d.ts +0 -4
- package/lib/browser/preferences/templates/array-field-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/array-field-template.js +0 -31
- package/lib/browser/preferences/templates/array-field-template.js.map +0 -1
- package/lib/browser/preferences/templates/base-input-template.d.ts +0 -4
- package/lib/browser/preferences/templates/base-input-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/base-input-template.js +0 -29
- package/lib/browser/preferences/templates/base-input-template.js.map +0 -1
- package/lib/browser/preferences/templates/button-template.d.ts +0 -12
- package/lib/browser/preferences/templates/button-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/button-template.js +0 -71
- package/lib/browser/preferences/templates/button-template.js.map +0 -1
- package/lib/browser/preferences/templates/description-field-template.d.ts +0 -4
- package/lib/browser/preferences/templates/description-field-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/description-field-template.js +0 -16
- package/lib/browser/preferences/templates/description-field-template.js.map +0 -1
- package/lib/browser/preferences/templates/field-template.d.ts +0 -4
- package/lib/browser/preferences/templates/field-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/field-template.js +0 -19
- package/lib/browser/preferences/templates/field-template.js.map +0 -1
- package/lib/browser/preferences/templates/json-templates.module.less +0 -133
- package/lib/browser/preferences/templates/object-field-template.d.ts +0 -4
- package/lib/browser/preferences/templates/object-field-template.d.ts.map +0 -1
- package/lib/browser/preferences/templates/object-field-template.js +0 -74
- package/lib/browser/preferences/templates/object-field-template.js.map +0 -1
- package/lib/common/debug-schema.d.ts +0 -5
- package/lib/common/debug-schema.d.ts.map +0 -1
- package/lib/common/debug-schema.js +0 -7
- package/lib/common/debug-schema.js.map +0 -1
- package/src/browser/preferences/components/checkbox-widget.tsx +0 -78
- package/src/browser/preferences/components/fields/any-of-field.tsx +0 -90
- package/src/browser/preferences/components/fields/array-field.tsx +0 -25
- package/src/browser/preferences/components/fields/object-filed.tsx +0 -33
- package/src/browser/preferences/components/fields/title-field.tsx +0 -16
- package/src/browser/preferences/components/json-widget.module.less +0 -36
- package/src/browser/preferences/components/select-widget.tsx +0 -68
- package/src/browser/preferences/components/text-widget.tsx +0 -114
- package/src/browser/preferences/launch.module.less +0 -102
- package/src/browser/preferences/launch.service.ts +0 -133
- package/src/browser/preferences/launch.view.tsx +0 -494
- package/src/browser/preferences/model/configuration-items.ts +0 -24
- package/src/browser/preferences/templates/additional-template.tsx +0 -77
- package/src/browser/preferences/templates/array-field-item-template.tsx +0 -90
- package/src/browser/preferences/templates/array-field-template.tsx +0 -92
- package/src/browser/preferences/templates/base-input-template.tsx +0 -79
- package/src/browser/preferences/templates/button-template.tsx +0 -107
- package/src/browser/preferences/templates/description-field-template.tsx +0 -29
- package/src/browser/preferences/templates/field-template.tsx +0 -71
- package/src/browser/preferences/templates/json-templates.module.less +0 -133
- package/src/browser/preferences/templates/object-field-template.tsx +0 -156
- package/src/common/debug-schema.ts +0 -5
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RJSFSchema, WidgetProps, GenericObjectType } from '@rjsf/utils';
|
|
3
|
-
export declare const CheckboxWidget: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends GenericObjectType = any>(props: WidgetProps<T, S, F>) => JSX.Element;
|
|
4
|
-
//# sourceMappingURL=checkbox-widget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-widget.d.ts","sourceRoot":"","sources":["../../../../src/browser/preferences/components/checkbox-widget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAML,UAAU,EAEV,WAAW,EACX,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAQrB,eAAO,MAAM,cAAc,oJA2D1B,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CheckboxWidget = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const utils_1 = require("@rjsf/utils");
|
|
6
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
-
const ide_components_1 = require("@opensumi/ide-components");
|
|
8
|
-
const json_widget_module_less_1 = tslib_1.__importDefault(require("./json-widget.module.less"));
|
|
9
|
-
const CheckboxWidget = (props) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
const { disabled, formContext, id, label, hideLabel, onBlur, onChange, onFocus, readonly, value, registry, options, schema, uiSchema, } = props;
|
|
12
|
-
const { readonlyAsDisabled = true } = formContext;
|
|
13
|
-
const DescriptionFieldTemplate = (0, utils_1.getTemplate)('DescriptionFieldTemplate', registry, options);
|
|
14
|
-
const handleChange = ({ target }) => onChange(target.checked);
|
|
15
|
-
const handleBlur = ({ target }) => onBlur(id, target.checked);
|
|
16
|
-
const handleFocus = ({ target }) => onFocus(id, target.checked);
|
|
17
|
-
const extraProps = {
|
|
18
|
-
onBlur: !readonly ? handleBlur : undefined,
|
|
19
|
-
onFocus: !readonly ? handleFocus : undefined,
|
|
20
|
-
};
|
|
21
|
-
const description = (_b = (_a = options.description) !== null && _a !== void 0 ? _a : schema.description) !== null && _b !== void 0 ? _b : schema.markdownDescription;
|
|
22
|
-
return (react_1.default.createElement("div", { className: json_widget_module_less_1.default.checkbox_widget_control },
|
|
23
|
-
!hideLabel && (react_1.default.createElement("label", { title: label, className: json_widget_module_less_1.default.field_label }, label)),
|
|
24
|
-
react_1.default.createElement(ide_components_1.CheckBox, Object.assign({ checked: typeof value === 'undefined' ? false : value, disabled: disabled || (readonlyAsDisabled && readonly), id: id, name: id, onChange: !readonly ? handleChange : undefined }, extraProps, { "aria-describedby": (0, utils_1.ariaDescribedByIds)(id), label: description, className: json_widget_module_less_1.default.checkbox }))));
|
|
25
|
-
};
|
|
26
|
-
exports.CheckboxWidget = CheckboxWidget;
|
|
27
|
-
//# sourceMappingURL=checkbox-widget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-widget.js","sourceRoot":"","sources":["../../../../src/browser/preferences/components/checkbox-widget.tsx"],"names":[],"mappings":";;;;AAAA,uCAUqB;AACrB,0DAA0C;AAE1C,6DAAoD;AAGpD,gGAA+C;AAExC,MAAM,cAAc,GAAG,CAC5B,KAA2B,EAC3B,EAAE;;IACF,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,EAAE,EACF,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,kBAAkB,GAAG,IAAI,EAAE,GAAG,WAAgC,CAAC;IACvE,MAAM,wBAAwB,GAAG,IAAA,mBAAW,EAC1C,0BAA0B,EAC1B,QAAQ,EACR,OAAO,CACR,CAAC;IAEF,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnE,MAAM,UAA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
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FieldProps, GenericObjectType, RJSFSchema } from '@rjsf/utils';
|
|
3
|
-
export declare const AnyOfField: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends GenericObjectType = any>(props: FieldProps<T, S, F>) => JSX.Element;
|
|
4
|
-
//# sourceMappingURL=any-of-field.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"any-of-field.d.ts","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/any-of-field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EAEV,iBAAiB,EAEjB,UAAU,EAGX,MAAM,aAAa,CAAC;AASrB,eAAO,MAAM,UAAU,mJAuEtB,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnyOfField = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const utils_1 = require("@rjsf/utils");
|
|
6
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
-
const ide_components_1 = require("@opensumi/ide-components");
|
|
8
|
-
const json_widget_module_less_1 = tslib_1.__importDefault(require("../json-widget.module.less"));
|
|
9
|
-
// 对于 anyof/oneof 的处理统一使用 input
|
|
10
|
-
const AnyOfField = (props) => {
|
|
11
|
-
var _a, _b;
|
|
12
|
-
const { disabled, formContext, idSchema, onBlur, id, onChange, onFocus, options, placeholder, readonly, registry, name, required, schema, uiOptions, } = props;
|
|
13
|
-
const { readonlyAsDisabled = true } = formContext;
|
|
14
|
-
const handleTextChange = ({ target }) => onChange(target.value === '' ? options.emptyValue : target.value);
|
|
15
|
-
const handleBlur = ({ target }) => onBlur(id, target.value);
|
|
16
|
-
const handleFocus = ({ target }) => onFocus(id, target.value);
|
|
17
|
-
const description = (_b = (_a = options.description) !== null && _a !== void 0 ? _a : schema.description) !== null && _b !== void 0 ? _b : schema.markdownDescription;
|
|
18
|
-
const TitleFieldTemplate = (0, utils_1.getTemplate)('TitleFieldTemplate', registry, uiOptions);
|
|
19
|
-
const DescriptionFieldTemplate = (0, utils_1.getTemplate)('DescriptionFieldTemplate', registry, uiOptions);
|
|
20
|
-
return (react_1.default.createElement("div", { className: json_widget_module_less_1.default.any_of_widget_control },
|
|
21
|
-
name && (react_1.default.createElement("div", { className: json_widget_module_less_1.default.object_title },
|
|
22
|
-
react_1.default.createElement(TitleFieldTemplate, { id: (0, utils_1.titleId)(idSchema), title: name, required: required, schema: schema, registry: registry }))),
|
|
23
|
-
description && (react_1.default.createElement("div", { className: json_widget_module_less_1.default.object_description },
|
|
24
|
-
react_1.default.createElement(DescriptionFieldTemplate, { id: (0, utils_1.descriptionId)(idSchema), description: description, schema: schema, registry: registry }))),
|
|
25
|
-
react_1.default.createElement(ide_components_1.Input, { disabled: disabled || (readonlyAsDisabled && readonly), onBlur: !readonly ? handleBlur : undefined, onChange: !readonly ? handleTextChange : undefined, onFocus: !readonly ? handleFocus : undefined, placeholder: placeholder, autoComplete: 'off' })));
|
|
26
|
-
};
|
|
27
|
-
exports.AnyOfField = AnyOfField;
|
|
28
|
-
//# sourceMappingURL=any-of-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"any-of-field.js","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/any-of-field.tsx"],"names":[],"mappings":";;;;AAAA,uCASqB;AACrB,0DAA0B;AAE1B,6DAAiD;AAGjD,iGAAgD;AAEhD,+BAA+B;AACxB,MAAM,UAAU,GAAG,CACxB,KAA0B,EAC1B,EAAE;;IACF,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,MAAM,EACN,EAAE,EACF,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,GACV,GAAG,KAAK,CAAC;IACV,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AQ,CAAC,EAC9B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,CACE,CACP;QACD,8BAAC,sBAAK,IACJ,QAAQ,EAAE,QAAQ,IAAI,CAAC,kBAAkB,IAAI,QAAQ,CAAC,EACtD,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,EAClD,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAC5C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAC,KAAK,GAClB,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,UAAU,cAuErB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FieldProps } from '@rjsf/utils';
|
|
3
|
-
import { RJSFSchema } from '@rjsf/utils';
|
|
4
|
-
export declare const ArrayField: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends import("@rjsf/utils").GenericObjectType = any>(props: FieldProps<T, S, F>) => JSX.Element;
|
|
5
|
-
//# sourceMappingURL=array-field.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array-field.d.ts","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/array-field.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAmB,UAAU,EAAoB,MAAM,aAAa,CAAC;AAO5E,eAAO,MAAM,UAAU,yKAetB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ArrayField = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@rjsf/core");
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
-
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
8
|
-
const DefaultArrayField = (0, core_1.getDefaultRegistry)().fields.ArrayField;
|
|
9
|
-
const ArrayField = (props) => {
|
|
10
|
-
const { onChange } = props;
|
|
11
|
-
const handleOnChange = (0, react_1.useCallback)((newFormData) => {
|
|
12
|
-
if (Array.isArray(newFormData)) {
|
|
13
|
-
onChange(newFormData.map((data) => ((0, ide_core_common_1.isUndefined)(data) ? '' : data)));
|
|
14
|
-
}
|
|
15
|
-
}, [onChange]);
|
|
16
|
-
return react_1.default.createElement(DefaultArrayField, Object.assign({}, props, { onChange: handleOnChange }));
|
|
17
|
-
};
|
|
18
|
-
exports.ArrayField = ArrayField;
|
|
19
|
-
//# sourceMappingURL=array-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"array-field.js","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/array-field.tsx"],"names":[],"mappings":";;;;AAAA,qCAAgD;AAGhD,uDAA2C;AAE3C,+DAAwD;AAExD,MAAM,iBAAiB,GAAQ,IAAA,yBAAkB,GAAE,CAAC,MAAM,CAAC,UAAU,CAAC;AAE/D,MAAM,UAAU,GAAG,CACxB,KAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,CAAC,WAAc,EAAE,EAAE;QACjB,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC9B,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAA,6BAAW,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAiB,CAAC,CAAC;SACtF;IACH,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,8BAAC,iBAAiB,oBAAK,KAAK,IAAE,QAAQ,EAAE,cAAc,IAAI,CAAC;AACpE,CAAC,CAAC;AAfW,QAAA,UAAU,cAerB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FieldProps } from '@rjsf/utils';
|
|
3
|
-
import { RJSFSchema } from '@rjsf/utils';
|
|
4
|
-
export declare const ObjectField: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends import("@rjsf/utils").GenericObjectType = any>(props: FieldProps<T, S, F>) => JSX.Element;
|
|
5
|
-
//# sourceMappingURL=object-filed.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-filed.d.ts","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/object-filed.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAmB,UAAU,EAAoB,MAAM,aAAa,CAAC;AAW5E,eAAO,MAAM,WAAW,yKAmBvB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectField = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@rjsf/core");
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
-
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
8
|
-
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
9
|
-
const common_1 = require("../../../../common");
|
|
10
|
-
const DefaultObjectField = (0, core_1.getDefaultRegistry)().fields.ObjectField;
|
|
11
|
-
const ObjectField = (props) => {
|
|
12
|
-
const launchService = (0, ide_core_browser_1.useInjectable)(common_1.ILaunchService);
|
|
13
|
-
const { idSchema, onChange } = props;
|
|
14
|
-
(0, react_1.useEffect)(() => {
|
|
15
|
-
const { $id } = idSchema;
|
|
16
|
-
const disabled = new ide_core_common_1.Disposable();
|
|
17
|
-
// 仅处理 root 节点
|
|
18
|
-
if ($id === 'root') {
|
|
19
|
-
disabled.addDispose(launchService.onChangeFormData((newFormData) => onChange(newFormData)));
|
|
20
|
-
}
|
|
21
|
-
return () => disabled.dispose();
|
|
22
|
-
}, [idSchema]);
|
|
23
|
-
return react_1.default.createElement(DefaultObjectField, Object.assign({}, props));
|
|
24
|
-
};
|
|
25
|
-
exports.ObjectField = ObjectField;
|
|
26
|
-
//# sourceMappingURL=object-filed.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object-filed.js","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/object-filed.tsx"],"names":[],"mappings":";;;;AAAA,qCAAgD;AAGhD,uDAAyC;AAEzC,iEAA2D;AAC3D,+DAAuD;AAEvD,+CAAoD;AAGpD,MAAM,kBAAkB,GAAQ,IAAA,yBAAkB,GAAE,CAAC,MAAM,CAAC,WAAW,CAAC;AAEjE,MAAM,WAAW,GAAG,CACzB,KAA0B,EAC1B,EAAE;IACF,MAAM,aAAa,GAAG,IAAA,gCAAa,EAAgB,uBAAc,CAAC,CAAC;IACnE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAErC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,4BAAU,EAAE,CAAC;QAElC,cAAc;QACd,IAAI,GAAG,KAAK,MAAM,EAAE;YAClB,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAgB,CAAC,CAAC,CAAC,CAAC;SAClG;QAED,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAClC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,8BAAC,kBAAkB,oBAAK,KAAK,EAAI,CAAC;AAC3C,CAAC,CAAC;AAnBW,QAAA,WAAW,eAmBtB"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TitleFieldProps, RJSFSchema } from '@rjsf/utils';
|
|
3
|
-
export declare const TitleField: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends import("@rjsf/utils").GenericObjectType = any>(props: TitleFieldProps<T, S, F>) => JSX.Element | null;
|
|
4
|
-
//# sourceMappingURL=title-field.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"title-field.d.ts","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/title-field.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmB,eAAe,EAAE,UAAU,EAAoB,MAAM,aAAa,CAAC;AAK7F,eAAO,MAAM,UAAU,qLAUtB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TitleField = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const json_widget_module_less_1 = tslib_1.__importDefault(require("../json-widget.module.less"));
|
|
7
|
-
const TitleField = (props) => {
|
|
8
|
-
const { title } = props;
|
|
9
|
-
return title ? (react_1.default.createElement("label", { title: title, className: json_widget_module_less_1.default.field_label }, title)) : null;
|
|
10
|
-
};
|
|
11
|
-
exports.TitleField = TitleField;
|
|
12
|
-
//# sourceMappingURL=title-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"title-field.js","sourceRoot":"","sources":["../../../../../src/browser/preferences/components/fields/title-field.tsx"],"names":[],"mappings":";;;;AACA,0DAA0B;AAE1B,iGAAgD;AAEzC,MAAM,UAAU,GAAG,CACxB,KAA+B,EAC/B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,yCAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,iCAAM,CAAC,WAAW,IAC/C,KAAK,CACA,CACT,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAVW,QAAA,UAAU,cAUrB"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
@max_width: 500px;
|
|
2
|
-
@min_width: 300px;
|
|
3
|
-
|
|
4
|
-
.select_widget_control,
|
|
5
|
-
.text_widget_control,
|
|
6
|
-
.any_of_widget_control {
|
|
7
|
-
min-width: @min_width;
|
|
8
|
-
max-width: @max_width;
|
|
9
|
-
width: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.text_widget_control {
|
|
13
|
-
input[type='number']::-webkit-outer-spin-button,
|
|
14
|
-
input[type='number']::-webkit-inner-spin-button {
|
|
15
|
-
-webkit-appearance: none;
|
|
16
|
-
margin: 0;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.checkbox_widget_control {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
|
|
24
|
-
.checkbox {
|
|
25
|
-
font-size: 14px;
|
|
26
|
-
opacity: 0.75;
|
|
27
|
-
white-space: pre-wrap;
|
|
28
|
-
color: var(--descriptionForeground);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.field_label {
|
|
33
|
-
margin-bottom: 10px;
|
|
34
|
-
font-size: 1.5em;
|
|
35
|
-
display: inline-block;
|
|
36
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
3
|
-
export declare const SelectWidget: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends import("@rjsf/utils").GenericObjectType = any>(props: WidgetProps<T, S, F>) => JSX.Element;
|
|
4
|
-
//# sourceMappingURL=select-widget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select-widget.d.ts","sourceRoot":"","sources":["../../../../src/browser/preferences/components/select-widget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAIL,UAAU,EAGV,WAAW,EACZ,MAAM,aAAa,CAAC;AAOrB,eAAO,MAAM,YAAY,0KAoDxB,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectWidget = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const utils_1 = require("@rjsf/utils");
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
-
const ide_components_1 = require("@opensumi/ide-components");
|
|
8
|
-
const json_widget_module_less_1 = tslib_1.__importDefault(require("./json-widget.module.less"));
|
|
9
|
-
const SelectWidget = (props) => {
|
|
10
|
-
const { schema, value, id, registry, uiOptions, name, required, onChange } = props;
|
|
11
|
-
const description = schema.description;
|
|
12
|
-
const TitleFieldTemplate = (0, utils_1.getTemplate)('TitleFieldTemplate', registry, uiOptions);
|
|
13
|
-
const DescriptionFieldTemplate = (0, utils_1.getTemplate)('DescriptionFieldTemplate', registry, uiOptions);
|
|
14
|
-
const enumValue = (0, react_1.useMemo)(() => {
|
|
15
|
-
if (schema && schema.enum) {
|
|
16
|
-
return schema.enum;
|
|
17
|
-
}
|
|
18
|
-
return [];
|
|
19
|
-
}, [schema, schema.enum]);
|
|
20
|
-
return (react_1.default.createElement("div", { className: json_widget_module_less_1.default.select_widget_control },
|
|
21
|
-
name && (react_1.default.createElement("div", { className: json_widget_module_less_1.default.object_title },
|
|
22
|
-
react_1.default.createElement(TitleFieldTemplate, { id: (0, utils_1.titleId)(id), title: name, required: required, schema: schema, registry: registry }))),
|
|
23
|
-
description && (react_1.default.createElement("div", { className: json_widget_module_less_1.default.object_description },
|
|
24
|
-
react_1.default.createElement(DescriptionFieldTemplate, { id: (0, utils_1.descriptionId)(id), description: description, schema: schema, registry: registry }))),
|
|
25
|
-
react_1.default.createElement(ide_components_1.Select, { key: id, value: value, dropdownRenderType: 'absolute', onChange: onChange }, enumValue.map((data) => (react_1.default.createElement(ide_components_1.Option, { value: data, label: data, key: data }, data))))));
|
|
26
|
-
};
|
|
27
|
-
exports.SelectWidget = SelectWidget;
|
|
28
|
-
//# sourceMappingURL=select-widget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select-widget.js","sourceRoot":"","sources":["../../../../src/browser/preferences/components/select-widget.tsx"],"names":[],"mappings":";;;;AAAA,uCAQqB;AACrB,uDAAuC;AAEvC,6DAA0D;AAE1D,gGAA+C;AAExC,MAAM,YAAY,GAAG,CAC1B,KAA2B,EAC3B,EAAE;IACF,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnF,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAEvC,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EAAgC,oBAAoB,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACjH,MAAM,wBAAwB,GAAG,IAAA,mBAAW,EAC1C,0BAA0B,EAC1B,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC7B,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;YACzB,OAAO,MAAM,CAAC,IAAI,CAAC;SACpB;QACD,OAAO,EAAE,CAAC;IACZ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAE1B,OAAO,CACL,uCAAK,SAAS,EAAE,iCAAM,CAAC,qBAAqB;QACzC,IAAI,IAAI,CACP,uCAAK,SAAS,EAAE,iCAAM,CAAC,YAAY;YACjC,8BAAC,kBAAkB,IACjB,EAAE,EAAE,IAAA,eAAO,EAAI,EAAE,CAAC,EAClB,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,CACE,CACP;QACA,WAAW,IAAI,CACd,uCAAK,SAAS,EAAE,iCAAM,CAAC,kBAAkB;YACvC,8BAAC,wBAAwB,IACvB,EAAE,EAAE,IAAA,qBAAa,EAAI,EAAE,CAAC,EACxB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,GAClB,CACE,CACP;QACD,8BAAC,uBAAM,IAAC,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAC,UAAU,EAAC,QAAQ,EAAE,QAAQ,IAC5E,SAAS,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,CAC/B,8BAAC,uBAAM,IAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,IACxC,IAAI,CACE,CACV,CAAC,CACK,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AApDW,QAAA,YAAY,gBAoDvB"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GenericObjectType, RJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
3
|
-
export declare const TextWidget: <T = any, S extends import("json-schema").JSONSchema7 = RJSFSchema, F extends GenericObjectType = any>(props: WidgetProps<T, S, F>) => JSX.Element;
|
|
4
|
-
//# sourceMappingURL=text-widget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-widget.d.ts","sourceRoot":"","sources":["../../../../src/browser/preferences/components/text-widget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,iBAAiB,EAEjB,UAAU,EAGV,WAAW,EACZ,MAAM,aAAa,CAAC;AASrB,eAAO,MAAM,UAAU,oJA+FtB,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextWidget = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const utils_1 = require("@rjsf/utils");
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
-
const ide_components_1 = require("@opensumi/ide-components");
|
|
8
|
-
const debugUtils_1 = require("../../debugUtils");
|
|
9
|
-
const json_widget_module_less_1 = tslib_1.__importDefault(require("./json-widget.module.less"));
|
|
10
|
-
const TextWidget = (props) => {
|
|
11
|
-
const { disabled, formContext, id, onBlur, onChange, onFocus, options, placeholder, readonly, schema, value, registry, label, hideLabel, required, uiSchema, uiOptions, } = props;
|
|
12
|
-
const { readonlyAsDisabled = true } = formContext;
|
|
13
|
-
const TitleFieldTemplate = (0, utils_1.getTemplate)('TitleFieldTemplate', registry, uiOptions);
|
|
14
|
-
const DescriptionFieldTemplate = (0, utils_1.getTemplate)('DescriptionFieldTemplate', registry, uiOptions);
|
|
15
|
-
const parseValue = (0, react_1.useMemo)(() => {
|
|
16
|
-
if (typeof value !== 'string') {
|
|
17
|
-
return value;
|
|
18
|
-
}
|
|
19
|
-
return (0, debugUtils_1.parseSnippet)(value);
|
|
20
|
-
}, [value]);
|
|
21
|
-
const handleBlur = ({ target }) => {
|
|
22
|
-
onChange(target.value === '' ? options.emptyValue : target.value);
|
|
23
|
-
onBlur(id, target.value);
|
|
24
|
-
};
|
|
25
|
-
const handleFocus = ({ target }) => onFocus(id, target.value);
|
|
26
|
-
const type = (0, react_1.useMemo)(() => {
|
|
27
|
-
if (schema.type !== 'string' && schema.type !== 'number') {
|
|
28
|
-
return 'string';
|
|
29
|
-
}
|
|
30
|
-
return schema.type;
|
|
31
|
-
}, [schema, schema.type]);
|
|
32
|
-
const description = (0, react_1.useMemo)(() => schema.description || '', [schema, schema.description]);
|
|
33
|
-
return (react_1.default.createElement("div", null,
|
|
34
|
-
!hideLabel && label && (react_1.default.createElement("div", { className: json_widget_module_less_1.default.object_title },
|
|
35
|
-
react_1.default.createElement(TitleFieldTemplate, { id: (0, utils_1.titleId)(id), title: label, required: required, schema: schema, uiSchema: uiSchema, registry: registry }))),
|
|
36
|
-
description && (react_1.default.createElement("div", { className: json_widget_module_less_1.default.object_description },
|
|
37
|
-
react_1.default.createElement(DescriptionFieldTemplate, { id: (0, utils_1.descriptionId)(id), description: description, schema: schema, uiSchema: uiSchema, registry: registry }))),
|
|
38
|
-
react_1.default.createElement(ide_components_1.Input, { disabled: disabled || (readonlyAsDisabled && readonly), id: id, name: id, onBlur: !readonly ? handleBlur : undefined, onFocus: !readonly ? handleFocus : undefined, placeholder: placeholder, type: type, value: parseValue, className: json_widget_module_less_1.default.text_widget_control, autoComplete: 'off' })));
|
|
39
|
-
};
|
|
40
|
-
exports.TextWidget = TextWidget;
|
|
41
|
-
//# sourceMappingURL=text-widget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-widget.js","sourceRoot":"","sources":["../../../../src/browser/preferences/components/text-widget.tsx"],"names":[],"mappings":";;;;AAAA,uCASqB;AACrB,uDAAuC;AAEvC,6DAAiD;AAEjD,iDAAgD;AAEhD,gGAA+C;AAExC,MAAM,UAAU,GAAG,CACxB,KAA2B,EAC3B,EAAE;IACF,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,EAAE,EACF,MAAM,EACN,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,GAAG,KAAK,CAAC;IACV,MAAM,E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5
|
-
height: 100%;
|
|
6
|
-
font-size: @base-font-size;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
padding: 16px 16px 0 16px;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
min-width: 500px;
|
|
11
|
-
|
|
12
|
-
.no_onfiguration {
|
|
13
|
-
padding: 0 16px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.launch_panel {
|
|
17
|
-
height: 100%;
|
|
18
|
-
margin-top: 8px;
|
|
19
|
-
|
|
20
|
-
.launch_indexes_container {
|
|
21
|
-
height: 100%;
|
|
22
|
-
margin-right: 16px;
|
|
23
|
-
.not_configuration_content {
|
|
24
|
-
text-align: center;
|
|
25
|
-
font-size: @small-base-font-size;
|
|
26
|
-
}
|
|
27
|
-
.configuration_items_box {
|
|
28
|
-
height: calc(100% - 50px) !important;
|
|
29
|
-
.configuration_item {
|
|
30
|
-
height: 26px;
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
flex-direction: row;
|
|
35
|
-
padding: 4px 8px;
|
|
36
|
-
|
|
37
|
-
&:hover {
|
|
38
|
-
background: var(--list-hoverBackground);
|
|
39
|
-
color: var(--list-hoverForeground);
|
|
40
|
-
}
|
|
41
|
-
&.selected {
|
|
42
|
-
background: var(--kt-tree-inactiveSelectionBackground);
|
|
43
|
-
color: var(--list-activeSelectionForeground);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.configuration_wrapper {
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
text-overflow: ellipsis;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
flex: 1;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.configuration_description {
|
|
54
|
-
display: inline;
|
|
55
|
-
font-size: 12px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
.foot_box {
|
|
60
|
-
position: relative;
|
|
61
|
-
z-index: 1;
|
|
62
|
-
.button {
|
|
63
|
-
width: 100%;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.launch_schema_body_container {
|
|
69
|
-
overflow: auto;
|
|
70
|
-
height: 100%;
|
|
71
|
-
padding: 0 16px 22px 0px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.devider {
|
|
77
|
-
box-sizing: border-box;
|
|
78
|
-
font-size: 14px;
|
|
79
|
-
font-variant: tabular-nums;
|
|
80
|
-
list-style: none;
|
|
81
|
-
font-feature-settings: 'tnum';
|
|
82
|
-
position: relative;
|
|
83
|
-
margin: 0 3px;
|
|
84
|
-
display: inline-block;
|
|
85
|
-
vertical-align: middle;
|
|
86
|
-
&:after {
|
|
87
|
-
content: '';
|
|
88
|
-
display: block;
|
|
89
|
-
position: absolute;
|
|
90
|
-
top: 0px;
|
|
91
|
-
left: 0px;
|
|
92
|
-
width: 100%;
|
|
93
|
-
height: 100%;
|
|
94
|
-
border-top: 0;
|
|
95
|
-
border-left: 1px solid var(--editorGroup-border);
|
|
96
|
-
pointer-events: none;
|
|
97
|
-
transform: translateX(1.5px);
|
|
98
|
-
}
|
|
99
|
-
&:hover:after {
|
|
100
|
-
border-color: transparent;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IChangeEvent } from '@rjsf/core';
|
|
2
|
-
import { StrictRJSFSchema } from '@rjsf/utils';
|
|
3
|
-
import { Event, IJSONSchema, URI } from '@opensumi/ide-core-common';
|
|
4
|
-
import { ILaunchService } from '../../common/debug-service';
|
|
5
|
-
type TFormData = {
|
|
6
|
-
[key in string]: any;
|
|
7
|
-
};
|
|
8
|
-
export declare class LaunchService implements ILaunchService {
|
|
9
|
-
private readonly fileSystem;
|
|
10
|
-
private readonly _onRawSchemaProperties;
|
|
11
|
-
readonly onRawSchemaProperties: Event<IJSONSchema>;
|
|
12
|
-
private readonly _onChangeSchema;
|
|
13
|
-
readonly onChangeSchema: Event<StrictRJSFSchema>;
|
|
14
|
-
private readonly _onChangeFormData;
|
|
15
|
-
readonly onChangeFormData: Event<TFormData>;
|
|
16
|
-
private _rawSchemaProperties;
|
|
17
|
-
private _schema;
|
|
18
|
-
private _formData;
|
|
19
|
-
get rawSchemaProperties(): IJSONSchema;
|
|
20
|
-
get schema(): StrictRJSFSchema;
|
|
21
|
-
get formData(): TFormData;
|
|
22
|
-
setRawSchemaProperties(sp: IJSONSchema): void;
|
|
23
|
-
nextNewSchema(data: StrictRJSFSchema): void;
|
|
24
|
-
nextNewFormData(data: TFormData, isEmit?: boolean): void;
|
|
25
|
-
addNewItem(name: string): void;
|
|
26
|
-
delItem(name: string): void;
|
|
27
|
-
private readResourceContent;
|
|
28
|
-
modifyConfigurationsInResource(resource: URI, data: IChangeEvent, index: number): Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=launch.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"launch.service.d.ts","sourceRoot":"","sources":["../../../src/browser/preferences/launch.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAqB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKlE,OAAO,EAAW,KAAK,EAAY,WAAW,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAGvF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,KAAK,SAAS,GAAG;KAAG,GAAG,IAAI,MAAM,GAAG,GAAG;CAAE,CAAC;AAG1C,qBACa,aAAc,YAAW,cAAc;IAElD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAEhD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA8B;IACrE,SAAgB,qBAAqB,EAAE,KAAK,CAAC,WAAW,CAAC,CAAqC;IAE9F,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmC;IACnE,SAAgB,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAA8B;IAErF,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,SAAgB,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAgC;IAElF,OAAO,CAAC,oBAAoB,CAAc;IAC1C,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,SAAS,CAAY;IAE7B,IAAW,mBAAmB,IAAI,WAAW,CAE5C;IACD,IAAW,MAAM,IAAI,gBAAgB,CAEpC;IACD,IAAW,QAAQ,IAAI,SAAS,CAE/B;IAEM,sBAAsB,CAAC,EAAE,EAAE,WAAW;IAKtC,aAAa,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAK3C,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,UAAO,GAAG,IAAI;IAOrD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAiB9B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;YAepB,mBAAmB;IASpB,8BAA8B,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAgC7G"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LaunchService = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsoncparser = tslib_1.__importStar(require("jsonc-parser"));
|
|
6
|
-
const set_1 = tslib_1.__importDefault(require("lodash/set"));
|
|
7
|
-
const di_1 = require("@opensumi/di");
|
|
8
|
-
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
9
|
-
const ide_file_service_1 = require("@opensumi/ide-file-service");
|
|
10
|
-
const CONFIGURATIONS_FIELD = 'configurations';
|
|
11
|
-
let LaunchService = class LaunchService {
|
|
12
|
-
constructor() {
|
|
13
|
-
this._onRawSchemaProperties = new ide_core_common_1.Emitter();
|
|
14
|
-
this.onRawSchemaProperties = this._onRawSchemaProperties.event;
|
|
15
|
-
this._onChangeSchema = new ide_core_common_1.Emitter();
|
|
16
|
-
this.onChangeSchema = this._onChangeSchema.event;
|
|
17
|
-
this._onChangeFormData = new ide_core_common_1.Emitter();
|
|
18
|
-
this.onChangeFormData = this._onChangeFormData.event;
|
|
19
|
-
}
|
|
20
|
-
get rawSchemaProperties() {
|
|
21
|
-
return this._rawSchemaProperties;
|
|
22
|
-
}
|
|
23
|
-
get schema() {
|
|
24
|
-
return this._schema;
|
|
25
|
-
}
|
|
26
|
-
get formData() {
|
|
27
|
-
return this._formData;
|
|
28
|
-
}
|
|
29
|
-
setRawSchemaProperties(sp) {
|
|
30
|
-
this._rawSchemaProperties = sp;
|
|
31
|
-
this._onRawSchemaProperties.fire(sp);
|
|
32
|
-
}
|
|
33
|
-
nextNewSchema(data) {
|
|
34
|
-
this._schema = data;
|
|
35
|
-
this._onChangeSchema.fire(data);
|
|
36
|
-
}
|
|
37
|
-
nextNewFormData(data, isEmit = true) {
|
|
38
|
-
this._formData = data;
|
|
39
|
-
if (isEmit) {
|
|
40
|
-
this._onChangeFormData.fire(data);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
addNewItem(name) {
|
|
44
|
-
if (name === '') {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const { properties } = this.rawSchemaProperties;
|
|
48
|
-
const newFormData = Object.assign({}, this.formData);
|
|
49
|
-
const preSchemaValue = properties[name];
|
|
50
|
-
(0, set_1.default)(newFormData, name, preSchemaValue['default'] || '');
|
|
51
|
-
(0, set_1.default)(this.schema.properties, name, preSchemaValue);
|
|
52
|
-
this.nextNewSchema(this.schema);
|
|
53
|
-
this.nextNewFormData(newFormData);
|
|
54
|
-
}
|
|
55
|
-
delItem(name) {
|
|
56
|
-
if (name === '') {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const { properties } = this.schema;
|
|
60
|
-
const newFormData = Object.assign({}, this.formData);
|
|
61
|
-
delete newFormData[name];
|
|
62
|
-
delete properties[name];
|
|
63
|
-
this.nextNewSchema(this.schema);
|
|
64
|
-
this.nextNewFormData(newFormData);
|
|
65
|
-
}
|
|
66
|
-
async readResourceContent(resource) {
|
|
67
|
-
try {
|
|
68
|
-
const { content } = await this.fileSystem.readFile(resource.toString());
|
|
69
|
-
return content.toString();
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
return '';
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
async modifyConfigurationsInResource(resource, data, index) {
|
|
76
|
-
const stat = await this.fileSystem.getFileStat(resource.toString());
|
|
77
|
-
if (stat && stat.type === ide_core_common_1.FileType.File) {
|
|
78
|
-
const { formData } = data;
|
|
79
|
-
const fileContent = await this.readResourceContent(resource);
|
|
80
|
-
const parseContent = jsoncparser.parse(fileContent);
|
|
81
|
-
const preConfigurations = parseContent[CONFIGURATIONS_FIELD];
|
|
82
|
-
if (!preConfigurations) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (Array.isArray(preConfigurations) && preConfigurations.length - 1 >= index) {
|
|
86
|
-
preConfigurations.splice(index, 1, formData);
|
|
87
|
-
}
|
|
88
|
-
const edits = jsoncparser.modify(fileContent, [CONFIGURATIONS_FIELD], preConfigurations, {
|
|
89
|
-
isArrayInsertion: false,
|
|
90
|
-
formattingOptions: {
|
|
91
|
-
tabSize: 2,
|
|
92
|
-
insertSpaces: true,
|
|
93
|
-
eol: '\n',
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
const newContent = jsoncparser.applyEdits(fileContent, edits);
|
|
97
|
-
await this.fileSystem.setContent(stat, newContent);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
tslib_1.__decorate([
|
|
102
|
-
(0, di_1.Autowired)(ide_file_service_1.IFileServiceClient),
|
|
103
|
-
tslib_1.__metadata("design:type", Object)
|
|
104
|
-
], LaunchService.prototype, "fileSystem", void 0);
|
|
105
|
-
LaunchService = tslib_1.__decorate([
|
|
106
|
-
(0, di_1.Injectable)()
|
|
107
|
-
], LaunchService);
|
|
108
|
-
exports.LaunchService = LaunchService;
|
|
109
|
-
//# sourceMappingURL=launch.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"launch.service.js","sourceRoot":"","sources":["../../../src/browser/preferences/launch.service.ts"],"names":[],"mappings":";;;;AAEA,kEAA4C;AAC5C,6DAAmC;AAEnC,qCAAqD;AACrD,+DAAuF;AACvF,iEAAgE;AAKhE,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAAnB;QAIY,2BAAsB,GAAG,IAAI,yBAAO,EAAe,CAAC;QACrD,0BAAqB,GAAuB,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC;QAE7E,oBAAe,GAAG,IAAI,yBAAO,EAAoB,CAAC;QACnD,mBAAc,GAA4B,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;QAEpE,sBAAiB,GAAG,IAAI,yBAAO,EAAa,CAAC;QAC9C,qBAAgB,GAAqB,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;IA0GpF,CAAC;IApGC,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,oBAAoB,CAAC;IACnC,CAAC;IACD,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAEM,sBAAsB,CAAC,EAAe;QAC3C,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IAEM,aAAa,CAAC,IAAsB;QACzC,IAAI,CA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