@elliemae/ds-query-builder 2.2.0 → 2.3.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSQueryBuilder.js +117 -97
- package/cjs/DSQueryBuilder.js.map +7 -0
- package/cjs/components/AndOrController/AndOrController.js +148 -162
- package/cjs/components/AndOrController/AndOrController.js.map +7 -0
- package/cjs/components/ConditionController/ConditionController.js +88 -72
- package/cjs/components/ConditionController/ConditionController.js.map +7 -0
- package/cjs/components/DisplayOutput/DisplayOutput.js +67 -64
- package/cjs/components/DisplayOutput/DisplayOutput.js.map +7 -0
- package/cjs/components/DragContainerController/DragContainerController.js +61 -41
- package/cjs/components/DragContainerController/DragContainerController.js.map +7 -0
- package/cjs/components/DragControllerRow/DragControllerRow.js +50 -46
- package/cjs/components/DragControllerRow/DragControllerRow.js.map +7 -0
- package/cjs/components/FieldControllerRow/FieldControllerRow.js +54 -32
- package/cjs/components/FieldControllerRow/FieldControllerRow.js.map +7 -0
- package/cjs/components/Nestable/Nestable.js +143 -209
- package/cjs/components/Nestable/Nestable.js.map +7 -0
- package/cjs/components/Nestable/NestableItem.js +98 -90
- package/cjs/components/Nestable/NestableItem.js.map +7 -0
- package/cjs/components/Nestable/actions/events.js +72 -95
- package/cjs/components/Nestable/actions/events.js.map +7 -0
- package/cjs/components/Nestable/actions/getItemOptions.js +36 -15
- package/cjs/components/Nestable/actions/getItemOptions.js.map +7 -0
- package/cjs/components/Nestable/actions/getPaths.js +46 -51
- package/cjs/components/Nestable/actions/getPaths.js.map +7 -0
- package/cjs/components/Nestable/actions/index.js +42 -28
- package/cjs/components/Nestable/actions/index.js.map +7 -0
- package/cjs/components/Nestable/actions/moveItem.js +44 -42
- package/cjs/components/Nestable/actions/moveItem.js.map +7 -0
- package/cjs/components/Nestable/actions/paths.js +48 -55
- package/cjs/components/Nestable/actions/paths.js.map +7 -0
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js +39 -23
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js.map +7 -0
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js +39 -26
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js.map +7 -0
- package/cjs/components/Nestable/index.js +36 -7
- package/cjs/components/Nestable/index.js.map +7 -0
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js +36 -13
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js.map +7 -0
- package/cjs/components/QueryBuilderImpl.js +118 -202
- package/cjs/components/QueryBuilderImpl.js.map +7 -0
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js +80 -78
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js.map +7 -0
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +154 -211
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js.map +7 -0
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js +39 -26
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js.map +7 -0
- package/cjs/components/format/format.js +48 -22
- package/cjs/components/format/format.js.map +7 -0
- package/cjs/components/format/sqlFormat.js +69 -48
- package/cjs/components/format/sqlFormat.js.map +7 -0
- package/cjs/components/format/sqlSafeFormat.js +72 -55
- package/cjs/components/format/sqlSafeFormat.js.map +7 -0
- package/cjs/components/format/xmlFormat.js +71 -50
- package/cjs/components/format/xmlFormat.js.map +7 -0
- package/cjs/components/helpers/actions.js +151 -186
- package/cjs/components/helpers/actions.js.map +7 -0
- package/cjs/components/helpers/constants.js +36 -8
- package/cjs/components/helpers/constants.js.map +7 -0
- package/cjs/components/helpers/dependencies.js +49 -64
- package/cjs/components/helpers/dependencies.js.map +7 -0
- package/cjs/components/helpers/selectors.js +161 -101
- package/cjs/components/helpers/selectors.js.map +7 -0
- package/cjs/components/helpers/store.js +86 -104
- package/cjs/components/helpers/store.js.map +7 -0
- package/cjs/components/helpers/types.js +72 -44
- package/cjs/components/helpers/types.js.map +7 -0
- package/cjs/index.js +36 -29
- package/cjs/index.js.map +7 -0
- package/cjs/propTypes.js +102 -94
- package/cjs/propTypes.js.map +7 -0
- package/esm/DSQueryBuilder.js +103 -72
- package/esm/DSQueryBuilder.js.map +7 -0
- package/esm/components/AndOrController/AndOrController.js +113 -147
- package/esm/components/AndOrController/AndOrController.js.map +7 -0
- package/esm/components/ConditionController/ConditionController.js +57 -62
- package/esm/components/ConditionController/ConditionController.js.map +7 -0
- package/esm/components/DisplayOutput/DisplayOutput.js +35 -55
- package/esm/components/DisplayOutput/DisplayOutput.js.map +7 -0
- package/esm/components/DragContainerController/DragContainerController.js +32 -35
- package/esm/components/DragContainerController/DragContainerController.js.map +7 -0
- package/esm/components/DragControllerRow/DragControllerRow.js +21 -38
- package/esm/components/DragControllerRow/DragControllerRow.js.map +7 -0
- package/esm/components/FieldControllerRow/FieldControllerRow.js +25 -26
- package/esm/components/FieldControllerRow/FieldControllerRow.js.map +7 -0
- package/esm/components/Nestable/Nestable.js +115 -186
- package/esm/components/Nestable/Nestable.js.map +7 -0
- package/esm/components/Nestable/NestableItem.js +69 -82
- package/esm/components/Nestable/NestableItem.js.map +7 -0
- package/esm/components/Nestable/actions/events.js +45 -79
- package/esm/components/Nestable/actions/events.js.map +7 -0
- package/esm/components/Nestable/actions/getItemOptions.js +7 -11
- package/esm/components/Nestable/actions/getItemOptions.js.map +7 -0
- package/esm/components/Nestable/actions/getPaths.js +17 -43
- package/esm/components/Nestable/actions/getPaths.js.map +7 -0
- package/esm/components/Nestable/actions/index.js +13 -6
- package/esm/components/Nestable/actions/index.js.map +7 -0
- package/esm/components/Nestable/actions/moveItem.js +13 -31
- package/esm/components/Nestable/actions/moveItem.js.map +7 -0
- package/esm/components/Nestable/actions/paths.js +19 -47
- package/esm/components/Nestable/actions/paths.js.map +7 -0
- package/esm/components/Nestable/actions/tryDecreaseDepth.js +10 -19
- package/esm/components/Nestable/actions/tryDecreaseDepth.js.map +7 -0
- package/esm/components/Nestable/actions/tryIncreaseDepth.js +10 -22
- package/esm/components/Nestable/actions/tryIncreaseDepth.js.map +7 -0
- package/esm/components/Nestable/index.js +7 -2
- package/esm/components/Nestable/index.js.map +7 -0
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js +7 -5
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js.map +7 -0
- package/esm/components/QueryBuilderImpl.js +82 -187
- package/esm/components/QueryBuilderImpl.js.map +7 -0
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js +50 -70
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js.map +7 -0
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js +123 -201
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js.map +7 -0
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js +10 -17
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js.map +7 -0
- package/esm/components/format/format.js +16 -17
- package/esm/components/format/format.js.map +7 -0
- package/esm/components/format/sqlFormat.js +39 -43
- package/esm/components/format/sqlFormat.js.map +7 -0
- package/esm/components/format/sqlSafeFormat.js +43 -50
- package/esm/components/format/sqlSafeFormat.js.map +7 -0
- package/esm/components/format/xmlFormat.js +41 -45
- package/esm/components/format/xmlFormat.js.map +7 -0
- package/esm/components/helpers/actions.js +123 -160
- package/esm/components/helpers/actions.js.map +7 -0
- package/esm/components/helpers/constants.js +7 -2
- package/esm/components/helpers/constants.js.map +7 -0
- package/esm/components/helpers/dependencies.js +19 -39
- package/esm/components/helpers/dependencies.js.map +7 -0
- package/esm/components/helpers/selectors.js +132 -93
- package/esm/components/helpers/selectors.js.map +7 -0
- package/esm/components/helpers/store.js +54 -82
- package/esm/components/helpers/store.js.map +7 -0
- package/esm/components/helpers/types.js +44 -33
- package/esm/components/helpers/types.js.map +7 -0
- package/esm/index.js +7 -4
- package/esm/index.js.map +7 -0
- package/esm/propTypes.js +55 -72
- package/esm/propTypes.js.map +7 -0
- package/package.json +12 -12
|
@@ -1,187 +1,138 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var QueryBuilderRow_exports = {};
|
|
29
|
+
__export(QueryBuilderRow_exports, {
|
|
30
|
+
default: () => QueryBuilderRow_default
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
35
|
+
var import_ds_tooltip = require("@elliemae/ds-tooltip");
|
|
36
|
+
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
37
|
+
var import_dependencies = require("../helpers/dependencies");
|
|
38
|
+
var import_ConditionController = __toESM(require("../ConditionController/ConditionController"));
|
|
39
|
+
var import_DragControllerRow = __toESM(require("../DragControllerRow/DragControllerRow"));
|
|
40
|
+
const RenderField = ({
|
|
41
|
+
target,
|
|
42
|
+
component,
|
|
43
|
+
valueProp,
|
|
44
|
+
additionalInfo,
|
|
45
|
+
handleMouseEnterInput,
|
|
46
|
+
handleMouseLeaveInput,
|
|
47
|
+
onChangeHandler,
|
|
48
|
+
hasError
|
|
49
|
+
}) => {
|
|
50
|
+
const ref = import_react.default.useRef();
|
|
51
|
+
const id = import_react.default.useMemo(() => `el_${String.fromCharCode(65 + Math.floor(Math.random() * 26))}`, []);
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
53
|
+
className: `em-ds-query-builder-row-input child-type-${target} ${hasError && hasError.error ? "row-input-error" : ""}`,
|
|
47
54
|
onMouseDownCapture: () => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const _refInput = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelector("#".concat(id));
|
|
52
|
-
|
|
53
|
-
if (_refInput && _refInput.focus) setTimeout(_refInput.focus());
|
|
55
|
+
const _refInput = ref.current?.querySelector(`#${id}`);
|
|
56
|
+
if (_refInput && _refInput.focus)
|
|
57
|
+
setTimeout(_refInput.focus());
|
|
54
58
|
handleMouseEnterInput();
|
|
55
59
|
},
|
|
56
60
|
onMouseEnter: () => handleMouseEnterInput(),
|
|
57
61
|
onMouseLeave: () => handleMouseLeaveInput()
|
|
58
|
-
},
|
|
59
|
-
ref
|
|
60
|
-
className: "em-ds-query-builder-row__input-controller"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
width: '40px'
|
|
72
|
-
}
|
|
73
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](DSTooltip.DSTooltipV3, {
|
|
62
|
+
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
63
|
+
ref,
|
|
64
|
+
className: "em-ds-query-builder-row__input-controller"
|
|
65
|
+
}, import_react.default.cloneElement(component, {
|
|
66
|
+
id,
|
|
67
|
+
onChange: (e, extraData) => onChangeHandler(e, target, extraData),
|
|
68
|
+
value: valueProp != null ? valueProp : "",
|
|
69
|
+
checked: valueProp === true,
|
|
70
|
+
additionalInfo: additionalInfo ? additionalInfo[target] : additionalInfo || {},
|
|
71
|
+
"aria-invalid": Boolean(hasError)
|
|
72
|
+
})), hasError && hasError.errorMessage ? /* @__PURE__ */ import_react.default.createElement("div", {
|
|
73
|
+
style: { width: "40px" }
|
|
74
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ds_tooltip.DSTooltipV3, {
|
|
74
75
|
text: hasError.errorMessage
|
|
75
|
-
},
|
|
76
|
+
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
76
77
|
tabIndex: 0,
|
|
77
78
|
className: "row-icon-alert",
|
|
78
79
|
"data-testid": "qb-error-state-icon",
|
|
79
80
|
role: "alert"
|
|
80
|
-
},
|
|
81
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.AlertsDetail, {
|
|
81
82
|
width: 20,
|
|
82
83
|
height: 20,
|
|
83
|
-
color: [
|
|
84
|
+
color: ["danger", 900],
|
|
84
85
|
title: hasError.errorMessage
|
|
85
|
-
})))) : null);
|
|
86
|
-
// () => (
|
|
87
|
-
// <div
|
|
88
|
-
// className={`em-ds-query-builder-row-input child-type-${target}`}
|
|
89
|
-
// onMouseDownCapture={() => {
|
|
90
|
-
// // eslint-disable-next-line no-underscore-dangle
|
|
91
|
-
// const _refInput = ref.current.querySelector(`#${id}`);
|
|
92
|
-
// if (_refInput && _refInput.focus) setTimeout(_refInput.focus());
|
|
93
|
-
// handleMouseEnterInput();
|
|
94
|
-
// }}
|
|
95
|
-
// onMouseEnter={() => handleMouseEnterInput()}
|
|
96
|
-
// onMouseLeave={() => handleMouseLeaveInput()}
|
|
97
|
-
// >
|
|
98
|
-
// <div ref={ref} className="em-ds-query-builder-row__input-controller">
|
|
99
|
-
// {React.cloneElement(component, {
|
|
100
|
-
// id,
|
|
101
|
-
// onChange: (e, extraData) => onChangeHandler(e, target, extraData),
|
|
102
|
-
// value: valueProp != null ? valueProp : '',
|
|
103
|
-
// checked: valueProp === true,
|
|
104
|
-
// additionalInfo: additionalInfo ? additionalInfo[target] : {},
|
|
105
|
-
// })}
|
|
106
|
-
// </div>
|
|
107
|
-
// </div>
|
|
108
|
-
// ),
|
|
109
|
-
// [target, component, valueProp, additionalInfo],
|
|
110
|
-
// );
|
|
86
|
+
})))) : null);
|
|
111
87
|
};
|
|
112
|
-
|
|
113
|
-
class QueryBuilderRow extends React.Component {
|
|
88
|
+
class QueryBuilderRow extends import_react.Component {
|
|
114
89
|
constructor(props) {
|
|
115
90
|
super(props);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
91
|
+
this.handleMouseEnterRow = () => {
|
|
92
|
+
};
|
|
119
93
|
this.handleMouseLeaveRow = () => {
|
|
120
94
|
this.handleTooltipRow(false);
|
|
121
95
|
};
|
|
122
|
-
|
|
123
96
|
this.handleMouseEnterInput = () => {
|
|
124
|
-
const {
|
|
125
|
-
setDraggableItems
|
|
126
|
-
} = this.props;
|
|
97
|
+
const { setDraggableItems } = this.props;
|
|
127
98
|
setDraggableItems(false);
|
|
128
99
|
};
|
|
129
|
-
|
|
130
100
|
this.handleMouseLeaveInput = () => {
|
|
131
|
-
const {
|
|
132
|
-
setDraggableItems
|
|
133
|
-
} = this.props;
|
|
101
|
+
const { setDraggableItems } = this.props;
|
|
134
102
|
setDraggableItems(true);
|
|
135
103
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
this.setState({
|
|
139
|
-
isOpen
|
|
140
|
-
});
|
|
104
|
+
this.handleTooltipRow = (isOpen) => {
|
|
105
|
+
this.setState({ isOpen });
|
|
141
106
|
};
|
|
142
|
-
|
|
143
107
|
this.state = {
|
|
144
108
|
isOpen: false
|
|
145
109
|
};
|
|
146
110
|
}
|
|
147
|
-
|
|
148
111
|
onChangeHandler(e, target, extraData, hasError) {
|
|
149
|
-
const {
|
|
150
|
-
handleFieldChange,
|
|
151
|
-
idFilter,
|
|
152
|
-
idGroup,
|
|
153
|
-
additionalInfo,
|
|
154
|
-
field,
|
|
155
|
-
operator,
|
|
156
|
-
value
|
|
157
|
-
} = this.props;
|
|
112
|
+
const { handleFieldChange, idFilter, idGroup, additionalInfo, field, operator, value } = this.props;
|
|
158
113
|
let eventValue = e;
|
|
159
|
-
|
|
160
114
|
if (e && e.target) {
|
|
161
|
-
const {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
115
|
+
const { value: value2, checked } = e.target;
|
|
116
|
+
if (value2 || value2 === "" || typeof value2 === "boolean")
|
|
117
|
+
eventValue = value2;
|
|
118
|
+
else
|
|
119
|
+
eventValue = checked || e;
|
|
166
120
|
}
|
|
167
|
-
|
|
168
121
|
handleFieldChange({
|
|
169
122
|
[target]: eventValue,
|
|
170
123
|
idFilter,
|
|
171
124
|
idGroup,
|
|
172
|
-
additionalInfo:
|
|
125
|
+
additionalInfo: {
|
|
126
|
+
...additionalInfo,
|
|
173
127
|
[target]: extraData,
|
|
174
|
-
[
|
|
175
|
-
[
|
|
176
|
-
}
|
|
128
|
+
[`${target}_error`]: hasError,
|
|
129
|
+
[`${target}_touched`]: true
|
|
130
|
+
},
|
|
177
131
|
target
|
|
178
132
|
});
|
|
179
133
|
}
|
|
180
|
-
|
|
181
134
|
render() {
|
|
182
|
-
const {
|
|
183
|
-
isOpen
|
|
184
|
-
} = this.state;
|
|
135
|
+
const { isOpen } = this.state;
|
|
185
136
|
const {
|
|
186
137
|
fields,
|
|
187
138
|
onAddFilter,
|
|
@@ -196,81 +147,73 @@ class QueryBuilderRow extends React.Component {
|
|
|
196
147
|
toolTipZIndex,
|
|
197
148
|
error
|
|
198
149
|
} = this.props;
|
|
199
|
-
const {
|
|
200
|
-
|
|
201
|
-
classNameBlock,
|
|
202
|
-
classNameElement
|
|
203
|
-
} = dsClassnames.convertPropToCssClassName('query-builder-row', isOpen ? 'has-open-tooltip' : 'has-close-tooltip', singleRow ? 'is-single-row' : 'is-multiple-row');
|
|
204
|
-
const test = dependencies.resolveDependencies({
|
|
150
|
+
const { cssClassName, classNameBlock, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)("query-builder-row", isOpen ? "has-open-tooltip" : "has-close-tooltip", singleRow ? "is-single-row" : "is-multiple-row");
|
|
151
|
+
const test = (0, import_dependencies.resolveDependencies)({
|
|
205
152
|
field,
|
|
206
153
|
operator,
|
|
207
154
|
value,
|
|
208
155
|
additionalInfo
|
|
209
156
|
}, fields);
|
|
210
|
-
const gridTemplateColumns = [
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return 'minmax(0, 1fr)';
|
|
221
|
-
}), '30px'].join(' ');
|
|
222
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
223
|
-
children: /*#__PURE__*/_jsx__default["default"]("div", {
|
|
224
|
-
className: cssClassName,
|
|
225
|
-
onMouseEnter: this.handleMouseEnterRow,
|
|
226
|
-
onMouseLeave: this.handleMouseLeaveRow,
|
|
227
|
-
style: {
|
|
228
|
-
gridTemplateColumns
|
|
157
|
+
const gridTemplateColumns = [
|
|
158
|
+
"24px",
|
|
159
|
+
...test.map((r) => {
|
|
160
|
+
if (r.handleWidth) {
|
|
161
|
+
return r.handleWidth(this.props[r.target], {
|
|
162
|
+
field,
|
|
163
|
+
operator,
|
|
164
|
+
value,
|
|
165
|
+
additionalInfo
|
|
166
|
+
});
|
|
229
167
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
168
|
+
return "minmax(0, 1fr)";
|
|
169
|
+
}),
|
|
170
|
+
"30px"
|
|
171
|
+
].join(" ");
|
|
172
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
173
|
+
className: cssClassName,
|
|
174
|
+
onMouseEnter: this.handleMouseEnterRow,
|
|
175
|
+
onMouseLeave: this.handleMouseLeaveRow,
|
|
176
|
+
style: {
|
|
177
|
+
gridTemplateColumns
|
|
178
|
+
}
|
|
179
|
+
}, !singleRow && /* @__PURE__ */ import_react.default.createElement(import_DragControllerRow.default, {
|
|
180
|
+
className: classNameElement("drag-controller"),
|
|
181
|
+
onMouseDownCapture: () => this.handleMouseLeaveInput()
|
|
182
|
+
}), test.map((renderField) => {
|
|
183
|
+
const { target, component } = renderField;
|
|
184
|
+
const { [target]: valueProp } = this.props;
|
|
185
|
+
const isTouched = additionalInfo && additionalInfo[`${target}_touched`];
|
|
186
|
+
const hasError = renderField && renderField.validation ? renderField.validation(valueProp, {
|
|
187
|
+
field,
|
|
188
|
+
operator,
|
|
189
|
+
value,
|
|
190
|
+
additionalInfo
|
|
191
|
+
}) : false;
|
|
192
|
+
return /* @__PURE__ */ import_react.default.createElement(RenderField, {
|
|
193
|
+
component,
|
|
194
|
+
target,
|
|
195
|
+
valueProp,
|
|
196
|
+
onChangeHandler: (e, target2, extraData) => {
|
|
197
|
+
this.onChangeHandler(e, target2, extraData, hasError);
|
|
198
|
+
},
|
|
199
|
+
handleMouseEnterInput: this.handleMouseEnterInput,
|
|
200
|
+
handleMouseLeaveInput: this.handleMouseLeaveInput,
|
|
201
|
+
additionalInfo,
|
|
202
|
+
hasError: isTouched && hasError
|
|
203
|
+
});
|
|
204
|
+
}), !singleRow && /* @__PURE__ */ import_react.default.createElement("div", {
|
|
205
|
+
className: classNameBlock("controller")
|
|
206
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ConditionController.default, {
|
|
207
|
+
handleTooltipRow: this.handleTooltipRow,
|
|
208
|
+
isOpen,
|
|
209
|
+
items,
|
|
210
|
+
onAddFilter,
|
|
211
|
+
onAddRuleContainer,
|
|
212
|
+
onRemoveFilter,
|
|
213
|
+
toolTipZIndex
|
|
214
|
+
}))));
|
|
272
215
|
}
|
|
273
|
-
|
|
274
216
|
}
|
|
275
|
-
|
|
276
|
-
module.exports =
|
|
217
|
+
var QueryBuilderRow_default = QueryBuilderRow;
|
|
218
|
+
module.exports = __toCommonJS(QueryBuilderRow_exports);
|
|
219
|
+
//# sourceMappingURL=QueryBuilderRow.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/QueryBuilderRow/QueryBuilderRow.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-return */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport React, { Component } from 'react';\nimport { AlertsDetail } from '@elliemae/ds-icons';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { resolveDependencies } from '../helpers/dependencies';\nimport ConditionController from '../ConditionController/ConditionController';\nimport DragControllerRow from '../DragControllerRow/DragControllerRow';\n\nconst RenderField = ({\n target,\n component,\n valueProp,\n additionalInfo,\n handleMouseEnterInput,\n handleMouseLeaveInput,\n onChangeHandler,\n hasError,\n}) => {\n const ref = React.useRef<HTMLElement>();\n const id = React.useMemo(() => `el_${String.fromCharCode(65 + Math.floor(Math.random() * 26))}`, []);\n return (\n <div\n className={`em-ds-query-builder-row-input child-type-${target} ${hasError && hasError.error ? 'row-input-error' : ''\n }`}\n onMouseDownCapture={() => {\n // eslint-disable-next-line no-underscore-dangle\n const _refInput = ref.current?.querySelector(`#${id}`);\n if (_refInput && _refInput.focus) setTimeout(_refInput.focus());\n handleMouseEnterInput();\n }}\n onMouseEnter={() => handleMouseEnterInput()}\n onMouseLeave={() => handleMouseLeaveInput()}\n >\n <div ref={ref} className=\"em-ds-query-builder-row__input-controller\">\n {React.cloneElement(component, {\n id,\n onChange: (e, extraData) => onChangeHandler(e, target, extraData),\n value: valueProp != null ? valueProp : '',\n checked: valueProp === true,\n additionalInfo: additionalInfo ? additionalInfo[target] : additionalInfo || {},\n 'aria-invalid': Boolean(hasError),\n })}\n </div>\n {hasError && hasError.errorMessage ? (\n <div style={{ width: '40px' }}>\n <DSTooltipV3 text={hasError.errorMessage}>\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n <div tabIndex={0} className=\"row-icon-alert\" data-testid=\"qb-error-state-icon\" role=\"alert\">\n <AlertsDetail width={20} height={20} color={['danger', 900]} title={hasError.errorMessage} />\n </div>\n </DSTooltipV3>\n </div>\n ) : null}\n </div>\n );\n // return React.useMemo(\n // () => (\n // <div\n // className={`em-ds-query-builder-row-input child-type-${target}`}\n // onMouseDownCapture={() => {\n // // eslint-disable-next-line no-underscore-dangle\n // const _refInput = ref.current.querySelector(`#${id}`);\n // if (_refInput && _refInput.focus) setTimeout(_refInput.focus());\n // handleMouseEnterInput();\n // }}\n // onMouseEnter={() => handleMouseEnterInput()}\n // onMouseLeave={() => handleMouseLeaveInput()}\n // >\n // <div ref={ref} className=\"em-ds-query-builder-row__input-controller\">\n // {React.cloneElement(component, {\n // id,\n // onChange: (e, extraData) => onChangeHandler(e, target, extraData),\n // value: valueProp != null ? valueProp : '',\n // checked: valueProp === true,\n // additionalInfo: additionalInfo ? additionalInfo[target] : {},\n // })}\n // </div>\n // </div>\n // ),\n // [target, component, valueProp, additionalInfo],\n // );\n};\nclass QueryBuilderRow extends Component<any, any> {\n constructor(props: any) {\n super(props);\n this.state = {\n isOpen: false,\n };\n }\n\n onChangeHandler(e, target, extraData, hasError) {\n const { handleFieldChange, idFilter, idGroup, additionalInfo, field, operator, value } = this.props;\n let eventValue = e;\n if (e && e.target) {\n const { value, checked } = e.target;\n if (value || value === '' || typeof value === 'boolean') eventValue = value;\n else eventValue = checked || e;\n }\n handleFieldChange({\n [target]: eventValue,\n idFilter,\n idGroup,\n additionalInfo: {\n ...additionalInfo,\n [target]: extraData,\n [`${target}_error`]: hasError,\n [`${target}_touched`]: true,\n },\n target,\n });\n }\n\n handleMouseEnterRow = () => { };\n\n handleMouseLeaveRow = () => {\n this.handleTooltipRow(false);\n };\n\n handleMouseEnterInput = () => {\n const { setDraggableItems } = this.props;\n setDraggableItems(false);\n };\n\n handleMouseLeaveInput = () => {\n const { setDraggableItems } = this.props;\n setDraggableItems(true);\n };\n\n handleTooltipRow = (isOpen) => {\n this.setState({ isOpen });\n };\n\n render() {\n const { isOpen } = this.state;\n const {\n fields,\n onAddFilter,\n onRemoveFilter,\n onAddRuleContainer,\n field,\n operator,\n value,\n additionalInfo,\n items,\n singleRow,\n toolTipZIndex,\n error,\n } = this.props;\n const { cssClassName, classNameBlock, classNameElement } = convertPropToCssClassName(\n 'query-builder-row',\n isOpen ? 'has-open-tooltip' : 'has-close-tooltip',\n singleRow ? 'is-single-row' : 'is-multiple-row',\n );\n const test = resolveDependencies(\n {\n field,\n operator,\n value,\n additionalInfo,\n },\n fields,\n );\n\n const gridTemplateColumns = [\n '24px',\n ...test.map((r) => {\n if (r.handleWidth) {\n return r.handleWidth(this.props[r.target], {\n field,\n operator,\n value,\n additionalInfo,\n });\n }\n return 'minmax(0, 1fr)';\n }),\n '30px',\n ].join(' ');\n\n return (\n <>\n <div\n className={cssClassName}\n onMouseEnter={this.handleMouseEnterRow}\n onMouseLeave={this.handleMouseLeaveRow}\n style={{\n gridTemplateColumns,\n }}\n >\n {!singleRow && (\n <DragControllerRow\n className={classNameElement('drag-controller')}\n onMouseDownCapture={() => this.handleMouseLeaveInput()}\n />\n )}\n {test.map((renderField) => {\n const { target, component } = renderField;\n const { [target]: valueProp } = this.props;\n\n const isTouched = additionalInfo && additionalInfo[`${target}_touched`];\n const hasError =\n renderField && renderField.validation\n ? renderField.validation(valueProp, {\n field,\n operator,\n value,\n additionalInfo,\n })\n : false;\n return (\n <RenderField\n component={component}\n target={target}\n valueProp={valueProp}\n onChangeHandler={(e, target, extraData) => {\n this.onChangeHandler(e, target, extraData, hasError);\n }}\n handleMouseEnterInput={this.handleMouseEnterInput}\n handleMouseLeaveInput={this.handleMouseLeaveInput}\n additionalInfo={additionalInfo}\n hasError={isTouched && hasError}\n />\n );\n })}\n {!singleRow && (\n <div className={classNameBlock('controller')}>\n <ConditionController\n handleTooltipRow={this.handleTooltipRow}\n isOpen={isOpen}\n items={items}\n onAddFilter={onAddFilter}\n onAddRuleContainer={onAddRuleContainer}\n onRemoveFilter={onRemoveFilter}\n toolTipZIndex={toolTipZIndex}\n />\n </div>\n )}\n </div>\n </>\n );\n }\n}\n\nexport default QueryBuilderRow;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,29 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var ToolBarAnimation_exports = {};
|
|
29
|
+
__export(ToolBarAnimation_exports, {
|
|
30
|
+
ToolBarAnimation: () => ToolBarAnimation
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_GrowRight = __toESM(require("@elliemae/ds-shared/Animations/GrowRight"));
|
|
35
|
+
const ToolBarAnimation = (props) => /* @__PURE__ */ import_react.default.createElement(import_GrowRight.default, {
|
|
36
|
+
...props,
|
|
24
37
|
key: "popper-animation-key",
|
|
25
38
|
from: 0.5,
|
|
26
39
|
to: 1
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(ToolBarAnimation_exports);
|
|
42
|
+
//# sourceMappingURL=ToolBarAnimation.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/ToolBarAnimation/ToolBarAnimation.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport GrowRight from '@elliemae/ds-shared/Animations/GrowRight';\n\nconst ToolBarAnimation = props => (\n <GrowRight {...props} key=\"popper-animation-key\" from={0.5} to={1} />\n);\n\nexport { ToolBarAnimation };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,uBAAsB;AAEtB,MAAM,mBAAmB,WACvB,mDAAC,0BAAD;AAAA,KAAe;AAAA,EAAO,KAAI;AAAA,EAAuB,MAAM;AAAA,EAAK,IAAI;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,33 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var format_exports = {};
|
|
29
|
+
__export(format_exports, {
|
|
30
|
+
default: () => format_default
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_sqlFormat = require("./sqlFormat");
|
|
34
|
+
var import_xmlFormat = require("./xmlFormat");
|
|
35
|
+
var import_sqlSafeFormat = require("./sqlSafeFormat");
|
|
7
36
|
class QueryBuilderFormat {
|
|
8
37
|
constructor() {
|
|
9
38
|
this.format = {
|
|
10
|
-
defaultFormat: query => query,
|
|
11
|
-
sqlFormat:
|
|
12
|
-
xmlFormat:
|
|
13
|
-
sqlSafeFormat:
|
|
39
|
+
defaultFormat: (query) => query,
|
|
40
|
+
sqlFormat: import_sqlFormat.sqlFormat,
|
|
41
|
+
xmlFormat: import_xmlFormat.xmlFormat,
|
|
42
|
+
sqlSafeFormat: import_sqlSafeFormat.sqlSafeFormat
|
|
14
43
|
};
|
|
15
|
-
this.currentFormat =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
44
|
+
this.currentFormat = "sqlFormat";
|
|
45
|
+
this.setDefaultFormat = (formatName) => {
|
|
46
|
+
if (this.format[formatName])
|
|
47
|
+
this.currentFormat = formatName;
|
|
19
48
|
};
|
|
20
|
-
|
|
21
49
|
this.addFormat = (formatName, format) => this.format[formatName] = format;
|
|
22
|
-
|
|
23
50
|
this.run = (query, formatName) => {
|
|
24
|
-
if (this.format[formatName])
|
|
51
|
+
if (this.format[formatName])
|
|
52
|
+
return this.format[formatName](query);
|
|
25
53
|
return this.format[this.currentFormat](query);
|
|
26
54
|
};
|
|
27
55
|
}
|
|
28
|
-
|
|
29
56
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
module.exports = QueryBuilderFormat$1;
|
|
57
|
+
var format_default = new QueryBuilderFormat();
|
|
58
|
+
module.exports = __toCommonJS(format_exports);
|
|
59
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/format/format.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { sqlFormat } from './sqlFormat';\nimport { xmlFormat } from './xmlFormat';\nimport { sqlSafeFormat } from './sqlSafeFormat';\n\nclass QueryBuilderFormat {\n format = {\n defaultFormat: query => query,\n sqlFormat,\n xmlFormat,\n sqlSafeFormat,\n };\n\n currentFormat = 'sqlFormat';\n\n setDefaultFormat = formatName => {\n if (this.format[formatName]) this.currentFormat = formatName;\n };\n\n addFormat = (formatName, format) => (this.format[formatName] = format);\n\n run = (query, formatName) => {\n if (this.format[formatName]) return this.format[formatName](query);\n return this.format[this.currentFormat](query);\n };\n}\n\nexport default new QueryBuilderFormat();\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA0B;AAC1B,uBAA0B;AAC1B,2BAA8B;AAE9B,yBAAyB;AAAA,EAAzB,cAJA;AAKE,kBAAS;AAAA,MACP,eAAe,WAAS;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA;AAGF,yBAAgB;AAEhB,4BAAmB,gBAAc;AAC/B,UAAI,KAAK,OAAO;AAAa,aAAK,gBAAgB;AAAA;AAGpD,qBAAY,CAAC,YAAY,WAAY,KAAK,OAAO,cAAc;AAE/D,eAAM,CAAC,OAAO,eAAe;AAC3B,UAAI,KAAK,OAAO;AAAa,eAAO,KAAK,OAAO,YAAY;AAC5D,aAAO,KAAK,OAAO,KAAK,eAAe;AAAA;AAAA;AAAA;AAI3C,IAAO,iBAAQ,IAAI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|