instantsearch.js 4.64.2 → 4.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Answers/Answers.js +2 -2
- package/cjs/components/Breadcrumb/Breadcrumb.js +4 -4
- package/cjs/components/ClearRefinements/ClearRefinements.js +2 -2
- package/cjs/components/CurrentRefinements/CurrentRefinements.js +2 -2
- package/cjs/components/GeoSearchControls/GeoSearchControls.js +3 -3
- package/cjs/components/Highlight/Highlight.js +5 -5
- package/cjs/components/Hits/Hits.js +2 -2
- package/cjs/components/InfiniteHits/InfiniteHits.js +4 -4
- package/cjs/components/InternalHighlight/InternalHighlight.js +2 -2
- package/cjs/components/MenuSelect/MenuSelect.js +2 -2
- package/cjs/components/Pagination/Pagination.js +3 -3
- package/cjs/components/Panel/Panel.js +2 -2
- package/cjs/components/RangeInput/RangeInput.js +4 -4
- package/cjs/components/RefinementList/RefinementList.js +4 -4
- package/cjs/components/ReverseHighlight/ReverseHighlight.js +5 -5
- package/cjs/components/ReverseSnippet/ReverseSnippet.js +5 -5
- package/cjs/components/Selector/Selector.js +3 -3
- package/cjs/components/Slider/Pit.js +2 -2
- package/cjs/components/Slider/Slider.js +3 -3
- package/cjs/components/Snippet/Snippet.js +5 -5
- package/cjs/components/Stats/Stats.js +2 -2
- package/cjs/components/Template/Template.js +64 -7
- package/cjs/connectors/autocomplete/connectAutocomplete.js +3 -1
- package/cjs/connectors/geo-search/connectGeoSearch.js +3 -1
- package/cjs/connectors/hits/connectHits.js +6 -2
- package/cjs/connectors/infinite-hits/connectInfiniteHits.js +6 -2
- package/cjs/lib/utils/createSendEventForHits.js +8 -8
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/answers/answers.js +7 -7
- package/cjs/widgets/breadcrumb/breadcrumb.js +8 -8
- package/cjs/widgets/clear-refinements/clear-refinements.js +4 -4
- package/cjs/widgets/current-refinements/current-refinements.js +9 -9
- package/cjs/widgets/geo-search/geo-search.js +11 -11
- package/cjs/widgets/hierarchical-menu/defaultTemplates.js +4 -4
- package/cjs/widgets/hierarchical-menu/hierarchical-menu.js +14 -14
- package/cjs/widgets/hits/hits.js +5 -5
- package/cjs/widgets/hits-per-page/hits-per-page.js +4 -4
- package/cjs/widgets/infinite-hits/infinite-hits.js +9 -9
- package/cjs/widgets/menu/defaultTemplates.js +4 -4
- package/cjs/widgets/menu/menu.js +11 -11
- package/cjs/widgets/menu-select/menu-select.js +5 -5
- package/cjs/widgets/numeric-menu/numeric-menu.js +9 -9
- package/cjs/widgets/pagination/pagination.js +13 -13
- package/cjs/widgets/panel/panel.js +10 -10
- package/cjs/widgets/powered-by/powered-by.js +4 -4
- package/cjs/widgets/query-rule-custom-data/query-rule-custom-data.js +2 -2
- package/cjs/widgets/range-input/range-input.js +10 -10
- package/cjs/widgets/range-slider/range-slider.js +3 -3
- package/cjs/widgets/rating-menu/defaultTemplates.js +6 -6
- package/cjs/widgets/rating-menu/rating-menu.js +13 -13
- package/cjs/widgets/refinement-list/defaultTemplates.js +5 -5
- package/cjs/widgets/refinement-list/refinement-list.js +23 -23
- package/cjs/widgets/relevant-sort/relevant-sort.js +4 -4
- package/cjs/widgets/search-box/search-box.js +10 -10
- package/cjs/widgets/sort-by/sort-by.js +4 -4
- package/cjs/widgets/stats/stats.js +3 -3
- package/cjs/widgets/toggle-refinement/toggle-refinement.js +5 -5
- package/cjs/widgets/voice-search/voice-search.js +4 -4
- package/dist/instantsearch.development.d.ts +6 -2
- package/dist/instantsearch.development.js +213 -155
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +6 -2
- package/dist/instantsearch.production.min.d.ts +6 -2
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/ClearRefinements/ClearRefinements.js +1 -1
- package/es/components/CurrentRefinements/CurrentRefinements.js +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.js +1 -1
- package/es/components/Highlight/Highlight.d.ts +1 -1
- package/es/components/Highlight/Highlight.js +1 -1
- package/es/components/Hits/Hits.js +1 -1
- package/es/components/InfiniteHits/InfiniteHits.js +1 -1
- package/es/components/InternalHighlight/InternalHighlight.d.ts +1 -1
- package/es/components/InternalHighlight/InternalHighlight.js +1 -1
- package/es/components/MenuSelect/MenuSelect.js +1 -1
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Panel/Panel.js +1 -1
- package/es/components/RangeInput/RangeInput.js +1 -1
- package/es/components/RefinementList/RefinementList.js +1 -1
- package/es/components/ReverseHighlight/ReverseHighlight.d.ts +1 -1
- package/es/components/ReverseHighlight/ReverseHighlight.js +1 -1
- package/es/components/ReverseSnippet/ReverseSnippet.d.ts +1 -1
- package/es/components/ReverseSnippet/ReverseSnippet.js +1 -1
- package/es/components/Selector/Selector.js +1 -1
- package/es/components/Slider/Pit.js +1 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Snippet/Snippet.d.ts +1 -1
- package/es/components/Snippet/Snippet.js +1 -1
- package/es/components/Stats/Stats.js +1 -1
- package/es/components/Template/Template.d.ts +1 -1
- package/es/components/Template/Template.js +65 -8
- package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -0
- package/es/connectors/autocomplete/connectAutocomplete.js +3 -1
- package/es/connectors/geo-search/connectGeoSearch.js +3 -1
- package/es/connectors/hits/connectHits.js +6 -2
- package/es/connectors/infinite-hits/connectInfiniteHits.js +6 -2
- package/es/lib/utils/createSendEventForHits.d.ts +6 -6
- package/es/lib/utils/createSendEventForHits.js +8 -8
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/widgets/answers/answers.js +1 -1
- package/es/widgets/breadcrumb/breadcrumb.js +1 -1
- package/es/widgets/clear-refinements/clear-refinements.js +1 -1
- package/es/widgets/current-refinements/current-refinements.js +1 -1
- package/es/widgets/geo-search/geo-search.js +1 -1
- package/es/widgets/hierarchical-menu/defaultTemplates.js +1 -1
- package/es/widgets/hierarchical-menu/hierarchical-menu.js +1 -1
- package/es/widgets/hits/hits.js +1 -1
- package/es/widgets/hits-per-page/hits-per-page.js +1 -1
- package/es/widgets/infinite-hits/infinite-hits.js +1 -1
- package/es/widgets/menu/defaultTemplates.js +1 -1
- package/es/widgets/menu/menu.js +1 -1
- package/es/widgets/menu-select/menu-select.js +1 -1
- package/es/widgets/numeric-menu/numeric-menu.js +1 -1
- package/es/widgets/pagination/pagination.js +1 -1
- package/es/widgets/panel/panel.js +1 -1
- package/es/widgets/powered-by/powered-by.js +1 -1
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.js +1 -1
- package/es/widgets/range-input/range-input.js +1 -1
- package/es/widgets/range-slider/range-slider.js +1 -1
- package/es/widgets/rating-menu/defaultTemplates.js +1 -1
- package/es/widgets/rating-menu/rating-menu.js +1 -1
- package/es/widgets/refinement-list/defaultTemplates.js +1 -1
- package/es/widgets/refinement-list/refinement-list.js +1 -1
- package/es/widgets/relevant-sort/relevant-sort.js +1 -1
- package/es/widgets/search-box/search-box.js +1 -1
- package/es/widgets/sort-by/sort-by.js +1 -1
- package/es/widgets/stats/stats.js +1 -1
- package/es/widgets/toggle-refinement/toggle-refinement.js +1 -1
- package/es/widgets/voice-search/voice-search.js +1 -1
- package/package.json +6 -7
|
@@ -69,7 +69,9 @@ var connectAutocomplete = function connectAutocomplete(renderFn) {
|
|
|
69
69
|
scopedResult.results.hits = escapeHTML ? (0, _utils.escapeHits)(scopedResult.results.hits) : scopedResult.results.hits;
|
|
70
70
|
var sendEvent = (0, _utils.createSendEventForHits)({
|
|
71
71
|
instantSearchInstance: instantSearchInstance,
|
|
72
|
-
|
|
72
|
+
getIndex: function getIndex() {
|
|
73
|
+
return scopedResult.results.index;
|
|
74
|
+
},
|
|
73
75
|
widgetType: _this.$$type
|
|
74
76
|
});
|
|
75
77
|
return {
|
|
@@ -155,7 +155,9 @@ var connectGeoSearch = function connectGeoSearch(renderFn) {
|
|
|
155
155
|
if (!sendEvent) {
|
|
156
156
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
157
157
|
instantSearchInstance: instantSearchInstance,
|
|
158
|
-
|
|
158
|
+
getIndex: function getIndex() {
|
|
159
|
+
return helper.getIndex();
|
|
160
|
+
},
|
|
159
161
|
widgetType: $$type
|
|
160
162
|
});
|
|
161
163
|
}
|
|
@@ -54,13 +54,17 @@ var connectHits = function connectHits(renderFn) {
|
|
|
54
54
|
if (!sendEvent) {
|
|
55
55
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
56
56
|
instantSearchInstance: instantSearchInstance,
|
|
57
|
-
|
|
57
|
+
getIndex: function getIndex() {
|
|
58
|
+
return helper.getIndex();
|
|
59
|
+
},
|
|
58
60
|
widgetType: this.$$type
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
if (!bindEvent) {
|
|
62
64
|
bindEvent = (0, _utils.createBindEventForHits)({
|
|
63
|
-
|
|
65
|
+
getIndex: function getIndex() {
|
|
66
|
+
return helper.getIndex();
|
|
67
|
+
},
|
|
64
68
|
widgetType: this.$$type,
|
|
65
69
|
instantSearchInstance: instantSearchInstance
|
|
66
70
|
});
|
|
@@ -161,11 +161,15 @@ var connectInfiniteHits = function connectInfiniteHits(renderFn) {
|
|
|
161
161
|
showMore = getShowMore(helper);
|
|
162
162
|
sendEvent = (0, _utils.createSendEventForHits)({
|
|
163
163
|
instantSearchInstance: instantSearchInstance,
|
|
164
|
-
|
|
164
|
+
getIndex: function getIndex() {
|
|
165
|
+
return helper.getIndex();
|
|
166
|
+
},
|
|
165
167
|
widgetType: this.$$type
|
|
166
168
|
});
|
|
167
169
|
bindEvent = (0, _utils.createBindEventForHits)({
|
|
168
|
-
|
|
170
|
+
getIndex: function getIndex() {
|
|
171
|
+
return helper.getIndex();
|
|
172
|
+
},
|
|
169
173
|
widgetType: this.$$type,
|
|
170
174
|
instantSearchInstance: instantSearchInstance
|
|
171
175
|
});
|
|
@@ -28,7 +28,7 @@ function chunk(arr) {
|
|
|
28
28
|
return chunks;
|
|
29
29
|
}
|
|
30
30
|
function _buildEventPayloadsForHits(_ref) {
|
|
31
|
-
var
|
|
31
|
+
var getIndex = _ref.getIndex,
|
|
32
32
|
widgetType = _ref.widgetType,
|
|
33
33
|
methodName = _ref.methodName,
|
|
34
34
|
args = _ref.args,
|
|
@@ -85,7 +85,7 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
85
85
|
eventType: eventType,
|
|
86
86
|
payload: _objectSpread({
|
|
87
87
|
eventName: eventName || 'Hits Viewed',
|
|
88
|
-
index:
|
|
88
|
+
index: getIndex(),
|
|
89
89
|
objectIDs: objectIDsByChunk[i]
|
|
90
90
|
}, additionalData),
|
|
91
91
|
hits: batch,
|
|
@@ -100,7 +100,7 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
100
100
|
eventType: eventType,
|
|
101
101
|
payload: _objectSpread({
|
|
102
102
|
eventName: eventName || 'Hit Clicked',
|
|
103
|
-
index:
|
|
103
|
+
index: getIndex(),
|
|
104
104
|
queryID: queryID,
|
|
105
105
|
objectIDs: objectIDsByChunk[i],
|
|
106
106
|
positions: positionsByChunk[i]
|
|
@@ -117,7 +117,7 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
117
117
|
eventType: eventType,
|
|
118
118
|
payload: _objectSpread({
|
|
119
119
|
eventName: eventName || 'Hit Converted',
|
|
120
|
-
index:
|
|
120
|
+
index: getIndex(),
|
|
121
121
|
queryID: queryID,
|
|
122
122
|
objectIDs: objectIDsByChunk[i]
|
|
123
123
|
}, additionalData),
|
|
@@ -133,7 +133,7 @@ function _buildEventPayloadsForHits(_ref) {
|
|
|
133
133
|
}
|
|
134
134
|
function createSendEventForHits(_ref2) {
|
|
135
135
|
var instantSearchInstance = _ref2.instantSearchInstance,
|
|
136
|
-
|
|
136
|
+
getIndex = _ref2.getIndex,
|
|
137
137
|
widgetType = _ref2.widgetType;
|
|
138
138
|
var sentEvents = {};
|
|
139
139
|
var timer = undefined;
|
|
@@ -143,7 +143,7 @@ function createSendEventForHits(_ref2) {
|
|
|
143
143
|
}
|
|
144
144
|
var payloads = _buildEventPayloadsForHits({
|
|
145
145
|
widgetType: widgetType,
|
|
146
|
-
|
|
146
|
+
getIndex: getIndex,
|
|
147
147
|
methodName: 'sendEvent',
|
|
148
148
|
args: args,
|
|
149
149
|
instantSearchInstance: instantSearchInstance
|
|
@@ -163,7 +163,7 @@ function createSendEventForHits(_ref2) {
|
|
|
163
163
|
return sendEventForHits;
|
|
164
164
|
}
|
|
165
165
|
function createBindEventForHits(_ref3) {
|
|
166
|
-
var
|
|
166
|
+
var getIndex = _ref3.getIndex,
|
|
167
167
|
widgetType = _ref3.widgetType,
|
|
168
168
|
instantSearchInstance = _ref3.instantSearchInstance;
|
|
169
169
|
var bindEventForHits = function bindEventForHits() {
|
|
@@ -172,7 +172,7 @@ function createBindEventForHits(_ref3) {
|
|
|
172
172
|
}
|
|
173
173
|
var payloads = _buildEventPayloadsForHits({
|
|
174
174
|
widgetType: widgetType,
|
|
175
|
-
|
|
175
|
+
getIndex: getIndex,
|
|
176
176
|
methodName: 'bindEvent',
|
|
177
177
|
args: args,
|
|
178
178
|
instantSearchInstance: instantSearchInstance
|
package/cjs/lib/version.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _Answers = _interopRequireDefault(require("../../components/Answers/Answers"));
|
|
10
10
|
var _connectAnswers = _interopRequireDefault(require("../../connectors/answers/connectAnswers"));
|
|
@@ -67,20 +67,20 @@ var answersWidget = function answersWidget(widgetParams) {
|
|
|
67
67
|
}
|
|
68
68
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
69
69
|
var cssClasses = {
|
|
70
|
-
root: (0,
|
|
71
|
-
emptyRoot: (0,
|
|
70
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
71
|
+
emptyRoot: (0, _instantsearchUiComponents.cx)(suit({
|
|
72
72
|
modifierName: 'empty'
|
|
73
73
|
}), userCssClasses.emptyRoot),
|
|
74
|
-
header: (0,
|
|
74
|
+
header: (0, _instantsearchUiComponents.cx)(suit({
|
|
75
75
|
descendantName: 'header'
|
|
76
76
|
}), userCssClasses.header),
|
|
77
|
-
loader: (0,
|
|
77
|
+
loader: (0, _instantsearchUiComponents.cx)(suit({
|
|
78
78
|
descendantName: 'loader'
|
|
79
79
|
}), userCssClasses.loader),
|
|
80
|
-
list: (0,
|
|
80
|
+
list: (0, _instantsearchUiComponents.cx)(suit({
|
|
81
81
|
descendantName: 'list'
|
|
82
82
|
}), userCssClasses.list),
|
|
83
|
-
item: (0,
|
|
83
|
+
item: (0, _instantsearchUiComponents.cx)(suit({
|
|
84
84
|
descendantName: 'item'
|
|
85
85
|
}), userCssClasses.item)
|
|
86
86
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _Breadcrumb = _interopRequireDefault(require("../../components/Breadcrumb/Breadcrumb"));
|
|
10
10
|
var _connectBreadcrumb = _interopRequireDefault(require("../../connectors/breadcrumb/connectBreadcrumb"));
|
|
@@ -68,24 +68,24 @@ var breadcrumb = function breadcrumb(widgetParams) {
|
|
|
68
68
|
}
|
|
69
69
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
70
70
|
var cssClasses = {
|
|
71
|
-
root: (0,
|
|
72
|
-
noRefinementRoot: (0,
|
|
71
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
72
|
+
noRefinementRoot: (0, _instantsearchUiComponents.cx)(suit({
|
|
73
73
|
modifierName: 'noRefinement'
|
|
74
74
|
}), userCssClasses.noRefinementRoot),
|
|
75
|
-
list: (0,
|
|
75
|
+
list: (0, _instantsearchUiComponents.cx)(suit({
|
|
76
76
|
descendantName: 'list'
|
|
77
77
|
}), userCssClasses.list),
|
|
78
|
-
item: (0,
|
|
78
|
+
item: (0, _instantsearchUiComponents.cx)(suit({
|
|
79
79
|
descendantName: 'item'
|
|
80
80
|
}), userCssClasses.item),
|
|
81
|
-
selectedItem: (0,
|
|
81
|
+
selectedItem: (0, _instantsearchUiComponents.cx)(suit({
|
|
82
82
|
descendantName: 'item',
|
|
83
83
|
modifierName: 'selected'
|
|
84
84
|
}), userCssClasses.selectedItem),
|
|
85
|
-
separator: (0,
|
|
85
|
+
separator: (0, _instantsearchUiComponents.cx)(suit({
|
|
86
86
|
descendantName: 'separator'
|
|
87
87
|
}), userCssClasses.separator),
|
|
88
|
-
link: (0,
|
|
88
|
+
link: (0, _instantsearchUiComponents.cx)(suit({
|
|
89
89
|
descendantName: 'link'
|
|
90
90
|
}), userCssClasses.link)
|
|
91
91
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _ClearRefinements = _interopRequireDefault(require("../../components/ClearRefinements/ClearRefinements"));
|
|
10
10
|
var _connectClearRefinements = _interopRequireDefault(require("../../connectors/clear-refinements/connectClearRefinements"));
|
|
@@ -63,11 +63,11 @@ var clearRefinements = function clearRefinements(widgetParams) {
|
|
|
63
63
|
}
|
|
64
64
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
65
65
|
var cssClasses = {
|
|
66
|
-
root: (0,
|
|
67
|
-
button: (0,
|
|
66
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
67
|
+
button: (0, _instantsearchUiComponents.cx)(suit({
|
|
68
68
|
descendantName: 'button'
|
|
69
69
|
}), userCssClasses.button),
|
|
70
|
-
disabledButton: (0,
|
|
70
|
+
disabledButton: (0, _instantsearchUiComponents.cx)(suit({
|
|
71
71
|
descendantName: 'button',
|
|
72
72
|
modifierName: 'disabled'
|
|
73
73
|
}), userCssClasses.disabledButton)
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _CurrentRefinements = _interopRequireDefault(require("../../components/CurrentRefinements/CurrentRefinements"));
|
|
10
10
|
var _connectCurrentRefinements = _interopRequireDefault(require("../../connectors/current-refinements/connectCurrentRefinements"));
|
|
@@ -50,26 +50,26 @@ var currentRefinements = function currentRefinements(widgetParams) {
|
|
|
50
50
|
}
|
|
51
51
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
52
52
|
var cssClasses = {
|
|
53
|
-
root: (0,
|
|
54
|
-
noRefinementRoot: (0,
|
|
53
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
54
|
+
noRefinementRoot: (0, _instantsearchUiComponents.cx)(suit({
|
|
55
55
|
modifierName: 'noRefinement'
|
|
56
56
|
}), userCssClasses.noRefinementRoot),
|
|
57
|
-
list: (0,
|
|
57
|
+
list: (0, _instantsearchUiComponents.cx)(suit({
|
|
58
58
|
descendantName: 'list'
|
|
59
59
|
}), userCssClasses.list),
|
|
60
|
-
item: (0,
|
|
60
|
+
item: (0, _instantsearchUiComponents.cx)(suit({
|
|
61
61
|
descendantName: 'item'
|
|
62
62
|
}), userCssClasses.item),
|
|
63
|
-
label: (0,
|
|
63
|
+
label: (0, _instantsearchUiComponents.cx)(suit({
|
|
64
64
|
descendantName: 'label'
|
|
65
65
|
}), userCssClasses.label),
|
|
66
|
-
category: (0,
|
|
66
|
+
category: (0, _instantsearchUiComponents.cx)(suit({
|
|
67
67
|
descendantName: 'category'
|
|
68
68
|
}), userCssClasses.category),
|
|
69
|
-
categoryLabel: (0,
|
|
69
|
+
categoryLabel: (0, _instantsearchUiComponents.cx)(suit({
|
|
70
70
|
descendantName: 'categoryLabel'
|
|
71
71
|
}), userCssClasses.categoryLabel),
|
|
72
|
-
delete: (0,
|
|
72
|
+
delete: (0, _instantsearchUiComponents.cx)(suit({
|
|
73
73
|
descendantName: 'delete'
|
|
74
74
|
}), userCssClasses.delete)
|
|
75
75
|
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
9
9
|
var _preact = require("preact");
|
|
10
10
|
var _connectGeoSearch = _interopRequireDefault(require("../../connectors/geo-search/connectGeoSearch"));
|
|
11
11
|
var _suit = require("../../lib/suit");
|
|
@@ -88,35 +88,35 @@ var geoSearch = function geoSearch(widgetParams) {
|
|
|
88
88
|
}
|
|
89
89
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
90
90
|
var cssClasses = {
|
|
91
|
-
root: (0,
|
|
91
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
92
92
|
// Required only to mount / unmount the Preact tree
|
|
93
93
|
tree: suit({
|
|
94
94
|
descendantName: 'tree'
|
|
95
95
|
}),
|
|
96
|
-
map: (0,
|
|
96
|
+
map: (0, _instantsearchUiComponents.cx)(suit({
|
|
97
97
|
descendantName: 'map'
|
|
98
98
|
}), userCssClasses.map),
|
|
99
|
-
control: (0,
|
|
99
|
+
control: (0, _instantsearchUiComponents.cx)(suit({
|
|
100
100
|
descendantName: 'control'
|
|
101
101
|
}), userCssClasses.control),
|
|
102
|
-
label: (0,
|
|
102
|
+
label: (0, _instantsearchUiComponents.cx)(suit({
|
|
103
103
|
descendantName: 'label'
|
|
104
104
|
}), userCssClasses.label),
|
|
105
|
-
selectedLabel: (0,
|
|
105
|
+
selectedLabel: (0, _instantsearchUiComponents.cx)(suit({
|
|
106
106
|
descendantName: 'label',
|
|
107
107
|
modifierName: 'selected'
|
|
108
108
|
}), userCssClasses.selectedLabel),
|
|
109
|
-
input: (0,
|
|
109
|
+
input: (0, _instantsearchUiComponents.cx)(suit({
|
|
110
110
|
descendantName: 'input'
|
|
111
111
|
}), userCssClasses.input),
|
|
112
|
-
redo: (0,
|
|
112
|
+
redo: (0, _instantsearchUiComponents.cx)(suit({
|
|
113
113
|
descendantName: 'redo'
|
|
114
114
|
}), userCssClasses.redo),
|
|
115
|
-
disabledRedo: (0,
|
|
115
|
+
disabledRedo: (0, _instantsearchUiComponents.cx)(suit({
|
|
116
116
|
descendantName: 'redo',
|
|
117
117
|
modifierName: 'disabled'
|
|
118
118
|
}), userCssClasses.disabledRedo),
|
|
119
|
-
reset: (0,
|
|
119
|
+
reset: (0, _instantsearchUiComponents.cx)(suit({
|
|
120
120
|
descendantName: 'reset'
|
|
121
121
|
}), userCssClasses.reset)
|
|
122
122
|
};
|
|
@@ -140,7 +140,7 @@ var geoSearch = function geoSearch(widgetParams) {
|
|
|
140
140
|
return new HTMLMarker(_objectSpread(_objectSpread(_objectSpread({}, customHTMLMarker.createOptions(item)), rest), {}, {
|
|
141
141
|
__id: item.objectID,
|
|
142
142
|
position: item._geoloc,
|
|
143
|
-
className: (0,
|
|
143
|
+
className: (0, _instantsearchUiComponents.cx)(suit({
|
|
144
144
|
descendantName: 'marker'
|
|
145
145
|
})),
|
|
146
146
|
template: (0, _templating.renderTemplate)({
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _formatNumber = require("../../lib/formatNumber");
|
|
10
10
|
var defaultTemplates = {
|
|
@@ -15,12 +15,12 @@ var defaultTemplates = {
|
|
|
15
15
|
cssClasses = _ref.cssClasses,
|
|
16
16
|
isRefined = _ref.isRefined;
|
|
17
17
|
return (0, _preact.h)("a", {
|
|
18
|
-
className: (0,
|
|
18
|
+
className: (0, _instantsearchUiComponents.cx)((0, _instantsearchUiComponents.cx)(cssClasses.link), (0, _instantsearchUiComponents.cx)(isRefined ? cssClasses.selectedItemLink : undefined)),
|
|
19
19
|
href: url
|
|
20
20
|
}, (0, _preact.h)("span", {
|
|
21
|
-
className: (0,
|
|
21
|
+
className: (0, _instantsearchUiComponents.cx)(cssClasses.label)
|
|
22
22
|
}, label), (0, _preact.h)("span", {
|
|
23
|
-
className: (0,
|
|
23
|
+
className: (0, _instantsearchUiComponents.cx)(cssClasses.count)
|
|
24
24
|
}, (0, _formatNumber.formatNumber)(count)));
|
|
25
25
|
},
|
|
26
26
|
showMoreText: function showMoreText(_ref2) {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _RefinementList = _interopRequireDefault(require("../../components/RefinementList/RefinementList"));
|
|
10
10
|
var _connectHierarchicalMenu = _interopRequireDefault(require("../../connectors/hierarchical-menu/connectHierarchicalMenu"));
|
|
@@ -133,45 +133,45 @@ var hierarchicalMenu = function hierarchicalMenu(widgetParams) {
|
|
|
133
133
|
}
|
|
134
134
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
135
135
|
var cssClasses = {
|
|
136
|
-
root: (0,
|
|
137
|
-
noRefinementRoot: (0,
|
|
136
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
137
|
+
noRefinementRoot: (0, _instantsearchUiComponents.cx)(suit({
|
|
138
138
|
modifierName: 'noRefinement'
|
|
139
139
|
}), userCssClasses.noRefinementRoot),
|
|
140
|
-
list: (0,
|
|
140
|
+
list: (0, _instantsearchUiComponents.cx)(suit({
|
|
141
141
|
descendantName: 'list'
|
|
142
142
|
}), userCssClasses.list),
|
|
143
|
-
childList: (0,
|
|
143
|
+
childList: (0, _instantsearchUiComponents.cx)(suit({
|
|
144
144
|
descendantName: 'list',
|
|
145
145
|
modifierName: 'child'
|
|
146
146
|
}), userCssClasses.childList),
|
|
147
|
-
item: (0,
|
|
147
|
+
item: (0, _instantsearchUiComponents.cx)(suit({
|
|
148
148
|
descendantName: 'item'
|
|
149
149
|
}), userCssClasses.item),
|
|
150
|
-
selectedItem: (0,
|
|
150
|
+
selectedItem: (0, _instantsearchUiComponents.cx)(suit({
|
|
151
151
|
descendantName: 'item',
|
|
152
152
|
modifierName: 'selected'
|
|
153
153
|
}), userCssClasses.selectedItem),
|
|
154
|
-
parentItem: (0,
|
|
154
|
+
parentItem: (0, _instantsearchUiComponents.cx)(suit({
|
|
155
155
|
descendantName: 'item',
|
|
156
156
|
modifierName: 'parent'
|
|
157
157
|
}), userCssClasses.parentItem),
|
|
158
|
-
link: (0,
|
|
158
|
+
link: (0, _instantsearchUiComponents.cx)(suit({
|
|
159
159
|
descendantName: 'link'
|
|
160
160
|
}), userCssClasses.link),
|
|
161
|
-
selectedItemLink: (0,
|
|
161
|
+
selectedItemLink: (0, _instantsearchUiComponents.cx)(suit({
|
|
162
162
|
descendantName: 'link',
|
|
163
163
|
modifierName: 'selected'
|
|
164
164
|
}), userCssClasses.selectedItemLink),
|
|
165
|
-
label: (0,
|
|
165
|
+
label: (0, _instantsearchUiComponents.cx)(suit({
|
|
166
166
|
descendantName: 'label'
|
|
167
167
|
}), userCssClasses.label),
|
|
168
|
-
count: (0,
|
|
168
|
+
count: (0, _instantsearchUiComponents.cx)(suit({
|
|
169
169
|
descendantName: 'count'
|
|
170
170
|
}), userCssClasses.count),
|
|
171
|
-
showMore: (0,
|
|
171
|
+
showMore: (0, _instantsearchUiComponents.cx)(suit({
|
|
172
172
|
descendantName: 'showMore'
|
|
173
173
|
}), userCssClasses.showMore),
|
|
174
|
-
disabledShowMore: (0,
|
|
174
|
+
disabledShowMore: (0, _instantsearchUiComponents.cx)(suit({
|
|
175
175
|
descendantName: 'showMore',
|
|
176
176
|
modifierName: 'disabled'
|
|
177
177
|
}), userCssClasses.disabledShowMore)
|
package/cjs/widgets/hits/hits.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _Hits = _interopRequireDefault(require("../../components/Hits/Hits"));
|
|
10
10
|
var _connectHits = _interopRequireDefault(require("../../connectors/hits/connectHits"));
|
|
@@ -69,14 +69,14 @@ var hits = function hits(widgetParams) {
|
|
|
69
69
|
}
|
|
70
70
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
71
71
|
var cssClasses = {
|
|
72
|
-
root: (0,
|
|
73
|
-
emptyRoot: (0,
|
|
72
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
73
|
+
emptyRoot: (0, _instantsearchUiComponents.cx)(suit({
|
|
74
74
|
modifierName: 'empty'
|
|
75
75
|
}), userCssClasses.emptyRoot),
|
|
76
|
-
list: (0,
|
|
76
|
+
list: (0, _instantsearchUiComponents.cx)(suit({
|
|
77
77
|
descendantName: 'list'
|
|
78
78
|
}), userCssClasses.list),
|
|
79
|
-
item: (0,
|
|
79
|
+
item: (0, _instantsearchUiComponents.cx)(suit({
|
|
80
80
|
descendantName: 'item'
|
|
81
81
|
}), userCssClasses.item)
|
|
82
82
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _Selector = _interopRequireDefault(require("../../components/Selector/Selector"));
|
|
10
10
|
var _connectHitsPerPage = _interopRequireDefault(require("../../connectors/hits-per-page/connectHitsPerPage"));
|
|
@@ -57,11 +57,11 @@ var hitsPerPage = function hitsPerPage(widgetParams) {
|
|
|
57
57
|
}
|
|
58
58
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
59
59
|
var cssClasses = {
|
|
60
|
-
root: (0,
|
|
61
|
-
select: (0,
|
|
60
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
61
|
+
select: (0, _instantsearchUiComponents.cx)(suit({
|
|
62
62
|
descendantName: 'select'
|
|
63
63
|
}), userCssClasses.select),
|
|
64
|
-
option: (0,
|
|
64
|
+
option: (0, _instantsearchUiComponents.cx)(suit({
|
|
65
65
|
descendantName: 'option'
|
|
66
66
|
}), userCssClasses.option)
|
|
67
67
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _InfiniteHits = _interopRequireDefault(require("../../components/InfiniteHits/InfiniteHits"));
|
|
10
10
|
var _connectInfiniteHits = _interopRequireDefault(require("../../connectors/infinite-hits/connectInfiniteHits"));
|
|
@@ -81,27 +81,27 @@ var infiniteHits = function infiniteHits(widgetParams) {
|
|
|
81
81
|
}
|
|
82
82
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
83
83
|
var cssClasses = {
|
|
84
|
-
root: (0,
|
|
85
|
-
emptyRoot: (0,
|
|
84
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
85
|
+
emptyRoot: (0, _instantsearchUiComponents.cx)(suit({
|
|
86
86
|
modifierName: 'empty'
|
|
87
87
|
}), userCssClasses.emptyRoot),
|
|
88
|
-
item: (0,
|
|
88
|
+
item: (0, _instantsearchUiComponents.cx)(suit({
|
|
89
89
|
descendantName: 'item'
|
|
90
90
|
}), userCssClasses.item),
|
|
91
|
-
list: (0,
|
|
91
|
+
list: (0, _instantsearchUiComponents.cx)(suit({
|
|
92
92
|
descendantName: 'list'
|
|
93
93
|
}), userCssClasses.list),
|
|
94
|
-
loadPrevious: (0,
|
|
94
|
+
loadPrevious: (0, _instantsearchUiComponents.cx)(suit({
|
|
95
95
|
descendantName: 'loadPrevious'
|
|
96
96
|
}), userCssClasses.loadPrevious),
|
|
97
|
-
disabledLoadPrevious: (0,
|
|
97
|
+
disabledLoadPrevious: (0, _instantsearchUiComponents.cx)(suit({
|
|
98
98
|
descendantName: 'loadPrevious',
|
|
99
99
|
modifierName: 'disabled'
|
|
100
100
|
}), userCssClasses.disabledLoadPrevious),
|
|
101
|
-
loadMore: (0,
|
|
101
|
+
loadMore: (0, _instantsearchUiComponents.cx)(suit({
|
|
102
102
|
descendantName: 'loadMore'
|
|
103
103
|
}), userCssClasses.loadMore),
|
|
104
|
-
disabledLoadMore: (0,
|
|
104
|
+
disabledLoadMore: (0, _instantsearchUiComponents.cx)(suit({
|
|
105
105
|
descendantName: 'loadMore',
|
|
106
106
|
modifierName: 'disabled'
|
|
107
107
|
}), userCssClasses.disabledLoadMore)
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _formatNumber = require("../../lib/formatNumber");
|
|
10
10
|
var defaultTemplates = {
|
|
@@ -14,12 +14,12 @@ var defaultTemplates = {
|
|
|
14
14
|
label = _ref.label,
|
|
15
15
|
count = _ref.count;
|
|
16
16
|
return (0, _preact.h)("a", {
|
|
17
|
-
className: (0,
|
|
17
|
+
className: (0, _instantsearchUiComponents.cx)(cssClasses.link),
|
|
18
18
|
href: url
|
|
19
19
|
}, (0, _preact.h)("span", {
|
|
20
|
-
className: (0,
|
|
20
|
+
className: (0, _instantsearchUiComponents.cx)(cssClasses.label)
|
|
21
21
|
}, label), (0, _preact.h)("span", {
|
|
22
|
-
className: (0,
|
|
22
|
+
className: (0, _instantsearchUiComponents.cx)(cssClasses.count)
|
|
23
23
|
}, (0, _formatNumber.formatNumber)(count)));
|
|
24
24
|
},
|
|
25
25
|
showMoreText: function showMoreText(_ref2) {
|
package/cjs/widgets/menu/menu.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
8
|
var _preact = require("preact");
|
|
9
9
|
var _RefinementList = _interopRequireDefault(require("../../components/RefinementList/RefinementList"));
|
|
10
10
|
var _connectMenu = _interopRequireDefault(require("../../connectors/menu/connectMenu"));
|
|
@@ -81,33 +81,33 @@ var menu = function menu(widgetParams) {
|
|
|
81
81
|
}
|
|
82
82
|
var containerNode = (0, _utils.getContainerNode)(container);
|
|
83
83
|
var cssClasses = {
|
|
84
|
-
root: (0,
|
|
85
|
-
noRefinementRoot: (0,
|
|
84
|
+
root: (0, _instantsearchUiComponents.cx)(suit(), userCssClasses.root),
|
|
85
|
+
noRefinementRoot: (0, _instantsearchUiComponents.cx)(suit({
|
|
86
86
|
modifierName: 'noRefinement'
|
|
87
87
|
}), userCssClasses.noRefinementRoot),
|
|
88
|
-
list: (0,
|
|
88
|
+
list: (0, _instantsearchUiComponents.cx)(suit({
|
|
89
89
|
descendantName: 'list'
|
|
90
90
|
}), userCssClasses.list),
|
|
91
|
-
item: (0,
|
|
91
|
+
item: (0, _instantsearchUiComponents.cx)(suit({
|
|
92
92
|
descendantName: 'item'
|
|
93
93
|
}), userCssClasses.item),
|
|
94
|
-
selectedItem: (0,
|
|
94
|
+
selectedItem: (0, _instantsearchUiComponents.cx)(suit({
|
|
95
95
|
descendantName: 'item',
|
|
96
96
|
modifierName: 'selected'
|
|
97
97
|
}), userCssClasses.selectedItem),
|
|
98
|
-
link: (0,
|
|
98
|
+
link: (0, _instantsearchUiComponents.cx)(suit({
|
|
99
99
|
descendantName: 'link'
|
|
100
100
|
}), userCssClasses.link),
|
|
101
|
-
label: (0,
|
|
101
|
+
label: (0, _instantsearchUiComponents.cx)(suit({
|
|
102
102
|
descendantName: 'label'
|
|
103
103
|
}), userCssClasses.label),
|
|
104
|
-
count: (0,
|
|
104
|
+
count: (0, _instantsearchUiComponents.cx)(suit({
|
|
105
105
|
descendantName: 'count'
|
|
106
106
|
}), userCssClasses.count),
|
|
107
|
-
showMore: (0,
|
|
107
|
+
showMore: (0, _instantsearchUiComponents.cx)(suit({
|
|
108
108
|
descendantName: 'showMore'
|
|
109
109
|
}), userCssClasses.showMore),
|
|
110
|
-
disabledShowMore: (0,
|
|
110
|
+
disabledShowMore: (0, _instantsearchUiComponents.cx)(suit({
|
|
111
111
|
descendantName: 'showMore',
|
|
112
112
|
modifierName: 'disabled'
|
|
113
113
|
}), userCssClasses.disabledShowMore)
|