@jbrowse/plugin-config 1.7.11 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.d.ts +10 -7
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.js +117 -115
- package/dist/ConfigurationEditorWidget/components/CallbackEditor.js.map +1 -0
- package/dist/ConfigurationEditorWidget/components/ColorEditor.d.ts +9 -33
- package/dist/ConfigurationEditorWidget/components/ColorEditor.js +68 -117
- package/dist/ConfigurationEditorWidget/components/ColorEditor.js.map +1 -0
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +7 -3
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +117 -160
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js.map +1 -0
- package/dist/ConfigurationEditorWidget/components/JsonEditor.d.ts +9 -7
- package/dist/ConfigurationEditorWidget/components/JsonEditor.js +92 -77
- package/dist/ConfigurationEditorWidget/components/JsonEditor.js.map +1 -0
- package/dist/ConfigurationEditorWidget/components/SlotEditor.d.ts +17 -5
- package/dist/ConfigurationEditorWidget/components/SlotEditor.js +240 -374
- package/dist/ConfigurationEditorWidget/components/SlotEditor.js.map +1 -0
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +76 -105
- package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js.map +1 -0
- package/dist/ConfigurationEditorWidget/components/TypeSelector.d.ts +8 -6
- package/dist/ConfigurationEditorWidget/components/TypeSelector.js +16 -46
- package/dist/ConfigurationEditorWidget/components/TypeSelector.js.map +1 -0
- package/dist/ConfigurationEditorWidget/index.d.ts +10 -3
- package/dist/ConfigurationEditorWidget/index.js +26 -42
- package/dist/ConfigurationEditorWidget/index.js.map +1 -0
- package/dist/ConfigurationEditorWidget/model.d.ts +3 -2
- package/dist/ConfigurationEditorWidget/model.js +19 -26
- package/dist/ConfigurationEditorWidget/model.js.map +1 -0
- package/dist/FromConfigAdapter/FromConfigAdapter.js +172 -204
- package/dist/FromConfigAdapter/FromConfigAdapter.js.map +1 -0
- package/dist/FromConfigAdapter/FromConfigRegionsAdapter.js +151 -142
- package/dist/FromConfigAdapter/FromConfigRegionsAdapter.js.map +1 -0
- package/dist/FromConfigAdapter/FromConfigSequenceAdapter.d.ts +2 -1
- package/dist/FromConfigAdapter/FromConfigSequenceAdapter.js +174 -181
- package/dist/FromConfigAdapter/FromConfigSequenceAdapter.js.map +1 -0
- package/dist/FromConfigAdapter/configSchema.js +33 -49
- package/dist/FromConfigAdapter/configSchema.js.map +1 -0
- package/dist/FromConfigAdapter/index.js +16 -50
- package/dist/FromConfigAdapter/index.js.map +1 -0
- package/dist/RefNameAliasAdapter/RefNameAliasAdapter.js +111 -125
- package/dist/RefNameAliasAdapter/RefNameAliasAdapter.js.map +1 -0
- package/dist/RefNameAliasAdapter/configSchema.js +16 -25
- package/dist/RefNameAliasAdapter/configSchema.js.map +1 -0
- package/dist/RefNameAliasAdapter/index.js +10 -22
- package/dist/RefNameAliasAdapter/index.js.map +1 -0
- package/dist/index.d.ts +9 -3
- package/dist/index.js +129 -144
- package/dist/index.js.map +1 -0
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.d.ts +12 -0
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.js +80 -0
- package/esm/ConfigurationEditorWidget/components/CallbackEditor.js.map +1 -0
- package/esm/ConfigurationEditorWidget/components/ColorEditor.d.ts +20 -0
- package/esm/ConfigurationEditorWidget/components/ColorEditor.js +22 -0
- package/esm/ConfigurationEditorWidget/components/ColorEditor.js.map +1 -0
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.d.ts +8 -0
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +87 -0
- package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js.map +1 -0
- package/esm/ConfigurationEditorWidget/components/JsonEditor.d.ts +11 -0
- package/esm/ConfigurationEditorWidget/components/JsonEditor.js +55 -0
- package/esm/ConfigurationEditorWidget/components/JsonEditor.js.map +1 -0
- package/esm/ConfigurationEditorWidget/components/SlotEditor.d.ts +18 -0
- package/esm/ConfigurationEditorWidget/components/SlotEditor.js +182 -0
- package/esm/ConfigurationEditorWidget/components/SlotEditor.js.map +1 -0
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.d.ts +12 -0
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +36 -0
- package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js.map +1 -0
- package/esm/ConfigurationEditorWidget/components/TypeSelector.d.ts +9 -0
- package/esm/ConfigurationEditorWidget/components/TypeSelector.js +12 -0
- package/esm/ConfigurationEditorWidget/components/TypeSelector.js.map +1 -0
- package/esm/ConfigurationEditorWidget/index.d.ts +10 -0
- package/esm/ConfigurationEditorWidget/index.js +21 -0
- package/esm/ConfigurationEditorWidget/index.js.map +1 -0
- package/esm/ConfigurationEditorWidget/model.d.ts +9 -0
- package/esm/ConfigurationEditorWidget/model.js +17 -0
- package/esm/ConfigurationEditorWidget/model.js.map +1 -0
- package/esm/FromConfigAdapter/FromConfigAdapter.d.ts +24 -0
- package/esm/FromConfigAdapter/FromConfigAdapter.js +63 -0
- package/esm/FromConfigAdapter/FromConfigAdapter.js.map +1 -0
- package/esm/FromConfigAdapter/FromConfigRegionsAdapter.d.ts +23 -0
- package/esm/FromConfigAdapter/FromConfigRegionsAdapter.js +50 -0
- package/esm/FromConfigAdapter/FromConfigRegionsAdapter.js.map +1 -0
- package/esm/FromConfigAdapter/FromConfigSequenceAdapter.d.ts +26 -0
- package/esm/FromConfigAdapter/FromConfigSequenceAdapter.js +65 -0
- package/esm/FromConfigAdapter/FromConfigSequenceAdapter.js.map +1 -0
- package/esm/FromConfigAdapter/configSchema.d.ts +3 -0
- package/esm/FromConfigAdapter/configSchema.js +32 -0
- package/esm/FromConfigAdapter/configSchema.js.map +1 -0
- package/esm/FromConfigAdapter/index.d.ts +4 -0
- package/esm/FromConfigAdapter/index.js +5 -0
- package/esm/FromConfigAdapter/index.js.map +1 -0
- package/esm/RefNameAliasAdapter/RefNameAliasAdapter.d.ts +8 -0
- package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js +24 -0
- package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js.map +1 -0
- package/esm/RefNameAliasAdapter/configSchema.d.ts +2 -0
- package/esm/RefNameAliasAdapter/configSchema.js +15 -0
- package/esm/RefNameAliasAdapter/configSchema.js.map +1 -0
- package/esm/RefNameAliasAdapter/index.d.ts +2 -0
- package/esm/RefNameAliasAdapter/index.js +3 -0
- package/esm/RefNameAliasAdapter/index.js.map +1 -0
- package/esm/index.d.ts +18 -0
- package/esm/index.js +72 -0
- package/esm/index.js.map +1 -0
- package/package.json +21 -15
- package/src/ConfigurationEditorWidget/components/CallbackEditor.tsx +126 -0
- package/src/ConfigurationEditorWidget/components/ColorEditor.tsx +13 -60
- package/src/ConfigurationEditorWidget/components/{ConfigurationEditor.test.js → ConfigurationEditor.test.tsx} +0 -0
- package/src/ConfigurationEditorWidget/components/ConfigurationEditor.tsx +173 -0
- package/src/ConfigurationEditorWidget/components/JsonEditor.tsx +84 -0
- package/src/ConfigurationEditorWidget/components/SlotEditor.tsx +484 -0
- package/src/ConfigurationEditorWidget/components/StringArrayEditor.tsx +2 -2
- package/src/ConfigurationEditorWidget/components/{TypeSelector.js → TypeSelector.tsx} +15 -7
- package/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap +2024 -0
- package/src/ConfigurationEditorWidget/index.tsx +25 -0
- package/src/ConfigurationEditorWidget/{model.js → model.ts} +4 -2
- package/src/FromConfigAdapter/FromConfigSequenceAdapter.ts +6 -10
- package/src/index.ts +20 -14
- package/dist/ConfigurationEditorWidget/components/CodeEditor.d.ts +0 -4
- package/dist/ConfigurationEditorWidget/components/CodeEditor.js +0 -80
- package/dist/ConfigurationEditorWidget/components/ColorEditor.test.js +0 -31
- package/dist/ConfigurationEditorWidget/components/ColorPicker.d.ts +0 -14
- package/dist/ConfigurationEditorWidget/components/ColorPicker.js +0 -72
- package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.test.js +0 -121
- package/dist/FromConfigAdapter/FromConfigAdapter.test.js +0 -100
- package/dist/FromConfigAdapter/FromConfigRegionsAdapter.test.js +0 -200
- package/dist/FromConfigAdapter/FromConfigSequenceAdapter.test.js +0 -110
- package/dist/RefNameAliasAdapter/RefNameAliasAdapter.test.js +0 -41
- package/dist/index.test.js +0 -41
- package/src/ConfigurationEditorWidget/components/CallbackEditor.js +0 -112
- package/src/ConfigurationEditorWidget/components/CodeEditor.js +0 -60
- package/src/ConfigurationEditorWidget/components/ColorPicker.tsx +0 -52
- package/src/ConfigurationEditorWidget/components/ConfigurationEditor.js +0 -154
- package/src/ConfigurationEditorWidget/components/JsonEditor.js +0 -56
- package/src/ConfigurationEditorWidget/components/SlotEditor.js +0 -377
- package/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.js.snap +0 -1753
- package/src/ConfigurationEditorWidget/index.js +0 -20
|
@@ -1,176 +1,133 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
30
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
+
if (ar || !(i in from)) {
|
|
32
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
+
ar[i] = from[i];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
var react_1 = __importDefault(require("react"));
|
|
43
|
+
var configuration_1 = require("@jbrowse/core/configuration");
|
|
44
|
+
var material_1 = require("@mui/material");
|
|
45
|
+
var mui_1 = require("tss-react/mui");
|
|
46
|
+
var mobx_react_1 = require("mobx-react");
|
|
47
|
+
var mobx_state_tree_1 = require("mobx-state-tree");
|
|
48
|
+
var pluralize_1 = require("pluralize");
|
|
34
49
|
// icons
|
|
50
|
+
var ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
|
|
35
51
|
// locals
|
|
36
|
-
var
|
|
37
|
-
|
|
52
|
+
var SlotEditor_1 = __importDefault(require("./SlotEditor"));
|
|
53
|
+
var TypeSelector_1 = __importDefault(require("./TypeSelector"));
|
|
54
|
+
var useStyles = (0, mui_1.makeStyles)()(function (theme) { return ({
|
|
38
55
|
expandIcon: {
|
|
39
|
-
|
|
56
|
+
color: '#fff',
|
|
40
57
|
},
|
|
41
58
|
root: {
|
|
42
|
-
|
|
59
|
+
padding: theme.spacing(1, 3, 1, 1),
|
|
43
60
|
},
|
|
44
61
|
expansionPanelDetails: {
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
display: 'block',
|
|
63
|
+
padding: theme.spacing(1),
|
|
47
64
|
},
|
|
48
65
|
accordion: {
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (slot.length) {
|
|
66
|
-
return slot.map(function (subslot, slotIndex) {
|
|
67
|
-
var key = "".concat((0, _pluralize.singular)(slotName), " ").concat(slotIndex + 1);
|
|
68
|
-
return /*#__PURE__*/_react.default.createElement(Member, (0, _extends2.default)({}, props, {
|
|
69
|
-
key: key,
|
|
70
|
-
slot: subslot,
|
|
71
|
-
slotName: key
|
|
72
|
-
}));
|
|
73
|
-
});
|
|
74
|
-
} // if this is an explicitly typed schema, make a type-selecting dropdown
|
|
75
|
-
// that can be used to change its type
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var typeNameChoices = (0, _configuration.getTypeNamesFromExplicitlyTypedUnion)(slotSchema);
|
|
79
|
-
|
|
80
|
-
if (typeNameChoices.length) {
|
|
81
|
-
typeSelector = /*#__PURE__*/_react.default.createElement(_TypeSelector.default, {
|
|
82
|
-
typeNameChoices: typeNameChoices,
|
|
83
|
-
slotName: slotName,
|
|
84
|
-
slot: slot,
|
|
85
|
-
onChange: function onChange(evt) {
|
|
86
|
-
if (evt.target.value !== slot.type) {
|
|
87
|
-
schema.setSubschema(slotName, {
|
|
88
|
-
type: evt.target.value
|
|
66
|
+
border: "1px solid ".concat(theme.palette.text.primary),
|
|
67
|
+
},
|
|
68
|
+
noOverflow: {
|
|
69
|
+
width: '100%',
|
|
70
|
+
overflowX: 'auto',
|
|
71
|
+
},
|
|
72
|
+
}); });
|
|
73
|
+
var Member = (0, mobx_react_1.observer)(function (props) {
|
|
74
|
+
var classes = useStyles().classes;
|
|
75
|
+
var slotName = props.slotName, slotSchema = props.slotSchema, schema = props.schema, _a = props.slot, slot = _a === void 0 ? schema[slotName] : _a, _b = props.path, path = _b === void 0 ? [] : _b;
|
|
76
|
+
var typeSelector;
|
|
77
|
+
if ((0, configuration_1.isConfigurationSchemaType)(slotSchema)) {
|
|
78
|
+
if (slot.length) {
|
|
79
|
+
return slot.map(function (subslot, slotIndex) {
|
|
80
|
+
var key = "".concat((0, pluralize_1.singular)(slotName), " ").concat(slotIndex + 1);
|
|
81
|
+
return react_1.default.createElement(Member, __assign({}, props, { key: key, slot: subslot, slotName: key }));
|
|
89
82
|
});
|
|
90
|
-
}
|
|
91
83
|
}
|
|
92
|
-
|
|
84
|
+
// if this is an explicitly typed schema, make a type-selecting dropdown
|
|
85
|
+
// that can be used to change its type
|
|
86
|
+
var typeNameChoices = (0, configuration_1.getTypeNamesFromExplicitlyTypedUnion)(slotSchema);
|
|
87
|
+
if (typeNameChoices.length) {
|
|
88
|
+
typeSelector = (react_1.default.createElement(TypeSelector_1.default, { typeNameChoices: typeNameChoices, slotName: slotName, slot: slot, onChange: function (evt) {
|
|
89
|
+
if (evt.target.value !== slot.type) {
|
|
90
|
+
schema.setSubschema(slotName, { type: evt.target.value });
|
|
91
|
+
}
|
|
92
|
+
} }));
|
|
93
|
+
}
|
|
94
|
+
return (react_1.default.createElement(material_1.Accordion, { defaultExpanded: true, className: classes.accordion },
|
|
95
|
+
react_1.default.createElement(material_1.AccordionSummary, { expandIcon: react_1.default.createElement(ExpandMore_1.default, { className: classes.expandIcon }) },
|
|
96
|
+
react_1.default.createElement(material_1.Typography, null, __spreadArray(__spreadArray([], __read(path), false), [slotName], false).join('🡒'))),
|
|
97
|
+
react_1.default.createElement(material_1.AccordionDetails, { className: classes.expansionPanelDetails },
|
|
98
|
+
typeSelector,
|
|
99
|
+
react_1.default.createElement(material_1.FormGroup, { className: classes.noOverflow },
|
|
100
|
+
react_1.default.createElement(Schema, { schema: slot, path: __spreadArray(__spreadArray([], __read(path), false), [slotName], false) })))));
|
|
93
101
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
unmountOnExit: true,
|
|
100
|
-
timeout: 150
|
|
101
|
-
}
|
|
102
|
-
}, /*#__PURE__*/_react.default.createElement(_core.AccordionSummary, {
|
|
103
|
-
expandIcon: /*#__PURE__*/_react.default.createElement(_ExpandMore.default, {
|
|
104
|
-
className: classes.expandIcon
|
|
105
|
-
})
|
|
106
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Typography, null, [].concat((0, _toConsumableArray2.default)(path), [slotName]).join('🡒'))), /*#__PURE__*/_react.default.createElement(_core.AccordionDetails, {
|
|
107
|
-
className: classes.expansionPanelDetails
|
|
108
|
-
}, typeSelector, /*#__PURE__*/_react.default.createElement(_core.FormGroup, null, /*#__PURE__*/_react.default.createElement(Schema, {
|
|
109
|
-
schema: slot,
|
|
110
|
-
path: [].concat((0, _toConsumableArray2.default)(path), [slotName])
|
|
111
|
-
}))));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if ((0, _configuration.isConfigurationSlotType)(slotSchema)) {
|
|
115
|
-
// this is a regular config slot
|
|
116
|
-
return /*#__PURE__*/_react.default.createElement(_SlotEditor.default, {
|
|
117
|
-
key: slotName,
|
|
118
|
-
slot: slot,
|
|
119
|
-
slotSchema: slotSchema
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return null;
|
|
102
|
+
if ((0, configuration_1.isConfigurationSlotType)(slotSchema)) {
|
|
103
|
+
// this is a regular config slot
|
|
104
|
+
return react_1.default.createElement(SlotEditor_1.default, { key: slotName, slot: slot, slotSchema: slotSchema });
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
124
107
|
});
|
|
125
|
-
var Schema = (0,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
slotName = _ref3[0],
|
|
133
|
-
slotSchema = _ref3[1];
|
|
134
|
-
|
|
135
|
-
return /*#__PURE__*/_react.default.createElement(Member, {
|
|
136
|
-
key: slotName,
|
|
137
|
-
slotName: slotName,
|
|
138
|
-
slotSchema: slotSchema,
|
|
139
|
-
path: path,
|
|
140
|
-
schema: schema
|
|
141
|
-
});
|
|
142
|
-
});
|
|
108
|
+
var Schema = (0, mobx_react_1.observer)(function (_a) {
|
|
109
|
+
var schema = _a.schema, _b = _a.path, path = _b === void 0 ? [] : _b;
|
|
110
|
+
var properties = (0, mobx_state_tree_1.getMembers)(schema).properties;
|
|
111
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, Object.entries(properties).map(function (_a) {
|
|
112
|
+
var _b = __read(_a, 2), slotName = _b[0], slotSchema = _b[1];
|
|
113
|
+
return (react_1.default.createElement(Member, { key: slotName, slotName: slotName, slotSchema: slotSchema, path: path, schema: schema }));
|
|
114
|
+
})));
|
|
143
115
|
});
|
|
144
|
-
var ConfigurationEditor = (0,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
}, /*#__PURE__*/_react.default.createElement(_core.AccordionSummary, {
|
|
161
|
-
expandIcon: /*#__PURE__*/_react.default.createElement(_ExpandMore.default, {
|
|
162
|
-
className: classes.expandIcon
|
|
163
|
-
})
|
|
164
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Typography, null, name ? name : 'Configuration')), /*#__PURE__*/_react.default.createElement(_core.AccordionDetails, {
|
|
165
|
-
className: classes.expansionPanelDetails,
|
|
166
|
-
"data-testid": "configEditor"
|
|
167
|
-
}, !model.target ? 'no target set' : /*#__PURE__*/_react.default.createElement(Schema, {
|
|
168
|
-
schema: model.target
|
|
169
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
170
|
-
style: {
|
|
171
|
-
height: 300
|
|
172
|
-
}
|
|
173
|
-
}));
|
|
116
|
+
var ConfigurationEditor = (0, mobx_react_1.observer)(function (_a) {
|
|
117
|
+
var model = _a.model;
|
|
118
|
+
var classes = useStyles().classes;
|
|
119
|
+
// key forces a re-render, otherwise the same field can end up being used
|
|
120
|
+
// for different tracks since only the backing model changes for example
|
|
121
|
+
// see pr #804
|
|
122
|
+
var target = model.target;
|
|
123
|
+
var key = target && (0, configuration_1.readConfObject)(target, 'trackId');
|
|
124
|
+
var name = target && (0, configuration_1.readConfObject)(target, 'name');
|
|
125
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
126
|
+
react_1.default.createElement(material_1.Accordion, { key: key, defaultExpanded: true, className: classes.accordion },
|
|
127
|
+
react_1.default.createElement(material_1.AccordionSummary, { expandIcon: react_1.default.createElement(ExpandMore_1.default, { className: classes.expandIcon }) },
|
|
128
|
+
react_1.default.createElement(material_1.Typography, null, name !== null && name !== void 0 ? name : 'Configuration')),
|
|
129
|
+
react_1.default.createElement(material_1.AccordionDetails, { className: classes.expansionPanelDetails, "data-testid": "configEditor" }, !target ? 'no target set' : react_1.default.createElement(Schema, { schema: target }))),
|
|
130
|
+
react_1.default.createElement("div", { style: { height: 300 } })));
|
|
174
131
|
});
|
|
175
|
-
|
|
176
|
-
|
|
132
|
+
exports.default = ConfigurationEditor;
|
|
133
|
+
//# sourceMappingURL=ConfigurationEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurationEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/ConfigurationEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,6DAMoC;AACpC,0CAMsB;AACtB,qCAA0C;AAC1C,yCAAqC;AACrC,mDAAsD;AACtD,uCAAoC;AAEpC,QAAQ;AACR,8EAA2D;AAE3D,SAAS;AACT,4DAAqC;AACrC,gEAAyC;AAEzC,IAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC;IACvC,UAAU,EAAE;QACV,KAAK,EAAE,MAAM;KACd;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KACnC;IACD,qBAAqB,EAAE;QACrB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC1B;IAED,SAAS,EAAE;QACT,MAAM,EAAE,oBAAa,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAE;KAClD;IACD,UAAU,EAAE;QACV,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,EAnBsC,CAmBtC,CAAC,CAAA;AAEH,IAAM,MAAM,GAAG,IAAA,qBAAQ,EACrB,UAAC,KAMA;IACS,IAAA,OAAO,GAAK,SAAS,EAAE,QAAhB,CAAgB;IAE7B,IAAA,QAAQ,GAKN,KAAK,SALC,EACR,UAAU,GAIR,KAAK,W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AA;IACE,IAAA,OAAO,GAAK,SAAS,EAAE,QAAhB,CAAgB;IAC/B,yEAAyE;IACzE,wEAAwE;IACxE,cAAc;IACN,IAAA,MAAM,GAAK,KAAK,OAAV,CAAU;IACxB,IAAM,GAAG,GAAG,MAAM,IAAI,IAAA,8BAAc,EAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACvD,IAAM,IAAI,GAAG,MAAM,IAAI,IAAA,8BAAc,EAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrD,OAAO,CACL;QACE,8BAAC,oBAAS,IAAC,GAAG,EAAE,GAAG,EAAE,eAAe,QAAC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC/D,8BAAC,2BAAgB,IACf,UAAU,EAAE,8BAAC,oBAAc,IAAC,SAAS,EAAE,OAAO,CAAC,UAAU,GAAI;gBAE7D,8BAAC,qBAAU,QAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,eAAe,CAAc,CACjC;YACnB,8BAAC,2BAAgB,IACf,SAAS,EAAE,OAAO,CAAC,qBAAqB,iBAC5B,cAAc,IAEzB,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,8BAAC,MAAM,IAAC,MAAM,EAAE,MAAM,GAAI,CACtC,CACT;QAGZ,uCAAK,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,GAAI,CAC9B,CACJ,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,mBAAmB,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare function JsonEditor({ slot, }: {
|
|
3
|
+
slot: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
value: unknown;
|
|
7
|
+
set: (arg: unknown) => void;
|
|
8
|
+
};
|
|
3
9
|
}): JSX.Element;
|
|
4
|
-
declare
|
|
5
|
-
namespace propTypes {
|
|
6
|
-
const slot: import("prop-types").Validator<any>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
10
|
+
declare const _default: typeof JsonEditor;
|
|
9
11
|
export default _default;
|
|
@@ -1,82 +1,97 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _core = require("@material-ui/core");
|
|
19
|
-
|
|
20
|
-
var _mobxReact = require("mobx-react");
|
|
21
|
-
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
|
-
var useStyles = (0, _core.makeStyles)({
|
|
27
|
-
error: {
|
|
28
|
-
color: 'red',
|
|
29
|
-
fontSize: '0.8em'
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
var CodeEditor = /*#__PURE__*/(0, _react.lazy)(function () {
|
|
33
|
-
return Promise.resolve().then(function () {
|
|
34
|
-
return _interopRequireWildcard(require('./CodeEditor'));
|
|
35
|
-
});
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
36
17
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
49
|
-
error = _useState4[0],
|
|
50
|
-
setError = _useState4[1];
|
|
51
|
-
|
|
52
|
-
var debouncedJson = (0, _util.useDebounce)(contents, 400);
|
|
53
|
-
(0, _react.useEffect)(function () {
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
26
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27
|
+
if (!m) return o;
|
|
28
|
+
var i = m.call(o), r, ar = [], e;
|
|
54
29
|
try {
|
|
55
|
-
|
|
56
|
-
setError(undefined);
|
|
57
|
-
} catch (e) {
|
|
58
|
-
setError(e.message);
|
|
30
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
59
31
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, slot.name), /*#__PURE__*/_react.default.createElement(_react.default.Suspense, {
|
|
69
|
-
fallback: /*#__PURE__*/_react.default.createElement("div", null)
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement(CodeEditor, {
|
|
71
|
-
contents: contents,
|
|
72
|
-
setContents: setContents
|
|
73
|
-
})), /*#__PURE__*/_react.default.createElement(_core.FormHelperText, null, slot.description)));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
JsonEditor.propTypes = {
|
|
77
|
-
slot: _mobxReact.PropTypes.objectOrObservableObject.isRequired
|
|
32
|
+
catch (error) { e = { error: error }; }
|
|
33
|
+
finally {
|
|
34
|
+
try {
|
|
35
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
36
|
+
}
|
|
37
|
+
finally { if (e) throw e.error; }
|
|
38
|
+
}
|
|
39
|
+
return ar;
|
|
78
40
|
};
|
|
79
|
-
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
var material_1 = require("@mui/material");
|
|
44
|
+
var mui_1 = require("tss-react/mui");
|
|
45
|
+
var mobx_react_1 = require("mobx-react");
|
|
46
|
+
// fontSize and fontFamily have to match between Editor and SyntaxHighlighter
|
|
47
|
+
var fontSize = '12px';
|
|
48
|
+
// Optimize by using system default fonts: https://css-tricks.com/snippets/css/font-stacks/
|
|
49
|
+
var fontFamily = 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace';
|
|
50
|
+
var useStyles = (0, mui_1.makeStyles)()(function (theme) { return ({
|
|
51
|
+
error: {
|
|
52
|
+
color: 'red',
|
|
53
|
+
fontSize: '0.8em',
|
|
54
|
+
},
|
|
55
|
+
callbackEditor: {
|
|
56
|
+
fontFamily: fontFamily,
|
|
57
|
+
fontSize: fontSize,
|
|
58
|
+
background: theme.palette.background.default,
|
|
59
|
+
width: 800,
|
|
60
|
+
marginTop: '16px',
|
|
61
|
+
border: '1px solid rgba(0,0,0,0.42)',
|
|
62
|
+
},
|
|
63
|
+
callbackContainer: {
|
|
64
|
+
width: '100%',
|
|
65
|
+
overflowX: 'auto',
|
|
66
|
+
},
|
|
67
|
+
textAreaFont: {
|
|
68
|
+
fontFamily: fontFamily,
|
|
69
|
+
},
|
|
70
|
+
}); });
|
|
71
|
+
function JsonEditor(_a) {
|
|
72
|
+
var slot = _a.slot;
|
|
73
|
+
var classes = useStyles().classes;
|
|
74
|
+
var _b = __read((0, react_1.useState)(JSON.stringify(slot.value, null, 2)), 2), contents = _b[0], setContents = _b[1];
|
|
75
|
+
var _c = __read((0, react_1.useState)(), 2), error = _c[0], setError = _c[1];
|
|
76
|
+
(0, react_1.useEffect)(function () {
|
|
77
|
+
try {
|
|
78
|
+
setError(undefined);
|
|
79
|
+
slot.set(JSON.parse(contents));
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
console.error({ e: e });
|
|
83
|
+
setError(e);
|
|
84
|
+
}
|
|
85
|
+
}, [contents, slot]);
|
|
86
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
87
|
+
error ? react_1.default.createElement("p", { className: classes.error }, "".concat(error)) : null,
|
|
88
|
+
react_1.default.createElement("div", { className: classes.callbackContainer },
|
|
89
|
+
react_1.default.createElement(material_1.InputLabel, { shrink: true, htmlFor: "json-editor" }, slot.name),
|
|
90
|
+
react_1.default.createElement(material_1.TextField, { id: "json-editor", className: classes.callbackEditor, value: contents, helperText: slot.description, multiline: true, onChange: function (event) { return setContents(event.target.value); }, style: { background: error ? '#fdd' : undefined }, InputProps: {
|
|
91
|
+
classes: {
|
|
92
|
+
input: classes.textAreaFont,
|
|
93
|
+
},
|
|
94
|
+
} }))));
|
|
95
|
+
}
|
|
96
|
+
exports.default = (0, mobx_react_1.observer)(JsonEditor);
|
|
97
|
+
//# sourceMappingURL=JsonEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/JsonEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAkD;AAClD,0CAAqD;AACrD,qCAA0C;AAC1C,yCAAqC;AAErC,6EAA6E;AAC7E,IAAM,QAAQ,GAAG,MAAM,CAAA;AACvB,2FAA2F;AAC3F,IAAM,UAAU,GACd,sNAAsN,CAAA;AAExN,IAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,UAAA,KAAK,IAAI,OAAA,CAAC;IACvC,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,OAAO;KAClB;IACD,cAAc,EAAE;QACd,UAAU,YAAA;QACV,QAAQ,UAAA;QACR,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;QAC5C,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,4BAA4B;KACrC;IACD,iBAAiB,EAAE;QACjB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,MAAM;KACl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AQ,EAAE,UAAA,KAAK,IAAI,OAAA,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAA/B,CAA+B,EAClD,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,EACjD,UAAU,EAAE;oBACV,OAAO,EAAE;wBACP,KAAK,EAAE,OAAO,CAAC,YAAY;qBAC5B;iBACF,GACD,CACE,CACL,CACJ,CAAA;AACH,CAAC;AAED,kBAAe,IAAA,qBAAQ,EAAC,UAAU,CAAC,CAAA"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IAnyType } from 'mobx-state-tree';
|
|
3
|
+
export declare const useSlotEditorStyles: (params: void, styleOverrides?: {
|
|
4
|
+
props: {
|
|
5
|
+
classes?: Record<string, string> | undefined;
|
|
6
|
+
} & Record<string, unknown>;
|
|
7
|
+
ownerState?: Record<string, unknown> | undefined;
|
|
8
|
+
} | undefined) => {
|
|
9
|
+
classes: Record<"paper" | "paperContent" | "slotModeSwitch", string>;
|
|
10
|
+
theme: import("@mui/material").Theme;
|
|
11
|
+
css: import("tss-react/types").Css;
|
|
12
|
+
cx: import("tss-react/types").Cx;
|
|
13
|
+
};
|
|
14
|
+
declare const SlotEditor: ({ slot, slotSchema }: {
|
|
4
15
|
slot: any;
|
|
5
|
-
slotSchema:
|
|
6
|
-
})
|
|
16
|
+
slotSchema: IAnyType;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
export default SlotEditor;
|