@react-querybuilder/bootstrap 8.8.3 → 8.9.1

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.
@@ -1,271 +1,152 @@
1
- // src/index.tsx
2
- import { jsx as jsx3 } from "react/jsx-runtime";
3
- import { getCompatContextProvider } from "react-querybuilder";
4
-
5
- // ../../utils/react-compiler/react-compiler-runtime.ts
6
1
  import * as React from "react";
7
- var $empty = Symbol["for"]("react.memo_cache_sentinel");
8
- function c(size) {
9
- return React.useMemo(
10
- function() {
11
- var $ = new Array(size);
12
- for (var ii = 0; ii < size; ii++) {
13
- $[ii] = $empty;
14
- }
15
- $[$empty] = true;
16
- return $;
17
- },
18
- // oxlint-disable-next-line exhaustive-deps
19
- []
20
- );
21
- }
22
-
23
- // src/BootstrapNotToggle.tsx
24
- import { jsx, jsxs } from "react/jsx-runtime";
25
2
  import { useId } from "react";
26
- var BootstrapNotToggle = function BootstrapNotToggle2(t0) {
27
- var $ = c(10);
28
- var className = t0.className, handleOnChange = t0.handleOnChange, title = t0.title, label = t0.label, checked = t0.checked, disabled = t0.disabled;
29
- var id = useId();
30
- var t1 = "form-check-inline form-switch ".concat(className);
31
- var t2;
32
- if ($[0] !== handleOnChange) {
33
- t2 = function t22(e) {
34
- return handleOnChange(e.target.checked);
35
- };
36
- $[0] = handleOnChange;
37
- $[1] = t2;
38
- } else {
39
- t2 = $[1];
40
- }
41
- var t3 = !!checked;
42
- var t4;
43
- if ($[2] !== disabled || $[3] !== id || $[4] !== label || $[5] !== t1 || $[6] !== t2 || $[7] !== t3 || $[8] !== title) {
44
- t4 = jsxs("div", { className: t1, children: [jsx("input", { id, className: "form-check-input", type: "checkbox", onChange: t2, checked: t3, disabled }), jsx("label", { title, htmlFor: id, className: "form-check-label", children: label })] });
45
- $[2] = disabled;
46
- $[3] = id;
47
- $[4] = label;
48
- $[5] = t1;
49
- $[6] = t2;
50
- $[7] = t3;
51
- $[8] = title;
52
- $[9] = t4;
53
- } else {
54
- t4 = $[9];
55
- }
56
- return t4;
3
+ import { ValueEditor, getCompatContextProvider, standardClassnames, useValueEditor } from "react-querybuilder";
4
+
5
+ //#region src/BootstrapNotToggle.tsx
6
+ /**
7
+ * @group Components
8
+ */
9
+ const BootstrapNotToggle = ({ className, handleOnChange, title, label, checked, disabled }) => {
10
+ const id = useId();
11
+ return /* @__PURE__ */ React.createElement("div", { className: `form-check-inline form-switch ${className}` }, /* @__PURE__ */ React.createElement("input", {
12
+ id,
13
+ className: "form-check-input",
14
+ type: "checkbox",
15
+ onChange: (e) => handleOnChange(e.target.checked),
16
+ checked: !!checked,
17
+ disabled
18
+ }), /* @__PURE__ */ React.createElement("label", {
19
+ title,
20
+ htmlFor: id,
21
+ className: "form-check-label"
22
+ }, label));
57
23
  };
58
24
 
59
- // src/BootstrapValueEditor.tsx
60
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
61
- import * as React2 from "react";
62
- import { standardClassnames, useValueEditor, ValueEditor } from "react-querybuilder";
63
- function _typeof(o) {
64
- "@babel/helpers - typeof";
65
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
66
- return typeof o2;
67
- } : function(o2) {
68
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
69
- }, _typeof(o);
70
- }
71
- function ownKeys(e, r) {
72
- var t = Object.keys(e);
73
- if (Object.getOwnPropertySymbols) {
74
- var o = Object.getOwnPropertySymbols(e);
75
- r && (o = o.filter(function(r2) {
76
- return Object.getOwnPropertyDescriptor(e, r2).enumerable;
77
- })), t.push.apply(t, o);
78
- }
79
- return t;
80
- }
81
- function _objectSpread(e) {
82
- for (var r = 1; r < arguments.length; r++) {
83
- var t = null != arguments[r] ? arguments[r] : {};
84
- r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
85
- _defineProperty(e, r2, t[r2]);
86
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
87
- Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
88
- });
89
- }
90
- return e;
91
- }
92
- function _defineProperty(e, r, t) {
93
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
94
- }
95
- function _toPropertyKey(t) {
96
- var i = _toPrimitive(t, "string");
97
- return "symbol" == _typeof(i) ? i : i + "";
98
- }
99
- function _toPrimitive(t, r) {
100
- if ("object" != _typeof(t) || !t) return t;
101
- var e = t[Symbol.toPrimitive];
102
- if (void 0 !== e) {
103
- var i = e.call(t, r || "default");
104
- if ("object" != _typeof(i)) return i;
105
- throw new TypeError("@@toPrimitive must return a primitive value.");
106
- }
107
- return ("string" === r ? String : Number)(t);
108
- }
109
- var RadioButton = function RadioButton2(props) {
110
- var $ = c(9);
111
- var id = React2.useId();
112
- var t0;
113
- if ($[0] !== props) {
114
- t0 = function t02(e) {
115
- return props.handleOnChange(e.target.value);
116
- };
117
- $[0] = props;
118
- $[1] = t0;
119
- } else {
120
- t0 = $[1];
121
- }
122
- var t1;
123
- if ($[2] !== id || $[3] !== props.checked || $[4] !== props.disabled || $[5] !== props.label || $[6] !== props.name || $[7] !== t0) {
124
- t1 = jsxs2("div", { className: "form-check form-check-inline", children: [jsx2("input", { className: "form-check-input", type: "radio", id, value: props.name, checked: props.checked, disabled: props.disabled, onChange: t0 }), jsx2("label", { className: "form-check-label", htmlFor: id, children: props.label })] });
125
- $[2] = id;
126
- $[3] = props.checked;
127
- $[4] = props.disabled;
128
- $[5] = props.label;
129
- $[6] = props.name;
130
- $[7] = t0;
131
- $[8] = t1;
132
- } else {
133
- t1 = $[8];
134
- }
135
- return t1;
25
+ //#endregion
26
+ //#region src/BootstrapValueEditor.tsx
27
+ const RadioButton = (props) => {
28
+ const id = React.useId();
29
+ return /* @__PURE__ */ React.createElement("div", { className: "form-check form-check-inline" }, /* @__PURE__ */ React.createElement("input", {
30
+ className: "form-check-input",
31
+ type: "radio",
32
+ id,
33
+ value: props.name,
34
+ checked: props.checked,
35
+ disabled: props.disabled,
36
+ onChange: (e) => props.handleOnChange(e.target.value)
37
+ }), /* @__PURE__ */ React.createElement("label", {
38
+ className: "form-check-label",
39
+ htmlFor: id
40
+ }, props.label));
136
41
  };
137
- var BootstrapValueEditor = function BootstrapValueEditor2(props) {
138
- var $ = c(26);
139
- var _useValueEditor = useValueEditor(props), valueListItemClassName = _useValueEditor.valueListItemClassName;
140
- if (props.operator === "null" || props.operator === "notNull") {
141
- return null;
142
- }
143
- if ((props.operator === "between" || props.operator === "notBetween") && (props.type === "select" || props.type === "text")) {
144
- var listItemClasses = props.type === "text" ? "form-control form-control-sm" : "form-select form-select-sm";
145
- var _t = "".concat(valueListItemClassName, " ").concat(listItemClasses);
146
- var _t2;
147
- if ($[0] !== props || $[1] !== _t) {
148
- _t2 = jsx2(ValueEditor, _objectSpread(_objectSpread({}, props), {}, { skipHook: true, schema: _objectSpread(_objectSpread({}, props.schema), {}, { classNames: _objectSpread(_objectSpread({}, props.schema.classNames), {}, { valueListItem: _t }) }) }));
149
- $[0] = props;
150
- $[1] = _t;
151
- $[2] = _t2;
152
- } else {
153
- _t2 = $[2];
154
- }
155
- return _t2;
156
- }
157
- switch (props.type) {
158
- case "select": {
159
- }
160
- case "multiselect": {
161
- var _t3 = "".concat(props.className, " form-select form-select-sm");
162
- var _t4;
163
- if ($[3] !== props || $[4] !== _t3) {
164
- _t4 = jsx2(ValueEditor, _objectSpread(_objectSpread({}, props), {}, { skipHook: true, className: _t3 }));
165
- $[3] = props;
166
- $[4] = _t3;
167
- $[5] = _t4;
168
- } else {
169
- _t4 = $[5];
170
- }
171
- return _t4;
172
- }
173
- case "switch": {
174
- var _t5 = "".concat(props.className, " custom-control custom-switch");
175
- var _t6;
176
- if ($[6] !== props) {
177
- _t6 = function _t62(e) {
178
- return props.handleOnChange(e.target.checked);
179
- };
180
- $[6] = props;
181
- $[7] = _t6;
182
- } else {
183
- _t6 = $[7];
184
- }
185
- var t2 = !!props.value;
186
- var t3;
187
- if ($[8] !== props.disabled || $[9] !== props.title || $[10] !== _t5 || $[11] !== _t6 || $[12] !== t2) {
188
- t3 = jsx2("span", { className: _t5, children: jsx2("input", { type: "checkbox", className: "form-check-input custom-control-input", title: props.title, disabled: props.disabled, onChange: _t6, checked: t2 }) });
189
- $[8] = props.disabled;
190
- $[9] = props.title;
191
- $[10] = _t5;
192
- $[11] = _t6;
193
- $[12] = t2;
194
- $[13] = t3;
195
- } else {
196
- t3 = $[13];
197
- }
198
- return t3;
199
- }
200
- case "checkbox": {
201
- var _t7 = "".concat(props.className, " form-check-input");
202
- var _t8;
203
- if ($[14] !== props || $[15] !== _t7) {
204
- _t8 = jsx2(ValueEditor, _objectSpread(_objectSpread({}, props), {}, { skipHook: true, className: _t7 }));
205
- $[14] = props;
206
- $[15] = _t7;
207
- $[16] = _t8;
208
- } else {
209
- _t8 = $[16];
210
- }
211
- return _t8;
212
- }
213
- case "radio": {
214
- var _t9;
215
- if ($[17] !== props.disabled || $[18] !== props.handleOnChange || $[19] !== props.title || $[20] !== props.value || $[21] !== props.values) {
216
- var _props$values;
217
- _t9 = jsx2("span", { title: props.title, className: standardClassnames.value, children: (_props$values = props.values) === null || _props$values === void 0 ? void 0 : _props$values.map(function(v) {
218
- return jsx2(RadioButton, { name: v.name, disabled: props.disabled, checked: props.value === v.name, handleOnChange: props.handleOnChange, label: v.label }, v.name);
219
- }) });
220
- $[17] = props.disabled;
221
- $[18] = props.handleOnChange;
222
- $[19] = props.title;
223
- $[20] = props.value;
224
- $[21] = props.values;
225
- $[22] = _t9;
226
- } else {
227
- _t9 = $[22];
228
- }
229
- return _t9;
230
- }
231
- }
232
- var t0 = "".concat(props.className, " form-control form-control-sm");
233
- var t1;
234
- if ($[23] !== props || $[24] !== t0) {
235
- t1 = jsx2(ValueEditor, _objectSpread(_objectSpread({}, props), {}, { skipHook: true, className: t0 }));
236
- $[23] = props;
237
- $[24] = t0;
238
- $[25] = t1;
239
- } else {
240
- t1 = $[25];
241
- }
242
- return t1;
42
+ /**
43
+ * @group Components
44
+ */
45
+ const BootstrapValueEditor = (props) => {
46
+ const { valueListItemClassName } = useValueEditor(props);
47
+ if (props.operator === "null" || props.operator === "notNull") return null;
48
+ if ((props.operator === "between" || props.operator === "notBetween") && (props.type === "select" || props.type === "text")) {
49
+ const listItemClasses = props.type === "text" ? "form-control form-control-sm" : "form-select form-select-sm";
50
+ return /* @__PURE__ */ React.createElement(ValueEditor, {
51
+ ...props,
52
+ skipHook: true,
53
+ schema: {
54
+ ...props.schema,
55
+ classNames: {
56
+ ...props.schema.classNames,
57
+ valueListItem: `${valueListItemClassName} ${listItemClasses}`
58
+ }
59
+ }
60
+ });
61
+ }
62
+ switch (props.type) {
63
+ case "select":
64
+ case "multiselect": return /* @__PURE__ */ React.createElement(ValueEditor, {
65
+ ...props,
66
+ skipHook: true,
67
+ className: `${props.className} form-select form-select-sm`
68
+ });
69
+ case "switch": return /* @__PURE__ */ React.createElement("span", { className: `${props.className} custom-control custom-switch` }, /* @__PURE__ */ React.createElement("input", {
70
+ type: "checkbox",
71
+ className: "form-check-input custom-control-input",
72
+ title: props.title,
73
+ disabled: props.disabled,
74
+ onChange: (e) => props.handleOnChange(e.target.checked),
75
+ checked: !!props.value
76
+ }));
77
+ case "checkbox": return /* @__PURE__ */ React.createElement(ValueEditor, {
78
+ ...props,
79
+ skipHook: true,
80
+ className: `${props.className} form-check-input`
81
+ });
82
+ case "radio": return /* @__PURE__ */ React.createElement("span", {
83
+ title: props.title,
84
+ className: standardClassnames.value
85
+ }, props.values?.map((v) => /* @__PURE__ */ React.createElement(RadioButton, {
86
+ key: v.name,
87
+ name: v.name,
88
+ disabled: props.disabled,
89
+ checked: props.value === v.name,
90
+ handleOnChange: props.handleOnChange,
91
+ label: v.label
92
+ })));
93
+ }
94
+ return /* @__PURE__ */ React.createElement(ValueEditor, {
95
+ ...props,
96
+ skipHook: true,
97
+ className: `${props.className} form-control form-control-sm`
98
+ });
243
99
  };
244
100
 
245
- // src/index.tsx
246
- var bootstrapControlElements = { notToggle: BootstrapNotToggle, valueEditor: BootstrapValueEditor };
247
- var bootstrapControlClassnames = {
248
- actionElement: "btn btn-sm",
249
- addGroup: "btn-secondary",
250
- addRule: "btn-primary",
251
- cloneGroup: "btn-secondary",
252
- cloneRule: "btn-secondary",
253
- lockGroup: "btn-secondary",
254
- lockRule: "btn-secondary",
255
- removeGroup: "btn-danger",
256
- removeRule: "btn-danger",
257
- // BootstrapValueEditor adds its own classnames
258
- // value: '',
259
- valueSelector: "form-select form-select-sm"
101
+ //#endregion
102
+ //#region src/index.tsx
103
+ /**
104
+ * @group Props
105
+ */
106
+ const bootstrapControlElements = {
107
+ notToggle: BootstrapNotToggle,
108
+ valueEditor: BootstrapValueEditor
260
109
  };
261
- var bootstrapTranslations = { removeGroup: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-x" }) }, removeRule: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-x" }) }, cloneRule: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-copy" }) }, cloneRuleGroup: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-copy" }) }, dragHandle: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-grip-vertical" }) }, lockGroup: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-unlock" }) }, lockRule: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-unlock" }) }, lockGroupDisabled: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-lock" }) }, lockRuleDisabled: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-lock" }) }, shiftActionUp: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-chevron-compact-up" }) }, shiftActionDown: { label: /* @__PURE__ */ jsx3("i", { className: "bi bi-chevron-compact-down" }) } };
262
- var QueryBuilderBootstrap = getCompatContextProvider({ controlClassnames: bootstrapControlClassnames, controlElements: bootstrapControlElements, translations: bootstrapTranslations });
263
- export {
264
- BootstrapNotToggle,
265
- BootstrapValueEditor,
266
- QueryBuilderBootstrap,
267
- bootstrapControlClassnames,
268
- bootstrapControlElements,
269
- bootstrapTranslations
110
+ /**
111
+ * @group Props
112
+ */
113
+ const bootstrapControlClassnames = {
114
+ actionElement: "btn btn-sm",
115
+ addGroup: "btn-secondary",
116
+ addRule: "btn-primary",
117
+ cloneGroup: "btn-secondary",
118
+ cloneRule: "btn-secondary",
119
+ lockGroup: "btn-secondary",
120
+ lockRule: "btn-secondary",
121
+ removeGroup: "btn-danger",
122
+ removeRule: "btn-danger",
123
+ valueSelector: "form-select form-select-sm"
270
124
  };
125
+ /**
126
+ * @group Props
127
+ */
128
+ const bootstrapTranslations = {
129
+ removeGroup: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-x" }) },
130
+ removeRule: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-x" }) },
131
+ cloneRule: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-copy" }) },
132
+ cloneRuleGroup: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-copy" }) },
133
+ dragHandle: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-grip-vertical" }) },
134
+ lockGroup: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-unlock" }) },
135
+ lockRule: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-unlock" }) },
136
+ lockGroupDisabled: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-lock" }) },
137
+ lockRuleDisabled: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-lock" }) },
138
+ shiftActionUp: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-chevron-compact-up" }) },
139
+ shiftActionDown: { label: /* @__PURE__ */ React.createElement("i", { className: "bi bi-chevron-compact-down" }) }
140
+ };
141
+ /**
142
+ * @group Components
143
+ */
144
+ const QueryBuilderBootstrap = getCompatContextProvider({
145
+ controlClassnames: bootstrapControlClassnames,
146
+ controlElements: bootstrapControlElements,
147
+ translations: bootstrapTranslations
148
+ });
149
+
150
+ //#endregion
151
+ export { BootstrapNotToggle, BootstrapValueEditor, QueryBuilderBootstrap, bootstrapControlClassnames, bootstrapControlElements, bootstrapTranslations };
271
152
  //# sourceMappingURL=react-querybuilder_bootstrap.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.tsx","../../../utils/react-compiler/react-compiler-runtime.ts","../src/BootstrapNotToggle.tsx","../src/BootstrapValueEditor.tsx"],"sourcesContent":["import{jsx}from\"react/jsx-runtime\";import{getCompatContextProvider}from\"react-querybuilder\";import{BootstrapNotToggle}from\"./BootstrapNotToggle\";import{BootstrapValueEditor}from\"./BootstrapValueEditor\";export*from\"./BootstrapNotToggle\";export*from\"./BootstrapValueEditor\";export var bootstrapControlElements={notToggle:BootstrapNotToggle,valueEditor:BootstrapValueEditor};export var bootstrapControlClassnames={actionElement:\"btn btn-sm\",addGroup:\"btn-secondary\",addRule:\"btn-primary\",cloneGroup:\"btn-secondary\",cloneRule:\"btn-secondary\",lockGroup:\"btn-secondary\",lockRule:\"btn-secondary\",removeGroup:\"btn-danger\",removeRule:\"btn-danger\",// BootstrapValueEditor adds its own classnames\n// value: '',\nvalueSelector:\"form-select form-select-sm\"};export var bootstrapTranslations={removeGroup:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-x\"})},removeRule:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-x\"})},cloneRule:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-copy\"})},cloneRuleGroup:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-copy\"})},dragHandle:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-grip-vertical\"})},lockGroup:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-unlock\"})},lockRule:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-unlock\"})},lockGroupDisabled:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-lock\"})},lockRuleDisabled:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-lock\"})},shiftActionUp:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-chevron-compact-up\"})},shiftActionDown:{label:/* @__PURE__ */jsx(\"i\",{className:\"bi bi-chevron-compact-down\"})}};export var QueryBuilderBootstrap=getCompatContextProvider({controlClassnames:bootstrapControlClassnames,controlElements:bootstrapControlElements,translations:bootstrapTranslations});","import*as React from\"react\";var $empty=Symbol[\"for\"](\"react.memo_cache_sentinel\");export function c(size){return React.useMemo(function(){var $=new Array(size);for(var ii=0;ii<size;ii++){$[ii]=$empty;}$[$empty]=true;return $;},// oxlint-disable-next-line exhaustive-deps\n[]);}","import{c as _c}from\"react-compiler-runtime\";import{jsx,jsxs}from\"react/jsx-runtime\";import{useId}from\"react\";export var BootstrapNotToggle=function BootstrapNotToggle(t0){var $=_c(10);var className=t0.className,handleOnChange=t0.handleOnChange,title=t0.title,label=t0.label,checked=t0.checked,disabled=t0.disabled;var id=useId();var t1=\"form-check-inline form-switch \".concat(className);var t2;if($[0]!==handleOnChange){t2=function t2(e){return handleOnChange(e.target.checked);};$[0]=handleOnChange;$[1]=t2;}else{t2=$[1];}var t3=!!checked;var t4;if($[2]!==disabled||$[3]!==id||$[4]!==label||$[5]!==t1||$[6]!==t2||$[7]!==t3||$[8]!==title){t4=jsxs(\"div\",{className:t1,children:[jsx(\"input\",{id:id,className:\"form-check-input\",type:\"checkbox\",onChange:t2,checked:t3,disabled:disabled}),jsx(\"label\",{title:title,htmlFor:id,className:\"form-check-label\",children:label})]});$[2]=disabled;$[3]=id;$[4]=label;$[5]=t1;$[6]=t2;$[7]=t3;$[8]=title;$[9]=t4;}else{t4=$[9];}return t4;};","function _typeof(o){\"@babel/helpers - typeof\";return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&\"function\"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?\"symbol\":typeof o;},_typeof(o);}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey(t){var i=_toPrimitive(t,\"string\");return\"symbol\"==_typeof(i)?i:i+\"\";}function _toPrimitive(t,r){if(\"object\"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||\"default\");if(\"object\"!=_typeof(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\");}return(\"string\"===r?String:Number)(t);}import{c as _c}from\"react-compiler-runtime\";import{jsx,jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{standardClassnames,useValueEditor,ValueEditor}from\"react-querybuilder\";var RadioButton=function RadioButton(props){var $=_c(9);var id=React.useId();var t0;if($[0]!==props){t0=function t0(e){return props.handleOnChange(e.target.value);};$[0]=props;$[1]=t0;}else{t0=$[1];}var t1;if($[2]!==id||$[3]!==props.checked||$[4]!==props.disabled||$[5]!==props.label||$[6]!==props.name||$[7]!==t0){t1=jsxs(\"div\",{className:\"form-check form-check-inline\",children:[jsx(\"input\",{className:\"form-check-input\",type:\"radio\",id:id,value:props.name,checked:props.checked,disabled:props.disabled,onChange:t0}),jsx(\"label\",{className:\"form-check-label\",htmlFor:id,children:props.label})]});$[2]=id;$[3]=props.checked;$[4]=props.disabled;$[5]=props.label;$[6]=props.name;$[7]=t0;$[8]=t1;}else{t1=$[8];}return t1;};export var BootstrapValueEditor=function BootstrapValueEditor(props){var $=_c(26);var _useValueEditor=useValueEditor(props),valueListItemClassName=_useValueEditor.valueListItemClassName;if(props.operator===\"null\"||props.operator===\"notNull\"){return null;}if((props.operator===\"between\"||props.operator===\"notBetween\")&&(props.type===\"select\"||props.type===\"text\")){var listItemClasses=props.type===\"text\"?\"form-control form-control-sm\":\"form-select form-select-sm\";var _t=\"\".concat(valueListItemClassName,\" \").concat(listItemClasses);var _t2;if($[0]!==props||$[1]!==_t){_t2=jsx(ValueEditor,_objectSpread(_objectSpread({},props),{},{skipHook:true,schema:_objectSpread(_objectSpread({},props.schema),{},{classNames:_objectSpread(_objectSpread({},props.schema.classNames),{},{valueListItem:_t})})}));$[0]=props;$[1]=_t;$[2]=_t2;}else{_t2=$[2];}return _t2;}switch(props.type){case\"select\":{}case\"multiselect\":{var _t3=\"\".concat(props.className,\" form-select form-select-sm\");var _t4;if($[3]!==props||$[4]!==_t3){_t4=jsx(ValueEditor,_objectSpread(_objectSpread({},props),{},{skipHook:true,className:_t3}));$[3]=props;$[4]=_t3;$[5]=_t4;}else{_t4=$[5];}return _t4;}case\"switch\":{var _t5=\"\".concat(props.className,\" custom-control custom-switch\");var _t6;if($[6]!==props){_t6=function _t6(e){return props.handleOnChange(e.target.checked);};$[6]=props;$[7]=_t6;}else{_t6=$[7];}var t2=!!props.value;var t3;if($[8]!==props.disabled||$[9]!==props.title||$[10]!==_t5||$[11]!==_t6||$[12]!==t2){t3=jsx(\"span\",{className:_t5,children:jsx(\"input\",{type:\"checkbox\",className:\"form-check-input custom-control-input\",title:props.title,disabled:props.disabled,onChange:_t6,checked:t2})});$[8]=props.disabled;$[9]=props.title;$[10]=_t5;$[11]=_t6;$[12]=t2;$[13]=t3;}else{t3=$[13];}return t3;}case\"checkbox\":{var _t7=\"\".concat(props.className,\" form-check-input\");var _t8;if($[14]!==props||$[15]!==_t7){_t8=jsx(ValueEditor,_objectSpread(_objectSpread({},props),{},{skipHook:true,className:_t7}));$[14]=props;$[15]=_t7;$[16]=_t8;}else{_t8=$[16];}return _t8;}case\"radio\":{var _t9;if($[17]!==props.disabled||$[18]!==props.handleOnChange||$[19]!==props.title||$[20]!==props.value||$[21]!==props.values){var _props$values;_t9=jsx(\"span\",{title:props.title,className:standardClassnames.value,children:(_props$values=props.values)===null||_props$values===void 0?void 0:_props$values.map(function(v){return jsx(RadioButton,{name:v.name,disabled:props.disabled,checked:props.value===v.name,handleOnChange:props.handleOnChange,label:v.label},v.name);})});$[17]=props.disabled;$[18]=props.handleOnChange;$[19]=props.title;$[20]=props.value;$[21]=props.values;$[22]=_t9;}else{_t9=$[22];}return _t9;}}var t0=\"\".concat(props.className,\" form-control form-control-sm\");var t1;if($[23]!==props||$[24]!==t0){t1=jsx(ValueEditor,_objectSpread(_objectSpread({},props),{},{skipHook:true,className:t0}));$[23]=props;$[24]=t0;$[25]=t1;}else{t1=$[25];}return t1;};"],"mappings":";AAAA,SAAO,OAAAA,YAAQ;AAAoB,SAAO,gCAA6B;;;ACAvE,YAAU,WAAU;AAAQ,IAAI,SAAO,OAAO,KAAK,EAAE,2BAA2B;AAAS,SAAS,EAAE,MAAK;AAAC,SAAa;AAAA,IAAQ,WAAU;AAAC,UAAI,IAAE,IAAI,MAAM,IAAI;AAAE,eAAQ,KAAG,GAAE,KAAG,MAAK,MAAK;AAAC,UAAE,EAAE,IAAE;AAAA,MAAO;AAAC,QAAE,MAAM,IAAE;AAAK,aAAO;AAAA,IAAE;AAAA;AAAA,IACjO,CAAC;AAAA,EAAC;AAAE;;;ACDwC,SAAO,KAAI,YAAS;AAAoB,SAAO,aAAU;AAAe,IAAI,qBAAmB,SAASC,oBAAmB,IAAG;AAAC,MAAI,IAAE,EAAG,EAAE;AAAE,MAAI,YAAU,GAAG,WAAU,iBAAe,GAAG,gBAAe,QAAM,GAA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,KAAI,EAAC,WAAU,eAAc,CAAC,EAAC,GAAE,UAAS,EAAC,OAAqB,gBAAAA,KAAI,KAAI,EAAC,WAAU,eAAc,CAAC,EAAC,GAAE,mBAAkB,EAAC,OAAqB,gBAAAA,KAAI,KAAI,EAAC,WAAU,aAAY,CAAC,EAAC,GAAE,kBAAiB,EAAC,OAAqB,gBAAAA,KAAI,KAAI,EAAC,WAAU,aAAY,CAAC,EAAC,GAAE,eAAc,EAAC,OAAqB,gBAAAA,KAAI,KAAI,EAAC,WAAU,2BAA0B,CAAC,EAAC,GAAE,iBAAgB,EAAC,OAAqB,gBAAAA,KAAI,KAAI,EAAC,WAAU,6BAA4B,CAAC,EAAC,EAAC;AAAS,IAAI,wBAAsB,yBAAyB,EAAC,mBAAkB,4BAA2B,iBAAgB,0BAAyB,cAAa,sBAAqB,CAAC;","names":["jsx","BootstrapNotToggle","t2","jsx","jsxs","React","o","r","RadioButton","t0","BootstrapValueEditor","_t6","jsx"]}
1
+ {"version":3,"file":"react-querybuilder_bootstrap.mjs","names":["bootstrapControlElements: ControlElementsProp<FullField, string>","bootstrapControlClassnames: Partial<Classnames>","bootstrapTranslations: Partial<Translations>","QueryBuilderBootstrap: QueryBuilderContextProvider"],"sources":["../src/BootstrapNotToggle.tsx","../src/BootstrapValueEditor.tsx","../src/index.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useId } from 'react';\nimport type { NotToggleProps } from 'react-querybuilder';\n\n/**\n * @group Components\n */\nexport const BootstrapNotToggle = ({\n className,\n handleOnChange,\n title,\n label,\n checked,\n disabled,\n}: NotToggleProps): React.JSX.Element => {\n const id = useId();\n\n return (\n <div className={`form-check-inline form-switch ${className}`}>\n <input\n id={id}\n className=\"form-check-input\"\n type=\"checkbox\"\n onChange={e => handleOnChange(e.target.checked)}\n checked={!!checked}\n disabled={disabled}\n />\n <label title={title} htmlFor={id} className=\"form-check-label\">\n {label}\n </label>\n </div>\n );\n};\n","import * as React from 'react';\nimport type { ValueEditorProps } from 'react-querybuilder';\nimport { standardClassnames, useValueEditor, ValueEditor } from 'react-querybuilder';\n\n// Extracted from callback so we can use `useId`\nconst RadioButton = (props: {\n name: string;\n disabled?: boolean;\n checked: boolean;\n handleOnChange: (v: string) => void;\n label: string;\n}) => {\n const id = React.useId();\n return (\n <div className=\"form-check form-check-inline\">\n <input\n className=\"form-check-input\"\n type=\"radio\"\n id={id}\n value={props.name}\n checked={props.checked}\n disabled={props.disabled}\n onChange={e => props.handleOnChange(e.target.value)}\n />\n <label className=\"form-check-label\" htmlFor={id}>\n {props.label}\n </label>\n </div>\n );\n};\n\n/**\n * @group Components\n */\nexport const BootstrapValueEditor = (props: ValueEditorProps): React.JSX.Element | null => {\n const { valueListItemClassName } = useValueEditor(props);\n\n if (props.operator === 'null' || props.operator === 'notNull') {\n return null;\n }\n\n if (\n (props.operator === 'between' || props.operator === 'notBetween') &&\n (props.type === 'select' || props.type === 'text')\n ) {\n const listItemClasses =\n props.type === 'text' ? 'form-control form-control-sm' : 'form-select form-select-sm';\n return (\n <ValueEditor\n {...props}\n skipHook\n schema={{\n ...props.schema,\n classNames: {\n ...props.schema.classNames,\n valueListItem: `${valueListItemClassName} ${listItemClasses}`,\n },\n }}\n />\n );\n }\n\n switch (props.type) {\n case 'select':\n case 'multiselect':\n return (\n <ValueEditor\n {...props}\n skipHook\n className={`${props.className} form-select form-select-sm`}\n />\n );\n\n case 'switch':\n return (\n <span className={`${props.className} custom-control custom-switch`}>\n <input\n type=\"checkbox\"\n className=\"form-check-input custom-control-input\"\n title={props.title}\n disabled={props.disabled}\n onChange={e => props.handleOnChange(e.target.checked)}\n checked={!!props.value}\n />\n </span>\n );\n\n case 'checkbox':\n return <ValueEditor {...props} skipHook className={`${props.className} form-check-input`} />;\n\n case 'radio':\n return (\n <span title={props.title} className={standardClassnames.value}>\n {props.values?.map(v => (\n <RadioButton\n key={v.name}\n name={v.name}\n disabled={props.disabled}\n checked={props.value === v.name}\n handleOnChange={props.handleOnChange}\n label={v.label}\n />\n ))}\n </span>\n );\n }\n\n return (\n <ValueEditor\n {...props}\n skipHook\n className={`${props.className} form-control form-control-sm`}\n />\n );\n};\n","import * as React from 'react';\nimport type {\n Classnames,\n ControlElementsProp,\n FullField,\n QueryBuilderContextProvider,\n Translations,\n} from 'react-querybuilder';\nimport { getCompatContextProvider } from 'react-querybuilder';\nimport { BootstrapNotToggle } from './BootstrapNotToggle';\nimport { BootstrapValueEditor } from './BootstrapValueEditor';\n\nexport * from './BootstrapNotToggle';\nexport * from './BootstrapValueEditor';\n\n/**\n * @group Props\n */\nexport const bootstrapControlElements: ControlElementsProp<FullField, string> = {\n notToggle: BootstrapNotToggle,\n valueEditor: BootstrapValueEditor,\n};\n\n/**\n * @group Props\n */\nexport const bootstrapControlClassnames: Partial<Classnames> = {\n actionElement: 'btn btn-sm',\n addGroup: 'btn-secondary',\n addRule: 'btn-primary',\n cloneGroup: 'btn-secondary',\n cloneRule: 'btn-secondary',\n lockGroup: 'btn-secondary',\n lockRule: 'btn-secondary',\n removeGroup: 'btn-danger',\n removeRule: 'btn-danger',\n // BootstrapValueEditor adds its own classnames\n // value: '',\n valueSelector: 'form-select form-select-sm',\n};\n\n/**\n * @group Props\n */\nexport const bootstrapTranslations: Partial<Translations> = {\n removeGroup: { label: <i className=\"bi bi-x\" /> },\n removeRule: { label: <i className=\"bi bi-x\" /> },\n cloneRule: { label: <i className=\"bi bi-copy\" /> },\n cloneRuleGroup: { label: <i className=\"bi bi-copy\" /> },\n dragHandle: { label: <i className=\"bi bi-grip-vertical\" /> },\n lockGroup: { label: <i className=\"bi bi-unlock\" /> },\n lockRule: { label: <i className=\"bi bi-unlock\" /> },\n lockGroupDisabled: { label: <i className=\"bi bi-lock\" /> },\n lockRuleDisabled: { label: <i className=\"bi bi-lock\" /> },\n shiftActionUp: { label: <i className=\"bi bi-chevron-compact-up\" /> },\n shiftActionDown: { label: <i className=\"bi bi-chevron-compact-down\" /> },\n};\n\n/**\n * @group Components\n */\nexport const QueryBuilderBootstrap: QueryBuilderContextProvider = getCompatContextProvider({\n controlClassnames: bootstrapControlClassnames,\n controlElements: bootstrapControlElements,\n translations: bootstrapTranslations,\n});\n"],"mappings":";;;;;;;;AAOA,MAAa,sBAAsB,EACjC,WACA,gBACA,OACA,OACA,SACA,eACuC;CACvC,MAAM,KAAK,OAAO;AAElB,QACE,oCAAC,SAAI,WAAW,iCAAiC,eAC/C,oCAAC;EACK;EACJ,WAAU;EACV,MAAK;EACL,WAAU,MAAK,eAAe,EAAE,OAAO,QAAQ;EAC/C,SAAS,CAAC,CAAC;EACD;GACV,EACF,oCAAC;EAAa;EAAO,SAAS;EAAI,WAAU;IACzC,MACK,CACJ;;;;;ACzBV,MAAM,eAAe,UAMf;CACJ,MAAM,KAAK,MAAM,OAAO;AACxB,QACE,oCAAC,SAAI,WAAU,kCACb,oCAAC;EACC,WAAU;EACV,MAAK;EACD;EACJ,OAAO,MAAM;EACb,SAAS,MAAM;EACf,UAAU,MAAM;EAChB,WAAU,MAAK,MAAM,eAAe,EAAE,OAAO,MAAM;GACnD,EACF,oCAAC;EAAM,WAAU;EAAmB,SAAS;IAC1C,MAAM,MACD,CACJ;;;;;AAOV,MAAa,wBAAwB,UAAsD;CACzF,MAAM,EAAE,2BAA2B,eAAe,MAAM;AAExD,KAAI,MAAM,aAAa,UAAU,MAAM,aAAa,UAClD,QAAO;AAGT,MACG,MAAM,aAAa,aAAa,MAAM,aAAa,kBACnD,MAAM,SAAS,YAAY,MAAM,SAAS,SAC3C;EACA,MAAM,kBACJ,MAAM,SAAS,SAAS,iCAAiC;AAC3D,SACE,oCAAC;GACC,GAAI;GACJ;GACA,QAAQ;IACN,GAAG,MAAM;IACT,YAAY;KACV,GAAG,MAAM,OAAO;KAChB,eAAe,GAAG,uBAAuB,GAAG;KAC7C;IACF;IACD;;AAIN,SAAQ,MAAM,MAAd;EACE,KAAK;EACL,KAAK,cACH,QACE,oCAAC;GACC,GAAI;GACJ;GACA,WAAW,GAAG,MAAM,UAAU;IA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