@elliemae/ds-query-builder 3.14.0-next.16 → 3.14.0-next.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/DSQueryBuilder.d.ts +97 -0
- package/dist/types/components/AndOrController/AndOrController.d.ts +38 -0
- package/dist/types/components/ConditionController/ConditionController.d.ts +15 -0
- package/dist/types/components/DisplayOutput/DisplayOutput.d.ts +7 -0
- package/dist/types/components/DragContainerController/DragContainerController.d.ts +8 -0
- package/dist/types/components/DragControllerRow/DragControllerRow.d.ts +8 -0
- package/dist/types/components/FieldControllerRow/FieldControllerRow.d.ts +8 -0
- package/dist/types/components/Nestable/Nestable.d.ts +51 -0
- package/dist/types/components/Nestable/NestableItem.d.ts +11 -0
- package/dist/types/components/Nestable/actions/events.d.ts +6 -0
- package/dist/types/components/Nestable/actions/getItemOptions.d.ts +11 -0
- package/dist/types/components/Nestable/actions/getPaths.d.ts +5 -0
- package/dist/types/components/Nestable/actions/index.d.ts +6 -0
- package/dist/types/components/Nestable/actions/moveItem.d.ts +5 -0
- package/dist/types/components/Nestable/actions/paths.d.ts +5 -0
- package/dist/types/components/Nestable/actions/tryDecreaseDepth.d.ts +1 -0
- package/dist/types/components/Nestable/actions/tryIncreaseDepth.d.ts +1 -0
- package/dist/types/components/Nestable/index.d.ts +2 -0
- package/dist/types/components/QueryBuilderContext/QueryBuilderContext.d.ts +2 -0
- package/dist/types/components/QueryBuilderImpl.d.ts +49 -0
- package/dist/types/components/QueryBuilderItem/QueryBuilderItem.d.ts +4 -0
- package/dist/types/components/QueryBuilderRow/QueryBuilderRow.d.ts +12 -0
- package/dist/types/components/ToolBarAnimation/ToolBarAnimation.d.ts +2 -0
- package/dist/types/components/format/format.d.ts +26 -0
- package/dist/types/components/format/sqlFormat.d.ts +5 -0
- package/dist/types/components/format/sqlSafeFormat.d.ts +6 -0
- package/dist/types/components/format/xmlFormat.d.ts +5 -0
- package/dist/types/components/helpers/actions.d.ts +63 -0
- package/dist/types/components/helpers/adapter.d.ts +26 -0
- package/dist/types/components/helpers/constants.d.ts +3 -0
- package/dist/types/components/helpers/dependencies.d.ts +1 -0
- package/dist/types/components/helpers/selectors.d.ts +20 -0
- package/dist/types/components/helpers/store.d.ts +144 -0
- package/dist/types/components/helpers/types.d.ts +50 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/propTypes.d.ts +46 -0
- package/package.json +12 -12
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { QB_FIELD_TYPES, QB_OPERATOR_TYPES, QB_GROUP_CONDITION_TYPES, QB_DRAG_TYPES, QB_DRAG_LOCATIONS, QB_EXPORT_FORMAT_TYPES, QB_ADD_FILTER_METHOD_TYPES, QB_GROUP_FILTER_METHOD_TYPES, QB_FIELD_SHARED_ACTIONS } from './components/helpers/types';
|
|
2
|
+
import { QB_OPERATOR_OPTIONS, QB_DEFAULT_VALUES_OPTIONS, QB_FIELD_OPTIONS, QB_LOAN_VALUES_OPTIONS, QB_SUBJECT_VALUES_OPTIONS } from './components/helpers/selectors';
|
|
3
|
+
import QueryBuilderFormat from './components/format/format';
|
|
4
|
+
declare const DSQueryBuilder: {
|
|
5
|
+
({ containerProps, addFilterMethod, groupFilterMethod, onChange, fields, fieldsSharedActions, format, init, ruleContainerClassName, handleDrop, handleDropFilter, handleDropGroup, handleFieldChange, handleRuleContainerOperator, handleRuleContainerUnGroup, onAddFilter, onAddRuleContainer, onRemoveFilter, displayFixedOutput, displayOutput, displayOutputLabel, singleRow, toolTipZIndex, }: {
|
|
6
|
+
containerProps?: {} | undefined;
|
|
7
|
+
addFilterMethod?: string | undefined;
|
|
8
|
+
groupFilterMethod?: string | undefined;
|
|
9
|
+
onChange?: (() => null) | undefined;
|
|
10
|
+
fields?: never[] | undefined;
|
|
11
|
+
fieldsSharedActions?: {
|
|
12
|
+
onFieldChange: never[];
|
|
13
|
+
onOperatorChange: never[];
|
|
14
|
+
onValueChange: never[];
|
|
15
|
+
} | undefined;
|
|
16
|
+
format?: string | undefined;
|
|
17
|
+
init?: null | undefined;
|
|
18
|
+
ruleContainerClassName?: string | undefined;
|
|
19
|
+
handleDrop?: (() => null) | undefined;
|
|
20
|
+
handleDropFilter?: (() => null) | undefined;
|
|
21
|
+
handleDropGroup?: (() => null) | undefined;
|
|
22
|
+
handleFieldChange?: (() => null) | undefined;
|
|
23
|
+
handleRuleContainerOperator?: (() => null) | undefined;
|
|
24
|
+
handleRuleContainerUnGroup?: (() => null) | undefined;
|
|
25
|
+
onAddFilter?: (() => null) | undefined;
|
|
26
|
+
onAddRuleContainer?: (() => null) | undefined;
|
|
27
|
+
onRemoveFilter?: (() => null) | undefined;
|
|
28
|
+
displayFixedOutput: any;
|
|
29
|
+
displayOutput?: boolean | undefined;
|
|
30
|
+
displayOutputLabel?: {
|
|
31
|
+
show: string;
|
|
32
|
+
hide: string;
|
|
33
|
+
} | undefined;
|
|
34
|
+
singleRow?: boolean | undefined;
|
|
35
|
+
toolTipZIndex?: number | undefined;
|
|
36
|
+
}): JSX.Element;
|
|
37
|
+
propTypes: {
|
|
38
|
+
containerProps: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
39
|
+
addFilterMethod: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
40
|
+
groupFilterMethod: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
41
|
+
onChange: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
42
|
+
fields: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
43
|
+
fieldsSharedActions: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
44
|
+
format: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
45
|
+
init: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
46
|
+
ruleContainerClassName: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
47
|
+
handleDrop: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
48
|
+
handleDropFilter: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
49
|
+
handleDropGroup: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
50
|
+
handleFieldChange: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
51
|
+
handleRuleContainerOperator: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
52
|
+
handleRuleContainerUnGroup: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
53
|
+
onAddFilter: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
54
|
+
onAddRuleContainer: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
55
|
+
onRemoveFilter: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
56
|
+
displayFixedOutput: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
57
|
+
displayOutput: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
58
|
+
displayOutputLabel: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
59
|
+
singleRow: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
60
|
+
toolTipZIndex: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
61
|
+
};
|
|
62
|
+
displayName: string;
|
|
63
|
+
};
|
|
64
|
+
declare const DSQueryBuilderWithSchema: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").DocumentedReactComponent<{
|
|
65
|
+
containerProps?: {} | undefined;
|
|
66
|
+
addFilterMethod?: string | undefined;
|
|
67
|
+
groupFilterMethod?: string | undefined;
|
|
68
|
+
onChange?: (() => null) | undefined;
|
|
69
|
+
fields?: never[] | undefined;
|
|
70
|
+
fieldsSharedActions?: {
|
|
71
|
+
onFieldChange: never[];
|
|
72
|
+
onOperatorChange: never[];
|
|
73
|
+
onValueChange: never[];
|
|
74
|
+
} | undefined;
|
|
75
|
+
format?: string | undefined;
|
|
76
|
+
init?: null | undefined;
|
|
77
|
+
ruleContainerClassName?: string | undefined;
|
|
78
|
+
handleDrop?: (() => null) | undefined;
|
|
79
|
+
handleDropFilter?: (() => null) | undefined;
|
|
80
|
+
handleDropGroup?: (() => null) | undefined;
|
|
81
|
+
handleFieldChange?: (() => null) | undefined;
|
|
82
|
+
handleRuleContainerOperator?: (() => null) | undefined;
|
|
83
|
+
handleRuleContainerUnGroup?: (() => null) | undefined;
|
|
84
|
+
onAddFilter?: (() => null) | undefined;
|
|
85
|
+
onAddRuleContainer?: (() => null) | undefined;
|
|
86
|
+
onRemoveFilter?: (() => null) | undefined;
|
|
87
|
+
displayFixedOutput: any;
|
|
88
|
+
displayOutput?: boolean | undefined;
|
|
89
|
+
displayOutputLabel?: {
|
|
90
|
+
show: string;
|
|
91
|
+
hide: string;
|
|
92
|
+
} | undefined;
|
|
93
|
+
singleRow?: boolean | undefined;
|
|
94
|
+
toolTipZIndex?: number | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
export { QB_FIELD_SHARED_ACTIONS, QB_FIELD_TYPES, QB_OPERATOR_TYPES, QB_OPERATOR_OPTIONS, QB_DEFAULT_VALUES_OPTIONS, QB_FIELD_OPTIONS, QB_LOAN_VALUES_OPTIONS, QB_SUBJECT_VALUES_OPTIONS, QB_GROUP_CONDITION_TYPES, QB_DRAG_TYPES, QB_DRAG_LOCATIONS, QB_EXPORT_FORMAT_TYPES, QB_ADD_FILTER_METHOD_TYPES, QB_GROUP_FILTER_METHOD_TYPES, QueryBuilderFormat, DSQueryBuilderWithSchema, DSQueryBuilder, };
|
|
97
|
+
export default DSQueryBuilder;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* condition-display-step: required to avoid the cache of the trigger
|
|
4
|
+
*
|
|
5
|
+
* @param e
|
|
6
|
+
* @param isOpen
|
|
7
|
+
*/
|
|
8
|
+
declare class AndOrController extends Component {
|
|
9
|
+
static defaultProps: {
|
|
10
|
+
isMain: boolean;
|
|
11
|
+
handleRuleContainerOperator: () => null;
|
|
12
|
+
handleRuleContainerUnGroup: () => null;
|
|
13
|
+
handleTooltipGroup: () => null;
|
|
14
|
+
labelOn: string;
|
|
15
|
+
labelOff: string;
|
|
16
|
+
condition: boolean;
|
|
17
|
+
showDragController: boolean;
|
|
18
|
+
allowUnGroup: boolean;
|
|
19
|
+
buttonActionSize: string;
|
|
20
|
+
buttonActionType: string;
|
|
21
|
+
toogleActionSize: string;
|
|
22
|
+
onAddFilter: () => null;
|
|
23
|
+
multipleSize: boolean;
|
|
24
|
+
delayClose: number;
|
|
25
|
+
delayOpen: number;
|
|
26
|
+
step: null;
|
|
27
|
+
toolBarAnimationDuration: number;
|
|
28
|
+
toolBarInteractionType: string;
|
|
29
|
+
toolBarPosition: string;
|
|
30
|
+
};
|
|
31
|
+
constructor(props: any);
|
|
32
|
+
handleMouseEnterRow: (e: any) => void;
|
|
33
|
+
handleMouseMove: (e: any) => void;
|
|
34
|
+
handleMouseLeaveRow: () => void;
|
|
35
|
+
handleTooltipRow: (isOpen: any) => void;
|
|
36
|
+
render(): JSX.Element;
|
|
37
|
+
}
|
|
38
|
+
export default AndOrController;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const ConditionController: ({ onAddFilter, onAddRuleContainer, onRemoveFilter, handleTooltipRow, buttonTriggerSize, buttonTriggerType, buttonActionSize, buttonActionType, delayClose, delayOpen, isOpen, toolTipZIndex, }: {
|
|
2
|
+
onAddFilter?: (() => null) | undefined;
|
|
3
|
+
onAddRuleContainer?: (() => null) | undefined;
|
|
4
|
+
onRemoveFilter?: (() => null) | undefined;
|
|
5
|
+
handleTooltipRow?: (() => null) | undefined;
|
|
6
|
+
buttonTriggerSize?: string | undefined;
|
|
7
|
+
buttonTriggerType?: string | undefined;
|
|
8
|
+
buttonActionSize?: string | undefined;
|
|
9
|
+
buttonActionType?: string | undefined;
|
|
10
|
+
delayClose?: number | undefined;
|
|
11
|
+
delayOpen?: number | undefined;
|
|
12
|
+
isOpen?: boolean | undefined;
|
|
13
|
+
toolTipZIndex: any;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
export default ConditionController;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const DragContainerController: ({ color, icon: Icon, size, multipleSize, onClick, }: {
|
|
2
|
+
color?: string[] | undefined;
|
|
3
|
+
icon?: ((rest: any) => JSX.Element) | undefined;
|
|
4
|
+
size?: string | undefined;
|
|
5
|
+
multipleSize?: boolean | undefined;
|
|
6
|
+
onClick: any;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export default DragContainerController;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const DragControllerRow: ({ className, color, icon: Icon, size, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
color?: string[] | undefined;
|
|
5
|
+
icon?: ((rest: any) => JSX.Element) | undefined;
|
|
6
|
+
size?: string | undefined;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export default DragControllerRow;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const FieldControllerRow: ({ className, onChange, options, value, type, }: {
|
|
2
|
+
className?: string | undefined;
|
|
3
|
+
onChange?: (() => null) | undefined;
|
|
4
|
+
options?: never[] | undefined;
|
|
5
|
+
value?: string | undefined;
|
|
6
|
+
type?: string | undefined;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export default FieldControllerRow;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
declare class Nestable extends Component {
|
|
3
|
+
constructor(props: any);
|
|
4
|
+
componentDidMount(): void;
|
|
5
|
+
componentWillUnmount(): void;
|
|
6
|
+
static getDerivedStateFromProps(props: any, state: any): {
|
|
7
|
+
items: any;
|
|
8
|
+
dragItem: null;
|
|
9
|
+
isDirty: boolean;
|
|
10
|
+
oldProps: any;
|
|
11
|
+
} | null;
|
|
12
|
+
onDragStart: (e: any, item: any) => void;
|
|
13
|
+
onDragEnd: (e: any, isCancel: any) => any;
|
|
14
|
+
onMouseMove: (e: any) => void;
|
|
15
|
+
onMouseEnter: (e: any, item: any) => void;
|
|
16
|
+
onToggleCollapse: (item: any, isGetter: any) => any;
|
|
17
|
+
onKeyDown: (e: any) => void;
|
|
18
|
+
getDefaultItems: () => any;
|
|
19
|
+
getPathById(id: any, items?: any): any[];
|
|
20
|
+
getItemByPath(path: any, items?: any): null;
|
|
21
|
+
getItemDepth: (item: any) => number;
|
|
22
|
+
getSplicePath(path: any, options?: {}): {};
|
|
23
|
+
getRealNextPath(prevPath: any, nextPath: any): any;
|
|
24
|
+
getItemOptions(): {
|
|
25
|
+
dragItem: any;
|
|
26
|
+
childrenProp: any;
|
|
27
|
+
renderItem: any;
|
|
28
|
+
renderCollapseIcon: any;
|
|
29
|
+
handler: any;
|
|
30
|
+
onDragStart: any;
|
|
31
|
+
onMouseEnter: any;
|
|
32
|
+
isCollapsed: any;
|
|
33
|
+
onToggleCollapse: any;
|
|
34
|
+
};
|
|
35
|
+
startTrackMouse: () => void;
|
|
36
|
+
stopTrackMouse: () => void;
|
|
37
|
+
isCollapsed: (item: any) => boolean;
|
|
38
|
+
checkFilterChildren: (items: any) => any;
|
|
39
|
+
dragRevert: () => void;
|
|
40
|
+
dragApply(): void;
|
|
41
|
+
tryIncreaseDepth(dragItem: any): void;
|
|
42
|
+
tryDecreaseDepth(dragItem: any): void;
|
|
43
|
+
moveItem({ dragItem, pathFrom, pathTo }: {
|
|
44
|
+
dragItem: any;
|
|
45
|
+
pathFrom: any;
|
|
46
|
+
pathTo: any;
|
|
47
|
+
}, extraProps?: {}): void;
|
|
48
|
+
renderDragLayer(): JSX.Element;
|
|
49
|
+
render(): JSX.Element;
|
|
50
|
+
}
|
|
51
|
+
export default Nestable;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const NestableItem: ({ item, isCopy, options, index, isAndItem, isOrItem, isDraggableItem, singleRow, }: {
|
|
2
|
+
item: any;
|
|
3
|
+
isCopy: any;
|
|
4
|
+
options: any;
|
|
5
|
+
index: any;
|
|
6
|
+
isAndItem: any;
|
|
7
|
+
isOrItem: any;
|
|
8
|
+
isDraggableItem: any;
|
|
9
|
+
singleRow: any;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default NestableItem;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function onDragStart(e: any, item: any): void;
|
|
2
|
+
export declare function onDragEnd(e: any, isCancel: any): any;
|
|
3
|
+
export declare function onMouseMove(e: any): void;
|
|
4
|
+
export declare function onMouseEnter(e: any, item: any): void;
|
|
5
|
+
export declare function onToggleCollapse(item: any, isGetter: any): any;
|
|
6
|
+
export declare function onKeyDown(e: any): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getRealNextPath(prevPath: any, nextPath: any): any;
|
|
2
|
+
export declare function getPathById(id: any, items: any): any[];
|
|
3
|
+
export declare function getItemByPath(path: any, items: any): null;
|
|
4
|
+
export declare function getItemDepth(item: any): number;
|
|
5
|
+
export declare function getSplicePath(path: any, options?: {}): {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function getRealNextPath(prevPath: any, nextPath: any): any;
|
|
2
|
+
export declare function getPathById(id: any, items?: any): any[];
|
|
3
|
+
export declare function getItemByPath(path: any, items?: any): null;
|
|
4
|
+
export declare function getItemDepth(item: any): number;
|
|
5
|
+
export declare function getSplicePath(path: any, options?: {}): {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function tryDecreaseDepth(dragItem: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function tryIncreaseDepth(dragItem: any): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
declare class QueryBuilderImpl extends Component {
|
|
3
|
+
isDraggableItem: boolean;
|
|
4
|
+
constructor(props: any);
|
|
5
|
+
onOrderDragAndDrop: (items: any, item: any) => void;
|
|
6
|
+
onAddFilterToGroup: (idGroup: any) => void;
|
|
7
|
+
onAddFilter: (idGroup: any, idFilter: any) => void;
|
|
8
|
+
onAddRuleContainer: (idGroup: any, idFilter: any) => void;
|
|
9
|
+
onRemoveFilter: (idFilter: any) => void;
|
|
10
|
+
static getDerivedStateFromProps(props: any, state: any): {
|
|
11
|
+
format: any;
|
|
12
|
+
step: number;
|
|
13
|
+
mapFilters: {};
|
|
14
|
+
mapGroups: {};
|
|
15
|
+
main: null;
|
|
16
|
+
items: never[];
|
|
17
|
+
} | null;
|
|
18
|
+
componentDidUpdate(): void;
|
|
19
|
+
handleFieldChange: (data: any) => void;
|
|
20
|
+
handleRuleContainerOperator: (idGroup: any, value: any) => void;
|
|
21
|
+
handleRuleContainerUnGroup: (idGroup: any) => void;
|
|
22
|
+
/**
|
|
23
|
+
* handleFieldChange and handleDropFilter
|
|
24
|
+
* are equals right now, but they maybe
|
|
25
|
+
* will have diferents logic
|
|
26
|
+
*
|
|
27
|
+
* @param filter
|
|
28
|
+
* @param dragTo
|
|
29
|
+
*/
|
|
30
|
+
handleDropFilter: (filter: any, dragTo: any) => void;
|
|
31
|
+
/**
|
|
32
|
+
* handleFieldChange and handleDropFilter
|
|
33
|
+
* are equals right now, but they maybe
|
|
34
|
+
* will have diferents logic
|
|
35
|
+
*
|
|
36
|
+
* @param group
|
|
37
|
+
* @param dragTo
|
|
38
|
+
*/
|
|
39
|
+
handleDropGroup: (group: any, dragTo: any) => void;
|
|
40
|
+
handleDrop: (dragElement: any, dragTo: any) => void;
|
|
41
|
+
sendChange: ({ format, ...newFilters }: {
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
format: any;
|
|
44
|
+
}) => void;
|
|
45
|
+
sendCall: (action: any, data: any) => void;
|
|
46
|
+
setDraggableItems: (drag: any) => void;
|
|
47
|
+
render(): JSX.Element;
|
|
48
|
+
}
|
|
49
|
+
export default QueryBuilderImpl;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
declare class QueryBuilderRow extends Component<any, any> {
|
|
3
|
+
constructor(props: any);
|
|
4
|
+
onChangeHandler(e: any, target: any, extraData: any, hasError: any): void;
|
|
5
|
+
handleMouseEnterRow: () => void;
|
|
6
|
+
handleMouseLeaveRow: () => void;
|
|
7
|
+
handleMouseEnterInput: () => void;
|
|
8
|
+
handleMouseLeaveInput: () => void;
|
|
9
|
+
handleTooltipRow: (isOpen: any) => void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export default QueryBuilderRow;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare class QueryBuilderFormat {
|
|
2
|
+
format: {
|
|
3
|
+
defaultFormat: (query: any) => any;
|
|
4
|
+
sqlFormat: ({ main, mapGroups, items }: {
|
|
5
|
+
main: any;
|
|
6
|
+
mapGroups: any;
|
|
7
|
+
items: any;
|
|
8
|
+
}) => string;
|
|
9
|
+
xmlFormat: ({ main, mapGroups, items }: {
|
|
10
|
+
main: any;
|
|
11
|
+
mapGroups: any;
|
|
12
|
+
items: any;
|
|
13
|
+
}) => string;
|
|
14
|
+
sqlSafeFormat: ({ main, mapGroups, items }: {
|
|
15
|
+
main: any;
|
|
16
|
+
mapGroups: any;
|
|
17
|
+
items: any;
|
|
18
|
+
}) => string;
|
|
19
|
+
};
|
|
20
|
+
currentFormat: string;
|
|
21
|
+
setDefaultFormat: (formatName: any) => void;
|
|
22
|
+
addFormat: (formatName: any, format: any) => any;
|
|
23
|
+
run: (query: any, formatName: any) => any;
|
|
24
|
+
}
|
|
25
|
+
declare const _default: QueryBuilderFormat;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* this is injected. instance of QBStore
|
|
3
|
+
*
|
|
4
|
+
* @param {*} idGroup: UUID
|
|
5
|
+
* @param idGroup
|
|
6
|
+
*/
|
|
7
|
+
export declare const createNewFilter: (idGroup: any) => {
|
|
8
|
+
idGroup: any;
|
|
9
|
+
field: string;
|
|
10
|
+
condition: string;
|
|
11
|
+
value: string;
|
|
12
|
+
idFilter: string;
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* this is injected. instance of QBStore
|
|
17
|
+
*
|
|
18
|
+
* @param {*} parentIdGroup: UUID
|
|
19
|
+
* @param parentIdGroup
|
|
20
|
+
*/
|
|
21
|
+
export declare const createNewGroup: (parentIdGroup: any) => {
|
|
22
|
+
parentIdGroup: any;
|
|
23
|
+
idGroup: string;
|
|
24
|
+
condition: boolean;
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* this is injected. instance of QBStore
|
|
29
|
+
*
|
|
30
|
+
* @param {*} newFilter
|
|
31
|
+
*/
|
|
32
|
+
export declare const addFilterToMap: (newFilter: any) => void;
|
|
33
|
+
/**
|
|
34
|
+
* this is injected. instance of QBStore
|
|
35
|
+
*
|
|
36
|
+
* @param {*} newFilter
|
|
37
|
+
* @param newGroup
|
|
38
|
+
*/
|
|
39
|
+
export declare const addGroupToMap: (newGroup: any) => void;
|
|
40
|
+
export declare const addFilterToItem: (item: any, newFilter: any) => void;
|
|
41
|
+
export declare const addFilterToMainItem: (items: any, newFilter: any) => void;
|
|
42
|
+
export declare const findInChilds: (childs: any, filterId: any) => any;
|
|
43
|
+
export declare const findItemFilterById: (filterId: any) => any;
|
|
44
|
+
export declare const findParentWithFilterId: (childs: any, filterId: any) => any;
|
|
45
|
+
export declare const findParentFilterById: (filterId: any) => any;
|
|
46
|
+
export declare const filterInChildren: (childs: any, filterId: any, mainId: any) => any;
|
|
47
|
+
export declare const removeFilterItem: (filterId: any) => void;
|
|
48
|
+
export declare const addGroupFilterToItem: (idGroup: any, idFilter: any, newGroup: any) => void;
|
|
49
|
+
export declare const unGroupFilterToItem: (idGroup: any) => void;
|
|
50
|
+
export declare const changeGroupOperator: (idGroup: any, value: any) => void;
|
|
51
|
+
export declare const changeFilterItem: ({ idFilter, field, value, operator, additionalInfo, target, fieldsSharedActions: { onFieldChange, onOperatorChange, onValueChange }, }: {
|
|
52
|
+
idFilter: any;
|
|
53
|
+
field: any;
|
|
54
|
+
value: any;
|
|
55
|
+
operator: any;
|
|
56
|
+
additionalInfo: any;
|
|
57
|
+
target: any;
|
|
58
|
+
fieldsSharedActions: {
|
|
59
|
+
onFieldChange: any;
|
|
60
|
+
onOperatorChange: any;
|
|
61
|
+
onValueChange: any;
|
|
62
|
+
};
|
|
63
|
+
}) => void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const adapterV2toV1: (value: any[]) => {
|
|
2
|
+
step: number;
|
|
3
|
+
mapFilters: {};
|
|
4
|
+
mapGroups: {
|
|
5
|
+
[x: string]: {
|
|
6
|
+
parentIdGroup: string;
|
|
7
|
+
idGroup: string;
|
|
8
|
+
condition: boolean;
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
main: string;
|
|
13
|
+
items: any;
|
|
14
|
+
};
|
|
15
|
+
export declare const adapterV1toV2: (data: {
|
|
16
|
+
main: any;
|
|
17
|
+
mapGroups: {
|
|
18
|
+
[x: string]: {
|
|
19
|
+
condition: any;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
items: any;
|
|
23
|
+
}) => {
|
|
24
|
+
logical: string;
|
|
25
|
+
fields: never[];
|
|
26
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const resolveDependencies: (state: any, fields: any) => any;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const QB_DEFAULT_VALUES_OPTIONS: {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const QB_SUBJECT_VALUES_OPTIONS: {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const QB_LOAN_VALUES_OPTIONS: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
export declare const QB_FIELD_OPTIONS: {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
export declare const QB_OPERATOR_OPTIONS: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fluent interface: https://en.wikipedia.org/wiki/Fluent_interface
|
|
3
|
+
*
|
|
4
|
+
* @param idGroup
|
|
5
|
+
* @param parentIdGroup
|
|
6
|
+
* @param items
|
|
7
|
+
* @param idFilter
|
|
8
|
+
* @param value
|
|
9
|
+
* @param data
|
|
10
|
+
* @class QueryBuilderStore
|
|
11
|
+
*/
|
|
12
|
+
declare class QueryBuilderStore {
|
|
13
|
+
items: never[];
|
|
14
|
+
step: number;
|
|
15
|
+
steps: {};
|
|
16
|
+
mapFilters: {};
|
|
17
|
+
mapGroups: {};
|
|
18
|
+
main: null;
|
|
19
|
+
format: null;
|
|
20
|
+
constructor(init: any, format: any);
|
|
21
|
+
initSetupUp(init: any): void;
|
|
22
|
+
createNewFilter: (idGroup: any) => {
|
|
23
|
+
idGroup: any;
|
|
24
|
+
field: string;
|
|
25
|
+
condition: string;
|
|
26
|
+
/**
|
|
27
|
+
* Fluent interface: https://en.wikipedia.org/wiki/Fluent_interface
|
|
28
|
+
*
|
|
29
|
+
* @param idGroup
|
|
30
|
+
* @param parentIdGroup
|
|
31
|
+
* @param items
|
|
32
|
+
* @param idFilter
|
|
33
|
+
* @param value
|
|
34
|
+
* @param data
|
|
35
|
+
* @class QueryBuilderStore
|
|
36
|
+
*/
|
|
37
|
+
value: string;
|
|
38
|
+
idFilter: string;
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
createNewGroup: (parentIdGroup: any) => {
|
|
42
|
+
parentIdGroup: any;
|
|
43
|
+
idGroup: string;
|
|
44
|
+
condition: boolean;
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
onOrderDragAndDrop: (items: any) => {
|
|
48
|
+
format: any;
|
|
49
|
+
step: number;
|
|
50
|
+
mapFilters: {};
|
|
51
|
+
mapGroups: {};
|
|
52
|
+
main: null;
|
|
53
|
+
items: never[];
|
|
54
|
+
};
|
|
55
|
+
addFilterNextToFilterId: (idGroup: any, idFilter: any) => {
|
|
56
|
+
format: any;
|
|
57
|
+
step: number;
|
|
58
|
+
mapFilters: {};
|
|
59
|
+
mapGroups: {};
|
|
60
|
+
main: null;
|
|
61
|
+
items: never[];
|
|
62
|
+
};
|
|
63
|
+
addFilter: (idGroup: any) => {
|
|
64
|
+
format: any;
|
|
65
|
+
step: number;
|
|
66
|
+
mapFilters: {};
|
|
67
|
+
mapGroups: {};
|
|
68
|
+
main: null;
|
|
69
|
+
items: never[];
|
|
70
|
+
};
|
|
71
|
+
onRemoveFilter: (idFilter: any) => {
|
|
72
|
+
format: any;
|
|
73
|
+
step: number;
|
|
74
|
+
mapFilters: {};
|
|
75
|
+
mapGroups: {};
|
|
76
|
+
main: null;
|
|
77
|
+
items: never[];
|
|
78
|
+
};
|
|
79
|
+
addRuleContainerInPlace: (idGroup: any, idFilter: any) => {
|
|
80
|
+
format: any;
|
|
81
|
+
step: number;
|
|
82
|
+
mapFilters: {};
|
|
83
|
+
mapGroups: {};
|
|
84
|
+
main: null;
|
|
85
|
+
items: never[];
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Group a filter inside a new Group
|
|
89
|
+
*
|
|
90
|
+
* @param idGroup
|
|
91
|
+
* @param idFilter
|
|
92
|
+
*/
|
|
93
|
+
addRuleContainer: (idGroup: any, idFilter: any) => {
|
|
94
|
+
format: any;
|
|
95
|
+
step: number;
|
|
96
|
+
mapFilters: {};
|
|
97
|
+
mapGroups: {};
|
|
98
|
+
main: null;
|
|
99
|
+
items: never[];
|
|
100
|
+
};
|
|
101
|
+
unGroup: (idGroup: any) => {
|
|
102
|
+
format: any;
|
|
103
|
+
step: number;
|
|
104
|
+
mapFilters: {};
|
|
105
|
+
mapGroups: {};
|
|
106
|
+
main: null;
|
|
107
|
+
items: never[];
|
|
108
|
+
};
|
|
109
|
+
changeGroupOperator: (idGroup: any, value: any) => {
|
|
110
|
+
format: any;
|
|
111
|
+
step: number;
|
|
112
|
+
mapFilters: {};
|
|
113
|
+
mapGroups: {};
|
|
114
|
+
main: null;
|
|
115
|
+
items: never[];
|
|
116
|
+
};
|
|
117
|
+
changeFilter: (data: any) => {
|
|
118
|
+
format: any;
|
|
119
|
+
step: number;
|
|
120
|
+
mapFilters: {};
|
|
121
|
+
mapGroups: {};
|
|
122
|
+
main: null;
|
|
123
|
+
items: never[];
|
|
124
|
+
};
|
|
125
|
+
getGroupById: (idGroup: any) => any;
|
|
126
|
+
getFilterById: (idFilter: any) => any;
|
|
127
|
+
getInitialState: () => {
|
|
128
|
+
format: any;
|
|
129
|
+
step: number;
|
|
130
|
+
mapFilters: {};
|
|
131
|
+
mapGroups: {};
|
|
132
|
+
main: null;
|
|
133
|
+
items: never[];
|
|
134
|
+
};
|
|
135
|
+
getState: () => {
|
|
136
|
+
format: any;
|
|
137
|
+
step: number;
|
|
138
|
+
mapFilters: {};
|
|
139
|
+
mapGroups: {};
|
|
140
|
+
main: null;
|
|
141
|
+
items: never[];
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export default QueryBuilderStore;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const QB_FIELD_TYPES: {
|
|
2
|
+
LOAN_VALUES: string;
|
|
3
|
+
LTV_VALUES: string;
|
|
4
|
+
SUBJECT_VALUES: string;
|
|
5
|
+
LAST_VALUES: string;
|
|
6
|
+
CREDIT_VALUES: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const QB_OPERATOR_TYPES: {
|
|
9
|
+
EQUAL: string;
|
|
10
|
+
NOT_EQUAL: string;
|
|
11
|
+
GREATER_THAN: string;
|
|
12
|
+
LESS_THAN: string;
|
|
13
|
+
CONTAINS: string;
|
|
14
|
+
NOT_CONTAINS: string;
|
|
15
|
+
BETWEEN: string;
|
|
16
|
+
GREATER_THAN_OR_EQUAL: string;
|
|
17
|
+
LESS_THAN_OR_EQUAL: string;
|
|
18
|
+
START_WITH: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const QB_GROUP_CONDITION_TYPES: {
|
|
21
|
+
AND: boolean;
|
|
22
|
+
OR: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const QB_DRAG_TYPES: {
|
|
25
|
+
FILTER: string;
|
|
26
|
+
GROUP: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const QB_DRAG_LOCATIONS: {
|
|
29
|
+
ABOVE: string;
|
|
30
|
+
BELOW: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const QB_EXPORT_FORMAT_TYPES: {
|
|
33
|
+
DEFAULT: string;
|
|
34
|
+
XML: string;
|
|
35
|
+
SQL: string;
|
|
36
|
+
SAFESQL: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const QB_ADD_FILTER_METHOD_TYPES: {
|
|
39
|
+
IN_PLACE: string;
|
|
40
|
+
APPEND: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const QB_GROUP_FILTER_METHOD_TYPES: {
|
|
43
|
+
IN_PLACE: string;
|
|
44
|
+
APPEND: string;
|
|
45
|
+
};
|
|
46
|
+
export declare const QB_FIELD_SHARED_ACTIONS: {
|
|
47
|
+
RESET_FIELD: string;
|
|
48
|
+
RESET_OPERATOR: string;
|
|
49
|
+
RESET_VALUE: string;
|
|
50
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const props: {
|
|
2
|
+
/** inpect props to component wrapper */
|
|
3
|
+
containerProps: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
4
|
+
/** add filter strategy */
|
|
5
|
+
addFilterMethod: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
6
|
+
/** group filter strategy */
|
|
7
|
+
groupFilterMethod: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
8
|
+
/** change callback */
|
|
9
|
+
onChange: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
10
|
+
/** fields to query */
|
|
11
|
+
fields: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
12
|
+
/** fields actions */
|
|
13
|
+
fieldsSharedActions: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
14
|
+
/** query builder format */
|
|
15
|
+
format: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
16
|
+
/** initial values */
|
|
17
|
+
init: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
18
|
+
/** class for rule container */
|
|
19
|
+
ruleContainerClassName: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
20
|
+
/** handle field change */
|
|
21
|
+
handleDrop: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
22
|
+
/** handle field change drop */
|
|
23
|
+
handleDropFilter: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
24
|
+
/** handle field group change */
|
|
25
|
+
handleDropGroup: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
26
|
+
/** handle field change */
|
|
27
|
+
handleFieldChange: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
28
|
+
/** handle rule container operator change */
|
|
29
|
+
handleRuleContainerOperator: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
30
|
+
/** handle rule container grouping change */
|
|
31
|
+
handleRuleContainerUnGroup: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
32
|
+
/** filter add callback */
|
|
33
|
+
onAddFilter: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
34
|
+
/** rule container add callback */
|
|
35
|
+
onAddRuleContainer: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
36
|
+
/** remove filter callback */
|
|
37
|
+
onRemoveFilter: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
38
|
+
displayFixedOutput: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
39
|
+
/** show output */
|
|
40
|
+
displayOutput: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
41
|
+
/** show output label */
|
|
42
|
+
displayOutputLabel: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
43
|
+
/** one or multiple rows for query */
|
|
44
|
+
singleRow: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
45
|
+
toolTipZIndex: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
|
|
46
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-query-builder",
|
|
3
|
-
"version": "3.14.0-next.
|
|
3
|
+
"version": "3.14.0-next.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Query Builder",
|
|
6
6
|
"files": [
|
|
@@ -174,17 +174,17 @@
|
|
|
174
174
|
"classnames": "~2.3.1",
|
|
175
175
|
"prop-types": "~15.8.1",
|
|
176
176
|
"react-addons-update": "~15.6.3",
|
|
177
|
-
"@elliemae/ds-accordion": "3.14.0-next.
|
|
178
|
-
"@elliemae/ds-button": "3.14.0-next.
|
|
179
|
-
"@elliemae/ds-classnames": "3.14.0-next.
|
|
180
|
-
"@elliemae/ds-
|
|
181
|
-
"@elliemae/ds-
|
|
182
|
-
"@elliemae/ds-icon": "3.14.0-next.
|
|
183
|
-
"@elliemae/ds-icons": "3.14.0-next.
|
|
184
|
-
"@elliemae/ds-popper": "3.14.0-next.
|
|
185
|
-
"@elliemae/ds-shared": "3.14.0-next.
|
|
186
|
-
"@elliemae/ds-tooltip": "3.14.0-next.
|
|
187
|
-
"@elliemae/ds-utilities": "3.14.0-next.
|
|
177
|
+
"@elliemae/ds-accordion": "3.14.0-next.17",
|
|
178
|
+
"@elliemae/ds-button": "3.14.0-next.17",
|
|
179
|
+
"@elliemae/ds-classnames": "3.14.0-next.17",
|
|
180
|
+
"@elliemae/ds-grid": "3.14.0-next.17",
|
|
181
|
+
"@elliemae/ds-form": "3.14.0-next.17",
|
|
182
|
+
"@elliemae/ds-icon": "3.14.0-next.17",
|
|
183
|
+
"@elliemae/ds-icons": "3.14.0-next.17",
|
|
184
|
+
"@elliemae/ds-popper": "3.14.0-next.17",
|
|
185
|
+
"@elliemae/ds-shared": "3.14.0-next.17",
|
|
186
|
+
"@elliemae/ds-tooltip": "3.14.0-next.17",
|
|
187
|
+
"@elliemae/ds-utilities": "3.14.0-next.17"
|
|
188
188
|
},
|
|
189
189
|
"peerDependencies": {
|
|
190
190
|
"lodash": "^4.17.21",
|