@elliemae/ds-codeeditor 3.60.0-next.11 → 3.60.0-next.13

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.
@@ -35,7 +35,7 @@ __export(DSCodeEditor_exports, {
35
35
  module.exports = __toCommonJS(DSCodeEditor_exports);
36
36
  var React = __toESM(require("react"));
37
37
  var import_jsx_runtime = require("react/jsx-runtime");
38
- var import_ds_modal = require("@elliemae/ds-modal");
38
+ var import_ds_legacy_modal = require("@elliemae/ds-legacy-modal");
39
39
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
40
  var import_react = require("react");
41
41
  var import_react_ace = __toESM(require("react-ace"));
@@ -95,7 +95,7 @@ const DSCodeEditor = ({
95
95
  ] });
96
96
  if (!useModal) return editor;
97
97
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
- import_ds_modal.DSModal,
98
+ import_ds_legacy_modal.DSModal,
99
99
  {
100
100
  centered: false,
101
101
  confirmLabel,
@@ -127,7 +127,7 @@ const codeEditorProps = {
127
127
  modalTitle: import_ds_props_helpers.PropTypes.string.description("Modal title").defaultValue("Javascript Editor"),
128
128
  confirmLabel: import_ds_props_helpers.PropTypes.string.description("Customize modal confirm label").defaultValue("Save"),
129
129
  rejectLabel: import_ds_props_helpers.PropTypes.string.description("Customize modal rejection label").defaultValue("Close"),
130
- modalType: import_ds_props_helpers.PropTypes.oneOf(import_ds_modal.modalTypes).description("Modal type").defaultValue("confirm"),
130
+ modalType: import_ds_props_helpers.PropTypes.oneOf(import_ds_legacy_modal.modalTypes).description("Modal type").defaultValue("confirm"),
131
131
  size: import_ds_props_helpers.PropTypes.oneOf(["xsmall", "small", "medium", "large", "xlarge"]).description("modal size").defaultValue("large"),
132
132
  style: import_ds_props_helpers.PropTypes.object.description("css inline style"),
133
133
  useModal: import_ds_props_helpers.PropTypes.bool.description("whether to use code editor inside modal or not").defaultValue(true),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSCodeEditor.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable max-lines */\nimport { DSModal, modalTypes } from '@elliemae/ds-modal';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { useRef, useState } from 'react';\nimport AceEditor from 'react-ace';\nimport DSCodeEditorForm from './components/DSCodeEditorForm.js';\n// https://github.com/securingsincity/react-ace/issues/1233\n// THE FOLLOWING IMPORTS MUST HAPPEN AS LAST IMPORTS OR ACE EDITOR WILL NOT WORK\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/theme-tomorrow.js';\n\ntype DSCodeEditorProps = {\n containerProps?: object;\n value: string;\n onSave?: (value: string, fileName: string, errors: unknown) => void;\n onClose?: (value: string, fileName: string, errors: unknown) => void;\n onReject?: (value: string, fileName: string, errors: unknown) => void;\n onChange?: (value: string, errors: unknown) => void;\n isOpen?: boolean;\n fileName?: string;\n confirmLabel?: string;\n maxLines?: number;\n minLines?: number;\n modalTitle?: string;\n modalType?: 'confirm' | 'alert';\n rejectLabel?: string;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n style?: object;\n useModal?: boolean;\n showHeader?: boolean;\n showSyntaxChecks?: boolean;\n};\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}: DSCodeEditorProps) => {\n const [{ value, errors }, setState] = useState({\n value: defaultValue,\n errors: [],\n });\n const reactAceComponent = useRef();\n\n const Comp = (AceEditor as any)?.default ?? AceEditor;\n const editor = (\n <>\n {/* @ts-expect-error - code-editor typescript compliancy is not a priority */}\n {showHeader && <DSCodeEditorForm fileName={fileName} reactAceComponent={reactAceComponent} />}\n <Comp\n ref={reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n // @ts-expect-error - code-editor typescript compliancy is not a priority\n onChange={(val) => {\n setState({ errors, value: val });\n onChange(val, errors);\n }}\n // @ts-expect-error - code-editor typescript compliancy is not a priority\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('Set of Properties attached to the main container'),\n value: PropTypes.string.description('editors content').isRequired,\n onSave: PropTypes.func.description('function called when the user press save'),\n onClose: PropTypes.func.description('function called when the user closes the modal'),\n onReject: PropTypes.func.description('function called when is rejected'),\n onChange: PropTypes.func.description('function executed when code editor value changes').isRequired,\n isOpen: PropTypes.bool.description('Whether the modal is opened or not').defaultValue(false),\n fileName: PropTypes.string.description('File name to open in the editor'),\n maxLines: PropTypes.number.description('Max lines in the editor content').defaultValue(20),\n minLines: PropTypes.number.description('Min lines in the editor content').defaultValue(20),\n modalTitle: PropTypes.string.description('Modal title').defaultValue('Javascript Editor'),\n confirmLabel: PropTypes.string.description('Customize modal confirm label').defaultValue('Save'),\n rejectLabel: PropTypes.string.description('Customize modal rejection label').defaultValue('Close'),\n modalType: PropTypes.oneOf(modalTypes).description('Modal type').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.description('whether to use code editor inside modal or not').defaultValue(true),\n showHeader: PropTypes.bool.description('show editors header').defaultValue(true),\n showSyntaxChecks: PropTypes.bool.description('show syntax warnings and checks').defaultValue(true),\n};\n\nDSCodeEditor.displayName = 'DSCodeEditor';\nconst CodeEditorWithSchema = describe(DSCodeEditor);\n\n// @ts-expect-error - code-editor typescript compliancy is not a priority\nCodeEditorWithSchema.propTypes = codeEditorProps;\n\nexport { CodeEditorWithSchema, DSCodeEditor };\nexport default DSCodeEditor;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkEnB;AA7DJ,sBAAoC;AACpC,8BAAoC;AACpC,mBAAiC;AACjC,uBAAsB;AACtB,8BAA6B;AAG7B,6BAAO;AACP,4BAAO;AAwBP,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,OAAO,eAAe;AAAA,EACtB,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;AAAA,EACjB,WAAW,MAAM;AAAA,EACjB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,eAAe;AAAA,EACf,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX,aAAa;AAAA,EACb,mBAAmB;AACrB,MAAyB;AACvB,QAAM,CAAC,EAAE,OAAO,OAAO,G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gD;AAAA,EACpF,UAAU,kCAAU,KAAK,YAAY,kCAAkC;AAAA,EACvE,UAAU,kCAAU,KAAK,YAAY,kDAAkD,EAAE;AAAA,EACzF,QAAQ,kCAAU,KAAK,YAAY,oCAAoC,EAAE,aAAa,KAAK;AAAA,EAC3F,UAAU,kCAAU,OAAO,YAAY,iCAAiC;AAAA,EACxE,UAAU,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,EAAE;AAAA,EACzF,UAAU,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,EAAE;AAAA,EACzF,YAAY,kCAAU,OAAO,YAAY,aAAa,EAAE,aAAa,mBAAmB;AAAA,EACxF,cAAc,kCAAU,OAAO,YAAY,+BAA+B,EAAE,aAAa,MAAM;AAAA,EAC/F,aAAa,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,OAAO;AAAA,EACjG,WAAW,kCAAU,MAAM,0BAAU,EAAE,YAAY,YAAY,EAAE,aAAa,SAAS;AAAA,EACvF,MAAM,kCAAU,MAAM,CAAC,UAAU,SAAS,UAAU,SAAS,QAAQ,CAAC,EACnE,YAAY,YAAY,EACxB,aAAa,OAAO;AAAA,EACvB,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,UAAU,kCAAU,KAAK,YAAY,gDAAgD,EAAE,aAAa,IAAI;AAAA,EACxG,YAAY,kCAAU,KAAK,YAAY,qBAAqB,EAAE,aAAa,IAAI;AAAA,EAC/E,kBAAkB,kCAAU,KAAK,YAAY,iCAAiC,EAAE,aAAa,IAAI;AACnG;AAEA,aAAa,cAAc;AAC3B,MAAM,2BAAuB,kCAAS,YAAY;AAGlD,qBAAqB,YAAY;AAGjC,IAAO,uBAAQ;",
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable max-lines */\nimport { DSModal, modalTypes } from '@elliemae/ds-legacy-modal';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { useRef, useState } from 'react';\nimport AceEditor from 'react-ace';\nimport DSCodeEditorForm from './components/DSCodeEditorForm.js';\n// https://github.com/securingsincity/react-ace/issues/1233\n// THE FOLLOWING IMPORTS MUST HAPPEN AS LAST IMPORTS OR ACE EDITOR WILL NOT WORK\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/theme-tomorrow.js';\n\ntype DSCodeEditorProps = {\n containerProps?: object;\n value: string;\n onSave?: (value: string, fileName: string, errors: unknown) => void;\n onClose?: (value: string, fileName: string, errors: unknown) => void;\n onReject?: (value: string, fileName: string, errors: unknown) => void;\n onChange?: (value: string, errors: unknown) => void;\n isOpen?: boolean;\n fileName?: string;\n confirmLabel?: string;\n maxLines?: number;\n minLines?: number;\n modalTitle?: string;\n modalType?: 'confirm' | 'alert';\n rejectLabel?: string;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n style?: object;\n useModal?: boolean;\n showHeader?: boolean;\n showSyntaxChecks?: boolean;\n};\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}: DSCodeEditorProps) => {\n const [{ value, errors }, setState] = useState({\n value: defaultValue,\n errors: [],\n });\n const reactAceComponent = useRef();\n\n const Comp = (AceEditor as any)?.default ?? AceEditor;\n const editor = (\n <>\n {/* @ts-expect-error - code-editor typescript compliancy is not a priority */}\n {showHeader && <DSCodeEditorForm fileName={fileName} reactAceComponent={reactAceComponent} />}\n <Comp\n ref={reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n // @ts-expect-error - code-editor typescript compliancy is not a priority\n onChange={(val) => {\n setState({ errors, value: val });\n onChange(val, errors);\n }}\n // @ts-expect-error - code-editor typescript compliancy is not a priority\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('Set of Properties attached to the main container'),\n value: PropTypes.string.description('editors content').isRequired,\n onSave: PropTypes.func.description('function called when the user press save'),\n onClose: PropTypes.func.description('function called when the user closes the modal'),\n onReject: PropTypes.func.description('function called when is rejected'),\n onChange: PropTypes.func.description('function executed when code editor value changes').isRequired,\n isOpen: PropTypes.bool.description('Whether the modal is opened or not').defaultValue(false),\n fileName: PropTypes.string.description('File name to open in the editor'),\n maxLines: PropTypes.number.description('Max lines in the editor content').defaultValue(20),\n minLines: PropTypes.number.description('Min lines in the editor content').defaultValue(20),\n modalTitle: PropTypes.string.description('Modal title').defaultValue('Javascript Editor'),\n confirmLabel: PropTypes.string.description('Customize modal confirm label').defaultValue('Save'),\n rejectLabel: PropTypes.string.description('Customize modal rejection label').defaultValue('Close'),\n modalType: PropTypes.oneOf(modalTypes).description('Modal type').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.description('whether to use code editor inside modal or not').defaultValue(true),\n showHeader: PropTypes.bool.description('show editors header').defaultValue(true),\n showSyntaxChecks: PropTypes.bool.description('show syntax warnings and checks').defaultValue(true),\n};\n\nDSCodeEditor.displayName = 'DSCodeEditor';\nconst CodeEditorWithSchema = describe(DSCodeEditor);\n\n// @ts-expect-error - code-editor typescript compliancy is not a priority\nCodeEditorWithSchema.propTypes = codeEditorProps;\n\nexport { CodeEditorWithSchema, DSCodeEditor };\nexport default DSCodeEditor;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkEnB;AA7DJ,6BAAoC;AACpC,8BAAoC;AACpC,mBAAiC;AACjC,uBAAsB;AACtB,8BAA6B;AAG7B,6BAAO;AACP,4BAAO;AAwBP,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,OAAO,eAAe;AAAA,EACtB,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;AAAA,EACjB,WAAW,MAAM;AAAA,EACjB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,eAAe;AAAA,EACf,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX,aAAa;AAAA,EACb,mBAAmB;AACrB,MAAyB;AACvB,QAAM,CAAC,EAAE,OAAO,OAAO,GAAG,QAAQ,QAAI,uBAAS;AAAA,IAC7C,OAAO;AAAA,IACP,QAAQ,CAAC;AAAA,EACX,CAAC;AACD,QAAM,wBAAoB,qBAAO;AAEjC,QAAM,OAAQ,iBAAAA,SAAmB,WAAW,iBAAAA;AAC5C,QAAM,SACJ,4EAEG;AAAA,kBAAc,4CAAC,wBAAAC,SAAA,EAAiB,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kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,EAAE;AAAA,EACzF,UAAU,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,EAAE;AAAA,EACzF,YAAY,kCAAU,OAAO,YAAY,aAAa,EAAE,aAAa,mBAAmB;AAAA,EACxF,cAAc,kCAAU,OAAO,YAAY,+BAA+B,EAAE,aAAa,MAAM;AAAA,EAC/F,aAAa,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,OAAO;AAAA,EACjG,WAAW,kCAAU,MAAM,iCAAU,EAAE,YAAY,YAAY,EAAE,aAAa,SAAS;AAAA,EACvF,MAAM,kCAAU,MAAM,CAAC,UAAU,SAAS,UAAU,SAAS,QAAQ,CAAC,EACnE,YAAY,YAAY,EACxB,aAAa,OAAO;AAAA,EACvB,OAAO,kCAAU,OAAO,YAAY,kBAAkB;AAAA,EACtD,UAAU,kCAAU,KAAK,YAAY,gDAAgD,EAAE,aAAa,IAAI;AAAA,EACxG,YAAY,kCAAU,KAAK,YAAY,qBAAqB,EAAE,aAAa,IAAI;AAAA,EAC/E,kBAAkB,kCAAU,KAAK,YAAY,iCAAiC,EAAE,aAAa,IAAI;AACnG;AAEA,aAAa,cAAc;AAC3B,MAAM,2BAAuB,kCAAS,YAAY;AAGlD,qBAAqB,YAAY;AAGjC,IAAO,uBAAQ;",
6
6
  "names": ["AceEditor", "DSCodeEditorForm"]
7
7
  }
@@ -34,8 +34,8 @@ module.exports = __toCommonJS(DSCodeEditorForm_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
- var import_ds_button = require("@elliemae/ds-button");
38
- var import_ds_form = require("@elliemae/ds-form");
37
+ var import_ds_legacy_button_v1 = require("@elliemae/ds-legacy-button-v1");
38
+ var import_ds_legacy_form = require("@elliemae/ds-legacy-form");
39
39
  var import_ds_classnames = require("@elliemae/ds-classnames");
40
40
  var import_ds_icons = require("@elliemae/ds-icons");
41
41
  const blockName = "code-editor";
@@ -93,9 +93,9 @@ class DSCodeEditorForm extends import_react.Component {
93
93
  ] })
94
94
  ] }) : null,
95
95
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: classNameBlock("find-replace-btn"), children: [
96
- !find && !replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButton, { buttonType: "secondary", labelText: "Find", onClick: () => this.setState({ find: true }), size: "m" }) : null,
96
+ !find && !replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_button_v1.DSButton, { buttonType: "secondary", labelText: "Find", onClick: () => this.setState({ find: true }), size: "m" }) : null,
97
97
  !replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
- import_ds_button.DSButton,
98
+ import_ds_legacy_button_v1.DSButton,
99
99
  {
100
100
  buttonType: "secondary",
101
101
  labelText: "Find & Replace",
@@ -104,9 +104,9 @@ class DSCodeEditorForm extends import_react.Component {
104
104
  }
105
105
  ) : null
106
106
  ] }),
107
- find || replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_form.DSInputGroup, { className: classNameBlock("find"), children: [
107
+ find || replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_legacy_form.DSInputGroup, { className: classNameBlock("find"), children: [
108
108
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
109
- import_ds_form.DSTextBox,
109
+ import_ds_legacy_form.DSTextBox,
110
110
  {
111
111
  className: "find-word",
112
112
  fluidWidth: false,
@@ -114,15 +114,15 @@ class DSCodeEditorForm extends import_react.Component {
114
114
  onChange: (e) => this.setState({ filteredText: e.currentTarget.value }),
115
115
  placeholder: "Find",
116
116
  rightComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: classNameBlock("next-back-btn"), children: [
117
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButton, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallLeft, {}), size: "m" }),
118
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.DSButton, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallRight, {}), onClick: () => this.searchWord(), size: "m" })
117
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_button_v1.DSButton, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallLeft, {}), size: "m" }),
118
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_button_v1.DSButton, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallRight, {}), onClick: () => this.searchWord(), size: "m" })
119
119
  ] }),
120
120
  value: filteredText
121
121
  }
122
122
  ),
123
123
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckOptionsGroup, { children: [
124
124
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
- import_ds_form.DSCheckbox,
125
+ import_ds_legacy_form.DSCheckbox,
126
126
  {
127
127
  checked: isCaseSensitive,
128
128
  id: "case-sensitive-check",
@@ -132,7 +132,7 @@ class DSCodeEditorForm extends import_react.Component {
132
132
  }
133
133
  ),
134
134
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
- import_ds_form.DSCheckbox,
135
+ import_ds_legacy_form.DSCheckbox,
136
136
  {
137
137
  checked: isWholeWord,
138
138
  id: "whole-word-check",
@@ -142,7 +142,7 @@ class DSCodeEditorForm extends import_react.Component {
142
142
  }
143
143
  ),
144
144
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
145
- import_ds_form.DSCheckbox,
145
+ import_ds_legacy_form.DSCheckbox,
146
146
  {
147
147
  checked: replace,
148
148
  id: "replace-check",
@@ -153,7 +153,7 @@ class DSCodeEditorForm extends import_react.Component {
153
153
  )
154
154
  ] }),
155
155
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
156
- import_ds_button.DSButton,
156
+ import_ds_legacy_button_v1.DSButton,
157
157
  {
158
158
  buttonType: "secondary",
159
159
  labelText: "Done",
@@ -164,7 +164,7 @@ class DSCodeEditorForm extends import_react.Component {
164
164
  ] }) : null,
165
165
  replace ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: classNameBlock("replace"), children: [
166
166
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
167
- import_ds_form.DSTextBox,
167
+ import_ds_legacy_form.DSTextBox,
168
168
  {
169
169
  className: "find-word",
170
170
  fluidWidth: false,
@@ -176,7 +176,7 @@ class DSCodeEditorForm extends import_react.Component {
176
176
  ),
177
177
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: classNameBlock("replace-btns"), children: [
178
178
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
179
- import_ds_button.DSButton,
179
+ import_ds_legacy_button_v1.DSButton,
180
180
  {
181
181
  buttonType: "secondary",
182
182
  labelText: "Replace",
@@ -185,7 +185,7 @@ class DSCodeEditorForm extends import_react.Component {
185
185
  }
186
186
  ),
187
187
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
188
- import_ds_button.DSButton,
188
+ import_ds_legacy_button_v1.DSButton,
189
189
  {
190
190
  buttonType: "secondary",
191
191
  labelText: "Replace All",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/DSCodeEditorForm.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgEA;AA9DvB,mBAAiC;AACjC,uBAAyB;AACzB,qBAAoD;AACpD,2BAA6D;AAC7D,sBAAoD;AAEpD,MAAM,YAAY;AAElB,MAAM,EAAE,cAAc,eAAe,QAAI,gDAA0B,SAAS;AAE5E,MAAM,wBAAoB,wCAAkB,KAAK,EAAE,GAAG,SAAS,gBAAgB;AAE/E,MAAM,yBAA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IAAG;AAAA,cACH,WAAU;AAAA,cACV,MAAK;AAAA,cACL,UAAU,MAAM,KAAK,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC;AAAA;AAAA,UACrD;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX,WAAU;AAAA,YACV,SAAS,MAAM,KAAK,SAAS,EAAE,SAAS,OAAO,MAAM,MAAM,CAAC;AAAA,YAC5D,MAAK;AAAA;AAAA,QACP;AAAA,SACF,IACE;AAAA,MACH,UACC,6CAAC,SAAI,WAAW,eAAe,SAAS,GACtC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,YAAY;AAAA,YACZ,IAAG;AAAA,YACH,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,aAAa,EAAE,cAAc,MAAM,CAAC;AAAA,YACrE,aAAY;AAAA,YACZ,OAAO;AAAA;AAAA,QACT;AAAA,QACA,6CAAC,SAAI,WAAW,eAAe,cAAc,GAC3C;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,YAAW;AAAA,cACX,WAAU;AAAA,cACV,SAAS,MAAM,KAAK,WAAW,MAAM,KAAK;AAAA,cAC1C,MAAK;AAAA;AAAA,UACP;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,YAAW;AAAA,cACX,WAAU;AAAA,cACV,SAAS,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,cACzC,MAAK;AAAA;AAAA,UACP;AAAA,WACF;AAAA,SACF,IACE;AAAA,OACN;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React, { Component } from 'react';\nimport { DSButton } from '@elliemae/ds-legacy-button-v1';\nimport { DSCheckbox, DSTextBox, DSInputGroup } from '@elliemae/ds-legacy-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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgEA;AA9DvB,mBAAiC;AACjC,iCAAyB;AACzB,4BAAoD;AACpD,2BAA6D;AAC7D,sBAAoD;AAEpD,MAAM,YAAY;AAElB,MAAM,EAAE,cAAc,eAAe,QAAI,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,CAAC,YAAY,CAAC;AAAA;AAAA,UAC7D;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,cACT,IAAG;AAAA,cACH,WAAU;AAAA,cACV,MAAK;AAAA,cACL,UAAU,MAAM,KAAK,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC;AAAA;AAAA,UACrD;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX,WAAU;AAAA,YACV,SAAS,MAAM,KAAK,SAAS,EAAE,SAAS,OAAO,MAAM,MAAM,CAAC;AAAA,YAC5D,MAAK;AAAA;AAAA,QACP;AAAA,SACF,IACE;AAAA,MACH,UACC,6CAAC,SAAI,WAAW,eAAe,SAAS,GACtC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,YAAY;AAAA,YACZ,IAAG;AAAA,YACH,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,aAAa,EAAE,cAAc,MAAM,CAAC;AAAA,YACrE,aAAY;AAAA,YACZ,OAAO;AAAA;AAAA,QACT;AAAA,QACA,6CAAC,SAAI,WAAW,eAAe,cAAc,GAC3C;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,YAAW;AAAA,cACX,WAAU;AAAA,cACV,SAAS,MAAM,KAAK,WAAW,MAAM,KAAK;AAAA,cAC1C,MAAK;AAAA;AAAA,UACP;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,YAAW;AAAA,cACX,WAAU;AAAA,cACV,SAAS,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,cACzC,MAAK;AAAA;AAAA,UACP;AAAA,WACF;AAAA,SACF,IACE;AAAA,OACN;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
6
6
  "names": []
7
7
  }
@@ -35,7 +35,7 @@ var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_react_ace = __toESM(require("react-ace"));
38
- var import_ds_modal = require("@elliemae/ds-modal");
38
+ var import_ds_legacy_modal = require("@elliemae/ds-legacy-modal");
39
39
  var import_DSCodeEditorForm = __toESM(require("./DSCodeEditorForm.js"));
40
40
  var import_mode_javascript = require("ace-builds/src-noconflict/mode-javascript.js");
41
41
  var import_theme_tomorrow = require("ace-builds/src-noconflict/theme-tomorrow.js");
@@ -68,7 +68,7 @@ class DSCodeEditorImpl extends import_react.Component {
68
68
  const { value, errors } = this.state;
69
69
  const Comp = import_react_ace.default?.default ?? import_react_ace.default;
70
70
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
71
- import_ds_modal.DSModal,
71
+ import_ds_legacy_modal.DSModal,
72
72
  {
73
73
  centered: false,
74
74
  confirmLabel,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/DSCodeEditorImpl.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { Component } from 'react';\nimport AceEditor from 'react-ace';\nimport { DSModal } from '@elliemae/ds-modal';\nimport DSCodeEditorForm from './DSCodeEditorForm.js';\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/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 const Comp = (AceEditor as any)?.default ?? AceEditor;\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 fileName={fileName} reactAceComponent={this.reactAceComponent} />\n <Comp\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCjB;AAtCN,mBAAiC;AACjC,uBAAsB;AACtB,sBAAwB;AACxB,8BAA6B;AAC7B,6BAAO;AACP,4BAAO;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,UAAM,OAAQ,iBAAAC,SAAmB,WAAW,iBAAAA;AAC5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS,MAAM,QAAQ,OAAO,UAAU,MAAM;AAAA,QAC9C,WAAW,MAAM,OAAO,OAAO,UAAU,MAAM;AAAA,QAC/C,UAAU,MAAM,SAAS,OAAO,UAAU,MAAM;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QAEA;AAAA,sDAAC,wBAAAC,SAAA,EAAiB,UAAoB,mBAAmB,KAAK,mBAAmB;AAAA,UACjF;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,KAAK;AAAA,cACV,aAAa,EAAE,iBAAiB,KAAK;AAAA,cACrC;AAAA,cACA;AAAA,cACA,MAAK;AAAA,cACL,MAAK;AAAA,cACL,UAAU,CAAC,QAAQ,KAAK,SAAS,EAAE,OAAO,IAAI,CAAC;AAAA,cAC/C,YAAY,CAAC,gBAAgB,KAAK,SAAS,EAAE,QAAQ,YAAY,CAAC;AAAA,cAClE,OAAM;AAAA,cACN;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
4
+ "sourcesContent": ["import React, { Component } from 'react';\nimport AceEditor from 'react-ace';\nimport { DSModal } from '@elliemae/ds-legacy-modal';\nimport DSCodeEditorForm from './DSCodeEditorForm.js';\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/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 const Comp = (AceEditor as any)?.default ?? AceEditor;\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 fileName={fileName} reactAceComponent={this.reactAceComponent} />\n <Comp\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCjB;AAtCN,mBAAiC;AACjC,uBAAsB;AACtB,6BAAwB;AACxB,8BAA6B;AAC7B,6BAAO;AACP,4BAAO;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,UAAM,OAAQ,iBAAAC,SAAmB,WAAW,iBAAAA;AAC5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS,MAAM,QAAQ,OAAO,UAAU,MAAM;AAAA,QAC9C,WAAW,MAAM,OAAO,OAAO,UAAU,MAAM;AAAA,QAC/C,UAAU,MAAM,SAAS,OAAO,UAAU,MAAM;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QAEA;AAAA,sDAAC,wBAAAC,SAAA,EAAiB,UAAoB,mBAAmB,KAAK,mBAAmB;AAAA,UACjF;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,KAAK;AAAA,cACV,aAAa,EAAE,iBAAiB,KAAK;AAAA,cACrC;AAAA,cACA;AAAA,cACA,MAAK;AAAA,cACL,MAAK;AAAA,cACL,UAAU,CAAC,QAAQ,KAAK,SAAS,EAAE,OAAO,IAAI,CAAC;AAAA,cAC/C,YAAY,CAAC,gBAAgB,KAAK,SAAS,EAAE,QAAQ,YAAY,CAAC;AAAA,cAClE,OAAM;AAAA,cACN;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
6
6
  "names": ["React", "AceEditor", "DSCodeEditorForm"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { DSModal, modalTypes } from "@elliemae/ds-modal";
3
+ import { DSModal, modalTypes } from "@elliemae/ds-legacy-modal";
4
4
  import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
5
  import { useRef, useState } from "react";
6
6
  import AceEditor from "react-ace";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSCodeEditor.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable max-lines */\nimport { DSModal, modalTypes } from '@elliemae/ds-modal';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { useRef, useState } from 'react';\nimport AceEditor from 'react-ace';\nimport DSCodeEditorForm from './components/DSCodeEditorForm.js';\n// https://github.com/securingsincity/react-ace/issues/1233\n// THE FOLLOWING IMPORTS MUST HAPPEN AS LAST IMPORTS OR ACE EDITOR WILL NOT WORK\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/theme-tomorrow.js';\n\ntype DSCodeEditorProps = {\n containerProps?: object;\n value: string;\n onSave?: (value: string, fileName: string, errors: unknown) => void;\n onClose?: (value: string, fileName: string, errors: unknown) => void;\n onReject?: (value: string, fileName: string, errors: unknown) => void;\n onChange?: (value: string, errors: unknown) => void;\n isOpen?: boolean;\n fileName?: string;\n confirmLabel?: string;\n maxLines?: number;\n minLines?: number;\n modalTitle?: string;\n modalType?: 'confirm' | 'alert';\n rejectLabel?: string;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n style?: object;\n useModal?: boolean;\n showHeader?: boolean;\n showSyntaxChecks?: boolean;\n};\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}: DSCodeEditorProps) => {\n const [{ value, errors }, setState] = useState({\n value: defaultValue,\n errors: [],\n });\n const reactAceComponent = useRef();\n\n const Comp = (AceEditor as any)?.default ?? AceEditor;\n const editor = (\n <>\n {/* @ts-expect-error - code-editor typescript compliancy is not a priority */}\n {showHeader && <DSCodeEditorForm fileName={fileName} reactAceComponent={reactAceComponent} />}\n <Comp\n ref={reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n // @ts-expect-error - code-editor typescript compliancy is not a priority\n onChange={(val) => {\n setState({ errors, value: val });\n onChange(val, errors);\n }}\n // @ts-expect-error - code-editor typescript compliancy is not a priority\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('Set of Properties attached to the main container'),\n value: PropTypes.string.description('editors content').isRequired,\n onSave: PropTypes.func.description('function called when the user press save'),\n onClose: PropTypes.func.description('function called when the user closes the modal'),\n onReject: PropTypes.func.description('function called when is rejected'),\n onChange: PropTypes.func.description('function executed when code editor value changes').isRequired,\n isOpen: PropTypes.bool.description('Whether the modal is opened or not').defaultValue(false),\n fileName: PropTypes.string.description('File name to open in the editor'),\n maxLines: PropTypes.number.description('Max lines in the editor content').defaultValue(20),\n minLines: PropTypes.number.description('Min lines in the editor content').defaultValue(20),\n modalTitle: PropTypes.string.description('Modal title').defaultValue('Javascript Editor'),\n confirmLabel: PropTypes.string.description('Customize modal confirm label').defaultValue('Save'),\n rejectLabel: PropTypes.string.description('Customize modal rejection label').defaultValue('Close'),\n modalType: PropTypes.oneOf(modalTypes).description('Modal type').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.description('whether to use code editor inside modal or not').defaultValue(true),\n showHeader: PropTypes.bool.description('show editors header').defaultValue(true),\n showSyntaxChecks: PropTypes.bool.description('show syntax warnings and checks').defaultValue(true),\n};\n\nDSCodeEditor.displayName = 'DSCodeEditor';\nconst CodeEditorWithSchema = describe(DSCodeEditor);\n\n// @ts-expect-error - code-editor typescript compliancy is not a priority\nCodeEditorWithSchema.propTypes = codeEditorProps;\n\nexport { CodeEditorWithSchema, DSCodeEditor };\nexport default DSCodeEditor;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable max-lines */\nimport { DSModal, modalTypes } from '@elliemae/ds-legacy-modal';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { useRef, useState } from 'react';\nimport AceEditor from 'react-ace';\nimport DSCodeEditorForm from './components/DSCodeEditorForm.js';\n// https://github.com/securingsincity/react-ace/issues/1233\n// THE FOLLOWING IMPORTS MUST HAPPEN AS LAST IMPORTS OR ACE EDITOR WILL NOT WORK\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/theme-tomorrow.js';\n\ntype DSCodeEditorProps = {\n containerProps?: object;\n value: string;\n onSave?: (value: string, fileName: string, errors: unknown) => void;\n onClose?: (value: string, fileName: string, errors: unknown) => void;\n onReject?: (value: string, fileName: string, errors: unknown) => void;\n onChange?: (value: string, errors: unknown) => void;\n isOpen?: boolean;\n fileName?: string;\n confirmLabel?: string;\n maxLines?: number;\n minLines?: number;\n modalTitle?: string;\n modalType?: 'confirm' | 'alert';\n rejectLabel?: string;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n style?: object;\n useModal?: boolean;\n showHeader?: boolean;\n showSyntaxChecks?: boolean;\n};\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}: DSCodeEditorProps) => {\n const [{ value, errors }, setState] = useState({\n value: defaultValue,\n errors: [],\n });\n const reactAceComponent = useRef();\n\n const Comp = (AceEditor as any)?.default ?? AceEditor;\n const editor = (\n <>\n {/* @ts-expect-error - code-editor typescript compliancy is not a priority */}\n {showHeader && <DSCodeEditorForm fileName={fileName} reactAceComponent={reactAceComponent} />}\n <Comp\n ref={reactAceComponent}\n editorProps={{ $blockScrolling: true }}\n maxLines={maxLines}\n minLines={minLines}\n mode=\"javascript\"\n name=\"ace-code-edior\"\n // @ts-expect-error - code-editor typescript compliancy is not a priority\n onChange={(val) => {\n setState({ errors, value: val });\n onChange(val, errors);\n }}\n // @ts-expect-error - code-editor typescript compliancy is not a priority\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('Set of Properties attached to the main container'),\n value: PropTypes.string.description('editors content').isRequired,\n onSave: PropTypes.func.description('function called when the user press save'),\n onClose: PropTypes.func.description('function called when the user closes the modal'),\n onReject: PropTypes.func.description('function called when is rejected'),\n onChange: PropTypes.func.description('function executed when code editor value changes').isRequired,\n isOpen: PropTypes.bool.description('Whether the modal is opened or not').defaultValue(false),\n fileName: PropTypes.string.description('File name to open in the editor'),\n maxLines: PropTypes.number.description('Max lines in the editor content').defaultValue(20),\n minLines: PropTypes.number.description('Min lines in the editor content').defaultValue(20),\n modalTitle: PropTypes.string.description('Modal title').defaultValue('Javascript Editor'),\n confirmLabel: PropTypes.string.description('Customize modal confirm label').defaultValue('Save'),\n rejectLabel: PropTypes.string.description('Customize modal rejection label').defaultValue('Close'),\n modalType: PropTypes.oneOf(modalTypes).description('Modal type').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.description('whether to use code editor inside modal or not').defaultValue(true),\n showHeader: PropTypes.bool.description('show editors header').defaultValue(true),\n showSyntaxChecks: PropTypes.bool.description('show syntax warnings and checks').defaultValue(true),\n};\n\nDSCodeEditor.displayName = 'DSCodeEditor';\nconst CodeEditorWithSchema = describe(DSCodeEditor);\n\n// @ts-expect-error - code-editor typescript compliancy is not a priority\nCodeEditorWithSchema.propTypes = codeEditorProps;\n\nexport { CodeEditorWithSchema, DSCodeEditor };\nexport default DSCodeEditor;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACkEnB,mBAEiB,KAFjB;AA7DJ,SAAS,SAAS,kBAAkB;AACpC,SAAS,WAAW,gBAAgB;AACpC,SAAS,QAAQ,gBAAgB;AACjC,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAG7B,OAAO;AACP,OAAO;AAwBP,MAAM,eAAe,CAAC;AAAA,EACpB,iBAAiB,CAAC;AAAA,EAClB,OAAO,eAAe;AAAA,EACtB,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;AAAA,EACjB,WAAW,MAAM;AAAA,EACjB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,eAAe;AAAA,EACf,WAAW;AAAA,EACX,WAAW;AAAA,EACX,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QA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- import { DSButton } from "@elliemae/ds-button";
5
- import { DSCheckbox, DSTextBox, DSInputGroup } from "@elliemae/ds-form";
4
+ import { DSButton } from "@elliemae/ds-legacy-button-v1";
5
+ import { DSCheckbox, DSTextBox, DSInputGroup } from "@elliemae/ds-legacy-form";
6
6
  import { convertPropToCssClassName, aggregatedClasses } from "@elliemae/ds-classnames";
7
7
  import { ChevronSmallLeft, ChevronSmallRight } from "@elliemae/ds-icons";
8
8
  const blockName = "code-editor";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DSCodeEditorForm.tsx"],
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"],
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-legacy-button-v1';\nimport { DSCheckbox, DSTextBox, DSInputGroup } from '@elliemae/ds-legacy-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
5
  "mappings": "AAAA,YAAY,WAAW;ACgEA,SAKX,KALW;AA9DvB,SAAgB,iBAAiB;AACjC,SAAS,gBAAgB;AACzB,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,SAAS,gBAAgB;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;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AK,SAAS,EAAE,aAAa,EAAE,cAAc,MAAM,CAAC;AAAA,YACrE,aAAY;AAAA,YACZ,OAAO;AAAA;AAAA,QACT;AAAA,QACA,qBAAC,SAAI,WAAW,eAAe,cAAc,GAC3C;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,YAAW;AAAA,cACX,WAAU;AAAA,cACV,SAAS,MAAM,KAAK,WAAW,MAAM,KAAK;AAAA,cAC1C,MAAK;AAAA;AAAA,UACP;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,YAAW;AAAA,cACX,WAAU;AAAA,cACV,SAAS,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,cACzC,MAAK;AAAA;AAAA,UACP;AAAA,WACF;AAAA,SACF,IACE;AAAA,OACN;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2, { Component } from "react";
4
4
  import AceEditor from "react-ace";
5
- import { DSModal } from "@elliemae/ds-modal";
5
+ import { DSModal } from "@elliemae/ds-legacy-modal";
6
6
  import DSCodeEditorForm from "./DSCodeEditorForm.js";
7
7
  import "ace-builds/src-noconflict/mode-javascript.js";
8
8
  import "ace-builds/src-noconflict/theme-tomorrow.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DSCodeEditorImpl.tsx"],
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.js';\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/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 const Comp = (AceEditor as any)?.default ?? AceEditor;\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 fileName={fileName} reactAceComponent={this.reactAceComponent} />\n <Comp\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"],
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-legacy-modal';\nimport DSCodeEditorForm from './DSCodeEditorForm.js';\nimport 'ace-builds/src-noconflict/mode-javascript.js';\nimport 'ace-builds/src-noconflict/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 const Comp = (AceEditor as any)?.default ?? AceEditor;\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 fileName={fileName} reactAceComponent={this.reactAceComponent} />\n <Comp\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
5
  "mappings": "AAAA,YAAY,WAAW;ACsCjB,SAcE,KAdF;AAtCN,OAAOA,UAAS,iBAAiB;AACjC,OAAO,eAAe;AACtB,SAAS,eAAe;AACxB,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,UAAM,OAAQ,WAAmB,WAAW;AAC5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,SAAS,MAAM,QAAQ,OAAO,UAAU,MAAM;AAAA,QAC9C,WAAW,MAAM,OAAO,OAAO,UAAU,MAAM;AAAA,QAC/C,UAAU,MAAM,SAAS,OAAO,UAAU,MAAM;AAAA,QAChD;AAAA,QACA;AAAA,QACA;AAAA,QAEA;AAAA,8BAAC,oBAAiB,UAAoB,mBAAmB,KAAK,mBAAmB;AAAA,UACjF;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,KAAK;AAAA,cACV,aAAa,EAAE,iBAAiB,KAAK;AAAA,cACrC;AAAA,cACA;AAAA,cACA,MAAK;AAAA,cACL,MAAK;AAAA,cACL,UAAU,CAAC,QAAQ,KAAK,SAAS,EAAE,OAAO,IAAI,CAAC;AAAA,cAC/C,YAAY,CAAC,gBAAgB,KAAK,SAAS,EAAE,QAAQ,YAAY,CAAC;AAAA,cAClE,OAAM;AAAA,cACN;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,2BAAQ;",
6
6
  "names": ["React"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-codeeditor",
3
- "version": "3.60.0-next.11",
3
+ "version": "3.60.0-next.13",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Code Editor",
6
6
  "files": [
@@ -35,38 +35,37 @@
35
35
  "reportFile": "tests.xml",
36
36
  "indent": 4
37
37
  },
38
- "scripts": {
39
- "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
40
- "test": "exit 0 | echo",
41
- "lint": "exit 0 | echo",
42
- "dts": "exit 0 | echo",
43
- "build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
44
- "checkDeps": "exit 0 | echo"
45
- },
46
38
  "dependencies": {
47
- "@elliemae/ds-button": "3.60.0-next.11",
48
- "@elliemae/ds-classnames": "3.60.0-next.11",
49
- "@elliemae/ds-form": "3.60.0-next.11",
50
- "@elliemae/ds-icons": "3.60.0-next.11",
51
- "@elliemae/ds-modal": "3.60.0-next.11",
52
- "@elliemae/ds-props-helpers": "3.60.0-next.11",
39
+ "@elliemae/ds-legacy-button-v1": "1.0.16",
40
+ "@elliemae/ds-legacy-form": "1.0.16",
41
+ "@elliemae/ds-legacy-modal": "1.0.16",
53
42
  "ace-builds": "~1.16.0",
54
- "react-ace": "~10.1.0"
43
+ "react-ace": "~10.1.0",
44
+ "@elliemae/ds-classnames": "3.60.0-next.13",
45
+ "@elliemae/ds-props-helpers": "3.60.0-next.13",
46
+ "@elliemae/ds-icons": "3.60.0-next.13"
55
47
  },
56
48
  "devDependencies": {
57
- "@elliemae/ds-monorepo-devops": "3.60.0-next.11",
58
- "@elliemae/pui-cli": "catalog:",
59
- "jest": "catalog:",
60
- "styled-components": "catalog:"
49
+ "@elliemae/pui-cli": "9.0.0-next.65",
50
+ "jest": "~29.7.0",
51
+ "styled-components": "~5.3.9",
52
+ "@elliemae/ds-monorepo-devops": "3.60.0-next.13"
61
53
  },
62
54
  "peerDependencies": {
63
- "lodash-es": "catalog:",
64
- "react": "catalog:",
65
- "react-dom": "catalog:"
55
+ "lodash-es": "^4.17.21",
56
+ "react": "^18.3.1",
57
+ "react-dom": "^18.3.1"
66
58
  },
67
59
  "publishConfig": {
68
60
  "access": "public",
69
61
  "typeSafety": false
70
62
  },
71
- "gitHead": "647d9d23c1622e940c76adafbf80cf6c3b4a210c"
72
- }
63
+ "scripts": {
64
+ "dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
65
+ "test": "exit 0 | echo",
66
+ "lint": "exit 0 | echo",
67
+ "dts": "exit 0 | echo",
68
+ "build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
69
+ "checkDeps": "exit 0 | echo"
70
+ }
71
+ }