@elliemae/ds-query-builder 2.1.1-rc.1 → 2.2.0-alpha.4

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.
Files changed (141) hide show
  1. package/cjs/DSQueryBuilder.js +117 -97
  2. package/cjs/DSQueryBuilder.js.map +7 -0
  3. package/cjs/components/AndOrController/AndOrController.js +148 -162
  4. package/cjs/components/AndOrController/AndOrController.js.map +7 -0
  5. package/cjs/components/ConditionController/ConditionController.js +88 -72
  6. package/cjs/components/ConditionController/ConditionController.js.map +7 -0
  7. package/cjs/components/DisplayOutput/DisplayOutput.js +61 -62
  8. package/cjs/components/DisplayOutput/DisplayOutput.js.map +7 -0
  9. package/cjs/components/DragContainerController/DragContainerController.js +61 -41
  10. package/cjs/components/DragContainerController/DragContainerController.js.map +7 -0
  11. package/cjs/components/DragControllerRow/DragControllerRow.js +50 -46
  12. package/cjs/components/DragControllerRow/DragControllerRow.js.map +7 -0
  13. package/cjs/components/FieldControllerRow/FieldControllerRow.js +54 -32
  14. package/cjs/components/FieldControllerRow/FieldControllerRow.js.map +7 -0
  15. package/cjs/components/Nestable/Nestable.js +143 -209
  16. package/cjs/components/Nestable/Nestable.js.map +7 -0
  17. package/cjs/components/Nestable/NestableItem.js +98 -90
  18. package/cjs/components/Nestable/NestableItem.js.map +7 -0
  19. package/cjs/components/Nestable/actions/events.js +72 -95
  20. package/cjs/components/Nestable/actions/events.js.map +7 -0
  21. package/cjs/components/Nestable/actions/getItemOptions.js +36 -15
  22. package/cjs/components/Nestable/actions/getItemOptions.js.map +7 -0
  23. package/cjs/components/Nestable/actions/getPaths.js +46 -51
  24. package/cjs/components/Nestable/actions/getPaths.js.map +7 -0
  25. package/cjs/components/Nestable/actions/index.js +42 -28
  26. package/cjs/components/Nestable/actions/index.js.map +7 -0
  27. package/cjs/components/Nestable/actions/moveItem.js +44 -42
  28. package/cjs/components/Nestable/actions/moveItem.js.map +7 -0
  29. package/cjs/components/Nestable/actions/paths.js +48 -55
  30. package/cjs/components/Nestable/actions/paths.js.map +7 -0
  31. package/cjs/components/Nestable/actions/tryDecreaseDepth.js +39 -23
  32. package/cjs/components/Nestable/actions/tryDecreaseDepth.js.map +7 -0
  33. package/cjs/components/Nestable/actions/tryIncreaseDepth.js +39 -26
  34. package/cjs/components/Nestable/actions/tryIncreaseDepth.js.map +7 -0
  35. package/cjs/components/Nestable/index.js +36 -7
  36. package/cjs/components/Nestable/index.js.map +7 -0
  37. package/cjs/components/QueryBuilderContext/QueryBuilderContext.js +36 -13
  38. package/cjs/components/QueryBuilderContext/QueryBuilderContext.js.map +7 -0
  39. package/cjs/components/QueryBuilderImpl.js +118 -202
  40. package/cjs/components/QueryBuilderImpl.js.map +7 -0
  41. package/cjs/components/QueryBuilderItem/QueryBuilderItem.js +80 -78
  42. package/cjs/components/QueryBuilderItem/QueryBuilderItem.js.map +7 -0
  43. package/cjs/components/QueryBuilderRow/QueryBuilderRow.js +154 -211
  44. package/cjs/components/QueryBuilderRow/QueryBuilderRow.js.map +7 -0
  45. package/cjs/components/ToolBarAnimation/ToolBarAnimation.js +39 -26
  46. package/cjs/components/ToolBarAnimation/ToolBarAnimation.js.map +7 -0
  47. package/cjs/components/format/format.js +48 -22
  48. package/cjs/components/format/format.js.map +7 -0
  49. package/cjs/components/format/sqlFormat.js +69 -48
  50. package/cjs/components/format/sqlFormat.js.map +7 -0
  51. package/cjs/components/format/sqlSafeFormat.js +72 -55
  52. package/cjs/components/format/sqlSafeFormat.js.map +7 -0
  53. package/cjs/components/format/xmlFormat.js +71 -50
  54. package/cjs/components/format/xmlFormat.js.map +7 -0
  55. package/cjs/components/helpers/actions.js +151 -186
  56. package/cjs/components/helpers/actions.js.map +7 -0
  57. package/cjs/components/helpers/constants.js +36 -8
  58. package/cjs/components/helpers/constants.js.map +7 -0
  59. package/cjs/components/helpers/dependencies.js +49 -64
  60. package/cjs/components/helpers/dependencies.js.map +7 -0
  61. package/cjs/components/helpers/selectors.js +161 -101
  62. package/cjs/components/helpers/selectors.js.map +7 -0
  63. package/cjs/components/helpers/store.js +86 -104
  64. package/cjs/components/helpers/store.js.map +7 -0
  65. package/cjs/components/helpers/types.js +72 -44
  66. package/cjs/components/helpers/types.js.map +7 -0
  67. package/cjs/index.js +36 -29
  68. package/cjs/index.js.map +7 -0
  69. package/cjs/propTypes.js +102 -94
  70. package/cjs/propTypes.js.map +7 -0
  71. package/esm/DSQueryBuilder.js +103 -72
  72. package/esm/DSQueryBuilder.js.map +7 -0
  73. package/esm/components/AndOrController/AndOrController.js +113 -147
  74. package/esm/components/AndOrController/AndOrController.js.map +7 -0
  75. package/esm/components/ConditionController/ConditionController.js +57 -62
  76. package/esm/components/ConditionController/ConditionController.js.map +7 -0
  77. package/esm/components/DisplayOutput/DisplayOutput.js +29 -53
  78. package/esm/components/DisplayOutput/DisplayOutput.js.map +7 -0
  79. package/esm/components/DragContainerController/DragContainerController.js +32 -35
  80. package/esm/components/DragContainerController/DragContainerController.js.map +7 -0
  81. package/esm/components/DragControllerRow/DragControllerRow.js +21 -38
  82. package/esm/components/DragControllerRow/DragControllerRow.js.map +7 -0
  83. package/esm/components/FieldControllerRow/FieldControllerRow.js +25 -26
  84. package/esm/components/FieldControllerRow/FieldControllerRow.js.map +7 -0
  85. package/esm/components/Nestable/Nestable.js +115 -186
  86. package/esm/components/Nestable/Nestable.js.map +7 -0
  87. package/esm/components/Nestable/NestableItem.js +69 -82
  88. package/esm/components/Nestable/NestableItem.js.map +7 -0
  89. package/esm/components/Nestable/actions/events.js +45 -79
  90. package/esm/components/Nestable/actions/events.js.map +7 -0
  91. package/esm/components/Nestable/actions/getItemOptions.js +7 -11
  92. package/esm/components/Nestable/actions/getItemOptions.js.map +7 -0
  93. package/esm/components/Nestable/actions/getPaths.js +17 -43
  94. package/esm/components/Nestable/actions/getPaths.js.map +7 -0
  95. package/esm/components/Nestable/actions/index.js +13 -6
  96. package/esm/components/Nestable/actions/index.js.map +7 -0
  97. package/esm/components/Nestable/actions/moveItem.js +13 -31
  98. package/esm/components/Nestable/actions/moveItem.js.map +7 -0
  99. package/esm/components/Nestable/actions/paths.js +19 -47
  100. package/esm/components/Nestable/actions/paths.js.map +7 -0
  101. package/esm/components/Nestable/actions/tryDecreaseDepth.js +10 -19
  102. package/esm/components/Nestable/actions/tryDecreaseDepth.js.map +7 -0
  103. package/esm/components/Nestable/actions/tryIncreaseDepth.js +10 -22
  104. package/esm/components/Nestable/actions/tryIncreaseDepth.js.map +7 -0
  105. package/esm/components/Nestable/index.js +7 -2
  106. package/esm/components/Nestable/index.js.map +7 -0
  107. package/esm/components/QueryBuilderContext/QueryBuilderContext.js +7 -5
  108. package/esm/components/QueryBuilderContext/QueryBuilderContext.js.map +7 -0
  109. package/esm/components/QueryBuilderImpl.js +82 -187
  110. package/esm/components/QueryBuilderImpl.js.map +7 -0
  111. package/esm/components/QueryBuilderItem/QueryBuilderItem.js +50 -70
  112. package/esm/components/QueryBuilderItem/QueryBuilderItem.js.map +7 -0
  113. package/esm/components/QueryBuilderRow/QueryBuilderRow.js +123 -201
  114. package/esm/components/QueryBuilderRow/QueryBuilderRow.js.map +7 -0
  115. package/esm/components/ToolBarAnimation/ToolBarAnimation.js +10 -17
  116. package/esm/components/ToolBarAnimation/ToolBarAnimation.js.map +7 -0
  117. package/esm/components/format/format.js +16 -17
  118. package/esm/components/format/format.js.map +7 -0
  119. package/esm/components/format/sqlFormat.js +39 -43
  120. package/esm/components/format/sqlFormat.js.map +7 -0
  121. package/esm/components/format/sqlSafeFormat.js +43 -50
  122. package/esm/components/format/sqlSafeFormat.js.map +7 -0
  123. package/esm/components/format/xmlFormat.js +41 -45
  124. package/esm/components/format/xmlFormat.js.map +7 -0
  125. package/esm/components/helpers/actions.js +123 -160
  126. package/esm/components/helpers/actions.js.map +7 -0
  127. package/esm/components/helpers/constants.js +7 -2
  128. package/esm/components/helpers/constants.js.map +7 -0
  129. package/esm/components/helpers/dependencies.js +19 -39
  130. package/esm/components/helpers/dependencies.js.map +7 -0
  131. package/esm/components/helpers/selectors.js +132 -93
  132. package/esm/components/helpers/selectors.js.map +7 -0
  133. package/esm/components/helpers/store.js +54 -82
  134. package/esm/components/helpers/store.js.map +7 -0
  135. package/esm/components/helpers/types.js +44 -33
  136. package/esm/components/helpers/types.js.map +7 -0
  137. package/esm/index.js +7 -4
  138. package/esm/index.js.map +7 -0
  139. package/esm/propTypes.js +55 -72
  140. package/esm/propTypes.js.map +7 -0
  141. package/package.json +12 -12
@@ -1,64 +1,92 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var types_exports = {};
29
+ __export(types_exports, {
30
+ QB_ADD_FILTER_METHOD_TYPES: () => QB_ADD_FILTER_METHOD_TYPES,
31
+ QB_DRAG_LOCATIONS: () => QB_DRAG_LOCATIONS,
32
+ QB_DRAG_TYPES: () => QB_DRAG_TYPES,
33
+ QB_EXPORT_FORMAT_TYPES: () => QB_EXPORT_FORMAT_TYPES,
34
+ QB_FIELD_SHARED_ACTIONS: () => QB_FIELD_SHARED_ACTIONS,
35
+ QB_FIELD_TYPES: () => QB_FIELD_TYPES,
36
+ QB_GROUP_CONDITION_TYPES: () => QB_GROUP_CONDITION_TYPES,
37
+ QB_GROUP_FILTER_METHOD_TYPES: () => QB_GROUP_FILTER_METHOD_TYPES,
38
+ QB_OPERATOR_TYPES: () => QB_OPERATOR_TYPES
39
+ });
40
+ var React = __toESM(require("react"));
5
41
  const QB_FIELD_TYPES = {
6
- LOAN_VALUES: 'loanValues',
7
- LTV_VALUES: 'ltvValues',
8
- SUBJECT_VALUES: 'subjectValues',
9
- LAST_VALUES: 'lastValues',
10
- CREDIT_VALUES: 'creditValues'
42
+ LOAN_VALUES: "loanValues",
43
+ LTV_VALUES: "ltvValues",
44
+ SUBJECT_VALUES: "subjectValues",
45
+ LAST_VALUES: "lastValues",
46
+ CREDIT_VALUES: "creditValues"
11
47
  };
12
48
  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'
49
+ EQUAL: "equal",
50
+ NOT_EQUAL: "notEqual",
51
+ GREATER_THAN: "greaterThan",
52
+ LESS_THAN: "lessThan",
53
+ CONTAINS: "contains",
54
+ NOT_CONTAINS: "notNontains",
55
+ BETWEEN: "between",
56
+ GREATER_THAN_OR_EQUAL: "greaterThanOrEquals",
57
+ LESS_THAN_OR_EQUAL: "lessThanOrEquals",
58
+ START_WITH: "startsWith"
23
59
  };
24
60
  const QB_GROUP_CONDITION_TYPES = {
25
61
  AND: true,
26
62
  OR: false
27
63
  };
28
64
  const QB_DRAG_TYPES = {
29
- FILTER: 'filter',
30
- GROUP: 'group'
65
+ FILTER: "filter",
66
+ GROUP: "group"
31
67
  };
32
68
  const QB_DRAG_LOCATIONS = {
33
- ABOVE: 'above',
34
- BELOW: 'below'
69
+ ABOVE: "above",
70
+ BELOW: "below"
35
71
  };
36
72
  const QB_EXPORT_FORMAT_TYPES = {
37
- DEFAULT: 'defaultFormat',
38
- XML: 'xmlFormat',
39
- SQL: 'sqlFormat',
40
- SAFESQL: 'sqlSafeFormat'
73
+ DEFAULT: "defaultFormat",
74
+ XML: "xmlFormat",
75
+ SQL: "sqlFormat",
76
+ SAFESQL: "sqlSafeFormat"
41
77
  };
42
78
  const QB_ADD_FILTER_METHOD_TYPES = {
43
- IN_PLACE: 'inplace',
44
- APPEND: 'append'
79
+ IN_PLACE: "inplace",
80
+ APPEND: "append"
45
81
  };
46
82
  const QB_GROUP_FILTER_METHOD_TYPES = {
47
- IN_PLACE: 'inplace',
48
- APPEND: 'append'
83
+ IN_PLACE: "inplace",
84
+ APPEND: "append"
49
85
  };
50
86
  const QB_FIELD_SHARED_ACTIONS = {
51
- RESET_FIELD: 'resetField',
52
- RESET_OPERATOR: 'resetOperator',
53
- RESET_VALUE: 'resetValue'
87
+ RESET_FIELD: "resetField",
88
+ RESET_OPERATOR: "resetOperator",
89
+ RESET_VALUE: "resetValue"
54
90
  };
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;
91
+ module.exports = __toCommonJS(types_exports);
92
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/helpers/types.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export const QB_FIELD_TYPES = {\n LOAN_VALUES: 'loanValues',\n LTV_VALUES: 'ltvValues',\n SUBJECT_VALUES: 'subjectValues',\n LAST_VALUES: 'lastValues',\n CREDIT_VALUES: 'creditValues',\n};\n\nexport const QB_OPERATOR_TYPES = {\n EQUAL: 'equal',\n NOT_EQUAL: 'notEqual',\n GREATER_THAN: 'greaterThan',\n LESS_THAN: 'lessThan',\n CONTAINS: 'contains',\n NOT_CONTAINS: 'notNontains',\n BETWEEN: 'between',\n GREATER_THAN_OR_EQUAL: 'greaterThanOrEquals',\n LESS_THAN_OR_EQUAL: 'lessThanOrEquals',\n START_WITH: 'startsWith',\n};\n\nexport const QB_GROUP_CONDITION_TYPES = {\n AND: true,\n OR: false,\n};\n\nexport const QB_DRAG_TYPES = {\n FILTER: 'filter',\n GROUP: 'group',\n};\n\nexport const QB_DRAG_LOCATIONS = {\n ABOVE: 'above',\n BELOW: 'below',\n};\n\nexport const QB_EXPORT_FORMAT_TYPES = {\n DEFAULT: 'defaultFormat',\n XML: 'xmlFormat',\n SQL: 'sqlFormat',\n SAFESQL: 'sqlSafeFormat',\n};\n\nexport const QB_ADD_FILTER_METHOD_TYPES = {\n IN_PLACE: 'inplace',\n APPEND: 'append',\n};\n\nexport const QB_GROUP_FILTER_METHOD_TYPES = {\n IN_PLACE: 'inplace',\n APPEND: 'append',\n};\n\nexport const QB_FIELD_SHARED_ACTIONS = {\n RESET_FIELD: 'resetField',\n RESET_OPERATOR: 'resetOperator',\n RESET_VALUE: 'resetValue',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,iBAAiB;AAAA,EAC5B,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,eAAe;AAAA;AAGV,MAAM,oBAAoB;AAAA,EAC/B,OAAO;AAAA,EACP,WAAW;AAAA,EACX,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,cAAc;AAAA,EACd,SAAS;AAAA,EACT,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,YAAY;AAAA;AAGP,MAAM,2BAA2B;AAAA,EACtC,KAAK;AAAA,EACL,IAAI;AAAA;AAGC,MAAM,gBAAgB;AAAA,EAC3B,QAAQ;AAAA,EACR,OAAO;AAAA;AAGF,MAAM,oBAAoB;AAAA,EAC/B,OAAO;AAAA,EACP,OAAO;AAAA;AAGF,MAAM,yBAAyB;AAAA,EACpC,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,SAAS;AAAA;AAGJ,MAAM,6BAA6B;AAAA,EACxC,UAAU;AAAA,EACV,QAAQ;AAAA;AAGH,MAAM,+BAA+B;AAAA,EAC1C,UAAU;AAAA,EACV,QAAQ;AAAA;AAGH,MAAM,0BAA0B;AAAA,EACrC,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,aAAa;AAAA;",
6
+ "names": []
7
+ }
package/cjs/index.js CHANGED
@@ -1,29 +1,36 @@
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;
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var src_exports = {};
29
+ __export(src_exports, {
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
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export { default } from './DSQueryBuilder';\nexport * from './DSQueryBuilder';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAAwB;AACxB,wBAAc;",
6
+ "names": []
7
+ }
package/cjs/propTypes.js CHANGED
@@ -1,97 +1,105 @@
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
-
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var 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");
8
35
  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])
36
+ containerProps: import_react_desc.PropTypes.object.description("inject props to component wrapper"),
37
+ addFilterMethod: import_react_desc.PropTypes.oneOf([
38
+ import_types.QB_ADD_FILTER_METHOD_TYPES.APPEND,
39
+ import_types.QB_ADD_FILTER_METHOD_TYPES.IN_PLACE
40
+ ]).description("add filter strategy"),
41
+ groupFilterMethod: import_react_desc.PropTypes.oneOf([
42
+ import_types.QB_ADD_FILTER_METHOD_TYPES.APPEND,
43
+ import_types.QB_ADD_FILTER_METHOD_TYPES.IN_PLACE
44
+ ]).description("group filter strategy"),
45
+ onChange: import_react_desc.PropTypes.func.description("change callback"),
46
+ fields: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.shape({
47
+ target: import_react_desc.PropTypes.oneOf(["operator", "field", "value"]),
48
+ component: import_react_desc.PropTypes.element,
49
+ condition: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.shape({
50
+ source: import_react_desc.PropTypes.oneOf(["operator", "field", "value"]),
51
+ operator: import_react_desc.PropTypes.oneOf([
52
+ "checkNotEmpty",
53
+ "greaterThan",
54
+ "greaterThanOrEquals",
55
+ "lessThanOrEquals",
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])
29
67
  }))
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)
68
+ })).description("fields to query"),
69
+ fieldsSharedActions: import_react_desc.PropTypes.shape({
70
+ onFieldChange: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.func),
71
+ onOperatorChange: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.func),
72
+ onValueChange: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.func)
73
+ }).description("fields actions"),
74
+ format: import_react_desc.PropTypes.string.description("query builder format"),
75
+ init: import_react_desc.PropTypes.shape({
76
+ step: import_react_desc.PropTypes.number,
77
+ mapFilters: import_react_desc.PropTypes.object,
78
+ mapGroups: import_react_desc.PropTypes.object,
79
+ main: import_react_desc.PropTypes.string,
80
+ items: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.object)
81
+ }).description("initial values"),
82
+ ruleContainerClassName: import_react_desc.PropTypes.string.description("class for rule container"),
83
+ handleDrop: import_react_desc.PropTypes.func.description("handle field change"),
84
+ handleDropFilter: import_react_desc.PropTypes.func.description("handle field change drop"),
85
+ handleDropGroup: import_react_desc.PropTypes.func.description("handle field group change"),
86
+ handleFieldChange: import_react_desc.PropTypes.func.description("handle field change"),
87
+ handleRuleContainerOperator: import_react_desc.PropTypes.func.description("handle rule container operator change"),
88
+ handleRuleContainerUnGroup: import_react_desc.PropTypes.func.description("handle rule container grouping change"),
89
+ onAddFilter: import_react_desc.PropTypes.func.description("filter add callback"),
90
+ onAddRuleContainer: import_react_desc.PropTypes.func.description("rule container add callback"),
91
+ onRemoveFilter: import_react_desc.PropTypes.func.description("remove filter callback"),
92
+ displayFixedOutput: import_react_desc.PropTypes.string.description(`Label for fixed output.Using this props it will ignore 'displayOutput' and 'displayOutputLabel'
93
+ and it will always render the output without the ability to close it.
94
+ `).defaultValue(""),
95
+ displayOutput: import_react_desc.PropTypes.bool.description("show output"),
96
+ displayOutputLabel: import_react_desc.PropTypes.shape({
97
+ show: import_react_desc.PropTypes.string,
98
+ hide: import_react_desc.PropTypes.string,
99
+ open: import_react_desc.PropTypes.bool
100
+ }).description("show output label"),
101
+ singleRow: import_react_desc.PropTypes.bool.description("one or multiple rows for query"),
102
+ toolTipZIndex: import_react_desc.PropTypes.number.description("ZIndex for action controls").defaultValue(110)
95
103
  };
96
-
97
- exports.props = props;
104
+ module.exports = __toCommonJS(propTypes_exports);
105
+ //# sourceMappingURL=propTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/propTypes.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { PropTypes } from 'react-desc';\nimport { QB_ADD_FILTER_METHOD_TYPES } from './components/helpers/types';\n\nexport const props = {\n /** inpect props to component wrapper */\n containerProps: PropTypes.object.description('inject props to component wrapper'),\n /** add filter strategy */\n addFilterMethod: PropTypes.oneOf([\n QB_ADD_FILTER_METHOD_TYPES.APPEND,\n QB_ADD_FILTER_METHOD_TYPES.IN_PLACE,\n ]).description('add filter strategy'),\n /** group filter strategy */\n groupFilterMethod: PropTypes.oneOf([\n QB_ADD_FILTER_METHOD_TYPES.APPEND,\n QB_ADD_FILTER_METHOD_TYPES.IN_PLACE,\n ]).description('group filter strategy'),\n /** change callback */\n onChange: PropTypes.func.description('change callback'),\n /** fields to query */\n fields: PropTypes.arrayOf(\n PropTypes.shape({\n target: PropTypes.oneOf(['operator', 'field', 'value']),\n component: PropTypes.element,\n condition: PropTypes.arrayOf(\n PropTypes.shape({\n source: PropTypes.oneOf(['operator', 'field', 'value']),\n operator: PropTypes.oneOf([\n 'checkNotEmpty',\n 'greaterThan',\n 'greaterThanOrEquals',\n 'lessThanOrEquals',\n 'startsWith',\n 'contains',\n 'validDate',\n 'equal',\n 'notEqual',\n 'isNull',\n 'isNotNull',\n 'isIn',\n 'isNotIn',\n ]),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n }),\n ),\n }),\n ).description('fields to query'),\n /** fields actions */\n fieldsSharedActions: PropTypes.shape({\n onFieldChange: PropTypes.arrayOf(PropTypes.func),\n onOperatorChange: PropTypes.arrayOf(PropTypes.func),\n onValueChange: PropTypes.arrayOf(PropTypes.func),\n }).description('fields actions'),\n /** query builder format */\n format: PropTypes.string.description('query builder format'),\n /** initial values */\n init: PropTypes.shape({\n step: PropTypes.number,\n mapFilters: PropTypes.object,\n mapGroups: PropTypes.object,\n main: PropTypes.string,\n items: PropTypes.arrayOf(PropTypes.object),\n }).description('initial values'),\n /** class for rule container */\n ruleContainerClassName: PropTypes.string.description('class for rule container'),\n /** handle field change */\n handleDrop: PropTypes.func.description('handle field change'),\n /** handle field change drop */\n handleDropFilter: PropTypes.func.description('handle field change drop'),\n /** handle field group change */\n handleDropGroup: PropTypes.func.description('handle field group change'),\n /** handle field change */\n handleFieldChange: PropTypes.func.description('handle field change'),\n /** handle rule container operator change */\n handleRuleContainerOperator: PropTypes.func.description('handle rule container operator change'),\n /** handle rule container grouping change */\n handleRuleContainerUnGroup: PropTypes.func.description('handle rule container grouping change'),\n /** filter add callback */\n onAddFilter: PropTypes.func.description('filter add callback'),\n /** rule container add callback */\n onAddRuleContainer: PropTypes.func.description('rule container add callback'),\n /** remove filter callback */\n onRemoveFilter: PropTypes.func.description('remove filter callback'),\n displayFixedOutput: PropTypes.string\n .description(\n `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 `,\n )\n .defaultValue(''),\n /** show output */\n displayOutput: PropTypes.bool.description('show output'),\n /** show output label */\n displayOutputLabel: PropTypes.shape({\n show: PropTypes.string,\n hide: PropTypes.string,\n open: PropTypes.bool,\n }).description('show output label'),\n /** one or multiple rows for query */\n singleRow: PropTypes.bool.description('one or multiple rows for query'),\n toolTipZIndex: PropTypes.number.description('ZIndex for action controls').defaultValue(110),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAC1B,mBAA2C;AAEpC,MAAM,QAAQ;AAAA,EAEnB,gBAAgB,4BAAU,OAAO,YAAY;AAAA,EAE7C,iBAAiB,4BAAU,MAAM;AAAA,IAC/B,wCAA2B;AAAA,IAC3B,wCAA2B;AAAA,KAC1B,YAAY;AAAA,EAEf,mBAAmB,4BAAU,MAAM;AAAA,IACjC,wCAA2B;AAAA,IAC3B,wCAA2B;AAAA,KAC1B,YAAY;AAAA,EAEf,UAAU,4BAAU,KAAK,YAAY;AAAA,EAErC,QAAQ,4BAAU,QAChB,4BAAU,MAAM;AAAA,IACd,QAAQ,4BAAU,MAAM,CAAC,YAAY,SAAS;AAAA,IAC9C,WAAW,4BAAU;AAAA,IACrB,WAAW,4BAAU,QACnB,4BAAU,MAAM;AAAA,MACd,QAAQ,4BAAU,MAAM,CAAC,YAAY,SAAS;AAAA,MAC9C,UAAU,4BAAU,MAAM;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,MAEF,OAAO,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU;AAAA;AAAA,MAI9D,YAAY;AAAA,EAEd,qBAAqB,4BAAU,MAAM;AAAA,IACnC,eAAe,4BAAU,QAAQ,4BAAU;AAAA,IAC3C,kBAAkB,4BAAU,QAAQ,4BAAU;AAAA,IAC9C,eAAe,4BAAU,QAAQ,4BAAU;AAAA,KAC1C,YAAY;AAAA,EAEf,QAAQ,4BAAU,OAAO,YAAY;AAAA,EAErC,MAAM,4BAAU,MAAM;AAAA,IACpB,MAAM,4BAAU;AAAA,IAChB,YAAY,4BAAU;AAAA,IACtB,WAAW,4BAAU;AAAA,IACrB,MAAM,4BAAU;AAAA,IAChB,OAAO,4BAAU,QAAQ,4BAAU;AAAA,KAClC,YAAY;AAAA,EAEf,wBAAwB,4BAAU,OAAO,YAAY;AAAA,EAErD,YAAY,4BAAU,KAAK,YAAY;AAAA,EAEvC,kBAAkB,4BAAU,KAAK,YAAY;AAAA,EAE7C,iBAAiB,4BAAU,KAAK,YAAY;AAAA,EAE5C,mBAAmB,4BAAU,KAAK,YAAY;AAAA,EAE9C,6BAA6B,4BAAU,KAAK,YAAY;AAAA,EAExD,4BAA4B,4BAAU,KAAK,YAAY;AAAA,EAEvD,aAAa,4BAAU,KAAK,YAAY;AAAA,EAExC,oBAAoB,4BAAU,KAAK,YAAY;AAAA,EAE/C,gBAAgB,4BAAU,KAAK,YAAY;AAAA,EAC3C,oBAAoB,4BAAU,OAC3B,YACC;AAAA;AAAA,KAID,aAAa;AAAA,EAEhB,eAAe,4BAAU,KAAK,YAAY;AAAA,EAE1C,oBAAoB,4BAAU,MAAM;AAAA,IAClC,MAAM,4BAAU;AAAA,IAChB,MAAM,4BAAU;AAAA,IAChB,MAAM,4BAAU;AAAA,KACf,YAAY;AAAA,EAEf,WAAW,4BAAU,KAAK,YAAY;AAAA,EACtC,eAAe,4BAAU,OAAO,YAAY,8BAA8B,aAAa;AAAA;",
6
+ "names": []
7
+ }
@@ -1,74 +1,105 @@
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
-
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { describe } from "react-desc";
4
+ import QueryBuilderImpl from "./components/QueryBuilderImpl";
5
+ import {
6
+ QB_FIELD_TYPES,
7
+ QB_OPERATOR_TYPES,
8
+ QB_GROUP_CONDITION_TYPES,
9
+ QB_DRAG_TYPES,
10
+ QB_DRAG_LOCATIONS,
11
+ QB_EXPORT_FORMAT_TYPES,
12
+ QB_ADD_FILTER_METHOD_TYPES,
13
+ QB_GROUP_FILTER_METHOD_TYPES,
14
+ QB_FIELD_SHARED_ACTIONS
15
+ } from "./components/helpers/types";
16
+ import {
17
+ QB_OPERATOR_OPTIONS,
18
+ QB_DEFAULT_VALUES_OPTIONS,
19
+ QB_FIELD_OPTIONS,
20
+ QB_LOAN_VALUES_OPTIONS,
21
+ QB_SUBJECT_VALUES_OPTIONS
22
+ } from "./components/helpers/selectors";
23
+ import QueryBuilderFormat from "./components/format/format";
24
+ import { props } from "./propTypes";
25
+ const DSQueryBuilder = ({
26
+ containerProps = {},
27
+ addFilterMethod = QB_ADD_FILTER_METHOD_TYPES.IN_PLACE,
28
+ groupFilterMethod = QB_GROUP_FILTER_METHOD_TYPES.IN_PLACE,
29
+ onChange = () => null,
30
+ fields = [],
31
+ fieldsSharedActions = {
32
+ onFieldChange: [],
33
+ onOperatorChange: [],
34
+ onValueChange: []
35
+ },
36
+ format = QB_EXPORT_FORMAT_TYPES.DEFAULT,
37
+ init = null,
38
+ ruleContainerClassName = "",
39
+ handleDrop = () => null,
40
+ handleDropFilter = () => null,
41
+ handleDropGroup = () => null,
42
+ handleFieldChange = () => null,
43
+ handleRuleContainerOperator = () => null,
44
+ handleRuleContainerUnGroup = () => null,
45
+ onAddFilter = () => null,
46
+ onAddRuleContainer = () => null,
47
+ onRemoveFilter = () => null,
48
+ displayFixedOutput,
49
+ displayOutput = false,
50
+ displayOutputLabel = {
51
+ show: "Show output",
52
+ hide: "Hide output"
53
+ },
54
+ singleRow = false,
55
+ toolTipZIndex = 110
56
+ }) => /* @__PURE__ */ React2.createElement(QueryBuilderImpl, {
57
+ addFilterMethod,
58
+ containerProps,
59
+ displayFixedOutput,
60
+ displayOutput,
61
+ displayOutputLabel,
62
+ fields,
63
+ fieldsSharedActions,
64
+ format,
65
+ groupFilterMethod,
66
+ handleDrop,
67
+ handleDropFilter,
68
+ handleDropGroup,
69
+ handleFieldChange,
70
+ handleRuleContainerOperator,
71
+ handleRuleContainerUnGroup,
72
+ init,
73
+ onAddFilter,
74
+ onAddRuleContainer,
75
+ onChange,
76
+ onRemoveFilter,
77
+ ruleContainerClassName,
78
+ singleRow,
79
+ toolTipZIndex
80
+ });
81
+ DSQueryBuilder.propTypes = props;
71
82
  const DSQueryBuilderWithSchema = describe(DSQueryBuilder);
72
83
  DSQueryBuilderWithSchema.propTypes = props;
73
-
74
- export { DSQueryBuilder, DSQueryBuilderWithSchema, DSQueryBuilder as default };
84
+ var DSQueryBuilder_default = DSQueryBuilder;
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