@elliemae/ds-codeeditor 2.0.0-alpha.3 → 2.0.0-alpha.7
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/cjs/DSCodeEditor.js
CHANGED
|
@@ -49,10 +49,10 @@ const DSCodeEditor = ({
|
|
|
49
49
|
const reactAceComponent = React.useRef();
|
|
50
50
|
|
|
51
51
|
const editor = /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
52
|
-
children: [showHeader && /*#__PURE__*/_jsx__default[
|
|
52
|
+
children: [showHeader && /*#__PURE__*/_jsx__default["default"](DSCodeEditorForm, {
|
|
53
53
|
fileName: fileName,
|
|
54
54
|
reactAceComponent: reactAceComponent
|
|
55
|
-
}), /*#__PURE__*/jsxRuntime.jsx(AceEditor__default[
|
|
55
|
+
}), /*#__PURE__*/jsxRuntime.jsx(AceEditor__default["default"], {
|
|
56
56
|
ref: reactAceComponent,
|
|
57
57
|
editorProps: {
|
|
58
58
|
$blockScrolling: true
|
|
@@ -81,7 +81,7 @@ const DSCodeEditor = ({
|
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
if (!useModal) return editor;
|
|
84
|
-
return /*#__PURE__*/_jsx__default[
|
|
84
|
+
return /*#__PURE__*/_jsx__default["default"](DSModal__default["default"], {
|
|
85
85
|
centered: false,
|
|
86
86
|
confirmLabel: confirmLabel,
|
|
87
87
|
containerProps: containerProps,
|
|
@@ -122,4 +122,4 @@ const CodeEditorWithSchema = reactDesc.describe(DSCodeEditor);
|
|
|
122
122
|
CodeEditorWithSchema.propTypes = codeEditorProps;
|
|
123
123
|
|
|
124
124
|
exports.CodeEditorWithSchema = CodeEditorWithSchema;
|
|
125
|
-
exports[
|
|
125
|
+
exports["default"] = DSCodeEditor;
|
|
@@ -89,29 +89,29 @@ class DSCodeEditorForm extends React.Component {
|
|
|
89
89
|
filteredText,
|
|
90
90
|
replaceText
|
|
91
91
|
} = this.state;
|
|
92
|
-
return /*#__PURE__*/_jsx__default[
|
|
92
|
+
return /*#__PURE__*/_jsx__default["default"]("div", {
|
|
93
93
|
className: `${cssClassName}`
|
|
94
|
-
}, void 0, fileName ? /*#__PURE__*/_jsx__default[
|
|
94
|
+
}, void 0, fileName ? /*#__PURE__*/_jsx__default["default"]("div", {
|
|
95
95
|
className: classNameBlock('file-name')
|
|
96
|
-
}, void 0, "File Name: ", /*#__PURE__*/_jsx__default[
|
|
96
|
+
}, void 0, "File Name: ", /*#__PURE__*/_jsx__default["default"]("span", {}, void 0, " ", fileName, " ")) : null, /*#__PURE__*/_jsx__default["default"]("div", {
|
|
97
97
|
className: classNameBlock('find-replace-btn')
|
|
98
|
-
}, void 0, !find && !replace ? /*#__PURE__*/_jsx__default[
|
|
98
|
+
}, void 0, !find && !replace ? /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
99
99
|
buttonType: "secondary",
|
|
100
100
|
labelText: "Find",
|
|
101
101
|
onClick: () => this.setState({
|
|
102
102
|
find: true
|
|
103
103
|
}),
|
|
104
104
|
size: "m"
|
|
105
|
-
}) : null, !replace ? /*#__PURE__*/_jsx__default[
|
|
105
|
+
}) : null, !replace ? /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
106
106
|
buttonType: "secondary",
|
|
107
107
|
labelText: "Find & Replace",
|
|
108
108
|
onClick: () => this.setState({
|
|
109
109
|
replace: true
|
|
110
110
|
}),
|
|
111
111
|
size: "m"
|
|
112
|
-
}) : null), find || replace ? /*#__PURE__*/_jsx__default[
|
|
112
|
+
}) : null), find || replace ? /*#__PURE__*/_jsx__default["default"](DSInputGroup__default["default"], {
|
|
113
113
|
className: classNameBlock('find')
|
|
114
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
114
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSTextBox__default["default"], {
|
|
115
115
|
className: "find-word",
|
|
116
116
|
fluidWidth: false,
|
|
117
117
|
id: "find-textbox",
|
|
@@ -119,18 +119,18 @@ class DSCodeEditorForm extends React.Component {
|
|
|
119
119
|
filteredText: e.currentTarget.value
|
|
120
120
|
}),
|
|
121
121
|
placeholder: "Find",
|
|
122
|
-
rightComponent: /*#__PURE__*/_jsx__default[
|
|
122
|
+
rightComponent: /*#__PURE__*/_jsx__default["default"]("div", {
|
|
123
123
|
className: classNameBlock('next-back-btn')
|
|
124
|
-
}, void 0, _DSButton || (_DSButton = /*#__PURE__*/_jsx__default[
|
|
125
|
-
icon: /*#__PURE__*/_jsx__default[
|
|
124
|
+
}, void 0, _DSButton || (_DSButton = /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
125
|
+
icon: /*#__PURE__*/_jsx__default["default"](ChevronSmallLeft__default["default"], {}),
|
|
126
126
|
size: "m"
|
|
127
|
-
})), /*#__PURE__*/_jsx__default[
|
|
128
|
-
icon: _ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx__default[
|
|
127
|
+
})), /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
128
|
+
icon: _ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx__default["default"](ChevronSmallRight__default["default"], {})),
|
|
129
129
|
onClick: () => this.searchWord(),
|
|
130
130
|
size: "m"
|
|
131
131
|
})),
|
|
132
132
|
value: filteredText
|
|
133
|
-
}), /*#__PURE__*/_jsx__default[
|
|
133
|
+
}), /*#__PURE__*/_jsx__default["default"](CheckOptionsGroup, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSCheckbox__default["default"], {
|
|
134
134
|
checked: isCaseSensitive,
|
|
135
135
|
id: "case-sensitive-check",
|
|
136
136
|
labelText: "Case Sensitive",
|
|
@@ -138,7 +138,7 @@ class DSCodeEditorForm extends React.Component {
|
|
|
138
138
|
onChange: () => this.setState({
|
|
139
139
|
isCaseSensitive: !isCaseSensitive
|
|
140
140
|
})
|
|
141
|
-
}), /*#__PURE__*/_jsx__default[
|
|
141
|
+
}), /*#__PURE__*/_jsx__default["default"](DSCheckbox__default["default"], {
|
|
142
142
|
checked: isWholeWord,
|
|
143
143
|
id: "whole-word-check",
|
|
144
144
|
labelText: "Whole Word",
|
|
@@ -146,7 +146,7 @@ class DSCodeEditorForm extends React.Component {
|
|
|
146
146
|
onChange: () => this.setState({
|
|
147
147
|
isWholeWord: !isWholeWord
|
|
148
148
|
})
|
|
149
|
-
}), /*#__PURE__*/_jsx__default[
|
|
149
|
+
}), /*#__PURE__*/_jsx__default["default"](DSCheckbox__default["default"], {
|
|
150
150
|
checked: replace,
|
|
151
151
|
id: "replace-check",
|
|
152
152
|
labelText: "Replace",
|
|
@@ -154,7 +154,7 @@ class DSCodeEditorForm extends React.Component {
|
|
|
154
154
|
onChange: () => this.setState({
|
|
155
155
|
replace: !replace
|
|
156
156
|
})
|
|
157
|
-
})), /*#__PURE__*/_jsx__default[
|
|
157
|
+
})), /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
158
158
|
buttonType: "secondary",
|
|
159
159
|
labelText: "Done",
|
|
160
160
|
onClick: () => this.setState({
|
|
@@ -162,9 +162,9 @@ class DSCodeEditorForm extends React.Component {
|
|
|
162
162
|
find: false
|
|
163
163
|
}),
|
|
164
164
|
size: "m"
|
|
165
|
-
})) : null, replace ? /*#__PURE__*/_jsx__default[
|
|
165
|
+
})) : null, replace ? /*#__PURE__*/_jsx__default["default"]("div", {
|
|
166
166
|
className: classNameBlock('replace')
|
|
167
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
167
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSTextBox__default["default"], {
|
|
168
168
|
className: "find-word",
|
|
169
169
|
fluidWidth: false,
|
|
170
170
|
id: "replace-textbox",
|
|
@@ -173,14 +173,14 @@ class DSCodeEditorForm extends React.Component {
|
|
|
173
173
|
}),
|
|
174
174
|
placeholder: "Replace",
|
|
175
175
|
value: replaceText
|
|
176
|
-
}), /*#__PURE__*/_jsx__default[
|
|
176
|
+
}), /*#__PURE__*/_jsx__default["default"]("div", {
|
|
177
177
|
className: classNameBlock('replace-btns')
|
|
178
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
178
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
179
179
|
buttonType: "secondary",
|
|
180
180
|
labelText: "Replace",
|
|
181
181
|
onClick: () => this.searchWord(true, false),
|
|
182
182
|
size: "m"
|
|
183
|
-
}), /*#__PURE__*/_jsx__default[
|
|
183
|
+
}), /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
184
184
|
buttonType: "secondary",
|
|
185
185
|
labelText: "Replace All",
|
|
186
186
|
onClick: () => this.searchWord(true, true),
|
|
@@ -23,7 +23,7 @@ class DSCodeEditorImpl extends React.Component {
|
|
|
23
23
|
value: props.value,
|
|
24
24
|
errors: []
|
|
25
25
|
};
|
|
26
|
-
this.reactAceComponent = /*#__PURE__*/React__default[
|
|
26
|
+
this.reactAceComponent = /*#__PURE__*/React__default["default"].createRef();
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
render() {
|
|
@@ -47,7 +47,7 @@ class DSCodeEditorImpl extends React.Component {
|
|
|
47
47
|
value,
|
|
48
48
|
errors
|
|
49
49
|
} = this.state;
|
|
50
|
-
return /*#__PURE__*/_jsx__default[
|
|
50
|
+
return /*#__PURE__*/_jsx__default["default"](DSModal__default["default"], {
|
|
51
51
|
centered: false,
|
|
52
52
|
confirmLabel: confirmLabel,
|
|
53
53
|
containerProps: containerProps,
|
|
@@ -60,10 +60,10 @@ class DSCodeEditorImpl extends React.Component {
|
|
|
60
60
|
rejectLabel: rejectLabel,
|
|
61
61
|
size: size,
|
|
62
62
|
style: style
|
|
63
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
63
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSCodeEditorForm, {
|
|
64
64
|
fileName: fileName,
|
|
65
65
|
reactAceComponent: this.reactAceComponent
|
|
66
|
-
}), /*#__PURE__*/jsxRuntime.jsx(AceEditor__default[
|
|
66
|
+
}), /*#__PURE__*/jsxRuntime.jsx(AceEditor__default["default"], {
|
|
67
67
|
ref: this.reactAceComponent,
|
|
68
68
|
editorProps: {
|
|
69
69
|
$blockScrolling: true
|
package/cjs/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-codeeditor",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Code Editor",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"build": "node ../../scripts/build/build.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@elliemae/ds-basic": "2.0.0-alpha.
|
|
48
|
-
"@elliemae/ds-classnames": "2.0.0-alpha.
|
|
49
|
-
"@elliemae/ds-modal": "2.0.0-alpha.
|
|
47
|
+
"@elliemae/ds-basic": "2.0.0-alpha.7",
|
|
48
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.7",
|
|
49
|
+
"@elliemae/ds-modal": "2.0.0-alpha.7",
|
|
50
50
|
"brace": "~0.11.1",
|
|
51
51
|
"react-ace": "~6.6.0"
|
|
52
52
|
},
|