@elliemae/ds-query-builder 2.2.0-alpha.4 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSQueryBuilder.js +97 -117
- package/cjs/components/AndOrController/AndOrController.js +162 -148
- package/cjs/components/ConditionController/ConditionController.js +72 -88
- package/cjs/components/DisplayOutput/DisplayOutput.js +68 -63
- package/cjs/components/DragContainerController/DragContainerController.js +41 -61
- package/cjs/components/DragControllerRow/DragControllerRow.js +46 -50
- package/cjs/components/FieldControllerRow/FieldControllerRow.js +32 -54
- package/cjs/components/Nestable/Nestable.js +209 -143
- package/cjs/components/Nestable/NestableItem.js +90 -98
- package/cjs/components/Nestable/actions/events.js +95 -72
- package/cjs/components/Nestable/actions/getItemOptions.js +15 -36
- package/cjs/components/Nestable/actions/getPaths.js +51 -46
- package/cjs/components/Nestable/actions/index.js +28 -42
- package/cjs/components/Nestable/actions/moveItem.js +42 -44
- package/cjs/components/Nestable/actions/paths.js +55 -48
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js +23 -39
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js +26 -39
- package/cjs/components/Nestable/index.js +7 -36
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js +13 -36
- package/cjs/components/QueryBuilderImpl.js +202 -118
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js +78 -80
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +211 -154
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js +26 -39
- package/cjs/components/format/format.js +22 -48
- package/cjs/components/format/sqlFormat.js +48 -69
- package/cjs/components/format/sqlSafeFormat.js +55 -72
- package/cjs/components/format/xmlFormat.js +50 -71
- package/cjs/components/helpers/actions.js +186 -151
- package/cjs/components/helpers/constants.js +8 -36
- package/cjs/components/helpers/dependencies.js +64 -49
- package/cjs/components/helpers/selectors.js +101 -161
- package/cjs/components/helpers/store.js +104 -86
- package/cjs/components/helpers/types.js +44 -72
- package/cjs/index.js +29 -36
- package/cjs/propTypes.js +94 -102
- package/esm/DSQueryBuilder.js +72 -103
- package/esm/components/AndOrController/AndOrController.js +147 -113
- package/esm/components/ConditionController/ConditionController.js +62 -57
- package/esm/components/DisplayOutput/DisplayOutput.js +59 -31
- package/esm/components/DragContainerController/DragContainerController.js +35 -32
- package/esm/components/DragControllerRow/DragControllerRow.js +38 -21
- package/esm/components/FieldControllerRow/FieldControllerRow.js +26 -25
- package/esm/components/Nestable/Nestable.js +186 -115
- package/esm/components/Nestable/NestableItem.js +82 -69
- package/esm/components/Nestable/actions/events.js +79 -45
- package/esm/components/Nestable/actions/getItemOptions.js +11 -7
- package/esm/components/Nestable/actions/getPaths.js +43 -17
- package/esm/components/Nestable/actions/index.js +6 -13
- package/esm/components/Nestable/actions/moveItem.js +31 -13
- package/esm/components/Nestable/actions/paths.js +47 -19
- package/esm/components/Nestable/actions/tryDecreaseDepth.js +19 -10
- package/esm/components/Nestable/actions/tryIncreaseDepth.js +22 -10
- package/esm/components/Nestable/index.js +2 -7
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js +5 -7
- package/esm/components/QueryBuilderImpl.js +187 -82
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js +70 -50
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js +201 -123
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js +17 -10
- package/esm/components/format/format.js +17 -16
- package/esm/components/format/sqlFormat.js +43 -39
- package/esm/components/format/sqlSafeFormat.js +50 -43
- package/esm/components/format/xmlFormat.js +45 -41
- package/esm/components/helpers/actions.js +160 -123
- package/esm/components/helpers/constants.js +2 -7
- package/esm/components/helpers/dependencies.js +39 -19
- package/esm/components/helpers/selectors.js +93 -132
- package/esm/components/helpers/store.js +82 -54
- package/esm/components/helpers/types.js +33 -44
- package/esm/index.js +4 -7
- package/esm/propTypes.js +72 -55
- package/package.json +12 -12
- package/cjs/DSQueryBuilder.js.map +0 -7
- package/cjs/components/AndOrController/AndOrController.js.map +0 -7
- package/cjs/components/ConditionController/ConditionController.js.map +0 -7
- package/cjs/components/DisplayOutput/DisplayOutput.js.map +0 -7
- package/cjs/components/DragContainerController/DragContainerController.js.map +0 -7
- package/cjs/components/DragControllerRow/DragControllerRow.js.map +0 -7
- package/cjs/components/FieldControllerRow/FieldControllerRow.js.map +0 -7
- package/cjs/components/Nestable/Nestable.js.map +0 -7
- package/cjs/components/Nestable/NestableItem.js.map +0 -7
- package/cjs/components/Nestable/actions/events.js.map +0 -7
- package/cjs/components/Nestable/actions/getItemOptions.js.map +0 -7
- package/cjs/components/Nestable/actions/getPaths.js.map +0 -7
- package/cjs/components/Nestable/actions/index.js.map +0 -7
- package/cjs/components/Nestable/actions/moveItem.js.map +0 -7
- package/cjs/components/Nestable/actions/paths.js.map +0 -7
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js.map +0 -7
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js.map +0 -7
- package/cjs/components/Nestable/index.js.map +0 -7
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js.map +0 -7
- package/cjs/components/QueryBuilderImpl.js.map +0 -7
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js.map +0 -7
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js.map +0 -7
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js.map +0 -7
- package/cjs/components/format/format.js.map +0 -7
- package/cjs/components/format/sqlFormat.js.map +0 -7
- package/cjs/components/format/sqlSafeFormat.js.map +0 -7
- package/cjs/components/format/xmlFormat.js.map +0 -7
- package/cjs/components/helpers/actions.js.map +0 -7
- package/cjs/components/helpers/constants.js.map +0 -7
- package/cjs/components/helpers/dependencies.js.map +0 -7
- package/cjs/components/helpers/selectors.js.map +0 -7
- package/cjs/components/helpers/store.js.map +0 -7
- package/cjs/components/helpers/types.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/propTypes.js.map +0 -7
- package/esm/DSQueryBuilder.js.map +0 -7
- package/esm/components/AndOrController/AndOrController.js.map +0 -7
- package/esm/components/ConditionController/ConditionController.js.map +0 -7
- package/esm/components/DisplayOutput/DisplayOutput.js.map +0 -7
- package/esm/components/DragContainerController/DragContainerController.js.map +0 -7
- package/esm/components/DragControllerRow/DragControllerRow.js.map +0 -7
- package/esm/components/FieldControllerRow/FieldControllerRow.js.map +0 -7
- package/esm/components/Nestable/Nestable.js.map +0 -7
- package/esm/components/Nestable/NestableItem.js.map +0 -7
- package/esm/components/Nestable/actions/events.js.map +0 -7
- package/esm/components/Nestable/actions/getItemOptions.js.map +0 -7
- package/esm/components/Nestable/actions/getPaths.js.map +0 -7
- package/esm/components/Nestable/actions/index.js.map +0 -7
- package/esm/components/Nestable/actions/moveItem.js.map +0 -7
- package/esm/components/Nestable/actions/paths.js.map +0 -7
- package/esm/components/Nestable/actions/tryDecreaseDepth.js.map +0 -7
- package/esm/components/Nestable/actions/tryIncreaseDepth.js.map +0 -7
- package/esm/components/Nestable/index.js.map +0 -7
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js.map +0 -7
- package/esm/components/QueryBuilderImpl.js.map +0 -7
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js.map +0 -7
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js.map +0 -7
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js.map +0 -7
- package/esm/components/format/format.js.map +0 -7
- package/esm/components/format/sqlFormat.js.map +0 -7
- package/esm/components/format/sqlSafeFormat.js.map +0 -7
- package/esm/components/format/xmlFormat.js.map +0 -7
- package/esm/components/helpers/actions.js.map +0 -7
- package/esm/components/helpers/constants.js.map +0 -7
- package/esm/components/helpers/dependencies.js.map +0 -7
- package/esm/components/helpers/selectors.js.map +0 -7
- package/esm/components/helpers/store.js.map +0 -7
- package/esm/components/helpers/types.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/propTypes.js.map +0 -7
package/cjs/index.js
CHANGED
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
default: () => import_DSQueryBuilder.default
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_DSQueryBuilder = require("./DSQueryBuilder");
|
|
34
|
-
__reExport(src_exports, require("./DSQueryBuilder"));
|
|
35
|
-
module.exports = __toCommonJS(src_exports);
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var DSQueryBuilder = require('./DSQueryBuilder.js');
|
|
6
|
+
var types = require('./components/helpers/types.js');
|
|
7
|
+
var selectors = require('./components/helpers/selectors.js');
|
|
8
|
+
var format = require('./components/format/format.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.DSQueryBuilder = DSQueryBuilder.DSQueryBuilder;
|
|
13
|
+
exports.DSQueryBuilderWithSchema = DSQueryBuilder.DSQueryBuilderWithSchema;
|
|
14
|
+
exports["default"] = DSQueryBuilder.DSQueryBuilder;
|
|
15
|
+
exports.QB_ADD_FILTER_METHOD_TYPES = types.QB_ADD_FILTER_METHOD_TYPES;
|
|
16
|
+
exports.QB_DRAG_LOCATIONS = types.QB_DRAG_LOCATIONS;
|
|
17
|
+
exports.QB_DRAG_TYPES = types.QB_DRAG_TYPES;
|
|
18
|
+
exports.QB_EXPORT_FORMAT_TYPES = types.QB_EXPORT_FORMAT_TYPES;
|
|
19
|
+
exports.QB_FIELD_SHARED_ACTIONS = types.QB_FIELD_SHARED_ACTIONS;
|
|
20
|
+
exports.QB_FIELD_TYPES = types.QB_FIELD_TYPES;
|
|
21
|
+
exports.QB_GROUP_CONDITION_TYPES = types.QB_GROUP_CONDITION_TYPES;
|
|
22
|
+
exports.QB_GROUP_FILTER_METHOD_TYPES = types.QB_GROUP_FILTER_METHOD_TYPES;
|
|
23
|
+
exports.QB_OPERATOR_TYPES = types.QB_OPERATOR_TYPES;
|
|
24
|
+
exports.QB_DEFAULT_VALUES_OPTIONS = selectors.QB_DEFAULT_VALUES_OPTIONS;
|
|
25
|
+
exports.QB_FIELD_OPTIONS = selectors.QB_FIELD_OPTIONS;
|
|
26
|
+
exports.QB_LOAN_VALUES_OPTIONS = selectors.QB_LOAN_VALUES_OPTIONS;
|
|
27
|
+
exports.QB_OPERATOR_OPTIONS = selectors.QB_OPERATOR_OPTIONS;
|
|
28
|
+
exports.QB_SUBJECT_VALUES_OPTIONS = selectors.QB_SUBJECT_VALUES_OPTIONS;
|
|
29
|
+
exports.QueryBuilderFormat = format;
|
package/cjs/propTypes.js
CHANGED
|
@@ -1,105 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
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 propTypes_exports = {};
|
|
29
|
-
__export(propTypes_exports, {
|
|
30
|
-
props: () => props
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
var import_react_desc = require("react-desc");
|
|
34
|
-
var import_types = require("./components/helpers/types");
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var reactDesc = require('react-desc');
|
|
6
|
+
var types = require('./components/helpers/types.js');
|
|
7
|
+
|
|
35
8
|
const props = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
]).description(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"startsWith",
|
|
57
|
-
"contains",
|
|
58
|
-
"validDate",
|
|
59
|
-
"equal",
|
|
60
|
-
"notEqual",
|
|
61
|
-
"isNull",
|
|
62
|
-
"isNotNull",
|
|
63
|
-
"isIn",
|
|
64
|
-
"isNotIn"
|
|
65
|
-
]),
|
|
66
|
-
value: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.string, import_react_desc.PropTypes.number])
|
|
9
|
+
/** inpect props to component wrapper */
|
|
10
|
+
containerProps: reactDesc.PropTypes.object.description('inject props to component wrapper'),
|
|
11
|
+
|
|
12
|
+
/** add filter strategy */
|
|
13
|
+
addFilterMethod: reactDesc.PropTypes.oneOf([types.QB_ADD_FILTER_METHOD_TYPES.APPEND, types.QB_ADD_FILTER_METHOD_TYPES.IN_PLACE]).description('add filter strategy'),
|
|
14
|
+
|
|
15
|
+
/** group filter strategy */
|
|
16
|
+
groupFilterMethod: reactDesc.PropTypes.oneOf([types.QB_ADD_FILTER_METHOD_TYPES.APPEND, types.QB_ADD_FILTER_METHOD_TYPES.IN_PLACE]).description('group filter strategy'),
|
|
17
|
+
|
|
18
|
+
/** change callback */
|
|
19
|
+
onChange: reactDesc.PropTypes.func.description('change callback'),
|
|
20
|
+
|
|
21
|
+
/** fields to query */
|
|
22
|
+
fields: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.shape({
|
|
23
|
+
target: reactDesc.PropTypes.oneOf(['operator', 'field', 'value']),
|
|
24
|
+
component: reactDesc.PropTypes.element,
|
|
25
|
+
condition: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.shape({
|
|
26
|
+
source: reactDesc.PropTypes.oneOf(['operator', 'field', 'value']),
|
|
27
|
+
operator: reactDesc.PropTypes.oneOf(['checkNotEmpty', 'greaterThan', 'greaterThanOrEquals', 'lessThanOrEquals', 'startsWith', 'contains', 'validDate', 'equal', 'notEqual', 'isNull', 'isNotNull', 'isIn', 'isNotIn']),
|
|
28
|
+
value: reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.string, reactDesc.PropTypes.number])
|
|
67
29
|
}))
|
|
68
|
-
})).description(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
30
|
+
})).description('fields to query'),
|
|
31
|
+
|
|
32
|
+
/** fields actions */
|
|
33
|
+
fieldsSharedActions: reactDesc.PropTypes.shape({
|
|
34
|
+
onFieldChange: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.func),
|
|
35
|
+
onOperatorChange: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.func),
|
|
36
|
+
onValueChange: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.func)
|
|
37
|
+
}).description('fields actions'),
|
|
38
|
+
|
|
39
|
+
/** query builder format */
|
|
40
|
+
format: reactDesc.PropTypes.string.description('query builder format'),
|
|
41
|
+
|
|
42
|
+
/** initial values */
|
|
43
|
+
init: reactDesc.PropTypes.shape({
|
|
44
|
+
step: reactDesc.PropTypes.number,
|
|
45
|
+
mapFilters: reactDesc.PropTypes.object,
|
|
46
|
+
mapGroups: reactDesc.PropTypes.object,
|
|
47
|
+
main: reactDesc.PropTypes.string,
|
|
48
|
+
items: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object)
|
|
49
|
+
}).description('initial values'),
|
|
50
|
+
|
|
51
|
+
/** class for rule container */
|
|
52
|
+
ruleContainerClassName: reactDesc.PropTypes.string.description('class for rule container'),
|
|
53
|
+
|
|
54
|
+
/** handle field change */
|
|
55
|
+
handleDrop: reactDesc.PropTypes.func.description('handle field change'),
|
|
56
|
+
|
|
57
|
+
/** handle field change drop */
|
|
58
|
+
handleDropFilter: reactDesc.PropTypes.func.description('handle field change drop'),
|
|
59
|
+
|
|
60
|
+
/** handle field group change */
|
|
61
|
+
handleDropGroup: reactDesc.PropTypes.func.description('handle field group change'),
|
|
62
|
+
|
|
63
|
+
/** handle field change */
|
|
64
|
+
handleFieldChange: reactDesc.PropTypes.func.description('handle field change'),
|
|
65
|
+
|
|
66
|
+
/** handle rule container operator change */
|
|
67
|
+
handleRuleContainerOperator: reactDesc.PropTypes.func.description('handle rule container operator change'),
|
|
68
|
+
|
|
69
|
+
/** handle rule container grouping change */
|
|
70
|
+
handleRuleContainerUnGroup: reactDesc.PropTypes.func.description('handle rule container grouping change'),
|
|
71
|
+
|
|
72
|
+
/** filter add callback */
|
|
73
|
+
onAddFilter: reactDesc.PropTypes.func.description('filter add callback'),
|
|
74
|
+
|
|
75
|
+
/** rule container add callback */
|
|
76
|
+
onAddRuleContainer: reactDesc.PropTypes.func.description('rule container add callback'),
|
|
77
|
+
|
|
78
|
+
/** remove filter callback */
|
|
79
|
+
onRemoveFilter: reactDesc.PropTypes.func.description('remove filter callback'),
|
|
80
|
+
displayFixedOutput: reactDesc.PropTypes.string.description("Label for fixed output.Using this props it will ignore 'displayOutput' and 'displayOutputLabel' \n and it will always render the output without the ability to close it. \n ").defaultValue(''),
|
|
81
|
+
|
|
82
|
+
/** show output */
|
|
83
|
+
displayOutput: reactDesc.PropTypes.bool.description('show output'),
|
|
84
|
+
|
|
85
|
+
/** show output label */
|
|
86
|
+
displayOutputLabel: reactDesc.PropTypes.shape({
|
|
87
|
+
show: reactDesc.PropTypes.string,
|
|
88
|
+
hide: reactDesc.PropTypes.string,
|
|
89
|
+
open: reactDesc.PropTypes.bool
|
|
90
|
+
}).description('show output label'),
|
|
91
|
+
|
|
92
|
+
/** one or multiple rows for query */
|
|
93
|
+
singleRow: reactDesc.PropTypes.bool.description('one or multiple rows for query'),
|
|
94
|
+
toolTipZIndex: reactDesc.PropTypes.number.description('ZIndex for action controls').defaultValue(110)
|
|
103
95
|
};
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
|
|
97
|
+
exports.props = props;
|
package/esm/DSQueryBuilder.js
CHANGED
|
@@ -1,105 +1,74 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { describe } from
|
|
4
|
-
import QueryBuilderImpl from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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
|
-
handleRuleContainerUnGroup,
|
|
72
|
-
init,
|
|
73
|
-
onAddFilter,
|
|
74
|
-
onAddRuleContainer,
|
|
75
|
-
onChange,
|
|
76
|
-
onRemoveFilter,
|
|
77
|
-
ruleContainerClassName,
|
|
78
|
-
singleRow,
|
|
79
|
-
toolTipZIndex
|
|
80
|
-
});
|
|
81
|
-
DSQueryBuilder.propTypes = props;
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { describe } from 'react-desc';
|
|
4
|
+
import QueryBuilderImpl from './components/QueryBuilderImpl.js';
|
|
5
|
+
import { QB_ADD_FILTER_METHOD_TYPES, QB_GROUP_FILTER_METHOD_TYPES, QB_EXPORT_FORMAT_TYPES } from './components/helpers/types.js';
|
|
6
|
+
export { QB_ADD_FILTER_METHOD_TYPES, QB_DRAG_LOCATIONS, QB_DRAG_TYPES, QB_EXPORT_FORMAT_TYPES, QB_FIELD_SHARED_ACTIONS, QB_FIELD_TYPES, QB_GROUP_CONDITION_TYPES, QB_GROUP_FILTER_METHOD_TYPES, QB_OPERATOR_TYPES } from './components/helpers/types.js';
|
|
7
|
+
export { QB_DEFAULT_VALUES_OPTIONS, QB_FIELD_OPTIONS, QB_LOAN_VALUES_OPTIONS, QB_OPERATOR_OPTIONS, QB_SUBJECT_VALUES_OPTIONS } from './components/helpers/selectors.js';
|
|
8
|
+
export { default as QueryBuilderFormat } from './components/format/format.js';
|
|
9
|
+
import { props } from './propTypes.js';
|
|
10
|
+
|
|
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
|
+
};
|
|
70
|
+
|
|
82
71
|
const DSQueryBuilderWithSchema = describe(DSQueryBuilder);
|
|
83
72
|
DSQueryBuilderWithSchema.propTypes = props;
|
|
84
|
-
|
|
85
|
-
export {
|
|
86
|
-
DSQueryBuilder,
|
|
87
|
-
DSQueryBuilderWithSchema,
|
|
88
|
-
QB_ADD_FILTER_METHOD_TYPES,
|
|
89
|
-
QB_DEFAULT_VALUES_OPTIONS,
|
|
90
|
-
QB_DRAG_LOCATIONS,
|
|
91
|
-
QB_DRAG_TYPES,
|
|
92
|
-
QB_EXPORT_FORMAT_TYPES,
|
|
93
|
-
QB_FIELD_OPTIONS,
|
|
94
|
-
QB_FIELD_SHARED_ACTIONS,
|
|
95
|
-
QB_FIELD_TYPES,
|
|
96
|
-
QB_GROUP_CONDITION_TYPES,
|
|
97
|
-
QB_GROUP_FILTER_METHOD_TYPES,
|
|
98
|
-
QB_LOAN_VALUES_OPTIONS,
|
|
99
|
-
QB_OPERATOR_OPTIONS,
|
|
100
|
-
QB_OPERATOR_TYPES,
|
|
101
|
-
QB_SUBJECT_VALUES_OPTIONS,
|
|
102
|
-
QueryBuilderFormat,
|
|
103
|
-
DSQueryBuilder_default as default
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=DSQueryBuilder.js.map
|
|
73
|
+
|
|
74
|
+
export { DSQueryBuilder, DSQueryBuilderWithSchema, DSQueryBuilder as default };
|