@constructor-io/constructorio-ui-autocomplete 1.27.1 → 1.28.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.
|
@@ -80,7 +80,7 @@ const useCioAutocomplete = (options) => {
|
|
|
80
80
|
openMenu,
|
|
81
81
|
closeMenu,
|
|
82
82
|
getItemProps: (item) => {
|
|
83
|
-
var _a, _b;
|
|
83
|
+
var _a, _b, _c, _d;
|
|
84
84
|
const { index, sectionId } = (0, helpers_1.getItemPosition)({ item, items });
|
|
85
85
|
const sectionItemTestId = `cio-item-${sectionId === null || sectionId === void 0 ? void 0 : sectionId.replace(' ', '')}`;
|
|
86
86
|
// Products always have links, Search Suggestions with getSearchResultsUrl have links
|
|
@@ -99,7 +99,7 @@ const useCioAutocomplete = (options) => {
|
|
|
99
99
|
};
|
|
100
100
|
return Object.assign(Object.assign(Object.assign({}, getItemPropsDownShift({ item, index })), {
|
|
101
101
|
// @deprecated `sectionItemTestId` will be removed as a className in the next major version
|
|
102
|
-
className: `cio-item ${sectionItemTestId}`, 'data-testid': sectionItemTestId, 'data-cnstrc-item-section': item.section, 'data-cnstrc-item-group': item.groupId, 'data-cnstrc-item-name': item.value, 'data-cnstrc-item-id': (_b = item.data) === null || _b === void 0 ? void 0 : _b.id }), (hasLink ? {} : nonInteractiveItemsProps));
|
|
102
|
+
className: `cio-item ${sectionItemTestId}`, 'data-testid': sectionItemTestId, 'data-cnstrc-item-section': item.section, 'data-cnstrc-item-group': item.groupId, 'data-cnstrc-item-name': item.value, 'data-cnstrc-item-id': (_b = item.data) === null || _b === void 0 ? void 0 : _b.id, 'data-cnstrc-sl-campaign-id': (_c = item.labels) === null || _c === void 0 ? void 0 : _c.sl_campaign_id, 'data-cnstrc-sl-campaign-owner': (_d = item.labels) === null || _d === void 0 ? void 0 : _d.sl_campaign_owner }), (hasLink ? {} : nonInteractiveItemsProps));
|
|
103
103
|
},
|
|
104
104
|
getInputProps: () => (Object.assign(Object.assign({}, getInputProps({
|
|
105
105
|
onChange: (e) => {
|
package/lib/cjs/version.js
CHANGED
|
@@ -109,6 +109,8 @@ const useCioAutocomplete = (options) => {
|
|
|
109
109
|
'data-cnstrc-item-group': item.groupId,
|
|
110
110
|
'data-cnstrc-item-name': item.value,
|
|
111
111
|
'data-cnstrc-item-id': item.data?.id,
|
|
112
|
+
'data-cnstrc-sl-campaign-id': item.labels?.sl_campaign_id,
|
|
113
|
+
'data-cnstrc-sl-campaign-owner': item.labels?.sl_campaign_owner,
|
|
112
114
|
...(hasLink ? {} : nonInteractiveItemsProps),
|
|
113
115
|
};
|
|
114
116
|
},
|
package/lib/mjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.
|
|
1
|
+
export default '1.28.0';
|
package/lib/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.28.0";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED