@elliemae/ds-query-builder 3.5.0-rc.9 → 3.5.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSQueryBuilder.js +2 -2
- package/dist/cjs/DSQueryBuilder.js.map +2 -2
- package/dist/cjs/components/AndOrController/AndOrController.js +102 -82
- package/dist/cjs/components/AndOrController/AndOrController.js.map +1 -1
- package/dist/cjs/components/ConditionController/ConditionController.js +69 -63
- package/dist/cjs/components/ConditionController/ConditionController.js.map +2 -2
- package/dist/cjs/components/DisplayOutput/DisplayOutput.js +46 -31
- package/dist/cjs/components/DisplayOutput/DisplayOutput.js.map +2 -2
- package/dist/cjs/components/DragContainerController/DragContainerController.js +24 -18
- package/dist/cjs/components/DragContainerController/DragContainerController.js.map +2 -2
- package/dist/cjs/components/DragControllerRow/DragControllerRow.js +8 -7
- package/dist/cjs/components/DragControllerRow/DragControllerRow.js.map +2 -2
- package/dist/cjs/components/FieldControllerRow/FieldControllerRow.js +17 -13
- package/dist/cjs/components/FieldControllerRow/FieldControllerRow.js.map +2 -2
- package/dist/cjs/components/Nestable/Nestable.js +33 -26
- package/dist/cjs/components/Nestable/Nestable.js.map +2 -2
- package/dist/cjs/components/Nestable/NestableItem.js +31 -25
- package/dist/cjs/components/Nestable/NestableItem.js.map +2 -2
- package/dist/cjs/components/QueryBuilderImpl.js +44 -34
- package/dist/cjs/components/QueryBuilderImpl.js.map +2 -2
- package/dist/cjs/components/QueryBuilderItem/QueryBuilderItem.js +46 -44
- package/dist/cjs/components/QueryBuilderItem/QueryBuilderItem.js.map +2 -2
- package/dist/cjs/components/QueryBuilderRow/QueryBuilderRow.js +86 -69
- package/dist/cjs/components/QueryBuilderRow/QueryBuilderRow.js.map +1 -1
- package/dist/cjs/components/ToolBarAnimation/ToolBarAnimation.js +2 -2
- package/dist/cjs/components/ToolBarAnimation/ToolBarAnimation.js.map +2 -2
- package/dist/esm/DSQueryBuilder.js +2 -2
- package/dist/esm/DSQueryBuilder.js.map +2 -2
- package/dist/esm/components/AndOrController/AndOrController.js +102 -82
- package/dist/esm/components/AndOrController/AndOrController.js.map +1 -1
- package/dist/esm/components/ConditionController/ConditionController.js +69 -63
- package/dist/esm/components/ConditionController/ConditionController.js.map +2 -2
- package/dist/esm/components/DisplayOutput/DisplayOutput.js +46 -31
- package/dist/esm/components/DisplayOutput/DisplayOutput.js.map +2 -2
- package/dist/esm/components/DragContainerController/DragContainerController.js +24 -18
- package/dist/esm/components/DragContainerController/DragContainerController.js.map +2 -2
- package/dist/esm/components/DragControllerRow/DragControllerRow.js +8 -7
- package/dist/esm/components/DragControllerRow/DragControllerRow.js.map +2 -2
- package/dist/esm/components/FieldControllerRow/FieldControllerRow.js +17 -13
- package/dist/esm/components/FieldControllerRow/FieldControllerRow.js.map +2 -2
- package/dist/esm/components/Nestable/Nestable.js +33 -26
- package/dist/esm/components/Nestable/Nestable.js.map +2 -2
- package/dist/esm/components/Nestable/NestableItem.js +31 -25
- package/dist/esm/components/Nestable/NestableItem.js.map +2 -2
- package/dist/esm/components/QueryBuilderImpl.js +44 -34
- package/dist/esm/components/QueryBuilderImpl.js.map +2 -2
- package/dist/esm/components/QueryBuilderItem/QueryBuilderItem.js +46 -44
- package/dist/esm/components/QueryBuilderItem/QueryBuilderItem.js.map +2 -2
- package/dist/esm/components/QueryBuilderRow/QueryBuilderRow.js +86 -69
- package/dist/esm/components/QueryBuilderRow/QueryBuilderRow.js.map +1 -1
- package/dist/esm/components/ToolBarAnimation/ToolBarAnimation.js +2 -2
- package/dist/esm/components/ToolBarAnimation/ToolBarAnimation.js.map +2 -2
- package/package.json +12 -12
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/AndOrController/AndOrController.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable max-len */\nimport React, { Component } from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSTooltip, { TooltipType } from '@elliemae/ds-tooltip';\nimport { PopperInteractions as Interaction, PopperPositions as Position } from '@elliemae/ds-popper';\nimport { DSToggle } from '@elliemae/ds-form';\nimport DSButton from '@elliemae/ds-button';\nimport { ParenthesisRemove, MoreOptionsVert, QueryAdd } from '@elliemae/ds-icons';\nimport { DSIconColors, DSIconSizes } from '@elliemae/ds-icon';\nimport { DELAY_CLOSE, DELAY_OPEN, TOOLBAR_ANIMATION_DURATION } from '../helpers/constants';\nimport { ToolBarAnimation } from '../ToolBarAnimation/ToolBarAnimation';\nimport DragContainerController from '../DragContainerController/DragContainerController';\n\nconst { cssClassName, classNameBlock, classNameElement, mainModifier, classNameBlockModifier } =\n convertPropToCssClassName('query-builder-and-or-controller');\n/**\n * condition-display-step: required to avoid the cache of the trigger\n *\n * @param e\n * @param isOpen\n */\nclass AndOrController extends Component {\n static defaultProps = {\n isMain: false,\n handleRuleContainerOperator: () => null,\n handleRuleContainerUnGroup: () => null,\n handleTooltipGroup: () => null,\n labelOn: 'AND',\n labelOff: 'OR',\n condition: true,\n showDragController: true,\n allowUnGroup: true,\n buttonActionSize: DSIconSizes.M,\n buttonActionType: 'text',\n toogleActionSize: DSIconSizes.S,\n onAddFilter: () => null,\n multipleSize: false,\n delayClose: DELAY_CLOSE,\n delayOpen: DELAY_OPEN,\n step: null,\n toolBarAnimationDuration: TOOLBAR_ANIMATION_DURATION,\n toolBarInteractionType: Interaction.CLICK,\n toolBarPosition: Position.LEFT,\n };\n\n constructor(props) {\n super(props);\n this.contenerRef = React.createRef();\n this.myRef = React.createRef();\n this.state = {\n isOpen: false,\n top: 0,\n right: -2,\n };\n }\n\n handleMouseEnterRow = (e) => {\n this.handleTooltipRow(true);\n // this.handleMouseMove(e)\n };\n\n handleMouseMove = (e) => {\n if (!this.contenerRef.current) return;\n const mouse = e.clientY;\n const { height } = this.contenerRef.current.getBoundingClientRect();\n const delta = height / 2;\n const topDiff = this.myRef.current.getBoundingClientRect().top;\n const refHeight = this.myRef.current.getBoundingClientRect().height;\n\n this.setState({\n top: mouse - topDiff - refHeight / 2 - delta,\n });\n };\n\n handleMouseLeaveRow = () => {\n this.handleTooltipRow(false);\n };\n\n handleTooltipRow = (isOpen) => {\n this.setState({ isOpen });\n const { handleTooltipGroup } = this.props;\n handleTooltipGroup(isOpen);\n };\n\n render() {\n const {\n handleRuleContainerOperator,\n handleRuleContainerUnGroup,\n labelOn,\n labelOff,\n condition,\n showDragController,\n allowUnGroup,\n buttonActionSize,\n buttonActionType,\n toogleActionSize,\n onAddFilter,\n multipleSize,\n delayClose,\n delayOpen,\n step,\n toolBarAnimationDuration,\n toolBarInteractionType,\n toolBarPosition,\n isMain,\n toolTipZIndex,\n } = this.props;\n const { isOpen, top, right } = this.state;\n return (\n <div\n ref={this.myRef}\n className={`${cssClassName} ${mainModifier(condition ? 'active' : 'default')} step-${step} ${isMain ? 'is-main-group-join' : ''\n }`}\n // onMouseEnter={this.handleMouseEnterRow}\n onMouseLeave={this.handleMouseLeaveRow}\n // onMouseMove={this.handleMouseMove}\n >\n <div className={`${classNameBlock('content')} step-${step}`}>\n <DSTooltip\n delayClose={delayClose}\n delayOpen={delayOpen}\n interactionType={toolBarInteractionType}\n isOpen={isOpen}\n onOpen={this.handleTooltipRow}\n placement={toolBarPosition}\n springAnimationComponent={<ToolBarAnimation duration={toolBarAnimationDuration} />}\n step={step}\n title={\n <div\n ref={this.contenerRef}\n className={classNameBlock('actions')}\n style={{\n transition: '0.2s',\n position: 'absolute',\n top: `${top}px`,\n right: `${right}px`,\n }}\n >\n <DSTooltip title=\"Add condition\"\n triggerComponent={<DSButton\n buttonType={buttonActionType}\n className={classNameElement('add-rule')}\n icon={<QueryAdd />}\n onClick={onAddFilter}\n size={buttonActionSize}\n containerProps={{\n 'data-testid': 'query-add-button',\n }}\n />}\n />\n {allowUnGroup && (\n <DSTooltip title=\"Remove group\"\n triggerComponent={<DSButton\n buttonType=\"text\"\n className={classNameElement('ungroup')}\n icon={<ParenthesisRemove />}\n onClick={handleRuleContainerUnGroup}\n size={buttonActionSize}\n containerProps={{\n 'data-testid': 'parenthesis-remove-button',\n }}\n />}\n />\n )}\n <DSToggle\n checked={condition}\n className={classNameElement('and-or-toggle')}\n labelOff={labelOff}\n labelOn={labelOn}\n onChange={(e) => handleRuleContainerOperator(e.target.checked)}\n size={toogleActionSize}\n containerProps={{\n 'data-testid': 'and-or-toggle-button',\n }}\n />\n </div>\n }\n tooltipType={TooltipType.TOOLBAR}\n triggerComponent={\n <div\n className={`${classNameBlock('trigger-controller')} ${showDragController ? classNameBlockModifier('draggable', 'trigger-controller') : ''\n } step-${step}`}\n >\n <div className={classNameElement('condition-display')}>\n <span className={classNameElement('condition-display-label')}>{condition ? labelOn : labelOff}</span>\n <span className={classNameElement('condition-display-step')}>{step}</span>\n <div className=\"separator\" />\n <MoreOptionsVert\n color={DSIconColors.NEUTRAL}\n onClick={this.handleMouseEnterRow}\n size={DSIconSizes.S}\n containerProps={{\n 'data-testid': 'and-or-more-options-button',\n }}\n />\n </div>\n {showDragController && (\n <DragContainerController multipleSize={multipleSize} onClick={this.handleMouseEnterRow} />\n )}\n </div>\n }\n zIndex={toolTipZIndex}\n />\n </div>\n </div>\n );\n }\n}\n\nexport default AndOrController;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAIA,OAAOA,UAAS,iBAAiB;AACjC,SAAS,iCAAiC;AAC1C,OAAO,aAAa,mBAAmB;AACvC,SAAS,sBAAsB,aAAa,mBAAmB,gBAAgB;AAC/E,SAAS,gBAAgB;AACzB,OAAO,cAAc;AACrB,SAAS,mBAAmB,iBAAiB,gBAAgB;AAC7D,SAAS,cAAc,mBAAmB;AAC1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AA,EACd,kBAAkB,YAAY;AAAA,EAC9B,kBAAkB;AAAA,EAClB,kBAAkB,YAAY;AAAA,EAC9B,aAAa,MAAM;AAAA,EACnB,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,MAAM;AAAA,EACN,0BAA0B;AAAA,EAC1B,wBAAwB,YAAY;AAAA,EACpC,iBAAiB,SAAS;AAC5B;AAsKF,IAAO,0BAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
4
4
|
import DSTooltip, { TooltipType } from "@elliemae/ds-tooltip";
|
|
5
5
|
import { PopperInteractions as Interaction, PopperPositions as Position } from "@elliemae/ds-popper";
|
|
@@ -25,71 +25,77 @@ const ConditionController = ({
|
|
|
25
25
|
const { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(
|
|
26
26
|
"query-builder-condition-controller"
|
|
27
27
|
);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
className: cssClassName
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
className: cssClassName,
|
|
30
|
+
children: /* @__PURE__ */ jsx(DSTooltip, {
|
|
31
|
+
delayClose,
|
|
32
|
+
delayOpen,
|
|
33
|
+
interactionType: Interaction.CLICK,
|
|
34
|
+
isOpen,
|
|
35
|
+
onOpen: handleTooltipRow,
|
|
36
|
+
placement: Position.LEFT,
|
|
37
|
+
springAnimationComponent: /* @__PURE__ */ jsx(ToolBarAnimation, {
|
|
38
|
+
duration: TOOLBAR_ANIMATION_DURATION
|
|
39
|
+
}),
|
|
40
|
+
title: /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: classNameBlock("actions"),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(DSTooltip, {
|
|
44
|
+
title: "Remove condition",
|
|
45
|
+
triggerComponent: /* @__PURE__ */ jsx(DSButton, {
|
|
46
|
+
buttonType: buttonActionType,
|
|
47
|
+
className: classNameElement("remove-rule"),
|
|
48
|
+
icon: /* @__PURE__ */ jsx(QueryRemove, {}),
|
|
49
|
+
onClick: onRemoveFilter,
|
|
50
|
+
size: buttonActionSize,
|
|
51
|
+
containerProps: {
|
|
52
|
+
"data-testid": "query-remove-button"
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsx(DSTooltip, {
|
|
57
|
+
title: "Add condition",
|
|
58
|
+
triggerComponent: /* @__PURE__ */ jsx(DSButton, {
|
|
59
|
+
buttonType: buttonActionType,
|
|
60
|
+
className: classNameElement("add-rule"),
|
|
61
|
+
icon: /* @__PURE__ */ jsx(QueryAdd, {}),
|
|
62
|
+
onClick: onAddFilter,
|
|
63
|
+
size: buttonActionSize,
|
|
64
|
+
containerProps: {
|
|
65
|
+
"data-testid": "query-add-button"
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ jsx(DSTooltip, {
|
|
70
|
+
title: "Add group",
|
|
71
|
+
triggerComponent: /* @__PURE__ */ jsx(DSButton, {
|
|
72
|
+
buttonType: buttonActionType,
|
|
73
|
+
className: `${classNameElement("add-rule-container")} no-border-right`,
|
|
74
|
+
icon: /* @__PURE__ */ jsx(ParenthesisAdd, {}),
|
|
75
|
+
onClick: onAddRuleContainer,
|
|
76
|
+
size: buttonActionSize,
|
|
77
|
+
containerProps: {
|
|
78
|
+
"data-testid": "parenthesis-add-button"
|
|
79
|
+
}
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
}),
|
|
84
|
+
tooltipType: TooltipType.TOOLBAR,
|
|
85
|
+
triggerComponent: /* @__PURE__ */ jsx(DSButton, {
|
|
86
|
+
buttonType: buttonTriggerType,
|
|
87
|
+
icon: /* @__PURE__ */ jsx(MoreOptionsVert, {
|
|
88
|
+
color: ["neutral", "500"]
|
|
89
|
+
}),
|
|
90
|
+
onClick: handleTooltipRow,
|
|
91
|
+
size: buttonTriggerSize,
|
|
74
92
|
containerProps: {
|
|
75
|
-
"data-testid": "
|
|
93
|
+
"data-testid": "condition-more-options-button"
|
|
76
94
|
}
|
|
77
|
-
})
|
|
78
|
-
})),
|
|
79
|
-
tooltipType: TooltipType.TOOLBAR,
|
|
80
|
-
triggerComponent: /* @__PURE__ */ React2.createElement(DSButton, {
|
|
81
|
-
buttonType: buttonTriggerType,
|
|
82
|
-
icon: /* @__PURE__ */ React2.createElement(MoreOptionsVert, {
|
|
83
|
-
color: ["neutral", "500"]
|
|
84
95
|
}),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"data-testid": "condition-more-options-button"
|
|
89
|
-
}
|
|
90
|
-
}),
|
|
91
|
-
zIndex: toolTipZIndex
|
|
92
|
-
}));
|
|
96
|
+
zIndex: toolTipZIndex
|
|
97
|
+
})
|
|
98
|
+
});
|
|
93
99
|
};
|
|
94
100
|
var ConditionController_default = ConditionController;
|
|
95
101
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/ConditionController/ConditionController.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSTooltip, { TooltipType } from '@elliemae/ds-tooltip';\nimport { PopperInteractions as Interaction, PopperPositions as Position } from '@elliemae/ds-popper';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport { QueryRemove, MoreOptionsVert, QueryAdd, ParenthesisAdd } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { ToolBarAnimation } from '../ToolBarAnimation/ToolBarAnimation';\nimport { DELAY_CLOSE, DELAY_OPEN, TOOLBAR_ANIMATION_DURATION } from '../helpers/constants';\n\nconst ConditionController = ({\n onAddFilter = () => null,\n onAddRuleContainer = () => null,\n onRemoveFilter = () => null,\n handleTooltipRow = () => null,\n buttonTriggerSize = DSIconSizes.M,\n buttonTriggerType = 'text',\n buttonActionSize = DSIconSizes.M,\n buttonActionType = 'text',\n delayClose = DELAY_CLOSE,\n delayOpen = DELAY_OPEN,\n isOpen = false,\n toolTipZIndex,\n}) => {\n const { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(\n 'query-builder-condition-controller',\n );\n return (\n <div className={cssClassName}>\n <DSTooltip\n delayClose={delayClose}\n delayOpen={delayOpen}\n interactionType={Interaction.CLICK}\n isOpen={isOpen}\n onOpen={handleTooltipRow}\n placement={Position.LEFT}\n springAnimationComponent={<ToolBarAnimation duration={TOOLBAR_ANIMATION_DURATION} />}\n title={\n <div className={classNameBlock('actions')}>\n <DSTooltip title=\"Remove condition\"\n triggerComponent={<DSButton\n buttonType={buttonActionType}\n className={classNameElement('remove-rule')}\n icon={<QueryRemove />}\n onClick={onRemoveFilter}\n size={buttonActionSize}\n containerProps={{\n 'data-testid': 'query-remove-button',\n }}\n />}\n />\n\n <DSTooltip title=\"Add condition\"\n triggerComponent={<DSButton\n buttonType={buttonActionType}\n className={classNameElement('add-rule')}\n icon={<QueryAdd />}\n onClick={onAddFilter}\n size={buttonActionSize}\n containerProps={{\n 'data-testid': 'query-add-button',\n }}\n />}\n />\n\n <DSTooltip title=\"Add group\"\n triggerComponent={<DSButton\n buttonType={buttonActionType}\n className={`${classNameElement('add-rule-container')} no-border-right`}\n icon={<ParenthesisAdd />}\n onClick={onAddRuleContainer}\n size={buttonActionSize}\n containerProps={{\n 'data-testid': 'parenthesis-add-button',\n }}\n />}\n />\n\n </div>\n }\n tooltipType={TooltipType.TOOLBAR}\n triggerComponent={\n <DSButton\n buttonType={buttonTriggerType}\n icon={<MoreOptionsVert color={['neutral', '500']} />}\n onClick={handleTooltipRow}\n size={buttonTriggerSize}\n containerProps={{\n 'data-testid': 'condition-more-options-button',\n }}\n />\n }\n zIndex={toolTipZIndex}\n />\n </div>\n );\n};\n\nexport default ConditionController;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAS,iCAAiC;AAC1C,OAAO,aAAa,mBAAmB;AACvC,SAAS,sBAAsB,aAAa,mBAAmB,gBAAgB;AAC/E,SAAS,mBAAmB;AAC5B,SAAS,aAAa,iBAAiB,UAAU,sBAAsB;AACvE,OAAO,cAAc;AACrB,SAAS,wBAAwB;AACjC,SAAS,aAAa,YAAY,kCAAkC;AAEpE,MAAM,sBAAsB,CAAC;AAAA,EAC3B,cAAc,MAAM;AAAA,EACpB,qBAAqB,MAAM;AAAA,EAC3B,iBAAiB,MAAM;AAAA,EACvB,mBAAmB,MAAM;AAAA,EACzB,oBAAoB,YAAY;AAAA,EAChC,oBAAoB;AAAA,EACpB,mBAAmB,YAAY;AAAA,EAC/B,mBAAmB;AAAA,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BACE,oBAAC;AAAA,QACC,YAAY;AAAA,QACZ,MAAM,oBAAC;AAAA,UAAgB,OAAO,CAAC,WAAW,KAAK;AAAA,SAAG;AAAA,QAClD,SAAS;AAAA,QACT,MAAM;AAAA,QACN,gBAAgB;AAAA,UACd,eAAe;AAAA,QACjB;AAAA,OACF;AAAA,MAEF,QAAQ;AAAA,KACV;AAAA,GACF;AAEJ;AAEA,IAAO,8BAAQ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Component } from "react";
|
|
3
4
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
5
|
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
5
6
|
import { DSAccordion, DSAccordionItem } from "@elliemae/ds-accordion";
|
|
@@ -21,38 +22,52 @@ class DisplayOutput extends Component {
|
|
|
21
22
|
render() {
|
|
22
23
|
const { show } = this.state;
|
|
23
24
|
const { showLabel, hideLabel, displayFixedOutput } = this.props;
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
return /* @__PURE__ */ jsx(QueryBuilderContext.Consumer, {
|
|
26
|
+
children: ({ format }) => {
|
|
27
|
+
let display = "";
|
|
28
|
+
try {
|
|
29
|
+
display = typeof format === "object" ? JSON.stringify(format) : format;
|
|
30
|
+
} catch (e) {
|
|
31
|
+
display = e;
|
|
32
|
+
}
|
|
33
|
+
if (displayFixedOutput) {
|
|
34
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: cssClassName,
|
|
36
|
+
"data-testid": "qb-fixed-output-wrapper",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Grid, {
|
|
39
|
+
p: "xxs",
|
|
40
|
+
children: /* @__PURE__ */ jsx("strong", {
|
|
41
|
+
"data-testid": "qb-fixed-output-label",
|
|
42
|
+
children: displayFixedOutput
|
|
43
|
+
})
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx(Grid, {
|
|
46
|
+
pl: "xxs",
|
|
47
|
+
pr: "xxs",
|
|
48
|
+
"data-testid": "qb-fixed-output-content",
|
|
49
|
+
children: display
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
55
|
className: cssClassName,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
children: /* @__PURE__ */ jsx(DSAccordion, {
|
|
57
|
+
activeValue: show,
|
|
58
|
+
onChange: this.handleChange,
|
|
59
|
+
children: /* @__PURE__ */ jsx(DSAccordionItem, {
|
|
60
|
+
iconClosed: ChevronRight,
|
|
61
|
+
iconOpened: ChevronDown,
|
|
62
|
+
title: show ? hideLabel : showLabel,
|
|
63
|
+
value: true,
|
|
64
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
65
|
+
children: display
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
});
|
|
44
70
|
}
|
|
45
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
46
|
-
className: cssClassName
|
|
47
|
-
}, /* @__PURE__ */ React2.createElement(DSAccordion, {
|
|
48
|
-
activeValue: show,
|
|
49
|
-
onChange: this.handleChange
|
|
50
|
-
}, /* @__PURE__ */ React2.createElement(DSAccordionItem, {
|
|
51
|
-
iconClosed: ChevronRight,
|
|
52
|
-
iconOpened: ChevronDown,
|
|
53
|
-
title: show ? hideLabel : showLabel,
|
|
54
|
-
value: true
|
|
55
|
-
}, /* @__PURE__ */ React2.createElement("div", null, display))));
|
|
56
71
|
});
|
|
57
72
|
}
|
|
58
73
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/DisplayOutput/DisplayOutput.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSAccordion, DSAccordionItem } from '@elliemae/ds-accordion';\nimport { ChevronDown, ChevronRight } from '@elliemae/ds-icons';\nimport { QueryBuilderContext } from '../QueryBuilderContext/QueryBuilderContext';\n\nconst { cssClassName } = convertPropToCssClassName('query-builder-output');\n\nclass DisplayOutput extends Component {\n constructor(props) {\n super(props);\n this.state = {\n show: props.show,\n };\n }\n\n handleChange = () => {\n this.setState(({ show }) => ({\n show: !show,\n }));\n };\n\n render() {\n const { show } = this.state;\n const { showLabel, hideLabel, displayFixedOutput } = this.props;\n return (\n <QueryBuilderContext.Consumer>\n {({ format }) => {\n let display = '';\n try {\n display = typeof format === 'object' ? JSON.stringify(format) : format;\n } catch (e) {\n display = e;\n }\n if (displayFixedOutput) {\n return (\n <div className={cssClassName} data-testid=\"qb-fixed-output-wrapper\">\n <Grid p=\"xxs\">\n <strong data-testid=\"qb-fixed-output-label\">{displayFixedOutput}</strong>\n </Grid>\n <Grid pl=\"xxs\" pr=\"xxs\" data-testid=\"qb-fixed-output-content\">\n {display}\n </Grid>\n </div>\n );\n }\n\n return (\n <div className={cssClassName}>\n <DSAccordion activeValue={show} onChange={this.handleChange}>\n <DSAccordionItem\n iconClosed={ChevronRight}\n iconOpened={ChevronDown}\n title={show ? hideLabel : showLabel}\n value\n >\n <div>{display}</div>\n </DSAccordionItem>\n </DSAccordion>\n </div>\n );\n }}\n </QueryBuilderContext.Consumer>\n );\n }\n}\n\nexport default DisplayOutput;\n"],
|
|
5
|
-
"mappings": "AAAA,Y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AU,KAAK;AAAA,YAC7C,8BAAC;AAAA,cACC,YAAY;AAAA,cACZ,YAAY;AAAA,cACZ,OAAO,OAAO,YAAY;AAAA,cAC1B,OAAK;AAAA,cAEL,8BAAC;AAAA,gBAAK;AAAA,eAAQ;AAAA,aAChB;AAAA,WACF;AAAA,SACF;AAAA,MAEJ;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,IAAO,wBAAQ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
4
4
|
import { DSIconColors, DSIconSizes } from "@elliemae/ds-icon";
|
|
5
5
|
import { MoreOptionsVert, GripperVertical } from "@elliemae/ds-icons";
|
|
@@ -11,23 +11,29 @@ const DragContainerController = ({
|
|
|
11
11
|
onClick
|
|
12
12
|
}) => {
|
|
13
13
|
const { cssClassName } = convertPropToCssClassName("query-builder-drag-group");
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
className: `${cssClassName}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
15
|
+
className: `${cssClassName}`,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
18
|
+
color,
|
|
19
|
+
size
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ jsx("div", {
|
|
22
|
+
className: "separator"
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ jsx(MoreOptionsVert, {
|
|
25
|
+
color,
|
|
26
|
+
onClick,
|
|
27
|
+
size
|
|
28
|
+
}),
|
|
29
|
+
multipleSize && /* @__PURE__ */ jsx(Icon, {
|
|
30
|
+
className: "additional-drag",
|
|
31
|
+
color,
|
|
32
|
+
onClick,
|
|
33
|
+
size
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
31
37
|
};
|
|
32
38
|
var DragContainerController_default = DragContainerController;
|
|
33
39
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/DragContainerController/DragContainerController.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSIconColors, DSIconSizes } from '@elliemae/ds-icon';\nimport { MoreOptionsVert, GripperVertical } from '@elliemae/ds-icons';\n\nconst DragContainerController = ({\n color = DSIconColors.NEUTRAL,\n icon: Icon = GripperVertical,\n size = DSIconSizes.S,\n multipleSize = false,\n onClick,\n}) => {\n const { cssClassName } = convertPropToCssClassName('query-builder-drag-group');\n return (\n <div className={`${cssClassName}`}>\n <Icon color={color} size={size} />\n <div className=\"separator\" />\n <MoreOptionsVert color={color} onClick={onClick} size={size} />\n {multipleSize && <Icon className=\"additional-drag\" color={color} onClick={onClick} size={size} />}\n </div>\n );\n};\nexport default DragContainerController;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,iCAAiC;AAC1C,SAAS,cAAc,mBAAmB;AAC1C,SAAS,iBAAiB,uBAAuB;AAEjD,MAAM,0BAA0B,CAAC;AAAA,EAC/B,QAAQ,aAAa;AAAA,EACrB,MAAM,OAAO;AAAA,EACb,OAAO,YAAY;AAAA,EACnB,eAAe;AAAA,EACf;AACF,MAAM;AACJ,QAAM,EAAE,aAAa,IAAI,0BAA0B,0BAA0B;AAC7E,SACE,qBAAC;AAAA,IAAI,WAAW,GAAG;AAAA,IACjB;AAAA,0BAAC;AAAA,QAAK;AAAA,QAAc;AAAA,OAAY;AAAA,MAChC,oBAAC;AAAA,QAAI,WAAU;AAAA,OAAY;AAAA,MAC3B,oBAAC;AAAA,QAAgB;AAAA,QAAc;AAAA,QAAkB;AAAA,OAAY;AAAA,MAC5D,gBAAgB,oBAAC;AAAA,QAAK,WAAU;AAAA,QAAkB;AAAA,QAAc;AAAA,QAAkB;AAAA,OAAY;AAAA;AAAA,GACjG;AAEJ;AACA,IAAO,kCAAQ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { DSIconSizes } from "@elliemae/ds-icon";
|
|
4
4
|
import { GripperVertical } from "@elliemae/ds-icons";
|
|
5
5
|
const DragControllerRow = ({
|
|
@@ -8,13 +8,14 @@ const DragControllerRow = ({
|
|
|
8
8
|
icon: Icon = GripperVertical,
|
|
9
9
|
size = DSIconSizes.M,
|
|
10
10
|
...rest
|
|
11
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx("div", {
|
|
12
12
|
className,
|
|
13
|
-
...rest
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
13
|
+
...rest,
|
|
14
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
15
|
+
color,
|
|
16
|
+
size
|
|
17
|
+
})
|
|
18
|
+
});
|
|
18
19
|
var DragControllerRow_default = DragControllerRow;
|
|
19
20
|
export {
|
|
20
21
|
DragControllerRow_default as default
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/DragControllerRow/DragControllerRow.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSIconSizes } from '@elliemae/ds-icon';\nimport { GripperVertical } from '@elliemae/ds-icons';\n\nconst DragControllerRow = ({\n className = 'drag-controller',\n color = ['neutral', '500'],\n icon: Icon = GripperVertical,\n size = DSIconSizes.M,\n ...rest\n}) => (\n <div className={className} {...rest}>\n <Icon color={color} size={size} />\n </div>\n);\nexport default DragControllerRow;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAEhC,MAAM,oBAAoB,CAAC;AAAA,EACzB,YAAY;AAAA,EACZ,QAAQ,CAAC,WAAW,KAAK;AAAA,EACzB,MAAM,OAAO;AAAA,EACb,OAAO,YAAY;AAAA,KAChB;AACL,MACE,oBAAC;AAAA,EAAI;AAAA,EAAuB,GAAG;AAAA,EAC7B,8BAAC;AAAA,IAAK;AAAA,IAAc;AAAA,GAAY;AAAA,CAClC;AAEF,IAAO,4BAAQ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { DSTextBox, DSComboBox } from "@elliemae/ds-form";
|
|
4
4
|
const FieldControllerRow = ({
|
|
5
5
|
className = "",
|
|
@@ -7,18 +7,22 @@ const FieldControllerRow = ({
|
|
|
7
7
|
options = [],
|
|
8
8
|
value = "",
|
|
9
9
|
type = "DSComboBox"
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
-
className
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
}) => /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className,
|
|
12
|
+
children: [
|
|
13
|
+
type === "DSComboBox" && /* @__PURE__ */ jsx(DSComboBox, {
|
|
14
|
+
onChange,
|
|
15
|
+
options,
|
|
16
|
+
value
|
|
17
|
+
}),
|
|
18
|
+
type === "DSTextBox" && /* @__PURE__ */ jsx(DSTextBox, {
|
|
19
|
+
fluidWidth: true,
|
|
20
|
+
onChange,
|
|
21
|
+
options,
|
|
22
|
+
value
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
});
|
|
22
26
|
var FieldControllerRow_default = FieldControllerRow;
|
|
23
27
|
export {
|
|
24
28
|
FieldControllerRow_default as default
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/FieldControllerRow/FieldControllerRow.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSTextBox, DSComboBox } from '@elliemae/ds-form';\n\nconst FieldControllerRow = ({\n className = '',\n onChange = () => null,\n options = [],\n value = '',\n type = 'DSComboBox',\n}) => (\n <div className={className}>\n {type === 'DSComboBox' && <DSComboBox onChange={onChange} options={options} value={value} />}\n {type === 'DSTextBox' && <DSTextBox fluidWidth onChange={onChange} options={options} value={value} />}\n </div>\n);\nexport default FieldControllerRow;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,WAAW,kBAAkB;AAEtC,MAAM,qBAAqB,CAAC;AAAA,EAC1B,YAAY;AAAA,EACZ,WAAW,MAAM;AAAA,EACjB,UAAU,CAAC;AAAA,EACX,QAAQ;AAAA,EACR,OAAO;AACT,MACE,qBAAC;AAAA,EAAI;AAAA,EACF;AAAA,aAAS,gBAAgB,oBAAC;AAAA,MAAW;AAAA,MAAoB;AAAA,MAAkB;AAAA,KAAc;AAAA,IACzF,SAAS,eAAe,oBAAC;AAAA,MAAU,YAAU;AAAA,MAAC;AAAA,MAAoB;AAAA,MAAkB;AAAA,KAAc;AAAA;AAAA,CACrG;AAEF,IAAO,6BAAQ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Component } from "react";
|
|
3
4
|
import PropTypes from "prop-types";
|
|
4
5
|
import cn from "classnames";
|
|
5
6
|
import { listWithChildren } from "@elliemae/ds-shared";
|
|
@@ -169,16 +170,18 @@ class Nestable extends Component {
|
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
172
|
const options = this.getItemOptions();
|
|
172
|
-
return /* @__PURE__ */
|
|
173
|
-
className: "nestable-drag-layer"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
173
|
+
return /* @__PURE__ */ jsx("div", {
|
|
174
|
+
className: "nestable-drag-layer",
|
|
175
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
176
|
+
className: "nestable-list",
|
|
177
|
+
style: listStyles,
|
|
178
|
+
children: /* @__PURE__ */ jsx(NestableItem, {
|
|
179
|
+
isCopy: true,
|
|
180
|
+
item: dragItem,
|
|
181
|
+
options
|
|
182
|
+
})
|
|
183
|
+
})
|
|
184
|
+
});
|
|
182
185
|
}
|
|
183
186
|
render() {
|
|
184
187
|
const { items, dragItem } = this.state;
|
|
@@ -190,23 +193,27 @@ class Nestable extends Component {
|
|
|
190
193
|
childClass = "empty";
|
|
191
194
|
else if (childLength > 1)
|
|
192
195
|
childClass = "multiple";
|
|
193
|
-
return /* @__PURE__ */
|
|
196
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
194
197
|
className: cn("nestable", `nestable-${group}`, {
|
|
195
198
|
"is-drag-active": dragItem
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
199
|
+
}),
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ jsx("ol", {
|
|
202
|
+
className: `nestable-list nestable-group nestable-child-count-${childClass}`,
|
|
203
|
+
children: items.map((item, i) => /* @__PURE__ */ jsx(NestableItem, {
|
|
204
|
+
index: i,
|
|
205
|
+
isAndItem,
|
|
206
|
+
isDraggableItem,
|
|
207
|
+
isOrItem,
|
|
208
|
+
item,
|
|
209
|
+
options,
|
|
210
|
+
setDraggableItems,
|
|
211
|
+
singleRow
|
|
212
|
+
}, item.id))
|
|
213
|
+
}),
|
|
214
|
+
dragItem && this.renderDragLayer()
|
|
215
|
+
]
|
|
216
|
+
});
|
|
210
217
|
}
|
|
211
218
|
}
|
|
212
219
|
Nestable.defaultProps = {
|