@elliemae/ds-query-builder 2.0.0-next.8 → 2.0.0-rc.11

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.
Files changed (57) hide show
  1. package/cjs/DSQueryBuilder.js +60 -56
  2. package/cjs/components/AndOrController/AndOrController.js +26 -34
  3. package/cjs/components/ConditionController/ConditionController.js +26 -32
  4. package/cjs/components/DisplayOutput/DisplayOutput.js +20 -21
  5. package/cjs/components/DragContainerController/DragContainerController.js +13 -15
  6. package/cjs/components/DragControllerRow/DragControllerRow.js +10 -6
  7. package/cjs/components/FieldControllerRow/FieldControllerRow.js +22 -22
  8. package/cjs/components/Nestable/Nestable.js +44 -30
  9. package/cjs/components/Nestable/NestableItem.js +18 -10
  10. package/cjs/components/Nestable/actions/events.js +5 -0
  11. package/cjs/components/Nestable/actions/getPaths.js +9 -1
  12. package/cjs/components/Nestable/actions/moveItem.js +12 -5
  13. package/cjs/components/Nestable/actions/paths.js +13 -3
  14. package/cjs/components/QueryBuilderImpl.js +34 -30
  15. package/cjs/components/QueryBuilderItem/QueryBuilderItem.js +28 -20
  16. package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +42 -33
  17. package/cjs/components/ToolBarAnimation/ToolBarAnimation.js +5 -0
  18. package/cjs/components/format/format.js +8 -14
  19. package/cjs/components/format/sqlFormat.js +9 -7
  20. package/cjs/components/format/sqlSafeFormat.js +9 -7
  21. package/cjs/components/format/xmlFormat.js +9 -7
  22. package/cjs/components/helpers/actions.js +59 -34
  23. package/cjs/components/helpers/dependencies.js +17 -8
  24. package/cjs/components/helpers/store.js +38 -39
  25. package/cjs/index.js +2 -1
  26. package/esm/DSQueryBuilder.js +60 -57
  27. package/esm/components/AndOrController/AndOrController.js +16 -19
  28. package/esm/components/ConditionController/ConditionController.js +20 -22
  29. package/esm/components/DisplayOutput/DisplayOutput.js +16 -14
  30. package/esm/components/DragContainerController/DragContainerController.js +10 -10
  31. package/esm/components/DragControllerRow/DragControllerRow.js +7 -2
  32. package/esm/components/FieldControllerRow/FieldControllerRow.js +22 -20
  33. package/esm/components/Nestable/Nestable.js +43 -29
  34. package/esm/components/Nestable/NestableItem.js +18 -10
  35. package/esm/components/Nestable/actions/events.js +5 -0
  36. package/esm/components/Nestable/actions/getPaths.js +9 -1
  37. package/esm/components/Nestable/actions/moveItem.js +12 -5
  38. package/esm/components/Nestable/actions/paths.js +13 -3
  39. package/esm/components/QueryBuilderImpl.js +34 -30
  40. package/esm/components/QueryBuilderItem/QueryBuilderItem.js +28 -20
  41. package/esm/components/QueryBuilderRow/QueryBuilderRow.js +42 -32
  42. package/esm/components/ToolBarAnimation/ToolBarAnimation.js +5 -0
  43. package/esm/components/format/format.js +8 -10
  44. package/esm/components/format/sqlFormat.js +9 -7
  45. package/esm/components/format/sqlSafeFormat.js +9 -7
  46. package/esm/components/format/xmlFormat.js +9 -7
  47. package/esm/components/helpers/actions.js +59 -34
  48. package/esm/components/helpers/dependencies.js +17 -8
  49. package/esm/components/helpers/store.js +38 -39
  50. package/esm/index.js +1 -1
  51. package/package.json +14 -7
  52. package/types/DSQueryBuilder.d.ts +170 -25
  53. package/types/components/AndOrController/AndOrController.d.ts +4 -4
  54. package/types/components/ConditionController/ConditionController.d.ts +2 -2
  55. package/types/components/DragContainerController/DragContainerController.d.ts +3 -3
  56. package/types/components/DragControllerRow/DragControllerRow.d.ts +2 -2
  57. package/types/propTypes.d.ts +133 -23
@@ -8,64 +8,67 @@ export { QB_DEFAULT_VALUES_OPTIONS, QB_FIELD_OPTIONS, QB_LOAN_VALUES_OPTIONS, QB
8
8
  export { default as QueryBuilderFormat } from './components/format/format.js';
9
9
  import { props } from './propTypes.js';
10
10
 
11
- const DSQueryBuilder = ({
12
- containerProps = {},
13
- addFilterMethod = QB_ADD_FILTER_METHOD_TYPES.IN_PLACE,
14
- groupFilterMethod = QB_GROUP_FILTER_METHOD_TYPES.IN_PLACE,
15
- onChange = () => null,
16
- fields = [],
17
- fieldsSharedActions = {
18
- onFieldChange: [],
19
- onOperatorChange: [],
20
- onValueChange: []
21
- },
22
- format = QB_EXPORT_FORMAT_TYPES.DEFAULT,
23
- init = null,
24
- ruleContainerClassName = '',
25
- handleDrop = () => null,
26
- handleDropFilter = () => null,
27
- handleDropGroup = () => null,
28
- handleFieldChange = () => null,
29
- handleRuleContainerOperator = () => null,
30
- handleRuleContainerUnGroup = () => null,
31
- onAddFilter = () => null,
32
- onAddRuleContainer = () => null,
33
- onRemoveFilter = () => null,
34
- displayFixedOutput,
35
- displayOutput = false,
36
- displayOutputLabel = {
37
- show: 'Show output',
38
- hide: 'Hide output'
39
- },
40
- singleRow = false,
41
- toolTipZIndex = 110
42
- }) => /*#__PURE__*/_jsx(QueryBuilderImpl, {
43
- addFilterMethod: addFilterMethod,
44
- containerProps: containerProps,
45
- displayFixedOutput: displayFixedOutput,
46
- displayOutput: displayOutput,
47
- displayOutputLabel: displayOutputLabel,
48
- fields: fields,
49
- fieldsSharedActions: fieldsSharedActions,
50
- format: format,
51
- groupFilterMethod: groupFilterMethod,
52
- handleDrop: handleDrop,
53
- handleDropFilter: handleDropFilter,
54
- handleDropGroup: handleDropGroup,
55
- handleFieldChange: handleFieldChange,
56
- handleRuleContainerOperator: handleRuleContainerOperator,
57
- handleRuleContainerUnGroup: handleRuleContainerUnGroup,
58
- init: init,
59
- onAddFilter: onAddFilter,
60
- onAddRuleContainer: onAddRuleContainer,
61
- onChange: onChange,
62
- onRemoveFilter: onRemoveFilter,
63
- ruleContainerClassName: ruleContainerClassName,
64
- singleRow: singleRow,
65
- toolTipZIndex: toolTipZIndex
66
- });
11
+ const DSQueryBuilder = _ref => {
12
+ let {
13
+ containerProps = {},
14
+ addFilterMethod = QB_ADD_FILTER_METHOD_TYPES.IN_PLACE,
15
+ groupFilterMethod = QB_GROUP_FILTER_METHOD_TYPES.IN_PLACE,
16
+ onChange = () => null,
17
+ fields = [],
18
+ fieldsSharedActions = {
19
+ onFieldChange: [],
20
+ onOperatorChange: [],
21
+ onValueChange: []
22
+ },
23
+ format = QB_EXPORT_FORMAT_TYPES.DEFAULT,
24
+ init = null,
25
+ ruleContainerClassName = '',
26
+ handleDrop = () => null,
27
+ handleDropFilter = () => null,
28
+ handleDropGroup = () => null,
29
+ handleFieldChange = () => null,
30
+ handleRuleContainerOperator = () => null,
31
+ handleRuleContainerUnGroup = () => null,
32
+ onAddFilter = () => null,
33
+ onAddRuleContainer = () => null,
34
+ onRemoveFilter = () => null,
35
+ displayFixedOutput,
36
+ displayOutput = false,
37
+ displayOutputLabel = {
38
+ show: 'Show output',
39
+ hide: 'Hide output'
40
+ },
41
+ singleRow = false,
42
+ toolTipZIndex = 110
43
+ } = _ref;
44
+ return /*#__PURE__*/_jsx(QueryBuilderImpl, {
45
+ addFilterMethod: addFilterMethod,
46
+ containerProps: containerProps,
47
+ displayFixedOutput: displayFixedOutput,
48
+ displayOutput: displayOutput,
49
+ displayOutputLabel: displayOutputLabel,
50
+ fields: fields,
51
+ fieldsSharedActions: fieldsSharedActions,
52
+ format: format,
53
+ groupFilterMethod: groupFilterMethod,
54
+ handleDrop: handleDrop,
55
+ handleDropFilter: handleDropFilter,
56
+ handleDropGroup: handleDropGroup,
57
+ handleFieldChange: handleFieldChange,
58
+ handleRuleContainerOperator: handleRuleContainerOperator,
59
+ handleRuleContainerUnGroup: handleRuleContainerUnGroup,
60
+ init: init,
61
+ onAddFilter: onAddFilter,
62
+ onAddRuleContainer: onAddRuleContainer,
63
+ onChange: onChange,
64
+ onRemoveFilter: onRemoveFilter,
65
+ ruleContainerClassName: ruleContainerClassName,
66
+ singleRow: singleRow,
67
+ toolTipZIndex: toolTipZIndex
68
+ });
69
+ };
67
70
 
68
71
  const DSQueryBuilderWithSchema = describe(DSQueryBuilder);
69
72
  DSQueryBuilderWithSchema.propTypes = props;
70
73
 
71
- export { DSQueryBuilderWithSchema, DSQueryBuilder as default };
74
+ export { DSQueryBuilder, DSQueryBuilderWithSchema, DSQueryBuilder as default };
@@ -1,15 +1,12 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
2
  import React, { Component } from 'react';
4
3
  import { convertPropToCssClassName } from '@elliemae/ds-classnames';
5
- import DSTooltip, { TooltipType } from '@elliemae/ds-basic/Tooltip';
6
- import { PopperInteractions, PopperPositions } from '@elliemae/ds-basic/Popper';
7
- import DSToggle from '@elliemae/ds-basic/form/Toggle';
8
- import DSButton from '@elliemae/ds-basic/Button';
9
- import QueryAdd from '@elliemae/ds-icons/QueryAdd';
10
- import ParenthesisRemove from '@elliemae/ds-icons/ParenthesisRemove';
11
- import MoreOptionsVert from '@elliemae/ds-icons/MoreOptionsVert';
12
- import { DSIconSizes, DSIconColors } from '@elliemae/ds-basic/Icon';
4
+ import DSTooltip, { TooltipType } from '@elliemae/ds-tooltip';
5
+ import { PopperInteractions, PopperPositions } from '@elliemae/ds-popper';
6
+ import { DSToggle } from '@elliemae/ds-form';
7
+ import DSButton from '@elliemae/ds-button';
8
+ import { QueryAdd, ParenthesisRemove, MoreOptionsVert } from '@elliemae/ds-icons';
9
+ import { DSIconSizes, DSIconColors } from '@elliemae/ds-icon';
13
10
  import { DELAY_CLOSE, DELAY_OPEN, TOOLBAR_ANIMATION_DURATION } from '../helpers/constants.js';
14
11
  import { ToolBarAnimation } from '../ToolBarAnimation/ToolBarAnimation.js';
15
12
  import DragContainerController from '../DragContainerController/DragContainerController.js';
@@ -34,11 +31,11 @@ class AndOrController extends Component {
34
31
  constructor(props) {
35
32
  super(props);
36
33
 
37
- _defineProperty(this, "handleMouseEnterRow", e => {
34
+ this.handleMouseEnterRow = e => {
38
35
  this.handleTooltipRow(true); // this.handleMouseMove(e)
39
- });
36
+ };
40
37
 
41
- _defineProperty(this, "handleMouseMove", e => {
38
+ this.handleMouseMove = e => {
42
39
  if (!this.contenerRef.current) return;
43
40
  const mouse = e.clientY;
44
41
  const {
@@ -50,13 +47,13 @@ class AndOrController extends Component {
50
47
  this.setState({
51
48
  top: mouse - topDiff - refHeight / 2 - delta
52
49
  });
53
- });
50
+ };
54
51
 
55
- _defineProperty(this, "handleMouseLeaveRow", () => {
52
+ this.handleMouseLeaveRow = () => {
56
53
  this.handleTooltipRow(false);
57
- });
54
+ };
58
55
 
59
- _defineProperty(this, "handleTooltipRow", isOpen => {
56
+ this.handleTooltipRow = isOpen => {
60
57
  this.setState({
61
58
  isOpen
62
59
  });
@@ -64,7 +61,7 @@ class AndOrController extends Component {
64
61
  handleTooltipGroup
65
62
  } = this.props;
66
63
  handleTooltipGroup(isOpen);
67
- });
64
+ };
68
65
 
69
66
  this.contenerRef = /*#__PURE__*/React.createRef();
70
67
  this.myRef = /*#__PURE__*/React.createRef();
@@ -190,7 +187,7 @@ class AndOrController extends Component {
190
187
 
191
188
  }
192
189
 
193
- _defineProperty(AndOrController, "defaultProps", {
190
+ AndOrController.defaultProps = {
194
191
  isMain: false,
195
192
  handleRuleContainerOperator: () => null,
196
193
  handleRuleContainerUnGroup: () => null,
@@ -211,6 +208,6 @@ _defineProperty(AndOrController, "defaultProps", {
211
208
  toolBarAnimationDuration: TOOLBAR_ANIMATION_DURATION,
212
209
  toolBarInteractionType: PopperInteractions.CLICK,
213
210
  toolBarPosition: PopperPositions.LEFT
214
- });
211
+ };
215
212
 
216
213
  export { AndOrController as default };
@@ -1,33 +1,31 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import 'react';
3
3
  import { convertPropToCssClassName } from '@elliemae/ds-classnames';
4
- import DSTooltip, { TooltipType } from '@elliemae/ds-basic/Tooltip';
5
- import { PopperInteractions, PopperPositions } from '@elliemae/ds-basic/Popper';
6
- import { DSIconSizes } from '@elliemae/ds-basic/Icon';
7
- import DSButton from '@elliemae/ds-basic/Button';
8
- import MoreOptionsVert from '@elliemae/ds-icons/MoreOptionsVert';
9
- import QueryRemove from '@elliemae/ds-icons/QueryRemove';
10
- import QueryAdd from '@elliemae/ds-icons/QueryAdd';
11
- import ParenthesisAdd from '@elliemae/ds-icons/ParenthesisAdd';
4
+ import DSTooltip, { TooltipType } from '@elliemae/ds-tooltip';
5
+ import { PopperInteractions, PopperPositions } from '@elliemae/ds-popper';
6
+ import { DSIconSizes } from '@elliemae/ds-icon';
7
+ import { QueryRemove, QueryAdd, ParenthesisAdd, MoreOptionsVert } from '@elliemae/ds-icons';
8
+ import DSButton from '@elliemae/ds-button';
12
9
  import { ToolBarAnimation } from '../ToolBarAnimation/ToolBarAnimation.js';
13
10
  import { DELAY_CLOSE, DELAY_OPEN, TOOLBAR_ANIMATION_DURATION } from '../helpers/constants.js';
14
11
 
15
12
  var _ToolBarAnimation, _QueryRemove, _QueryAdd, _ParenthesisAdd;
16
13
 
17
- const ConditionController = ({
18
- onAddFilter = () => null,
19
- onAddRuleContainer = () => null,
20
- onRemoveFilter = () => null,
21
- handleTooltipRow = () => null,
22
- buttonTriggerSize = DSIconSizes.M,
23
- buttonTriggerType = 'text',
24
- buttonActionSize = DSIconSizes.M,
25
- buttonActionType = 'text',
26
- delayClose = DELAY_CLOSE,
27
- delayOpen = DELAY_OPEN,
28
- isOpen = false,
29
- toolTipZIndex
30
- }) => {
14
+ const ConditionController = _ref => {
15
+ let {
16
+ onAddFilter = () => null,
17
+ onAddRuleContainer = () => null,
18
+ onRemoveFilter = () => null,
19
+ handleTooltipRow = () => null,
20
+ buttonTriggerSize = DSIconSizes.M,
21
+ buttonTriggerType = 'text',
22
+ buttonActionSize = DSIconSizes.M,
23
+ buttonActionType = 'text',
24
+ delayClose = DELAY_CLOSE,
25
+ delayOpen = DELAY_OPEN,
26
+ isOpen = false,
27
+ toolTipZIndex
28
+ } = _ref;
31
29
  const {
32
30
  cssClassName,
33
31
  classNameBlock,
@@ -1,11 +1,9 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
2
  import { Component } from 'react';
4
3
  import { Grid } from '@elliemae/ds-grid';
5
4
  import { convertPropToCssClassName } from '@elliemae/ds-classnames';
6
- import { DSAccordion, DSAccordionItem } from '@elliemae/ds-basic/Accordion';
7
- import ChevronDown from '@elliemae/ds-icons/ChevronDown';
8
- import ChevronRight from '@elliemae/ds-icons/ChevronRight';
5
+ import { DSAccordion, DSAccordionItem } from '@elliemae/ds-accordion';
6
+ import { ChevronRight, ChevronDown } from '@elliemae/ds-icons';
9
7
  import { QueryBuilderContext } from '../QueryBuilderContext/QueryBuilderContext.js';
10
8
 
11
9
  const {
@@ -16,13 +14,16 @@ class DisplayOutput extends Component {
16
14
  constructor(props) {
17
15
  super(props);
18
16
 
19
- _defineProperty(this, "handleChange", () => {
20
- this.setState(({
21
- show
22
- }) => ({
23
- show: !show
24
- }));
25
- });
17
+ this.handleChange = () => {
18
+ this.setState(_ref => {
19
+ let {
20
+ show
21
+ } = _ref;
22
+ return {
23
+ show: !show
24
+ };
25
+ });
26
+ };
26
27
 
27
28
  this.state = {
28
29
  show: props.show
@@ -40,9 +41,10 @@ class DisplayOutput extends Component {
40
41
  hideLabel,
41
42
  displayFixedOutput
42
43
  } = this.props;
43
- return /*#__PURE__*/_jsx(QueryBuilderContext.Consumer, {}, void 0, ({
44
- format
45
- }) => {
44
+ return /*#__PURE__*/_jsx(QueryBuilderContext.Consumer, {}, void 0, _ref2 => {
45
+ let {
46
+ format
47
+ } = _ref2;
46
48
  let display = '';
47
49
 
48
50
  try {
@@ -1,19 +1,19 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import 'react';
3
3
  import { convertPropToCssClassName } from '@elliemae/ds-classnames';
4
- import MoreOptionsVert from '@elliemae/ds-icons/MoreOptionsVert';
5
- import { DSIconColors, DSIconSizes } from '@elliemae/ds-basic/Icon';
6
- import GripperVertical from '@elliemae/ds-icons/GripperVertical';
4
+ import { DSIconColors, DSIconSizes } from '@elliemae/ds-icon';
5
+ import { GripperVertical, MoreOptionsVert } from '@elliemae/ds-icons';
7
6
 
8
7
  var _div;
9
8
 
10
- const DragContainerController = ({
11
- color = DSIconColors.NEUTRAL,
12
- icon: Icon = GripperVertical,
13
- size = DSIconSizes.S,
14
- multipleSize = false,
15
- onClick
16
- }) => {
9
+ const DragContainerController = _ref => {
10
+ let {
11
+ color = DSIconColors.NEUTRAL,
12
+ icon: Icon = GripperVertical,
13
+ size = DSIconSizes.S,
14
+ multipleSize = false,
15
+ onClick
16
+ } = _ref;
17
17
  const {
18
18
  cssClassName
19
19
  } = convertPropToCssClassName('query-builder-drag-group');
@@ -1,9 +1,14 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
8
  import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
9
  import 'react';
5
- import GripperVertical from '@elliemae/ds-icons/GripperVertical';
6
- import { DSIconSizes } from '@elliemae/ds-basic/Icon';
10
+ import { DSIconSizes } from '@elliemae/ds-icon';
11
+ import { GripperVertical } from '@elliemae/ds-icons';
7
12
  import { jsx } from 'react/jsx-runtime';
8
13
 
9
14
  const _excluded = ["className", "color", "icon", "size"];
@@ -1,25 +1,27 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
2
  import 'react';
3
- import DSComboBox from '@elliemae/ds-basic/form/ComboBox';
4
- import DSTextBox from '@elliemae/ds-basic/form/TextBox';
3
+ import { DSComboBox, DSTextBox } from '@elliemae/ds-form';
5
4
 
6
- const FieldControllerRow = ({
7
- className = '',
8
- onChange = () => null,
9
- options = [],
10
- value = '',
11
- type = 'DSComboBox'
12
- }) => /*#__PURE__*/_jsx("div", {
13
- className: className
14
- }, void 0, type === 'DSComboBox' && /*#__PURE__*/_jsx(DSComboBox, {
15
- onChange: onChange,
16
- options: options,
17
- value: value
18
- }), type === 'DSTextBox' && /*#__PURE__*/_jsx(DSTextBox, {
19
- fluidWidth: true,
20
- onChange: onChange,
21
- options: options,
22
- value: value
23
- }));
5
+ const FieldControllerRow = _ref => {
6
+ let {
7
+ className = '',
8
+ onChange = () => null,
9
+ options = [],
10
+ value = '',
11
+ type = 'DSComboBox'
12
+ } = _ref;
13
+ return /*#__PURE__*/_jsx("div", {
14
+ className: className
15
+ }, void 0, type === 'DSComboBox' && /*#__PURE__*/_jsx(DSComboBox, {
16
+ onChange: onChange,
17
+ options: options,
18
+ value: value
19
+ }), type === 'DSTextBox' && /*#__PURE__*/_jsx(DSTextBox, {
20
+ fluidWidth: true,
21
+ onChange: onChange,
22
+ options: options,
23
+ value: value
24
+ }));
25
+ };
24
26
 
25
27
  export { FieldControllerRow as default };
@@ -1,9 +1,18 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.filter.js';
3
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
4
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
5
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import 'core-js/modules/esnext.async-iterator.find.js';
8
+ import 'core-js/modules/esnext.iterator.constructor.js';
9
+ import 'core-js/modules/esnext.iterator.find.js';
10
+ import 'core-js/modules/esnext.async-iterator.map.js';
11
+ import 'core-js/modules/esnext.iterator.map.js';
3
12
  import { Component } from 'react';
4
13
  import cn from 'classnames';
5
14
  import { listWithChildren } from '@elliemae/ds-shared/utils';
6
- import { isEqualWith } from '@elliemae/ds-utilities/utils';
15
+ import { isEqualWith } from '@elliemae/ds-utilities';
7
16
  import { tryIncreaseDepth } from './actions/tryIncreaseDepth.js';
8
17
  import { tryDecreaseDepth } from './actions/tryDecreaseDepth.js';
9
18
  import { moveItem } from './actions/moveItem.js';
@@ -22,43 +31,43 @@ class Nestable extends Component {
22
31
  constructor(props) {
23
32
  super(props);
24
33
 
25
- _defineProperty(this, "onDragStart", (e, item) => {
34
+ this.onDragStart = (e, item) => {
26
35
  onDragStart.call(this, e, item);
27
- });
36
+ };
28
37
 
29
- _defineProperty(this, "onDragEnd", (e, isCancel) => onDragEnd.call(this, e, isCancel));
38
+ this.onDragEnd = (e, isCancel) => onDragEnd.call(this, e, isCancel);
30
39
 
31
- _defineProperty(this, "onMouseMove", e => onMouseMove.call(this, e));
40
+ this.onMouseMove = e => onMouseMove.call(this, e);
32
41
 
33
- _defineProperty(this, "onMouseEnter", (e, item) => onMouseEnter.call(this, e, item));
42
+ this.onMouseEnter = (e, item) => onMouseEnter.call(this, e, item);
34
43
 
35
- _defineProperty(this, "onToggleCollapse", (item, isGetter) => onToggleCollapse.call(this, item, isGetter));
44
+ this.onToggleCollapse = (item, isGetter) => onToggleCollapse.call(this, item, isGetter);
36
45
 
37
- _defineProperty(this, "onKeyDown", e => onKeyDown.call(this, e));
46
+ this.onKeyDown = e => onKeyDown.call(this, e);
38
47
 
39
- _defineProperty(this, "getDefaultItems", () => {
48
+ this.getDefaultItems = () => {
40
49
  const {
41
50
  items
42
51
  } = this.state;
43
52
  return items;
44
- });
53
+ };
45
54
 
46
- _defineProperty(this, "getItemDepth", item => getItemDepth.call(this, item));
55
+ this.getItemDepth = item => getItemDepth.call(this, item);
47
56
 
48
- _defineProperty(this, "startTrackMouse", () => {
57
+ this.startTrackMouse = () => {
49
58
  document.addEventListener('mousemove', this.onMouseMove);
50
59
  document.addEventListener('mouseup', this.onDragEnd);
51
60
  document.addEventListener('keydown', this.onKeyDown);
52
- });
61
+ };
53
62
 
54
- _defineProperty(this, "stopTrackMouse", () => {
63
+ this.stopTrackMouse = () => {
55
64
  document.removeEventListener('mousemove', this.onMouseMove);
56
65
  document.removeEventListener('mouseup', this.onDragEnd);
57
66
  document.removeEventListener('keydown', this.onKeyDown);
58
67
  this.elCopyStyles = null;
59
- });
68
+ };
60
69
 
61
- _defineProperty(this, "isCollapsed", item => {
70
+ this.isCollapsed = item => {
62
71
  const {
63
72
  collapsed
64
73
  } = this.props;
@@ -66,9 +75,9 @@ class Nestable extends Component {
66
75
  collapsedGroups
67
76
  } = this.state;
68
77
  return !!(collapsedGroups.indexOf(item.id) > -1 ^ collapsed);
69
- });
78
+ };
70
79
 
71
- _defineProperty(this, "checkFilterChildren", items => items.find(current => {
80
+ this.checkFilterChildren = items => items.find(current => {
72
81
  const {
73
82
  element: {
74
83
  type
@@ -77,9 +86,9 @@ class Nestable extends Component {
77
86
  } = current;
78
87
  if (type === 'filter' && children.length > 0) return true;
79
88
  return this.checkFilterChildren(children);
80
- }));
89
+ });
81
90
 
82
- _defineProperty(this, "dragRevert", () => {
91
+ this.dragRevert = () => {
83
92
  const {
84
93
  itemsOld
85
94
  } = this.state;
@@ -89,7 +98,7 @@ class Nestable extends Component {
89
98
  dragItem: null,
90
99
  isDirty: false
91
100
  });
92
- });
101
+ };
93
102
 
94
103
  this.state = {
95
104
  items: [],
@@ -162,15 +171,18 @@ class Nestable extends Component {
162
171
  return null;
163
172
  }
164
173
 
165
- getPathById(id, items = this.getDefaultItems()) {
174
+ getPathById(id) {
175
+ let items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getDefaultItems();
166
176
  return getPathById.call(this, id, items);
167
177
  }
168
178
 
169
- getItemByPath(path, items = this.getDefaultItems()) {
179
+ getItemByPath(path) {
180
+ let items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getDefaultItems();
170
181
  return getItemByPath.call(this, path, items);
171
182
  }
172
183
 
173
- getSplicePath(path, options = {}) {
184
+ getSplicePath(path) {
185
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
174
186
  return getSplicePath.call(this, path, options);
175
187
  }
176
188
 
@@ -207,11 +219,13 @@ class Nestable extends Component {
207
219
  tryDecreaseDepth.call(this, dragItem);
208
220
  }
209
221
 
210
- moveItem({
211
- dragItem,
212
- pathFrom,
213
- pathTo
214
- }, extraProps = {}) {
222
+ moveItem(_ref) {
223
+ let {
224
+ dragItem,
225
+ pathFrom,
226
+ pathTo
227
+ } = _ref;
228
+ let extraProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
215
229
  moveItem.call(this, {
216
230
  dragItem,
217
231
  pathFrom,
@@ -1,5 +1,12 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
7
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
+ import 'core-js/modules/esnext.async-iterator.map.js';
9
+ import 'core-js/modules/esnext.iterator.map.js';
3
10
  import 'react';
4
11
  import cn from 'classnames';
5
12
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -8,16 +15,17 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
8
15
 
9
16
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
10
17
 
11
- const NestableItem = ({
12
- item,
13
- isCopy,
14
- options,
15
- index,
16
- isAndItem,
17
- isOrItem,
18
- isDraggableItem,
19
- singleRow
20
- }) => {
18
+ const NestableItem = _ref => {
19
+ let {
20
+ item,
21
+ isCopy,
22
+ options,
23
+ index,
24
+ isAndItem,
25
+ isOrItem,
26
+ isDraggableItem,
27
+ singleRow
28
+ } = _ref;
21
29
  const {
22
30
  dragItem,
23
31
  renderItem,
@@ -1,4 +1,9 @@
1
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
2
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
3
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
4
+ import 'core-js/modules/esnext.async-iterator.filter.js';
5
+ import 'core-js/modules/esnext.iterator.constructor.js';
6
+ import 'core-js/modules/esnext.iterator.filter.js';
2
7
  import { closest, getTransformProps, getOffsetRect, getTotalScroll } from '@elliemae/ds-shared/utils';
3
8
 
4
9
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -1,3 +1,10 @@
1
+ import 'core-js/modules/esnext.async-iterator.map.js';
2
+ import 'core-js/modules/esnext.iterator.map.js';
3
+ import 'core-js/modules/esnext.async-iterator.every.js';
4
+ import 'core-js/modules/esnext.iterator.constructor.js';
5
+ import 'core-js/modules/esnext.iterator.every.js';
6
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
7
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
8
  import 'core-js/modules/web.dom-collections.iterator.js';
2
9
 
3
10
  function getRealNextPath(prevPath, nextPath) {
@@ -85,7 +92,8 @@ function getItemDepth(item) {
85
92
 
86
93
  return level;
87
94
  }
88
- function getSplicePath(path, options = {}) {
95
+ function getSplicePath(path) {
96
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
89
97
  const splicePath = {};
90
98
  const numToRemove = options.numToRemove || 0;
91
99
  const itemsToInsert = options.itemsToInsert || [];