@elliemae/ds-codeeditor 2.2.0-alpha.4 → 3.0.0-next.2

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.
@@ -1,50 +1,31 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var DSCodeEditorImpl_exports = {};
29
- __export(DSCodeEditorImpl_exports, {
30
- default: () => DSCodeEditorImpl_default
31
- });
32
- var React = __toESM(require("react"));
33
- var import_react = __toESM(require("react"));
34
- var import_react_ace = __toESM(require("react-ace"));
35
- var import_ds_modal = __toESM(require("@elliemae/ds-modal"));
36
- var import_DSCodeEditorForm = __toESM(require("./DSCodeEditorForm"));
37
- var import_javascript = require("brace/mode/javascript.js");
38
- var import_tomorrow = require("brace/theme/tomorrow.js");
39
- class DSCodeEditorImpl extends import_react.Component {
1
+ 'use strict';
2
+
3
+ var _jsx = require('@babel/runtime/helpers/jsx');
4
+ var React = require('react');
5
+ var AceEditor = require('react-ace');
6
+ var DSModal = require('@elliemae/ds-modal');
7
+ var DSCodeEditorForm = require('./DSCodeEditorForm.js');
8
+ require('brace/mode/javascript.js');
9
+ require('brace/theme/tomorrow.js');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
15
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
+ var AceEditor__default = /*#__PURE__*/_interopDefaultLegacy(AceEditor);
17
+ var DSModal__default = /*#__PURE__*/_interopDefaultLegacy(DSModal);
18
+
19
+ class DSCodeEditorImpl extends React.Component {
40
20
  constructor(props) {
41
21
  super(props);
42
22
  this.state = {
43
23
  value: props.value,
44
24
  errors: []
45
25
  };
46
- this.reactAceComponent = import_react.default.createRef();
26
+ this.reactAceComponent = /*#__PURE__*/React__default["default"].createRef();
47
27
  }
28
+
48
29
  render() {
49
30
  const {
50
31
  onSave,
@@ -62,37 +43,46 @@ class DSCodeEditorImpl extends import_react.Component {
62
43
  style,
63
44
  containerProps
64
45
  } = this.props;
65
- const { value, errors } = this.state;
66
- return /* @__PURE__ */ import_react.default.createElement(import_ds_modal.default, {
46
+ const {
47
+ value,
48
+ errors
49
+ } = this.state;
50
+ return /*#__PURE__*/_jsx__default["default"](DSModal__default["default"], {
67
51
  centered: false,
68
- confirmLabel,
69
- containerProps,
70
- isOpen,
71
- modalTitle,
72
- modalType,
52
+ confirmLabel: confirmLabel,
53
+ containerProps: containerProps,
54
+ isOpen: isOpen,
55
+ modalTitle: modalTitle,
56
+ modalType: modalType,
73
57
  onClose: () => onClose(value, fileName, errors),
74
58
  onConfirm: () => onSave(value, fileName, errors),
75
59
  onReject: () => onReject(value, fileName, errors),
76
- rejectLabel,
77
- size,
78
- style
79
- }, /* @__PURE__ */ import_react.default.createElement(import_DSCodeEditorForm.default, {
80
- fileName,
60
+ rejectLabel: rejectLabel,
61
+ size: size,
62
+ style: style
63
+ }, void 0, /*#__PURE__*/_jsx__default["default"](DSCodeEditorForm, {
64
+ fileName: fileName,
81
65
  reactAceComponent: this.reactAceComponent
82
- }), /* @__PURE__ */ import_react.default.createElement(import_react_ace.default, {
66
+ }), /*#__PURE__*/jsxRuntime.jsx(AceEditor__default["default"], {
83
67
  ref: this.reactAceComponent,
84
- editorProps: { $blockScrolling: true },
85
- maxLines,
86
- minLines,
68
+ editorProps: {
69
+ $blockScrolling: true
70
+ },
71
+ maxLines: maxLines,
72
+ minLines: minLines,
87
73
  mode: "javascript",
88
74
  name: "ace-code-edior",
89
- onChange: (val) => this.setState({ value: val }),
90
- onValidate: (annotations) => this.setState({ errors: annotations }),
75
+ onChange: val => this.setState({
76
+ value: val
77
+ }),
78
+ onValidate: annotations => this.setState({
79
+ errors: annotations
80
+ }),
91
81
  theme: "tomorrow",
92
- value
82
+ value: value
93
83
  }));
94
84
  }
85
+
95
86
  }
96
- var DSCodeEditorImpl_default = DSCodeEditorImpl;
97
- module.exports = __toCommonJS(DSCodeEditorImpl_exports);
98
- //# sourceMappingURL=DSCodeEditorImpl.js.map
87
+
88
+ module.exports = DSCodeEditorImpl;
package/cjs/index.js CHANGED
@@ -1,36 +1,10 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var src_exports = {};
29
- __export(src_exports, {
30
- CodeEditorWithSchema: () => import_DSCodeEditor.CodeEditorWithSchema,
31
- default: () => import_DSCodeEditor.default
32
- });
33
- var React = __toESM(require("react"));
34
- var import_DSCodeEditor = require("./DSCodeEditor");
35
- module.exports = __toCommonJS(src_exports);
36
- //# sourceMappingURL=index.js.map
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DSCodeEditor = require('./DSCodeEditor.js');
6
+
7
+
8
+
9
+ exports.CodeEditorWithSchema = DSCodeEditor.CodeEditorWithSchema;
10
+ exports["default"] = DSCodeEditor["default"];
@@ -1,102 +1,116 @@
1
- import * as React from "react";
2
- import React2, { useState, useRef } from "react";
3
- import { describe, PropTypes } from "react-desc";
4
- import DSModal, { modalTypes } from "@elliemae/ds-modal";
5
- import AceEditor from "react-ace";
6
- import DSCodeEditorForm from "./components/DSCodeEditorForm";
7
- import "brace/mode/javascript.js";
8
- import "brace/theme/tomorrow.js";
9
- const DSCodeEditor = ({
10
- containerProps = {},
11
- value: defaultValue = "",
12
- onSave = () => null,
13
- onClose = () => null,
14
- onReject = () => null,
15
- onChange = () => null,
16
- isOpen = false,
17
- fileName = "",
18
- confirmLabel = "Save",
19
- maxLines = 20,
20
- minLines = 20,
21
- modalTitle = "Javascript Editor",
22
- modalType = "confirm",
23
- rejectLabel = "Close",
24
- size = "large",
25
- style = {},
26
- useModal = true,
27
- showHeader = true,
28
- showSyntaxChecks = true
29
- }) => {
30
- const [{ value, errors }, setState] = useState({
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
+ import { useState, useRef } from 'react';
4
+ import { PropTypes, describe } from 'react-desc';
5
+ import DSModal, { modalTypes } from '@elliemae/ds-modal';
6
+ import AceEditor from 'react-ace';
7
+ import DSCodeEditorForm from './components/DSCodeEditorForm.js';
8
+ import 'brace/mode/javascript.js';
9
+ import 'brace/theme/tomorrow.js';
10
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
+
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;
34
+ const [{
35
+ value,
36
+ errors
37
+ }, setState] = useState({
31
38
  value: defaultValue,
32
39
  errors: []
33
40
  });
34
41
  const reactAceComponent = useRef();
35
- const editor = /* @__PURE__ */ React2.createElement(React2.Fragment, null, showHeader && /* @__PURE__ */ React2.createElement(DSCodeEditorForm, {
36
- fileName,
37
- reactAceComponent
38
- }), /* @__PURE__ */ React2.createElement(AceEditor, {
39
- ref: reactAceComponent,
40
- editorProps: { $blockScrolling: true },
41
- maxLines,
42
- minLines,
43
- mode: "javascript",
44
- name: "ace-code-edior",
45
- onChange: (val) => {
46
- setState({ errors, value: val });
47
- onChange(val, errors);
48
- },
49
- onValidate: (annotations) => setState({ value, errors: annotations }),
50
- theme: "tomorrow",
51
- setOptions: {
52
- useWorker: showSyntaxChecks
53
- },
54
- value
55
- }));
56
- if (!useModal)
57
- return editor;
58
- return /* @__PURE__ */ React2.createElement(DSModal, {
42
+
43
+ const editor = /*#__PURE__*/jsxs(Fragment, {
44
+ children: [showHeader && /*#__PURE__*/_jsx(DSCodeEditorForm, {
45
+ fileName: fileName,
46
+ reactAceComponent: reactAceComponent
47
+ }), /*#__PURE__*/jsx(AceEditor, {
48
+ ref: reactAceComponent,
49
+ editorProps: {
50
+ $blockScrolling: true
51
+ },
52
+ maxLines: maxLines,
53
+ minLines: minLines,
54
+ mode: "javascript",
55
+ name: "ace-code-edior",
56
+ onChange: val => {
57
+ setState({
58
+ errors,
59
+ value: val
60
+ });
61
+ onChange(val, errors);
62
+ },
63
+ onValidate: annotations => setState({
64
+ value,
65
+ errors: annotations
66
+ }),
67
+ theme: "tomorrow",
68
+ setOptions: {
69
+ useWorker: showSyntaxChecks
70
+ },
71
+ value: value
72
+ })]
73
+ });
74
+
75
+ if (!useModal) return editor;
76
+ return /*#__PURE__*/_jsx(DSModal, {
59
77
  centered: false,
60
- confirmLabel,
61
- containerProps,
62
- isOpen,
63
- modalTitle,
64
- modalType,
78
+ confirmLabel: confirmLabel,
79
+ containerProps: containerProps,
80
+ isOpen: isOpen,
81
+ modalTitle: modalTitle,
82
+ modalType: modalType,
65
83
  onClose: () => onClose(value, fileName, errors),
66
84
  onConfirm: () => onSave(value, fileName, errors),
67
85
  onReject: () => onReject(value, fileName, errors),
68
- rejectLabel,
69
- size,
70
- style
71
- }, editor);
86
+ rejectLabel: rejectLabel,
87
+ size: size,
88
+ style: style
89
+ }, void 0, editor);
72
90
  };
91
+
73
92
  const codeEditorProps = {
74
- containerProps: PropTypes.object.description("Set of Properties attached to the main container"),
75
- value: PropTypes.string.description("editors content").isRequired,
76
- onSave: PropTypes.func.description("function called when the user press save"),
77
- onClose: PropTypes.func.description("function called when the user closes the modal"),
78
- onReject: PropTypes.func.description("function called when is rejected"),
79
- onChange: PropTypes.func.description("function executed when code editor value changes").isRequired,
80
- isOpen: PropTypes.bool.description("Whether the modal is opened or not").defaultValue(false),
81
- fileName: PropTypes.string.description("File name to open in the editor"),
82
- maxLines: PropTypes.number.description("Max lines in the editor content").defaultValue(20),
83
- minLines: PropTypes.number.description("Min lines in the editor content").defaultValue(20),
84
- modalTitle: PropTypes.string.description("Modal title").defaultValue("Javascript Editor"),
85
- confirmLabel: PropTypes.string.description("Customize modal confirm label").defaultValue("Save"),
86
- rejectLabel: PropTypes.string.description("Customize modal rejection label").defaultValue("Close"),
87
- modalType: PropTypes.oneOf(modalTypes).description("Modal type").defaultValue("confirm"),
88
- size: PropTypes.oneOf(["xsmall", "small", "medium", "large", "xlarge"]).description("modal size").defaultValue("large"),
89
- style: PropTypes.object.description("css inline style"),
90
- useModal: PropTypes.bool.description("whether to use code editor inside modal or not").defaultValue(true),
91
- showHeader: PropTypes.bool.description("show editors header").defaultValue(true),
92
- showSyntaxChecks: PropTypes.bool.description("show syntax warnings and checks").defaultValue(true)
93
+ containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
94
+ value: PropTypes.string.description('editors content').isRequired,
95
+ onSave: PropTypes.func.description('function called when the user press save'),
96
+ onClose: PropTypes.func.description('function called when the user closes the modal'),
97
+ onReject: PropTypes.func.description('function called when is rejected'),
98
+ onChange: PropTypes.func.description('function executed when code editor value changes').isRequired,
99
+ isOpen: PropTypes.bool.description('Whether the modal is opened or not').defaultValue(false),
100
+ fileName: PropTypes.string.description('File name to open in the editor'),
101
+ maxLines: PropTypes.number.description('Max lines in the editor content').defaultValue(20),
102
+ minLines: PropTypes.number.description('Min lines in the editor content').defaultValue(20),
103
+ modalTitle: PropTypes.string.description('Modal title').defaultValue('Javascript Editor'),
104
+ confirmLabel: PropTypes.string.description('Customize modal confirm label').defaultValue('Save'),
105
+ rejectLabel: PropTypes.string.description('Customize modal rejection label').defaultValue('Close'),
106
+ modalType: PropTypes.oneOf(modalTypes).description('Modal type').defaultValue('confirm'),
107
+ size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']).description('modal size').defaultValue('large'),
108
+ style: PropTypes.object.description('css inline style'),
109
+ useModal: PropTypes.bool.description('whether to use code editor inside modal or not').defaultValue(true),
110
+ showHeader: PropTypes.bool.description('show editors header').defaultValue(true),
111
+ showSyntaxChecks: PropTypes.bool.description('show syntax warnings and checks').defaultValue(true)
93
112
  };
94
- DSCodeEditor.propTypes = codeEditorProps;
95
113
  const CodeEditorWithSchema = describe(DSCodeEditor);
96
114
  CodeEditorWithSchema.propTypes = codeEditorProps;
97
- var DSCodeEditor_default = DSCodeEditor;
98
- export {
99
- CodeEditorWithSchema,
100
- DSCodeEditor_default as default
101
- };
102
- //# sourceMappingURL=DSCodeEditor.js.map
115
+
116
+ export { CodeEditorWithSchema, DSCodeEditor as default };
@@ -1,12 +1,23 @@
1
- import * as React from "react";
2
- import React2, { Component } from "react";
3
- import DSButton from "@elliemae/ds-button";
4
- import { DSCheckbox, DSTextBox, DSInputGroup } from "@elliemae/ds-form";
5
- import { convertPropToCssClassName, aggregatedClasses } from "@elliemae/ds-classnames";
6
- import { ChevronSmallLeft, ChevronSmallRight } from "@elliemae/ds-icons";
7
- const blockName = "code-editor";
8
- const { cssClassName, classNameBlock } = convertPropToCssClassName(blockName);
9
- const CheckOptionsGroup = aggregatedClasses("div")(`${blockName}-options-group`);
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
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';
5
+ import 'core-js/modules/es.string.replace.js';
6
+ import 'core-js/modules/es.string.replace-all.js';
7
+ import { Component } from 'react';
8
+ import DSButton from '@elliemae/ds-button';
9
+ import { DSInputGroup, DSTextBox, DSCheckbox } from '@elliemae/ds-form';
10
+ import { convertPropToCssClassName, aggregatedClasses } from '@elliemae/ds-classnames';
11
+ import { ChevronSmallLeft, ChevronSmallRight } from '@elliemae/ds-icons';
12
+
13
+ var _DSButton, _ChevronSmallRight;
14
+ const blockName = 'code-editor';
15
+ const {
16
+ cssClassName,
17
+ classNameBlock
18
+ } = convertPropToCssClassName(blockName);
19
+ const CheckOptionsGroup = aggregatedClasses('div')("".concat(blockName, "-options-group"));
20
+
10
21
  class DSCodeEditorForm extends Component {
11
22
  constructor(props) {
12
23
  super(props);
@@ -15,17 +26,25 @@ class DSCodeEditorForm extends Component {
15
26
  replace: false,
16
27
  isCaseSensitive: false,
17
28
  isWholeWord: false,
18
- filteredText: "",
19
- replaceText: ""
29
+ filteredText: '',
30
+ replaceText: ''
20
31
  };
21
32
  }
33
+
22
34
  searchWord(isReplace, all) {
23
35
  const {
24
36
  reactAceComponent: {
25
- current: { editor }
37
+ current: {
38
+ editor
39
+ }
26
40
  }
27
41
  } = this.props;
28
- const { isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;
42
+ const {
43
+ isCaseSensitive,
44
+ isWholeWord,
45
+ filteredText,
46
+ replaceText
47
+ } = this.state;
29
48
  const options = {
30
49
  backwards: false,
31
50
  wrap: true,
@@ -35,6 +54,7 @@ class DSCodeEditorForm extends Component {
35
54
  };
36
55
  editor.find(filteredText, options);
37
56
  const selectedContent = editor.getSelectedText();
57
+
38
58
  if (isReplace && replaceText && selectedContent) {
39
59
  if (all) {
40
60
  editor.findAll(filteredText, options);
@@ -45,93 +65,118 @@ class DSCodeEditorForm extends Component {
45
65
  }
46
66
  }
47
67
  }
68
+
48
69
  render() {
49
- const { fileName } = this.props;
50
- const { find, replace, isCaseSensitive, isWholeWord, filteredText, replaceText } = this.state;
51
- return /* @__PURE__ */ React2.createElement("div", {
52
- className: `${cssClassName}`
53
- }, fileName ? /* @__PURE__ */ React2.createElement("div", {
54
- className: classNameBlock("file-name")
55
- }, "File Name: ", /* @__PURE__ */ React2.createElement("span", null, " ", fileName, " ")) : null, /* @__PURE__ */ React2.createElement("div", {
56
- className: classNameBlock("find-replace-btn")
57
- }, !find && !replace ? /* @__PURE__ */ React2.createElement(DSButton, {
70
+ const {
71
+ fileName
72
+ } = this.props;
73
+ const {
74
+ find,
75
+ replace,
76
+ isCaseSensitive,
77
+ isWholeWord,
78
+ filteredText,
79
+ replaceText
80
+ } = this.state;
81
+ return /*#__PURE__*/_jsx("div", {
82
+ className: "".concat(cssClassName)
83
+ }, void 0, fileName ? /*#__PURE__*/_jsx("div", {
84
+ className: classNameBlock('file-name')
85
+ }, void 0, "File Name: ", /*#__PURE__*/_jsx("span", {}, void 0, " ", fileName, " ")) : null, /*#__PURE__*/_jsx("div", {
86
+ className: classNameBlock('find-replace-btn')
87
+ }, void 0, !find && !replace ? /*#__PURE__*/_jsx(DSButton, {
58
88
  buttonType: "secondary",
59
89
  labelText: "Find",
60
- onClick: () => this.setState({ find: true }),
90
+ onClick: () => this.setState({
91
+ find: true
92
+ }),
61
93
  size: "m"
62
- }) : null, !replace ? /* @__PURE__ */ React2.createElement(DSButton, {
94
+ }) : null, !replace ? /*#__PURE__*/_jsx(DSButton, {
63
95
  buttonType: "secondary",
64
96
  labelText: "Find & Replace",
65
- onClick: () => this.setState({ replace: true }),
97
+ onClick: () => this.setState({
98
+ replace: true
99
+ }),
66
100
  size: "m"
67
- }) : null), find || replace ? /* @__PURE__ */ React2.createElement(DSInputGroup, {
68
- className: classNameBlock("find")
69
- }, /* @__PURE__ */ React2.createElement(DSTextBox, {
101
+ }) : null), find || replace ? /*#__PURE__*/_jsx(DSInputGroup, {
102
+ className: classNameBlock('find')
103
+ }, void 0, /*#__PURE__*/_jsx(DSTextBox, {
70
104
  className: "find-word",
71
105
  fluidWidth: false,
72
106
  id: "find-textbox",
73
- onChange: (e) => this.setState({ filteredText: e.currentTarget.value }),
107
+ onChange: e => this.setState({
108
+ filteredText: e.currentTarget.value
109
+ }),
74
110
  placeholder: "Find",
75
- rightComponent: /* @__PURE__ */ React2.createElement("div", {
76
- className: classNameBlock("next-back-btn")
77
- }, /* @__PURE__ */ React2.createElement(DSButton, {
78
- icon: /* @__PURE__ */ React2.createElement(ChevronSmallLeft, null),
111
+ rightComponent: /*#__PURE__*/_jsx("div", {
112
+ className: classNameBlock('next-back-btn')
113
+ }, void 0, _DSButton || (_DSButton = /*#__PURE__*/_jsx(DSButton, {
114
+ icon: /*#__PURE__*/_jsx(ChevronSmallLeft, {}),
79
115
  size: "m"
80
- }), /* @__PURE__ */ React2.createElement(DSButton, {
81
- icon: /* @__PURE__ */ React2.createElement(ChevronSmallRight, null),
116
+ })), /*#__PURE__*/_jsx(DSButton, {
117
+ icon: _ChevronSmallRight || (_ChevronSmallRight = /*#__PURE__*/_jsx(ChevronSmallRight, {})),
82
118
  onClick: () => this.searchWord(),
83
119
  size: "m"
84
120
  })),
85
121
  value: filteredText
86
- }), /* @__PURE__ */ React2.createElement(CheckOptionsGroup, null, /* @__PURE__ */ React2.createElement(DSCheckbox, {
122
+ }), /*#__PURE__*/_jsx(CheckOptionsGroup, {}, void 0, /*#__PURE__*/_jsx(DSCheckbox, {
87
123
  checked: isCaseSensitive,
88
124
  id: "case-sensitive-check",
89
125
  labelText: "Case Sensitive",
90
126
  name: "case-sensitive-check",
91
- onChange: () => this.setState({ isCaseSensitive: !isCaseSensitive })
92
- }), /* @__PURE__ */ React2.createElement(DSCheckbox, {
127
+ onChange: () => this.setState({
128
+ isCaseSensitive: !isCaseSensitive
129
+ })
130
+ }), /*#__PURE__*/_jsx(DSCheckbox, {
93
131
  checked: isWholeWord,
94
132
  id: "whole-word-check",
95
133
  labelText: "Whole Word",
96
134
  name: "whole-word-check",
97
- onChange: () => this.setState({ isWholeWord: !isWholeWord })
98
- }), /* @__PURE__ */ React2.createElement(DSCheckbox, {
135
+ onChange: () => this.setState({
136
+ isWholeWord: !isWholeWord
137
+ })
138
+ }), /*#__PURE__*/_jsx(DSCheckbox, {
99
139
  checked: replace,
100
140
  id: "replace-check",
101
141
  labelText: "Replace",
102
142
  name: "replace-check",
103
- onChange: () => this.setState({ replace: !replace })
104
- })), /* @__PURE__ */ React2.createElement(DSButton, {
143
+ onChange: () => this.setState({
144
+ replace: !replace
145
+ })
146
+ })), /*#__PURE__*/_jsx(DSButton, {
105
147
  buttonType: "secondary",
106
148
  labelText: "Done",
107
- onClick: () => this.setState({ replace: false, find: false }),
149
+ onClick: () => this.setState({
150
+ replace: false,
151
+ find: false
152
+ }),
108
153
  size: "m"
109
- })) : null, replace ? /* @__PURE__ */ React2.createElement("div", {
110
- className: classNameBlock("replace")
111
- }, /* @__PURE__ */ React2.createElement(DSTextBox, {
154
+ })) : null, replace ? /*#__PURE__*/_jsx("div", {
155
+ className: classNameBlock('replace')
156
+ }, void 0, /*#__PURE__*/_jsx(DSTextBox, {
112
157
  className: "find-word",
113
158
  fluidWidth: false,
114
159
  id: "replace-textbox",
115
- onChange: (e) => this.setState({ replaceText: e.currentTarget.value }),
160
+ onChange: e => this.setState({
161
+ replaceText: e.currentTarget.value
162
+ }),
116
163
  placeholder: "Replace",
117
164
  value: replaceText
118
- }), /* @__PURE__ */ React2.createElement("div", {
119
- className: classNameBlock("replace-btns")
120
- }, /* @__PURE__ */ React2.createElement(DSButton, {
165
+ }), /*#__PURE__*/_jsx("div", {
166
+ className: classNameBlock('replace-btns')
167
+ }, void 0, /*#__PURE__*/_jsx(DSButton, {
121
168
  buttonType: "secondary",
122
169
  labelText: "Replace",
123
170
  onClick: () => this.searchWord(true, false),
124
171
  size: "m"
125
- }), /* @__PURE__ */ React2.createElement(DSButton, {
172
+ }), /*#__PURE__*/_jsx(DSButton, {
126
173
  buttonType: "secondary",
127
174
  labelText: "Replace All",
128
175
  onClick: () => this.searchWord(true, true),
129
176
  size: "m"
130
177
  }))) : null);
131
178
  }
179
+
132
180
  }
133
- var DSCodeEditorForm_default = DSCodeEditorForm;
134
- export {
135
- DSCodeEditorForm_default as default
136
- };
137
- //# sourceMappingURL=DSCodeEditorForm.js.map
181
+
182
+ export { DSCodeEditorForm as default };