@elliemae/ds-codeeditor 3.4.3-rc.1 → 3.4.3
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/cjs/DSCodeEditor.js +48 -30
- package/dist/cjs/DSCodeEditor.js.map +2 -2
- package/dist/cjs/components/DSCodeEditorForm.js +129 -82
- package/dist/cjs/components/DSCodeEditorForm.js.map +2 -2
- package/dist/cjs/components/DSCodeEditorImpl.js +26 -18
- package/dist/cjs/components/DSCodeEditorImpl.js.map +2 -2
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/DSCodeEditor.js +44 -29
- package/dist/esm/DSCodeEditor.js.map +1 -1
- package/dist/esm/components/DSCodeEditorForm.js +125 -81
- package/dist/esm/components/DSCodeEditorForm.js.map +1 -1
- package/dist/esm/components/DSCodeEditorImpl.js +22 -17
- package/dist/esm/components/DSCodeEditorImpl.js.map +2 -2
- package/dist/esm/index.js.map +2 -2
- package/package.json +7 -7
package/dist/cjs/DSCodeEditor.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSCodeEditor_exports = {};
|
|
23
26
|
__export(DSCodeEditor_exports, {
|
|
@@ -27,7 +30,8 @@ __export(DSCodeEditor_exports, {
|
|
|
27
30
|
});
|
|
28
31
|
module.exports = __toCommonJS(DSCodeEditor_exports);
|
|
29
32
|
var React = __toESM(require("react"));
|
|
30
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
var import_react = require("react");
|
|
31
35
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
32
36
|
var import_ds_modal = __toESM(require("@elliemae/ds-modal"));
|
|
33
37
|
var import_react_ace = __toESM(require("react-ace"));
|
|
@@ -60,30 +64,35 @@ const DSCodeEditor = ({
|
|
|
60
64
|
errors: []
|
|
61
65
|
});
|
|
62
66
|
const reactAceComponent = (0, import_react.useRef)();
|
|
63
|
-
const editor = /* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
const editor = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
68
|
+
children: [
|
|
69
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSCodeEditorForm.default, {
|
|
70
|
+
fileName,
|
|
71
|
+
reactAceComponent
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_ace.default, {
|
|
74
|
+
ref: reactAceComponent,
|
|
75
|
+
editorProps: { $blockScrolling: true },
|
|
76
|
+
maxLines,
|
|
77
|
+
minLines,
|
|
78
|
+
mode: "javascript",
|
|
79
|
+
name: "ace-code-edior",
|
|
80
|
+
onChange: (val) => {
|
|
81
|
+
setState({ errors, value: val });
|
|
82
|
+
onChange(val, errors);
|
|
83
|
+
},
|
|
84
|
+
onValidate: (annotations) => setState({ value, errors: annotations }),
|
|
85
|
+
theme: "tomorrow",
|
|
86
|
+
setOptions: {
|
|
87
|
+
useWorker: showSyntaxChecks
|
|
88
|
+
},
|
|
89
|
+
value
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
});
|
|
84
93
|
if (!useModal)
|
|
85
94
|
return editor;
|
|
86
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_modal.default, {
|
|
87
96
|
centered: false,
|
|
88
97
|
confirmLabel,
|
|
89
98
|
containerProps,
|
|
@@ -95,16 +104,25 @@ const DSCodeEditor = ({
|
|
|
95
104
|
onReject: () => onReject(value, fileName, errors),
|
|
96
105
|
rejectLabel,
|
|
97
106
|
size,
|
|
98
|
-
style
|
|
99
|
-
|
|
107
|
+
style,
|
|
108
|
+
children: editor
|
|
109
|
+
});
|
|
100
110
|
};
|
|
101
111
|
const codeEditorProps = {
|
|
102
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
112
|
+
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
113
|
+
"Set of Properties attached to the main container"
|
|
114
|
+
),
|
|
103
115
|
value: import_ds_utilities.PropTypes.string.description("editors content").isRequired,
|
|
104
|
-
onSave: import_ds_utilities.PropTypes.func.description(
|
|
105
|
-
|
|
116
|
+
onSave: import_ds_utilities.PropTypes.func.description(
|
|
117
|
+
"function called when the user press save"
|
|
118
|
+
),
|
|
119
|
+
onClose: import_ds_utilities.PropTypes.func.description(
|
|
120
|
+
"function called when the user closes the modal"
|
|
121
|
+
),
|
|
106
122
|
onReject: import_ds_utilities.PropTypes.func.description("function called when is rejected"),
|
|
107
|
-
onChange: import_ds_utilities.PropTypes.func.description(
|
|
123
|
+
onChange: import_ds_utilities.PropTypes.func.description(
|
|
124
|
+
"function executed when code editor value changes"
|
|
125
|
+
).isRequired,
|
|
108
126
|
isOpen: import_ds_utilities.PropTypes.bool.description("Whether the modal is opened or not").defaultValue(false),
|
|
109
127
|
fileName: import_ds_utilities.PropTypes.string.description("File name to open in the editor"),
|
|
110
128
|
maxLines: import_ds_utilities.PropTypes.number.description("Max lines in the editor content").defaultValue(20),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCodeEditor.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useState, useRef } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport DSModal, { modalTypes } from '@elliemae/ds-modal';\nimport AceEditor from 'react-ace';\nimport DSCodeEditorForm from './components/DSCodeEditorForm';\nimport 'brace/mode/javascript.js';\nimport 'brace/theme/tomorrow.js';\n\nconst DSCodeEditor = ({\n containerProps = {},\n value: defaultValue = '',\n onSave = () => null,\n onClose = () => null,\n onReject = () => null,\n onChange = () => null,\n isOpen = false,\n fileName = '',\n confirmLabel = 'Save',\n maxLines = 20,\n minLines = 20,\n modalTitle = 'Javascript Editor',\n modalType = 'confirm',\n rejectLabel = 'Close',\n size = 'large',\n style = {},\n useModal = true,\n showHeader = true,\n showSyntaxChecks = true,\n}) => {\n const [{ value, errors }, setState] = useState({\n value: defaultValue,\n errors: [],\n });\n const reactAceComponent = useRef();\n\n const editor = (\n <>\n {showHeader && (\n <DSCodeEditorForm\n fileName={fileName}\n reactAceComponent={reactAceComponent}\n />\n )}\n <AceEditor\n ref={reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n onChange={(val) => {\n setState({ errors, value: val });\n onChange(val, errors);\n }}\n onValidate={(annotations) => setState({ value, errors: annotations })}\n theme=\"tomorrow\"\n setOptions={{\n useWorker: showSyntaxChecks,\n }}\n value={value}\n />\n </>\n );\n if (!useModal) return editor;\n return (\n <DSModal\n centered={false}\n confirmLabel={confirmLabel}\n containerProps={containerProps}\n isOpen={isOpen}\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={() => onClose(value, fileName, errors)}\n onConfirm={() => onSave(value, fileName, errors)}\n onReject={() => onReject(value, fileName, errors)}\n rejectLabel={rejectLabel}\n size={size}\n style={style}\n >\n {editor}\n </DSModal>\n );\n};\n\nconst codeEditorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n value: PropTypes.string.description('editors content').isRequired,\n onSave: PropTypes.func.description(\n 'function called when the user press save',\n ),\n onClose: PropTypes.func.description(\n 'function called when the user closes the modal',\n ),\n onReject: PropTypes.func.description('function called when is rejected'),\n onChange: PropTypes.func.description(\n 'function executed when code editor value changes',\n ).isRequired,\n isOpen: PropTypes.bool\n .description('Whether the modal is opened or not')\n .defaultValue(false),\n fileName: PropTypes.string.description('File name to open in the editor'),\n maxLines: PropTypes.number\n .description('Max lines in the editor content')\n .defaultValue(20),\n minLines: PropTypes.number\n .description('Min lines in the editor content')\n .defaultValue(20),\n modalTitle: PropTypes.string\n .description('Modal title')\n .defaultValue('Javascript Editor'),\n confirmLabel: PropTypes.string\n .description('Customize modal confirm label')\n .defaultValue('Save'),\n rejectLabel: PropTypes.string\n .description('Customize modal rejection label')\n .defaultValue('Close'),\n modalType: PropTypes.oneOf(modalTypes)\n .description('Modal type')\n .defaultValue('confirm'),\n size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge'])\n .description('modal size')\n .defaultValue('large'),\n style: PropTypes.object.description('css inline style'),\n useModal: PropTypes.bool\n .description('whether to use code editor inside modal or not')\n .defaultValue(true),\n showHeader: PropTypes.bool\n .description('show editors header')\n .defaultValue(true),\n showSyntaxChecks: PropTypes.bool\n .description('show syntax warnings and checks')\n .defaultValue(true),\n};\n\nDSCodeEditor.propTypes = codeEditorProps;\nDSCodeEditor.displayName = 'DSCodeEditor';\nconst CodeEditorWithSchema = describe(DSCodeEditor);\nCodeEditorWithSchema.propTypes = codeEditorProps;\n\nexport { CodeEditorWithSchema, DSCodeEditor };\nexport default DSCodeEditor;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
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AAM,0BAAU,EAClC,YAAY,YAAY,EACxB,aAAa,SAAS;AAAA,EACzB,MAAM,8BAAU,MAAM,CAAC,UAAU,SAAS,UAAU,SAAS,QAAQ,CAAC,EACnE,YAAY,YAAY,EACxB,aAAa,OAAO;AAAA,EACvB,OAAO,8BAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,UAAU,8BAAU,KACjB,YAAY,gDAAgD,EAC5D,aAAa,IAAI;AAAA,EACpB,YAAY,8BAAU,KACnB,YAAY,qBAAqB,EACjC,aAAa,IAAI;AAAA,EACpB,kBAAkB,8BAAU,KACzB,YAAY,iCAAiC,EAC7C,aAAa,IAAI;AACtB;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,2BAAuB,8BAAS,YAAY;AAClD,qBAAqB,YAAY;AAGjC,IAAO,uBAAQ;",
|
|
6
|
+
"names": ["DSCodeEditorForm", "AceEditor", "DSModal"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSCodeEditorForm_exports = {};
|
|
23
26
|
__export(DSCodeEditorForm_exports, {
|
|
@@ -25,7 +28,8 @@ __export(DSCodeEditorForm_exports, {
|
|
|
25
28
|
});
|
|
26
29
|
module.exports = __toCommonJS(DSCodeEditorForm_exports);
|
|
27
30
|
var React = __toESM(require("react"));
|
|
28
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var import_react = require("react");
|
|
29
33
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
30
34
|
var import_ds_form = require("@elliemae/ds-form");
|
|
31
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
@@ -75,86 +79,129 @@ class DSCodeEditorForm extends import_react.Component {
|
|
|
75
79
|
render() {
|
|
76
80
|
const { fileName } = this.props;
|
|
77
81
|
const { find, replace, isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
className: `${cssClassName}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
83
|
+
className: `${cssClassName}`,
|
|
84
|
+
children: [
|
|
85
|
+
fileName ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
86
|
+
className: classNameBlock("file-name"),
|
|
87
|
+
children: [
|
|
88
|
+
"File Name: ",
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
90
|
+
children: [
|
|
91
|
+
" ",
|
|
92
|
+
fileName,
|
|
93
|
+
" "
|
|
94
|
+
]
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}) : null,
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
99
|
+
className: classNameBlock("find-replace-btn"),
|
|
100
|
+
children: [
|
|
101
|
+
!find && !replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
102
|
+
buttonType: "secondary",
|
|
103
|
+
labelText: "Find",
|
|
104
|
+
onClick: () => this.setState({ find: true }),
|
|
105
|
+
size: "m"
|
|
106
|
+
}) : null,
|
|
107
|
+
!replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
108
|
+
buttonType: "secondary",
|
|
109
|
+
labelText: "Find & Replace",
|
|
110
|
+
onClick: () => this.setState({ replace: true }),
|
|
111
|
+
size: "m"
|
|
112
|
+
}) : null
|
|
113
|
+
]
|
|
114
|
+
}),
|
|
115
|
+
find || replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_form.DSInputGroup, {
|
|
116
|
+
className: classNameBlock("find"),
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSTextBox, {
|
|
119
|
+
className: "find-word",
|
|
120
|
+
fluidWidth: false,
|
|
121
|
+
id: "find-textbox",
|
|
122
|
+
onChange: (e) => this.setState({ filteredText: e.currentTarget.value }),
|
|
123
|
+
placeholder: "Find",
|
|
124
|
+
rightComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
125
|
+
className: classNameBlock("next-back-btn"),
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
128
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallLeft, {}),
|
|
129
|
+
size: "m"
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
132
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallRight, {}),
|
|
133
|
+
onClick: () => this.searchWord(),
|
|
134
|
+
size: "m"
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
}),
|
|
138
|
+
value: filteredText
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckOptionsGroup, {
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSCheckbox, {
|
|
143
|
+
checked: isCaseSensitive,
|
|
144
|
+
id: "case-sensitive-check",
|
|
145
|
+
labelText: "Case Sensitive",
|
|
146
|
+
name: "case-sensitive-check",
|
|
147
|
+
onChange: () => this.setState({ isCaseSensitive: !isCaseSensitive })
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSCheckbox, {
|
|
150
|
+
checked: isWholeWord,
|
|
151
|
+
id: "whole-word-check",
|
|
152
|
+
labelText: "Whole Word",
|
|
153
|
+
name: "whole-word-check",
|
|
154
|
+
onChange: () => this.setState({ isWholeWord: !isWholeWord })
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSCheckbox, {
|
|
157
|
+
checked: replace,
|
|
158
|
+
id: "replace-check",
|
|
159
|
+
labelText: "Replace",
|
|
160
|
+
name: "replace-check",
|
|
161
|
+
onChange: () => this.setState({ replace: !replace })
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
166
|
+
buttonType: "secondary",
|
|
167
|
+
labelText: "Done",
|
|
168
|
+
onClick: () => this.setState({ replace: false, find: false }),
|
|
169
|
+
size: "m"
|
|
170
|
+
})
|
|
171
|
+
]
|
|
172
|
+
}) : null,
|
|
173
|
+
replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
174
|
+
className: classNameBlock("replace"),
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSTextBox, {
|
|
177
|
+
className: "find-word",
|
|
178
|
+
fluidWidth: false,
|
|
179
|
+
id: "replace-textbox",
|
|
180
|
+
onChange: (e) => this.setState({ replaceText: e.currentTarget.value }),
|
|
181
|
+
placeholder: "Replace",
|
|
182
|
+
value: replaceText
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
185
|
+
className: classNameBlock("replace-btns"),
|
|
186
|
+
children: [
|
|
187
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
188
|
+
buttonType: "secondary",
|
|
189
|
+
labelText: "Replace",
|
|
190
|
+
onClick: () => this.searchWord(true, false),
|
|
191
|
+
size: "m"
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
194
|
+
buttonType: "secondary",
|
|
195
|
+
labelText: "Replace All",
|
|
196
|
+
onClick: () => this.searchWord(true, true),
|
|
197
|
+
size: "m"
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
})
|
|
201
|
+
]
|
|
202
|
+
}) : null
|
|
203
|
+
]
|
|
204
|
+
});
|
|
158
205
|
}
|
|
159
206
|
}
|
|
160
207
|
var DSCodeEditorForm_default = DSCodeEditorForm;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/DSCodeEditorForm.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport DSButton from '@elliemae/ds-button';\nimport { DSCheckbox, DSTextBox, DSInputGroup } from '@elliemae/ds-form';\nimport { convertPropToCssClassName, aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ChevronSmallLeft, ChevronSmallRight } from '@elliemae/ds-icons';\n\nconst blockName = 'code-editor';\n\nconst { cssClassName, classNameBlock } = convertPropToCssClassName(blockName);\n\nconst CheckOptionsGroup = aggregatedClasses('div')(`${blockName}-options-group`);\n\nclass DSCodeEditorForm extends Component {\n constructor(props) {\n super(props);\n this.state = {\n find: false,\n replace: false,\n isCaseSensitive: false,\n isWholeWord: false,\n filteredText: '',\n replaceText: '',\n };\n\n this.searchWord = this.searchWord.bind(this);\n }\n\n searchWord(isReplace, all) {\n const {\n reactAceComponent: {\n current: { editor },\n },\n } = this.props;\n const { isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;\n const options = {\n backwards: false,\n wrap: true,\n caseSensitive: isCaseSensitive,\n wholeWord: isWholeWord,\n regExp: true,\n };\n editor.find(filteredText, options);\n const selectedContent = editor.getSelectedText();\n if (isReplace && replaceText && selectedContent) {\n if (all) {\n editor.findAll(filteredText, options);\n editor.replaceAll(replaceText);\n } else {\n const range = editor.selection.getRange();\n editor.session.replace(range, replaceText);\n }\n }\n }\n\n render() {\n const { fileName } = this.props;\n\n const { find, replace, isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;\n return (\n <div className={`${cssClassName}`}>\n {fileName ? (\n <div className={classNameBlock('file-name')}>\n File Name: <span> {fileName} </span>\n </div>\n ) : null}\n <div className={classNameBlock('find-replace-btn')}>\n {!find && !replace ? (\n <DSButton buttonType=\"secondary\" labelText=\"Find\" onClick={() => this.setState({ find: true })} size=\"m\" />\n ) : null}\n {!replace ? (\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Find & Replace\"\n onClick={() => this.setState({ replace: true })}\n size=\"m\"\n />\n ) : null}\n </div>\n {find || replace ? (\n <DSInputGroup className={classNameBlock('find')}>\n <DSTextBox\n className=\"find-word\"\n fluidWidth={false}\n id=\"find-textbox\"\n onChange={(e) => this.setState({ filteredText: e.currentTarget.value })}\n placeholder=\"Find\"\n rightComponent={\n <div className={classNameBlock('next-back-btn')}>\n <DSButton icon={<ChevronSmallLeft />} size=\"m\" />\n <DSButton icon={<ChevronSmallRight />} onClick={() => this.searchWord()} size=\"m\" />\n </div>\n }\n value={filteredText}\n />\n <CheckOptionsGroup>\n <DSCheckbox\n checked={isCaseSensitive}\n id=\"case-sensitive-check\"\n labelText=\"Case Sensitive\"\n name=\"case-sensitive-check\"\n onChange={() => this.setState({ isCaseSensitive: !isCaseSensitive })}\n />\n <DSCheckbox\n checked={isWholeWord}\n id=\"whole-word-check\"\n labelText=\"Whole Word\"\n name=\"whole-word-check\"\n onChange={() => this.setState({ isWholeWord: !isWholeWord })}\n />\n <DSCheckbox\n checked={replace}\n id=\"replace-check\"\n labelText=\"Replace\"\n name=\"replace-check\"\n onChange={() => this.setState({ replace: !replace })}\n />\n </CheckOptionsGroup>\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Done\"\n onClick={() => this.setState({ replace: false, find: false })}\n size=\"m\"\n />\n </DSInputGroup>\n ) : null}\n {replace ? (\n <div className={classNameBlock('replace')}>\n <DSTextBox\n className=\"find-word\"\n fluidWidth={false}\n id=\"replace-textbox\"\n onChange={(e) => this.setState({ replaceText: e.currentTarget.value })}\n placeholder=\"Replace\"\n value={replaceText}\n />\n <div className={classNameBlock('replace-btns')}>\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Replace\"\n onClick={() => this.searchWord(true, false)}\n size=\"m\"\n />\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Replace All\"\n onClick={() => this.searchWord(true, true)}\n size=\"m\"\n />\n </div>\n </div>\n ) : null}\n </div>\n );\n }\n}\n\nexport default DSCodeEditorForm;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,mBAAiC;AACjC,uBAAqB;AACrB,qBAAoD;AACpD,2BAA6D;AAC7D,sBAAoD;AAEpD,MAAM,YAAY;AAElB,MAAM,EAAE,cAAc,eAAe,QAAI,gDAA0B,SAAS;AAE5E,MAAM,wBAAoB,wCAAkB,KAAK,EAAE,GAAG,yBAAyB;AAE/E,MAAM,yBAAyB,uBAAU;AAAA,EACvC,YAAY,OAAO;AACjB,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,MACT,iBAAiB;AAAA,MACjB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAEA,SAAK,aAAa,KAAK,WAAW,KAAK,IAAI;AAAA,EAC7C;AAAA,EAEA,WAAW,WAAW,KAAK;AACzB,UAAM;AAAA,MACJ,mBAAmB;AAAA,QACjB,SAAS,EAAE,OAAO;AAAA,MACpB;AAAA,IACF,IAAI,KAAK;AACT,UAAM,EAAE,iBAAiB,aAAa,cAAc,YAAY,IAAI,KAAK;AACzE,UAAM,UAAU;AAAA,MACd,WAAW;AAAA,MACX,MAAM;AAAA,MACN,eAAe;AAAA,MACf,WAAW;AAAA,MACX,QAAQ;AAAA,IACV;AACA,WAAO,KAAK,cAA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C;AAAA,wDAAC;AAAA,cACC,WAAU;AAAA,cACV,YAAY;AAAA,cACZ,IAAG;AAAA,cACH,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,aAAa,EAAE,cAAc,MAAM,CAAC;AAAA,cACrE,aAAY;AAAA,cACZ,OAAO;AAAA,aACT;AAAA,YACA,6CAAC;AAAA,cAAI,WAAW,eAAe,cAAc;AAAA,cAC3C;AAAA,4DAAC,iBAAAA,SAAA;AAAA,kBACC,YAAW;AAAA,kBACX,WAAU;AAAA,kBACV,SAAS,MAAM,KAAK,WAAW,MAAM,KAAK;AAAA,kBAC1C,MAAK;AAAA,iBACP;AAAA,gBACA,4CAAC,iBAAAA,SAAA;AAAA,kBACC,YAAW;AAAA,kBACX,WAAU;AAAA,kBACV,SAAS,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,kBACzC,MAAK;AAAA,iBACP;AAAA;AAAA,aACF;AAAA;AAAA,SACF,IACE;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
|
|
6
|
+
"names": ["DSButton"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSCodeEditorImpl_exports = {};
|
|
23
26
|
__export(DSCodeEditorImpl_exports, {
|
|
@@ -25,6 +28,7 @@ __export(DSCodeEditorImpl_exports, {
|
|
|
25
28
|
});
|
|
26
29
|
module.exports = __toCommonJS(DSCodeEditorImpl_exports);
|
|
27
30
|
var React = __toESM(require("react"));
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
32
|
var import_react = __toESM(require("react"));
|
|
29
33
|
var import_react_ace = __toESM(require("react-ace"));
|
|
30
34
|
var import_ds_modal = __toESM(require("@elliemae/ds-modal"));
|
|
@@ -58,7 +62,7 @@ class DSCodeEditorImpl extends import_react.Component {
|
|
|
58
62
|
containerProps
|
|
59
63
|
} = this.props;
|
|
60
64
|
const { value, errors } = this.state;
|
|
61
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_modal.default, {
|
|
62
66
|
centered: false,
|
|
63
67
|
confirmLabel,
|
|
64
68
|
containerProps,
|
|
@@ -70,22 +74,26 @@ class DSCodeEditorImpl extends import_react.Component {
|
|
|
70
74
|
onReject: () => onReject(value, fileName, errors),
|
|
71
75
|
rejectLabel,
|
|
72
76
|
size,
|
|
73
|
-
style
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
style,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSCodeEditorForm.default, {
|
|
80
|
+
fileName,
|
|
81
|
+
reactAceComponent: this.reactAceComponent
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_ace.default, {
|
|
84
|
+
ref: this.reactAceComponent,
|
|
85
|
+
editorProps: { $blockScrolling: true },
|
|
86
|
+
maxLines,
|
|
87
|
+
minLines,
|
|
88
|
+
mode: "javascript",
|
|
89
|
+
name: "ace-code-edior",
|
|
90
|
+
onChange: (val) => this.setState({ value: val }),
|
|
91
|
+
onValidate: (annotations) => this.setState({ errors: annotations }),
|
|
92
|
+
theme: "tomorrow",
|
|
93
|
+
value
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
});
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
99
|
var DSCodeEditorImpl_default = DSCodeEditorImpl;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/DSCodeEditorImpl.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { Component } from 'react';\nimport AceEditor from 'react-ace';\nimport DSModal from '@elliemae/ds-modal';\nimport DSCodeEditorForm from './DSCodeEditorForm';\nimport 'brace/mode/javascript.js';\nimport 'brace/theme/tomorrow.js';\n\nclass DSCodeEditorImpl extends Component {\n constructor(props) {\n super(props);\n this.state = {\n value: props.value,\n errors: [],\n };\n this.reactAceComponent = React.createRef();\n }\n\n render() {\n const {\n onSave,\n onClose,\n onReject,\n isOpen,\n fileName,\n confirmLabel,\n maxLines,\n minLines,\n modalTitle,\n modalType,\n rejectLabel,\n size,\n style,\n containerProps,\n } = this.props;\n\n const { value, errors } = this.state;\n return (\n <DSModal\n centered={false}\n confirmLabel={confirmLabel}\n containerProps={containerProps}\n isOpen={isOpen}\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={() => onClose(value, fileName, errors)}\n onConfirm={() => onSave(value, fileName, errors)}\n onReject={() => onReject(value, fileName, errors)}\n rejectLabel={rejectLabel}\n size={size}\n style={style}\n >\n <DSCodeEditorForm\n fileName={fileName}\n reactAceComponent={this.reactAceComponent}\n />\n <AceEditor\n ref={this.reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n onChange={val => this.setState({ value: val })}\n onValidate={annotations => this.setState({ errors: annotations })}\n theme=\"tomorrow\"\n value={value}\n />\n </DSModal>\n );\n }\n}\n\nexport default DSCodeEditorImpl;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAiC;AACjC,uBAAsB;AACtB,sBAAoB;AACpB,8BAA6B;AAC7B,wBAAO;AACP,sBAAO;AAEP,MAAM,yBAAyB,uBAAU;AAAA,EACvC,YAAY,OAAO;AACjB,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,MAAM;AAAA,MACb,QAAQ,CAAC;AAAA,IACX;AACA,SAAK,oBAAoB,aAAAA,QAAM,UAAU;AAAA,EAC3C;AAAA,EAEA,SAAS;AACP,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI,KAAK;AAET,UAAM,EAAE,OAAO,OAAO,IAAI,KAAK;AAC/B,WACE,6CAAC,gBAAAC,SAAA;AAAA,MACC,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,MAAM,QAAQ,OAAO,UAAU,MAAM;AAAA,MAC9C,WAAW,MAAM,OAAO,OAAO,UAAU,MAAM;AAAA,MAC/C,UAAU,MAAM,SAAS,OAAO,UAAU,MAAM;AAAA,MAChD;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,oDAAC,wBAAAC,SAAA;AAAA,UACC;AAAA,UACA,mBAAmB,KAAK;AAAA,SAC1B;AAAA,QACA,4CAAC,iBAAAC,SAAA;AAAA,UACC,KAAK,KAAK;AAAA,UACV,aAAa,EAAE,iBAAiB,KAAK;AAAA,UACrC;AAAA,UACA;AAAA,UACA,MAAK;AAAA,UACL,MAAK;AAAA,UACL,UAAU,SAAO,KAAK,SAAS,EAAE,OAAO,IAAI,CAAC;AAAA,UAC7C,YAAY,iBAAe,KAAK,SAAS,EAAE,QAAQ,YAAY,CAAC;AAAA,UAChE,OAAM;AAAA,UACN;AAAA,SACF;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
|
|
6
|
+
"names": ["React", "DSModal", "DSCodeEditorForm", "AceEditor"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var src_exports = {};
|
|
23
26
|
__export(src_exports, {
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { default, DSCodeEditor, CodeEditorWithSchema } from './DSCodeEditor';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA4D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSCodeEditor.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useRef } from "react";
|
|
3
4
|
import { describe, PropTypes } from "@elliemae/ds-utilities";
|
|
4
5
|
import DSModal, { modalTypes } from "@elliemae/ds-modal";
|
|
5
6
|
import AceEditor from "react-ace";
|
|
@@ -32,30 +33,35 @@ const DSCodeEditor = ({
|
|
|
32
33
|
errors: []
|
|
33
34
|
});
|
|
34
35
|
const reactAceComponent = useRef();
|
|
35
|
-
const editor = /* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
36
|
+
const editor = /* @__PURE__ */ jsxs(Fragment, {
|
|
37
|
+
children: [
|
|
38
|
+
showHeader && /* @__PURE__ */ jsx(DSCodeEditorForm, {
|
|
39
|
+
fileName,
|
|
40
|
+
reactAceComponent
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(AceEditor, {
|
|
43
|
+
ref: reactAceComponent,
|
|
44
|
+
editorProps: { $blockScrolling: true },
|
|
45
|
+
maxLines,
|
|
46
|
+
minLines,
|
|
47
|
+
mode: "javascript",
|
|
48
|
+
name: "ace-code-edior",
|
|
49
|
+
onChange: (val) => {
|
|
50
|
+
setState({ errors, value: val });
|
|
51
|
+
onChange(val, errors);
|
|
52
|
+
},
|
|
53
|
+
onValidate: (annotations) => setState({ value, errors: annotations }),
|
|
54
|
+
theme: "tomorrow",
|
|
55
|
+
setOptions: {
|
|
56
|
+
useWorker: showSyntaxChecks
|
|
57
|
+
},
|
|
58
|
+
value
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
});
|
|
56
62
|
if (!useModal)
|
|
57
63
|
return editor;
|
|
58
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ jsx(DSModal, {
|
|
59
65
|
centered: false,
|
|
60
66
|
confirmLabel,
|
|
61
67
|
containerProps,
|
|
@@ -67,16 +73,25 @@ const DSCodeEditor = ({
|
|
|
67
73
|
onReject: () => onReject(value, fileName, errors),
|
|
68
74
|
rejectLabel,
|
|
69
75
|
size,
|
|
70
|
-
style
|
|
71
|
-
|
|
76
|
+
style,
|
|
77
|
+
children: editor
|
|
78
|
+
});
|
|
72
79
|
};
|
|
73
80
|
const codeEditorProps = {
|
|
74
|
-
containerProps: PropTypes.object.description(
|
|
81
|
+
containerProps: PropTypes.object.description(
|
|
82
|
+
"Set of Properties attached to the main container"
|
|
83
|
+
),
|
|
75
84
|
value: PropTypes.string.description("editors content").isRequired,
|
|
76
|
-
onSave: PropTypes.func.description(
|
|
77
|
-
|
|
85
|
+
onSave: PropTypes.func.description(
|
|
86
|
+
"function called when the user press save"
|
|
87
|
+
),
|
|
88
|
+
onClose: PropTypes.func.description(
|
|
89
|
+
"function called when the user closes the modal"
|
|
90
|
+
),
|
|
78
91
|
onReject: PropTypes.func.description("function called when is rejected"),
|
|
79
|
-
onChange: PropTypes.func.description(
|
|
92
|
+
onChange: PropTypes.func.description(
|
|
93
|
+
"function executed when code editor value changes"
|
|
94
|
+
).isRequired,
|
|
80
95
|
isOpen: PropTypes.bool.description("Whether the modal is opened or not").defaultValue(false),
|
|
81
96
|
fileName: PropTypes.string.description("File name to open in the editor"),
|
|
82
97
|
maxLines: PropTypes.number.description("Max lines in the editor content").defaultValue(20),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCodeEditor.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useState, useRef } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-utilities';\nimport DSModal, { modalTypes } from '@elliemae/ds-modal';\nimport AceEditor from 'react-ace';\nimport DSCodeEditorForm from './components/DSCodeEditorForm';\nimport 'brace/mode/javascript.js';\nimport 'brace/theme/tomorrow.js';\n\nconst DSCodeEditor = ({\n containerProps = {},\n value: defaultValue = '',\n onSave = () => null,\n onClose = () => null,\n onReject = () => null,\n onChange = () => null,\n isOpen = false,\n fileName = '',\n confirmLabel = 'Save',\n maxLines = 20,\n minLines = 20,\n modalTitle = 'Javascript Editor',\n modalType = 'confirm',\n rejectLabel = 'Close',\n size = 'large',\n style = {},\n useModal = true,\n showHeader = true,\n showSyntaxChecks = true,\n}) => {\n const [{ value, errors }, setState] = useState({\n value: defaultValue,\n errors: [],\n });\n const reactAceComponent = useRef();\n\n const editor = (\n <>\n {showHeader && (\n <DSCodeEditorForm\n fileName={fileName}\n reactAceComponent={reactAceComponent}\n />\n )}\n <AceEditor\n ref={reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n onChange={(val) => {\n setState({ errors, value: val });\n onChange(val, errors);\n }}\n onValidate={(annotations) => setState({ value, errors: annotations })}\n theme=\"tomorrow\"\n setOptions={{\n useWorker: showSyntaxChecks,\n }}\n value={value}\n />\n </>\n );\n if (!useModal) return editor;\n return (\n <DSModal\n centered={false}\n confirmLabel={confirmLabel}\n containerProps={containerProps}\n isOpen={isOpen}\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={() => onClose(value, fileName, errors)}\n onConfirm={() => onSave(value, fileName, errors)}\n onReject={() => onReject(value, fileName, errors)}\n rejectLabel={rejectLabel}\n size={size}\n style={style}\n >\n {editor}\n </DSModal>\n );\n};\n\nconst codeEditorProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n value: PropTypes.string.description('editors content').isRequired,\n onSave: PropTypes.func.description(\n 'function called when the user press save',\n ),\n onClose: PropTypes.func.description(\n 'function called when the user closes the modal',\n ),\n onReject: PropTypes.func.description('function called when is rejected'),\n onChange: PropTypes.func.description(\n 'function executed when code editor value changes',\n ).isRequired,\n isOpen: PropTypes.bool\n .description('Whether the modal is opened or not')\n .defaultValue(false),\n fileName: PropTypes.string.description('File name to open in the editor'),\n maxLines: PropTypes.number\n .description('Max lines in the editor content')\n .defaultValue(20),\n minLines: PropTypes.number\n .description('Min lines in the editor content')\n .defaultValue(20),\n modalTitle: PropTypes.string\n .description('Modal title')\n .defaultValue('Javascript Editor'),\n confirmLabel: PropTypes.string\n .description('Customize modal confirm label')\n .defaultValue('Save'),\n rejectLabel: PropTypes.string\n .description('Customize modal rejection label')\n .defaultValue('Close'),\n modalType: PropTypes.oneOf(modalTypes)\n .description('Modal type')\n .defaultValue('confirm'),\n size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge'])\n .description('modal size')\n .defaultValue('large'),\n style: PropTypes.object.description('css inline style'),\n useModal: PropTypes.bool\n .description('whether to use code editor inside modal or not')\n .defaultValue(true),\n showHeader: PropTypes.bool\n .description('show editors header')\n .defaultValue(true),\n showSyntaxChecks: PropTypes.bool\n .description('show syntax warnings and checks')\n .defaultValue(true),\n};\n\nDSCodeEditor.propTypes = codeEditorProps;\nDSCodeEditor.displayName = 'DSCodeEditor';\nconst CodeEditorWithSchema = describe(DSCodeEditor);\nCodeEditorWithSchema.propTypes = codeEditorProps;\n\nexport { CodeEditorWithSchema, DSCodeEditor };\nexport default DSCodeEditor;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,UAAU,cAAc;AACxC,SAAS,UAAU,iBAAiB;AACpC,OAAO,WAAW,kBAAkB;AACpC,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO;AACP,OAAO;AAEP,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,C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AkB,UAAU,KACzB,YAAY,iCAAiC,EAC7C,aAAa,IAAI;AACtB;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,uBAAuB,SAAS,YAAY;AAClD,qBAAqB,YAAY;AAGjC,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Component } from "react";
|
|
3
4
|
import DSButton from "@elliemae/ds-button";
|
|
4
5
|
import { DSCheckbox, DSTextBox, DSInputGroup } from "@elliemae/ds-form";
|
|
5
6
|
import { convertPropToCssClassName, aggregatedClasses } from "@elliemae/ds-classnames";
|
|
@@ -49,86 +50,129 @@ class DSCodeEditorForm extends Component {
|
|
|
49
50
|
render() {
|
|
50
51
|
const { fileName } = this.props;
|
|
51
52
|
const { find, replace, isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
className: `${cssClassName}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
53
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
54
|
+
className: `${cssClassName}`,
|
|
55
|
+
children: [
|
|
56
|
+
fileName ? /* @__PURE__ */ jsxs("div", {
|
|
57
|
+
className: classNameBlock("file-name"),
|
|
58
|
+
children: [
|
|
59
|
+
"File Name: ",
|
|
60
|
+
/* @__PURE__ */ jsxs("span", {
|
|
61
|
+
children: [
|
|
62
|
+
" ",
|
|
63
|
+
fileName,
|
|
64
|
+
" "
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}) : null,
|
|
69
|
+
/* @__PURE__ */ jsxs("div", {
|
|
70
|
+
className: classNameBlock("find-replace-btn"),
|
|
71
|
+
children: [
|
|
72
|
+
!find && !replace ? /* @__PURE__ */ jsx(DSButton, {
|
|
73
|
+
buttonType: "secondary",
|
|
74
|
+
labelText: "Find",
|
|
75
|
+
onClick: () => this.setState({ find: true }),
|
|
76
|
+
size: "m"
|
|
77
|
+
}) : null,
|
|
78
|
+
!replace ? /* @__PURE__ */ jsx(DSButton, {
|
|
79
|
+
buttonType: "secondary",
|
|
80
|
+
labelText: "Find & Replace",
|
|
81
|
+
onClick: () => this.setState({ replace: true }),
|
|
82
|
+
size: "m"
|
|
83
|
+
}) : null
|
|
84
|
+
]
|
|
85
|
+
}),
|
|
86
|
+
find || replace ? /* @__PURE__ */ jsxs(DSInputGroup, {
|
|
87
|
+
className: classNameBlock("find"),
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx(DSTextBox, {
|
|
90
|
+
className: "find-word",
|
|
91
|
+
fluidWidth: false,
|
|
92
|
+
id: "find-textbox",
|
|
93
|
+
onChange: (e) => this.setState({ filteredText: e.currentTarget.value }),
|
|
94
|
+
placeholder: "Find",
|
|
95
|
+
rightComponent: /* @__PURE__ */ jsxs("div", {
|
|
96
|
+
className: classNameBlock("next-back-btn"),
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsx(DSButton, {
|
|
99
|
+
icon: /* @__PURE__ */ jsx(ChevronSmallLeft, {}),
|
|
100
|
+
size: "m"
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ jsx(DSButton, {
|
|
103
|
+
icon: /* @__PURE__ */ jsx(ChevronSmallRight, {}),
|
|
104
|
+
onClick: () => this.searchWord(),
|
|
105
|
+
size: "m"
|
|
106
|
+
})
|
|
107
|
+
]
|
|
108
|
+
}),
|
|
109
|
+
value: filteredText
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ jsxs(CheckOptionsGroup, {
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ jsx(DSCheckbox, {
|
|
114
|
+
checked: isCaseSensitive,
|
|
115
|
+
id: "case-sensitive-check",
|
|
116
|
+
labelText: "Case Sensitive",
|
|
117
|
+
name: "case-sensitive-check",
|
|
118
|
+
onChange: () => this.setState({ isCaseSensitive: !isCaseSensitive })
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ jsx(DSCheckbox, {
|
|
121
|
+
checked: isWholeWord,
|
|
122
|
+
id: "whole-word-check",
|
|
123
|
+
labelText: "Whole Word",
|
|
124
|
+
name: "whole-word-check",
|
|
125
|
+
onChange: () => this.setState({ isWholeWord: !isWholeWord })
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ jsx(DSCheckbox, {
|
|
128
|
+
checked: replace,
|
|
129
|
+
id: "replace-check",
|
|
130
|
+
labelText: "Replace",
|
|
131
|
+
name: "replace-check",
|
|
132
|
+
onChange: () => this.setState({ replace: !replace })
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ jsx(DSButton, {
|
|
137
|
+
buttonType: "secondary",
|
|
138
|
+
labelText: "Done",
|
|
139
|
+
onClick: () => this.setState({ replace: false, find: false }),
|
|
140
|
+
size: "m"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
}) : null,
|
|
144
|
+
replace ? /* @__PURE__ */ jsxs("div", {
|
|
145
|
+
className: classNameBlock("replace"),
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(DSTextBox, {
|
|
148
|
+
className: "find-word",
|
|
149
|
+
fluidWidth: false,
|
|
150
|
+
id: "replace-textbox",
|
|
151
|
+
onChange: (e) => this.setState({ replaceText: e.currentTarget.value }),
|
|
152
|
+
placeholder: "Replace",
|
|
153
|
+
value: replaceText
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ jsxs("div", {
|
|
156
|
+
className: classNameBlock("replace-btns"),
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ jsx(DSButton, {
|
|
159
|
+
buttonType: "secondary",
|
|
160
|
+
labelText: "Replace",
|
|
161
|
+
onClick: () => this.searchWord(true, false),
|
|
162
|
+
size: "m"
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ jsx(DSButton, {
|
|
165
|
+
buttonType: "secondary",
|
|
166
|
+
labelText: "Replace All",
|
|
167
|
+
onClick: () => this.searchWord(true, true),
|
|
168
|
+
size: "m"
|
|
169
|
+
})
|
|
170
|
+
]
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
}) : null
|
|
174
|
+
]
|
|
175
|
+
});
|
|
132
176
|
}
|
|
133
177
|
}
|
|
134
178
|
var DSCodeEditorForm_default = DSCodeEditorForm;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DSCodeEditorForm.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport DSButton from '@elliemae/ds-button';\nimport { DSCheckbox, DSTextBox, DSInputGroup } from '@elliemae/ds-form';\nimport { convertPropToCssClassName, aggregatedClasses } from '@elliemae/ds-classnames';\nimport { ChevronSmallLeft, ChevronSmallRight } from '@elliemae/ds-icons';\n\nconst blockName = 'code-editor';\n\nconst { cssClassName, classNameBlock } = convertPropToCssClassName(blockName);\n\nconst CheckOptionsGroup = aggregatedClasses('div')(`${blockName}-options-group`);\n\nclass DSCodeEditorForm extends Component {\n constructor(props) {\n super(props);\n this.state = {\n find: false,\n replace: false,\n isCaseSensitive: false,\n isWholeWord: false,\n filteredText: '',\n replaceText: '',\n };\n\n this.searchWord = this.searchWord.bind(this);\n }\n\n searchWord(isReplace, all) {\n const {\n reactAceComponent: {\n current: { editor },\n },\n } = this.props;\n const { isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;\n const options = {\n backwards: false,\n wrap: true,\n caseSensitive: isCaseSensitive,\n wholeWord: isWholeWord,\n regExp: true,\n };\n editor.find(filteredText, options);\n const selectedContent = editor.getSelectedText();\n if (isReplace && replaceText && selectedContent) {\n if (all) {\n editor.findAll(filteredText, options);\n editor.replaceAll(replaceText);\n } else {\n const range = editor.selection.getRange();\n editor.session.replace(range, replaceText);\n }\n }\n }\n\n render() {\n const { fileName } = this.props;\n\n const { find, replace, isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;\n return (\n <div className={`${cssClassName}`}>\n {fileName ? (\n <div className={classNameBlock('file-name')}>\n File Name: <span> {fileName} </span>\n </div>\n ) : null}\n <div className={classNameBlock('find-replace-btn')}>\n {!find && !replace ? (\n <DSButton buttonType=\"secondary\" labelText=\"Find\" onClick={() => this.setState({ find: true })} size=\"m\" />\n ) : null}\n {!replace ? (\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Find & Replace\"\n onClick={() => this.setState({ replace: true })}\n size=\"m\"\n />\n ) : null}\n </div>\n {find || replace ? (\n <DSInputGroup className={classNameBlock('find')}>\n <DSTextBox\n className=\"find-word\"\n fluidWidth={false}\n id=\"find-textbox\"\n onChange={(e) => this.setState({ filteredText: e.currentTarget.value })}\n placeholder=\"Find\"\n rightComponent={\n <div className={classNameBlock('next-back-btn')}>\n <DSButton icon={<ChevronSmallLeft />} size=\"m\" />\n <DSButton icon={<ChevronSmallRight />} onClick={() => this.searchWord()} size=\"m\" />\n </div>\n }\n value={filteredText}\n />\n <CheckOptionsGroup>\n <DSCheckbox\n checked={isCaseSensitive}\n id=\"case-sensitive-check\"\n labelText=\"Case Sensitive\"\n name=\"case-sensitive-check\"\n onChange={() => this.setState({ isCaseSensitive: !isCaseSensitive })}\n />\n <DSCheckbox\n checked={isWholeWord}\n id=\"whole-word-check\"\n labelText=\"Whole Word\"\n name=\"whole-word-check\"\n onChange={() => this.setState({ isWholeWord: !isWholeWord })}\n />\n <DSCheckbox\n checked={replace}\n id=\"replace-check\"\n labelText=\"Replace\"\n name=\"replace-check\"\n onChange={() => this.setState({ replace: !replace })}\n />\n </CheckOptionsGroup>\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Done\"\n onClick={() => this.setState({ replace: false, find: false })}\n size=\"m\"\n />\n </DSInputGroup>\n ) : null}\n {replace ? (\n <div className={classNameBlock('replace')}>\n <DSTextBox\n className=\"find-word\"\n fluidWidth={false}\n id=\"replace-textbox\"\n onChange={(e) => this.setState({ replaceText: e.currentTarget.value })}\n placeholder=\"Replace\"\n value={replaceText}\n />\n <div className={classNameBlock('replace-btns')}>\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Replace\"\n onClick={() => this.searchWord(true, false)}\n size=\"m\"\n />\n <DSButton\n buttonType=\"secondary\"\n labelText=\"Replace All\"\n onClick={() => this.searchWord(true, true)}\n size=\"m\"\n />\n </div>\n </div>\n ) : null}\n </div>\n );\n }\n}\n\nexport default DSCodeEditorForm;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,iBAAiB;AACjC,OAAO,cAAc;AACrB,SAAS,YAAY,WAAW,oBAAoB;AACpD,SAAS,2BAA2B,yBAAyB;AAC7D,SAAS,kBAAkB,yBAAyB;AAEpD,MAAM,YAAY;AAElB,MAAM,EAAE,cAAc,eAAe,IAAI,0BAA0B,SAAS;AAE5E,MAAM,oBAAoB,kBAAkB,KAAK,EAAE,GAAG,yBAAyB;AAE/E,MAAM,yBAAyB,UAAU;AAAA,EACvC,YAAY,OAAO;AACjB,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,MACT,iBAAiB;AAAA,MACjB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAEA,SAAK,aAAa,KAAK,WAAW,KAAK,IAAI;AAAA,EAC7C;AAAA,EAEA,WAAW,WAAW,KAAK;AACzB,UAAM;AAAA,MACJ,mBAAmB;AAAA,QACjB,SAAS,EAAE,OAAO;AAAA,MACpB;AAAA,IACF,IAAI,KAAK;AACT,UAAM,EAAE,iBAAiB,aAAa,cAAc,YAAY,IAAI,KAAK;AACzE,UAAM,UAAU;AAAA,MACd,WAAW;AAAA,MACX,MAAM;AAAA,MACN,eAAe;AAAA,MACf,WAAW;AAAA,MACX,QAAQ;AAAA,IACV;AACA,WAAO,KAAK,cAAc,OAAO;AACjC,UAAM,kBAAkB,OAAO,gBAAgB;AAC/C,QAAI,aAAa,eAAe,iBAAiB;AAC/C,UAAI,KAAK;AACP,eAAO,QAAQ,cAAc,OAAO;AACpC,eAAO,WAAW,WAAW;AAAA,MAC/B,OAAO;AACL,cAAM,QAAQ,OAAO,UAAU,SAAS;A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AAW;AAAA,kBACX,WAAU;AAAA,kBACV,SAAS,MAAM,KAAK,WAAW,MAAM,KAAK;AAAA,kBAC1C,MAAK;AAAA,iBACP;AAAA,gBACA,oBAAC;AAAA,kBACC,YAAW;AAAA,kBACX,WAAU;AAAA,kBACV,SAAS,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,kBACzC,MAAK;AAAA,iBACP;AAAA;AAAA,aACF;AAAA;AAAA,SACF,IACE;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React2, { Component } from "react";
|
|
3
4
|
import AceEditor from "react-ace";
|
|
4
5
|
import DSModal from "@elliemae/ds-modal";
|
|
@@ -32,7 +33,7 @@ class DSCodeEditorImpl extends Component {
|
|
|
32
33
|
containerProps
|
|
33
34
|
} = this.props;
|
|
34
35
|
const { value, errors } = this.state;
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsxs(DSModal, {
|
|
36
37
|
centered: false,
|
|
37
38
|
confirmLabel,
|
|
38
39
|
containerProps,
|
|
@@ -44,22 +45,26 @@ class DSCodeEditorImpl extends Component {
|
|
|
44
45
|
onReject: () => onReject(value, fileName, errors),
|
|
45
46
|
rejectLabel,
|
|
46
47
|
size,
|
|
47
|
-
style
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
48
|
+
style,
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx(DSCodeEditorForm, {
|
|
51
|
+
fileName,
|
|
52
|
+
reactAceComponent: this.reactAceComponent
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx(AceEditor, {
|
|
55
|
+
ref: this.reactAceComponent,
|
|
56
|
+
editorProps: { $blockScrolling: true },
|
|
57
|
+
maxLines,
|
|
58
|
+
minLines,
|
|
59
|
+
mode: "javascript",
|
|
60
|
+
name: "ace-code-edior",
|
|
61
|
+
onChange: (val) => this.setState({ value: val }),
|
|
62
|
+
onValidate: (annotations) => this.setState({ errors: annotations }),
|
|
63
|
+
theme: "tomorrow",
|
|
64
|
+
value
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
var DSCodeEditorImpl_default = DSCodeEditorImpl;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DSCodeEditorImpl.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component } from 'react';\nimport AceEditor from 'react-ace';\nimport DSModal from '@elliemae/ds-modal';\nimport DSCodeEditorForm from './DSCodeEditorForm';\nimport 'brace/mode/javascript.js';\nimport 'brace/theme/tomorrow.js';\n\nclass DSCodeEditorImpl extends Component {\n constructor(props) {\n super(props);\n this.state = {\n value: props.value,\n errors: [],\n };\n this.reactAceComponent = React.createRef();\n }\n\n render() {\n const {\n onSave,\n onClose,\n onReject,\n isOpen,\n fileName,\n confirmLabel,\n maxLines,\n minLines,\n modalTitle,\n modalType,\n rejectLabel,\n size,\n style,\n containerProps,\n } = this.props;\n\n const { value, errors } = this.state;\n return (\n <DSModal\n centered={false}\n confirmLabel={confirmLabel}\n containerProps={containerProps}\n isOpen={isOpen}\n modalTitle={modalTitle}\n modalType={modalType}\n onClose={() => onClose(value, fileName, errors)}\n onConfirm={() => onSave(value, fileName, errors)}\n onReject={() => onReject(value, fileName, errors)}\n rejectLabel={rejectLabel}\n size={size}\n style={style}\n >\n <DSCodeEditorForm\n fileName={fileName}\n reactAceComponent={this.reactAceComponent}\n />\n <AceEditor\n ref={this.reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n onChange={val => this.setState({ value: val })}\n onValidate={annotations => this.setState({ errors: annotations })}\n theme=\"tomorrow\"\n value={value}\n />\n </DSModal>\n );\n }\n}\n\nexport default DSCodeEditorImpl;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAOA,UAAS,iBAAiB;AACjC,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,sBAAsB;AAC7B,OAAO;AACP,OAAO;AAEP,MAAM,yBAAyB,UAAU;AAAA,EACvC,YAAY,OAAO;AACjB,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,MAAM;AAAA,MACb,QAAQ,CAAC;AAAA,IACX;AACA,SAAK,oBAAoBA,OAAM,UAAU;AAAA,EAC3C;AAAA,EAEA,SAAS;AACP,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI,KAAK;AAET,UAAM,EAAE,OAAO,OAAO,IAAI,KAAK;AAC/B,WACE,qBAAC;AAAA,MACC,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,MAAM,QAAQ,OAAO,UAAU,MAAM;AAAA,MAC9C,WAAW,MAAM,OAAO,OAAO,UAAU,MAAM;AAAA,MAC/C,UAAU,MAAM,SAAS,OAAO,UAAU,MAAM;AAAA,MAChD;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC;AAAA,UACC;AAAA,UACA,mBAAmB,KAAK;AAAA,SAC1B;AAAA,QACA,oBAAC;AAAA,UACC,KAAK,KAAK;AAAA,UACV,aAAa,EAAE,iBAAiB,KAAK;AAAA,UACrC;AAAA,UACA;AAAA,UACA,MAAK;AAAA,UACL,MAAK;AAAA,UACL,UAAU,SAAO,KAAK,SAAS,EAAE,OAAO,IAAI,CAAC;AAAA,UAC7C,YAAY,iBAAe,KAAK,SAAS,EAAE,QAAQ,YAAY,CAAC;AAAA,UAChE,OAAM;AAAA,UACN;AAAA,SACF;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default, DSCodeEditor, CodeEditorWithSchema } from './DSCodeEditor';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAAA,UAAS,cAAc,4BAA4B;",
|
|
6
|
+
"names": ["default"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-codeeditor",
|
|
3
|
-
"version": "3.4.3
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Code Editor",
|
|
6
6
|
"files": [
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"indent": 4
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@elliemae/ds-button": "3.4.3
|
|
51
|
-
"@elliemae/ds-classnames": "3.4.3
|
|
52
|
-
"@elliemae/ds-form": "3.4.3
|
|
53
|
-
"@elliemae/ds-icons": "3.4.3
|
|
54
|
-
"@elliemae/ds-modal": "3.4.3
|
|
55
|
-
"@elliemae/ds-utilities": "3.4.3
|
|
50
|
+
"@elliemae/ds-button": "3.4.3",
|
|
51
|
+
"@elliemae/ds-classnames": "3.4.3",
|
|
52
|
+
"@elliemae/ds-form": "3.4.3",
|
|
53
|
+
"@elliemae/ds-icons": "3.4.3",
|
|
54
|
+
"@elliemae/ds-modal": "3.4.3",
|
|
55
|
+
"@elliemae/ds-utilities": "3.4.3",
|
|
56
56
|
"brace": "~0.11.1",
|
|
57
57
|
"react-ace": "~10.1.0"
|
|
58
58
|
},
|