@elliemae/ds-codeeditor 2.0.0-next.8 → 2.0.0-rc.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/cjs/DSCodeEditor.js +22 -21
- package/cjs/components/DSCodeEditorForm.js +15 -20
- package/esm/DSCodeEditor.js +22 -21
- package/esm/components/DSCodeEditorForm.js +7 -7
- package/package.json +7 -5
package/cjs/DSCodeEditor.js
CHANGED
|
@@ -19,27 +19,28 @@ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
|
19
19
|
var DSModal__default = /*#__PURE__*/_interopDefaultLegacy(DSModal);
|
|
20
20
|
var AceEditor__default = /*#__PURE__*/_interopDefaultLegacy(AceEditor);
|
|
21
21
|
|
|
22
|
-
const DSCodeEditor =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
const DSCodeEditor = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
containerProps = {},
|
|
25
|
+
value: defaultValue = '',
|
|
26
|
+
onSave = () => null,
|
|
27
|
+
onClose = () => null,
|
|
28
|
+
onReject = () => null,
|
|
29
|
+
onChange = () => null,
|
|
30
|
+
isOpen = false,
|
|
31
|
+
fileName = '',
|
|
32
|
+
confirmLabel = 'Save',
|
|
33
|
+
maxLines = 20,
|
|
34
|
+
minLines = 20,
|
|
35
|
+
modalTitle = 'Javascript Editor',
|
|
36
|
+
modalType = 'confirm',
|
|
37
|
+
rejectLabel = 'Close',
|
|
38
|
+
size = 'large',
|
|
39
|
+
style = {},
|
|
40
|
+
useModal = true,
|
|
41
|
+
showHeader = true,
|
|
42
|
+
showSyntaxChecks = true
|
|
43
|
+
} = _ref;
|
|
43
44
|
const [{
|
|
44
45
|
value,
|
|
45
46
|
errors
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
-
require('core-js/modules/
|
|
4
|
+
require('core-js/modules/esnext.async-iterator.find.js');
|
|
5
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.find.js');
|
|
5
7
|
require('core-js/modules/es.string.replace.js');
|
|
8
|
+
require('core-js/modules/es.string.replace-all.js');
|
|
6
9
|
var React = require('react');
|
|
7
|
-
var DSButton = require('@elliemae/ds-
|
|
8
|
-
var
|
|
9
|
-
var DSTextBox = require('@elliemae/ds-basic/form/TextBox');
|
|
10
|
-
var DSInputGroup = require('@elliemae/ds-basic/form/InputGroup');
|
|
10
|
+
var DSButton = require('@elliemae/ds-button');
|
|
11
|
+
var dsForm = require('@elliemae/ds-form');
|
|
11
12
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
12
|
-
var
|
|
13
|
-
var ChevronSmallRight = require('@elliemae/ds-icons/ChevronSmallRight');
|
|
13
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
17
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
18
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
19
|
-
var DSCheckbox__default = /*#__PURE__*/_interopDefaultLegacy(DSCheckbox);
|
|
20
|
-
var DSTextBox__default = /*#__PURE__*/_interopDefaultLegacy(DSTextBox);
|
|
21
|
-
var DSInputGroup__default = /*#__PURE__*/_interopDefaultLegacy(DSInputGroup);
|
|
22
|
-
var ChevronSmallLeft__default = /*#__PURE__*/_interopDefaultLegacy(ChevronSmallLeft);
|
|
23
|
-
var ChevronSmallRight__default = /*#__PURE__*/_interopDefaultLegacy(ChevronSmallRight);
|
|
24
19
|
|
|
25
20
|
var _DSButton, _ChevronSmallRight;
|
|
26
21
|
const blockName = 'code-editor';
|
|
@@ -110,9 +105,9 @@ class DSCodeEditorForm extends React.Component {
|
|
|
110
105
|
replace: true
|
|
111
106
|
}),
|
|
112
107
|
size: "m"
|
|
113
|
-
}) : null), find || replace ? /*#__PURE__*/_jsx__default["default"](
|
|
108
|
+
}) : null), find || replace ? /*#__PURE__*/_jsx__default["default"](dsForm.DSInputGroup, {
|
|
114
109
|
className: classNameBlock('find')
|
|
115
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
110
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsForm.DSTextBox, {
|
|
116
111
|
className: "find-word",
|
|
117
112
|
fluidWidth: false,
|
|
118
113
|
id: "find-textbox",
|
|
@@ -123,15 +118,15 @@ class DSCodeEditorForm extends React.Component {
|
|
|
123
118
|
rightComponent: /*#__PURE__*/_jsx__default["default"]("div", {
|
|
124
119
|
className: classNameBlock('next-back-btn')
|
|
125
120
|
}, void 0, _DSButton || (_DSButton = /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
126
|
-
icon: /*#__PURE__*/_jsx__default["default"](
|
|
121
|
+
icon: /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronSmallLeft, {}),
|
|
127
122
|
size: "m"
|
|
128
123
|
})), /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
129
|
-
icon: _ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx__default["default"](
|
|
124
|
+
icon: _ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronSmallRight, {})),
|
|
130
125
|
onClick: () => this.searchWord(),
|
|
131
126
|
size: "m"
|
|
132
127
|
})),
|
|
133
128
|
value: filteredText
|
|
134
|
-
}), /*#__PURE__*/_jsx__default["default"](CheckOptionsGroup, {}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
129
|
+
}), /*#__PURE__*/_jsx__default["default"](CheckOptionsGroup, {}, void 0, /*#__PURE__*/_jsx__default["default"](dsForm.DSCheckbox, {
|
|
135
130
|
checked: isCaseSensitive,
|
|
136
131
|
id: "case-sensitive-check",
|
|
137
132
|
labelText: "Case Sensitive",
|
|
@@ -139,7 +134,7 @@ class DSCodeEditorForm extends React.Component {
|
|
|
139
134
|
onChange: () => this.setState({
|
|
140
135
|
isCaseSensitive: !isCaseSensitive
|
|
141
136
|
})
|
|
142
|
-
}), /*#__PURE__*/_jsx__default["default"](
|
|
137
|
+
}), /*#__PURE__*/_jsx__default["default"](dsForm.DSCheckbox, {
|
|
143
138
|
checked: isWholeWord,
|
|
144
139
|
id: "whole-word-check",
|
|
145
140
|
labelText: "Whole Word",
|
|
@@ -147,7 +142,7 @@ class DSCodeEditorForm extends React.Component {
|
|
|
147
142
|
onChange: () => this.setState({
|
|
148
143
|
isWholeWord: !isWholeWord
|
|
149
144
|
})
|
|
150
|
-
}), /*#__PURE__*/_jsx__default["default"](
|
|
145
|
+
}), /*#__PURE__*/_jsx__default["default"](dsForm.DSCheckbox, {
|
|
151
146
|
checked: replace,
|
|
152
147
|
id: "replace-check",
|
|
153
148
|
labelText: "Replace",
|
|
@@ -165,7 +160,7 @@ class DSCodeEditorForm extends React.Component {
|
|
|
165
160
|
size: "m"
|
|
166
161
|
})) : null, replace ? /*#__PURE__*/_jsx__default["default"]("div", {
|
|
167
162
|
className: classNameBlock('replace')
|
|
168
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
163
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsForm.DSTextBox, {
|
|
169
164
|
className: "find-word",
|
|
170
165
|
fluidWidth: false,
|
|
171
166
|
id: "replace-textbox",
|
package/esm/DSCodeEditor.js
CHANGED
|
@@ -9,27 +9,28 @@ import 'brace/mode/javascript.js';
|
|
|
9
9
|
import 'brace/theme/tomorrow.js';
|
|
10
10
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
|
-
const DSCodeEditor =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
12
|
+
const DSCodeEditor = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
containerProps = {},
|
|
15
|
+
value: defaultValue = '',
|
|
16
|
+
onSave = () => null,
|
|
17
|
+
onClose = () => null,
|
|
18
|
+
onReject = () => null,
|
|
19
|
+
onChange = () => null,
|
|
20
|
+
isOpen = false,
|
|
21
|
+
fileName = '',
|
|
22
|
+
confirmLabel = 'Save',
|
|
23
|
+
maxLines = 20,
|
|
24
|
+
minLines = 20,
|
|
25
|
+
modalTitle = 'Javascript Editor',
|
|
26
|
+
modalType = 'confirm',
|
|
27
|
+
rejectLabel = 'Close',
|
|
28
|
+
size = 'large',
|
|
29
|
+
style = {},
|
|
30
|
+
useModal = true,
|
|
31
|
+
showHeader = true,
|
|
32
|
+
showSyntaxChecks = true
|
|
33
|
+
} = _ref;
|
|
33
34
|
const [{
|
|
34
35
|
value,
|
|
35
36
|
errors
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
-
import 'core-js/modules/
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.find.js';
|
|
3
5
|
import 'core-js/modules/es.string.replace.js';
|
|
6
|
+
import 'core-js/modules/es.string.replace-all.js';
|
|
4
7
|
import { Component } from 'react';
|
|
5
|
-
import DSButton from '@elliemae/ds-
|
|
6
|
-
import DSCheckbox from '@elliemae/ds-
|
|
7
|
-
import DSTextBox from '@elliemae/ds-basic/form/TextBox';
|
|
8
|
-
import DSInputGroup from '@elliemae/ds-basic/form/InputGroup';
|
|
8
|
+
import DSButton from '@elliemae/ds-button';
|
|
9
|
+
import { DSInputGroup, DSTextBox, DSCheckbox } from '@elliemae/ds-form';
|
|
9
10
|
import { convertPropToCssClassName, aggregatedClasses } from '@elliemae/ds-classnames';
|
|
10
|
-
import ChevronSmallLeft from '@elliemae/ds-icons
|
|
11
|
-
import ChevronSmallRight from '@elliemae/ds-icons/ChevronSmallRight';
|
|
11
|
+
import { ChevronSmallLeft, ChevronSmallRight } from '@elliemae/ds-icons';
|
|
12
12
|
|
|
13
13
|
var _DSButton, _ChevronSmallRight;
|
|
14
14
|
const blockName = 'code-editor';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-codeeditor",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Code Editor",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
"build": "node ../../scripts/build/build.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@elliemae/ds-basic": "2.0.0-
|
|
48
|
-
"@elliemae/ds-classnames": "2.0.0-
|
|
49
|
-
"@elliemae/ds-
|
|
47
|
+
"@elliemae/ds-basic": "2.0.0-rc.3",
|
|
48
|
+
"@elliemae/ds-classnames": "2.0.0-rc.3",
|
|
49
|
+
"@elliemae/ds-icons": "2.0.0-rc.3",
|
|
50
|
+
"@elliemae/ds-modal": "2.0.0-rc.3",
|
|
50
51
|
"brace": "~0.11.1",
|
|
51
|
-
"react-ace": "~6.6.0"
|
|
52
|
+
"react-ace": "~6.6.0",
|
|
53
|
+
"react-desc": "~4.1.3"
|
|
52
54
|
},
|
|
53
55
|
"peerDependencies": {
|
|
54
56
|
"lodash": "^4.17.21",
|