@react-fabric/searchbar 1.0.0-beta.5 → 1.0.0-beta.6

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.
@@ -72,6 +72,8 @@ var FilterTag = function FilterTag(_ref) {
72
72
  disabled: !filter.disabled
73
73
  })), e.stopPropagation()];
74
74
  },
75
+ "data-testid": "filter-tag",
76
+ "data-test-value": filter.id,
75
77
  stopPropagation: true,
76
78
  onRemove: filter.required ? undefined : function () {
77
79
  return onRemove();
@@ -100,6 +100,7 @@ var QueryForm = function QueryForm(_ref) {
100
100
  gridTemplate: '"content" 1fr/1fr'
101
101
  },
102
102
  children: /*#__PURE__*/jsxRuntime.jsx(monaco.CodeEditor, _objectSpread(_objectSpread({
103
+ language: "json",
103
104
  minimal: true,
104
105
  required: true
105
106
  }, field), {}, {
@@ -132,6 +132,7 @@ var SearchBar = function SearchBar(_ref) {
132
132
  },
133
133
  onSelect: updateHistory,
134
134
  onQuery: onQuery,
135
+ "data-testid": "searchbar-input",
135
136
  onEnterPressed: function onEnterPressed() {
136
137
  return fireSearch(state.query, state.filters);
137
138
  }
@@ -72,6 +72,8 @@ var FilterTag = function FilterTag(_ref) {
72
72
  disabled: !filter.disabled
73
73
  })), e.stopPropagation()];
74
74
  },
75
+ "data-testid": "filter-tag",
76
+ "data-test-value": filter.id,
75
77
  stopPropagation: true,
76
78
  onRemove: filter.required ? undefined : function () {
77
79
  return onRemove();
@@ -100,6 +100,7 @@ var QueryForm = function QueryForm(_ref) {
100
100
  gridTemplate: '"content" 1fr/1fr'
101
101
  },
102
102
  children: /*#__PURE__*/jsx(CodeEditor, _objectSpread(_objectSpread({
103
+ language: "json",
103
104
  minimal: true,
104
105
  required: true
105
106
  }, field), {}, {
@@ -132,6 +132,7 @@ var SearchBar = function SearchBar(_ref) {
132
132
  },
133
133
  onSelect: updateHistory,
134
134
  onQuery: onQuery,
135
+ "data-testid": "searchbar-input",
135
136
  onEnterPressed: function onEnterPressed() {
136
137
  return fireSearch(state.query, state.filters);
137
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/searchbar",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "RUF: Searchbar with filters package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@floating-ui/react": "0.26.24",
37
- "@react-fabric/core": "^1.0.0-beta.5",
38
- "@react-fabric/date": "^1.0.0-beta.5",
39
- "@react-fabric/form": "^1.0.0-beta.5",
40
- "@react-fabric/monaco": "^1.0.0-beta.5",
41
- "@react-fabric/utilities": "^1.0.0-beta.5",
37
+ "@react-fabric/core": "^1.0.0-beta.6",
38
+ "@react-fabric/date": "^1.0.0-beta.6",
39
+ "@react-fabric/form": "^1.0.0-beta.6",
40
+ "@react-fabric/monaco": "^1.0.0-beta.6",
41
+ "@react-fabric/utilities": "^1.0.0-beta.6",
42
42
  "classnames": "^2.5.1",
43
43
  "react-hook-form": "^7.52.1"
44
44
  },
@@ -52,5 +52,5 @@
52
52
  "node": ">=18.12.0",
53
53
  "npm": ">=8.19.0"
54
54
  },
55
- "gitHead": "7d4a7ed1ea9890652826bef58d01c31280d761c8"
55
+ "gitHead": "21167df13cedeae8b365e87b9bab6d7401298cb6"
56
56
  }
@@ -90,6 +90,8 @@ export const FilterTag = ({
90
90
  onChange({ ...filter, disabled: !filter.disabled }),
91
91
  e.stopPropagation(),
92
92
  ]}
93
+ data-testid="filter-tag"
94
+ data-test-value={filter.id}
93
95
  stopPropagation
94
96
  onRemove={filter.required ? undefined : () => onRemove()}
95
97
  >
@@ -125,7 +125,13 @@ export const QueryForm = ({
125
125
  gridTemplate: '"content" 1fr/1fr',
126
126
  }}
127
127
  >
128
- <CodeEditor minimal required {...field} schema={querySchema} />
128
+ <CodeEditor
129
+ language="json"
130
+ minimal
131
+ required
132
+ {...field}
133
+ schema={querySchema}
134
+ />
129
135
  </div>
130
136
  </div>
131
137
  )}
@@ -140,6 +140,7 @@ export const SearchBar = ({
140
140
  onInput={() => dispatch({ type: "dirty", dirty: true })}
141
141
  onSelect={updateHistory}
142
142
  onQuery={onQuery}
143
+ data-testid="searchbar-input"
143
144
  onEnterPressed={() => fireSearch(state.query, state.filters)}
144
145
  />
145
146
  {append}