@elliemae/ds-query-builder 2.3.0-alpha.6 → 2.3.0-next.0
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 +98 -0
- package/cjs/components/AndOrController/AndOrController.js +222 -0
- package/cjs/components/ConditionController/ConditionController.js +100 -0
- package/cjs/components/DisplayOutput/DisplayOutput.js +93 -0
- package/cjs/components/DragContainerController/DragContainerController.js +45 -0
- package/cjs/components/DragControllerRow/DragControllerRow.js +47 -0
- package/cjs/components/FieldControllerRow/FieldControllerRow.js +33 -0
- package/cjs/components/Nestable/Nestable.js +320 -0
- package/cjs/components/Nestable/NestableItem.js +111 -0
- package/cjs/components/Nestable/actions/events.js +166 -0
- package/cjs/components/Nestable/actions/getItemOptions.js +28 -0
- package/cjs/components/Nestable/actions/getPaths.js +124 -0
- package/cjs/components/Nestable/actions/index.js +28 -0
- package/cjs/components/Nestable/actions/moveItem.js +54 -0
- package/cjs/components/Nestable/actions/paths.js +126 -0
- package/cjs/components/Nestable/actions/tryDecreaseDepth.js +35 -0
- package/cjs/components/Nestable/actions/tryIncreaseDepth.js +38 -0
- package/cjs/components/Nestable/index.js +7 -0
- package/cjs/components/QueryBuilderContext/QueryBuilderContext.js +13 -0
- package/cjs/components/QueryBuilderImpl.js +309 -0
- package/cjs/components/QueryBuilderItem/QueryBuilderItem.js +90 -0
- package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +276 -0
- package/cjs/components/ToolBarAnimation/ToolBarAnimation.js +29 -0
- package/cjs/components/format/format.js +33 -0
- package/cjs/components/format/sqlFormat.js +73 -0
- package/cjs/components/format/sqlSafeFormat.js +81 -0
- package/cjs/components/format/xmlFormat.js +73 -0
- package/cjs/components/helpers/actions.js +277 -0
- package/cjs/components/helpers/constants.js +11 -0
- package/cjs/components/helpers/dependencies.js +84 -0
- package/cjs/components/helpers/selectors.js +101 -0
- package/cjs/components/helpers/store.js +177 -0
- package/cjs/components/helpers/types.js +64 -0
- package/cjs/index.js +29 -0
- package/cjs/propTypes.js +97 -0
- package/esm/DSQueryBuilder.js +74 -0
- package/esm/components/AndOrController/AndOrController.js +213 -0
- package/esm/components/ConditionController/ConditionController.js +92 -0
- package/esm/components/DisplayOutput/DisplayOutput.js +87 -0
- package/esm/components/DragContainerController/DragContainerController.js +39 -0
- package/esm/components/DragControllerRow/DragControllerRow.js +39 -0
- package/esm/components/FieldControllerRow/FieldControllerRow.js +27 -0
- package/esm/components/Nestable/Nestable.js +312 -0
- package/esm/components/Nestable/NestableItem.js +103 -0
- package/esm/components/Nestable/actions/events.js +153 -0
- package/{dist/esm → esm}/components/Nestable/actions/getItemOptions.js +11 -7
- package/{dist/esm → esm}/components/Nestable/actions/getPaths.js +43 -17
- package/esm/components/Nestable/actions/index.js +6 -0
- package/esm/components/Nestable/actions/moveItem.js +45 -0
- package/{dist/esm → esm}/components/Nestable/actions/paths.js +47 -19
- package/esm/components/Nestable/actions/tryDecreaseDepth.js +31 -0
- package/{dist/esm → esm}/components/Nestable/actions/tryIncreaseDepth.js +22 -10
- package/esm/components/Nestable/index.js +2 -0
- package/esm/components/QueryBuilderContext/QueryBuilderContext.js +5 -0
- package/esm/components/QueryBuilderImpl.js +301 -0
- package/esm/components/QueryBuilderItem/QueryBuilderItem.js +83 -0
- package/esm/components/QueryBuilderRow/QueryBuilderRow.js +268 -0
- package/esm/components/ToolBarAnimation/ToolBarAnimation.js +20 -0
- package/esm/components/format/format.js +31 -0
- package/esm/components/format/sqlFormat.js +69 -0
- package/esm/components/format/sqlSafeFormat.js +76 -0
- package/esm/components/format/xmlFormat.js +69 -0
- package/esm/components/helpers/actions.js +254 -0
- package/esm/components/helpers/constants.js +5 -0
- package/esm/components/helpers/dependencies.js +60 -0
- package/esm/components/helpers/selectors.js +93 -0
- package/esm/components/helpers/store.js +171 -0
- package/esm/components/helpers/types.js +52 -0
- package/esm/index.js +4 -0
- package/esm/propTypes.js +93 -0
- package/package.json +95 -97
- package/types/DSQueryBuilder.d.ts +180 -0
- package/types/components/AndOrController/AndOrController.d.ts +38 -0
- package/types/components/ConditionController/ConditionController.d.ts +16 -0
- package/types/components/DisplayOutput/DisplayOutput.d.ts +7 -0
- package/types/components/DragContainerController/DragContainerController.d.ts +9 -0
- package/types/components/DragControllerRow/DragControllerRow.d.ts +9 -0
- package/types/components/FieldControllerRow/FieldControllerRow.d.ts +9 -0
- package/types/components/Nestable/Nestable.d.ts +51 -0
- package/types/components/Nestable/NestableItem.d.ts +12 -0
- package/types/components/Nestable/actions/events.d.ts +6 -0
- package/types/components/Nestable/actions/getItemOptions.d.ts +11 -0
- package/types/components/Nestable/actions/getPaths.d.ts +5 -0
- package/types/components/Nestable/actions/index.d.ts +6 -0
- package/types/components/Nestable/actions/moveItem.d.ts +5 -0
- package/types/components/Nestable/actions/paths.d.ts +5 -0
- package/types/components/Nestable/actions/tryDecreaseDepth.d.ts +1 -0
- package/types/components/Nestable/actions/tryIncreaseDepth.d.ts +1 -0
- package/types/components/Nestable/index.d.ts +2 -0
- package/types/components/QueryBuilderContext/QueryBuilderContext.d.ts +2 -0
- package/types/components/QueryBuilderImpl.d.ts +49 -0
- package/types/components/QueryBuilderItem/QueryBuilderItem.d.ts +5 -0
- package/types/components/QueryBuilderRow/QueryBuilderRow.d.ts +12 -0
- package/types/components/ToolBarAnimation/ToolBarAnimation.d.ts +3 -0
- package/types/components/format/format.d.ts +26 -0
- package/types/components/format/sqlFormat.d.ts +5 -0
- package/types/components/format/sqlSafeFormat.d.ts +6 -0
- package/types/components/format/xmlFormat.d.ts +5 -0
- package/types/components/helpers/actions.d.ts +63 -0
- package/types/components/helpers/constants.d.ts +3 -0
- package/types/components/helpers/dependencies.d.ts +1 -0
- package/types/components/helpers/selectors.d.ts +20 -0
- package/types/components/helpers/store.d.ts +144 -0
- package/types/components/helpers/types.d.ts +50 -0
- package/types/index.d.ts +2 -0
- package/types/propTypes.d.ts +156 -0
- package/dist/cjs/DSQueryBuilder.js +0 -118
- package/dist/cjs/DSQueryBuilder.js.map +0 -7
- package/dist/cjs/components/AndOrController/AndOrController.js +0 -208
- package/dist/cjs/components/AndOrController/AndOrController.js.map +0 -7
- package/dist/cjs/components/ConditionController/ConditionController.js +0 -116
- package/dist/cjs/components/ConditionController/ConditionController.js.map +0 -7
- package/dist/cjs/components/DisplayOutput/DisplayOutput.js +0 -92
- package/dist/cjs/components/DisplayOutput/DisplayOutput.js.map +0 -7
- package/dist/cjs/components/DragContainerController/DragContainerController.js +0 -65
- package/dist/cjs/components/DragContainerController/DragContainerController.js.map +0 -7
- package/dist/cjs/components/DragControllerRow/DragControllerRow.js +0 -51
- package/dist/cjs/components/DragControllerRow/DragControllerRow.js.map +0 -7
- package/dist/cjs/components/FieldControllerRow/FieldControllerRow.js +0 -55
- package/dist/cjs/components/FieldControllerRow/FieldControllerRow.js.map +0 -7
- package/dist/cjs/components/Nestable/Nestable.js +0 -254
- package/dist/cjs/components/Nestable/Nestable.js.map +0 -7
- package/dist/cjs/components/Nestable/NestableItem.js +0 -119
- package/dist/cjs/components/Nestable/NestableItem.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/events.js +0 -143
- package/dist/cjs/components/Nestable/actions/events.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/getItemOptions.js +0 -49
- package/dist/cjs/components/Nestable/actions/getItemOptions.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/getPaths.js +0 -119
- package/dist/cjs/components/Nestable/actions/getPaths.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/index.js +0 -42
- package/dist/cjs/components/Nestable/actions/index.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/moveItem.js +0 -56
- package/dist/cjs/components/Nestable/actions/moveItem.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/paths.js +0 -119
- package/dist/cjs/components/Nestable/actions/paths.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/tryDecreaseDepth.js +0 -51
- package/dist/cjs/components/Nestable/actions/tryDecreaseDepth.js.map +0 -7
- package/dist/cjs/components/Nestable/actions/tryIncreaseDepth.js +0 -51
- package/dist/cjs/components/Nestable/actions/tryIncreaseDepth.js.map +0 -7
- package/dist/cjs/components/Nestable/index.js +0 -36
- package/dist/cjs/components/Nestable/index.js.map +0 -7
- package/dist/cjs/components/QueryBuilderContext/QueryBuilderContext.js +0 -36
- package/dist/cjs/components/QueryBuilderContext/QueryBuilderContext.js.map +0 -7
- package/dist/cjs/components/QueryBuilderImpl.js +0 -225
- package/dist/cjs/components/QueryBuilderImpl.js.map +0 -7
- package/dist/cjs/components/QueryBuilderItem/QueryBuilderItem.js +0 -92
- package/dist/cjs/components/QueryBuilderItem/QueryBuilderItem.js.map +0 -7
- package/dist/cjs/components/QueryBuilderRow/QueryBuilderRow.js +0 -219
- package/dist/cjs/components/QueryBuilderRow/QueryBuilderRow.js.map +0 -7
- package/dist/cjs/components/ToolBarAnimation/ToolBarAnimation.js +0 -42
- package/dist/cjs/components/ToolBarAnimation/ToolBarAnimation.js.map +0 -7
- package/dist/cjs/components/format/format.js +0 -59
- package/dist/cjs/components/format/format.js.map +0 -7
- package/dist/cjs/components/format/sqlFormat.js +0 -94
- package/dist/cjs/components/format/sqlFormat.js.map +0 -7
- package/dist/cjs/components/format/sqlSafeFormat.js +0 -98
- package/dist/cjs/components/format/sqlSafeFormat.js.map +0 -7
- package/dist/cjs/components/format/xmlFormat.js +0 -94
- package/dist/cjs/components/format/xmlFormat.js.map +0 -7
- package/dist/cjs/components/helpers/actions.js +0 -242
- package/dist/cjs/components/helpers/actions.js.map +0 -7
- package/dist/cjs/components/helpers/constants.js +0 -39
- package/dist/cjs/components/helpers/constants.js.map +0 -7
- package/dist/cjs/components/helpers/dependencies.js +0 -69
- package/dist/cjs/components/helpers/dependencies.js.map +0 -7
- package/dist/cjs/components/helpers/selectors.js +0 -161
- package/dist/cjs/components/helpers/selectors.js.map +0 -7
- package/dist/cjs/components/helpers/store.js +0 -159
- package/dist/cjs/components/helpers/store.js.map +0 -7
- package/dist/cjs/components/helpers/types.js +0 -92
- package/dist/cjs/components/helpers/types.js.map +0 -7
- package/dist/cjs/index.js +0 -36
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/propTypes.js +0 -105
- package/dist/cjs/propTypes.js.map +0 -7
- package/dist/esm/DSQueryBuilder.js +0 -105
- package/dist/esm/DSQueryBuilder.js.map +0 -7
- package/dist/esm/components/AndOrController/AndOrController.js +0 -179
- package/dist/esm/components/AndOrController/AndOrController.js.map +0 -7
- package/dist/esm/components/ConditionController/ConditionController.js +0 -87
- package/dist/esm/components/ConditionController/ConditionController.js.map +0 -7
- package/dist/esm/components/DisplayOutput/DisplayOutput.js +0 -63
- package/dist/esm/components/DisplayOutput/DisplayOutput.js.map +0 -7
- package/dist/esm/components/DragContainerController/DragContainerController.js +0 -36
- package/dist/esm/components/DragContainerController/DragContainerController.js.map +0 -7
- package/dist/esm/components/DragControllerRow/DragControllerRow.js +0 -22
- package/dist/esm/components/DragControllerRow/DragControllerRow.js.map +0 -7
- package/dist/esm/components/FieldControllerRow/FieldControllerRow.js +0 -26
- package/dist/esm/components/FieldControllerRow/FieldControllerRow.js.map +0 -7
- package/dist/esm/components/Nestable/Nestable.js +0 -241
- package/dist/esm/components/Nestable/Nestable.js.map +0 -7
- package/dist/esm/components/Nestable/NestableItem.js +0 -90
- package/dist/esm/components/Nestable/NestableItem.js.map +0 -7
- package/dist/esm/components/Nestable/actions/events.js +0 -119
- package/dist/esm/components/Nestable/actions/events.js.map +0 -7
- package/dist/esm/components/Nestable/actions/getItemOptions.js.map +0 -7
- package/dist/esm/components/Nestable/actions/getPaths.js.map +0 -7
- package/dist/esm/components/Nestable/actions/index.js +0 -13
- package/dist/esm/components/Nestable/actions/index.js.map +0 -7
- package/dist/esm/components/Nestable/actions/moveItem.js +0 -27
- package/dist/esm/components/Nestable/actions/moveItem.js.map +0 -7
- package/dist/esm/components/Nestable/actions/paths.js.map +0 -7
- package/dist/esm/components/Nestable/actions/tryDecreaseDepth.js +0 -22
- package/dist/esm/components/Nestable/actions/tryDecreaseDepth.js.map +0 -7
- package/dist/esm/components/Nestable/actions/tryIncreaseDepth.js.map +0 -7
- package/dist/esm/components/Nestable/index.js +0 -7
- package/dist/esm/components/Nestable/index.js.map +0 -7
- package/dist/esm/components/QueryBuilderContext/QueryBuilderContext.js +0 -7
- package/dist/esm/components/QueryBuilderContext/QueryBuilderContext.js.map +0 -7
- package/dist/esm/components/QueryBuilderImpl.js +0 -196
- package/dist/esm/components/QueryBuilderImpl.js.map +0 -7
- package/dist/esm/components/QueryBuilderItem/QueryBuilderItem.js +0 -63
- package/dist/esm/components/QueryBuilderItem/QueryBuilderItem.js.map +0 -7
- package/dist/esm/components/QueryBuilderRow/QueryBuilderRow.js +0 -190
- package/dist/esm/components/QueryBuilderRow/QueryBuilderRow.js.map +0 -7
- package/dist/esm/components/ToolBarAnimation/ToolBarAnimation.js +0 -13
- package/dist/esm/components/ToolBarAnimation/ToolBarAnimation.js.map +0 -7
- package/dist/esm/components/format/format.js +0 -30
- package/dist/esm/components/format/format.js.map +0 -7
- package/dist/esm/components/format/sqlFormat.js +0 -65
- package/dist/esm/components/format/sqlFormat.js.map +0 -7
- package/dist/esm/components/format/sqlSafeFormat.js +0 -69
- package/dist/esm/components/format/sqlSafeFormat.js.map +0 -7
- package/dist/esm/components/format/xmlFormat.js +0 -65
- package/dist/esm/components/format/xmlFormat.js.map +0 -7
- package/dist/esm/components/helpers/actions.js +0 -217
- package/dist/esm/components/helpers/actions.js.map +0 -7
- package/dist/esm/components/helpers/constants.js +0 -10
- package/dist/esm/components/helpers/constants.js.map +0 -7
- package/dist/esm/components/helpers/dependencies.js +0 -40
- package/dist/esm/components/helpers/dependencies.js.map +0 -7
- package/dist/esm/components/helpers/selectors.js +0 -132
- package/dist/esm/components/helpers/selectors.js.map +0 -7
- package/dist/esm/components/helpers/store.js +0 -143
- package/dist/esm/components/helpers/store.js.map +0 -7
- package/dist/esm/components/helpers/types.js +0 -63
- package/dist/esm/components/helpers/types.js.map +0 -7
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/propTypes.js +0 -76
- package/dist/esm/propTypes.js.map +0 -7
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var types = require('./types.js');
|
|
6
|
+
|
|
7
|
+
const QB_DEFAULT_VALUES_OPTIONS = [{
|
|
8
|
+
label: 'Choose a Field',
|
|
9
|
+
value: ''
|
|
10
|
+
}];
|
|
11
|
+
const QB_SUBJECT_VALUES_OPTIONS = [{
|
|
12
|
+
label: 'Condominium',
|
|
13
|
+
value: 'Condominium'
|
|
14
|
+
}, {
|
|
15
|
+
label: 'Single Family Home',
|
|
16
|
+
value: 'Single Family Home'
|
|
17
|
+
}, {
|
|
18
|
+
label: 'Co-Operative',
|
|
19
|
+
value: 'Co-Operative'
|
|
20
|
+
}, {
|
|
21
|
+
label: 'Detached',
|
|
22
|
+
value: 'Detached'
|
|
23
|
+
}, {
|
|
24
|
+
label: 'High Rise Condominium',
|
|
25
|
+
value: 'High Rise Condominium'
|
|
26
|
+
}, {
|
|
27
|
+
label: 'Manufactured Housing',
|
|
28
|
+
value: 'Manufactured Housing'
|
|
29
|
+
}, {
|
|
30
|
+
label: 'Other',
|
|
31
|
+
value: 'Other'
|
|
32
|
+
}];
|
|
33
|
+
const QB_LOAN_VALUES_OPTIONS = [{
|
|
34
|
+
label: 'Conventional',
|
|
35
|
+
value: 'Conventional'
|
|
36
|
+
}, {
|
|
37
|
+
label: 'VA',
|
|
38
|
+
value: 'VA'
|
|
39
|
+
}, {
|
|
40
|
+
label: 'FHA',
|
|
41
|
+
value: 'FHA'
|
|
42
|
+
}, {
|
|
43
|
+
label: 'USAD-RHS',
|
|
44
|
+
value: 'USAD-RHS'
|
|
45
|
+
}, {
|
|
46
|
+
label: 'HELOC',
|
|
47
|
+
value: 'HELOC'
|
|
48
|
+
}, {
|
|
49
|
+
label: 'Other',
|
|
50
|
+
value: 'Other'
|
|
51
|
+
}];
|
|
52
|
+
const QB_FIELD_OPTIONS = [{
|
|
53
|
+
label: 'Select',
|
|
54
|
+
value: ''
|
|
55
|
+
}, {
|
|
56
|
+
label: 'Loan Type',
|
|
57
|
+
value: types.QB_FIELD_TYPES.LOAN_VALUES
|
|
58
|
+
}, {
|
|
59
|
+
label: 'Loan To Value (LTV)',
|
|
60
|
+
value: types.QB_FIELD_TYPES.LTV_VALUES
|
|
61
|
+
}, {
|
|
62
|
+
label: 'Subject Property Type',
|
|
63
|
+
value: types.QB_FIELD_TYPES.SUBJECT_VALUES
|
|
64
|
+
}, {
|
|
65
|
+
label: 'Last Finished Milestone',
|
|
66
|
+
value: types.QB_FIELD_TYPES.LAST_VALUES
|
|
67
|
+
}, {
|
|
68
|
+
label: 'Credit Score',
|
|
69
|
+
value: types.QB_FIELD_TYPES.CREDIT_VALUES
|
|
70
|
+
}];
|
|
71
|
+
const QB_OPERATOR_OPTIONS = [{
|
|
72
|
+
label: 'Select',
|
|
73
|
+
value: ''
|
|
74
|
+
}, {
|
|
75
|
+
label: 'Is',
|
|
76
|
+
value: types.QB_OPERATOR_TYPES.EQUAL
|
|
77
|
+
}, {
|
|
78
|
+
label: 'Is not',
|
|
79
|
+
value: types.QB_OPERATOR_TYPES.NOT_EQUAL
|
|
80
|
+
}, {
|
|
81
|
+
label: 'Greater than',
|
|
82
|
+
value: types.QB_OPERATOR_TYPES.GREATER_THAN
|
|
83
|
+
}, {
|
|
84
|
+
label: 'Less than',
|
|
85
|
+
value: types.QB_OPERATOR_TYPES.LESS_THAN
|
|
86
|
+
}, {
|
|
87
|
+
label: 'Contains',
|
|
88
|
+
value: types.QB_OPERATOR_TYPES.CONTAINS
|
|
89
|
+
}, {
|
|
90
|
+
label: "Doesn't Contain",
|
|
91
|
+
value: types.QB_OPERATOR_TYPES.NOT_CONTAINS
|
|
92
|
+
}, {
|
|
93
|
+
label: 'Between',
|
|
94
|
+
value: types.QB_OPERATOR_TYPES.BETWEEN
|
|
95
|
+
}];
|
|
96
|
+
|
|
97
|
+
exports.QB_DEFAULT_VALUES_OPTIONS = QB_DEFAULT_VALUES_OPTIONS;
|
|
98
|
+
exports.QB_FIELD_OPTIONS = QB_FIELD_OPTIONS;
|
|
99
|
+
exports.QB_LOAN_VALUES_OPTIONS = QB_LOAN_VALUES_OPTIONS;
|
|
100
|
+
exports.QB_OPERATOR_OPTIONS = QB_OPERATOR_OPTIONS;
|
|
101
|
+
exports.QB_SUBJECT_VALUES_OPTIONS = QB_SUBJECT_VALUES_OPTIONS;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
5
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
9
|
+
var actions = require('./actions.js');
|
|
10
|
+
var format = require('../format/format.js');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
15
|
+
|
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
+
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
/**
|
|
20
|
+
* Fluent interface: https://en.wikipedia.org/wiki/Fluent_interface
|
|
21
|
+
*
|
|
22
|
+
* @param idGroup
|
|
23
|
+
* @param parentIdGroup
|
|
24
|
+
* @param items
|
|
25
|
+
* @param idFilter
|
|
26
|
+
* @param value
|
|
27
|
+
* @param data
|
|
28
|
+
* @class QueryBuilderStore
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
class QueryBuilderStore {
|
|
32
|
+
constructor(init, _format) {
|
|
33
|
+
this.items = [];
|
|
34
|
+
this.step = 0;
|
|
35
|
+
this.steps = {};
|
|
36
|
+
this.mapFilters = {};
|
|
37
|
+
this.mapGroups = {};
|
|
38
|
+
this.main = null;
|
|
39
|
+
this.format = null;
|
|
40
|
+
|
|
41
|
+
this.createNewFilter = idGroup => actions.createNewFilter.call(this, idGroup);
|
|
42
|
+
|
|
43
|
+
this.createNewGroup = parentIdGroup => actions.createNewGroup.call(this, parentIdGroup);
|
|
44
|
+
|
|
45
|
+
this.onOrderDragAndDrop = items => {
|
|
46
|
+
this.items = items;
|
|
47
|
+
return this.getState();
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
this.addFilterNextToFilterId = (idGroup, idFilter) => {
|
|
51
|
+
// eslint-disable-line
|
|
52
|
+
this.addFilter(idGroup);
|
|
53
|
+
return this.getState();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
this.addFilter = idGroup => {
|
|
57
|
+
const newFilter = this.createNewFilter(idGroup);
|
|
58
|
+
actions.addFilterToMap.call(this, newFilter); // new API
|
|
59
|
+
|
|
60
|
+
if (this.main === idGroup) {
|
|
61
|
+
actions.addFilterToMainItem.call(this, this.items, newFilter);
|
|
62
|
+
} else {
|
|
63
|
+
const foundInItems = actions.findItemFilterById.call(this, idGroup);
|
|
64
|
+
|
|
65
|
+
if (foundInItems) {
|
|
66
|
+
actions.addFilterToItem.call(this, foundInItems, newFilter);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return this.getState();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
this.onRemoveFilter = idFilter => {
|
|
74
|
+
// new API
|
|
75
|
+
actions.removeFilterItem.call(this, idFilter);
|
|
76
|
+
return this.getState();
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
this.addRuleContainerInPlace = (idGroup, idFilter) => {
|
|
80
|
+
// Create a new group
|
|
81
|
+
const newGroup = this.createNewGroup(idGroup);
|
|
82
|
+
actions.addGroupFilterToItem.call(this, idGroup, idFilter, newGroup);
|
|
83
|
+
return this.getState();
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
this.addRuleContainer = (idGroup, idFilter) => {
|
|
87
|
+
// eslint-disable-line
|
|
88
|
+
const newGroup = this.createNewGroup(idGroup);
|
|
89
|
+
actions.addGroupToMap.call(this, newGroup);
|
|
90
|
+
|
|
91
|
+
if (this.main === idGroup) {
|
|
92
|
+
actions.addFilterToMainItem.call(this, this.items, newGroup);
|
|
93
|
+
} else {
|
|
94
|
+
const foundInItems = actions.findItemFilterById.call(this, idGroup);
|
|
95
|
+
|
|
96
|
+
if (foundInItems) {
|
|
97
|
+
actions.addFilterToItem.call(this, foundInItems, newGroup);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return this.getState();
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
this.unGroup = idGroup => {
|
|
105
|
+
actions.unGroupFilterToItem.call(this, idGroup);
|
|
106
|
+
return this.getState();
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
this.changeGroupOperator = (idGroup, value) => {
|
|
110
|
+
this.getGroupById(idGroup).condition = value;
|
|
111
|
+
actions.changeGroupOperator.call(this, idGroup, value);
|
|
112
|
+
return this.getState();
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
this.changeFilter = data => {
|
|
116
|
+
const {
|
|
117
|
+
idFilter
|
|
118
|
+
} = data;
|
|
119
|
+
this.mapFilters[idFilter] = _objectSpread(_objectSpread({}, this.mapFilters[idFilter]), data);
|
|
120
|
+
actions.changeFilterItem.call(this, data);
|
|
121
|
+
return this.getState();
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
this.getGroupById = idGroup => this.mapGroups[idGroup] || {};
|
|
125
|
+
|
|
126
|
+
this.getFilterById = idFilter => this.mapFilters[idFilter];
|
|
127
|
+
|
|
128
|
+
this.getInitialState = () => {
|
|
129
|
+
const newFilters = {
|
|
130
|
+
step: this.step,
|
|
131
|
+
mapFilters: _objectSpread({}, this.mapFilters),
|
|
132
|
+
mapGroups: _objectSpread({}, this.mapGroups),
|
|
133
|
+
main: this.main,
|
|
134
|
+
items: this.items
|
|
135
|
+
};
|
|
136
|
+
const format$1 = format.run(newFilters, this.format);
|
|
137
|
+
return _objectSpread(_objectSpread({}, newFilters), {}, {
|
|
138
|
+
format: format$1
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
this.getState = () => {
|
|
143
|
+
this.step += 1;
|
|
144
|
+
const newFilters = {
|
|
145
|
+
step: this.step,
|
|
146
|
+
mapFilters: _objectSpread({}, this.mapFilters),
|
|
147
|
+
mapGroups: _objectSpread({}, this.mapGroups),
|
|
148
|
+
main: this.main,
|
|
149
|
+
items: this.items
|
|
150
|
+
};
|
|
151
|
+
const format$1 = format.run(newFilters, this.format);
|
|
152
|
+
return _objectSpread(_objectSpread({}, newFilters), {}, {
|
|
153
|
+
format: format$1
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
this.firstLoad = true;
|
|
158
|
+
this.format = _format;
|
|
159
|
+
if (init) return this.initSetupUp(init);
|
|
160
|
+
const mainGroup = this.createNewGroup('main');
|
|
161
|
+
this.mapGroups = {
|
|
162
|
+
[mainGroup.idGroup]: mainGroup
|
|
163
|
+
};
|
|
164
|
+
this.main = mainGroup.idGroup;
|
|
165
|
+
this.addFilter(mainGroup.idGroup);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
initSetupUp(init) {
|
|
169
|
+
this.step = init.step || 1;
|
|
170
|
+
Object.keys(init).forEach(key => {
|
|
171
|
+
if (init[key] && this[key] !== undefined) this[key] = init[key];
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
module.exports = QueryBuilderStore;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const QB_FIELD_TYPES = {
|
|
6
|
+
LOAN_VALUES: 'loanValues',
|
|
7
|
+
LTV_VALUES: 'ltvValues',
|
|
8
|
+
SUBJECT_VALUES: 'subjectValues',
|
|
9
|
+
LAST_VALUES: 'lastValues',
|
|
10
|
+
CREDIT_VALUES: 'creditValues'
|
|
11
|
+
};
|
|
12
|
+
const QB_OPERATOR_TYPES = {
|
|
13
|
+
EQUAL: 'equal',
|
|
14
|
+
NOT_EQUAL: 'notEqual',
|
|
15
|
+
GREATER_THAN: 'greaterThan',
|
|
16
|
+
LESS_THAN: 'lessThan',
|
|
17
|
+
CONTAINS: 'contains',
|
|
18
|
+
NOT_CONTAINS: 'notNontains',
|
|
19
|
+
BETWEEN: 'between',
|
|
20
|
+
GREATER_THAN_OR_EQUAL: 'greaterThanOrEquals',
|
|
21
|
+
LESS_THAN_OR_EQUAL: 'lessThanOrEquals',
|
|
22
|
+
START_WITH: 'startsWith'
|
|
23
|
+
};
|
|
24
|
+
const QB_GROUP_CONDITION_TYPES = {
|
|
25
|
+
AND: true,
|
|
26
|
+
OR: false
|
|
27
|
+
};
|
|
28
|
+
const QB_DRAG_TYPES = {
|
|
29
|
+
FILTER: 'filter',
|
|
30
|
+
GROUP: 'group'
|
|
31
|
+
};
|
|
32
|
+
const QB_DRAG_LOCATIONS = {
|
|
33
|
+
ABOVE: 'above',
|
|
34
|
+
BELOW: 'below'
|
|
35
|
+
};
|
|
36
|
+
const QB_EXPORT_FORMAT_TYPES = {
|
|
37
|
+
DEFAULT: 'defaultFormat',
|
|
38
|
+
XML: 'xmlFormat',
|
|
39
|
+
SQL: 'sqlFormat',
|
|
40
|
+
SAFESQL: 'sqlSafeFormat'
|
|
41
|
+
};
|
|
42
|
+
const QB_ADD_FILTER_METHOD_TYPES = {
|
|
43
|
+
IN_PLACE: 'inplace',
|
|
44
|
+
APPEND: 'append'
|
|
45
|
+
};
|
|
46
|
+
const QB_GROUP_FILTER_METHOD_TYPES = {
|
|
47
|
+
IN_PLACE: 'inplace',
|
|
48
|
+
APPEND: 'append'
|
|
49
|
+
};
|
|
50
|
+
const QB_FIELD_SHARED_ACTIONS = {
|
|
51
|
+
RESET_FIELD: 'resetField',
|
|
52
|
+
RESET_OPERATOR: 'resetOperator',
|
|
53
|
+
RESET_VALUE: 'resetValue'
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.QB_ADD_FILTER_METHOD_TYPES = QB_ADD_FILTER_METHOD_TYPES;
|
|
57
|
+
exports.QB_DRAG_LOCATIONS = QB_DRAG_LOCATIONS;
|
|
58
|
+
exports.QB_DRAG_TYPES = QB_DRAG_TYPES;
|
|
59
|
+
exports.QB_EXPORT_FORMAT_TYPES = QB_EXPORT_FORMAT_TYPES;
|
|
60
|
+
exports.QB_FIELD_SHARED_ACTIONS = QB_FIELD_SHARED_ACTIONS;
|
|
61
|
+
exports.QB_FIELD_TYPES = QB_FIELD_TYPES;
|
|
62
|
+
exports.QB_GROUP_CONDITION_TYPES = QB_GROUP_CONDITION_TYPES;
|
|
63
|
+
exports.QB_GROUP_FILTER_METHOD_TYPES = QB_GROUP_FILTER_METHOD_TYPES;
|
|
64
|
+
exports.QB_OPERATOR_TYPES = QB_OPERATOR_TYPES;
|
package/cjs/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
|
|
8
|
+
const props = {
|
|
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])
|
|
29
|
+
}))
|
|
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)
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
exports.props = props;
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
|
|
71
|
+
const DSQueryBuilderWithSchema = describe(DSQueryBuilder);
|
|
72
|
+
DSQueryBuilderWithSchema.propTypes = props;
|
|
73
|
+
|
|
74
|
+
export { DSQueryBuilder, DSQueryBuilderWithSchema, DSQueryBuilder as default };
|