@jbrowse/plugin-config 2.3.4 → 2.4.1

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 (62) hide show
  1. package/dist/ConfigurationEditorWidget/components/BooleanEditor.d.ts +10 -0
  2. package/dist/ConfigurationEditorWidget/components/BooleanEditor.js +14 -0
  3. package/dist/ConfigurationEditorWidget/components/BooleanEditor.js.map +1 -0
  4. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js +25 -22
  5. package/dist/ConfigurationEditorWidget/components/ConfigurationEditor.js.map +1 -1
  6. package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +5 -0
  7. package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.js +19 -0
  8. package/dist/ConfigurationEditorWidget/components/ConfigurationTextField.js.map +1 -0
  9. package/dist/ConfigurationEditorWidget/components/NumberEditor.d.ts +11 -0
  10. package/dist/ConfigurationEditorWidget/components/NumberEditor.js +46 -0
  11. package/dist/ConfigurationEditorWidget/components/NumberEditor.js.map +1 -0
  12. package/dist/ConfigurationEditorWidget/components/NumberMapEditor.d.ts +11 -0
  13. package/dist/ConfigurationEditorWidget/components/NumberMapEditor.js +66 -0
  14. package/dist/ConfigurationEditorWidget/components/NumberMapEditor.js.map +1 -0
  15. package/dist/ConfigurationEditorWidget/components/SlotEditor.js +17 -99
  16. package/dist/ConfigurationEditorWidget/components/SlotEditor.js.map +1 -1
  17. package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js +1 -1
  18. package/dist/ConfigurationEditorWidget/components/StringArrayEditor.js.map +1 -1
  19. package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.d.ts +14 -0
  20. package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.js +71 -0
  21. package/dist/ConfigurationEditorWidget/components/StringArrayMapEditor.js.map +1 -0
  22. package/dist/FromConfigAdapter/FromConfigAdapter.js +1 -1
  23. package/dist/FromConfigAdapter/FromConfigAdapter.js.map +1 -1
  24. package/dist/RefNameAliasAdapter/RefNameAliasAdapter.js +3 -4
  25. package/dist/RefNameAliasAdapter/RefNameAliasAdapter.js.map +1 -1
  26. package/esm/ConfigurationEditorWidget/components/BooleanEditor.d.ts +10 -0
  27. package/esm/ConfigurationEditorWidget/components/BooleanEditor.js +9 -0
  28. package/esm/ConfigurationEditorWidget/components/BooleanEditor.js.map +1 -0
  29. package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js +25 -22
  30. package/esm/ConfigurationEditorWidget/components/ConfigurationEditor.js.map +1 -1
  31. package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.d.ts +5 -0
  32. package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.js +13 -0
  33. package/esm/ConfigurationEditorWidget/components/ConfigurationTextField.js.map +1 -0
  34. package/esm/ConfigurationEditorWidget/components/NumberEditor.d.ts +11 -0
  35. package/esm/ConfigurationEditorWidget/components/NumberEditor.js +18 -0
  36. package/esm/ConfigurationEditorWidget/components/NumberEditor.js.map +1 -0
  37. package/esm/ConfigurationEditorWidget/components/NumberMapEditor.d.ts +11 -0
  38. package/esm/ConfigurationEditorWidget/components/NumberMapEditor.js +38 -0
  39. package/esm/ConfigurationEditorWidget/components/NumberMapEditor.js.map +1 -0
  40. package/esm/ConfigurationEditorWidget/components/SlotEditor.js +15 -97
  41. package/esm/ConfigurationEditorWidget/components/SlotEditor.js.map +1 -1
  42. package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js +1 -1
  43. package/esm/ConfigurationEditorWidget/components/StringArrayEditor.js.map +1 -1
  44. package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.d.ts +14 -0
  45. package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.js +43 -0
  46. package/esm/ConfigurationEditorWidget/components/StringArrayMapEditor.js.map +1 -0
  47. package/esm/FromConfigAdapter/FromConfigAdapter.js +1 -1
  48. package/esm/FromConfigAdapter/FromConfigAdapter.js.map +1 -1
  49. package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js +3 -4
  50. package/esm/RefNameAliasAdapter/RefNameAliasAdapter.js.map +1 -1
  51. package/package.json +2 -2
  52. package/src/ConfigurationEditorWidget/components/BooleanEditor.tsx +35 -0
  53. package/src/ConfigurationEditorWidget/components/ConfigurationEditor.tsx +116 -123
  54. package/src/ConfigurationEditorWidget/components/ConfigurationTextField.tsx +22 -0
  55. package/src/ConfigurationEditorWidget/components/NumberEditor.tsx +34 -0
  56. package/src/ConfigurationEditorWidget/components/NumberMapEditor.tsx +94 -0
  57. package/src/ConfigurationEditorWidget/components/SlotEditor.tsx +60 -311
  58. package/src/ConfigurationEditorWidget/components/StringArrayEditor.tsx +1 -4
  59. package/src/ConfigurationEditorWidget/components/StringArrayMapEditor.tsx +104 -0
  60. package/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap +131 -76
  61. package/src/FromConfigAdapter/FromConfigAdapter.ts +1 -1
  62. package/src/RefNameAliasAdapter/RefNameAliasAdapter.ts +3 -4
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ declare const _default: ({ slot, }: {
3
+ slot: {
4
+ name: string;
5
+ value: boolean;
6
+ set: (arg: boolean) => void;
7
+ description: string;
8
+ };
9
+ }) => JSX.Element;
10
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const mobx_react_1 = require("mobx-react");
8
+ const material_1 = require("@mui/material");
9
+ exports.default = (0, mobx_react_1.observer)(function ({ slot, }) {
10
+ return (react_1.default.createElement(material_1.FormControl, null,
11
+ react_1.default.createElement(material_1.FormControlLabel, { label: slot.name, control: react_1.default.createElement(material_1.Checkbox, { checked: slot.value, onChange: evt => slot.set(evt.target.checked) }) }),
12
+ react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
13
+ });
14
+ //# sourceMappingURL=BooleanEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/BooleanEditor.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,2CAAqC;AAErC,4CAKsB;AAEtB,kBAAe,IAAA,qBAAQ,EAAC,UAAU,EAChC,IAAI,GAQL;IACC,OAAO,CACL,8BAAC,sBAAW;QACV,8BAAC,2BAAgB,IACf,KAAK,EAAE,IAAI,CAAC,IAAI,EAChB,OAAO,EACL,8BAAC,mBAAQ,IACP,OAAO,EAAE,IAAI,CAAC,KAAK,EACnB,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,GAC7C,GAEJ;QACF,8BAAC,yBAAc,QAAE,IAAI,CAAC,WAAW,CAAkB,CACvC,CACf,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -15,26 +15,29 @@ const ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
15
15
  // locals
16
16
  const SlotEditor_1 = __importDefault(require("./SlotEditor"));
17
17
  const TypeSelector_1 = __importDefault(require("./TypeSelector"));
18
- const useStyles = (0, mui_1.makeStyles)()(theme => ({
19
- expandIcon: {
20
- color: '#fff',
21
- },
22
- root: {
23
- padding: theme.spacing(1, 3, 1, 1),
24
- },
25
- expansionPanelDetails: {
26
- display: 'block',
27
- padding: theme.spacing(1),
28
- },
29
- accordion: {
30
- border: `1px solid ${theme.palette.text.primary}`,
31
- },
32
- noOverflow: {
33
- width: '100%',
34
- overflowX: 'auto',
35
- },
36
- }));
37
- const Member = (0, mobx_react_1.observer)((props) => {
18
+ const useStyles = (0, mui_1.makeStyles)()(theme => {
19
+ var _a;
20
+ return ({
21
+ expandIcon: {
22
+ color: ((_a = theme.palette.tertiary) === null || _a === void 0 ? void 0 : _a.contrastText) || '#fff',
23
+ },
24
+ root: {
25
+ padding: theme.spacing(1, 3, 1, 1),
26
+ },
27
+ expansionPanelDetails: {
28
+ display: 'block',
29
+ padding: theme.spacing(1),
30
+ },
31
+ accordion: {
32
+ border: `1px solid ${theme.palette.text.primary}`,
33
+ },
34
+ noOverflow: {
35
+ width: '100%',
36
+ overflowX: 'auto',
37
+ },
38
+ });
39
+ });
40
+ const Member = (0, mobx_react_1.observer)(function (props) {
38
41
  const { classes } = useStyles();
39
42
  const { slotName, slotSchema, schema, slot = schema[slotName], path = [], } = props;
40
43
  let typeSelector;
@@ -69,11 +72,11 @@ const Member = (0, mobx_react_1.observer)((props) => {
69
72
  }
70
73
  return null;
71
74
  });
72
- const Schema = (0, mobx_react_1.observer)(({ schema, path = [], }) => {
75
+ const Schema = (0, mobx_react_1.observer)(function ({ schema, path = [], }) {
73
76
  const properties = (0, mobx_state_tree_1.getMembers)(schema).properties;
74
77
  return (react_1.default.createElement(react_1.default.Fragment, null, Object.entries(properties).map(([slotName, slotSchema]) => (react_1.default.createElement(Member, { key: slotName, slotName: slotName, slotSchema: slotSchema, path: path, schema: schema })))));
75
78
  });
76
- const ConfigurationEditor = (0, mobx_react_1.observer)(({ model, }) => {
79
+ const ConfigurationEditor = (0, mobx_react_1.observer)(function ({ model, }) {
77
80
  const { classes } = useStyles();
78
81
  // key forces a re-render, otherwise the same field can end up being used
79
82
  // for different tracks since only the backing model changes for example
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/ConfigurationEditor.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,+DAMoC;AACpC,4CAMsB;AACtB,uCAA0C;AAC1C,2CAAqC;AACrC,qDAAsD;AACtD,yCAAoC;AAEpC,QAAQ;AACR,gFAA2D;AAE3D,SAAS;AACT,8DAAqC;AACrC,kEAAyC;AAGzC,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE,C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C,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
+ {"version":3,"file":"ConfigurationEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/ConfigurationEditor.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,+DAMoC;AACpC,4CAMsB;AACtB,uCAA0C;AAC1C,2CAAqC;AACrC,qDAAsD;AACtD,yCAAoC;AAEpC,QAAQ;AACR,gFAA2D;AAE3D,SAAS;AACT,8DAAqC;AACrC,kEAAyC;AAGzC,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE;;IAAC,OAAA,CAAC;QACvC,UAAU,EAAE;YACV,KAAK,EAAE,CAAA,MAAA,KAAK,CAAC,OAAO,CAAC,QAAQ,0CAAE,YAAY,KAAI,MAAM;SACtD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACnC;QACD,qBAAqB,EAAE;YACrB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;SAC1B;QACD,SAAS,EAAE;YACT,MAAM,EAAE,aAAa,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;SAClD;QACD,UAAU,EAAE;YACV,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,MAAM;SAClB;KACF,CAAC,CAAA;CAAA,CAAC,CAAA;AAEH,MAAM,MAAM,GAAG,IAAA,qBAAQ,EAAC,UAAU,KAMjC;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,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,CAAA;IAC/B,yEAAyE;IACzE,wEAAwE;IACxE,cAAc;IACd,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAA;IACxB,MAAM,GAAG,GAAG,MAAM,IAAI,IAAA,8BAAc,EAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACvD,MAAM,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,CAAC,CAAA;AAEF,kBAAe,mBAAmB,CAAA"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { TextFieldProps } from '@mui/material';
3
+ export default function ConfigurationTextField(props: {
4
+ helperText?: string;
5
+ } & TextFieldProps): JSX.Element;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const material_1 = require("@mui/material");
8
+ const ui_1 = require("@jbrowse/core/ui");
9
+ // adds ability to have html in helperText. note that FormHelperTextProps is
10
+ // div because the default is p which does not like div children
11
+ function ConfigurationTextField(props) {
12
+ const { helperText } = props;
13
+ return (react_1.default.createElement(material_1.TextField, { ...props, helperText: react_1.default.createElement(ui_1.SanitizedHTML, { html: helperText || '' }), FormHelperTextProps: {
14
+ // @ts-expect-error
15
+ component: 'div',
16
+ }, fullWidth: true }));
17
+ }
18
+ exports.default = ConfigurationTextField;
19
+ //# sourceMappingURL=ConfigurationTextField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigurationTextField.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/ConfigurationTextField.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,4CAAyD;AACzD,yCAAgD;AAEhD,4EAA4E;AAC5E,gEAAgE;AAChE,SAAwB,sBAAsB,CAC5C,KAA+C;IAE/C,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;IAC5B,OAAO,CACL,8BAAC,oBAAS,OACJ,KAAK,EACT,UAAU,EAAE,8BAAC,kBAAa,IAAC,IAAI,EAAE,UAAU,IAAI,EAAE,GAAI,EACrD,mBAAmB,EAAE;YACnB,mBAAmB;YACnB,SAAS,EAAE,KAAK;SACjB,EACD,SAAS,SACT,CACH,CAAA;AACH,CAAC;AAfD,yCAeC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare const _default: ({ slot, }: {
3
+ slot: {
4
+ name?: string | undefined;
5
+ value: string;
6
+ description?: string | undefined;
7
+ set: (val: number) => void;
8
+ reset?: (() => void) | undefined;
9
+ };
10
+ }) => JSX.Element;
11
+ export default _default;
@@ -0,0 +1,46 @@
1
+ "use strict";
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;
17
+ });
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 __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const mobx_react_1 = require("mobx-react");
31
+ const ConfigurationTextField_1 = __importDefault(require("./ConfigurationTextField"));
32
+ exports.default = (0, mobx_react_1.observer)(function ({ slot, }) {
33
+ const [val, setVal] = (0, react_1.useState)(slot.value);
34
+ (0, react_1.useEffect)(() => {
35
+ var _a;
36
+ const num = Number.parseFloat(val);
37
+ if (Number.isNaN(num)) {
38
+ (_a = slot.reset) === null || _a === void 0 ? void 0 : _a.call(slot);
39
+ }
40
+ else {
41
+ slot.set(num);
42
+ }
43
+ }, [slot, val]);
44
+ return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => setVal(evt.target.value) }));
45
+ });
46
+ //# sourceMappingURL=NumberEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/NumberEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkD;AAClD,2CAAqC;AACrC,sFAA6D;AAE7D,kBAAe,IAAA,qBAAQ,EAAC,UAAU,EAChC,IAAI,GASL;IACC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC1C,IAAA,iBAAS,EAAC,GAAG,EAAE;;QACb,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;QAClC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACrB,MAAA,IAAI,CAAC,KAAK,oDAAI,CAAA;SACf;aAAM;YACL,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;SACd;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IACf,OAAO,CACL,8BAAC,gCAAsB,IACrB,KAAK,EAAE,IAAI,CAAC,IAAI,EAChB,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,KAAK,EAAE,GAAG,EACV,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GACzC,CACH,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare const _default: ({ slot, }: {
3
+ slot: {
4
+ name: string;
5
+ value: Map<string, string>;
6
+ remove: (key: string) => void;
7
+ add: (key: string, val: number) => void;
8
+ description: string;
9
+ };
10
+ }) => JSX.Element;
11
+ export default _default;
@@ -0,0 +1,66 @@
1
+ "use strict";
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;
17
+ });
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 __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const mobx_react_1 = require("mobx-react");
31
+ const material_1 = require("@mui/material");
32
+ const mui_1 = require("tss-react/mui");
33
+ // icons
34
+ const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
35
+ const Add_1 = __importDefault(require("@mui/icons-material/Add"));
36
+ const NumberEditor_1 = __importDefault(require("./NumberEditor"));
37
+ const useStyles = (0, mui_1.makeStyles)()(theme => ({
38
+ card: {
39
+ marginTop: theme.spacing(1),
40
+ },
41
+ }));
42
+ exports.default = (0, mobx_react_1.observer)(function ({ slot, }) {
43
+ const { classes } = useStyles();
44
+ const [value, setValue] = (0, react_1.useState)('');
45
+ return (react_1.default.createElement(react_1.default.Fragment, null,
46
+ react_1.default.createElement(material_1.InputLabel, null, slot.name),
47
+ [...slot.value].map(([key, val]) => (react_1.default.createElement(material_1.Card, { raised: true, key: key, className: classes.card },
48
+ react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { onClick: () => slot.remove(key) },
49
+ react_1.default.createElement(Delete_1.default, null)) }),
50
+ react_1.default.createElement(material_1.CardContent, null,
51
+ react_1.default.createElement(NumberEditor_1.default, { slot: {
52
+ value: val,
53
+ set: (val) => slot.add(key, val),
54
+ } }))))),
55
+ react_1.default.createElement(material_1.Card, { raised: true, className: classes.card },
56
+ react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => setValue(event.target.value), InputProps: {
57
+ endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
58
+ react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
59
+ slot.add(value, 0);
60
+ setValue('');
61
+ } },
62
+ react_1.default.createElement(Add_1.default, null)))),
63
+ } }) })),
64
+ react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
65
+ });
66
+ //# sourceMappingURL=NumberMapEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberMapEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/NumberMapEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,2CAAqC;AAErC,4CASsB;AACtB,uCAA0C;AAE1C,QAAQ;AACR,wEAAmD;AACnD,kEAA6C;AAC7C,kEAAyC;AAEzC,MAAM,SAAS,GAAG,IAAA,gBAAU,GAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE;QACJ,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC5B;CACF,CAAC,CAAC,CAAA;AAEH,kBAAe,IAAA,qBAAQ,EAAC,UAAU,EAChC,IAAI,GASL;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;IAC/B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IACtC,OAAO,CACL;QACE,8BAAC,qBAAU,QAAE,IAAI,CAAC,IAAI,CAAc;QACnC,CAAC,GAAG,IA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AAE,IAAI,CAAC,WAAW,CAAkB,CAClD,CACJ,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -36,120 +36,38 @@ const mst_reflection_1 = require("@jbrowse/core/util/mst-reflection");
36
36
  const material_1 = require("@mui/material");
37
37
  const mui_1 = require("tss-react/mui");
38
38
  // icons
39
- const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
40
- const Add_1 = __importDefault(require("@mui/icons-material/Add"));
41
39
  const RadioButtonUnchecked_1 = __importDefault(require("@mui/icons-material/RadioButtonUnchecked"));
42
40
  // locals
43
41
  const StringArrayEditor_1 = __importDefault(require("./StringArrayEditor"));
44
42
  const CallbackEditor_1 = __importDefault(require("./CallbackEditor"));
45
43
  const ColorEditor_1 = __importDefault(require("./ColorEditor"));
46
44
  const JsonEditor_1 = __importDefault(require("./JsonEditor"));
47
- // adds ability to have html in helperText. note that FormHelperTextProps is
48
- // div because the default is p which does not like div children
49
- function MyTextField(props) {
50
- const { helperText } = props;
51
- return (react_1.default.createElement(material_1.TextField, { ...props, helperText: react_1.default.createElement(ui_1.SanitizedHTML, { html: helperText || '' }), FormHelperTextProps: {
52
- // @ts-ignore
53
- component: 'div',
54
- }, fullWidth: true }));
55
- }
56
- const StringEditor = (0, mobx_react_1.observer)(({ slot, }) => (react_1.default.createElement(MyTextField, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt => slot.set(evt.target.value) })));
45
+ const StringArrayMapEditor_1 = __importDefault(require("./StringArrayMapEditor"));
46
+ const ConfigurationTextField_1 = __importDefault(require("./ConfigurationTextField"));
47
+ const NumberMapEditor_1 = __importDefault(require("./NumberMapEditor"));
48
+ const NumberEditor_1 = __importDefault(require("./NumberEditor"));
49
+ const BooleanEditor_1 = __importDefault(require("./BooleanEditor"));
50
+ const StringEditor = (0, mobx_react_1.observer)(({ slot, }) => (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: slot.value, onChange: evt => slot.set(evt.target.value) })));
57
51
  const TextEditor = (0, mobx_react_1.observer)(({ slot, }) => (react_1.default.createElement(material_1.TextField, { label: slot.name, helperText: slot.description, multiline: true, value: slot.value, onChange: evt => slot.set(evt.target.value) })));
58
52
  // checked checkbox, looks like a styled (x)
59
53
  const SvgCheckbox = () => (react_1.default.createElement(material_1.SvgIcon, null,
60
54
  react_1.default.createElement("path", { d: "M20.41,3C21.8,5.71 22.35,8.84 22,12C21.8,15.16 20.7,18.29 18.83,21L17.3,20C18.91,17.57 19.85,14.8 20,12C20.34,9.2 19.89,6.43 18.7,4L20.41,3M5.17,3L6.7,4C5.09,6.43 4.15,9.2 4,12C3.66,14.8 4.12,17.57 5.3,20L3.61,21C2.21,18.29 1.65,15.17 2,12C2.2,8.84 3.3,5.71 5.17,3M12.08,10.68L14.4,7.45H16.93L13.15,12.45L15.35,17.37H13.09L11.71,14L9.28,17.33H6.76L10.66,12.21L8.53,7.45H10.8L12.08,10.68Z" })));
61
- const useMapEditorStyles = (0, mui_1.makeStyles)()(theme => ({
62
- card: {
63
- marginTop: theme.spacing(1),
64
- },
65
- }));
66
- const StringArrayMapEditor = (0, mobx_react_1.observer)(({ slot, }) => {
67
- const { classes } = useMapEditorStyles();
68
- const [value, setValue] = (0, react_1.useState)('');
69
- return (react_1.default.createElement(react_1.default.Fragment, null,
70
- react_1.default.createElement(material_1.InputLabel, null, slot.name),
71
- Array.from(slot.value, ([key, val]) => (react_1.default.createElement(material_1.Card, { raised: true, key: key, className: classes.card },
72
- react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { color: "secondary", onClick: () => slot.remove(key) },
73
- react_1.default.createElement(Delete_1.default, null)) }),
74
- react_1.default.createElement(material_1.CardContent, null,
75
- react_1.default.createElement(StringArrayEditor_1.default, { slot: {
76
- name: slot.name,
77
- value: val,
78
- description: `Values associated with entry ${key}`,
79
- setAtIndex: (idx, val) => slot.setAtKeyIndex(key, idx, val),
80
- removeAtIndex: (idx) => slot.removeAtKeyIndex(key, idx),
81
- add: (val) => slot.addToKey(key, val),
82
- } }))))),
83
- react_1.default.createElement(material_1.Card, { raised: true, className: classes.card },
84
- react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => setValue(event.target.value), InputProps: {
85
- endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
86
- react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
87
- slot.add(value, []);
88
- setValue('');
89
- }, color: "secondary" },
90
- react_1.default.createElement(Add_1.default, null)))),
91
- } }) })),
92
- react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
93
- });
94
- const NumberMapEditor = (0, mobx_react_1.observer)(({ slot, }) => {
95
- const { classes } = useMapEditorStyles();
96
- const [value, setValue] = (0, react_1.useState)('');
97
- return (react_1.default.createElement(react_1.default.Fragment, null,
98
- react_1.default.createElement(material_1.InputLabel, null, slot.name),
99
- Array.from(slot.value, ([key, val]) => (react_1.default.createElement(material_1.Card, { raised: true, key: key, className: classes.card },
100
- react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { color: "secondary", onClick: () => slot.remove(key) },
101
- react_1.default.createElement(Delete_1.default, null)) }),
102
- react_1.default.createElement(material_1.CardContent, null,
103
- react_1.default.createElement(NumberEditor, { slot: {
104
- value: val,
105
- set: (val) => slot.add(key, val),
106
- } }))))),
107
- react_1.default.createElement(material_1.Card, { raised: true, className: classes.card },
108
- react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => setValue(event.target.value), InputProps: {
109
- endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
110
- react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
111
- slot.add(value, 0);
112
- setValue('');
113
- }, color: "secondary" },
114
- react_1.default.createElement(Add_1.default, null)))),
115
- } }) })),
116
- react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
117
- });
118
- const NumberEditor = (0, mobx_react_1.observer)(({ slot, }) => {
119
- const [val, setVal] = (0, react_1.useState)(slot.value);
120
- (0, react_1.useEffect)(() => {
121
- var _a;
122
- const num = parseFloat(val);
123
- if (!Number.isNaN(num)) {
124
- slot.set(num);
125
- }
126
- else {
127
- (_a = slot.reset) === null || _a === void 0 ? void 0 : _a.call(slot);
128
- }
129
- }, [slot, val]);
130
- return (react_1.default.createElement(MyTextField, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => setVal(evt.target.value) }));
131
- });
132
55
  const IntegerEditor = (0, mobx_react_1.observer)(({ slot, }) => {
133
56
  const [val, setVal] = (0, react_1.useState)(slot.value);
134
57
  (0, react_1.useEffect)(() => {
135
- const num = parseInt(val, 10);
58
+ const num = Number.parseInt(val, 10);
136
59
  if (!Number.isNaN(num)) {
137
60
  slot.set(num);
138
61
  }
139
62
  }, [slot, val]);
140
- return (react_1.default.createElement(MyTextField, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => setVal(evt.target.value) }));
63
+ return (react_1.default.createElement(ConfigurationTextField_1.default, { label: slot.name, helperText: slot.description, value: val, type: "number", onChange: evt => setVal(evt.target.value) }));
141
64
  });
142
- const BooleanEditor = (0, mobx_react_1.observer)(({ slot, }) => (react_1.default.createElement(material_1.FormControl, null,
143
- react_1.default.createElement(material_1.FormControlLabel, { label: slot.name, control: react_1.default.createElement(material_1.Checkbox, { checked: slot.value, onChange: evt => slot.set(evt.target.checked) }) }),
144
- react_1.default.createElement(material_1.FormHelperText, null, slot.description))));
145
- const StringEnumEditor = (0, mobx_react_1.observer)(
146
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
147
- ({ slot, slotSchema }) => {
65
+ const StringEnumEditor = (0, mobx_react_1.observer)(function ({ slot, slotSchema, }) {
148
66
  const p = (0, mobx_state_tree_1.getPropertyMembers)((0, mst_reflection_1.getSubType)(slotSchema));
149
67
  const choices = (0, mst_reflection_1.getUnionSubTypes)((0, mst_reflection_1.getUnionSubTypes)((0, mst_reflection_1.getSubType)((0, mst_reflection_1.getPropertyType)(p, 'value')))[1]).map(t => t.value);
150
- return (react_1.default.createElement(MyTextField, { value: slot.value, label: slot.name, select: true, helperText: slot.description, onChange: evt => slot.set(evt.target.value) }, choices.map(str => (react_1.default.createElement(material_1.MenuItem, { key: str, value: str }, str)))));
68
+ return (react_1.default.createElement(ConfigurationTextField_1.default, { value: slot.value, label: slot.name, select: true, helperText: slot.description, onChange: evt => slot.set(evt.target.value) }, choices.map(str => (react_1.default.createElement(material_1.MenuItem, { key: str, value: str }, str)))));
151
69
  });
152
- const FileSelectorWrapper = (0, mobx_react_1.observer)(({ slot, }) => {
70
+ const FileSelectorWrapper = (0, mobx_react_1.observer)(function ({ slot, }) {
153
71
  var _a;
154
72
  return (react_1.default.createElement(ui_1.FileSelector, { location: slot.value, setLocation: location => slot.set(location), name: slot.name, description: slot.description, rootModel: (_a = (0, util_1.getEnv)(slot).pluginManager) === null || _a === void 0 ? void 0 : _a.rootModel }));
155
73
  });
@@ -158,13 +76,13 @@ const valueComponents = {
158
76
  text: TextEditor,
159
77
  fileLocation: FileSelectorWrapper,
160
78
  stringArray: StringArrayEditor_1.default,
161
- stringArrayMap: StringArrayMapEditor,
162
- numberMap: NumberMapEditor,
163
- number: NumberEditor,
79
+ stringArrayMap: StringArrayMapEditor_1.default,
80
+ numberMap: NumberMapEditor_1.default,
81
+ number: NumberEditor_1.default,
164
82
  integer: IntegerEditor,
165
83
  color: ColorEditor_1.default,
166
84
  stringEnum: StringEnumEditor,
167
- boolean: BooleanEditor,
85
+ boolean: BooleanEditor_1.default,
168
86
  frozen: JsonEditor_1.default,
169
87
  configRelationships: JsonEditor_1.default,
170
88
  };
@@ -192,7 +110,7 @@ const SlotEditor = (0, mobx_react_1.observer)(
192
110
  const { type } = slot;
193
111
  let ValueComponent = slot.isCallback
194
112
  ? CallbackEditor_1.default
195
- : // @ts-ignore
113
+ : // @ts-expect-error
196
114
  valueComponents[type];
197
115
  if (!ValueComponent) {
198
116
  console.warn(`no slot editor defined for ${type}, editing as string`);
@@ -206,7 +124,7 @@ const SlotEditor = (0, mobx_react_1.observer)(
206
124
  react_1.default.createElement(ValueComponent, { slot: slot, slotSchema: slotSchema })),
207
125
  react_1.default.createElement("div", { className: classes.slotModeSwitch }, slot.contextVariable.length ? (react_1.default.createElement(material_1.IconButton, { onClick: () => slot.isCallback
208
126
  ? slot.convertToValue()
209
- : slot.convertToCallback(), title: `convert to ${slot.isCallback ? 'regular value' : 'callback'}`, color: "secondary" }, !slot.isCallback ? (react_1.default.createElement(RadioButtonUnchecked_1.default, null)) : (react_1.default.createElement(SvgCheckbox, null)))) : null)));
127
+ : slot.convertToCallback(), title: `convert to ${slot.isCallback ? 'regular value' : 'callback'}` }, slot.isCallback ? react_1.default.createElement(SvgCheckbox, null) : react_1.default.createElement(RadioButtonUnchecked_1.default, null))) : null)));
210
128
  });
211
129
  exports.default = SlotEditor;
212
130
  //# sourceMappingURL=SlotEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SlotEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/SlotEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkD;AAClD,2CAAqC;AACrC,qDAA8D;AAC9D,6CAAyD;AACzD,yCAA8D;AAC9D,sEAI0C;AAC1C,4CAgBsB;AACtB,uCAA0C;AAE1C,QAAQ;AACR,wEAAmD;AACnD,kEAA6C;AAC7C,oGAA+E;AAE/E,SAAS;AACT,4EAAmD;AACnD,sEAA6C;AAC7C,gEAAuC;AACvC,8DAAqC;AAErC,4EAA4E;AAC5E,gEAAgE;AAChE,SAAS,WAAW,CAAC,KAA+C;IAClE,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;IAC5B,OAAO,CACL,8BAAC,oBAAS,OACJ,KAAK,EACT,UAAU,EAAE,8BAAC,kBAAa,IAAC,IAAI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B,KAAK,EAAE,cACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UACtC,EAAE,EACF,KAAK,EAAC,WAAW,IAEhB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAClB,8BAAC,8BAAwB,OAAG,CAC7B,CAAC,CAAC,CAAC,CACF,8BAAC,WAAW,OAAG,CAChB,CACU,CACd,CAAC,CAAC,CAAC,IAAI,CACJ,CACA,CACT,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"SlotEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/SlotEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkD;AAClD,2CAAqC;AACrC,qDAA8D;AAC9D,6CAAyD;AACzD,yCAA+C;AAC/C,sEAI0C;AAC1C,4CAA+E;AAC/E,uCAA0C;AAE1C,QAAQ;AACR,oGAA+E;AAE/E,SAAS;AACT,4EAAmD;AACnD,sEAA6C;AAC7C,gEAAuC;AACvC,8DAAqC;AACrC,kFAAyD;AACzD,sFAA6D;AAC7D,wEAA+C;AAC/C,kEAAyC;AACzC,oEAA2C;AAE3C,MAAM,YAAY,GAAG,IAAA,qBAAQ,EAC3B,CAAC,EACC,IAAI,GAQL,EAAE,EAAE,CAAC,CACJ,8BAAC,gCAAsB,IACrB,KAAK,EAAE,IAAI,CAAC,IAAI,EAChB,UAAU,EAAE,IAAI,CAAC,WAAW,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAC3C,CACH,CACF,CAAA;AAED,MAAM,UAAU,GAAG,IAAA,qBAAQ,EACzB,CAAC,EACC,IAAI,GAQL,EAAE,EAAE,CAAC,CACJ,8BAAC,oBAAS,IACR,KAAK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C9B;IACD,IAAI,CAAC,CAAC,IAAI,IAAI,eAAe,CAAC,EAAE;QAC9B,OAAO,CAAC,IAAI,CAAC,iCAAiC,IAAI,EAAE,CAAC,CAAA;KACtD;IACD,OAAO,CACL,8BAAC,gBAAK,IAAC,SAAS,EAAE,OAAO,CAAC,KAAK;QAC7B,uCAAK,SAAS,EAAE,OAAO,CAAC,YAAY;YAClC,8BAAC,cAAc,IAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAI,CAClD;QACN,uCAAK,SAAS,EAAE,OAAO,CAAC,cAAc,IACnC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAC7B,8BAAC,qBAAU,IACT,OAAO,EAAE,GAAG,EAAE,CACZ,IAAI,CAAC,UAAU;gBACb,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE;gBACvB,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAE9B,KAAK,EAAE,cACL,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UACtC,EAAE,IAED,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,8BAAC,WAAW,OAAG,CAAC,CAAC,CAAC,8BAAC,8BAAwB,OAAG,CACtD,CACd,CAAC,CAAC,CAAC,IAAI,CACJ,CACA,CACT,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,UAAU,CAAA"}
@@ -40,7 +40,7 @@ const StringArrayEditor = (0, mobx_react_1.observer)(({ slot, }) => {
40
40
  slot.value.map((val, idx) => (react_1.default.createElement(material_1.ListItem, { key: idx, disableGutters: true },
41
41
  react_1.default.createElement(material_1.TextField, { value: val, onChange: evt => slot.setAtIndex(idx, evt.target.value), InputProps: {
42
42
  endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
43
- react_1.default.createElement(material_1.IconButton, { color: "secondary", onClick: () => slot.removeAtIndex(idx) },
43
+ react_1.default.createElement(material_1.IconButton, { onClick: () => slot.removeAtIndex(idx) },
44
44
  react_1.default.createElement(Delete_1.default, null)))),
45
45
  } })))),
46
46
  addNew ? (react_1.default.createElement(material_1.ListItem, { disableGutters: true },
@@ -1 +1 @@
1
- {"version":3,"file":"StringArrayEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/StringArrayEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,2CAAqC;AAErC,4CASsB;AAEtB,QAAQ;AACR,wEAAmD;AAEnD,MAAM,iBAAiB,GAAG,IAAA,qBAAQ,EAChC,CAAC,EACC,IAAI,GAUL,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IACtC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IAC3C,OAAO,CACL;QACG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,8BAAC,qBAAU,QAAE,IAAI,CAAC,IAAI,CAAc,CAAC,CAAC,CAAC,IAAI;QACxD,8BAAC,eAAI,IAAC,cAAc;YACjB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5B,8BAAC,mBAAQ,IAAC,GAAG,EAAE,GAAG,EAAE,cAAc;gBAChC,8BAAC,oBAAS,IACR,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EACvD,UAAU,EAAE;wBACV,YAAY,EAAE,CACZ,8BAAC,yBAAc,IAAC,QAAQ,EAAC,KAAK;4BAC5B,8BAAC,qBAAU,IACT,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,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P,8BAAC,yBAAc,QAAE,IAAI,CAAC,WAAW,CAAkB,CAClD,CACJ,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"StringArrayEditor.js","sourceRoot":"","sources":["../../../src/ConfigurationEditorWidget/components/StringArrayEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,2CAAqC;AAErC,4CASsB;AAEtB,QAAQ;AACR,wEAAmD;AAEnD,MAAM,iBAAiB,GAAG,IAAA,qBAAQ,EAChC,CAAC,EACC,IAAI,GAUL,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAA;IACtC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IAC3C,OAAO,CACL;QACG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,8BAAC,qBAAU,QAAE,IAAI,CAAC,IAAI,CAAc,CAAC,CAAC,CAAC,IAAI;QACxD,8BAAC,eAAI,IAAC,cAAc;YACjB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5B,8BAAC,mBAAQ,IAAC,GAAG,EAAE,GAAG,EAAE,cAAc;gBAChC,8BAAC,oBAAS,IACR,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EACvD,UAAU,EAAE;wBACV,YAAY,EAAE,CACZ,8BAAC,yBAAc,IAAC,QAAQ,EAAC,KAAK;4BAC5B,8BAAC,qBAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;gCAChD,8BAAC,gBAA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I,CAAC,WAAW,CAAkB,CAClD,CACJ,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,iBAAiB,CAAA"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ declare const _default: ({ slot, }: {
3
+ slot: {
4
+ name: string;
5
+ value: Map<string, string[]>;
6
+ remove: (key: string) => void;
7
+ add: (key: string, val: string[]) => void;
8
+ description: string;
9
+ setAtKeyIndex: (key: string, idx: number, val: string) => void;
10
+ removeAtKeyIndex: (key: string, idx: number) => void;
11
+ addToKey: (key: string, val: string) => void;
12
+ };
13
+ }) => JSX.Element;
14
+ export default _default;
@@ -0,0 +1,71 @@
1
+ "use strict";
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;
17
+ });
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 __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const mobx_react_1 = require("mobx-react");
31
+ const material_1 = require("@mui/material");
32
+ const mui_1 = require("tss-react/mui");
33
+ // icons
34
+ const Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
35
+ const Add_1 = __importDefault(require("@mui/icons-material/Add"));
36
+ // locals
37
+ const StringArrayEditor_1 = __importDefault(require("./StringArrayEditor"));
38
+ const useStyles = (0, mui_1.makeStyles)()(theme => ({
39
+ card: {
40
+ marginTop: theme.spacing(1),
41
+ },
42
+ }));
43
+ exports.default = (0, mobx_react_1.observer)(function ({ slot, }) {
44
+ const { classes } = useStyles();
45
+ const [value, setValue] = (0, react_1.useState)('');
46
+ return (react_1.default.createElement(react_1.default.Fragment, null,
47
+ react_1.default.createElement(material_1.InputLabel, null, slot.name),
48
+ [...slot.value].map(([key, val]) => (react_1.default.createElement(material_1.Card, { raised: true, key: key, className: classes.card },
49
+ react_1.default.createElement(material_1.CardHeader, { title: key, action: react_1.default.createElement(material_1.IconButton, { onClick: () => slot.remove(key) },
50
+ react_1.default.createElement(Delete_1.default, null)) }),
51
+ react_1.default.createElement(material_1.CardContent, null,
52
+ react_1.default.createElement(StringArrayEditor_1.default, { slot: {
53
+ name: slot.name,
54
+ value: val,
55
+ description: `Values associated with entry ${key}`,
56
+ setAtIndex: (idx, val) => slot.setAtKeyIndex(key, idx, val),
57
+ removeAtIndex: (idx) => slot.removeAtKeyIndex(key, idx),
58
+ add: (val) => slot.addToKey(key, val),
59
+ } }))))),
60
+ react_1.default.createElement(material_1.Card, { raised: true, className: classes.card },
61
+ react_1.default.createElement(material_1.CardHeader, { disableTypography: true, title: react_1.default.createElement(material_1.TextField, { fullWidth: true, value: value, placeholder: "add new", onChange: event => setValue(event.target.value), InputProps: {
62
+ endAdornment: (react_1.default.createElement(material_1.InputAdornment, { position: "end" },
63
+ react_1.default.createElement(material_1.IconButton, { disabled: value === '', onClick: () => {
64
+ slot.add(value, []);
65
+ setValue('');
66
+ } },
67
+ react_1.default.createElement(Add_1.default, null)))),
68
+ } }) })),
69
+ react_1.default.createElement(material_1.FormHelperText, null, slot.description)));
70
+ });
71
+ //# sourceMappingURL=StringArrayMapEditor.js.map